IRC channel logs

2016-09-21.log

back to list of logs

<ecraven>is there a way to run guile so that it aborts if anything is not ok (unbound symbol, any error, whatever)
<wingo>ecraven: does it not work like this already?
<ecraven>it seems not to
<ecraven>try creating a file that contains (xcons 1 2) and run guile < file or guile -l file
<ecraven>exit status is 0
<ecraven>ah, sorry, I didn't specify what "aborts" was supposed to mean
<wingo>ecraven: i wouldn't run like guile <file
<wingo>that does a repl interaction
<wingo>guile -l file or guile file seems to work as you expect tho
<ecraven>ah, how do I tell guile to exit after loading the file?
<ecraven>that was the problem I had :)
<wingo>so for me "guile -l file" and "guile file" both print a backtrace on error and exit and set $? to 1
<ecraven>ah, thanks, guile file works fine
<ecraven>I'm trying to write r7rs coverage tests, to see which schemes support which parts of r7rs :)
<ecraven>a bit like r7rs-benchmark
<wingo>cool
<wingo>at some point we should add an --r7rs option or so
<wingo>to set up the reader appropriately, etc
<ecraven>that would be cool
<wingo>same for r6rs too
<ecraven>right now, I have separate preludes to set up things for the different schemes
<wingo>yeah makes sense for now
<ecraven>does guile support infinite? and +inf.0?
<ijp>yes
<wingo>ijp: did you see that i used your priority search queues in anger
<wingo>they work :)
<wingo>thank you :)
<ijp>hmm, actually infinite? seems to be unbound
<wingo>we have inf?
<ijp>wingo: np, it was your idea to implement them if ou remember
<ecraven>ijp: that's the reason I'm asking :)
<ijp>ah inf?
<ecraven>r7rs mandates infinity? :p
<ijp>I got confused because I know it is bound in (rnrs)
<wingo>probably we should switch to infinity?
<wingo>given that both r6rs and r7rs specify it
<ecraven>at least provide it as an alias, I'd say :)
<wingo>i would prefer just one thing, so we should deprecate inf? in favor of infinity methinks :)
<wingo>infinity? rather
<ecraven>that's probably the better way forward, though with more hassles for users :-)
<ecraven>exact / inexact are also unbeind
<ecraven>unbound
<ecraven>not sure if this is useful, but here it is: https://github.com/ecraven/r7rs-coverage
<wingo>if arch users want a fast guile, they need to fix the bug that their package sets CFLAGS="" https://aur.archlinux.org/packages/guile-git/
<wingo>effectively disabling optimization
<dsmith-work>Morning Greetings, Guilers
<drp>evenin'
<masoudd>wingo: Hmm. It only does that for guile-git. This is the PKGBUILD for package "guile": https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/guile
<masoudd>This is the default for packages (/etc/makepkg.conf): CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
<davexunit>this is a good talk https://www.youtube.com/watch?v=Or_yKiI3Ha4
<davexunit>"Let's Build a Hygienic Macro Expander" by Matthew Flat
<wingo>yes indeed
<davexunit>Flatt*
<davexunit>I've only watched a few minutes but the explanations are fantastic
<davexunit>a complex subject made much easier to understand
<davexunit>a skill I greatly admire.
<wingo>on the nice side, it's a function of syntax to synta
<wingo>x
<wingo>which is good for local expansion
<paroneayea>davexunit: ooh I saw his previous talk on the subject
<paroneayea> https://www.youtube.com/watch?v=ABWLveMNdzg
<paroneayea>which was really fun
<davexunit>watching the talk makes me feel like "yeah, I can write a macro expander!" but I know I can't.
<paroneayea>had cute animations
<davexunit>still very educational, though.
<paroneayea>I'll try to remember to watch this one too, later :)
<davexunit>wingo: I enjoyed the strangeloop rendition of "knit, chisel, hack" and hearing some of the questions people asked at the end
<wingo>glad you enjoyed it
<wingo>it was a bit goofy :)
<wingo>i think i said some silly things, i will have to watch to see
<davexunit>it's always hard to watch your own presentations, it is for me, at least.
<davexunit>you are your own worst critic and all that.
<paroneayea>yeah I can't always watch my own talks
<paroneayea>I can listen to them
<paroneayea>but not watch them
<paroneayea>I'm just too much of a goof to see walking around on stage.
<davexunit>but the talk revealed to me *why* I like guile so much.
<davexunit>because every now and then I think "racket has this, chicken has that, why do I insist on guile?"
<davexunit>and the answer is: guile is craftier!
<davexunit>and I liked the deeper dive into prompts this time around
<Kooda>davexunit: I’m a chickeneer, and I’m always “racket has this, guile has that” :Þ
<stis>wingo: I'm about to introduce fibers into guile-log.
<stis>what is remarkable with guile-log compared to other prologs is that I can store and restore state at will
<stis>si I want to capture the state of channels and schedulers.
<stis>My question is how functional is fibers?
<davexunit>stis: it's an inherently imperative thing
<davexunit>but you can use channels to pass persistent data between fibers
<davexunit>and build functional abstractions on top, etc.
<davexunit>or maybe I'm totally wrong and wingo will correct me :)
<ijp>stis: you've started showing up in my "do you know this person" on facebook
<ijp>I'm trying to figure out what caused that to leak, since I basically only use it for a few clubs
<stis>I really don't know how they mine these things. I have not tried to reach you.
<stis>myself is using it for old child mates and family
<ijp>yeah, I just thought it was weird
<ijp>have you all seen the "lambdaman" tshirt campaign for booster?
<ijp>on booster*
<stis>davexunit: I was hoping wingo dtuck to functional datastructures using ijp's work
<wingo>there's not a lot of set! but if you are dealing with ports and time, nothing is really deterministic; dunno
<wingo>i guess i don't know what functional concurrency means :)
<stis>wingo: that's true, there is some onon determinism lurking in there.
<stis>anon -> non
<stis>I mainly thought it woul dbe cool to stpre a state in this respect and see what it brings
<stis>if the io is from files that are read in in one atomic chunk the progress is determministic
<stis>and the sytem can do other thing at the time.
<ijp> https://www.booster.com/lambdaman
<stis>Hmm
<ijp>Haskell's parallelism is pretty interesting, because it may be the only system where you can specify evaluation strategy separately
<ijp>parallelism strategy*
<stis>Nah I will clone the repo and see what is needed for myself
<davexunit>stis: one example of a functional abstraction built on top of I/O is port->stream in srfi-41
<davexunit>it's not a *good* abstraction because it's horrendously wasteful and slow, but it enables you to do neat things
<ijp>smells like unsafePerformIO
<davexunit>like parser combinators that can backtrack
<ijp>iteratees and pipes were other functional abstractions over IO, but they are weird to explain
<ijp>also iteratees are a few years out of fashion
<davexunit>it's not deterministic if your port is a file or socket or whatever, but you get that functional layer.
<ijp>pipes as in the haskell library, not unix pipes
<davexunit>I don't know anything about haskell does things
<ijp>everything is weird in haskell land, east is west, up is down,
<stis>wingo: It looks like I need to serialize quite a lot of data in order to store and restore.. ut consider this use case
<stis>in order fr (f x) to be true we need both (g x) and (h y) to be true.
<stis>assume that evaluation of (g x) is expensive and that x and y share statet
<stis>one could then argue that by interleaving both (g x) (h y) in fibers, conclusion to backtrack early inside could be an advantage.
<stis>Therefore scheduling them.
<stis>Of cause this is not the core idea with fibers so I wont ask for all data to be functional,.
<stis>But it would be interseting to be able to serialize and unserialize a schedule to manually store and restore state.
<stis>That is the path I need to take I think
<paroneayea>ijp: if you have the like button not-disabled on sites, maybe you and stis visit the same sites, since they use that to track things :)
<wingo>stis: it kinda sounds like you need a different channel-like interface, more like streams or something
<wingo>dunno
<wingo>doubtless fibers is going to have many many mistakes :) and also cases where it's not appropriate for all use cases
<wingo>i am very happy that we're able to build these things as libraries so that we can explore the design space in a more free, less stressful way
<ijp>paroneayea: it is disabled essentially everywhere
<ijp>around once a year for the past five years I lament that I'll soon have to stop using noscript, but that day hasn't arrived yet
<taylan>wingo: hidy. what would be the easiest way to import all scheme compiling related modules? compile-file autoloads some if I understand correctly, which fails when compile-file is called many times in parallel.
<stis>ijp: when i got google+ in the beginning I added a few folks not knowing how it worked. The suggestions where from my mail box annd you are in my scheme groups, maybe facebox got hold onto that data.
<ijp>yeah, I was assuming something similar
<wingo>taylan: probably easiest way would be to just (compile 1) before spawning the threads
<wingo>but, specifically for autoloads, those are loaded when first referenced
<wingo>you need to search for #:autoload in guile modules
<wingo>to see what to pull in
<stis>wingo: I will try to have som fun playing the fiber framework. At least I like the core idea alott
<taylan>wingo: the (compile 1) trick seems to have worked :)
<wingo>hackety hack :)
<wingo>fwiw probably you want to compile the guix modules with the equivalent of -O0
<wingo>dunno
<wingo>see optimizations-for-level in scripts/compile.scm
<sapientech>davexunit: Is it possible to add an atom feed in my own custom index page?
<OrangeShark>sapientech: a link to an atom feed?
<sapientech>OrangeShark: i guess not an atom feed, but a way to automatically display my posts in a custom index page
<sapientech>*display the links to the posts, like it does in the default atom-feed
<OrangeShark>oh, for the blog builder?
<sapientech>OrangeShark: oh i guess the blog builder might be what im looking for. right now I have a list of builders, with (blog) and index-page
<sapientech>index-page is defined similar to index-page
<sapientech>* https://notabug.org/cwebber/8sync-website/src/master/haunt.scm
<OrangeShark>you can pass to the blog builder a prefix
<sapientech>OrangeShark: so the layout at sapientech.guile.cc is from the blog builder, not the atom-feed builder?
<OrangeShark>correct
<OrangeShark>the atom-feed builder just creates an xml file
<sapientech>OrangeShark: Ah, that makes more sense, thanks for your help!
<OrangeShark>which can be consumed by an rss/atom reader
<sapientech>OrangeShark: just starting to get into web stuff :)
<OrangeShark>so if you want to move the blog page to something else, there is #:prefix
<ijp>sapientech: my condolences
<jonsger>i have a small patch for the website, who should I send it to?
<OrangeShark>like what the 8sync one does
<sapientech>ijp: that's why its taken me a while to face it :)
<sapientech>OrangeShark: yeah its a good one to snarf from, thanks paroneayea
<sapientech>paroneayea: also, your site is not up?