HNHacker News
TopNewBestAskShowJobs

francislavoie

1,834 karma · joined November 22, 2017

I work on Caddy. I write PHP code.

https://meet.hn/city/ca-Ottawa

[ my public key: https://keybase.io/lavofr; my proof: https://keybase.io/lavofr/sigs/89IwNhliuw72n2Le4Cx6679wAkPUDO7p0v_Q_sipXoU ]

submissionscomments
francislavoie··on Show HN: Capsule – Single-file web apps that save their data into SQLite
I've been doing this with bun lately, single file app with built in SQLite. JS runtime which serves the app with SSR, websockets, and all that good stuff. The binary size is not that small, but that's usually worth the convenience.
francislavoie··on Shopify acquires Tailwind
Worth noting, Tailwind was canadian, and Shopify is also canadian. I like that this was the outcome. The labs business was obviously no longer needed in this era of AI, and I'm glad Tailwind will continue to get proper backing from Shopify to evolve further.
francislavoie··on The Rust React Compiler is now native in Vite
https://react.dev/learn/react-compiler/introduction
francislavoie··on Rust Glancer: Rust LSP using 100x less RAM
Language Server Protocol, it's what your IDE (like VSCode or other) uses to do linting, syntax checking, and "go to reference" stuff.
francislavoie··on DeepSeek Harness developer preview
Can be a TUI, can be a GUI.
francislavoie··on DeepSeek Harness developer preview
A "harness" is basically what you call Claude Code and such, i.e. a TUI to run the agent.
francislavoie··on I don't recommend Tailwind CSS
The component itself is the semantics, adding naming over CSS classes adds no value whatsoever, only adds cognitive load and requirement of context switching to understand "what does this named class actually do?"
francislavoie··on I don't recommend Tailwind CSS
I disagree. I don't want to jump between two files constantly. With Tailwind I can stick to one file and never need to think about naming things.
francislavoie··on I don't recommend Tailwind CSS
Your complaint is about bad developers, not about Tailwind. Using Tailwind correctly means making heavy use of components to avoid duplication. Using Tailwind also removes the burden of having to do one of the hardest things in software: naming things, which is what semantic classes requires you to do.
francislavoie··on I don't recommend Tailwind CSS
I would reach for class-variance-authority (aka cva) instead for stuff like a size prop, it declaratively solves that.
francislavoie··on I don't recommend Tailwind CSS
Absolutely not. Semantic classes are the wrong way to go. Your components (and their props API) are what encode the semantics. With Tailwind you never need to try to come up with a name for anything relating to style, you just use utility classes. It reduces cognitive load significantly.
francislavoie··on I don't recommend Tailwind CSS
Using @apply defeats the entire purpose of Tailwind. The point of it is to localize styling alongside the markup. If you're using @apply then you're constantly context switching from your markup to your CSS files while working.

There's plenty of ways to manage the bevy of classes you need. First step is making use of components to deduplicate stuff. Then in those components, use a library like class-variance-authority aka "cva()" which allows you to set up complex named presets for your components (like size="small" or color="primary" and things like that).

francislavoie··on I don't recommend Tailwind CSS
Saying "unless you use @apply" invalidates this article for me. Everyone knows that @apply only exists as an escape hatch, it is not supposed to be used, except for when it's necessary like for compatibility with libraries that declare their own classes that you need to override.

The most commonly repeated point in the article is "escape hatches bad" and I think that's completely absurd. Of course you want escape hatches, otherwise when you do hit an edgecase you get stuck with no solution. That's exactly what would force you to throw away that approach and pivot. Tailwind doesn't have that problem because it was designed to include escape hatches.

Users deciding to use those escape hatches instead of sticking to a design, isn't Tailwind's fault.

francislavoie··on Git worktrees are not an isolation boundary for coding agents
I set up a custom hook in Claude which runs my own worktree creation/cleanup script, which takes care of copying my node_modules into the worktree, my .env (plus doing some edits to the .env to isolate it so it can run in parallel), and stuff like that. Each worktree gets its own docker compose project name so they can run docker stacks in parallel. Works pretty seamlessly.
francislavoie··on Chatto is now open source
Yeah a lot of them like Mattermost become surprisingly limited unless you pay. It's very annoying.
francislavoie··on Lore – Open source version control system designed for scalability
Obviously, and that's why tools like perforce and lore exist. What's your point?
francislavoie··on VoidZero Is Joining Cloudflare
But they give a usable interface and toolkit to the runtime (V8 etc). 99% of users use one of those three.
francislavoie··on VoidZero Is Joining Cloudflare
Vite is not a package manager and is not a JS runtime. That's what Node/Bun/Deno do. Vite is the remaining glue for any web project's build and testing needs.
francislavoie··on Show HN: PHP-fts – Full-text search engine in pure PHP, no extensions
We've been using https://github.com/loupe-php/loupe, works quite well for small-to-medium single-instance apps.
francislavoie··on Why I forked httpx
What, Go's net/http is fantastic. I don't understand that take. Many servers are built on it because it's so fully featured out of the box.
francislavoie··on RFC 9849. TLS Encrypted Client Hello
(Disclosure: I'm a Caddy maintainer), Caddy already supports ECH, leaning on the DNS plugins to automate setting the DNS HTTPS records to wire it up. Here's a lot of technical detail about it https://caddyserver.com/docs/automatic-https#encrypted-clien...
francislavoie··on Physics Girl: Super-Kamiokande – Imaging the sun by detecting neutrinos [video]
Is it a "Ship of Theseus" photon? Hehe
francislavoie··on British Columbia is permanently adopting daylight time
Changing timezones suck, but sunset happening at 4:30pm before I leave work to go home massively contributes to winter depression. It's like "well that was a tiring day" and then instantly served with _darkness_. It sucks. If you get at least SOME light on the way home, it's a bit of a bright spot in the day, especially if the sunset is particularly pretty that day, as it often happens to be in Canadian winters. So I am extremely happy to see they chose the correct option for mental health of Canadians in the winter, and I really hope the rest of the provinces follow suit.
francislavoie··on British Columbia is permanently adopting daylight time
Hell noooo. 4:30pm sunsets are ultra depressing in the winter. Less light in the morning is not at all a problem in comparison.
francislavoie··on Show HN: Moonshine Open-Weights STT models – higher accuracy than WhisperLargev3
I've helped many Twitch streamers set up https://github.com/royshil/obs-localvocal to plug transcription & translation into their streams, mainly for German audio to English subtitles.

I'd love a faster and more accurate option than Whisper, but streamers need something off-the-shelf they can install in their pipeline, like an OBS plugin which can just grab the audio from their OBS audio sources.

I see a couple obvious problems: this doesn't seem to support translation which is unfortunate, that's pretty key for this usecase. Also it only supports one language at a time, which is problematic with how streamers will frequently code-switch while talking to their chat in different languages or on Discord with their gameplay partners. Maybe such a plugin would be able to detect which language is spoken and route to one or the other model as needed?

francislavoie··on Modern CSS Code Snippets: Stop writing CSS like it's 2015
It's much more than that because it can make use of CSS pseudo selectors like hover, which is not possible with inline styles.
francislavoie··on Instant database clones with PostgreSQL 18
Unfortunately a lot of our tests use transactions themselves because we lock the user row when we do anything to ensure consistency, and I'm pretty sure nested transactions are still not a thing.
francislavoie··on Instant database clones with PostgreSQL 18
But how does the reset happen fast, the problem isn't with preventing permanent writes or w/e, it's with actually resetting for the next test. Also using overlayfs will immediately be slower at runtime than tmpfs which we're already doing.
francislavoie··on Instant database clones with PostgreSQL 18
Yeah there's absolutely no way restarting the container will be faster.
francislavoie··on Instant database clones with PostgreSQL 18
Restarting the DB is unfortunately way too slow. We run the DB in a docker container with a tmpfs (in-memory) volume which helps a lot with speed, but the problem is still the raw compute needed to wipe the tables and re-fill them with the fixtures every time.
Page 1 of 25Next →