home.social

#dryrb — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #dryrb, aggregated by home.social.

  1. @Ryanbigg

    re:
    > How developers sound to non-developers when you talk shop

    Ohh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby

    Never again without a contract: dry-validation

    rubyevents.org/talks/never-aga

    where I also featured your work, Ryan :)

    ⁺ wow almost 3 year ago to the date.
    #dryrb

  2. @Ryanbigg

    re:
    > How developers sound to non-developers when you talk shop

    Ohh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby

    Never again without a contract: dry-validation

    rubyevents.org/talks/never-aga

    where I also featured your work, Ryan :)

    ⁺ wow almost 3 year ago to the date.
    #dryrb

  3. @Ryanbigg

    re:
    > How developers sound to non-developers when you talk shop

    Ohh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby

    Never again without a contract: dry-validation

    rubyevents.org/talks/never-aga

    where I also featured your work, Ryan :)

    ⁺ wow almost 3 year ago to the date.
    #dryrb

  4. @Ryanbigg

    re:
    > How developers sound to non-developers when you talk shop

    Ohh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby

    Never again without a contract: dry-validation

    rubyevents.org/talks/never-aga

    where I also featured your work, Ryan :)

    ⁺ wow almost 3 year ago to the date.
    #dryrb

  5. @Ryanbigg

    re:
    > How developers sound to non-developers when you talk shop

    Ohh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby

    Never again without a contract: dry-validation

    rubyevents.org/talks/never-aga

    where I also featured your work, Ryan :)

    ⁺ wow almost 3 year ago to the date.
    #dryrb

  6. Hanami 2.3 beta1 is out! This is the one that includes Rack 3 support 🚀

    hanamirb.org/blog/2025/10/03/a

    If you have any questions, join the #Hanami Discord server:  discord.gg/KFCxDmk3JQ

    #Hanami #Dryrb

  7. Hey, Dry::Struct users... is this "Hash to attributes" thing considered a feature? I find it messy...

    I can see the advantages, but I can clearly also see the cons, especially in terms of predictability and debugging...

    Took me literally hours to chase a missing object return before I got the hang of this. #ruby #dryrb

  8. Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:

    * The parameter parsing functionality of Hanami Actions.
    * Do notation from Dry-Monads.
    * Result objects, also from Dry-Monads.

    Feedback and corrections (especially) are welcome! Please let me know what you think!

    rossney.net/articles/protointe

    #ruby #hanami #dry_rb #dryrb

  9. Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:

    * The parameter parsing functionality of Hanami Actions.
    * Do notation from Dry-Monads.
    * Result objects, also from Dry-Monads.

    Feedback and corrections (especially) are welcome! Please let me know what you think!

    rossney.net/articles/protointe

    #ruby #hanami #dry_rb #dryrb

  10. Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:

    * The parameter parsing functionality of Hanami Actions.
    * Do notation from Dry-Monads.
    * Result objects, also from Dry-Monads.

    Feedback and corrections (especially) are welcome! Please let me know what you think!

    rossney.net/articles/protointe

    #ruby #hanami #dry_rb #dryrb

  11. Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:

    * The parameter parsing functionality of Hanami Actions.
    * Do notation from Dry-Monads.
    * Result objects, also from Dry-Monads.

    Feedback and corrections (especially) are welcome! Please let me know what you think!

    rossney.net/articles/protointe

    #ruby #hanami #dry_rb #dryrb

  12. Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:

    * The parameter parsing functionality of Hanami Actions.
    * Do notation from Dry-Monads.
    * Result objects, also from Dry-Monads.

    Feedback and corrections (especially) are welcome! Please let me know what you think!

    rossney.net/articles/protointe

    #ruby #hanami #dry_rb #dryrb

  13. I got the idea for command_kit-completion after seeing that dry-cli now has it's own completion generation code that used the 'completely' gem. So if you're a dry-cli user, go use that library for shell completions.
    github.com/rngtng/dry-cli-comp
    #dryrb

  14. Using dry-validation and an HTML form, how would you handle a field which can be either a boolean or a comma separated list? It must ultimately map to the same symbol name.
    #dry_validations #dryrb

  15. @Sandbagger I'm glad you found that #ruby toy project interesting, the ogpreview was not meant for document #docker with #Rails, but mostly to demonstrate good practices such as Railway Oriented Programming in general and @dry_rb gems in particular.

    Also, if you want to go a little bit deeper, you can check the repository for my talk in #RubyConf2022, where it was more about API input validations & in general and #modularity by accident:

    github.com/esparta/rubyconf202

    #dryrb #DryValidation

  16. #speaking pro tip: Remember to actually drink water before your talk. Else you are going to be as dry as the Sahara when you are trying to talk about #dryrb and #hanami

  17. However, if I change Args to use an explicit block, it works for some reason:

    ```
    require 'dry/types'

    module Types
    include Dry::Types()
    Args = Types::Array.of(Types::String).constructor do |value|
    value.split
    end
    end

    require 'dry/schema'

    Params = Dry::Schema::Params() do
    required(:args).filled(Types::Args)
    end

    Params.call("args" => "foo bar")
    # => #<Dry::Schema::Result{:args=>["foo", "bar"]} errors={} path=[]>
    ```
    #dryrb #dry_rb

  18. Hmm, think I found an inconsistency in dry-types:

    ```
    require 'dry/types'

    module Types
    include Dry::Types()
    Args = Types::Array.of(Types::String).constructor(&:split)
    end

    require 'dry/schema'

    Params = Dry::Schema::Params() do
    required(:args).filled(Types::Args)
    end

    Params.call("args" => "foo bar")
    # => #<Dry::Schema::Result{:args=>"foo"} errors={:args=>["must be an array"]} path=[]>
    ```

    "foo bar" is being coerced to `str.split[0]`.
    #dryrb #dry_rb

  19. Is there a way to convert `Dry::Schema.Params` into an identical `Dry::Schema.JSON` schema? What if I want to coerce/validate both HTTP params that are then passed to a Sidekiq worker and deserialized as JSON params?
    #dryrb #dry_rb

  20. Why doesn't `Dry::Types::Range` have an `.of()` method for specifying that the Range must be of Integers or Strings?
    #dryrb #dry_rb

  21. Where should I store my dry-validation or dry-schema classes if I'm not using Hanami or Rails? Obviously if I was using dry-struct, I'd store them in `models/`. However, where should dry-validation contract classes go?
    #dryrb #dry_rb

  22. I wonder if dry-schema or dry-validation can coerce a String into an Array by splitting the String. I assume I can define a custom type that can do that?
    #dryrb

  23. I also wonder what is the best way to raise an exception or log errors returned by dry-validations from within a sidekiq worker? Say somehow malformed data gets passed to MyWorker.perform_async(...) but the MyWorker class validates the data using dry-schema or dry-validation.
    #dryrb #sidekiq

  24. I'm also curious how people are using dry-validation/dry-schema/dry-struct to handle sinatra params from forms or sidekiq job arguments. Do people use the dry-* libraries directly, or do they use one of the other plugin libraries such as sinatra-validation, sinatra-dry_params, or sidekiq-dry?
    github.com/IzumiSy/sinatra-val
    github.com/tiev/sinatra-dry_pa
    github.com/zorbash/sidekiq-dry
    #dryrb #sinatra #sidekiq #params

  25. should dry-schema or dry-validation rules be defined as named classes, or inline in the sinatra routes using sinatra-validation? If defined as classes, what is the best practice for naming them or what directory should they be stored in?
    github.com/IzumiSy/sinatra-val
    #dryrb #sinatra

  26. When should I use dry-schema vs. dry-validation?
    #dryrb

  27. @BobbyMcWho I think the newest stuff that is happening with #dryrb and #hanami version 2.0 is pretty interesting! There is a lot of going on in the Ruby without Rails ecosystem, @solnic @timriley and @jodosha are putting out some amazing code.

  28. There should be a dry-cache library which allows you to insert a caching layer in between methods.
    /cc @dry_rb #dryrb

  29. Since ruby.social runs on Mastodon 4.0 now, you can follow hashtags!

    Here are some hashtags that I'll be using for development updates:

    #hanami
    #dryrb
    #romrb

    Simply click on a hashtag and then another click on that➕ icon 🙂

    #noxp

  30. Huge progress on dry-logger today. Took a bit longer than I anticipated and I was actually close to give up, but somehow I managed to pull this off. The next, and final, step is re-introduction of colorful output for rack request logging and 1.0.0 will be ready.

    #dryrb #hanami #logging #opensource #gem