Live data from Hacker News

RBoy: A Gameboy Emulator in Rust

github.com

31–40 of 63 posts

Re: RBoy: A Gameboy Emulator in Rust

#31
post #12
post #6

Why must every new rust project be reported here? Are there any other languages for which every new thing is being reported as if it were some major milestone? Is it true that this happens because Amazon is astroturfing rust like mad (as suggested on this website the other day)?

A couple of years ago every new Go project was being reported here; before that every new Elixir project was being reported; I don’t know if HN was around in the mid-2000’s but I’m pretty sure if it was, it would be full of every new Ruby on Rails project… these phases have been coming and going for as many years as I’ve been signed up here at least ¯\_(ツ)_/¯

Yep, and everyone still uses all the stoftware written in C/++, and the stuff written in ruby/(and soon go/rust/...) doesn't even run anymore.

Re: RBoy: A Gameboy Emulator in Rust

#32
post #16

Earlier quoted context omitted.

there's only a barely working, undocumented backend for LLVM on the z80. You could probably do this with mrustc.

You could, but given that even C and Pascal hardly take advantage of Z80, and have to be used as some kind of fancy macro Assembler, better just deal with Z80 Assembly directly. But then I am biased, having the Z80 opcodes burned in my brain due to the Speccy days.

I believe it also tosses everything on the stack which is certainly not optimal for the z80

Re: RBoy: A Gameboy Emulator in Rust

#33
post #29
post #13

I had a quick look at the big match expressions, and this does not look like this project has been through cargo fmt (it would add +2000 lines of code for the whole project). Which is probably a good choice, but as someone who's been looking at this, I wonder if the tradeoffs made in rustfmt are the right ones (note: I have no idea how I would make this better for the general case).

I can’t speak for the author, but personally I hate tools like go fmt, es-prettify and cargo fmt. I’d never use this stuff by choice because they delete the work I do to make my code easier for me to read. For example, I use extra blank lines to separate different parts of a function, or separate groups of functions visually. These sort of tools like to delete vertical white space, which hurts readability. In javascr…

> Software is like writing. It can’t help but express how the author thinks about their code. These tools try to iron that personality out - and for what reason?

A single-author novel can have personality. A 100-author 30-volume encyclopedia, less so. Whenever I set up a new single-author codebase, I set up as little automatic code formatting as I please. For collaborating with other developers, I will enforce as much as possible as early as possible.

Re: RBoy: A Gameboy Emulator in Rust

#34
post #12

Earlier quoted context omitted.

A couple of years ago every new Go project was being reported here; before that every new Elixir project was being reported; I don’t know if HN was around in the mid-2000’s but I’m pretty sure if it was, it would be full of every new Ruby on Rails project… these phases have been coming and going for as many years as I’ve been signed up here at least ¯\_(ツ)_/¯

Yep, and everyone still uses all the stoftware written in C/++, and the stuff written in ruby/(and soon go/rust/...) doesn't even run anymore.

Plenty of people still use Ruby, there's a ruby project on the HN front page right now [1]. It just isn't mentioned anymore. The world pretty much runs on C, Java and C# but you won't hear about either, because what's normal isn't exciting. HN isn't a reflection of normalcy, it's a reflection of the unusual and the cutting edge.

1: https://news.ycombinator.com/item?id=28634831

Re: RBoy: A Gameboy Emulator in Rust

#35
post #29
post #13

I had a quick look at the big match expressions, and this does not look like this project has been through cargo fmt (it would add +2000 lines of code for the whole project). Which is probably a good choice, but as someone who's been looking at this, I wonder if the tradeoffs made in rustfmt are the right ones (note: I have no idea how I would make this better for the general case).

I can’t speak for the author, but personally I hate tools like go fmt, es-prettify and cargo fmt. I’d never use this stuff by choice because they delete the work I do to make my code easier for me to read. For example, I use extra blank lines to separate different parts of a function, or separate groups of functions visually. These sort of tools like to delete vertical white space, which hurts readability. In javascr…

Exactly, that's why e.g. C++ projects have some personality feel while Java codebases feel like all the same corporate bland. Go is meant to be Java replacement in corps, so...

Re: RBoy: A Gameboy Emulator in Rust

#36
post #30
post #29

Earlier quoted context omitted.

I can’t speak for the author, but personally I hate tools like go fmt, es-prettify and cargo fmt. I’d never use this stuff by choice because they delete the work I do to make my code easier for me to read. For example, I use extra blank lines to separate different parts of a function, or separate groups of functions visually. These sort of tools like to delete vertical white space, which hurts readability. In javascr…

I enforce formatters wherever possible after working on codebases with 20+ years of people imposing their own unique opinion on where spaces and braces should go. Worse, arguing about what the spacing should be, and making noisy diffs because people change previous peoples styling. The formatter has no opinion. It follows rules. It doesn't work perfectly everywhere. It works enough. I would argue caring about exact b…

There is no reason why each of us can't have the formatted according to one's taste (=what works best), instead of this "communism". It's just a matter of IDE support that is lacking.

The IDE should apply user formatting preferences upon reading in the file, and apply the std formatting while writing it (with the aim of having diffs work well). That would make good use of auto-formatters.

Re: RBoy: A Gameboy Emulator in Rust

#37
post #29
post #13

I had a quick look at the big match expressions, and this does not look like this project has been through cargo fmt (it would add +2000 lines of code for the whole project). Which is probably a good choice, but as someone who's been looking at this, I wonder if the tradeoffs made in rustfmt are the right ones (note: I have no idea how I would make this better for the general case).

I can’t speak for the author, but personally I hate tools like go fmt, es-prettify and cargo fmt. I’d never use this stuff by choice because they delete the work I do to make my code easier for me to read. For example, I use extra blank lines to separate different parts of a function, or separate groups of functions visually. These sort of tools like to delete vertical white space, which hurts readability. In javascr…

rustfmt does not delete vertical whitespace in that way.

Re: RBoy: A Gameboy Emulator in Rust

#38
post #30

Earlier quoted context omitted.

I enforce formatters wherever possible after working on codebases with 20+ years of people imposing their own unique opinion on where spaces and braces should go. Worse, arguing about what the spacing should be, and making noisy diffs because people change previous peoples styling. The formatter has no opinion. It follows rules. It doesn't work perfectly everywhere. It works enough. I would argue caring about exact b…

There is no reason why each of us can't have the formatted according to one's taste (=what works best), instead of this "communism". It's just a matter of IDE support that is lacking. The IDE should apply user formatting preferences upon reading in the file, and apply the std formatting while writing it (with the aim of having diffs work well). That would make good use of auto-formatters.

This is bad idea, so you want your code to not looks like what's in the repo?

Re: RBoy: A Gameboy Emulator in Rust

#39
post #3

A rust port for the gameboy, that would have been impressive...

There's some ongoing work on a LLVM whole-program backend for the MOS 6502, which can already compile some Rust code (discussed https://news.ycombinator.com/item?id=28581812 ). If that's successful (it does require lots of new optimization passes to match the effectiveness of hand-written code), it would be quite easy to have a backend for the Z80 as well.

Re: RBoy: A Gameboy Emulator in Rust

#40
post #10
post #6

Why must every new rust project be reported here? Are there any other languages for which every new thing is being reported as if it were some major milestone? Is it true that this happens because Amazon is astroturfing rust like mad (as suggested on this website the other day)?

People post all kinds of stuff on HN. So i guess your question is, why does it get upvoted/commented on so much - because a lot of people like it.

Keep in mind there's no downvote button for posts. I suspect it would be a completely different story if there was.
Post reply on HN