#lisp - Thu 15 Mar 2007 between 04:51 and 05:35

croddoes anybody know how to use macrolet in arnesi:with-call/cc?
(arnesi:with-call/cc (macrolet ((m (x)))))
results in the lisp whinging about not being able to serialise functions into fasl form
is there any other mature cps library available?
frsError There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION SB-BSD-SOCKETS:SOCKET-CLOSE (1)> when called with arguments (#<SB-SYS:FD-STREAM for "a constant string" {B116871}>). [1-modlisp-worker]
when trying to access a page using mod_lisp
any ideas?
is socket-close supposed to work on a stream?
rudifrx: what happens when you use close instead of socket-close?
frshrm... well _I_ use neither socket-close or close, I didn't write that code, it's modlisp...
antifuchsafaik, there's a finalizer on socket streams that should ensure your socket gets closed when the stream gets GCed
but I'm not sure if relying on that's a good idea.
crodyou have to enable the finaliser when you create the socket
rudiwas that a question? if so, the answer is "no" iirc
crodnot it wasn't a question
see sb-sys:make-fd-stream, the optional keyword argument auto-close must be set to non-nil for the fd-stream to be closed with a finaliser
make-socket-stream must have the auto-close keyword argument explicitly for the finaliser to be set
rudiah, ok, thanks for the clarification
crodi am very new to lisp and lamely trying to find something that will do continuation passing style without having to write it all myself
can you help?
antifuchscrod: arnesi is your best bet
crod: your problem with macrolet sounds awfully familiar
arnesi uses a code walker to do the cps rewrite, right?
the walker is separate
antifuchsportable code walkers have problems with macrolet because they affect the lexical environment, but the code walker can't follow (e.g. there's no portable way to register that lexical macro in the code walker's environment, so macroexpand will not expand it)
crodi see
antifuchsthe solution is to not use macrolet inside with-call/cc, I'm afraid
(same for iterate)
crodwhy can't they just write a slightly extended macroexpand that would go through all the macrolets
antifuchsoh, and forget about symbol-macrolet, it won't work either (:
i am actually struggling to understand
antifuchscrod: because that soon becomes an exercise in re-writing half of common lisp /-:
crodi thought that was the exercise they were performing
antifuchsI tried /-:
crodthat is the point of it, right?
anyway, macrolet works fine

Page: 2 9 16 23 30 37 44