***Raimondii is now known as Raimondi
***Raimondii is now known as Raimondi
<chris3>I've checked manual and don't think I've seen it - anyone knows if it's possible to retrieve the full path+filename for an imported module source code? <chris3>e.g (use-modules (srfi srfi-1)) - wish to retrieve path to srfi-1.scm <chris3>alternatively how to find the exact filename containing code for an exported definition <chris3>because I'm doing coverage analysis and need to (add-to-load-path "/my/home/computer/modules") which is not elegant <chris3>so ideally something like (set! filepath (and (defined? 'my-function) (source-location 'my-function))) would store "/home/mycomputer/guilecode/module.scm" in filepath <mwette> maybe dig into the Guile module tree and chase down the implementation of `reload-module' <mwette>haha: (module-filename (resolve-module '(srfi srfi-1))) => "srfi/srfi-1.scm" <mwette>"haha" meaning "not super useful" <mwette>it looks like you may need to search %load-path in order <chris3>mwette thank you, looks like need to hard-code unfortunately <daviid>chris3: (dirname (search-path %load-path "srfi/srfi-1.cm")) <dadinn>question: how do I call a subprocess with system/system* interactively so I can respond to prompts? it seems by default it just ignores any prompts, therefore the calls fail <dadinn>I cannot use keys #:prefix and #:select consecutively. E.g. (use-modules ((local utils) #:select (println) #:prefix utils:)) would be invalid. I have to use (use-modules ((local utils) #:select (println)) ((local utils) #:prefix utils:)) <dadinn>Honestly, quite shocking to see such bugs in such core infrastructure :/ <mwette>dadinn: I can't duplicate your behavior. What version of guile are you using? <mwette>for example, `(use-modules ((ice-9 pretty-print) #:select (pretty-print) #:prefix pp:))' seems to work fine <mwette>It provides `pp:pretty-print' as expected. <dadinn>mwette: the version is 2.0.13+1-4 <dadinn>mwette: also, I thought #:select imports the symbol without applying the prefix, while everything else is through using the prefix... no? <dadinn>mwette: otherwise #:select doesn't make sense <mwette>dadinn: no: select chooses what you import; prefix sets a prefix for all those imported identifiers <mwette>dadinn: if you want to selectively add a prefix use #:renamer <ArneBab>dadinn: select limits the symbols you get to just the ones you select. Think of it as "select only". <mwette>daddinn: I always do (use-modules ((sxml xpath) #:renamer (lambda (s) (if (eq? s 'filter) 'node-filter s)))) <ArneBab>I nowadays mostly use (import (only (ice-9 pretty-print) pretty-print)), but without renaming or prefixing. <manumanumanu>dadinn: I also can't duplicate that, neither on guile 2.0 nor 2.2. How does your module look? <dadinn> ((local utils) #:prefix utils:) <dadinn> ((local utils) #:select (println process->string)) <dadinn>manumanumanu: shit, you are right, println is not in the exports :P <manumanumanu>haha! :D I have done that kind of error sooooo many times <dadinn>yeah, it seems to be working fine :) <dadinn>manumanumanu: testing it more, it seems I won't get any relevant error message in case utils fails to compile for some reason <dadinn>manumanumanu: is there a way to separately compile a single file? <manumanumanu>I have had some problems with modules that (load ...) other files <dadinn>`guile -l utils.scm` jumps to repl, so it is not good for just compiling a module to see if it has errors <mwette>To compile a module you can run "guile -c '(use-modules (local utils))' to get errors. <mwette>guild compile local/utils.scm also works but does not catch all errors <shymega>I'm not sure how to proceed, Guile works fine on my AMD processor, but on my laptop, which uses an Ivy Bridge processor (Intel), it fails. <ArneBab>shymega: is this a new Gentoo install? <shymega>ArneBab: Its a fairly new install, not that old, and I can't remember if I installed Guile myself, or if it got pulled in as a dep. <shymega>it doesn't have the issue, with the same Guile version on my AMD machine though. <shymega>which makes it particularly weird, but it does tie in with the machine instruction set error. <ArneBab>can you try to run it with MAKEOPTS="-j1" emerge … to ensure that we can be sure of the real first error? <shymega>sure :) that is, to compile GNUcash right? <ArneBab>I’m on Gentoo myself, but my setup has been more or less broken for the past year, so I can’t give you up to date info <shymega>Same result, crashed with "illegal instruction". <ArneBab>that was when trying t create guild, right? <ArneBab>(guild is the Guile module compiler) <ArneBab>;;; WARNING: compilation of /usr/bin/guild failed: <ArneBab>;;; failed to create path for auto-compiled file "/usr/bin/guild" <shymega>i get a warning about GUILE_AUTO_COMPILE <ArneBab>directly before the illegal instruction <shymega>sorry, i'm a bit tired today and not with it :P <ArneBab>no probs … I know that feeling all too well <shymega>i did my compilation with the git checkout, and not through portage... .. >_<, so gimme a few minutes, i'll just wait for Portage to do its thing