IRC channel logs
2025-07-30.log
back to list of logs
<ArneBab>lloda: does that change the scoping? <lloda>afaict no, because the begin already isn't in the scope of the match. I don't see any downside tbh <lloda>it's the same thing we've already done to when/cond/etc. <ArneBab>I also don’t see a downside. What’s the advantage? Is it easier to optimize? <mooseball>can a guile script also be a guile module (called from another script), or do i have to factor out all the shared stuff into a separate file? <mooseball>guile script starting with like #!/usr/bin/guile \ <mooseball>if i add a define-module call after the shebang, i can't call it as a script... <noe>mooseball, did you try making “main” a public variable <noe>Then try using the module name in -e instead of main <mooseball>do i perhaps need the equivalent of your "-S guile -e '(gnome-session scripts gherd)' -s"? <noe>No problem, I had the same issues when making my script <mwette>you can try: #!/bin/sh \n ... exec guile -s $0 -e main ... <noe>And btw, if your entry-point is not named main, you can always use the longer form -e '(@ (module name) my-main)' <mooseball>"#!/usr/bin/env -S guile -e '(transfers)' -s" rather than " #!/usr/bin/guile \ <mooseball>wow, thanks so much! i had no idea how to solve it. <mwette>I'm working on uploading a new repo to provide a `guild' script to turn users's modules into binary objects that can be linked into an executable. What sort of license should this have. Is LGPL3 too restrictive? <mwette>The script would take user's .go files and generate .o files from them, along with some C code to include with top-level scm_boot_guile call. <identity>mwette: what do you mean by LGPL being too restrictive in this case? <old>mwette: if the intend is that this script expose some API that can be used outside of the `guild' invocation, i.e. internally in Guile, then it has to be LGPL <old>in fact, guild itself is under LGPL, so it's probably better if you keep that license for new commands of it <dthompson>ooh, neat! does it do any tree shaking to remove modules that aren't used at runtime? the .go files can really bloat the total size. <mwette>No tree shaking, if I understand what that means. I'm guessing if a module is `used' but no content is used. <dthompson>looking at the install example, does it include *everything* in /usr/local/share/guile/site/? <mwette>I'm cleaning that up. The file freeze.scm needs to appear under scripts/ where scripts/ is in the load path somewhere. <dthompson>but what about the modules? I'm wondering if, say, SRFI-1 is included if my program doesn't use SRFI-1 <mwette>Not sure about your question I guess. I think it would include all the go's under site/. <mwette>Unless I have a bug, which I expect. <dthompson>I've never made a guile program into a standalone executable but I have made minimal bytecode distributions by only bundling in the modules that a given program uses <dthompson>it greatly reduces the total bundle size, which is why I was wondering. <mwette>I assume user has a guile distribution. I was working on having it include .go's from the guile distribution itself, but (1) that seems to violate LGPL and (2) it didn't work: there's an issue with boot-9. <dthompson>oh okay, so this isn't doing what I thought it was doing at all <mwette>It's about converting modules as .go files to .o files in order to bind into a C program which can call `loadem()' and have the modules loaded from the program image. <dthompson>well based on what you just wrote: that, I think <dthompson>a single executable with all the .go files embedded <dthompson>something you can run on a computer without guile <mwette>I have worked on that. There is inc-sys-gos "flag" in there that is #f now. When I set that to #t, I had issues getting it to work. The executable was complianing that I was trying to load boot-9 twice. And if I "hid" my system boot-9 the standalone binary would not run. <ieure>As someone who hacks Guile (for fun) and Go (for pay), .go files are a source of much angst. <mwette>dthompson: If you set inc-sys-gos to #t, you should see "tree shaken" version of ccache/3.0/. <mwette>I also tried `scm_ice_9_already_loaded=1;' in my top-level main.