|
2009.02.07 in school
Note: Someone else has come up with revised instructions which work on more recent versions of Linux.
For LITEC, each group has a C8051F02x development board attached to a car (and later, to the RPI blimps). The course only includes instructions and support for people using the SiLabs IDE within Windows (it doesn't exist for Linux or OS X), which greatly disappointed Andrew and I when we started the class a few weeks ago.
Andrew spent a good bit of time fiddling with things in Linux before — a few days ago — he finally got it working! It turns out there are Linux drivers and support software for the SiLabs EC2 debug adapter which we use to download code to the chip (and run it, debug it, etc.)... and the Small Device C Compiler is even in APT! (sdcc-nf is the package including the non-free components which I believe we determined we need).
So... there's a brief set of instructions to get compilation and downloading working, after the jump!
- Install SDCC from APT (sdcc-nf, etc.)
- Install kernel headers
- Checkout the EC2 driver for Linux:
svn co https://ec2drv.svn.sourceforge.net/svnroot/ec2drv/ec2drv/trunk ec2drv
- There's a mistake in the EC2 driver build scripts (at least with Jaunty and whatever Andrew uses...); in the file libtool find ECHO="echo", and add a line echo="echo" below it.
- Build and install the EC2 driver.
- Compile your program with SDCC (thanks, again, Andrew!):
sdcc -mmcs51 --model-small --debug --code-loc 0x0000 --iram-size 0xFF --noinduction --nooverlay --nogcse PROJECT.C
- Now you have a ton of messy files sitting around. Launch 'newcdb' (which got installed with the EC2 driver). I have to run it as root because I haven't figured out which device needs more liberal permissions, but you should probably figure that out...
- To connect to the EC2 debug adapter:
set target SL51
set target port USB
set target connect
- Then load your file: "file PROJECT" (notice the lack of extension). This will take a while while it downloads to the board.
- The commands "run", then "continue" will run your program on the 8051! Yay!
I've crafted a small Makefile for our use which might be useful for others: TARGETS = library_test
all: $(TARGETS)
clean:
rm -f *~ *.adb *.asm *.cdb *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym
rm -f $(TARGETS)
download: $(PROJ)
sudo newcdb --command=download.cmd -ex="file $(PROJ)" -ex="quit"
run:
sudo newcdb --command=run.cmd
.c:
sdcc -mmcs51 --model-small --debug --code-loc 0x0000 --iram-size 0xFF --noinduction --nooverlay --nogcse $@.c
Where download.cmd is:
set target SL51
set target port USB
set target connect
And run.cmd is:
set target SL51
set target port USB
set target connect
run
continue
quit
You can download a particular project with:
PROJ="library_test" make download
and run it with:
make run
Pretty cool! We're also developing a very awesome library for use with the 8051 to make it much, much nicer, but I can't publish that because of it being for class and stuff. Maybe after the semester's over! Have fun, and if anyone tries this and can't make it work, email me.
2009.02.03 in code and gnome
Robb just posted a bit about what we've been working on recently... I won't talk about everything, but I will repost the two awesome videos:
The game I wrote over the last few days, in Seed, using Clutter and stuff:
Same Gnome Clone — In Seed! from Tim Horton on Vimeo.
Robb's Tetris, done in Vala and Seed together (and Clutter, of course):
Tetris from Robert Carr on Vimeo.
Pretty cool, both!
Also, we have a Planet, just for the lols. It updates every hour, I hope (waiting for 1PM to see if Robb's post and this one show up). Aggregates Robb, Matt, Carol, Savvy, and I. Ha!
Epiphany extensions are pretty cool, too. Robb's post talks all about what to do with them. Really you'll know a lot more if you just go read his post!
EDIT: I've removed the Vimeo embeds so that Planet is happier.
2009.02.02 in school
Some of you might have already heard the story of the day when Richard Stallman came to stay. If not, here're some anecdotes:
- Matt emailed RMS to ask if he needed a place to stay. He did! (and he accepted the thought of sleeping on Matt's floor)
- Weeks later, the school offered him a place to stay — a hotel, that they'd pay for. He picked a dorm room with a bunch of geeky kids instead.
- About a week beforehand, Matt got an email listing his food / social requirements, and other picky bits. It was rather hilarious; I'd like to repost it but it's not clear he wouldn't get angry.
- Matt ended up getting lots of emails from Luis (who works at Kitware), who was organizing the visit, picking up Stallman at the bus station, etc.
- RPI TV asked if they could rebroadcast his talk — Stallman wanted to ensure it would only be available in Theora. Hopefully they don't play it over HDTV (does RPI TV do HD? probably not...)... MPEG!! (they've already put it on a DVD.... more MPEG). Poor Stallman.
- On January 22, we all gathered in DCC 308, and Luis and RMS showed up.
- Matt went and talked to him and shook his hand, and then he started selling stuffed GNUs, his book, and stuff like that. Matt and Robb and Mike all got GNUs. They're cute.
- The last GNU got auctioned off. Moorthy won it, after a fierce bidding war with someone else who I didn't recognize. Something like this.
- He refused to sign someone's EeePC because it was running Windows, but he happily signed Matt's (GNU/)Linux box with proprietary wireless microcode running (Matt swapped out the proprietary nVidia drivers on his ThinkPad with the much-crappier Nouveau driver (which RMS had never heard of, even though it's the only FOSS driver that gets some video acceleration on half of the video cards currently in existence) for the duration of the visit... silly boy).
- There was a good bit of yelling during the Q/A part of the talk ("How is my uncle going to feed his 8-year-old daughter?", from one particularly dense individual), but everyone mostly left in good spirits...
- There was only one glaring mistake in his talk: he considers hardware something that needn't be free; his main reasons are that people aren't capable of modifying or duplicating hardware without spending millions on fabrication plants and design, etc., and that hardware cannot be "reprogrammed" in shipping devices. However, since some/many chip designs can be loaded into FPGAs with none or minor modifications (and this is how many chips are tested before going into production), this should actually qualify as "software", which should be free, in Stallman's eyes. Some people even put OpenSPARC on FPGAs... so half of his argument for not caring about free-as-in-speech hardware is entirely fallacious.
- Between the talk and the Q/A session, he put on his St. iGNUcious costume for us and acted in that role for a few minutes, ancient hard disk platter and all...
- He recorded some clips with DJ for WRPI to use during breaks: "I'm Richard Stallman, and I hope you're only using software which respects your freedom.", "I'm Richard Stallman, and I hope you're sharing the music you like with your friends.", "I'm Richard Stallman and you're listening to WRPI."
- Matt, Robb, Luis, and RMS went to dinner at a sushi place (the place Luis had planned on taking them was closed, because the talk ran for three hours — this also led to Stallman being frustrated at losing an hour of time to work; it turns out "work" means to respond to gazillions of emails from within Emacs).
- Dinner, apparently, mostly consisted of Matt and Robb talking to Luis with occasional interjections from Stallman ("F**k nVidia", "More people should learn Scheme", etc.)
- Eventually they came back to Davison; it turns out that our careful planning of mattress situations didn't work out (the bed: "That's much too hard.", and the floor mattress: "Oh, that's not good, either.") — he'd brought his own air mattress, without a pump, that he wanted inflated. In our dorm, of course, it was hard to find a vacuum... after like 20 minutes of running around as if their heads had been chopped off, Robb and Matt found a vacuum (apparently the RA who gave it to them thought RMS was Matt's dad).
- He spent most of the evening in Matt's chair, responding to emails ("about 400", in a day) in Emacs on his MIPS laptop (seriously, where do you find a MIPS netbook? China, apparently...)
- There was a lot of playing with his hair, the temperature ("I really am a Princess"), the window, etc.
- The next morning, Luis took him to a used book store, and then off to the bus station so he could continue on to his next talk (he was in Canada with a friend of Robb's within a few days).
- At some point, he asked to get the "Rensselaer Center for Open Source" renamed to the "Rensselaer Center for Free Software". SURPRISE!
Here's the video, in Ogg formats, of course: (it'll play with VLC)
High Quality (600MB)
Low Quality (260MB)
Audio Only (100MB)
2009.01.31 in code
Hey! Following Robb's recent blog post about an implementation of Life as a GLSL shader, I now present to you a Mac OS X screensaver in the same style (using his shader and the original GPULife source).
Screensaver
Source
The plan was for Jayne (the machine that serves this blog, the rest of my web stuff, Robb's blog, lots of code, backups, etc.) to be a reasonably stable and very large (storage-wise) machine. The storage part worked, more or less, but the stability is ehh-not-so-much. I have a very consistent problem with libata, but it's not clear why...

Anyway. Here's the facts:
- I'm using Debian unstable, with Linux 2.6.28.
- I've got a Shuttle case, and a 100 W PSU (!!).
- I get the libata errors above, but only after the machine is up for two or so weeks.
- I didn't get the error at all during a one-month-long winter break, but it happened once again, two weeks after coming back to RPI.
- The problem has never happened when the case is open and a large house fan is on top of the case, which was true for a significant part of last semester.
- After the problem occurs, the machine must be left off for a few hours before it will successfully restart.
- The disks never report getting anywhere over about 44 degrees C.
- Only the root partition ever acquires any errors. Not the big (1.2TB) main partition.
- The total potential power use of the system is well over 100 W, and Shuttle recommended against putting both a Core 2 and two disks in this particular combination of case/mobo/PSU.
Any ideas? I've thought about it a lot, and cannot seem to come up with a reasonable explanation. If it's power, software, or the cables, the cooldown time doesn't make any sense; if it's the disks, running for a long time doesn't make any sense, and I've spent a lot of time beating on the disks to try to reproduce it and cannot; if it's heat (which seems most likely), the fact that it's 20 degrees C under the acceptable working temperature of the disks makes that make very little sense (and I never get SMART warnings or anything, just libata transmission errors!)... If not, I'm pretty sure a good bit of RCOS money this semester is going to head towards a new case/mobo/PSU (keeping the CPU/disks/memory/etc. from Jayne). Unfortunately, that will end up being a much bigger case... I'd also, in that case, have a really adorable little case that would almost definitely work fine with a single disk/an Atom/etc... anyone, anyone?
It's been a long time (20 days) since my last post — in that time:
- I've moved back to RPI and gotten settled in.
- We have a new President! And he's already doing a much better job. *high hopes*
- Robb and Matt (and Nate!!) and I have started our next project after Seed. I can't tell you about it yet, because we want to wow everyone once it's done.
- I sat through a 3 hour lecture by RMS, who then stayed in Matt's dorm room, down the hall, and went to dinner with Robb and Matt! (more about this experience later)
- I finished and ordered the second revision Intervalometer PCB, this time, for a "dual-core" intervalometer!
- We've had two weeks of class. LITEC is ... incredibly disorganized but awesome; Graph Theory is boring and, so far, a repeat of DSA; ModComp... we'll see; SD&D is strange because it involves designing and writing software with a group of people that I don't know (they all seem cool, though!).
- Seed got a writeup in Ars Technica, which was reposted to Slashdot and OSNews, and prompted #seed on Gnome IRC to become slightly busier than usual!
- I got Seed working reasonably reliably on Mac OS X, and am working on MacPorts packages (waiting on a new gir-repository release), and wrote a Seed/Clutter Pong, though it's really rough and useless at the moment!
- WebKit passed revision number 40,000. This would not be notable except for the fact that Matt has spent most of his waking hours attempting to create Arch binary packages for every single revision of WebKit.
- New pictures! Not much, just of all of us (and of Matt's RMS-signed laptop), but still cute!
It turns out it's really hard to take photos of snow, on a tripod, with an old manual-focus Nikon micro lens... especially when it's well above freezing and all the snow is melting. Oh, well!

I don't write about music much (nor make lists of things, here, much), but I figured I'd share the six most obviously perfect albums, in case any of the few of you here hadn't listened to one of them...
This started as Robb and others poking fun at me for calling Boston's Boston a perfect album... so I set out to find a small set of albums that I was OK with calling perfect, instead, so they wouldn't make quite so much fun of me...
"Perfect" means... every song is one you wouldn't mind running into at any point, but also the album as a whole works together... and makes sense. And stuff. I don't have words for music, really...
All but one of the albums are from before I was born, and the remaining one is still 14 years old... this is mostly because of my musical taste, of course, but I think (unfortunately) that the production of "epic" music is probably declining... you can blame it on the studios, artists, society, whatever... I don't know what it is, for sure, but I'd certainly love it if someone repaired the situation!
|
Boston — Boston (1976)
This album was the soundtrack for most of my high school career; it remains the most consistently complete and perfect album I've ever heard. Some (Robb/Gino) call it overproduced, among other things...
|
Radiohead — The Bends (1995)
I was only recently introduced to this album (and Radiohead in general) by Robb/DJ/Savannah last year. The first half makes for great music the first time through; the second half takes a few plays, but eventually it's hard to hear just one song and stop without completing the album...
|
|
|
The Beatles — Sgt. Pepper's Lonely Hearts Club Band (1967)
For a long time before I knew any music, I had a single CD of Beatles songs. It turned out most of them were from Sgt. Pepper; hearing them in context made them all the better!
|
Pink Floyd — The Wall (1979)
The longest album on the list, at 80 minutes, The Wall is one that's been with me for quite a while now. You also can't claim to have listened to it until you've listened to it through nice headphones... there's a whole additional... album, if you listen right.
|
|
|
The Beatles — Rubber Soul (1965)
A significant part of Rubber Soul was the soundtrack for freshman year at RPI; it's also my favorite Beatles album, now, despite the fact that it's comprised of some of their more ignored-but-still-approachable songs.
|
Genesis — Invisible Touch (1986)
I was introduced to Genesis by Dad, who has a bunch of albums on CD, including this one. Besides Domino, this album feels short and to the point, which probably contributes a bit to its "perfection". Not complaining about Domino, either, because it's definitely the best song!
|
|
2009.01.02 in code and gnome
Robb, Matt, and I finally wrapped our the second Seed release this week! It's the cumulation of almost two months of continued work...
I completely updated the tutorial, and it uses a new coding style which we're going to use universally from now on (I also partially updated Lights Off to this style...) It should definitely work on Fedora now, too!
There are packages for Seed in our PPA, if you use Ubuntu. Matt has provided us with a Arch package that builds from SVN, as well. Otherwise, grab it from SVN and build it yourself:
svn://svn.gnome.org/svn/seed/trunk
A slightly shortened version of the Changelog, after the jump...
Seed 0.3, Wednesday Morning 3AM (2009.01.01)
- Memory usage is excellent, finally.
- Innumerable bug fixes.
- Structs work now! Things like GdkRectangle: you can allocate them, get at their members, etc.
- GObject subclassing, which was rushed in to a 0.1 point release, is reliable now! We've also added signal installation.
- Multiple context support, rather than the silly global context.
- Support for string array argument conversion.
- C extension Modules (readline, Multiprocessing/pipes, sqlite3, canvas)
- Signals use userdata now. The 'this' argument was removed, as it really just lead to organizational issues.
- object.signal.connect is defined for connecting by strings (allows for connecting to detailed signals, like property notifications)
- 'out' arguments of methods work.
- Enums use Gtk.WindowType.Normal instead of Gtk.WindowType.normal, may break existing code in subtle ways (as Gtk.WindowType.normal will now be JavaScript null).
- Licensing update - libseed is LGPL. The trivial examples are BSD, the more complete ones are GPL.
- External API is pretty usable now, and comes with a turtle graphics example.
- Threading sort of works now. It's rather unpredictable, but async callbacks and stuff are fine.
- Many more Seed examples. Ranging from a Gnio Server to threading. The browser example is pretty neat now, and has sqlite bookmarks, WebInspector, and a few other tidbits. lightsoff and browser are the two highlight examples to play with.
- New builtins: Seed.spawn, Seed.repl/glib_repl/thread_repl. They're all somewhat useful for debugging.
- Removed builtin: Seed.prototype: Now use Gtk.Window.prototype
- Removed builtins: Seed.closure/Seed.closure_native: automatically handeled
- Removed builtin: Seed.readline: Moved to readline module.
2008.12.23 in code
So! I recently realized that the dump probably wasn't the best way to share code. Actually, that's not a recent realization... I just finally got around to doing something about it.
Anyway — I decided to move things into a bazaar repository. There's some code there already, and I've been actively using it for stuff I'm working on now (which I'll write about later). Also, a bzr copy of WebKit, because Robb had forgotten about git://git.webkit.org/WebKit.git, and wanted a DVCS copy of WebKit to help him out... it took quite a few days to generate, so I'm going to leave it there (and keep it up to date).
The repository is accessible through a loggerhead web interface, at:
http://www.hortont.com/bzr
If you have SSH access to Jayne, you can use:
bzr+ssh://www.hortont.com/bzr/project
to access the repository. You can also create new repositories, and commit to my stuff (but be nice!). Make a new subdirectory of /bzr on Jayne and bzr init inside of it — everything's writable by all of you.
If you don't have SSH access, you can check out projects with:
http://www.hortont.com/repo/project
Anyway... have fun!
P.S. You might want to update your bzr install. I use rich root, for the bzr-svn stuff (WebKit, nano), so you need a recent version. I'm not even sure the bzr that shipped with Intrepid is new enough.
EDIT: This is no longer true; I've moved some things to Git, which is how I'm storing everything from here on out.
|
|