2009-03-21

Text-based Graphical Desktop Environment

I was directed by reddit over to a project by a certain gentleman called Andrew Wales; where he has managed to run a X server using aalib to render the display.

You really have to check out the screenshots, totally awesome! http://www.meow.org.uk/stan/xserver

Imagine running mplayer with aalib as video out under an aalib X server!

2009-03-19

emacs unstable?

For the first time ever (as far as I remember anyway), emacs crashed on me. Or rather- it froze. I'm guessing it wasn't the core application as delivered by the GNU folks- its probably in one of the modules I loaded when I was testing connecting to twitter and running ssh from emacs.

I guess I've learned my lesson- start a separate instance of emacs for testing, leave the ordinary one alone. Right now I have no idea how many buffers and shells I had open... All I know is that my machine has an uptime of two months, and I'm rather certain that the first program I started was emacs. And I never turn it off...

Oh well.

2009-03-13

Japanese music via last.fm

For years I've been moaning over how hard it was to get a feel for what was popular in Japanese music. The other day I realized that I could satiate my desire for Japanese music from last.fm.

Hurrah!

2009-03-11

emacs via plink, Hummingbird, but no putty window

At the office about 95% of all work I do is on unix machines, inside of emacs. Inside of emacs, I do most of my command-line work, SQL connections to sybase, I do my IRCing, I send email, and of course I edit and compile code in emacs as well. Typically I have between twenty to fifty buffers open at any given time.

But I sit by a windows machine. I have to use putty to connect to my primary development machine, where I commence with starting emacs which opens a window on my local machine under Hummingbird's X server.

The problem with this is that after a couple of days (or hours!) I forget which putty session spawned the emacs I'm sitting with. Inevitably I end up hitting ctrl-d to close the window, and it then... just hangs there, waiting for all daughter processes to die. And emacs proudly floats there on my screen, with all my open files, notes, running programs and sql sessions.

And I don't want to close it. But the hanging putty window is there, in my taskbar, taunting me. What to do?

I realized that I wanted to be able to start emacs on a remote machine without first opening a putty session. I wanted the windows equivalent of

ssh -XY remotemachine.foo.com "emacs --eval \(server-start\)"
.

Here's what I did.

  1. First I made sure that pageant was running, and that it had my private key loaded. I made sure that it was auto-started by windos when I logged in.
  2. Next I created a putty session which contained the configurations necessary for X11 tunnelling etc, gave it a name 'remoteSession'.
  3. Now I created a .bat script which contained the following:
    REM Startup emacs on remote machine
    plink -X -A -agent -load remoteSession -l my_username ". .bash_profile ; emacs --eval \(server-start\)"
    This script will, when run, connect to the remote machine and start up emacs as a server. I source .bash_profile since I have some environment settings there, yhou might not need it.
  4. The thing is, the previous step works, but it leaves an ugly windows commandprompt window which just... well hangs there. If there's something that bugs me more than a useless putty session window, its the worlds ugliest shell. So I wrote a VBscript which starts the .bat script, but without a window.
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "c:\mattias_progs\devapp_emacs_server.bat" & 
    Chr(34), 0 
    Set WshShell = Nothing 
  5. Finally I made a shortcut to the vb script into my start menu, so that I could fire it up at will.

Its a very small improvement, but it makes everything a little easier.

Breaking the internet paradigm with Websphere Message Broker

I spent half of a day looking at what you can do with IBMs Websphere Message Broker (MB). I first thought that it was a simple suite of programs which acted 'middleware' between systems. But it quickly dawned on me that it was so much more.

Its clearly very useful. Putting it simply, you install a tube between two applications, and this tube takes care of transaction-based transport, caching, both low and high-level format conversions, routing, monitoring, and more; pretty much everything you can think of except the kitchen sink is included in this 'tube'.

So on one side of a transaction, you might have a legacy system which can only import comma-separated data from a file in seven-bit ASCII. On the other we might have a system which includes a Web service which spits out XML in UTF-16. Between them you have this 'tube', which will connect to the webservice, get a bunch of data, convert between the two formats (both hi and lo level) and deliver the data as a file to the target system.

Very nice. Very tempting.

Question is if the old rule of the Internet "Keep the network dumb, move intelligence out from the core towards to edges" applies here.

I think it does.

By making the network smart, the edges will become more and more dependent upon the network's smartness; And since the 'network' (in the example above, the 'tube') is actually a product delivered from a company, all the applications and thus organizations involved will be tightly locked-in to this company... which in MBs case is IBM.

Once it has set its teeth into you organization, how do you rip this code out without tearing your organization apart? But the pragmatist would answer "But why would we want to tear it out in the first place? Its so useful!"

True. But the path to hell is paved with good intentions...

2009-02-13

echo 1234567890 - $(date %s) | bc

Hurray! Hurray! It's 1234567890 day today!

2009-02-01

Makemake

Today I was doing nothing in particular when my son asked me about the planets. Being the geek that I am, I decided to look up the solar system in wikipedia.

Course, the article was, as expected, lengthy, but I expected a nice pic of the solar system in silhouette, so to say, with all the planets rowed up and all. What I didnt expect was that the 'dwarf planets' would be included.

Ok, so I'm like "Ok, these first four planets are the rocky planets, and those last four planets are our gassy planets. And these are our dwarf planets- Pluto, and-"

and I paused. Was someone pulling my leg? I've read about undetected sabotage in the wikipedia, could this be it? I mean, why was a perl hack which created Makefiles included in the names of the dwarf planets? Maybe an astronomer with a sense of humour? Nah, can't be. But still- it was there in front of me- a Dwarf planet called Makemake.

My son didn't really understand why I was suddenly so excited. I'm like- "wait, just a sec" and I looked up Makemake, and Ooooh! It was pronounced maké-maké. And it was "... the name of the creator of humanity and god of fertility in the mythos of the Rapanui, the native people of Easter Island ...".

Boy was I disappointed.