These are chat archives for dry-rb/chat

22nd
May 2016
Tim Riley
@timriley
May 22 2016 06:43 UTC
@nepalez Are you open to alternative names to tolerant_to_unknown_options etc?
Just saw your release notes, was thinking we could perhaps pick something a little clearer :grimacing:
Andrew Kozin
@nepalez
May 22 2016 06:58 UTC
Yes, of cource. I have many numbers for minor patches (2, 3... etc.) ;)
Tim Riley
@timriley
May 22 2016 06:58 UTC
OK cool! I’ll take a look at the behaviour and let you know if I have any naming ideas :)
Andrew Kozin
@nepalez
May 22 2016 07:00 UTC
I think the name should be long to not interfere with other gems defining class methods
James Hamilton
@wjdhamilton
May 22 2016 08:06 UTC
Guys, I'm in the process of implementing dry-auto_inject with dry-container in one of my projects, using the #kwargs. I've just noticed that the warning for an unknown keyword doesn't fire like it used to. I'm using the globals when I should be using global_opts. Expected behaviour?
Tim Riley
@timriley
May 22 2016 09:33 UTC
@wjdhamilton What warning do you mean, in particular? I’m also not sure what you mean by globals and global_opts - would you mind sharing a bit more info?
James Hamilton
@wjdhamilton
May 22 2016 09:37 UTC
Sorry - by warning I mean ArgumentError: unknown keyword: ' . Andglobals/global_opts` are the keywords my constructor actually uses
Nikita Shilnikov
@flash-gordon
May 22 2016 09:38 UTC
@timriley I guess @wjdhamilton means that dry-ai accepts all kwargs but silently ignores superfluous https://github.com/dry-rb/dry-auto_inject/blob/master/lib/dry/auto_inject/injection.rb#L163
Tim Riley
@timriley
May 22 2016 09:38 UTC
ah yes. It accepts all extra keywords into an **args
James Hamilton
@wjdhamilton
May 22 2016 09:39 UTC
OK, gotcha! Thanks @timriley @flash-gordon :smile:
Nikita Shilnikov
@flash-gordon
May 22 2016 09:40 UTC
@timriley I think if super method has no arguments we can generate initialize with unwrapped keywords instead, what do you think?
Tim Riley
@timriley
May 22 2016 09:41 UTC
I wonder if that’d work well enough. What about super’s super?
Nikita Shilnikov
@flash-gordon
May 22 2016 09:42 UTC
we don't care. super has no parameters, we just cannot pass anything to it
Tim Riley
@timriley
May 22 2016 09:42 UTC
oh, if there are none
yeah
I get you
I think we can do this :)
dry-rb/dry-auto_inject#16
Nikita Shilnikov
@flash-gordon
May 22 2016 09:46 UTC
we know for sure that every object has initialize with zero parameters in the end, so it's gonna be safe (last words)
2.3.0 :001 > Object.new.method(:initialize)
 => #<Method: Object(BasicObject)#initialize>
2.3.0 :002 > Object.new.method(:initialize).parameters
 => []
Tim Riley
@timriley
May 22 2016 09:47 UTC
Right :)
Piotr Solnica
@solnic
May 22 2016 14:12 UTC
I wrote this, but don’t freak out about the leaving ruby part: http://solnic.eu/2016/05/22/my-time-with-rails-is-up.html
hmadison @hmadison begins panicking
Hunter Madison
@hmadison
May 22 2016 14:48 UTC
I do think you were spot on about Merb though
Piotr Solnica
@solnic
May 22 2016 14:53 UTC
of course I was, I used to have doubts, but after 6 years seeing zero progress towards what Merb could’ve become…I no longer have any doubts
Nikita Shilnikov
@flash-gordon
May 22 2016 15:33 UTC
wow, what a great post, really like it :+1:
James Hamilton
@wjdhamilton
May 22 2016 20:11 UTC
@solnic Really good post. Particularly impressed with your insight that Rails could make Ruby far less competitive if it was superseded by another framework in a different language. Good work!
Paweł Świątkowski
@katafrakt
May 22 2016 20:12 UTC
Merb and DataMapper, oh... Those were the days.