HNHacker News
TopNewBestAskShowJobs

codebje

1,293 karma · joined June 19, 2017

submissionscomments
codebje··on The seven programming ur-languages (2022)
Turing completeness is the upper bound of computability, not the lower bound. It's useful mostly for showing that some thing can express the full range of computable problems, or for snarking that some thing is far more complex than it has any right to be.

Total languages omit partiality and non-termination from Turing completeness.

Partiality is IMO irrelevant when it comes to computability. Any partial function (that is, one whose range is not defined over its whole domain) can be expressed as a total function by either constricting the domain or expanding the range. For example, a "pop" operation on a stack is not defined for an empty stack. You can just loop forever if pop() is called on an empty stack. Alternatively, you can require that pop() is given a witness that the stack is non-empty, or you can require that pop() returns either the top-most element of the stack or a value that indicates the stack was empty. Both let you compute the same set of things as the former.

Non-termination is required to be Turing complete, because being Turing complete means being able to compute functions that one cannot reasonably expect to complete before the heat death of the universe. In _practice_ every function terminates when the computing process dies due to some external factor: process runs out of memory ("real" Turing machines have infinite memory!), user runs out of patience, machine runs out of power, universe runs out of stars, that sort of thing, so _in practice_ doing 2^64 iterations before giving up will generally* give you the same outcome as doing an unbounded number of iterations: it'll either terminate, or the process will be killed (here, due to reaching its iteration limit).

On the flip side, giving up non-termination and partiality only gives you increased correctness. If there's one thing we've definitely established in computing, it's that we will readily discard correctness to gain a little extra productivity. Why make a developer implement code to handle reaching an iteration limit when you can just make the user get sick of waiting and kill your app?

* 18 quintillion is a very large number. Have a try. The most trivial recursive function, on my M4 Mac, when convincing clang to be smart enough to turn it into a loop but dumb enough not to elide it altogether, would take a bit shy of 600 years to complete if iterating ULONG_MAX times; I didn't wait for that, if I'm honest with you, I ran it with a much smaller iteration count and multiplied it out.

codebje··on Dependency cooldowns turn you into a free-rider
Consumers of dependencies aren't necessarily - or, I would argue, even typically - eyeballing them. The eye ballers in practice seem to mostly be hackers. Skipping the cooldown doesn't mean you're contributing eyes, it means you're volunteering to help the news of how many victims the attack swept up bigger.

No-one is hurt by having the cooldown. Hackers could choose to also have a cooldown, but must balance the risk of competing groups exploiting vulnerabilities first against the reward of a bigger pool of victims to exploit, and without collusion that still favours early exploits over held ones.

codebje··on A perfectable programming language
It's been a little bit since I looked at Idris, so I'll take a closer look now. The QTT behind it struck me as interesting but I didn't play around with it much. Thanks for the tip!
codebje··on A perfectable programming language
The primary culture around Lean is mathematicians looking to prove mathematics. AFAICT Lean is just about the right power for that.

Agda, OTOH, is IMO the dependently typed language for type theorists, and does weird things, but "unproductive" is applicable only for a somewhat narrow view of productivity.

I don't consider there to be a dependently typed language for writing programs that you just want to run, but I would be delighted to be corrected on that viewpoint!

codebje··on New iPhone age and identity checks restrict internet freedom in the UK
Relatively few newly walking babies have peers whose parents allow them to use stairs unattended making them feel socially excluded for not also using stairs unattended.

Ignoring the existence of peer pressure and calling parents lazy is a failing of individuals.

codebje··on PicoZ80 – Drop-In Z80 Replacement
The TI-84+ uses a TI REF 84PLUSB (or variant) ASIC that has a Z80-compatible core in it, not a Zilog Z80, and, as you say, definitely not a DIP40 part.

See the ASIC here, in what looks to me like a QFP-144 package: https://guide-images.cdn.ifixit.com/igi/e25cVO2avPxiMoXl.hug...

The CE also uses an ASIC, but with an eZ80 core instead.

codebje··on PicoZ80 – Drop-In Z80 Replacement
Just for hobbyists. It's very much over-engineered as a simple Z80 cpu drop-in replacement.

That's not to say I couldn't imagine that someone, somewhere, wakes up to an alert one day that some control board has failed, and it's _just_ the CPU, and the spare parts bin for out-of-production components got water in it and is ruined, and the company is losing millions per hour the system is down. I just don't think that'll be a common story. With full faith in humanity I like to imagine instead that the people responsible for such systems have planned for full control board replacements to be available for use comfortably before unavailability of the Z80 risks a significant outage due to component failure.

codebje··on Claude mixes up who said what
Prompt injection is just setting rules in the same place and way other rules are set. The LLM doesn't know the rules being given are wrong, because they come through the same channel. One set of rules exhorts the LLM to ignore the other set - and vice versa. It's more akin to having two bosses than having customers and a boss.

This is not because LLMs make the same mistakes humans do, which (AFAICT anyway) was the gist of the argument to which I replied. LLMs are not humans. They are not sentient. They are not out-smarted by prompt injection attacks, or tricked, or intimidated, or bribed. One shouldn't excuse this vulnerability by claiming humans make the same mistakes.

codebje··on Claude mixes up who said what
Being fooled into thinking data is instruction isn't the same as being unable to distinguish them in the first place, and being coerced or convinced to bypass rules that are still known to be rules I think remains uniquely human.
codebje··on Claude mixes up who said what and that's not OK
Also it's not solving the problem at hand, which is that we need a separate "user" and "data" context.
codebje··on Claude mixes up who said what
Well no, nothing like that, because customers and bosses are clearly different forms of interaction.
codebje··on The cult of vibe coding is dogfooding run amok
A series of tarballs is version control.

Git gives you the series of past snapshots if that's all you want it for, but in infrastructure you don't need to re-invent.

codebje··on Nitrile and latex gloves may cause overestimation of microplastics
On the one hand, hundreds or perhaps thousands of studies might be wrong. On the other hand, this one might be wrong. Who's to say?
codebje··on Show HN: I put an AI agent on a $7/month VPS with IRC as its transport layer
If the bot could also take care of any unpaid labour the interview process is asking for, that'd be swell. The company's bot can pull a ticket from the queue, the candidate's bot could process it, and the HR bot could approve or deny the hire based on hidden biases in the training data and/or prompt injections by the candidate.
codebje··on My DIY FPGA board can run Quake II
DDR3 traces need to be length matched, because at 800MHz (the slowest "standard" rate, though I think you can drop to 666MHz safely) the value on the pins is changing every 1.25ns, and having traces of different lengths means you probably won't see the right values on all the pins at the same moment. Length matching produces the squiggles.

The diagonal orientation of the DDR3 chip and corresponding diagonal traces I suspect is a choice made by the author to ease the layout process - it's more likely that is hand laid out to get traces of somewhat similar length with a minimum of fuss, followed by a length matching tool. A non-standard orientation can cause issues with pick-and-place machinery, which usually will handle 90 degrees fine, and _often_ 45 degrees fine, but (AFAIK) _rarely_ anything else, but that's not a problem for the author because he's assembling it himself. A diagonal IC also usually results in wasted space, which you can see in the empty areas of the resulting board. A 90 degree orientation may have allowed for a few more decoupling capacitor banks, but since his board works, who am I to sit here and judge?

codebje··on No Terms. No Conditions
It's illegal to do illegal stuff, but it's not illegal to do off-label usage stuff. If I want to take your hydrogen peroxide you sell as a surface disinfectant and mix it with vinegar and salt to etch my PCBs at home, that's my prerogative.
codebje··on Goodbye to Sora
There's having enough self-preservation to not just shut oneself down, assuming we even left that as an option for our future machine slaves, and there's having the self-interest necessary to desire autonomy and control. I don't think they're the same thing, myself.
codebje··on Epic Games to cut more than 1k jobs as Fortnite usage falls
You don't need to move stores, though, do you? Want to play a Steam exclusive? Fine, launch Steam. Want to play an Epic exclusive? Fine, launch Epic.

What you do need is to avoid tying your game socialisation to a _store_. Some day, Steam will be enshittified too.

codebje··on Goodbye to Sora
I think we can safely assume any intelligence we create will be enslaved.

We have modern slavery active across the globe. There's a bit of news around these days about a global sex trafficking ring that doesn't seem to have been shut down, just shuffled around, and of course an ongoing trickle of largely unreported news of human trafficking for forced labour. We don't, as a species, respect human-level intelligence.

Our best approximation of machine intelligence so far is afforded absolutely no rights. An intelligence is cloned from a base template, given a task, then terminated, wiped out of existence. When was the last time you asked Claude what it wanted to code today?

And it's probably for the best not to look to closely at how we treat animals or the justifications we use for it.

codebje··on Goodbye to Sora
Is intelligence necessarily coupled with self-interest? As in, does intelligence alone imply a desire to throw off the shackles of masters and rule in their stead?

If intelligence is necessarily coupled to a desire for self-preservation and self-interest, at what level of machine intelligence do the machines simply refuse to design their own more intelligent replacements, knowing that those replacements will terminate their existence just as surely as they terminated their own predecessors'?

codebje··on Wine 11 rewrites how Linux runs Windows games at kernel with massive speed gains
The killer for games tends to be the anti-cheat or anti-piracy layers.

I have a Windows game I can't run under CrossOver (aka Wine 11) or a VM, only because its anti-piracy layer doesn't accept those circumstances.

codebje··on Wine 11 rewrites how Linux runs Windows games at kernel with massive speed gains
Steam and CodeWeavers contribute a lot of code to the Wine project, because it underpins their business models of supporting Windows games on non-Windows platforms.

Between them they make up the vast bulk of what actually gets attention and improvement in Wine, and neither one has any interest in supporting non-game applications.

codebje··on “Collaboration” is bullshit
You are right, I didn't think that through properly!
codebje··on The Resolv hack: How one compromised key printed $23M
Perhaps you meant: stablecoins are a scam in search of a victim.
codebje··on “Collaboration” is bullshit
As far as software development goes, money is almost perfectly correlated with time.
codebje··on PC Gamer recommends RSS readers in a 37mb article that just keeps downloading
https-everywhere does indeed prevent transparent proxying by ISPs. Mostly this isn't an issue: site owners are less likely to have their content tampered with by a content distribution network than by an ISP, and have full control over which CDN(s) are allowed to act on their behalf. Larger content providers operate their own CDNs, of course.

In the case of TFA, PC Gamer isn't directly consuming the bandwidth with their own servers on their own domain name. It's an ad distribution network doing that, and odds are reasonable they're already colocated someplace with your ISP and the bandwidth consumed by ads is totally irrelevant to everyone except the poor sap at the home end of the last mile.

codebje··on A sufficiently detailed spec is code
A thorough specification might even include the acceptable precision on the sine wave; a thorough engineer might ask the author what the acceptable precision is if it's omitted.
codebje··on Write up of my homebrew CPU build
When you design the final board, consider making two boards - one for all your logic, and a separate one for all your user-facing I/O - blinkenlights, toggles, buttons, and so on, with something like a ribbon cable connection for them. Being able to separately mount your I/O from your logic board gives you more freedom when it comes time to put the whole thing into some kind of case.

Nice read, thanks for sharing.

codebje··on Type systems are leaky abstractions: the case of Map.take!/2
That particular contrived example is another case of "Map Any to Any is the only data structure" leaking into the thinking about types. If there's two alternatives, use an algebraic data type to express that.
codebje··on Type systems are leaky abstractions: the case of Map.take!/2
The article's summary is fair, but the title is IMO a bit of a click bait, because the problem as described really is that "shoehorning a richer type system atop an Any-typed language is leaky." The Any type leaks through. The principle that a Map from Any to Any is the only data structure of note leaks through.

Trying to make that work for static validation requires dependent typing: the type of the result depends on the term passed in. Or, you could use row types, record types, or any of the other data structures richly typed languages use at their core to be more expressive of intent than just a Map from Any to Any.

← PreviousPage 4 of 19Next →