Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 15 19:07
    jjw starred dry-rb/dry-types
  • Dec 15 18:13

    flash-gordon on master

    Remove unreachable method (compare)

  • Dec 15 18:11

    flash-gordon on master

    Remove Dry::Types.type_keys It… (compare)

  • Dec 15 18:09

    flash-gordon on master

    Remove unreachable code (compare)

  • Dec 15 18:04

    flash-gordon on master

    Coverage for function.rb (compare)

  • Dec 15 17:15

    flash-gordon on fix-maybe-call-safe

    (compare)

  • Dec 15 17:15

    flash-gordon on master

    Fix behavior of Maybe#call_safe… Merge pull request #380 from dr… (compare)

  • Dec 15 17:15
    flash-gordon closed #380
  • Dec 15 17:13
    flash-gordon synchronize #380
  • Dec 15 17:13

    flash-gordon on fix-maybe-call-safe

    Fix behavior of Maybe#call_safe… (compare)

  • Dec 15 17:12
    flash-gordon opened #380
  • Dec 15 17:11

    flash-gordon on fix-maybe-call-safe

    Fix behavior of Maybe#call_safe… (compare)

  • Dec 15 17:00

    flash-gordon on fix-maybe-try

    (compare)

  • Dec 15 17:00

    flash-gordon on master

    Fix behavior of Types::Maybe#try Merge pull request #379 from dr… (compare)

  • Dec 15 17:00
    flash-gordon closed #379
  • Dec 15 15:09

    flash-gordon on master

    Fix typo Merge pull request #67 from gru… (compare)

  • Dec 15 15:09
    flash-gordon closed #67
  • Dec 15 14:43
    flash-gordon opened #379
  • Dec 15 14:43

    flash-gordon on fix-maybe-try

    Fix behavior of Types::Maybe#try (compare)

  • Dec 15 14:30

    flash-gordon on master

    Lax coverage (compare)

Andy Holland
@AMHOL
Ahh, that's a shame
Piotr Solnica
@solnic
@AMHOL I’m about to start. first pages will be written on Friday
Andy Holland
@AMHOL
Nice :)
Piotr Solnica
@solnic
I need to come up with a rough plan first, but I have “intro” in my head so that’d be a start
I also need to figure out leanpub :)
90 stars on dry-validation btw :sparkles:
Andy Holland
@AMHOL
:D
Piotr Solnica
@solnic
it’s been a trending repo on github since last week, every day, I actually check it daily for whatever reason :joy:
Andy Holland
@AMHOL
lol to see if any of your repos are there ;)
Piotr Solnica
@solnic
that’s very likely
Andy Holland
@AMHOL
It is cool tho
Piotr Solnica
@solnic
morning
Hannes Nevalainen
@kwando
hola!
Piotr Solnica
@solnic
how would you call an object that is a result of running validation?
@AMHOL @timriley ^^ ???
hola @kwando :)
leaning towards Schema::Outcome
Hannes Nevalainen
@kwando
whats wrong with Schema::Result?
Piotr Solnica
@solnic
we have Validation::Result already
which is a result-per-rule
and we have Validation::Result::Set which is a result per rule-set
I actually need another concept, an array of result objects
no idea how to call it either
ok I know what to do
Tim Riley
@timriley
“Result” seems most natural, but since it’s already in use, “Outcome” isn’t too bad.
Piotr Solnica
@solnic
Validation::Result will become the enumerable containing Result::Value and Result::Set
Tim Riley
@timriley
“Product” is another possibility but it’s a term that’s already too loaded
Piotr Solnica
@solnic
question is, how to call abstract class for value and set lol
damn
it’s gonna be silly to have Schema::Result containing a…validation result
NAMING
;(
otoh it should be private
we want access to successes and failures
@timriley btw how does successes sound?
Tim Riley
@timriley
Sounds fine to me.
Piotr Solnica
@solnic
ok :)
Tim Riley
@timriley
It’s clear.
Piotr Solnica
@solnic
I’m about to break things /cc @timriley @kwando
timriley @timriley stops upgrading ;)
Piotr Solnica
@solnic
schema.messages(input) => schema.(input).messages
YOU CAN UPGRADE USING sed OK?!
Tim Riley
@timriley
oh, this is a nice upgrade!
Piotr Solnica
@solnic
almost there with refactor
Piotr Solnica
@solnic
so, for fun, I stubbed I18n in AM::V and ran the benchmark
Calculating -------------------------------------
ActiveModel::Validations
                       628.000  i/100ms
      dry-validation     1.948k i/100ms
-------------------------------------------------
ActiveModel::Validations
                          5.933k (± 1.5%) i/s -     30.144k
      dry-validation     20.386k (± 7.6%) i/s -    103.244k

Comparison:
      dry-validation:    20385.8 i/s
ActiveModel::Validations:     5932.6 i/s - 3.44x slower
this is AM::V WITHOUT COERCION AND WITHOUT I18n
BUT
dry-v is WITH coercion and WITH message compilation
and it’s ~3.5x faster :joy: