Content from 2009-09

Make it happen!

posted on 2009-09-29 14:54:56

So, I've been mad about certain government activities for years and the way the government has ignored them or brushed aside activities to end them.

We may finally, really have a chance to stop this now and to roll back some of the very real damage that's been done. Please, everyone, support the efforts to repeal telecom company immunity and reform the long unrestrained surveillance laws.

I've got a phone call or two to make.

PS: Apparently, some companies think the world needs yet another HD video connector standard. My face enters my hands. That is all.

Overextended

posted on 2009-09-27 20:47:27

Today is not my best day but it is a nice day. The sun's out. I had a fantastic brunch with Teresa and some dear friends. I skateboarded a bit.

Unfortunately, the further I go the more I'm aware that this semester is much harder than it should be. I didn't particularly enjoy summer semester but it didn't seem this...difficult. A few months back I alleged that I was low energy but not depressed. I'm not as sure that's the case anymore. Things are too hard for me to think that everything is running as ordinary. It doesn't help that I'm not enjoying any of my classes this semester or that none of them require me to write code which is what I'd really like to be doing right now. I do feel that the best way to learn this stuff is to use it.

But in general, I just feel overextended lately. I don't believe that taking a semester off is an option and I'm already almost in the middle of this one. Energy comes and goes as does my mood but applying that energy to productive tasks (particularly some of the seemingly useless academic ones) has become vastly more challenging. It hasn't felt so hard in a long while. I'll try to rise to the challenge because I don't want to regress. Hopefully, this will pass in a short while.

At least I know what I want to be working on. Even if I don't know how to get there...or how long it will take.

Counterweight

posted on 2009-09-19 16:41:45

Just pushing rocks up hills,
We starry-eyed symbols analysts,
The world turns under our feet
out of balance, again.

Silly School

posted on 2009-09-15 16:01:47

This post is likely to be a bit scattered. Partially because I need to get back to doing homework in a minute but also because my brain has been in a lot of places lately. So here's a linkpost with thoughts on IP Law, Linux and other stuff. I also have a bunch of Lisp links but I'll dump those separately later...after I get some homework done.

I keep hearing about stupid moves by Microsoft lately. It's very confusing because in many ways my opinion of them has improved over the last few years. Not that I'd ever want to use a Windows-based OS again. I'm just too happy in Linux land. My point though, is that the company clearly has an old culture of anti-competitive wonkiness and a newer culture that seems more focused on creating good products and less on market manipulation. Maybe it's all just weird management stuff though. Hopefully that will change sooner rather than later. On the other hand, Sony seems to be getting their console act together between dropping prices and actually putting out effective advertising for perhaps the first time in history. I'm also quite pleased with Google taking a (more official) stance on Data Portability. It's something I feel pretty strongly about though I won't speak more about it today.

My hatred of AT&T seems to be perpetually growing. The FCC is trying to come up with a more formal definition of broadband and the carriers are, in my view, trying to make that definition demand as little of them as possible. Generally, I've gotten to a point where I hate telecoms. So, I have a message for them: Give me fiber, or whatever wireless connectivity you're pimping this week, and shut the hell up. In other news, IP Law is still completely ridiculous and I can't begin to summarize or explain that here. I can offer an example or two though. The first is a list of seven felonies with less severe penalties than music piracy. It's meant to be humorous. It's sadly surreal. I'll actually let that be enough of an example for today and link to a discussion of what fair use might look like in the 21st century and a curious idea of making digital property "stealable". Last but not least, I'm at least glad that good arguments against software patents are being made to the Supreme Court. Crossing my fingers on that one!

Peter Seibel's Coders at Work has finally come out. I was looking forward to the book for a good while and have been enjoying reading the interviews. LtU recently posted about it also. I've got 7 of 15 knocked out. I've been surprised that the two interviews I think I've enjoyed the most were with Simon Peyton-Jones and Brendan Eich. I was expecting the Lispers or Smalltalkers to be more to my liking. *shrug* I'll likely write a review or at least talk more about it when I'm finished.

I've been following a few pieces of software (as usual). It's nice to see the competitiveness in the browser market of late. The Chrome Linux team was disbanded recently and I take it that work is now part of mainline so hopefully there will be an official Chrome release for Linux "Real Soon Now". I should also note the emerging standard for 3D Graphics on the web. Something good will come of this. Additionally, GHC 6.12 is coming along nicely. Lots of bugfixes the last few days. Looking forward to GHC 6.12.1 RC getting out there even though I won't be using it. Rock on, Haskellers. Pitivi also made another release. Now if only Arch would get an updated pitivi package, I'd be a very happy man. Oh, and there hasn't really been any more news on the N900. I'm keeping my ear to the ground.

Finally, this is the month of Linux conferences between the Atlanta Linux Conference this weekend, the almighty Linux Plumbers Conference next week and the X Developers' Conference after that. Speaking of X, anholt reports continuing progress on the Intel front and I feel warm and fuzzy inside. All for now folks, later!

Good Things

posted on 2009-09-09 21:40:51

So, what are some good things that have been happening lately?

- Good things continue to happen around the N900. Specifically, Nokia has announced they won't allow carrier customization of the phone. Presumably, that includes jailing the user or preventing access to the terminal/root access. Here's hoping. Secondly, Thomas Thurman has begun writing a tutorial series on developing software for Maemo 5 that looks quite helpful.

- Per Vognsen, perhaps better known as the mighty psykotic on reddit, has finally got a blog up and running. I can't yet understand his first few entries but I'm glad he's putting his thoughts out there on a forum he's in control of.

- GHC 6.12.1 is nearing release. The first release candidate is planned for September 14th. Even though I'm going to be focusing on Lisp for a bit, I think the Haskellers have an awesome language and I'm very impressed with the work that's going on in GHC.

- Speaking of languages that impress, the Factor developers are chugging along as usual getting alot done. I do hope Slava releases 1.0 in the next year though. :) I won't go over all the specifics but you can read about the progress on Slava's blog. It's a pretty enjoyable peek into compiler hacking. Also, though I hoped the ARM port would be revived it appears PPC will receive that attention. C'est la vie.

- Snakes on the web was a talk given at a recent Python conference and proved pretty interesting. As I mentioned, I'm increasingly getting into webdev so hearing an inside perspective on the state of the field was fun.

- Finally, the R7RS process has gotten underway and the current proposal is to split Scheme into two separate languages. One for academia and one for industrial use, or one big, one small essentially. I don't know how I feel about this. But at this point I'm pretty Common Lisp focused anyway. And since R6RS was essentially ignored anyway, I'll wait and see how that community responds to whatever develops. The results from R7RS are still at least a year out. Reddit discussion here and here.

Scripting with SBCL

posted on 2009-09-09 17:40:14

Over the labor day weekend, I had fun. I avoided dreary schoolwork, I played guitar, I hung out with cool people, I celebated my second anniversary with a lovely lady, I wrote code.

One bit of code I worked on is a script to read in AT&T call logs and figure out the 5 people you call most often. As you might guess, this can be useful for people contemplating switching to T-Mobile (say, for an upcoming piece of hardware designed for their 3G network). In short, the script is run from the command prompt with ./myfaves.lisp and prints out the 5 people you've talked to the most based on your call logs and the total percentage of your minutes those calls account for. The call logs this script processes can be downloaded from wireless.att.com. Login to your wireless.att.com account, go to "Bill & Payments". Under "Wireless Statement Summary" click the "Call Details" tab and finally scroll down a bit and click "Download Call Details". Using the dropdown box, select each month then click CSV format and submit. Put all those files in the same directory and then execute the following lisp script from that directory.


#!/usr/bin/sbcl --script
(declaim (sb-ext:muffle-conditions style-warning))

(eval-when (:compile-toplevel :load-toplevel :execute)
(let ((*standard-output* (make-broadcast-stream))
(*error-output* (make-broadcast-stream)))
(require 'asdf)
(require 'split-sequence)
(require 'osicat)
(require 'cl-containers)))

(defpackage :my-faves
(:use :common-lisp :cl-containers :osicat)
(:import-from split-sequence split-sequence))

(in-package :my-faves)

;; ATT CSV info
;; call logs start on line 24, entries on every other line (evens)
;; voice calls final line starts with "Totals"
;; 5th comma-entry is number, 7th is duration in minutes

(defparameter *months* nil)
(defparameter *results* (make-array 6 :fill-pointer 0))
(defparameter *call-log* (make-container 'sorted-list-container
:test #'equal
:key #'car
:sorter #'string<))

(defun init ()
(loop for path in (list-directory (truename ".")) do
(let* ((pathstr (native-namestring path))
(ext (subseq pathstr (- (length pathstr) 3))))
(when (string= "csv" ext)
(push path *months*)))))

(defun find-faves ()
(loop for file in *months* do
(load-calls file))
(analyze-data)
(print-results))

(defun load-calls (path)
(catch 'load-calls
(with-open-file (in path)
(loop for i from 1 to 23 do
(read-line in nil))
(loop for line = (read-line in nil) do
(parse-call line)))))

(defun parse-call (csv-line)
(cond ((string= "" csv-line))
((finished-voice csv-line) (throw 'load-calls 'done))
(t (let* ((split-line (split-sequence #\, csv-line))
(number (fifth split-line))
(minutes (parse-integer (seventh split-line))))
(insert-call-sorted number minutes)))))

(defun finished-voice (csv-line)
(string= "Totals" (subseq csv-line 0 6)))

(defun insert-call-sorted (number minutes)
(let ((present (search-for-item *call-log* number :key #'car)))
(if present
(incf (cdr (search-for-item *call-log* number :key #'car)) minutes)
(insert-item *call-log* (cons number minutes)))))

(defun analyze-data ()
(ensure-sorted *call-log*)
(sort-elements *call-log* #'> :key #'cdr)
(loop for number from 0 to 4 do
(vector-push (item-at *call-log* number) *results*))
(let ((total-free (loop for i from 0 to 4 summing (cdr (aref *results* i))))
(total-mins (reduce-elements *call-log* #'+ :key #'cdr)))
(setf (aref *results* 5) (round (* 100 (/ total-free total-mins))))))

(defun print-results ()
(format t "AT&T -> T-Mobile myFaves Recommendations:~%")
(format t "-----------------------------------------~%")
(format t "According to our analysis of your call logs, these are your 5 most frequently dialed numbers.~%")
(format t "-----------------------------------------~%~%")
(loop for i from 0 to 4 do
(format t "~A whom you spoke to for ~A minutes.~%~%" (car (aref *results* i)) (cdr (aref *results* i))))
(format t "These numbers should be your myFaves as they accounted for ~A% of your total minutes.~%" (aref *results* 5)))

(init)
(find-faves)


I'm sure it's not the prettiest, lispiest code out there but it could be an awful lot worse. Also, sbcl emitted style-warnings when the script was run. This behavior surprised me a little bit. After all, if I'm running the script I have little need for the style-warnings. After some digging, I learned enough to write this patch for the program which suppressed the undesirable output. I hope to submit a patch to the SBCL manual in the next week or so that notes this may be desired as nothing on the current page regarding sbcl --script would indicate that any output from the compiler would appear.

Reading Material

posted on 2009-09-09 03:15:24

I screwed around a little this weekend trying to port some Common Lisp code to Haskell. I hadn't messed with Haskell in months, made a bit of a fool of myself on the #haskell IRC channel and then promptly realized I'm being silly. Why? It's fun learning languages. I have half a mind to try learning some Factor by porting the same code to it.

It's silly because I'm finally at the point where Lisp is starting to feel natural and I'm getting real work done in it. Nothing fancy or sophisticated mind you. I'm thoroughly a noob. But I'm a noob who is learning by working on bigger projects. If I give in to the "new language diversion" now, it may be fun and I may get something out of it but it's mostly writing toy programs in another language instead of continuing to work on bigger programs in a language I'm finally starting to think of as a native tongue.

So, here's some reading I hope to do in the near term:
I might as well get as good at SLIME as I can since it's my environment of choice. Bill Clementson has a series of good articles.
I am finally going to take some time and try to pick up web dev. I'll start at the high level and go lower as I have to. It seems like Weblocks is the most active and awesome Lisp Web Framework so I'm sure I'll be writing about that some. Hunchentoot and weblocks are installed on my laptop so I just need to hit the docs and get hacking.
If there's stuff I can't figure out how to do, between #lisp on IRC, some mailing lists and RosettaCode, I'm sure to be in good shape.

Finally, if you're interested in lisp do as Xach said and read some of abhishek's stuff before you get started. Dispel the myths and know about the features.

Two Good Quotes

posted on 2009-09-08 14:26:38

I stumbled onto these over the last few days and am pretty taken with both of them. The first comes from the first Paul Graham essay I've enjoyed in a while. The second comes from a discussion on Lambda the Ultimate, admittedly about Lisp. Still, I think whether you're a fan of Lisp or not the second quote is incredibly relevant and true. Especially if you're a CS student just learning whatever the hell they teach you.

Being strong-willed is not enough, however. You also have to be hard on yourself. Someone who was strong-willed but self-indulgent would not be called determined. Determination implies your willfulness is balanced by discipline. - Paul Graham, The Anatomy of Determination

I was raised with a view of CS as having a kind of natural progress that inevitably culminated in the current popular technology. In fact, to a large degree, many of the existing technologies are more a product of fashion and historical accident than technical superiority. Keep an open mind, don't believe everything you've been taught, and to quote my research group's motto, always question your assumptions. - Dave Herman on LtU

To New Beginnings

posted on 2009-09-08 02:38:12

Something changed. Right under my nose, in the middle of everything, something changed. I just realized it tonight. It was me. Specifically, I can say something now. Something that I couldn't say for the first 21 years of my life: There are things I want to achieve and obstacles in my path.

For the longest time, there really wasn't anything I wanted to achieve, anything I was too deeply invested in. I was pretty uninterested, more inclined to giving up than choosing a direction and moving forward. Sometime around last August, that changed. I'd say as early as last January but I feel that's too generous. The important thing is I'm doing something that I really do want to do: learning about computers and code. I'm moving forward. And I didn't even know it. It's funny, obstacles don't seem like that big a deal once you know the path you're on.

Remembering Poetry

posted on 2009-09-04 04:26:40

It's been a long time since I've read poetry, as I related to a friend recently. I've wanted to get back to it and so poked through two volumes given to me by friends who know my love of poetry. I absolutely have to post one of the poems I read. The poem is taken from the book Good Poems, given to me by Don Gerz on my 22nd birthday. It was compiled by Garrison Keillor. It's called To be of use by Marge Piercy taken from p. 157. It's really outstanding. Someday I hope I work as well as those depicted...and find work as worth doing as that described.


The people I love the best
jump into work head first
without dallying in the shallows
and swim off with sure strokes almost out of sight.
They seem to become natives of that element,
the black sleek heads of seals
bouncing like half-submerged balls.

I love people who harness themselves, an ox to a heavy cart,
who pull like water buffalo, with massive patience,
who strain in the mud and the muck to move things forward,
who do what has to be done, again and again.

I want to be with people who submerge
in the task, who go into the fields to harvest
and work in a row and pass the bags along,
who are not parlor generals and field deserters
but move in a common rhythm
when the food must come in or the fire be put out.

The work of the world is common as mud.
Botched, it smears the hands, crumbles to dust.
But the thing worth doing well done
has a shape that satisfies, clean and evident.
Greek amphoras for wine or oil,
Hopi vases that held corn, are put in museums
but you know they were made to be used.
The pitched cries for water to carry
and a person for work that is real.

Two Weeks Already?

posted on 2009-09-02 21:17:28

This semester is flying by. It's really hard to believe and, honestly, quite scary. Aside from my Computer Organization and Design class, I feel like I'm learning quite little. With regards to COAD, I feel like I've mostly learned interesting trivia to date with a few useful larger concepts.

I'm trying to keep in mind that I'm here for the degree and that even if SPSU teaches CS at a more superficial level than I'd like that I can teach myself both while at SPSU and for many years afterwards. That part is not new. The hard part remains motivating myself in such a fashion that I blaze through the SPSU (oftentimes) busywork and have time and energy for personal studies after. My gut tells me that it's my perspective on the SPSU work which causes it to demotivate me and drain my energy. Hence, it's my perspective I'll have to figure out how to change. But first...

Today, I'm going to do something I don't normally do. Bitch. I'm presently in my Introduction to Algorithms class. It's a subject I'm personally compelled to learn and learn well. Unfortunately, the lecturer is pretty bad. Part of this may be a language barrier issue. The professor is not a native English speaker. His enunciation is fine but his ability to elucidate the concepts is thoroughly lacking. The first week he was dismissive of certain students' questions without explanation but this has improved.

Perhaps the most disappointing aspect is that there are free video lectures from MIT on this material taught by one of the authors of the textbook we're using. They move at a faster pace than we do (3 lectures of ours ~= 1 of theirs) but their lectures remain substantially clearer and better motivated than those of my professor. Moreover, I gain more understanding more rapidly by simply reading the textbook than by listening to him. Sadly, I have a hard time doing this in class because of ambient noise and other factors.

Finally, our syllabus is simply intolerable. In this course, a 60 is a passing grade, a 70 is a B and a 40 is a D. I really have little more to say here. Either the assumption is that we won't grasp the material well yet should pass on unscathed so that graduates are produced to sate industry or the class is so abysmally and impossibly difficult (or poorly taught) that a70 denotes thorough understanding of the material. Either way, this was the class I was most looking forward to this semester. To date, it's quite a disappointment.

Catching Up

posted on 2009-09-02 03:10:31

I was hoping to make a few posts today but I'm working on homework for tomorrow so that won't come to pass. I wanted to get something up before tomorrow though so I thought I'd mention a recent technology development that has brought me some joy.

I've been putting off getting a smartphone for a few years now. At first, because I didn't think I would make good use of the extra features and more recently because I wasn't satisfied with the available options. That dissatisfaction was primarily of a sort of political nature rather than a technical one. That is, I was satisfied with the quality of the technology available but not satisfied with the freedom and control it allowed. I seem to have written briefly about this before in 2007. I'd like to expand on it at some point, in particular on What Technological Freedoms Are and Why They Are Worth Fighting For. I wonder if there's an interested audience. Then again, much of what I write may be without that.

For a time, there was an effort for a technically mediocre but politically liberated device called the OpenMoko which I was following mostly back in 2007. They made a valiant effort but ultimately fell short of what I deemed a suitable product. Also, my phone was less in need of replacing in 2007. More recently, I've been watching the cell phone market with an eye towards replacing my aging Nokia around Xmas. Android phones had been striking an acceptable but less than perfect balance between freedom and technical excellence but they still weren't quite what I wanted. There had been whispers for months about a Nokia phone which would be based on Open Source and thoroughly awesome.

Finally, they announced it. It looks to be completely and ridiculously awesome. There are a few over the top videos and two hands-on videos (warning: latter video in Italian) but if you're really interested check out the specs and software features pages. Very Happy. Also, possibly the most important thing...Freedom:


N900: Jailbroken on Arrival


Anyway, I'll be fiending for that thing until it's in my hands. In the mean time, I hope to get some more posts up. Surely, I can crank out one during my Algorithms class tomorrow. Explanation forthcoming...


Unless otherwise credited all material Creative Commons License by Brit Butler