Live data from Hacker News

What's New in Ruby 2.1 [pdf]

atdot.net

1–10 of 36 posts

Re: What's New in Ruby 2.1 [pdf]

#2
I really like the ObjectSpace.trace_object_allocations addition. I had a quick look at the 2.1 docs for ObjectSpace and there seem to be all sorts of interesting methods in there reachable_objects_from(obj) and memsize_of(obj) for example. It looks like understanding memory usage and tracking down memory leaks will get a lot easier with 2.1.

http://ruby-doc.org/stdlib-2.1.0/libdoc/objspace/rdoc/Object...

Re: What's New in Ruby 2.1 [pdf]

#5
post #2

I really like the ObjectSpace.trace_object_allocations addition. I had a quick look at the 2.1 docs for ObjectSpace and there seem to be all sorts of interesting methods in there reachable_objects_from(obj) and memsize_of(obj) for example. It looks like understanding memory usage and tracking down memory leaks will get a lot easier with 2.1. http://ruby-doc.org/stdlib-2.1.0/libdoc/objspace/rdoc/Object...

#reachable_objects_from was added in 2.0, and I think #memsize_of was introduced in one of the 1.9 releases. The documentation is new though.

I wrote a little about them here: http://globaldev.co.uk/2013/03/ruby-2-0-0-in-detail/#id6

Re: What's New in Ruby 2.1 [pdf]

#6
post #4

It's unclear from the intro summary, but I'm assuming from the lack of further explanation that refinements are just GONE, and not just "no longer experimental"?

Nope, by "no longer experimental" they are now officially in the core language. More information here: http://rkh.im/ruby-2.1

Re: What's New in Ruby 2.1 [pdf]

#7
post #4

It's unclear from the intro summary, but I'm assuming from the lack of further explanation that refinements are just GONE, and not just "no longer experimental"?

Nope, by "no longer experimental" they are now officially in the core language. More information here: http://rkh.im/ruby-2.1

Ah, well that's something then. Thanks for the clarification.

Re: What's New in Ruby 2.1 [pdf]

#8
Everytime I read a Ruby version announcement/explanation, it reminds me that I've been a coder working and thinking exclusively in English, but my current programming language of choice is prominently steered by non-English speakers...and somehow things work pretty peachy. But it always makes me wonder how much more in-depth and richer the discussion of Ruby amongst its Japanese maintainers, before they translate it for us in English?

Re: What's New in Ruby 2.1 [pdf]

#9
Koichi is gives some of the best presentations. It is hard enough to be funny in one language, yet to be funny and understandable in two is quite an accomplishment. If you're ever at a Rubyconf, go to his talks. Also love the speed work he's been doing with generational GC. For a primer, Pat Shaughnessy has a great talk you should check out, also Ruby Under a Microscope is a good dive into Ruby.

Re: What's New in Ruby 2.1 [pdf]

#10

I'm looking forward to `def` returning a symbol (page 11). private static void def main(args) ...; end

That slide was a bit confusing for my underslept mind. Is that meant as an example of calling methods which work over the result of defining main (in this case static and void)?
Post reply on HN