MrJohz

Joined 4 years ago

Karma
3,002
Submissions
1,128
Member since
Feb 14
https://jonathan-frere.com/

I write software and haven't come up with a great bio description yet.

View on Hacker News

Recent submissions

Comment · 22 days ago
If I were a Democrat or a part of the DNC, then sure, introspection would be very important. But I'm not — I'm not even American, I'm watching from the sidelines trying to figure out what on earth has gone wrong and how I prevent it happening again in my own country.

The answer to Trump cannot be "the Democrats needed to try harder", because if democracy relies on one side never slipping up while the other side can do whatever they like, then of course that system is going to collapse eventually. We have to look at the deeper causes. And one of the most fundamental causes here is that a lot of people in the US looked at a man who openly promised a multi-pronged attack on the constitutional basis of the United States and said "yes, that's the man for me". If your analysis of the 2024 election doesn't include that point, then it's a flawed analysis.

Comment · 22 days ago
But I'm not blaming the voter for not supporting me. I'm blaming the voter for supporting the person that they supported.

Sure, I might be selling poop in a bag, and maybe nobody wants that. I can't blame people for not buying things they don't want. But the guy next to me is selling the Handmaid's Tale But In Real Life, and people are queuing up round the block to buy it. Those people looked at all the options -including abstaining and not buying anything at all - and still made a decision. They have to take ownership of that decision.

From the perspective of the Democrats, sure, self-reflection is necessary to figure out what went wrong. They should go and do that. But from the perspective of someone voting for Trump, no, you don't get to use that excuse. You looked at an admittedly very limited field of options and voted for the guy who was backed by a group who had literally written a manifesto on overturning the US constitution, the guy who boasted about his ability to sexually assault women, the guy who had already had a full term and caused tremendous damage with it, the guy who had spent four years complaining about rigged elections and threatening to do something about it, the guy who supported an attempted insurrection and promised to pardon the people who were involved, etc etc etc.

Stop blaming other people here - if you voted for Trump, it was perfectly clear what you were getting, and you still made that decision. That's on you.

Comment · 25 days ago
That could well be the case, I think I switched our monorepo over to as-node-native-as-possible at some point this year, possible after April or so. But I don't have the codebase at hand unfortunately, so I can't be more exact.

I do wish some of this stuff would be documented better. I find Node's documentation to be some of the worst for never being able to answer the specific question I have when I'm reading it — IIRC I was also unsure whether the type stripping thing would work for a monorepo, and the closest confirmation I could find online was a comment in a PR somewhere that implied it ought to work, but nothing more specific.

Comment · 26 days ago
> - packages in workspaces can be used as dependencies without compilation (node's type stripping doesn't support this)

Node does support this! Although it may depend on exactly you link the packages within a workspace — I use `pnpm` and it Just Works™. Because NodeJS looks at the resolved symlink to decide whether a project is in `node_modules` or not, if the symlink resolves to a package in the workspace, then NodeJS will do type stripping as normal.

In fairness, the documentation is very unspecific about this, so I just had to try it out and see what happens, but it does work.

I think NodeJS also has coverage these days, although I could be wrong there.

Comment · 1 month ago
If anyone is reading this and sees compatibility as their primary reason for staying with a Chromium browser: I have been using Firefox as my main browser for many years now, and I can count on one hand the number of times where I've been hit by compatibility issues.

The big one is anything to do with video calling — things often work but not as well, or you can voice call but not use video, or something like that. Most of the time the call works well enough, or I use a native app anyway, in which case this isn't a problem, but I suspect this is the thing people are most likely to run into in practice.

The other one is WebUSB, which is useful for certain tools that flash hardware (e.g. keyboards) from the browser. This is rarer, but I still have Chrome around so I can still use these tools. And mostly there's another option anyway, it's just that WebUSB makes things more convenient.

I have heard people complain about Cloudflare, but I've never noticed this. I suspect this is less to do with Chrome/Firefox, and more to do with privacy settings that Firefox makes more accessible. But again, I've never had an issue with Cloudflare myself, so I can't say much about this.

Other than that, I genuinely can't think of the last time I wanted to use a website but couldn't because of Firefox. And even in the above situations, it's rare that I actually run into issues, it's just something I'm aware of as a possible cause if something happens. Most of the time things work perfectly well.

Comment · 1 month ago
I think that's an original issue though.

Accessibility certainly requires a content-first approach, I agree with you there. If you view each part of an application solely in terms of what it looks like to a sighted user, it's easy to miss the subtleties of what the underlying structure ought to be.

But when you start layering on the presentation, you're still generally binding that presentation layer tightly to the current content. If you, for example, were to restructure the links in the Zen Garden footer for some reason, most of the styles would break because they're bound to the current structure of the content. The separation you talk about only exists in one direction.

By comparison, when I talk about separation and decoupling in terms of code, I mean that there is a single, explicit, and tight API that acts as a clear boundary between two units. By explicit, I mean that I've designed the units specifically so that they expose this API - this is almost exactly the opposite of what I should be doing with content and presentation, as you point out! By tight, I mean that the API is as minimal as I can make it - two units interacting via an API need to understand nothing of each other except that API, and that API is as small as possible.

None of that is happening when it comes to the interaction between content and presentation. The content is not explicit - I'm actively trying to write the content for the design, which precludes making it an explicit API surface. Nor is the content tight - again, I want to build the content without worrying about how I will layer the design on top, and I don't want to limit myself to just a small surface area here.

So to me, it makes sense to see the content and presentation as being coupled together, even if that coupling ideally goes in one direction only. And if two systems are coupled together, it makes sense to do that explicitly by co-locating those systems. Therefore, I tend to prefer systems like Tailwind that let me apply the presentation layer directly in the content layer. (In practice, I mostly prefer other tools that still let me write real CSS syntax, but Tailwind is pretty damn convenient a lot of the time.)

As an aside, talking about accessibility, I'd forgotten how inaccessible some of the Zen Garden designs are with their addition of extra content in the presentation layer alone.

Comment · 1 month ago
The setup is described in the linked post about programming language vs efficiency/token cost: https://danluu.com/pl-tokens/#zstd

> For the first eval, I tried giving agents the zstd RFC (plus errata) and telling them to implement a complete zstd decoder (agents are stuck in a container without internet access). The tests were not given to agents. For something with the surface area of zstd, it's not really reasonable to expect that the tests cover every possible case. For example, even though zstd is a fairly well-tested piece of software, I once found a data corruption bug in zstd. The test suite isn't intended to find extreme corner cases that might be lurking for years and is instead intended to check various cases that can "easily" be derived from the RFC that should work.

So basically, the agents were given the zstd RFC, told to implement a decoder, and also told to use a particular testing strategy (or not, for the control runs).

Comment · 1 month ago
The question "for which functions/modules/classes should I write tests?" and the question "how do I structure my functions/modules/classes?" are very closely related questions, which I think is what the other comment was getting at.

That follows largely from what you're saying though, so I think the two of you agree, you're just coming at the same thing from different perspectives. Like you say, you want to avoid/manage coupling tests to implementation details, and typically the best way to do that is to bundle a significant, testable chunk of code into a single module, define a clear public interface to that module, and then test that interface. The internals of that module are then free to change, but the test interface should stay the same.

But the corollary of that is that you can't just design your modules independently of your tests, you need to design them so that they are testable. Which is why the previous comment links testing to code architecture/design.

Regarding dependencies like that, the best situation is where you can either:

(a) design a module so that the dependency is injected with a clear interface (not just "here's an instance of libredis.rs" but "here's a series of callbacks for saving data, those callbacks might save to Redis, but they might be in-memory only, or they might save everything to the blockchain, either way it doesn't matter").

(b) just spin up an instance of Redis and test directly against that — it should be quick enough, and there's plenty of ways to ensure that the tests don't affect each other even while accessing a shared resource.

Comment · 2 months ago
I think they were suggesting using AI to audit for accessibility, which is probably a better approach, and probably more effective than a lot of the basic accessibility checkers out there that work on a list of fairly simple rules and don't understand the context of what they're doing, so tend to give either very limited advice, or sometimes even offer bad advice.
Comment · 2 months ago
I don't think this particular feature helps there, though. If you set your site up on Cloudflare, you'll probably explicitly want the proxy stuff, and that's very easy to set up. But if you buy a domain on Cloudflare, then you're already not looking specifically at the proxy products, you're looking at something else. And if you start configuring that domain in an admin panel that looks like it's offering you direct DNS configuration, and then you later realise that the DNS configuration has ended up completely different to how you set it up, then that's a bit weird. Like, if I set `CNAME` in DNS, then I expect the DNS CNAME record to be what I set it to.
Comment · 2 months ago
In this case, I was specifically using the domain registrar product from Cloudflare alongside other tools. Later, I moved a bunch of stuff away from Cloudflare but kept using them to manage my domains for the convenience — as part of that move, I ran into this issue.

I agree that it makes sense to link products together ("vertical integration" and all that), but I think it's very confusing to have a DNS dashboard that lets you configure DNS how you like, but then by default doesn't set up the DNS as you configured it. That's a weird choice.

Comment · 2 months ago
When you set up CNAME and certain other records in Cloudflare DNS, it defaults to (and heavily discourages you to disable) "proxied" records, which I believe means that the record points to a Cloudflare-owned host which then acts as a reverse proxy to whatever value you'd set. So from the console it looks like you've set the CNAME to a certain value, but in practice it'll be set to a different thing and transparently forward everything via Cloudflare. This is probably where the analytics get inserted, alongside a bunch of other Cloudflare features.

You can disable this, at which point the record will be set as a normal DNS record.

I can see the advantage of Cloudflare's proxy systems, but I wish they'd be clearer about when they're being used and not pretend that this is some DNS feature or that records have been set to one thing when they've actually been set to something else. If nothing else, it makes debugging DNS issues a lot more confusing, particularly if you're not a DNS expert.

Comment · 2 months ago
You can get a lot of stalemate when the majority agrees that there is a problem, and often even what the problem is, but they can't agree on what the solution is. I think that's the situation in a lot of Western European countries right now — there's a broad dissatisfaction in governments, but there's isn't really a clear mobilisation towards any one solution because nobody can agree what the solution should be. That's why you see very low approval ratings for a lot of European governments, but you also don't see any single party capitalising on that. Even Labour's success in the UK was mainly the collapse of the Conservatives rather than a clear vote of confidence in Labour.
Comment · 2 months ago
I think there's a few things going on that make it a bit different.

Firstly, Farage picked this constituency to run in because it's deeply favourable to him. This is quite common for leaders of parties — if you can't even get your top guy to win an election, how are you going to convince other people to do the same? In the previous election, he ended up with 46% of the vote, so assuming the same people vote for him again, you'd need almost all the other votes to go to a single alternative candidate to beat him — that's very unlikely. So there's not much value in running to beat him.

Secondly, Farage was always trying to sell this as a people vs the establishment election, so it wasn't really in the interests of any of the other parties to indulge him in that. Either it's a resounding victory against the establishment, or another example of the establishment using its power to beat up the little man. (Ignore the reality that Farage is fundamentally part of the establishment — the question is more how Farage would attempt to sell the result.) So even if you take the approach that the big national parties ought to be able to field a candidate in every election, even if they aren't going to win, there's not much value there either because the result will be used against you.

Thirdly, the stakes aren't so large as if this were a vote on the President. Farage is the leader of his party, yes, but right now it's a fairly minor protest party, with only 8/650 seats in the House of Commons. They take up a lot of column inches, but in terms of actual power, right now they're not that important. Gaining that one seat in the Commons isn't so big a deal to the day-to-day running of the country — Labour would continue to have a sizeable majority and control the Government, no matter who won it. So there's no question of "who should run the country" here, it's essentially just a performance to the media and the people.

Fourthly, beating Farage here stops the disciplinary processes from happening, and those are probably going to be more damaging to Farage overall than him losing this one election. As long as he's an MP, he will need to deal with the fact that he failed to declare this particular donation, which means it's kind of in the interests of the other parties to let him stay as MP and hopefully face the music. In practice, the punishment will probably not affect him very meaningfully, but the rigmarole of going through the process itself and having his bribe and associations with crypto billionaires repeated constantly in the media will probably be more impactful.

And fifthly, this is kind of just an optional extra election that Farage has called. If the investigation finds fault (likely) and recommends a long enough suspension (more uncertain), then the people of Clacton can choose to recall Farage anyway, at which point there will be a "real" by-election. I've no idea whether that will happen, whether the people in Clacton will really want that to happen, or whether the other parties will abstain again, but I think because this was an election triggered exclusively by Farage for his own benefit, there is this perception that the election never really counted any way.

Comment · 2 months ago
It's very good, although it focuses mainly on the framing device and not on the stories themselves. I can imagine if you're a fan of the original book, it might feel quite shallow in comparison, but as someone who never read the book, I really enjoyed it as a black comedy about bad people in bad times.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton