#lisp - Sat 21 Apr 2007 between 16:38 and 16:55

NY Lost Funds



nyefvy: (loop for n from 1 to (length list) collect (subseq ...)) or so.
vyCin: (apply #'values (loop for item across my-array collect item))
nyef: Hehe :D I asked it to avoid from using subseq. Anyway, thanks!
nyefOkay, see if copy-list has a length option for truncation...
Cinit's just instead of doing: (let ((nickname (aref components 0)) (user (aref components 1)) ;; etc.. (there are three more). easier to just to say (array-value-bind (nickname user) components <code>)
XachCin: go fer it
Cinwoots
_3bvy: (loop for a on (cdr list) collect (ldiff list a)) avoids subseq
lisppastepuchacz pasted "recompilation changes behaviour" at http://paste.lisp.org/display/40078
vy:-)
_3boops, guess you have to add the full list by hand at the end though
vyI see.
puchaczI am not sure whether it is the minimal example, but it is much shorter than my original program
_3bpuchacz: i'm guessing the problem is that my-function and my-parameter aren't special when you define the function
puchaczlet me try
nyefYeah, that's it exactly. The defparameters declare my-function and my-parameter as special, but call-my-function is compiled the first time as if they were lexical.
And, let's be honest, you got some sort of note about the APPLY, because it's referring to an undeclared free variable.
puchaczso, a compiler warning like undefined variable does not change it automatically to dynamic one, does it?
yup, now (call-my-function 3) returns 3 without recompilation
thanks, guys :-)
nyefNo, it automatically treats it as a special... but the binding of my-parameter isn't a free variable reference, so it became a lexical binding.
puchaczI declared (defparameter ....) twice now and it works.
lisppastepuchacz annotated #40078 with "now it works without recompilation" at http://paste.lisp.org/display/40078#1
puchaczis it absolutely ok now or it just works by chance?
nyefWhy twice?
puchaczbecause it simulates my original two-files problem.
nyef... And WTF is up with return-arg?
puchaczcome on, it is a simplification of my original problem ;-)
nyefOkay, okay...
puchaczbut: is it a proper code now?
nyefBut here you have hte obvious ordering of return-arg, my-parameter, my-function, and call-my-function.
Thus avoiding having to defparameter each variable twice.
puchaczimagine it is in two files an in my real problem there are recursive dependencies, as I mentioned an hour or so before...
nyefMmm... With a more complicated scenario you have several options.
puchaczgo on...
nyefLakoff goes into deadly boring detail about them in the context of C++ projects.
_3bpuchacz: you should name special variables like *variable-name* instead of variable-name (doesn't change behavior, but helps avoid bugs, and is more consistent with other lisp code)
nyefBut basically it amounts to eliminating the recursive depndencies, or promoting the recursive bits to a single compilation unit.
puchacznyef: Lakoff: what book do you mean?
_3b: oki

Page: 5 12 

IrcArchive

NY Lost Funds