Static Typing (by )

I read this fine blog post

And this is precisely what is wrong with dynamically typed languages: rather than affording the freedom to ignore types, they instead impose the bondage of restricting attention to a single [sum] type!

Ah, bless. The author means well, but is confusing matters. They're kind of right that the distinction between so-called "dynamically typed languages" and so-called "statically typed languages" isn't what people think it is, but I think they've still not quite grasped it, either.

Certainly, almost all languages have types of some kind (the only real exceptions are ones that directly operate on memory as an array of bits, and expect the user to request the interpretation of any given region of memory in each operation, such as assembly language). So-called "dynamically typed languages" (let's call them SCDTLs from now on, and SCSTLs for so-called "statically typed languages") usually have numbers, and strings, and so on as separate types. What is missing in them compared to SCSTLs is the ability to say "This variable will only ever hold variables of a given type"; and the argument of the author is that, therefore, SCDTLs force every variable to be of a single "could be anything" type, while SCSTLs let you be more expressive. And in an SCSTL you could indeed create a big sum type of everything and use that for all your variables and, pow, it'd be just like a SCDTL, once you'd written all the clunky wrappers around stuff like addition to throw a run-time error if the arguments aren't all numeric, and unbox them from the sum type, and box the result up. Oh, and you need to maintin your giant Anything Sum Type, adding any user-defined types to it

That's what the author omits to mention. SCDTLs have all this automatic machinery to do that for you, while in SCSTLs you need to do it by hand! Eugh!

Working with sum types is useful. It's handy for writing programming tools such as generic container data structures. SCSTLs tend to have tools such as parametric types to act as a short-cut around the difficulties of doing that stuff with explicit sum types, but it boils down to the same kind of thing under the hood.

Now, a lot of the rhetoric around SCSTLs via SCDTLs comes from a rather blinkered viewpoint, comparing something like PHP (almost everything fails at run time!) to something like C (sum types are like pulling teeth!) - both sides have come together a long way.

Haskell is perhaps the shining example of a SCSTL nowadays, with its polymorphism and parametric typeclasses offering advanced ways to express huge sum types without having to spell them out.

And from the SCDTLs side, Common Lisp lets you declare the types of variables when you want, meaning that they are assigned the "Anything" sum type by default, but you can narrow them down when required. That gives you the convenience of an automatically-specified and automatically-unboxed Anything sum type when you want it, plus the static checkability (and efficient compilation) of finer-grained types when you want them. (And Chicken Scheme's new scrutinizer and specialisation system is a rapidly-developing example of a similiar model for Scheme, too).

And there's no reason why the SCSTLs can't come further, with an inbuilt Anything type and automatic boxing and unboxing of sum types, and more flexible type systems that can express more subtle distinctions, reducing the cases where "it's just too complex and we need to go dynamic".

Then we'll meet in the middle, and the only difference will be that SCDTLs have a syntax where type declarations are optional and default to Anything, while SCSTLs have a syntax that makes you declare types, even if they're Anything. They'll largely become interchangeable, and instead, we'll compare languages' type systems on a different scale: how complicated they are.

You see, Haskelll's type system can be hard to understand. It's quite complicated, in an attempt to be able to statically describe all the sorts of cases where people might wish they had a SCDTL instead. The development of type systems has largely been one of dealing with this; starting with things like generic container classes, then getting into complex stuff about being able to make the types of parts of a product type dependent on the values of other other members and whatnot, fine-grained types such as "odd integer", and so on. As SCDTLs gain the ability to declare types, they tend to start off with quite simple type systems, as it's easy to "just go dynamic"; they're initially happy to put in a bit of typing to speed up inner loops of numerical code and to tighten up error checking on interfaces. While languages without easy access to an Anything type rely on having a type system that can express lots of things, because it's a real pain when they have to escape it. But if they meet in the middle, the tradeoff will, instead, be one of a more complete type system that lets you check for more at compile time and gain more efficient code generation - versus the mental burden of understanding it.

I suspect that Haskell is, perhaps, a bit too far in the "complex" direction, while the support for parametric containers in Chicken Scheme is weak (why can't I define my own complex type if I create a "set" or "dict" container implementation, for example?) - we'll meet somewhere in the middle!

[Edited: Clarified the initial paragraphs a bit]

The Long Game (by )

I've written before about my plethora of projects and how I'm trying to spend more time on them, and to focus on ones that can produce immediate rewards (such as Ugarit) at the cost of longer-term ones (such as ARGON).

However, I have projects I can't even start on without access to massive resources. I have them Far Out Beyond The Back Burner, just in case I gain the resources required to start them within my lifetime, but without any great expectation of doing so.

I'm listing them in an approximate order based on what ones I think would be easiest to start, and would in turn make later ones more approachable.

Molecular nanotechnology

I'm hoping for a proper Drexlerian revolution of molecular manufacturing. A post-scarcity economy of cheap diamond and home production of anything you can download or design a plan for, as long as it doesn't require exotic atoms (which only really rules out nuclear devices; no big deal).

Post-scarcity is always a relative term, however. Sure, we'd be in a world where we can use solar power to directly convert our own waste products back into all the goods we currently hunger for; where a small patch of land gives you enough space to plant a tiny nanotech seed (that anybody else on Earth can make for you at practically zero cost) to grow yourself a solar array and then use the energy from it to harvest raw materials from the ground and air to make yourself a house that provides a level of material luxury beyond what even the richest humans alive right now can have. But we'd still need some kind of economy to buy land in the first place, and to buy skills and services (from designing things you can tell your home to build for you to entertainment).

I hope that my skills as a designer of intricate systems would be held in high regard in such a world, so I don't need to spend too much time working. As a molecular assembly unit can just be fed a design and sit making it overnight, I won't need to spend my time laboriously making complex machinery; I want to focus as much as possible on spending my time designing the machinery and software for my next steps.

Get offworld

However, although I'll still need money to buy services, I have some plans that would require large amounts of material, and that might be expensive as the human population rises. So I'd focus my available resources on building one of those tiny nanotechnological seeds and firing it into space, to start converting asteroids into nano-replicators, under control from a nice radio dish I'd command my house to grow. I wouldn't be the only person to think of this, and I could expect territorial claims to start appearing around the solar system pretty sharpish, so it would be good to start quickly.

I might stay living on Earth, or try to build a large spacecraft and relocate to orbit if that's practical. However, my physical location will be largely irrelevant, and more so in later stages of the plan.

Artificial intelligence

Having to work so that I can hire the services of humans to fill in gaps in my design skills, or just to save me time so I can progress my plans faster, is a bottleneck. And a risk, as the rest of the human race may not react rationally to the emergence of a post-scarcity world and start wiping itself out. One way out (which is rather speculative, as I don't know if it would work) would be to turn all that asteroid mass I'm converting with my space probes into solar-powered computers and setting them the task of evolving intelligence in a simulated neural network or rule engine. Rather than doing lots of hard thinking about the nature of intelligence, I'd brute-force it - a massively parallel genetic algorithm trying to find a configuration of the simulation which can answer questions I'd feed into it. I'd train it on a mixture of my own questions and exercises from textbooks in fields of interest to me. With a large enough training set, I should be able to evolve a system that's a general function from questions posed in English with access to the background knowledge implied by the kinds of textbooks I trained it from, to answers in English. If it worked, I would have an artificial intelligence, without an artificial sentience.

That difference is quite profound. Artificial sentience opens up ethical questions: should it have the rights of a person? But I have no need to create a mind in the image of my own, with desires and awareness of time and sensory capacity and a continuity of consciousness based on memory of past events. All I need is a function from question to answer, that can be embedded into software that needs it. I can ask it questions beyond the scope of its training (if I manage to evolve it to be sufficiently general) by including appropriate textbook material in the question.

I could use it to solve problems by posing them as questions, firstly. But I could also use it for intelligent automation; systems could react to events by feeding the nature of the event, as well as background information about the situation and relevant history, in as part of a question as to the best course of action to follow to meet some defined goal.

Weak life extension

I may be lucky to get this far within my lifespan as it stands, but I don't want to risk any further, so I will have been learning (or assembling reference material for my AI) about human biology sufficient to cure ailments, and decelerate or reverse the process of aging, in case I need a bit more time to complete the next stage.

Accelerated consciousness

We think by exchanging pulses between the neurons in our brains. The neuron is a cell that, beyond the normal structures required of a functioning cell, contain one or more long thread-like structures called axons, which enable the neuron to connect to other neurons elsewhere in the brain; and the connection points, which are called synapses. We're still a bit vague on exactly what happens inside the synapses; we have an idea of their properties, but we can't really test it well enough to see if it's complete. Hopefully nanotechnology will let us put probes inside working neurons and examine them better.

But fully mapping the function of the synapse can come later. I'll start with a lower-hanging fruit: mapping the functioning of the axon.

Signals travel through axons at about eight metres per second. Signals travel through copper cable at about two hundred million metres per second. If I could inject nanomachines into my cranium that would trace out the neurons, finding the synapses and the axons that join them together into the neuron, and bypassing the axons with insulated copper cables carrying electronic signals directly between the synapses, I would significantly increase the speed at which I thought.

The danger would be timing dependencies in the brain. If a neuron fires, sending a pulse down a long axon, while the same pulse also travels via shorter axons through one or more extra synaptic junctions, then changing the speed of propogation down axons without changing the speed of processing of synapses would result in the relative timings of the effects of the initial firing arriving at the destination differing. So I'd start by having my electronic bypasses insert a delay to more exactly simulate the original axons at first, and try selectively decreasing it in various parts of my brain first, to see what happened (and with an automatic return to normal timings after fifteen seconds, like when you change the resolution on your display and the OS isn't sure if you can then actually see the dialog asking you if the result is OK).

In the worst case, I'd have to take time to study the synapse so I could model it in an electronic system and thus create a timing-perfect electronic model of my brain, but that would take longer. It is necessary for later steps in the plan, but it would be nice to reap the benefits of accelerated consciousness sooner than that, in order to make better use of my time.

It's hard to say how fast I could make myself go. The hard limit (if the response of the synapses was irrelevant to the speed of thought, and axon delays were the limiting factor) would be that I would think two hundred million divided by eight, which is twenty five million, times as fast. At that speed, anything that wasn't moving at a good fraction of the speed of light would appear immobile to me. I would seem to be frozen, stuck in an immobile body, and I'd probably go mad from boredom and claustrophobic panic. So I wouldn't do that. Since I'd already tapped all my axons, I'd divert my peripheral nervous system to a virtual body in a 3D computer simulation. Then I could do all the thinking and planning and designing and reading and writing I wanted to. Of course, fetching stuff from the Internet would be a pain; if I sent out an HTTP request to Wikipedia for some information, it would take a long subjective time for the response to come back. Likewise with communicating with friends by IRC and email.

But even if removing axon delays only made my thoughts happen ten or a hundred times as fast, due to synapse delays being significant, I'd still need to go into a virtual world to live without the slowness of my physical body trapping me. And unless it was only a few times as fast as normal living, I would find myself spending a lot of time waiting for the world outside to react to my latest HTTP request or other action.

So I would probably program my control software to make my synaptic delays infinite - suspending neural firing - until something interesting happened (or a timeout occurred; I'd want to wake up at least once a millisecond just to see what was happening through my real eyes, in case there was an explosion in progress or something else I needed to attend to).

I'd probably want to automate management of my body. Walking by taking note of my inner ear and eyes a hundred times a second and deciding what impulses to send to my muscles would be hard work; I'd need to automate it to the level of choosing a direction of motion and a desired body position and facial expression and letting the computer walk for me, checking up on it ten times a second or so. I'd want to be able to tell my mouth to speak a sentence and leave it to get on with it, and whenever I checked up on my body I'd replay to the past few seconds of recorded audio and video so that I could discern speech directed at me.

Driving my physical body might take only a tiny fraction of my time. So why not drive several? I could control heaps of robot bodies at the same time, by just examining the state of each in turn, via radio links. I could be an entire team of robot ninjas infiltrating a building at the same time. That would be awesome.

However, interacting with computers would be a pain. As much faster as my brain was, computers would be correspondingly slower. My 3D virtual world would need to be quite basic, even with a massively parallel nanotech computer rendering it and only needing to render my foveal region in full resolution, or it just wouldn't be able to generate frames fast enough for me. Waiting milliseconds for a web browser to actually render a page into an image would be intolerable. I would need to run very simple software on very fast processors if I wanted interactive responses.

But either way, my main limiting factor - time to design things - is now significantly relieved.

Mind transfer

But the logical next step is to get rid of those synapses, and entirely replace my brain with an electronic version. This would gain me the rest of the speed improvement available. Also, an electronic synapse would probably be smaller than the real thing, and it wouldn't need the body of the neural cell any more, so I could make my entire brain much smaller, thereby gaining an extra few times speed by just removing the distances those two hundred metre per second electrical impulses have to travel.

But being a fully digital simulation would have other benefits. My neural interconnection map and synaptic states would be a string of bits that could be transferred and a new electronic brain built and initialised from. This could be used to back me up in case of the physical destruction of my brain and body. It could also be used to work around the annoying consequences of communications delays being so notable when living at twenty five million times the normal speed; I could transmit my brain state into deep space and have my brain constructed there in order to get hands-on with some process, then send it back afterwards (or resume the old version still at home if the transferred copy is lost or corrupted somehow). If I build a solar antimatter refinery and made enough antimatter to send a nanoseed probe to Alpha Centauri at nearly light-speed (which might take a decade or so), and had it build an installation there, I could even visit it at the cost of four years of unconciousness while I was in transit each way. But that's nothing compared to the costs and risks of sending my physical brain there and back.

In principle I could duplicate myself and run multiple instances of myself in parallel, but I don't think I'd need to - with accelerated consciousness, I don't think that thinking time would be my bottleneck any more. A reason to run clones of myself at great distances in order to have more real-time interaction with events over a large area might develop, but I don't know of any reason why I'd need to do that, offhand.

Acausal near-godhood

So, assuming I've managed to not kill myself by tinkering with my brain, and I've not run into competition with other humans and been imprisoned or destroyed by them, I'm now a disembodied intelligence able to simultaneously operate bodies anywhere within a few tens of light-milliseconds of wherver I'm currently sentient from, and able to migrate between brains at the speed of light, and to be fairly immortal due to having backup copies of myself that activate if the "currently live me" stops checking in every millisecond. Arguably, I will have crossed some kind of technological singularity, as tinkering with my own cognition has made me able to out-think any normal human being (or team thereof), purely by being able to research and plan my actions in great detail - in the time it takes a visual signal to travel from the eye to the brain of a normal human being. But the post-singularity me would still be perfectly comprehensible to a normal human and vice versa; it is the quantity of my thought which will improve, not the quality.

Perhaps I will have had to leave the solar system of my birth by now, in order to keep my freedom from other humans, or whatever becomes of governments and corporations in a post-scarcity world, trying to lay claim to resources I need for my plans. But ideally I'll still be in touch with a happy brotherhood of humans rather than striking out alone or with a small circle of like-minded family and friends.

However, this next stage will probably have to happen in another solar system. Even if the rest of the human race isn't particularly hungry for energy and I can have the entire output of the Sun, that might not be sufficient. And if my experiments fail, I might destroy the solar system. So this step probably needs to happen in other star systems.

Basically, I want to implement time loop logic. There's a number of ways that might allow us to send a single bit of information back in time, and that's all I need. Perhaps I can string a cable (or send a photon) around a rapidly rotating singularity, or a uranium atom spinning in an intense magnetic field, or through the centre of a ring singularity, in order to create a timelike trajectory. Or some trick involving quantum mechanics. I'll try them all, and any others I or my AI manage to come up with.

Now, being able to build a hypercomputer with time-loop logic, and being able to solve NP problems in polynomial time, would be pretty neat. But that's not the eventual goal. Rather than just implementing pure functions such as prime factorisation in the hypercomputer, I want to perform I/O. With side effects. From inside a time loop.

You see, the consistency principle which underlies time-loop logic can be justified in quantum mechanics; in the presence of a time loop, the wave function of a contradictory state cancels itself out and becomes zero because of the link between its past and future. This is used to ensure that the desired answer arrives out of the negative delay gate in the first place, by ensuring a contradiction if it doesn't.

But what if we have a sensor attached to the computer, and arrange to have a contradiction if the value of the sensor is not equal to a desired value? Situations where the physical system monitored by the sensor would fail to produce that value are contradictory, so the physical system's wave function cancels them out and we can only have the desired states.

That gets interesting if the sensor is measuring the speed of light in a vacuum. What we have build is known as a "reality editor" and grants the owner godlike powers.

Of course, the equipment is part of the time loop, so the physical system being measured changing is not the only possible non-contradictory outcome; there's also the possibility that your equipment might just fail. Since the quantum mechanical odds of your equipment failing are probably much higher than those of the speed of light changing, you will almost certainly get an equipment failure rather than destroying the universe by altering its fundamental constants and causing all the matter to collapse to a point.

So let's set our sights a little lower. How about moving on from nanotechnology to femtotechnology? Tinkering with the energy levels inside atomic nuclei is tricky, but if we can build a sensor to tell if we've managed it, we could use a time loop to force the hand of physics. We can work out the chance of quantum tunnelling producing the desired state by pure luck alone, and make sure that the chance of our equipment failing is below that - by duplicating it. Don't forget we have the matter and energy of entire star systems to hand. Make trillions of time loop devices with their own sensors, all observing the same system. Make it more likely for the system to enter the desired state than all the time loop devices failing together.

So the time loop reality editor cannot provide complete omnipotence; it's limited by the probability of a complete system failure, and can only cause events which are more probable than its own failure, so it would be rated up to a certain improbability level (in a manner that sounds slightly familiar...). Indeed, in case of miscalculation of the probabilities or sheer bad luck causing a device failure rather than the desired event, it would be wise for each time loop unit to have a "circuit breaker" that is the most likely part to fail and can be simply reset, rather than risking more permanent, hard-to-diagnose, or violent failure modes of a device containing a significant amount of stored energy in one form or another.

An interesting possibility is of using the reality editor to not only make, but design, things. Rather than building a sensor that checks if a working femtocomputer processing element is created, create one that tests whatever is standing on the target platform is a fully working computer meeting certain design requirements, and see what appears. As the quantum-mechanical basis of the reality editor will tend to favour the most likely, and therefore generally simplest, solution, some interestingly optimal designs might result.

Perhaps the first thing to try and make is a more compact and powerful reality editor?

Oh, and negative delay gates will enable faster-than-light communications, so I can interact with my ever-expanding interstellar empire in real time now.

Hopefully, that will be enough to keep me busy and occupied until the heat death of the universe starts to loom. At which point, hopefully I will have figured out how to:

Create new universes

Probably by tinkering with black holes or something, if not by turning as much of the mass in the Universe as possible into a giant reality editor. Either way, make a new universe with a new entropy gradient I can use to power my ongoing experiments.

Differentophobia (by )

At the time of writing, there's been recent controversy about a fast food chain called Chick-fil-A, whose management have made statements against gay marriage, and who financially support organisations campaigning against it. I'm not going to go into detail about that, as it's just one more battle in a long war against the idea that it's OK to fail to understand that people who are different to you are still people.

There's a natural human tendency to categorise people into Us and Them. We have emotional reactions like empathy towards "Us", as we can imagine ourselves in their situations. We tend to trust "Us", and help "Us" when they are in need, and would rally to defend "Us" from harm.

"They", on the other hand, are assumed to be attempting to take something from "Us". "They" are not empathised with; we do not imagine what it is like to be "Them". We merely see that "They" are different, and therefore, we cannot imagine what "They" are thinking; and we imagine that "They" must feel the same about "Us", and therefore not have our best interest at heart; we assume that "They" will feel no compunction against causing "Us" harm if it's in "Their" interests, so we are quick to defend ourselves against "Them", including pre-emptive strikes. If "They" ask for something, it is clearly "Them" trying to take things from "Us", rather than "Them" and "Us" negotiating to find a compromise over some shared resource, and we must stand up against it or "They" will take everything and leave "Us" with nothing.

This general mechanism is behind a lot of pain and suffering in this world. Once somebody has been classified as "Them" in somebody's eyes, it's very hard to lose that classification, as all the good deeds they do and other evidence of trustworthiness are easily interpreted as deceit. Meanwhile, the criminals in the "Us" group use their implicit trustworthiness to great advantage. This simple classification into "Us" and "Them" presumably did us some good when were crouching in caves, but now we're a globally interconnected society, it's harming us.

I have suffered little from it, personally; I am white (and live in a country where that's normal), male (and live in a society where sexism has abated, but is still rife), without any visible disabilities, living in the country I grew up in, with an accent and mannerisms which can fit into most social "levels" (I come from a lower working class background, but went through elite education into a profession, so I have experience of all sorts of people), straight and cisgender. My only "minority" trait is being an unabashed nerd, which is something I can easily hide when amongst people who would be bored stiff by a thrilling discussion about logic circuit design; and I hide that in order to not bore people stiff, rather than out of a fear of discrimination.

But it still deeply irritates me, because it's just a stupid waste of happiness. The human race has enough to worry about without us being nasty to each other.

I like meeting people who are different, as it's interesting to try and find my own limitations and boundaries. How much of who I am is because of the limited range of experiences I've had, rather than inherent limitations of my human brain? I'd still really like to sit down with some gay and bisexual people of both genders, to try and really find out what the experiences of love, limerence and sexual desire are like for them; there's clearly some underlying difference because the objects of their attraction are different, but does that extend to differences in what it feels like for them? Bisexual people would be well-placed to compare, but then their experience might not be representative of what purely homosexual people feel. As I was at an all-male school when I became really interested in girls, I've never felt I've entirely understood heterosexual flirting/dating/courting protocols, and I'm quite interested in how much is purely social convention rather than fundamental parts of our evolved mating mechanisms; finding out what it's like from the perspective of homosexual people, who have been forced out of the social conventions in the first place and had to form their own in originally hidden communities, might provide me with insights into my own heterosexuality! I watch the activities of my polyamorous friends with interest!

I am not, however, immune to the fear of different people. If I suddenly find myself in an unfamiliar cultural environment, I feel a twinge of alarm. This is partly justified; in an unfamiliar culture, my social protocols may be incorrect, and might cause offence, and somebody who is not familiar with my own culture might not realise that this is unintentional. So when I find myself in such a situation, I am well advised to pause and think carefully about how I act - but purely to ensure that I present a respectful and friendly first impression; I then try to find common ground and establish an understanding that I can expand upon until I am comfortable with the new situation.

When a group of hoodie-wearing black youth rush past me in an alleyway, yes, I am mindful that they might try to mug me. But I am also just as mindful that a group of smartly-dressed white females might mug me, too. After all, if I wanted to mug somebody, I would carefully avoid mugger stereotypes in order to lull people into a false sense of security! If I ran a Fagin-esque gang of pick pockets, I would train little old ladies in martial arts and equip them with knives to be my agents! But I digress... I do not discriminate in my distrust. And yet my distrust is provisional; if I know nothing about somebody, I will assume that they might be a threat, and I will take care not to give them an opportunity to harm me or those in my care in any way; but I will not show hostility towards somebody unless they prove their bad intententions by makin a move to attack first. And on the other hand, I will extend trust towards people who have earned it, but I do so proportionally, assessing the cost of losing the thing I have entrusted them with against the benefits of trusting them.

It's also important to recognise when people are being afraid of you because you are different to them. Their initial reaction to you might be to flinch, to be defensive, or even to assume that you conform to their culture's stereotype of yours. And if you are feeling skeptical of them being one of Them, then their initially negative reaction would just needlessly reinforce your suspicion. If you then act in a way that makes you seem hostile and defensive in their eyes, then your relationship has gotten off to a probably irreparably bad start.

So, dear reader, when you feel that frisson of fear and distrust when you meet, or hear about, strange people doing strange things, recognise that feeling for what it is: a quick warning that these people might find you strange and frightening, so you must be polite and welcoming; and try to turn the other cheek if they exhibit knee-jerk defensive reactions towards you. The more you can learn from them about the amazing variety of the human experience, the better a person you will be.

Getting kids into programming (and what the Raspberry Pi is lacking) (by )

Back when I were a lad, if you bought a computer, you'd bring it home and plug it into the telly and turn it on and a BASIC prompt would appear.

Tough luck if you wanted to do practical tasks like word processing, but you could type a single command (such as CIRCLE 100,100,50) and be instantly treated to a circle appearing on the screen. Before long, my generation were writing programs to crunch numbers for our statistics homework, and lots and lots of games. And thus a generation of software engineers was born.

Getting started in programming is trickier for the contemporary twenty-first-century child; they have to install a software development environment (their computer probably didn't come with one), and then go through a wizard to Create New Project, write initialisation code to open a window, then write a redraw event handler that takes a graphics context and draws a circle with it. A little less approachable than "CIRCLE 100,100,50". At least you get a simple word processor and a Web browser out of the box, though... I'm no nostalgic Luddite 🙂

Now, the Raspberry Pi has been widely hailed as the answer to our woes; costing just twenty pounds and usable given access to a TV and a dirt cheap USB keyboard and SD card, it's cheap enough to be purchased and given to a child to play with, unlike Mummy's laptop. Also, it has a user I/O port, meaning it should be relatively easily to integrate with home-built robots and other such fun electronics projects.

However, that's just the hardware side. What's seriously lacking is the software. If you buy a Pi and install one of the available Linux images onto an SD card and boot it up, you'll be presented with a Linux desktop environment. You'll be able to get to a shell prompt with little effort, and start learning shell, or get into a Python prompt and start to write Hello World, but that's not incredibly inviting; the effort required to do anything interesting from there is quite high. In particular, getting graphics going is hardly a job for a beginner.

So, I set out to improve on this situation. I've written a turtle graphics engine on top of Chicken Scheme, called Simple Graphics. Installing it is often painful as you need to get all the required bits of SDL and Cairo installed, but once that's done, thanks to Chicken's excellent egg system, installing simple-graphics is easy. And once you've done so, it's just a matter of:

(use simple-graphics)
(forward 10)

...to get started with drawing things on the screen.

However, that initial installation pain can be bypassed by making a Raspberry Pi image, based on the existing excellent work on basic Linux distributions for the Pi, that has Chicken and simple-graphics pre-installed, with a desktop icon to fire up a Chicken prompt with the simple-graphics library already loaded so you don't need the use line. But then I'd also like to add Chicken eggs to drive the I/O port on the Pi, including I2C and SPI. And sound generation, so you can make noises to go with your graphics while driving a real robot turtle through the I/O port...

It would also be good to have a version that boots straight into a full-screen Chicken prompt (which, if you start doing turtle graphics commands, splits into two, a graphics area that can be hidden/revealed/made full screen with hot keys, and the command-line area), for people using small screens.

That way, kids of all ages could immediately have an interactive environment that lets them program the full range of capabilities of the Pi. And being based on Scheme, it wouldn't be a "dumbed down" environment they'll grow out of and have to learn a new language in order to do more powerful things; they'll be able to use all the Chicken Eggs available, as well as being able to write their own code in a language eminently capable of the full range of programming tasks - yet still simple enough for anybody to get started with. Sure, I could have based Simple Graphics on Python or Ruby; but anything they can do, Scheme can do better.

Krav Maga (by )

I've always enjoyed combined mental/physical challenges. As a child, I often entertained myself with things like getting from one part of the house to another without touching the floor. This required planning, and finesse; the combination was exhilerating.

I enjoyed my time in the Combined Cadet Force, as many of the exercises we were set involved this combination; and I particularly enjoyed being in the school shooting team. Especially when we went out to electronic target ranges and did exercises involving running to checkpoints with an assault rifle, diving into the prone position, inserting the magazine, shooting at targets as they popped up, and then running to the next checkpoint. It was like playing Time Crisis!

However, that kind of thing has been missing from my life for the past decade or so. Also, I've been spending far too much of my time sitting in cars or at desks, with my main exercise being carrying heavy objects (such as sleeping children) for short distances. I was feeling a keen desire to exercise more.

Then about a year ago, Jean started doing Ju Jutsu, and I started to wonder about taking up a martial art. I remember, many years ago, a friend saying he was taking up Krav Maga, an interesting-sounding Israeli martial art that grew from self-defence techniques in the Jewish gettos of Hungary before World War 2.

However, my searches found no nearby Krav Maga groups; the nearest was in Bristol. So I gave up on this idea for the time being. But a few weeks ago I spotted a poster in a shop window in Cheltenham advertising local Krav Maga courses; sure enough, a group had started!

So yesterday evening, I turned up to give it a try.

It's delightfully pragmatic; most of the attacks seem to revolve around wacking your attacker as hard as you can in the softest bits of them you can reach, then running away. The first skill I started practicing was how to kick somebody in the groin, punch them in the face twice in quick succession, pull them down hard onto your rapidly-rising knee into their stomach, elbow them in the kidneys, and end up behind them (running away, of course), in one smooth motion. We then proceeded to have a try at being pinned from behind by one person while another ran at you from the front; there is a technique to escape the grip and leave the person gripping you curled up in a painful ball on the floor, but doing it while also dealing with the person coming at you from the front makes it a lot more interesting. There were also some more abstract exercises in dealing with large numbers of people coming at you, avoiding being cornered or surrounded, and getting them to get in each other's way. That involved some physical activity in keeping moving, but it was mainly a mental exercise, observing the paths of the attackers and planning your movements.

The practising was good exercise in itself, but we also did a bit of general fitness exercise, largely as part of the warm-up before getting into the practice. I left feeling tired but lively, and today I've been feeling the ache of growing muscle over much of my body, so it's been a good work-out.

I got on well with the other students, who were very helpful with the new people in their midst; and the instructor seems to be a truly intriguing and inspiring person!

It was good challenging fun, so I'm going to keep going, hopefully switching to the Gloucester group that will be starting on Mondays in September!

I turned up in a shirt and trousers, straight from the office, but most of the people there had track suits. Black ones, and t-shirts with martial-looking imagery on, were particularly popular. The contrarian in me is now wondering if I can get a glittery pink tracksuit in my size...

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales