jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
varjag has quit [Ping timeout: 240 seconds]
jonatack has quit [Ping timeout: 265 seconds]
dra has quit [Ping timeout: 276 seconds]
fosskers has joined #commonlisp
King_julian has quit [Ping timeout: 252 seconds]
King_julian has joined #commonlisp
pabs3 has joined #commonlisp
vidak has quit [Quit: Konversation terminated!]
chomwitt has quit [Ping timeout: 260 seconds]
random-nick has quit [Ping timeout: 260 seconds]
Ruby has quit [Quit: ZNC - https://znc.in]
admich1 has quit [Ping timeout: 244 seconds]
Ruby has joined #commonlisp
istewart has joined #commonlisp
admich1 has joined #commonlisp
leeb_ has quit [Ping timeout: 248 seconds]
leeb has joined #commonlisp
kchanqvq has joined #commonlisp
spdegabrielle has quit [Quit: Connection closed for inactivity]
scymtym has quit [Ping timeout: 240 seconds]
scymtym has joined #commonlisp
kchanqvq has quit [Ping timeout: 272 seconds]
vidak has joined #commonlisp
vidak has quit [Ping timeout: 245 seconds]
kchanqvq has joined #commonlisp
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
rahmanlar has quit [Server closed connection]
rahmanlar has joined #commonlisp
molson has quit [Ping timeout: 240 seconds]
Lycurgus has joined #commonlisp
Lycurgus has quit [Client Quit]
decweb has quit [Quit: Konversation terminated!]
vidak has joined #commonlisp
veqq1 has joined #commonlisp
veqq has quit [Ping timeout: 276 seconds]
veqq1 is now known as veqq
psilord has quit [Remote host closed the connection]
dbotton has quit [Server closed connection]
dbotton has joined #commonlisp
kchanqvq has quit [Quit: Client closed]
kchanqvq has joined #commonlisp
admich1 has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
Alfr has quit [Quit: Leaving]
Alfr has joined #commonlisp
chomwitt has joined #commonlisp
edgar-rft` has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
edgar-rft has quit [Ping timeout: 245 seconds]
bpanthi977 has quit [Ping timeout: 260 seconds]
vidak has quit [Ping timeout: 252 seconds]
olivial has quit [Read error: Connection reset by peer]
olivial has joined #commonlisp
chomwitt has quit [Ping timeout: 248 seconds]
vidak has joined #commonlisp
kj7 is now known as kishy
vidak has quit [Ping timeout: 276 seconds]
King_julian has quit [Read error: Connection reset by peer]
kchanqvq18 has joined #commonlisp
King_julian has joined #commonlisp
rgherdt has joined #commonlisp
LainIwakura has joined #commonlisp
kchanqvq has quit [Ping timeout: 272 seconds]
pve has joined #commonlisp
varjag has joined #commonlisp
ingeniot has joined #commonlisp
rtypo has joined #commonlisp
lcn_ has joined #commonlisp
attila_lendvai_ has joined #commonlisp
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
chomwitt has joined #commonlisp
vidak has joined #commonlisp
ingeniot has quit [Ping timeout: 248 seconds]
fosskers has quit [Remote host closed the connection]
King_julian has quit [Read error: Connection reset by peer]
King_julian has joined #commonlisp
vidak has quit [Quit: Konversation terminated!]
Guest47 has joined #commonlisp
admich1 has quit [Ping timeout: 272 seconds]
admich1 has joined #commonlisp
LainIwakura has quit [Quit: Client closed]
treflip has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
kchanqvq18 is now known as kchanqvq
LainIwakura has joined #commonlisp
hirez has quit [Ping timeout: 252 seconds]
hirez has joined #commonlisp
<ixelp> Embeddable Common-Lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #commonlisp
mooseball has joined #commonlisp
kchanqvq has quit [Quit: Client closed]
random-nick has joined #commonlisp
<edgar-rft`> soon the web will be embedded in Common Lisp
<jackdaniel> (ql:quickunload "js")
yitzi has joined #commonlisp
decweb has joined #commonlisp
admich1 has joined #commonlisp
pranav has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
admich1 has joined #commonlisp
yitzi has quit [Ping timeout: 252 seconds]
Fade has quit [Server closed connection]
Fade has joined #commonlisp
BierLiebHaber has quit [Server closed connection]
BierLiebHaber has joined #commonlisp
ingeniot has joined #commonlisp
yitzi has joined #commonlisp
yitzi has quit [Client Quit]
Fade has quit [Changing host]
Fade has joined #commonlisp
Lycurgus has joined #commonlisp
ingeniot has quit [Ping timeout: 252 seconds]
Guest47 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest47 has joined #commonlisp
Lycurgus has quit [Quit: irc.renjuan.org (juan@acm.org)]
yitzi has joined #commonlisp
<beach> jackdaniel: Again, congratulations to the grant.
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
Guest47 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<acdw> such great news!
attila_lendvai_ has quit [Ping timeout: 248 seconds]
zxcvz has joined #commonlisp
Guest47 has joined #commonlisp
zxcvz has quit [Client Quit]
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
jonatack has joined #commonlisp
robin has quit [Quit: Leaving]
<acdw> how would yall serialize a function to a string in CL? for incluseion in a sqlite database. is that even a good idea really?
<acdw> or should i rethink how to structure my data
admich1 has quit [Ping timeout: 248 seconds]
<beach> You can't serialize a function.
<acdw> yeah that'swwhat i figured
mooseball has quit [Quit: Leaving]
<pl> acdw: nothing portable, there were projects that handled that but nothing portable and everything brittle because most implementations don't have any support for that kind of operation other than writing out a fasl or dumping core
<dlowe> You can store the source if you control the definition process
<dlowe> it's probably not a good idea though
<acdw> yeah that makes sense. i think i've figured out a better way to do it anyway
jon_atack has joined #commonlisp
<acdw> list as a string, then read it in , gotta love it
jonatack has quit [Ping timeout: 240 seconds]
admich1 has joined #commonlisp
<pl> Generally that sort of things is outside the scope of *standard* - nothing stops an implementation from providing a way to do it, but it's rare enough use case that people don't bother
King_julian has quit [Ping timeout: 248 seconds]
King_julian has joined #commonlisp
<pl> closest I have seen was a short lived patchy system that essentially dumped partial "cores" of SBCL to disk for super fast loading
<pl> hacky as hell
<acdw> oh jeez
<acdw> yeah i'll just print sexps to strings and read them then code-walk them to resolve values
<dlowe> if you're going to code-walk them anyway, might as well generate CL on the way and the you can compile it
<acdw> o like, save '(defun blah (foo) ...) then read and eval it?
<dlowe> I was thinking if you were saving a DSL, you could code-walk it while emitting CL expressions.
LainIwakura has quit [Quit: Client closed]
<acdw> oh yeah that's what i'm diong basically
<jackdaniel> thanks
chomwitt has quit [Ping timeout: 260 seconds]
<yitzi> Is there anything that people wish CL:LOOP could be extended to do? We have Khazern which is derived from SICL. It can be loaded extrinsically, i.e. used indepent from the host CL:LOOP. I've been adding extensions lately: https://github.com/s-expressionists/Khazern?tab=readme-ov-file#khazern-extensions
<ixelp> GitHub - s-expressionists/Khazern: A portable and extensible Common Lisp LOOP implementation
<yitzi> The documentation is very light right now. Apologies.
jonatack has joined #commonlisp
<yitzi> To summarize: Khazern-extension can accumulate into any sequence type. It can iterate over streams, any sequence type and multidimensional arrays.
<acdw> oh that's cool
<yitzi> It has a pile of additional accumulation clauses. It can accumulate in subforms via named functions, and it has a CLEANUP clause that uses UNWIND-PROTECT.
jon_atack has quit [Ping timeout: 252 seconds]
<yitzi> acdw: its been around quite a while, I've just been hacking on it a bit this summer.
<acdw> oh lol cool
ndudaev1 has joined #commonlisp
admich1 has quit [Remote host closed the connection]
<yitzi> Oh, at it also has some combintorics iteration, like permutations, combinations and cartesian products.
admich1 has joined #commonlisp
<yitzi> Just pushed an update to the README for those that are interested.
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
<jackdaniel> yitzi: sounds cool
<yitzi> thx, buddy.
ingeniot has joined #commonlisp
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
ndudaev1 has quit [Quit: WeeChat 3.8]
ndudaev has joined #commonlisp
bpanthi977 has joined #commonlisp
treflip has quit [Ping timeout: 245 seconds]
bpanthi977 has quit [Ping timeout: 248 seconds]
Guest47 has quit [Quit: Textual IRC Client: www.textualapp.com]
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
bpanthi977 has joined #commonlisp
admich1 has joined #commonlisp
ingeniot has quit [Quit: ingeniot]
famicom_guy has quit [Remote host closed the connection]
khinsen has joined #commonlisp
jon_atack has joined #commonlisp
famicom_guy has joined #commonlisp
jonatack has quit [Ping timeout: 260 seconds]
paulapatience has quit [Server closed connection]
paulapatience has joined #commonlisp
treflip has joined #commonlisp
treflip has quit [Read error: Connection reset by peer]
famicom_guy has quit [Remote host closed the connection]
treflip has joined #commonlisp
kingcons has quit [Server closed connection]
kingcons has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 240 seconds]
treflip has quit [Read error: Connection reset by peer]
treflip has joined #commonlisp
LainIwakura has joined #commonlisp
inline has quit [Read error: Connection reset by peer]
inline has joined #commonlisp
treflip has quit [Read error: Connection reset by peer]
treflip has joined #commonlisp
<decweb> I have sometimes wished I could use `DO` and `COLLECT` in LOOP where it didn't quite work, but I can't remember the use-case right now.
<decweb> (it seems to prefer one or the other, but not both, of DO and COLLECT clauses)
phil_bb has quit [Ping timeout: 252 seconds]
<jackdaniel> collect as a macro can be made independent of a loop
<jackdaniel> in fact such ulltility is quite common
<jackdaniel> utility
<yitzi> Do you mean COLLECT inside of DO, maybe. Khazern can do that with any value accumulation clause
cage has joined #commonlisp
<ixelp> GitHub - s-expressionists/Khazern: A portable and extensible Common Lisp LOOP implementation
LainIwakura has quit [Ping timeout: 272 seconds]
phil_bb has joined #commonlisp
<decweb> jackdaniel, yes, I use serapeum:with-collector frequently
<decweb> yitzi: I don't remember the situations, but there have definitely been times where I had a DO in the loop and wanted to use COLLECT as well, and couldn't.
<decweb> For those times I fell back on serapeum:with-collector.
<jackdaniel> cmuutil has a macro collecting that I'm reusing in various projects
Lycurgus has joined #commonlisp
<jackdaniel> it composes well with loop, do, mapping amd other lexically scoped constructs
<yitzi> decweb: I'd like to see the example. DO and COLLECT are both selectable clauses, which means they can be used in the exact same places.
<jackdaniel> yitzi: I think that he means `do (let () (collect x))` kind of thing
<yitzi> Yeah, I addressed that with the USE clause.
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale has joined #commonlisp
<gilberth> yitzi: What I miss most from LOOP is iterating over a sequence. Be it a list or a vector.
<yitzi> Gotcha. Khazern has the ELEMENTS iteration path for that. \
<ixelp> GitHub - s-expressionists/Khazern: A portable and extensible Common Lisp LOOP implementation
<gilberth> Like FOR X BEING THE ELEMENTS OF Y?
<yitzi> yep
<gilberth> Very COBOLesque. And do I need to say PLEASE as well?
treflip has quit [Ping timeout: 252 seconds]
<acdw> are you a real lisper if you haven't writen your own iteration macro
<yitzi> Yeah, well. They were "iteration paths" in the original LOOP. SBCL hash them.
<yitzi> acdw: I've written five different ones. :)
<acdw> ahahaha
<yitzi> gilberth: hash table and package iterators in the CL spec are the residual of the "iteration path" syntax.
<Lycurgus> real isn the word i'd use
<acdw> what is?
<Lycurgus> piddler?
<yitzi> Don't be a jerk, please.
<Lycurgus> came into a church and decided to build a pew
<acdw> what
<Lycurgus> say what one more time
<Lycurgus> yitzi, ok, my bad, i'll be cuddly Lycurgus, i can turn on a dime
LainIwakura has joined #commonlisp
jon_atack has joined #commonlisp
chomwitt has joined #commonlisp
jonatack has quit [Ping timeout: 244 seconds]
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 240 seconds]
kaskal has quit [Ping timeout: 276 seconds]
kaskal has joined #commonlisp
LainIwakura has quit [Quit: Client closed]
LainIwakura has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
reb` has quit [Remote host closed the connection]
yitzi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Lycurgus has quit [Quit: irc.renjuan.org (juan@acm.org)]
yitzi has joined #commonlisp
rakka has quit [Remote host closed the connection]
<yitzi> gilberth: The original iteration path syntax supported inclusive paths, which is the reason the verbose syntax. I don't really see a reason the these types of paths. So I could add a somewhat abbreviated syntax: (loop for x IS elements of y) where "IS" is some unique token. I just choose IS as a example. Would that make it better in your eyes?
rakka has joined #commonlisp
<gilberth> I have a hack that just says (LOOP FOR X OVER <sequence> ...). As confusing or not confusing as IN, ACROSS, and ON.
<jackdaniel> (loop for x over elements do (print x))
<jackdaniel> ha!
<jackdaniel> n.b hash iterator in loop is a disaster when it comes to remembering it
<gilberth> Apropos ON. In CLIM we have the issue that there are coordinate sequences like (x1 y1 x2 y2 ...) or the like. Could be lists or vector. Can we can come up with something here? (FOR (X Y) <???> <coord-sequence> ...).
ggb has quit [Server closed connection]
ggb has joined #commonlisp
<yitzi> jackdaniel: I understood it more after I got the iteration path syntax. USING accesses the internal loop variables.
<yitzi> The IN/OF are just general "prepositions"
<gilberth> <http://clim.rocks/gilbert/loop-star.lisp> ; <-- my hack for OVER.
<jackdaniel> for anything non-trivial I'm usually writing DO-X macro
<gilberth> yitzi: Can I read up somewhere about those "iteration pathes"?
<jackdaniel> i.e (dohash ((key val) table &optional lresult) ,@body)
<yitzi> Sure...let me get some references
<gilberth> Yes, iirc there's some horrible macro for coordinate sequences in McCLIM.
<jackdaniel> do, dohash, dohash mesh
<jackdaniel> yes, that one is truly ugly
<jackdaniel> do-sequence if I remember correctly
<gilberth> I wonder who wrote it.
<jackdaniel> but it gets the job done, so I'm glad that it is in there (:
<jackdaniel> speaking of coordinates, I think that the correct way to deal with that is to store points as a canonical form; if anyone comes with an idea CLIM but in 3d, operating on coordinate sequences will become even bigger headache
<yitzi> gilberth: One historical doc is the Lisp Machine Manual. Section 20.6 https://hanshuebner.github.io/lmman/looptm.xml
<gilberth> Thanks.
<yitzi> gilberth: More abbreviated is some explanation I wrote here https://github.com/yitzchak/loop-iteration-paths/
<ixelp> GitHub - yitzchak/loop-iteration-paths: Common iteration paths for LOOP
<jackdaniel> perhaps a custom metaclass would store groups of points as a single vector
<jackdaniel> could*
Ruby has quit [Ping timeout: 252 seconds]
<yitzi> Even more abbreviated in the khazern readme.
<gilberth> Well, for something like draw-polygon* you may want to be able to blast out those coordinates into the general direction of whoever renders. So having a "flat" representation is reasonable option.
<yitzi> If the coordinate sequence is a list you can already do that destructuing with CL:LOOP.
<yitzi> To do it with vectors you'd have to extend the destructuring code, I suppose.
<gilberth> Well, it works on list because you can say BY #'CDDR.
<yitzi> Yes, with ON
ingeniot has joined #commonlisp
<gilberth> Yes. But that pattern doesn't work with OVER that jackdaniel and I want to have. And not with ACROSS either.
<gilberth> Would I go baroque I could imagine something like (LOOP FOR REPEATED (X Y) IN/ACROSS/OVER ...) or something like that. Matching successive elements to X and Y.
<jackdaniel> (loop for (x y) over seq by n ..) ;?
<gilberth> Could also be something like (MIN-X MIN-Y MAX-X MAX-Y) or perhaps (X Y W H).
<yitzi> The destructuring code in CL:LOOP isn't specific to ON. So to extend it to sequences for ACROSS and the proposed OVER you'd have to extend it everywher.
<gilberth> jackdaniel: Nice!
<yitzi> You can destructure in any variable binding. WITH include.
<yitzi> included.
* gilberth disappears.
decweb has quit [Quit: Konversation terminated!]
decweb has joined #commonlisp
<gilberth> Almost. ,(loop for x in '(1 2 3 4) by #'cddr collect x) ;BY is taken
<ixelp> (loop for x in '(1 2 3 4) by #'cddr collect x) => (1 3)
varjag has joined #commonlisp
<yitzi> tokens aren't unique like that in the LOOP parser
<gilberth> We rather want that a pattern (x y) is matched against the current and the next element not as a whole to the current element. So REPEATED again? Or some better name.
<yitzi> You can use BY with OVER. ON doesn't own it.
<gilberth> Fully generic would be (LOOP FOR REPEATED (I J) BELOW 3 COLLECT (LIST I J)) => ((0 1) (1 2)). ;-)
<gilberth> yitzi: Sure, but I won't like it that when I s/OVER/IN/ or s/IN/OVER/ the meaning changes beyond whether only lists are accepted or not. That would be confusing, I think.
<decweb> With apologies for flogging my repo, on the theme of iteration without worries, if you like Clojure, https://github.com/dtenny/clj-coll brings all its sequence/collection abstractions to Common Lisp. Not only do all its map/reduce/doseq constructs handle all the immutable collections it provides, but they also work on Common Lisp collections too, (lists, vectors, hash-tables), all via the `seq` abstractions.
<ixelp> GitHub - dtenny/clj-coll: Clojure collection and sequence APIs in Common Lisp, with optional Clojure collection syntax
<jackdaniel> then over standing for in/across, and inside standing for on/???
<gilberth> And when traversing polygons we might want to iterate like so that we have (x1 y1 x2 y2) be (1 2 3 4) and then (3 4 5 6) then (4 5 6 7) and so on. So both "spliced" matching and some distance might be useful.
<decweb> You can also use the seq abstractions with CL:LOOP in a fairly bland way, i.e. (loop for elt = (seq <coll>) then (next elt) while elt do ...)
TactfulCitrus has joined #commonlisp
<jackdaniel> generally that's why I'm usually making do-foo macros
<jackdaniel> you don't need to think very hard about syntax verbs and such
<gilberth> Yes, and less confusing. And perhaps easier to understand when looking at the macro.
attila_lendvai_ has joined #commonlisp
ingeniot has quit [Ping timeout: 245 seconds]
cage has quit [Quit: rcirc on GNU Emacs 30.1]
yitzi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
okflo has quit [Server closed connection]
okflo has joined #commonlisp
Ruby has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 244 seconds]
psilord has joined #commonlisp
slondr has quit [Server closed connection]
slondr has joined #commonlisp
<acdw> maybe if i got gud at reduce
<acdw> from reduce all other loops are made
<dlowe> if you have tail-recursion optimization, it's recursion from which all other loops are made
<acdw> yes
<acdw> right yo have to have that
khinsen has left #commonlisp [#commonlisp]
whereiseveryone has quit [Server closed connection]
whereiseveryone has joined #commonlisp
admich1 has quit [Ping timeout: 260 seconds]
admich1 has joined #commonlisp
sherbert has quit [Server closed connection]
sherbert has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 272 seconds]
szkl has quit [Quit: Connection closed for inactivity]
istewart has joined #commonlisp
reb has joined #commonlisp
_triffid has joined #commonlisp
triffid has quit [Remote host closed the connection]
rolling-lambda_ has joined #commonlisp
rolling-lambda has quit [Ping timeout: 240 seconds]
gosha_ has quit [Server closed connection]
gosha_ has joined #commonlisp
fosskers has joined #commonlisp
kchanqvq has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 245 seconds]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
lusciouslover has quit [Read error: Connection reset by peer]
lusciouslover has joined #commonlisp
Lycurgus has joined #commonlisp
dra has joined #commonlisp
dra has joined #commonlisp
dra has quit [Changing host]
rgherdt has quit [Remote host closed the connection]
thonkpod has quit [Ping timeout: 260 seconds]
thonkpod has joined #commonlisp
fosskers has quit [Remote host closed the connection]
attila_lendvai_ has quit [Ping timeout: 276 seconds]
King_julian has quit [Ping timeout: 260 seconds]
King_julian has joined #commonlisp
dra has quit [Ping timeout: 245 seconds]
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 248 seconds]
notzmv has joined #commonlisp
Spawns_Carpeting has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
lcn_ has quit [Remote host closed the connection]
Lycurgus has quit [Quit: irc.renjuan.org (juan@acm.org)]
notzmv has quit [Ping timeout: 252 seconds]
apac has joined #commonlisp
kchanqvq has quit [Quit: Client closed]
screwlisp has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #commonlisp
rtypo has quit [Ping timeout: 240 seconds]
jon_atack has quit [Ping timeout: 252 seconds]
pve has quit [Quit: leaving]
notzmv has joined #commonlisp