(archive 'newLISPer)

August 8, 2009

The Lambdalator: RIP

Filed under: newLISP — newlisper @ 14:06

This week I killed the Lambdalator. The Lambdalator was my experimental public online newLISP terminal that allowed you to access a newLISP interpreter running on my server using just a web browser.

It was an interesting experiment, and I made use of it on more than one occasion myself, while out on the road. (Not enough public computers run newLISP, it seems to me.) Recently, however, the Lambdalator was being visited primarily by just two groups of users: spammers, and a few Common Lisp speakers, with unsatisfactory results for all. Changes to newLISP (which is now at version 10, while the Lambdalator was written for version 9.3), and to my hosting service at NFS (who are going to charge more for dynamic sites) made me decide to kill the site. However, it may return in a future re-incarnation, as may its companion service, Jack the Glypher, which converted text to ASCII art.

I’ve kept the log files generated by each visitor to the site, which is how I know about the curious two groups that tried it out.

The spammers simply saw an input box and a submit button, and happily wasted their time copying their bizarre web links and trying to evaluate them as newLISP. What they didn’t realise was that only they could see the results of their efforts. This is the code that ran when the Evaluate button was clicked:

(if (CGI:get {evaluate})
    (run-evaluator (CGI:get {expression}) (base64-dec (CGI:get {tape}))))

This is the function that evaluated the text:

(define (run-evaluator x tape)
   (unless (empty? x)
        (push (string {<pre><span class="r">} 
             (escape-html (my-eval-string (trim x))) 
             { <span class="e">} 
        (set 'expression x)
     ; nothing to do
     (set 'expression {}))
   ; output
   (push tape output -1)
   (set 'output (string (0 2500 output) (if (> (length output) 2500) {...} {}))))

and the hidden field of the form has the following structure:

<input type="hidden" name="tape" value= (base64-enc output) "  />

where the encoded output from the evaluation is stored in the form. The effect is like a paper tape: the previous input text is sent back to the browser on the next evaluation. The invisible log file keeps a record on the server, but only the user sees what the result was. Pleasingly, only the spammer sees their own spam, and while they’re staring at their own spam they’re not spamming other people’s blogs.

The visits by Common Lisp speakers are also easy to spot in the logs. Typically they try to outsmart the interpreter, but don’t know enough newLISP to do so. Sometimes they can be seen struggling to balance their parentheses without an editor to help them. Typing a few expressions, usually using car and defun, was often all that they tried.

The Lambdalator will return soon. I’m having problems with my HTML POST parameters at the moment, and haven’t had enough time or knowledge to solve them!


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: