HNHacker News
TopNewBestAskShowJobs

petercooper

50,064 karma · joined May 1, 2007

publisher of various developer newsletters - see golangweekly.com postgresweekly.com javascriptweekly.com rubyweekly.com and so on

twitter/x: cooperx86

submissionscomments
petercooper··on TruffleRuby
That's awesome news, and I can't get a more authoritative source than you! I'll do some tests and update my assumptions :-) I really do wish I saw more blog posts and things about TruffleRuby, but maybe that is just a sign I should make the effort myself.

Since I have you, if you could humor me at all, what do you think the biggest current sticking point to average Rubyists just flat out switching to TruffleRuby is nowadays? Or isn't there one?

petercooper··on TruffleRuby
It's at https://github.com/peterc/pure_jpeg .. and a lot of the recent speedups actually came from contributions by Ufuk/paracycle who, I'm guessing from your bio, you possibly work with? :-)

But yeah, I agree with your point about native extensions. Ruby has gotten so much faster in every form in the past couple of years that I think we could bring a lot more "in house". I think there have been some efforts with this regarding Psych in core as well?

petercooper··on TruffleRuby
That is broadly my experience with pure Ruby, yes. In terms of C extensions, I know they were doing some work on this but it was a WIP last time I looked, although maybe I should refresh my knowledge on this if it's now all good to go!
petercooper··on TruffleRuby
I've not got the numbers to hand between versions, but YJIT in Ruby 4.0 did shift the needle a bit, so yes, some gap closing. I also forget what the warmup was like, but to get 2-3x somewhat more was needed than with YJIT.

(Both running identical pure Ruby code, no extensions, in a long-running test scenario, no setup each time.)

petercooper··on TruffleRuby
TruffleRuby is very capable and deserves to be promoted more. I recently made a JPEG encoder/decoder in Ruby and it's 2-3x times quicker on Truffle. Native dependencies is where you can get caught out, but for pure Ruby, TruffleRuby is fantastic and worth including in your test matrix. (More broadly I think Ruby performance is reaching a point where we should be spinning up pure Ruby alternatives to native libraries, but that's a story for another day.)
petercooper··on 25 Years of Eggs
LM Studio in this case
petercooper··on 25 Years of Eggs
Quite, I threw a so-so photo of an old, long receipt at Qwen 3.5 0.8MB (runs in <2GB) and it nailed spitting 20+ items out in under a second. AI is good at many things, but picking modern dependencies not so much.
petercooper··on It's Their Mona Lisa
Upon seeing the entry for Marie-Antoinette’s private theater, I felt an urge to proclaim the Amargosa Opera House as Death Valley's "Mona Lisa". I was lucky enough to get a private tour and it was like stepping into one of the world's greatest works of art in the most bizarre of locations. The pictures don't do it justice but https://lenspire.zeiss.com/photo/en/article/mario-basner-cap...
petercooper··on JPEG Compression
My assumption also, but once this thing spat out those images by accident, I started to wonder if maybe broken code ended up in the firmware of these cameras and just.. stayed there :-D Might be a fun project one day if I can get hold of one and rip out the firmware!
petercooper··on JPEG Compression
Yes. The size is slightly different here to show it off better, but compare left and right in https://peterc.org/misc/queen.png (both are the same "quality" and file size but the right hand one has incorrect quantization ordering)

Also it turns out it wasn't a Kodak camera, but a Casio QV 10 I had much earlier. You can sorta see what I meant here: https://medium.com/people-gadgets/the-gadget-we-miss-the-cas... .. though the resolution is far lower too. The weird blocky color aberrations aren't just JPEG artefacts but related to the same quantization ordering issue I think.

petercooper··on Astral to Join OpenAI
I feel some "commoditize your complements" (Spolsky) vibes hearing about these acquisitions. Or, potentially, "control your complements"?

If you find your popular, expensive tool leans heavily upon third party tools, it doesn't seem a crazy idea to purchase them for peanuts (compared to your overall worth) to both optimize your tool to use them better and, maybe, reduce the efficacy of how your competitors use them (like changing the API over time, controlling the feature roadmap, etc.) Or maybe I'm being paranoid :-)

petercooper··on Node.js needs a virtual file system
Not allowing AI assistance on PRs will likely decimate the project in the future,

I can't help but wonder if this matter could result in an io.js-like fork, splitting Node into two safe-but-slow-moving and AI-all-the-things worlds. It would be historically interesting as the GP poster was, I seem to recall, the initial creator of the io.js fork.

petercooper··on Show HN: Hacker News archive (47M+ items, 11.6GB) as Parquet, updated every 5m
Context is important, but isn’t HN’s social context, in particular, that the site is entirely public, easily crawled through its API (which apparently has next to no rate limits) and/or Algolial, and has been archived and mirrored in numerous places for years already?
petercooper··on Spotify playing ads for paid subscribers
I don’t know how their behavior differs but I live in a country with patchy mobile coverage and Spotify and Apple Music are night and day with how they cope with this. Spotify is far more robust and I assume prefetches more aggressively.
petercooper··on JPEG Compression
The interesting thing about the situation I mentioned is that while the encoding algorithm was wrong, the actual output was valid JPEG that simply didn't look quite visually correct. But you're right, invalid encoding can be a problem too, and I have noticed during testing that a lot of decoders are quite forgiving of it.
petercooper··on JPEG Compression
I've been working on a pure Ruby JPEG encoder and a bug led me to an effect I wanted. The output looked just like the "crunchy" JPEGs my 2000-era Kodak digital camera used to put out, but it turns out the encoder wasn't following the zig-zag pattern properly but just going in raster order. I'm now on a quest to figure out if some early digital cameras had similar encoding bugs because their JPEG output was often horrendous compared to what you'd expect for the filesize.
petercooper··on Tell HN: I'm 60 years old. Claude Code has re-ignited a passion
As for you, OP, I have no idea why age is a factor to consider to this.

This is one only data point but my dad was a programmer and frequently complained about cognitive decline once he hit his mid 50s. From talking to him, he remained sharp at a conceptual and high level, knowing what he wanted to do and how it would be done, but struggled with the tooling, the logistical details, etc. He didn't make it to the AI era, alas, but AI could be a god send for people who have the proven technical chops and background but find juggling a lot of minutiae is becoming difficult.

petercooper··on Anthropic, please make a new Slack
Yes, if I go to Slackbot we get this: https://pbs.twimg.com/media/HCowV2GXsAAmpXN?format=jpg&name=... - there's no X and no way to get rid of it. Just an ad for their pro plan every time. This is on whatever the normal paid plan is. (We're keeping it around for a few months before we cancel to see if we need to go back on there to find things.)
petercooper··on Anthropic, please make a new Slack
Or, you know, Vibe code your own.

Right. If these tools are so good (and they are) there should be numerous better-than-Slack apps by now that let you do exactly what you want. It doesn't take Anthropic to make it. (At our company, we cheated and edited 37signals' Campfire instead because we got sick of Slack's ads pushed into our paid instance.)

petercooper··on Relicensing with AI-Assisted Rewrite
The actual meaning of a "clean room implementation" is that it is derived from an API and not from an implementation

I know you were simplifying, and not to take away from your well-made broader point, but an API-derived implementation can still result in problems, as in Google vs Oracle [1]. The Supreme Court found in favor of Google (6-2) along "fair use" lines, but the case dodged setting any precedent on the nature of API copyrightability. I'm unaware if future cases have set any precedent yet, but it just came to mind.

[1]: https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_....

petercooper··on Google Workspace CLI
Common for them. Even for projects on the main google GH org more often than not there'll be stuff like "not an official Google product" and "it is just code that happens to be owned by Google" in the README.
petercooper··on Does that use a lot of energy?
Or even a 5 minute shower. About 2500 queries.
petercooper··on MacBook Neo
I think 8GB with Tahoe will lead to a lot of griping in a month or two, but I've bought one for family use. We have some old iMacs with various issues issues and this ticks all the boxes for basic family use. Plus, the sickly color will hopefully mean no-one will hog the machine or take it outdoors.
petercooper··on Apple Studio Display and Studio Display XDR
Not using, but I still have it. I get it running every couple of years and it's striking how dim it is compared to modern monitors. Yet I just can't bring myself to dispose of it or the 2007 Mac Pro it's attached to, despite them having absolutely zero utility.
petercooper··on MacBook Pro with M5 Pro and M5 Max
So prompt goes in 4x as fast but generates tokens slower.

I'd take that tradeoff. On my M3 Ultra, the inference is surprisingly fast, but the prompt processing speed makes it painful except as a fallback or experimentation, especially with agentic coding tools.

petercooper··on MacBook Pro with M5 Pro and M5 Max
It's not the whole answer, but SO came from the .NET world and focused on it first so it had a disproportionately MS heavy audience for some time. GitHub had the same issue the other way around. Ruby was one of GitHub's top five languages for its first decade for similar reasons.
petercooper··on How to talk to anyone and why you should
It may also depend on where you're from. I'm British, have travelled around the US, and never had problem engaging in chit chat with all sorts of people, big cities or not. But there's a strong disarming undercurrent of "oh wow, you're from England" through the whole experience that I expect most Americans never experience, at least within their own country.
petercooper··on Nano Banana 2: Google's latest AI image generation model
Nano Banana 2 has an image search tool that looks up pictures of things and uses them in the context (and arguably, an agent could eventually figure out who jacquesm is and hunt for a photo).

However, I tried "a picture of jacquesm planting a flag on the Moon" for a laugh, and I have to hand it to Google as the person was in a spacesuit, as they should be, and totally unidentifiable! :-D

petercooper··on Number of UK workers on zero-hours contracts hits record high ahead of crackdown
"Instead, employers will likely increase their reliance on temporary workers with fixed-term contracts"

It's no quick fix. The new six month (previously two year) unfair dismissal rules from January 2027 already impact annual fixed term contracts. As the end of a fixed term contract is legally a "dismissal", it'll be necessary to go through the full process.

I suspect some low-level service industry employers will sense the weakness of the jobs market and increase employee turnover by giving people contracts of under six months then rinse and repeat from the queue of applicants, which would suck for someone who wants a temporary job for a year or two like students.

petercooper··on What podcasts are you listening to?
Seconding Latent Space. Very high signal. I listen to the audio version but it's on YouTube here as well: https://www.youtube.com/playlist?list=PLWEAb1SXhjlfkEF_PxzYH...
← PreviousPage 4 of 34Next →