Cyanogenmod and Replicant

After the FSF announced a fundraising event for Replicant, I became more interested in installing an alternative Android distribution on my Samsung Galaxy Nexus.

I donated to Replicant, but after reading the documentation felt a little overwhelmed and scared to try installing it on my phone. Although firmware blobs are "bad" and "not free", I was afraid I would probably brick my phone with no previous experience at this.

The wiki at the Cyanogenmod site looked a little better documented. Since they are probably the biggest alternative it also seemed more likely for me to be successful. So I decided to try them out for my attempt.

It was still quite an effort. The Android SDK doesn't run properly on my AMD64 Debian Wheezy by default - specifically the adb and fastboot tools. Fortunately Debian has packaged up adb and fastboot already. Although they aren't released for Wheezy, it was easy enough to download the package sources and compile them myself.

In order to run adb, I had to enable USB debugging mode on my phone. I may just be slow but it took me a while to figure out what that meant and then find this article. It turns out I needed to click the "build number" seven times to reveal the hidden developer menu and then find the right checkbox.

The next problem was that the recovery image kept getting overwritten after each boot. This caused quite some confusion as I stumbled through the steps and had to back up a couple times. I got proficient at reflashing and booting into the recovery image!

In the end, I am proud to say I was successful. I've installed an SSH server and even Midnight Commander on the phone, and have enjoyed ssh'ing in and poking around the file system. Maybe my next project will be Replicant.

posted: Aug 12 2013
tags:

More mutt development

Since my last mutt development post I haven't been very active. The vacation interrupted my schedule, and it's frankly quite demotivating to work on a project that seems to be dead. All patches posted are just being ignored…

Nonetheless, I did work on a few more mutt bugs: 3083 3644

The patch for 3644 probably isn't a real fix, but it does stop the segfault.

posted: Jul 30 2013
tags: mutt

vimscript book

Although I've been using vim for a long time (almost 20 years), at some point I stopped trying to keep up with the new features. I never really took the time to learn vimscript or go beyond just trying to optimize for my work.

I've recently discovered an ebook Learn Vimscript the Hard Way that has changed that. Rather than being yet another "introduction to vim" book that goes over everything I already know, this book is oriented towards the details of scripting, mappings, syntax highlighting, and other deeper features.

The book is paced well. Each chapter goes over the topic with just enough detail to be interesting and enjoyable. It provides exercises and pointers to good reading spots in the help documentation. This is perfect for me, because without the pointers, vim help is just too overwhelming. (I have never been able to work up to reading the 8000+ lines of eval.txt.)

I'm only half-way through the book, but I have already learned a lot from it. I doubt Steve Losh will ever visit my site, but thank you Steve! (and yes, I did purchase the book too.)

posted: Jul 30 2013
tags: vim

Vacation and mutt development

Last week I got back from a cruise trip to Greece and Turkey. Returning home, the jet lag is definitely easier, but it has still taken me a while to adjust.

Before my vacation, I was trying to get more involved in mutt development. Although my opportunistic encrypt patches were ignored, it did end up starting a thread about the current state of mutt development. Also, a new committer was appointed. I hope this is a sign the development community will revive.

I created patches to several mutt bugs: 2788 3070 3082 3564. My patch for 2788 was even committed. I am hopeful the others will be considered too, although the mutt-dev mailing list seems to have gone quiet for the past few weeks.

posted: May 22 2013
tags: mutt life

Mutt hacking

(Continuing from my last post.) My second project is still in progress. During a discussion of signing and encryption on the mutt mailing list, Florian Lohoff mentioned an idea that I found interesting. (He had actually mentioned it in the past too.)

Currently, mutt has no way to automatically turn on encryption if you have a key for all message recipients. You can set up hooks that turn it on for a single email address, but when you email multiple people it doesn't work properly. If one person has a hook set up, it will turn encryption on despite the fact that some recipients don't support it. This seems like a useful feature that could lead to more wide-spread adoption of encryption (for mutt users).

At first I thought about an editor plugin that would add/remove a "Pgp: E" flag based on recipients. Another idea would be a wrapper script similar to the one mentioned in Aaron Toponce's blog post. The problem is the Pgp header can turn encryption on, but it can't turn it back off. So if you add people after first editing the message, you have to manually turn it off.

That led me to investigate putting it into mutt itself. Thus was born a six part patch set implementing "opportunistic encrypt". Hopefully the mutt developers will like the patch and be willing to consider committing it. Stay tuned!

posted: Mar 17 2013
tags: mutt

Middleman hacking

Recently I've been trying to dust off my developer skills and start hacking on projects again.

My first project was fixing a long-standing irritation with Middleman, the static site generator I use for my website and blog. Some of my pages were re-generating every time, despite the fact that I hadn't changed them.

After some digging, I narrowed this down to a utf-8 issue, and tracked it down to comparing a utf-8 encoded string to a raw binary string. In Ruby 1.9 these won't match (unless all the utf-8 characters are single-byte).

The fix was simple enough, but adding tests took a while - I haven't used Cucumber before. Additionally, I had to add a new kind of test to their framework - they weren't doing any "did the file update" tests.

In the end, I submitted a patch and it was accepted the same evening. Thank you to the Middleman developers for being so welcoming to patches!

posted: Mar 17 2013
tags: middleman

Switched to gandi vps

Just a quick note that I moved my VPS to Gandi. So far the move has worked out great. It's nice to finally wipe my hands clean of the RapidXen/SystemInPlace/Enzu mess. RapidXen seemed pretty cool 3 years ago, but the past couple years have been a disaster. Too many moves, too much drama, no communication, and too much bullshit.

So hopefully this will be the start of a much smoother situation, without the need to monitor IRC to find out why we suddenly moved data centers or why everything is down.

posted: Nov 24 2012
tags:

Recent projects

I haven't posted in a while, so this is just a quick list of things I've been doing recently.

After playing with the HP 15c Limited Edition, I caught the "HP Calculator" bug and purchased an HP 48g+ on eBay. So recently I've been enjoying reading and trying out a graphing calculator. (My math days pre-dated graphing calculators…). It's pretty cool to move from a single-line display 4-deep stack, to a 4-line display with an "unlimited" stack on the 48. I admire the 15c's engineering and capabilities, but the 48's complex number and matrix support is much easier to use. The 15c is smaller and better for general calculating, while the 48g is definitely an engineering workhorse.

I've tried bitlbee in the past, but never really liked the idea of instant messaging in irssi. If my wife IM's me, I want to see and respond to it quickly. I don't spend that much time in irssi, so bitlbee just didn't work for me. However, recently I hooked it back up and am using it to keep tabs on identi.ca and twitter posts. I don't care that much about "tweets" to keep a tab open in my browser. However, it's easy enough to have them in irssi and glance whenever I'm there and the channel is highlighted.

I recently tried downloading and running a Tor Browser Bundle. I was surprised how easy it was to run, and although tor is slower, it's quite usable.

My vps used to be run by RapidXen/SystemInPlace. RapidXen was acquired by Enzu, and things have been pretty shaky since then. The original RapidXen owner suddenly quit, and now I don't know what is going on. If anyone has suggestions for a good VPS company, I'd appreciate it.

Also, I've recently started listening to Free As In Freedom oggcasts. My eyes usually glaze over when it comes to licensing issues, but their shows are actually fun and interesting!

posted: Oct 17 2012
tags:

HP 15c Limited Edition

One month ago, I ordered an HP 15c Limited Edition calculator from HP's website. I wasn't actively paying attention to the fact that there was a re-issue of the 15c. I just happened to remember a high school friend who had one (back in the 80's), thought about how I always wanted one, and went to the HP site to see what they had. I saw the 15c Limited Edition and decided to order it.

A week later, they apparently ran out, since it disappeared off their store. I don't think they are scarce though, since a few quick searches still show plenty of them for sale from other vendors.

There are many interesting sites about HP calculators and the 15c. Eddie's Math and Calculator Blog has a series of posts on the 15c. The Calculator Store has a page with interesting links. The Museum of HP Calculators has all sorts of information and forum posts about HP calculators.

There a quite a few passionate HP calculator fans out there, and it's easy to see why: they are beautiful, well designed, and well made devices. I've enjoyed reading through the manual, learning about RPN and the stack, and the various clever ideas they used to put so much functionality into a calculator 30 years ago. Although the Limited Edition has a newer and faster processor, they kept everything else the same: * 448 bytes of memory * 67 storage registers (by default 21 for data storage and 46 used for things like imaginary numbers, matrices, programming, and other things) * a 4-level stack calculation stack : x, y, z, and t

That doesn't sound like much, but it's amazing how much the 15c can do. Imaginary numbers are fully supported (using a parallel x y z t stack). Many matrix operations are implemented, and the interface for entering and manipulating the matrices is quite usable (once you learn it). Programming, although definitely from a different era, is still powerful and straight forward.

It's too bad I never purchased one of these during my school years. It would have made using a calculator so much more fun and interesting.

posted: Sep 25 2012
tags:

Switching to middleman

I've just switched my website over to Middleman.

Ikiwiki was okay for my blog, but I struggled with how to integrate it into the rest of the site, or how to even change the layout easily. (Maybe it's possible, but it didn't seem well documented when I last looked into it.)

I've used Ruby and Rails, and Middleman provides a familiar environment while being a static site generator (i.e. no runtime Ruby dependencies and no vulnerabilities to worry about). It allows me to wrap my site in a consistent layout, and use a variety of template languages (erb, haml, markdown, scss, and many more).

You can use metadata headers, or even external yaml files to control page content. I previously did this on another site to announce upcoming meetings. Using an external yaml file allowed me to have the date/time shown on multiple pages but only need to update in one place.

It's easy to store my site source in a dvcs and deploy the generated files. The blog extension is a little new, but works well enough for my simple needs. Over time, I'll probably make things looks a little nicer.

During the conversion I also adopted HTML5 Boilerplate. Middleman supports nested layouts, so I was able to use the boilerplate as an outer-most layout, then nest my sites headers/footers in another layout. For the blog part, I nested yet another layout (for adding a calendar and tag list in the future).

Middleman contains a development server, so you can run the web server and see changes to your files as you make them without having to re-generate over and over.

It's a pretty slick environment, but there are a few difficulties. It helps to be up to speed with Ruby and Rails development paradigms. It makes use of Bundler and gems, erb, haml, yaml, and stuff like that. The helper methods (for links, assets, etc) are derived from the Rails equivalents. The developers seem to mostly develop only on macs, so there are currently a few bugs I'm encountering on Debian that they don't see. Hopefully those will get ironed out though.

posted: Sep 19 2012
tags:

Previous page Page 2 of 2