IRC channel logs

2015-11-29.log

back to list of logs

<amz3>here is a small thread pool snippet: http://hastebin.com/isudinomar.scheme
<amz3>feedback welcome :)
<amz3>I should build this server at last, I got the question recently about the networking primitive, if I had done this network stuff I would have know the answer, bummer.
<paroneayea>woo woo
<paroneayea>8sync is progressing *fast*
<paroneayea>guile is such a joy to work in
<daviid>paroneayea: great!
<daviid>paroneayea: I need to try it, to read a filesystem location and act upon additional files [images in my case] drop in, woud that be a good use?
<paroneayea>daviid: oh interesting. I wonder if guile's (select) can check intify
<paroneayea>er, inotify
<paroneayea>basically 8sync can make use of anything (select) can
<daviid>but would select let me process other thing or wait and block? I must confess I have basic knowledge in the field
<paroneayea>daviid: so you can poll
<paroneayea>you could have 8sync check inotify every X microseconds or so
<paroneayea>however, it would be nicest if it didn't have to loop
<paroneayea>daviid: 8sync is non-blocking with its (select), because if other things are happening in the event loop it doesn't wait
<daviid>poll?
<daviid>paroneayea: i need to figure ut the best approach, wdt? my scripts run for hours [really hours], then i thought having 1 core dedicated to look for filesystem updates and guile-clutter 'something', the rest of the cores to do the real job...
<daviid>do you think select is better/enough then 8sync here?
<paroneayea>daviid: poll means "check occasionally"... it's the brute force approach
<paroneayea>eg, rss readers poll sites
<daviid>ok, so 8sync polls
<paroneayea>daviid: not quite, 8sync uses (select) where it can *not* poll
<paroneayea>but (select) is limited to sockets and file descriptors iirc
<paroneayea>in guile internally
<paroneayea>so if you *aren't* doing sockets or file descriptors, then you need to poll
<paroneayea>I would be interested in knowing how davexunit implements live asset reloading in sly...
<paroneayea>oh, Sly polls :)
<daviid>b right back
<paroneayea>kk
<amz3>`man inotify` says it the inotify system handle is a file descriptor, so it works with select, it also requires a few functions to be bind if they are not already
<amz3>well, this is the C side, I don't know about the Guile side of the thing
<amz3>paroneayea: fwiw, the url for XUDD in the manual is wrong
<amz3>in 8sync
<amz3>in 8sync doc
<paroneayea>amz3: oh thanks for catching it
<paroneayea>amz3: ooooooooooh
<paroneayea>amz3: re: inotify
<paroneayea>that means we *CAN* use inotify with 8sync :D
<paroneayea>I'd like to add a demo about that.
<amz3>paroneayea: there is a conceptnet of coroutine right?
<amz3>how do you call the procedure that run inside an agenda?
<paroneayea>amz3: I guess it's technically a coroutine
<paroneayea>amz3: just not generator-style
<amz3>yes
<paroneayea>I should update my docs to clarify that
<amz3>my questions are kind of early, I will wait that you write the doc. In the meantime i'll try to figure it out
<amz3>two notes regarding the code
<amz3>both in agenda.scm, 1) L787 enqueue proc is defined as lambda, but just below there is another proc defined with define.
<amz3>2) in handle-individual I think match syntax is too heavy
<paroneayea>amz3: thanks for the feedback
<paroneayea>looking
<paroneayea>amz3: you're Amirouche, right? :) I'm pretty sure I have that username association down, but want to properly credit you in this commit
<paroneayea>assuming youw ant to be credited
<paroneayea>for pointing out the coroutines stuff
<amz3>meh
<amz3>yes I am Amirouche
<paroneayea>"meh" means don't bother to credit you?
<amz3>exact
<amz3>don't bother. thanks.
<paroneayea>ok thanks :)
<amz3>another thing wrap vs wrap-apply, my understanding is that wrap-apply works in the case of the thunk so maybe wrap/wrap* naming is more nice naming which kind of match Guile naming
<amz3>that said, my preference would have been to name them wrap-thunk and wrap. since wrap-thunk/wrap is an optimisation
<paroneayea>amz3: the distinction is that (wrap (foo 33)) *generates* a thunk
<paroneayea>ans (wrap-apply foo) just applies a layer of indirection, and it's not a thunk, so arguemnts can be passed in
<paroneayea>(wrap) can be used around syntactic forms like cond, and wrap-apply can't
<paroneayea>but admittedly that's underdocumented
<paroneayea>the purpose for the layer of indirection is for live hacking
<paroneayea>so that you aren't pointing to a thunk, but something you can actively change at the toplevel
<amz3>I don't know livecoding yet, but I understand better the difference between wrap/wrap-apply
<paroneayea>live coding is one of 8sync's coolest features
<paroneayea>like with Sly, while the process is running, you can change it
<paroneayea>hence why I'm able to add commands to syncbot on the fly from people requesting it
<paroneayea>the cooperative coroutine feature of guile is enabled
<paroneayea>or at least, *can* be.
<paroneayea>er
<paroneayea>cooperative repl
<paroneayea>syncbot: root on guile's cooperative repl
<syncbot>Woo woo guile's cooperative repl! :D
<amz3>syncbot: root on 8sync
<syncbot>Keep it up 8sync! :D
<daviid>I'm back. So you guys recommend me to use inotify?
<daviid>amz3: paroneayea ^^ wrt my wish to par-map (- cores 1) 'heavy stuff' and 1 core would monitor and update a ui, ncurse or clutter...
<daviid>does guile hs a inotify binding?
<paroneayea>daviid: I don't think it has an inotify binding out of the box. I did a search and found a couple of libraries.
<paroneayea> https://lists.gnu.org/archive/html/guile-devel/2014-11/msg00000.html https://github.com/b4283/guile-inotify
<paroneayea>I haven't tried either.
<daviid>paroneayea: tx
<daviid>paroneayea: wrt to my quiz, you would use inotify right?
<paroneayea>daviid: probably?
<paroneayea>daviid: you may also find occasional polling to be okay enough
<paroneayea>it's good enough for Sly.
<paroneayea> http://dthompson.us/live-asset-reloading-with-guile-2d.html
<daviid>if it's good for sly it should be good for my problem, the question is, from someone who knows, at least much better then myself, what is a good route to follow?
<paroneayea>daviid: "inotify if available, but if not, just use polling"
<paroneayea>there, that's my response :)
<daviid>paroneayea: thank you!
<daviid>will try and patch inotify if needed
<daviid>amz3: thanks as well, you pointed inotify which I was not aware of either
<amz3>yw!
<daviid>amz3: I have a scroll-actor example [guile-clutter/grip-clutter] working now, need to git house keeping and push. I ned to patch guile-clutter itself for that, need to git house and push the patch as well, but good news
<daviid>amz3: you said you were interested, did you have the oportunity to install it? guile-clutter and grip I mean?
<amz3>no i did not :(
<paroneayea>civodul: ping
<paroneayea>or mark_weaver: ping :)
<amz3>daviid: what I want to do is complex, I'd like to make a graph explorer
<amz3>at least I think it's complex
<civodul>pong?
<daviid>amz3: cool, guile-clutter is the way to go, imo
<paroneayea>this is your periodic reminder that we need make-custom-binary-input/output-port in libguile so I can finish https support :) https://lists.gnu.org/archive/html/guile-devel/2015-09/msg00042.html
<daviid>amz3: I'd love to have at least 1 user :)
<civodul>paroneayea: ah yes, i haven't forgotten actually :-)
<civodul>but yeah, we need to do it
<paroneayea>civodul: mark_weaver: becoming increasingly important to me as I'm getting 8sync to actually be rather interesting! :)
<paroneayea>but easiest to argue that it's interesting with tls support :)
<amz3>daviid: what would you use to create the graph? multiple actors or a single cairo surface?
<daviid>multiple actors, defenitely
<paroneayea>civodul: glad you haven't forgotten. And sorry for the pester :)
<paroneayea>civodul: mark_weaver gave me explicit permission at fsf 30th to pester him, I took the liberty of extending it to you ;)
<daviid>s/definitely
<paroneayea>. o O (I wonder if custom binary port things here will also affect adding more port types to be compatible with (select) ?)
<civodul>:-)
<civodul>only file ports can be passed to 'select'
<daviid>taylan: is guile-inotify2 in your project list? the author also wrote this https://github.com/ChaosEternal/guile-termite
<daviid>taylan: for info ...
<daviid>bbl
<paroneayea>civodul: well socket ports too, right? but I guess sockets are file descriptors?
<civodul>right; "file ports" is for ports backed by a file descriptor in general
<paroneayea>I've tried thinking if there's anything more than that that we really need for 8sync
<paroneayea>gut it seems like everything I want to be nonblocking on is covered by file descriptors in posix land... assuming we can also get port / file descriptor access to stuff like postgres
<paroneayea>er but
<paroneayea>and similar things
<daviid>freenode is in bad mood today: I've been ejected twice, and trying many times to connect, it says 'can't connect ... server is full ...'
<paroneayea>davexunit: I need to re-go-through the picture language...
<davexunit>I'm now picturing myself giving a talk about Guile in a sweat covered button down shirt and yelling "COMBINATORS COMBINATORS COMBINATORS COMBINATORS COMBINATORS COMBINATORS COMBINATORS COMBINATORS"
<paroneayea>davexunit: haha!
***mikey is now known as Guest76271
<adhoc>davexunit: you're getting this vision, why ?