IRC channel logs

2023-10-12.log

back to list of logs

<apteryx>what's the most idiomatic way to return early from a procedure? something like (return value) ?
<apteryx>(does something like it exist?)
<apteryx>ah, call/ec
<apteryx>I think I've never used that
<mwnaylor>apteryx: It is described in The Scheme Programming Language. I'm currently reading it, based up suggestion on #guile, maybe #scheme. https://www.scheme.com/tspl4/
<mwnaylor>Look for the section about continuations.
<RhodiumToad>also see let/ec
<old>^ let/ec is the way
<old>(use-modules (ice-9 control))
<old>(let/ec return (let lp ... (return 'foo)))
<apteryx>yep, let/ec is nice sugar
<haugh>mwnaylor, I think some people would be very sad if we did not note that, while continuations are specified by the Scheme standard, delimited continuations (such as escape continuations) are Guile extensions
<haugh>I'm reaching here because I'm new to them as well, but I think it's an acceptable oversimplification to say escape continuations are just prompts with (1) nothing in the handler and (2) only a handler call in the body
<RhodiumToad>haugh: also it is significant that they never need to materialize the continuation
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>!uptime
<sneek>I've been serving for 26 days
<sneek>This system has been up 27 weeks, 4 days, 18 hours, 39 minutes
<mwette>on prompts: https://wingolog.org/archives/2010/02/26/guile-and-delimited-continuations
<chrislck>sneek: botsnack
<sneek>:)
<sneek>wb chrislck :D
<ArneBab>cwebber: what I’m hoping for the most is a real Guile REPL in the browser. That’s when I can turn my tutorials interactive.
<ArneBab>cwebber: but this step is already pretty awesome!
<dthompson>ArneBab: we hope to get there, eventually.
<dthompson>hosting the whole compiler *inside* wasm is a big lift.
<ArneBab>dthompson: I know ☺ — and you’re doing an awesome job!
<dthompson>some intermediate goals along the way are supporting the module system, simple custom meta-circular evaluators, then real Scheme 'eval', and so on
<dthompson>we want to demo a simple in-browser REPL that uses a meta-circular evaluator for a subset of Scheme.
<dthompson>currently missing 'read' tho, kinda need that
<ArneBab>(and it would be cool to get wisp in the browser along the way — that would finally enable me to give my students a zero-install testing environment for algorithms)
<chrislck>ooh more repl
<dthompson>it will be nice to get things to the point where anything that can compile to cps will be compilable with hoot
<chrislck>(incase anyone missed it, I plan for gnucash-cli to offer guile repl with access to gnucash bindings)
<dsmith-work>Greetings, Guilers
<dsmith-work>sneek, botsnack
<sneek>:)
<mirai>is there a way to workaround the lack of timeouts in the (web client) http-get,… procedures?
<rekado>mirai: there is a way. We’re using it in Guix.
<mirai>I think Guix has its own http-… implementation no?
<mirai>would be nice to merge it into Guile
<lilyp>mirai: it's build on (web uri) et al.
<butingtaon>Hi everyone! Not sure if this is the place to ask this, but I want to replace my personal computer's cron with mcron so i can write job schedules in guile instead of the weird syntax stock cron has. I've tried googling around but there doesn't seem to be much about doing that on the net.
<butingtaon>Many thanks in advance
<lilyp>butingtaon: the answer will depend on your distro, but if there's an mcron package there should also be a way to use it "as cron"
<lilyp>perhaps update-alternatives in debian?
<butingtaon>Ah sorry, I'm on debian, and TIL "update-alternatives"! thank you I'll look into that
<lilyp>my personal recommendation is however to not mess with such things and do the guix thing of invoking mcron as mcron
<lilyp>saves you a bit of headache when you're on a system without that hack :)
<butingtaon>I'll keep that in mind, thank you
<haugh>guix has a bunch of awesome internals that I'm really tempted to use, but they're clearly not developed as public-facing libraries and AFAIK the only way to get full access to them is to run the guix executable as your main vm, which would be wild behavior. That said there's so much potential that I can't rule it out. I really, really like their records wrapper
<civodul>someday we’ll make (guix records) a separate library
<haugh>That's great news!