IRC channel logs

2017-02-07.log

back to list of logs

<wleslie>like you load any other library that your application uses; how you do that might depend on your OS if the distribution format has specifics on how the package needs to be laid out, but normally you just put the libs you need in the same directory as the executable.
<wleslie>if not, you might use LD_LIBRARY_PATH
<HiPhish>wleslie: Ah, I think I get it. So the application includes its own copy of the Guile library and the Scheme scripts are run by that local library rather than the global one.
<dsmith-work>HiPhish: Yes. That's what I meant.
<wleslie>yes, that's the idea.
<HiPhish>wleslie: That's what I tought "embedding" meant, so we were both thinking of the same thing. What would actual embedding be like then?
<dsmith-work>HiPhish: Normally, it's exatly the same, only relying on the system guile libs and scm files.
<wleslie>the difference is where the main() lives. in embedding, the main is in the application. the application starts an interpreter and provides it to the user or plugins to use. when extending, the interpreter is the main, which means that users can run other scheme code before starting the app.
<dsmith-work>wleslie: yeah, that nails it.
<HiPhish>wleslie: OK, then were were not thinking of the same thing, because I have my main in C. But now that I'm thinking about it, there is really no benefit to it for a game if I ship a local Guile.
<random-nick>does guile have any kind of infinite precision floats?
<dsmith-work>random-nick: it uses libgmp
<dsmith-work>That does floats too, doen't it?
<random-nick>gmp does floats, but I don't know if guile uses gmp for floats
<random-nick>guile seems to round floats
<random-nick>at least 2.0
<wleslie>HiPhish: well, it's a trade-off to consider. you might find deployment easier if you embed. but if you can extend, it does give more flexibility to the user.
<random-nick>0.9999999999999999999999999999999999999999999999999999999999999999999999999999999999 in REPL evaluates to 1.0
<wleslie>9999999999999999999999999999999999999999999999999999999/1000000000000000000000000000000000000000000000000000
<wleslie>no space around the /
<HiPhish>wleslie: What kind of flexibility? I wasn't intending for the game to start a REPL, but instead to immediately load a the game from a Scheme file.
<wleslie>HiPhish: the user can do things before or after starting the game engine, such as loading some configuration or logging into something; they can start the engine several times (say, switching games), they can pop open some other UI; there's really no limit to what they might think to do
<wleslie>HiPhish: if the only interface they get is from embedding, then they are restricted as to when they are allowed to do something, and can't start your engine twice or do additional setup
<wleslie>it's also really handy for writing unit tests to have a module you can import and use
<dsmith-work>Yess!
<HiPhish>wleslie: That sounds way over my head. What part of the manual can I learn more from?
<dsmith-work>And compiling is trickier when embedding.
<wleslie>well, lets see. the main reference is https://www.gnu.org/software/guile/manual/html_node/Programming-in-C.html which covers both
<wleslie>the 'linking' section starts by describing extending
<HiPhish>wleslie: I have read those, but they don't explain the cool magic you mentioned.
<wleslie>I have to get ready for work, but the example is really good. it doesn't even link guile, you'll notice the guile code loads the application with (load-extension)
<HiPhish>wleslie: OK, thank you for your time then. It's getting late over here, I should come back to it with a fresh mind tomorrow.
<wleslie>oh, you want something about why extending is better. I'm sure articles on it exist, but I can't think of one off the top of my head.
<wleslie>my pleasure. get a good night's rest.
<dsmith-work>sneek: later tell random-nick mpf_t, the gmp float type, is not found anywhere in the guile source, so most probably: "No".
<sneek>Will do.
***michaniskin_ is now known as michaniskin
***rjungemann_ is now known as rjungemann
<ZombieChicken>I'm curious; can Guile compile a program into an executable?
<davexunit_>ZombieChicken: guile does not have a native code compiler
<janneke>ZombieChicken: that would be a lot of work, but some things are being done in that direction; Nash with GNU Lightning compiles some pieces to native code but not an executable and Mes compiles simple C programs into an executable
<janneke>bbl
<hooshang>is there a port of guile for windows?
<amz3>Sorry for not coming to FOSDEM, I am not sure it's a good idea to recommend wiredtiger.
***baijum_ is now known as baijum
<amz3>Also, I've settled on not working on new release of guile-wiredtiger until I have a "product" that works
<wingo>greets peeps
<lloda`>hi wingo
<lloda`>ok to push the fix https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25492
<lloda`>ok to push the patch https://lists.gnu.org/archive/html/guile-devel/2017-02/msg00007.html
<lloda`>also, wdyt of https://lists.gnu.org/archive/html/guile-devel/2017-02/msg00009.html
<lloda`>the patch is a hack but something of the sort is needed I think
<wingo>ACTION looks
<wingo>lloda`: yes please apply fix for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25492
<lloda`>will do. To be honest I don't follow why it wasn't a type error :-/
<wingo>yeah :/
<wingo>weird
<wingo>numerics in c, terrible
<wingo>for https://lists.gnu.org/archive/html/guile-devel/2017-02/msg00007.html it looks good, i hesitate about the nested function with the #:key argument because it won't optimize as nicely, but perhaps that's just stockholm syndrome and it doesn't matter and even if it does the compiler should deal with it
<wingo>so lgtm on that one too
<lloda`>thx, will push
<wingo>we can cut a new release very soon
<wingo>i want to get the fluid-ref* one out so that i can have good exception handling in fibers
<wingo>for the print-exception one i am sympathetic but we should probably iterate a bit on that one
<wingo>ACTION back after 3 weeks camping holiday fwiw, ploughing mails
<lloda`>no computers? sounds good once in a while
<wingo>well computers the first week, but i opened the laptop for the first time only yesterday :)
<wingo>since the first week anyway
<lloda`>:-)
<lloda`>how far is 2.2. you think
<wleslie>wingo: I hope you had a relaxing time here. where did you find the thong vending machine, btw? that I have not seen.
<jmd>In a srfi9 record, do the members have default values or are they undefined?
<lloda`>jmd: https://srfi.schemers.org/srfi-9/srfi-9.html says unspecified
<jmd>lloda`: Thanks.
<wingo>wleslie: we randomly spent a night in surfers paradise. weird place!
<wingo>lloda`: re 2.2 -- i think we could release it nowish. Only holdup for me is the foreign objects code which is still in 2.2 but was reverted in 2.0.
<wingo>we need to release, otherwise i will noodle on it forever
<wleslie>oh cool (I have lots of family there)
<wleslie>it's very commercial beachy, like I imagine Nice or somewhere to be like
<wingo>yeah i was reminded oddly of myrtle beach in south carolina
<civodul>hello wingo, welcome back! :-)
<wingo>tx :)
<wingo>good to be back :)
<ArneBab_>welcome back!
<lloda`>wingo: the truncated-print patch I've pushed has bugs with nested arrays and rank-0 arrays. I have another patch with more test cases. Do you want to review it or do I just push?
<lloda`>I've sent the patch to guile-devel.
<wingo>plz just push fixes :)
<lloda`>oh ok
<lloda`>pushed
<lloda`>I should have checked the first patch better :-/ it's always rank-0 arrays that mess everything up
<dsmith-work>Tuesday Greetings, Guilers
<stis>hey guilers!
<dsmith-work>Hej stis
<janneke>Hey stis
<OrangeShark>hello
<daviid>lloda`: hello! these fixes wrt truncated-print you pushed, will they work for f32vectors s well? (sorry I did not have time to read the patches themselves...) because guile-cv uses them (srfi-4)
<daviid>lloda`: I 'just did read '... array(s) ... rank0 ..., and my intuition is these patch will not work for f32vectors, Ihope to be prooved wrong though