Postcards from the Bleeding Edge
Sunday, October 25, 2009

  Still not finishing the spec for Pocobelle 2, but satisfied all the same

The big reason why I haven't been participating in the otherwise fascinating thread on health care on my blog is that I swore to myself I'd finish the spec for Pocobelle version 2 by this weekend, and get it posted, and commented on.

Hopefully, with some feedback, I could order the "right thing" by the end of next week.

I write stuff and post it so that - although the average intelligence of the internet may be low - the cumulative intelligence is also inconceivably high. Out there there is always someone that has the answer to your problem...

Examples of cumulative intelligence are the health care thread, and what I read today on slashdot about embedded hardware while taking a mental health break.

I had pretty much settled on the TS7500 board as being pretty much ideal for what I was looking to build. It was extremely low power, and had enough DIOs, host USB, flash, etc to do most of what I needed to do.

The only problem with it was that it didn't have enough ram to do all I needed to do, and was kind of slow. I was working out the implications for motion detection in zoneminder, trying to offload that function to other devices, and not liking what the shifts in costs were like - my camera costs went way, way up, and functionality down. Zoneminder's motion detect algorithm was very, very good, but also cpu intensive. I couldn't see my way clear to embedding anything even as close to as good in a FPGA, and doubted your typical camera could, either... and I was trying to keep the moving parts and power budget to a bare minimum.

Slashdot steered me at two really cool looking products - most notably the Sheeva Plug, and secondarily the Open RD...

Which - aside from slightly higher power consumption - still far less than a laptop or atom board - are pretty much perfect for most of what I need (except the DIO relays, which I can probably do via USB).

I kind of wish they'd posted on this topic before I burned the hours writing my spec, and for all I know there is some showstopper in one of these boards, but it hurts a lot less to read than to write, so I'm going to go read up on them now, and maybe place an order or two.

The sheeva plugs have 512MB of RAM, 512MB of flash, USB 2.0, eat 3w of power at idle, and cost 99 BUCKS! for that price someone can afford to buy a couple, just to play with!

I am sore tempted to order a a touchbook, too. Life is getting a bit more interesting in the arm world.

Labels: , , ,

 
Friday, October 23, 2009

  taking a brief break from health care for something more geeky

My last post gathered a lot of great comments and the debate continues, hot and heavy, on the subject of health care.

I surfaced for a little while, and spotted something that appealed to my ha ha only serious and geeky nature... if you don't know who's in the photograph, you won't get the joke.



OK, I return now to some voluminous commenting on health care.

Labels: , ,

 
Wednesday, October 21, 2009

  Reframing the issues of the health care "debate"

I am despondent on the whole health care reform thing.

I view it as a circus distracting people from the real issues, actually.

I was nearly driven bankrupt, twice, by the current system, and have a long list of detailed complaints about what is wrong with it at present. Coping with the current system, as it exists, with a pill for every malady, and pills to cure the side effects of those pills, and pills to cure the problems caused by the other pills... made me considerably more sick than I needed to be, for far longer than I needed to be, and coping with the stresses of the system didn't help either.

However, living where I do now, I don't have to pay into the US system any more, and I don't intend to go back. In fact, the risks involved in going back are so high - one traffic accident, and I would be on the brink of bankruptcy again - that it is a profound disincentive to even think about visiting the USA again.

So I really shouldn't care, anymore, but I got into a debate about it the other night and thought I'd type up my side of the argument.

I think that the legions of non-medically trained auditors and lawyers and lobbyists should not exist.

I also find the idea of one nationwide universal health bureaucracy for 300 million people abhorrent. I believe that the central government of the US should be as weak as possible and mostly concerned with national defense. If a given one of the 50 states wants Obama-like health care, great! Maybe people will want to live there more.

For example, both Massachusetts and Tennessee implemented Obama-like care a few years ago.

How's it working out? Is it a success? How are the demographics changing?

It is far easier to experiment with public policy at the state level than it is to do so at the Washington, DC, level, and far, far easier to rectify mistakes. Even then (witness the decline of California vs NJ, for example) it may take decades to reverse course.

Most importantly, most of the developed world is in a demographic trap. The old are getting older; there are not enough of the young. The haves - mostly the boomer generation, now - is trying to extract as much money as possible from the have nots - the successor generations - at every step of their slow decline into senility, so their Woodstock goes on and on while we have to clean up the messes they've left behind.

There are easy solutions to the demographic problem - lots and lots of immigration, easy citizenship, and incentives for child-rearing - that aren't on the table, and won't be until it is too late.

I wrote a story once, called "the good life", which was about a life insurance salesman that sold the "good life" to those young and healthy - cars, booze, parties, trips, etc - in exchange for a few organ donations when they hit 30... And naturally, being raised ignorant and away from valid work, they'd go into debt selling off more organs and limbs, partying further, after that, until they had nothing left but a brain attached to a few machines, and big payments to make on keeping those running too, and after that... nothing.

Their organs and limbs went to the old, who were living on cruise ships....

The old preyed on the young in this brutal dystopia until there were no more young left to support them, and revolution ignited between the oldsters fighting over the last "useful" young people, who by then were being bred in jars and kept in the matrix, dreaming, until they could be harvested for spare parts.

...

Jerry Pournelle writes:



I have a long list of things that would help American health that are politically unacceptable - from banning sugar and corn subsidies (as per the above), to taxing fast food restaurants, and taxing or banning bad foods, full of carbohydrates and such (and subsidizing vegetables in return), to taxing tivos, tvs, and game consoles (and in turn subsidizing gyms, yoga retreats, and international travel)

Here's another one: Why on earth do businesses still work 9 to 5, with employees wilting under dim florescent lighting, when outside there's a sun already shining? Is it to sell more vitamin D cream, gym memberships, and anti-depressant medications?

None of these solutions are on the table. On my bad days I tend to think that modern society is oriented towards killing off those that cannot summon the will to turn off their tivos and take a walk once in a while.

Lastly I'm going to quote a few more choice words from Jerry Pournelle on the issue of the largest health care cost of all - treatment near the end of life:



In anticipation of the flames, it's probably a good idea to put on my asbestos suit now... even though that causes cancer, in the long term.

Labels: , , ,

 
Saturday, October 17, 2009

  20 years ago tomorrow

There was an earthquake that destroyed large portions of the town that I still think of as "home", Santa Cruz, california. I wasn't there, but when I moved there 6 months later, everyone was still kind of traumatised. People coped in various ways. Everyone there on that day has a very clear memory of it, and in some ways I wish I had been there for it.

My friend Evan - who I hadn't met yet - coped with the quake in his own distinct way:

Labels: ,

 
Sunday, October 11, 2009

  One mistake, and PocoBelle becomes a brick

It was a dark and stormy saturday night. Power and internet were offline. I'd got to where I was satisfied with the Linux kernel I was running. It was doing everything I needed to do, I'd loaded up all my apps and (with a 256MB of swap) hadn't had a crash in a week...

I wanted to focus on userspace, and make Pocobelle boot standalone so it didn't need to fetch, via tftp, its kernel anymore, and could stand completely alone...

(About the only bit of tuning I wanted to do was make it boot faster, I had had to put a rootdelay=10 seconds into the Linux boot so I didn't have to do any special magic (e.g. switchroot) to complete the boot off of the USB stick. But it booted in less than 2 minutes, and that was fine.)

I was *happy*. (Getting to where you have a stable kernel makes EVERYTHING else a thousand times easier)

Soooo... I decided to write the the "stable" kernel to the on-board flash. I went into RedBoot and did a:



Fis list

Name FLASH addr Mem addr Length Entry point
(reserved) 0x60000000 0x60000000 0x07D04000 0x00000000
RedBoot 0x67D04000 0x67D04000 0x00040000 0x00000000
vmlinux 0x67D44000 0x00218000 0x00160000 0x00218000
RedBoot config 0x67FF8000 0x67FF8000 0x00001000 0x00000000
FIS directory 0x67FFC000 0x67FFC000 0x00004000 0x00000000


Not remembering how Pocobelle got this way, (I'd had it in a box for 4 years or so) I blithely assumed that this was all I needed. I kept scratching my head over how this layout failed to match what was in the kernel for the layout:


static struct mtd_partition partition_info128[] = {
{
.name = "TS-BOOTROM",
.offset = 0x00000000,
.size = 0x00020000,
}, {
.name = "Linux",
.offset = 0x00020000,
.size = 0x07d00000,
}, {
.name = "RedBoot",
.offset = 0x07d20000,
.size = 0x002fc000,
},
};


My assumption was basically that I had an advanced kernel with a preproduction redboot and that the partition table info here was incorrect...

WRONG.

I did an fis init -y to clear out the uselessly small Linux partition, hacked the TS7250 driver to take my new partition table, built a new kernel,

Allocated 4MB for the new Linux kernel at 0x60000000. Erased that partition, tftp loaded and wrote the Linux kernel there...

I completely forgot that this device has a complex bootstrap process. The tiny on-board NOR flash has a tiny bootloader that then bootstraps another bootloader out on the NAND flash, which is then smart enough to load up Redboot, which in turn is smart enough to load up Linux.

Result: 1 brick. Pocobelle never gets to Redboot. It jumps right to Linux and blows up shortly thereafter.

I figure I overwrote the TS-BOOTROM, which, although it wasn't marked in the bogus fis table, was hiding at 0x06000000. The system has enough brains to jump to that spot, that's all....

Now, there may yet be something to do that will get me into rewriting the ts-bootloader into the NAND flash from the serial port. But I doubt it. (I'm writing this blog entry unattached from the internet, like I do a lot these days, so I can't google)

Post googling Update: Joy! There's a tool to boot from the serial port! Boo! I have to build redboot from scratch for it to work. I've been meaning to do that anyway, but...

There's no one to blame for this but myself. I should have dumped the contents of the flash there and looked at the strings in it to see what it meant before I overwrote it. Shoulda, but I didn't. I normally would have done that, back when I was doing this professionally. I would have puzzled and agonized for days over the mismatch between the flash info, the documentation, and the source code...

(Back then, the boards I was working on were usually very early prototypes, worth thousands or tens of thousands of dollars. My fear factor with a 145 dollar board is considerably less.)

It would be easy to fix if I had a jtag interface available, or was still living in the Silicon Valley, where I could visit any of a bunch of friends at companies that keep stuff like that lying around.

Sadly, this is the furthest I've been away from a jtag debugger in a decade. I keep meaning to get one, but they tend to be rather project specific and I've been unable to settle on the right boards for what I intend to be doing.

The nearest jtag debugger is probably 1200 miles away, in Florida, maybe further than that as Florida isn't exactly known as a hotbed of embedded development.

OK, so I rationalize to myself:

This was just an experiment, after all, to see what I could do that was new and different in the embedded world.

I've pretty much determined that the range of software I want to run is going to require at least 256MB of ram, and I might as well go for 512MB. I was kind of hoping to keep prototyping on the board (it was already quite useful as it was).

At the time that I killed Pocobelle... I was successfully running (all over ipv6):



All on this 300mw power sipping machine. I'd transfered every function I'd had a dedicated server (an old laptop) doing onto this box and was ready to turn it off...

The only things that were annoyingly slow was heavy duty disk writes, (databases in particular) and the startup of interpreted programs was very slow, particularly in the web service side.

I had just switched (yesterday) from apache to using lighttpd - which was much faster than apache and, as a bonus, gave me high speed .flv streaming) and was working on getting fastcgi to work with the web interfaces for dimp, cricket, zoneminder, and my new blogging software.

And I killed it...

The darn thing was getting useful. I was actually getting dependent on it... it was routing my /48 ipv6 network, and running DNS and mail for the whole house and was serving up a bunch of mp3s and videos...

I'll miss you, pocobelle. I'll get you fixed as soon as I can, I promise.

The beauty of this particular project is that I can retreat, for a while, into booting into a qemu emulator of the arm processor in it. I never needed actual hardware to run it in the first place. It WAS essential I prove the board and kernel reliable and get a feel for it's performance. That's it.

All the binary code for it actually lives on a USB stick. I can just pop that stick over there and resume working.

(This is so much better than life in the old days, pre-usb sticks, pre USB, even... I have spent months in my life in a jtag debugger, just trying to get freshly designed and probably buggy board to run the first 50 instructions...)

So I slammed the USB sticks into another machine, made a copy, converted the result into qcow2 format, and booted up pocobelle virtually via qemu. The out of the box Linux kernel I have for that emulator is the Versatile variant of arm, which needed a bunch of modules, so I booted up another copy of the emulator that accessed the original versatile system image, and copied those over. I told inittab to use a slightly different serial port (ttyAMA0) and /etc/securetty (to let me login on that port)

And vPocobelle came to life once again! (I still need to figure out the tun interface to get the emulator on the net, however)

It's actually 3x faster to run out of the emulator in this case actually!! And the kernel I was using was fully baked! I was done. I didn't need to work on it anymore! And I'd intended to focus on userspace issues anyway and see what more memory did for me...

So (temporarily) losing the hardware is a setback, but only a minor one.

I really, really liked that it let me stay on the internet for a week without power. I'm writing this now, without power, or internet... (Note to self, get more gas for the generator monday)

I have no friggin idea how or when I'll get Pocobelle to boot again.

Maybe I'll find some california surfer dude visiting that can pick me up one in the Valley on the way down here....

It's probably cheaper to just get a new board...

I wonder what that will be?

Labels: , , , ,

 
Wednesday, October 07, 2009

  A quick automounter rant

A nice feature added to most Linux desktops in the last couple years, is the robust support of plugging almost any USB device into it and having it "just work". Printers, USB keys, Mp3 players, pretty much all "do the right thing" now. USB support in linux is comparable to Mac and Windows now...

... Including the flaws.

I don't understand all the magic that takes place behind the scenes to get a mp3 player to mount on /media. I understand it picks up the partition table name somehow, and gets an event...

But...

Why do we mount the devices read/write? And leave them mounted all the time? And require human
intervention to eject them? And have bad things happen if you don't do that? And (at least on the box I'm in front of) require you be logged in to the desktop to have it automount it in the first place?

Linux has had an automounter since the days of Apollo (Not the NASA version, the HP version), and for local devices it works pretty well. Automounters have never worked perfectly of course, particularly over failing networks...

It turned out pocobelle didn't do any of the magic that my desktop did, not mounting the drive at all, so I sat down and implemented automounts mostly the way I wanted them to work in the first place.

I added the following lines to /etc/auto.misc

sansa -fstype=vfat,rw,uid=1000,gid=1000,umask=022 :/dev/disk/by-id/usb-Rockbox_Internal_Storage_90000000000000000A4B4511712031AFD-0\:0-part1

sansa2 -fstype=vfat,rw,uid=1000,gid=1000,umask=022 :/dev/disk/by-id/usb-Rockbox_Internal_Storage_90000000000000000A4B4511712031AFD-0\:0-part2

(These are each one line. yes, my sansa runs Rockbox)

I created symlinks to the device in my public_html directory, so when it was plugged in I could stream media from it from any of the other devices in the house. When not plugged in, attempts to access it result in file not found, which is what I want. Also, when it is plugged in, I have a cron job setup to suck down some music at night from some internet radio stations I like (and not when it's not connected)

According to the setting in auto.master, it auto-dismounts 60 seconds after the last program using it stops, which makes it easy to just unplug it when I want to take it on the road... 99.99% of the time it will be dismounted - and I'd like it to mount read-only until something wants to write to it, which would take care of a few other nines... and implement a forced killall processes and umount triggered by a switch on one of the DIOs on the board to take care of the last .000001% of the problem.

Labels: ,

 
Monday, October 05, 2009

  Some news from the life and death and life of Pocobelle, the 300mw mail router



The Pocobelle project, day 10



Pocobelle has been acting as a backup email router for a few days now.

I get several hundred emails per day. It used to be thousands, but I switched to using netnews & gmane for my more high-traffic mailing lists, the lists that I mostly read and don't write to, such as lkml. Pocobelle successfully coped with the email I get in the dribs and drabs I get it in - I didn't have any complaints. It was transparent to me, and everybody. It did STARTTLS crypto without cracking 10% of cpu. My tests included sending a few dozen mails from a server outside my network, but that was it. Most of the time mail goes right to my laptop...

Today was the perfect day to try pocobelle out in a real world scenario.

I was without power or internet for 8 hours. My generator didn't work. (Most likely, I'm out of gas). My ice cream melted. Oh, well. I needed to defrost the chicken anyway.

The UPS that pocobelle was running on showed 95% of it's battery available after that period. I was really happy about that. Assuming I have a week when the internet stays up and power doesn't I should be able to have my email delivered without a problem, and periodically fire up the laptop to read it.

At 7PM, power and internet came back on simultaneously. I had previously turned off email to my laptop (and turned the laptop off, to save power). I booted up the laptop just to watch pocobelle do it's stuff...

Pocobelle got on the Net... Got an ipv6 address... And started getting the backlog of mail...

The Bind9 DNS server rapidly got to 23MB in size... The cpu went to 100%... 93% of it, gone, waiting for disk access.. the Loadavg lept past 5... available memory dropped to zero... My ssh session locked up...

Midway through the 15th email it bounced 3 messages, then it died.

Pocobelle ran completely out of memory and came to a screeching halt.

Sigh. The perils of engineering.

I hadn't thought deeply about the interaction between DNS services and email. Freshly booted, there is no DNS cache on the system.

I hadn't thought about a complete and utter cold start of absolutely everything pocobelle was connected to. There were no DNS caches anywhere it talked to that weren't "cold".

I'd got into a pathological situation, where the bandwidth being chewed up by all the mail being sent, and the time it took to "walk" DNS to verify it as "good" mail, competed and combined to bounce mails it couldn't do a reverse lookup on.

At the same time, the load on the system was such as to put it on the moon in short order.

As crashes go, it was not pretty. It brought back a flashback from 1995 where a CEO I knew, ecstatic with his new 26MB powerpoint presentation, emailed it to everyone in the company, and everyone he knew in the world, besides. That was an age, also, when a *good* mail server only had 64MB of ram....

1) Pocobelle only has 64MB of memory. (Pocobelle 2 will have 256MB or more) An easy "cure" for the memory problem was to enable swapping. When running without swap a Linux system will free up memory by discarding unused (read-only) program text pages, which are read-only, and swapping them in from the filesystem when they get used.

While there are a lot of binary pages you can do this to, it doesn't work on pages that have been modified by the linker, and it (especially) doesn't work on interpreted languages like python and perl. These languages often do have plenty of little-used pages, but they are *data* and can't get discarded because some day they MIGHT be modified further.

This arm build does not appear to have Jakub Jelinek's prelink utility installed, which will free up more memory by prelinking the various binaries. Prelink solved a few problems, but in the arm world, most people (I'm not) use a libc that wasn't compatable with prelink. I'm still researching this...

So, anyway, there are plenty of things that can't get swapped out that could, if swap was enabled. So I added 128MB of swap on the flash. Linux doesn't require that you have swap on a raw partition (although it is a good idea), so I just did a:

dd if=/dev/zero bs=1024k of=/etc/swap count=128
mkswap /etc/swap
swapon /etc/swap # and add to /etc/fstab

An even better cure for this would be to use a box with more memory but that's a problem reserved for pocobelle 2.

With swapping enabled, pocobelle grew decidedly less "chunky" in the general case. There is always a lot more free memory available for general use - for example, bind9 dropped from 23MB of ram down to 14MB. In normal use, 16MB is living on swap by default.

Whenever I get around to reformatting this USB key, I will put swap on a raw partition. I might put it on the built-in flash on the board, actually. We'll see.

2) Pocobelle was configured to use one DNS server - it's own - and forward to several local servers attached to my wireless network, provided by my provider. While this is a decent config... One that a normal client would use... given that all of the servers it was connecting to were ALSO freshly booted and ALSO had to walk DNS there, they ALL failed within the default DNS timeouts.

What I decided to do was establish a robust set of DNS servers (5), having pocobelle talk to itself twice - once in the beginning of the loop and another time at the end. In the middle it talks to my main mail server, which having already done the anti-spam protection in the first place should have a cached record of the remote server's origin already.

It should effectively put a 10 second timeout on the DNS lookup instead of a 2 second one, AND get to at least one server that has a good, primed, cache; a server in the US that's impervious to power failures.

(Getting this to work was a little tricky in that I'm using bind views internally to give me a consistent picture of my network and routing configuration(s), but I'm not going to go into that here)

I hope this is sufficiently robust. I'm not going to purposely instigate another 8 hour delay on my email, at least, not in the near future.

Another answer to this is to cache more of the internet's DNS service at the start, before accepting mail. (My mail is mostly not random, but comes from a limited number of mailing list servers). I have a buddy that used to cache the entire DNS root zones back in 1995. Maybe that's still possible.

It would be good to have some sort of cache log that I could replay on name service startup (or at certain times of the day, for example, shortly before I wake up in the morning) to prime the cache(s). I can sort of do this by replaying the mail logs through the DNS system, but it would be cleaner if I could figure out a way to get my top 100 sites out of bind periodically.

3) Given that write speeds to the flash are so slow it would be best to always keep at least 512K reserved for disk buffers. Smaller writes than 128k at a time are *bad* with flash.

I used to know how to do that, but the interface to the Linux swapper has changed so much that I have to google to figure it out. (Most of this blog was written after the power failed again)

4) Given that one of pocobelle's purposes is to be a mail router, and it lives on ipv6 which has little to no spam on it, it's somewhat pointless having even the minimal anti-spam services I have on it (like those reverse lookups that caused the bounces in the first place)

I'm not going to do that, I actually want to make this into a system capable of the best anti-spam measures I can come up with because spam is just never going to go away.

...

So, after fixing 1 and 2, I fired up rss2email on a new user on pocobelle. Rss2email is written in python. It took 12 seconds to start, and 16MB of ram, and was really going slow, so I decided that I didn't need to do that on pocobelle itself, but on my smart host elsewhere. Pocobelle just needs the mail itself, not the process that generates it.

Result: I got 25 messages as fast as they could be delivered.

It ran happily with 16MB of ram out on swap.

I'm happy with pocobelle today. I'm going to turn off my laptop tonight and see what happens.

AM Update: I turned the laptop on again, and got about 60 emails sent in rapid succession. The night before I'd double the default number of connections to 12 in a burst of optimism.... Pocobelle handled the load, but I think I'm going to limit the number of inbound and outbound connections to 4. At 12, it ran at 93% of cpu and got down to very little memory during it's burst of email. Pocobelle needs to remain responsive to DNS, in particular, as it's the main DNS server for the household, and has quite a few other things to do besides email.

Now, I'm running full starttls (encrypted) email inside of my household, which probably accounts for some of the cpu usage, but I think the overhead was of startup and running all those processes, not the crypto.

Maybe I'll try rate-limiting the number of inbound connections via iptables, tarpitting them maybe, to keep the mail server on the other side happy once pocobelle it gets past 3, keeping it from rescheduling the mail repeatedly. That will ensure a burst of email actually gets sent, albeit slowly. (this is also a good anti-spam measure)

On to figuring out 3 and 4...

Labels: , , , , , , ,

 
Saturday, October 03, 2009

  ipv6 and smart(er) mail relaying in postfix

A couple weeks back I started running most of the mail servers I am responsible for over ipv6. I posted a few notes to the postfix mailing list on that.

(My apologies for the excessively geeky contents of this blog recently, I have a few more "normal", real world. blog entries in the queue...)

I posted this question to the postfix mailing list today. (I got some good responses, more info the Updates sections)

I'm trying to wrap my head around a new problem - trying to have two postfix relays and a smart host co-exist where one of the relays is a tiny power sipping ARM based board... (Read on for details)

To recap, what I did was configure my in-house (and other servers I run) server to only listen and send on ipv6 via:

smtp_bind_address6 = my:ip:v6:ad:re::ss
smtp_bind_address = 127.0.0.1

And forward mail to my ipv6/ipv4 smarthost located in the co-lo facility via:

smtp_fallback_relay = [mysmarthost_onivp6.example.org]

For when that doesn't work. Postfix tries connecting directly to the given email addresses, which are usually ipv4, fails rapidly due to being bound to localhost only, then forwards to the smart host, for ipv4 hosts.

This handles the common case where people refuse mail delivered directly to them via ipv4 from invalid reverse dns, and hopefully works generically for those few sites (including my own) that exchange mail over ipv6.

That's been working pretty good. I'm not aware of having missed any mail at all since switching to this method. All the servers I control are exchanging email directly over ipv6 without the smarthost in the loop. I like it. Email is direct, secuire, and as fast as instant messaging once again.

Now I'm trying to wrap my head around a new problem.

Recently I built a 300mw (that's milliwatt!) postfix mail router out of an old 64MB ram TS7250 ARM board I had lying around and a 4GB usb stick, running debian lenny.

It works pretty good in my testing so far. STARTTLS Crypto works, it runs at the speed of my internet link (24KB/sec) without any problem, and transfers on the internal net at ~500KB/sec (it's bound by the usb stick, actually). I have not abused it heavily yet - I need to see what happens when I send very large emails, for example. I will have to limit the number of inbound and outbound connections, to be sure.

(I live way out in the country, and have a (slow) wireless connection to the net. Power and/or internet frequently go out. Remember the bad old days, when email got transfered via dial up connection or via carrier pigeon? Technologically, I'm living there, admittedly with a splendid view of the ocean.

Running a 300mw mail server makes a lot of sense - I have enough battery power to run for days instead of hours sipping power like that (the wireless router uses about 5w) It beats running mail on my laptop, at 65w, by a country kilometer.)

So what I think I want to do is setup fallback relaying as follows:

MX 5 mylaptop.example.org # if my laptop's up send mail there
MX 10 mytinyarmbox.example.org # if not, try my arm box
MX 20 mysmarthost.example.org # otherwise, default to my well connected host

Now, 99.9999% of the internet is NOT relaying mail over ipv6, so what happens in that case is my or your mail ends up at my smarthost, which then relays it for me.

Problem 1) I am under the impression from a foggy memory of reading some RFC or other, that at minimum, 2 MX records will be tried. So adding a third might introduce problems with some MTAs that ONLY do 2 MX records, in that far off day when more stuff speaks ipv6 directly, or when it
fails to fallback to my third, primary smarthost.

Update: Wietse Venema quoted me chapter and verse of the related RFC2821, which states:

More on how I currently solve this are going to be subject of another blog entry. Briefly, I implemented Bind9 "views" to present two MX records to the outside world, and 3 to my own. Postfix exceeds the RFC in every respect, and does the right thing. Solved. I'm routing my own damn mail.

Problem 2) My smarthost is only smart enough to try sending to one other relay (I think).

Problem 3) Similarly mytinyarmbox is only smart enough to try sending to one smarthost. I'm afraid if I set it up to relay it will fail to reach my laptop, then relay mail back to the main smarthost which will relay it back to the arm box which will relay it back to the smarthost until the loop count is exceeded. I guess I'm looking for some "never use the smarthost relay for these domains" option in postfix... Obviously, after googling, I'm not phrasing the question right....

Update: It turned out that the smarthost lines in postfix "do the right thing". It will not try to send email to a server that I control that has a lower MX record priority than itself. I couldn't find an answer on google, because smarthost does it right to begin with! Wietse, again:

All I did was add another smarthost to my laptop, so when it can't get to my main server, it forwards the mail to myarmbox. In /etc/postfix/main.cf:

smtp_fallback_relay = [myreallysmarthost.example.org] [mytinyarmbox.example.org]

Bing! I can turn my laptop off 10 seconds after sending the last mail, and know that my mail will eventually get to the Net without my further intervention.

Now, it turns out I badly borked DNS the next day, and I'm still sorting through that, but that's not a postfix issue.

Problem 4) My laptop/primary mail server is actually on a dynamic ipv6 address (I control what ipv6 tunnel it is running on and update its dns record with nsupdate when it changes), so that no matter where I am, I have an ipv6 connection, when I have a connection. It seems inefficient
to route mail to my house and then back if I'm not there, especially when my house is off the net and I'm not there to fix it...

Update: The above problem is basically fixed by the dual smarthost line.

I am patently aware that there are other, less crazy ways to do all this (like fetchmail or offlineimap), but 1) I get a lot of mail (think: lkml) so getting email whenever possible, in the background, rather than via a cron job that eats my connection for minutes or hours at a time, is a good idea, and 2) I have to run my own mail servers anyway, so why not skip that step? And 3) It's kind of fun.)

If anyone would like to dink with this little arm box, email me privately, I'll set you up an account.

Labels: , , ,

 
Thursday, September 24, 2009

  Squid 3.1 (with ipv6 support) lands in debian

Last night I got an old box with an arm cpu mostly working. I used to use it as a dns and dhcp server back when wireless routers were lame. It's a TS7250 - a great little 200 Mhz ep9302 arm box, eating only 300mw of power (less with power saving on!), and now that I live deep in the boonies I figured I could retask it, maybe make it run email and squid, etc. Aside from floating point, it's probably about as powerful as a pentium II, and I used to hang dozens of email users off of one of those. I just need to support me and my roomate. 300mw sounds about right.

But it's gotta speak ipv6 to talk email in my world. So, first up was getting an ipv6 enabled and modernized 2.6.29 kernel... which I mostly have now, thanks to these patches for the ts-7250 which bring it up to date, enable 64MB of ram, and a host of other features on this board that I didn't even know existed.

Next was that all-important ipv6 enabled squid server. I've been building my own squid server with ipv6 support ever since the OLPC project started, and I'm kind of tired of it... and figuring out how to get it to cross compile for debian on the arm eabi I was NOT looking forward to.

This morning I downloaded the Squid 3.1 release and was preparing to get it built, looking over the bug reports in debian and in ubuntu and dreading having to build my own version for the arm box and...

I hit reload...

And Squid 3.1, with ipv6 support, landed in debian this morning. How cool is that?

Sometimes the net works in weird, wonderful, ways.

Labels: , ,

 
Friday, September 11, 2009

  Building a virtual mesh potato, part 1

Hardware for the mesh potato has been delayed another month or so (and I can expect another month for delivery), and I'd planned on starting work on it in September, so I was stuck. I have plenty of things to do but my mindset had turned toward hacking... I also wanted to hack my existing router into better shape for ipv6. The two tasks are congruent as they use basically the same OS and toolchain, so I spent most of the last two days building up an environment to work on it, without the hardware.

Enter qemu debian mips.

I spent a lot of time going down the wrong paths - for example it wasn't obvious to me that you needed an elf format kernel to run the thing. I also spent 24 hours of computer cycles trying to do debian install via the emulator, only to have the power fail 93% of the way through.

So, this morning, I downloaded a debian image for qemu mips. 24 minutes later I had a booting virtual mips box, emulating the MIPS to fool around in.

It Just Worked.

Embedded development just got a lot less hard. Flashing (and crashing) boards is a painful process easily avoided with an emulator. You can also do all sorts of robustness testing of the core software without fear of wrecking one of the precious few boards available, and you can work on "branches" of the core software by just keeping a couple copies of the emulator image around.

Heck, a good multi-core machine could probably emulate a dozen potatoes at the same time.

Once I get openwrt boostrapped onto it, it will let me fiddle with more modern kernels, alternate tools, and eventually the openwrt userspace that the mesh potato uses with well as the web interface, etc, long before the hardware is available.

I seriously doubt this is going to be fast enough to actually run the core voip software, but we'll see. The other core feature - mesh networking - may well be simulatable.

Maybe I can make a virtual box visible on the internet, too. That could help a lot of people.

My hat is off to the QEMU and Debian guys. You're awesome.

Back to hacking together a more modern kernel....

Labels:

 
Wednesday, September 09, 2009

  Accidentally cross building Linux 2.6.31

I'm not really planning on re-entering kernel development. While intensely fascinating, it takes too long to compile on the hardware I have left to me, programming in it is finicky and painful, and getting fixes pushed upstream can be a nightmare, especially on the embedded architectures I used to do so much work on. It takes forever to download updates to whatever git tree I'm working out of, where I am, too.... I have a lot of trees and code lying around that let me build custom OSes quickly, but nothing worth publishing, all of it out of date...

...I am planning on kind of getting involved again, to whatever extent necessary, when the village telco ships some boards, but that's it. Well, that, and freeswitch. I keep telling myself that. I have to keep my involvement in charitable projects down enough so I can afford to eat, next year.

But I got a bee up my butt regarding dd-wrt. DD-WRT is a fabulous upgrade to many consumer grade routers, I've been running it (and its cousin, openwrt) off and on, since the projects' inception. They make consumer grade routers tolerable, with features like dynamic dns, local dns, sip routing, and ipv6. I installed the latest on my WRT300N a while back, and it's quite awesome, a real step up in sane additions to your home network.

I've also been fooling around with ipv6 a lot ever since all of google got on it a few months back, and dd-wrt almost - kind of - works - well enough to tolerate. The default dd-wrt doesn't contain ping6 or iptables6 or a current version of radvd and the web server doesn't do ipv6, and there's no dhcp6 server, and I'd really like to get bind running on it... and... it bugs me and...

... the dd-wrt kernel on this particular router is still at 2.4.X, which is so obsolescent it hardly bears thinking of. Worse, in dd-wrt - that kernel gets compiled with an ancient version of gcc - 3.3 - and there was just no way to get the 20GB+ svn checkout of dd-wrt from there to here without a lot of pain I still can't bear thinking of.

Fiddling with toolchain incompatibilities is something that I'm not even willing to get paid for nowadays. Fixing code to compile is not coding.

There has been a lot of changes to IPv6 that landed in the 2.6 kernel and didn't get backported to 2.4, too. In particular, so far as I know routing announcements got made more sane (so default routes should "just work"), mobile ipv6 (which kind of appears to be a dead project) got incorporated, and all this other cool stuff is in there too (and yea, I'm the type to get excited about fannotify).

I had a little spare time this afternoon...

So, on my well connected host (thank YOU isc!), I pulled down Linus's entire git tree today. It took about 4 minutes. kernel.org is on a GigE network 4 hops away.

traceroute to git.kernel.org (204.152.191.40), 30 hops max, 60 byte packets
1 guest.r1.sql1.isc.org (149.20.54.2) 1.469 ms 1.842 ms 1.832 ms
2 int-0-1-0-0-606.r1.sfo2.isc.org (149.20.65.3) 6.497 ms 6.522 ms 6.502 ms
3 int-3-0-0.r1.pao1.isc.org (149.20.65.129) 4.059 ms 4.070 ms 4.050 ms
4 git2.kernel.org (204.152.191.40) 1.757 ms 1.744 ms 1.725 ms

It would probably take a few days to pull the tree where I live now, and forever where I am moving next week. I try to tradeo-ff bandwidth issues with rsync a lot, pulling down source trees to this machine, then (slowly) pulling them down to my home machines. That way I can handle partial transfers and eventually get what I need to home base, but multi-GB downloads are no fun, regardless...

I configured a basic kernel for the mips + broadcom architecture that's in my WRT300N, did an apt-get install of emdebian's cross development infrastructure (another 20 minutes because it had to come from France) and the gcc 4.3.2 cross toolchains for mips and arm...

and fired off a batch process to compile the kernel.

batch <<AAA
cd ~/src/git/linux-2.6; make O=/home/d/build_wrt CROSS_COMPILE=mipsel-linux-gnu- vmlinux modules
AAA

I may be horribly retro for using batch but I love it - I can queue up lots of work for (this very slow) processor, go offline, and get notified via email when each job finishes. (I configure atd to default to a high load average so it handles the multiple cores better) I queued up a download of the latest dd-wrt tree, too...

About an hour and half later, my email dinged. There wasn't a single error in the compile. It generated the modules, symtabs, and vmlinux, apparently perfectly. Amazing. Compiling for alternate architectures never looked so clean before.

It can't possibly be this easy. No, I don't want to take this further. There's probably definitely something that just won't work on 2.6 on this router, some proprietary module somewhere, and that's why nobody's done it yet... No, I don't want to try booting this kernel on my WRT. No... somebody stop me... please...

I had entered the kernel development schedule into my org-mode so I can surface every so often and check in on things, and I was kind of aware that Linus was planning on releasing 2.6.31 "soon". It turned out that about 5 minutes after that build completed, he released the that exact same code with the change to the makefile calling it 2.6.31...

Now I have to recompile with the right version number, so I did a make clean, and fired off the same batch process.

And checked in on my svn checkout of the rest of dd-wrt. It had hung partway through... but enough came down for me to figure I really could try a new toolchain through the whole thing, update busybox, radvd, and maybe take a stab at cross compiling a minimal version of bind...

Do I really want to rebuild my entire router from source code and move ipv6 another iota towards acceptance?

I just checked the surf report. There's no waves til saturday. I'm doomed. I Sure wish I had two of these wrts available so I could brick one - or a working qemu emulator. Yea, lacking those, it would be insane for me to continue... I *NEED* this router just to exist on the internet...

batch <<AAA
cd ~/src/qemu-0.11.0-rc2; ./configure; make -j 2
AAA

I'm going to dinner now. I need another distraction, fast.

Update: I got back from dinner and went right back into deep hack mode until 6AM. I managed to build an ipv6 enabled version of openwrt for the mesh potato, but have totally failed to get a working mips emulator going...

I guess freeswitch is next. And maybe some more sleep.

Labels: , , ,

 
Wednesday, August 26, 2009

  Beach calm #1

The day I published my last blog, I'd made my top priority finding a new house to live in.

I got up early to go to La Playa Yanqui. There, I met Alan, the proprietor of a B&B there, and we had a lovely discussion about just about everything... just him, me, and his dog, on that beach, by ourselves, shortly after dawn.

He mentioned that his neighbor's house was up for rent in September.

I got a nice surfing session in. The water was clear and warm. The waves were small and otherwise empty of other people. There were a few jellyfish, but they didn't sting that bad.

I got back to the car and broke the key off in the lock. Disaster, right? You're at an empty beach, all alone, on the wrong side of a mountain, and your cell phone is on the other side of a glass window and wouldn't work anyway, even if you could get at it. You're tired and hungry, in the middle of nowhere, you've spent twenty minutes with exactly one person who lives somewhere nearby but you don't know where that is and you have places to be and things to do and your key is broken and there is nobody around and you have to get out of there somehow as soon as you can so you can go deal with life itself...

I tried a variety of ways to get into the truck, and failed at all of them.

I sat down to calm down, and then walked over to some rocks, dangled my feet in the water, looked at Costa Rica, only 18 or so miles away... and I realized that I really didn't have to be anywhere, or do anything at all. Somebody would come along... or I'd walk over the mountain... and it was a damn beautiful day. The sun was shining, there was that early morning stillness, birdsong, and waves lapping gently on the beach... and I was getting some energy back...

And, after a while, I realized that I really wouldn't mind at all if I had a string of days with nothing to do and nowhere to be, just like this one.

I was more trapped by my need to be elsewhere than by where I was.

The answer to getting the door unlocked finally came to me, and in a few short minutes I was "free" to go home and do whatever it was I thought was so important I get at earlier. I couldn't for the life of me remember what it was.

Just as I finished packing up the car, another solitary surfer showed up.

I wished him the best of all possible days.

...

On my way home, I went up and visited Alan and his wife at their lovely, calm, wonderful B&B that they have spent 9 years building with its fabulous view of the ocean and Costa Rica. (I'm totally embarrassed to have forgotten the name of it, and it is completely off the intertubes)

They offered to show me their neighbor's house, but I deferred - I had places to go, things to do - and I couldn't let myself hope, too much - maybe it was a shack with holes in the roof, deep in the forest - I mean, that was sort of what I wanted, something that Henry Miller would have dug, but I kind of needed lots of electric power....

But by 11AM. I'd maybe solved the biggest problem I had, a problem I'd had for over 10 months, without even trying, totally by accident. It was magical.

When I got back to the chaos and confusion of life in town... my main computer - all 900 watts of quad core and and triple screen technological powerhouse, had died.

I can't honestly remember when it died, actually, it was kind of traumatic and I wasn't coping with it well. Maybe it heard I was thinking of going off the grid and euthanized itself? I'd gotten very dependent on having three screens available for my work, in portrait mode. That power-sucking howling technological mass of terabytes was always on, full of things I needed to be working on... but I didn't need to be working on them that day. I got on my decrepit laptop instead.. and had dozens of birthday wishes in my mailbox. It was awesome... I got too many wishes to reply to them all and was done with the computer long before 1...

Later on I played a whole lot of music - and had a lovely lunch and dinner with some friends.

I can't remember what else happened that day, but it was a perfect b-day.

The death of my main machine actually opened up a whole new realm of possibilities for me, but I'll get to that in my next blog.

(my apologies to Alan, I will rewrite this piece with the name of his B&B as soon as I remember it)

Labels: ,

 
Tuesday, August 11, 2009

  Designing an architecture for 2010 and beyond, for me

Here I am. A Birthday Boy again. 44 years old. Ancient. Ugh. Unless you take the speculations of the Exotropians and Singularitists seriously, I'm well past the midpoint of my lifespan. I maybe have 20 years left to me. I mostly feel like I've lived a lifetime already. I used to have to work 18 months a year to get by. I used to take down a lot of money, and yet was still broke all the time. Now... I live in the third world and work on charitable stuff a lot and am still broke all the time. I daydream of making 3k a month for the most minimum effort I can make while sticking to my principles. I have like 20 plans to do so, most in various states of disrepair, hung up on one thing or another.

I tell myself, that for the past 5 years, I've been working on straightening all that out.Myself tells me - "Get with the program!" and "What have you done about all that, lately?"And I reply:The school next door starts up at 7AM, 6 days a week. 200 niños y niñas are on a permanent screaming recreation break, it seems, from start of school till 5PM, and then the marching band practices from 5 to 8, and after that, SJDS is usually partying down, loudly.

Larry Niven theorized with his Protector alien, that at mid-life, protectors lacking family would have to adopt their entire species to have a purpose in life, and those that didn't adopt their entire species, died young.

I could use a little less of my species running around screaming.That doesn't count the fan that's always running, either. What little work I've been getting done has been done nocturnally as a default and I'm often sleep deprived.

Moving to the house I'm in has to rank in the top 10 of the worst mistakes I've ever made. Every conscious minute I have had for the past 9 months has been filled with external noise, except when I was surfing. "Excuses!" - myself tells me.The peace I get from surfing doesn't last more than a hour or two once back in town, and it's not like I'm getting any work done out on the waves. (well, my belly has mostly moved to my chest) I can't surf every day, as much as I would like to, because there isn't surf every day, nor is my body up to it. Every other day is feasible, every third day, probable.

I got the opportunity this week to house-sit at a house that's way off the grid, deep in the country, overlooking a valley, near an awesome surf beach, without a single electric light in eyesight at night.

I wrote most of these past two blog entries by candlelight, in Emacs's org-mode. The crickets and howler monkeys are the loudest thing I can hear. It's wonderful. Moving back this far into the country has problems - I'd need a 4WD car and more capital overall - but perhaps just moving to a quieter neighborhood in SJDS will suffice - I do like not having to manage a car - but even those solutions begs the question: Jeeze, what do I want to do with the rest of my life?

Let's review.

The year so far... Professionally

The year so far, despite my disgruntlement on this day, has been a good one. I worked on a pretty cool music application that I can't talk about publicly. I may do a bit more work on it later this year.

I got stuck on it, though. I handed off the work to a programmer I deeply respect, and although he made serious progress, he didn't quite make it work, either. I feel perversely good about that.

After years of trying, two of the Linux drivers I wrote finally made it into the main kernel distribution. Not a lot of people can point to their name in the kernel. The ardour interface to one of them works well in ardour for the few users I have, but need a bit more work to make it into ardour's mainline. I'm told people are working on rosegarden and mplayer support as well. I'm happy. I wish the darn drivers were done so I wouldn't have to think about them anymore but no-one has shown up to take this cup from me yet. I'd like to finish up the first driver entirely and start on the ardour interface to the second one.

Visits

Much to my surprise my cousins, Laura and Linda - who are the most adventurous members of my family, by far - came to visit me in Nicaragua. They had a great time.

My gf from HS (She Who Will Not be Blogged) also visited for a week. This was mind-blowing, she's a New Yorker, New Yawkers just don't come here... She had a hard time with the heat, but had a good time in the night times. I hope I can lure more friends and family to visit in the coming years. The place really does have many charms, charms that will be paved over in 20 years. Some of my family even surf (yes, I'm talking to you, Bill), and others dive (Steve!).

I've got a little LISP, I've got a little LISP

For the past three years I've been writing down a long survey of what computer languages I liked and disliked, what was right about them, and what was wrong, what I did with them, & why I stopped. I got caught up on the bleeding edge of functional languages with experiments in gocaml and scalia, and also explored some unusual processors, like the Blackfin and Propellor, all in the hope that I'd find a language that tied to an obvious future generation of processors that would scale *me* into the next decade.

No such luck.That document not ready to be published, not by a long shot, but the list of languages I worked in is rather impressive, and the ones I merely played with even more so. All of which were useful and interesting inside of their domains and fail at one of the requirements above.Lately I've been working mostly in Spanish, which has been harder for me than all the computer languages I've worked in, combined. You don't have to pronounce "C", and all the weird grammar rules in Perl pale beside Spanish (and, now that I look back on it, English), and I still speak Spanish in a terrible pidgin that suffices for discussion of politics, women, music, food, and little else. After programming for nearly 25 years, it's second nature to view the answer to my problems is more programming. That didn't work. I came to the reverse conclusion a few years back that the answer was LESS programming, preferably, none. That didn't work, either. Now, I'm trying to find a happy medium. I wrote about discovering org-mode recently. It's helping a lot for re-programming myself.What I want to find is a language that has the equivalent of "set bugs off; do what I'm thinking", something simultaneously fast to write in and fast running, easy, scalable, and reliable. The age old answer to that is you can meet any two of those requirements with any language, easily, the third, with a bit of work, and the fourth and fifth, not at all. Pick any two to start with.
Most of what I worked on and in for the past decade executed fast and was not easy, down-right hard, in fact. It paid well, but the price was in language expressiveness and in my personal over-specialization. Once I was a gtk 1.x expert at a time when there was only three paid jobs in the entire field! I jumped on the voip asterisk bandwagon early, which paid for a while, and has now mostly died in the wake of Skype (but fear not, SIP continues to progress!).Right now I'm overspecialized in performance optimization (which nobody cares about) and real time programming (which few care about), and Embedded programming, which is all the rage, is mostly getting outsourced, for some reason. The iphone is hot (and I'm kind of sorry I missed out on that), as are cell phones in general (but I was involved in that back when it was hard, in 2000, and don't even own a high end cell phone now) I can't bring myself to care about cell phones. Webpads maybe... I have a story to tell about that, one day... I was still deep in Perl when the trend went to Java (I'm not sorry I missed out on java), Before I decided to take this summer off, I was working on making libsamplerate "do" SSE. SSE programming is hard - it is the equivalent of writing assembly in C without the benefit of a macro assembler. Hard. My early tests showed significant improvements that I think will bear out after I get 3 days of full brain cells to actually make it all work, and a couple weeks more of less brain cells to clean it up - but to do that I have to reinvent somewhat more C++ inside of C than I'd like. After it is *done* I'd like to not write in assembly any more. Maybe the compilers will catch up to SSE more in the future.

Hell, I'd like to ditch "C". I have multiple projects left to finish in C, however, and I don't see how I can quit using it - but I do hope I can use it a lot less in the future. I was tempted a lot by what's going on in Cuda and OpenCL- massively parallel programming is going to be the answer to some major problems - but after trying to wrap my head around doing libsamplerate in Cuda - I want to move up a level. (or quit the field entirely - how many industries are you aware of that require you re-invent yourself every five years?). C++, well, ardour's written in it, I still have bugs left to fix in ardour, but I'd like to quit that, too. Ardour rocks but it is extraordinarily complex under the covers.

One major program left to write

I have one fairly large program of my own, left to write, one that I must write, in some language or combination of languages I'll decide one one day soon. I keep hoping someone else will write it, but so far, no luck. I'm not going to talk about it today.
The biggest program I have left to write, though, is the one my life runs on, and it's barely booting right now, and pretty buggy. Some percentage of my output has GOT to get paid for. What that is - whether it be the music recordings I've done, the coding I do, the writing I do - or something else entirely - remains to be determined. What have I got that other people want?

Conclusion

In less than 10 hours spent on these two blog posts, I pumped out 5000 words, clocked in and out over three segments of time. I like knowing that. 500 words an hour, if it were paid, is a living at 6 cents a word. 10 cents would be better, of course, and some markets pay that.Doc's "Because" effect isn't working for me because I just don't generate enough output to take advantage of it. I need to follow Heinlein's dictum - "Sell what you write, write what you sell".

Itunes pays 33 cents a song, roughly, which has to be divvied up between the label, and the artist. Other services pay more. Both Apple and the major labels are trying to resurrect the album - which is great - I LIKE albums, I have recorded 9 albums of various Nicaraguan artists - structured as albums, not singles - in the queue now, and have been experimenting with multi-mode CDs - a normal CD with an additional filesystem on it containing pre-made mp3s, graphics, and hyperlinks. Coming up with the dough to get even one of them manufactured is a problem.

I'm going to take the rest of this month to work on me - via automating every task I can think of, mostly using Emacs LISP, taking the time to solve the hard problems well, for a change, and documenting and backing up the results so I will have them forever. It is a surprising conclusion, that the language I'd (re)learn this year would be any variant of LISP. It's remarkably retro, in fact, and not something I'd expect others to do. But I think better in LISP, and I need solutions that apply to me. I suspect I'll explore some more current variants of LISP - arc and Clojure come to mind... Clojure has a lot of appeal because of it's interface to the java virtual machine....And hopefully, in September, I'll find some paid project to work on. I've got 3 candidates. I've already lined up enough charitable work - notably the village telco is sending me a couple of their cool boards shortly - to keep me busy for years and years.

I don't how I extract myself from my current lease, I have to get into a new house as soon as possible. I have a shot at working out of Italy, perhaps, and I'd like that a lot, too, so I'll work on solving the housing problem via one method or another before my lease is up.The year is still young, even if I am not! I'm going surfing at dawn.

Update: It's dawn. I'm outta here.
Update (Aug 16): I tried to edit this piece with the blogger API. It did bad things. I will fix it later. Sorry for the loss of most paragraphs.
Update 6 Hours later: Fixed now.

Labels: , ,

 
Monday, August 10, 2009

  Going retro, re-adopting Emacs!

After the web hit me over the head in 1991, I started adopting one new shiny tool after another. My desktop was filled with a zillion browser windows (since replaced by a zillion browser tabs), a zillion chat clients (since replaced by a multi-chat client (pidgin)), skype and ekiga, Thunderbird (for email), an RSS client, ardour, a mp3 player (presently aqualung) and... Emacs for programming and writing. My bread and butter came from Emacs. My wine and cheese came from Emacs. Everything else was just shiny.

I'm writing this blog today, in Emacs, in glorious plain, green text, with a black background, without a single graphical gutter, handle, button, gee-gaw, etc, in sight.

Green on black is a cool, calming set of colors that lets me deliberate on things - (even if some of the best rants ever came from a green screen in Jwz's Gruntle)

I have - oops, I need to take a call - ker-chunk - context switch - and "oh! I have mail!" - ker-chunk - and - ker-chunk - someone on irc needs attention - ker-chunk - check out that new app! - and ...

... and before I know it, the day is shot. What Paul Graham wrote about the Maker's Dilemma really applies to me.I also need to relegate activities into work and play modes, and current window systems and tools are emphatically not designed to do that. They are there to dominate your attention. All the applications and web pages nowadays come with shiny, bright-white backgrounds. This is an exciting color! All the shiny apps call to you, saying "use me! use me! use me now!!!!" when I have better things to do. They all want the whole screen to play in, too. "Use me! Use Me! Use only me!"

I really want to dominate my applications and schedule my mind-slots for them in the times when I have brain cells, not vice versa.

I have ADD, bad, in the first place, and an attention deficit on paying attention to my attention deficit going on five years ancient. A five year old has a bigger attention span than I do.

I keep trying to cut the applications I use down to a bare minimum so I can switch between them with a minimum of context switch. Lately chat, rss, and email has been dominating my attention. Even 5 applications is too many - there's also the application I'm working on, whatever it is, to compete with for screen area.

Last month, I decided to try and make Emacs do more of what I wanted. I'd try to get rid of everything else - chat, mail, rss, and web...

Along the way, I was ompletely blindsided by the capabilities of a killer app for Emacs - Org Mode.

I have been whining about my need for a decent outliner for nearly a decade now. (I did not just whine, I also tried to write one in gtk) Word and OpenOffice seem to think that a screen slide's worth of outline is enough - which it isn't for bigger ideas, and all the other modern day outliners I tried were slow and kind of chunky. They didn't work how I wanted them to, in the environments I need them to work in.

I concluded that the kind of outliner I wanted, typeless, with all sorts of weird relationships between the data, was best written in assembly language, and my best shot would be to try and port something like MORE...

And I really didn't want to do that.

It turned out I'd had my perfect outliner installed all along! org-mode! I wrote this (and all of the upcoming blog entries) in org-mode, I'll get back to raving about org-mode in a bit.

Killing chat

I got off of the pidgin multi-client chat pretty easily. I use erc inside of emacs (irc is my primary chat system anyway). Adding support for msn, jabber, and yahoo I did via bitlbee, which is a universal server gateway for irc.

It turns out that I've forgotten most of my chat client passwords, and I haven't figured out how to get them back. Score!

The only thing missing from the default install of bitlbee was support for the Off The Record messaging extension, which thoroughly encrypts the chat conversation using source code I have a reasonable degree of trust in.

I like using OTR, a lot. OTR makes me feel much safer than almost any other system. Consider how Skype operates in china and think upon how much MSN, yahoo, etc must know about you... and how similar your government has become to China... and install OTR - it works with trillian, pidgin, and a few other chat clients. Bitlbee can be used if your client doesn't support it directly. You'll talk freer, trust me.

Getting that to work in bitlbee on jabber and yahoo required a custom compile of bitlbee, and has trouble with html formatted messages, but that was not much of a problem compared to the added security.

Along the way I added a keystroke (control-scroll_lock) to send stuff directly to the pastebin. Pastebins are really useful collaborative tools.

I have two chat systems left that I intend to minimize my usages of.

- The in-browser chat that facebook uses. It's buggy and slow and I hate it. I'm giving facebook the boot from my life, just like Valerie Aurora just did. To all my facebook friends: Sorry. Contact me via irc, msn, yahoo, or jabber if you need to chat. I'll get mail notifications, too, but please switch to sending email from a real provider. My email address is published on facebook. Please use it.

- Skype. I can't see how I can get away from skype, I'm hopelessly dependent on it, so it stays. I have, however, taken advantage of it's scripting capability to be able to log calls from skype into emacs to some extent. Next up, is to be able to make calls from emacs and more importantly, get it to co-exist with my other audio applications.

Killing the Bird


I'm almost completely off of Thunderbird, and am now using Emac's GNUS for sending and receiving email.

Prior to using Thunderbird (and mozilla), I'd used Eudora, and in-between I had a flirtation with gmail (OK, OK, it was a committed relationship) and PHB-like things such as Evolution.

Both of my primary email programs had a single feature that I was addicted to: Mail Filters. I have 3 dozen mailboxes that I use just to handle the volume of incoming mail I get, and something like 7 accounts. It's a real problem, even though I've got off of most of my mailing lists over the past couple years. I always found the procmail language error prone and difficult to use, so I discovered that a newer and simpler language, sieve, was now the default on ubuntu 9.04. I got the thunderbird filter exporter working, and spent an hour translating all those filters into sieve, and another hour debugging that...

... And about 10 hours trying to make it work right and work with Maildir and mbox format message boxes locally and over imaps, which didn't work, nor did it work on my older (8.10) ubuntu box, but I have high hopes to make it work, later. Maybe I'll do a custom compile of dovecot, or wait for another release. Right now I'm running without filters and I hate it. I'm almost ready to write some rules in procmail.

Emac's GNUs mail reader has seven features that I like - it doesn't show you read mailboxes by default, it (optionally) expires mail, it integrates with netnews and rss, I can get to it with a keystroke from emacs from anywhere, it does crypto, and it's very fast. The seventh feature I like is... it's very damn fast. Now that I have local email being spooled and received via postfix over ipv6 (no imap!) it's amazingly fast, as fast as instant messaging, and with leafnode and the local mail store... I process mail, news, and rss off the internet by default!

It required a lot of work to get this far, and I'm still not quite done, so I'll write more about that later.

Think about it, though, yourself. Why does sending email have to be slower than IM?

Enter... org-mode

.
Exactly one month ago I discovered that emacs had a very active project for a super-outliner... called org-mode. I fired up my emacs-snapshot, hit M-x-org-mode, read the manual, and fell in love.

Actually, I didn't read the manual. I sat down and just started typing and all the basic keystrokes came naturally. I was days along before I needed the manual. Later on, I'd think: "There must be some way to hoist a region" or "Schedule a repeating task", and there the intuitive command would be, in the manual.

I'd already been building the latest releases of emacs in anticipation of the 23.1 release... (Emacs's release cycle has slowly been getting out of a slow crawl into more of a stroll, which is suitable for a middle-aged program)

I just finished an outline of my entire life, of every project I have, of every task that I need to be doing, that is nearly 2000 subheadings along, 10s of thousands of words pulled from various sources. It will probably be 4x that long before I'm done, and that's before I add blogging capabilities to it.

It's full of to-do lists, ideas, and checklists, and needed items and budgeting. I hit two keys (F12 a) and I can see the week at a glance, or two keys (F12 t) - to see all my short todos that I could do when I have spare time, clock my time spent on any of it with another two keys, and stay on task with another (single key). Best of all it's all plain text, under git source control, so I can handle my words and tasks just like source code, and periodically checkpoint my status and push it out to a backup server, which I'm doing via cron. Heaven. For the first time in ages I'm not dependent on figuring out how to backup and track a zillion different types of files and databases in a zillion different applications.

One extremely fun thing about org-mode is that the books I've long been writing have timelines associated with them. After I get done importing it into org-mode, I can set my agenda to the far future (it starts in 2012 but most of the action is in 2022-2080) and see what is going on that day.

I've also plunked the arrival dates of the Dawn Probe into it. I can see my way clear to automating the light-seconds of several asteroids relative to each other against the date tags, so I can fiddle with an automated plot against the orbital parameters.

Remember mode and templates

An old friend, rediscovered, was Remember mode, with template support. Does anybody but me still remember how useful Sidekick was? Emacs's Remember mode is WAY more useful than Sidekick.

I can hit two keys (C-c r) to interrupt what I'm doing with a stray thought, and file it away somewhere else so I can deal with it at an appropriate time. Two more keys (the ubiquitous - "do the right thing" command, C-c C-c) and I'm back inside of what I'm doing without touching the mouse.

It's still not quite perfect. I'd like to do costing and budgeting - so I could schedule purposes of an item for when I need it, when I have the dough. I'd like there to be a better default scheduling estimate associated with several types of todo entries (which org-mode supports, I just haven't figured out the right template and timestamp sexp), and the start and stop times don't quite work the way I want them to, yet.


The custom templates code currently looks like this:

(setq org-remember-templates
'(
("Bug" ?B "* BUG %?\n %i\n %a" "~/org/BUGS.org" "Bugs" (emacs-lisp-mode))
("Journal" ?j "* %U %?\n\n %i\n %a" "~/org/JOURNAL.org" "X" my-check)
("Idea" ?i "* %^{Title}\n %i\n %a" "~/org/JOURNAL.org" "New Ideas")
("Web" ?w "* %u %c \n\n%K\n%i %!" "~/org/bookmarks.org" "The Web")
("Blog" ?b "* %u %c \n\n%K\n%i %!\n :PROPERTIES:\n :Effort:\t0:10\n:END:"
"~/org/blog/blog.org" "The Edge")
("Private" ?p "* TODO %^{Description} \n :PROPERTIES:\n :Created: %U\n :Backlink: ->%a\n :END:\n\n %?"
"~/.Private/Private.org" "New")
("Todo" ?t "* TODO %c%?\n SCHEDULED: %u\n\t:PROPERTIES:\n\t:Effort:\t1:00\n:END:"
"~/org/Do.org" "Do")
("Quick Todo" ?T "* TODO %c%?\n SCHEDULED: %u\n :PROPERTIES:\n :Effort:\t0:10\n:END:"
"~/org/Do.org" "Quick Do")
("Handheld" ?N "* TODO %c%?\n SCHEDULED: %u\n :PROPERTIES:\n :Effort:\t0:10\n:END:"
"~/org/handheld.org" "Stuff")
("Quick House" ?H "* TODO %c%?\n SCHEDULED: %u\n :PROPERTIES:\n :Effort:\t0:10\n:END:"
"~/org/Do.org" "Quick House")
("House" ?h "* TODO %c%?\n SCHEDULED: %u\n :PROPERTIES:\n :Effort:\t1:00\n:END:"
"~/org/Do.org" "House")
("Asteroids" ?a "* %u\n %c %? \n%:region" "~/org/bookmarks.org" "Asteroids")
("Ardour" ?A "* %u\n %c %? \n%:region" "~/org/Ardour.org" "Remember")
("Space" ?s "* %u %c %? :SPACE:\n\n%:region" "~/org/bookmarks.org" "Space")
("Emacs" ?e "* TODO %c %? :EMACS:\n SCHEDULED: %u\n :PROPERTIES:\n :Effort:\t0:10\n:END:"
"~/org/emacs.org" "Remember")
("FIXME" ?f "* TODO %c %? :FIXME:\n SCHEDULED: %u" "~/org/Do.org" "FIXME")
("TEST" ?Z "* %c %? :TEST:\n SCHEDULED: %(org-time-stamp +1)" "~/org/emacs.org" "Remember")
("Phone" ?p "* DONE %? :CALL:\n- STARTED: %T\n STOPPED: %T" "~/org/calls.org" "Calls")
("Get" ?g "* TODO Buy %^{ITEM}\n%^{DESCRIPTION}\n- DEADLINE: %T %?\n :PROPERTIES:\n :Effort:\t0:10\n :COST: %^{Cost}\n :END:" "~/org/buy.org" "Buy")
("Chat" ?c "* DONE %? :IRC:\n- STARTED: %t\n STOPPED: %t" "~/org/calls.org" "Chat")
("Delegate" ?d "* TODO %? " "~/org/delegate.org" "Delegate")
("Gnugol" ?G "* [[gnugol:%^{Keywords}]]" "~/org/gnugol.org" "Search Later")
("Procedure" ?P "* %^{Procedure}" "~/org/Procedures.org" "Procedures")
("Nicaragua" ?n "* %^{Heading}\n%^{Text}\n %c %?\n %u" "~/org/book/nica.org" "Notes")
("Ipv6" ?6 "* %^{Heading}\n%^{Text}\n %c %?\n %u" "~/org/ipv6.org" "Notes")
("Vocab" ?v "** [[dict:%^{Word?}]]\n%?\n" "~/org/Vocab.org" "Vocabulary")
("Someday" ?s "** %^{Someday Heading} %U\n%?\n" "~/org/JOURNAL.org" "Someday")
("Appts" ?a "* Appointment: %?\n%^T\n%i\n %a" "~/JOURNAL.org" "Appt")
("RT" ?r "* [[RT:%^{Number}][%^{Number}/%^{Description}]]" "~/org/rt.org" "RT")))


Adopting org-mode has put a lot more structure on my life than I had before, and now ideas, tasks, todos, thoughts, blog entries, etc are all going into more appropriate bins where (someday) they may get acted upon.

Another favorite feature (I have plenty more to write about) is that I can get stuff into org-mode from the command line or a web browser. One swipe of the mouse, one click on a special bookmark in firefox, and I've slammed a piece of useful information into the right spot in my personal database.

I know emacs's keyboard command set would offput anyone that was used to pointing and clicking for everything, say, most of those under 35, but for me, emacs + org-mode is heaven, found. Org-mode's default keyboard assignments are a natural for anyone that has ever used a good outliner, you hardly notice you are in Emacs...

Proof-reading and text to speech



Although I was a persistent reader of netnews, I never posted that much. I usually write several drafts before I'm satisified with what I wrote. Usually that takes days. I almost never post something late at night - and always regret it when I do.

Netnews has a feature that lets you supersede a message in transit but at the time I used netnews a lot I don't think it was available.

I'm grateful for blogging in that it helped me get over that first draft fear, and mad at it for not handling the follow on work well.

I'd like to take my existing canon and re-organise it, now.

I have always done better with a proof-reader. I have a terrible tendency to miss articles (the, a, etc), and mangle tenses. These problems become obvious when read aloud, but it is kind of tedious and still error prone for *me* to do the work.

I have used various speech synthesizers (festival, flite) over the years, as well as speech recognition software. In the latter case, well, if Dragon worked better under linux I'd probably still use it, but I tired of wearing a headset all the time long ago.

I settle now for dictating into a recorder and (if I have the money), sending it out to be transcribed via Transcribr. I've got hundreds of hours of me yammering into a recorder in the queue. Worse, they are mostly uncategorized, not even dated, and in wma format, which is hard to deal with. I need to come up with a method of sorting though it all and categorizing it. Getting to where I have one-key delegation to transcribr would be good, too.

In the former case - speech synthesis - most of the open source solutions don't sound very good - and had a hard time interfacing with out sound software that I was using, and almost never with the editor.

Back when I was hacking on asterisk, however, I discovered cepstral - which is founded by the same guys that released festival as open source - and that they'd found a business model of releasing domain specific voices that are quite good. I bought two ("Amy" and "Diane") and installed them. I think Diane sounds the best (but am tempted to try a British voice next)

I found something simpler than emacsspeak - speechd.el - and got it running. It's still too complex for someone that is still sight-enabled, so I simplified matters with little custom lisp,
(myrtb () "Read That Back" ...)

Now, in emacs, I mark a region and hit a function key - and I get everything read back! I can step away from the keyboard and listen to what I wrote while doing something else, like making coffee.

Really successful writers always point to their "first reader" as being key to their success. Usually that person is a wife (or husband) or close friend.

Lacking that first reader, my first reader is speechd + cepstral.

I also have some cute crontab scripts now like "say-nag" which nags me every 20 minutes with whatever I'm supposed to be doing in ~/.nag, and appointment notifications are spoken rather than put on the screen.

...

I have a lot more to write about org-mode, etc, but I need to switch to some new blogging software and disqis next, so I can truly do push-button publishing once again.

Without a browser.

Labels: , , , , , , ,

 
Saturday, August 01, 2009

  This is for the sysadmins

A little late for Sysadmin's day...

But the radio play of Cory Doctorow's "When Sysadmins ruled the earth" had a reading of the Declaration of Independence of Cyberspace that brought a tear to my eye...

and made me play Redemption song and reminisce fondly about alt.sysadmin.recovery.

Then, all suffused with all that nostalgia, I went back to re-read Barlow's canon, via the wikipedia link.



Somebody will login to wikipedia and fix that link, I'm sure. If someone else doesn't fix it, I will, but not today. A lot of people care about the Net, maybe not in the same way we did back in the 80s and 90s, but they care enough to keep it alove alive. Some of the ideals we had then really did creep into the real world, and the world is better for it.
 
Friday, July 17, 2009

  Living in the eternal now

I've been saying this for a long time. Copyright is also a means to keep books (and other materials) off the market until they become irrelevant.

I don't think anybody is immune to the irony of seeing Orwell's 1984 remotely removed from their kindle book reader, however.

Perhaps knowing that this book is freely available in Russia might give some pause.

Re-reading the history of the copyright debate, in, say, 1906, is also useful.

Labels: ,

 
Sunday, July 05, 2009

  Hell in Honduras

The closest thing to a reliable internal viewpoint I have found about the mess in honduras is coming from Figgylicious. She writes:

And the absolute best news source, for me, has been the wikipedia talk page on the wikipedia article.

A friend I have, vacationing in Honduras, writes:

Labels:

 

  Capitalizing on the Concorde

This article is the second (out of four) in replies to Chip's arguments in this blog post of mine, as well as this one. My first reply, attempting to combat some of his futilitarianism, is here. (I miss usenet, it was far more suitable to long, winding conversational threads, but I digress)

Chip wrote:Yes, today's standard of living is temporary. It may well be that humanity as a whole has peaked, and is headed towards a downward spiral, or it may still be on an upward one. One thing I am sure of is that the standard of living will change. It may get better in China, and worse in America. Or both systems decline, and South America and Africa see their day in the sun. Secondly I disagree with the concept of a "standard" of living entirely. Does it mean two cars in every garage, a 50 inch tv, and sushi every night? A "standard" implies that there is a universal evaluation of the valued items of living itself. I, personally, am a million times happier now that I no longer have to work 18 months out of the year to keep a roof over my head. There are plenty of things I miss, however. I'd like to get some more advanced vehicle in my house than sandals, and could use an x-ray on my knee. And I wouldn't mind if I could find some agency willing to fund some of the things I think are important for the survival of the species.

Chip then wrote:I heartily disagree with your last two sentences. For starters, an "experiment" is an experiment. By definition, you don't know what the results are going to be.


At the time of Concorde's development, no-one knew the full extent of our oil and gas resources. We still don't, although current surveys appear compelling. We didn't know, when Concorde was started, how efficient such an airliner could be. We couldn't forecast demand accurately, and we didn't know the extent to which sonic booms would inflame the populace against overland crossings. These are some of the direct results of the supersonic experiments. More:

Concorde pushed Duralumin based construction to its limit. More use of titanium would have helped, but in the 1960s the state of the art in use of that material only existed in the SR-71 Blackbird. Over the past 30+ years the use of titanium, has gone from that very specialized use into laptops, and cars, and a variety of everyday devices, including pens. The upcoming Dreamliner aircraft (as well as SpaceShipOne, Two, and Three) make extensive use of composite materials to further reduce weight and fuel consumption.

When operating Concorde at its design point at Mach 2, it was the world's most efficient jet engine.

The amount of fuel used by all the supersonic aircraft in history is a drop in the bucket compared to our "normal" energy uses.

Concorde travelled, per passenger, 17 miles (27 km) for each imperial gallon of fuel — 17 miles per imperial gallon (17 L/100 km; 14 mpg-US). This efficiency is comparable to a Gulfstream G550 business jet (16 miles per US gallon (15 L/100 km; 19 mpg-imp) per passenger), but much less efficient than a Boeing 747-400 (91 miles per US gallon (2.6 L/100 km; 109 mpg-imp) per passenger).

The Dreamliner is expected to be 20% more efficient than the 747.

Research continues into supersonic flight. Aerion has 3 billion dollars in pre-order sales on it's supersonic business jet.

Discarding an idea because it didn't work the first time is a false efficiency. I believe in constant, incremental change, and experiments to determine future directions for that change.

Research also continues into hypersonic flight, as well as into aircraft that emit a more minimal sonic boom.

[I will have more to write about this later, I am just trying to break a very long email reply into more sane component parts right now]

Labels:

 
Saturday, July 04, 2009

  Side benefits of the universal information system



I don't think Andrei Sakharov got it entirely right, but man, did the internet come close to fulfilling his prediction!

I keep wondering what was in the ellipsis between "development. ...But the true historic role" - but that information is not on the Internet, yet. Books - at least the ones still covered by copyright, and those long out of print, but still covered by copyright - are only readily accessible via amazon, or not at all.

Babelfish was an early start at breaking down those barriers of language and culture, and google translate is taking that to a whole new level.

New forms of media have arisen, usenet, blogging, twitter, facebook... People can run simulations of the Hubble repair on their desktops, crowdsourcing has become popular where people routinely collaborate, in real time, all around the planet, from richest country to the poorest...

And yet, so many problems are still with us. Do I think they are intractable? No! If I didn't think that we could solve all the problems remaining for humanity, in part, via better technology, I'd be really depressed all the time, instead of just some of the time.

Most of my last week or three of blogging (A New Grand Tour of the Solar System,Sunday Space grabbag,Big Waves, Bad Knees) have been, indirectly, in response to what Chip commented on a blog post of mine last month.His point stung. I DO try to read multiple viewpoints but sometimes fall into a rut of reading stuff that re-inforces my pre-existing opinions. So I read his links - Kunstler, about the cluster-f*** nation, and Orlov, about the effects of Peak Oil and definancialization...

I was depressed for days.

Yet, my reaction, my self-trained reaction, of looking for an opposing viewpoint, and exploring the history of the ideas and predictions, finally kicked in... I went and researched Kunzler, and found he'd made specific predictions that turned out to be wrong, so far. It doesn't mean that he's wrong on everything, it just means he isn't God. I completely agree with Kunzler about the core problem - today's civilization relies on cheap energy, and it is running out. His solutions are interesting, and no doubt there are others that both agree with (both of us) and are trying to solve the problem.

So, Chipper - I have a suggestion - go read someone optimistic for some balance, and some optimism, once in a while. I still find Buckminster Fuller comforting...

I have spent the last days being relentlessly optimistic, and arguing with people that I think are making the wrong decisions, or doing the wrong thing over and over again, because of habit.

Yesterday I ran into a lady with a BS in Social work, who was taking a quick two week tour of Central America before returning to America to study for a Masters. Getting more education is a worthy goal, but her reasoning was flawed - there were no jobs for her existing background and school was all she knew how to do. She had no debt but was preparing to take on a lot of it to get her Masters... I strongly encouraged her to continue her wanderjahr, if she could, find something that she loved to do, that paid, and stay out of debt....

Last week I also went and reviewed the current state of the climate change debate, and found no reason to change my opinion that waiting for more data to come in was the right thing. I am especially looking forward to Anthony Watt's report on the effects of bad siting for temperature measurement on the global warming average.

And to balance out the bad news in Honduras...

I read about solar power satellites being funded, and about improving tuna aquaculture, about the accomplishments of legendary engineer Isambard Brunel, and the Age of discovery... and drooled over the upcoming model S all electric sedan, from Tesla Motors. After witnessing 10s of billions of dollars poured down the rathole bailout of America's failed carmakers, seeing Tesla - an American company, based in California, a company trying to build cars people actually want, after being forced to sell part of themselves to Daimler - finally get a loan sufficient to build the plant to create that car, in California - really cheered me up.

And - thanks to the universal information system, predicted, more or less accurately, by Sakharov, in 1974, I was content to believe, once again, that somehow, we'll muddle through.

Labels: , , , , ,

 
Friday, July 03, 2009

  A New "Grand Tour" of the Solar System

What would it take to resurrect something like the long-canceled Hera mission, expanded and revised to support a "Grand Tour" of the nearby asteroids and comets? Hera was intended to visit 3 asteroids in the 3-5 years after launch, and then return to earth. The preliminary analysis for that mission (in 2004!) showed 60 possible interesting trajectories and candidates for exploration.

The detection of new Near Earth Asteroids (NEOs) continues at a rapid pace, a pace which will increase upon completion of the LSST in 2015. The number of NEOs known has at least doubled, perhaps tripled, since 2003. (cite needed, empirical evidence supplied below)

What I have in mind is a series of small spacecraft, say, 4-12 in number, that would each visit 3 asteroids or comets over a 4-6 year period of life. The tour is only "grand" in that we could explore nearly every known asteroid classification, and would probably be considerably cheaper in current dollars than Voyager 1 and 2 were, particularly if a new launcher like the Falcon 1 or 9 was used.

I haven't the foggiest idea how to generate the enthusiasm for this idea, or the funding, aside from writing about it, and... perhaps... since my stock in trade is as a software engineer, maybe I could work towards making broadly available the software for calculating possible courses (trajectories). Perhaps being able to plot a real course for Cruithne, or tens of thousands of other small bodies, like Sulu from Star Trek, would get more people interested and involved. I know the simulations that Bruce Damer did of the Mars Rover were wildly popular, particularly among youth.

All I really know (thus far) about re-solving this problem is from a chat with one of the scientists involved (items in bold are my open questions, italics is what he told me):



It has taken me a long time to get interested in space again, ever since Trailblazer became ashes over the Pacific. What is making me think about it is that orbit@home is now up and running, and there is an amazingly powerful n-body code out there for CUDA , as well. Perhaps this would make it possible to solve a "New Grand Tour" problem for large numbers of asteroid and comet targets using differing types of spacecraft. For all I know, a 200 dollar card with CUDA and suitable software may well be more powerful than the compute clusters used during the development of Hera. (see left for a lovely example simulation of whole galaxies in collision - surely something like that ought to be able to help plot a few courses in our piddly little solar system?)

In terms of delta-v: there are presently 952 good reasons to go to the asteroids rather than the Moon. Some delta-v reasons are almost twice as good than the moon option.

It's also worth repeating the Deep Impact or Don Quijote missions 3756 times by the same criteria....

2 years ago (more accurately, June 25, 2007), in terms of delta-v, there were only 536 good reasons for the asteroids rendezvous and 1920 for flyby missions.

PS: I note that estimated delta-v via shoemakers method is not a particularly good criterion for justifying asteroid missions over Moon and Mars missions, but it may provide a good starting point for a conversation over the resources required to explore the solar system.

PPS: I really don't want to explain delta-v, please see wikipedia for delta-v, interplanetary superhighway, etc....

PPS: I am rather reluctant to use the "Grand Tour" meme (new name suggestions welcomed!), as the original Grand Tour was expensive, and ultimately it was scaled back to the two Voyager missions. Voyager's results were, and continue to be, spectacular. (I really don't like "Grand Tour" as a name - The Grand Tour meme is being reused for the Cassini mission)



I would really like to see the above chart updated, but given what we know know about the solar system, vs what we knew in 1996, it would be all orange and red inside of Jupiter's orbit, on the scale at which the objects are plotted.

Labels: , , , ,

 
David Täht writes about politics, space, copyright, the internet, audio software, operating systems and surfing.


Resume,Songs,
gpg key, My facebook page
Orgs I like
The EFF - keeping free speech in the world
Musical stuff I like
Jeff, Rick, Ardour, Jack
Prior Rants - Still not finishing the spec for Pocobelle 2, but ... taking a brief break from health care for somethin... Reframing the issues of the health care "debate" 20 years ago tomorrow One mistake, and PocoBelle becomes a brick A quick automounter rant Some news from the life and death and life of Poco... ipv6 and smart(er) mail relaying in postfix Squid 3.1 (with ipv6 support) lands in debian Building a virtual mesh potato, part 1
Best of the blog:
Uncle Bill's Helicopter - A speech I gave to ITT Tech - Chicken soup for engineers
Beating the Brand - A pathological exploration of how branding makes it hard to think straight
Inside the Internet Mind - trying to map the weather within the global supercomputer that consists of humans and google
Sex In Politics - If politicians spent more time pounding the flesh rather than pressing it, it would be a better world
Getting resources from space - An alternative to blowing money on mars using NEAs.
On the Columbia - Why I care about space
Authors I like:
Doc Searls
Where's Cherie?
UrbanAgora
Jerry Pournelle
The Cubic Dog
Evan Hunt
The Bay Area is talking
Brizzled
Zimnoiac Emanations
Eric Raymond
Unlocking The Air
Bob Mage
BroadBand & Me
SpaceCraft
Selenian Boondocks
My Pencil
Transterrestial Musings
Bear Waller Hollar
Callahans
Pajamas Media BlogRoll Member

If you really want to, you can poke through the below links as well.

Name: Dave Taht
Location: Erewhon, Cyberspace

There is the internet me, and the real me. The internet knows enough, already.

ARCHIVES
06/09/2002 - 06/16/2002 / 07/28/2002 - 08/04/2002 / 08/11/2002 - 08/18/2002 / 08/18/2002 - 08/25/2002 / 08/25/2002 - 09/01/2002 / 09/22/2002 - 09/29/2002 / 11/10/2002 - 11/17/2002 / 12/15/2002 - 12/22/2002 / 12/22/2002 - 12/29/2002 / 12/29/2002 - 01/05/2003 / 01/05/2003 - 01/12/2003 / 01/19/2003 - 01/26/2003 / 01/26/2003 - 02/02/2003 / 02/09/2003 - 02/16/2003 / 02/16/2003 - 02/23/2003 / 03/02/2003 - 03/09/2003 / 03/16/2003 - 03/23/2003 / 04/06/2003 - 04/13/2003 / 04/13/2003 - 04/20/2003 / 04/20/2003 - 04/27/2003 / 05/04/2003 - 05/11/2003 / 05/18/2003 - 05/25/2003 / 05/25/2003 - 06/01/2003 / 06/01/2003 - 06/08/2003 / 06/08/2003 - 06/15/2003 / 06/15/2003 - 06/22/2003 / 06/22/2003 - 06/29/2003 / 06/29/2003 - 07/06/2003 / 07/20/2003 - 07/27/2003 / 07/27/2003 - 08/03/2003 / 08/03/2003 - 08/10/2003 / 08/10/2003 - 08/17/2003 / 08/17/2003 - 08/24/2003 / 08/24/2003 - 08/31/2003 / 08/31/2003 - 09/07/2003 / 09/07/2003 - 09/14/2003 / 09/14/2003 - 09/21/2003 / 09/21/2003 - 09/28/2003 / 09/28/2003 - 10/05/2003 / 10/05/2003 - 10/12/2003 / 10/12/2003 - 10/19/2003 / 10/19/2003 - 10/26/2003 / 10/26/2003 - 11/02/2003 / 11/02/2003 - 11/09/2003 / 11/09/2003 - 11/16/2003 / 11/30/2003 - 12/07/2003 / 12/07/2003 - 12/14/2003 / 12/14/2003 - 12/21/2003 / 12/28/2003 - 01/04/2004 / 01/11/2004 - 01/18/2004 / 01/18/2004 - 01/25/2004 / 01/25/2004 - 02/01/2004 / 02/01/2004 - 02/08/2004 / 02/08/2004 - 02/15/2004 / 02/15/2004 - 02/22/2004 / 02/22/2004 - 02/29/2004 / 02/29/2004 - 03/07/2004 / 03/14/2004 - 03/21/2004 / 03/21/2004 - 03/28/2004 / 03/28/2004 - 04/04/2004 / 04/04/2004 - 04/11/2004 / 04/11/2004 - 04/18/2004 / 04/18/2004 - 04/25/2004 / 04/25/2004 - 05/02/2004 / 05/02/2004 - 05/09/2004 / 05/09/2004 - 05/16/2004 / 05/16/2004 - 05/23/2004 / 05/30/2004 - 06/06/2004 / 06/06/2004 - 06/13/2004 / 06/13/2004 - 06/20/2004 / 06/20/2004 - 06/27/2004 / 06/27/2004 - 07/04/2004 / 07/04/2004 - 07/11/2004 / 07/11/2004 - 07/18/2004 / 07/18/2004 - 07/25/2004 / 08/08/2004 - 08/15/2004 / 08/22/2004 - 08/29/2004 / 08/29/2004 - 09/05/2004 / 09/05/2004 - 09/12/2004 / 09/19/2004 - 09/26/2004 / 09/26/2004 - 10/03/2004 / 10/03/2004 - 10/10/2004 / 10/10/2004 - 10/17/2004 / 10/17/2004 - 10/24/2004 / 10/24/2004 - 10/31/2004 / 10/31/2004 - 11/07/2004 / 11/07/2004 - 11/14/2004 / 11/14/2004 - 11/21/2004 / 11/21/2004 - 11/28/2004 / 11/28/2004 - 12/05/2004 / 12/05/2004 - 12/12/2004 / 12/12/2004 - 12/19/2004 / 12/19/2004 - 12/26/2004 / 12/26/2004 - 01/02/2005 / 01/02/2005 - 01/09/2005 / 01/16/2005 - 01/23/2005 / 01/23/2005 - 01/30/2005 / 01/30/2005 - 02/06/2005 / 02/06/2005 - 02/13/2005 / 02/13/2005 - 02/20/2005 / 02/20/2005 - 02/27/2005 / 02/27/2005 - 03/06/2005 / 03/06/2005 - 03/13/2005 / 03/27/2005 - 04/03/2005 / 04/03/2005 - 04/10/2005 / 04/10/2005 - 04/17/2005 / 05/29/2005 - 06/05/2005 / 06/05/2005 - 06/12/2005 / 06/12/2005 - 06/19/2005 / 06/19/2005 - 06/26/2005 / 06/26/2005 - 07/03/2005 / 07/03/2005 - 07/10/2005 / 07/10/2005 - 07/17/2005 / 07/24/2005 - 07/31/2005 / 07/31/2005 - 08/07/2005 / 08/07/2005 - 08/14/2005 / 08/14/2005 - 08/21/2005 / 08/21/2005 - 08/28/2005 / 08/28/2005 - 09/04/2005 / 09/04/2005 - 09/11/2005 / 09/11/2005 - 09/18/2005 / 09/18/2005 - 09/25/2005 / 09/25/2005 - 10/02/2005 / 10/02/2005 - 10/09/2005 / 10/09/2005 - 10/16/2005 / 10/16/2005 - 10/23/2005 / 10/23/2005 - 10/30/2005 / 10/30/2005 - 11/06/2005 / 11/06/2005 - 11/13/2005 / 11/13/2005 - 11/20/2005 / 11/20/2005 - 11/27/2005 / 11/27/2005 - 12/04/2005 / 12/04/2005 - 12/11/2005 / 12/11/2005 - 12/18/2005 / 12/18/2005 - 12/25/2005 / 01/01/2006 - 01/08/2006 / 01/08/2006 - 01/15/2006 / 01/15/2006 - 01/22/2006 / 01/22/2006 - 01/29/2006 / 01/29/2006 - 02/05/2006 / 02/19/2006 - 02/26/2006 / 03/05/2006 - 03/12/2006 / 03/19/2006 - 03/26/2006 / 03/26/2006 - 04/02/2006 / 04/02/2006 - 04/09/2006 / 04/09/2006 - 04/16/2006 / 04/23/2006 - 04/30/2006 / 05/07/2006 - 05/14/2006 / 05/14/2006 - 05/21/2006 / 05/21/2006 - 05/28/2006 / 06/04/2006 - 06/11/2006 / 06/11/2006 - 06/18/2006 / 06/18/2006 - 06/25/2006 / 06/25/2006 - 07/02/2006 / 07/02/2006 - 07/09/2006 / 07/09/2006 - 07/16/2006 / 07/23/2006 - 07/30/2006 / 08/06/2006 - 08/13/2006 / 08/13/2006 - 08/20/2006 / 09/03/2006 - 09/10/2006 / 09/17/2006 - 09/24/2006 / 09/24/2006 - 10/01/2006 / 10/01/2006 - 10/08/2006 / 10/22/2006 - 10/29/2006 / 11/19/2006 - 11/26/2006 / 11/26/2006 - 12/03/2006 / 12/03/2006 - 12/10/2006 / 12/10/2006 - 12/17/2006 / 12/17/2006 - 12/24/2006 / 12/24/2006 - 12/31/2006 / 01/07/2007 - 01/14/2007 / 01/14/2007 - 01/21/2007 / 01/28/2007 - 02/04/2007 / 02/11/2007 - 02/18/2007 / 02/18/2007 - 02/25/2007 / 02/25/2007 - 03/04/2007 / 03/04/2007 - 03/11/2007 / 03/18/2007 - 03/25/2007 / 04/01/2007 - 04/08/2007 / 04/08/2007 - 04/15/2007 / 04/15/2007 - 04/22/2007 / 04/22/2007 - 04/29/2007 / 04/29/2007 - 05/06/2007 / 05/06/2007 - 05/13/2007 / 05/20/2007 - 05/27/2007 / 05/27/2007 - 06/03/2007 / 06/03/2007 - 06/10/2007 / 06/10/2007 - 06/17/2007 / 06/17/2007 - 06/24/2007 / 07/01/2007 - 07/08/2007 / 07/08/2007 - 07/15/2007 / 07/22/2007 - 07/29/2007 / 07/29/2007 - 08/05/2007 / 08/05/2007 - 08/12/2007 / 08/26/2007 - 09/02/2007 / 09/09/2007 - 09/16/2007 / 09/23/2007 - 09/30/2007 / 09/30/2007 - 10/07/2007 / 10/07/2007 - 10/14/2007 / 10/14/2007 - 10/21/2007 / 10/21/2007 - 10/28/2007 / 10/28/2007 - 11/04/2007 / 11/04/2007 - 11/11/2007 / 11/11/2007 - 11/18/2007 / 11/18/2007 - 11/25/2007 / 11/25/2007 - 12/02/2007 / 12/02/2007 - 12/09/2007 / 12/09/2007 - 12/16/2007 / 12/16/2007 - 12/23/2007 / 12/23/2007 - 12/30/2007 / 01/06/2008 - 01/13/2008 / 02/03/2008 - 02/10/2008 / 02/17/2008 - 02/24/2008 / 02/24/2008 - 03/02/2008 / 03/02/2008 - 03/09/2008 / 03/09/2008 - 03/16/2008 / 03/16/2008 - 03/23/2008 / 03/23/2008 - 03/30/2008 / 03/30/2008 - 04/06/2008 / 04/20/2008 - 04/27/2008 / 04/27/2008 - 05/04/2008 / 05/04/2008 - 05/11/2008 / 05/11/2008 - 05/18/2008 / 05/18/2008 - 05/25/2008 / 05/25/2008 - 06/01/2008 / 06/01/2008 - 06/08/2008 / 06/08/2008 - 06/15/2008 / 06/15/2008 - 06/22/2008 / 06/22/2008 - 06/29/2008 / 07/06/2008 - 07/13/2008 / 07/13/2008 - 07/20/2008 / 07/20/2008 - 07/27/2008 / 07/27/2008 - 08/03/2008 / 08/03/2008 - 08/10/2008 / 08/10/2008 - 08/17/2008 / 08/17/2008 - 08/24/2008 / 08/31/2008 - 09/07/2008 / 09/07/2008 - 09/14/2008 / 09/14/2008 - 09/21/2008 / 09/21/2008 - 09/28/2008 / 09/28/2008 - 10/05/2008 / 10/05/2008 - 10/12/2008 / 10/12/2008 - 10/19/2008 / 10/19/2008 - 10/26/2008 / 10/26/2008 - 11/02/2008 / 11/02/2008 - 11/09/2008 / 11/09/2008 - 11/16/2008 / 11/16/2008 - 11/23/2008 / 12/07/2008 - 12/14/2008 / 12/21/2008 - 12/28/2008 / 12/28/2008 - 01/04/2009 / 01/18/2009 - 01/25/2009 / 01/25/2009 - 02/01/2009 / 03/22/2009 - 03/29/2009 / 05/10/2009 - 05/17/2009 / 05/17/2009 - 05/24/2009 / 05/31/2009 - 06/07/2009 / 06/14/2009 - 06/21/2009 / 06/21/2009 - 06/28/2009 / 06/28/2009 - 07/05/2009 / 07/05/2009 - 07/12/2009 / 07/12/2009 - 07/19/2009 / 07/26/2009 - 08/02/2009 / 08/09/2009 - 08/16/2009 / 08/23/2009 - 08/30/2009 / 09/06/2009 - 09/13/2009 / 09/20/2009 - 09/27/2009 / 09/27/2009 - 10/04/2009 / 10/04/2009 - 10/11/2009 / 10/11/2009 - 10/18/2009 / 10/18/2009 - 10/25/2009 / 10/25/2009 - 11/01/2009 /


Powered by Blogger