libera/#commonlisp - IRC Chatlog
Search
5:34:46
pillton
Does anyone have reading material that covers creating abstractions for sets of things? e.g. a set of images or a set of image sets. The set itself will have properties and each item in the set will have properties. I am finding it tedious to implement wrappers around existing data structures and I am looking for better ways.
5:44:19
hayley
Nilby: The specification of forward-iteration-protocol wouldn't pass the critique in <https://plover.com/~mjd/misc/hbaker-archive/Iterator.html> as the iteration "state" object can be modified by iterating.
6:01:55
Nilby
hayley: while i despise C++ iterators, i still think baker is wrong on that. for performance reasons, but also stateless control is clumsy for certain things, e.g. iterating over lists in parallel, with variable stepping. it seems unlikely to totally dissuade programmers from using iterators, even if they're just integers. anyway, the iteration protocol should be mostly for implementaion of iteration, and it's usually better to use a
6:03:21
hayley
A functional "iterator" (as in, we have an object the caller steps) still allows for parallel iteration. And stepping with different strides isn't much of an issue.
6:08:42
jackdaniel
beach: dylan was initially created by apple, so (unlike i.e clojure) it was probably designed by a group of professionals, similar to common lisp
6:09:36
jackdaniel
(unlike clojure in a sense, that clojure was designed by one person to scratch an itch if I understand correctly)
6:10:46
hayley
That is my definition of an "iterator". The difference is that calling (say) the NEXT function on the iterator means the previous iterator cannot be re-used, with the Dylan iterator protocol. I assume this restriction is due to allowing "non-functional" iterators where the iterator object is modified in-place.
6:11:13
jackdaniel
n.b, and there we are, with clojure being magnitude more popular than both dylan and common lisp together ,)
7:36:20
scymtym
Nilby: in SBCL, the LOOP clause for sequence iteration actually uses the iteration protocol for non-list non-vector sequence. and likewise for sequence functions
7:43:37
scymtym
Nilby: i'm pretty sure SBCL's protocol was inspired by Dynlan's but i can find the citation right now
7:44:19
scymtym
a hint at least: https://github.com/sbcl/sbcl/blob/d35ad6f9bee212499cb827fec3195bf2064c10a2/src/pcl/sequence.lisp#L365
8:13:36
pve
Hi! Could a method have more than one qualifier? Like (defmethod compute :foo :bar (x y) ...)
8:15:38
pve
yep, I actually saw that, but became unsure since I don't think I've ever seen multiple qualifiers
8:16:29
beach
But you can define your own method combination, and then it can take any number of qualifiers.
9:58:43
Krystof
Nilby: SBCL's sequence protocol is ~15 years after CMU was doing Dylan interoperability. But, see section 1.3 of https://research.gold.ac.uk/id/eprint/2344/1/sequences-20070301.pdf
11:04:33
contrapunctus
First I found MGL-PAX, then 40ants-doc, and now https://github.com/shinmera/documentation-utils
11:06:35
contrapunctus
Damn, this is amazing. I was thinking about something like this very recently - describing each argument and return value in a structured way.
11:16:26
Shinmera
Pretty sure documentation-utils does something different from the other ones you listed.
12:31:03
Nilby
Krystof: Thanks for reminding me. It turns out that I had read your excellent paper and looked at the implementation, probably close to the 15 years ago now that it was published, and appreciated you taking inspiration from Dylan, and of course forgot the specifics.
16:16:10
White_Flame
Does d-wave still use common lisp? They came up in conversations and I checked their listings and they only mention python
16:16:57
jackdaniel
they hire for python, but then they secretly develop in hy (/me laughs in "hy hy hy")
16:29:17
Josh_2
Just spent a bit of time playing with defining method combinations. I had previously tried it but I dont think I "got it"