IRC channel logs
2025-08-11.log
back to list of logs
<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`>and disassembling the corrected dummy procedure shows both checks are present <ttz`>does this qualify as a but of the optimizer? <cow_2001>do you know any programs using exceptions in guile? <cow_2001>something with which i could figure out how to use them? <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 <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>oh, the person who originally asked the question left