Emacs and Slime highlight changes and how to control it

2008-05-14 18:23:26 PST

Tags: , ,

Massive thanks to durka on #lisp on irc.freenode.net.
New versions of slime for emacs have had enabled by default a new feature, essentially a light highlighting of uncompiled changes to a file. At first I found it annoying but then I got used to it. It is kind of handy. However I wouldn't find out how to turn it on or off. Oh well.

Then I went to use emacs on the console and the subtle light grey background highlight was suddenly grey text on a white background and completely unreadable. Very annoying, suddenly this little feature rendered -nox emacs useless.

Hours of google searching turned up nothing so finally I resorted to the irc channel. In only 10 minutes we got the answer.

<durka> aha
 customize emacs - applications - slime - slime mode - slime mode faces
 change highlight edits face

Thank you.

Mindstab Go AI competition really starting now

2008-05-10 02:10:44 PST

Tags: , , , ,

Ok, so I know we announced it at around Christmas, but *now* the Mindstab AI Go Competition is starting to get under way. Both Rob and I now have entries that can compete, though mine is mostly just an over engineered random bot, until I get even more framework in place.
Still, everything has really started happening this week as now that school is over, I've had some time to devote to this, so my bot finally got off the ground. And then we got together to day and hacked on the server some more cleaning it up, and making an 0.2 release of out Go client/server software.
Finally, and most fun, we whipped together a Matchs page where you can see all the results of games so far. See, real proof that things are happening!
So with this out of the way I can really start to focus on the bot. To that end I've defiantly come up against some quicks in Lisp and SBCL. But then today we were also working in C, Python and PHP and we certainly came up against some quirks in the first two (oddly PHP really does manage to get out of your way and let you do your thing). Still, I think I have things mostly worked out and I can focus on the bot. Which is fun because I'm finding for the most part I'm really enjoying coding in Lisp and Slime+Emacs is pretty rocking. As for the bot, I'm excited. I've got some fun plans for it and I haven't done nearly enough fun coding since school's been on.

Note for C developers on Ubuntu

2008-05-09 11:57:13 PST

Tags: , ,

Right, so when doing C development on Ubuntu I suddenly noticed something was missing in the pan pages department. Like all the C api.

apt-get install manpages-dev

ah that's better. Someone might want to make it part of the 'build-essentials' package.

Setting up a remote git repository with just git

2008-04-27 23:30:38 PST

Tags: , , ,

So Ubuntu hardy doesn't ship with the handy git wrapper/tool cogito because git has all the features in it incoperated... somewhere...

But documentation is surprisingly sparse. Anyways, if you want to set up a git repo nowadays using just git, it should go as something like follows:

root@server # cd /git
root@server # mkdir newrepo
root@server # chgrp git newrepo
root@server # chmod g+ws newrepo
root@server # cd newrepo
root@server # git init

And if this is a public repository

root@server # touch git-daemon-export-ok

On the client side.

user@client $ cd project
user@client $ git init
user@client $ git add *
user@client $ git commit -m "Initial code dump"
user@client $ git remote add origin ssh://user@git.server.com/git/reponame
user@client $ git push origin master

and after that regular

user@client $ git push

works just fine.

Aoss matures

2008-04-09 13:56:19 PST

Tags: , ,

So I recall aoss being glitchy at times and generally not working with complex apps. At least that's what I recall.

So what is aoss? It's a program that acts as a wrapper around Unix apps that use the OSS sound system and silently converts their OSS calls to ALSA ones. Why is this useful?
a) I'm pretty sure each OSS app can lock the sound card, which is pretty lame on any modern system.
b) Because for some reason, some apps still use it, or are compile with OSS support instead of ALSA suport, still in this day and age.

Case point: Qemu on Ubuntu hardy still seems want to use OSS. I can't imagine why and I'm pretty sure it should support ALSA. I never had problems with it on Gentoo, but on Ubuntu it initializes it's OSS sound driver, and then fails to lock the sound card and so Qemu runs silently. Since I only use it to emulate Win98 for a few classic games, sound is pretty needed. So today on a lark I thought I'd try aoss.

 
aoss qemu -hda hd/win98.img -cdrom cd/dk.iso -soundhw sb16
 

And what do you know? It worked like a charm. Kudos. I'm impressed, pleased, and thankful.

C++ is getting Lambda expressions! (and Cadbury creme egg cakes)

2008-03-31 00:28:00 PST

Tags: , , ,

C++0x, the next version of C++ due by the end of the decade has just had Lambda expressions added to the language. This is great!
Read about it at herbsutter.spaces.live.com/blog/cns.
It should look something like the following

 
find_if( w.begin(), w.end(),
             []( const Widget& w ) -> bool { w.Weight() > 100; } );
 

Sadly, Lambda expressions haven't made their way into GCC, so I can't play with them... yet!

Also, thanks to George for this:

Cadbury Egg Cake :D

Experiment:

Replace ordinary eggs in cake recipe with Cadbury Creme Eggs and observe results.

Hypothesis:

THIS IS GOING TO BE SO AWESOME

bigmixup.com/content/cadbury-cake

Why is it snowing?

2008-03-28 09:18:05 PST

Why is it snowing?

Reports from the bleeding egde

2008-03-15 11:27:56 PST

Tags: ,

So this has been more or less fun so far. Lots of updates everyday, and it's good to keep up with them and fun. Sure occasionally they break a few things, but more often than not things are getting fixed. Thankfully I missed that libc update that was broken and pretty much disabled systems, not that tossing in a liveCD and copying over a working libc would have been the end of the world.

Over the last week, my sound has gone from not working to working, and my blingy desktop with compiz gained the ability to play movies fullscreen without grinding to a halt, so woo! And things crash less.

Still, there are a few hazards. Hibernating is still kind of a crap shoot. It works, but usually sound and sometimes the wireless won't work when it comes back up. And my 'del' key still doesn't work. But I'm sure that'll get sorted in the next month. Gnome 2.22 was officially released so now lots of the software itself isn't even beta, but official release stuff. Now it's just Ubuntu that's "alpha", meaning the general arrangement of software and configurations. However it's in "freeze" just before the beta is released. So things progress.

More new toys: Nokia 5200

2008-03-10 23:11:15 PST

Tags:

So after a year and a few months, my old cell, a Sony Ericsson k510a was dying. It wasn't the greatest phone but it wasn't bad, but now the keys were sinking and becoming unresponsive. Time for a new phone. So I ordered one last week.

And today, my brand new Nokia 5200 showed up! I'm reasonably impressed with it. Right off the bat it does a few things right. It has an adapter so you can plug any good 3.5mm headphone you spent money on into the phone to listen to your music, so you aren't stuck with their proprietary and bad headphones. This is awesome. Second, it comes a USB cable and when plugged in has the option to be a mass data storage device which is perfect.

The interface though is a bit weird. The addressbook uses such a large font only two entries can ever fit on the screen, which makes it feel cramped, even though there is no reason for this.

Next, even though this phone is well set up as an mp3 player, you cannot use your mp3s as ringtones. It's some DRM "issue". What a waste. Anyways, I picked a song I like, loaded it into audacity, turned it to mono, selected 10 seconds, and exported it as a .wav and that seemed to work. It will accept any wav, but it has to be with in a certain range. <300Kb is ok and around 800Kb is not, (my two tests) so somewhere in there is the magic number.

Now all my contacts were imported from my SIM card, but they came in a little messed up and not grouped, so I've been going through and cleaning them. Not optimal, but I think at least part of that is the fault of my last phone too. Better than not having the numbers at all but a pain, becase I have 123 contacts.

As I alluded to earlier, this phone, equipped with a 1GB mini SD card, might just replace my mp3 player. The pros are that it has a reasonable interface for it and volume buttons on the case and accepts and headphones I want to use. The con is that it doesn't do ogg. But to carry around one less device I might be able to put up with that. I'll give it a try and see how it does. Again though, they use way too large a font and most of the filenames in the browser are cut off.

So all in all, some nice hardware, and some good low level choices. I'm pretty impressed. The biggest problem for me is that the interface really could stand to use a smaller font so a reasonable amount of information could fit on the screen. It feels cramped.

I can’t help myself: Ubuntu Hardy (8.04) Alpha 6

2008-03-10 18:26:46 PST

Tags: , ,

So I walked into class today and my buddy waves me over to sit with him. I look over once seated and see a nice brown screen with a progress bar. Apparently that morning he finally had enough of Windows Vista being slow (his complaint) so he decided that class was a good time to install Ubuntu, and he picked the upcoming release 8.04, which is currently in alpha 6. Now I know since I've been using Ubuntu on my laptop I've been a little less on the bleeding edge than I was when using Gentoo, but I didn't feel like being out done, so I decided to upgrade my nice stable Gutsy (7.10) to Hardy right then and there.

Easy really. Open '/etc/apt/sources.list' in your favorite text editor under sudo and comment out the CD source line and search&replace all instances of 'gutsy' with 'hardy'

then

 
sudo apt-get update
sudo apt-get dist-update
 

Apparently you can also

 
sudo update-manager -d
 

and tell it to check for updates and then it will offer you the option to upgrade to the development version, but the console version is slightly more interactive when it comes across system files you modified.

It was a 1.8GB download for all my software, and that might be large compared to some people because I installed a bunch of open source FPS games a bit ago and they do have a habit of taking up lots of space. Thankfully the UBC pipe is very fat and in 14 minutes everything was downloaded and it then went ahead and installed and updated everything.

Reboot.

And volia! Nice stable desktop is now a bleeding edge Alpha quality desktop with all the latest.

The good: My laptop's graphics card, and Intel i965, is 'new' and desktop bling wasn't supported under Gutsy, but it is under Hardy. Awesome. I installed compizconfig-settings-manager and tweaked away for a while. Things are very blingy.

Firefox beta 3 is pretty fine, but my Google browser sync plugin isn't supported for now. Hopefully in a bit.

Surprisingly, my latex plugin for Tomboy still works so awesome!

Everything else so far has more or less worked.

The not so great: Sound initially completely failed to work. No sound card detected, and the sound card module failed to load. Apparently a whoops over at Ubuntu HQ, they'd just compiled it against the wrong kernel. When I checked there was a 2 hour old bug. It was fixed this afternoon, and I got the fix from the update manager. Woo.

So everything so far seems to work. However things do crash every now and again. 'Eh, it's alpha software, everything. I knew what I was getting into, I've done this before.

So rad, I'm pretty pleased and impressed. Such an easy update to the bleeding edge system. And considering it's still all Alpha software, stuff is running fine enough. And I have all the cutting edge toys.

Now the fun will be in the next month as everything moves from alpha to beta to release and all my shiny toys become stable. :D

I heart free software.

Ubuntu 8.04 Hardy: Compiz in action

Update: Oh wow! Firefox 3 finally shows image's full alt over text, which is fantastic because several comics I read have second punch lines there and previously you had to look at the image properties to get the full thing (lame). So awesome they fixed that.

References:

Valid XHTML 1.0!
Valid CSS!
Mindstab.net is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
15 queries. 0.544 seconds.