These are chat archives for dry-rb/chat

20th
Aug 2016
Piotr Solnica
@solnic
Aug 20 2016 00:27
already 150+LOC is gone in dry-v :tada:
and btw I think it is possible to remove Result objects from dry-logic :laughing:
this predicate arg currying was such a good thing @fran-worley :)
Tim Riley
@timriley
Aug 20 2016 01:37
Yay :)
Fran Worley
@fran-worley
Aug 20 2016 07:37
@solnic looks awesome. I've got some time tomorrow so if you want me to put some time into something let me know. The rate you're going it will probably be done by then though...
Piotr Solnica
@solnic
Aug 20 2016 10:38
@fran-worley it’s a massive WIP for now, I’ll be rewriting result stuff in dry-logic, not sure where exactly this is going yet, atm it feels like we need results but in a MUCH simpler form. I’ll continue experimenting and we’ll see :)
there are a couple important changes, ie I added support for creating named rules explicitly, and now I’m making :path as an explicit, 1st-class concept. This was previously implicit and too messy (ie trying to figure out if we have a named rule based on key-rule path and so on), now we have 2 distinct concepts: rule path and name. This will make things much simpler, but I gotta figure out how to rewrite result API using these new explicit concepts :)
timriley @timriley likes this path idea
Piotr Solnica
@solnic
Aug 20 2016 10:41
yeah, a missing ingredient really :)
Fran Worley
@fran-worley
Aug 20 2016 11:43
@solnic could you not give rules a state, I.e success, failure and neutral/ not yet run. That way you could ditch result all together as all rules have a state, and the AST could be harmonised between rules that have been run and those that haven't
Piotr Solnica
@solnic
Aug 20 2016 11:44
yeah this is a good idea…we already support :options in rules and we curry rules for results already anyway so we could collapse rule/result into just rule, with rules being in unapplied/applied state
so basically a result of applying a rule is…an applied rule
Fran Worley
@fran-worley
Aug 20 2016 11:50
Beautiful use of applied/ unapplied. It's a worry that I'm so bad a finding words in my only language...!
Piotr Solnica
@solnic
Aug 20 2016 12:14
@fran-worley wat? that was very helpful, I was already in the middle of result refactor but after you wrote it I realized that MUST WORK and I already made it work for a couple of cases and it seems like a MUCH better direction, so thank you :)
gotta run now though, so I’ll get back to it tomorrow :)
:wave:
Fran Worley
@fran-worley
Aug 20 2016 12:16
:) not important, I just meant that the best I could come up with was not_yet_run...
Nikita Shilnikov
@flash-gordon
Aug 20 2016 15:23
@solnic I wonder, why on Earth dry-t types don't implement ===? :)
having it will allow to use types in case statement
Piotr Solnica
@solnic
Aug 20 2016 16:10
@flash-gordon because reasons ;)