Return multiple "flat" nodes from a macro

2022-09-20 Thread xigoi
Nice! It doesn't really solve the general problem, but works well enough for this case. Maybe the `inferKind` macro could be added to `std/sugar`?

Is a Java-style GC possible?

2022-09-20 Thread Hlaaftana
Arc is orc without a cycle collector, meaning it just doesn't clean up memory with cycles. Refc isn't that much slower than orc. From what I know it's one of the faster GCs out there, and orc isn't really a GC.

How to get cursor position?

2022-09-20 Thread cagyul
I wrote this just for myself and never ever expected to make it public! I will modify the code as suggested and try to make a PR, having never done so before. (I am just an amateur programmer)

Hot reload & Alternatives - Mac Support (ARM and x86)

2022-09-20 Thread dolphin94
Thank you so much. https://movie2uhd.com/animation>" rel="nofollow">ดูการ์ตูน

Dr. Chaos released!

2022-09-20 Thread dolphin94
https://movie2uhd.com/animation>" >ดูการ์ตูน

Is a Java-style GC possible?

2022-09-20 Thread sls1005
This is what I know about GCs: RefC is not fast, but it's stable. When the reference count of an object reduced to 0, the GC checks if it's still on the heap and then frees it if it's. ORC is fast, but it comes with undefined behaviors. Calling `=destroy` twice without `wasMoved` results in seg

Is a Java-style GC possible?

2022-09-20 Thread amark159
I just looked at Boehm and according to this [SO post](https://stackoverflow.com/questions/4796379/how-does-boehm-gc-work-for-c-program), it doesn't perform any compaction or reference moving (although the Wikipedia page said that it can if integrated fully). I do realize that the binary trees

Is a Java-style GC possible?

2022-09-20 Thread doofenstein
that benchmark is already a bit famous among Nim people because of how terrible it is (though it's not even the worst of all the benchmarks on the site). It measures nothing but allocation, deallocation and GC speed, which especially in a language such as Nim where value types are are very commo

How to get cursor position?

2022-09-20 Thread dlesnoff
@cagyul maybe you can add a when block since I guess this only works for Linux and do a PR to ?

Is a Java-style GC possible?

2022-09-20 Thread amark159
Hello Nim community! I was looking through some benchmarks and I noticed that Java/JVM languages perform exceptionally well for the [binary trees benchmark](https://programming-language-benchmarks.vercel.app/problem/binarytrees) \- running 2-3x faster than other solutions. From what I can tell

internal error: cannot map the empty seq type to a C type

2022-09-20 Thread shirleyquirk
I'd be interested to see a mre if you can cook one up.

Fidgetty Widget System: Rewrite

2022-09-20 Thread catswhiskers
Yep that works with command line nim -d:useLibglfwDLL --passL:"/usr/lib/libglfw.so.3.3" c demo.nim. I can see a demo. Thank you all.

internal error: cannot map the empty seq type to a C type

2022-09-20 Thread drkameleon
I have a _proc_ with several params, some of them with default values (most of them `bool` types, one or two of them containing with a seq, initialized to `= @[]`. When I attempt to add a couple of `when`..`else` clauses inside (based on _static_ params - totally, known beforehand), I keep gett

The fate of Nim Editors

2022-09-20 Thread soundousrelay
Some software will run on your computer with just an integrated graphics card, which is why sometimes it is better to buy software that can run on your machine than buy a new expensive computer for rendering.

Return multiple "flat" nodes from a macro

2022-09-20 Thread auxym
Thanks for the suggestion, I did converge on a [similar solution/workaround](https://github.com/auxym/nim-tinyusb/blob/hid-report-desc/src/tinyusb/class/hid.nim#L748) for my use case.

Return multiple "flat" nodes from a macro

2022-09-20 Thread demotomohiro
`erRepeat` and `erIncrease` under `evalReplace` macro in following code works as if they are macros returns arbitrarily many NimNode. import std/[macros, options] proc erRepeat(body: NimNode): seq[NimNode] = body.expectLen 3 body[2].expectKind nnkIntLit

Fidgetty Widget System: Rewrite

2022-09-20 Thread catswhiskers
There is a package on void glfw-wayland-3.3.7_1. Presumably it would be ok to fiddle with staticglfw.nim and insert a preamble as in the in-house libui package vis: when defined(useLibUiDll): when defined(windows): const dllName* = "libui.dll" elif defi