<daviid>tohoyn: (and any other g-golf users), g-golf callback (GICallbackInfo) support pushed! to the devel branch, let me know, when you have some free time, how this goes on your side ... <lilyp>apteryx: browsers are smart, yes <ArneBab>apteryx: you need an actual server for a lot of Javascripty-stuff. ***ec_ is now known as ec
<GNUtoo>hi, I'm new to scheme, and I was wondering if it was easy to parse a scheme file with guile? <GNUtoo>Basically I've some scheme code in a file and inside that code there is a variable that I'd like to extract <GNUtoo>The issue is that I just want to get the variable content without having to compile / eval all the file, is that possible? <unmatched-paren>GNUtoo: as in you want to access an AST or something? scheme's simple syntax means you can just (read "FILE") <unmatched-paren>so a file containing (display (string-append "foo" "bar")) would read as (list 'display (list 'string-append "foo" "bar")) <unmatched-paren>quote and unquote will probably be expanded into (quote ...) and (unquote ...) <GNUtoo>Is (display (read port)) supposed to display me the full file content? <unmatched-paren>so you could loop over them with something akin to `while read(port) != #<eof> { ... }` <GNUtoo>Here I just need to evaluate a symbol in a file that has modules that aren't installed, so I'll try to make a recursive function to find that symbol and then I'll just eval it <GNUtoo>Hi again, is there some way to make guile not output such messages: ";;; note: source file [...] newer than compiled [...]" ? <GNUtoo>I've written a scheme program that prints some CFLAGS, and I'd like to use it inside the autotools (./configure --enable-strict-cflags) <GNUtoo>However stderr seems to be printed somehow when trying to do that <unmatched-paren>GNUtoo: that message just means your compiled guile object files are out of date, recompiling them will make that error go away <GNUtoo>Indeed there is a cache and so on, but I wondered if there was another way to make it go away ***karlosz_ is now known as karlosz
*GNUtoo guesses that some people need to write tools that use stdout and stderr and don't want that message so I guess that there is some way to do it <unmatched-paren>but generally i thought stderr shouldn't really be parsed or manipulated in any way except to redirect it to log files? <GNUtoo>dialog for instance does that where the stderr output is parsed by scripts and stdout is the dialog <GNUtoo>I'll try to workaround but the issue is that I don't know how to write portable shell scripts <unmatched-paren>often i encounter tools where the stdout can be programmatically manipulated, but the stderr is basically a log *unmatched-paren wishes unix had `stdlog` for that... <unmatched-paren>GNUtoo: i know, but i'm thinking more of a fourth standard stream that can be directly viewed. that way stderr would be freed up for actual errors. <GNUtoo>Hmmm that would probably complicate more things as it might work well for some use cases but less well for others <unmatched-paren>for some reason loads of applications abuse it for non-error log messages. <unmatched-paren>anyway, it would break backwards compatibility far too much, so let's just pretend i never said that :) <GNUtoo>So maybe some special tool could do that instead (like get streams from fd or something like that) though here it wound't help much as the goal is to be as simple and portable as possible <civodul>GNUtoo: GUILE_AUTO_COMPILE=0 should allow you to get rid of those messages <lilyp>well, in a sense stderr was meant not purely for errors <GNUtoo>In my case (guile 2.2 I think) GUILE_AUTO_COMPILE=0 still prints the messages <civodul>well, GUILE_AUTO_COMPILE=0 could have prevented auto-compilation that in turn triggered those messages, maybe <civodul>but that doesn't directly affect messages <GNUtoo>--no-auto-compile does the same (still the messages) <civodul>you can parameterize current-warning-port in your code <civodul>so (parameterize ((current-warning-port (%make-void-port "w0"))) ...) <GNUtoo>I still got the compiler messages <GNUtoo>Though if I change current-warning-port to current-output-port my prints are gone <civodul>presumably your code is not writing to current-warning-port, is it? <GNUtoo>My issues are just the messages that the interpreter itself prints to stderr <GNUtoo>I was wondering if there was a way to disable them but I found none <GNUtoo>Thanks anyway for the information, at least I learned about redirecting stdout/stderr inside scheme code ((parameterize ((current-warning-port (%make-void-port "w0"))) ...)) <daviid>GNUtoo: fwiw, i've successfully used --no-auto-compile with guile-2.2, worth investigating why it doesn't work inyour case, my1c <daviid>to be used 'only' on app launching scrit imo, all other modules should be precompiled ... *GNUtoo will pastebin the details <daviid>GNUtoo: can you add --no-auto-compile to your cflags.scm script <daviid>exec guile --no-auto-compile -s "$0" "$@", not exec guile -s "$0" "$@" <daviid>then chmod a+x cflags, then ./cflags <ArneBab>but then it will be much slower, right? <daviid>all other modules,as i said above, should be precompiled/installed <daviid>anyway, ijuat wanted to 'debug' the --no-auto-compile not being honoured, which doesn't make sense <daviid>GNUtoo: please try and let us know