These are chat archives for dry-rb/chat

3rd
Feb 2016
Don Morrison
@elskwid
Feb 03 2016 07:38 UTC
@AMHOL or @solnic - would it be possible to release a new version of dry-pipeline? I’d love to use the Dry::Pipeline.new do syntax in a Rails engine. :grin:
Don Morrison
@elskwid
Feb 03 2016 10:29 UTC
irb(main):002:0> a = Dry::Pipeline.new {|x| x << "a"}
=> #<Dry::Pipeline:0x000000037af2d0 @fn=#<Proc:0x000000037af280@(irb):2>>
irb(main):003:0> b = Dry::Pipeline.new {|x| x << "b"}
=> #<Dry::Pipeline:0x000000037942a0 @fn=#<Proc:0x00000003794250@(irb):3>>
irb(main):004:0> [a,b].reduce(&:>>).call("foo”)
That’s kind of fun!
Piotr Solnica
@solnic
Feb 03 2016 10:32 UTC
@elskwid hey Don, too busy with dry-v and then dry-data=>types work to deal with dry-pipeline (I don’t use it anywhere, at least not yet)
Don Morrison
@elskwid
Feb 03 2016 10:32 UTC
WHATEVER
:)
Piotr Solnica
@solnic
Feb 03 2016 10:34 UTC
@elskwid want commit/rubygems access? :)
Don Morrison
@elskwid
Feb 03 2016 10:34 UTC
And what would I do with that? huh? ha ha
Piotr Solnica
@solnic
Feb 03 2016 10:34 UTC
delete the repo and go for a :beer: :joy:
Don Morrison
@elskwid
Feb 03 2016 10:34 UTC
There you go trying to drag me into your OSS life.
Piotr Solnica
@solnic
Feb 03 2016 10:34 UTC
worth a shot
:D
Don Morrison
@elskwid
Feb 03 2016 10:39 UTC
I’m using pipeline to create a sequence of status checks that accumulates state. It’s perfect for it.
Piotr Solnica
@solnic
Feb 03 2016 10:41 UTC
that’s good to know
I quickly built it for transflow (but now I switched to call_sheet, which doesn’t use it)
so I don’t have any immediate interest in working on it
Andy Holland
@AMHOL
Feb 03 2016 11:31 UTC
@solnic I can release if you give me access on rubygems
Piotr Solnica
@solnic
Feb 03 2016 11:33 UTC
thanks, I’ll do that later today/tomorrow
Andy Holland
@AMHOL
Feb 03 2016 11:35 UTC
Cool
Vladimir Kochnev
@marshall-lee
Feb 03 2016 12:50 UTC
@solnic, @elskwid I use dry-pipeline from github.
@solnic and also I posted a PR to dry-pipeline, please review it before releasing. I believe it introduces some right thing
Piotr Solnica
@solnic
Feb 03 2016 12:52 UTC
lol…I figured out how to optimize hints in a trivial way
dryrb/dry-validation@29e4689 <== seriously :joy:
every left-side-node will produce an error message by applying a predicate…so we can simply skip those, I’m astonished that the solution was that simple
@marshall-lee sure, and thanks for that, my time is limited so I can’t handle this for now. I’m happy to hand it over in general
Vladimir Kochnev
@marshall-lee
Feb 03 2016 12:56 UTC
@AMHOL, @solnic I also have an idea for dry-pipeline to make it more like Elixir's pipe operator. now it's hard to use dry-pipeline with callable objects with more than one argument. I think that it'd be cool to have the ability to bind all arguments except first.
Piotr Solnica
@solnic
Feb 03 2016 12:56 UTC
@marshall-lee yeah I was thinking about that too
my plan was to make it rock solid and use in transproc
and rom, too
this file is literally all the dry-pipeline thing :)
Piotr Solnica
@solnic
Feb 03 2016 13:04 UTC
@marshall-lee maybe it’s because I copied it from there :joy:
which originally was copied from rom
such copy
Oskar Szrajer
@gotar
Feb 03 2016 13:05 UTC
it's called extract to gem ;]
Piotr Solnica
@solnic
Feb 03 2016 13:05 UTC
hah yes
Andy Holland
@AMHOL
Feb 03 2016 13:06 UTC
This is so good I wish I could unwatch it to watch it for the first time again https://www.youtube.com/watch?v=_QdPW8JrYzQ
Piotr Solnica
@solnic
Feb 03 2016 13:21 UTC
ok, seems like dry-v 0.7.0 is coming out tomorrow including improved hints :dancers:
two small improvements to make is removing input values from error msgs hash and adding support for hints in nested structures
oh and I also want to tweak required and maybe macros to support blocks, I’ll probably do that too
so ie key(:foo).required(:hash?) { |foo| foo.key(:bar).maybe(:int?) }
Andy Holland
@AMHOL
Feb 03 2016 13:27 UTC
Nice one @solnic :D
Piotr Solnica
@solnic
Feb 03 2016 13:35 UTC
@AMHOL I’m so happy with this :)
Don Morrison
@elskwid
Feb 03 2016 17:05 UTC
Neat!
Piotr Solnica
@solnic
Feb 03 2016 17:06 UTC
oh noez, I think I’ve got an idea how to get rid of checks
I mean, it’s good news, but I might end up working a couple of days longer
it’s worth a shot though
it would simplify the lib even more and make it faster, as we wouldn’t have run-time rule compilation for high-level rules
Andrew Kozin
@nepalez
Feb 03 2016 19:23 UTC
@AMHOL @solnic what d'you think about dry-rb/dry-pipeline#2 ?
Hah! missed that comments above
Andy Holland
@AMHOL
Feb 03 2016 19:44 UTC
@nepalez Yep, think that was my mistake, shouldn't have been there IMO