Re: Is there a 2D game framework recently updated for Nim ?

2019-12-30 Thread Skaruts
> Godot is probably the best 100% free game engine overall. It has 2D support > (now with "pseudo-3d"). There are Nim bindings. They're quite outdated unfortunately. But aren't they bindings for native scripts, though? (Rather than direct replacement for GDScript.)

Re: Is there a 2D game framework recently updated for Nim ?

2019-12-30 Thread Skaruts
> I've had good experiences with SFML via the csfml wrapper I'm surprised to hear that, because my experience with it hasn't been great. Maybe it's just me being a complete noob, but I keep having to wrap the library's procs to abstract unnecessary type castings (to and from cint, for example)

Re: Safe access operator - how could this be done?

2019-12-30 Thread mashingan
This immediately leave the proc when across something nil template safe(obj: typed, field: untyped): untyped = if obj.isNil: return `obj`.`field` type MyNullObj = ref object x: int proc main = var nullobj: MyNullObj

Re: Custom Backend

2019-12-30 Thread xflywind
You can follow this repo: [https://github.com/juancarlospaco/nim-new-backend](https://github.com/juancarlospaco/nim-new-backend)

Re: Macros help

2019-12-30 Thread dawkot
template regGroup(name; types: varargs[int, getId]) = let name = newGroup types Run

Re: Custom Backend

2019-12-30 Thread Araq
`compiler/depends.nim` is a minimal "backend" pass, or maybe look at `compiler/jsgen.nim` and modify it heavily. You can import the compiler as a library and add a custom backend. It's not that complex, when you get stuck, join our IRC channel and ask for help over there.

Safe access operator - how could this be done?

2019-12-30 Thread tobia
Did Nim ever get anything like this? Here's an example of the two null-safe features that are baked in most modern languages (PHP, Groovy, Kotlin...) someVariable?.someMethod("argument") ?: "otherwise" | || | |

Re: Custom Backend

2019-12-30 Thread mayanksinghal
yes I should have been more explicit. I am looking to transpile my nim code into other languages besides C*/Java. I would want to do it in a way which I can register my custom-backend-code-translator to compiler process instead of embedding my code into main nim-repo. Essentially, looking to get

Macros help

2019-12-30 Thread Pixeye
Hello, I have some components that are registered in storage by the template. Each component gets a unique id that I need to use in the group filter. template reg(t: typedesc, size = 256) = var storage {.used.} = newStorage[t]size var id = idComponentNext idComponen

Re: Using a Case Statement inside a template

2019-12-30 Thread phillvancejr
@mashingan was right, it was the use of the ..< , thank you!

Re: Nim forum confirmation email has no date

2019-12-30 Thread casimiria
I reported this on github. [https://github.com/nim-lang/nimforum/issues/224](https://github.com/nim-lang/nimforum/issues/224)

Re: FFI constants

2019-12-30 Thread Stefan_Salewski
Also see [https://github.com/nim-lang/Nim/issues/4441](https://github.com/nim-lang/Nim/issues/4441)