Xach 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>
<Xach> destroying threads is pretty dodgy
<Xach> it can foul up state pretty well
<hayley> Yeah, don't do this.
dlowe has joined #commonlisp
Fare has quit [Ping timeout: 258 seconds]
CrashTestDummy3 has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
jimka has quit [Ping timeout: 258 seconds]
CrashTestDummy2 has quit [Ping timeout: 276 seconds]
amb007 has quit [Ping timeout: 258 seconds]
jimka has joined #commonlisp
<nij-> Ok.. it didn't work for me. Nevermind.
makomo has quit [Ping timeout: 240 seconds]
jimka has quit [Ping timeout: 272 seconds]
lotuseater has quit [Quit: ERC (IRC client for Emacs 27.2)]
dlowe has quit [Remote host closed the connection]
jimka has joined #commonlisp
taiju has joined #commonlisp
taiju has quit [Ping timeout: 258 seconds]
taiju has joined #commonlisp
taiju has quit [Ping timeout: 258 seconds]
dsk has quit [Ping timeout: 258 seconds]
derelict has quit [Quit: WeeChat 3.2]
tyson2 has quit [Remote host closed the connection]
jimka has quit [Ping timeout: 258 seconds]
taiju has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
derelict has joined #commonlisp
prxq has joined #commonlisp
prxq_ has quit [Ping timeout: 252 seconds]
<beach> Good morning everyone!
pillton has joined #commonlisp
taiju has quit [Ping timeout: 250 seconds]
Bike has quit [Quit: sleepin']
duber has joined #commonlisp
char has joined #commonlisp
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
jimka has joined #commonlisp
<gendl> Morning beach.
<gendl> does CL support having a hash table with custom equality predicate?
<beach> Not the standard, no.
<moon-child> (though you can obviously support such a feature if you make your own hash table)
djuber` has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
<gendl> is it hard to make your own hash table? Would I find examples of such things on quicklisp? (cl-containers?)
<beach> gendl: I think hayley is the expert on this topic.
* moon-child waits to hear extolled the virtues of NonBlockingHashMap :)
<beach> gendl: hayley is the one who implemented the SICL hash tables, and the one who studied different kinds of implementations, including lock-free hash tables, like the one by Cliff Click.
notzmv has quit [Ping timeout: 256 seconds]
<beach> gendl: If you need very good performance, it can be tricky, otherwise, it is pretty straightforward.
<beach> gendl: You need to come up with a hash function that works for the equality predicate you have in mind, so that if two keys are equal according to that predicate, they also have the same hash value.
<mfiano> gendl: Have you seen this? https://github.com/metawilm/cl-custom-hash-table
<gendl> mfiano: i hadn't, thanks!
<mfiano> It's a portability library since some implementations allow non-standard tests and hash functions
<mfiano> Also has a fallback case for others
<mfiano> (I haven't used it, just remember seeing it at some point)
<gendl> beach: got it. I'm trying to key on 3d points which are vectors of double-float numbers.
<mfiano> Use #'equalp
<gendl> equality is tested by a coincident-point? function which compares the x y z values within an epsilon
<mfiano> Oh
<moon-child> also equalp will be slower than a function which knows to just check (aref x 0/1/2)
<mfiano> gendl: side note, are you using absolute tolerance for that test?
<moon-child> gendl: you will have difficulty generating a hash function which works correctly
<moon-child> because equality wrt your predicate is not transitive
<moon-child> gendl: rather than a hash table, I expect you want an octree
<gendl> mfiano: absolute tolerance, yes i think so. We just check if the diff between the num and the other num is less than a given epsilon or not. The epsilon is set by default with a global parameter but you can pass in your own as a key argument to coincident-point?
<gendl> moon-child: I suspected this would be tricky to do with a straight up hash table.
<moon-child> not just tricky, not well defined
<moon-child> what if your hash table contains points x and y, which are not equal. YOu want to key a point z, but z is equal to both x and y?
<gendl> well, tricky to get behaving as desired maybe
<mfiano> gendl: I would highly recommend reading this as a brief overview of why that is a bad idea: https://realtimecollisiondetection.net/blog/?p=89 and this for a longer discussion https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
<moon-child> incidentally, if tolerance is set by a global parameter, why not simply rebind that before calling coincident-point?
<gendl> moon-child: that is a good thought experiment
<moon-child> having it as a key argument seems redundant
<gendl> and i don't have a good answer
<gendl> this stuff is modeled after stuff from the ICAD days and they never taught dynamic scope to their users
<gendl> so they put key arguments on functions like this
<mfiano> tl;dr, it is much more robust to combine absolute and relative tolerance testing
<gendl> so we do the same for compatibility to legacy code from circa 1992
<gendl> mfiano: i'm scared to read the thing about comparing floating point numbers
<mfiano> tldr2: (< (abs (- x y)) (max abs (* rel (max (abs x) (abs y)))))
<mfiano> Use that and profit
<gendl> 😃🙃
<gendl> got it
<mfiano> oops
<mfiano> that has a symbol macro in it
<mfiano> one sec
<mfiano> oh no, rel and abs vars are the relative and absolute tolerances, signature being (x y &key (rel +some-epsilon+) (abs rel))
<gendl> ok
<mfiano> basically absolute tolerance tets fails when the magnitude of the nums is large, and relative when they are too small
<mfiano> so combining them, and giving the user the option to fine-tune both epsilons is the right way
<mfiano> I know this was a tangent, but I am sort of obsessed with numerical stability
<mfiano> sorry :)
<gendl> it's a worthy obsession
jimka has quit [Ping timeout: 256 seconds]
Fare has joined #commonlisp
dsk has joined #commonlisp
rain3 has joined #commonlisp
ahc has joined #commonlisp
Fare has quit [Ping timeout: 240 seconds]
ggoes has quit [Quit: WeeChat 2.3]
Fare has joined #commonlisp
ggoes has joined #commonlisp
taiju has joined #commonlisp
<mfiano> Has anyone played with https://github.com/alex-gutev/static-dispatch before?
<mfiano> The documentation mentions type dispatching everywhere, and I'm not sure if it means class/type or arbitrary types. I am guessing the former, or method-lambda-lists would be wrong unless the user created atomic type specifier aliases for complex types.
dsk has quit [Ping timeout: 240 seconds]
<mfiano> I only ask because the specialization-store library dispatches on actual types. I'm familiar with the latter, but there are some aspects of the former I like better, and would like to know if it works for arbitrary types or just class/eql as with standard method dispatch.
Fare has quit [Ping timeout: 256 seconds]
selwyn has joined #commonlisp
<mfiano> Nevermind. I should have read the very last line of the README: "Enhance generic functions to allow for specialization on all types rather than just classes."
retropikzel has joined #commonlisp
vats has quit [Ping timeout: 258 seconds]
kakuhen has joined #commonlisp
<hayley> From memory, hash tables with custom tests and hash functions on SBCL are considerably slower than with inbuilt test functions. Not exactly sure why; maybe they can't inline something.
<moon-child> haha
<hayley> I can complain about the bad things about NonBlockingHashMap still. Relative to a non-synchronised hash table, the ideal load factor is miserable (like 0.25 or so), and it doesn't properly remove keys from the table without performing a "resize", so you either copy more often or have a poor probe length.
<hayley> 42nd at Threadmill kind of improved on it, as you can cheat death by using SIMD to probe faster, and thus have longer probe lengths, but at the cost of false sharing which completely destroys performance on a NUMA system.
<moon-child> huh, really? I don't know very much about the topic, but I thought numa was about putting larger-scale allocations (at least hw page size, of necessity) on memory that's physically closer to a core that accesses it
notzmv- has joined #commonlisp
<moon-child> whereas simd ops are 64 bytes max (and self-aligned), so you would never cross a page that way?
<hayley> Well, that was my conclusion after testing on a two-socket computer (10 cores/20 threads per socket).
<hayley> Say we had a table which was just a vector of key and value words. Then, for 64 byte cache lines, we would fit 4 mappings per cache line.
<hayley> I used a trick by Matt Kulukundis which was implemented in Abseil's flat_hash_map; you keep a partial hash vector with one byte of each hash. That table fits 64 mappings per cache line.
<hayley> My understanding is that there would be like 16× more contention with that partial hash vector, and it is very slow on a dual-socket machine.
notzmv- has quit [Ping timeout: 272 seconds]
<moon-child> oh--right, of course. I understand
<hayley> But if you write very rarely, it does go like 30% faster than NonBlockingHashMap, which is probably useful for someone.
<moon-child> at some point, if your wries are rare enough you may be better off with locks
<moon-child> (unless you expect your writes to be clustered when they do happen)
<hayley> As per the image, I still think it is a big win even over a readers-writer lock (or sharded RW locks) to do no synchronisation to read.
akoana has quit [Quit: leaving]
amb007 has joined #commonlisp
jimka has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
pve has joined #commonlisp
<pjb> That said, the way hash-tables are specified in CL hints at some implementation choices that should give good performance even with a "naive" implementation. The main problem actually is to have a good hash function. The way CL hash-tables are specified (with thresholds for resizing) imply that you don't need buckets.
<mfiano> Can someone with an SBCL handy try to reproduce a failure I'm getting here with some test code?
<pjb> This also gives an opportunity to implementation to use perfect hash functions, in case the hash-table won't be further modified.
<pjb> mfiano: http://ideone.com has a sbcl.
<mfiano> Does it allow network (quicklisp)?
<pjb> I don't think so.
<mfiano> I am wondering why #'test fails here
<mfiano> (to compile, that is)
<pjb> 1- asd file, or use (eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload :static-dispatch))
<pjb> 2- defgeneric: ; No generic function present when encountering a defmethod for elt. Assuming it will be an instance of standard-generic-function. ; No generic function present when encountering a defmethod for (setf elt). Assuming it will be an instance of standard-generic-function.
<pjb>
<pve> mfiano: it compiles on my setup
<pjb> Funny, you have them…
<mfiano> ; caught ERROR:
<mfiano> ; don't know how to dump #<STANDARD-METHOD ORIGIN2::ELT (AGGREGATE T) {1001B46923}> (default MAKE-LOAD-FORM method called).
<pjb> and 3- ; In origin2::test: Undefined function origin2::elt
<pjb> (in ccl); now trying sblc.
<pjb> Oh, I assume it's not cl:defgeneric cl:defmethod; then indeed, check the expansions, you can report a bug to static-dispatch.
<mfiano> Correct, it's not
<pjb> without conditions muffled, sbcl also reports: ; in: defun test (ORIGIN2::ELT ORIGIN2::A 2)
<pjb> ; compilation unit finished Undefined function: elt
<pjb> ; caught style-warning: undefined function: origin2::elt
<pjb>
<mfiano> Yeah it's seeming like a bug in static-dispatch, but I'm not sure how the tests even pass
<mfiano> This was the first, very basic example of me trying to use it!
<mfiano> Also tried HEAD
<pjb> The expansions contains sbcl-specific stuff on sbcl; it uses a compiler-macro, so it could be faily conforming instead.
duber has quit [Ping timeout: 240 seconds]
<mfiano> Bug reported, thanks
gaqwas has joined #commonlisp
<mfiano> Side note, this is why I try to stay away from these libraries (specialization-store, inlined-generic-functions, and a few others). They have always failed in mysterious ways on random Quicklisp/implementation upgrades, and due to their complexity it's very hard to track down the blame on the library or the implementation, not to mention fixing it locally.
<mfiano> I decided to try this one because it had a feature I was interested in. Not worth the hassle :)
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 258 seconds]
lisp123 has joined #commonlisp
jimka has quit [Ping timeout: 258 seconds]
makomo has joined #commonlisp
vats has joined #commonlisp
dsk has joined #commonlisp
jimka has joined #commonlisp
jimka has quit [Ping timeout: 250 seconds]
sm2n_ has joined #commonlisp
mister_m has quit [Remote host closed the connection]
mister_m has joined #commonlisp
djuber` has joined #commonlisp
copec has quit [Ping timeout: 256 seconds]
pieguy128 has quit [Ping timeout: 256 seconds]
hendursa1 has joined #commonlisp
pieguy128 has joined #commonlisp
deckard has quit [Ping timeout: 252 seconds]
deck4rd has joined #commonlisp
copec has joined #commonlisp
djuber has quit [Ping timeout: 256 seconds]
sm2n has quit [Ping timeout: 256 seconds]
hendursaga has quit [Ping timeout: 244 seconds]
jimka has joined #commonlisp
jimka has quit [Ping timeout: 258 seconds]
asarch has joined #commonlisp
<asarch> How do you "break" a loop? E.g. (loop while result do (setf result (some-query)) (when (string= result 'foo') break))?
<phoe> do (loop-finish)
<asarch> Thank you!
<moon-child> you can also do (loop while result do (whatever) until (string= result "foo"))
<moon-child> also consider the difference between loop-finish and returhn
<asarch> ?
shka has joined #commonlisp
elf_fortrezz has joined #commonlisp
jimka has joined #commonlisp
rgherdt_ has joined #commonlisp
jimka has quit [Ping timeout: 245 seconds]
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
cage has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 272 seconds]
vats has quit [Ping timeout: 245 seconds]
jimka has joined #commonlisp
lisp123 has joined #commonlisp
rgherdt_ has quit [Ping timeout: 256 seconds]
asarch has quit [Quit: Leaving]
elf_fortrezz has quit [Quit: Client closed]
elf_fortrezz has joined #commonlisp
elf_fortrezz has quit [Client Quit]
elf_fortrez has joined #commonlisp
jimka has quit [Ping timeout: 256 seconds]
kakuhen has quit [Quit: Leaving...]
<lisp123> These continuation passing macros...how much do they slowdown code? As they are macros, hopefully not by too much?
<hayley> They have some slowdown, as splitting things into multiple functions tends to limit optimisations in various ways.
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
jimka has joined #commonlisp
random-nick has joined #commonlisp
lisp123 has quit [Ping timeout: 245 seconds]
jimka has quit [Ping timeout: 258 seconds]
elf_fortrez has quit [Ping timeout: 246 seconds]
lisp123 has joined #commonlisp
<lisp123> hayley: thanks, that makes sense
nature has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
nature has quit [Ping timeout: 258 seconds]
dsk has quit [Ping timeout: 250 seconds]
Krystof has joined #commonlisp
dlowe has joined #commonlisp
<pjb> lisp123: the point here is that a compiled that natively works with continuation will naturally optimize continuations and continuation passing style code. But this is not what CL compilers optimize for. You may count on CL compilers to optimize for closures (lambda), and some for tail calls, notably recursive tail calls (but compromises with the optiomization of dynamic variables and other dynamic bindings have to be done).
<pjb> lisp123: so yes, you can write code using continuation passing style macros, but this won't necessarily be the best match for the optimization your compiler has implemented.
<pjb> lisp123: this is not the reason why you would use a different style; you will choose a style to optimize the programmer's time! If you have a solution that is more elegantly written and understood in continuation passing, then you should definitely write it using them!
<pjb> lisp123: see: http://cliki.net/Performance People often forget the first sectioN!
rgherdt_ has joined #commonlisp
<lisp123> pjb: thanks
<lisp123> pjb: Yes for now, continuations seem helpful - and I plan to worry about any optimisations much down the track. Its an interesting topic for sure
santiagopim has quit [Remote host closed the connection]
<lisp123> Wonder if anyone has read this one: https://arxiv.org/pdf/1510.03057.pdf
<pjb> Interesting. I will.
<mfiano> Oh, another Lisp constraint programming paper. Yay
<pjb> But applied to IRCAM Open Music system.
<mfiano> Even still, I like reading about propagation networks, constraint solvers and related AI.
tyson2 has joined #commonlisp
<mfiano> Reminds me to polish up my WFC algorithm and release it some time :/
vats has joined #commonlisp
santiagopim has joined #commonlisp
<mfiano> The typesetting really messed up the CL indentation in that paper :(
lisp123_ has joined #commonlisp
<lisp123_> mfiano: yeah it did. I was hoping for more CL code than it had but perhaps the devils in the detail - will read through it more carefully rather than skimming
lisp123 has quit [Ping timeout: 256 seconds]
lotuseater has joined #commonlisp
lisp123_ has quit [Remote host closed the connection]
Melantha has joined #commonlisp
nij- has joined #commonlisp
<nij-> I'm deeply amazed by April. Anyone has used that before? https://github.com/phantomics/april
<phantomics> Thanks nij-
<nij-> Oh author here! Thanks too!
<nij-> It implements a part of Dyalog. But is it a proper subset? Or does it have a breaking change?
jimka has joined #commonlisp
<nij-> I'm not familiar with APL at all, and would like to take this chance to start learning. I'd like to know how it differs..
<phantomics> It's not intended as a subset of Dyalog, its functions and operators are mostly patterned after Dyalog. It has several differences from Dyalog. For example, it has no guards, rather implementing k-style if statements with $[ ... ]
<phantomics> Because it is a compiler, April needs to know if the operands in a user-defined operator are functions or values. ⍺⍺ and ⍵⍵ denote function operands, ⍶ and ⍹ denote value operands
<phantomics> Those are the main changes you need to make to code when porting it from Dyalog. Also, because of the way it works as a compiler, the definition of a function in April always needs to come before its use. That's another gotcha
<phantomics> But overall if you learn how the functions and operators work in Dyalog 99% of that knowledge carries over to April
<phantomics> Dyalog has many, many more system functions than April does though, April assumes that you'll do stuff like filesystem interaction through CL and then feed the results into April
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
nirnam has joined #commonlisp
yitzi has joined #commonlisp
<nij-> Wow, 99% is very good! Is there a spec (or will there be) written for April?
<nij-> phantomics: By the way, do you use it often with Lisp? I imagine I can leverage its terse-ness and blend it with Lisp. Not sure how practical it would be.
Fare has joined #commonlisp
lisp123 has joined #commonlisp
<phantomics> I use it constantly with Lisp, April was designed to be integrated into Lisp code. I'd like to get an April REPL mode working through Emacs sometime but for now you have to invoke it through CL. The arrays April outputs are regular Lisp arrays that you can process with Lisp's array tools, it's very seamless compared to something like NumPy
<phantomics> There isn't a written spec for April yet outlining all the functions, but you can read the Dyalog APL manual to see how the functions work, knowing April's work the same way. http://docs.dyalog.com/18.0/Dyalog%20APL%20Language%20Reference%20Guide.pdf
<phantomics> However, April does have a spec of sorts in the spec.lisp file, the top-level language definition is in that file and it lists each function and operator
<lotuseater> nij-: I now also used it a bit.
<phantomics> You can also evaluate (april (demo)) to see demos of all the functions based on the unit tests, that will give you an idea of how they work
lisp123 has quit [Ping timeout: 258 seconds]
lisp123 has joined #commonlisp
notzmv has joined #commonlisp
jimka has quit [Ping timeout: 256 seconds]
<nij-> Very exciting!
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<nij-> lotuseater: Good to know that too! :)
<lotuseater> yes as you asked and I read that
notzmv has quit [Ping timeout: 276 seconds]
<lotuseater> You could also have an interesting read by Iversons paper "Notation as a Tool of Thought"
jimka has joined #commonlisp
<nij-> Hopefully this can extend my arsenal of notations too. I long complain about the lack of alphabets in math and physics.
<lotuseater> I think it heavily depends on how ones brain is wired.
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
jimka has quit [Ping timeout: 258 seconds]
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 240 seconds]
<lisp123> In the form, (+ 1 (+ 2 (+3 4), the ___ in (+ 1 ___) is not a tail call, correct?
<hayley> .oO( READER-ERROR: Comma not in a backquote. )
<hayley> Only the outer-most call to + would be a tail call, yes.
<lisp123> Thanks!
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
jimka has joined #commonlisp
Fare has quit [Ping timeout: 245 seconds]
yitzi has quit [Read error: Connection reset by peer]
Bike has joined #commonlisp
<beach> lisp123: The rules for function application in Common Lisp is that the arguments are evaluated before the function is applied. And tail position means that the computation is finished when the form in the tail position has been evaluated. But since the function + has not been applied yet, then the argument is not in tail position.
rgherdt_ has quit [Ping timeout: 258 seconds]
yitzi has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
vats has quit [Ping timeout: 258 seconds]
lisp123 has joined #commonlisp
<lisp123> beach: thanks
<beach> Sure.
MichaelRaskin has quit [Ping timeout: 252 seconds]
MichaelRaskin has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
jimka has quit [Ping timeout: 245 seconds]
selwyn has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
<jcowan> The forms in a function call are never in tail position, although in Scheme the first argument to eval and apply are treated as if they were.
jimka has joined #commonlisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 27.1)]
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 272 seconds]
duber has joined #commonlisp
lisp123 has joined #commonlisp
jimka has quit [Ping timeout: 258 seconds]
lisp123 has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
lisp123 has joined #commonlisp
selwyn has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
retropikzel has quit [Quit: Leaving]
lisp123 has joined #commonlisp
jimka has joined #commonlisp
vats has joined #commonlisp
cpape` has quit [Remote host closed the connection]
cpape` has joined #commonlisp
duber has quit [Ping timeout: 256 seconds]
skyl4rk has quit [Ping timeout: 272 seconds]
Colleen has quit [Read error: Connection reset by peer]
Colleen has joined #commonlisp
skyl4rk has joined #commonlisp
lisp123 has quit [Ping timeout: 272 seconds]
jmhimara has joined #commonlisp
selwyn has quit [Ping timeout: 276 seconds]
jmhimara43 has joined #commonlisp
jmhimara43 has quit [Client Quit]
jmhimara has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
yitzi has quit [Remote host closed the connection]
yitzi has joined #commonlisp
yitzi has quit [Remote host closed the connection]
jimka has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
<lisp123> jcowan: yes that makes sense and interesting note on scheme
<lisp123> A nice introduction on scheme does it
<jcowan> More explanations (unless outright wrong) are usually better.
<lisp123> Yes, there's many different ways to look at it. Now am I am thinking for my own on what problem do continuations specifically solve
<lisp123> Of course I know they are useful in stuff like multiple processes and nondeterminism, but going a bit deeper into specifically their benefit
<jcowan> State machines, for one.
<jcowan> In a typical language, a state machine is a big while-loop with a big case statement inside, and a variable that carries the state.
<lisp123> For those interested, this is a useful read, but it's a bit beyond me for now: http://www.nhplace.com/kent/PFAQ/unwind-protect-vs-continuations-overview.html
<jcowan> In Scheme, it's a bunch of definitions that tail-call one another to move to the next state, with no variable needed. (They may still need a let-wrapper to carry other state-stuff than *the* state of the state machine.)
<lisp123> jcowan: nice I haven't yet studied state machines
<lisp123> jcowan: from what I understand, scheme will re-write your functions to be tail calls, whereas in CL one has to handle that part themselves (also the passing of continuations between functions) - is that your understanding?
<jcowan> Yes, pretty much.
<jcowan> And in almost all other languages (Haskell and ML have proper tail calling too).
elf_fortrez has joined #commonlisp
tfeb has joined #commonlisp
<lisp123> jcowan: Thanks :) It took me a good 1.5 hours to connect all the dots, it was an innocuous few words in PG's On Lisp ("if a ... occurs in a segment of code, it must be a tail call")
selwyn has joined #commonlisp
<jcowan> I have *no* idea what that means, unless it refers to some drawing or other.
<lisp123> just some continuous passing macros in the book, it requires one to organise all the functions as tail calls
<mariari> with lazy ML's often tail calls aren't needed due to laziness often acting in it's place (not always)
<jcowan> Yes.
<lisp123> The importance of which I didn't understand after spending some time on it
<lisp123> until after*
<lisp123> mariari: that makes sense, but adding lazy evaluation to continuations definitely blows my mind :S :)
<lisp123> But it completely makes sense (at least based on my superficial understanding)
<mariari> haha. There are other evaluation strategies that don't care about tail calls at all
<mariari> like optimal reductions also don't really care IIRC due to the nature of how reductions work
<lisp123> do you have a link to that? google-fu didn't seem to return anything that seems related
<lisp123> I would be curious to study those too
skyl4rk has quit [Ping timeout: 240 seconds]
<mariari> yes there is an entire book
froggey has quit [Ping timeout: 276 seconds]
<mariari> https://dl.acm.org/doi/10.5555/320040 I belive this is the book
<mariari> should be 400 pages or so. But it uses interaction nets as the representation
<lisp123> Thanks! I will read through it
<mariari> note that some research has come out since to solve the major issue with this strategy though it requires you to be under elementary complexity
<mariari> also no one has properly compiled this to a stack machine yet, though it is possible
<mariari> so current models of this are actually slower than you'd like, but you do get optimal sharing
<lisp123> I see. These are all interesting stuff, head scratching a bit ;)
skyl4rk has joined #commonlisp
<mariari> it's fine the model itself is rather basic to write, just needs to wrap your head around it
<lisp123> Yup. for now I need to write down everything about continuations before I forget it
jimka has joined #commonlisp
tfeb has quit [Quit: died]
froggey has joined #commonlisp
SAL9000 has quit [Quit: router reboot :)]
<jcowan> State machines are like "Be in a state, read an input, decide based on the state and the input what state to go to. You start in the start state and end in the end state.
<jcowan> "
jimka has quit [Ping timeout: 258 seconds]
<jcowan> It's a model of computation that is suprisingly powerful given its complexity.
<jcowan> Regular expressions (without backtracking and such) can be computed by a state machine.
<lotuseater> lisp123: did you already worked through chapter 20 of "On Lisp"?
Bike has quit [Quit: Connection closed]
<lisp123> lotuseater: yeah, actually twice. I forgot it the first time (1 week ago), and now writing some notes so I don't forget again
<jcowan> s/complexity/si,mplicity
peterhil has quit [Ping timeout: 252 seconds]
<lotuseater> I also found it a good complement to see how continuations work as monads, but I know I don't understand the concept in full upto now.
<lisp123> Do you get it now?
<lotuseater> read the sentence again :)
<lisp123> English is an ambiguous language ;) It could mean you didn't understand the concept until now (but now do) or you didn't understand the concept up to the point in time which is now (and now don't)
<lisp123> I presume the former though
<lotuseater> yeah you're right
<lisp123> Just wanted to be sure :D
<lotuseater> No, this is one thing in a looong list of stuff and concepts I'm not yet aware of.
<lotuseater> hehe okay
<lotuseater> we could also query again or tomorrow if you want
<lisp123> Oh so you still need to understand it?
<lotuseater> of course
<lotuseater> better as just to pretend to understand something for real
yitzi has joined #commonlisp
Bike has joined #commonlisp
attila_lendvai has joined #commonlisp
jimka has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
amb007 has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
azimut has quit [Ping timeout: 244 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
SAL9000 has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
attila_lendvai has quit [Ping timeout: 245 seconds]
selwyn has quit [Read error: Connection reset by peer]
jimka has quit [Ping timeout: 252 seconds]
cosimone has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
lisp123 has quit [Ping timeout: 258 seconds]
<pjb> And note that since our computers have a finite memory size, they're not turing machines, but state machines!
Bike has quit [Quit: Connection closed]
<Xach> enjoy a new quicklisp dist update this day
<nij-> Thanks Xach! query-repl seems pretty cool :)
<mfiano> I think I was the first one to pull it. I just so happened to check this month about 5 minutes before the announcement.
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
elf_fortrez has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
selwyn has joined #commonlisp
amb007 has joined #commonlisp
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<lotuseater> pjb: good point :)
froggey has quit [Ping timeout: 272 seconds]
<mfiano> Xach: Does Quicklisp keep metadata about which commit was pulled for vcs projects? Would be nice to have if not in the event the dist version matches the date latest commits were made to a project to know if I should manually clone.
<mfiano> After some extra detective work I discovered I just missed the changes I was hoping for. Oh well
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Bike has joined #commonlisp
froggey has joined #commonlisp
attila_lendvai has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
azimut has joined #commonlisp
amb007 has joined #commonlisp
jimka has joined #commonlisp
rain3 has quit [Ping timeout: 240 seconds]
jmhimara has joined #commonlisp
<Xach> mfiano: it doesn't, but that's a goal
silasfox has quit [Ping timeout: 250 seconds]
<mfiano> I see
lisp123_ has joined #commonlisp
silasfox has joined #commonlisp
lisp123 has quit [Ping timeout: 276 seconds]
attila_lendvai has quit [Ping timeout: 272 seconds]
selwyn has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
jimka has quit [Ping timeout: 245 seconds]
duber has joined #commonlisp
amb007 has joined #commonlisp
attila_lendvai has joined #commonlisp
jimka has joined #commonlisp
<pjb> I doubt that's a goal, the issue has been closed without discussion.
amb007 has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
amb007 has joined #commonlisp
kakuhen has joined #commonlisp
tyson2 has joined #commonlisp
silasfox has quit [Ping timeout: 258 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
silasfox has joined #commonlisp
attila_lendvai has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<jeosol> pjb: looked at the link briefly. Does your code solve the issue and is it something that can be integrated in to the main ql branch. It will be nice to have hash codes for precision
duber has quit [Ping timeout: 240 seconds]
santiagopim has quit [Remote host closed the connection]
<pjb> jeosol: it solves it only partially: it retrieves the information that is used by quicklisp, ie quicklisp-projects. But in this database, there is only the place where to find new release. Quicklisp performs the git cloning but doesn't record the actual commit it gets (nor the branch or tag).
<pjb> jeosol: with my code you can at least easily find if a system comes from github, gitlab or some other place, and you can make your own clone.
<pjb> But you have some strange things.
<jeosol> pjb: I see. thanks for explaining that ...
<pjb> For example, currently cl-base64, which comes from kmr, contains a defpackage that uses the old API, but the code to intern the symbol uses format like in the newest commits, which actually use the new API. I can't find a consistent commit in kmr repository for the current cl-base64 distribution state.
jimka has quit [Ping timeout: 258 seconds]
peterhil has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
hafat has joined #commonlisp
<mfiano> huh. first time i saw an issue closed without even a comment
cosimone has quit [Quit: ERC (IRC client for Emacs 26.1)]
cosimone has joined #commonlisp
dsk has joined #commonlisp
yitzi has quit [Quit: Leaving]
silasfox has quit [Ping timeout: 240 seconds]
silasfox has joined #commonlisp
selwyn has joined #commonlisp
attila_lendvai has quit [Ping timeout: 250 seconds]
nij- has joined #commonlisp
rgherdt_ has joined #commonlisp
<etimmons> mfiano pjb : I don't know why that one was closed, but there's also this open issue that touches on some of the same things https://github.com/quicklisp/quicklisp-controller/issues/18
pve has quit [Quit: leaving]
selwyn has quit [Read error: Connection reset by peer]
lisp123_ has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 276 seconds]
cosimone has quit [Remote host closed the connection]
<pjb> well, there's at least that.
jimka has joined #commonlisp
rgherdt_ has quit [Ping timeout: 245 seconds]
rgherdt_ has joined #commonlisp
lisp123 has joined #commonlisp
rgherdt_ has quit [Ping timeout: 256 seconds]
<Xach> I didn't realize I didn't already have pjb blocked on github.
nirnam has quit [Ping timeout: 245 seconds]
<Xach> I don't want anything to do with pjb for any reason.
rgherdt_ has joined #commonlisp
rgherdt_ has quit [Ping timeout: 256 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
notzmv has joined #commonlisp
copec has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lisp123 has quit [Ping timeout: 258 seconds]
jimka has quit [Ping timeout: 250 seconds]
jmhimara has quit [Quit: Client closed]
sander has quit [Ping timeout: 250 seconds]
random-nick has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 258 seconds]
dsk has quit [Ping timeout: 256 seconds]
duber has joined #commonlisp
duber has quit [Client Quit]
gaqwas has quit [Ping timeout: 276 seconds]
<lotuseater> oh