Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 28 09:54
  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:20

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:18

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:18

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:18

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:18

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:18

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:18

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:18

    dry-bot on master

    [devtools] sync (compare)

  • Jan 28 09:18

    dry-bot on master

    [devtools] sync (compare)

Chase Gilliam
@Ch4s3
I'd also hold off publishing it until Tuesday if you want people to discuss it
Piotr Solnica
@solnic
This message was deleted
@Ch4s3 thanks, yeah I’ll be adding some ‘sum up’ paragraph thanks :)
Piotr Solnica
@solnic
re promoting our libs, not sure, maybe it won’t hurt to do it :) i was thinking about writing a separate post about some of libs and explain “what and why” there, but a quick mention here would be cool I guess
Piotr Solnica
@solnic

http://solnic.eu/2016/05/30/abstractions-and-the-role-of-a-framework.html

^^ a follow-up to my prev post, related to what we’re doing here

Piotr Solnica
@solnic
Tim Riley
@timriley
Yeah, looks like a lot of thought has gone into it.
I’ve been meaning to ask you for some examples of how you’ve actually used pub/sub with your transflow transactions
Piotr Solnica
@solnic
the author told me he extracted this from real projects
monad approach is more straight forward, but there are use cases for pub/sub, but my brain is elsewhere now so hard to come up with a concrete example
Tim Riley
@timriley
No worries. I’ll file an issue at some point so we can share some examples.
Actually, let me do that now.
Christopher Dennl-Ortega Arrieta
@cdennl
rectify looks like trb, am I right?
Alexander Gräfe
@rickenharp
What’s the point behind the auto-registration in dry-component? Since the key is derived from the filenames, I don’t see the big win that Application['logger’] gives you over using Application::Logger. I do get why dry-container is great, but there you can use generic keys, that you can point to different implementations without having to change those classnames all over your codebase.
Piotr Solnica
@solnic
Convention Over Configuration, removes heaps of boilerplate
and it's not enforced, so don't use it if you don't like it :)
Alexander Gräfe
@rickenharp
Well, the problem is, I have introduced the people at my current project to dry-rb, in the hopes they could use it to cleanup their chthonic legacy rails app. Unfortunately, if something has a feature, they use it… And now I feel obligated to make them use all the nice dry-rb things correctly, while not really understanding everything myself… :sweat_smile:
Piotr Solnica
@solnic
happy to clarify, just ask
I used dry-container/auto-inject in a rails app, see my rom-rails-skeleton on github
but I haven't used dry-component in a rails app, no idea if it will Just Work™ in its current form
Alexander Gräfe
@rickenharp
The biggest hurdle at the moment is instantiating something you get out of dry-container with parameters. Something like Container[’validate’](String) or Container[’validate’](Array)
Piotr Solnica
@solnic
what's validate there?
Alexander Gräfe
@rickenharp
It’s a dry-transaction step that should validate its input against the given class. I told them to use explicit StringValidator and ArrayValidator steps, but apparently that is ‘too much typing'
Basically, I am doing damage control at the moment :D
Piotr Solnica
@solnic
what kind of parameters does it need?
Alexander Gräfe
@rickenharp
I don’t quite understand that question, sorry. :(
Piotr Solnica
@solnic
you said you're getting objects from the container with parameters
Alexander Gräfe
@rickenharp
Yes, they used dry-component to define the step objects, and since those are auto-registered, they can’t influence the instantiation of those step objects.
Piotr Solnica
@solnic
if you need custom instantiation logic, register objects yourself
I understand you're dealing with existing legacy objects?
Alexander Gräfe
@rickenharp
Yes, allthough a lot of that legacy was an ad-hoc implementation of dry-transaction functionality.
Piotr Solnica
@solnic
you can also override .new and put custom logic there
in general, we're trying to promote objects that don't need any state except external dependencies and/or configuration
so ie we don't do Validator.new(data).call and instead just v=Validator.new;v.call(data)
Alexander Gräfe
@rickenharp
Yeah, that’s what I have gathered. But try selling that to people who are buried deep in the Rails Way… :sigh:
Piotr Solnica
@solnic
so object graphs that are being created and exposed by the container don't hold data-as-state
well, that's OO way, not just Rails :)
it's hard to get out of this mindset, been there done that ;)
separating data from logic was one of the greatest improvements for me lately
Alexander Gräfe
@rickenharp
It’s not even OO, because the people I deal with don’t like having ‘all those classes’.
Piotr Solnica
@solnic
yeah I hear you, it's a common attitude "more concepts, too complicated", but it's only an impression
Nikita Shilnikov
@flash-gordon
I came to this after reading four books about clojure :)
Piotr Solnica
@solnic
I started doing that in ruby along with ditching mutable objects, so it was a natural consequence
Alexander Gräfe
@rickenharp
I’m avoiding learning more about other programming languages until after this project, it would just make me sad… :D
Piotr Solnica
@solnic
then I started looking into clojure and my thinking about this became less blurred :)
the trouble with data/logic in OO was that people treated data as something messy, so hiding it behind objects that "just send messages" was supposed to safe you from having to deal with that messy data
the problem with objects "just sending messages" is that it's really hard to compose functionality
you end up with complex inheritance hierarchies, object decorators etc
and it's still not really flexible
application-specific data structures are as pleasant to work with as your objects, the trick is to be able to have these data structures in the first place (hint: rom-rb)