4 ms·
Cool project. Anyone know what inspired the name, theme etc?
by keen 15y ago
Cool project.
Anyone know what inspired the name, theme etc?
- joshbuddy 15y agoI have no idea how we got down the Russian path. Sort of started as a joke and somehow went from there. Renee is my gf's name, and she's very patient with me when I wanna work on open source, so, it's a nod to her. The inspiration for it came from Railsconf 2009 when one of the Sinatra guys said how get "/:id" do |id| was a smell because of the id repeat. I had been working on a new routing DSL for Goliath, when I got an itch to start making simple, useful rack apps.
- themgt 15y agoI'll definitely give this a try for my next would-be Sinatra/Padrino project. The code looks great and so does the site. Thanks for this!
- acangiano 15y agoJosh, I have not looked into the details of your framework, but why not simplify the DSL to: path 'blog' do |id| @blog = Blog.get(id) get { halt @blog } put { @blog.update(request.params); halt :ok} end Why do you need the var call within the block? Also, you seem to break the ruby convention of using do end for blocks larger than one line, in many of your examples. (Again, I spent three seconds on your site, so you may have a solid reason for this and have explained it already as well.)
- joshbuddy 15y agoThis very well might be the next iteration in fact. There is no "good reason" aside from simplicity. One of the reasons against this is var can take validation. So, you can do the following. var Integer do |id| this will only continue if it matches against an Integer (and it will also cast it for you). The argument list might get hella complicated if you allow munging like that. I am considering allowing chaining though, so, path('blog').var do |id| What would you think of that?
- nesquena 15y agoYeah this is an early release. I can think of several ways to enhance the DSL even more with ideas similar to this to cleanup common cases.
- joshbuddy 15y agoYeah, exactly. I wanna get a better handle on what these common cases are, so, comments like this are wonderful.
- keen 15y agoAh, cool. I love Sinatra, and I'm big on DRY, so I'll definitely give Renee a shot. BTW, noticed the 'GITHUB FORK YOU', nice haha.
- seanp2k2 15y agoYeah, the "GITHUB FORK YOU" thing made me laugh too. Thanks for another viable option for a Ruby DSL! I might use it if I wanted to mess around with HTTP response headers -- looks like it'd be good for that.