MurphyA/hacker-news huggingface dataset:
by mrkeen | 2025-04-11 12:00:47+00:00
Think of it like other features:

* Encapsulation? What's the point of having it if's perfectly sealed off from the world? Just dead-code eliminate it.

* Private? It's not really private if I can Get() to it. I want access to that variable, so why hide it from myself? Private adds nothing because I can just choose not to use that variable.

* Const? A constant variable is an oxymoron. All the programs I write change variables. If I want a variable to remain the same, I just wont update it.

Of course I don't believe in any of the framings above, but it's how arguments against FP typically sound.

Anyway, the above features are small potatoes compared to the big hammer that is functional purity: you (and the compiler) will know and agree upon whether the same input will yield the same output.

Where am I using it right now?

I'm doing some record linkage - matching old transactions with new transactions, where some details may have shifted. I say "shifted", but what really happened was that upstream decided to mutate its data in-place. If they'd had an FPer on the team, they would not have mutated shared state, and I wouldn't even need to do this work. But I digress.

Now I'm trying out Dijkstra's algorithm, to most efficiently match pairs of transactions. It's a search algorithm, which tries out different alternatives, so it can never mutate things in-place - mutating inside one alternative will silently break another alternative. I'm in C#, and was pleasantly surprised that ImmutableList etc actually exist. But I wish I didn't have to be so vigilant. I really miss Haskell doing that part of my carefulness for me.
by wruza | 2025-04-11 12:01:23+00:00
Same. I disabled calls from non-contacts, and then my phone stays in silent mode all day, unless I expect calls, like friends coordinating a meeting etc.

I also mostly keep it away, either in my pocket or on a shelf. Or wherever I left it. There's no hard rule, I just don't care.

All on-screen notifications are blocked except for messengers (not that I had notification spamming apps in the first place).

This created a unique setting where I'm all my own. It's not an immediate value, it builds up in months.
by Xmd5a | 2025-04-11 12:02:44+00:00
The boundary between the program and the rest of the system allows I/O of course. What FP does is "virtualize" I/O by representing it as data (thus it can be passed around). Then at some point these changes get "committed" to the outside. Representing I/O separately from how it is carried out allows a lot of things to be done, such as cancelling (ctrl+z) operations.
by alisonatwork | 2025-04-11 12:03:18+00:00
Didn't you ever grep a text document written in a language other than English? No processing of CSV files in different charsets? Not even encountered a file with a non-English character in the name? Not to mention the folks who deliberately set LANG so that their compiler and everything else will give them localized error messages. This stuff was all much worse 25 years ago, even 15 years ago. Like them or not, I do think emojis have helped drive forward much better Unicode handling across the whole stack, including the command line.
by edwcross | 2025-04-11 12:04:31+00:00
I'm in Europe and I see no way to get such tests. Other than lying and saying that you are at risk of contamination ("My hobby was glassworking"), I never saw any kind of test that you could pay yourself. Everywhere the government says "100% reimbursed", but you cannot even order one by yourself unless you have a good reason.

So, I don't even know if it's expensive or not.
by walterbell | 2025-04-11 12:04:45+00:00
"A Comprehensive Review of Acoustic Levitation Techniques and Applications" (2025), https://www.researchgate.net/publication/390161963_A_Compreh...

DIY "TinyLev: A multi-emitter single-axis acoustic levitator" (2017), https://brucedrinkwater.com/portfolio/tinylev-a-multi-emitte...
by DeathArrow | 2025-04-11 12:06:04+00:00
>I'm in C#, and was pleasantly surprised that ImmutableList etc actually exist.

C# has introduced many functional concepts. Records, pattern matching, lambda functions, LINQ.

The only thing I am missing and will come later is discriminated unions.

Of course, F# is more fited for the job if you want a mostly functional workflow.
by croes | 2025-04-11 12:06:15+00:00
A journalist posted a altered photo not a meme.

The photo is based on a real photo of her holding a paper with „we remember“ written on it.

Sorry by article I meant the tweet. A journalist should mention if his posts are facts, an opinion or a satire especially when he knows his audience.

Those satires have lead to insults and death threats in the past and people like him know that.

As a journalist he has to be held to a higher standard when it comes to public posts. Newspapers already have a trust problem
by dgimla20 | 2025-04-11 12:06:23+00:00
See Catching Features (first released around 2006) for the orienteering version of this. It still has weekly competitions with up to 100 or so regulars playing.

As another commenter suggested, orienteering is great as a sport/running variation of this. Orienteers are some of the brightest and fittest people I know.
by candiddevmike | 2025-04-11 12:06:46+00:00
The problem with immutable images is you need a complimentary config management tool to manage them at scale. That's why we built Etcha[0] (config management for 1000+ devices) and then built an immutable OS (EtchaOS) around it--they're meant to work together instead of "cloud-init is good enough". cloud-init is terrible at scale, especially outside of public cloud.

0 - https://etcha.dev
by wutwutwat | 2025-04-11 12:07:27+00:00
1. not all browsers are the same

they are all aiming to implement the same html spec

2. there is no official standard

there literally is

> A context is considered secure when it meets certain minimum standards of authentication and confidentiality defined in the Secure Contexts specification

https://w3c.github.io/webappsec-secure-contexts/

3. even if there was, standards are often ignored

major browsers wouldn't be major browsers if this was the case

4. what is true today can be false tomorrow

standards take a long time to become standard and an even longer time to be phased out. this wouldn't sneak up on anyone

5. this is mitigation, not security

this is a spec that provides a feature called "secure context". this is a security feature. it's in the name. it's in the spec.
by rhelz | 2025-04-11 12:09:06+00:00
What you are missing in your analysis is that New Yorkers don’t just let stuff like this happen for weeks and weeks. We social distanced, we wore our masks, and the ambulances stopped coming. It’s not like ambulances came every day for a year and a half—no we fixed the problem and stood slack-jawed while the rest fo the country just let people keep dying.
by numpad0 | 2025-04-11 12:09:38+00:00
If HE wants to post THAT kind of content, it's FINE. He can do so. ELSEWHERE. NO ONE STOPS you doing so. In fact WHY NOT YOU DO SO NOW THANK YOU.

Don't see the absurdity of that? The non-exaggerated version of this was thrown at someone running a sunrise notification bot. His bot posts that the Sun rises tomorrow on Earth. At specific local times. As it tends to.

"Mastodon is weakly federated, you can move to wherever you are better aligned" narrative is mere justification, if not mental traumatic response, against EU national counter-terrorism police special forces and Apple App Store imposing anime and Trump purge(note: AIUI, EU for anime, Apple for Trump, not the other way around, lol), leading to the once-united Fediverse becoming couples of severed virtual continents, all on terminal care.

That narrative just creates peace of mind for the European operator inner circles that it was the right call and it shall shield themselves from police flashbangs thrown at their face to harm them and their family members. But it just don't hold water as something logical.
by cbm-vic-20 | 2025-04-11 12:10:01+00:00
So that's all part of the "source code" for projects like this.

It's amusing that on one hand, there's been a push for "reproduceable builds", where we try to make sure that for some set of input (source code files, configuration, libraries), that we can get an identical output. On the other hand, we have what we see here where, without a huge amount of external context, no two "builds" will ever be identical.
by pwatsonwailes | 2025-04-11 12:10:30+00:00
Welcome to what happens when everyone optimises for the same metrics, and looks at the same companies for inspiration as to what to do.

At most of these corporations, over time they've learned to be product and financially oriented, because it's what the markets reward and it's easy to do, rather than customer orientated, because as long as they're not unusably shit for the majority of their customers, then that's good enough.

It's an attempt to reverse backwards to the worst possible thing that works, because that gets you more ad revenue, rather than the best possible thing.

I say this as someone who's walked away from strategy consult gigs for multinationals where the objective was literally to do things like this. Revenue and margin maximisation in ways the stock market and PE/VC investment rewards is frequently orthogonal to building the best thing for the customer.
by dijit | 2025-04-11 12:11:44+00:00
We at darkscience used buildroot for a simple ZNC SBC[0] distribution which we deployed to an Orange Pi Zero that we sold at 33C3[1].

It was great! I highly recommend!

It didn't take long to get started and while the compile times were pretty large (wonder if NIX or Bazel could help here?) it ended up with absolutely microscopic resource requirements.

[0]: https://git.drk.sc/Derecho/irc-sbc-buildroot

[1]: https://media.ccc.de/c/33c3
by mcphage | 2025-04-11 12:12:00+00:00
> Imagine what a few Black Mirror episodes would look like if they were made in the 50s or 60s about some technology we have today. It’d be silly.

It might be silly, but that doesn’t mean it would be wrong. We depend heavily on a number of technologies with significant downsides, which are downplayed or ignored or can-kicked into the future.
Show HN: I built a Nokia simulator app for your smartphone
by khangnd | 2025-04-11 12:12:51+00:00
Hello HN,

I just launched Brick 1100, a mobile app that simulates the Nokia 1100, so that you can experience this iconic brick phone with your smartphone.

It's a simple side project but I really had a great time building it.

Happy to hear your thoughts and questions, or share more details if anyone's curious about its implementation and building process.
by zoky | 2025-04-11 12:13:09+00:00
I’m not really familiar with Lisp, but from glancing at this article it seems like all of these are really good arguments for programming in Ruby (my language of choice). Easily predictable syntax, simple substitution between variables and method calls, dynamic typing that provides ad hoc polymorphism… these are all prominent features of Ruby that are much clunkier in Python, JavaScript, or really any other commonly used language that I can think of.

Lisp is on my list of languages to learn someday, but I’ve already tried to pick up Haskell, and while I did enjoy it and have nothing but respect for the language, I ultimately abandoned it because it was just too time-consuming for me to use on a day-to-day basis. Although I definitely got something out of learning to program in a purely functional language, and in fact feel like learning Haskell made me a much better Ruby programmer.
by re-thc | 2025-04-11 12:13:27+00:00
> How do tariffs affect finished graphics cards assembled in China?

It's largely complicated.

What is assembled in China? A graphics card (or anything) is made up of many smaller parts. Some of it might have US-based parts, made up of non-US based parts. Tariffs happen on import (when someone buys something). So for each part this would need to be paid too.

That aside, if you ask me, the cheapest way is to get rid of US jobs. Remove the US parts so you have a 100% non-US product. 0% tariff so far. For US-only sales have it assembled shipped to a country like Singapore or Australia with 10% tariffs to package and re-label. When you ship from say Singapore to US, the buyer fills in the tariff code with country of origin Singapore. Case closed. 10% tariffs.

i.e. are you sure US wins?

What's next? Inspect every import to verify its country of origin? It'd clog up the ports.

Since Trump's 1st tariff on China, 100s of billions have been imported without tariffs. It's happening and continues to happen.
by spwa4 | 2025-04-11 12:14:42+00:00
Actually if you could make something like github, where all software would be part of a single megarepo and built constantly that would be incredibly useful, and bazel would be excellent for that (or at least the closest thing we have to reasonable)

The problem with bazel and almost every other build system (all except the "scan the source files and build a dependency graph" ones) is that you'll be writing build instructions for all your dependencies that aren't using it. If that was done for you, they'd be incredible.
by timschmidt | 2025-04-11 12:15:24+00:00
Like I said man, whatever helps you sleep at night. Even if it's a straw man like an unreferenced assertion about unnamed people in the 18th century.

p.s. which part is the clockwork? the ticker tape with the encoded data, or the part that reads it? whole thing?: https://www.youtube.com/watch?v=TfYf_rPWUdY

edit: Probably none of those since rhibosomes were discovered in the 1950s it seems.
by abenga | 2025-04-11 12:16:25+00:00
Those aspects are mostly irrelevant if half of people who are born die before they enjoy them.

More time in nature => this is neutral, not necessarily a positive, depends if you like that.

Less technology => definitely a negative, I know when I'd rather have been born if this is the only change.

Less pollution => Depending on the cutoff, most people today suffer less pollution than then. I'd rather the current global levels of pollution than actually cooking with coal/wood in my kitchen. The latter will probably kill you faster.
by nobodyandproud | 2025-04-11 12:16:45+00:00
Not a problem.

Bottle and can recycling programs in the US were very successful in states that implemented them.

In NYC all refundable glass bottles and aluminum cans thrown away by those that couldn’t be bothered: They would be picked up by homeless (etc), providing a market-driven solution.

I never understood why it wasn’t expanded to more containers, like cans of beans.

The big problem then was that state-level only made recycling inconsistent.

The big problem today is that plastic bottles took over because of their lightweight; meaning only a government policy could discourage plastic food containers.
by arghwhat | 2025-04-11 12:16:56+00:00
logind does not "manage devices", it just provides an API for your display server to open privileged I/O devices and get a file descriptor, and have these file descriptors revoked later.

The difference with a plain `open` is that logind will allow only one process at a time to have access, and only for sessions that logged in physically (tracked using PAM), and does not require the process to have direct file access (which could enable key-logging). It will also revoke the file descriptors when switching sessions.

logind's other random features like dock and power button triggers can be done whenever logind is running and ready - the underlying API reports levels and are not timing critical.

The only thing logind really uses at runtime from systemd is temporary storage of file descriptors that it can get back after restart for graceful upgrades.

Projects like elogind and eudev exists that painstakingly strip out the systemd portions while retaining the functionality, but it's an uphill battle to constantly redo every time there's a change.
by mrkeen | 2025-04-11 12:17:22+00:00
I don't want functional-flavoured programming, I want functional programming.

Back when I was more into pushing Haskell on my team (10+ years ago), I pitched the idea something like:

You get: the knowledge that your function's output will only depend on its input. You pay: you gotta stop using those for-loops and [i]ndexes, and start using maps, folds, filters etc.

Those higher-order functions are a tough sell for programmers who only ever want to do things the way they've always done them.

But 5 years after that, in Java-land everyone was using maps, folds and filters like crazy (Or in C# land, Selects and Wheres and SelectManys etc,) with some half-thought-out bullshit reasoning like "it's functional, so it must good!"

So we paid the price, but didn't get the reward.
by hackitup7 | 2025-04-11 12:18:07+00:00
"If I had asked people what they wanted, they would have said faster horses."

This line is especially silly when making B2B products, especially very expensive enterprise ones. It's often used to justify building "great ideas" from some exec or overzealous PM/engineer over concrete asks from customers. Like you really think that a team of 20 experienced people paying >$1M to help run their multi-billion dollar business, both have no idea what they actually want and don't understand the capabilities of new technologies in the market? Totally condescending.
by mdpye | 2025-04-11 12:18:25+00:00
I remember in the very early days as a hobbyist working with cgi perl scripts for forums or guest books where the script just edited the "static" content in place.

The script would write new html files for new posts and do "fun" (I mean, terrifying) string manipulation on the main index to insert links to posts etc. Sometimes they used comments with metadata to help "parse" pages which would see edits.

These both were, and definitely were not, "the days" :D
Show HN: Chonky – a neural approach for text semantic chunking
by hessdalenlight | 2025-04-11 12:18:39+00:00
TLDR: I’ve made a transformer model and a wrapper library that segments text into meaningful semantic chunks.

The current text splitting approaches rely on heuristics (although one can use neural embedder to group semantically related sentences).

I propose a fully neural approach to semantic chunking.

I took the base distilbert model and trained it on a bookcorpus to split concatenated text paragraphs into original paragraphs. Basically it’s a token classification task. Model fine-tuning took day and a half on a 2x1080ti.

The library could be used as a text splitter module in a RAG system or for splitting transcripts for example.

The usage pattern that I see is the following: strip all the markup tags to produce pure text and feed this text into the model.

The problem is that although in theory this should improve overall RAG pipeline performance I didn’t manage to measure it properly. Other limitations: the model only supports English for now and the output text is downcased.

Please give it a try. I'll appreciate a feedback.

The Python library: https://github.com/mirth/chonky

The transformer model: https://huggingface.co/mirth/chonky_distilbert_base_uncased_...
by florbnit | 2025-04-11 12:19:12+00:00
I’m. Sorry that you feel that way. We applied an algorithm and since 40 of the other 100 people who share that opinion with you committed drug related crimes we have decided to put you in jail without chance of parole. I hope you understand that while this may seem unfair this decision is not good or bad, it’s just the outcome of the algorithm saved in a computer.
by zipy124 | 2025-04-11 12:19:15+00:00
I wasn't saying "evil capitalist", just that when the competition is limited you can charge higher prices, this isn't evil unless you have used unethical tactics to enforce some sort of monopoly/oligopoly etc....

The fact that they sell both the made in china model and the USA model shows it is not about building up reserves, as if they wanted to do that they would have higher prices on both models, not selective pricing, thus we are looking for a factor which affects their USA model but not China model.

Development costs are not really a factor here, they specifically say they developed both versions simulatenously, but yes if they didn/t it would be a factor.

They actually back up my first point by giving the reason for the pricing: "It's the fact that it's a secure supply chain, that you know, staff that's completely auditing every component, which means we're selling to a government security market with all those additional layers that we've added on top."

If you distill this down it is saying that basically securing the supply chain costs more, but also that it adds value. The government is willing to pay a whole lot more for the same product for that extra supply chain security even if it doesn't cost that much more for the manufacturer to produce because no one else can offer something like this.
by 3D30497420 | 2025-04-11 12:19:29+00:00
It is not just the labor/components, but that it is for a different market with different expectations and requirements. From the article:

> You can look at our concrete numbers. We sell a Chinese made Librem 5 phone for $799. We sell the Liberty phone for $2,000. When you're looking at just those numbers alone, that looks like a giant leap in cost. But there's a couple of factors that are not publicly known when you're looking at just those prices. When you're looking at COGS, cost of goods sold, our Librem 5 phone is equivalent in cost to about an iPhone. It's about $500 and some odd dollars, $550. So we can see that the Librem 5 phone doesn't have a very high margin when we sell it. The Liberty phone, same COGS componentry wise, but to produce it on US soil, we're adding not quite a hundred dollars. So it's about $650 to produce that entire phone. But what we're doing by selling it for greater originally, we're looking at a lot of differentiators for us. It wasn't just made in the USA. It's the fact that it's a secure supply chain, that you know, staff that's completely auditing every component, which means we're selling to a government security market with all those additional layers that we've added on top.
by wutwutwat | 2025-04-11 12:19:30+00:00
I can imagine knowing the apps someone uses might be a telling thing to someone looking for leverage on someone (who might not want to disclose what apps they use). Apps can expose your orientation, your lifestyle, your income level, your habits, and even where to look to find you (imagine you have an app for a gym, that narrows down the list of gyms to find you at and is better than nothing)

Politicians, law enforcement, high value targets, etc. A list of apps on their phone could totally be used against them and is better than no list of apps.
by rollcat | 2025-04-11 12:19:37+00:00
> Exactly. I expect a modular fork of systemd when people get annoyed enough.

That's exactly the case with elogind, used by e.g. Alpine, Void, and Gentoo.

> I still don't understand why people treat systemd as the second coming of the Christ.

FWIW it managed to pull most distros in a single direction, decreasing ecosystem fragmentation. The outliers are well, outliers.

Just to be clear: it's not an endorsement from my side; there's enough criticism of systemd which I will not repeat. But the fragmentation aspect is what kills so much momentum, and it just runs too deep: Gnome was started because KDE's dependency on Qt wasn't kosher; Qt later got relicensed, but both projects kept pulling in different directions. It feels like any compatibility between anything is coincidental.