Is something like EnTT possible with Nim?

2021-11-04 Thread guibar
It looks possible with a macro type SoA = object field: seq[int] import macros template `[]`*(s: SoA, i: int): (SoA, int) = (s, i) template declareSoAField(T, field: untyped) = macro field*(o: (T, int)): untyped = expectKind(o, n

Survey Question: flow research

2021-11-04 Thread Fire
re: "lack of recommended best practices" has a couple of general recommendations. Some things I have picked up lurking around the forum: Casts are not to be used unless you really need them. Type conversion is better. Do not use pointers and manual memory m

Is something like EnTT possible with Nim?

2021-11-04 Thread tsojtsoj
I also wrote an entity/component manager: [ecm](https://gitlab.com/tsoj/ecm). I also wrote a little console game using it: [Asteroids](https://gitlab.com/tsoj/asteroids) (doesn't work very well on Windows, but on Linux it works very nicely).

Survey Question: flow research

2021-11-04 Thread rockcavera
I met Nim in late 2017 when I was researching an IRC Bot, for Icecast, for an IRC colleague. At the time I thought it was interesting, but I couldn't do much. I only got back to actively working with Nim at the end of 2018 and beginning of 2019, when I wrote a first program. Since then, I abando

Survey Question: flow research

2021-11-04 Thread ggibson
I like `--verbosity:2`! Didn't know this. FYI anyone using it, hints must not be disabled. I empathize with the observations above. In the 5 years I've been using nim personally and professionally, there are certain rough edges that keep me from recommending it to most people, except for the oc

Survey Question: flow research

2021-11-04 Thread xigoi
Better type inference would require the Hindley-Milner algorithm or similar, which is incompatible with Nim's type system. As for macros, complexity is like energy — you can move it to different places, but the total amount stays constant.

Survey Question: flow research

2021-11-04 Thread ElegantBeef
Verbosity 2 enables `--hint:source` so you can also just pass that and get fewer messages. var a: 10 Run outputs /tmp/tmp.nim(1, 8) Error: type expected, but got: 10 var a: 10 ^ Run

Survey Question: flow research

2021-11-04 Thread alexeypetrushin
My experience with Nim: The core of the **language** is mature and good (I personally would like to have a more auto infer, but it's ok as it is). **Macros** is mature, but hard to use for a seasonal developer (who use Nim only 20% of the time). Every time I use complex macros I regret it later

New here

2021-11-04 Thread reversem3
I have been kinda going the same thing, find some python code and try to write in python. The only thing though python doesn't use types so you can't always looks at python code to make it work in nim. I also have the "NIm in Action" book and use the Nim manually a lot.

Is the fedora nim package not working?

2021-11-04 Thread reversem3
I run multiple different systems. I agree go with choosenim, I have built nim on all my systems also and its interesting but if you want something that's rock solid for any system on a desktop/laptop then use choosenim.

Is something like EnTT possible with Nim?

2021-11-04 Thread didlybom
@araq, I think I get what you are suggesting but I'm not sure it does exactly what I had in mind. What I believe an AOS - SOA transform should do is turn: > my_object[n].my_field into > my_object.my_field[n] rather than into: > my_field[my_object] BTW, I just happened to run into this relate

Survey Question: flow research

2021-11-04 Thread didlybom
Personally, Ove recently starts de to use nil a bit more seriously and the 3 biggest gaps I see are: 1\. The clarity / usefulness of the error messages is not as good as it could be. They are better than in C++ but not as good as Python, for example. I have not done any macro development but ev

Survey Question: flow research

2021-11-04 Thread ynfle
Use `--verbosity:2` to be able to see the exact error Incremental compilation is an in development feature For debugging, you can use nim_gdb with gdb to debug properly. For prelude, did you `include prelude` or `import prelude`

Karax : convert html string to vdom

2021-11-04 Thread Cnerd
Thanks 👍🏾

Karax : convert html string to vdom

2021-11-04 Thread geotre
You are correct that the packages convert html to Karax code, rather than the runtime representation. `innerHtml` is a good option here, there is also a `verbatim` node ([that uses innerHtml in it's implementation](https://github.com/karaxnim/karax/blob/3eb7d4b9ce1752dd664b88abfbaf67e60e142a13/

Survey Question: flow research

2021-11-04 Thread giaco
Nimble is a package manager, a project manager, a compiler wrapper, a project linter, but it doesn't cover all the details for every aspect. It works, but I think it would be better to have a clear separation of the features offered by the tools

Survey Question: flow research

2021-11-04 Thread sdmcallister
Apologies, as this comment really doesn't relate to Nim itself, but rather the libraries. The libraries are also in the public eye. I've seen people, likely newcomers, ask whether project X is dead. Sometimes is isn't, it is just stable enough and the features meets the need of the author. That

Nested Tables

2021-11-04 Thread dxb
I created as a starting point for the discussion.

Survey Question: flow research

2021-11-04 Thread Clonk
The main obstacle for stdlib improvement is that, currently, it is distributed as part of the compiler. Which means that stdlib evolution is linked to compiler evolution. That's a core issue because then if you need to fix a bug in the stdlib, you necessarily have to upgrade the compiler. This

New here

2021-11-04 Thread SebastianM
Hey, As for exercises I feel they focus heavily on math with numbers, Collatz problem.Maybe there could be more exercises with only a small change and some that tell a story e.g favorite pizza (with a seq of ingredients), 99 bottles of beer, animals, etc. I feel also that text is very short

More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS)

2021-11-04 Thread ralizopz
That's awesome! It looks like you're using newlib C, does it need to be installed or is it in the libs directory?