HNHacker News
TopNewBestAskShowJobs

mplanchard

5,132 karma · joined April 5, 2019

https://blog.mplanchard.com/
submissionscomments
mplanchard··on A couple million lines of Haskell: Production engineering at Mercury
You can usually manage dyn compatibility issues in my experience by writing a base trait that is not dyn compatible and then an Ext trait that is, which is auto implemented for all implementers of the base trait. You see this pattern all over the place, including with several of the buffer traits you mentioned.

Mostly, this works out well enough: dyn compatibility pretty much just insists your methods can in fact work with just a reference to an unknown variant of the type.

mplanchard··on A couple million lines of Haskell: Production engineering at Mercury
The most confusing thing that can happen with something like tokio is the failure-at-distance you can get from writing a non-Send future somewhere in the depths of a call stack and then having to figure out why your top-level spawn isn’t working. There’s a non-default lint I highly recommend turning on when working with tokio: clippy::future_not_send. Forces all your futures to be Send, unless you opt out, which really helps keep the reasoning local when you run into errors.

FWIW I write primarily rust, and I do not agree with the advice given in your second point, so I’d take it with a grain of salt were I you.

mplanchard··on A couple million lines of Haskell: Production engineering at Mercury
It’s worth learning, in my opinion, but I’ve been writing it professionally for the better part of a decade, so my opinion may be a bit skewed.

It’s my favorite language to write, and it gets much easier over time. As a first approximation, if you’re doing something and it feels insanely difficult like the GP is talking about, try to think of a different way to do it rather than fighting it. There’s usually a way to do almost anything, but it’s more pleasant to lean into the grooves the language pushes you towards.

mplanchard··on VS Code inserting 'Co-Authored-by Copilot' into commits regardless of usage
To be fair, looks like a PM vibe coded it and this person “just” gave it an approval with no comments after an LLM review.
mplanchard··on VS Code inserting 'Co-Authored-by Copilot' into commits regardless of usage
What do you mean they aren’t part of the commit message? Trailers like (signed off by) are absolutely part of the message. Tools can choose to treat them as special metadata, but they’re part of the commit.

The docs for the function to interpret trailers even says this explicitly: https://git-scm.com/docs/git-interpret-trailers

> Add or parse structured information in commit messages

mplanchard··on Online age verification is the hill to die on
This feels different to me than complaining about the font or whatever. I don’t want to read or comment on anything not written by a human. I also agree with GP here that using AI instead of your own words has bearing on the content itself, insofar as it’s a signal that the author doesn’t care enough to write it themself.

As a corollary, I also want to know if a project posted here is predominantly vibe-coded, since that to me is a signal that it may be of lower quality, have fewer edge cases worked out, and is more likely to be abandoned in the near future.

mplanchard··on Linux 7.0 Broke PostgreSQL: The Preemption Regression Explained
Also was only on ARM, wasn’t it?
mplanchard··on Ghostty is leaving GitHub
OTOH, the nice thing about a minimalist build system is it forces you to solve these problems yourself, in a way that’s broadly compatible with any provider: for me, nix builds, cache with cachix, and use gnu parallel for running concurrent jobs.

Means that my CI pipeline can be ~instantly moved to any provider, or a box that I own, or whatever.

mplanchard··on Warp is now open-source
As someone who was interested in warp in the early days (new rust terminal!), but who would never use a closed source terminal, this feels like a pyrrhic victory, since I don’t care at all about the AI accoutrements.
mplanchard··on Integrated by Design
Assuming this is all true, at least for me personally, the level of generative AI involvement here still puts me off the project completely.

Even if it is only translation, I am not interested in reading LLM output in the context of a book, and I would feel betrayed if I learned that the translation was machine-generated if I had purchased a copy.

For the amount you’re charging, you could have hired a human translator. Either way, just like with a book translated by a human, you should disclose that the actual words in the book were not written by you. “Author: Vivian Voss, Translated By: Claude Opus” or whatever.

I’m sure others feel differently, and you may find success among that crowd.

mplanchard··on The Prompt API
Ironically, the proposed extension would likely have neutered this comment to a shell of itself.
mplanchard··on What async promised and what it delivered
You’re moving the goalposts, and seem to have a vested interest in this that I, frankly, don’t.

Send/Sync/static is not needed on tokio’s local runtime, which doesn’t require any adjustments to your libraries.

Passing data between threads requires Send/Sync/static, except for certain cases like scoped threads, so making OS threads faster doesn’t seem to solve that issue like using a local runtime would.

Many async libraries (though certainly not all) are runtime-independent. If your library doesn’t have to spawn, it is easy to write runtime-independent code. I would like to see some spawn traits brought into std to make it easier to write libraries that have to spawn, though.

I’ll always try new ways of doing things, but you are making the assumption that the way you feel is the way everyone feels, and totally dismissing the opinions of those who don’t. It puts me off of whatever solution you might be proposing, since you clearly don’t have the empathy to understand the full range of positions of the people whose problems you’re ostensibly trying to solve.

I’m not trying to convince you the way you feel is wrong, but you are wrong that everyone thinks writing async code is miserable. There are times where it’s hard, or where the compiler emits confusing messages about async closures being not generic enough, but on the whole I enjoy writing async rust, so shoot me.

mplanchard··on If you stop hiring juniors, your senior engineers own you
Do y’all not tip your plumbers?
mplanchard··on An AI agent deleted our production database. The agent's confession is below
The genre of LLM output when it is asked to “explain itself” is fascinating. Obviously it shows the person promoting it doesn’t understand the system they’re working with, but the tone of the resulting output is remarkably consistent between this and the last “an LLM deleted my prod database” twitter post that I remember seeing: https://xcancel.com/jasonlk/status/1946025823502578100
mplanchard··on What async promised and what it delivered
You don’t have to make everything Send/Sync if you don’t need to. Use tokio’s local runtime and spawn_local(), or use one of the other async runtimes.

You also don’t need to spawn() futures to await them. Spawn enables parallelism on the multithreaded runtime, holding join handles, etc. If all you need is to execute concurrent code, though, the various combinators and functions in the futures crate lets you do so without having hard requirements on Send/Sync. The large majority of the concurrent code I write uses nothing specific from the tokio crate, including spawn.

As is often the case in rust, the compiler is also telling you the correct thing. If you’re using the multithreaded runtime and spawning, your code may execute in another thread, so it has to be Send/Sync, and since the ownership of the future is transferred to the executor, it must also be ‘static.

mplanchard··on Simulacrum of Knowledge Work
Fun fact: the Wachowskis made this required reading for most of the actors in The Matrix
mplanchard··on The AI industry is discovering that the public hates it
I work remotely, so most of my social sphere is non-tech people. I live in a pretty liberal area, where the average level of education is high.

I don’t know a single non-tech person who has positive feelings about AI in that sphere.

mplanchard··on What async promised and what it delivered
I write reams of async rust for a living, and completely disagree with this characterization. The concurrency primitives in the futures crate are able to elegantly model the large majority of places where concurrency is needed, and they are nicely compostable.

More than once, we have wanted to improve the performance of some path and been able to lift the sequential model into a stream, evaluated concurrently with some max buffer size. From there, converting to true parallel execution is just a matter of wrapping the looped futures in Tasks.

Obviously just sprinkling an async on it isn’t going to make anything faster (it just converts your function into a state-machine generator that then needs to be driven to completion). But being able to easily and progressively move code from sequential to concurrent to parallel execution makes for significant performance gains.

mplanchard··on Niri 26.04: Scrollable-tiling Wayland compositor
I had wanted to switch to niri for some time, but it was always a massive, several day process to figure out all the accessory config (top bar, idle timeouts, notifications, etc.). Mentioned in another comment that I have since discovered that there are wayland "desktop shells" that provide the majority of the kit and kaboodle you'd expect from gnome or whatever, with minimal or no fussing, including settings dialogs, application trays, resource monitoring, top bars, etc. I'm using dank material shell for this currently, but it's really cool being able to arbitrarily compose the desktop shell and the compositor.
mplanchard··on Niri 26.04: Scrollable-tiling Wayland compositor
If I'm understanding the ask, I think niri has this. Workspaces for each output are independent, and switching between them only affects the focused output.
mplanchard··on Niri 26.04: Scrollable-tiling Wayland compositor
The only remaining feature I would like is focus-follows-mouse but only for outputs, so that if I've moved my mouse over onto a second monitor, the focus moves to that output.

There are a few discussions around this, so I'm hopeful to see it implemented at some point:

- https://github.com/niri-wm/niri/discussions/1318

- https://github.com/niri-wm/niri/discussions/378

- https://github.com/niri-wm/niri/discussions/491

mplanchard··on Niri 26.04: Scrollable-tiling Wayland compositor
I recently switched to niri after bouncing off it about a year ago, and this time it stuck.

One thing I learned in the process was that the custom wayland desktop world has the concept of a "desktop shell," which provides most or all of the additional components you might want on top of your compositor, rather than having to separately install a top bar, manage suspend/hibernate, figure out notifications, etc. You can of course still do all of that, but you can also just install niri and something like the "dank material shell"[0] and be off to the races. I first discovered this via awesome-niri[1].

The combination of niri and the shell means that the extent of my custom NixOS configuration for the two is entirely limited to keybindings and some custom window rules for zoom.

[0]: https://danklinux.com/

[1]: https://github.com/niri-wm/awesome-niri

mplanchard··on Your hex editor should color-code bytes
Anyone know of a good emacs package for this?
mplanchard··on A Vompeccc Case Study: Spotify as Pure ICR in Emacs
Thanks for writing! I normally wouldn’t even comment on a small thing like that, but with the length of the articles it was tough to go back and forth. Clicking the number in the footnote works great. I swear I tried that before, but maybe just didn’t hit it quite right
mplanchard··on OpenAI Privacy Filter
It would be nice if their examples weren’t mostly things that are easy to catch with regex, but it’s cool to see if released as an open, local model.
mplanchard··on A Vompeccc Case Study: Spotify as Pure ICR in Emacs
I really love this content, and the presentation, but I will just say that a “go back” button when following a footnote would be a really welcome addition
mplanchard··on Parallel agents in Zed
100%. I recently got rid of my lsp-booster and similar kludges because the builtin language server client (eglot) is now fast enough without it, even on large projects.

And if you want AI integration at your choice and control, agent-shell (and chatgpt-shell, which is LLM-agnostic despite the name) are great packages. They’re totally hackable with elisp like you’d expect, which I personally haven’t done a ton with, because I use AI pretty sparingly, but I imagine the crowd here could come up with plenty of ideas for how to program your editor and your agent interface together.

mplanchard··on Framework Laptop 13 Pro
To compare anecdotes, I’ve had mine for 3 years, and it’s still working great. Haven’t had any issues with it.
mplanchard··on Advancing human gut microbiota research by considering gut transit time (2023)
Seems presumptuous to make assertions about what’s in the research if you haven’t read it
mplanchard··on Anduril, Palantir and SpaceX are changing how America wages war
He would be horrified. I’m a little surprised his estate hasn’t attempted to prevent it.
← PreviousPage 8 of 34Next →