News for hackers. Stuff that matters.
Re:Using Rust and an Old Kindle to Display Real-Time Transit... by Aeolun on Thursday October 24, 2024 @06:44PM (#41940609)
I love how they blamed the flake on node and Javascript, then switched to Rust and also changed the whole approach, which had a hundred times more effect than changing the language did.
Re:Using Rust and an Old Kindle to Display Real-Time Transit... by FrecklySunbeam on Thursday October 24, 2024 @06:59PM (#41940681)
I don't blame Node/JS for the reliability issues of the first version at all, they're simply not the tools that I prefer to work in.

> Each of the seven sections on the image represents a browser tab that Puppeteer needs to keep open in order to fetch screenshots. Remember that the Node.js server was running on a Raspberry Pi, it didn’t have an excess of memory to operate in and Chrome is not known for its svelte-ness.

> I picked Node.js for the first server because I was using Puppeteer. I don’t particularly like Javascript, so given the ability to start from scratch I happily pivoted to Rust.

> Next, since we’re not relying on a browser engine to render the display, we will be using a 2D graphics library to render a PNG directly. This should have a much lower resource cost than using an entire browser engine, at the cost of some decreased flexibility.

Re:Using Rust and an Old Kindle to Display Real-Time Transit... by doesnt_know on Thursday October 24, 2024 @06:59PM (#41940682)
I don't think they really blamed node and js? They seemed pretty aware that it was the overall arch of the thing that made it non-viable.

> Each of the seven sections on the image represents a browser tab that Puppeteer needs to keep open in order to fetch screenshots. Remember that the Node.js server was running on a Raspberry Pi, it didn’t have an excess of memory to operate in and Chrome is not known for its svelte-ness.

So then figuring they had to effectively redo it from scratch with a new solution, they then switched over to a language and stack they enjoyed, which seems completely reasonable.

> I picked Node.js for the first server because I was using Puppeteer. I don’t particularly like Javascript, so given the ability to start from scratch I happily pivoted to Rust.

edit: Just beaten and directly from the author it seems. :)