News for hackers. Stuff that matters.
Re:Go, the language for emulators by shardling on Wednesday January 09, 2013 @07:37PM (#5034537)
So, I don't see that the article mentions why the language is good for emulators.
Re:Go, the language for emulators by swdunlop on Wednesday January 09, 2013 @08:15PM (#5034698)
Off the top of my head, I can think of a few why Go is better than Python or other high level languages for writing an emulator:

- Go makes it easy to write a process for your emulator, instead of a state machine.

- Go's slice types makes passing blocks of memory around a zero copy operation.

- Pass by value lets you reduce the number of objects GC must trace.

- Go is explicit about integer size and sign, makes conversion errors more visible.

It's not better than C, but it's certainly easier to work with. I'm routinely surprised at how C-friendly Go's produced code is -- take a spin through profiling some of the image library primitives and compare them against your favorite C library.

Re:Go, the language for emulators by jerf on Wednesday January 09, 2013 @10:18PM (#5035171)
I'd add that for anything with more than one component that needs to communicate with other components, the Go channel abstraction will get you to a reasonably performant, reasonably correct solution reasonably quickly.

I used the same word three times because it may not hit any of those three bullet points 100%, if one wishes to build the fastest possible perfect emulator, but it's a decent starting toolset.

Re:Go, the language for emulators by shardling on Wednesday January 09, 2013 @11:21PM (#5035380)
Comparing it to high level languages seems to be a bit of a red herring...
Re:Go, the language for emulators by jlgreco on Thursday January 10, 2013 @03:18AM (#5036024)
Holy moly "high level language" is a moving target. A language with closures, built in high level concurrency, garbage collection, no pointer arithmetic, and a 'batteries included' standard library isn't high level these days?
Re:Go, the language for emulators by shardling on Thursday January 10, 2013 @11:31AM (#5037845)
What? I wasn't saying anything about Go. (swdunlop is the one who injected the term "high level" into the discussion.)

But if you claim that language X is good at Y, implicitly you're comparing it with all languages, not a subset. AFAIK most emulators are written in C or assembly or the like -- so it's especially odd to compare Go to everything but them in this context.

Re:Go, the language for emulators by swdunlop on Thursday January 10, 2013 @08:20PM (#5040822)
I wanted something relative to ANSI C, which has no closures, no concurrency, no garbage collection, and a standard library consisting of stone tools, without invoking the horrible term "Very High Level Language", which implies Visual Basic and copypasta. ;)

Perhaps I should have gone for the Monty Pythonesque "higher level than C but lower level than ASP.Net" term?

Re:Go, the language for emulators by timClicks on Thursday January 10, 2013 @05:32AM (#5036298)
Perhaps the intention was to say "dynamic, interpreted" languages, rather than "high level"..
Re:Go, the language for emulators by StavrosK on Wednesday January 09, 2013 @07:52PM (#5034611)
Because it's a good opportunity to ride the Go bandwagon and get some free traffic with a list of five software projects, of course...
Re:Go, the language for emulators by 4ad on Thursday January 10, 2013 @06:10AM (#5036395)
Dave is not riding the bandwagon, he is one of the Go developers working mostly on the SSH package, the ARM platform and compiler optimizations. He is also core developer of Juju, software written in Go.
Re:Go, the language for emulators by StavrosK on Thursday January 10, 2013 @06:20AM (#5036417)
Oh, I didn't know that. It's probably a weird choice of words, then.
Re:Go, the language for emulators by drivebyacct2 on Wednesday January 09, 2013 @09:24PM (#5034961)
Pffft. Dave is hardly riding the "Go bandwagon". (I guess this comment doesn't mean much unless you know what Dave does in the community or read the ML or have had help from him in the past. It's not as if he just picked this up to be "in", though I don't want to speak out of turn for him.)
Re:Go, the language for emulators by car54whereareu on Wednesday January 09, 2013 @08:40PM (#5034769)
Maybe it's the for loops?