Tag Archives: Raspberry Pi

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.

Advertisement

Licensing Pain

It’s a very long time since I’ve used any software that requires a licence but I decided to try the patented MPEG2 codec licence for my Raspberry Pi, to decode MPEG2 in hardware. Now I remember why I disliked software licensing so much. This was the process I followed for the Pi’s default Raspbian operating system.

Step 1: Find my Pi’s serial number. At the command line, type:  cat /proc/cpuinfo
The last line, starting Serial: is the unique number of your Pi.

Step 2: Find where to buy it. http://www.raspberrypi.com/license-keys/
Enter the serial numer of the Pi you wish to buy the licence for..
Pay £2-40 and wait for an email. It may take up to 72 hours. I assume this is because a unique(ish) key must be generated.

Step 3: Add the following line to “the config.txt file in the FAT partition of your SD card:

decode_MPG2=0xfdb4a3ac” You may note that this is not the 10 digit hex you were expecting. That doesn’t matter. The first two digits must be implied zeros.

Others told me this meant sudo my chosen editor to add the line to /boot/config.txt then save and reboot.

and “If you want to verify that the codecs are now enabled, the following commands will report their status:

vcgencmd codec_enabled MPG2”

Step 4: Wonder why that didn’t work.

In my case, I was typing:
“vcgencmd codec_enabled mpg2”. It said mpg2 was disabled. In reality, there was no “mpg2”, because it’s “MPG2”. Case matters.

 

20 Years Since Historic Brum Linux Event – ‘A storm was coming’

I did some Twitts this morning:

“The history of Welsh computing: Inmos Transputer, Raspberry Pi. Impressive. Whatever happened to parallel processing? Or druids.”

[At this point I did a search to check ‘David’ Cox’s name]

“…I should probably have included Alan Cox’s networking contributions to the Linux kernel in between those two.”

“… At least I now know what happened to one of the druids.”

[When I saw the photos, I thought 2 of them were a young RMS ]
https://en.wikipedia.org/wiki/Richard_Stallman

“…I just learned that Alan Cox comes from Solihull, which may explain why I think I may have met him at the first Linux event I ever attended”

[Then I went back to the search Window and found this link]

“…Isn’t The Internet good? This meeting!

[18th September but which year: 1994? The first release of the kernel was in 1991.
but http://www.ukuug.org/about/timeline/
shows MH was UKUUG newsletter editor 1995-6.
Are we approaching 20 years of Linux (or “Free Unix”) in Birmingham?]

Yes kids, my first Linux distro was Lasermoon. Martin Houston also wrote the magazine article that caused me to be there and started SBLUG.”

Martin Houston was a quiet, unassuming programmer who first brought Linux to the attention of me and probably most people in Britain who’d heard of it at that point. He was “the organiser” of the UK  Unix User Group Linux SIG. I think his article in one of the DEC magazines was the first time I ever saw Linux mentioned and this meeting was at DEC’s office on the Birmingham Business Park, organised by the DEC User Society, DECUS. They must have been trying hard to recover from Ken Olsen’s accusation that Unix was snake-oil.

Soon afterwards I went to either the first or second meeting of the South Birmingham Linux User Group. Martin understood the importance of marketing and coined the phrase “A storm is coming and its name is Linux” which,  for 1994, showed remarkable foresight and possibly misplaced confidence. A few years later, Martin turned up at Powergen in Coventry as a contract programmer but I haven’t heard of him since.

I remember that the demonstration of a Linux installation on a “portable PC” (they didn’t fit on your lap then) by Colin Bruce of Coventry University involved floppy disks and a parallel port network adapter (‘portables’ didn’t have a network connection. What do you think this was, The Future?)

And yes, Linux kernel hacker Alan Cox, famously Welsh, is a Brummie.