Another laptop, another attempt at configuring outgoing email#
Tue Mar 29 20:20:57 2005
Topics:
Another laptop, another attempt at configuring outgoing email. That
is, it's the same laptop as last week, but I'd been putting off this
task.
Requirements:
- Doesn't require me to stop using Gnus
- Works wherever I can find reasonable connectivity - does not
require me to be on a specific IP address or network, or able to send
SMTP directly to servers around the world.
- Can queue mail when I'm not connected to any such network.
- Reasonably secure: certainly nothing involving open relays
- Doesn't involve half a day learning about SASL or SMTP AUTH or
stuff like that
- Ideally, no need for lots of silly small scripts littering ~/bin/
Available: a shell host that I have ssh access to.
Solution: harness the awesome power of smtpmail.el
(require 'smtpmail)
(defun ssh-smtpmail-send-it ()
(let* ((smtpmail-smtp-server "localhost")
(smtpmail-smtp-service 2525)
(smtp-local-domain "telent.net")
(smtp-sendto-domain "telent.net")
(sendmail (start-process "ssh-smtp" nil
"/usr/bin/ssh"
"-L" "2525:localhost:25"
"loaclhost.telent.net"
"cat"))
(ready-p nil))
(labels ((filter (p s)
(if (string-match "tunnel is ready" s)
(setq ready-p t)
(message "Received from SSH connection: %s" s))))
(unwind-protect
(progn
(set-process-filter sendmail 'filter)
(process-send-string sendmail "tunnel is ready\n")
(while (not ready-p)
(accept-process-output sendmail))
(message "")
(smtpmail-send-it))
(process-send-eof sendmail) ; ask it nicely first
(kill-process sendmail))))); if that does nothing, inhume it forcefully
(setq send-mail-function 'ssh-smtpmail-send-it)
(setq message-send-mail-function 'ssh-smtpmail-send-it)
Needs to be able to connect to the shell host (yes, really, it is
called loaclhost) without a password, which is what ssh-agent
was invented for. Needs no configuration changes on the shell host
(nor even root access, though it happens that I have that anyway).
How it works: (1) opens an ssh connection to the shell host and runs
cat, additionally with a tunnel connecting port 2525 on my laptop to
25(smtp) on the shell machine; (2) prints something to the cat process
and waits for it to come back - by this time the tunnel should also be
ready for use; (3) calls smtpmail-send-it, (4) cleans up. This is, I
feel, marginally less tacky than sleep n where
n is chosen experimentally to be (a) greater than the
connection/tunnel setup time, (b) less than would drive me mad while
waiting.
Incoming mail, if you were wondering, is delivered to a maildir on
loaclhost then synced with the notebook using maildirsync
In other laptop-related news: still can't get ACPI S3 suspend to
work. swsuspend2 doesn't like my pcmcia wireless card (it's an Atmel
thing). APM suspend does work, but running with no ACPI causes the
fan to spin constantly which is annoying in a quiet environment and
probably shortening battery life. But: I may be able to dispense with
the PCMCIA wireless card as I have a mini-pci card arriving tomorrow
from Solwise. It's not yet certain whether that will give me any
better PM support, but it can use the laptop's builtin antenna so
maybe it'll at least give me better reception. Will see. It would be
nice also if I can get it to distinguish more of the pointer buttons
from each other (four physical buttons but X only sees two) so that I
can have a proper middle button again.
SBCL 0.8.21, as announced on cl.l#
Mon Apr 4 15:04:27 2005
SBCL 0.8.21, as announced on cl.l. last Friday. Emphasis added since:
The Steel Bank Common Lisp development team is proud to announce the
release of SBCL 0.8.21. This release marks the beginning of a period
of stabilisation towards 0.9 and eventually 1.0, as well as the usual
crop of bug fixes (some of them quite long-standing, notably the PROG2
issue which has been with us seemingly forever)
SBCL is an Open Source compiler and runtime system for ANSI Common
Lisp. It provides an interactive environment including an integrated
native compiler, a debugger, and many extensions.
* Notable changes
** Now possible to set global optimization policy, startup package,
readtable, etc, in startup files, as they're read with READ and
EVAL instead of LOAD as before
** debugger changes
- less mess in backtraces
- removed redundant TOPLEVEL restart
- many kinds of functions have more legible printed representation
and are more amenable INSPECT.
- SIGSEGV in foreign code handled more gracefully on x86 and x86-64
** Improved SB-INTROSPECT for needs of SLIME
** thread support for non-NPTL systems has been removed - locking
is buggy and unreliable. A threaded SBCL build will now warn at
startup and refuse to create new threads, unless futex support
is detected in the kernel
** Updates to the x86-64 backend
** Many bug fixes
- PROG2 returns the primary value of its first argument, as per ANSI
- (TYPEP X '(MEMBER ...)) no longer returns a list in compiled code
- LOAD binds *LOAD-PATHNAME* to the merged pathname
- more bugs revealed by Paul Dietz' test suite: check the NEWS file
for details
* For more information and downloads
http://www.sbcl.org/platform-table.html
The sources will compile under almost any sufficiently-ANSI CL, or you
can wait for binaries which are currently being uploaded for various
platforms.
A total of one person spotted this and thought it unusual enough to
ask about. Next year our April Fool will be less subtle, I promise.
Some brief feedback on my weekend in Amsterdam#
Tue Apr 26 10:56:24 2005
Some brief feedback on my weekend in Amsterdam.
- The Friday Night Skate was cool. Started slow, got faster, then
a short sprint around a park somewhere, then got a little slower again
as it returned to the road, but still quite a comfortable pace.
Marshals were competent, and didn't get obviously lost - although I
had absolutely no idea where I was at all, so they could possibly have
been lost but covering it well. And many of the road surfaces in
Amsterdam (excepting the brick-paved roads) are absolutely gorgeous -
but when skating between tramlines one does realise pretty quickly why
the double-push was invented in Holland. Met Marc Battyani and his
wife Ann about five minutes after the skate started - they identified
me by my ILC02 tshirt - so we skated together after that. We didn't
hang round much with the skaters afterwards as we went to meet up with
some of the other conference attendees and eat Chinese instead.
- Didn't do much of anything on Saturday. Lie-in, coffee, visit
Rijksmuseum - what part of it was actually open - then food, wander
around in lovely warm sunshine (which continued throughout the
weekend), back to hotel, sudden realisation that the organised dinner
was at 1730 not 1930 as I'd thought, rushed out again. Dinner. Then
to Robert Strandh's hotel to talk about Climacs (quote of the weekend
- "I've been pronouncing that as `Cleemacs'" - Luke Gorrie) and McCLIM
incremental redisplay. Apparently it presently still suffers from
redisplaying in larger increments than would ideally be the case.
- Sunday was the actual meeting, pretty tightly-packed with talks
and I was almost surprised to find that all of the talks were
good. Special mention for Luke's SLIME talk, simply because he'd
written his own presentation software in elisp, and for Peter Seibel,
who is a very entertaining speaker. PGP fingerprint exchange happened
between talks: I think I have now verified id and fingerprints of everyone who sent me their key
beforehand so if you're one of them and reading this, expect to be
getting encrypted mail from me in the next few days as and when I get
around to it.
- Actually, I confess I was not paying 100% attention in
demonstration of Lispworks' stepper during the first talk, because I
was also hacking pthreads sbcl to see if I could make it run on x86 as
well as x86-64. I did, so look out for some interesting
stability-reducing cvs committage soon. I tend to think that
single-stepping to find bugs is an admission of defeat - this is not a
reflection on the value of a stepping tool so much as an admission
that there are many past occasions I've been defeated in this way
(usually with assembler not lisp, admittedly), and so having such
tools demonstrated to me at length smarts a bit.
- (Happily, Sunday was also the day that SBCL 0.9 was released. We
had intended it that way, but the actual release happened
independently of anything done by anyone at the meeting, so this is a
triumph of scheduling if nothing else)
- Monday was just airports and shuttle buses and trains and stuff,
and a renewed attempt to get useful suspend support on this laptop. I
think I have it working with Software Suspend 2 now, after
doing some really quite ugly stuff to get all of usb and all of pcmcia
and all of the atmel modules to be unloaded on suspend. It sort of
hangs dhcping eth0 on resume though (interruptable with C-c, but still
ugly), which is sucky, but I have too little battery left to find out
what's causing that. Some discover/hotplug/ifplugd interaction,
perhaps.
In summary, then:
- Things I'm already using I still think are cool: sbcl, slime.
- Things I know little or nothing about and now believe to be cool: Climacs,
Practical Common Lisp.
- Things which have no intrinsic coolness value but are nevertheless
going to be required: weak references.
- Other things I need to do soon: buy new wheels.