Changing order of templates causes compilation error. Why in this case?

2022-04-05 Thread ErikWDev
For smallest example I've found, scroll down to bottom. I was working on some templates akin to the code down below. With this order everything compiles and works as I expect it to: var vals = [0, 1, 2, 3, 4] template potato(): int = # 1 vals[item] template p

Searching "jester" on nimble puts it on the bottom

2022-03-31 Thread ErikWDev
Seems intentional () and I would probably agree with it in general. Just funny when its such a specific word like "jester" xP

Searching "jester" on nimble puts it on the bottom

2022-03-31 Thread ErikWDev
"jester" puts jester on the bottom: "web framework", on the other hand, puts it on the top: `nimble search jester` puts it on the top, but since the terminal gets filled with results one has to

Fidgets: widgets using Fidget

2022-03-31 Thread ErikWDev
GIFs for the curious basicwidgets.nim dropdown.nim

Help show all advantageous differences among inline procedure, template, macros

2022-03-10 Thread ErikWDev
Link to the book mentioned above (unless I'm mistaken): * Chapter on "Templates": * Chapter on "Macros and Meta-Programming":

Just open sourced "easyess", an Entity Component System in Nim

2022-03-09 Thread ErikWDev
Scenes/Worlds can be created using `newECS()` which creates an instance of the ECS type that (in the case of the example above) looks like this: type ECS* = ref object nextID*: Entity highestID*: Entity when not defined(release): usedLabels:

Just open sourced "easyess", an Entity Component System in Nim

2022-03-09 Thread ErikWDev
Just added an example game here: [Snake-like Game using Aglet and Easyess](https://github.com/EriKWDev/easyess/blob/main/examples/snakelike_rapid_game/src/rapid_game.nim)

Just open sourced "easyess", an Entity Component System in Nim

2022-03-09 Thread ErikWDev
Hey that looks really cool! I have noticed that easyess shugs for a second when instantiating 100+ new entities at once, so I will have to do some profiling and this looks like a cool datastructure :) Is this a common datastructure or have you come up with it yourself? Where can I read about how

Just open sourced "easyess", an Entity Component System in Nim

2022-03-05 Thread ErikWDev
Thank you! The data structures being used is simply arrays of Components. One can look at the generated types and procs by passing `-d:ecsDebugMacros` to the compiler. From that, we see that the "world" type from the example above looks like: type ECS* = ref object ne

Just open sourced "easyess", an Entity Component System in Nim

2022-03-05 Thread ErikWDev
Hello! Just making an announcement that I just open sourced my hobby project `easyess`! Available at <https://github.com/EriKWDev/easyess> Easyess is an implementation of an Entity Component System in Nim with macros to generate many of the tedious parts of using an ECS such as procs

Made in Nim 2021 - your favorites?

2022-01-06 Thread ErikWDev
It's called Nanim btw, not Manim ;)

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-21 Thread ErikWDev
I rely on NanoVG currently which requires OpenGL support. I've experimented with using Cairo as a backend (and there is even a branch currently with that), but from my limited testing the performance was not very great even when a GPU is present. To my understanding Cairo should work both with

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-18 Thread ErikWDev
I don't fully understand the question. If you're wondering whether nanim has a GUI for creating animations the answer would be no (not currently ;) ) I'm only slightly familiar with blender animation nodes, and using a graph and interface to create animations certainly makes more sense in most c

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-18 Thread ErikWDev
It doesn't currently have it built in, but it would be trivial to add since it uses ffmpeg to export the video to mp4. Here is where the command is executed: <https://github.com/EriKWDev/nanim/blob/c59154fc3e99025b8c7109e1598716ceda2b1fa6/src/nanim/rendering.nim#L204> I currently

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-16 Thread ErikWDev
It has been really amazing just getting wholesome feedback from so many here on the forum. Thanks to everyone! I wouldn't mind adding maybe some more examples and explaining a bit more and convert it into its own blog post. I responded in the issue. Is it the same repo for that? Should I edit it

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-15 Thread ErikWDev
I wrote something up and added the example above^ with more comments as well as some more gifs: :)

Hacktoberfest 2021 Megathread

2021-10-14 Thread ErikWDev
Nanim

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-14 Thread ErikWDev
Here is a simple yet pretty beautiful one from my daily series. Try it out if you dare! import nanim proc daily094Scene(): Scene = let scene = newScene() scene.randomize() var colors = colorsFromCoolors("https://coolors.co/cfdbd5-e8eddf-f5cb5c-

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-14 Thread ErikWDev
OK I'm convinced. There seem to be some interest in this at least xP I will write something up and post an issue :)

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-14 Thread ErikWDev
I think he meant the fact that I have the animations available as NFT:s for "sale". This is not at all a serious attempt at selling art, it was more a fun thing for me to learn what NFT:s were. Art is whatever one defines it to be, so while I might not agree with someone else's definition of art

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-14 Thread ErikWDev
Fantastic to hear that it worked! Yeah I added some of them to the examples folder, and might add more :) Cute scene you managed to make as well! One of the benefits of it now being open source is that you all can open issues and pull requests! Feel free to add docs / update install instructions

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-14 Thread ErikWDev
Haha I wouldn't mind that xP Don't know if this qualifies though.

Nanim: Inspired by 3b1b's manim, I created a GPU-accelerated framework for smooth animations in Nim!

2021-10-13 Thread ErikWDev
here: <https://github.com/EriKWDev/nanim> I was heavily inspired by 3b1b's wonderful manim (<https://github.com/3b1b/manim>) which is a much more sophisticated piece of software that, among other things, use TeX to render beautiful text.. Anyway, I love Nim so that's the lang

Why can't I use my macro like this?

2021-07-29 Thread ErikWDev
Aaah, so If I understand what Araq and others are saying here is that the for loop doesn't execute the way I thought at compile time? The static for loop looks cool! Thanks for the many responses and helppful playground links :) I want to dive more into macros, but It's a very foreign concept to

Why can't I use my macro like this?

2021-07-27 Thread ErikWDev
I'm very new to macros and just recently started playing around with them when I discovered the following thing: import macros macro test(number: string) = let procName = newIdentNode("problem" & $number) quote do: proc `procName`() = echo "test: "