#lisp - Thu 8 Mar 2007 between 02:54 and 04:18

NY Lost Funds



beachOK, 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?
beachslyrus_: they have coded for a week now, so it's a bit early to say.
rudigood afternoon
vagifHello, question.
mvilleneuvemorning
vagifI 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 ?
Farewhat is the right library to use for some simple TCP client/server things?
usocket?
beach: will you run any of my project proposals?
Zhivagovagif: how about using a loop?
vagif?
Zhivagoah, I misread you
hmm, sounds like you need to reinvent destructuring-bind
vagifi 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
Zhivagonot that I know of
it might be possible to build upon destructuring-bind
there is a list of control symbols for lambda lists
vagifHello, i actually made that macro to assign values to list of variables
lisppastevagif pasted "setf list of vars" at http://paste.lisp.org/display/37871
antifuchsslyrus: I'm using ploticus
redwyrmvagif, you could shorten your code a little: (defmacro assign (vars vals) `(progn ,@(mapcar (lambda (x y) (list 'setf x y)) vars vals))))
vagifcool thx :) i'm a newbee in macros
redwyrmheh, so am I
Zhivago`(setf ,x ,y) might also be neater
vagifZhivago: 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
vagifoh i see
but can you do backquote inside a backquote ?
redwyrmyes
Zhivagoyes, but it can get a little tricky
redwyrm(defmacro assign (vars vals) `(progn ,@(mapcar (lambda (x y) `(setf ,x ,y)) vars vals))))
segvredwyrm: you realize that won't work right?
redwyrmno :)

Page: 2 9 16 23 30 37 

IrcArchive

NY Lost Funds