Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Don Morrison
@elskwid
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
@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
WHATEVER
:)
Piotr Solnica
@solnic
@elskwid want commit/rubygems access? :)
Don Morrison
@elskwid
And what would I do with that? huh? ha ha
Piotr Solnica
@solnic
delete the repo and go for a :beer: :joy:
Don Morrison
@elskwid
There you go trying to drag me into your OSS life.
Piotr Solnica
@solnic
worth a shot
:D
Don Morrison
@elskwid
I’m using pipeline to create a sequence of status checks that accumulates state. It’s perfect for it.
Piotr Solnica
@solnic
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
@solnic I can release if you give me access on rubygems
Piotr Solnica
@solnic
thanks, I’ll do that later today/tomorrow
Andy Holland
@AMHOL
Cool
Vladimir Kochnev
@marshall-lee
@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
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
@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
@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
@marshall-lee maybe it’s because I copied it from there :joy:
which originally was copied from rom
such copy
Oskar Szrajer
@gotar
it's called extract to gem ;]
Piotr Solnica
@solnic
hah yes
Andy Holland
@AMHOL
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
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
Nice one @solnic :D
Piotr Solnica
@solnic
@AMHOL I’m so happy with this :)
Don Morrison
@elskwid
Neat!
Piotr Solnica
@solnic
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
@AMHOL @solnic what d'you think about dry-rb/dry-pipeline#2 ?
Hah! missed that comments above
Andy Holland
@AMHOL
@nepalez Yep, think that was my mistake, shouldn't have been there IMO