Home

yrk

Recent Entries

You are viewing the most recent 20 entries

November 25th, 2009

11:43 pm: I've begun writing emms-lastfm-client.el at last
A while ago we reached an understanding with the Last.fm people about how to access their new API while preserving the freedoms of the GPL. Now I've finally started writing the code.

You can't play anything with it yet but you can get a session token, which is the end result of their authentication system and the basis for any and all interactions with their API.

I'll do the development as emms-lastfm-client.el in a git repo accessible with:


  $ git clone http://yrk.nfshost.com/repos/emms-yrk.git



Tags:

November 21st, 2009

10:02 am: CamelHumpSupportForEmacsMovement
I'mVeryHappyToSeeThisIncludedInEmacsForThoseTimesINeedToEditStuffLikeJavaScript.

Tags:

November 18th, 2009

06:08 pm: There is Very Little Good on the Web; Keep it Alive
I don't think that Wikipedia is particularly accurate or run by saints but it is an important part of what makes the Web useful. So I donated 10 bucks as a part of their new fund drive and I think that you should too.

November 17th, 2009

01:06 pm: Google is now a bit more accurate thanks to me
The most popular item off my personal Web site is the PDF which accompanied my lecture about "The Digital Darkroom and the Gimp" (*). The lecture was given in 2004 and the state of the GIMP and photography has changed since then. I don't feel comfortable distributing something that is probably increasingly irrelevant so I've removed the PDF from the site altogether. I'll keep making the Tex source available though.

* the PDF turns up on the first page of results for queries like "gimp white balance color temperature"

November 13th, 2009

04:25 pm: Even with that name it's still a great project
My recent work fixing recalcitrant bugs has left me with a deeper understanding of the Superior Lisp Interaction Mode for Emacs. In particular, the inspector commands and frame examiner.

Every debugging environment simply must have tools like that, and I'm grateful to the people who've provided for my display editor of choice.

Tags:

November 2nd, 2009

09:29 am: Google Wave
I got an invitation to the Google Wave preview so I had a quick look at it.

The technical view: As you can see by looking at the console client, Google Wave is XMPP chat with some persistence. This is good since if it takes off the free software community will be able to write clients and avoid being locked out.

The free software licensing view: The wave protocol project is released under the Apache License 2.0, which is compatible with version 3 of the GPL. Unfortunately Google doesn't care much for free software, preferring open source instead. As a result care should be used to avoid unpleasant surprises from the licensing front.

The personal view: It strikes me that when people have been talking about Google Wave, they are actually talking about the Javascript client. I don't use Web-apps and don't like storing my stuff on a server I don't have ssh to. I won't be using it.

October 31st, 2009

02:48 pm: Go Eli Z.
I'll definitely be following this thread on emacs-devel about customizing the mode-line.

Tags:

October 30th, 2009

05:51 pm: More good news for Montezuma and Unicode
I fixed another corner case for supporting Unicode in montezuma and it has been checked into SVN.

October 21st, 2009

11:39 am: Montezuma and Unicode-safe term vectors, fixed
After a few of iterations and a test suite, my fix for term vectors is in montezuma SVN.

October 15th, 2009

01:03 pm: Hurray for dired-single.el and *scratch*ing an itch
One of the past upgrades to the latest development Emacs broke my Dired hack to only ever display one dired buffer. I didn't have the time to fix it (but I do apparently have the time to blog about it...) so I loaded up Joe Casadonte's dired-single.el which does job just fine.

In the past I've largely ignored the scratch buffer, but for reasons I cannot explain (possibly a cosmic confluence) I've started using it more and more as of late. My scratch buffer is now usually a heap of code, code segments, words I want to look up, bits of text I'm ferrying about and miniature programs I use to explain some concept to someone for work. Another bonus to this potpourri is that it feeds M-/ aka dabbrev-expand.

Tags:

October 14th, 2009

11:42 am: Montezuma and Unicode-safe term vectors, I hate clouds and so should you
I've posted a fix for Montezuma's issue 5. As a result it is possible to get the term vector fields for positions and offsets in a Unicode safe manner.

I asked my wife "What would happen if you got locked out of your Gmail account tomorrow?". She said it would be the end of the world since she uses it exclusively. I therefore rolled out some cron jobs for her and my dad using getmail to make local copies of everything (which get backed-up).

October 9th, 2009

02:43 pm: Error handling: art not science
From the Common Lisp Hyperspec:

Some implementations may provide debugger commands for interactively returning from individual stack frames. However, it should be possible for the programmer to feel confident about writing code like:


 (defun wargames:no-win-scenario ()
   (if (error "pushing the button would be stupid."))
   (push-the-button))



In this scenario, there should be no chance that error will return and the button will get pushed.

While the meaning of this program is clear and it might be proven `safe' by a formal theorem prover, such a proof is no guarantee that the program is safe to execute. Compilers have been known to have bugs, computers to have signal glitches, and human beings to manually intervene in ways that are not always possible to predict. Those kinds of errors, while beyond the scope of the condition system to formally model, are not beyond the scope of things that should seriously be considered when writing code that could have the kinds of sweeping effects hinted at by this example.


September 28th, 2009

11:34 pm: Free Software and CC lectures are a good mix
Gnash 0.8.6 compiles and works fine. I'm using it to watch Yale's Frontiers and Controversies in Astrophysics. The lecture videos are apparently all under the Attribution-Noncommercial-Share Alike 3.0 license.

September 17th, 2009

07:02 pm: Nobody asked, so here is my opinion
The issue of package management is being raised again on the emacs-devel mailing list. Stefan Monnier and RMS weigh in, as well as Tom Tromey, who seems to be the guy who wrote package.el.

I think that installing packages in GNU/Emacs has never been an issue. The problem everyone seems to have based on conversations on #emacs is configuring the code to do what they want it to do. Sounds to me like Customize all over again, and I think that Customize sticks out of GNU/Emacs like a sore thumb.

Tags:

September 12th, 2009

04:38 pm: This isn't the "rt-liberation" blog, but...
The Git repository (git clone http://yrk.nfshost.com/repos/rt-liberation.git/) for rt-liberation has been updated with the multiple ticket browser code. An additional ticket browser will be created instead of replacing the existing browser if an optional argument is passed to rt-liber-browse-query. Here is a related excerpt from the manual:

It is sometimes useful to rename the ticket browser buffer to something more informative than the default RT-LIBER-BROWSER-BUFFER-NAME, especially if there are multiple ticket browsers.

Changing a ticket browser's name can be done normally with `rename-buffer', but it is also possible to name the ticket browser when it is created. In the following example two ticket browser buffers will be created displaying the query results and named "*updated by supervisor*" and "*new tickets*" respectively:


     (defun rt-liber-daily-rounds ()
       (interactive)

       (rt-liber-browse-query
        (rt-liber-compile-query
         (and (queue "complaints")
     	 (owner "lem.e.tweakit")
     	 (status "open")
     	 (lastupdatedby "molly.manager")))
        "*updated by supervisor*")

       (rt-liber-browse-query
        (rt-liber-compile-query
         (and (queue "complaints")
     	 (owner "Nobody")
     	 (status "new")))
        "*new tickets*"))



end excerpt

The above is especially nice since it just automates what I've been doing every day with rt-liberation anyway.

(Hitting "h" while viewing a ticket should take you to the correct ticket in the correct ticket browser buffer.)

A new sibling key-binding to "g" (revert-buffer) in the ticket browser is now "G" (rt-liber-browser-refresh-and-return). rt-liber-browser-refresh-and-return will refresh the buffer but also return point to the same ticket. This is useful for seeing if the ticket under point has been updated.

Tags:

September 10th, 2009

08:54 pm: rt-liberation update
I've merged into rt-liberation.el, the GNU/Emacs interface to RT, patches from [info]Aaron Hawley and [info]John Sullivan. New user visible features include:


  • Gnus-esque scrolling bindings for the ticket browser and viewer

  • "h" in the ticket viewer will now search for and move to the ticket being viewed in the associated(*) ticket browser

  • moving tickets to another queue and "taking" tickets



I probably forgot some, but it doesn't matter because the manual has been updated with all of the details.

You can get rt-liberation with: git clone http://yrk.nfshost.com/repos/rt-liberation.git/

(*) Once multiple ticket browser buffers will be supported, a particular ticket viewer buffer will be associated with the ticket browser buffer which launched it.

Update:

The multiple ticket-browser code is now live in my local repository and will be pushed out once I see that there isn't anything fundamentally wrong with it. Hmm, why didn't I just put it in a git branch of its own?

Tags:

September 5th, 2009

06:53 pm: Make of this what you will, internet


Taken from the header of "Lisp Bulletin #2" (July 1978)



Tags:

September 3rd, 2009

09:18 am: rt-liberation update
Here is a small but useful update to rt-liberation.el: Pressing g in the ticket viewer will do a "refresh".

Tags:

August 29th, 2009

03:27 pm: Talking With The Free World and Command Line VOIP
I don't use proprietary VOIP services; I use free software SIP clients instead. I'm currently using linphone. linphone comes with linphonec, a command line SIP client and linphonecsh for shell integration.

I got these features by grabbing the linphone SVN trunk: svn co svn://svn.savannah.nongnu.org/linphone/trunk and compiling with ./configure --enable-gtk_ui=no.

There is of course the omnipresent danger that I will use these features, particularly linphonecsh, as a basis for a GNU/Emacs SIP client.

My ISP provides me with the SIP infrastructure (including call out) running on a free software PBX.

For those long/never-ending conference calls I highly recommend a Plantronics DSP-400 headset.

August 21st, 2009

08:31 pm: Software from 1959 driving software from 1970
I haven't had to work with an SQL relational database for a very long time. But I might need to do some SQL for work soon so I broke out clsql.

The first thing I did was to try this:

(let ((id "stuff' OR 'x'='x")) 
        (clsql:query
	  (format nil "SELECT ITEMS.ID,TAGS.TAG FROM ITEMS,TAGS WHERE (ITEMS.ID = '~a')" id)))


Which successfully returned too much. Then I tried the same with clsql's functional interface:

(let ((id "stuff' OR 'x'='x")) 
  (clsql:select [items id] [tags tag] 
                :from '([items] [tags]) 
                :where [= [items id] id]))


Which fortunately quoted id correctly.

I then ran (clsql:prepare-sql ...) only to be greeted with: "A CLSQL lisp code error occurred: Database back-end type SQLITE does not support prepared statements.". This worries me quite a bit since I'm fairly sure that sqlite3 does have prepared statements.

Let's hope I don't come across little Bobby Tables.

Powered by LiveJournal.com