News for hackers. Stuff that matters.
Re:Porting a NES Emulator from Go to Nim by guelo on Friday May 01, 2015 @04:29PM (#9474307)
It's closer to Go than Rust since it is garbage collected. It's statically typed, has OO features and first-class functions. It compiles to C making it pretty portable.
Re:Porting a NES Emulator from Go to Nim by rdtsc on Friday May 01, 2015 @04:42PM (#9474380)
Has generics, meta-programming and GC can be disabled (or tuned to run up to some max # of milliseconds).

So it is Go++ if you wish.

But I am not sure about its concurrency. Go does have channels which are nice abstractions for doing concurrency right.

Re:Porting a NES Emulator from Go to Nim by dom96 on Friday May 01, 2015 @05:04PM (#9474513)
Nim has channels too (although I think they need replacing). There is also spawn which is similar to Goroutines in some ways: http://nim-lang.org/0.11.0/manual.html#parallel-spawn-spawn-...
Re:Porting a NES Emulator from Go to Nim by andolanra on Friday May 01, 2015 @04:39PM (#9474367)
You can have manual control over memory if you want, though. This worked the last time I looked at the language, at least:

    foo = cast[ptr Foo](alloc(sizeof(Foo)))
    # do stuff with foo
    dealloc(foo)
EDIT: Here's the documentation on the site itself. Most things are 'traced' by the GC, but by using alloc and dealloc you can work with 'untraced' (i.e. manually allocated) memory: http://nim-lang.org/0.11.0/manual.html#types-reference-and-p...
Re:Porting a NES Emulator from Go to Nim by pcwalton on Friday May 01, 2015 @06:39PM (#9474966)
Go has unsafe.Pointer too.