IRC channel logs
2026-09-22.log
back to list of logs
<dthompson>r7rs 'define-library' has a killer feature: cond-expand <ArneBab>arg, it’s midnight already here … need to go. Thank you for the good discussion, and cu <dthompson>I think a perfect library syntax would be to take r6rs 'library', add in cond-expand, and remove nested top-level forms <dthompson>define-module makes two big mistakes: implicit imports and duplicate import handling <dthompson>oh three mistakes: arbitrary code can be used to compute imported names. <dthompson>what's the evaluation environment for that code? I'm defining the module over here! <duncan>one other difference is that some older guile libraries actually take the R6RS top-level semantics and the macros cannot easily be ported due to phasing issues <duncan>the PEG parser generator for example <old>I don't mind adding module aliases, (ice-9 ftw) -> (guile ftw) and we start naming new module under (guile ...) <old>however, (ice-9 ...) is here to stay forever. It will never be removed for the good reason that everything online (tutorial, blog-post) can be reproduced by just copy/pasting them <old>That being said, we can certainly explain that legacy namespace in the documentation <old>but we need to keep them as aliases for pretty much ever <old>I would not mind also introducing some aliases for the S <old>not sure if it is worth it tho. But could certainly help with discoverability <duncan>alias it to a (guile) namespace? <dsmith>Would it work to just `ln -s ice-9 guile` ? <JohnCowan>the reason r7 libraries begin with define-liibrary instead if library is so that r6-only systems can fail fast on importing them <JohnCowan>the reason for implicit import is to reduce ceremony <old>dsmith: Perhaps. It is worth considering. But what should be the answer to (equal? (module-name (resolve-module '(ice-9 ftw))) (module-name (resolve-module '(guile ftw)))) <old>in other words, if we managed to just make ice-9 a symlink to guile <old>this will breaks some program that are excepting ice-9 in the module name <old>Also, unrelated to module-name, but source location would be different <dsmith>Bah. Yeah, the name exists in more than once place. <old>I would need a new guile frame filter I suppose, but you get the gist <old>I guess that would not be problem if the symlink is from guile to ice-9 <old>but there are little details like this that needs to be think of to make a robust solution <rlb>Offhand, that makes me uneasy. If we decide to just move away from ice-9, could we use some variant of just freezing it, and then (ice-9 foo) stays the same indefinitely. Any relevant (guile foo) starts off as a (proper) superset, perhaps implemented via either re-exports from the corresponding ice-9 module, or some new shared "implementation" module, and then (guile ...) can diverge if/when needed. <rlb>Or rather, that would decouple some of the decisions. <lechner>old / dthompson / ArneBab / Please consider a name other than (guile) for the (ice-9) alias. Please don't go from weird to useless. Isn't there something more descriptive? <lloda>if you're a beginner, there are lots of things that are more confusing than ice-9. The argument against ice-9 is aesthetic <lechner>My house cleanings are often motivated by aesthetic feelings. <dthompson>the argument against ice-9 is not aesthetic. it's motivated by feedback from real users. <dthompson>that there may be things more confusing than ice-9 doesn't mean that ice-9 is not an issue. <raen>i sent a question earlier today when i wasn't logged in and it doesn't show up in the logs. did it still get sent to the channel or was it dropped silently? <dthompson>raen: I don't see any question. looks like it was never sent. <raen>dthompson: thx, i'll resend it <raen>i'm trying to get a chickadee live coding environment set up, but i'm confused how `chickadee play --repl-server` and `geiser-connect` interact. i can run the command and connect via geiser, but it looks like geiser's context is different to that of the running game <dthompson>raen: sounds like you aren't evaluating things in the right module <raen>say i'm trying to live-code the third example from https://dthompson.us/projects/chickadee.html (below "can render vector paths"). if i run `chickadee play --repl-server canvas.scm` and run `geiser-connect`, evaluating `radial-gradient` throws an error that it's unbound <dthompson>make sure you are in the correct module at the geiser repl <dthompson>this whole 'chickadee play' thing is very underbaked but the basic gist is that it creates a dedicated module for the top-level program that it evaluates <raen>oh nice, that's it! fantastic :) <old>I can remember when I started learning Guile, something like 8 years ago, I was confused by ice-9 and avoid it. Thinking it was a third-party lib <old>so I get the argument totally and will make so that user actually use the standard lib of Guile instead of avoiding it <old>lechner: do you have a proposition for another name ? <lechner>old: Was the (guile) suggestion motivated by a potential interoperability with other Schemes? <old>it is purely to make ice-9 less confusing <old>these API are Guile specific anyway <lechner>old: OK. Would (common), (universal), or (general) reflect the original intent more clearly? <old>it really depends. (ice-9 ftw) is for file-system. It should be something like: (fs walk) <old>but then, it is okay for Guile to claim this module name. Perhaps <graywolf>I missed large part of the debate, I IMHO Guile should stay under either (or both) of (guile) and (ice-9). I personally do not even like the (web) and (texinfo) prefixes it already occupies. <graywolf>Otherwise it will be fun to tackle with the random module loaded from another source. E.g., if we get support of JSON and put it into (json), it would be fun to debug whether I have guile-4.0-latest's (json) or guile-json-4's (json) loaded. Due to propagated input, it could be very much not fun to figure out. <ArneBab>dthompson: feedback by users means that there’s a problem. It does not mean that the problem area is identified correctly. That’s why I sent a proposal to guile-devel to first fix the problem with the least amount of collateral damage: make sure that people actually learn what ice-9 is from documentation. We only had a single point where ice-9 was explained, and that was a footnote. <ArneBab>dthompson: aside: I stole your idea of chickadee play for enter-three-witches: ./game --run FILE. I used to think that a bit redundant but found it actually extremely useful for writing tutorials. <lechner>ArneBab / dthompson / old / graywolf / I like the patch. It addresses an unrelated issue in the documentation, which would change again if the namespaces were to be realigned. Since there is no agreement at hand on the latter, the patch should be uncontroversial. <rlb>graywolf: I agree with you. My current inclination is to prefer a set of specified module prefixes for modules that are part of guile, in part to avoid the potential for conflicts, but I also think "opinions vary". <dariqq>is there some general guidance on "Error while printing exception.". I rewrote it again and i get a proper exception now but Id like to know what goes wrong <daviid>fwiw, i am (strongly) opposed to renaming ice-9, and opposed to this 'ban' to add modules there if/when necessary - I don't bye that argument that new comers are confused up to the point that 'it would make them leave guile', this just makes no sense - they just have to ask here, in our ml, and/or search and read the manual, or even ask 'on the web' - i just made a search for 'what is guile ice-9', and I hardely beleive those new comer <daviid>users wouldn't get it in minutes after readind one or a few answers <lechner>daviid: Are you making an argument on the merits of (ice-9) or do you just want things to stay the same? <dariqq>(my problem was a custom exception printer) <graywolf>From my impression (which might be completely off :) ), (guile) and below if for "core" stuff, and (ice-9) and below is for "batteries" (to borrow the python term) <ArneBab>graywolf: from what I understand, that’s not too far off: (guile) is what you get in the REPL and (ice-9 …) is what you can pull in as batteries (seed crystals ☺). <dthompson>(guile) is the special, implicitly imported module in all 'define-module' style modules that are not marked as #:pure? <dthompson>(guile-user) is the default REPL environment <mwette>lechner: It will match anything, but it should probably be _. I think I was using that because I ran into issues using _ in some other context. I'm guessing _ may also more effient since it does not need to allocate a slot. <dthompson>which is ephemeral and has no place in the file system <mwette>I can fix that for next release. <ArneBab>dthompson: thank you for the clarification. I should have seen that (since the REPL explicitcly says scheme@(guile-user)> ) <mwette>I found 3 other instances in that file. <lechner>mwette: Please don't worry. I am merely updating my procedural interface to the FFI Helper. You changed four other occurrences in 4.0.0. I am just trying to figure out what you did. <mwette>I think I remember now. I was testing with a custom `match' implementation that used define-macro. That one was having problems (see boot-9.scm). I no longer need to include that (since mes now has a stripped-down/customized version of nyacc.) I am going to remove, as _ is more correct. <lechner>mwette / OK. What does (@ . ,attr) do please? It was recently added to two enum-defs. <mwette>It grabs the optional attributes in an sxml form. At some point enum-defs may need to support a `packed' attribute. <lechner>mwette: Okay, thanks! I've never used the sxml-match procedure myself. <lechner>mwette: Why did you retype ddict as a vlist, please? <mwette>huge speedup; using it for c parser also <lechner>mwette: That's great! I can't wait to see it in action. <lechner>mwette: parse-c99 no longer returns multiple values? <mwette>It no longer returns multiple values. You provide a parameter to stuff the defs-dict into. IMO, a function that returns mulitple forms for different inputs (i.e., single value or multiple values) is poor architecture. (Well, you could argue that Ada accomodates this correctly.) <lechner>mwette: actually, I had that one already <lechner>for some reason, I arrived at that independently a few months ago <mwette>the returned forms, including the seed, are processed on line 1575