Hey Leif, 

Thanks a lot for pointing this out! I did some rudimentary search before 
writing dag-runner and missed this one [shy] 

Prismatic Graph looks like a very comprehensive implementation. I'll play 
with the code and try to learn the way they implement the idea. Thanks a 
lot. 

Hesen

On Monday, April 7, 2014 4:49:55 PM UTC-7, Leif wrote:
>
>
> Hi, Hesen.  Your library sounds like a good idea.  And because it is, I 
> believe it has already been implemented as Prismatic's Graph (
> https://github.com/prismatic/plumbing).
>
> You may want to use/extend that instead of writing your own library.  But 
> if you continue with your own library, one good design decision that you 
> may want to borrow is separating the graph construction, compilation, and 
> execution phases.
>
> Cheers,
> Leif
>
> On Monday, April 7, 2014 7:03:48 PM UTC-4, Hesen Peng wrote:
>>
>>
>> Hi everybody, 
>>
>> You might have experienced writing up multiple functions which depend upon 
>> the result of each other to execute. To make things more complicated you 
>> might even wanna split the result from one function and feed them 
>> separately into two other functions, while potentially combining inputs 
>> from other functions.
>>
>> To make everybody's (include my own) life easier, I made the package 
>> (DAG-runner, 
>> https://github.com/hesenp/dag-runner) to automatically join functions 
>> with dependency specified in a directed acyclic graph (DAG).  
>>
>> For example illustrated below, if we have three functions funA, funB, funC 
>> that depends upon each other, dag-run will generate a new function 
>> aggregated-fun that takes all necessary input and generate all desired 
>> non-intermediate output. 
>>
>>>
>>> (use 'dag-runner.core)
>>> (dag-run aggregated-fun
>>>          [{:function funA :input [:x :y] :output [:z :w]}
>>>           {:function funB :input [:w :a] :output [:b]}
>>>           {:function funC :input [:b :z] :output [:u :v]}])
>>> (aggregated-fun :x 1 :y 2 :a 3)
>>
>>
>> This is my first package contributed to the Clojure community. Please feel 
>> free to point out my mistakes etc so that I can improve on future projects. 
>> Thanks a lot.  
>>
>> Hesen Peng
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to