IRC channel logs

2020-08-03.log

back to list of logs

<str1ngs>RhodiumToad: I might have missed your example. do you mind pasting it again. thanks for the help by the way.
<RhodiumToad> https://dpaste.org/jQo1
<str1ngs>RhodiumToad: great I will check this out thanks. datum->syntax is new to me.
<str1ngs>will read the docs though
<str1ngs>RhodiumToad: thanks this helped particularly the data->syntax
<str1ngs>* datum->syntax
<RhodiumToad>(also #`(... #, ...) is like `(... , ...) but for syntax trees rather than ordinary data, but I assume that is obvious)
<str1ngs>not so obvious to this noob. but I have seen that syntax before. my skills at quoting are only at `(... , ...) :)
<cyclopsian>is there a proper way to catch an exception (to add some metadata) and then rethrow it while preserving the original stack trace?
<RhodiumToad>that might depend on the guile version - are you looking at some version in particular?
<cyclopsian>I'm on 3.0.4
<RhodiumToad>so if I understand it right, in a with-exception-handler that doesn't specify unwinding, then raising any other exception will keep the same stacktrace as the original one
<wklew>Hi guile, I'm working on a library for probabilistic programming and thought I'd share here: https://git.sr.ht/~wklew/guile-hansei
<wklew>I just finished the tutorial in the readme and would love some feedback, esp. people who are new to the concepts discussed
<wklew>it's based on an OCaml library by oleg kiselyov
<jgart>do guile have something like "repeatedly"? https://docs.hylang.org/en/stable/language/core.html?highlight=partition#repeatedly
<jgart>*does
<RhodiumToad>it doesn't have a native concept of that kind of iterator, afaik
<RhodiumToad>there are primitives from which such things can be constructed
<jgart>RhodiumToad, do you know off hand what primitives might be good candidates to construct repeatedly?
<RhodiumToad>you might see srfi-171 and srfi-158 (guile3 has the former but not the latter)
<RhodiumToad>even with just srfi-171, you can do things like (generator-transduce (ttake 5) rcons (const 1))
<RhodiumToad>the (const 1) can be replaced by any function, and it will be called repeatedly
<RhodiumToad>e.g. (generator-transduce (ttake 5) rcons (lambda () (random 10))) returns a list of 5 random numbers
<jgart>RhodiumToad, thank you and thanks for the example! I'm reading more about srfi-171 here: https://www.gnu.org/software/guile/manual/html_node/SRFI_002d171.html
<cyclopsian>hmm, with-exception-handler does work, but now my issue is there is no easy way to do that from a C function
<cyclopsian>is there a reason that everything in exceptions.h is marked internal?
<cyclopsian>it looks like those are what should be used externally now in 3.0+
<RhodiumToad>that'd probably be a question for wingo
*RhodiumToad does not know
<cyclopsian>thanks for the help, that pointed me in the right direction :)
<pkill9>if i run `guix repl`, (%package-module-path) includes extra channels, but when run with guile it doesn't, anyone familiar with guix know why?
***terpri__ is now known as terpri
<notvivi>hello
***daviid is now known as Guest85663
<leoprikler>pkill9: that'd be different from guile itself is no real surprise, since guix does load a lot of modules that guile on its own would not
<leoprikler>I don't know an answer to 42688 however, which is started with guix repl
<leoprikler>interestingly though, ignore-dot-guile is forced to #t when loading scripts
<leoprikler>perhaps that's an issue
<dsmith-work>Hey Hi Howdy, Guilers
<a_v_p>wingo: Hello! wingolog.org TLS certificate has expired on July 30.
***guix-vits is now known as LibreCat
***LibreCat is now known as guix-vits
<ArneBab>RhodiumToad: why do you need (lambda () …); doesn’t (λ _ …) work? Is it to make it explicit that the proc cannot take any arguments? (because ((λ _ #t) 'arg) works, but ((λ () #t) 'arg) does not)
***terpri_ is now known as terpri
<RhodiumToad>the () makes the lack of args explicit, yes
<jgart>Hi, I have these guile modules but I am not able to load module sg1 in the module pc-ops https://notabug.org/ccao001/gac
<jgart>Any help is greatly appreciated
<jgart>Am I loading the modules incorrectly?
<jgart>I want to do for example (transpose-all %trichords) in the pc-ops.scm file %trichords is in sg1.scm
<jgart>or how do I load the the module(s) from the guile repl
<rekado>jgart: the module names are (gac sg1) and (gac pc-ops), so these files are expected to be found in gac/sg1.scm and gac/pc-ops.scm, respectively.
<rekado>the directory containing the “gac” directory should be listed in the list of colon-separated directories in the GUILE_LOAD_PATH environment variable.
<tinga>rekado, cd gac; GUILE_LOAD_PATH=`pwd` guile then (load-from-path "pc-ops.scm") yields "no code for module (gac sg1)". How comes?
***Guest85663 is now known as daviid
<daviid>tinga: jgart: 6.20.4 Modules and the File System