mind on fire RSS

somewhere for me to put things so you can see them

Blog Catalog



Webstraction 2: from Unix history and Assembly language to DeLanda

I was reading chapter 2 of Origins and History of Unix, 1969-1995 (complete with Lou and Andy-esque image of Ken Thompson and Dennis Ritchie). That chapter mentions the original announcement of Unix from 1974: The UNIX Time-Sharing System, to which we owe much of the current operating system conventions now taken for granted (files, folders/directories, users, etc.). I had a terminal open (in OS X) and was (with due care) typing in the various commands to see what has survived in the FreeBSD (the earliest web servers ran on BSD Unix) that underpins OS X. Most remain, probably because they’ve never been bettered. To quote the paper:

Given the partially antagonistic desires for reasonable efficiency and expressive power, the size constraint has encouraged not only economy, but also a certain elegance of design.

Quietly sitting among the examples is just a hint of Assembly language. Whenever I mentioned programming languages to my dad, he always said ‘machine code or assembly?’ which used to stop me talking. Now, since I’m a programming tourist, I sought out a tutorial for Assembly and found three examples. OS X already has the nasm assembler used in these tutorials, but I couldn’t get the examples to run until I emailed the author of one who pointed out that the problem was with the binary format. Most tutorials give ‘elf’ (for Linux) and ‘aoutb’ (for BSD) so OS X complains:
ld: hello.o bad magic number (not a Mach-O file)
yet ‘Mach-O’ fails as a format, and if you man nasm you get only bin, aout and elf file formats - man ld is no more helpful. After a surprisingly lengthy search (why is it so hard to find this basic info?) I discovered (can’t recall where) that ‘macho’ is the option to make the Mach-O format for OS X:
nasm -f macho hello.asm

Combined with the little bit of learning that happened, that took about half a day.

Oh yes, and here’s a TextMate Assembly bundle which highlights the tutorial example code nicely (Assembly TM bundle discussion).

I probably won’t be going much further with Assembly - I’ll leave that to those who really know what they’re doing. But I hope the above helps open the door if you’re just starting, and use OS X.

Sub-webstractions taken on that journey: using SVN to install and update TextMate bundles for Django, JQuery and HTML::Template. While looking for those, I discover an old email from Greg Turner that mentions the Mexican Philosopher/programmer Manuel DeLanda and the notion of meshworks (in contrast to interarchies), which prompts me to start reading three of his papers. The topic of differences between behavioral and symbolic AI crops up in another paper I’m reading; there’s also an interesting Open Source paper and a (Real Player) lecture on art and programming. I return to the TextMate bundles and decide that the process needs automating. Then find out someone has done that already (as separate shell scripts for each bundle). But eventually rewrite it as tm_bundle.sh anyway.

Webstraction timer: all day and then some

Actual work done: undefined

  1. daveeveritt posted this
blog comments powered by Disqus