HNHacker News
TopNewBestAskShowJobs

mprovost

3,269 karma · joined May 26, 2007

Self-publishing "Rust From the Ground Up" on Leanpub.

https://rftgu.rs.

Contact me at m@termcap.net.

submissionscomments
mprovost··on Folders with high file counts
ReiserFS handles this really well but I don't know if you can call it modern anymore. I can't think of any other filesystem that followed its design choices though.
mprovost··on Rust concepts I wish I learned earlier
This is very true - to fully explain a "hello world" program you'd have to dive into macro syntax... When writing my Rust book I often start by showing the naive solution, and then later move to more canonical code once I've introduced more syntax that enables something more elegant. But I'm aware that I'm showing something non-optimal to start. Maybe that loses some trust, like people think they're learning something only to be told later on that it's wrong? On the other hand if you start with the optimal solution you have to teach so much syntax that it's overwhelming. I expect that some folk want every example to be perfect, but I'm going with an approach where you iterate through each chapter and as you progress through the whole book the examples get better and more idiomatic.
mprovost··on Diskless infrastructure in beta (System Transparency: stboot) (2022)
It used to be pretty common (in the late 1980s) to run Sun workstations without hard disks, all booting off an NFS server. But then disks got cheap... I always set up a boot server hosting a bunch of BSD/Linux images so I could install an OS remotely (to a local disk) without running around with a CD or USB stick.
mprovost··on Ask HN: Books that teach programming by building a series of small projects?
Thanks for the kind words! I'm desperately polishing the next chapter for publication...
mprovost··on Ruby 3.2’s YJIT is Production-Ready
How is hiring a few people to write a transpiler any different than hiring a few engineers to write a JIT compiler? Isn't a JIT just transpiling code at a different level (bytecode instead of source code)?
mprovost··on How Memory safety approaches speed up and slow down development velocity
This is a really interesting observation: "Stateless programs like command line tools or low-abstraction domains like embedded programming will have less friction with the borrow checker than domains with a lot of interconnected state like apps, stateful programs, or complex turn-based games."

In my book [0] teaching Rust, I manage to completely avoid using lifetimes. Perhaps this is because it reimplements a command line utility (head, wc, cat, ...) from the original BSD sources in each chapter and none of them are stateful. Most of the classic Unix utilities just process streams of bytes and barely use data structures at all. Many don't even call malloc().

It feels like Rust is a good match for the problem domain but I never made the connection with the stateless nature of these tools before. This bodes well for eventually replacing the coreutils with modern Rust implementations.

[0] https://rftgu.rs/

mprovost··on Programmer salaries in the age of LLMs
It's missing a third group: the ML researchers developing the LLM. I'm not sure what the best analogy in the legal world is - the politicians writing the laws?
mprovost··on Programmer salaries in the age of LLMs
I feel like this is something that people said when they started using compilers instead of manually writing assembly.
mprovost··on ASCII table and history – Or, why does Ctrl+i insert a Tab in my terminal?
Well, the article says: "There is no way to distinguish between the Tab key and Control+i. It’s not just ‘the same’ as Tab, Control+i is Tab." So you'd be mapping Tab to Escape to get out of insert mode.
mprovost··on Wobbly clock
I love those clocks! But from memory, the second hand gets "stuck" at 12 and then when it moves again, the minute hand advances at the same time. On this one, the minute hand jumps forward at the same time that the second hand goes to 12.
mprovost··on ASCII table and history – Or, why does Ctrl+i insert a Tab in my terminal?
True, but I was matching on "or, why" not just "or".
mprovost··on ASCII table and history – Or, why does Ctrl+i insert a Tab in my terminal?
The earliest title with this format that I know of is "Is Sex Necessary? Or, Why You Feel the Way You Do" by James Thurber and EB White from 1929. But, that book was a parody so presumably copied the form of its title from contemporary books.
mprovost··on ASCII table and history – Or, why does Ctrl+i insert a Tab in my terminal?
When Apple (temporarily) got rid of a physical Esc key I (permanently) retrained myself to type ctrl-[ which is the same character (91 - 64 = 27).
mprovost··on ASCII table and history – Or, why does Ctrl+i insert a Tab in my terminal?
But that still doesn't result in a control character. In my terminal (testing with cat -v) I just get a beep (and it's not a BEL character!). Because the 7th bit of 35 ('#') is already 0 there's nothing to convert it into.
mprovost··on ASCII table and history – Or, why does Ctrl+i insert a Tab in my terminal?
For my Rust book I've just been diving into the old BSD 4.4 source code for cat which converts control characters into printable ASCII with the -v flag and it handles DEL as a special case: putchar(ch == '\177' ? '?' : ch | 0100). But if you XOR the character with 0100 (64) it always clears the 7th bit, which results in '?' for DEL. Interestingly, peeking at the GNU coreutils code it also handles DEL as a special case and just prints "^?".
mprovost··on NYC Slice
This is the downside to pizza at home. Step 1 is always "go back in time 3 days and make dough".
mprovost··on Tell HN: IPv6-only still pretty much unusable
It's more the case that the panic around IP space exhaustion turned out to be unfounded - or at least we've been able to work around it for much much longer than expected. Back in 1994 the IETF predicted that the internet would stop working in 3-7 years. Almost 30 years later we're still going. So there's no sense of urgency to invent something better.

For the record I also believe that v6 will be abandoned and eventually replaced, most likely with a backwards-compatible protocol. Or something that provides a more compelling reason to upgrade than v6, which basically has nothing. Or at least nothing that people want - the lack of NAT is really an anti-feature.

The history of tech is littered with "standards" that never achieved critical mass.

mprovost··on Remote work is gutting downtowns
"Immunology Is Where Intuition Goes to Die"

https://www.theatlantic.com/health/archive/2020/08/covid-19-...

mprovost··on Tell HN: I asked ChatGPT to build a login form in React and it gave me the code
Most programming jobs now require someone who can specify the exact syntax to satisfy the requirements of a compiler (or interpreter) and basically nobody checks the correctness of the (assembly) code that it generates.
mprovost··on Switzerland Contemplates a Partial Ban on the Use of Electric Vehicles
It's almost like there's an agenda behind the headline when it could have just as easily been "Switzerland Bans HD Streaming" or "Switzerland bans hot wash cycles" based on the list of "potential bans" in TFA.
mprovost··on Beyond Meat is struggling, and the plant-based meat industry worries
Newington Blue by Nettle in London is great. You can find it at Planet Organic sometimes.
mprovost··on Liquid and immersion is the new cool at Supercomputing '22
We had 8 systems in the Top 500 list at Weta Digital back in 2008 which were liquid cooled HP servers for rendering Avatar. We used one of the techniques mentioned in the article: liquid to liquid heat exchangers. Each rack was fully sealed with its own heat exchanger which pumped in cool water and sent off warm water to chillers on the roof. Actually the warm water condensing would attract seagulls in the winter which was a problem since we were right next to the airport. The datacentre was designed by an engineering firm which usually built dairy factories. Every once in a while something would go wrong with the cold water delivery system and the servers would overheat and shut down in about 30 seconds.
mprovost··on The stick shift might survive the electric revolution
Italy wanted an exception to the EU regulation banning ICE sales after 2035 for their supercar industry (Ferrari etc) but only managed a 12 month extension to 2036. After that only manufacturers making less than 1000 vehicles a year can continue to make ICE cars.
mprovost··on The stick shift might survive the electric revolution
"The old Model A had a spark advance you could manipulate. I don't know why they got rid of it. Well, that's your Detroit smarties. The hand choke too. That's gone. Been gone." - Charles Portis, The Dog of the South, 1979
mprovost··on Rimac Nevera Hits 412kph to Become World’s Fastest Production Electric Car
They often have those in locker rooms at swimming pools to dry off your swimsuit quickly.
mprovost··on Machine learning with Unix pipes
The newer generation of grep-like utilities (ack, ag, rg) recurse through a directory parameter by default. Of course you could always do this with find.
mprovost··on Barilla passive cooker
Sorry if I was unclear. It's basically this: https://physics.stackexchange.com/questions/234042/should-i-...
mprovost··on Barilla passive cooker
My microwave has a picture of a cup with a spoon in it, this stops superheating.
mprovost··on Barilla passive cooker
My microwave has a picture of a cup with a spoon in it to warn you to only boil water with something in it. Despite being warned for years not to put anything metal in a microwave it's actually fine to leave a metal spoon in water to stop it from superheating.
mprovost··on JC – JSONifies the output of many CLI tools
Someone on this site suggested that programs open another filehandle along with stdout and stderr (stdjson) for their json output which struck me as a way to make this work in a backwards-compatible fashion.
← PreviousPage 6 of 26Next →