MurphyA/hacker-news huggingface dataset:
by nine_k | 2025-07-19 21:15:30+00:00
HTMX is a solution of a problem like the following: how to add small bits of server-based interactivity to an otherwise static HTML page?

One way would be to go with React, Nest.js, setting up SSR and hydration of just the right fragments, etc. Another would be to take your existing static HTML page, and add very few bits in a specific place.

An easy example: a "like" button + counter of "likes" under a blog post.

If you need a complex SPA UI, you need a different tool.
by motorest | 2025-07-19 21:15:39+00:00
> Python's documentation today[1] is clearly more expansive, better formatted and more readily comprehensible than its documentation from 2001[2] (or even 2008[3]).

Documentation is not a specification. Specifications cover all behavior that should be expected, and specify which behavior is implementation-defined or undefined. If something isn't defined them this is a failure in the specification that requires fixing. The point of a specification is to allow independent parties to do clean room implementations that can be used interchangeably.
by fragmede | 2025-07-19 21:15:53+00:00
If living in the US means contending with roving gangs of masked men snatching up people off the streets, looking at living conditions in other police states, like how their housing policy means ordinary middle class people can still afford a place to live, or how their healthcare system means medical bankruptcy is not a thing, seems like it would be possible to have a reasonable discussion about. If the US is no longer a place where a TV show host can no longer make fun of the President or else his show gets canceled, is it really that far off from China's handling of Pooh bear memes and Xi?
by pksebben | 2025-07-19 21:16:00+00:00
In what way is this country ruled by the people? You're periodically given a non-choice between two options that have equal disdain for your actual concerns, who then go on to play games to see who can get the most bajiliionare backing for reelection, and if you don't like what they're doing you're perfectly free to vote for the OTHER jerk who also doesn't give a shit about you.

This is oligarchy. The 'democratic' process is a smokescreen, and an increasingly thin one.

Look up 'liquid democracy'. It's the best example of what an actual democracy might look like if we did it. We won't, but I also enjoy Blade Runner and Star Trek, so there's no harm in fiction.
by zahlman | 2025-07-19 21:16:03+00:00
> It doesn't make sense no matter which way you evaluate it

It makes sense when you evaluate it the way it's intended to be understood (https://stackoverflow.com/questions/6074018). There are other languages that do this, and it was consciously designed to work this way. The idea that you should have to evaluate one of the operators "first" may make sense to someone trying to implement a parser with techniques from the 70s, but for languages like Python, the design is clearly more about what makes sense for the code author.

Arguably it's surprising that `in` is treated as on par with `==`. But on the other hand, even someone trying to implement a parser with techniques from the 70s would have to admit that both are "relational operators".
by ofalkaed | 2025-07-19 21:16:06+00:00
>Interestingly also, the notes used by modern keyboards and all modern instruments

Vast majority of fretted instruments since the death of the lute are untempered.

Edit: Which is not to suggest that lutes were tempered. Lutes and other tied fret instruments allow for unequal fret spacing so you can temper one string at the cost of more notes being more off from the temperament on other strings, or the frets being at an angle so you could find a bit of a compromise. But often they were EDO or in the ancient tradition of fretted instruments, close enough for rock and roll.
by LarMachinarum | 2025-07-19 21:16:10+00:00
How much is gained by using SVG (as opposed to a raster graphics format) varies a lot depending on the content. For some files (even with complex shape paths depending on a couple details) it can be an enormous gain, and for some files it can indeed be disappointing.

That being said, while raw SVG suffers in that respect from the verbosity of the format (being XML-based and designed so as to be humanly readable and editable as text), it would be unfair to compare, for the purpose of HTTP transmission, the size of the raster format image (heavily compressed) with the size of the SVG file (uncompressed) as one would if it were for desktop use. SVG tends to lend itself very well to compressed transmission, even with high-performance compression algorithms like brotli (which is supported by all relevant browsers and lots of HTTP servers), and you can use pre-compressed files (e.g. for nginx with the module ngx_brotli) so that the server doesn't have to handle compression ad hoc.
by lexandstuff | 2025-07-19 21:17:31+00:00
I don't fault you for maintaining a healthy scepticism, but per the President of the IMO: "It is very exciting to see progress in the mathematical capabilities of AI models, but we would like to be clear that the IMO cannot validate the methods, including the amount of compute used or whether there was any human involvement, or whether the results can be reproduced. What we can say is that correct mathematical proofs, whether produced by the brightest students or AI models, are valid." [1]

The proofs are correct, and it's very unlikely that IMO problems were leaked ahead of time. So the options for cheating in this circumstance are that a) IMO are colluding with a few researchers at OpenAI for some reason, or b) @alexwei_ solved the problems himself - both seem pretty unlikely to me.

[1] https://imo2025.au/wp-content/uploads/2025/07/IMO-2025_Closi...
by aapoalas | 2025-07-19 21:17:39+00:00
To the author, I would be a borrow checker apologist or perhaps extremist. I will take that mantle gladly: I am very much of the opinion that a systems programming language without a borrow checker[^1] will not find itself holding C++-like hegemony anymore (once/if C++ releases the scepter, that is). I guess I would even be sad if C++ kept the scepter for the rest of my life, or was replaced by another language that didn't have something like a borrow checker.

It doesn't need to be Rust: Rust's borrow checker has (mostly reasonable) limitations that eg. make some interprocedural things impossible while being possible within a single function (eg. &mut Vec<u32> and &mut u32 derived from it, both being used at the same time as shared references, and then one or the other being used as exclusive later). Maybe some other language will come in with a more powerful and omniscient borrow checker[^1], and leave Rust in the dust. It definitely can happen, and if it does then I suppose we'll enjoy that language then.

But: it is my opinion that a borrow checker is an absolutely massive thing in a (non-GC) programming language, and one that cannot be ignored in the future. (Though, Zig is proving me wrong here and it's doing a lot of really cool things. What memory safety vulnerabilities in the Ziglang world end up looking like remains to be seen.) Memory is always owned by some_one_, its validity is always determined by some_one_, and having that validity enforced by the language is absolutely priceless.

Wanting GC for some things is of course totally valid; just reach for a GC library for those cases, or if you think it's the right tool for the job then use a GC language.

[^1]: Or something even better that can replace the borrow checker; maybe Graydon Hoare's original idea of path based aliasing analysis would've been that? Who knows.
by 3eb7988a1663 | 2025-07-19 21:18:00+00:00
That is entirely consistent with how truthiness works in Python. The function does not claim to parse strings, that is how you get YAML Norway.

Do you think there should be different results for bool("no"), bool("false"), bool("heckno!"), bool("heckyes!")?

Edit: should have included internationalization: bool("nein!")
by duncanfwalker | 2025-07-19 21:18:02+00:00
I mainly see this wtf pages as a hook to talk about the internals of a language/interpretor/etc. As you say, there's no point reading them as a criticism of the language because that's just not what production python looks like. I read the line of code and think 'can I imagine why it does that?' if I can I skip the explanation but sometimes I have absolutely no idea what's going on and they're the ones I like to read the detail on
by justaj | 2025-07-19 21:18:19+00:00
And what if you let a human expert fact-check the output of an LLM? Provided you're transparent about the output (and its preceding prompt(s)) ?

Because I'd much rather ask an LLM about a topic I don't know much about and let a human expert verify its contents than waste the time of a human expert in explaining the concept to me.

Once it's verified, I add it to my own documentation library so that I can refer to it later on.
by tekkk | 2025-07-19 21:18:53+00:00
I got a wave of shudder reading the acronym "HAM stack". Yugh. MEAN, MERN, RERN–once hyped up hot air which now sounds so dated and hackneyed. It's cool to be excited about tech but if your main selling point is building "faster and cheaper", I don't know if picking up a minimalistic framework you know nothing about is faster than just re-using your trusty boilerplate.

Be it React or Svelte or whatever. With serverless backend if you want to keep costs down. Although a server from Hetzner isn't that expensive and you can host multiple APIs there.
by js2 | 2025-07-19 21:18:57+00:00
Graduated with a CS degree in 1996. Went to work right away for a media company helping run all their web sites. (A few dozen Ultra 2s on a FDDI network connected to NetApps. Served mostly by Apache. A couple beefier boxes serving dynamic content using Perl CGI scripts. The horrid Netscape Server to run early backend JavaScript. Management over a frame relay network. Had friends at Excite, Equinix, etc.)

(In college on the side, I ran a tiny local ISP with a couple dozen Hayes modems connected to a Livingston Portmaster. T1 uplink. A couple PCs running Linux. Before college I had been hanging out on AOL giving technical advice, and before that was using an Apple II dialing into BBS's.)

Which is all to say, I was there for all of this and this piece is pretty much spot on.

When the movie Frequency (which has a communicating across time aspect) was made in 2000, the company the screen writers went to for how to get rich by investing in the right stock? Yahoo.

https://youtu.be/9rzVftbbiBo
by elitan | 2025-07-19 21:19:00+00:00
I had the same thought when I was dog fooding a CLI tool I've been vibe coding. It's a CLI for deploying Docker apps on any server. An here is the exact PR "I" did.

https://github.com/elitan/lightform/pull/35

One of the advantages of vibe coding CLI tools like this is that it's easy for the AI to debug itself, and it's easy to see where it gets stuck.

And it usually gets stuck because of:

1. Errors 2. Don't know what command to run

So:

1. Errors must be clear and *actionable* like `app_port` ("8080") is a string, expected a number. 2. The command should have simple, actionable and complete help (`--help`) sections for all commands.
by spwa4 | 2025-07-19 21:19:24+00:00
Morocco suicide rate: 7.2/100k Spain suicide rate: 8.4/100k Portugal suicide rate: 11.5/100k

And seems to vary with the economic situation just like everywhere else.

Plus quite a few North African countries ... well, they're just lying. Look at Egypt, even Tunisia ... these figures are just not possible, they're either misclassified or just lies.
by bobajeff | 2025-07-19 21:19:51+00:00
This is something I've been thinking about lately. I do think memory safety is an important trait that rust has over c and other languages with manual memory management. However, I think Rust also has other attractive features that those older languages don't have:

* a very nice package manager

* Libraries written in it tend to be more modular and composable.

* You can more confidently compile projects without worrying too much about system differences or dependencies.

I think this is because:

* It came out during the Internet era.

* It's partially to do with how cargo by default encourages more use of existing libraries rather than reinventing the wheel or using custom/vendored forks of them.

* It doesn't have dynamic linking unless you use FFI. So rust can still run into issues here but only when depending on non-rust libraries.
by hansvm | 2025-07-19 21:19:52+00:00
The first third of this seems to just be complaining that it's not obvious when two objects are actually the same object, and that if you mistake identity-related operators for other operators then you'll have a bad day.

That's a fair critique. It's a little weird that `is` and friends have dedicated, short, nice syntax.

On the other hand, most compiled languages are compatible with an implementation which admits the following optimization:

const a: u32 = 42; const b: u32 = 42; assert(&a == &b);

The language usually doesn't guarantee that different immutable variables have dedicated memory on the stack, or that they even live on the stack in the first place.

That's the same class of error we're seeing here, and even among popular interpreted languages Python is by no means unique. I might get to the bottom 2/3 of the doc later, but the rest was off-putting enough that I don't know I'll bother.
by gjm11 | 2025-07-19 21:19:56+00:00
In context, the "at least 16%" is responding to someone who said 8%, and 16 just happens to be exactly twice 8. I suspect (though I don't know) that Yudkowsky would not have claimed to have a robust way to pick whether 16% or 17% was the better figure.

For what it's worth, I don't think there's anything even slightly wrong with using whatever estimate feels good to you, even if it happens not to fit someone else's criterion for being a nice round number, even if your way of getting the estimate was sticking a finger in the air and saying the first number you thought of. You never make anything more accurate by rounding it[1], and while it's important to keep track of how precise your estimates are I think it's a mistake to try to do that by modifying the numbers. If you have two pieces of information (your best estimate, and how fuzzy it is), you should represent it as two pieces of information[2].

[1] This isn't strictly true, but it's near enough.

[2] Cf. "Pitman's two-bit rule".
by evertedsphere | 2025-07-19 21:20:52+00:00
> While some of the examples you see below may not be WTFs in the truest sense, but they'll reveal some of the interesting parts of Python that you might be unaware of. I find it a nice way to learn the internals of a programming language, and I believe that you'll find it interesting too!

the spirit in which that page is presented is different from what you seem to have taken it to mean
by bnchrch | 2025-07-19 21:21:16+00:00
I think your suffering from the same thing that makes 2014 feel like 5 years ago when its over a decade ago.

The framework landscape has remained relatively entrenched in React since 2016. Sure theres a few new ones time to time but nothings ever come close to unseating it in the same way it took over from Angular.

(Yes you could argue Nextjs but thats just react with a backend bolted to it)
by cjs_ac | 2025-07-19 21:21:45+00:00
HTMX sets up an underlying network traffic pattern:

1. The user interacts with the page.

2. The page sends a request to the server.

3. The server returns one response to the client, containing HTML, which the client inserts into the page.

4. (Optional) If the response includes references to other resources, like images or fonts, the client makes more requests for these.

The consequence of the 'one request, one response' thing is that the whole thing is fast. All the HTML arrives in one go. None of this request-one-thing-then-run-some-JS-on-the-client-to-decide-whether-to-request-another-thing nonsense that you can watch happening in real time that happens in an alleged productivity tool I have to use at my day job.
by b_e_n_s | 2025-07-19 21:22:29+00:00
This blog post goes into considerable detail evaluating their preprint:

https://thebsdetector.substack.com/p/government-funded-alche...

The authors have institutional credibility, as well as a lot of ARPA-E and private funding. Additionally, their approach mostly builds on prior work in a manner that suggests the proposed mechanism is quite plausible, although at an extremely low TRL as you can imagine.

The economics do seem to check out, provided that (1) fusion energy achieves an economic net positive, (2) the engineering considerations required for this approach don't make the design of the whole plant implausible due to the narrow windows for tritium sustainability anyway, and (3) there aren't some fundamental physics issues that arise making the whole pathway impractical (such as simulations for the (n,2n) cross-section for mercury being too optimistic).
by zahlman | 2025-07-19 21:22:54+00:00
>and for me the surprising thing here is not "chained comparisons are weird" but rather "`in` is a comparison operator."

Python documentation calls it a "comparison operator" (https://docs.python.org/3/reference/expressions.html#compari...) but a broader, better term is "relational operator". It expresses a possible relationship between two arguments, and evaluates whether those arguments have that relationship. In this case, "containment" (which intuitively encompasses set membership and substrings).

A finer distinction could have been made, arguably, but it's far too late to change now. (And everyone is traumatized by the 2->3 transition.)
by marcusb | 2025-07-19 21:23:36+00:00
We’ll have to agree to disagree about that. The clown-emoji guy is out of line (at least, I wouldn’t respond to a user that way,) but the reporter:

* opens up his bug report passive-aggressively complaining about not getting a response to his emailed report, which he sent to a completely unrelated domain

* immediately fished for a bug bounty payout

* submitted his report against a 2.5 year old release, wasting maintainer time and then pushes back that because it came with his preferred distribution[0] that made it the Evolution maintainer’s problem.

* when the maintainers pointed out this was a dependency problem, accuses them of “buck passing” and demands they warn users of specific distributions about the problem he reported, which is, of course, completely impractical for them to do.

* does not engage at all with the Webkit developer who is trying to explain what the problem is and why fixing in Webkit is the right thing.

* demands one of a selected list of fixes from the maintainers. Note: if his suggested fixes are so simple, a PR at this point implementing one of them would have probably been more productive than what he did post:

I understand that this is completely out of your power to do anything about, and that it is also completely out of your power to put a notice in the UI about the functionality not working for privacy purposes. Please add clown and face-palm emojis to this comment as per my other comments, to indicate you have read it.

He didn’t do himself any favors and, IMO, doesn’t have much of a leg to stand on to complain about the tone of the response he got. He got back what he put out.

0 - a distribution, by the way, that is notorious for distributing hacked up out of date software. See: the OpenSSH key saga as well as projects like XScreensaver that have Debian-specific FAQ entries telling their users how to get reasonably up to date software (https://www.jwz.org/xscreensaver/faq.html#upgrade)
by pyman | 2025-07-19 21:23:56+00:00
I'm sure the hotel will blame the company that sold them the sensors, and the company that built them will blame some developer who changed the sensitivity value from 6 to 8. Everyone will act shocked, the developer will get fired, and the new revenue stream will be called "customers who visited adult websites on a shared private network." I doubt that will end up on TikTok :)
by 01HNNWZ0MV43FF | 2025-07-19 21:23:58+00:00
> HP has a multi-decade history of not being able to maintain a single URL for long term.

That reminds me of the HP BIOS Setup page: https://www.hp.com/us-en/shop/tech-takes/how-to-enter-bios-s...

> There are two primary methods to access BIOS ...

> Method 1 involves restarting your computer and pressing a specific key during the boot process. This key varies by manufacturer but is typically one of the following: F1, F2, F10, DEL, or ESC.

It doesn't say what the key is for HP! On an hp.com article, with "HP" in the title, with "HP" in the header just before this section!
by marcosdumay | 2025-07-19 21:24:01+00:00
Unfairness would be something to care about if it was a rich market with several small companies competing in it. It's not something to care about corporate monopolies.

No, they should not have the right to choose how they want to operate. All those risks you mention only exist because they choose to keep them around as an excuse to why they are necessary. They refuse to modernize their systems so it works, and they should not be allowed to keep that option.

(Honestly, IMO they should just be terminated and replaced by some public service. But if you want to keep them, they shouldn't have that kind of freedom.)
by crazygringo | 2025-07-19 21:24:08+00:00
> A goal of Python is to be as readable as possible, not to conform to some spec.

The goal of every programming language should be to conform to a spec that is as logical and consistent as possible. This prevents bugs by saving tons of mental effort having to worry about and look up edge cases, and not always catching them all.

I don't mind so much if end-user applications have bugs when they're used differently from intended, because their use cases are narrow. If Word crashes when I put 10,000 images on a single page, well obviously it's not built for that.

But I mind very much when programming languages have bugs, because they are the layer on top of which we build so many other things! The use cases for a programming language are almost infinitely wide.

For a language as widely used as Python, we should be testing it out like QA testers. All these inconsistencies add up to tons of bugs when you expect something to follow a consistent pattern and it doesn't.
by zrail | 2025-07-19 21:24:15+00:00
I have never used KeepassXC so I looked it up. It seems like it solves a very different use case than what I need:

* shared vault with my spouse's user in our organization account

* multiplatform with sync

* most importantly, available without any of the hardware that I manage being in a usable state

KeepassXC doesn't solve for any of those as far as I can tell.
by scoofy | 2025-07-19 21:24:18+00:00
This kind of thing is so penny smart, pound foolish. If I ever see that sign, it's immediately going on my Instagram, telling everyone I know to never stay at such a place.

I'm still never staying at AirBnB's when it actually matters because they completely screwed over my gf when she booked a bachelorette party and the owner literally sold the property without cancelling the reservation and the new owner rebooked the same site, also using AirBnB. AirBnB just offered a refund, even though the monetary damages were easily 10x the cost of the reservation and obviously permanent in the fact that in ruined a major life event.

Say what you want about the amount of money your company will make. Reputations take a lifetime to build, and most people have a grim trigger when it comes to being screwed over.
by moffkalast | 2025-07-19 21:24:20+00:00
Honestly once you really think about it just about nothing about these decisions ever makes any real sense which is why JS is made fun of constantly. It's nonsense functions running on nonsense data. "if some_non_bool_value:" should not be valid syntax and truthy and falsy is a concept that would get you locked up in an asylum if you decided to explain it to a doctor.