R

RubySource

rubysource.com · Group blog · on HN since 2011

Ruby and Rails development site with tutorials on Rails, Sinatra, RubyMotion, JRuby, and security issues.

What HN saysHN links it for its Rails YAML exploit write-up and its Rails versus Sinatra comparison, which commenters cite to explain the two philosophies.
82HN people shared it
8linked it in comments
113stories submitted
435story points
13 years agolast shared
2011people per year2026

Most-shared posts

  1. 1
  2. 2
  3. 3
    Rails or Sinatra: The Best of Both Worlds?
    3 people · 6 points · first shared 2012 · 1 comments on HN
  4. 4
    Get Your App Ready for Rails 4
    2 people · 76 points · first shared 2013 · 31 comments on HN
  5. 5
    Ruby’s Missing Data Structure
    2 people · 9 points · first shared 2013 · discussion on HN
  6. 6
  7. 7
    Going Dynamic on JVM: JRuby vs. Groovy
    2 people · 4 points · first shared 2012 · discussion on HN
  8. 8
    Meet Fifteen Ruby Core Committers
    2 people · 4 points · first shared 2013 · discussion on HN
  9. 9
    Laurent Sansonetti on RubyMotion Internals
    2 people · 4 points · first shared 2013 · discussion on HN
  10. 10
    Rails 4 Quick Look: Strong Parameters
    2 people · 3 points · first shared 2012 · discussion on HN
  11. 11
    RubySource: Looking for Talent
    2 people · 3 points · first shared 2012 · discussion on HN
  12. 12
  13. 13
    A look at Ruby 2.0
    1 people · 48 points · first shared 2013 · 10 comments on HN
  14. 14
  15. 15
    RubyMotion: Dreams do come true
    1 people · 14 points · first shared 2013 · 2 comments on HN

What HN people wrote when they linked it

dasil003 · 2013-02-11
Yes, however it's also worth noting that Rails core has acknowledged the awkwardness of relying solely on model-level protection for vulnerabilities that should be nipped in the bud at the controller level. Rails 4 will include DHH's new strong_parameters gem that allows params to be filtered proactively on every controller. This will of course help prevent a much broader class of vulnerabilities than ActiveRecord bugs. http://rubysource.com/rails-4-quick-look-strong-parameters/
paulbjensen · 2012-11-22
I think that you've hit the nail on the head, and highlighted 2 differing styles of building web apps within the Ruby community. There is a great post about this here: http://rubysource.com/rails-or-sinatra-the-best-of-both-worlds/
zem · 2012-06-07
from the ruby side of things, here's a very good write-up of the differing philosophies between rails [monolithic, batteries-included] and sinatra [small, lightweight]: http://rubysource.com/rails-or-sinatra-the-best-of-both-worlds/ the post goes into why there is room (and a need) for both in the ruby web ecosystem, and where you'd want to use each one.
davesims · 2012-05-04
"Ruby is a "me too" on those fronts, and not a particularly novel one." Of course. No one, especially not Matz, ever claimed Ruby was novel. Why should I care whether a language feature is new when I have features to ship? What you seem to be dogmatically, blindly ignoring is that Ruby's peculiar amalgamation of existing techniques, borrowed from (standing on the shoulders of) Smalltalk, Perl, Python, certain aspects of Lisp and others, created an expressiveness with those idioms that invited widespread adoption that Smalltalk and Lisp in all their glory only ever dreamed of. Innovation was the least of Ruby's concerns, and it's irrelevant to the conversation at hand. Type-safety seems to be a big thing for you. This may seem to be an enormous advantage to you, and I wish you well. I personally think type safety is the most overrated language feature in CS history. In my crankier moments I'd say it's essentially a compile-time unit test and refactoring/code-browsing crutch for IDE-jockeys that don't test their code. In my less-cranky moments...I'll probably say the same thing. And that's after a decade and an half in Java and C#, not quite a decade in Ruby. To me, type safety imposes far more overhead than it's worth -- generics, abstract classes, interfaces, all irrelevant and basically built-in and implicit in dynamic environments like Ruby. But that's another digression. Suffice it to say, in my entire software career I've kept track of the sum total of bugs I've fixed…
IanCal · 2013-08-02
I think he's referring to the rails YAML exploit [0] because you can use yaml to create objects, like this: --- !ruby/hash:ActionDispatch::Routing::RouteSet::NamedRouteCollection 'foo; eval(eval(puts '=== hello there'.inspect);': !ruby/object:OpenStruct table: :defaults: {} Allowing people to run arbitrary code on rails servers. [0] http://rubysource.com/anatomy-of-an-exploit-an-in-depth-look-at-the-ra…
danso · 2013-07-15
I know we shouldn't care about the source, crazy-insane as he obviously is, but FWIW, the author is Yusuke Endoh, one of the Ruby core members. RubySource had an interview with him here: http://rubysource.com/meet-fifteen-ruby-core-committers/ He lists his "hobby in programming" as: "writing a Quine and enjoying esoteric programming."
ScottBurson · 2013-02-14
Let's get specific, because there's a point here that I think a lot of people are missing (including tptacek). ActionDispatch::Routing::RouteSet::NamedRouteCollection.add calls 'eval' on the property name passed to it. This invites exploitation. It also fails 'static_typed's desideratum of each component having a single responsibility. And I don't think calling it "magic" is too strong. I don't know to what extent the Ruby culture encourages calling 'eval' in random API routines like this, but when I previously argued here on HN that that had to be a bad idea, I got some pushback. I would certainly call this a dangerous anti-pattern. EDITED to add: reference: http://rubysource.com/anatomy-of-an-exploit-an-in-depth-look-at-the-ra…
objclxt · 2013-02-13
Well, sort of. I wouldn't really call it running "ruby code on the Objective-C runtime". Your Ruby code is effectively being converted to Cocoa API calls during the compilation process. RubyMotion has a number of Objective-C subclasses that match back to Ruby objects (for example, strings in RubyMotion aren't NSStrings, but a subclass of them). If you dump the headers out of a RubyMotion app you can pretty clearly see this. Ruby and Objective-C definitely aren't that similar internally - as someone else has suggested, there's no technical reason you couldn't do something similar for Python. It just happens that Ruby to Cocoa bindings have been around for a while (for some time with Apple support), and as a result there has been generally more interest in carrying it forward. I've probably failed to adequately explain how it works, but the MacRuby source is available on GitHub, and Laurent Sansonetti has done a run through how RubyMotion does it's thing here: http://rubysource.com/laurent-sansonetti-on-rubymotion-internals/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close