FLOOD!! (by )

This time we're really flooded.

Yes, I know, we've claimed to be flooded before. The kind of flood you get when an appliance's plumbing breaks, and the carpet is all squelchy.

This time, it was ankle-deep...

It rained a lot today, and the stream rose so high that it came over its banks and poured across the drive. The waterfall became a roaring pond, with water cascading down the driveway between the two houses to rejoin the stream at the millpond, as well as water cascading across our parking area and down behind our house. This meant that the tunnel that normally carries the stream from the waterfall to the pond behind the house was full of high-pressure water, which proceeded to squirt between the foundation stones. Water came through the wall at the back of our fireplace, but not very much compared to the torrent that burst from the wall at the back of the woodpile. This minor river ran down the gulley in front of the house, where it filled the tomato grow-bags with water, swelling them up, making them form a dam - so the water level rose until it came over our doorstep, filling downstairs ankle deep and tripping the electricity supply.

All this happened while I was out delivering Sarah and Jean to Cheltenham - a trip that ended up taking a while, due to flooded roads. Luckily Barbara was around, with a friend, who let themselves into our house and shifted a lot of stuff that would otherwise have been ruined. When I came back Barbara and I shifted the grow-bags, removing the dam. This caused the water level to drop quickly, and soon the house was emptying out until it reached the level of the doorstep, at which point it stayed there, kept topped up by the water coming through the wall.

I rescued a few more things that were getting wet, then set off to collect Sarah and Jean again, now concerned. I had taken a long time to get home from Cheltenham due to flooded roads, so I took a route via high ground (up to Birdlip, then over Leckhampton and down into Cheltenham). To my surprise, the centre of Cheltenham was awash, with the police closing roads down - so I picked Sarah up and we headed towards where Jean's nursery was. The usual route was blocked by a small lake where a roundabout normally sits, so we had to take a long drive around trying to find unblocked routes and avoid the long queues of traffic.

This took over an hour, and we were starving by then, so we stopped off at a supermarket on the way back for a quick snack, before proceeding to make our way home.

There we fed Jean and put her to bed, had dinner (thanks to Barbara letting us use her cooker), helped Barbara mop about a bit, then (without electricity, and with the place still too wet to do much with) we're retiring to hunt out insurance documents and have an early night, to prepare for tomorrow.

But we're all alive!

And now we have photos uploaded

Source Transformation for Fun and Profit (by )

Back when I was a kid, I designed a low-level macro system for purely functional Lispy languages, based around a cunning use of partial evaluation. I called it meta.

Since I was a dreadfully lazy student, when I had to do a final year project, I suggested it as an idea and then pretended to think of and develop it all over again, before spending far too little time writing up a report on it, and a sample implementation. Which may have been why the sample implementation broke in the demonstration...

But at the time, I didn't think much of macro hygiene. All I'd seen of it was that Scheme at the time had a hygienic macro system called syntax-rules that, as far as I could tell, sucked - it was limited to basic-seeming rule-based substitutions, and did not use the full power of the Scheme language as a macro language.

However, things have changed since then. The Scheme community has come up with hygienic macro systems that let you write macros in Scheme, such as syntactic closures. And so I've found that hygiene is a desirable property, rather than a terrible design tradeoff.

So, I wonder to myself, can my meta macro system be brought up to date and incorporate hygiene?

Read more »

Learning new programming languages (by )

I program computers for a living, mainly. This involves writing programs - instructions for the computer on how to do things, written in a "programming language".

There's a lot of programming languages out there; mainly because it's easy to create new ones, and an interesting exercise to do so. But if you browse a programming jobs site, you will see a lot of people who say "I am a Java programmer". Or PHP or Perl or C# or C++ or Python or Visual Basic. This means two things: that a few programming languages hold the majority of the "market share" and that people consider "their language" an important part of their identity.

Read more »

Structured Streams (by )

I read this today:

Structured Streams

It looks like somebody's implemented a stream protocol that lets you create substreams at will, sharing congestion control information with the parent stream but having their own redelivery queues, so missing messages will only stall the one (ordered) stream they pertain to.

Good to see that great minds think alike. When I get some time, I'll read their results in more detail, and see if there's anything useful to be learnt for MERCURY 🙂

A syntax for IRON (by )

Back in 2004 I jotted some notes on requirements for IRON types.

Since then I've been drifting somewhat towards looser typing, in the Lisp model; having that as the underlying system provides for more expressive programming power, while optional type declarations as assertions, where required, can bring back the statically checkable safety and runtime efficiency of a strict type system.

But that's not what I'm posting about in the current insomniac haze - I've been thinking about written syntax.

IRON is a data model for values. Although I'm still deciding how the mutable data structures like queues fit into things (specifications of them are definitely needed for TUNGSTEN, but whether they count as part of IRON or not is something I'm still debating), I think I may have settled on a basic syntax for written values.

Now, the key requirement here is that IRON is, in the manner of S-expressions, usable to express just about anything - from source code to boring data. Creating a written data syntax that's pleasant enough to use day in and day out is quite a challenge. s-expressions come pretty close, but are deficient in a few areas. YAML is pretty good, but I wouldn't want to write source code in it.

The main thing I'm adding over s-expressions is Smalltalk-like syntax, which I will explain in detail below.

So, without further ado, here's a basic IRON syntax.

Read more »

WordPress Themes

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