Running a code server in erlang

For as old as Erlang is, there’s a distinct lack of documentation about some aspects of it.  I’ve had a hard time finding information about how to run a code server, so I’m going to write down what I’ve learned here. First, there are a couple of things I should note:While you can use the erlang runtime as a hack-as-you-go platform, it’s really better to follow the OTP principles; you get a lot of things for free that you otherwise end up writing yourself.

Read More

Google eBookstore

I was really excited about the opening of the Google eBookstore; unfortunately, and depressingly, eBookstore is made of fail: Not all viewing format options are supported for all books.  Some support epub and PDF, some are only readable online with a web viewer or some custom appIt isn’t possible to find out what viewing format options are available for booksIt isn’t possible to filter books by download optionsI’m not reading a book on my computer.

Read More
|

Erlang + TokyoTyrant / TokyoCabinet / medici

My first real, significant, observation about Erlang is this piece of advice to new Erlangers: repeat this mantra: Mailboxes are not queues!More experienced devs than I get this wrong.   In any case, I’ve been working with Erlang and TokyoCabinet/Tyrant at work – I’ve been using MongoDB, too; it isn’t clear yet which will best fit our needs – and I’ve been using medici by Jim McCoy, a set of libraries for interfacing with TokyoTyrant/Cabinet.  I found a bug today in the principe module, which the following code demonstrates: -module(principe_test).

Read More
|

Taco Bell Programming

Ted Dziuba has an interesting article on what he calls Taco Bell Programming; it’s worth reading – there is a lot of value in the concept he’s promoting.  I had some concerns about the practicality of the approach, so I ran some tests. I produced a 297MB file containing 20 million lines of more-or-less random data: ruby -e ‘20000000.times { |x| </span>  puts “#{x}\03#{rand(1000000)}” </span>}’ > bigfile.txt Then I ran: cat bigfile.txt |</span>  gawk -F ‘\03’ ‘{print $1, $0}’ |</span>  xargs -n2 -P7 printf “%s – %s\n” > newfile.txt This is a baseline; a data producer, such as pulling from a database, is going to produce data more slowly than cat, and printf is going to write lines more quickly than whatever we’re doing to process the data.

Read More
|

Raw milk is made of win

Have I sung you the praises of raw milk?  No? Its good stuff, milk.  I used to drink between a half and a full gallon a week, prior to moving to our house in Elverson, PA.  The best thing about this house is that near it, just down the road, is a dairy, and this dairy sells raw milk.  My wife commented the other day that we’re up to two gallons a week.

Read More
|

Linux and the Mimo 710S

The Mimo 710S is a small-ish LCD panel (7” diameter) that connects to your computer via a USB cable and acts as a monitor.  It uses DisplayLink as a protocol.  After some trial and tribulation, I got it set up and working with Ubuntu 10.10, and here is how I did it. First, you need the udlfb kernel module, and the displaylink xorg driver.  One of the best tutorials is provided by mulchman; I won’t repeat what he says, although I will point out that he has you reboot your computer in the middle of the install, and that this was entirely unnecessary (I didn’t).

Read More
|

A perfect example of horrible design

The vorbiscomment command of the Vorbis toolset is one of the most poorly designed pieces of software that I’ve had the misfortune of using in a long time.  The tool can be used to either add a new comment to an ogg file, or entirely replace all comments.  It can not be used to update an existing comment.  It’s a clear violation of “make the common case simple, and the uncommon possible.”  Updating, or modifying, comments is the one, most common, thing a user might want to do – and you can’t do that with vorbiscomment.

Read More
|

Our new media streamer

Sometime in the past couple of months, our Roku died.  I don’t know why; but it doesn’t power on any more.  Monika’s never liked the thing, because she found it difficult to navigate – we’ve digitized all of our CDs over the years, which means that we have some 6k songs on the server, and it can be challenging to find music when you’re used to flipping through CD covers. Another new development in our music consumption has been Pandora, and it’s been nothing but a pain trying to stream Pandora over the Roku.

Read More
|

Success!

I did it.  It was a long, hard slog, but I’ve finally gotten down to my target weight. Actually, the first 35 pounds wasn’t all that difficult.  I started this last January at 240 pounds, setting my target at 200.  The first 12 pounds went in the first two weeks, and then it was a pound here, two pounds there, with slippages around holidays.  The problem was the plateau: I hovered between 204 and 206 for over 5 months, and although I never went back up above 206, I could never break 201, either.

Read More
|

pandoc & PDF

Oy. There’s a good reason why I hate LaTeX, and that’s bloat.  Here’s an example: rst2pdf (restructured text to PDF) converts marked-up text to PDF.  The package, and it’s dependencies, take maybe a couple of tens of megs at the most. pandoc depends on LaTeX to produce PDF files.  The minimum packages needed to produce PDF with LaTeX (using markdown2pdf) consumes nearly a gigabyte of disk space.  I mean, seriously; that’s absurd. I’m no LaTeX newbie; it’s always been a bloated hog, but it’s getting much worse.

Read More
|