IRC channel logs


back to list of logs

<apteryx>ACTION adds a bunch of r7rs library aliases
<Kolev>SXML or Skribe?
<rebiw>I'm having trouble using define-method for overloading +, when importing the module the sum function stops working it gets replaced by the method.
<rebiw>I tried using  (define-generic +) before and after the method creation. Is anything else required?
<festerdam>Hi, all. What do I do if a modules use-moduled overrides a built-in function. In my case (sxml xpath) overrides filter. How can I use the filter I want?
<festerdam>*overrides a built-in function?
<mange>festerdam: I don't fully understand what you mean, but the documentation in "(guile) Using Guile Modules" might be helpful? In particular: use-modules lets you add a prefix to imported names, import a subset of names, or rename things more generally via a function.
<festerdam>mange: What I meant is that (sxml xpath) apparently defines another «filter» function, so any function defined after the use-module with filter in its body will use the new filter. I will check it out. Thanks!
<mange>I would solve that by adding a prefix with something like (use-modules ((sxml xpath) #:prefix xpath:)). That would mean that all uses of that module need to be made with the prefix (like xpath:filter, but also xpath:sxpath, xpath:node-reduce, etc.).
<mwette>you can use (use-modules ((sxml xpath) #:hide (filter))) and use node-self as instead of filter
<mwette>s/as //
<isaneran>sup guilers
<sneek>wb tohoyn
<tohoyn>I have noticed that "guild compile" gives different .go file depending on the directory where the source code is stored and on the directory where the guild command is run. Why is this so? I'm using guile 3.0.8 on Debian.
<apteryx>the .go bytecode files include a reference to the source files, by default canonicalized to be found on the load path
<tohoyn>apteryx: ok. tx.
<apteryx>so depending on where you build, and whether or not the build directory is found on %load-path at byte compilation time, this will affect the result
<apteryx>to have things reproducible I think you'd want to have the build directory on %load-path; that's how it happens using the build system of Guile itself at least
<apteryx>you may want to look at bug #66046 if you'd like to understand more of the underlying canonicalization mechanism
<apteryx>I think I've found another problem with define-library
<apteryx>seems (import (srfi 160 u8)) translates to (use-module (srfi srfi-160)) (ignores last bit)
<apteryx>ACTION tries at the REPL with ,expand
<apteryx>hm, not sure how to use that 'import' from the REPL
<apteryx>it works from a .sld file
<apteryx>ah, the magic happens from r6rs-libraries 'library' form, which define-library expands to
<apteryx>specifically, resolve-r6rs-interface
<apteryx>yep there's a bug: (resolve-r6rs-interface '(srfi 160 u8)) -> ERROR: no code for module (srfi srfi-160)
<apteryx>SRFI 160 doesn't have a (srfi srfi-160) module