What is programming?

2021-12-07 Thread carterza
Neat. That's probably the only real thing about that thread / story.

Need explanation of static compiling warning message

2021-12-07 Thread geohuz
I fixed the problem by using musl to generate target exe file. I was trying to compile a program which connects to postgresql, I would like to have the client to be static without dynamic lib.

Show Nim: Forematics is a Metamath verifier written in Nim.

2021-12-07 Thread treeform
[Metamath](http://us.metamath.org/) is project that attempts to describe mathematics from ground up starting from very simple axioms, following very simple rules, building more and more complex theorems on top. While having everything machine checked using a very simple verifier. It has one of t

What is programming?

2021-12-07 Thread ynfle
Ryerson University is most definitely a real university. I've been there and know many people who have graduated from there

What is programming?

2021-12-07 Thread reversem3
Well anything mechanical that can cause a disaster.

Advent of Nim 2021

2021-12-07 Thread pietroppeter
new blogpost for day07 with visualization based on [nanim](https://github.com/EriKWDev/nanim)! I had issues with the video and I was finally able to produce the final videos for Crab Dance 🦀🕺 using an accumulation of wrong fixes... eventually (hopefully) it will al be fixed!

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread freeflow
Sorted, seems like I had a double installation. nim is now reporting 1.6.0 and countit is recognised

Advent of Nim 2021

2021-12-07 Thread ErikSchierboom
Hi all! I decided to try Nim this year with Aoc, and so far I really like it! Nim is very readable and easy to understand. My code can be found here:

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread freeflow
Or perhaps not. Choosenim stable reports that 1.6.0 is installed nim - h reports that version 1.0.4 is being used. what do I do next?

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread SolitudeSF
compiles fine on my machine. > @minran To be equally opaque, why why? `new State` allocates State on the heap and returns reference, while your program gains nothing from it.

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread freeflow
@SolitudeSF Thanks for the feedback. I'm using nim version 1.6. I'm doing advent of code in nim as a challenge from amateur coding (i don't get paid...) in VBA. So there are lots of concepts in nim I need to get my head around. Look like tonighht's reading is about when and where to use new.

thriftcore - Apache Thrift primitives

2021-12-07 Thread icedquinn
implemented codecs for THeader today. this is the 'standard' multiplexing header which adds the ability to carry key/value headers and other things. Envoy supports pulling properties off the THeaders to make routing decisions for example. In theory this means we should be able to talk with othe

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread freeflow
@yhfle, @SolitudeSF. Compilation fails with 'attempting to call undeclared routine: 'countIt'' @minran To be equally opaque, why why?

For loop using iterator `..`

2021-12-07 Thread freeflow
Does no one here take any pride in the fact that nim is so good that newbies just expect a..b to work when a>b. C'mon guys, take a compliment, even when its indirect.

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread miran
> `let s = new State` Why?

For loop using iterator `..`

2021-12-07 Thread miran
> Can anyone explain what is the concept behind this asymmetry? What does `for n in range(3, 1): print(n)` print in Python? (Spoiler: Also nothing, just like Nim)

Windows stack corruption - a journey into the bowels of the beast

2021-12-07 Thread stefantalpalaru
Ever had unexplained stack corruption on Windows? Any curious crash while raising exceptions? One that went away after some unrelated code changes? This is why:

For loop using iterator `..`

2021-12-07 Thread freeflow
I feel your pain. Nim is so good you are encouraged to explore without reading the manual, then you get tripped up by a template It only took me about 10 mins to find countdown to resulve the same issue.

For loop using iterator `..`

2021-12-07 Thread Araq
The alternative "design" makes no sense, that's why: let a = stdin.readLine.parseInt let b = stdin.readLine.parseInt for i in a..b: echo "so the iteration order depends on the input? Terrible..." Run No other programming language that I know of does this e

For loop using iterator `..`

2021-12-07 Thread Zoom
iterator count[T: SomeInteger](x, y: T): T = if x < y: for n in countup(x, y): yield n else: for n in countdown(x, y): yield n Run This is what I used. This retains the direction.

For loop using iterator `..`

2021-12-07 Thread SolitudeSF
> Can anyone explain what is the concept behind this asymmetry? in practice, you know the direction of iteration in 99.9% of cases and terminating behaviour (`1..sequence.high`) is useful far more often. > What is the right way to iterate from a .. b if it is unknown, whether a<=b > or a>b ? `

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread SolitudeSF
your first mistake is trusting nimsuggest error reports

For loop using iterator `..`

2021-12-07 Thread loczaj
Hello Everyone, I am quite new to Nim and solve puzzles of Advent of Code 2021 using Nim. 🙂 I enjoy the flexibility, compactness and elegance of the language. Tanks for Nim. 🙏 I ran into a unexpected behavior. The for loop for i in 1..3: echo i Run would iterate o

For loop using iterator `..`

2021-12-07 Thread DavideGalilei
For that, you can use `countdown(3, 1)`.

Advent of Nim 2021

2021-12-07 Thread bluequartz
Hello all! I've done past AoC with a different language each year, and this year I've picked Nim: / My solutions are more functional-like in nature, because that's how I usually orientate my problem-solving steps. No surprise then that I've used `foldl` daily

RPC systems; Thrift and gRPC

2021-12-07 Thread icedquinn
Have been dealing with RPC internals for a little while now. Particularly reading about old CORBA documents (and how similar the modern web stack is to the original CORBA models just .. ultimately spread out a lot more.) # Rambling about CORBA Object Naming Service seems to have been mostly lo

MetaCall now has initial support for Nim

2021-12-07 Thread icedquinn
This kind of thing seems very similar to what ex. OpenBinder does (did). Will have to take a look at some point.

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread ynfle
Have you tried running it? Also, which version of nim are you running?

TinyCC/tcc vs zig cc compile-times/etc.

2021-12-07 Thread cblake
tcc looks to have been around in Nimrod/Nim over the entire 13 year history, since the first public release in 2008. In that time, only 22 issues mention "tcc". Many of these are dups or mention it only incidentally. (For comparison, clang which didn't really show up until 2011 has 305 mentionin

Advent of Nim 2021

2021-12-07 Thread loczaj
Thanks @Zoom ! Yes, the parsing became simple, still it took too much time writing it. 😀 I am new to Nim, "chunk iterator extension for zero_functional" sounds frightening. 🙂 Thanks for sharing you repo and the Matrix link. 🙏

TinyCC/tcc vs zig cc compile-times/etc.

2021-12-07 Thread inv2004
@cblake Thank you. Unfortunately I found that there were decision to drop tcc support in other issues. I understand if it creates more problems

Need explanation of static compiling warning message

2021-12-07 Thread geohuz
warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking I'm using --passL:-static parameter to make the static exec, and I get the warning: "warning: Using 'dlopen' in statically linked applications requires at r

TinyCC/tcc vs zig cc compile-times/etc.

2021-12-07 Thread cblake
@inv2004 \- see already alluded to by @rockcavera. (I should clarify that --passL:-lm only fixed things for me on Linux.)

sequtils.CountIt not recognised - Possible AoC2021 spoiler

2021-12-07 Thread freeflow
I'm using import sequtils. FilterIt and MapIt work fine, but countIt is not recognised despite being in the documentation for seqUtils. What am I doing wrong? import strformat import sequtils import Constants import Support const InputData = "Day03Test.txt"

C++ bindings - m_type issue

2021-12-07 Thread mantielero
@carterza, I am not sure I understand what you are saying. I `importcpp` both [Handle](https://github.com/mantielero/occt.nim/blob/222c73d7189e3c565ec4f2c6cf4979ed3cf7060d/src/wrapper/tkernel/standard/standard_handle.nim#L39) and [V3dViewer](https://github.com/mantielero/occt.nim/blob/222c73d718

TinyCC/tcc vs zig cc compile-times/etc.

2021-12-07 Thread inv2004
@cblake Thank you for the reminder of `tcc`. I found that `tcc` works noticeably faster for small tasks, like AoC because you do a lot of runs - and the `tcc` makes it fills like you use interpreter, which is good for the kind of tasks. Unfortunately tcc does not work ideal and I have error lik