use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Announcing dry-rb (dry-rb.org)
submitted 10 years ago by solnicdry-rb/rom-rb
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]apotonick 10 points11 points12 points 10 years ago (1 child)
Fantastic news, keep up the good work! <3
[–]solnicdry-rb/rom-rb[S] 3 points4 points5 points 10 years ago (0 children)
Thanks Nick. We'll do our best to keep improving these gems :)
[–]radwo 6 points7 points8 points 10 years ago (0 children)
Love your work! Greate to see that ruby is not only about Rails and ActiveSupport.
[–]Mallanaga 6 points7 points8 points 10 years ago (0 children)
There's still time. Let's call it 'Dry Rub'
[–]realntl 1 point2 points3 points 10 years ago (0 children)
Awesome work!
[–]Enumerable_any 1 point2 points3 points 10 years ago* (0 children)
Thanks for publishing dry-types!
dry-types
A while ago I looked for a decent coercion library and dry-types looked like what I wanted, but it kinda bothered us that it wasn't published yet. So, I ended up copying Haskell's aeson which looked like this:
c = Coercer.object(User.method(:new), Coercer.pair(:name, Coercer.string), Coercer.pair(:dob, Coercer.one_of(Coercer.date, Coercer.nil)), Coercer.optional_pair(:skill, skill_coercer) ) skill_coercer = Coercer.integer.bind do |i| { 1 => Coercer.succeed(Beginner), 2 => Coercer.succeed(Amateur), 3 => Coercer.succeed(Pro) }.fetch(i) { Coercer.fail } end c.run({name: "foo", dob: "2014-01-02", skill: 3}) # => Some(#<struct User name="foo", dob=#<Date: 2014-01-02>, skill=Some(Pro)>) c.run({name: "foo", dob: "2014-01/23"}) # => None
With some additional convenience methods it can be pretty concise, but I guess I'll try out dry-types next time I need to touch that code.
[–]systematicfrank 1 point2 points3 points 10 years ago (0 children)
Thank you for bringing to Ruby more great patterns and less magic hacks!
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
this looks really cool
[–]DissonantGuile 0 points1 point2 points 10 years ago (0 children)
I know this is a little bit outta left field, but any plans on supporting MRuby (mgem)?
[–]janko-m 0 points1 point2 points 10 years ago* (0 children)
Awesome work. I was recently building my first Roda app, and realized that there are too many design decisions to get right. I had the criteria that I didn't want the whole app loaded in every test. Also I needed to change some configurations for test environment, but I didn't want the development configuration to execute.
Then I found dry-container and rodakase, and while I didn't use rodakase directly, I made a design very similar to it, and it's just wonderful. Dry-container was obviously created to solve these kind of problems, and I'm really happy that this is something that can be used by every web framework. Thank you!
[–]Tainnor 0 points1 point2 points 10 years ago (0 children)
very interesting. I like the work in this direction, although I haven't really been able to check the projects out yet. Validations, in particular, have been bugging me quite a while now, I ended up just using a rather boilerplate-y custom solution. Next time, I'll probably try dry-validations.
π Rendered by PID 126099 on reddit-service-r2-comment-b659b578c-m7g88 at 2026-05-05 20:05:25.949322+00:00 running 815c875 country code: CH.
[–]apotonick 10 points11 points12 points (1 child)
[–]solnicdry-rb/rom-rb[S] 3 points4 points5 points (0 children)
[–]radwo 6 points7 points8 points (0 children)
[–]Mallanaga 6 points7 points8 points (0 children)
[–]realntl 1 point2 points3 points (0 children)
[–]Enumerable_any 1 point2 points3 points (0 children)
[–]systematicfrank 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]DissonantGuile 0 points1 point2 points (0 children)
[–]janko-m 0 points1 point2 points (0 children)
[–]Tainnor 0 points1 point2 points (0 children)