IRC channel logs

2021-08-30.log

back to list of logs

<roelj>When compiling something with Guile 3.0.7 I get: "Wrong type to apply: #<syntax-transformer foreign-library?>". While compiling with 3.0.2 seems fine. What has changed?
<roelj>To answer myself: https://www.gnu.org/software/guile/manual/html_node/R6RS-Incompatibilities.html
<roelj>But adding --r6rs to the guild command doesn't seem to make a difference.
<Zelphir>Has it become more or less conforming from 3.0.2 -> 3.0.7 then?
<roelj>That is an interesting question.
<roelj>I'm sure I'm doing something on the fringes of how I should use syntax transformers. So I'd like to avoid doing that in the first palce.
<Zelphir>Have to go, bye!
<tohoyn>daviid: what is the minimum version of Guile 3.0 required for G-Golf to work? is it 3.0.7?
*janneke pushes an updated wip-mingw branch
<janneke>arrays.test, bytevectors.test, numbers.test now also pass \o/
<dthompson>janneke: does jit work?
<sneek>dthompson, you have 1 message!
<sneek>dthompson, daviid says: same here, since switched to guile 3, and the latest geiser, not sure which causes the problem- if you find a solution, let meknow ...
***dsmith-w` is now known as dsmith-work
<dsmith-work>UGT Greetings, Guilers
<janneke>dthompson: no, i'm using --disable-jit
<janneke>wine throws a null pointer reference/usage immediately, so it seems
<dthompson>ah okay
<dthompson>I've given up on ever having guile work on windows
*chrislck is sad to hear about guile-on-windows
<leoprikler>Well, in actuality it is an error to say that some software runs on Windows.
<leoprikler>In truth, Windows runs beneath that software.
*dthompson hands out Grand Pedant award
*janneke just tries to keep some users happy...
*chrislck sad about windows-under-guile then
<janneke>it's unbelievable that crap didn't already die
<str1ngs>tohoyn: 3.0.7 I had asked him about that a couple of days ago. Also thanks for the deb packages, I do use them now and again.
<apteryx>is [0-9A-f] not a valid regexp range on Guile 3?
<apteryx>on guile 3.0.2 it isn't, but on guile 3.0.7 it seems to work fine. weird
<leoprikler>to be on the safe side A-Fa-f is the correct one
<leoprikler>(string-match "[A-f]" "G") = #("G" (0 . 1))
<dsmith-work>apteryx: Remember, Guile just uses whatever the C lib provides for regexp.
<dsmith-work>As Guile is moving more and more from C to Scheme, it might make sense to replace that with irregex or something.
<dsmith-work>For example, Guile can't handle NUL with regexps
<dsmith-work>scheme@(guile-user)> (map (lambda (s) (string-match "a.c" s)) '("abc" "aXc" "a\0c"))
<dsmith-work>$1 = (#("abc" (0 . 3)) #("aXc" (0 . 3)) #f)
<ArneBab_>Can I do a conditional import that does not fail when the module is not available, but uses a fallback?
<ArneBab_>concrete: If guile-websocket is not available, I just want to disable the option to use it.
<form_feed>Does guile include an http server?
<dsmith-work>form_feed: https://www.gnu.org/software/guile/manual/html_node/Web-Server.html
<form_feed>Yeah, was just reading that, thanks. Now I need a oneliner for serving static files locally.
<leoprikler>ArneBab_: On what level do you want to do that?
<ArneBab_>leoprikler: in scheme, so I can have a script that I can start with --testserver to use the websocket as stdout and stdin
<leoprikler>i mean that as in an (eval-when ) sense
<ArneBab_>but still work without additional dependencies to install on desktiop
<ArneBab_>what options do I have?
<leoprikler>should code already be excluded on the expand side or is it enough if it's missing from eval?
<leoprikler>if you just care about eval, doing a (false-if-exception (begin ...)) might just work
<ArneBab_>the hard problem is that the import must not cause a failure
<ArneBab_>(import (web socket server))
<leoprikler>oh, hmm
<ArneBab_>if I find no other solution, I’ll have to create a separate script
<ArneBab_>(didn’t think about that option before)
<leoprikler>hang on a sec, (import ) in the sense of load, yes?
<ArneBab_>in the sense of use-module
<leoprikler>in that case, as long as you don't put it in the top-level (define-module ) clause, you can absolutely use (false-if-exception) to wrap your import
<leoprikler>problem being that you might end up with a lot of "possibly unbound" variables from that module
<leoprikler>so ideally, you'd like to check that in a cond-expand-esque manner
<ArneBab_>where do I find fail-if-exception?
<civodul>ArneBab_: false-if-exception is in boot-9.scm
<ArneBab_>how do I import that?
<ArneBab_>(I don’t find it in the reference manual)
<leoprikler>it's included in your environment by default
<ArneBab_>warning: possibly unbound variable `fail-if-exception'
<leoprikler>false-if-exception
<ArneBab_>arg, that was a bad brain typo …
<ArneBab_>thank you!
<leoprikler>Alternatively, you can use autoloads, but then you'll get an exception when you actually load that thing
<ArneBab_>this already works for me — thank you!