What's the future of "implicitDeref"?

2020-06-27 Thread exelotl
When doing manual memory management in Nim, I often find myself having to define two versions of a proc - one that takes a `var` parameter and one that takes a `ptr` parameter. Otherwise I will run into issues like this: var m: ptr Monster var b: Bullet proc

Re: Procedure overloading with explicit parameters

2020-06-25 Thread exelotl
I guess it's just semantically not how Nim works. A proc has 1 body. However, if you use static/generic parameters then different versions of the proc body will be generated at compile-time based on the input. proc say(n: static int) = when n == 1: echo "static one!"

Re: Uncle Bob - one syntax to rule them all?

2020-06-02 Thread exelotl
Ironically I don't think Uncle Bob would like Nim at all, given our general preferance towards straightforward "get shit done" procedural code. For example in [this video](https://youtu.be/IRTfhkiAqPw?t=1179) the author critiques some of Bob's code and rewrites it in a simple procedural style.

Re: Lambda syntax is awkward

2020-06-02 Thread exelotl
There are some solutions, but all a little awkward. 1\. ["do" notation](https://nim-lang.org/docs/manual_experimental.html#do-notation), which I believe was moved to _experimental_ just before Nim 1.0, therefore might be changed or scrapped in a future Nim version. Personally I think it's

Re: Can the nim compiler run in the browser? Experimenting Nim to template web pages

2020-06-01 Thread exelotl
This is looking absolutely stellar! Have really wanted something like this, was thinking of making my own but didn't know where to start. I'm definitely gonna try this out :)

Re: Raylib Forever (4Nim)

2020-02-26 Thread exelotl
This is cool! I gave it a spin and it Just Worked™ with the latest raylib dll, very painless experience :) Some thoughts: As neat as this generator page is, I'd rather have a regularly updated nimble package. But hey, you've already done the hard part! Maintaining such a package would be a

Re: Discord server improvements

2020-01-21 Thread exelotl
Hey, can we make this happen? I use Discord a lot and would love to see the Nim server expanded. I feel like the community is big enough now for it work.

Re: Advent of Nim 2019 megathread

2019-12-01 Thread exelotl
doin' it [https://github.com/exelotl/aoc2019](https://github.com/exelotl/aoc2019)

Re: let & const on C backend

2019-11-10 Thread exelotl
> Then, I need to import this C var into nim? This does not look like a good > idea. Yeahh, in my project I'm using this pattern all over the place, because it's basically the only option right now. It works but it's cumbersome, I'm looking forward to the day when Nim has a proper solution to

Re: Feature Request: Addressable Constants

2019-09-18 Thread exelotl
Yep, I chatted to Araq about this yesterday on IRC, and he arrived at the same conclusion. I'll submit an issue for it later today :)

Re: Feature Request: Addressable Constants

2019-09-17 Thread exelotl
Yes, I was not suggesting that Nim should disallow it, but that _if arr was generated as const in C_ then it should fail to compile at the C stage. And that should be acceptable behaviour, since I used `unsafeAddr` after all, and Nim has made no promises about arr being mutable.

Feature Request: Addressable Constants

2019-09-14 Thread exelotl
Hey! For several months I've been working on a Game Boy Advance game in Nim. This has been a great experience for the most part. For example I used macros to hugely reduce the amount of boilerplate required to load and draw sprites, preventing a lot of human errors with no performance cost.