freenode/lisp - IRC Chatlog
Search
4:49:41
mfiano
I just discovered that you can use a lambda form in the accessor-name position of WITH-ACCESSORS. Is this undefined behavior? (see Exceptional Situations)
4:59:19
pjb
mfiano: function name n. 1. (in an environment) A symbol or a list (setf symbol) that is the name of a function in that environment. 2. A symbol or a list (setf symbol).
4:59:44
pjb
mfiano: however, I have argued that lambda-forms were function names for those anonymous functions.
5:00:39
pjb
mfiano: there's however a problem with that: the lexical environment in which the expansion is produced, which may differ from one occurence to the other of the variable.
5:01:20
pjb
mfiano: try: (let ((x 1)) (with-accessors ((xx (lambda (foo) (declare (ignore foo)) x))) (list xx (let ((x 42)) xx))))
5:03:23
mfiano
This works, for example on SBCL: (with-accessors ((parent-transform (lambda (x) (fl:actor-component-by-type x 'fl.comp:transform)))) instance ...)
5:03:39
pjb
Sorry, try this: (let ((x 1)) (with-accessors ((xx (lambda (foo) (declare (ignore foo)) x))) (quote foo) (list xx (let ((x 42)) xx))))
5:04:38
pjb
Since it doesn't produce (1 1), you can see that you definitely should not, and it's bad that those implementations allow it.
5:12:14
mfiano
pjb: Curious how can you argue that lambda forms can by "function names" given that glossary definition?
5:13:21
pjb
( function-name args… ) === ( (lambda (parms…) …) args…) therefore function-name === (lambda (parms…) …) and args… === args…
6:49:25
afidegnum
ok, i m trying to build an interface which will have a drag and drop html builder, the html elements will be at the left side, droped into the web browser and render an html page
6:50:44
no-defun-allowed
though JSCL doesn't really have good FFI, especially when DOM objects are involved for some reason
13:24:50
ck_
Xach: watching the repositories and contacting people with sparse attendance schedule when they are active. It wasn't really meant seriously.
13:50:42
Bike
that interface probably isn't intended foor your use. sb-sys is an internal sbcl package.
13:51:55
scymtym
seok: you should work with the socket from which the stream has been created using the socket interface: http://www.sbcl.org/manual/#General-Sockets