Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 17:27
    dskecse starred dry-rb/dry-monads
  • Feb 21 12:45
    sadjow commented #344
  • Feb 20 17:31
    jswanner commented #141
  • Feb 20 06:15
    lazebny starred dry-rb/dry-types
  • Feb 19 22:35
    solnic commented #141
  • Feb 19 22:32

    solnic on v0.17.0

    (compare)

  • Feb 19 22:32

    solnic on master

    Bump dry-system to 0.17.0 (compare)

  • Feb 19 22:31

    solnic on 141-fix-compat-with-dry-configurable

    Bump dry-system to 0.17.0 (compare)

  • Feb 19 22:31

    dry-bot on master

    [devtools] update changelog.yml… [devtools] sync (compare)

  • Feb 19 22:27

    solnic on 141-fix-compat-with-dry-configurable

    (compare)

  • Feb 19 22:27

    solnic on master

    Fix compatibility with dry-conf… Merge pull request #142 from dr… (compare)

Tim Riley
@timriley
m.bar "wins" because it was first.
Nick Sutterer
@apotonick
so, that's what you mean?
Matcher.(result) do |m|
      m.unauthenticated { |result| controller.head 401 }
      m.not_found       { |result| controller.head 404 }
      m.created         { |result| controller.head 201, "Location: /song/#{result["model"].id}", result["representer.serializer.class"].new(result["model"]).to_json }
      m.success         { |result| controller.head 200 }
    end
is that the "match block"?
Tim Riley
@timriley
Yes, that's what I mean.
Tim Riley
@timriley
We need the resolve option when preparing match cases so that we can prepare the value that gets passed to their blocks (like unwrapping a monad, for example). This is a low-level API, flexibility is useful.
Nick Sutterer
@apotonick
@timriley agreed, i said convoluted as in "nick doesn't get it"
Nick Sutterer
@apotonick
@timriley are you thinking about a higher-level api for matcher, or is that up to the user?
AND, way more important: why is it called "pattern matching"? where does the terminology come from (out of curiosity)?
Tim Riley
@timriley
well, the "end-user” API is pretty high-level/easy-to-use, I think, the Matcher(res) { |m| … } stuff.
As for constructing your own matchers, I think that’s not something you’d do all that often (at most once or twice per app, and even then you could package up your own reusable matcher into a gem if you wanted, like we do with the in-built EitherMatcher), so I’m not sure there’s much need to try and change that API
Pattern matching is actually a functional programming concept: http://wiki.c2.com/?PatternMatching
Tim Riley
@timriley
Anyway, good to see you playing with this stuff! Keep letting me know how you go, @apotonick :)
Nick Sutterer
@apotonick
@timriley you will hear the applause with the TRB2 release :P
don't forget to help me with the auto_inject stuff
and thanks for the work you've done! i love integrating it
Tim Riley
@timriley
Yes, I still hope to do that. I didn't get a chance tonight though. I'm full-time helping with the family now the new baby is here.
Nick Sutterer
@apotonick
good dad @timriley :highfive:
Piotr Solnica
@solnic
@flash-gordon sorry about that PR man, I just missed it :(
Nikita Shilnikov
@flash-gordon
ah, nvm, I should ping you, just forgot completely
Piotr Solnica
@solnic
@flash-gordon I’d encourage you to push this kind of fixes directly to master
ie I do that, so I don’t see any reason why other devs shouldn't be doing that too
(devs with commit access, of course)
Nikita Shilnikov
@flash-gordon
kk
Piotr Solnica
@solnic
I tend to review changes prior releases anyway, and we can always fix/improve things before a release
Tim Riley
@timriley
@apotonick how’s this look as an auto-inject strategy for Trailblazer 2 operations? https://gist.github.com/timriley/d314a58da9784912159006e208ba8ea9
I just focused on the class method version of .call - I’m not sure what behaviour you want from instances
Nick Sutterer
@apotonick
@timriley it looks awesome
:) now let's see if it works haha
thanks @timriley <3
Tim Riley
@timriley
np, lemme know how it goes, @apotonick!
Nick Sutterer
@apotonick
@timriley working a bit more with matcher, i think you're right about what you said earlier
Piotr Solnica
@solnic
Screen Shot 2016-11-03 at 17.09.00.png
@wafcio @jodosha we won RubyWeekly today ^^ :D
Ivo Benedito
@ivobenedito
hehe cool stuff there
Oskar Szrajer
@gotar
nice ;]
Nick Sutterer
@apotonick
great, get out the word!
Nick Sutterer
@apotonick
cool post, @solnic
Uros Jurglic
@jurglic
Hi guys! I'm new to dry-transaction gem, and I need an advice
Screen Shot 2016-11-04 at 13.22.26.png
^^ We have a transaction defined like this
Now the business requirement changed so that first three operations need to be run always - regardless of the result of the previous operation.
What would be the right way to approach in dry transaction?
Piotr Solnica
@solnic
@jurglic then it’s no longer a transaction :)
Uros Jurglic
@jurglic
Yeah, that crossed my mind too!
@solnic But if we forget that one for a minute... would something like that make more sense?
Screen Shot 2016-11-04 at 13.44.04.png
Piotr Solnica
@solnic
@jurglic it does
Uros Jurglic
@jurglic
Can the first three operations still use Either response? Or will it fail if one of them returns Left?
Nikita Shilnikov
@flash-gordon