(A substantial part of this post was rewritten since it was first posted. I managed to mangle things while editing, and the result was not particularly comprehensible: for example, in the original version of the post, I managed to delete the definition of “mex”, which continuing to use mex in several other definitions. I’ve tried to clear it up. Sorry for the confusion!)
This is actually a post in the surreal numbers series, even though it’s not going to look like one. It’s going to look like an introduction to another very strange system of numbers, called nimbers. But nimbers are a step on the path from
surreal numbers to games and game theory.
Nimbers come from a very old game called Nim. We’ll talk more about Nim later, but it’s one of the oldest strategy games known. The basic idea of it is that you have
a couple of piles of stones. Each turn, each player can take some stones from one of the piles. Whoever is left making the last move loses. It seems like a very trivial game. But it turns out that you can reduce pretty much every impartial game to some variation of Nim.
Analyzing Nim mathematically, you wind up finding that it re-creates the concept of ordinal numbers, which is what surreals are also based on. In fact, creating nimbers can end up re-creating the surreals. But that’s not what we’re going to do here: we’re going to create the nimbers and the basic nimber addition and multiplication
Continue reading Surreal Nimbers: No, that's not a typo!
Our corporate masters at Seed have added a new blog to ScienceBlogs, and it looks like a real winner. It’s called the Denialism Blog, and it’s off to a roaring great start with “The Unified Theory of the Crank. Go check it out!
Since my post on datatypes for my π-calculus language, I’ve gotten a bunch of questions from people who (I guess) picked up on the series after the original post where I said that the idea of the series was to see if I could create a programming language based on it. The questions are all variations on “Why design another programming language? Do you really think anyone will ever use it?”
Continue reading Why am I doing this Pi-Calculus Language Thing?
While browser over at programming.reddit.com, I came across something simultaneously hideous and amazing.
I’ve showed quines before as part of the pathological programming posts: a quine is a program which, when run, generates itself as an output. I’ve even written about a programming language where the only way to create a loop is through quining the program.
But I’ve never seen anything like this before. It’s a multilingual quine: the program below is not just a quine, but it’s simultaneously a quite in three different languages: OCaml, Haskell, and Scheme. I have no idea how the author managed to figure out how to do this; and I probably don’t want to. 🙂
Continue reading True Pathology: A Multilingual Quine
Today’s friday programming language insanity is a tad different. I’m going to look at another twisted stack-based language. I’ve got a peculiar fondness for these buggers, because back in the day, I was a serious Forth addict. One of the ideas that’s actually come up in serious programming languages in the last few years is creating a sort of cross between functional languages and stack-based languages, producing what are known as concatenative languages. An excellent example of an extremely powerful and useful member of this family is called Factor, by Slava Pestov.
But serious useful languages aren’t the realm of my regular friday pathology. So I’m going to tell you about a not-really-serious version of a concatenative language, called False. Semantically, False is actually not a horrible language. In fact, if it weren’t for the bogglingly awful syntax, it’s something I could imagine using for tiny file-filtering utilities. But the syntax is designed to be truly horrible, and when you blend the natural potential for confusion that you get from doing everything backwards on a stack with a syntax that looks like line-noise, you get something that can really sprain your brain.
Continue reading From Beautiful to Twisted in One Syntactic Step: False
(This issue came to a happy conclusion. After the uproar generated by this being publicized by so many blogs and websites, the publisher got in touch with Shelley, gave her permission to use the figures, apologized, and promised to do some internal legal education so that this won’t happen again.)
This doesn’t affect me personally, but my friend and fellow ScienceBlogger Shelly Batts of
Retrospectacle has been threatened by
lawyers from the Journal of the Science of Food and Agriculture, one of the Wiley group’s journals, for reproducing a part of one figure from an article that she was writing about.
In a sane world, this would be a clear case of “fair use”: Shelley was not stealing or taking credit for anyone’s work. She did not reprint the article. She did not write about the work without giving credit to the original authors: she provided a full and appropriate citation of the article. All she was doing is what many bloggers do regularly: she was writing about an interesting piece of research that had been published in her area. But her article doesn’t fit the spin that the authors/publishers wanted to put on it. So they resorted to legal threats to try to shut her down.
There’s really nothing bloggers like us can do to stop publishers from pulling obnoxious stunts like this, except to publicize it, so that they realize there is some cost to them associated with this kind of behavior. That’s why I’m writing this. Wiley needs to recognize that as a publisher of scientific journals, it’s absolutely unreasonable and unacceptable to threaten lawsuits against other scientists who reference their work.
When I’m bored, I’ll periodically take a look at the blogs published by
the bozos at the Discovery Institute. I can generally find something good for a laugh. So I was doing that tonight, and came across yet another example of how they try to distort
reality and use slimily dishonest math to try to criticize the evidence for evolution. This time, it’s an article by “Logan Gage” called What exactly does genetic similarity demonstrate?.
Continue reading Selective Quoting of Statistics: More Dishonest Quote Mining from DI