I thought table can get the element with key while range got the element with
index, to iterate between table and range is using pairs and items and their
mutable variants. to iterate table, keys or values, can use iterator keys and
values .
> You missed my feature request "Make openarray a
If they only wanted to know routing time, they should try nest too
[https://github.com/kedean/nest](https://github.com/kedean/nest)
Isn't it making `ptr char` or `cstring` will immediately make it untraced?
As to your question regarding `GCunref`, **yes** , it is needed for objects
managed by Nim's GC (like the string example in the manual) when an untraced
object (`ptr`) points to a traced object (`ref`) as you have in your example.
You also need to be careful here. Your intention appears to be
Table doesn't work differently enough to break the iterable rules, what kind of
ranges are you thinking about ? A range is a begin and an end iterator. Or
otherwise said, one iterator with a "isFinished" method (since it is nim's
choice). Soon they'll have next() if I understand correctly.
I'm pretty sure it's not planned for 1.0.
Now due to the need of arbitrary precision floating point arithmetic for
currencies/finance at Status, we wrapped mpdecimal, available
[here](https://github.com/status-im/nim-decimal). Now the wrapper is below
low-level and overload like `+` must be
set is tailored for high performance hence it's only work with ordinal type.
Are you perhaps thinking like this package?
[https://nimble.directory/search?query=functional](https://nimble.directory/search?query=functional)
Range in Nim usually is array and seq (cmiiw), and to support argument
not cool compiler message:
[https://imgur.com/a/AcANV](https://imgur.com/a/AcANV)
it'd be way better: "not nil only applies to ref types" maybe
we should have a pinned threads about those.
If your object was allocated with `allocShared0` then it must be de-allocated
with `deallocShared`.
[https://nim-lang.org/docs/system.html#allocShared0,Natural](https://nim-lang.org/docs/system.html#allocShared0,Natural)
Hrm, I don't consider this post to be insulting. It's a valid concern. Why do
you think it's insulting?
We will eventually have an official package repository, but the idea behind
Nimble's design is to be decentralised at its core, the official repo will just
be another mirror for packages.
Doesn't the compiler pick up this file?
[https://github.com/tbrand/which_is_the_fastest/blob/master/nim/jester/server_nim_jester.nim.cfg](https://github.com/tbrand/which_is_the_fastest/blob/master/nim/jester/server_nim_jester.nim.cfg)
Hi. I have a complex object declared in shared memory:
type
SubObj = object
idata: int
fdata: float
sdata: string
MyObj = object
title: string
data: SubObj
var lock: Lock
var shrObj {.guard: lock.}: ptr MyObj
works today:
#[ comment ]#
Hi, I have the following test code which doesn't work as I expected. The first
finally statement (echo "finally1") is never executed. All the other three echo
lines are working. Have I misunderstood how exceptions should work?
try:
try:
raise newException(Exception,
14 matches
Mail list logo