Sisix dev fail in nimvm with fatal pragma

2022-06-06 Thread bather
It works: template gen_str_in_ct_0: string = when nimvm: "sisix dev" else: "monkeys" const a = gen_str_in_ct_0() assert a == "sisix dev" assert gen_str_in_ct_0() == "monkeys" Run But it fails: template gen_str_i

Nim v2: what would you change?

2022-06-06 Thread mrgaturus
implement methods as vtable

Nexus Development Framework (initial commit)

2022-06-06 Thread jasonfi
Thanks. I'm sticking to an 80-char width and using more of a vertical style of spacing, I really feel like this helps with readability. VS Code's Dart auto-formatter uses this style too. I'd like an auto-formatter for Nim that works this way, or at least can be configured this way.

Nexus Development Framework (initial commit)

2022-06-06 Thread jasonfi
OK I'll take a look at iMatix GSL, thanks for that.

Understand C++ binding with OpenCV.

2022-06-06 Thread demotomohiro
Is same linker error generated even if you write your code in C++ and build it with g++ or clang? Could you run nim with `--listcmd` option? It shows how linker command is called.

Solving cubic equations

2022-06-06 Thread xigoi
It's a quite straightforward formula. Just writing it is much less effort than making a forum thread, waiting for responses, installing a library, reading its documentation and using it.

Solving cubic equations

2022-06-06 Thread Levlan
i hoped there is a library i can import and avoid writing the code by myself.

Nexus Development Framework (initial commit)

2022-06-06 Thread icedquinn
> code generation meta-modelling is very nice. i've been using iMatix GSL for > this for some things. might be worth mining for inspiration.

Solving cubic equations

2022-06-06 Thread shirleyquirk
1. Sign up for an API account at Wolfram Alpha. 2. `roots(a*X**3+b*X**2+c*X+D)` 3. ... 4. profit

Solving cubic equations

2022-06-06 Thread Levlan
how can I solve cubic equation in nim or by using a library from another language? looking for the most simple solution.

Is there a smarter way to change only one field value of a tuple?

2022-06-06 Thread Clavismax
Thank you!

Is there a smarter way to change only one field value of a tuple?

2022-06-06 Thread Clavismax
This one works, but is ugly, especially if the tuple consists of very many fields. var frameTextDefaults = ( author: "Thomas", version: "unknown") frameTextDefaults = ( author: "Ralf", version: frameTextDefaults.version) Run A

Is there a smarter way to change only one field value of a tuple?

2022-06-06 Thread cblake
Here you go: var frameTextDefaults = ( author: "Thomas", version: "unknown") echo frameTextDefaults frameTextDefaults.author = "Ralf" echo frameTextDefaults frameTextDefaults[0] = "Thomas Again" echo frameTextDefaults Run

Nexus Development Framework (initial commit)

2022-06-06 Thread reversem3
Thank you. I was looking at your for Nexus and it seems pretty concise and easy to read.

Unable to compile nim to wasm on aarch64

2022-06-06 Thread carcinocron
$ nim c -d:danger -d:emscripten --cpu:wasm32 --passC:-m32 --cc:clang --os:linux src/nimstcorepkg/client.nim Hint: used config file '/opt/nim/nim-1.6.6/config/nim.cfg' [Conf] Hint: used config file '/opt/nim/nim-1.6.6/config/config.nims' [Conf] .

Announce: LimDB, a fast, persistent table with LMDB under the hood

2022-06-06 Thread cmc
Yes, and there's a Nim wrapper for MDBX as well, NimDBX! But aside of portability issues that come from NimDBX' Nimterop usage I wanted the original for its maturity.

Announce: LimDB, a fast, persistent table with LMDB under the hood

2022-06-06 Thread cumulonimbus
It's been years since I've used LMDB, and it was amazing. Note that there's a fork called MDBX which claims to be much better (do not test myself, but heard from others that these claims are credible). It appears to have moved from github to here:

Please help me understand the performance difference between Nim/Rust in this (contrived) example

2022-06-06 Thread r3c
Nim's `int` is 8 bytes 64 bit integer, in your Rust code you are using `u32` which is 4 bytes 32 bit unsigned integer. Can you change the Rust example to `i64` and see what happens?

Nexus Development Framework (initial commit)

2022-06-06 Thread jasonfi
There's an example repo available now: This still needs some work, but it should help get you started. It covers the basics of setting up an app.

Announce: LimDB, a fast, persistent table with LMDB under the hood

2022-06-06 Thread cmc
Oh yes if you're looking to have fewer dependencies SQLIte is a perfectly adequate key value store. But LMDB is _full database semantics on memory mapped files_ \- I don't know about you but there is something about that that just makes my mouth water. Performance shows it as well- I think Howa