IRC channel logs

2015-04-14.log

back to list of logs

<paroneayea>so, pretty dumb, but I'm having trouble figuring out how doing something like this would work in guile
<paroneayea>bash$ echo "foo" | sha512sum
<davexunit>I haven't done too much work with pipes, but this involves using the pipe API
<paroneayea> http://pamrel.lu/673a/
<paroneayea>that was my guess, but I can't figure out how to tell the pipe "I put this data into it but I'm done now"
<bipt>(force-output port) maybe?
<paroneayea>bipt: hm http://pamrel.lu/18674/
<paroneayea>it sits on the (read-line)
<paroneayea>(the second (display) was for me to verify it went past there)
<davexunit>paroneayea: I can't put my finger on what's wrong, but I don't think OPEN_BOTH is correct
<davexunit>off topic, but does anyone know a good way of creating a temp module to produce a fresh top-level environment to eval code in?
<davexunit>okay, so there's make-module for that
<paroneayea> http://comments.gmane.org/gmane.lisp.guile.user/9300 some talk about making a function with separate input and outut ports for processes
<davexunit>but now, how to programatically evaluate something in the top-level...
<bipt>there's also make-fresh-user-module if you want the default guile bindings
<davexunit>paroneayea: I did this exact thing in december but the code is gone
<davexunit>because I rewrote it to not use ports
<paroneayea>davexunit: :)
<paroneayea>davexunit: yeah I should learn to use the FFI. I'm not there yet ;)
<bipt>and eval takes a required module argument
<paroneayea>there's so much to learnnnnnn
<davexunit>bipt: oh yeah, perfect.
<davexunit>I'm writing a little example to go with Haunt, a static site generator I'm working on
<bipt>paroneayea, i was wondering about that. i tried close-output-port but that also closes the input side
<davexunit>and I want to write a macro that generates sxml that shows the code in plain text, and the result of evaluating it below.
<paroneayea>bipt: yeah python gives you separate things to access for stdin, stdout, stderr
<paroneayea>which makes a lot of sense to me...
<davexunit>I'm too distracted right now, but I totally did this awhile ago and it made sense
<davexunit>I used the 'file' program to get mime types
<paroneayea>hm
<paroneayea>I'm also confused as to how it doesn't seem that there's an *option* for getting stderr in open-pipe*
<paroneayea>that doesn't make any sense.
<paroneayea>how could that be?
<paroneayea>I don't need it right now, I'm just confused.
***karswell` is now known as karswell
***mario-go` is now known as mario-goulart
<davexunit>ArneBab: I added the crappy blog builder and an example site to the haunt repo.
<zacts>hi guilers
<zacts>hi davexunit, mark_weaver, civodul, et al...
<davexunit>yo!
<zacts>hey
<zacts>davexunit: I think I noticed you on #lispgames
<zacts>are you doing common lisp game related stuff, or just chatting about your guile 2d game lib?
<davexunit>zacts: chatting about sly and with dto about his games, mostly
<davexunit>they're open to schemers :)
<zacts>what is sly?
<zacts>ah yeah
<davexunit>but mostly common lispers
<paroneayea>dto is awesome
<davexunit>he sure is
<zacts>dto does indeed seem cool
<zacts>and his game is cool too
<zacts>that spaceship 2d / fake 3dish game
<zacts>I've been working on my math proofs
<zacts>in preparation for SICP and other things
<davexunit>skyw0r looks fun
<zacts>yeah
<davexunit>the fights look like a more abstract version of afterburner
***michel_mno_afk is now known as michel_mno
<ArneBab_>daviid: cool!
<ArneBab_>daviid: sorry, that was for davexunit…
<ArneBab_>sneek: later tell davexunit: cool! thank you!
<sneek>Okay.
<ArneBab_>sneek: botsnack
<sneek>:)
<davexunit>morning guilers
<sneek>Welcome back davexunit, you have 1 message.
<sneek>davexunit, ArneBab_ says: cool! thank you!
<ArneBab_>moin davexunit
<davexunit>hey ArneBab_
<ArneBab_>for haunt: since you have the example in a separate dir, could haunt build take an argument (filepath), so people could build multiple sites from the haunt sourcetree without adjusting GUILE_LOAD_PATH or installing haunt?
<davexunit>ArneBab_: the pre-inst-env script sets things up for running haunt from the source tree
<davexunit>all haunt commands accept a --config=foo.scm option as well, to change the config.
<ArneBab_>ah, cool!
<davexunit>I bet site building breaks if you aren't in the same directory as the config file, though
<davexunit>I haven't determined the right behavior for that.
<davexunit>I think it's reasonable to allow a config to be pulled from anywhere, but the site building happens relative to the current directory
<ArneBab_>yes, it breaks
<ArneBab_>why do you use absolute paths for the site?
<davexunit>I think you should treat 'haunt build' like 'make'
<davexunit>run it from the root of your site's source tree, just like the Makefile
<ArneBab_>ok
<davexunit>or is the error different?
<ArneBab_>it tries to build the local site
<davexunit>how are you calling 'haunt build'?
<ArneBab_>in the main directory: scripts/haunt build --config=example/haunt.scm
<ArneBab_>(that’s which doesn’t work)
<ArneBab_>what works is: cd example/; GUILE_LOAD_PATH=../ ../scripts/haunt build
<davexunit>that makes sense
<davexunit>because that's the directory your posts are in
<ArneBab_>yes
<davexunit>instead of tweaking the load path, use pre-inst-env
<davexunit>../pre-inst-env haunt build
<ArneBab_>ah, nice!
<ArneBab_>that should go into the README ☺
<davexunit>sure
<ArneBab_>“instant usage: cd example; ../pre-inst-env haunt build; firefox site/index.html”
<davexunit>ArneBab_: use 'haunt serve'
<davexunit>to fire up a guile web server with the appropriate document root
<ArneBab_>ah, yes
<davexunit>that way, links will work correctly
<ArneBab_>I just asked myself how I could insert a haunt site into Freenet (though the absolute URLs might just work, I’m not sure)
<ArneBab_>bbiab
<davexunit>k
<dsmith-work>Tuesday Greetings, Guilers
<paroneayea>moin moin
<healer>hello wingo
<wingo>greets
<healer>wingo, what is the current state of guildhall?
<healer>is it suitable for packaging with guile yet?
*wingo doesn't know :) ijp was mostly the one working on it and it's been a while
<healer>alright
<davexunit>it seems that we need some hackers that want to hack on guildhall
<wingo>there isn't a gnu instance of it anywhere that i know of, though some people have managed to use it
<wingo>but i got distracted by other things and didn't push to completion :/
<healer>how are guile packages beign distributed at the moment?
<davexunit>in various other package managers for distros
<wingo>or as tarballs :/
<healer>okay
<davexunit>unfortunately, debian doesn't really have any guile library packages
<healer>will guile be ready to replace emacs-lisp this year?
<wingo>maybe! bipt is working on it again :)
<mark_weaver>healer: there's no plan to replace emacs lisp. there's a hope to replace the *implementation* of emacs-lisp that in emacs.
<wingo>yep, what mark_weaver said
<mark_weaver>I have to go afk for a while...
<healer>In the header for guile scripts, the \\ meta-switch expects all the following switches on a single line before the !# line, the script fails to run if arguments are on multiple lines, is this expected behaviour?
<healer>example, a script with a header like: http://paste.debian.net/166705 will not run
<ArneBab_>wingo: that bipt is working on it again is great news!
<wingo>i hear bipt is currently in progress of rebasing that massive patch set on top of current emacs git
<mark_weaver>healer: yes, that's the way it's documented
<mark_weaver>and the way it has worked for at least 15 years
<paroneayea>go bipt !
<ArneBab_>that sounds pretty hard…
<paroneayea>as everyone already knows, I am super excited about guile-emacs ;D
<ArneBab_>wingo: guildhall worked pretty well for me, but IIRC there were some rough edges (some command options I had wished for). I think it would be great to have it packaged. I cannot promise that I’ll get to look into it this week, though.
<wingo>ArneBab_: guildhall needs a champion :) if you end up doing that you would be a hero to the masses!
<wingo>;)
<paroneayea>yes!
<ArneBab_>I’d love to, but I have to be realistic with my free time, so I’d rather not promise it ☺ (though it’s good to know that work on it would find support)
<ArneBab_>but firstoff I have to move home… (family’s waiting)
<ArneBab_>cu later!
<wingo>:)
<wingo>ciao!
<davexunit>yay for the future of guildhall!
<healer>Thanks wingo
*paroneayea sends an email to guile-user about stdin, stdout, stderr
<paroneayea>not sure if it should have been a guile-devel post but I don't think I know if there *is* a solution I'm missing :)
***michel_mno is now known as michel_mno_afk
<ArneBab_>It would be cool to have Guile bindings to libgccjit: https://developerblog.redhat.com/2015/04/07/jit-compilation-using-gcc-5-2/ (the example uses Python)
<davexunit>ArneBab_: I thought the same thing
<davexunit>since Guile is GNU's extension language, technically
<davexunit>I wish it was in practice, too.
<ArneBab_>yes
<ArneBab_>I guess for that, we’ll have to create the bindings.
<ArneBab_>or rather: someone will have to add Guile for everything. And lilypond needs to get fixed, because that is currently the worst possible user story…
<paroneayea>ArneBab_: how far off is lilypond from 2.X support?
<ArneBab_>paroneayea: I could build the gentoo version with guile2, but it could tot compile a simple example sheet.
<paroneayea>ah
<ArneBab_> https://bugs.gentoo.org/show_bug.cgi?id=538592#c6
<davexunit>IIRC, lilypond heavily relies on a quirk in guile 1.8 related to macros
<davexunit>guile 2.0 fixed the issue, and lilypond breaks.
<davexunit>I think it had something to do with evaluation order. referencing macros before they were define.
<davexunit>defined*
<paroneayea>davexunit: I SEE
<paroneayea>damnit shift
<paroneayea>I see
<davexunit> https://code.google.com/p/lilypond/issues/detail?id=1055
<davexunit>ah yes
<davexunit>I remembered correctly
<paroneayea>soon that tracker will be garbage collected with the rest of google code :(
<zacts>lo
<zacts>indeed, google code will be no more soon
<ArneBab_>:(
<ArneBab_>gitorious dies, google code dies, …
<paroneayea>"but not github! never github right?"
<davexunit>github does have the advantage of being profitable, at least.
<davexunit>but man, if github were to go under...
<paroneayea>davexunit: is it still profit > expense?
<paroneayea>they took a bunch of VC money for growth
<paroneayea>(Which means they probably are growing a bunch in expenses with hope that profit will go up likewise?)
<davexunit>yeah, that's a good point
<davexunit>all this VC funding stuff is annoying
<davexunit>"let us help you build an unsustainable business that Google or Facebook or Apple will buy"
<davexunit>"maybe"
***first-healer is now known as healer
<mario-goulart>wingo: the link to your slides in the top tweet at http://andykeep.com/SchemeWorkshop2015/ is broken. I could get it by removing the `s' from https://...
<wingo>mario-goulart: are you on pre-4.4 android?
<wingo>the site only does tlsv1.2 fwiw
<wingo>dunno if that is the right thing but there are some UAs that don't understand tlsv1.2
<mario-goulart>wingo: no, Debian stable, actually.
<wingo>weird
<wingo>what UA? works for me with debian sid and epiphany
<mario-goulart>wingo: works on iceweasel. Chromium shows "This webpage is not available"
<mario-goulart>I just assumed the server was down. :-)
<wingo>hmm :)
<mario-goulart>or broken link
<wingo>could be that chromium there doesn't do tlsv1.2
<mario-goulart>that's possible
<paroneayea>davexunit: I wonder how hard it would be to get guile bindings for telehash using the FFI
<paroneayea>probably not very?
<paroneayea>I guess the main thing would be needing a bridge for the json stuff.
<davexunit>paroneayea: what's telehash?
<paroneayea>davexunit: a peer to peer system for communication, basically sending around json snippets.
<paroneayea>main person is the main person behind xmpp/jabber
<paroneayea> http://telehash.org/ it seems pretty neat!
<paroneayea>I've wanted to give it a try for a while.
<paroneayea> https://github.com/telehash/telehash.org/tree/master/v3 the node implementation has the most code behind it, I guess no huge surprise these days..
<davexunit>paroneayea: for JSON, guile-json is a thing
<paroneayea>davexunit: yeah. I wonder if they have their own json representation inside telehash, and if it's so hard to serialize to a string to their structure, if they provide something
<paroneayea>in their C lib
<paroneayea> https://github.com/telehash/telehash-c heh, it installs C dependencies using npm
<paroneayea>lordy
<davexunit>paroneayea: ouch
<paroneayea>go guix environments, go! ;)
<davexunit>haha
<paroneayea>oh man, emacs has all the cool things https://github.com/pidu/git-timemachine
<wingo>neat!
<wingo>we need a fast bit-count primitive.
<wingo>we need native compilation :P
<wingo>i guess we should follow common lisp here
<wingo>aaah, we have logcount
<wingo>yesss
<civodul>:-)
<civodul>paroneayea: that looks pretty cool, indeed
<paroneayea>note: git-timemachine doesn't like to run on my auto-commit-on-every-file-change orgmode git repo :)
<paroneayea>given that I'm editing my main orgmode files all the time
<paroneayea>no surprise ;)
<civodul>heh