These are chat archives for dry-rb/chat

10th
Sep 2016
John Backus
@backus
Sep 10 2016 00:10
Oh huh
Looks the the non-performant change was moving from rescuing to doing try and conditionally raising
I thought exceptions for control flow was less performant
gosh
John Backus
@backus
Sep 10 2016 01:22
Neat
@solnic my current refactor of the hash schemas is either equivalent or slightly faster than the implementation in master
Comparison:
 schema#call (after):   193637.6 i/s
schema#call (before):   179671.8 i/s - same-ish: difference falls within error

Comparison:
  schema#try (after):    89803.7 i/s
 schema#try (before):    81845.6 i/s - 1.10x slower

Comparison:
   weak#call (after):    99185.4 i/s
  weak#call (before):    93176.6 i/s - 1.06x slower

Comparison:
    weak#try (after):    84671.1 i/s
   weak#try (before):    77782.3 i/s - 1.09x slower

Comparison:
permissive#call (after):   195768.3 i/s
permissive#call (before):   185756.9 i/s - same-ish: difference falls within error

Comparison:
permissive#try (after):    88630.9 i/s
permissive#try (before):    83570.9 i/s - same-ish: difference falls within error

Comparison:
 strict#call (after):   142571.2 i/s
strict#call (before):   142475.9 i/s - same-ish: difference falls within error

Comparison:
  strict#try (after):    89343.1 i/s
 strict#try (before):    72947.0 i/s - 1.22x slower

Comparison:
strict_with_defaults#call (before):   142817.5 i/s
strict_with_defaults#call (after):   140927.0 i/s - same-ish: difference falls within error

Comparison:
strict_with_defaults#try (after):    89623.1 i/s
strict_with_defaults#try (before):    70049.2 i/s - 1.28x slower

Comparison:
symbolized#call (after):   100330.8 i/s
symbolized#call (before):    94035.5 i/s - same-ish: difference falls within error

Comparison:
symbolized#try (after):    86675.6 i/s
symbolized#try (before):    77528.2 i/s - 1.12x slower
Piotr Solnica
@solnic
Sep 10 2016 01:25
@backus fanstastic
John Backus
@backus
Sep 10 2016 01:31
Also TIL about the hold! method in benchmark-ips
I have one other idea I want to try out
Basically we can compute the default values for a hash schema when the hash schema is defined
instead of computing on each evaluation
John Backus
@backus
Sep 10 2016 01:46
@solnic I think you should do a pass over the different dry-types to make sure they all respond to success and failure before releasing
Looks like Dry::Types::Safe doesn't
John Backus
@backus
Sep 10 2016 02:49
@solnic there is actually one more thing I need to fix with strict schemas I believe
Should be able to do it before you're up but FYI
John Backus
@backus
Sep 10 2016 03:34
k @solnic I opened dry-rb/dry-types#144 which should be merged before releasing
Pretty important. The new strict schemas are actually less strict without this PR
John Backus
@backus
Sep 10 2016 08:22
I'm curious if anyone actually uses dry-types with rubinius
John Backus
@backus
Sep 10 2016 11:08
@solnic dry-rb/dry-types#143 is ready to go
~ 10-12% faster I think
Piotr Solnica
@solnic
Sep 10 2016 11:09
@backus oh man you killed it :clap:
taking a look…
John Backus
@backus
Sep 10 2016 11:10
:)
Piotr Solnica
@solnic
Sep 10 2016 11:12
@backus merged…:)
John Backus
@backus
Sep 10 2016 11:12
Awesome
Piotr Solnica
@solnic
Sep 10 2016 11:12
totally awesome
John Backus
@backus
Sep 10 2016 11:12
I'll rebase dry-rb/dry-types#144
Piotr Solnica
@solnic
Sep 10 2016 11:12
:+1:
John Backus
@backus
Sep 10 2016 11:13
That hash schema refactoring was like solving a puzzle lol
Piotr Solnica
@solnic
Sep 10 2016 11:13
I can imagine
John Backus
@backus
Sep 10 2016 11:14
Enjoyable but fairly frustrating until I found something that finally worked
Piotr Solnica
@solnic
Sep 10 2016 11:14
as I said, I gave up on this when I tried to refactor it :)
but it was more like “a table-flip” for me than “I don’t think it’s possible” :D
John Backus
@backus
Sep 10 2016 11:15
Yeah
I mean I would have too if I wasn't on vacation right now
Definitely was more of a pride thing by the end
kk this is rebased dry-rb/dry-types#144
I'm about to go to sleep
Basically I almost forgot to make the strict schemas reject nil values
which was why I got involved in the first place
so thats funny
Piotr Solnica
@solnic
Sep 10 2016 11:18
4am over here, isn’t it?
John Backus
@backus
Sep 10 2016 11:18
Yeah
Piotr Solnica
@solnic
Sep 10 2016 11:18
I went to sleep at that time yesterday, we’re weird people :laughing:
John Backus
@backus
Sep 10 2016 11:18
My sleep schedule gets weird when I don't have anywhere to be in the morning :P
haha
Piotr Solnica
@solnic
Sep 10 2016 11:18
I SO get this lol
John Backus
@backus
Sep 10 2016 11:19
My roommate gets up at 6 heh
Earlier this week for some reason he got up at 5 and I was on the couch working on backus/rubocop-rspec#205
was a funny moment
btw that PR = 25 second ruby matrix build on CI
Pretty happy with that
Piotr Solnica
@solnic
Sep 10 2016 11:24
I like how you structured the specs
with descriptive examples instead of deeply nested contexts with lots of lets :+1:
John Backus
@backus
Sep 10 2016 11:25
Thanks yeah I liked how it ended up looking like a list of bullet points
I do sort of want to clean up the wording a bit later
but if I don't get to that its probably clear enough
Piotr Solnica
@solnic
Sep 10 2016 11:26
…and we’re done :)
John Backus
@backus
Sep 10 2016 11:27
:tada: woo hoo!
Piotr Solnica
@solnic
Sep 10 2016 11:28
:tada: :fireworks:
I won’t have time to release all of this now but I’ll do that around Wednesday
John Backus
@backus
Sep 10 2016 11:29
Great
Piotr Solnica
@solnic
Sep 10 2016 11:30
we’re gonna need to update docs on the website too
and dry-struct needs to be added as a new gem there :)
John Backus
@backus
Sep 10 2016 11:30
Not sure if you saw in my many pings but I recommended looking over the different types in Dry::Types to make sure they all conform to the contract of providing success and failure methods
I ran into that issue when updating dry-struct
and also I think I noticed the same issue for like Dry::Types::Safe
Piotr Solnica
@solnic
Sep 10 2016 11:30
yes I’ll be looking into various things in dry-types before the release
there are some pending PRs to review and I have a couple of tasks on my list
nothing major though
John Backus
@backus
Sep 10 2016 11:31
Cool
I'm curious. Any reason you prefer maintaining these separate docs instead of maybe doing a custom YARDdoc theme?
Piotr Solnica
@solnic
Sep 10 2016 11:39
yard docs will never be able to replace usage-oriented docs
but we do plan to have a custom yard theme and deploy API docs as the extension of “user docs” to the website
John Backus
@backus
Sep 10 2016 11:40
Cool
Ok I'm there with you then
Good docs include examples
and that includes telling you where to start