Advent of Nim 2021

2021-12-09 Thread guaracy
Ok, an opportunity to learn Nim.

Could not run program which compiling with static linked lib

2021-12-09 Thread Yardanico
In Nim you also need to do `--dynlibOverride:"pq"` to tell Nim to not try to dynamically load a library if the wrapper uses the `dynlib` pragma, see the bottom of the section.

Advent of Nim 2021

2021-12-09 Thread pointystick
Here's my repo:

More nim newbie woes, this time echo fmt Possible AOC2021 spoiler

2021-12-09 Thread freeflow
I can make State an object. Does it really need to be exported as it is used only within the module in which it is declared.

More nim newbie woes, this time echo fmt Possible AOC2021 spoiler

2021-12-09 Thread Araq
Make `State` an `object` and export it via `*`.

Could not run program which compiling with static linked lib

2021-12-09 Thread geohuz
I'm using docker to cross compile from my macbookpro.

Could not run program which compiling with static linked lib

2021-12-09 Thread treeform
I don't think you can just statically link libpq.so, you need libpg.a - static library file. I don't think `apk add postgresql-dev` gives you that, I think it only gives you the dynamically linked one. For static linking you probably would have to build libpq.a yourself from source. Libpq is a h

Could not run program which compiling with static linked lib

2021-12-09 Thread geohuz
I'm trying to static link postgresql libpq with my program which connects to postgresql server, here is my docker file: FROM nimlang/nim:alpine RUN apk add --no-cache postgresql-dev ENTRYPOINT ["sh", "-c"] Run build: docker build -t pgc

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

2021-12-09 Thread treeform
Pure math is a goal in itself. I mainly written this because it looked like fun, and to brush up on my math skills.

C++ bindings - m_type issue

2021-12-09 Thread rnd83
Or - as the error message states - StandardTransient must be '= object of RootObj' instead of '= object'. Maybe Handle as well?!

How would I port such project to nim?

2021-12-09 Thread Araq
In order to generate it, you first have to understand what to generate.

More nim newbie woes, this time echo fmt Possible AOC2021 spoiler

2021-12-09 Thread freeflow
@Araq. Thanks for taking the time to respond. I can confirm that there is no such item as BoardsAsNumbersrnalErrorFlag in my AoC2021 project. I do have a field in a module level tuple that has part of the same name. I'm happy to post a link to the repository if that's helpful. Stat

thriftcore - Apache Thrift primitives

2021-12-09 Thread icedquinn
Clocked in seven hours (may have been some distractions) and have the generic protocol object and method interface in. Also wrapped the compact encoding format with it. Will need to do the same with THeaders and get some test code going. That leaves the IDL generator and the actual communicatin

How would I port such project to nim?

2021-12-09 Thread icedquinn
aren't you intended to generate this boilerplate from an interface spec when it comes to COM?

More nim newbie woes, this time echo fmt Possible AOC2021 spoiler

2021-12-09 Thread Araq
No. It's more likely you forget an export `*` marker for `BoardsAsNumbersrnalErrorFlag`.

More nim newbie woes, this time echo fmt Possible AOC2021 spoiler

2021-12-09 Thread freeflow
I've got day04 code than is now 'clean' in VSCode by changing from echo fmt to just echo. However I'm still seeing the compiler error out with [Running] nim compile --verbosity:0 --hints:off --run [Running] nim compile --verbosity:0 --hints:off --run "c:\Users\*\source\repos\A

More nim newbie woes, this time echo fmt Possible AOC2021 spoiler

2021-12-09 Thread freeflow
@shirleyquirk That's what I would normally try to do, particularly if I was playing in VBA (my normal amateur hunting grounds). With nim it seems to me that the echo fmt error is related to an mistake that has been made far far away so tracking down a concise example can be difficult for a nim n

Nim's version of the Trojan Source vulnerability

2021-12-09 Thread kobi
so, I was reading today that the dart language solves this issue in this way: The compiler issues a warning about any such invisible characters in a literal string.

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

2021-12-09 Thread kobi
Just out of curiousity, if you don't mind sharing... have you written this project, just out of interest, or does it serve as a step in a more practical goal?

How would I port such project to nim?

2021-12-09 Thread Araq
See for an example how to deal with COM with `nim c`. With `nim cpp` it is probably easier but I don't know the details.