IRC channel logs


back to list of logs

<rlb>wingo: nice.
<rlb>wingo: and I wonder if another option is to release the ltdl changes, with a plan to have a low-threshold followup release to revert it if it's too disruptive...
<rlb>If I had a bit more time I could test it in debian experimental across the buildds, but even if I don't, we'll find out right after the release when I'll upload to sid.
<rlb>(though debian's heading shortly to stage 2 freeze...)
<rlb>I'm planning to at least re-upload 3.0.5 with the async test marked flaky in the next few days.
<rlb>terpri: well at a minimum, the fact that you can crash python before it even gets goint with the wrong argument is probably a bug *somewhere*...
<rlb>i.e. the wrong sequence of bytes in an argv element -- it can't even put them into sys.argv without crashing iirc.
<ryanprior>Is there a good book or long-form tutorial about Guile that takes you through most of the useful SRFIs and language constructs?
<justin_smith>ryanprior: there are many great scheme books, I know of nothing guile specific but also haven't felt the need to look for it
<justin_smith>racket might have the best language docs period, and for the base language nearly everything is the same as guile
<mwette>^ book on guile
<rlb>Is there a way to get a test to show a backtrace on failure rather than just
<rlb>ERROR: asyncs.test: preemption via sigprof - arguments: ((wrong-type-arg #f "Wrong type (expecting ~A): ~S" ("resumable continuation" #<vm-continuation 7ff33842bcb0>) (#<vm-continuation 7ff33842bcb0>)))
<Sheilong>Is there a object +infinity in guile such that I could use in a procedure to find the minimum element in a set of values?
<rlb>Sheilong: +inf.0 and -inf.0
<rlb>more info:
<spk121>hello guile macro masters. How I define a syntax (aaa x) that converts to (bbb "x")?
<spk121>ok, figured it out. Had to wade into the weird world of syntax and datum.
***apteryx is now known as Guest52388
***apteryx_ is now known as apteryx
<spk121>OK, I've read the docs a couple of times and scanned the source code, but, I still can't figure out the new exceptions. How do I do a wrong-type-arg message in the new exceptions? Or more generally how do I make an exception with a message and some parameters? I wish there were examples
<civodul>spk121: you can still write (throw 'wrong-type-arg "proc" ...)
<civodul>(which itself was never quite documented)
<tohoyn>spk121: do you mean R6RS exceptions? you can raise an exception of any type, but it is better to use condition types.
<wingo>spk121: yeah the situation is not great, that would probably be a good place for us to spend effort over the next 6 months or so
<spk121>tohoyn: in the manual for 3.0.x, it says the new way to do exceptions is (ice-9 exceptions), which hopes to replace throw/catch
<wingo>getting everything converted over to a new exception system with good fallbacks for try/catch
*wingo tries to remember where things were going
<wingo>spk121: so exception objects are like mixins, you can have an exception object composed of other exception objects
<wingo>to translate an exception object to the "kind" and "args" that are passed to a throw handler or a catch handler, there are two ways
<wingo>one is if the exception is a compound exception which includes &exception-with-kind-and-args
<wingo>which explicitly specifies how the exception should map to throw/catch
<wingo>otherwise the kind is %exception and the args is (list exn)
<wingo>where exn is the exception object
<wingo>in the future it would be nice to make a more implicit mapping for specific exception kinds
<wingo>or it might be nice, anyway -- not sure
<wingo>there is one more moving piece here, which is what happens at "throw"
<wingo>in that case guile builds a new exception object including &exception-with-kind-and-args
<wingo>and probably some other exception types as well; there is the alist of exception converter procedures in (ice-9 exceptions)
<wingo>spk121: does that clarify things? currently for wrong-type-arg if you want "catch" to see wrong-type-arg the best way is to continue using "throw", until we define exception types for wrong-type-arg
<spk121>wingo: hmm, kinda. Let me try to code up a minimal example to see if I get it
<spk121>gah! the mkdtemp tests are wrong and are leaving temp directories in 'make check'. Let me fix that.
<ecraven>if I wanted to get things like (eof-object) (which should just return #!eof) into guile --r7rs, what should I approximately look at? just the source code of `install-r7rs!'?
<ecraven>or is that only for syntax? that's what it seems to do now
<wingo>is (eof-object) missing?
<RhodiumToad>apparently it is
<weinholt>ecraven, is this the repl? you might need (import (scheme base))
<lloda>master doesn't build, seems to require gperf (?)
<RhodiumToad>does it build if you have gperf? :-)
<lloda>it does
<civodul>wingo: in 3.0.5, if you use, say, 'condition' from (srfi srfi-35), you get an unbound-variable warning about 'make-compound-condition'
<civodul>i think that's a regression
<civodul>does that ring a bell?
***rekado_ is now known as rekado
<rekado>I’m seeing the same since 3.0.5
<rekado>it doesn’t seem to hurt at run-time, but at compile time I see the warning.
<chrislck>the unbound-variable warnings are weird -- in gnucash date-utilities.scm there's compilation warning about missing set-tm:mon and friends
<ecraven>ah, sorry, I had an old (define-syntax import ..) left over from guile2 :-/
<ecraven>is this valid code, assuming no such library is defined at all? (cond-expand ((not (library (lets-hope-no-one-defines-a-library-like-this))) (assert #t)) (else (assert #f)))
<ecraven>i.e. shouldn't this work exactly if it is *not* defined?
<tohoyn>I get plenty of warnings about possible undefined variables when I use guile-3.0.4 Tree-IL as an intermediate language for programming language Theme-D. Here is the code used to import the module causing problems:
<tohoyn>the compiled code gets executed correctly despite of the warnings
<tohoyn>can anybody help?
<tohoyn>i.e. how do I get the warnings away
<chrislck>tohoyn: something like (set! %auto-compilation-options
<chrislck> '(#:warnings (arity-mismatch format duplicate-case-datum bad-case-datum)))
<tohoyn>chrislck: I compile the Tree-IL to bytecode using guild
<tohoyn>why do these warnings occur at all? the variables that guile complains are defined and the code using them gets executed correctly.
<chrislck>tohoyn: beats me (I'm just a lvl.2 hacker) but in our code it indicated missing use-modules
<tohoyn>chrislck: ok
<chrislck>here's a snippet from gnucash compilation:
<chrislck>a weirder warning because set-tm:mon is in core
<tohoyn>chrislck: does the code using the complained variables run ok?
<chrislck>no trouble at all
<tohoyn>chrislck: this looks like a bug in guile
<chrislck>blasphemy, we don't complain about guile here
<chrislck>haven't been able to replicate this warning in repl
<chrislck>it may be in guild
<tohoyn>chrislck: I tried to reproduce the bug with a small code snipped but it didn't succeed.
***DadeBonetti1 is now known as DadeBonetti
<mwette>Are set:tm-mon etc defined in a loaded extension? I get warnings for procedures declared in a loaded .so file.
<chrislck>mwette: they're in boot.scm!
<ArneBab>wingo: I don’t think that Pythons string/bytestring thing is a disaster. The disaster is to enforce changing from "string is standard encoding" to "you have to do an explicit conversion", because that breaks lots of codebases. In short: py2->py3 broke lots of existing code. I have tools that have not yet been ported today. In all fairness: I’m the maintainer (but not the original creator). I already spent two weekends on the migration.
<ArneBab>That’s a cost an update should never incur.
<dsmith-work>{appropriate time} Greetings, Guilers
<rlb>Not sure if/when I'll get to it, but considering trying to add some additional support for unicode categories: i.e. some way to ask if a character is in a given 'Zs category, etc.
<weinholt>rlb, is it different from char-general-category in r6rs?
<rlb>hmm, no idea...
<rlb>Oh, if you mean what we already have, I need (char-general-category? ...) too.
<rlb>...or rather want, or rather really want to be able to combine say Zs Zp ... into one union category and then test against that.
<rlb>maybe -- I suppose for my current purposes, all I really want is decently fast dispatch for a set of categories, and maybe (case (category c) ((Zs Zp ...)) would do that now? I'll need to think about it further.
<spk121>rlb: there is a char-set:whitespace that is all of Zs Zl and Zp, if that helps
<mwette>So in posix-regex does \s map to (Zs Zl Zp) or #\space?
<apteryx>is there a way to set the exit status of a Guile script, prior to calling exit?
<apteryx>else to cause a srfi-64 test module to exit non-cleanly when there were failures?
<apteryx>or otherwise a way*
<rlb>apteryx: don't know if it's helpful, but for now in the scheme-side tests, I just used this hack:
<rlb>But I have to copy/paste that into every test, which is perhaps not ideal.
<rlb>spk121: hmm, perhaps that's exactly what I want -- thanks.
<rlb>I'll check later.
<apteryx>rlb: yes, that's how it's done in guile-ssh, but that breaks in Guile 3.0.5
<apteryx>you have to move the test-runner-fail-count call before test-end there, as the test-runner objects gets reset to #f
<apteryx>(at the time of calling test-end)
<apteryx>something could be done using a Scheme test driver I believe, but the quick hack so far is just making a binding for the exit status before calling test-end
<apteryx>then calling exit with it
<rlb>Ahh, right, forgot - I've fixed that locally, but haven't pushed yet.
<rlb>wait, I *did* fix that -- something odd's going on...
*rlb will check later -- may have pushed something wrong
<rlb>wrong repo...
<rlb>so yeah, similar hack:
<rlb>similar to what you suggested I mean
<rlb>I just wrapped it all up.
<wingo>did 3.0.5 introduce a breaking change?
<rlb>not sure -- i.e. not sure if it's breaking anything documented, but the change was that the test runner was no longer available after the top-level test-end, where previously you could get at the (arguably leftover) one.
***metro is now known as metreo
<spk121>speaking of srfi-64, one item on my wishlist / hacklist is to get our srfi-64 to properly expand error messages, instead of printing strings with format characters like (("wrong type ~S") . (bleh))
***sneek_ is now known as sneek
<civodul>spk121: ah sometimes it's good to see the raw throw arguments
<civodul>i wouldn't want it to be too smart ;-)
<dsmith-work>sneek: botsnack