Sunday, July 19, 2009

Single function computer

Virtualisation could present an opportunity in supportability. A virtual machine 9or cluster thereof) could have just a single use, say mail or file server, etc. This gives the usual benefits of virtualisation, but also allows you to restart machines and only affect the single service, which is presumably already compromised. I know restarting a machine is sub-optimal and shouldn't be necessary, however, let's be real here - it does work.

Tuesday, October 28, 2008

Buying a netbook

When I told my wife that I wanted a new computer she told me to write a business case. I ended up buying an EEE PC 901 that is BRILLIANT! More on that later, here was my case in March:

I would like to buy an Asus Eee PC 900, costing £350 (on offer).

There are two reasons I have for wanting a new laptop:
1) I have a hobby (coding) that I get precious little time to practice
2) In the evenings and at weekends you use my laptop, leaving me without a computer

I could gain more time for my hobby (without impacting time at home) by doing it on the train, meaning I need a very, very small laptop. Coding requires a certain amount of computing power, meaning my psion is somewhat underpowered. I don't have much time to devote to my hobby outside train journeys and lunchtimes, which means that getting my psion set up is going to take a very long time. I regularly wish to use my laptop whilst you are using it - I don't begrudge you it, but I think that for £350 we could both have a computer and it would be great!

This particular computer is Asus' latest release of the popular Eee PC (specs: mem-1Gig, hd-20Gig, speed-900MHz, screen-8.9"), the older ones have less memory, less storage, are slower and have a much smaller screen, however they are less expensive. There is an 8G, a 4G and a 2G, which all have a much smaller screen (7"). The memory is less in the 4G and 2G (0.5Gig), the hard disk (hd) is much less in all three (8, 4 and 2Gig respectively) and the speed it less (600Mhz). The price differential is not huge, so I think the extra screen size alone is worth it (£340, £250 and £200 respectively).

Other offerings in this market are:
MSI Wind PC - not out 'til June. Will be bigger but better specs. similar price
ECS G10IL - bigger but slightly better specs (looks really cool too), £400ish, no due date.
Medion Akoya E1210 - some better specs, bigger, not available 'til June (in France). similar price
HP Mini-Note - heavier and slightly bigger, much better specs, but it's £460
Everex CloudBook MAX - basically the same, but unavailable in the UK
CTL 2go PC - no info on availablilty, similar to the Eee PC on specs and price.
Maxdata Belinea s.book 1 - mixture of better/worse specs, £420 is too much
Packard Bell Easynote - smaller screen, more expensive £400
Van Der Led Jisus - lower spec, similar to the 4G on spec and price
Surcouf La Revolution Mobile PC - due out this month, similar to the Eee, smaller screen, £320
Vye mini-v S37BVHP - Much more expensive, but better specs. £720 is too much

Tuesday, July 08, 2008

New approach

I CBA with my psion anymore. It has taken too long and too much effort to get to a state that isn't anywhere near usable for me. There now exists a version of Debian that ought to install, but I need something that can deal with the CF card I bought.. perhaps the CF card is broken, but I just can't get it going. Perhaps I need to install a linux machine to start things off, but hey.. I'll think about that *after* I have done this:

the new Asus Eee PC is out.. the 901, and OMG it's the machine I've been waiting for! recent Atom processor at 1.6GHz, 1G ram and a 20G HD. Linux (some Debian clone) installed and it just works! It's the right physical size (tiny) and has just enough horse-power and, thank the FSM, they made the battery last more than 3.1 seconds. I'll get java 1.6 on there, install ANTLR and whammy! I just have to wait for some availability in the local shop to go look at it (just make sure they haven't added an inch here, a lb there), decide if I want white or black then buy it online for 300quid-ish.

Inappropriately excited? Me? Oh yeah!

Wednesday, November 28, 2007

Too hard

I have gone around the houses a little with my psion. Building a distribution isn't the easiest thing in the world and here were the approaches I tried and have now rejected. First tho' a quick note to say that I looked at just using the excellent stuff on OpenPsion.org. The trouble is that it uses the unsupported wookie release of Debian. This is a 2.4 kernel, an initrd and a pre-built filesystem using the deb packages with some serious cleaning up. I really could do with a 'supported' distribution because I want to install some packages that the original author didn't think of.

First I tried to create an arm-architecture environment under qemu, and use this to compile a 2.6 kernel, uclibc, busybox, etc. There were a few problems with this, the biggest was the Mac compatibility. I never managed to compile qemu on the Mac properly - possbily a bug, possibly my fault - but it was taking me too long to solve. Then I downloaded the Q binary. This was better, but there were issues with the scsi device and again it was taking too long. On Windows it was better - I installed the binary qemu and created a debian basic install, but given I don't use windows at home it would detract too much from my work to do the whole thing at work. Also, I touched on the problem that setting up networking at work would have somehow been too hard. This confused me because the debian installer worked fine, however I was disallowed from enabling network bridging (work policy) when I tried post-install. So it should never have worked.. weird.

So I tried (at work again - naughty) to use the buildroot product from the uclibc/busybox guys under cygwin. Seems this is broken in a number of ways. There is some patchs that are required to fix an undefined reference to _libintl_gettext. I downloaded the patchs from the mailing list but they wouldn't patch properly - patch rejected them. I did a bit more digging and found that cygwin has some case insensitivity that will silently break an include somewhere in buildroot - I think there are two '.s' files with the same name other than capitalisation. Solution that was suggested was to compile on a linux box for comparison purposes. Not a solution I can really work with.

I then revisited the idea of just using the Debian etch install. The vanilla install is HUGE! Far too many megs for me to use. However, I could follow the method used by the OpenPsion guys. I could use ar to unzip the deb archives and manually (with scripts similar to those on OpenPsion) remove the stuff I don't need. The downside is that I will have to use glibc (bigger than I need really) but other than that, everything is binary and ready to go. I just need to cross-compile a kernel (perhaps re-use the config from OpenPsion's 2.4 kernel) and think about the initrd. Perhaps if I compile-in all the hardware support I won't need an initrd and can just boot into the root fs.

So cross-compile time

Tuesday, November 06, 2007

What I did last night

I made first steps into creating an emulation environment for compiling stuff for my psion. I have a PC and a Mac available, but I will probably use my mac most for this. So I downloaded this rather nifty UI called Q for Qeum. I have a psion ready to go, now I just need a linux distro so I can start compiling stuff for the machine. This link should be useful I think (alongside the one int he previous post.

In other news, chapter 1 of my kids book is well under way. Content is probably halfway through. Just remains to write a couple more illustrative examples and some explanitory text for them.

Monday, October 29, 2007

Linux on my Psion 5MX

I have seen openpsion but this is all debian based and I want to be meaner with the resources I allocate.

So, I'll cross compile myself a kernel, uclibc with toolchain and busybox. This should form a basic system (I think). Anything I've forgotten I'll work out as I go.

Then I want to try to get a graphical environment going. X seems like overkill (even if I just use a DirectFB driver), so I'm currently thinking that GTK on DirectFB might do the job.

GTK on DirectFB has several advantages, for example WxWidgets runs on GTK directly, so I can do some ruby GUI work (using WxRuby, possibly). AbiWord might be useful for word processing (tho' I'm not holding my breath here). So this has my book covered.

I believe there are also GTK based PIM's around, although this is more to do with confidence in the community than actual research!

The final thing I want to do with my psion is work on a parallel language. I think I would choose ANTLR to produce a parser/lexer in C and access this through Objective C (I have a religion that forbids me from touching C++ - call me a 'born again OO coder').

Obviously resources are massively constrained - 256Meg HD, 16Meg memory, 36Mhz processor. But, and let's get real here, I used to code on a 486SX33 (slower) with less memory and less HD (at university). Linux was perfectly happy and X11 was just fine. I'm going to be more stingy than before so I should gain some extra space and possibly a little bit extra processor resource. Here's hoping!

Baby book

As I said earlier, I am writing a book for kids to entice some of them into the world of coding. I think I can get quite far quite quickly - kids have no pre-concieved ideas about what is hard and so won't be put off when I start talking about objects, double buffering, threading and network communications.

What language to choose?
I'm not going to write it in Java, C (or derivatives), etc - it takes too much work to do small things: lots of code, creating files, compilation, shared lib mgt, etc. Java, et al are fine for enterprise level, heavyweight or just professional coding, but not for kids to scratch together little scripty examples. I think I'm saying I want a scripting language, so what other ones are out there?

  • I first thought javascript (ECMAScript really) would be a nice language, but the commandline versions of javascript I have found (on the JVM so I can re-use AWT, etc) have broken scoping rules (Rhino and FESI).

  • Groovy appears to have intentionally broken scoping rules, but that's a conversation for me and a Groovy friend of mine. It's worth noting here that this is as 'far out' of the mainstream as I'm willing to go. I want a recognisably 'real' language. Groovy is right on that boundary for me.

  • Lisp of some form might be nice, but I just feel some of the OO implementations are a bit of a cludge. My experience of lisp (scheme, ELisp and CLisp) was that you start from a long way back (by modern standards).

  • Perl? Just no, ok?

  • Python I just don't like - the whitespace thing just stops me every time. This, I know, is my fault. However, I'm aware that it offers nothing over ruby so ruby wins here.

  • Smalltalk was designed to be a OO, scripty, teaching language. Here is where I think I reject it. I am not after a teaching language, I want a 'real' language that can be used for teaching, one where it is a happy accident that it is suitable for learning to code. Have you opened an smalltalk environment ever? Squeak was the one I tried. Holey moley, was it offputtingly busy?! What I objected to was the mental leap reaquired to 'see' the code behind the pretty UI. Perhaps I'm too oldschool in this respect, but I see code as a distinct artifact. Mixing it into the graphical system is interesting, but I think this confuses the issue too much.



I have a friend willing to do the artwork. I think making it visually appealing will be practically as important at the content. Or in other words, I don't think it would work if either are wrong.

What other issues will I meet? It's always good to look to another's experiences. I found this excellent introduction from Chris Pine, so I an awaiting a copy of his book from Amazon.

Projects

My book is running first in my mind - a book for baby geeks. Age group will probably be 10 to 12ish, give or take. I'm hoping a precosious 7yr old might enjoy it too. I probably picked up my first coding book at about 11, but there seems to be very few, if any options available today. I am choosing Ruby I think. More in a later blog.

Second project is to make my psion into a useable linux machine. I do need to get the flexi fixed first, but then off we go. I want this machine for bacis PIM stuff, writing my book and doing the next thing on the list:

Last: write a computer language and VM for a massiavely parallel system. I've blogged before that I believe this is the way things will be and I want a playground where I can test my thoughts (before the hardware catches up). I should spend some time to identify the issues with the other options (like ERLang, Occam (pi) and more traditional threading models an POSIX threads, java, etc.).

Thursday, October 04, 2007

Parallelisation

From the SICP book, I took the cue to go write a processor.

Ok, I wrote a piece of code that has discreet modules for executing a machine-code of sorts. As I have written before, coders will need to think differently in the not too distant future, so I thought I'd write a little language that could support massive parallelization. The more I thought and experimented (with ANTLR mostly) I found that writing just the language with no real execution environment was hard, and really weird!

I was trying to create just the programmer's mental model with no real silicon support (I'm talking 100 processors, not just "quad core bibble inside" dung ding dung ding). So, the answer is a virtual machine! This way I have as much silicon support as I want (it's virtual silicon after all) and I have something to execute my code. One day, maybe there will be a real mega processor machine, but until that I can play with the ideas without the encumbrance of contemporary languages and libraries. I can also (to varying degrees I suspect) exploit the hard work that went into the libraries of that language I am writing my VM in.

I'm using Java for a number of reasons. I will just deal with performance first. I DON'T CARE! This is my playground. I'll deal with performance when it's an issue. I even reserve the right to re-write everything, because this incarnation is only to allow me to explore some ideas!

I'm using Java because I know it quite well. It's higher level than C, allowing me to think in bigger terms than malloc, pointers etc. It's supported on everything. It's not a crusty old lisp machine where everyone argues about continuation passing and nods sagely about first class functions but no-one ever acknowledges that the libs suck and the non-existent syntax (or sugar as some would call it) makes life just tedious. It's not C++ (thank god). It's not tied to a certain OS manufacturer. It doesn't have the syntax (half ton of aspratame I think) that Perl does. It's not experimental like Ruby, Python or [insert name-on-rails here]. It's not dead like Pascal (or Delphi - who was Borland trying to fool?), Smalltalk, Ada, Eiffel, ML (and random derivatives - Ocaml, anyone). The only thing not to like about Java is that it is the business solution of the day. That is to say, it solves many management issues (politics, time/cost, etc) but goes halfway to solving the technical ones (concise definition of 'what I mean').

Enough about Java - I'm writing the next erlang, so step 4 turned out to be "write a virtual machine". I think steps 1-3 were all "go round in circles until you're dizzy reading well regarded texts and coding totally insufficient things". (For those in the know, view manger was my first step). I think step 5 will be to revisit step 3 with the benefit of a VM (syntax and semantic definitions).

Monday, September 17, 2007

Code is data is code (yet again!)

Right, I have previously described the distinction between code and data as purely convenience. In reality, there isn't a difference. However, we can get much more convenient than simply code/data, and most rigorously specified software solutions do. I have held up configuration data and reference data as more obvious examples of the crossover between data and code. However, these convenience names are also excellent examples of why the course-grained data/code split is fundamentally useless.

Let me also here, bring in several strands of computer systems development. Firstly, the user's mental model vs the system model. Logical model vs data model. Ref data, Config and business information.

I'll deal with this over the next few weeks.. first:

Config: the stuff in the code that needs to be changed for each deployment or machine.
Ref data: the libraries of the language that users use, but these libs will grow and change from time to time during the system's lifetime.
Logical model: the raw structure of the language of the user.
Physical model: how the computer implements the logical model.

Documentation is a whole 'nother can of worms here - layers of proof that the models above are accurately generated. Variously these are artifacts to show that that the user's language is understood and interpreted correctly such that the physical model cn always support the user.

How much easier if we always generated systems on the basis of writing a computer language.. Because a computer language is someone's implementation of a programmer's mental model (by a programmer) there is a necessity of rigor that often lacks in lesser systems.

Thursday, June 28, 2007

Love/Hate - Mgt/Tech

This is an insight from a while ago. First, tho', to all my manager friends (who, coincidentally, are all excellent managers): please don't be indignant until you've read this.

Historically techies and managers have always been opposed to each other. See Dilbert for an example of this meme's entrance into pop-culture. I think the two views are a little like this:

  • Managers see techies waste money by doing things in a roundabaout way. The solution to most problems can be solved in some much simpler way.

  • Techies see managers as demanding corners be cut to deliver to a timetable which sould never have been rigidly set in the first place.

  • Techies think managers don't have enough technical knowledge (little knowledge is dangerous, etc).

  • Managers think techies live in some other-world where time/money don't matter.



Now, I've worked in a company with (practically) no management, by design. The idea being that techies don't like management, so we won't have any. The, 'freedom of freefall', was often referred to. I didn't get on with it at all, and with a little distance between me and it now, I can think of reasons why.

I'm a techie, so I make a crap manager. I think about the perfect solution, and the best technical answers. I don't like administration or politics - too floppy, no real answers. I think managers see things completely diametrically opposite from this. Admin and politics are the 'game' and there is no such thing as a perfect solution - only one that is on time, within budget (or close enough given the 'game').

So, managers need techies to answer their problems - obviously. Techies also need managers to keep the admin and politics flowing while they formulate the answer. Techies need to be reigned in to budget and time constraints, but managers need to be reigned into the realities of answering the question.

Managers need techies as much as techies need managers..

I just thank god there are people willing to be management for me.

Monday, June 25, 2007

OO Typing

What is typing? Other than being a fundamental part of OO methods, it feels quite badly understood. I have two intentions here: to analyse the existing definitions and to define my interpretation.

Typing can be static, dynamic, strong or weak..

Ok, this was as far as I got.. I started in June and it's now October..

I don't think this is a lack of understanding on my part - simply that typing is so very fundamental to human thought. This basic-ness means we are trying to grasp the very core of human thought. Take one well oiled eel!..

A type is a pattern (by human standards). This is the nugget which links humans to typing in computing. Strong typing is boldly saying that one particular thesis is correct. It is a strong limitation of the field of possibilities, which is not a necessarily negative thing.

On the positive side there are a number of pre-judgements we can make (or a compiler might make) about some code. This can lead to efficiencies in code production and execution. However it generally tightly binds pieces of code together.

On the negative side, it strongly limits the ability of a piece of code to react in unfamiliar environments. This is the same as saying, "it generally tightly binds pieces of code together".

The reason I prefer stronger typing is that a piece of code can know what it is dealing with. The execution environment can know quickly if a call is incompatible or some coercion is necessary. Hmm, I need more thought because coding for the silicon is letting the tail wag the dog (these days).