4 ms·
This was cool, almost as much as for showing weird magic you can do with Linux' ptrace() as for the actual thing done. Also, you know you're reading the page o
by unwind 13y ago
This was cool, almost as much as for showing weird magic you can do with Linux' ptrace() as for the actual thing done.
Also, you know you're reading the page of a True Language ... Person when you get gems like:
Brainfuck isn't the simplest language out there (try Subleq) but it's pretty familiar as an imperative, structured-control language. So I think compiling from Brainfuck makes this feel "more real" than compiling from something super weird.
Not sure how many people consider Brainfuck "pretty familiar" (especially at this level) or "real", even with quotes. :)
- arethuza 13y agoNumbers? Memory addresses? Subleq is rather baroque compared to the ascetic world of combinators... ;-) NB: As a final year project on my CS course in the 80s I did benchmarking on the efficiency of different sets of combinators for executing a toy functional programming language - the simplest set of combinators I used was SK and that was quite impressively awful to do something like multiplication. Quite interested to see how bad a single combinator scheme would be....
- sp332 13y agoHere's the simplest one I can find, the Binary Lambda Calculus: BLC Syntax <term> ::= 00 | 01 | 1 <term> <term> BLC Semantics (as string-rewriting rules for any terms x, y, z) 1100xy --> x 11101xyz --> 11xz1yz http://homepages.cwi.nl/~tromp/cl/cl.html http://homepages.cwi.nl/~tromp/cl/cl.html
- reeses 13y agoIt's a bit tongue-in-cheek. Much of the narrative is, with cute tidbits such as Code that self-modifies by calling read() is clearly the future of computing.
- squidfood 13y agoOnce you get started with a Brainfuck problem, it's amazing how quickly you forget that it's supposed to be "unusable" and dive into the algorithms like any other language.