|rr--||which order of functions in a file is more popular, low- to high-level or vice-versa|
|tmh||Okay, I've just read `220.127.116.11 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?|
|thermoplyae||I believe push is a setf; you can't setf to an arbitrary list|
|tmh||thermoplyae: that makes sense, but what about pushnew?|
|thermoplyae||On the other hand, something like (setf *list* (list 3 5 7)) (push 1 *list*) should work|
no idea about pushnew; never used it
|pkhuong||tmh: same for pushnew|
|thermoplyae||There you go :)|
|tmh||Well, this is frustrating because the code looks so much better when I use push.|
|pkhuong||tmh: you push to a place. It wouldn't make much sense otherwise, since you can't prepend to a *list*.|
|tmh||pkhuong: I'm thinking of something that could be described as an `anonymous list'. Anyway, it's no big deal.|
|thermoplyae||Maybe you can work with cons? (cons new-element old-list)|
|pkhuong||tmh: might want to wrap your lists in objects and use the objects's slots as places.|
|adeht||tmh: you probably want adjoin|
|tmh||adeht: 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.
|Zhivago||loop is mainly useful for small idioms, like (loop for x in '(1 2 3) collect x)|
|levi_home||If 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
|nyef||Not in the sense you mean.|
|nyef||There 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|
|tmh||Hmm, I don't seem to be getting that telnet connection to work.|
It used to.
|beach||tmh: 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.|
|tmh||beach: 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|
Not that that ever happens to me.
|rr--||that lands in the debugger in another window, but the thing keeps printing in the REPL|
|tmh||Can'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|
|tmh||I don't know how to help, then.|
Perhaps you can sever your connection with lisp and start a new one. '
|rr--||sigh, last resort|