IRC channel logs

2019-09-22.log

back to list of logs

<ArneBab>guile change in speed since 1.8: https://www.pictshare.net/nnnimj.png
<ArneBab>using https://bitbucket.org/ArneBab/wisp/src/default/examples/evaluate-r7rs-benchmark.w and https://bitbucket.org/ArneBab/wisp/src/default/examples/evaluate-r7rs-benchmark.gnuplot
***slyfox_ is now known as slyfox
***amz3` is now known as amz3
***adriano is now known as Guest66166
<apteryx>hello; would someone know how to propagate an exception through a dynamic-wind?
<apteryx>any way to 're-throw' in the out guard?
<mwette>I don't believe dynamic-wind traps exceptions. I believe it executes the code in the out-guard and then that of the exception handler, if it exists.
<mwette>try (catch 'foo
<mwette> (lambda ()
<mwette> (dynamic-wind
<mwette> (lambda () #f)
<mwette> (lambda () (throw 'foo))
<mwette> (lambda () #f)))
<mwette> (lambda args (display "got it\n")))
<jcowan>mwette: That's the idea, yes. Any exit from the middle thunk of dynamic-wind causes the exit thunk to run, just as any entrance into it causes the entry thunk to run. It's not an unwind-protect (try-except) thing at all; it's for when you need to set and restore something dynamically.
<soda__hobart>hi
<soda__hobart>hey I just started with scheme and I have been playing around. I tried to write a function that prints a list, like this: https://bpaste.net/show/VqJL It does what I want, but at the end it throws an error for "unbound variable: nil" My thinking is that it if the func gets () as an argument, it returns nil, but I guess scheme doesn't work the way I think it does. How do I get it to break out of the recursion?
<rlb>Anyone know if there's any substantial performance difference between (catch ...) and call-with-escape-continuation (i.e. call/ec), or if there some other reason why for simple purposes it'd be important to pick one or the other?
<mwette>nil is undefined in Scheme; use #f or '()
<rlb>Is it important to try to have a "base" definition for your generic functions somewhere such that modules always import that, augment it, and then re-export, or is it typical to just let each module "define-method" at will, export the generic, and expect callers to use merge-generics?
<ArneBab>wingo_: did you see my speed comparison of Guile versions? https://www.pictshare.net/nnnimj.png — it also shows the only part in which 2.9.4 is significantly slower than 1.8: read1 (there 2.0 was factor 45 slower than 1.8, now 2.9 is only factor 6 slower)
<ArneBab>with Geometric mean, Guile 1.8.8 is factor 5 slower than 2.9, 2.0 is still factor 3.25 slower and 2.2 is factor 2.3 slower than 2.9