Nim
Nim copied to clipboard
Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, an...
Tried to fix the crash from here (#23628), but I'm not very familiar with the compiler internals yet so idk if that change has any other implications.
### Description `renderer.atom()` doesn't have a `nkFloat128Lit` case, and passes a nil `g.config.symbols` down the stack, that ends up creating a `SIGILL` when it is read by `myhash` ```nim #...
### Description When compiling the following code, the compiler just stops without any error messages. ```nim type Bar[T] = object Foo[T; C: static int] = object bar: Bar[Foo[T, C]] var...
```nim proc FP[T](A: var openArray[T], myCmp : proc(x,y:T):T): int = 1 proc FS[T](A: var openArray[T], myCmp : proc(x,y:T):T = system.cmp[T]): int = result= FP(A, myCmp) const N= 6 K= 3...
### Description On Windows, anything that calls `allocShared0` fails subsequent checks with `nim check` ```nim proc myFunc(a: string) = var x: int = "" import std/os static: echo getCurrentDir() proc...
Let it capture result when it is of ref type
ref https://forum.nim-lang.org/t/11590
### Description I found a case, where `getStackTrace()` returns the line number of the `raise` statement inside the template definition, instead of the line number of the template instantiation. Test...
### Description `unicode.splitWhitespace()` returns empty strings, but `strutils.splitWhitespace()` not. Test program: ```nim import std / strutils import std / unicode let s = " foo \t bar baz " echo...
### Description It seems there is a mem leak when raising exceptions from an async proc. The command I ran: ``` $ nim c -d:danger --mm:orc --debugger:native --threads:off -d:useMalloc bug.nim...