MurphyA/hacker-news huggingface dataset:
by MzHN | 2025-10-23 11:38:51+00:00
> Carriage returns in bash scripts are cursed

Also the full story here seemed to be

1. Person installs git on Windows with autocrlf enabled, automatically converting all LF to CRLF (very cursed in itself in my opinion).

2. Does their thing with git on the Windows' side (clone, checkout, whatever).

3. Then runs the checked out (and now broken due to autocrlf) code on Linux instead of Windows via WSL.

The biggest footgun here is autocrlf but I don't see how this is whole situation is the problem of any Linux tooling.
by arielzj | 2025-10-23 11:39:00+00:00
As a neuroscientist, I became fascinated by the supposed phenomenon of 'terminal lucidity', where people with severe dementia suddenly become lucid again shortly before death. It sounds impossible given how catastrophically damaged their brains are, but it keeps being reported across cultures and centuries. If it's real, it could suggest new treatment methods for Alzheimer's (not just another ineffective amyloid-clearing antibody), yet it's shockingly understudied.
by buran77 | 2025-10-23 11:39:24+00:00
> should easily be handled by regular market forces

I think we've heard this blurb so many times it should be a joke to be ridiculed by now. It usually prefaces a story about some abusive, exploitative action.

> But at that point you're breaking the speed limit either way, so I'm still not convinced a peak power limit is reasonable.

That's why I said that enforcement at rider level is impossible. The burden to check if someone removed some governor is so high that it might as well not be regulated in any way. Or you heavily strengthen and give an even broader mandate to LEO, and I hear that's what everyone wants more of these days.

So the easy way around this is to regulate the manufacturing or sales. You limit the power of the motor, you implicitly limit how fast the bike can realistically go, and how much weight it can carry at speed. This makes things a little bit safer. If you need more, choose a different vehicle. You don't buy a Fiesta and then shout in the wind that it's not allowed to have 18 wheels and carry 35t.

> That nobody is enforcing the speed limit on bike lanes is an enforcement issue, and it doesn't get solved by having unnecessarily tangential laws

I get that you really want something but this isn't an argument. The laws aren't "tangential" they are very much on point, trying to keep a balance between usability and safety faced with practical reality. Not the wishy-washy "the market will handle it" or "I should get it because I want it and anyone stopping me is stupid". The law allows every kind of vehicle for every need, under the appropriate conditions. You just think your conditions for your needs come first. Some people ride like that so the "tangential laws" exist to protect others from them.
by bayindirh | 2025-10-23 11:41:06+00:00
They claim that they're developing routers since 1995 and they're used widely in domestic Japan (SME and SOHO).

Looks like switches came in 2011 and there's some secret sauce which makes them autoconfigure each-other to reduce networking setup.

It might not be a standard OEM stuff.

Citing the page:

> Yamaha entered the router business in 1995, and has grown to hold a significant share of Japan’s small to medium enterprise and SOHO network market. Yamaha gigabit L2 switches that could be linked to Yamaha routers/firewalls were introduced in 2011, with features that significantly reduced the network setup, maintenance, and management workload.
by mlrtime | 2025-10-23 11:42:32+00:00
I'm stealing the top comment here because you probably know what I'm asking.

I've always wanted a linux directory hook that runs some action. Say I have a scripts dir filled with 10 different shells scripts. I could easily have a readme or something to remember what they all do.

What I want is some hook in a dir that every time I cd into that dir it runs the hook. Most of the time it would be a simple 'cat usage.txt' but sometimes it maybe 'source .venv/bin/activate'.

I know I can alias the the cd and the hook together but I don't want that.
by onli | 2025-10-23 11:43:11+00:00
My bike vendor likes chains. They wear more easily, but are easy enough to maintain and change. Basically everything old school bike like has maintenance/repair advantages.

I'm not sure I agree, but more when compared with belt drive and internally geared hub. But then again, I believe him that those are hard to repair when they fail (even if they are sturdy until then).
by James_K | 2025-10-23 11:43:39+00:00
The second code snippet doesn't use SSA. It just translates the first loop into IR and mangles the variable names. Here is an SSA version of that in the Scheme language.

(let loop ((c c)) (if (< c 10) (loop (* c 3)) c))

Notice that this is stateless and also returns the final value of “c” from the loop. People who use the below style have tended to find that it is much easier to reason about for more complicated looping structures.
by CaptainOfCoit | 2025-10-23 11:45:09+00:00
> refrigerated shelf in the supermarket

Wow, today I learned that in some countries, the supermarkets keep their eggs in the refrigerator! Apparently there is a protective coat on eggs that sometimes gets washed away, and when it is, you need to store the egg in a cold environment otherwise bacteria gets in. In other places, eggs aren't washed (that much at least) so the protective coat is still there, so we store our eggs on normal room temperature shelves.
by jnmandal | 2025-10-23 11:46:12+00:00
As someone who keeps backyard chickens and recently got a new flock, I will say anecdotally this spike was observed even in livestock.

In March 2025, I tried to order baby chicks to replace some of my aging flock. Not only was every hatchery sold out, but going in person to farm stores meant waiting in lines on the days shipments were received and dealing with rationing (3 chicks per person, etc).

I opted to order chicks for the fall instead of doing a normal spring brooding and luckily the weather cooperated, but as is normal I ordered some extra chicks as padding. The extras I have now been able to sell locally at a premium, covering my entire cost.

Let me just add I don't think backyard eggs are cheaper, even at the height of price spike, because when externalities like feed and enclosure are calculated the resulting product won't have the economies of scale. But I think many people decided they wanted a steady supply after eggs became hard to come by. I personally keep chickens for reasons besides eggs but I am still happy that more folks are keeping chickens.
by lproven | 2025-10-23 11:46:38+00:00
Ruins the pun, though. ;-)

Saw a splendid thread last week on how thousands of Americans didn't realise "Shaun the Sheep" is a pun. Shorn / Shaun, but apparently, only in UK English.

Bhyve == bee hive == lots of individual cells, the occupants all cooperating and working together...?
by dijit | 2025-10-23 11:46:57+00:00
I'm not here to spark a debate or anything. just wanted to share a quick note on etymology since you mentioned "sexism", and I'll bow out after this. You do you!

Historically, "man" comes from Old English "mann," which originally meant "human being" or "person" in a gender-neutral way, without specifying male or female. Back then, the word for a male human was actually "wer" (like in "werewolf"), and for female, it was "wif" (as in "wife"). Over time, "man" shifted to primarily mean "male," but terms like "mankind" hung onto that older, inclusive sense.

So, using "man" in the "mankind" context isn't really a misuse or inherently sexist: it's tapping into the word's original roots. That said, I get why folks prefer "male" and "female" for clarity today. Peace!
by kergonath | 2025-10-23 11:47:26+00:00
It’s a blunt tool, but quite useful for posts. I read most dead posts I come across and I don’t think I ever saw one that was not obviously in violation of several guidelines.

OTOH I don’t like flagging stories because good ones get buried regularly. But then HN is not a great place for peaceful, nuanced discussion and these threads often descend into mindless flame wars, which would bury the stories even without flagging.

So, meh. I think flagging is a moderately good thing overall but it really lacks in subtlety.
by baq | 2025-10-23 11:47:40+00:00
jj wouldn't have any issues with supporting this workflow, if you could replace magit's git commands with some jj ones it'd probably just work. IOW the only thing that's missing is elbow grease.

actually, with jj's seamless rebases, it'd work exactly as you'd want it to (but maybe not how you'd expect if you're used to the git way) when aimed at a commit in the middle of a branch: pick lines which stay below, above or in the middle commit, which you can edit transparently.
by JonChesterfield | 2025-10-23 11:47:46+00:00
That "tail recursion" is a thing in it's own right is more a sign of people getting their implementation wrong than anything else.

Specifically, if calling a function at the end of your current function _doesn't_ clean up the call stack first, what you've got is a space leak. That C's ABI on various architectures gives you this behaviour is a bad thing. The space leak sucks there too. You get functions with a tailcall: label at the top and `goto tailcall;` written in the body as a workaround when functional programmers collide with this.

Related is RAII in C++ - implicitly calling things on leaving scope mostly means the function call in the "tail" position has to do more stuff after it returns, so it isn't in the tail position, and you burn memory on keeping track of the work still to do. This takes the initial mistake from C and really leans into it.

If your language doesn't make that implementation mistake, you just have function calls that work fine. Tree style recursion is still a problem, but it's an out of memory one and at least only one side of the tree is eating memory, and in proportion to the book keeping needed to find the other side of the tree.

In the olden days, _function calls_ in Fortran didn't work, because they put their local state in global memory, not on a stack. So if foo called bar called foo, broken. We don't tolerate that any more, everyone has a call stack. But we still tolerate "ah, let's just leak this stack frame for a while, we've always done it like that" at present.
by plqbfbv | 2025-10-23 11:48:22+00:00
What does particularly relevant mean?

[lets set aside the CT, agree)

They lost a lot of the advantage they had on hardware, but if you want a non-chinese EV with really good software and well-thought and working UX they're still a perfectly valid all-rounder with a very good charging network, and they also refine their hardware over time.

They refreshed the M3 and MY looks recently and changed the shapes a bit, but I always understood their looks to be function over form for efficiency reasons, and they don't look bad at all if you ask me. Simple, effective, efficient and timeless designs.

I agree with the other comments here that changing shapes for the sake of changing shapes it's just marketing.

EDIT: to be honest, the only thing that really annoys me is they didn't release an EU A/B/C segment ~4m car with all the features of a standard Model 3/Y. Instead they took the existing models and made them cheaper.
by aleph_minus_one | 2025-10-23 11:48:40+00:00
> Someone that could whiteboard correct programs written in SKI is someone I'd be delighted to hire. Likewise someone that can write correct forth by hand.

This is potentially true.

Nevertheless don't confuse "the kind of person who has very nerdy interests, thus I would like to sit near to him in the office" with "candidate who will likely be the best one to do the work that has to be done in the best possible way". While I do agree that cognitive capabilities are one factor that often correlates well with the subclause "in the best possible way", there exist other factors, too. I don't claim that you mingled these two very different personal profiles, but in my opinion quite some programmers with nerdy interests do.

But if you work in an environment where being able to whiteboard correct programs written in SKI or being able to write correct Forth by hand is indeed (plausibly) highly correlated with "likely [to] be the best one to do the work that has to be done in the best possible way" I congratulate you on having a work environment that in my opinion very few programmers can relish.
by lproven | 2025-10-23 11:48:50+00:00
> Arch Linux is the closest I've seen to BSD in the Linux-verse.

It really isn't. The BSDs are smaller and cleaner, especially OpenBSD, which is positively minimal. Arch is huge.

The closest Linux to OpenBSD is probably Alpine, of all those I've seen. Takes as much disk as most modern distros take RAM, and because of no glibc and no systemd, a tonne of familiar Linux tools aren't available or don't work... just the old fashioned Unixy stuff... which is very much how running a BSD feels.
by eadmund | 2025-10-23 11:49:02+00:00
I recommend direnv for that: https://direnv.net/

Its intended use case is loading environment variables (you could use this to load your virtualenv), but it works by sourcing a script — and that script can be ‘cat usage.txt.’

Great tool.

If you use Emacs (and you should!), there’s a direnv mode. Emacs also has its own way to set configuration items within a directory (directory-local variables), and is smart enough to support two files, so that there can be one file checked into source control for all members of a project and another ignored for one’s personal config.
by fluoridation | 2025-10-23 11:49:12+00:00
>Not quite. [...] He has both natures, fully.

You're contradicting yourself.

>analogous to "experiencing censure as a judge, but still being able to practice medicine"

That's only possible because, as I said, being a judge is not the totality of a person. If you strip a judge of his title the parts of him that are a person still remain. If you strip a person of their humanity then there's nothing left, because there's nothing of a person that's not human.

A normal person according to Christianity is closer to having two natures in the way you describe, because their body is mortal while their soul isn't. But Jesus' body should be equally as divine as his soul. So then how can it die? If he was just an immortal soul in a mortal body then he was just a regular human.
by jitl | 2025-10-23 11:50:12+00:00
You can make your tagged template literal return an array of tokens, so the developer gets to write naturally and no one has to deal with parsing. Just use the json stringified token array as the key in your translation map.

Here's how the tagged template literal maps to tokens:

t`Where is the ${t.thing()}` -> ["Where is the ", ["thing"]] // ["variable name"]

Example rendering a translated string directly:

t`Where is the ${t.thing(user_data)}?`.toString()

Its internet forum so I made it as short as possible over all other style factors. Untested - just trying to express the idea.

/** @typedef {[name: string, value?: unknown]} Variable */ /** @typedef {string | Variable} Token */ isVariable = Array.isArray bind = (token, values) => isVariable(token) ? [token[0], values[token[0]]] : token unbind = (token, values) => { if (isVariable(token) && token.length > 1) { if (values) { values[token[0]] = token[1] } return [token[0]] } return token } render = token => (isVariable(token) ? token[1] : token) /** * Render a translated string: * ``` * t`Some kind of ${t.thing(user_data)}`.toString() * ``` */ t = (literals, ...args) => { // template = ["some kind of ", ""] // args = [t.thing] // zip -> ["some kind of ", t.thing, ""] const tokens = literals.flatMap((literal, i) => i === 0 ? literal : [args[i - 1], literal], ) return methods(tokens) } methods = tokens => Object.assign(tokens, { bound: values => methods(this.map(token => bind(token, values))), unbound: values => methods(this.map(token => unbind(token, values))), toKey: values => JSON.stringify(this.unbound(values)), toString: () => { const values = Object.create(null) const translated = TRANSLATION_TABLE[this.toKey(values)] const resolved = translated ? translated.map(token => bind(token, values)) : tokens return resolved.map(render).join("") }, }) // Proxy so t.anyKey returns the variable constructor t = new Proxy(t, { get: (target, name) => Reflect.get(target, prop) ?? ((...args) => [name, ...args]), }) // Example: const TRANSLATION_TABLE = { // This can be JSON.stringify round tripped fine [t`Some kind of ${t.thing()}`.toKey()]: t`${t.thing()} はどこですか`, } function handleEvent(event) { alert(t`Some kind of ${t.thing(event.thing)}`) } const prepared = t`Avoids ${t.repeated()} JSON.stringify lookups` function calledInLoop() { console.log(prepared.bound({ repeated: "lots" }).toString()) }
by reactordev | 2025-10-23 11:50:21+00:00
You just contradicted yourself, read that again.

“How long the sound lingers” It’s definitely time…

The envelope is a level but the knob’s use is time. “How long that the sound lingers before release”.

Some synths may have this as a pedal or a key you can hold but the purpose is definitely to lengthen the tone prior to release which is always time.
by raw_anon_1111 | 2025-10-23 11:50:53+00:00
I recently re-read parts of this book thst I haven’t read in years.

https://github.com/97-things/97-things-every-programmer-shou...

I think it originally came out in 2013. If I were just introduced to it today, I would think some of the articles were AI written with only slight prompting.

It’s sad that if I write something from scratch, without any writing assistance besides spell checking, mostly for internal company consumption I now review it to see if it smells like AI.

(Just like I would have used a dash above. But I don’t anymore because it has an AI smell and I had to get out of the habit)
by lherron | 2025-10-23 11:51:09+00:00
Building an interactive shell inside their CLI seems like a very odd technical solution. I can’t think of any use case where the same context gathering couldn’t be gleaned by examining the file/system state after the session ended, but maybe I’m missing something.

On the other hand, now that I’ve read this, I can see how having some hooks between the code agent CLIs and ghostty/etc could be extremely powerful.
by screenoridesagb | 2025-10-23 11:52:02+00:00
Eggs and milk used to be staples people “needed” they were just few alternatives in the food market. Now they are basically luxury goods with staples being things like chicken nuggets and colas.

I’m not saying it’s good or bad either way, but if the price of eggs were increased 1000% it wouldn’t effect people’s quality of life as much as a 1% increase in the cost of education or healthcare.
by hunglee2 | 2025-10-23 11:53:03+00:00
Very interesting to see US Gov start taking equity stakes into strategically important companies. At some point, we will have to describe these are 'State Own Enterprises or SOE's, not uncommon in other countries. The question is how does the US support the sector, rather than 'pick the winners' - unclear whether US Gov is clear on this, maybe it is matter of feeling your forward, 'crossing the river by feeling for the rocks underneath your feet', as it were
by Flamingoat | 2025-10-23 11:53:04+00:00
> Super happy for you, you found your OS and that's fine,

That isn't what I said. I said that Linux is easier than BSD for a desktop and there is no real reason why that should be the case. That is an objective fact.

I would rather use neither of these systems, but the alternatives are worse. At the moment Linux is the least worst option if you want a Desktop OS.

> but also super proud of myself that i can setup X on every FreeBSD machine so nonchalant ;)

As I said it isn't just X.

The point that you don't want to engage with (bit childish tbh), is that a lot of this should completely unnecessary. There really should need to be a fork of the OS for having a desktop configuration that works reasonably well out of the box.

That is failure of both the OS and the community, which judging by your username you seem to be a member.
by rob | 2025-10-23 11:53:12+00:00
No it isn't. A dozen can fly by for a single person or a small family. You'll probably need at least two dozen a week. Hell, a lot of recipes ask for 2-3. So now you're looking at almost $50 a month just for eggs (2dozen/week @6.20.)

That might be easy for you when you're working at Microsoft and making $500,000 a year, but that's a significant amount of money for a lot of people in the United States. And eggs aren't some fancy item. They're eggs.

"It's one banana, Michael. What could it cost?"
by dangus | 2025-10-23 11:53:21+00:00
Look, I wasn’t even getting into proprietary or not. Obviously generic DIN was better than the present automotive industry situation.

You made a claim that you can’t upgrade these systems without $1000 of gear and I proved that idea wrong with a single link. It doesn’t really matter that it’s Android 12 - nobody really cares because all it has to do is run CarPlay and Android Auto. As long as the system can do that it’s infinitely upgradable from a software perspective. Nobody’s actually using the base Android system.

I also have a friend that spent under $500 to add CarPlay to a Chevy Sonic with a similar system and they’re very happy with it.

And that’s why I want a car to have CarPlay and Android auto, because it negates any need to upgrade the system down the line. The upgrades happen on your phone.

Imagine if you could install your own accessories in it…like the one I linked? I mean, again, I get it, it’s not a simple DIN setup but for the 1% of people who are interested in upgrading their car system this this is a real product you can buy for basically any car model. I owned an Alpine head unit for my 2005 Volkswagen and I wouldn’t really describe it as not janky compared to the OEM head unit, but the thing had Bluetooth and that’s all I needed.
by vladms | 2025-10-23 11:53:34+00:00
States are made of people both at decision and at street level. Many anti-trust laws were made when the decision people that were not very tied with the actual interests - nowadays this seem to change. At no point I think people at street level ever understood the actual implications.

A structural solution is to educate and lift the whole population to better understand the implications of their choices.

A tactic solution is to try to limit the collusion of decision people and private entities, but this does not seem to go extremely well.

An "evolutionary" solution (that just happens) used to be to have a war - that would push a lot of people to look for efficiency rather than for some interests. But this is made more complex by nukes.