Nim v2: what would you change?

2022-08-09 Thread ElegantBeef
Personally I think not having Unicode aware strings lets noobs miss many pitfalls, and since we have a distinct type system if you care you can use unicode, the issue is though that Unicode does not provide a distinct `UnicodeStr` or similar for if you care you get a unicode aware API. I do have

fidget - vmath - vector graphics undeclared identifier

2022-08-09 Thread elcritch
I'm unfamiliar with what you mean by vector graphics elements. Fidget doesn't support vector graphic elements to my knowledge. Maybe convert them to bitmaps and use the image/background for a node?

Nim v2: what would you change?

2022-08-09 Thread xigoi
Nim's strings are meant to deal with sequences of bytes, not just text.

Nim v2: what would you change?

2022-08-09 Thread shirleyquirk
> it'd be great if the Nim compiler forced you to deal with the possibility of > nil/null unless you passed some flag Something like ?

Nim v2: what would you change?

2022-08-09 Thread RainbowAsteroids
unicode aware strings. seems odd that in order to deal with text with the type that's supposed to deal with text, I need to use some additional library, like `std/unicode`

Getting compile command in compile time.

2022-08-09 Thread rockcavera
I believe you are wanting this: [std/compilesettings](https://nim-lang.org/docs/compilesettings.html)

Getting compile command in compile time.

2022-08-09 Thread auxym
I'm not sure if you can access all options, but some can be accessed eg. defines: And you can access the `--cpu` and `--os` via `hostCpu` and `hostOs` consts in system.

Getting compile command in compile time.

2022-08-09 Thread chaemon
Are there any way to get compile command in compile time? I know that std/parseopt enables to get runtime option. Then, I wonder how to get compile option in compile time.

Threads dying, memory issues?

2022-08-09 Thread jasonfi
I didn't use the new threading/channels. I'd prefer to stick with the stdlib that comes with Nim unless I really have to switch.

Threads dying, memory issues?

2022-08-09 Thread planetis
Btw I took a peek on the threading/channels implementation and it seems changed in comparison to the original nim and C code. For example ChannelCache is nowhere used. Also ThreadSanitizer reports a data-race when running the top example. So did the changes in the code resulted in unsafe code?

How to use Github's actions/cache with Nim?

2022-08-09 Thread thindil
It depends on what you use. If you install Nim with _choosenim_ you will need to cache `~/.choosenim` directory. If you use any dependencies installed with _nimble_ , you will need to cache `~/.nimble` directory. BTW, GitHub Nim action: has support