Earlier quoted context omitted.
Yes! That's exactly how you should do it while working with a language that doesn't have a compiler that will aggressively analyze, and rewrite and optimize your code for you. (So, most languages with "heavy runtimes" that support a bunch of dynamic stuff and JITs) There are basically two points to programming with immutable-first data. One, eliminate certain classes of data race concurrency bugs. Two, less mutable s…
Yeah, and even if you need concurrency/parallelism within the function, it can be forgivable to use ConcurrentDictionary or ConcurrentBag or one of the many, many other thread safe mutable data structures built directly into .NET. I will personally almost always prefer the pretty functional versions of things, and that's almost always what I start with. I like immutable data structures, and they are usually more than…
I built a Game Boy emulator in F#
51–60 of 84 posts
Re: I built a Game Boy emulator in F#
#52Earlier quoted context omitted.
It's always going to exist. People still build things with hand tools in the year 2026. Let's call it Artisanal Coding.
trad coding
Re: I built a Game Boy emulator in F#
#53Earlier quoted context omitted.
My guess is you're thinking of no$gmb, a very early Game Boy emulator: https://gbatemp.net/threads/no-gmb-2-5-dos-full-version.6039... I've got fond memories of using this to get a preview of Pokemon Gold before it was released in NA!
Found it MetalNES, transistor level NES emulation https://github.com/iaddis/metalnes While searching I also found a new one, VisualNES https://kaiokendev.github.io/nes/about There is also one for GB https://github.com/aappleby/MetroBoy
Re: I built a Game Boy emulator in F#
#54Re: I built a Game Boy emulator in F#
#55Finally someone putting in actual human effort to learn something, and not a LLM helped me build X in Y minutes. There is some hope for humanity after all I suppose.
Emulators are cool as hell though, and GBA ones are a nice one to tackle yourself
Re: I built a Game Boy emulator in F#
#56Re: I built a Game Boy emulator in F#
#57Re: I built a Game Boy emulator in F#
#58Cool to see F# here! Emulators are a great way to learn a language. On first sight you chose well between more or less idiomatic F# for each job. Some low hanging fruit to reduce allocations: the discriminated unions in Instructions.fs could be [ ], reusing field names to reuse internal fields. Also, minor nitpick but I'm confused about some of the registers. They are already of type byte, the setters with `a &&& 0xF…
It's actually discussed in the article in the part where he ports it to fable (he also tried blazor)
Re: I built a Game Boy emulator in F#
#59Don't you see that if you would use F# instead, creating projects with C# and F#, that you would get what is being added to C# but actually working and ergonomically? Interop is great!
Re: I built a Game Boy emulator in F#
#60Very cool. Makes me want to build something with F*