?

Log in

yrk

Recent Entries

You are viewing 10 entries, 10 into the past

November 12th, 2010

10:41 pm: "The Invention of Concurrent Programming" by Per Brinch Hansen
Notes on "The Invention of Concurrent Programming" by Per Brinch Hansen (2001).

History Repeats Itself
"The early multiprogramming systems were programmed in assembly language without any conceptual foundation. The slightest programming mistake could make these systems behave in a completely erratic manner that made program testing nearly impossible."
s/early multiprogramming systems/Web pages/
s/assembly language/a smorgasbord of languages/

More Concisely
"... I cannot claim to have written an unbiased account of these events. That can only be done by a professional historian."
IANAH

On Names
"Dijkstra used Dutch acronyms, P and V, for the semaphore operations. Being allergic to acronyms in any language, I renamed them wait and signal (Brinch Hansen 1971a)."

Dijkstra on System Design
"the intellectual level needed for system design is in general grossly underestimated. I am convinced more than ever that this type of work is very difficult, and that every effort to do it with other than the best people is doomed to either failure or moderate success at enormous expense."

We've Come a Long(ish) Way
In Dijkstra's "secretaries and directors" scenario he refers to the all the secretaries as "she" and the directors "he". Hansen writes in a footnote: "The gender bias in the terminology was not considered unusual thirty years ago.".

Language Young Man.. Language
In 1973 Brinch Hansen wrote: "I believe it is desirable and possible to write efficient operating systems almost entirely in a high-level language."
In 2010 my operating system is written in C, so maybe he was wrong.

"The only secret about secure concurrent languages was that they could be designed at all."
Note that by "secure" in the context of this quote Brinch Hansen means "produces predictable results" and not "can withstand attacks".

On Java
Referring to his invention of Concurrent Pascal in 1975 Brinch Hansen writes in a footnote: "Twenty years later, the designers of the Java language resurrected the idea of platform independent parallel programming (Gosling 1996). Unfortunately, they replaced the secure monitor concept of Concurrent Pascal with insecure shortcuts (Brinch Hansen 1999)."

November 2nd, 2010

12:01 am: Free Software Android Night Clock
The Android G1 phone is a very poor product but if you have one for testing Android applications you can use it as a night-clock. This turns nifty in conjunction with Innovation Wednesday's G1 holder.

I started looking around and couldn't find a night-clock application that is free software. I realized that I could probably write one quicker than it would take me to search for one thoroughly (*). I was right. Writing an Android application which displays the time in a big font and lowers the brightness of the screen took me about an hour.

You can get the source code code with the following incantation: git clone http://yrk.nfshost.com/repos/android-nightclock

P.S. Even in such a short application you get a taste for the bad and the good of the Android platform: have a look at how the font is sized (kludges galore) and contrast with how the time is updated (elegant).

(*) Lies; Programmers are endlessly looking for excuses to re-write existing software.

October 29th, 2010

06:13 pm: last.fm changes and emms-lastfm-client.el
I just pushed out support for the Mix station which came out today.

As Last.fm change their station structure and availability you can expect corresponding changes to Last.fm streaming support in Emms.

Tags:

October 25th, 2010

10:50 pm: rtliberation.py revamp: embrace the breakage
I've updated rtliberation.py in two ways: First of all I took the opportunity to make the script more "Pythonic". Let me translate that for you: I had fun re-writing parts which worked fine into code I don't really understand which will now break in ways I don't know how to debug. Second is that the script will wait and retry the command a set number of times with a set delay until finally giving up; which is useful for gliding over server hiccups.

Read below if you don't know what is rtliberation.py:

rtliberation.py is a short Python script which uses the RT CLI to download tickets from RT to a local ticket flatfile database. The local flatfile database is just a hierarchy of directories containing the year, month and finally .txt files named after the ticket ID number.

It can also list all of the tickets which are on-disk but were deleted from the server. This is useful if you delete spam and such _after_ it reaches RT.

You can git clone http://yrk.nfshost.com/repos/rtliberation/ to get a copy of rtliberation.py.

Once again: no relation to rt-liberation.el, my GNU/Emacs interface to RT.

October 22nd, 2010

11:12 pm: an opening!
I wrote my sole Python program, rt-liberation.py, back at the end of 2008 and it has been humming quietly on an FSF server ever since. But now that I received a feature request I have the excuse to do some more Python. I'm grateful for the opportunity.

So I got a copy of pylint and started to follow the instructions on the Python Programming page... which got me nowhere. Especially since I remembered that I don't like flymake any more than I'd like someone standing next to me and tapping my shoulder every other second while I try to write.

Then I found that pylint comes with an elisp directory which includes pylint.el. You have to add a (provide 'pylint) to the end of the file if you want to load it in the standard manner but other than that it allows me to hammer out M-x pylint and get an endless buffer of errors, comments and warnings.

I should add a special mode to pylint.el: After outputting over 300 lines of complaints it should add one at the end: "...you don't really know Python, do you..."

Tags:

October 20th, 2010

10:38 pm: jabber.el resource strings weirdness, bookstores
Some roster entries in jabber.el show multiple "resource strings"(*). I don't know why but I do know that this confuses the presence and status mechanisms. My solution is to modify line 683 of jabber-roster.el in the latest Git version of jabber.el to avoid inserting newlines: (insert " " resource-str). Then I compacted the formatting: (setq jabber-resource-line-format "%s"). The problem seems to have gone away and nothing broke (yet).

(*) What are those anyway and why would you need more than one?

Next

I hid from the rain and cold while new tires were being installed on my car. I hid in a bookstore with a hot cup of coffee and an intersting book. I reflected on how nice it is that bookstores still exist. The book? I got the immediate impression that it was emotional and visceral but a very poor history book (if at all).

Tags:

October 17th, 2010

11:52 pm: Back with some Android, Java and GNU/Emacs
Currently working with Common Lisp and Java side-by-side. Unfortunately nothing I can publish. I tried using Eclipse but couldn't get used to the 1970's airline cockpit user-interface. The two things I'm missing for Java in GNU/Emacs are method-completion and automatic "import" generation and installing JDEE seems about as much fun as pulling teeth so I haven't done it.

I do find this a useful kludge for looking up the Android-Java thingy at point:

(defun android-search ()
  (interactive)
  (let ((w (word-at-point)))
    (if w
	(browse-url
	 (concat "http://developer.android.com/search.html#q="
		 (url-hexify-string w)
		 "&t=0"))
      (error "no word at point"))))


To focus the search on the language reference change "&t=0" to "&t=2".

In music news I can say that the only downside of "Music to Make Love to Your Old Lady By" is that the album ends at some point.

Tags:

September 25th, 2010

06:42 pm: Batch operations in rt-liberation.el
I've been using the new batch operation feature of rt-liberation.el a lot today and unless I have an unread email saying "Something you did broke the list you fool!" then I declare it usable. I've documented it and pushed out the changes to the public Git repo.

And also... did conkeror just add Emacs-style movement to this textbox?! oh. my. god.

Tags:
07:59 am: Batch operation bug fix
I fixed a bug in my batch-operation code. Now the code will perform batch operations on marked tickets a lot faster and with much less network traffic.

Tags:
12:42 am: Batch operations for rt-liberation.el
A new FSF campaign has been very successful and I've found myself needing the ability to mark groups of tickets in rt-liberation.el and the perform batch operations. I've hastily added the feature. If it doesn't break stuff I'll document it and clean it up. The Git repository (git clone http://yrk.nfshost.com/repos/rt-liberation.git/) for rt-liberation has been updated accordingly.

Also, conkeror is my new best friend. It certainly took me long enough to get around to trying it. It was on the "I have to try this sometime" list together with Org mode. I guess that means that Org mode is next.

Tags:
Powered by LiveJournal.com