IRC channel logs

2025-02-15.log

back to list of logs

<ArneBab>old: thank you! Since you already have that preamble, you could make it configurable by making it just a fallback for a defined variable: GUILE="${GUILE:-$(command -v guile || command -v guile3.0)}"
<ArneBab>to test: GUILE=x bash -c 'echo "${GUILE:-$(command -v guile || command -v guile3.0)}"'
<AwesomeAdam54321>Hi, I have a question about the sin cos functions in Guile
<AwesomeAdam54321>Is there a way to have (sin 90) be equal to 1?
<AwesomeAdam54321>I can always round it of course, but I'm wondering if there's another way to have 90/180/270 degrees give precise results for sin and cos
<old>ArneBab: that's a great idea!
<old>However, correct me if I'm wrong, but this is a bash extansion?
<dsmith>old, ${ :- } is in dash also, so I'm assuming it's posix and not a mere bashism
<old>dsmith: shellcheck seems happy about it. Since I want my script to be compatible with plain shell (no dependency on ash)
<old>s/ash/bash
<old>ArneBab: applied and merged :-)
<dsmith>old, Yes, I always try and write my scripts without any bashisms as much as possible.
<ArneBab>old: nice!
<ArneBab>old: I know it from bash
<ArneBab>dthompson: is chickadee broken right now in guix? I get `guix shell guile-chickadee -- guile -c '(import (chickadee))' ` → could not find library ("libvorbisfile") — but this works: `guix shell --pure guile guile-chickadee -- guile -c '(import (chickadee))'`
<ArneBab>I use a locally built guile, can that be the reason?
<lilyp>ArneBab: you need Guile for GUILE_LOAD_PATH et al, I'd think
<ArneBab>lilyp: I have a working GUILE_LOAD_PATH
<ArneBab>lilyp: maybe the guile directly from guix includes an adapted path that finds libvorbis?
<ttz>Hi, I just stumbled on the Wadler's paper about deforestation (which is a source to source transformation aiming to aliminate intermediate lists for example when chaining functions on lists returning lists). An implementation of this idea if apparently part of GHC (from the Wikipedia page on deforestation). I was wondering whether such idea was applicable to scheme and if someone knew of a Scheme implementation performing this
<ttz>transformation.
<old>ttz: sounds like transducers?
<old>(SRFI-171)
<ttz>yes, they both solve the problem of intermediate collections, but deforestation is a program transformation: it does not require one to modify it's programing style
<ttz>that's why it can be added as an optimization step to a compiler
<old>ahh I see
<old>I suppose this requires the compiler to have primitives for such transformation for this to happen
<ArneBab>lilyp: my solution for now is to run with guix shell --pure