Fedora 12 on an Apple iBook G4

I have an old (2004 era) Apple iBook G4, PowerPC architecture.  Great machine, hardware in perfect condition, but only 512MB Ram..  Having updated it with the latest software, it began to really struggle.  Retirement loomed.

Cue Fedora 12..  installed the PowerPc spin.. and everything worked perfectly!  The machine has a new lease of life, and comes with  sufficiently up to date tools – Git, LaTeX, Texmaker, Haskell Platform.

This got me thinking – if Europe really wants to save electronic waste, it should mandate operating system suppliers support 10 year old hardware, which is, after all, often perfectly good.  Another systemic failure there.

Posted in Systems | Comments Off on Fedora 12 on an Apple iBook G4

Evolved versus Designed Systems

Most systems are evolved, not designed.

So what?

Well, evolution doesn’t yield globally optimal solutions, just locally optimal solutions.  After all, that’s good enough for a creature, reliant upon local adaptations to survive in its environment.  But for artificial systems like money, systems of national governance, and the UK housing market, that’s just not good enough.  We like to think our systems are optimal, when in fact, they’re sub-optimal.

Worse still, those with the power to change those systems, curiously lack the will once they’re in a position of power.  The natural selection function is ‘good enough’ for them; after all, they made it, why don’t you?

Designed systems, on the other hand, are very different.  A group takes a decision to actively design a globally optimal system.  It may not be palatable; it may not be immediately attainable; and it may not please vested interests. However, such a creation is a worthy creature, for it aspires to something higher: the satisfaction of global requirements, in which no single viewpoint is allowed to dominate.

Mathematics will come to the fore; the design will be tractable, provable, and verifiable.  By stating its mathematical DNA, the designed system can be improved, evolved through local suboptimal minima, to a globally more optimal peak, as circumstances change.

In a designed system, natural language – long the untestable domain of lawyers, accountants and politicians – will be supplemented by something more precise and robust.  The system will be engineered.

Posted in Systems | Comments Off on Evolved versus Designed Systems

Choosing a Linux distro

I’ve been using Linux Ubuntu for a while; however, just couldn’t quite get the Haskell platform running smoothly, and ‘cabal update’ just wouldn’t play ball.  Ubuntu also felt a bit clunky – big chunky GUI, and slightly removed from the underlying O/S.  Toyed with a move to OpenIndiana – I like the simplicity and robustness, but then after some research I decided to switch to Fedora (didn’t quite fancy all the manual config needed by ArchLinux).  Pretty impressed so far; installer replaced the existing Ubuntu install without trashing the Windows partition on my dual boot.  Grabbing the latest supported Haskell Platform (2011.2.0) went without a hitch, and ‘cabal update’ works again as it should.  Back to work!

But… (a few days later)… wireless (USB device) on Linux is terrible.  Very unreliable; you can spend hours fiddling around with ndiswrapper and other geeky stuff.  My advice… just use a network cable, and if running a laptop, probably best to stick with Windows.

Posted in Functional Programming | Comments Off on Choosing a Linux distro

Time for some Raspberry Pi

I’ve just ordered a raspberry pi!

www.raspberrypi.org

A great piece of kit; I think this is the future of embedded computing, with an incredibly low cost entry barrier.  A potentially disruptive technology, and certainly one to watch.

 

Posted in Embedded | Comments Off on Time for some Raspberry Pi

Favourite Haskell Books

There are many textbooks and websites covering Haskell.  I find nothing beats a book to read on the train; many of these books are also available ‘free’ online, but if you really want to support Haskell and expand the community, buy the books!

Here are my favourites:

Real World Haskell

www.realworldhaskell.org

Not quite an introduction, more of an intermediate level text.  Covers a wide range of topics; essential for – as they say – real world haskell.

The Haskell Road to Logic, Maths and Programming

http://www.amazon.co.uk/Haskell-Road-Logic-Maths-Programming/dp/0954300696

A great book!  Really gets you thinking about Haskell as a mathematical tool and specification language, not just a programming language.  Refreshing to dip into.

Learn you a Haskell for Great Good

http://learnyouahaskell.com/

Still the best – you just get on with it.  I used this to write my first programs, particularly the material on file IO.  In general when I’ve done “Hello World” in a new language, I want to write a script-type program – read input, process it, generate output.  This gives me an early indication of how straightforward the language is.  This resource tells you how to do it.

Programming in Haskell

http://www.cs.nott.ac.uk/~gmh/book.html

A useful adjunct to Real World Haskell; good material on parsers.  Still reading..

Posted in Functional Programming | Comments Off on Favourite Haskell Books

First impressions of Haskell

Earlier this year I started learning Haskell (www.haskell.org).

I am really impressed with the language: it is succinct with strong static typing, both interpreted and compiled, and – best of all – functional!  Haskell reminds me that ultimately computers are no more than glorified calculators applying functions (aka programs) on inputs to yield outputs.  Those functions are – through the richness of Haskell – sets of equations.  With Haskell the programmer need not worry about the (largely uninteresting) detail of the von Neumann architecture, bits and bytes, numeric representation, pointers, etc.  The language abstracts away from that detail (although you can dive back in when you must through monads, a key part of the language).  At last we can focus on the mathematics of the problem. We are – to a great extent – set free.

I’ve previously worked in a range of imperative languages: C, C++, Java, Python, Ada and SPARK.  Now, having learnt Haskell, what they say is true – I can bring a functional programmer’s perspective to an imperative world.  This greatly simplifies problem solving.

I also really like the integration between Haskell and Z (a formal specification notation).  Z focuses on types, sets and relations, just like Haskell.  They both possess rigorous mathematical foundations, and supply precise semantics.  But Haskell goes one better; unlike Z it is executable!

Furthermore, in contrast to imperative languages, Haskell programs encapsulate their own specification, through function signatures and their strong static types.  Functions are typically “pure”, that is, they possess no side effects, and rely on no global state, the bane of typical programming in imperative languages.  Call a pure function with the same inputs in a changing environment, and you will get exactly the same outputs.  This referential transparency makes a Haskell program much easier to test.  It kind of “just works”.

Posted in Functional Programming | Comments Off on First impressions of Haskell

Relaunch of site – 2011

Welcome to the new greenliving site!  After taking a few years out, I’ve decided to relaunch, but this time focusing on a broader theme – systems.

The previous site, which I published from 2005 to 2007, is retained for the record.  It focused on environmental issues, exploring topics such as renewable energy, transport, carbon profiling and permaculture.

However, since then I’ve concluded that environmental issues are an instance of a more general problem we face as a civilisation – that of complexity, and how it dominates our lives.  Witness the rolling financial crises from 2008 to 2011 (and counting), our captivity in the face of a damaging UK housing market that serves no-one, and the way in which politics lurches from one event to another, rudderless, MPs trapped in a system they cannot change.

I believe that we are out of control, for our evolved (and largely accidental) systems control us.  We lack the tools to diagnose or the confidence to declare ‘this system doesn’t work’.

The new site will explore some of these topics.  I promise no answers, but hope that some memes may escape, and in so doing that they help others to thrive.

Green Living Systems are systems that reflect a better engagement with our natural world.

Posted in Announcements | Comments Off on Relaunch of site – 2011