Posts

Showing posts from March, 2008

Thoughts While Reading About D

I first heard about D quite a while ago, but I never really looked into it. I stumbled upon it again today and I’m actually reading on the website right now. Some quick thoughts I wanted to jot down: It’s compiled, no VM or interpreter, and supports inline assembly, pointers, etc. (could it be used in embedded systems?) Doesn’t do 16-bit stuff very well (hmm, maybe not all embedded systems…) No preprocessor, yay! The above means, no #include, it has modules that you import. Arrays know their size! Arrays can be resized Arrays can be associative (i.e. hash tables) No forward declaration needed (from they day I learned C I’ve wondered why in the world the compiler couldn’t figure this out itself) Function literals and nested functions (hence, closures). Wow. Garbage collection and automatic memory allocation, but you can override it if you need to (good!) Built-in synchronization Direct access to C functions Standard object file format I

Beat the Save Habit

It only takes one unfortunate program crash where you lose a lot of work to teach you the importance of saving often. I use emacs most of the time, and I had developed a nearly subconscious, paranoid habit of hitting c-x c-s every 5 seconds or so while working. I was starting to catch myself before hitting that save-buffer shortcut even when I was typing in other applications: instant messenging, web page forms, you name it. Meanwhile, I also started noticing applications that didn't require me to tell them to save my precious work. Gmail and blogger come to mind right a way. " Why couldn't emacs do the same? " I wondered. After hashing it out in that blog entry and on the emacs wiki , I added the following to my .emacs file, and I am happy to report that my twitch is gone: (defun save-buffer-if-visiting-file (&optional args) "Save the current buffer only if it is visiting a file" (interactive) (if (buffer-file-name) (save-buffer arg

Some More Tweaks to my XO

Image
I went through all the tweaks to get XFCE running on the XO . It definitely feels snappier than Sugar, but it's all a big hack, and you still don't get the camera and microphone, and networking with wifi-radar was a little iffy. Bill Clementson gave some great tips for tweaking the XO to make Sugar a little more adult friendly. I love his quake terminal hack, it is so much faster and convenient than the built in terminal activity. I have also settled on Firefox as my browser like him. It looks pretty good: For some reason I just couldn't get used to Opera. Firefox seems a little slower than Opera did, but it still feels faster than the browse activity that came with the XO. Bump up the minimum font size on Firefox to about 20 and it looks beautiful. I got evince to install for viewing PDF files ( yum install evince ) and it works pretty well too: I spent this evening upgrading my family website all from my couch with the XO. Being able to flip from Fir

GPS Fun(?) on Linux

I have a Magellan SporTrak Map GPS that I won as a door prize a few years back. Every now and then I dig it out of a drawer and play with it. I bought a new bike this week, you see, and I downloaded some routes from MapMyRide that I wanted to put on the GPS so I would have a route to follow while biking. Should be pretty straightforward, I thought. MapMyRide offers downloads of routes in gpx format, which I've run into before while playing with this gps stuff. Cool. So I downloaded the files and did a quick search for Linux GPS software. Unfortunately it still looks like gpsman is still really the only software out there that does what I need (please, please correct me if I'm wrong). gpsman is a piece of ugly tcl/tk software that does a fine job of connecting to my Magellan and allowing me to download and upload track data using the gpx file format. The interface is awful. It opens up three windows that aren't really labeled as to what they are, and offers all