I started a Javascript + HTML application some time back. I decided that I wanted to get some Lisp on. So, it was time to pull out Hunchentoot, CL-WHO, and Parenscript.

It’s been awkward slogging so far. I still don’t have a good user-model of when exactly I need to wrap something in a (cl-who:str ...) or when Parenscript will expand my macro rather than convert it into a function call or how I managed to get the cl-who:*attribute-quote-char* to finally stick for a few REPLs.

The other half of the awkwardness is that I started writing the application in idiomatic javascript with prototype-based objects.

function MyClass ( ) {

this . myfirst = undefined ;

this . myarray = [ ] ;

}



MyClass. prototype . mymethod = function ( arg1 , arg2 ) {

this . myfirst = arg1 ;

this . myarray . push ( arg2 ) ;

} ;

This makes for some awkward javascript when converted directly into Parenscript because:

The method mymethod ( ) will try to return the result of Array . push ( ) (which, technically, is fine, but not really the intent of the method).

will try to return the result of (which, technically, is fine, but not really the intent of the method). Almost every statement on the Lisp side ends up wrapping just about everything in ( parenscript : chain ... ) . ( Edit: Of course, I discovered right after posting this that the dot is left untouched in the Parenscript symbol conversion, so I can do ( this . myarray . push arg2 ) instead of ( parenscript : chain this my array ( push arg2 ) ) . I’m certainly pleased with the brevity, but it pegs my something’s fishy here, Batman meter.)

. ( Of course, I discovered right after posting this that the dot is left untouched in the Parenscript symbol conversion, so I can do instead of . I’m certainly pleased with the brevity, but it pegs my meter.) I have an aversion to using any package other than COMMON-LISP , so everything is way clunkier than all of the tutorials and examples online.