Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 24 2017 15:16
    jarohen closed #6
  • Oct 24 2017 15:13
    deepak-chitkara opened #6
  • Dec 03 2015 15:23

    jarohen on master

    Adding abandon notice (compare)

  • Dec 03 2015 15:22

    jarohen on master

    Adding abandon notice (compare)

  • Nov 18 2015 08:39

    jarohen on dep-map

    WIP: trying to move to a depend… (compare)

  • Nov 18 2015 08:39

    jarohen on cljs-updating

    No longer need CLJS Compilables… (compare)

  • Nov 12 2015 14:07

    jarohen on 0.0.6-beta11

    (compare)

  • Nov 12 2015 14:07

    jarohen on master

    Got to use `ifn?`, not `fn?`, b… (compare)

  • Nov 10 2015 21:55

    jarohen on 0.0.6-beta10

    (compare)

  • Nov 10 2015 21:55

    jarohen on master

    Losing a CLJS compiler warning … (compare)

  • Nov 10 2015 20:48

    jarohen on 0.0.6-beta9

    (compare)

  • Nov 10 2015 20:48

    jarohen on master

    Have to explicitly write out `m… (compare)

  • Nov 10 2015 20:08

    jarohen on 0.0.6-beta7

    (compare)

  • Nov 10 2015 20:08

    jarohen on 0.0.6-beta8

    (compare)

  • Nov 10 2015 20:07

    jarohen on master

    Reader conditionals don't save … (compare)

  • Nov 10 2015 12:32

    jarohen on master

    D'oh - duplicate alias. beta7 (compare)

  • Nov 10 2015 12:28

    jarohen on 0.0.6-beta6

    (compare)

  • Nov 10 2015 12:28

    jarohen on master

    `macroexpand-all`ing the form i… (compare)

  • Nov 10 2015 08:49

    jarohen on 0.0.6-beta5

    (compare)

  • Nov 10 2015 08:49

    jarohen on master

    WIP: first pass at mgo - got to… yoyo.system doesn't need to be … Moving the `dependent?` predica… and 5 more (compare)

James Henderson
@jarohen
am at work at the moment, but will certainly take a look, thanks :)
mccraigmccraig of the clan mccraig
@mccraigmccraig
@james-henderson what's the status of 0.0.6 atm ? i'm having some problems with 0.0.5 and wondering whether i should upgrade before trying to fix
James Henderson
@jarohen
very unstable at the moment - changing on a daily basis...
what problems are you seeing with 0.0.5?
mccraigmccraig of the clan mccraig
@mccraigmccraig
i'm ok now... i got a fix... i was getting race-conditions with namespace-reloading and trying to deliver a promise after the system was constructed
mccraigmccraig of the clan mccraig
@mccraigmccraig
@james-henderson i had to jump through some hoops to wait for my yoyo system to be constructed (because of code reloading)... perhaps this should be supported directly by yoyo ?
see the with-ready function : https://www.refheap.com/107769
mccraigmccraig of the clan mccraig
@mccraigmccraig
@james-henderson i see you've gone all monadic on 0.0.6 :) is it getting to the point it's gonna be worth upgrading yet, or still v. unstable ?
James Henderson
@jarohen
yes :D still very unstable, but some samples of what I'm looking to achieve in https://github.com/jarohen/yoyo/blob/0.0.6-branch/system/test/yoyo/system_test.clj
got a couple of things to iron out, especially how to handle errors and multiple threads, but hoping to have those sorted soon :)
mccraigmccraig of the clan mccraig
@mccraigmccraig
ha, gonna take me a little while to parse all that...
mccraigmccraig of the clan mccraig
@mccraigmccraig
@james-henderson how's 0.0.6 looking now ? worth testing yet ?
James Henderson
@jarohen
hey @mccraigmccraig - latest alpha is pretty stable, albeit undocumented - there are a few tests in core/test and system/test though
will be updating the readme this week if I get a mo
we've started to use the 0.0.6-alphas at work now, on a mid-size project, so won't be changing drastically between now and 0.0.6-stable
mccraigmccraig of the clan mccraig
@mccraigmccraig
cool ! i'll give it a go - is there anything i should watch out for ? (i'm on 0.0.5 atm)
James Henderson
@jarohen
not that I can think of off-hand - it's been pretty reliable so far (touch wood!)
nil-handling with 'cats' is sometimes a little funny - if you return nil it doesn't always know what monad to use for bind/return
I usually go for an explicit (ys/->dep nil) if there's any problems
(ys being yoyo.system, sorry)
mccraigmccraig of the clan mccraig
@mccraigmccraig
ah, you mean if you haven't set a context explicitly ?
James Henderson
@jarohen
setting a context explicitly can sometimes be a little funny, too
if you're using more than one type of monad, setting a context explicitly overrides the monad it uses all the way down the call-stack
(even for a monadic value that declares its monad type)
mccraigmccraig of the clan mccraig
@mccraigmccraig
sometimes... some of the monads are smart enough to grab and rebind their contexts... not sure if all of them do that - https://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L117
but warning duly taken ;)
James Henderson
@jarohen
ah, ok - something these monads should do, do you think?
what about if you only return the monadic value, though - you'd then be out of the binding...?
(thinking out loud)
mccraigmccraig of the clan mccraig
@mccraigmccraig
i think then you would be stuffed :)
i wonder if contexts on metadata would be a reasonable approach ?
James Henderson
@jarohen
that's essentially what cats does normally, albeit as another protocol on the value rather than metadata
(cats.protocols/get-context, IIRC)
maybe cats should just default to the context declared on the value, then to *context* if the former's not present?
mccraigmccraig of the clan mccraig
@mccraigmccraig
yeah, for values which satisfy the Context protocol... breaks down where a particular type might be associated with many monads... nil being presumably like that ?
can you even extend nil with a protocol ?
James Henderson
@jarohen
oh, that's a point - have I extend-protocol'd onto nil? that'd be a bit unfair...
yep - it's got loads of protocols already
so you can do things like (count nil), (assoc nil :a 1), etc
mccraigmccraig of the clan mccraig
@mccraigmccraig
oh, cool, guess i wasn't paying attention in school :)
James Henderson
@jarohen
ah, I have, but only my own protocol, so doesn't impact any general cats protocols
it's really powerful, actually - means that you can extend clojure's 'nils behave sensibly without legions of (if (nil? ...) ...) checks' principle
James Henderson
@jarohen
hey @mccraigmccraig - I've written up docstrings for most of the public functions now, and have started on the README
mccraigmccraig of the clan mccraig
@mccraigmccraig
thanks @jarohen - i haven't had a chance to update yet - got to deliver a project first
James Henderson
@jarohen
haha, fair enough - good luck :)
have written up a bit more - most of the Component/Dependent stuff is done now
Roland Kaercher
@rkaercher
Hello, I just wondered if it is possible to use a component dependency as a source source for the stop-function of a dependend component?
Roland Kaercher
@rkaercher
Uh, nevermind, I just noticed I hat an mlet inside the component instead of around it while scribbling up the example, it does indeed work :-)
James Henderson
@jarohen
Cool :) let's me know if you have any other questions/thoughts!