Newbie error: SIGSEGV: Illegal storage access. (Attempt to read from nil?)

2023-01-31 Thread sls1005
It just exits with no error message? So weird. Then try `nim c --mm:refc app.nim && ./app`.

Minimising of using imports in the same project

2023-01-31 Thread treeform
Nim trims unused code and does not generate duplicate code. So you can import anything you want but if you only use function, only it will be included in the binary. If you really want to save space in your exe I written a tool to analyze it: I ended

Minimising of using imports in the same project

2023-01-31 Thread xigoi
Don't worry about duplicate imports affecting binary size. This is not C(++), we don't have a dumb parody of a module system.

Minimising of using imports in the same project

2023-01-31 Thread demetera
Dear All, maybe my question is a bit trifling, but I care about binary size and possible memory usage (even it's minimal). If I have more than one files in the project (e.g. **utils.nim** and **main.nim** ), and let's say I use: import strutils Run in **lib.nim** project

Twisting Nim's arm to generate loop #pragmas .

2023-01-31 Thread mode80
yes , the reason hacking ‘||’ is the only(?) thing that works is because Nim otherwise emits “while true goto” style C loops; so any pragma I tack on top with ‘emit’ won’t help it. I wonder if this is also defeating compiler optimizations that only work on standard ‘for’ loops?

Why I stopped programming in Nim

2023-01-31 Thread treeform
About antivirus on Windows, as a person who has shipped a commercial windows app that was regularly hit by anti virus. There is almost nothing you can do except wait. Windows antivirus companies mark your program as a virus when you .exe looks different from anything it saw before. The reports d

Why I stopped programming in Nim

2023-01-31 Thread iffy1
I've had this problem with my Nim + Electron app. Whenever I get a new code-signing certificate, I've had success submitting the application to where they are reviewed and gain reputation. After a few submissions, the code-signing certificate

Twisting Nim's arm to generate loop #pragmas .

2023-01-31 Thread exelotl
Using {.emit.} seems dodgy... Nim's `for` loops produce gotos instead of C `for` loops. So you can't just emit the pragma, you'd have to emit the whole `for` loop. You could emit a C for loop like so: template cfor*(x: untyped; a, b: int; body: untyped) = var `x` {.inject, no

Why I stopped programming in Nim

2023-01-31 Thread pietroppeter
it is tricky to really get nim repos by star, but using [this other search](https://github.com/search?q=stars%3A%22%3E+100%22+language%3ANim&type=Repositories&ref=advsearch&l=Nim&l=) you can see that nitter and vim cubed are actually on the podium. You do still get OffensiveNim at 4th place, 2 o

Mini-book on long-lived ABIs

2023-01-31 Thread PMunch
It seems to have been snapshot by archive.org: