freenode/#lisp - IRC Chatlog
Search
3:09:58
fiddlerwoaroof
You could also do something like (member :darwin *features*) if you need to do something programatically, but you should probably make sure something like trivial-features has been loaded to normalize the features list
3:14:15
jmercouris
I think it would be nice to be able to load the system without any graphical dependencies
3:15:41
Zhivago
I think it is always nice to delegate decisions like that to the user rather than to try to detect.
4:29:26
jasom
minion: memo for jmercouris the best way to use asdf and features is to use defsystem-depends-on to require any packages that might set features you need (e.g. trivial-features) and then if-feature inside your defsystem
4:29:35
jasom
minion: memo for jmercouris: the best way to use asdf and features is to use defsystem-depends-on to require any packages that might set features you need (e.g. trivial-features) and then if-feature inside your defsystem
4:37:54
asarch
When you do: (ql:quickload "quicklisp-slime-helper") and QuickLisp is doing "[package retrospectiff2]..........................", is it compiling?
9:05:07
loke
Oh here you are... Being all logcal and reasonable again. How are the rest of us going to be able to look smart? :-)
9:08:40
beach
dmiles: More to the point, if you assign to that slot in one class, it would not change in the other.
9:14:04
dmiles
well you mean in the case the subclasses allocation (on its prototype) is differnt than the superclasses's allocation?
9:14:45
beach
No, when they are the same. There will be one prototype for each class, so there would be two places to store the shared slot.
11:36:28
veckon
Do you know if there are any manuals for the 3D design/rendering software the Symbolics Graphics Divison created?
11:54:27
Cymew
Probably. Were they included in the Genera distriubution? If not, you probably need to get them from the same source as the software.
11:54:52
veckon
I don't think they were included in the Genera distribution, actually, but I am not sure
12:09:17
dmiles
ty for suggerstions .. i am making it all the way thru https://github.com/TeamSPoon/wam_common_lisp/blob/master/t/sanity-test-1.lisp#L158
12:44:25
phoe
I have a string like ":FOO :BAR :BAZ :QUUX". Is there a function that will read it as a list?
12:44:54
phoe
Like, I want something better than to define my own function that does (READ-FROM-STRING (CONCATENATE 'STRING "(" STRING ")")).
12:53:14
pfdietz
Can also use the second return value of READ-FROM-STRING, which is the position of the first character not read. Also, the :START keyword parameter of READ-FROM-STRING.
12:55:11
pfdietz
You would need to read from S, with eof-error-p false, and a distinct eof-value you'd check for to terminate the loop.
12:56:17
phoe
13:44 < phoe> Like, I want something better than to define my own function that does (READ-FROM-STRING (CONCATENATE 'STRING "(" STRING ")")).
12:58:31
Zhivago
(with-input-from-string (s ":foo :bar") (loop for x = (read s nil) until (null x) collect x)) ; like this, surely?
12:59:44
pfdietz
(read (apply #'make-concatenated-stream (mapcar #'make-string-input-stream (list "(" string ")"))))
13:03:09
Zhivago
(with-input-from-string (s ":foo :bar") (loop for x = (read s nil s) until (eql x s) collect x))
13:04:27
oleo
* (with-input-from-string (s ":FOO :BAR :BAZ :QUUX") (loop repeat 4 collect (read s)))
13:09:46
antoszka
how about just catching the END-OF-FILE condition and not specifying the number of repetitions?
13:09:54
oleo
you can use two loops one for counting how many reads it does that will determine the length of the string
13:11:36
Zhivago
antoszka: That is what (with-input-from-string (s ":foo :bar") (loop for x = (read s nil s) until (eql x s) collect x)) does.
13:31:28
oleo
(with-input-from-string (s ":FOO :BAR :BAZ :QUUX") (loop as x = (read s nil s) while (not (eql x s)) collect x))
14:12:50
phoe
I have been committing a lot of sins related to comparing symbol names of symbols from different packages.
14:21:20
dmiles
matching "(member 1 '(1 2 3) :test #'=)" to (defun member (item list &key test test-not key) .. )
14:25:30
phoe
Then you will want to match only *the* symbol :TEST and not any other symbol like FOO:TEST.
14:26:23
dmiles
whnen i am returning the error message i would like to let the user know that they should have used a keyword
14:28:34
phoe
2) when the user uses 'TEST which is not a keyword but is STRING= to a valid keyword - you want to inform the user that there is a keyword available that perhaps should have been used.
14:29:00
phoe
3) when the user uses a thing like 'KJAFKJHF that is not EQ or STRING= to anything - you just want to err out.
14:35:47
pjb
(defun foo (&key test ((test #:bad-test) nil bad-test-p)) (when bad-test-p (error "You should have used :test not 'test")))
14:37:01
pjb
But the question is why you want to test those cases? a bad keyword is a bad keyword, the lisp system already reports them.
14:38:01
dmiles
i understand it is wrong heads to ever compare symbols by name.. that anyone doing that is obviously doing something wrong
14:38:26
pjb
dmiles: the implicit point here being that 'test might be exactly what the keyword should be, if the user programmed it so!
14:38:51
pjb
dmiles: there's only one place where you need to compare symbols by name, it's with LOOP keywords.
14:39:09
dmiles
pjb: yes indeed that is what is happening in 44mb of work code.. we dont have to actually use keyword names in cyc.. we have to use the right key from the right package is all
14:40:30
pjb
ie. you cannot just compare with string=, you have to compare with (and symbolp string=)
14:51:18
dmiles
my other usecase i am setting up for is durring make-isntance that i respect slots from differnt classes that came from differnt packages
14:55:23
dmiles
loke: i was going to make that argument.. but technically we can compile :x in the parse and have it bind to foo:x in the body