OSError errorCode is always 0

2024-08-19 Thread dissolved_girl
What would you expect the return code of a process to be if the process is never executed? Note that the default value for an integer is 0, so if the return code is never set, then it remains 0 by default. Shells, etc have their own defined error codes for this, and set the return code accordin

Including a binary data file as a Nim array

2024-04-19 Thread dissolved_girl
I think you want

Nish, a command line shell

2024-02-11 Thread dissolved_girl
It looks nice! Is there any way to set `^D` (`Ctrl`-`D`, `EOF`) to exit the shell? This is how it works in all other shells.

thread process can not change text buffer

2023-12-01 Thread dissolved_girl
Can you provide some better examples?

Modifying the value of a procedure argument (without making the input argument var)

2023-11-09 Thread dissolved_girl
I never really have this problem since I either operate on `result` or create local variables with names that represent my values more accurately. For example, your code could be rewritten as: proc myFunc(arg: int): int = result = 2*arg let x = 10 echo myFunc(x)

How ready is Nim (and the ecosystem) for front-end web development?

2023-10-06 Thread dissolved_girl
Okay but who cares about 2G networks anyways? Most carriers don't even support that nowadays. Should we keep worrying about stuff not fitting on floppy drives?

How ready is Nim (and the ecosystem) for front-end web development?

2023-10-05 Thread dissolved_girl
What makes you say this? On a regular 2G connection and no cache, this page takes 15 seconds to load, which is fairly acceptable (nowhere near "several minutes"), and a lot of time is spent on loading recaptcha, fonts, avatars from gravatar, etc. Having cache reduces loading times to nearly zero

AES Help Please

2023-10-05 Thread dissolved_girl
It's impossible to say without the encryption code. Fairly sure this padding is added while encrypting.

AES Help Please

2023-10-04 Thread dissolved_girl
That's PKCS padding. It's literally just the number of bytes of padding (in hex) repeated until the end of the block.

AES Help Please

2023-10-04 Thread dissolved_girl
Regarding your code, your problem is that your input is hex-encoded, but you decode it as bytes. A simple fix would be replacing this line: let cryptedInput = toByteSeq(encryptedInput) ... with this: let cryptedInput = cast[seq[byte]](parseHexStr(encryptedInput)) and

ZIP32

2023-10-02 Thread dissolved_girl
Browsing the code, it looks like Zippy might be able to parse 32-bit zip files correctly.

Which tools do you use to code in Nim?

2023-10-02 Thread dissolved_girl
[neovim](https://github.com/neovim/neovim) \+ [LazyVim](https://www.lazyvim.org/) (with a pretty default configuration) + [nimlangserver](https://github.com/nim-lang/langserver) \+ [zah/nim.nvim](https://github.com/zah/nim.vim) (for the syntax highlighting). Works great. I used to use nimlsp bu