4 ms·
The dominance of Rails for its use case within the field of Ruby is is only one half of the equation. The other half is that Ruby has mostly collapsed into Rail
by usrusr 5y ago
The dominance of Rails for its use case within the field of Ruby is is only one half of the equation. The other half is that Ruby has mostly collapsed into Rails, there's not much Ruby happening outside of Rails. This could never happen with a js framework of similarly scope, because all the other js use cases won't go away. One example of such a thing that won't go away is doing client-side stuff in the scope of a Rails protect. JS would have to lose a lot before it could achieve similar focus.
- omarhaneef 5y agoI think this is "the" correct analysis. Rails has a clear one way to do things because there are no/few other options because everything else has withered away. To put this another way: to have a convention in JS, just pick a convention, and now at least you have a convention, even if everyone else has their own.
- Lio 5y agoIt’s not really true that there are no other options for web development in ruby. Roda[1], for instance, has a strong following for API work. It’s just that Rails is a safe choice. It’ll will work fine for small teams and it will scale to the size of github when/if you need it. 1. http://roda.jeremyevans.net/index.html http://roda.jeremyevans.net/index.html
- vidarh 5y agoAs someone who has used Ruby as my main language at a number of companies for the last 17 years and deeply dislike Rails and rarely use it, I couldn't disagree more. Rails draws the attention, but there's plenty other uses.
- usrusr 5y agoThat's interesting to hear, I would have guessed that Python had long won everything that could be ruby but isn't rails. Clearly, nothing will stop the inertia of someone who just happens to be productive through experience (you can probably find works-for-me wizards for almost anything, perhaps not for vba or ada but I wouldn't bet on it). Is there much happening in terms of libraries outside the rails scope or is it more a case of one less thing to worry about once you've become good with the batteries included?
- ericb 5y agoThor is gorgeous for command line apps. http://whatisthor.com/ http://whatisthor.com/ Capybara is fantastic for automated testing https://github.com/teamcapybara/capybara https://github.com/teamcapybara/capybara. Gosu for 2d Games: https://www.libgosu.org/ https://www.libgosu.org/ Example 2d game with Gosu: https://github.com/victords/super-bombinhas https://github.com/victords/super-bombinhas CRuby will be in browsers! https://bugs.ruby-lang.org/issues/18462 https://bugs.ruby-lang.org/issues/18462
- usrusr 5y agoThor looks great! I'd be surprised if something similar didn't exist for most languages, but with many of them living in obscurity because discovery is so hard without a well-established name for that class of tool. Some googling for "CLI framework" led me to oclif ("Thor for js"?) and to https://www.nexmo.com/legacy-blog/2020/06/12/comparing-cli-building-libraries https://www.nexmo.com/legacy-blog/2020/06/12/comparing-cli-b... , but that can't be everything. PS: https://github.com/shadawck/awesome-cli-frameworks https://github.com/shadawck/awesome-cli-frameworks also lists some for go and rust, getting there! (though most probably not half as complete as Thor, self-documentation should definitely be a first-class citizen!)
- vidarh 5y agoI rarely find an area where I've needed libraries and there haven't been decent stuff available in Ruby other than when doing quite esotheric stuff (e.g. there's no good low level X11 client implementation for doing raw X11 stuff). Often multiple competing projects. E.g. for ORMs ActiveRecord which is Rails default is in my opinions nowhere near good enough compared to e.g. Sequel, and there are several others. Sometimes those projects involve wrapping stuff - including Python - or porting Python, but most of what I use is pure Ruby. With respect to Python, to a lot of the Ruby community Python is in many ways the antithesis of what we want in a language. Python looks horrendous to me. It matters - I stare at code most of my day. If I were to switch languages, Python wouldn't make the shortlist even. It's not that I think Python is objectively worse, but subjectively to me it's unreadable and messy and I can afford to avoid using it most of the time. EDIT: To expand on some of what I use or have used Ruby for: web dev with Sinatra and Padrino (my main reason for avoiding Rails here is that most of what I do is mostly API driven, and because I prefer Sequel as the ORM), financial modelling (I work for a VC), my text editor of the last few years is written in Ruby (but not packaged up to be useful for others yet - I'm gradually splitting parts of it out into gems, though), DevOps by generating terraform, service orchestration (proprietary pre-Kubernetes orchestration of containers and vms across on-prem, colocated, managed servers and VPSs split between openvz, docker and KVM), system to auto-deploy replicated sets of Postgres servers with logs and backup dumps automatically distributed to a Ruby storage service (pre-RDS, and running on the aforementioned orchestrator), PDF generation, messaging middleware, scraping, large scale crawlers, trading bots. And many more.
- TheRealDunkirk 5y agoRuby is a wonderful language for other things outside of Rails. I'm old. I've done csh, bash, perl, tcl, and python for scripting and miscellaneous programs. Since discovering Rails, I use Ruby for basically everything now. The only miss I've had in recent memory has been needing to do heavy statistical work with R for speed reasons, but, then, you're not going to do that in JS (or anything else) either.