Results tagged “perl” from SweetFriday

Some Lisp News? Yes?

|

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.

A reddit user by the name of alanshutko stated what was necessary to make Scheme, Common Lisp, Haskell, and other non-mainstream languages more appealing to the average programmer.

Compare that with the types of simple programs we see in Perl and Python. "I have a bunch of files, and I want to rename them all according to some pattern." Common problem, easy solution. "I've got a log file full of email addresses, I need to strip them out from the log entries, remove duplicates, and add them to a database." Again, fairly simple, fairly small, really useful. When Haskell can compete on those types of problems, it'll be easier to induce people to learn it. (Same with CL, my fav language....)

So here is a Scheme program that does this. It is written to use MzScheme because that's the only Scheme I have installed in Windows at the moment. Thus, it takes advantage of PLaneT and the other libraries that come with MzScheme.

Hopefully this can convince others that Scheme is a good language for common tasks.

Find recent content on the main index or look in the archives to find all content.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by Movable Type 4.1