?

Log in

STEPS Toward The Reinvention of Programming - Luke's Weblog [entries|archive|friends|userinfo]
Luke Gorrie

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

STEPS Toward The Reinvention of Programming [Oct. 9th, 2008|02:29 pm]
Luke Gorrie
[Tags|]

I'm very happy to be visiting Alan Kay's STEPS project. I'm here to help "take back the hardware" and run the newly emerging programming environment directly on our computers without depending on Unix or Windows. Practically speaking this means I'm hanging out with unusually interesting people and learning to program PC hardware with cola.

The code is all free software and I'll try to share everything I learn here on this blog. You're welcome to join in :-)

I've been working with resident wizard Ian Piumarta and now he/we have setup a pretty reasonable first-cut environment for writing cola-based operating systems for the OLPC-XO. Here's what a hello-world-esque operating system looks like:

{ import: Object }

[
    'Hello world' putln.
    1 to: 10 do: [:i |
	1 to: 10 do: [:j | (i * j) print.  '\t' put].
	$\n put].
]
and here's a cheatsheet for how to build it on a Linux host:
svn co http://piumarta.com/svn2/idst/trunk idst  # -r 563
cd idst
make                           # build cola
cd function/examples/xo; make  # build OS support based on Openfirmware
cd hello; make                 # build hello-world OS
ls -l hello                    # that's your operating system
-rwxr-xr-x  1 lukegorrie  wheel  1574003 Oct  9 13:19 hello
To boot this fellow on an XO you'll need to have the developer key installed so that you can use the Openfirmware forth prompt. Then you can follow these steps: copy hello onto a USB stick, insert into XO, power on and interrupt startup (you should see the ok Forth prompt), then type this:
boot u:\hello
There're plenty of other variations for booting and you can read more about that. I use a olpc.fth that hops on the wireless network and downloads the OS from my Macbook via tftp.

If you want to write your own operating system hopefully you'll find hello.st and its Makefile an easy example to follow. Leave a comment if you do!

LinkReply

Comments:
From: (Anonymous)
2008-10-10 11:20 am (UTC)

Cola

Great post, Luke. Thanks a lot for your efforts. :-)
Greetings, Dressguard!!!
(Reply) (Thread)
[User Picture]From: lukego
2008-10-10 02:52 pm (UTC)

Re: Cola

You don't have to thank me, but you could post something relevant :-)
(Reply) (Parent) (Thread)
From: (Anonymous)
2008-10-11 04:59 pm (UTC)

Re: Cola

I just admire you, Luke! ;-)
Greetings, Dressguard.
(Reply) (Parent) (Thread)
[User Picture]From: ailev
2008-10-10 07:13 pm (UTC)
I wonder that Forth and Cola have meet in XO. Both languages design goal was compactness, with FORTH as language of extreme early binding and Cola as language of extreme late binding.
(Reply) (Thread)
[User Picture]From: lukego
2008-10-10 11:04 pm (UTC)
Forth and Cola actually have a lot in common at the runtime-system level. I'll elaborate on that when I understand Cola better though :-)
(Reply) (Parent) (Thread)
[User Picture]From: ailev
2008-10-11 05:45 am (UTC)
I always suspect that Forth and Cola very similar in many respects. And their's virtual machines too. When you'll elaborated on that, please, write about it to FONC mail list. I think this will be interesting to all list participants. You are in unique position: you have both Forth and Cola in one computer.
(Reply) (Parent) (Thread)
From: (Anonymous)
2008-10-13 12:35 pm (UTC)

The Gorrie Chronicles

You're visiting Viewpoints? Very cool!

How long are you there?
(Reply) (Thread)
[User Picture]From: lukego
2008-10-13 07:49 pm (UTC)

Re: The Gorrie Chronicles

depends on my conduct I'm sure :-)
(Reply) (Parent) (Thread)