Just some personal feelings on what I'm actually doing when I'm working with
Python and Nim:
Python:
Nim:
Python is no doubt quick to write, but debugging is very painful even with
various powerful testing and debugging tools. Nim requires me to think a lot
about how to design my code, probab
Yeah, that's my point. Maybe the `nimrtl.dll` approach should be taken for
these python packages? I think it will probably bring back [this
issue](https://github.com/nim-lang/Nim/issues/8405).
Nice work, but I'm curious on what will happen if I import more than one of
your packages in one python script. IIRC, I can't have multiple Nim GC
instances in one process, otherwise the GC module will not behave properly and
finally leads to crash.
It's working now. A very inspiring tutorial. Many thanks to all authors.
The macor tutorial link leads to
404...[https://nim-lang.org/docs/tut3.html](https://nim-lang.org/docs/tut3.html)
Thanks. But I'm still under the impression that `d.s = "abc"` increases the ref
count of `"abc"`. If I understand correctly `d.s = "abc"` will lead to the
execution of the following function:
proc unsureAsgnRef(dest: PPointer, src: pointer) {.compilerProc.} =
# unsureAsgnRef
I noticed the following example in the nim manual to demonstrate how to use an
untraced object:
type
Data = tuple[x, y: int, s: string]
# allocate memory for Data on the heap:
var d = cast[ptr Data](alloc0(sizeof(Data)))
# create a new string on the garbag
Happy new year and many thanks to the contributors!
Exactly what I wanted. I've tried this before:
template POP: int =
result = stack[p]
dec p
Run
and realized it won't work, then I went in the wrong direction (to put it in
one line)...
That solves my probem, many thanks to you all.
Hello everyone! I'm hand-writing a "stack" located in runtime function "stack"
for some CPU-intensive task. What I wish to achieve is something like:
proc main =
# in my case no need for boundary check
stack = array[10, int]
p = -1
# define some operations lik
Yes, I think that's exactly what I wanted. Thank you!
Yes, I think that's exactly what I wanted. Thank you!
Hello, I'm new to Nim and I'm learning it by making some little apps, reading
_Nim in Action_ and so on. During my exploration I found that with higher
verbosity level the compiler complains my code on GC-safety with a warning like
`Warning: not GC-safe: 'foo()' [GcUnsafe]`. I've tried to look u
13 matches
Mail list logo