Math library for renderers and GUIs

2022-08-13 Thread ingo
Do the vec3's etc interoperate with for example [vmath](https://github.com/treeform/vmath) ?

Can't Get Length of Returned Table

2022-08-13 Thread Zekereth
LOL I cannot believe that didn't occur to me at some point. Thanks a lot!

Math library for renderers and GUIs

2022-08-13 Thread ElegantBeef
As nice as it is to see someone implement vectors, quaternions, rotors and so on it'd really be nice if we could agree to use concepts as much as possible for any user facing code that relies on vectors. It makes life so much easier as you can bring your own data types.

Can't Get Length of Returned Table

2022-08-13 Thread ElegantBeef
You most likely did not `import std/tables` in this module, consider `export tables` in the module that declares the type or importing said module directly in your new module.

Can't Get Length of Returned Table

2022-08-13 Thread Zekereth
I have a table member of an object declared as such entries: Table[string, string] Run And I was returning it with this proc getAll*(this: JotzCollection): Table[string, string] = return this.entries Run When I try to get its length

Program not working on Windows 11

2022-08-13 Thread Niminem
Thanks for the help man, adding mingw64/bin to the path worked

Program not working on Windows 11

2022-08-13 Thread xflywind
If you are using mingw, add mingw64/bin which contains `libwinpthread-1.dll` to path.

Program not working on Windows 11

2022-08-13 Thread xflywind
Yeah, it is probbaly related to

Program not working on Windows 11

2022-08-13 Thread Niminem
Hi guys, I just bought a Windows computer w/ Windows 11 installed. Just installed Nim and now I'm trying to run a simple program: import jester, browsers, threadpool spawn openDefaultBrowser("http://localhost:5000/";) var jest = initJester(newSettings(port=5000.Port))

Program not working on Windows 11

2022-08-13 Thread Niminem
Interesting, I used version 1.6.6 and got the error above. I just installed 1.4.8 via Choosenim and it works. Weird. Idk if this is supposed to be a bug or not

Math library for renderers and GUIs

2022-08-13 Thread icedquinn
Projective geometric algebra is a real bear to figure out but I think I managed to scrounge together enough references to figure out some of the basic Motor and Rotor concepts. It's very similar to quaternion based rotations but there is a whole conceptual framework behind it that explains why a

What's the use case for a "block" statement?

2022-08-13 Thread elcritch
Great thoughtful question. I second the general usage of `block` above. I also wanted to add that defining templates inside a proc can be useful for legibility as well without needing to define arguments and/or types to a proc. It can be nice to reduce code de-duplication too. Something like thi

What's the use case for a "block" statement?

2022-08-13 Thread n8
Thanks, these all help. I definitely have always leaned towards really short functions for easy legibility. What I hadn't considered is you could combine @Zoom and @HJarausch's comments to neatly document _and_ scope sections of logic which is a pretty cool.

Mastering Nim: A complete guide to the programming language

2022-08-13 Thread n8
Just finished it yesterday, great book and a really useful reference to have by your side when trying out new things. I got it added to the Goodreads database:

Idea: 30 days of Nim learning resource

2022-08-13 Thread AimeeDonaldson
Choosing a college or university should be approached seriously. You should pay attention to the learning environment, the opportunities offered by the institution, and the faculty. The quality of your education and its suitability for your future depends on these factors.

What's the use case for a "block" statement?

2022-08-13 Thread Zoom
> It seems like in most cases where you could use block, you'd be better off > creating a new proc and throwing the code there. Not really. It's often suggested to only separate a routine into a function when it's used at least twice, with some putting this number even higher. A well indented b

What's the use case for a "block" statement?

2022-08-13 Thread HJarausch
The **block** statement can carry a label which can be used in a **break** statement like block outer : ... within some nested loops break outer Run

What's the use case for a "block" statement?

2022-08-13 Thread enthus1ast
I use if for tests quite often, so that i can copy and paste without change var/proc names: block: const tt = "{%if false%}simple{%endif%}" check evaluateTemplateStr(tt) == tmpls(tt) block: const tt = "{%if 1 == 1%}{%if true%}simple{%endif%}{%endif%}"

What's the use case for a "block" statement?

2022-08-13 Thread n8
I recently finished reading Andreas's Mastering Nim book, and I really enjoyed seeing all the areas where block-like syntax is used. It's really interesting to see a body of code passed into a template or macro that way. That being said, I was curious what use cases there are for the literal `bl

Nim v2: what would you change?

2022-08-13 Thread n8
As someone who just ran into the issue that led to [RFC 368](https://github.com/nim-lang/RFCs/issues/368), that would be my vote I'll avoid weighing in on the syntax war in that proposal :)