These are chat archives for dry-rb/chat

7th
Aug 2018
MarkT
@paradisaeidae
Aug 07 2018 03:25
@jonahx Hi Jon, I've just scrolled back to your chat about Try and Result monads. Similar thread of enquiry happening here.
I am rom-rewbie, also trying to fit my begin rescue techniques with the monadic modes.
Would you describe the rom-monad realm to be more of the 'business rules' realm and the begin rescue the ruby-technical layres?
Jonah
@jonahx
Aug 07 2018 03:32
@paradisaeidae not totally sure i follow your question, but generally i’d consider those monads as an alternative to begin / rescue code. and the benefit is greater the higher up you go in the abstraction layers (business rules being high).
MarkT
@paradisaeidae
Aug 07 2018 03:40
There is a known warning not to use begin-rescue for program flow control. Try-catch being better for this. Though dry-monads even better?
Jonah
@jonahx
Aug 07 2018 03:45

There is a known warning not to use begin-rescue for program flow control

But you can use it for error handling… which is different.

Though dry-monads even better?

Monads can be used as an alternative to error handling with with begin… rescue. And yes, generally speaking, I’d say they’re “better,” especially for high-level code, but I wouldn’t take that as an absolute rule.

Brandon Weaver
@baweaver
Aug 07 2018 07:42
:wave:
Tim Riley
@timriley
Aug 07 2018 07:45
:wave:
Can’t wait to see the recording of your seruby talk, @baweaver!
Brandon Weaver
@baweaver
Aug 07 2018 07:45
Same, I went to town on it
Tim Riley
@timriley
Aug 07 2018 07:45
haha
Brandon Weaver
@baweaver
Aug 07 2018 07:45
Should be ~2 weeks according to Jason.
Tim Riley
@timriley
Aug 07 2018 07:45
How was the conference?
Brandon Weaver
@baweaver
Aug 07 2018 07:46
Pretty good. Avdi laid down a pretty heavy keynote
That one will be worth sharing for a while.
Have you seen the creation article on it yet?
Tim Riley
@timriley
Aug 07 2018 07:48
I have not!
Basically went through what all it took to create the talk
Tim Riley
@timriley
Aug 07 2018 07:49
Thanks! I shall read. Nice idea to share a behind the scenes.
Maciej Mensfeld
@mensfeld
Aug 07 2018 17:19
Question: can I have multiple dry-validation custom validate rules that won't fire if previous for the same attr is not valid?
I want to validate a time string and want to have 2 rules: that it is parsable and the second that it is within range