@amszmidt I might have garbled it, but he was talking about structured programming. So when the data structure being operated on is a cons cell, use car and cdr, and when the data structure being operated on is a list, use list functions like first and last (for example, but also consider something like subseq). I'm open to not necessarily agreeing with Allen's book (for undergraduates). @simon_brooke
@amszmidt Doug linked John Allen's book which spends about 50 pages asking people to please not use car and cdr as though they were intended as general list manipulation tools, even though they might be literally implemented as first and rest, since it's a failure of abstraction or something.
@riley@dougmerritt Yeah, (let ((alist '((:foo . bar) (:baz buz)))) (cdr (assoc :foo alist)) ; -> bar (cadr (assoc :baz alist))) ; -> buz There isn't a lot of cost (well, one cons to nil) of using cadr or second instead of cdr. And then you could store other stuff in later positions of the list as well. When I only knew the definitions of assoc and pairlis, I mostly used cdr, but then in lisp code I've read, like you said, the cadr one seems more common in lots of places.
@kentpitman is joining me #live for the show - 0UTC Wednesday, Tuesday evening in the Americas. I'll toot the link on mastodon a few hours before the show as always.
If you could join and ask questions live or beforehand here in this thread (if you join through the archive).
@dougmerritt Oh we were actually going to talk about this, ironically Kent just said something similar to what you shared viz "well if you can do paragraph formatting in 8 bits, that's what I've got left"
Please do ping Kent (and me!) about topics you are particularly interested in Kent following up on in later interviews, or releasing from his personal software stockpiles.
@notptr yeah, my game of trees habit introduces so much extraneous exposition, I should just keep it or at most drop in a link to https://gameoftrees.org/index.html.
though from what I can see here, you end up having the long :components listing in the defsystem I prefer to have inferred. I guess 40ants also uses :class :package-inferred-system normally.
@craigbro I try to keep walking in one direction. Such as, I don't expect to try and adopt an interface manager other than CLIM, or transducers other than Series, or when not series, a loop other than loop.
Though I do sometimes get-really-into-org, or I get-really-into-asdf, but those being different, I end up wanting what I don't currently have and change (back) I think.
I guess at the moment I primarily only-use-openbsd, though I kinda expect to use FreeBSD more as well eventua @jayalane
@hairylarry I think everyone feels like viz their git useage and so forth. Which is why I tried to spell what I do out a bit, and @schroeder@mdhughes and @craigbro shared a bit of what they do.
By the way, how do you do your archives? Since the archiver and anonradio seem to specifically fail during Northernlights' and our shows, I guess I need a different archival happening.
@dougmerritt Oh, yeah, so I had two thoughts. One is like using a computer at all $ emacs --daemon $ emacsclient -c $ M-x slime C-x C-f .. this kind of thing.
Secondly, when I opened that PR for @mdhughes to make Arrokoth into an ASDF system, it occurs to me that not everyone might force recompilation of changed packages in their system the same way as me, and other peoples' experience and practice might be shared @prahou@nosrednayduj@hairylarry@pkw@sacha@shizamura@rat@SDF@kentpitman