IRC channel logs

2016-02-22.log

back to list of logs

<ArneBab>davexunit: wow!
<rain1>hello!
<rain1>I noticed a funny thing about "random": https://paste.debian.net/402440/
<rain1>each time I start guile it gives the same result!
<rain1>is that alright?
<rain1>I know that I can set a seed based on the current time (or something) to get by this, but I was wondering about the default
<davexunit>rain1: yes, this is correct.
<davexunit>you'll notice this in all programming languages.
<rain1>oh okay!
<rain1>secondly I'm wondering how to make a script I can invoke using ./script.scm on guix
<rain1>I tried the odd #! stuff but it didn't work
<davexunit>the manual covers this somewhere
<davexunit>shebangs require a special syntax
<rain1>I was reading this https://www.gnu.org/software/guile/manual/html_node/Command-Line-Handling.html#Command-Line-Handling
<rain1>it does work if I change it to: #! /run/current-system/profile/bin/guile -s
<davexunit>what was it before? did you use the wrong path?
<rain1>yeah but I was worried the script isn't portable
<rain1>it would only work on guix
<rain1>it seems a shame we cant make it run everywhere?
<rain1>(that has guile)
<rain1>I'm pleased to release my first guile program then :)
<rain1> https://notabug.org/rain1/password-generator/src/master/random-password.scm
<Jookia>rain1: you can make it run everywhere, use autotools to patch the shebangs
<davexunit>rain1: shebangs are never portable
<davexunit>shebangs are really limited in what they can do, unfortunately.
<rain1>I see!
<davexunit>for distribution, yes, it's wise to use GNU autoconf to find the absolute path to guile on the user's system and then substitute that path in the shebang
<rain1>I'm not so keen on autoconf...
<rain1>it is usually about a 30k lines long script
<davexunit>or the equivalent for your build system of choice, then.
<Korhonen>You can often use #!/usr/bin/env guile
<davexunit>non-portable
<Korhonen>On virtually all systems env is located at /usr/bin/env
<davexunit>applies only to FHS distributions
<Jookia>rain1: Just use a makefile to sed it in then
<Korhonen>It's the most portable thing, you still need a path to some executable.
<Jookia>Korhonen: Sure, just sed the path in after finding it using 'which'
<davexunit>for distributing to other users, it's important to determine the absolute path to the executable at configure time
<davexunit>assuming *any* path to a binary is asking for trouble
<Jookia>/usr/bin/env is a little useless in that you could get any binary from anywhere and there's no way to make sure it's correct
<davexunit>yeah, the script will act differently depending on the environment
<rain1>it's a shame it's so hard to package a program nicely!
<rain1>I guess if you pick a specific distro then you can do it
<Jookia>a makefile isn't that hard
<ArneBab>Korhonen: autoconf is pretty concise. It’s just that in old projects it seems to grow horribly hairy. Here’s a cleaner example: http://www.draketo.de/light/english/free-software/makefile-to-autotools
<davexunit>ACTION is getting close to having a foreign struct implementation
<Jookia>Woo!
<davexunit>some example syntax for defining foreign structs http://paste.lisp.org/display/307882
<davexunit>for one of the real structs in the Vulkan API
<paroneayea>davexunit: that's interesting... I remember working with foreign structs being a bit painful while working on squee
<paroneayea>having an abstraction could be really nice.
<paroneayea>davexunit: that looks really nice
<paroneayea>very records-like
<davexunit>paroneayea: yeah, it's sugar on top of define-record-type
<davexunit>inspired by define-wrapped-pointer-type
<paroneayea>:)
<nalaginrut>afternoon guilers~
<Jookia>wow, it's actually afternoon here!
<Jookia>afternoon to you too
<nalaginrut>Jookia: ah, where're you now?
<Jookia>australia
<nalaginrut>hah, I'm in China
<Jookia>Oh cool
<nalaginrut>;-)
<amz3>héllo guilers :-)
<csed>'Lo.
<ktakashi>Hi there, I think I've found a bug of thread-sleep! on Guile 2.0.11. Could you indicate where I should report it?
<ArneBab_> https://lists.gnu.org/mailman/listinfo/bug-guile
<ktakashi>OK, thanks!
<ArneBab_>you’re welcome!
<ArneBab_>and thank you for reporting!
<artyom-poptsov>Hello. I'm playing with remote pipes and SRFI-41 streams; here's Guile's "uppercase top": https://gist.github.com/artyom-poptsov/d8772f3085213398e49c
<davexunit>artyom-poptsov: fun!
<davexunit>thanks for the bug fix, btw.
<davexunit>I haven't tested yet, but it seems like the right thing.
***amz31 is now known as amz`
<artyom-poptsov>davexunit: Hi. Yes, the bug should be fixed by now, but sometimes we need to require a PTY to run commands that require a terminal. 2ab0287 on the 'master' has more generic solution than I mentioned in my reply on the issue.
<davexunit>artyom-poptsov: sounds good!
<davexunit>it's exciting to see the intersection of guile-ssh with other Scheme things.
<davexunit>like streams.
<civodul>artyom-poptsov: fun, indeed
<nalaginrut>I can't pull from the official repo now, fatal: read error: Connection reset by peer
<nalaginrut>anyone encountered the same problem?
<davexunit>ACTION stumbled upon this https://gist.github.com/emanon-was/062e65268f91847aecd2
<davexunit>(define-module (clojure core) ...)
<mark_weaver>nalaginrut: if you mean the guile repo, I just pulled without any problem
<nalaginrut>alas
<civodul>any volunteer to write a summary of the potluck dishes in the same vein as http://savannah.gnu.org/forum/forum.php?forum_id=7887 ?
<dsmith-work>Monday Greetings, Guilers
***dje_ is now known as xdje
***jmd` is now known as jmd
<davexunit>the succession of yaks: I want to make a game -> I want to use a dynamic programming language for scripts -> I want to use Scheme -> I want to make a game engine -> I want to make a game engine full of experimental features -> I want to stop everything and write bindings for a new GPU API that no distro even supports yet
<madsy>davexunit: Writing Scheme bindings for Vulkan? ;)
<davexunit>madsy: yes, actually.
<davexunit>but I just found out that my intel chip isn't supported.
<davexunit>so that will probably be the end of that journey for awhile.
<madsy>Doesn't hurt I suppose, for completeness sake. However, Scheme implementations' runtime overhead would probably ruin Vulkan's performance advantage over OpenGL
<davexunit>I don't think so.
<madsy>Vulkan is so low-level, I would probably make a higher level abstraction instead of a direct binding
<davexunit>okay
<davexunit>I disagree.
<davexunit>with Vulkan, you can create and re-use command queues to cache the operations you perform frequently
<davexunit>and writing a higher level abstraction in a lower level language sounds completely unenjoyable.
<davexunit>and looking forward, guile's only getting faster overall. 2.2 has been a huge improvement, and native compilation would be even more so.