Tag Archives: emacs

Lispbian Pi. A Lambda Delta.

I’m conflicted. Part of me says that ‘us old timers’ shouldn’t assume ‘the way things were when we were kids’ were better but we know the Raspberry Pi was an attempt to recapture the spirit of the BBC Micro Model B and that seems to have gone quite well. I got a Pi 2 and I’ve worked out that it is more powerful than the first computer I worked on, a DEC VAX-11/780 which supported about 16 terminals, most used for teaching college level computing. Having that machine to myself would have been an unimaginable amount of processing power for one developer. Banks ran their financial modelling software on boxes like that. So why does the Pi feel so slow? We wasted our gains on GUI fluff.

When I started computing you learned just enough of the command language to get going. So, that’s bash on a pi. Then an editor. For reasons that should become obvious, let us choose emacs. When I first used the VAX/VMS operating system, it didn’t have command line editing. If you made an error, you typed it all again. Getting the facility to press up-arrow, edit the command and re-execute it was a big advance. We should keep it. Bash has that, using a sub-set of the emacs keys, so that’s a way into emacs.

The next big improvements I remember were X windowing and symbolic debugging. We got debugging first but it became far more powerful with multiple terminal windows. The GUI was OK, I guess but DEC didn’t give us many free toys so the main advantage to a developer was having lots of terminal windows. emacs can do that, without the overhead of X.

When I decided to re-learn coding a while back, I got my shortlist of languages down to Python, Java and JavaScript but picked Python because I was already learning a new language and the Object paradigm, so I didn’t want to have to learn web at the same time. I heard about the modern Lisp dialect Clojure and changed horses mid-stream. I’m convinced by the argument that functions and immutability can save the universe from the parallel dimension.

Last night I deep-dived into emacs and found myself in an editor session with 4 windows. Why do I need more than that to learn about computation and data transformation? This guy seems to have come to a similar conclusion http://hackaday.com/2015/09/23/old-lisp-languaged-used-for-new-raspberry-pi-os/ I’ve also wondered whether a purely functional OS might make Sun’s ‘the network is the computer’ dream a little easier. emacs is written in Lisp.

I think a dedicated Lisp machine may be a step too far back. How would you browse in the world-wide hypertext library when you got stuck? But a Linux with bash, emacs, the Java Virtual Machine and libraries, Clojure via Leiningen and Cider to plug everything together might make a fine Lispbian Pi! Is all this chrome and leather trim completely necessary in the engine compartment?

It is unfortunate that the Raspbian upgrade left Leiningen broken.

Advertisements

Learning to grok Lispen

This is not my late entrance into the Unix editor flame wars. I’ve always disliked vi and emacs about equally. I’m sure that both are amazing if you have a memory and use them every day. I don’t. I am, however, interested in computational models. The Unix ‘small pieces loosely joined’ philosophy had always leaned me towards vi. I knew emacs had ‘Lisp inside’ but I didn’t care. I had a bad experience with Lisp at university, but what really put me off was that emacs isn’t just an editor; it’s an environment. It duplicates things that happened elsewhere in Unix. You go in there and you don’t come out until home time. In the Winter, you don’t see light. It is neither small nor loose and I didn’t understand why. Was it the first IDE?

Richard M. Stallman hacked on emacs at MIT’s famous AI Lab. The Lab and its culture were torn apart by a war over intellectual property¬† of the family Lisp machines. It was a difficult breakup and RMS was abandoned by both halves of his family. In reaction to creeping commercialisation he started the GNU project which later enabled GNU/Linux &c.

I’ve realised only recently how incredibly unimportant Unix was to RMS. He simply wanted somewhere to run a Lisp environment that couldn’t be taken away from him, or others who subscribed to the original MIT AI hippy culture and ethics of free sharing of code and information. He ported a ‘C’ compiler to port emacs and started a movement to maintain everything else he needed.

The latest trend in current computing is ‘platforms’. We have gone back to worrying about the ancient concern of application portability. We’ve divided into language tribes: Java, JavaScript, Ruby, Python, .Net, Apple, Google – each with their own library system, to free us from the tyranny of operating systems, designed to free us from hardware. RMS did that in the 70s/80s.

I fought against the idea of Clojure (a Lisp dialect) running on the Java VM rather than a real OS. Another version runs on .Net and one is being ported to JavaScript. I get it now. People want to get stuff done and to do that, they need the support of a tribe (or two.)

MIT’s free educational videos contributed to my understanding of these issues. They used Scheme (another Lisp) before moving to Python to get access to more libraries. Perhaps they should move back to Clojure.