IRC channel logs

2025-08-11.log

back to list of logs

<ttz`>Here are the procedure in question and the relevant part of the bytecode: https://paste.debian.net/1390758/
<identity>(< n 2) iff (< n 4), as inequality is transitive, so if (< n 2) you presumably do not need to evaluate (< n 4)
<ttz`>Also, I do not understand why the compiler cannot manage to avoid the two move instructions at the end of the loop.
<ttz`>Yes indeed identity !
<ttz`>and disassembling the corrected dummy procedure shows both checks are present
<ttz`>does this qualify as a but of the optimizer?
<ttz`>bug*
<cow_2001>do you know any programs using exceptions in guile?
<cow_2001>something with which i could figure out how to use them?
<cow_2001>effectively
<dsmith>ttz`, Recently (within a few weeks?) someone posted a nice article on optimizing Guile code.
<dsmith>Didn't save the link, but it's probably in the logs. See the /topic
<dsmith>ttz`, Found it! https://dthompson.us/posts/optimizing-guile-scheme.html
<dsmith>sneek, optimizing is https://dthompson.us/posts/optimizing-guile-scheme.html
<sneek>Understood.
<dsmith>sneek, optimizing?
<sneek>Its been said that optimizing is https://dthompson.us/posts/optimizing-guile-scheme.html
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>There's a good little bot..
<sneek>ACTION wags
<ttz>thanks for the link, dsmith but I had already read it
<ttz>I am already using all these techniques
<ttz>but he mentions somewhere that Guile >v3.0.9 helps with some optimizations, and my version is the v3.0.9 so maybe I should try upgrading
<dariqq>hello. I am struggling a bit with match. I know how the head and the tail of a list look like but there are some bits in the middle( of variying length) that I would like to just ignore. is this possible with a single match or do i first need to match the head then loop through the rest until i hit the known tail
<dariqq>for context i am trying to parse an rss feed as sxml and would like to get the rss feed items and ignore the metadata fields
<identity>dariqq: you could do something like (find-tail (λ (x) (eq? (car x) 'entry)) sxml) i would imagine
<identity>the docs for ‘match’ seem to suggest you could do something like (match sxml ((head ('thing-i-do-not-want . etc) ... ('stuff-i-do-want . etc) ...)))
<dariqq> this results in a funny error: source expression failed to match any pattern in form (match-syntax-error "multiple ellipsis patterns not allowed at same level")
<dariqq>my current way works but it would be a bit more elegant to parse the entire file with just one big match
<identity>dariqq: huh, i guess i should learn how match work
<ArneBab>wingo: do you have an up-to-date list of compiler tasks?
<mwette>(match '(1 2 3 4 5) ((a b ... c) c)) => 5
<dpk>yeah, like syntax-rules, foof’s match does not support more than one ellipsis per list/vector
<dpk>this makes implementation a lot simpler but it annoys me regularly too
<dpk>if i ever get around to finishing my identifier properties patch for Guile, SRFI 262 will work, which does support multiple ellipses
<dpk></shameless plug>
<dpk>oh, the person who originally asked the question left