I said earlier that I'd write something about protocol-oriented
programming. Then I decided that it'd be more fun to send it to
ll1-discuss instead of posting it here. In the process of penning it,
I came across this article by Mikel Evins, which (a) says everything I wanted
to, and (b) more, and (c) was written more than ten years ago, so
decided I didn't need to.
I'm going to add my 2p summary anyway, based on the previous #lisp
discussion that also led to Christophe Rhodes' LSM2004 presentation: a protocol is an defined
communication across an ownership boundary, in which both sides
have expectations of the other. This "equal peers" clause is what
sets it apart from an API, in which the expectation may all be
one-directional. Trivial example: consider the unix sync()
call - the client doesn't have to do a whole lot, but the requirement
on the implementation is strong. Conversely, in qsort(),
where the client provides the comparison routine, both sides have
something important to do if the job is to get done.
(Of course, simply having used a protocol somewhere doesn't mean
you're thinking in a Protocol-Oriented manner any more than having
used a function somewhere means you're programming Functionally. Some
languages have better support than others for different ways of
thinking. Your Mileage May Vary. There Is No Silver Bullet. Objects
In The Rear View Mirror etc etc)
For other stuff about protocols (and especially stuff that predates
the current flurry), Google Groups might be a good place to start.
Here's an article by Scott McKay to be getting on with. Lots of
protocol discussion hapened in comp.lang.dylan too, unsurprisingly.
I swapped a few of the links in this page's header around#
I swapped a few of the links in this page's header around. No major
changes, but I wanted to include Planet Lisp and remove some of the
blogs that I read through that aggregator anyway, so don't feel
unloved if you're no longer linked. Temporarily fixed my
RSS feed, too - it'll last until I restart that process, by which
time I hope I will have working CVS again and therefore have fixed it
permanently.
Latest news on cvs.telent.net: returns in full effect next week, we
hope. I'm not going to blog about work on principle
(self-preservation principle, mostly) but we've been moving offices,
so this has been a busy week. It's also been a pretty stunning week
weather-wise, so I've been attempting to make the most of that by
getting outside: now I have a skin deficit on both elbows, my knees
creak alarmingly until I've warmed them up by skating a couple of
miles, and my leg hurts. Oh, yeah, and my shoulder is better but
still not actually well. Truly I am on peak form for the marathon.
cvs.telent.net: no news. If I get a moment tomorrow I'm going to
get a tarball of the cvs repo off the machine and at least stick it
on an ftp site for the time being.
cvs.telent.net repository archive is now at http://ftp.linux.org.uk/~dan/telent-cvs.tar.gz#
Sat Sep 11 13:21:30 2004
Topics:
telent.net repository archive is now at http://ftp.linux.org.uk/~dan/telent-cvs.tar.gz. Latest news on
the return of the machine itself is that next Friday is most likely;
this is a temporary measure for people desperate to get stuff before
then. Sorry for the delay.
Extending (or, mostly, just implementing) CL streams#
Extending (or, mostly, just implementing) CL streams. Motivations:
(a) Araneida's serve-event model doesn't work in a threaded SBCL with
threaded SLIME attached (workaround is to (setf
swank:communication-style :fd-handler) in
.swank.lisp); (b) people doing Unicode in SBCL are also
having interesting experiences with fd-streams; (c) the
streams-standard-discuss/ list has been empty since it was set up.
In other news, very very cheesed off. In a fit of transient
stupidity I stacked on the LondonStake last night and managed to knock
someone else over so that she fell on my leg. Very sore: today I've
mostly been unable to walk, let alone strap wheels to my feet. Which
is mostly just really really annoying coming as it does about two days
before the inline marathon. Unless a miracle has happened by tomorrow
I probably won't be able to take part.
Anyone know whether a Toshiba Portege 3440CT will work with PC133 RAM#
Sat Sep 18 13:58:16 2004
Topics:
Anyone know whether a Toshiba Portege 3440CT will work with PC133 RAM?
I just ordered a SO-DIMM of that particular hue as it's half the price
of the PC100 RAM I'm supposed to use in this machine, and web sites
seemed to indicate I had at least a 50% chance of it working ("it's
supposed to, but sometimes it doesn't", seems to be the summary). I
guess I'll find out when it arrives.
A month or so ago I remapped my
keyboard to swap control and caps lock, in the hope of reducing
the unpleasant sensation I was getting in my wrist when chording
control key sequences. Shortly after mentioning this to my boss, my
work machine suddenly acquired a so-called "Natural Keyboard", so it's
hard to tell exactly what difference which change made. Of course,
that evening I went out and stacked skating which didn't really help
any effort to determine cause and effect either. But anyway.
Having rather more recently got my desktop machine at home working
again (needed new hard disk, and some furniture shuffling to create a
space to use it) I find that the split keyboard really does make a
difference to my typing comfort, and have had to order one. Sigh.
So, if anyone's keeping track, please cons another on the "I hate all
Microsoft software but they do make (or OEM, whatever) some nice
hardware" list.
Good news, bad news: no bones broken - soft tissue damage only#
Tue Sep 21 14:48:06 2004
Topics:
Good news, bad news: no bones broken - soft tissue damage only. "May
take weeks", though. By looking crestfallen I elicited the additional
information "sometimes it takes weeks and weeks".
(The preceding refers to the leg injury I
wrote about last week, if you hadn't guessed)
I hate hardware. Anyonme who's ever had to share an IRC channel or an
office with me will know this is not news. My new keyboard works;
this is good. On the other hand, my new laptop memory is actually the
wrong physical size to fit in the laptop - not sure how I
managed to screw that up - and my old desktop has decided that
previously manageable tasks such as e.g. running gcc or building SBCL
are now too complicated to manage in one go, presumably hoping that
I'll pander to its laziness and just restart after the first random
signal 11.
Although I would of course like to replace this boxful of flakitude
with something that doesn't involve hardware in any way shape or form,
I reluctantly have to accept that this is not going to be possible.
So, am making the best of a bad job: arriving next week is an Athlon
64 and allegedly compatible motherboard and memory for it. In the
unlikely event that it works, this may even provide the impetus I need
to finish the SBCL AMD64 port.
Leg still mending. Better than it was, not as good as it ought to
be be: with luck, should be skateable again sometime next week.
(This text also appeared on the Clump mailing list; if you
read it here you can skip it there, or vice versa)
Did you know that
SELECT foo,bar
from table1
join (select * from table2 where some_criterion limit 10) table2
on table1.table2id=table2.id
is (according to the postgres manual, at least) valid SQL? After
finding a need for such a query on Saturday, and that my existing
fairly ad-hoc sexpr-to-sql translator wouldn't cope with having entire
'select' statements where it was expecting table names, I set out to
design something that would. And that doesn't use custom reader
macros, which I dislike (they confuse my editor, and there always
seems to be something else that wants to redefine them incompatibly)
By working through the Postgres documentation and constructing nested
forms based on the order it claimed pgsql does things in, I arrived at
a syntax which is probably not completely unlike the parse tree that a
SQL processor would generate. Thus
will translate to the sql form above. The immediate objective is to
make it much easier to programmatically compose queries.
I think the . notation for qualifying a column name with its table
is a wart, inasmuch as it makes it more difficult for Lisp code to
establish whether table1.id is id or not.
The use of symbol names is possibly contentious: we face "the
package problem" encounterd by all apps that build big trees of
symbols: do we (a) export all the valid operators from the SEXQL
package and expect callers to :USE it, (b) ask callers to use
keywords, or (c) do as LOOP does and compare symbol names instead of
symbol identity? A quick poll of #lisp irc suggested that (c) was
the best idea and accordingly it's the one I've adopted.
I have provisionally called this beast SEXQL, because the name SQL has
been taken already and SEXPQL is awkward to pronounce. The
implementation is still work-in-progress and I haven't been through
the whole sql language thoroughly; I've just added the tokens I have a
need for as I go along.
I should have written about "Fast User-extensible Streams" before.
This is currently all just handwaving, and its intended goal is as a
stream substrate for SBCL (replacing fd-streams) rather than to become
a standard. There's an sbcl-internals cliki
page where you can find a pointer to wherever the latest draft is
living, and comment on it.
To save myself the trouble of writing a third entry - and you the
trouble of reading it - I may as well add here that my leg though not
actually right again is sufficiently better that I can walk at
normal speeds with only a slight ache, and descend stairs in merely
moderate discomfort. I have a newfound admiration for anyone who
loses the use of one or more legs more seriously than I did, and add
that unless you've had an injury of that kind and know this
experience, you have no idea how much enjoyment I'm getting from
the pursuit of such simple pleasures as being able to walk around
again without being overtaken by grannies all the time.
Crippled-no-more.
Two out of three leaves ample room for improvement#
Wed Sep 29 19:48:30 2004
Topics:
Two out of three leaves ample room for improvement. My order from
Dabs arrived today; 512MB RAM as ordered, Asus K8V-SE mobo ditto, and
an Athlon XP with a sticker which incorrectly claimed it was an Athlon
64. Bunch of muppets.
For the people who know as much about current PC hardware as I did
last week, know that the Athlon XP and Athlon 64 are entirely
different beasts in most practical respects. They run different code,
fit different motherboards and are different physical shapes. They
also, for what it's worth, come in different packaging: the clearly
visible printing on the box that said "Athlon XP" was my first clue
that something was not supplied As Described.