The other day I was going through some notes that I organize using Org-mode and I realized that it's a pain in the ass to write up links to Wikipedia entries all the time. So I whipped up some code that adds an org-mode link.

It's 1am and I have myself organized in terms of the meetups. I have a list of meetups and people who have shown up and can be considered regulars, I also have a template setup for discussing previous meetups. Also, this is the big thing, I have this in a GIT repo! So I can make whatever changes I want to the page offline and then simply copy/paste into the Association of Lisp Users wiki page for the Toronto Lisp Meetup.

On Friday I was bitching about the lack of websites that can import FOAF profiles. A lot of the popular ones like Twitter and LiveJournal can export them, but they don't seem to be able to import them and make use of the actual FOAF data. A portable file format only works when you can both import and export the data.

There are a lot of websites that export FOAF, Friend Of A Friend, data including: LiveJournal, Twitter, Pownce and hi5. There is a Facebook application that exports your Facebook profile to FOAF too!

FOAF doesn't appear to be dead in terms of exporting, but what about importing? That's the whole point of FOAF...to make your data portable so you can move it around easily. But I've searched and searched and I can't find anything on how to import my FOAF data into Twitter, or LiveJournal, or elsewhere. What's the point of freedom when I can't use it?

A simple example of how importing FOAF is useful: FriendFeed. It aggregates stuff from various social networks. I already have a list of online accounts in my FOAF file. FriendFeed, let me import that file and you can take care of the rest! I hate re-typing in all my account names so you can import them. It's annoying and boring.

The project is still alive. The last time I checked it looked a little dead, but now that I've checked out the mailing list archives, it looks like it's still alive. Awesome awesome :D

cl-terrace

Thanks to the list, I've discovered another web application framework for Common Lisp called cl-terrace. It's a Model-View-Controller framework (aren't they all?) with only the View-Controller part covered. I'm not sure exactly how that works, but it uses the Hunchentoot web server, and djula, a Common Lisp template engine based on the Django templating language which is nice.

The documentation for djula should be generated by the developer since the API is apparently changing around quite a bit. Djula looks like it handles internationalization and translations in a sane way. You specify translations using a dictionary (a.k.a. hash-table), the example shows how to do this.

cl-terrace is ASDF-installable in case you're itching to try it out. Using SBCL, run this:

(require 'asdf)
(require 'asdf-install)
(asdf-install:install 'cl-terrace)
to install it.

Ruby

On another note, a Ruby note, Chris Wanstrath of GitHub fame presented a keynote at the 2008 Ruby Hoedown about side projects where he said,

First off, the time issue. I don't know how many of you read RSS, but I challenge you (that's a keynote term) to give it up for a month. Just turn it off...What should you do instead? ...let other people do the filtering for you. Use your time for other things.

It's a good keynote and lots of communities could learn a thing or two from the Ruby community. The optimism of the community has to be balanced out as Unspace's Pete Forde says,

Folks in Ruby tend to write a lot of nostalgic, self-aggrandizing bullshit, though. You see a lot of "MY MY, THE COMMUNITY HAS EVOLVED INTO SOMETHING SPECIAL" and talk of changing the history of software development. I'm all for progress, and as a musician, I understand the function of hype in generating momentum. But sometimes we need to get real and be a little more harsh in our own self-analysis.

Anyway, off to write some code.

While the re-design of the site continues and the Friend of a Friend Creator is being re-vamped, I had the idea of a jobs widget.

I'm sick and tired of seeing Google Ads or job postings for Java or .NET programmers. Where are the Lisp jobs? Where are the Haskell jobs? Where are the cool jobs? I know there are sites that list them but I have to visit them individually. They aren't aggregated and it's a pain in the ass.

I'm not ambitious enough to write up a full job board, but I have the beginnings of a widget done. If you run a Lisp or Haskell blog, it would be valuable to include this widget. Help your Lisper and Haskeller buddies find jobs!

How to use the thing

Just drop the following HTML into your blog somewhere: <iframe border="0" frameborder="0" src="http://neverfriday.com/job-widget/jobs.php"></iframe>. That embeds a widget with a height of 240px, and a width of 120px. The default type of job widget is "verticalbanner", a nice slim and short widget.

Optionally, you can change the width and height by specifying a type, or the width and height. You can also change the number of jobs displayed by adjusting the n field of the query. The following are examples of URLs that do this:

Notes

The widget only responds to HTTP GET requests. There doesn't appear to be any good reason to use POST.

There are only two jobs in the database at the moment. I'm hesistant to add more entries because the database schema may be changed. I'll add a job submission form tonight or tomorrow and may open that up for others to use.

This is all written in PHP, and uses MySQL. Such a newb thing to do, but I didn't feel like messing around with Python or PostgreSQL. Also have to learn me some PHP and this is a good reason to do so.

The code may be GPL'ed or Affero GPL'ed or whatever license I find is cool after having 3 cups of coffee.

Suggestions, comments, ideas etc. are welcome!

Mid-August Lisp News

Meetups

Toronto

7 August 2008, A very small gathering of Lisp users at the LinuxCaffe. Abram showed the inner workings of the game Abuse which uses Lisp for almost everything, except the core (which is written in C, this is similar to how Emacs works). An interesting question asked was whether or not the Abuse Lisp dialect supported macros, it seemed that the custom "macros" were all coded in C and thus untouchable. Next, a crazy mod that turns the game into a game of Super Mario was shown.

The disadvantages and misuse of car, cdr, caaaaar, cadaddarr, etc. were also mentioned. The consensus is that once you're using cadr, caddr, what you really want to be doing is creating a structure or object. That way you can access things by a descriptive name. An example of why this is a good idea is given by xmls, an XML parser. It parses XML and turns it into a giant list, with the first element being the element tag name, the second element being a list of element attributes, and the rest of this list being child elements. This can be tedious to navigate through.

Libraries for Scheme were also mentioned. The drawbacks of the various dialects of Scheme are that the specification does not define even the basics of common ways of dealing with libraries. Because of this, when you switch Schemes, you have to re-discover libraries that do what you want. This is an old complaint of course.

Lisp images and program startup costs were discussed in relation to Perl, PHP and Smalltalk. Some Lisps have the ability to dump a memory image and reload that later on. This improves the startup time since libraries are already loaded and not re-loaded or re-compiled. I noted that there doesn't seem to be a culture of image-sharing in the Lisp community as there is in the Smalltalk community. One reason suggested for this is that some Lisps run on 64-bit architectures and others run on 32-bit, which means code needs to re-compiled anyway. Perl and PHP were said to have no way of image dumping and this is particularly problematic for PHP since it seems to rebuild things for each website request. (This may be incorrect or a non-problem)

Finally, I mentioned traits in Smalltalk. Traits are collections of methods that can be used by classes and overridden (or not). Eiffel seems to have something similar, as does Ruby with mixins. Here is the paper that explains the idea more fully[PDF].

comp.lang.lisp

Kenny Tilton, the man behind Cells and Theory Y Algebra, asked why the special variable *default-pathname-defaults* is named that way. Pascal Costanza comes up with an answer and asks his own question in return,

Do you guys also worry about important problems?

Blogs

Xach's Cool Charts

Xach made some cool charts inspired by Tufte and stream graphs. The first chart shows movie box office data, while the second shows the version control activity of CMUCL and SBCL.

The charts were made using Vecto, a simple vector drawing library for Common Lisp.

cl-cairo2 updates

This is a nice update for cl-cairo2 users. Now cl-cairo2 loads only OS-independent parts of the library, with the OS-dependent parts becoming parts of extension packages.

Lisp Quiz

Lisp Quiz is inspired by Ruby Quiz which was inspired by Perl Quiz of the week. Ruby Quiz and Perl Quiz were weekly programming challenges, and Lisp Quiz hopes to do the same for the Lisp community. The first quiz tackles Minesweeper, having you design an algorithm that wins the game.

Everything Else

LispForum

LispForum, launched on 27 June 2008, is another place for Lisp-related discussion. It is run by Dave Roberts, the blogger who is behind the Finding Lisp blog. They have added a new sub-forum for Lisp Quiz puzzles which are supposed to be similar to the Ruby Quiz puzzles.

What's interesting about LispForum is that it's new (almost 2 months old, only!) and it already has 296 members. There are already 443 posts about Common Lisp, though there don't appear to be many Scheme fans. So we have yet another forum to recommend to newbie Lisp programmers.

I overslept by a few hours but I decided to change the colour scheme. The stylesheet I uploaded last night was hideous, though good enough for testing. The new styles and page generation functions are up and I've switched the main page to PHP. The Friend of a Friend Creator is also partially up. I need to add more of the FOAF specification stuff of course, but there's a fancy new date picker (Thanks jQuery-UI!)

The design is very retro, very 70s I would say...at least in terms of the colours. The striped background reminds me of the swimshorts I bought that also have racing stripes. Obviously the design is solid because of this, heh.

Some details...

So I decided to cave in and learn me some PHP. I'm re-arranging the website to use PHP and improving the FOAFCreator. It's good for practicing my poor web design skills heh. I hope to have a better looking website up by tomorrow afternoon.

Today is ShoesFest and I am going to be trying to learn more about Ruby and Shoes but at the same time I will be hacking away at JavaScript and Java, improving Sandals.

That's the big surprise: Sandals. Sandals is going to be a clone of the Shoes toolkit except it will use a Java back-end named BeachHouse. The primary reason for this is because I need to practice my Java'ing, and the secondary reason is that I hope to eventually have JRuby and Jython using BeachHouse. So BeachHouse can be found in the beachhouse/ sub-directory of the Sandals source code package.

Unfortunately, Sandals uses Java's Swing components for some parts but I'm going to try and code up my own drawing methods for the tricky things that Shoes can do. We'll see how that goes later on today.

Happy Shoes hackin'

Links: