freenode/#lisp - IRC Chatlog
Search
23:03:14
aeth
"some other sequence type" would be tricky. The easy/lazy way would be to just have length/element-type/etc. from make-array as part of the API. The hard way would be to use an extension (if possible; is it CLtL2?) to actually parse a result type so it can behave like #'map... but that 2nd approach won't get you everything (e.g. adjustable arrays with fill pointers)
23:28:26
esper0s
i have got a general question which is not related to lisp but the process of learning. I have found many times that when reading a book on programming i find nmyself spending a lot of time learning the formal way of expressing concepts as stated in the book. Do you consider such an action vain? Sorry for the irrelevance of the question to the channel
23:43:46
jasom
possibly stupid question: are condition types classes? The spec lists a "Class Precendence List" for them, but I can't find anywhere that says that any condition type other than "condition" is a class.
23:45:27
phadthai
they can be implemented with CLOS but not necessarily need to be (predating it if I remember)
23:46:38
Xach
jasom: my long-term understanding is that they are not required to be classes or to use clos
23:47:09
phadthai
esper0s: difficult to judge on learning methods, I think that learning the style is also good, however some books may not be considered good style today, or may be considered closer to scheme-style than cl-style
23:47:42
jasom
Xach: condition is specifically defined to not have standard-class as the metaobject, but it's not clear on whether or not e.g. define-condition creates a new class (that is not required to be a standard-class)
23:47:49
phadthai
esper0s: and I'm not sure if I understood well enough your question, likely not if my answer seems irrelevant :)
23:51:26
jasom
what is confusing is that it shows a class precedence list for the standard condition types, whereas other non-class types do not (e.g. short-float).
23:52:18
jasom
compare e.g. http://clhs.lisp.se/Body/e_parse_.htm to http://clhs.lisp.se/Body/t_short_.htm
0:06:37
_death
I think if you use CLOS, then it's reasonable to expect the implementation to support conditions as classes.. do you know of implementations where this expectation is not met?
0:07:00
jasom
reading chapter 9, it relatively clear that define-condition is only guaranteed to create a subtype of cl:condition, not a subclass.
0:07:25
jasom
however it is ambiguous if whether or not the standardized condition types are required to be classes.
0:07:53
_death
if you don't use CLOS, and you use or may want to use a CLOS-less implementation, then this does not exclude usage of the condition system by itself
0:08:36
jasom
_death: given that all modern implementations I'm aware of create a class for each define-condition, it's mostly academic, but it is a strange ambiguity
0:10:52
_death
jasom: well, the standard is not perfect.. it's a bit of a spaghetti in this matter.. so the next best thing is to make reasonable assumptions that agree with it
0:11:56
phadthai
the standard being this way would also allow an implementation to use faster special classes than clos ones for conditions I guess
0:12:16
jasom
(define-condition foo (condition) ()) (class-of (make-condition 'foo)) => #<SB-PCL::CONDITION-CLASS COMMON-LISP-USER::FOO>
0:19:11
Bike
yeah, condition-class and standard-class are both subclasses of slot-class (and pcl-class, and class)
0:20:16
Bike
they have the same slots, i think, so i guess the difference is in some generic function behavior
0:26:52
_death
(mapcar #'class-name (sb-mop:class-precedence-list (class-of (class-of (make-condition 'foo)))))
0:28:45
jasom
but I *think* it would be conforming for this to be true: (eql (class-of (make-condition 'foo)) (class-of (make-condition 'condition)))
4:17:09
fouric
quicklisp is still refusing to locate my local projects, and register-local-projects hangs
9:32:07
francogrex
(loop while ind do (block inner ... (loop while do when something (setf ind nil) (return-from inner)...
9:34:25
jackdaniel
what is 'something', what is '...', what does "while do" mean? I don't recognize this loop syntax - is "do" a variable here?
9:36:15
jackdaniel
one could guess is that you want (loop with ind = t while ind do (when (something) (setf ind nil))) without the inner loop and a special variable
9:44:20
francogrex
ok thanks jackdaniel i think i discovereed the error in my code in the inner loop is actually a (do type of loop and it is returning before I have the chance to make the needed modifications to make (something) return t (that comes below in the code and it actually doesn't execute since the inner loop has already stopped)
9:49:31
francogrex
yes but lisppaste was specific, i wish they had developped something to keep it going yet stop the spam, for example just link it to an irc #lisp thing