Log in

No account? Create an account

Try ParenScript

Nick Fitzgerald has set up a site where you can mess around with ParenScript in your browser. Here's his announcement.

(Thanks, arvid at lisp reddit!)




Thanks for the coverage! If I knew that people would reddit it, and you would post a link to it on your blog, I would have tried to polish it a little more before announcing it to the list :)

I have no idea how well it will scale, so hopefully it doesn't come crashing down.

As I noted in the email to parenscript-devel, there are 2 current shortcomings:

1. No macros. Couldn't find a way to sanbox lisp, so I don't want to let arbitrary macro expansion code run on my server.

2. Function declarations are being evaluated as Named Function Expressions. This is totally my fault, and I plan on fixing this tonight, when I get off work.

For example:

(defun square (x) (return (* x x)))

is actually evaluated in your browser as

    window.__tryps_return = function square (x) {
        return x * x;

ehich won't create global bindings.

The easy work around is to explicitly attach functions to the global window object,

    (setf (@ window square) (lambda (x)
                              (return (* x x))))

Thanks for the plug!


Re: Whoah!

No cool deed goes unpunished.

Site Temporarily Down

So Squirrel_of_doom from reddit found a pretty serious security bug, which I don't have the resources to fix until I get home. Till then I have had to take the site down. I will get it back up later tonight.