June 30, 2002

Strategic Insight

Reini Urban mentioned in comp.lang.lisp the following McKinsey Quarterly report: The Return of Artificial Intelligence (requires free registration; you can log in with the standard "cypherpunk" with password "cypherpunk").

I don't know if AI techniques are any more or less likely to succeed in business now than they were 20 years ago (McKinsey claims that it is more likely because of "the fact that the underlying Web-enabled infrastructure creates unprecedented scope for collecting massive amounts of information and for using it to automate business functions", which sounds reasonable for some domains, at least), but I do know a language that is great for "working with complex data in dynamic environments"...

Posted by jjwiseman at 04:58 PM | Comments (0)

June 28, 2002

Random Lemonodor stats

Most viewed entries:

1.Lisp Porn
2.Lisp Machine Video
3.Lisp DLLs in ACL
4.Living in Emacs
5.Norvig/Lisp/Python and Easy GUIs
6.CMUCL Threading
7.The New Arrival: 5 lbs 8 oz
8.Ideas for Arc
9.Hot Amateurs
10.Only Double A, Thinking Triple X
11.3D Development
12.connect-to-inet-socket

Some of those are popular due to Google searches by non-lisp programmers, as you might imagine (this site was at one point the #1 Google result for a search on "insect porn").

Some browser statistics:

39.5%IE
39.4%Mozilla + Netscape
6.5% Galeon
3.2%Opera
3.0%Konqueror
1.0%Omniweb
0.4%iCab
0.0%Chimera

The rest are search engine spiders, RSS aggregators, and worms.

Posted by jjwiseman at 11:15 AM | Comments (0)

June 27, 2002

!

!

Pasadena has a lot of killer bees. I see signs like this one (near the entrance to my parking garage at work) all the time. Last week a big swarm was removed from a palm tree in a quiet residential neighborhood, and a few months ago students were trapped in a high school while public health officials removed a swarm that had landed on campus.

I have a bee phobia. Which puts my social insect score at Ants: fascination, Bees: irrational fear. Normal bees freak me out with their determination--they often want me or my food, and they don't give up easily. It's not the pain of stinging that scares me, it is their alien single-mindedness along with their irascibility (it doesn't help that it's backed by the threat of a painful sting). I've been stung lots of times, and it's not that bad. I just don't like the way they act (pretty clearly makes it a phobia, eh?)

The thing is that there are not a lot of normal bees here. Africanized bees started taking over southern california in 1999, and now 60% of the bees in this area are africanized. Yes, most bees here are killer bees. And they take determination to a new level. If you run, they will chase you for up to several hundred yards. And you should not jump in water if chased, because they will wait for you to surface.

I saw on the Discovery Channel that Los Angeles county has a special vector control department to handle killer bees. They'll come out in their truck and wearing their bee suits and destroy a hive, or remove one by wrapping it in a plastic bag and freezing it until the bees are dead, after which an exact analysis of the hive can be done by measuring wing sizes (africanized bees have slightly smaller wings) or doing DNA analysis.

So anyway, if I ever stop posting for more than two weeks, just assume the bees got me.

Posted by jjwiseman at 12:23 AM | Comments (11)

June 26, 2002

Need... More... Porn!

Tired of all that anonymous, cold CRT lisp porn? Joey deVilla (happiest geek on earth, among other things) is the world's first lisp porn star.

real lisp porn

The funny thing is, this is based on actual perl porn (work-safe if your co-workers really know you).

perl porn

Posted by jjwiseman at 02:18 PM | Comments (0)

Pi Hack

Erann Gat's wizzy piece of code for computing digits of pi:

(defun compute-pi-decimal (n &aux (p 0) r)
  (dotimes (i n)
    (incf p (/ (- (/ 4 (+ 1 (* 8 i)))
                  (/ 2 (+ 4 (* 8 i)))
                  (/ 1 (+ 5 (* 8 i)))
                  (/ 1 (+ 6 (* 8 i))))
               (expt 16 i))))
  (dotimes (i n)
    (multiple-value-setq (r p) (truncate p 10))
    (format t "~X" r)
    (if (= (mod i 10) 1) (princ #\space))
    (setf p (* p 10))))

Using bignums and 1.5 GB seems a little luxurious in comparison to Wozniak's using all of 48K (including video RAM) on an Apple II (which didn't even have integer multiply or divide) to compute 116,000 digits of e, but it's kind of neat.

CL-USER(19): (time (compute-pi-decimal 300))
03 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944
5923078164 0628620899 8628034825 3421170679 8214808651 3282306647
0938446095 5058223172 5359408128 4811174502 8410270193 8521105559
6446229489 5493038196 4428810975 6659334461 2847564823 3786783165
2712019091 4564856692 3460348610 4543266482 1339360726 02491412
; cpu time (non-gc) 23,090 msec user, 180 msec system
; cpu time (gc)     2,680 msec user, 30 msec system
; cpu time (total)  25,770 msec user, 210 msec system
; real time  32,284 msec
; space allocation:
;  3,937 cons cells, 1,685,652,448 other bytes, 0 static bytes
Posted by jjwiseman at 11:11 AM | Comments (4)

June 25, 2002

Feral Robohackers

Matt Jones and Boing Boing link to a group of feral robodog hackers at Yale. I find this summary of Aibo software capabilities most interesting.

  • "An interested note is that AP_COLORLVL, part of an Aibo program, can be used to identify the distance to a known size object such as a ball."
  • "Most interesting note was that in the future, the program attachment 'AP_Rhythm_Horz' would be able to detect where a sound came from."

Aibohack has a short section on getting started with Sony's Open-R Aibo SDK (which doesn't seem to be particularly open), but it really is short, and short on detail too.

Posted by jjwiseman at 06:24 PM | Comments (0)

June 20, 2002

'Thinking' Robot In Escape Bid

From The Age:

Scientists running a pioneering experiment with "living robots" which think for themselves today said they were amazed to find one escaping from the centre where it "lives".

Uh huh.

[Professor Noel Sharkey] later found it had travelled down an access slope, through the front door of the centre and was eventually discovered at the main entrance to the car park when a visitor nearly flattened it with his car.

Sharkey said: "Since the experiment went live in March they have all learned a significant amount and are becoming more intelligent by the day but the fact that it had ability to navigate itself out of the building and along the concrete floor to the gates has surprised us all."

Like I'm not surprised by unexpected software behavior and witness to robot escapes every day.

I'm such a wet blanket.

Note that the Living Robots exhibit at which this happened was developed by Noel Sharkey, who is a judge on Robot Wars.

Posted by jjwiseman at 11:42 AM | Comments (0)

June 19, 2002

Recent Software Updates

Because VersionTracker doesn't care about lisp.

Deflate

2002-06-18
John Foderaro announced a new version of the open source Franz code for handling the "deflation" compression scheme (used by zip files and gzip), deflate. (Note that for your convenience and ease of understanding, the deflate module contains a single source file: inflate.cl.) This is a bug-fix release.

Defsystem

2002-06-13
Marco Antoniotti let the world know that defsystem 3.3i (see the "Latest File Releases" section) is out. I think this is mostly a bug-fix release for LispWorks users, but frankly the defsystem family tree makes my head hurt and since I don't use defsystem I figured I'd leave it up to you to figure out.

Oh, and now I see that 3.3i.1 (!) is out and available at the same location.

LISA

2002-06-06
David E. Young announced the "snapshot release" of LISA, a lisp-based production-rule system for creating intelligent software agents.

Posted by jjwiseman at 02:04 PM | Comments (0)

June 14, 2002

An Easy Way to Lisp on OS X

Use the clisp fink package.

 [server:~] wiseman% fink install clisp

You are using fink, right?

Posted by jjwiseman at 02:03 PM | Comments (0)

June 12, 2002

Lisp Conference

Wow! This is a surprise.

Franz and the ALU are sponsoring the International Lisp Conference 2002 in San Francisco this fall, chaired by Raymond de Lacaze.

The conference runs for 4 days at the end of October, and focuses on 4 areas:

It looks like all sorts of recognizable names will be speaking (Daniel Bobrow, Richard Gabriel, Peter Norvig, Roger Corman, John Mallery, Kent Pitman, Christian Queinnec, John L. White). I'm particularly interested in seeing the speaker from iRobot has to say about lisp in embedded systems.

$400 for 4 days (if you register early) doesn't seem bad, either. I'm there.

So, wow. Another lisp conference is actually going to happen. Now we just need to re-educate whoever is responsible for that appalling conference web site.

Posted by jjwiseman at 02:01 PM | Comments (2)

Lisp Server Pages

Let's get a little codey.

A long time ago, the company I worked for went from doing research for NASA on natural language interfaces for complex systems to making web sites for truckers. I ended up doing a lot of web programming, some with Java Server Pages (JSP). More recently, at i/net, I experimented with using JSP-style techniques with Lisp--Lisp Server Pages.

Lots of people write their own version of LSP. It's kind of fun to implement, and a basic version is like a page of code so it only takes an hour or so. I just figured I'd save you a little time up front.

The code has been generously made available by i/net under the MIT license. You can download it as a tarball. It's generic lisp and should run in any lisp that AllegroServe supports. (I get annoyed when I have to go through the whole process of downloading and untarring something before I can look at the source and get an idea of how good or bad the code is. So here's the source, straight up.)

You can see it in action in this short example: example (source), which is backed by OpenMCL and Portable AllegroServe. I'm sure that 500 years after the fall of man, when humans are reduced to huddling for warmth inside the ruins of Sony Style stores while staying alert for the quiet skittering sounds that mean they've been discovered by a pack of intelligent (and angry) GM guinea pigs in their sharp-legged, flame-throwing arachnid exoskeletons, that these example LSP pages will continue handling requests from whatever hosts remain forgotten on the internet, not caring whether the human race wins the long battle to reclaim their place as dominant species, power LEDs slowly blinking out one by one as capacitors fail (seems like it's always the capacitors) and the once profound symbols of modern technology go silent.

Or I'll restart the machine and forget to start OpenMCL too.

Anyway, the experiment more or less failed. I began to suspect the reasons behind JSP's ugly appearance had less to do with Java than with the crazy idea of mushing two unrelated languages and syntaxes together.

So here's some documentation. It's quite a lot for such a small amount of code, but indulge me.

Introduction

Java Server Pages are a way to make web pages that are dynamic, by embedding Java code in HTML. Similarly, Lisp Server Pages allow you to make dynamic web pages that contain Lisp code.

To publish an LSP page, call the publish-lsp function:

publish-lsp (&key path filespec server) [function]
Publishes the LSP file filespec at the URL prefix path, on server defaults to the default AllegroServe server, *wserver*). Example: (publish-lsp :path "/temp.html" :file "/Users/wiseman/src/temperature.lsp")

An LSP file looks just like an HTML file, except for two new tags: <% ... %> and <%= ... %>.

<% ... %> is a scriptlet tag (to use the JSP terminology), and wraps lisp code. For example, <% (dotimes (i 10) (beep)) %>. The code inside the tag is executed each time the page is requested.

<%= ... %> is an expression tag, and the effect of this tag is to evaluate the contents as if they were wrapped with the Franz net.html.generator:html macro. For example,

<%= (:h1 "header") "hi" (:princ-safe (generate-footer)) %>

is equivalent to

(net.html.generator:html
  (:h1 "header")
  "hi"
  (:princ-safe (generate-footer)))

which will output something like the following HTML:

<h1>header</h1>hi<hr>2002-06-09

During execution of LSP code, the following two variables will be bound:

request
The HTTP request object containing all the information about the request.
entity
The information passed to the publish-lsp function.

(See the AllegroServe documentation for more information on these objects.)

Tips

Expressions can be used inside HTML attributes, e.g.,

<img src="<%= (img-title request) %>">

Scriptlets do not need to be complete lisp forms, as long as the page as a whole is syntactically valid, e.g.,

<% (dotimes (i 10) %>
  <img src="mr-yuck.jpg">
<% ) %>

Implementation Notes and Caveats

LSP pages are converted to strings containing lisp code, which are then compiled and cached. If the source file containing the lsp code is modified, the next time a request is made for that page the code will be recompiled and recached.

In my first attempt to do this, I tried to construct forms instead of strings. That just made it trickier to separate forms across <% ... %> tags (see the dotimes example above). Just because it's bad that other languages are often limited to manipulating code as strings doesn't mean there aren't times where it's appropriate.

There's nothing like JSP's directives or declarations.

LSP Requires Franz' AllegroServe (http://allegroserve.sourceforge.net/) or Portable AllegroServe (http://portableaserve.sourceforge.net/).

See http://sourceforge.net/projects/lsp for a more serious attempt at doing this right, by Sunil Mishra and Tim Bradshaw.

Bugs

Would have been a lot cooler in 1997.

Posted by jjwiseman at 12:03 AM | Comments (7)

June 11, 2002

Portable AllegroServe for MCL

Note that's MCL, not OpenMCL, which has worked with Portable AllegroServe for some time.

John DeSoi says

We finally have a release version of Portable AllegroServe that works with MCL and OpenMCL (also LispWorks and CMUCL). Portable AllegroServe is a HTTP server based on AllegroServe from Franz (LGPL license).

http://sourceforge.net/projects/portableaserve/

Before downloading and expanding the archive for use with MCL, be sure that your Stuffit Expander preference is set to convert text files (Cross Platform option). Also, you will want to have file mappings for .cl and .lisp in your Internet preferences so that MCL becomes the creator of the source files.

Chunking and SSL are not yet supported with MCL or OpenMCL. I could always use more help if anyone is interested :).

Posted by jjwiseman at 08:45 PM | Comments (1)

MCL Contribs from Terje

Terje Norderhaug has released two new versions of some MCL add-ons.

The Fred Package Indicator modifies Fred editors and the listener so that they display the buffer/listener package in a "placard". You can click on the placard and select a new package, as well.

Fred Package Indicator Screenshot #1 Fred Package Indicator Screenshot #2

Appearance-MCL upgrades the MCL dialog items to have an appearance consistent with MacOS 8 and 9, using the Appearance Manager. (The effect is pretty subtle, and it made some built-in dialogs less usable when I tried it.)

Both packages are available from the In Progress site, along with about a half-dozen others.

Posted by jjwiseman at 07:54 PM | Comments (0)

June 06, 2002

Lisp IRC

One Saturday night Jochen Schmidt wrote an IRC elizabot just for fun, using LispWorks' CLIM support.

Liz screenshot

Pierre Mai has the start of a lisp IRC client, too, SillyIRC, in case you're just in to IRC.

Posted by jjwiseman at 12:03 PM | Comments (0)

Lisp-Backed Websites, the Old School Way

I was surprised to learn from Tim Converse that this site and this site were lisp-generated. But of course Tim was one of those nice civilized AI people before he and troutgirl became PHP fans.

(Those are some pretty uninformative links up there, eh? Did you know that google gives a lot of weight to the text of links that points to a site? So take a guess as to what the #1 google result is for a search on "this site". No, it's not that, but you're close.)

(Short Tim anecdote: Me: "Hey, are you the Tim Converse that Clifford Pickover mentions in this book as having invented infinite chess?" Tim: "All I did was post the rules to a mailing list, so I guess I am.")

Posted by jjwiseman at 09:09 AM | Comments (2)

June 03, 2002

ILISP 5.12.0

Marco Antoniotti has announced the release of version 5.12.0 of ILISP.

Browsing the changelog, it seems like there have been a million changes since the last release (which was over a year ago). All I know is that when I tried it a few days ago, C-up was working in a way that pleased me greatly. Way to go, ilisp!

Posted by jjwiseman at 03:40 PM | Comments (0)

Custom CLHS Formatting

Juri Pakaste has instructions on how to automatically reformat the CLHS html pages, removing those rather ugly images and generally making it look cleaner.

Once you've followed his instructions you can change the look all you want just by editing the stylesheet.

(The CLHS tarball expands into a million files that have write permissions turned off; Until you do a chmod -R u+w or something, the whole tweaking process will fail silently. Juri helped me figure this out.)

Posted by jjwiseman at 10:47 AM | Comments (0)