| beach | OK, I think I have made a decision to submit an application for my department to be a Google SoC mentor organization. |
| slyrus_ | how are the class projects going? |
| beach | slyrus_: they have coded for a week now, so it's a bit early to say. |
| rudi | good afternoon |
| vagif | Hello, question. |
| mvilleneuve | morning |
| vagif | I want a function like destructuring-bind but without lexical scope in other words (setf) but which operates not on pairs but on 2 lists, mapping them is there such a thing ? |
| Fare | what is the right library to use for some simple TCP client/server things? usocket? beach: will you run any of my project proposals? |
| Zhivago | vagif: how about using a loop? |
| vagif | ? |
| Zhivago | ah, I misread you hmm, sounds like you need to reinvent destructuring-bind |
| vagif | i want (setf (a b ) '(1 2 3)) exactly like destructuring-bind but without the scope no big deal, i can create a macro, i was just looking if it exists |
| Zhivago | not that I know of it might be possible to build upon destructuring-bind there is a list of control symbols for lambda lists |
| vagif | Hello, i actually made that macro to assign values to list of variables |
| lisppaste | vagif pasted "setf list of vars" at http://paste.lisp.org/display/37871 |
| antifuchs | slyrus: I'm using ploticus |
| redwyrm | vagif, you could shorten your code a little: (defmacro assign (vars vals) `(progn ,@(mapcar (lambda (x y) (list 'setf x y)) vars vals)))) |
| vagif | cool thx :) i'm a newbee in macros |
| redwyrm | heh, so am I |
| Zhivago | `(setf ,x ,y) might also be neater |
| vagif | Zhivago: can you give sample code ? how does that work ? |
| Zhivago | `(setf ,x ,y) is equivalent to (list 'setf x y), mostly it is a templating mechanism |
| vagif | oh i see but can you do backquote inside a backquote ? |
| redwyrm | yes |
| Zhivago | yes, but it can get a little tricky |
| redwyrm | (defmacro assign (vars vals) `(progn ,@(mapcar (lambda (x y) `(setf ,x ,y)) vars vals)))) |
| segv | redwyrm: you realize that won't work right? |
| redwyrm | no :) |