#lisp - Fri 27 Apr 2007 between 01:10 and 03:26

NY Lost Funds



rr--which order of functions in a file is more popular, low- to high-level or vice-versa
tmhOkay, I've just read `5.1.1.1 Evaluation of Subforms to Places' of the hyperspec and I still don't understand why neither (push 1 (list 3 5 7)) nor (pushnew 1 (list 3 5 7)) are correct. Can someone explain this?
thermoplyaeI believe push is a setf; you can't setf to an arbitrary list
tmhthermoplyae: that makes sense, but what about pushnew?
thermoplyaeOn the other hand, something like (setf *list* (list 3 5 7)) (push 1 *list*) should work
no idea about pushnew; never used it
pkhuongtmh: same for pushnew
thermoplyaeThere you go :)
tmhWell, this is frustrating because the code looks so much better when I use push.
pkhuongtmh: you push to a place. It wouldn't make much sense otherwise, since you can't prepend to a *list*.
tmhpkhuong: I'm thinking of something that could be described as an `anonymous list'. Anyway, it's no big deal.
thermoplyaeMaybe you can work with cons? (cons new-element old-list)
pkhuongtmh: might want to wrap your lists in objects and use the objects's slots as places.
tmhthermoplyae: yep
adehttmh: you probably want adjoin
tmhadeht: yeah, that is definitely a more robust choice for my application.
I haven't learned the loop macro because I wan't to focus on learning to program in a `lispy' style. Now, I find that I'm about to slap together a while macro and wonder if perhaps it might be a good time to learn loop. I use do loops in most of my code, perhaps I should switch to loop.
Recommendations?
Zhivagoloop is mainly useful for small idioms, like (loop for x in '(1 2 3) collect x)
levi_homeIf you want to learn to program in a Common Lispy style, learn loop
derek_Is there any bot here that would execute simple lisp code?
and show the output here
nyefNot in the sense you mean.
tmhderek_: telnet://prompt.franz.com
nyefThere are a few options if you don't want to just fire up a CL implementation on your local system.
derek_on my local system I have C-Lisp set up
tmhHmm, I don't seem to be getting that telnet connection to work.
It used to.
beachtmh: I find loop very useful because it captures many common idioms. It has some limitations though, for instance that loop keywords can't be inside nested expressions.
tmhbeach: thanks, it seems that do and loop are not mutually exclusive in practice like I was thinking.
rr--if you accidentally evaluate a form in the slime REPL that prints a bazillion lines, is there any hope of aborting/interrupting it, short of killing emacs
tmhC-c C-c
Not that that ever happens to me.
rr--that lands in the debugger in another window, but the thing keeps printing in the REPL
tmhCan't you abort from the debugger at that point?
Then use 'C-c C-o' to remove the output or 'C-C C-t' to clear the entire buffer.
rr--yes, you can return to 'top level', but the thing keeps spewing output int he REPL
tmhI don't know how to help, then.
Perhaps you can sever your connection with lisp and start a new one. '
rr--sigh, last resort

Page: 2 9 16 23 

IrcArchive

NY Lost Funds