MurphyA/hacker-news huggingface dataset:
by cm2187 | 2025-04-22 22:37:09+00:00
Not the full script but can share some pointers.

Using smartctl to extract smart data as it works so well.

Generally "smartctl -j --all -l devstat -l ssd /dev/sdXXX". You might need to add "-d sat" to capture certain devices on linux (like drive on an expansion unit on synology). By the way, synology ships with an ancient version of smartctl, you can use a xcopy newer version on synology. "-j" export to json format.

Then you need to do a bit of magic to normalise the data. Like some wear level are expressed in health (start = 100) or percent used (start = 0). There are different versions of smart data, the "-l devstat" outputs a much more useful set of stats but older SSDs won't support that.

Host writes are probably the messiest part, because sometimes they are expressed in blocks, or units of 32MB, or something else. My logic is:

if (nvme_smart_health_information_log != null) { return nvme_smart_health_information_log.data_units_written * logical_block_size * 1000; } if (scsi_error_counter_log?.write != null) { // should be 1000*1000*1000 return (long)(double.Parse(scsi_error_counter_log.write.gigabytes_processed) * 1024 * 1024 * 1024); } var devstat = GetAtaDeviceStat("General Statistics", "Logical Sectors Written"); if (devstat != null) { return devstat.value * logical_block_size; } if (ata_smart_attributes?.table != null) { foreach (var att in ata_smart_attributes.table) { var name = att.name; if (name == "Host_Writes_32MiB") { return att.raw.value * 32 * 1024 * 1024; } if (name == "Host_Writes_GiB" || name == "Total_Writes_GB" || name == "Total_Writes_GiB") { return att.raw.value * 1024 * 1024 * 1024; } if (name == "Host_Writes_MiB") { return att.raw.value * 1024 * 1024; } if (name == "Total Host Writes") { return att.raw.value; } if (name == "Total LBAs Written" || name == "Total_LBAs_Written" || name == "Cumulative Host Sectors Written") { return att.raw.value * logical_block_size; } } }

and even that fails in some cases where the logical block size is 4096.

I think you need to test it against your drives estate. My advice, just store the raw json output from smartctl centrally, and re-parse it as you improve your logic for all these edge cases based on your own drives.
by ryanisnan | 2025-04-22 22:37:43+00:00
I can't help but completely agree. I could see an abstraction like this working really well on top of a simpler foundation, and I desperately think that's what the industry needs.

But as it stands, on top of Helm/Kubernetes/Terraform/AWS/GCP/etc., there are so many dragons.

I wonder if this tool could be repurposed to leverage much simpler cloud concepts that inherently require less operational skills to maintain.
by o11c | 2025-04-22 22:37:49+00:00
This probably isn't relevant anymore, but for now-old (4.x I think) versions of GCC, there are a couple of caveats:

* Some versions can only change compiler options at top level, not within a function.

* I had problems with trying to push/ignore/pop a warning around an expression in a macro, since the entire thing expands at a single location.
by brk | 2025-04-22 22:39:06+00:00
Short summary is that this isn't going to work. I was involved with a company doing some development on whale detection AI. The vast majority of the time you just don't see enough of the animal to make reliable detections. And that is in a best case scenario, add in movement of the boat/camera, waves, sunlight reflections, and having to ignore a vast majority of potential things on/in the water that can look kind of like whales, but are not whales. Dolphins in particular.

This isn't a problem for AI/machine vision, IMO.
by kennywinker | 2025-04-22 22:39:07+00:00
“Rent-seeking is the act of growing one's existing wealth by manipulating the social or political environment without creating new wealth”

So, renting out a home. Just the manipulation of social and political environment has already been done. Rent sought, not rent seeking.

Rent as in rent paid to live in a home fits the definition of “economic rent” perfectly. Because housing rent is an example of economic rent. The cognitive dissonance i am pointing out is that seeking economic rent is bad, but using already created structures to obtain economic rent is… not bad somehow?
by mullingitover | 2025-04-22 22:39:21+00:00
Down 37.26% YTD. These earnings numbers didn't take anyone by surprise.

Hit from both ends: they're shutting down sales of their highest margin vehicles in China completely, and about to get tariffed to hell on their LFP battery packs from China for their high-volume domestic vehicles.

All this of course was made possible because the CEO knowingly demolished the brand's image, and neglected his responsibilities at the firm in order to campaign for the man who would start the trade war that's killing them now (not to mention spending hundreds of millions to buy his election).

HN doesn't have images, so you'll have to manually picture the guy in the hot dog suit saying "we're all looking for the guy who did this."
by samhclark | 2025-04-22 22:39:22+00:00
You mentioned a declarative package manager for Mac. I've really liked using Homebrew Bundle [1] over the last couple years. It's about the level of declarative that I've wanted and has made it really easy to bootstrap new laptop or VM (since it also works on Linux). The format for a Brewfile was pretty easy to figure out.

The way I ended up using it was that `brew install` would temporarily install something, without adding it to my Brewfile. And a little `brew add` wrapper would add the package to my Brewfile to keep it on the system permanently. That part with the wrapper could have used some love and would be a nice fit for a new brew-compatible frontend IMO. Maybe you could expand on that for Sapphire, if that also scratches your declarative itch?

[1] https://docs.brew.sh/Brew-Bundle-and-Brewfile
by conductr | 2025-04-22 22:40:09+00:00
This is a contrived situation. Most of the apps in discussion see little to no use and go dead soon after launch. The vast majority are collecting little data of negligible risk.

If a user is confident enough about a no name company that they give them enough info to make identity theft a possibility, it was only a matter of time before a spammer/phishing attack gets them anyway
by joh6nn | 2025-04-22 22:40:36+00:00
I'm just a community mod, not a dev on the project, so take this with a grain of salt:

I believe the intent is that you get bidirectional selective sync between your terminal and the docs, so that if what's in the docs is out of date or wrong, then whatever you did to actually fix things can be synced back to the docs to reduce the friction of keeping the docs updated.
by cantrecallmypwd | 2025-04-22 22:40:36+00:00
This isn't a HB replacement, it's just using HB binaries. It doesn't replace HB at all. HB and this aren't full package managers when they don't officially or technically support building from source or working independently of another project's infrastructure.

A decent full package manager would support a simple, shell-like DSL like say Alpine or Arch, concurrent and parallel phases (such as downloads/builds/installs), multiple versions, reproducible builds, building from source, build acceleration, security auditing, patch management, and package cryptographic signatures (not hashes or signing of hashes).

Nix is theoretically amazing but the barrier-to-entry and gotchas for popular use make it self-limiting. Simplicity in particular areas is a price that is often paid for popularity.
by consp | 2025-04-22 22:40:58+00:00
That is actually less of an issue as you might think, if the light is designed properly. As you will have to look at the corner before you ever shine the light directly towards it. This is not much different from motorcycles.

Since this is a vanmoof (first edition probably) I think they followed the design of "old fashioned" bikes which also lack the turnability features as the light is attached to the frame part of the central steering bar and not the insert which turns with the steering wheel.
by MisterTea | 2025-04-22 22:41:40+00:00
I have a friend with a 5 year old roof who had panels installed and now has leaks two years later. He checked the visible portion of the roof and could not find anything. He thinks it could be under the panels but can't see under them. A roofer told him the same. He's still trying to figure out what to do. Plus my story about my work place solar system being installed by a fly-by-night which damaged the roof causing leaks. YMMV.
by deedubaya | 2025-04-22 22:42:11+00:00
See https://github.com/huntresslabs/ttl_memoizeable for an alternative implementation.

For those who don’t understand why you might want something like this: if you’re doing high enough throughput where eventual consistency is effectively the same as atomic consistency and IO hurts (i.e. redis calls) you may want to cache in memory with something like this.

My implementation above was born out of the need to adjust global state on-the-fly in a system processing hundreds of thousands of requests per second.
by jauntywundrkind | 2025-04-22 22:42:46+00:00
Side note, there's been a bunch of reporting on this drive over a couple days reporting it as 1.6Gbps, not GBps, and I've been very surprised the industry would have such a non-upgrade.

The jump from mmc to NVMe is gonna be a nice benefit, but there are already a number of regular SD cards that can do 200MBps / 1600Gbps. Real head scratcher for me.
by roblh | 2025-04-22 22:44:28+00:00
To me, it seems like it's because the thing you're fixing is actually the "runbook" that's being run. Instead of separating the documentation from the code, they're married together so it's easier to keep them in sync because you aren't having to remind yourself to go edit this secondary location when you make a quick change.

I'm cautiously curious about something like this, although I haven't tried it personally.
by Aloisius | 2025-04-22 22:45:01+00:00
> SAFE McDonald’s coffee which doesn’t explode in one’s lap while trapped in a car & causing disfiguring third-degree burns requiring skin grafts

McDonald's coffee is no more safe today than it was in the 90s. The temperature is the same and the cups are largely the same. What's safer now is that most cars have cupholers, so people aren't holding their coffee cups between their legs to try and get the lid off in order to add cream.

They and other coffee vendors still get sued semi-regularly for burns though.
by consp | 2025-04-22 22:45:38+00:00
> I'd love if my expensive brick could get going again. It was my first lesson in "Don't trust a startup".

This does not even require an app. Simply lock down all hardware and make it economically unviable by charging 100+ euro for a 5 second "software update", which you need to do if you ever unplug the battery for > 10 seconds. See the thousands of Accell bikes (mostly Sparta branded) on dumps. You can get them going again but that's only for diehard hobbyists and requires custom hardware.
by johnjr | 2025-04-22 22:46:42+00:00
In software development, organizing our codebase in a way that is easy to maintain is always a good practice, and this idea is not new. Actually, I think this started in 1968 when the term software crisis was coined. Since then, we have developed many principles to help us achieve this goal. One person who has made many contributions to this field is Barbara Liskov. She is very famous for the Liskov Substitution Principle (LSP), but she also invented the Abstract Data Type(ADT), which is the core concept of classes and object-oriented programming. Here, I want to discuss composition compared to inheritance and how understanding the Liskov Substitution Principle can help you develop better software.
Show HN: An easy way to count your progress
by kirillzubovsky | 2025-04-22 22:47:03+00:00
I've been writing substantially more code in the last three months in many ways thanks to Cursor and all the AI help I could get. As such, I got curious to see just how much work I've been committing, and while relying on Github contributions view was my normal go-to way of doing it (1,338 contributions in the last year), I thought it would be fun to have a local way to count all progress.

Here's what I got for the last 90 days:

Total files changed: 3593 Total lines inserted: 292060 Total lines deleted: 72239

If you want to do the same, just copy this file (https://kirillzubovsky.com/count-lines) and save it locally. I find it fun to know how much I've been adding every day/week/month. Keeps me motivated.

Have an awesome day! Kirill
by atonse | 2025-04-22 22:47:03+00:00
Yes! A thousand times yes. Homebrew terminology makes absolutely zero sense whatsoever and I find it irritating when I encounter it every now and then (like when a package says tap something and then install it blah blah)

I wish they’d just call them binaries, macOS packages, packages, gui-packages, etc.

To be clear, all those words are also jargon but they’re reusable concepts across software.
by beloch | 2025-04-22 22:47:31+00:00
"I think I'll continue to spend a day or two per week on government matters for as long as the President would like me to do so and as long as it would be useful," he added.

-----------------

It's not the hours Musk (claims he) was putting in, but the actions of DOGE and what Musk says in public. DOGE isn't winding down and Musk is incapable of keeping silent. There is no relief for Tesla in sight until they remove him from the top job.
by jordanb | 2025-04-22 22:47:33+00:00
> they didn't have any in stock other than some crummy cardboard sticks version

Private Equity hates inventory. Their first trick in buying a retail business is slashing in-store inventory. They also treat suppliers like dogshit, playing games with payment terms, etc. End result: stores don't have the products customers want and quality suppliers fire them as customers.
by cogman10 | 2025-04-22 22:48:20+00:00
Mine is a bowl of old fashion oats, frozen mixed fruit (I like a blueberry/blackberry mix), and maybe some non-fat plain greek yogurt and/or a glass a of plain soy milk.

Alternatively, a couple of scrambled eggs with a piece of toast and a bananna is fairly healthy.

A fried egg on an English muffin also isn't a terrible way to start the day.

Target ~400 cals, Try and get some protein and fiber in there. Watch out for saturated fats and high sodium (see the DASH diet for tips). If you are diabetic or risk diabetes, check out the glycemic index and shoot for low GI foods.

That'd be my advice (I'm not a doctor, what I'm suggesting could be 1000% wrong.)
by rdlw | 2025-04-22 22:48:23+00:00
Well, the page starts with this in the introduction: "So here is a personal list of small ways in which my ordinary everyday daily life has been getting better since the late 1980s/early 1990s"

So on the contrary, it seems to me listing "countless improvements for Europeans" as an everyday life improvement would be an extreme overstatement of the American (?) author's empathy, or perhaps a performative indication that they think about the lives of others even when explicitly trying to focus on themself.
by thyristan | 2025-04-22 22:48:51+00:00
Natural numbers are "natural" natural numbers. That is, I would argue, that the Peano definition is the most simple, straightforward and obvious (not that I would have come up with Peano's axioms) and therefore "natural" way to define something like whole numbers. And interestingly it is the prototypical way to define an (countably) infinite set, which is the actual cause of the trouble. If you limit everything to finite sets of stuff, all the Goedel evilness goes away. But then, math would be boring. If you admit non-finite sets, you will have countably infinite sets, and those will always be isomorphic to natural numbers. I'd bet good money that if there was an alien civilization, there would be an alien named Peano.
by II2II | 2025-04-22 22:49:13+00:00
> This seems like a misleading question. Based on what we know about the Maya civilization, the Inca Empire, Ancient China, or Ancient Egypt, I would probably agree that ancient, advanced civilizations roughly similar to how we imagine Atlantis once existed,

There is also the question of what is meant by Atlantis. While I have certainly encountered versions of the story that the author was referring to, I read too many "mysteries" books as a kid and the myth pops up in contemporary fiction, I typically hear of the more plausible versions of the story that can be backed up by archaeological evidence. Granted, it can also be a complete fiction.
by consp | 2025-04-22 22:50:21+00:00
> Incandescent lights used substantial chunks of your pedaling power.

Not solely caused by the lights as they are about ~5W anyway (edit: the old one in my box of bike parts says 6V/3W on the metal). The wheel dynamo's are insanely inefficient and get hot everywhere which were the primary ones used with most incandecant lights.
by AStonesThrow | 2025-04-22 22:51:11+00:00
Okay, the story that is significantly and suspiciously buried: Mark Longo, P'Nut's owner, is an OnlyFans porn star, and has a huge base of gay followers and supporters. That is, gay people who love Longo's body. OnlyFans is his primary occupation. Longo was basically using this squirrel and the raccoon, and other animals, to promote his "personality" and ultimately drive traffic to his OnlyFans, where revenue is generated. P'Nut's name was apparently chosen for its provocative sound and the way it could be used endlessly as a euphemism for the male physique. Longo and his partners were not rescuing animals because they love animals, but because they love money and fame, and the so-called "animal sanctuary" was always, always unlicensed and illegal.

https://www.pride.com/politics/peanut-the-squirrel

You will find that 99% of OnlyFans "personalities" have "normal" social media presence, whether straight, gay, or trans, and it's all a funnel to show their "linktr.ee links" in their profile, and ultimately drive people's traffic to where the money goes in the money-hole.
by jdspiral | 2025-04-22 22:55:09+00:00
I built a tool called Meaning Machine to let you see how language models "read" your words.

It walks through the core stages — tokenization, POS tagging, dependency parsing, embeddings — and visualizes how meaning gets fragmented and simulated along the way.

Built with Streamlit, spaCy, BERT, and Plotly. It’s fast, interactive, and aimed at anyone curious about how LLMs turn your sentence into structured data.

Would love thoughts and feedback from the HN crowd — especially devs, linguists, or anyone working with or thinking about NLP systems.

GitHub: https://github.com/jdspiral/meaning-machine Live Demo: https://meaning-machine.streamlit.app
by hansvm | 2025-04-22 22:56:53+00:00
There's a tendency sometimes to leave certain words implicit. "It does not [even] take 21 days to form a habit." Some of those linguistic habits never leave their birthplace, giving you colloquialisms like "do you want to come with [us]" in the Midwest. Most don't have any regional association though, and sentences with dropped fragments sound perfectly normal, with your mind filling in the gaps.

In this case, the sentence is correct (though ambiguous) as written, but it has the same words you often see from a longer phrase with an omitted word implied through tone and other vocal cues, a pattern used commonly enough that I'd wager most people interpret it the same as you.
by 1123581321 | 2025-04-22 22:57:14+00:00
Words are fun, especially etymology! And students do respond well to enthusiasm for them, or at least appreciate it later. Thank you for that. My wife also teaches English and a foreign language so that’s a part of our life.

That said, how could you have read this and not understood the context for the definition used?! “The phrase “reflexive AI usage” is what triggered my strongest reaction. “Reflexive” suggests unthinking, automatic reliance.”

I thought it was fine to object that you liked the primary definition the most and had the strongest association with it.
by 0_____0 | 2025-04-22 22:57:33+00:00
hub dynamos are not particularly efficient. it's very difficult to make an electric machine that is efficient at the (very low speeds, relatively) that a bike wheel turns at. 60% sounds about right. However, safety lights use much less than 5W, and a modest but very useable headlight about 3W, so your figures are otherwise pretty close.
by southernplaces7 | 2025-04-22 22:57:45+00:00
That companies would follow such absolute shit practices to the people who trusted them with their money for actual physical products is grotesque. It should even be treated as a type of fraud, downright. Fuck these "smart device" manufacturers that can't seem to help themselves against fucking the thing you bought right over with bullshit fashionable tech trends that barely work.

That they do all this for the sake of extracting every possible penny out of you through data via forced app interaction only makes it more disgusting and parasitic. It used to b e that purely digital social media/ad-type companies mostly did this, now the very visible nonsense fashion is to cram as much extractive app-based shit into every possible physical product under the sun.

I can't wait to see a mass consumer revolt against such garbage, putting these companies sales firmly down the toilet. To those of you who fund, found or promote such things in your ventures and pitches, simply: Fuck. You..
by almosthere | 2025-04-22 22:57:48+00:00
They do. Most crime is prevented when a) there is a penalty, b) the penalty is applied 100% of the time.

When these two things exist, crime removes itself! This is the exact concept the left seems to have forgotten... until recently. (recently I mentioned this in Hacker News and suddenly leftists got mad and made references to SF removing Boudin - as if the right was responsible for getting him elected in the first place.)

You get credit for changing, but not for enabling in the first place.