libera/#commonlisp - IRC Chatlog
Search
11:01:01
lisp123_
pjb: thanks <3 Is it on QuickLisp? Otherwise do I need to download the whole / lisp / directory from GitHub and then load which file (stepper.lisp?)
11:11:16
pjb
lisp123_: yes; the recommended way is: cd ~/quicklisp/local-projets ; git clone https://github.com/informatimago/lisp.git com-informatimago
11:13:16
pjb
There are some limitations, so sometimes you need to add a (declare (stepper disable)) in some deep functions… But for normal functions, it's nice.
11:24:59
_death
will wscl also incorporate proposals to fix the issues in https://www.cliki.net/ANSI%20Clarifications%20and%20Errata
11:26:34
lisp123
pjb: Can I check how to use it? I have tried following the comp.lang.lisp notes (defpackage .. use cl-stepper ...) (in-package ..) but I get some errors down the track
11:26:35
scymtym
_death: Bike turned some of those into WSCL issue, so yes. but not all are suitable
11:27:45
scymtym
see https://github.com/s-expressionists/wscl/commit/a89b79264dd5b4bbd9767826607deec2b552f40d and the following commits
12:45:50
pjb
lisp123: since you change the package, you have to recompile all your sources in that package.
16:32:17
lisp123
pjb: cl-stepper works well :) Ran it on my most complicated function and no issues. Now just go to play around with it.
16:33:17
lisp123
will have to figure out an appropriate set of print-objects to make the output more meaningful
17:33:12
pjb
lisp123: indeed. print-object is a debugging tool :-) for user output or file serialization, it's better to define other generic functions.
19:50:00
dieggsy
Bike: if maphash accumulated results of the mapped function into a list like mapcar
19:52:01
Bike
There is no built in version of that. You could do (let (res) (maphash (lambda (k v) (push (funcall function k v) res)) hash-table) (nreverse res)) or (loop for k being each hash-key of table using (hash-value v) collect (funcall function k v))
19:52:40
Bike
Since hash tables aren't ordered and lists are it's a little bit of a mismatch I suppose
19:54:42
dieggsy
Bike: neat, thank you! that should work. i didn't know how to loop over a hash table like that, nifty.
19:55:34
Bike
which is probably good for less organized iteration, but i don't think i've ever used it myself