Is it possible to safely share refs across threads?

2023-09-05 Thread Araq
> With --mm:atomicArc, does every ref basically turn into a SmartPtr? Yes, that is exactly what happens.

Is it possible to safely share refs across threads?

2023-09-05 Thread PMunch
With `--mm:atomicArc`, does every ref basically turn into a `SmartPtr`? Or is there a further distinction I'm not aware of?

Mastering Nim 2.0

2023-09-05 Thread Araq
The index was expanded, yes.

how to properly json serialzie/deserialize DateTime?

2023-09-05 Thread aiac
it works nice, thanks ;-)

Is it possible to safely share refs across threads?

2023-09-05 Thread Araq
It never was "supported" to begin with, the contributor never added support for Go's write barrier.

Is it possible to use the haggling face model in the Nim language?

2023-09-05 Thread nnahito
I am wondering if it is possible to use the Model published in Hagging Face in the Nim language. For example, the following translation model. Basically machine learning is strong in Python, but I would like to go with Nim if possible. Recently, ther

Mastering Nim 2.0

2023-09-05 Thread crfout
Does the new version have a useful index? That's the real weakness of the original.

Demo video of Figuro GUI progress

2023-09-05 Thread elcritch
> The first widget that needs your attention is a text editor widget that can > do syntax highlighting. ;-) haha, that's like the hardest widget to do. Though I think @ElegantBeef made one for Nico? :) > Feel free to copy as much code as you think is good from my abandoned NimEdit > project.

Demo video of Figuro GUI progress

2023-09-05 Thread elcritch
> Are there allready controls like a combobox? Not yet, I'm still working on the core. It'll be fairly easy to make them once the core is ready. > How does the hello world-code look like? It's very similar to Fidget/Fidgetty for the basics:

How can I shorten the compile time?

2023-09-05 Thread panno
### Environment Nim v2.0.0 gc: orc opt: speed app: lib ### Source Code `nim c demo/src/demo.nim` ### Occurring Problems Compilation takes a long time. About 170 seconds with -f option and 120 seconds without. As far as the outp

nimsaem extension stops working correctly when there's an error in the code

2023-09-05 Thread buster_blue
I see a "Project" setting in the extension settings. That's just the default value which is nothing.

nimsaem extension stops working correctly when there's an error in the code

2023-09-05 Thread buster_blue
I'm not exactly sure what you mean by "project file set up", but this is just a single file that I'm editing by itself, so I think everything is included, and I haven't imported anything.

Is it possible to safely share refs across threads?

2023-09-05 Thread konsumlamm
So `mm:go` isn't supported anymore? Are there any plans to also add `mm:atomicOrc`?

nimsaem extension stops working correctly when there's an error in the code

2023-09-05 Thread doofenstein
I cannot reproduce, the errors are displayed fine. Is it possible that you have a project file set up which isn't the file you're working on/is not imported/included by it?

nimsaem extension stops working correctly when there's an error in the code

2023-09-05 Thread buster_blue
Sure. This was the smallest I could get the code while still having both issues, the extension not showing the errors and not giving suggestions anymore. proc fooConvert() = let (output) = osproc.shellCmd(cmd) Run Running `nim check` on the command line does show

Is it possible to safely share refs across threads?

2023-09-05 Thread Araq
`mm:boehm` is still supported and supports what you need. There is also `mm:atomicArc` which makes `ref` relatively painfree but doesn't have a cycle collector.

Is it possible to safely share refs across threads?

2023-09-05 Thread PMunch
`SharedPtr` is indeed the way to go. Either that or `UniquePtr`, `ConstPtr`, or the new `Isolate` construct depending on your usecase. As you point out ARC by default doesn't use atomic ref counting, so sharing refs is quite tricky. The possibility of race conditions from destructors and such ar

nimsaem extension stops working correctly when there's an error in the code

2023-09-05 Thread doofenstein
that sounds like a bug in the Nim compiler error output parsing, we've had those a few times. Can you please provide me with some (ideally minimal) code which triggers this behaviour?

Is it possible to safely share refs across threads?

2023-09-05 Thread konsumlamm
I didn't find any definitive documentation on this. According to , the reference counting used by ARC/ORC is not atomic, so I guess the answer is no for them? The documentation for `refc` says that it has thread-local heaps, so I guess you can't share `re

Nimwave - build TUIs for the terminal, web, and desktop

2023-09-05 Thread dlesnoff
It is much better but every ten seconds, it lags and ignore the mouse clicks if we repeatedly press the counter button. I may discuss further about it in the GitHub issue.

nimsaem extension stops working correctly when there's an error in the code

2023-09-05 Thread buster_blue
I couldn't find any info about this, so I just wanted to see if this was a known issue or if there's a problem on my end. As the title says, when I'm using the extension, and there's some error in the code I'm writing, instead of it showing the error with the red underline and a message in the

how to properly json serialzie/deserialize DateTime?

2023-09-05 Thread SolitudeSF
`jnn.to(DateTime)` -> `jnn.jsonTo(DateTime)`. also, use `jsony` instead.

how to properly json serialzie/deserialize DateTime?

2023-09-05 Thread aiac
when i try to json ser/deser DateTime, i get the compile error: /root/.local/share/rtx/installs/nim/2.0.0/lib/pure/json.nim(1253, 23) Error: type mismatch Expression: initFromJson(dst.zonedTimeFromTimeImpl, getOrDefault(jsonNode, "zonedTimeFromTimeImpl"), jsonPat

Nimwave - build TUIs for the terminal, web, and desktop

2023-09-05 Thread sekao
I fixed the lag issue in the starter project today, thanks for pointing it out. I know it can be overwhelming but I don't plan to move the gui/web stuff out of it.

Nimwave - build TUIs for the terminal, web, and desktop

2023-09-05 Thread dlesnoff
I have managed to output an hello world with your library. It should be possible to propose some default procedures (like a defaultOnTick, defaultOnClick, …). We can always change the onTick procedure after to customize further. You may create another repository for examples with gui and web (o

Demo video of Figuro GUI progress

2023-09-05 Thread Araq
The first widget that needs your attention is a text editor widget that can do syntax highlighting. ;-) Feel free to copy as much code as you think is good from my abandoned NimEdit project.

Demo video of Figuro GUI progress

2023-09-05 Thread Hobbyman
How does the hello world-code look like? Are there allready controls like a combobox?

Demo video of Figuro GUI progress

2023-09-05 Thread elcritch
I started my long weekend by trying to write a simple "clickable" demo. Little did I suspect how much work it'd turn out to be! It was mostly fun and satisfying, but frustrating at points as well. Trying to create that basic "clickable" demo turned up a number of issues both from the Fidgetty/F