Recent submissions

Comment · 6 days ago
There are examples in the tutorial, including a circular linked list.

You can just store all them items of the list/tree/whatever on the stack, growing it as needed, or you can add an addition "freelist" for a particular stack, so you can re-use items.

Comment · 6 days ago
Eh, I think the tutorial is pretty readable? It's concise enough.

With the tutorial, the summary also makes more sense. I have not read the other parts yet, but so far I like what I see.

All is in pretty good taste, and I like what I've seen so far. I do not care if the author himself came up with the idea, or if AI came up with it and the author approved.

I do not understand why you "have to" know this to make use of it. You can judge ideas independently of where they came from (and you should).

Comment · 1 month ago
> It seems a little strange that more advanced later machines like the original PDP-11 from 1970, couldn't "autostart" from ROM like that.

Because the PDPs had magnetic core memory, so the bootloader, once toggled in, stayed in memory. The OS took care not to overwrite it.

And in normal operation you wouldn't have to use it at all, you just switched on your PDP, and it was in the same state as when you switched it off.

Also, bootloaders were short (because peripherals had lots of intelligence); toggling one in was a matter of minutes.

> I think that was because core memory was non-volatile.

Exactly. And when RAM cards were available to replace core (very late in the lifecycle of the minis), the RAM was battery backed to simulate that behaviour.

Comment · 2 months ago
Comment · 2 months ago
Comment · 3 months ago
Comment · 3 months ago
Let me supply an /s tag, just in case.
Comment · 3 months ago
Yes, I lately feel like the internet is lately mostly acting like a mob, and finger pointing "look, how stupid they are!" is the main content.
Comment · 4 months ago
What happened to VERIFYING an answer? Does nobody do that anymore?

When I ask an LLM, I trace the sources, and see if they make sense.

More often than not the sources don't actually say anything about the topic in particular...

> It’s also scary how easily you can lead each LLM to the answer you have in mind.

Exactly. Which is why "treat an LLM like a human expert who can answer your question" doesn't work. It's more like a human bullshitter who makes up convincing looking answers, and tries to please you. If the answers have actually some grounding in the training material, that's useful as some kind of holistic google, but often it's not.

Comment · 4 months ago
> Does this stuff make sense to other people?

Nope, and I actually learned about application of category theory to programming language in university.

I tried to get an idea about the main points, and then stumbled over

> a thing is what you can observe of it. > > [...] > > Content addressing is extensionality made physical (chapter 11): two values indistinguishable by observation are not merely equal, they are the same slot

That only works in a category because you have enough (a countably or uncountably infinite number) functions that you can compose and "test" so you don't need (or don't care) about the "value" itself.

But on a real computer that doesn't work, because you can't go beyond a countable number, and even then you run into the halting problem pretty soon. So equality in this model is not computable. Which is sort of bad if you want to somehow store values "in the same slot" just based on observability. It might work for string literals, and even for concatenated strings, but not in general.

Picking some random lattice (a lattice is a partially ordered structure with some extra conditions) as a base of addressing doesn't help...

So yes, crackpot AI slop. The words sort of make sense, but there's nothing solid behind it, and as soon as you look at details it falls apart.

Comment · 6 months ago
> works really well in Rust and TypeScript too

And of course Rust and TypeScript were heavily influenced by Haskell... they just don't mention it and call things differently, to avoid the "monads are scary, I need to write a tutorial" effect. Though it's less about monads and more about things like type classes.

Imitation is the sincerest form of flattery.

Comment · 6 months ago
The point is that algebraic data types are common in functional languages. "Maybe" is just an example of an algebraic data type, there's tons more.

If the article says "functional programmers should take a look at Zig", and Zig makes algebraic data types hard, then maybe they shouldn't use it.

If you even say "the annoyingness is a feature, use zig the way it is intended to be used" then that's another signal for functional programmers that they won't be able to use zig the same way they use functional languages.

Comment · 6 months ago
> you ask the LLM what's wrong, you learn something new about the syntax

So if you have no LLM to ask, can you figure out on your own what is wrong? Just by reading documentation?

That's also an important skill to have.

Comment · 6 months ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton