'import os' not used. Wrong Error Message

2022-06-07 Thread Clavismax
This code only works fine with the import statement: import os when not (declared(commandLineParams)): # POSIX available? echo("Your System ist not POSIX-Compatible.", "Your Parameters cannot be determined because the required", "Function is no

Understand C++ binding with OpenCV.

2022-06-07 Thread AMoura
Great, it was the problem. But why in Nim doc **link** pragma is used ?

Understand C++ binding with OpenCV.

2022-06-07 Thread AMoura
This command doesn't show special any information :(

CDecl: utilities for invoking C/C++ initializer macros

2022-06-07 Thread Pyautogui
Cdecl is a name already claimed by a tool: . Perhaps it would be expedient to rename it, so as to not be confused with this tool?

CDecl: utilities for invoking C/C++ initializer macros

2022-06-07 Thread elcritch
Ok, I reworked the syntax and it covers all my use cases including single, multiple, or no variables. It also supports raw string literals or raw C string outputs. I'm considering it basically stable except for bug fixes. Hopefully this helps other Nim users in the future with similar needs! It

Solving cubic equations

2022-06-07 Thread elcritch
There also looks to be a wrapper for SymEngine derived from SymPy but in C++. Looks like it has a `solve_poly` as well as `diff` and a few others. Example: let x = newSymbol("x") # symbol let y = newSymbol("y") # symbol let xPlusY =

Understand C++ binding with OpenCV.

2022-06-07 Thread k0zmo
Just by looking at linker invocation: g++ -o /mnt/c/OpenCVNim/OpenCVNim /mnt/c/OpenCVNim/extern/opencv-install/lib/libopencv_world.so /home/echopouet/.cache/nim/OpenCVNim_d/stdlib_digitsutils.nim.cpp.o /home/echopouet/.cache/nim/OpenCVNim_d/stdlib_dollars.nim.cpp.o /home/echop

Karax steps forward

2022-06-07 Thread reversem3
Karax is awesome , but what we really need is documentation not just examples. I have been on my spare time creating javascript apps and converting them to karax ones. Karax could be a replacement for html, javascript but it lacks docs. I would be willing to "donate" to a karax cause especially

Multi-Dimensional Tuple is not working as expected

2022-06-07 Thread Clavismax
Thank you, that helps.

Multi-Dimensional Tuple is not working as expected

2022-06-07 Thread Clavismax
# First some warm-up Examples. Version A (short and long version) is working # Example-A: LONG Version type TestA = tuple valueA: int var myTestA: TestA = ( valueA: 1 ) # Example-A: SHORT Version var myTestA = ( valueA:

Multi-Dimensional Tuple is not working as expected

2022-06-07 Thread Yardanico
Nim has no type inference from the types themselves, so if you want an int8 you have to declare the literal like that - `valueA: 11'i8` and `valueB: 12'i64`.

Default values for type(object) fields

2022-06-07 Thread TKD
Thanks. These are very useful.

Default values for type(object) fields

2022-06-07 Thread TKD
Thanks for this. I will use this in the interim whilst the RFC is being worked on.

Karax steps forward

2022-06-07 Thread minnim
> "core" support to build read: a _much-simplified_ , productive way to build... (as in the latter example).

Karax steps forward

2022-06-07 Thread xflywind
Svelte is a great framework. I'm working on a Nim frontend framework combining mutable tracking based on es6 Proxy with direct dom generation. I'm also experimenting some hacks to make components easier. For example support the implicit children function. proc buildText*(name: Reac

Default values for type(object) fields

2022-06-07 Thread xflywind
See also which supports default values for fields using macros.

Default values for type(object) fields

2022-06-07 Thread TKD
Excellent. I will subscribe to the PR. Thanks.

Karax steps forward

2022-06-07 Thread minnim
> what i think i want, is sapper/sveltekit (SSR) but in all nim, where the > backend, routing etc is in nim compiled to c, and the bare minimum required > for the front end features, is nim compiled to js. Exactly. Are there actually any "full stack" single-language and single-codebase solutio

Default values for type(object) fields

2022-06-07 Thread TKD
I was just coding up an object that theoretically should have about 50 fields with well-defined initial values. Then, I found out that Nim does not support initial values for type (object) fields, e.g., type Foo = object a: float = 11.0 # Error b: float = 0.00

Default values for type(object) fields

2022-06-07 Thread Yardanico
The RFC about this is accepted, and there's a WIP PR by flywind already.

Default values for type(object) fields

2022-06-07 Thread Zoom
See these RFCs:

Solving cubic equations

2022-06-07 Thread Levlan
Thank you :-)

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

2022-06-07 Thread Hlaaftana
There is also sugar for this: import sugar var frameTextDefaults = ( author: "Thomas", version: "unknown") frameTextDefaults = frameTextDefaults.dup: author = "Ralf" echo frameTextDefaults Run

Sisix dev fail in nimvm with fatal pragma

2022-06-07 Thread Hlaaftana
Isn't this a limitation of nimvm instead of a bug? Unless error pragmas were special cased.

Solving cubic equations

2022-06-07 Thread Clonk
Using Julia and Polynomials.jl () with Nimjl ) - I used this method in the past for Polynomial of any order import nimjl Julia.init(1): Pkg: add("Polynomials") jlUseModul

Sisix dev fail in nimvm with fatal pragma

2022-06-07 Thread ElegantBeef
The why for this bug is relatively simple. It's cause the `nimVm` when statement does not cull the other branches until later and as such evaluates them, so any compiler magic can run inside. Comically enough that means the following also incorrectly runs the else branch and echoes.

Sisix dev fail in nimvm with fatal pragma

2022-06-07 Thread Araq
Please file a bug report.