Where communities thrive


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

    dry-bot on master

    [devtools] sync (compare)

  • 22:35

    flash-gordon on keep-method-visibility

    (compare)

  • 22:35

    flash-gordon on master

    Add specs that demonstrate the … When wrapping methods, be expli… Visbility-preserving API for Do… and 3 more (compare)

  • 22:35
    flash-gordon closed #136
  • 22:10
    flash-gordon synchronize #136
  • 22:10

    flash-gordon on keep-method-visibility

    Update changelog (compare)

  • 22:01
    flash-gordon ready_for_review #136
  • 22:01
    flash-gordon commented #136
  • 21:58
    flash-gordon synchronize #136
  • 21:58

    flash-gordon on keep-method-visibility

    Keep visibility without changin… (compare)

  • 21:34
    flash-gordon synchronize #136
  • 21:34

    flash-gordon on keep-method-visibility

    Keep visibility without changin… (compare)

  • 21:28
    flash-gordon edited #136
  • 21:01
  • 19:53
    arempe93 starred dry-rb/dry-monads
  • 19:24
    majksner starred dry-rb/dry-initializer
  • 16:36
    flash-gordon commented #124
  • 16:21
    flash-gordon opened #136
  • 16:18

    flash-gordon on keep-method-visibility

    Add specs that demonstrate the … When wrapping methods, be expli… Visbility-preserving API for Do… (compare)

  • 15:56
    bilby91 commented #124
Piotr Solnica
@solnic
I should be able to release dry-data later today btw
Piotr Solnica
@solnic
class Address < Dry::Data::Struct
  define do
    attr :city, "strict.string"
    attr :zipcode, "coercible.string"
  end
end
wdyt about this dsl ^ ??
:+1: or :-1: ?
Benjamin Klotz
@tak1n
why not attr on class level?
Luca Guidi
@jodosha
@solnic I have the same question, of @tak1n: why not at the class level (aka w/o define)? Is that because you want the block to be lazily eval'd?
Hannes Nevalainen
@kwando
@solnic I don't like that define block tbh
but I'll use it anyway =P
Piotr Solnica
@solnic
ended up with the same as virtus
Hannes Nevalainen
@kwando
:thumbsup:
Piotr Solnica
@solnic
the block gives you an opportunity to set some additional stuff common for all attr definitions, but that would be premature
so whatever ;)
Hannes Nevalainen
@kwando
I like the API virtus has, it "feels right"
Piotr Solnica
@solnic
ok ;)
the attribute options are horrible though, dry-data won’t have that
Hannes Nevalainen
@kwando
maybe horrible on the backside =P
Piotr Solnica
@solnic
I think it’s horrible on both sides
Hannes Nevalainen
@kwando
tbh I'm only using the :default option anyway =P
stupid markdown
Piotr Solnica
@solnic
btw I ported my app to dry-data for domain entities, so I guess I could push 0.0.1
@kwando ^
Hannes Nevalainen
@kwando
woho! =D
Piotr Solnica
@solnic
@kwando not sure how usable it’s gonna be for you, there’s a lot of rough edges wrt error handling
Piotr Solnica
@solnic
so I just pushed dry-data 0.0.1 to rubygems /cc @kwando
Luca Guidi
@jodosha
:clap:
Benjamin Klotz
@tak1n
:clap: :shipit:
Piotr Solnica
@solnic
lol ;)
Benjamin Klotz
@tak1n
:D
Piotr Solnica
@solnic
it’s an early alpha, I’m sure it’s gonna crash for you :joy:
otoh my app is working so that gives some level of confidence ;0
Benjamin Klotz
@tak1n
hehe for sure :P
now Ill ask u twice as often
another lib from u I want to use :D
solnic QA team -> open position
Piotr Solnica
@solnic
haha :)
I mean it’s a good start, so please try it out :) I didn’t mean to discourage you
I think the really tricky part will be APIs for defining types that are suitable for form-input
Benjamin Klotz
@tak1n
u didn't discourage me ;)
Piotr Solnica
@solnic
with nasty stuff like “something that can be an empty string, which then we want to turn into nil unless it’s a string parsable to a date"
Benjamin Klotz
@tak1n
hehe so exactly what I need
Piotr Solnica
@solnic
we really really need a system that would allow us to define things like that
Benjamin Klotz
@tak1n
empty string -> date?
ah fuck "".to_i is zero
this to Date is a valid Date
:D
FUN
irb(main):009:0> Date.new("".to_i)
=> #<Date: 0000-01-01 ((1721058j,0s,0n),+0s,2299161j)>
irb(main):010:0> Date.new("")
ArgumentError: comparison of String with 0 failed
        from (irb):10:in `<'
        from (irb):10:in `new'
        from (irb):10
        from /usr/bin/irb:11:in `<main>'
why ruby why..
Piotr Solnica
@solnic
@tak1n there’s a lot of gotchas, that’s why isolating them is so important