I have a list of int-int, which I'm storing as a _seq_ of _(int,int)_ tuples
(the first int being a hash value, so it's not like 0-1-2-3...)
I have to test this structure for membership (whether an index - the first
_int_ \- exists), look up a value (get the second _int_ for a specific first
OK, so, I'm a bit confused.
I have this template:
template initTopContextWith(pairs:seq[(int,Value)]) =
shallowCopy(Stack[^1],pairs)
Run
which I'm calling/using from another _proc_.
When I use the template, the produced code is:
//
I'm in and learnin' Nim!
[https://github.com/TheSpydog/AdventOfCode](https://github.com/TheSpydog/AdventOfCode)
Ah, interesting. Thanks for explaining, makes sense.
Global variable always deepCopy, local variable `let` assign using shallowCopy
for value type, it is by design, not bug, not feature.
doin' it
[https://github.com/exelotl/aoc2019](https://github.com/exelotl/aoc2019)
Good catch ;)
Decided to give this a proper try this year. Let's see how this goes. My repo
is here:
[https://github.com/dom96/aoc2019](https://github.com/dom96/aoc2019)
Already found a bug in Nim heh:
[https://github.com/nim-lang/Nim/issues/12788](https://github.com/nim-lang/Nim/issues/12788)
Looks like I misread it then - awesome work!
I'm kind of late to the party, but here goes.
[https://github.com/liquid600pgm/aoc-2019](https://github.com/liquid600pgm/aoc-2019)
I came across a situation where using a `let` statement on a value object
created a reference. I then correlated it with [this closed bug
report](https://forum.nim-lang.org/a43!GG4hjurx). So, is this expected
behavior?:
Works as normal:
var data: Table[string, string]
Learning Nim as I do the Advent Of Code 2019.
[https://github.com/gillesmag/advent-of-code-2019](https://github.com/gillesmag/advent-of-code-2019)
Hi,
i currently use this code to divide work between worker threads:
var linePtr: seq[pointer]
for line in memSlices(memfiles.open($args["--inputFile"], mode = fmRead)):
linePtr.add(line.data)
let batchSize = (linePtr.len /
badabing
[https://github.com/SolitudeSF/adventOfCode](https://github.com/SolitudeSF/adventOfCode)
Isn't that just building Nim itself on different platforms?
I didn't see anything in the official Docker images that are posted,
[https://hub.docker.com/r/nimlang/nim](https://hub.docker.com/r/nimlang/nim),
about being able to cross-compile your own Nim code.
It's just for educational purposes as am trying to learn more about nim, the
courses I took only applied it in python 2 but I thought I would find out help
here in translating it In nim
An un-keyed `pop(Table): tuple[K,V]` more similar to `HashSet.pop` is mentioned
in the PR commentary linked above. (I would personally just use the
already-defined iterator than b3liever's inline expansion, but eh. Either way.)
Totally suitable for another PR. I just wanted to keep the above
This is already being done in the nightlies builds, except for OSX binaries.
We are using Holy Build Box for older Linux builds and Dockcross for Arm builds.
[https://github.com/nim-lang/nightlies](https://github.com/nim-lang/nightlies)/
This is now bumped to Nim version 1.0.4
I would help him. He just needs to send me his IP and root password and I'll
show him how.
I'm sticking to Nim this year too.
[https://github.com/filipux/adventofcode2019](https://github.com/filipux/adventofcode2019)
As last year, I will use Nim and only Nim.
[https://github.com/lscrd/AdventOfCode2019](https://github.com/lscrd/AdventOfCode2019)
I almost got convinced to defect to Ocaml, but sticking to Nim for this year:
[https://github.com/zevv/aoc2019](https://github.com/zevv/aoc2019). Enjoy
people!
How can we help you commit bad deeds?! I suggest you forget this, and
concentrate on doing something good instead.
Here we go :)
[https://github.com/ducdetronquito/AdventOfCode2019](https://github.com/ducdetronquito/AdventOfCode2019)
Lol good point, I shouldn't post here when I had too little sleep.
Why mpop, the caller takes ownership of the result and must assign it or
discard it.
happy to participate again!
[https://github.com/pietroppeter/adventofnim](https://github.com/pietroppeter/adventofnim)
28 matches
Mail list logo