How to get cursor position?

2022-09-22 Thread cagyul
Nice !

how can I buy "Mastering Nim" without using amazon services?

2022-09-22 Thread gambit
Is it really only in paper? I'm travelling all over south america for at least the next year and its basically impossible for me to get a hard copy. Very happy to pay full price for the digital copy though?

codeGenDecl expressions and monomorphization

2022-09-22 Thread CircArgs
TLDR: I want to get access to some differentiating information when using `exportc` on generics

passing pointer from nim dynlib to c host application

2022-09-22 Thread ElegantBeef
Given that it seems like this is a 'bring your allocator' type of scenario you should use `ref ClapPlugin` where you can. Presently what you're doing is returning the address to `plugin` which is on the stack so as soon as you leave the procedure you've got a dangling pointer. Nim `ref`s are com

codeGenDecl expressions and monomorphization

2022-09-22 Thread CircArgs
I have a very quick question related to [codeGenDecl](https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma). Specifically, is there a way to access the variables used in the format string like `$1`? For example, if I wanted to leverage `exportc` on a generic f

passing pointer from nim dynlib to c host application

2022-09-22 Thread alexgustafson
I am working on a nim wrapper for the CLAP audio plugin format. I can compile an audio plugin written in nim as a dynlib and load it into a test host ( written in c ). The host is finding the exposed methods and endpoints that it needs to create a plugin instance, however I am having trouble pa

Is a Java-style GC possible?

2022-09-22 Thread Araq
> [1] This results from people badly misreading an old paper. FWIW it did match up with my measurements. And for plenty of domains (scientific computing, embedded devices) optimized reference counting does work better than tracing techniques. For embedded it really helps if objects are freed "i

Using pragmas to generate methods

2022-09-22 Thread morturo
I need to generate 2 methods for each type marked by a pragma. Can anyone show me how to begin? import std/macros macro serializable*(td) = result = td type SignInPacket {.serializable.} = ref object email: string password: string

Is a Java-style GC possible?

2022-09-22 Thread doofenstein
> Is this really the case? AFAIK arc/orc doesn't do any locking but I haven't > been keeping up with it much. Any further reading on how this locking > operates? when you create a ref object with gc:arc/gc:orc it calls [nimNewObj](https://github.com/nim-lang/Nim/blob/80a0dc295bab6d7699c0da13b6b

Is a Java-style GC possible?

2022-09-22 Thread dom96
> Unfortunately allocation and deallocation with --gc:orc and --threads:on is > slow, because it has to lock/unlock the heap, but this could be alleviated > soon with mimalloc. But even then in such an extreme example classical GC's > will be faster than --gc:orc's ref counting, because they can

Fidgetty Widget System: Rewrite

2022-09-22 Thread catswhiskers
Much appreciated. I've thought many times of joining github, but I absolutely refuse to participate in online capitalist enterprises. I have to hold my nose somewhat on this forum; but such is the pull of this brilliant language. First thing I do with new local nim manual is sed out any google d

How to get cursor position?

2022-09-22 Thread Jointy055
thanks for the information [url=] ดูหนัง Netflix[/url]

High-to-low range in slice

2022-09-22 Thread Jointy055
thanks for the information [url= Netflix[/url]

High-to-low range in slice

2022-09-22 Thread kobi
I assume the reasoning is to prevent something akin to integer underflow, as right now, it simply won't work. so being more explicit to prevent unintentional bugs... but maybe I'm wrong.. the reasoning could be aversion of ascii art games :-)

High-to-low range in slice

2022-09-22 Thread Araq
If you want to reverse a seq, use `reverse`, don't play ASCII art games.

High-to-low range in slice

2022-09-22 Thread drkameleon
OK, I know the question is nothing so important per se, but I'm asking for the sake of it. Let's say I have an array/seq and some slice: arr[x .. y] Run Apparently, this works only if x <= y. What if x > y? Is there any way to do it, using something along the same li

compile-time avoid Exception statement

2022-09-22 Thread drkameleon
Spot on! Thanks a lot! For some reason, I took it for granted that `raise` expected a param, but - apparently - it doesn't. Thanks again! :)

Fidgetty Widget System: Rewrite

2022-09-22 Thread guibar
PR to upstream: Tested locally (this time…).