News for hackers. Stuff that matters.

pash

Fun project! The contrast in the style of presentation with regular old HN is intriguing. The contrast between the value of the comment threads of Hacker Times and the New York Times is too.
Re:Anecdotally, Programmers Dislike "Reduce" on Thursday September 17, 2026 @12:14AM (#49736324)
In other words, look at the types. The type of the folding function (the first argument) indicates how each fold works.

  foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b

  foldr  :: Foldable t => (a -> b -> b) -> b -> t a -> b
Re:The Microeconomics of Artificial Intelligence (Open Access) on Wednesday September 09, 2026 @04:57PM (#49634178)
Yes, Ricardo originally introduced the idea of comparative advantage in the context of international trade, in a model in which different countries had different endowments of resources.

Nothing that imtringued wrote above suggests he understands comparative advantage, which is the idea that it is relative productivity, not absolute productivity, that should determine what one specializes in. That’s precisely what I meant about people finding the concept unintuitive.

Re:The Microeconomics of Artificial Intelligence (Open Access) on Tuesday September 08, 2026 @10:55PM (#49620264)
Essentially all of economic theory is aimed at explaining, not predicting. The distinction between the two goals [0] is sometimes under-appreciated within the profession, and almost always under-appreciated outside of it.

Most predictive tools in economics and finance have “surprisingly” little economic content; but once you understand the distinction between the two goals, it should be unsurprising that predictive models tend to make few economic assumptions, relying rather on general statistical techiniques or on econometrics that incorporate a minimum of theory [1]. From that understanding comes the humbling realization that predicting the future is quite difficult in a context in which the relevant processes are continually seeking an equilibrium that often implies unpredictability. [2]

I’m not an economist, but I do a lot of applied financial-economic modeling. State-of-the-art LLMs are really, really terrible at economic intuition. They will hinder, not help, in formulating an economic model, which is a process of coming up with a set of modeling assumptions that lead to a useful (implicitly, tractable) model. LLMs are, however, quite good at math, and I’ve found them very useful in iterating through different sets of modeling assumptions to identify those that lead somewhere useful. Not having to work out all of the mathematical details myself, and thereby avoiding getting lost in the weeds and being better able to maintain a higher-level perspective on what I’m trying to accomplish, has accelerated my work immensely. But it’s a process of leading the LLM by the nose the whole time and asking it to fill in the details.

I should note, thought, that if you indotend “AI” to mean more than LLMs, them yes, there is starting to be a lot of good work done on predictive economic models that use specialized neural networks as black-box functions to compute model quantities that are otherwise difficult to come up with, just as is also happening in applied physics and other fields.

0. https://www.stat.berkeley.edu/~aldous/157/Papers/shmueli.pdf

1. Many explanatory economic models refer to quantities that are fundamentally or practically unobservable or unidentifiable. Much of economics is built on models that were designed to provide a formal, logical basis for understanding the economic world, which is often quite unintuitive. (For example, many intelligent people uneducated in economics exhibit intuitions opposite of basic economic ideas like opportunity cost or comparative advantage.) Models of this sort have been very influential in determining the trajectory of economic thought, but they are often effectively impossible to calibrate to the real world.

2. The most influential and effective economic ideas fall into a third class: ideas that have created their own reality by shaping the way people think in a way that gives rise to the results the models explain or predict. This phenomenon is most evident in finance, where ideas like the various forms of the efficient market hypothesis, the CAPM, and the Black–Scholes model and its follow-one have arguably provided a framework that has reshaped the ways financial practitioners behave to such an extent that financial markets now conform much more closely to what the models describe than was formerly the case. Donald MacKenzie’s book An Engine, Not a Camera is an excellent study of this phenomenon: https://mitpress.mit.edu/9780262633673/an-engine-not-a-camer...

Re:Holden's Lightning Flight on Wednesday September 02, 2026 @09:57PM (#49545082)
I think the joke is that Air Marshal Kenneth Porter was chief of the RAF’s maintenance command, and also not a pilot. [0]

Edit: fergal_reid’s reply below is correct. Porter did serve several years at the start of his career as a pilot, in the early 1930s, before spending the bulk of it as a signals officer. Holden also had his wings, but never served as a pilot. I read Porter’s comment as a joke between two RAF officers who were not “really” pilots, but now I’m not sure how to read it.

0. https://en.wikipedia.org/wiki/Kenneth_Porter_(RAF_officer)

What does it mean to “produce proteins with about twice their usual accuracy”? Smaller feature size, essentially?
Re:You can just say it: the best definition of AI slop on Saturday May 30, 2026 @08:38PM (#48342007)
Right, that’s why I wrote, “I don’t mean that most neural networks are invertible functions.”

For a neural network that is not bijective, you can obtain an input that maps to a desired output by the following algorithm.

1. Start with a trained neural network. (The weights will not change throughout this procedure.)

2. Pick a random input.

3. Given an output for which you want to compute an associated input, feed the input into the network to compute the output.

4. Compute the loss of the computed output relative to the target output (e.g., mean-square error). If the loss is sufficiently small, you’ve found an input that maps to an output close to your target output and you’re done.

5. Otherwise, compute the gradient of the loss with respect to the input (e.g., by backprop).

6. Update the input according to a gradient-update rule. And go back to Step 3.

In theory, you can recover a “representative” prompt for the output of an LLM in this manner. For outputs that could have been generated by a large set of disparate prompts, obviously this won’t work well.

Re:You can just say it: the best definition of AI slop on Saturday May 30, 2026 @01:13AM (#48332819)
The obvious solution is to run things in reverse, inputting the AI-generated output to recover the prompt that generated it.

Most generative models can be run in reverse by algorithms that already exist [0], but you have to have the model weights. For closed-weight models, or for a process that can handle unknown models, you’d have to do some engineering.

But do we have the technology to build models that back out the prompt from suspected AI output? Yes.

0. I don’t mean that most neural networks are invertible functions. They’re not. But you can do backprop in reverse, from output to input, to train a model to generate an input to the original model that best predicts its output.

Re:There Will Be a Scientific Theory of Deep Learning on Friday April 24, 2026 @05:45PM (#47896190)
The inflection point was 2012, when AlexNet [0], a deep convolutional neural net, achieved a step-change improvement in the ImageNet classification competition.

After seeing AlexNet’s results, all of the major ML imaging labs switched to deep CNNs, and other approaches almost completely disappeared from SOTA imaging competitions. Over the next few years, deep neural networks took over in other ML domains as well.

The conventional wisdom is that it was the combination of (1) exponentially more compute than in earlier eras with (2) exponentially larger, high-quality datasets (e.g., the curated and hand-labeled ImageNet set) that finally allowed deep neural networks to shine.

The development of “attention” was particularly valuable in learning complex relationships among somewhat freely ordered sequential data like text, but I think most ML people now think of neural-network architectures as being, essentially, choices of tradeoffs that facilitate learning in one context or another when data and compute are in short supply, but not as being fundamental to learning. The “bitter lesson” [1] is that more compute and more data eventually beats better models that don’t scale.

Consider this: humans have on the order of 10^11 neurons in their body, dogs have 10^9, and mice have 10^7. What jumps out at me about those numbers is that they’re all big. Even a mouse needs hundreds of millions of neurons to do what a mouse does.

Intelligence, even of a limited sort, seems to emerge only after crossing a high threshold of compute capacity. Probably this has to do with the need for a lot of parameters to deal with the intrinsic complexity of a complex learning environment. (Mice and men both exist in the same physical reality.)

On the other hand, we know many simple techniques with low parameter counts that work well (or are even proved to be optimal) on simple or stylized problems. “Learning” and “intelligence”, in the way we use the words, tends to imply a complex environment, and complexity by its nature requires a large number of parameters to model.

0. https://en.wikipedia.org/wiki/AlexNet

1. https://en.wikipedia.org/wiki/Bitter_lesson

Re:Billion-Parameter Theories on Tuesday March 10, 2026 @05:23PM (#47328953)
> Even for billion-parameter theories, a small amount of vectors might dominate the behaviour.

We kinda-sorta already know this is true. The lottery-ticket hypothesis [0] says that every large network contains a randomly initialized small network that performs as well as the overall network, and over the past eight years or so researchers have indeed managed to find small networks inside large networks of many different architectures that demonstrate this phenomenon.

Nobody talks much about the lottery-ticket hypothesis these days because it isn’t practically useful at the moment. (With the pruning algorithms and hardware we have, pruning is more costly than just training a big network.) But the basic idea does suggest that there may be hope for interpretability, at least in the odd application here or there.

That is, the (strong) lottery-ticket hypothesis suggests that the training process is a search through a large parameter space for a small network that already (by random initialization) exhibit the overall desired network behavior; updating parameters during the training process is mostly about turning off the irrelevant parts of the network.

For some applications, one would think that the small sub-network hiding in there somewhere might be small enough to be interpretable. I won’t be surprised if some day not too far into the future scientists investigating neural networks start to identify good interpretable models of phenomena of intermediate complexity (those phenomena that are too complex to be amenable to classic scientific techniques, but simple enough that neural networks trained to exhibit the phenomena yield unusually small active sub-networks).

0. https://en.wikipedia.org/wiki/Lottery_ticket_hypothesis

Sandvault [0] (whose author is around here somewhere), is another approach that combines sandbox-exe with the grand daddy of system sandboxes, the Unix user system.

Basically, give an agent its own unprivileged user account (interacting with it via sudo, SSH, and shared directories), then add sandbox-exe on top for finer-grained control of access to system resources.

0. https://github.com/webcoyote/sandvault

Re:Let's discuss sandbox isolation on Friday February 27, 2026 @03:37PM (#47185250)
OK, let’s survey how everybody is sandboxing their AI coding agents in early 2026.

What I’ve seen suggests the most common answers are (a) “containers” and (b) “YOLO!” (maybe adding, “Please play nice, agent.”).

One approach that I’m about to try is Sandvault [0] (macOS only), which uses the good old Unix user system together with some added precautions. Basically, give an agent its own unprivileged user account and interact with it via sudo, SSH, and shared directories.

0. https://github.com/webcoyote/sandvault

Re:Ireland rolls out pioneering basic income scheme for artists on Thursday February 12, 2026 @12:08AM (#46985097)
Milton Friedman wouldn’t have approved of restricting a basic income scheme to artists, because such a restriction might distort incentives around choice of profession in a way that would reduce social welfare.

He would have supported a broader scheme. His proposal in 1962 of a “negative income tax” (in Capitalism and Freedom) is the genesis of the movement to replace traditional social welfare schemes (which disincentivize employment and skew recipients’ consumption decisions) with simple schemes that just give money to poor people. (This eventually led to the Earned Income Tax Credit in the United States.)

Friedman’s negative income tax is equivalent to the contemporary notion of a guaranteed basic income (but not to a universal basic income, as only people earning below some threshold would receive it).

From what I understand, which is very incomplete, the leading hypothesis at the moment is that ingested prions are a bit hard to digest (because they’re malformed), so they end up crossing the intestinal barrier somehow, interacting with the nervous system via the intestinal lining or lymphatic system. Then they travel to the brain via nervous pathways, by-passing the usual blood–brain barrier.
I’m not qualified to comment intelligently on what might be going on here, but I’d like to add some background color that the article lacks.

Creutzfeldt–Jakob Disease is a prion disease [0] for which there is no definitive diagnosis in vivo. A confident diagnosis can be made only after examining brain tissue under a microscope.

Prions are an unusual type of mis-folded protein that induce other proteins to take on a similar mis-folded shape when they come into contact with them. The mis-folded shape of the prion itself is what causes the mis-folding in adjacent proteins. It’s a chemical-bonding thing at the molecular level. It’s the shape of the prion that causes other proteins to take on a similar shape and become prions, etc.

Some prion diseases occur spontaneously (when a protein takes on a mis-folded configuration due to mis-transcription or random energetic impulses) and some are transmitted, typically by eating some part of an animal that contains prions, which then end up in your own body, inducing proteins in your body to take on prion configurations.

Prion diseases are the only known transmissible diseases that do not involve the replication of a pathogen’s genetic material in a host cell. The only known prion diseases affect nervous tissues, and in humans the only known prion diseases affect brain tissues.

I’m not an expert on prion diseases, but I’ve had a bit of a fascination with them since having to report on a bunch of USDA surveillance lectures on mad-cow disease (bovine spongiform encephalopathy, BSE) and to summarize a bunch of symposia on prion diseases in a previous life. The symptoms reported in the article sound very much like a prion disease, and the tests for CJD indicate that the doctors in the region suspect as much.

But we simply don’t have good tests for prion diseases in vivo. And prion diseases are not well understood in general, so it wouldn’t be surprising that a new one would present as something of a mystery.

It is also the case that I know very little about New Brunswick, but I will mention that prion diseases in humans are thought to be far more commonly acquired than spontaneous. The most common cause of acquisition is eating animals with endemic prion diseases; this is most often nervous tissue of venison, but rarely nervous tissue of cattle infected with BSE, which is present in Canada more than anywhere else (by a small margin).

It is also possible (but not likely) that a prion disease can arise de novo.

0. https://en.wikipedia.org/wiki/Prion_disease

Philip E. Converse, The Nature of Belief Systems in Mass Publics (1964), 75 pages [0].

0. https://web.ics.purdue.edu/~hoganr/Soc%20312/The%20nature%20... [PDF]

Re:The bloat of edge-case first libraries on Sunday September 21, 2025 @01:13AM (#45320231)
> We should be able to define our functions to accept the inputs they are designed for, and not try to handle every possible edge case.

Oh, look, somebody just re-discovered static typing.

Re:Simulating and Visualising the Central Limit Theorem on Friday August 15, 2025 @02:18PM (#44915729)
For some definition of “sufficiently introductory”, I’d recommend starting with the first chapter of John Nolan’s book Stable Distributions [0] (20 pages), which presents the class of distributions to which sums of iid random variables converge and builds up to a version of the generalized CLT.

Note that this generalization of the classical CLT relaxes the requirement of finite mean and variance but still requires that the summed random variables are iid. There are further generalizations to sums of dependent random variables. John D. Cook has a good blog post that gives a quick overview of these generalizations [1].

0. https://edspace.american.edu/jpnolan/wp-content/uploads/site... [PDF]

1. https://www.johndcook.com/blog/central_limit_theorems/

Re:Mustard Watches (1990) on Tuesday May 27, 2025 @09:28PM (#44112055)
I’m not sure what the author had in mind when he wrote the paper, but its light-hearted content reveals well how to structure a math paper: (1) state the problem and why the reader should care about it, (2) state how the paper builds on prior work, (3) summarize the main results, and then (4) develop them in theorem-proof style.

An economics paper in the same spirit (though of course economics addresses more practical problems than mathematics, in this case whether one should leave the toilet seat up or down) shows quite well how to present and develop an economic model [0].

0. https://jaypilchoi.com/wp-content/uploads/2021/06/Economic-I... [PDF]

Re:The Lost Art of Logarithms on Thursday March 13, 2025 @05:15PM (#43357301)
The general version of this is called inverse transform sampling [0], which uses the fact that for the cdf F of any random variable X the random variable Y = F(X) has a standard uniform distribution [1]. Since every cdf increases monotonically on the unit interval, every cdf is invertible [2]. So apply the inverse cdf to both sides of the previous equation and you get F^-1(Y) = X is distributed like X.

Sampling from a standard uniform distribution and then using the inverse transform is the commonest way of generating random numbers from an arbitrary distribution.

0. https://en.m.wikipedia.org/wiki/Inverse_transform_sampling

1. https://en.m.wikipedia.org/wiki/Probability_integral_transfo...

2. Not every cdf is one-to-one, however, so you may need a generalized inverse.

Older »