Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wycats
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
61 ms
·
571.
▲
by
wycats
17y ago
Totally the tip of the iceberg. I plan to post some more of the built-in Rails support for other YSlow recommendations in the coming weeks.
572.
▲
by
wycats
17y ago
Huh?
573.
▲
by
wycats
17y ago
Hey @cscotta: This is just the first part of a few posts on this topic. The important part of the post is that Rails handles most of the heavy lifting for you. "Split assets across domains" sounds like it's a snap, but if you already have a
574.
▲
by
wycats
17y ago
Yep. You'd be modifying the String class itself, not just Strings that find their way into some file.
575.
▲
by
wycats
17y ago
Yeah. Conceptually, you can think of the difference as whether or not there can be two copies of something. There can only be one copy of a Symbol, Fixnum, true, false, and nil. This means that true == true, and true.dup #=> error.
576.
▲
by
wycats
17y ago
This is basically how ActiveSupport's "activesupport/ruby/shim" functionality works. It adds pure-ruby versions of features added in Ruby 1.9 only if they aren't already defined.
577.
▲
by
wycats
17y ago
That's just to say that there aren't multiple "2"s. But 2 itself is still an object, pointing at its Fixnum class, which has all the normal Class and Object semantics.
578.
▲
by
wycats
17y ago
Indeed. It's probably wise to use namespaced internal methods inside of libraries or frameworks. However, Rails has historically pioneered new language features that eventually make their way into the language itself (Object#tap, Enumerable