You are viewing clynbech

entries friends calendar profile Previous Previous
DEF1
Musings on Lisp, Life and Everything.
Add to Memories
Share

 So the disk developed a new I/O error, so there is now way around replacing it.

First however, I need once again to get the files of the disk. I now realize that I saved much too little details from the last attempt, so this is an attempt to be more specific.

I have decided to use the same solution as the last time, that is to boot the MBA up on the install DVD and transfer the files to my powermac over a crossed ethernet cable directly to the powermac. I have however heard about a possible easier way. Apparently when starting the MBA up in target mode (holding down the T key during boot), the MBA will appear over a USB as just a USB drive. I have always thought that would only work over firewire (which the MBA does not have) and it is quite possible it would require either a newer mac or a windows machine in the other end, but if it works it would be much simpler.

Anyway, back to the ethernet approach. In my setup I have the MBA connected to a USB hub into which I have connected an external (LaCie) CD drive and the MBA ethernet adapter. The CD drive has the install DVD in it and the ethernet is connected directly to the powermac. On the powermac, internet sharing has been enabled (in Options->Sharing). Then MBA is booted up on the CD (hold down the C key during boot) and after selecting language, I start a terminal from the Utilities menu (rather than continuing the actual install). In the terminal, I check that I have connectivity to the powermac (with ping). The installation program will automatically start and configure the ethernet network. You can also enable wireless networking but if you want to copy a large amount of files, it can take a really log time.

The first complication is to find a way to copy the files over the network. I am using MacPorts so I have `rsync' buried somewhere on the disk, but rsync both needs some libraries and access to `ssh' in order to work, so one needs to prepare the environment on the MBA terminal as follows:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Volumes/Macintosh\ HD/usr/bin:/Volumes/Macintosh\ HD/opt/local/bin
export DLD_LIBRARY_PATH=/Voumes/Macintosh\ HD/opt/local/lib

Here we assume the MBA disk is called "Macintosh HD". Note also that command are typed in, partly from memory, so there may be some inaccuracies or typos, so be prepared.

Now we are ready to copy the files over:

rsync -av /Volumes/Macintosh HD/. <userid>@192.168.3.1:/Volumes/Old/MBA/.

The internet sharing assigned 192.168.3.1 to the powermac. <userid> refers to your userid on the receiving end.

(more to come)
 
 
 
Add to Memories
Share
During an otherwise routine upgrade of my MBA, it suddenly failed to boot up into the updated system. Booting with verbosity up revealed that the problem was a disk I/O error preventing fsck to finish cleanly. ARGH!

Booting up in single user mode was possible and I was also able to mount the disk readonly and see my files, so clearly there was hope. Mounting a USB pen also was possible but I had some 30+ Gb of data in my homedirectory and only one 8Gb stick so while possible it would be tedious and error prone. Googling around did not reveal any simple way of getting networking started from single-user mode; I am no expert on OSX but I suspect it to be really hard (if not impossible) with a read-only disk.

Fortunately, starting the install program both provides access to a shell and networking. After the selection  of language, a menubar will appear containing a utilities menu. Here one may find both the disk tool and terminal. However, the environment provided by the installation disk is quite basic, there was neither ssh nor rsync available. Again luck was with me since the HD was available in /Volumes and running rsync and ssh out of the the HD´s usr/bin actually worked, even if ssh did complain of not having a writable directory to save known_hosts keys into.

I first tried hooking up over wifi (configurable as normal from the toolbar) but it appeared to provided only 1.25 Mb of transfer (very loosely measured) which would translate into a 7 hour transfer, not something I was prepared to wait for, so I wanted to hook networking over a cross-connected cable directly to my powermac. For some reason I had no "Remote Install" app on the powermac and the download from support.apple.com refused to install. Off again to hunt for a USB hub such that I was able to hook up both my external LaCie optical drive and  the ethernet adapter. I was curious to see if I could actually boot from the installation DVD over a USB hub but it worked as well as without. Finally, I was able to save my homedirectory to my powermac and reformat the MBA disk. I copied the /Applications directory as well just to save me some of the trouble of redownloading everything.

I obviously should have done more backups. It was not all lost since I mainatin all of my workfiles (dot files, emacs libs, mail folders etc) under súbversion to provide easy synching between systems but I had enough state in Docs, Movies and Music that I was prepared to spend some time rescuing it. Obviously, it had not been possible if the disk had died completely. It was still breathing just enough to be useable.

I should also quite reasonably consider replacing the disk rather than just reformatting it, but we are rebuilding our home and I am in for a serious upgrade once that is done and i currently usin g the MBA as my main machine, so I would be very sorry to loose it for a longer period whether by botching the replacement myself or sending it away to a (presumably expensive) authorized repair. So for now it is reinstall and fingers crossed.
Add to Memories
Share

So now I can also blog from my iTouch, let's see if that will help me blog more.

Posted via LiveJournal.app.

Tags:

Add to Memories
Share
The jaoo.dk conference is taking place in Århus these days and following this there was an interview with Lars Bak, one of the drivers behind the V8 Javscript engine, in a danish newsletter. Here he talks about the joys and wonders of dynamic typing over static ditto. He makes manay good points on how dynamic typing helps to increase programmer productivity.

At least two of these points was something I had no thought so much about before.

One was that the tools surrounding statically typed languages tends to be very phase oriented. You make a chance, compile, do a test run to see if it worked and then you get back to editing. Dynamic languages such as Lisp, Smalltalk or (I guess) Javascript allows you to work much more directly with the (running) program, interleaving thinking, editing and testing almost seemlessly.

The other thought provoking point, one I also absolutely believes in, is that programmers working in dynamic languages tends to focus on the program logic whereas programmers working with static languages tends to focus on all of the much less important trimmings surrounding the logic.

The bottom line,as he puts it, is that the bottleneck today is not those last 20-30 % of performance but rather programmer productivity and everything we can do to facilitate that should be pursued. And even if one does get concerned over performance, one should rather seek to solve the problems rather than giving up without trying. Lisp was not born as efficient as it is today (neither was C) but can not fix a problem if one does not try to fix it.

Just a big a problem, I think, in many languages is the apperent view from the language designers that the biggest threat to the purity of the program is the programmer. This is most dominant in static languages where the type diciplines provides the language architect with a multitude of ways to fence those rascal programmers in but even in dynamic languages such as Erlang one can find traces of this.

The logic seems to be that we want to prevent the programmers from making mistakes, and that logic is not as such flawed, there are mistakes you just do not make in a statically typed programming language. Unfortunately, the statement that a program is typecorrect is an incredible weak statement about its usefulness!

Add to Memories
Share
I have done entirely too little blogging for far too long but that is no excuse for not wishing the father of Lisp, Professor Emeritus John McCarthy, a happy birthday. I wish you all the best for the years to come.
Add to Memories
Share
Leslie Polzer has posted an excellent little example on Getting started with CFFI.

However, I think it deserves mentioning that playing around with FFI definitions is a grand way of getting to know a C library. Unlike C, Lisp is an interactive programming environment which means that you can slowly build up the necessary chunks of code, trying out stuff in order to properly understand what the various bits and pieces does.

For this, 'getloadavg' (the example used in the aforementioned article) is actually too simple to properly relate to the power this gives you. Consider instead wanting to get to know something more involved such as OpenOBEX (for talking to your mobile phone) or SAF (for building highly available systems), then having an interactive environment is a tremendous benefit. Anybody who has tried to understand a complex C library by writing small snippets of C programs with printf's to demonstrate proper working should be able to appreciate the advantage of this.

In fact, I think that the interactivity of Lisp is one of the top five secrets of why Lisp programmers are so darn productive. Rather than building up large suites of tests, we just try out constructs as we write the code and the code is correct from the outset (well, sort of) rather than having to go through a couple of iterations to weed out the silly mistakes. If I didn't have the REPL nearby, I know I would never ever use something as complicated as reduce, my head starts boiling everytime I have to construct even just a slightly complex 'reduce' expression, but being to able to iteratively build up and verify such expressions gives me the necessary confidence to stick it into my code anyway.

In case you think that writing the initial boilerplate for a C library interface, you should check out something like the Verrazano/Fetter project. This is able to generate CFFI bindings by parsing C header files. The result is not necessarily perfect but certainly a good start.

Verrazano is an old Google summer of Code of project and endured a slowdown but has again picked up steam and some of the problems in the initial implementation has been fixed in the curren instantiation; and I have found the developers to be very responsive on the mailing list when I reported some concerns. Highly Recommended (with a small salute to the Jerry Pournelle columns in Byte Magazine).

Tags:
Current Mood: Da.., this is a good red wine

Add to Memories
Share
The father of Lisp, Professor Emeritus John McCarthy turns 80 today!

I had the honour to see the legend at the 2002 International Lisp Conference. The sensation of being among so many Lisp people, including such giants as McCarthy, was a tremendous experience to me.

Tags:
Current Mood: Joyful

Add to Memories
Share
Gentle men and women, on your marks, the ICFP Programming Contest will start in less than 4 hours! Will Lisp make it to the top this year?

Quote of the day
A comment made by Dan barlow made on comp.lang.lisp (I think) back in june 2005:

> all developers would HAVE TO work TOGETHER (in harmony)
The beatings will continue until morale improves

Tags: ,

Add to Memories
Share
I have pulled myself together and posted the pictures I took at the ILC07 on my web site.

Some of the minatures on page 2 and 3 looks strange in my Safari but ok in Firefox. They should load ok however.

In case you have been wondering about the site, whether it has become a study in how unstable a server can get, I should say that I hope it is better now. The server is set up here at home on my old Linux box running SBCL and AllegroServe. It is also using wireless LAN and it took me quite some time to realise that I am working at the very edge of the range of my el-cheapo netgear wlan router.

Quote of the day:
A quote from Ray Dillinger back in the spring of 2005, in relation to an announcement of the Boston Lisp Announcement Email List:
Christopher C. Stacy: Weren't the bothons the fish people in Star Wars?

Ray Dillinger: You know, I've had a similar thought; except if I were to do it it would be the "Than Franthithco Lithp Utherth Thothiety."

Tags: ,

Add to Memories
Share
Via the swedish lisp mailinglist I have just discovered Impromptu, a scheme based environment for composers and sound artists. There are some movies in their gallery demonstrating how it works. Impromptu is free but Mac only and seems quite cool.

Quote of the day:

From Michael Westergaard on an internal DAIMI newsgroup back in 2005 (translated from danish):
If one has a strange definition of strange, is that necessarily a recursive definition?

Tags: , ,

profile
clynbech
User: clynbech
Name: clynbech
calendar
Back May 2011
1234567
891011121314
15161718192021
22232425262728
293031
page summary
tags