How to return an object of a particular type following a value.

2021-07-06 Thread lbart
Thanks everyone. Maybe, I should added a disclaimer: "i'm trying several techniques in nim, some bad, some wrong, etc". Some responses: > I would use one of our vector math libraries, for example > Arraymancer is a very good library, but it's out of th

How to return an object of a particular type following a value.

2021-07-05 Thread lbart
Hello, I would like to write a function that will take an input and perform a processing and depending on the result it should output an object of a particular type. The procedure is more complicated, but the example below shows what I want to do. What method do you recommend to succeed? Tha

Why not introduce the concept of Decimal in nim ???

2021-03-08 Thread lbart
> I would be interested to know what are other users that would be interested > in maintaining such a library. Me, for a generic geometry library using different kernel (float, fixed-point, rational, decimal).

Generating code coverage with Nim 1.4.0

2020-11-09 Thread lbart
I'm also interested and I'm looking forward to it!

Nim to C

2020-09-03 Thread lbart
Thank you. I confirm `{.bycopy.}` is what I need. BTW, IIRC in nim 1.0 I didn't need this pragma, to have this behavior (I don't have the ability now to test).

Nim to C

2020-09-01 Thread lbart
I took some time (sorry for the delay...) to do tests. You can find logs for FreeBSD with nim 1.2.6. I add a new c code with initialized points. However I also try this code on Linux (Debian 10 with nim 1.2.6 via choosenim) and it doesn't work (same crash with or without malloc).

Nim to C

2020-09-01 Thread lbart
You're right, but it's clearly to test nim->c and see what's happen. However, even with an initialization there's a problem.

Nimforum 2.1.0 is here

2020-08-25 Thread lbart
Very nice! Thanks!

Nim to C

2020-08-24 Thread lbart
Done a lot of time :)

Nim to C

2020-08-24 Thread lbart
Hello, I continue my tests on nim, and in particular the generation of a C library that will be reused in another project. I've been able to make some exports using the documentation examples and @yardanico 's [code](https://github.com/Yardanico/nim-snippets/tree/master/clib). But when I took