These are chat archives for dry-rb/chat

10th
Feb 2018
Nikita Shilnikov
@flash-gordon
Feb 10 2018 12:07
hey, I pushed dry-monads 1.0.0.beta1 check it out https://github.com/dry-rb/dry-monads/blob/master/CHANGELOG.md I'll be polishing rough edges left, if any
and will be writing docs ofc, but the changelog is already here so feel free to give it a try
esp look at Do, it's hot
Piotr Solnica
@solnic
Feb 10 2018 14:24
huh this changelog looks outstanding
any reason for deprecating Either rather than just :bomb: it?
Nikita Shilnikov
@flash-gordon
Feb 10 2018 14:28
I should do it earlier, I want to give people 1 version to update, so it happens we have 1.0 with these deprecations. I don't think it's a big dealy, really. In fact, I added a feature to dry-core for making deprecations nicer
Piotr Solnica
@solnic
Feb 10 2018 14:28
oh you did? fantastic
anyhow, sure, if you're OK with it
Nikita Shilnikov
@flash-gordon
Feb 10 2018 14:28
and there are dry-validation, dry-matcher, and dry-transaction all depend on dry-monads. It would be tough to upgrade all at once
Piotr Solnica
@solnic
Feb 10 2018 14:29
OK :)
Nikita Shilnikov
@flash-gordon
Feb 10 2018 14:29
and, btw, not all of them are on rubygems ;)
for instance, updated versions of dry-transaction and dry-validation are not there yet
Aaron Barthel
@abrthel
Feb 10 2018 21:32
Question about dry-struct. Would the following be possible? So a region has an array of slots but instead of slots being held in a basic array, could I use some other kind of collection class? SlotSet can be implemented however, I just need some custom behaviour for managing a collection of slots but and that behaviour doesn't really make sense to put it in the region class if I don't have to.
class Region < Dry::Struct
  attribute :slots, SlotSet
end

class SlotSet < Dry::Struct
  attribute :slots, Types::Array.of(Slot)
end

class Slot
 # ... some attributes
end