libera/commonlisp - IRC Chatlog
Search
8:44:16
pjb
(let ((form (read-from-string "(defun foo (x) (if (minusp x) (- x) x))"))) (let ((*package* (find-package "KEYWORD"))) (print form))) #|
8:44:16
pjb
(common-lisp:defun common-lisp-user::foo (common-lisp-user::x) (common-lisp:if (common-lisp:minusp common-lisp-user::x) (common-lisp-user::- common-lisp-user::x) common-lisp-user::x)) --> (defun foo (x) (if (minusp x) (- x) x)) |#
8:45:07
pjb
(let ((form (read-from-string "(foo if :keyword)"))) (let ((*package* (find-package "KEYWORD"))) (print form))) #|
8:45:28
pjb
you don't get a keyword: prefix, but keywords are still printed as :keyword so it's clear.
8:47:59
ns12
I see, out of the three standardized packages, only the keyword package is suitable causing the printing of prefixes. http://www.lispworks.com/documentation/lw50/CLHS/Body/11_ab.htm
14:56:41
phoe
Which part of the specification mentions that (MULTIPLE-VALUE-CALL (LAMBDA (ONE TWO) (LIST ONE TWO)) (VALUES 1 2 3)) should be an error?
15:12:23
ns12
Is it valid to add a particular keyword to *features* more than once? e.g. (push :foo *features*) (push :foo *features*)
15:17:04
ns12
Is it conventional to prefix custom feature symbols with the name of the library that adds the feature symbol to *features*?
15:47:41
_73
The symbol that denotes the condition type is internal, so I get an undefined symbol error.
15:48:49
beach
Symbols can not be undefined. If the symbol is internal, you need to use a double package marker to refer to it. That's not great with respect to modularity, but that's what you need to do.
15:49:14
pjb
You don't even have to use the right symbol in the handling form, if you know a superclass of those conditions that is named in another package!
15:50:03
pjb
(define-condition foo::condi () ()) (define-condition bar::error (foo::condi) ()) (handler-case (will-signal-bar-error) (foo::condi (err) (handle-bar-error-here err)))
15:50:12
_death
you can also consider whether the name should actually be external and if so export it and possibly submit a patch
15:53:29
phoe
maybe the condition itself is something like si::simple-reader-error and you are actually supposed to handle cl:reader-error instead
15:53:56
phoe
or maybe somebody forgot to export the condition name/accessors if it's some publicly available library, which would warrant a bugticket
15:55:23
phoe
in particular, package LEXER should export lex-error along with lex-error-{reason,line,source}
15:57:02
phoe
for whatever reason people tend to forget that conditions and their accessors are also a part of a library's API
17:05:15
huckleberry
Are bit-vectors and bit-xxx ops worth using over their logxxx counterparts if I'm planning to convert the result into an integer? I've got an algorithm I can make far simpler with a vector but it's invoked so often I have efficiency concerns
17:11:32
phoe
unless your bit fields are going to be longer than a machine word, at which point it might be useful to have these rather than bignums
18:27:07
gamaliel
Hi, common lisp newbie here. Is it possible to do (ql:uninstall) on a system plus its dependencies? I'm kind of confused by the information I've been looking online.
18:28:07
gamaliel
@Xach: I was testing out a system that turned out not to be the one I needed. So I want to purge the system from it, plus any systems it may have installed.
18:30:10
Xach
gamaliel: there isn't a short way to do it, sorry. possibly the easiest thing is to delete the "installed", "software", and "archives" directories in ~/quicklisp/dists/quicklisp/ - this will clear out everything.
18:31:10
White_Flame
I presume QL doesn't track which systems have been explicitly vs dependently downloaded
18:32:08
_death
a cheap way that still offloads some management to the user could be to have a quicklisp.log that contains "installed foo" entries
18:33:11
gamaliel
I think I found something that could help: ql-dist:dependency-tree. I checked on it and it seems to provide *all* dependencies. I guess it's a matter of choosing the ones to uninstall.
18:34:15
White_Flame
and if you uninstall too much, your normal QL dependencies should reload what's needed anyway
18:34:48
White_Flame
should download the exact same version as you had before, unless you upgraded the dist