logoalt Hacker News

A NES emulator written in Odin

111 points • by frostbyte7 • yesterday at 12:51 PM • 42 comments • view on HN

Comments

boltzmann64 • yesterday at 3:24 PM

i love odin.

- manual memory management

- arena and pool allocators

- go style err!=nill style exception handling

- first class support for soa and vectorized simd, linear algebra and swizzling

- sanely typed and namespaces

- explicit unambigious overloading, subroutine context

- first class support for defer statements

- zero friction C ffi

if you haven't heard of odin, you should definitely consider it.

➕ show 5 replies
AdmiralAsshat • yesterday at 4:23 PM

It's always interesting when the article title betrays the author's origins. I assume the author speaks British English rather than American English, because they tended to pronounce "NES" and "SNES" as acronyms ("Ness" and "Sness"), while we Americans tended to treat them as initialisms ("En-ee-ess"). So to my American eyes, I would have expected "An NES emulator" instead of "A NES emulator."

➕ show 4 replies
typicode • yesterday at 9:19 PM

The hardware from this era is always super interesting. Having circuitry in cartridges + in the console is wild when you think about it.

Nice to see other languages being used :)

Dwedit • yesterday at 11:33 PM

How does Odin compare with C++, Zig, or Beef?

➕ show 1 reply
anthk • yesterday at 3:19 PM

Odin needs too recent LLVM versions to work. A pity this Reticulum client it's written on that, because if it were written in Go it would be instantly portable to legacy machines:

https://github.com/Quad4-Software/Ren-TUI

Reticulum in Go:

https://github.com/Quad4-Software/Reticulum-Go

On Odin itself, it looks really simple, and I'd love it if it were self-bootstrapable or compilable with just a C99 compiler like cparser, cproc or TCC.

fuzztester • yesterday at 11:13 PM

Related: What are other C-like or systems programming languages other than Odin, Zig, C3 and Hare?

I have checked out all 4 some, only by reading the docs and examples so far.

Uneasy about Zig because of docs lagging code, and syntax.

Hare is Linux only. Doable, but prefer Windows too.

Need to try Odin.

Other interesting langs in this space whih are at a somewhat usable state, including docs and libs? I don't need a package manager or an LSP or much other tooling.

For now this is just for developing small apps of my own.

reilly3000 • yesterday at 6:44 PM

Among all of those interesting learnings, I suspect they will soon be learning the legal code too. Nintendo of America defends its IP ferociously and too excess.

➕ show 3 replies