IRC channel logs

2024-10-23.log

back to list of logs

<shcv>hmm. now how do I get the module from evaling the contents of a file that has a (define-module ...)?
<rlb>shcv: loading a file could produce 0-n modules, so there's no trivial way to know (I think).
<rlb>(well executing/evaluating the contents of a file, perhaps...)
<old>ArneBab: What's that syntax? #(...) for procedure
<rlb>(or a corresponding .go)
<shcv>rlb: yeah, I think I'm going to have to parameterize on the module name too
<lampilelo>old: https://www.gnu.org/software/guile/manual/html_node/Procedure-Properties.html
<old>lampilelo: ehh this is not in doc of 3.0.9
<old>wish list: A site that shows new/modified texinfo nodes from two version of Guile
<lampilelo>old: stuff like that is usually listed in release announcements
<elb>Good morning/TZAG all! Is there any commonly-used convention in Guile (or scheme in general) for filename extension for scheme data in the form of s-expressions, like .eld for elisp or .lsd for lisp? I see that Emacs recognizes .sld, but I'm not sure I've ever _seen_ a .sld file.
<ekaitz>elb: sld are normally used for R7RS libraries
<ekaitz>elb: if you read chibi-scheme's code, for example, you are going to see many
<dthompson>in guile everything is .scm typically
<ekaitz>i would use .scm directly
<dthompson>code is data, data is code after all
<elb>ahh yes, I haven't used chibi-scheme
<elb>ok, I can just use .scm; I feel like it's valuable to note that "hey, this file will absolutely not be eval'd", though (which is where .eld/.lsd come from)
<ekaitz>elb: i'm not going to talk much about it because this is Guile's channel but the author of chibi, Alex Shinn is made many scheme things, including Guile's match, and is the editor of the R7RS small...
<ekaitz>s/is/has/
<ekaitz>chibi is very interesting implementation
<ekaitz>(guile is way faster though :) )
<elb>I'm sure chibi is great, and perhaps someday I'll look at it. I've used several scheme implementations over the years; I'm currently using guile because a) it's fast, b) it _starts fast_ c) it has pretty good package support
<lloda>it's strange that (define x) isn't a syntax error
<lloda>hmm it is in racket, but not in chez
<ekaitz>lloda: chibi says syntax error, too
<ekaitz>lloda: looks like (define a) defines a as undefined
<ekaitz>even if that doesn't make any philosophical sense
<lampilelo>true, let's define something and say it's not defined
<lampilelo>i guess, technically speaking, the variable gets defined, by the value for it doesn't
<ekaitz>but ...!
<ekaitz>is it a value if it's not defined?
<ekaitz>hehe
<mwette>ekaitz: To be pedantic, it's #<unspecified>. So, `(define x)' is Guile syntax sugar for `(define x (if #f #f))'
<ekaitz>oh yes, that's very different :)
<ekaitz>i prefer that name, yes
<ArneBab>old: #(...) is literal vector syntax. In guile if you write a literal vector as first element (or first element after the docstring), but not last element, of a procedure documentation, that becomes the procedure properties.
<ArneBab>old: so the doctests are basically written in as arrays, which would look strange in every non-homoiconic language. But in Scheme that’s actually simply valid code.