What’s a computer without I/O? Hot Silicon At Best…
I’m completely astonished at how quickly a community has sprung up around Notch’s DCPU-16. In the first 24 hours there were already tens of implementations in various languages (including mine). Now there’s a web-based IDE, a whole C compiler/assembler tool chain, an LLVM backend, … It’s...
Categories: Faulty
Notch is Gonna Outdo Himself!
[Note: I/O has now been added] My son is completely obsessed with Minecraft. It’s an amazing game and the way he plays it, it really nurtures extreme creativity. I honestly haven’t been able to get into it myself but I was pretty intrigued by the ComputerCraft mod which allows you to script the...
Categories: Faulty
Turtle Graphics on the Fignition
The Fignition board is a fun little piece of 8-bit fun I tell ya! I’ve been having a blast with it. It’s an ATmega168 with 8Kb SRAM and 4Mbits of flash with video out (there’s also a sound mod for it). In this post I want to show off an implementation of Turtle Graphics I&rsquo...
Categories: Faulty
Printing Scheme-like expressions using pretty printing combinators
In this post I'm going to show a small printer for Scheme-like expressions using pretty printing combinators in Haskell. The data type definition for these expressions looks like this:data Expr = ScSymbol String | ScString String | ScNumber Integer | ScDouble...
Categories: Faulty
A quick look at Haskell records
While reading the Parsec documentation I learned about a nice technique used to create language definitions. For example:idSymbol = oneOf ":!$%&*+/<=>?@\\^|-~"schemeLanguageDef :: LanguageDef stschemeLanguageDef = emptyDef { commentLine = ";;" ,...
Categories: Faulty
Creating a small parser using Parsec
In this post I'm going to show a small parser for a Scheme-like language written in Haskell using the Parsec parsing combinator library.We're going to start by defining an AST for Scheme-like expressions:data Expr = ScSymbol String | ScString String | ScNumber Integer ...
Categories: Faulty
Introducing the Cult of the Bound Variable to the Cult of Forth
[The twelfth in a series of posts on the evolution of TransForth] It’s been quite fun playing with this Universal Machine from the Cult of the Bound Variable. In this post we’re going to continue the journey toward building a full Forth for this machine by assembling a Forth inner...
Categories: Faulty
A call-with-current-continuation example
The call-with-current-continuation (or call/cc for short) function in Scheme allows the creation of powerful control structures. It basically allows you to capture the current state of a computation as a first class value. This value could be assigned to a variable and invoked later.For a great...
Categories: Faulty
Lego KinNXT
I’ve been having some fun playing with the Kinect SDK and the Lego NXT kit. The protocol to talk to the Lego brick over Bluetooth is pretty straight forward. Below is a little F# module for most of the basic commands. I’ll fill out the full set soon and put it up on GitHub. Using this along...
Categories: Faulty
Programming a 2000 Year Old Sandstone Computer
[The eleventh in a series of posts on the evolution of TransForth]...
Categories: Faulty
Meta-Circular Chicken and Egg
[The tenth in a series of posts on the evolution of TransForth] ...
Categories: Faulty
Going “Retro” and Loving It!
Continuing my concatenative language kick, I’ve been having fun playing with Retro (http://www.retroforth.com) and couldn’t resist making an F#-based VM on which to run it. It is an elegant, minimal Forth with an important twist. What caught my eye is that it supports quotations and...
Categories: Faulty
Going “Retro” and Loving It!
Continuing my concatenative language kick, I’ve been having fun playing with Retro (http://www.retroforth.com) and couldn’t resist making an F#-based VM on which to run it. It is an elegant, minimal Forth with an important twist. What caught my eye is that it supports quotations and...
Categories: Faulty
Project Euler Problem #14
Longest hailstone sequence with starting number under one-million. let hailstone n = Seq.unfold (function 0L -> None | 1L -> Some(1L, 0L) ...
Categories: Faulty
Programming is “Pointless”
Some may call it “pointless”, but I absolutely love the point-free tacit programming style. The level of brevity can be truly astounding! Some of the terseness comes from not having to mention parameter names all over the place and much of it comes from the relentless factoring that...
Categories: Faulty
A quick look at APL
In this post I'm going to show an implementation of polynomial multiplication written in APL and the steps to create it. APLAPL is an array oriented programming language which means it's good for manipulating vectors, matrices and other kinds of arrays. APL has many interesting characteristics...
Categories: Faulty
Spanning Two Worlds
[The ninth in a series of posts on the evolution of TransForth] The dictionary we have at the moment is split across two worlds. The definitions are in Forth-world; packed into plain memory. But we still have the F#-world mapping of WordRecords to those memory locations. ...
Categories: Faulty
Heart Transplant
[The eighth in a series of posts on the evolution of TransForth]...
Categories: Faulty
Tearing Away the Scaffolding
[The seventh in a series of posts on the evolution of TransForth]...
Categories: Faulty