IRC channel logs

2017-02-06.log

back to list of logs

<amz3`>héllo :)
<ArneBab>moin :)
<wleslie>good morning Arne
<wleslie>I have been wondering, what made you want to write scripts? are you making a game?
<dsmith-work>Morning Greetings, Guilers
***random-nickname is now known as random-nick
***hiphish is now known as HiPhish
<HiPhish>Hello. I have been dabbling with Guile for the past few days, when a question struck me: how suitable is Guile as a self-contained extension language?
<HiPhish>By this I mean if I want to use Guile for scripting in a program, I shouldn't have to expect the user to have anything Guile-related on their system.
<HiPhish>To put it bluntly, I want my mum to be able to double-click a thing and have it just work. Is that realistic, or would the user need to have Guile with its standard packages installed on their system?
<dsmith-work>HiPhish: Generally, you are using guile from a separately installed package. Though it *might* be possible to do what you want.
<HiPhish>dsmith-work: So what happens when I link my program with libguile? Does the finial binary load libguile dynamically?
<dsmith-work>HiPhish: Would need to statically link libguile with your app, include all the guile .scm and .go files, and confgure your guild to only find the scm files with your app.
<dsmith-work>HiPhish: Yes.
<HiPhish>dsmith-work: So it's just as if I were for example to embed Python? I can live with that.
<dsmith-work>HiPhish: The "guile" executable loads it dynamically.
<dsmith-work>HiPhish: Note that guile depends on some system libraries, like libgmp and libgc.
<HiPhish>I wanted to write a game engine that uses Guile for scripting. The idea is that the user should not need to install anything extra and that the embedded Guile would have a pre-defined set of locations to search for scripts.
<HiPhish>dsmith-work: They would then need to be included as well, right?
<dsmith-work>HiPhish: You might want to float that idea over on the mailing lists.
<dsmith-work>HiPhish: (re other libs) YEah, if they are not already on the ssytem, you would need them too.
<dsmith-work>HiPhish: There may be more that the ones I mentioned.
<HiPhish>dsmith-work: I'm really just poking around randomly now. I first want get a simple Pong game working as a proof of concept, then I can dig deeper. I just wanted to know if what I want is even realistic.
<dsmith-work>HiPhish: You may be the very first to attempt it.
<wleslie>I thought people regularly use guile that way, though distribution packages tend not to like embedding
<wleslie>and users tend not to like embedding, though that's part of a broader question
<HiPhish>dsmith-work: Well, I always wanted to make a game engine, and I like the principle behind the Lispy languages.
<dsmith-work>Way back in the mists of time, guile was just a library. I think it might have been possible to run it with no other scheme modules. Like it was before there was a module system.
<wleslie> https://www.gnu.org/software/guile/manual/html_node/A-Sample-Guile-Main-Program.html#A-Sample-Guile-Main-Program
<HiPhish>The issue with extending instead of embedding is that games have a longer lifespan than other software. No one would want to use a software from ten years ago, but people still play game from ten years ago. Tying the game to an ever-changing ecosystem would be guaranteed frustration.
<HiPhish>wleslie: Thanks, but I already got that far. I can set up my C code so it loads a Scheme file that displays "Hello world" :)
<wleslie>you can still extend and use a static version, it just becomes easier for script writers who want to do more
<wleslie>embedding makes it easier to support several scripting languages, extending makes it easier to script several applications
<HiPhish>wleslie: Can extending pass the "virgin system" test? I.e. after I have set up my system I download the game from the store install it and start playing?
<wleslie>yes, it's got nothing to do with how you package your application
<HiPhish>wleslie: OK, but how is the game supposed to load the Guile library if the user doesn't have already Guile installed? That's the part that's confusing me.