IRC channel logs

2024-02-17.log

back to list of logs

<rlb>...setting aside for the moment whether this is advisable, we don't have any straightforward way to create a single executable with embedded .scm and/or .go "files", right?
<dsmith>rlb, Right
<dsmith>rlb, Though I have a vague memory of someone in here talking about something like zipping everything needed up together into one file..
<dsmith>I know there is a way to do that with Python. Or there was.
<lilyp>rlb: I'd first compile your module tree to a single file, then use gresources (from gnome) to bundle that up in a c application
<rlb>Is there a way on the emacs -*-scheme-*- line or via local variables to set the dialect?
<old>I think this is something that would be nice to have
<old>this topic has been mentionned a couple of time here
<old>rlb: For clarity, do you mean something along a static binary that has all the guile module embedded in it?
<mwette>rlb: I think one binary executable is doable. To be clear, do you mean libguile is statically bound, and libc not?
<janneke>yeah, https://lists.gnu.org/archive/html/guile-devel/2011-12/msg00213.html comes to mind
<mwette>I was wondering if the use case was to send a single binary as a specific app, like undump used to do (e.g., emacs and perl in the old days).
<lilyp>Emacs is doing its own undumping now (called pdump), you're probably thinking of unexec.
<lilyp>But yeah, since .go files are basically ELF, you could try to bundle them up and load them compiled.
<dsmith>Guile used to do unexec back before it depended on libgc and gmp. Like versions 1.3, 1.4 or so
<shawnw>On a similar topic, if I have a C program that uses guile, is there a standard place to install scheme files it loads?
<rlb>mwette: yes, more or less. I was pondering a single executable that had both C-side SCM_DEFINE-ish extensions and modules, or at least .go files. Though I guess for that to work in a "complete" solution, atm, we'd need both version-validation (if we don't already have it) and to embed both flavors of .go file.
<rlb>I did see that we appear to have the function that can load .go files from memory, so that'd be a useful primitive (if this is even sensible).
<rlb>I could imagine just having a some way to add an internal path for .scm and .go "files", but I'd need to learn more about how elf .rodata works to have any clue what I might be talking about.