IRC channel logs

2016-12-05.log

back to list of logs

<nalaginrut>morning guilers~
<sapientech>wingo: are there plans to implement futures, delays, and promises on top of fibers? this would be a good idea yeah?
***darthlukan_ is now known as darthlukan
<wingo>sapientech: futures are for data parallelism, and currently fibers has no rebalancing mechanism that would enable parallelism; dunno :)
<wingo>sapientech: i am focused on other things right now (getting dynamic states to work with fibers)
<lloda>sapientech: yes
<dsmith-work>{appropriate time} Greetings, Guilers
<amz3`>héllo :)
<stis>hi amz3`
<amz3`>stis: I abandonned all hope to find aa good use for minikanren
<stis>why?
<OrangeShark>hello
<amz3`>stis: I can't find a real problem where I need to use minikanren
<stis>that's fine, think tree searches, if you have such a problem minikanren is a good fit.
<stis>But usual you can do computers alot not needed to solve tree searches.
<stis>I encounter those quite often in my work life though where we have a lot of planning applications
<stis>Also if you get used to the prolog and minikanren programming you will see more applications that fit's it's use.
<dmiles>programming a dynamicly class mud
<dmiles>clased*
<amz3`>hmm
<dmiles>though i admitted needing minikanren variables in prolog
<stis>Also functional programming replaces minikanren many times and my guess is that you would normally take the functional path and not see a possible minikanren solution
<dmiles>admit*
<stis>as an example, say that you would like to find all permutatoins of a list.
<stis>My 2c is that you would solve this with functional programming although the most consice solution is solved by minkanren and minikanren append
<dmiles>i think that is a good example
<dmiles>oh another use would be building a parse tree
<dmiles>(refering to using a DCG)
<stis>dmiles: yes parsing and compiling to a VM is a perfect match for these systems.
<dmiles>a question i have is what would be the alterative way?
***mvdw is now known as Lynn
***siel_ is now known as siel
***Lynn is now known as Guest45015
<dmiles>(also i am sort of assuming that minkanren has a little bit of backtracking.. it doesnt thiough right?)
<stis>dmiles: minkanren has backtracking
<dmiles>and it has destructing bind to ?
<dmiles>i am asking becasue i am tryuing to remember what it doesnt have
<dmiles>doesnt have that prolog does
<stis>no you do (= X (list A B C)), that's teh destructuring you have and need to fresh rthe variables separately
<stis>but macors all all available and it is easy to make a destructuring bind
<dmiles>ah so it just not expected to be automatic is all
<stis>minkanren lacks cut tho
<stis>but has once
<amz3`>I read the book, it was not impressive at all, I did not learn much outside what I already knew
<stis>minkanren lacks findall, but it is easy ta make a functional findall
<stis> http://c-lambda.se/a-functional-findall-in-minikanren.html
<stis>that's the cool thing about minikanren - it's functional logic programming
<dmiles>one caveat, maybe its not a problem in guilog, is needing to create a trail along a stack
<dmiles>alos though i am visualizing a stack to be like a lexical binding env
<dmiles>also though i am messing with things on a jvm insterad of a sceme vm
<stis>yes minikanren has a cons list of bindings that is functional and can pose problems regarding performance but there are a few trick to make them less of an issue
<stis>but at backtracking yo just use the old cons list and forget about what yuo did before and let the VM clean up
<stis>the main is to not when a variable is created and not search the whole list for something that isn't bound
<dmiles>i sthe vars themsevles are building the cons lists personally right?
<dmiles>the vars themsevles are building the cons lists personally right?
<stis>and due to the fact that usually the working set is at the top of the assoc
<stis>no each variable is just an identity. when you bind x with 1 tou cons (cons x 1) on the list
<stis>to find the value you search for x and outputs 1
<stis>so you pass your bindings whatever you do along the calculationi path
<dmiles>ok so the trail can actualyl be built along some accoc which can itself be maintained on the heap (not passed along between unifies)
<dmiles>accoc/assoc
<stis>yep
<stis>this is why you can quite ceaply store and restore a state
<dmiles>popping that assoc is done when?
<dmiles>(popping so that backtracking happens)
<stis>you never pop you maintain it functionally you never mutate the assoc
<dmiles>(popping so that unbinding happens)
<stis>you just use an old version of the assoc
<dmiles>oh .. you just updead your dcr pointer
<dmiles>oh .. you just update your dcr pointer
<dmiles>oh .. you just update your cdr pointer (sorry)
<stis>if you want else you pass the assoc whatever you do
<stis>(define (or s x y) (try (x s) #:else (x y))
<stis>(define (or s x y) (try (x s) #:else (y s))
<stis>s is the incomming state
<stis>this is pseudo code
<stis>you never mutate
<dmiles>i *think* i see
<stis>(define-syntax-rule (bind s (v k) code) -> (code (cons (cons v k) s)))
<dmiles>now that i see
<stis>so the selling point of minikanren is their ability to do breath searches due to cheaply storing and restoring bindings state
<paroneayea>well
<paroneayea>since I'm having trouble packaging guile-fibers for guix, maybe I should turn my attention to the somewhy dusty 8sync repo
<paroneayea>time to put out a v0.2.0 release, since I had everything in place to do so. Actors! :)
<stis>yey!
<wingo>nice :)
<wingo>ACTION getting ready for a new guile prerel, fluids/dynamic-state thing taking some time to bake
<wingo>then i can have each fiber have its own dynamic state
<stis>wingo: hurray, really cool. You changed the VM tho I have an prolog VM that hooks into guile's. I will probably need to rewrite that path to take advantage of all your new features for concurrency
<wingo>yeah sorry for the breakage & churn, i really meant to have 2.2.0 out before now
<wingo>the api-scheduling.texi was just so embarrassing i couldn't do it :P
<stis>lol
<stis>so what's the actual change you did to the VM, you made sure that you execute a VM op at various places no?
<civodul>wingo: yeah for the new prerelease!
<stis>so my question is if the VM change is not really a VM mutation but a VM op addition and making sure to output the op?
<wingo>stis: you mean the handle-interrupts thing?
<stis>yes
<wingo>yes, it's an op that gets inserted before any call, return, or back-edge
<wingo>it lets interrupts run directly in the VM, without recursing out
<wingo>so that you can preempt a computation and have it resume later
<stis>cool,
<wingo>it's a 10-20% perf hit tho in tight loops i think, though that's a VM artifact that will go away when we do native comp
<wingo>see the new asyncs.test, it's kinda neat
<stis>Cool prolog just runs predicates and no loops and each predicate (or funciton if you like) go over special VM OP I added
<stis>ANd they are contained in a guile funciton
<stis>which means I get this new feature for free
<stis>I will need to change the VM op number for this special op though
<stis>dmiles: guile has two parser frameworks and there are also parser combinators that are used for parsing.
<dsmith-work>wingo: pushy pushy
<dsmith-work>wingo: Are you done with the dynamic state changes? Or is there more coming?
<dsmith-work>wingo: I'll kick off a build tonight.