home.social
  1. My initial implementation will be purely symbolic, so the only data types I'm supporting for now are symbols, cons cells, functions and the nil value. I'll add in numbers later. I feel like for a Lisp, the first thing to nail down is symbolic computation.

  2. I've decided on having its basic data units be 32-bit, both because RAM doesn't grow on the trees and because I want this to end up having an "alternate history retrocomputing" feel. Mainly the latter reason, though. Since I'm only targeting 64-bit hardware (my x86-64 PC and my ARM64 Raspberry Pi), this has some technical implications that'll be fun to work with.

    The main one is that I can't use host machine addresses (and therefore pointers) for anything that isn't a purely internal host-level implementation detail. Instead I'm using offsets - fortunately, adding an offset to a base address is a very cheap operation, so I don't think that's going to be as onerous as one might imagine*.

    Another one is that it becomes a lot more reasonable to put type tags in the *high* bits of a 32-bit value. Normally when I've implemented tagged pointers, I've used low bits (exploiting that alignment of objects can give me some guaranteed 0s down there to play with), but here it seems a lot more reasonable to use high ones - this would make operations on values that *aren't* address-like cheaper, because I only need a bitmask, with no shifting operations needed.

    Also I can fit a cons cell in a single machine register! I haven't quite worked out what sorts of neat things I can do with that yet.

    *) Also due to the "alternate history retrocomputing" design aspiration, I'm thinking a bit about hard capping execution speed - which will contribute *a lot* more to the final performance profile than this addressing scheme.

  3. (as far as I'm aware, by the way, despite the famous proclivities of both animals, rabbits and hares won't even *try* to mate.)

  4. The cat and the herring! I'm sure both of them would feel very uncomfortable about this.

    As I mentioned a couple weeks ago, there's a strong case to be made that cladistically, there is no such thing as a fish at all. The bony fish (including the herring) are more closely related to all land-living vertebrates than they are to any cartilaginous fish (like the shark).

    Even worse for the category of "fish", by the way: Hagfish and lampreys are equally distantly related to *all other living vertebrates*. You can't really make a group of "fish" that includes both hagfish, sharks and herrings without that group basically becoming "all vertebrates". This would mean that whales are fish, which is obviously completely unacceptable.

  5. The iguana and the human! Iguanas, humans and tokay geckos are all amniotes, and the common toad isn't. The last common ancestor of the gecko and the toad is the same animal as the last common ancestor of the human (or the iguana) and the toad.

    (It's sort of silly that herpetology covers "the study of reptiles and amphibians"; that combination makes precisely as much sense biologically as "the study of mammals and amphibians".)

  6. The monkey and the block of yeast. I could have picked any animal, of course, but I think capuchin monkeys are a lot of fun and very distinctly unlike a block of yeast.

    Yeast is a fungus, and fungi and animals are more closely related to each other than either of them are to any plant. This much is well-established by molecular biology, and we actually share some surprising traits we've inherited from our distant common ancestors. Fungi and animals can store excess energy as glycogen (whereas plants use starch), both are also dependent on consuming other lifeforms for nutrients - and, oddly specifically, when either animals or fungi produce self-propelling cells (sperm cells and chytrid spores, respectively), those cells propel themselves with a single flagellum on the rear - in all other eukaryotes, such cells have one or more flagella on the front (basically working like a tiny propeller).

    While molecular biology has established the shape of the family tree, we've now gone *very* far back in time, and the fossil record is quite spotty. The earliest fossil that was evidently a kind of plant is about 1.5 billion years old, whereas the earliest ophistokonts (the group containing both animals and fungi) arose about a billion years ago.

  7. Counterintuitively, the bear and the dog are closer relatives than the hyena and the coyote. The wider mammal group Carnivora is divided into two subgroups, Caniformia and Feliformia. Basically: The former contains all the carnivorans more closely related to dogs than to cats, and vice versa. Bears and wolves (including domestic dogs) are both caniforms. Coyotes are so closely related to wolves and domestic dogs that they can have fertile offspring.

    There are a lot of caniform animals that sort of invalidate the name "caniform" (literally "dog-shaped") - ferrets are caniforms, and so are raccoons. Sea lions and walruses are caniforms, and I have a hard time thinking of a mammal shaped *less* like a dog than a walrus is.

    And even more surprisingly, the quite dog-shaped hyena is not a caniform at all - they're more closely related to cats! But it turns out that if you spend a few million years adapting to a lifestyle and niche that dog-shaped animals excel in, then you end up shaped like a dog even if you're nothing of the sort.

    So the domestic dog, coyote and brown bear are all more closely related to each other than either of them is to the hyena.

    (Footnote: Spotted hyenas in particular are *terrifying*. They're a lot more likely to hunt prey than scavenge carrion, their jaws can crush bone easily, and a mob of them absolutely can and will fuck up a pride of lions if there's some prize meat on the line. Also they have enormous hearts and can run for hours without tiring - they're one of very few animals that even stand a chance of taking on a trained human in an ultramarathon. This would be a high-stakes race for the human, since spotted hyenas will readily eat humans if the opportunity arises.)

  8. Surprisingly perhaps, this would be the boa constrictor and the chameleon. Both belong to the group Toxicofera, together with all iguanids, snakes, monitors and agamids - including the bearded dragon, in fact. All venomous reptiles belong to this clade - although plenty of nonvenomous ones also do. Venom is not an ancestral trait to the group, but it seems the anatomical elements necessary for producing venom are.

    Skinks are not toxicoferans (although some of them look *a lot* more like snakes than chameleons do!), and in fact they're one of the two weird outlier groups of the lizard family tree - only geckos are even more distantly related to everyone else than skinks are.

    (However, bearded dragons and blue-tongue skinks are closely related in the sense that both are Australian reptiles widely considered absolutely cute.)

  9. Jackdaw and saltwater crocodile, by far! Both belong to the group Archosauria (which also once contained all the jackdaw's dinosaur ancestors), and have a common ancestor about 250 million years ago. They're actually more closely related to each other than either of them is to any lizard - yes, a crocodile is more closely related to a bird than to a lizard.

    A gecko is precisely as closely related to a salamander as you are, dear reader, at least assuming you're human. Modern mammals and reptiles are both amniotes, a lineage that diverged from that of the modern amphibians way back in the Carboniferous, some 320 million years ago. Amniotes pioneered all the cool features that allowed vertebrates to start living far inland: They got rid of the gill-breathing young stage, developed thicker keratinized (and no longer water-permeable) skin, and developed shelled eggs that could be laid on dry land rather than the gel-based eggs amphibians lay in water. The last common ancestor of a gecko and a salamander is *the same animal* as the last common ancestor of a human being and a salamander.

    That said: Modern amphibians have evolved just as much since then as we amniotes have, and they have a lot of weird innovations that amniotes never came up with. Frogs are perhaps the most specialized jumping vertebrate of all. There are salamanders that have no lungs and breathe entirely through their skin! And some have independently ditched the tadpole stage and hatch as little "froglets" ... a few species have even adapted to bearing live young rather than laying eggs at all.

    (One niche modern amphibians have largely left to us amniotes is ... vegetarianism. There is only one known species of herbivorous amphibian in the world.)

  10. It's actually the goat and sheep - they share an about 4-million-year-old ancestor, and can actually occasionally hybridize - if kept together, they will happily try their best to make that happen, though most commonly hybrids are stillborn. There are a few documented examples of viable sheep-goat hybrids, though.

    Sometimes people say that bonobos are our closest great ape relatives, but that's only partly true - they are exactly as closely related to us as chimpanzees are; the bonobo and chimpanzee lineages diverged well after their last common ancestor with humans, about 7 million years ago. I definitely understand why civilized people would *prefer* to be more closely related to the more peaceful and cooperative bonobos than to the violent and territorial chimps ... though bonobos actually aren't quite as gentle as their popular image. While bonobos are much less prone to murdering each other than chimps, male bonobos actually get into a lot more fights with each other than male chimps do. Also, bonobos are more prone to ostracizing a group member than chimps are (and a lone chimp or bonobo usually has a miserable and very short life).

  11. Horses and zebras are about as closely related to each other as horses and donkeys are - and, just like horses and donkeys, they can breed and have hybrid (but sterile) offspring. Their last common ancestor lived about 4 million years ago.

    With hares and rabbits, it complicates things quite a bit that both groups are ill-defined. The entire Lagomorpha family tree (to which they both belong, together with the one living species of pika) is basically a poorly sorted heap of animals that the terms "hare" and "rabbit" have been rather haphazardly applied. There is even one kind of "hare" that *is* indisputably a rabbit: The Belgian Hare is a domestic rabbit that has been selectively bred specifically to look like a wild European hare!

    The closest to a principled definition of "hare" vs. "rabbit" we can get cladistically is to define the genus Lepus as "hares", and all the others as "rabbits" - and in that case, we get a latest common ancestor that lived about 30 million years ago.

  12. I could actually have chosen any pair of birds here, and the answer would still be the birds. An ostrich and a hummingbird are more closely related to each other than sea turtles are to land tortoises. The last common ancestor of all birds was a small dinosaur that was actually a near contemporary of the last common ancestor of crocodiles and alligators, about 90 million years ago. Sea turtles diverged from the lineage that led to both modern tortoises and freshwater turtles about 120 million years ago. All modern sea turtles have a common ancestor that was also a sea turtle, but the leatherbacks are the "odd one out" - all other sea turtles are more closely related to each other than any of them are to leatherbacks.

    However! Falcons and parrots have an even closer common ancestor than the aforementioned ur-bird, diverging some 50 million years ago. Surprisingly, falcons are actually much more closely related to parrots and songbirds than they are to eagles and hawks. They even have a distinctive anatomical trait in common with parrots, namely the sharp single "tooth" at the end of the beak. In parrots this has adapted to crack open nuts and the skins of tough fruits, in falcons it's used for severing the spinal cords of prey.

  13. Human and orangutan, by far! Although orangutans are our most distant relative among the other great apes, the latest common ancestor lived around 12 million years ago.

    Alligators and crocodiles diverged from each other long before great apes - or any primate at all, for that matter - even existed. The last common ancestor of both lived in the middle Cretaceous, some 80 million years ago.

  14. I don't have any kids, so I don't really have any skin in the game except inasmuch that I live in the same society they do and that they will eventually be adults in. That said:

    I take the bus to work, and since my route passes a high school, I get to listen to *a lot* of teenage chatter. Although there is obviously some selection bias implicit in what kids feel comfortable talking to each other about in full public, I'm still *a lot* more worried about what social media is doing to my parents' generation than to my nonexistent children's. Those kids will rant to each other about brain rot, AI slop, doom loops and how fake various influencers are; people my age and older seem a lot more likely to eat all of it raw.

  15. I'll be writing this implementation in C (because that's the sort of thing that amuses me), and I'll try to minimize external dependencies. Here, I could make up some story about supply chain security, but I could also just admit that I greatly enjoy that this creates a diversity of sometimes ridiculous side quests. It's *my* free time.

  16. In this thread, I will post sporadic updates about my homebrew Lisp implementation project.