Nim v2: what would you change?

2022-05-16 Thread nimoid
type Foo = object f1: int f2: SugarObject # ← f2: F2 ↑ `type F2 = object …` f3: int f4: SugarObject f5: int Run One of the strongest Nim's points is readability. This _optional_ sugar would be much easier to read and maintain than a `typ

Problem with --threads:on

2022-05-16 Thread morturo
I tried without nimble, using this line `nim c --colors:on --path:C:\Users\psore\.nimble\pkgs\lua-1.0 -o:.\bin\server.exe .\src\main.nim` to compile my server, this will compile the binary and I can run int with no problems, but if I include `--threads:on` and compile it, will run and close imm

Trojan:Win32/Wacatac.B!ml

2022-05-16 Thread nimian
This is what I have Nim Compiler Version 1.5.1 [Windows: amd64] Compiled at 2021-04-25 Copyright (c) 2006-2021 by Andreas Rumpf active boot switches: -d:release PS C:Program FilesGitusrbin> gcc --version gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 11.2.0

Trojan:Win32/Wacatac.B!ml

2022-05-16 Thread didlybom
It is also my experience that nimgrab is usually the one executable in the nim distribution that is flagged by Symantec Endpoint protection as containing a Trojan.

Fidgetty: themes ... ?

2022-05-16 Thread reversem3
Same , I agree.

Trojan:Win32/Wacatac.B!ml

2022-05-16 Thread quantimnot
Here is another data point: I made a GitHub Action to download nim-1.4.6_x64.zip and nim-1.6.6_x64.zip and then scan them with updated Windows Defender signatures and there was nothing found. I then compiled a simple program and scanned it with negative results too. This is running on Windows

Memory Leak with --gc:orc and Nimble Decimal Library

2022-05-16 Thread Yardanico
I've already found the actual problem (ARC not calling the destructor), see . As a workaround you can change nim-decimal yourself so it uses an object and defines a destructor on it.

Memory Leak with --gc:orc and Nimble Decimal Library

2022-05-16 Thread rbohl64
Great to hear you found the issue. Wonderful to have such a quick response!

Anyone working on a new Nim book or second edition of Nim in Action?

2022-05-16 Thread adokitkat
wow, I really like it! @Stefan_Salewski you should see this :)

Memory Leak with --gc:orc and Nimble Decimal Library

2022-05-16 Thread Yardanico
A much simpler way to check if memory leaks with `orc` is by using `-d:useMalloc` together with `valgrind`: import std/sugar import decimal/decimal proc main() = let constDcm = newDecimal("0.15") var newRange = collect(for x in 0..<5: constDcm + 1)

Memory Leak with --gc:orc and Nimble Decimal Library

2022-05-16 Thread rbohl64
Thanks for the attention to my issue and recommendations on valgrind use. I experiment with valgrind.

Memory Leak with --gc:orc and Nimble Decimal Library

2022-05-16 Thread rbohl64
Hello, I have a testcase cut down from a larger application that leaks memory with --gc:orc but does not leak memory with --gc:refc. The testcase uses the Decimal library from Nimble. Are there steps that library providers need to take to support --gc:orc ? What should I investigate to determi

Fidgetty: themes ... ?

2022-05-16 Thread kobi
oh and forgot to add that if you want more properties you can simply add them to that object. it's one point of learning for the user. maybe can be split at a later point

Fidgetty: themes ... ?

2022-05-16 Thread kobi
wow, this is a cool direction. But please note that inventing a theming system is a big task. I am sorry to repeat myself but I think it would be wise, to copy the properties of widgets from other systems. I think Flutter is probably the most advanced/flexible here(Kivy is also nice, css and f

Interesting proposal for Error handling and Null through unified option Type.

2022-05-16 Thread kobi
zig-lang and vlang have special handling and function markers for exceptions or errors, they are wrapped in an option type and there is some language support to make it concise. I think it's a nice innovation. The main idea is that exceptions are not some subtle invisible thing that bubbles up u

Fidgetty: themes ... ?

2022-05-16 Thread moigagoo
Great! Sent you an email.