funcool

A channel for discussing and asking questions about Funcool libraries https://github.com/funcool/
mattly 2016-08-30T00:23:56.000006Z

bide looks neat – is there a reason it's cljs only?

niwinz 2016-08-30T04:24:02.000007Z

@mattly Because I needed it for cljs. But I open to have it ported to clj πŸ˜‰

mccraigmccraig 2016-08-30T12:04:42.000010Z

hey @niwinz i just hit a niggle with cats.core/when ... it's an fn rather than a macro, so any expression of the form (m/when test (throw-up-when-test-is-false)) always throws when test is false... so i tried rewriting when as a macro, but that still can't avoid evaluating the mv arg either, because it needs to call ctx/infer ... dyu have any ideas ?

mccraigmccraig 2016-08-30T12:35:40.000011Z

what do you think of this approach ? https://github.com/mccraigmccraig/cats/commit/99d5b9d182cec3b16ff66652153e63402f1e9d2d

mccraigmccraig 2016-08-30T12:38:07.000012Z

i.e. unless a context is available from with-context it must be explicitly given to when or unless

2016-08-30T13:14:44.000013Z

makes sense to me @mccraigmccraig, we should change these to be macros because we don't want to evaluate the branch if the predicate doesn't hold

2016-08-30T13:14:52.000014Z

happy to merge a PR with these changes

mccraigmccraig 2016-08-30T13:27:55.000015Z

cool, PR on the way @dialelo

2016-08-30T13:30:50.000016Z

thanks a lot!

2016-08-30T13:36:17.000017Z

sorry about the alet issues, i'm taking a look at it

2016-08-30T13:36:50.000018Z

my plan is to restrict what's possible in alet (for instance duplicate binding names) for making the code transformation more straightforward

mccraigmccraig 2016-08-30T13:44:33.000019Z

i haven't found an alet issue i couldn't work around yet, so i'm still happy πŸ™‚