Live data from Hacker News

Ruby 2.3.0 Released

ruby-lang.org

51–60 of 73 posts

Re: Ruby 2.3.0 Released

#51
post #32

This is actually a really great release. `&.` removes the really annoying (and slow) `try`. And I think the string literals freezing is going to solve a lot of problems with memory allocations. Check out this PR for Rails that covered a lot of similar performance problems created by too many string allocations. https://github.com/rails/rails/pull/21057/files I wish Rails 5 could go all in on Ruby 2.3.0 and frozen str…

How prevalent is `try` in rails/activesupport? My benchmarks show that the lonely operator is ~2x faster than `try`. I'd expect someone to create a gem that monkey patches `try` for those running 2.3.0.

`try` is different from `try!`. the new lonely operator is like `try!`, which asks only if the object is nil and then calls the method on it if it's not (and will blow up if the object doesn't have the method publically defined). `try`, in contrast, asks if the object is nil or responds to the method and returns nil if it doesn't.

Re: Ruby 2.3.0 Released

#52

Earlier quoted context omitted.

I could see it making deployment faster or nicer. Imagine being able to compile all the byte code for a Rails app locally and just shoving that up instead of waiting on bundling and all that. Also I think this would make possible hot code upgrades which are cool but probably more work than their worth. Unless you can build smart hooks into background job and web server libraries that only change the byte code in betw…

After reading the patch that introduced the byte code compilation it seems what I was hoping to use it for are clearly not goals of the project: https://bugs.ruby-lang.org/issues/11788

I'm not sure the prospects are so bleak. I made some tests and I could run the compiled code on another machine with a different directory structure. See https://ilconnettivo.wordpress.com/2015/12/25/ruby-2-3-0-ins...

Re: Ruby 2.3.0 Released

#54
post #2

I seriously saw this and thought it might be the reason for the ruby-colored banner. facepalm

doh! till I read this I thought hn had simply rolled out a new stylesheet.

Re: Ruby 2.3.0 Released

#55
post #52

Earlier quoted context omitted.

After reading the patch that introduced the byte code compilation it seems what I was hoping to use it for are clearly not goals of the project: https://bugs.ruby-lang.org/issues/11788

I'm not sure the prospects are so bleak. I made some tests and I could run the compiled code on another machine with a different directory structure. See https://ilconnettivo.wordpress.com/2015/12/25/ruby-2-3-0-ins...

I was curious just like you and gave this a try too. Seems that while the project is intended for this you can easily build this. Thank you for writing that up!

Re: Ruby 2.3.0 Released

#57
post #20

Anyone knows if Ruby has accepted IBM's contribution of JIT for Cruby?? https://news.ycombinator.com/item?id=10715610 And below is the Presentation from Ko1 on compiling Ruby http://rubykaigi.org/2015/presentations/ko1

(IBMer working on said JIT here) As Chris Seaton points out as well, we're not really open source yet. Working on getting there, but it's going to take time. The important thing now is that we can start talking with the community and making it more likely that when we do get open source, it can happen in a way consumable by the Ruby community.

do you have any status of the project? Or any dates when we can expect?

Re: Ruby 2.3.0 Released

#58
post #40
post #17

with the existence of Perl6, Clojure, F#, Rust, Go, and few others ... For someone who doesn’t know Ruby, why learn it today?

For me: because nothing else approaches it in terms of linguistic flexibility. I learned Ruby about two years ago, after learning...a dozen-ish languages? Something like that. I don't write web applications in it, because Rails grinds my gears for a whole host of reasons, but for my money it is the can-opener language. If I have a problem, I feel like I can generally explore it faster in Ruby (holla, Pry) and build a…

You should take a look at Crystal!

Re: Ruby 2.3.0 Released

#59

Nice to see "Did You Mean" suggestions flourishing across various tools now, e.g. Git too. Error messages can be a whole lot more than indecipherable jargon, even for command-line warriors. I'm also looking forward to never writing "if foo && foo.bar" again! Congrats and happy holidays Ruby team :).

Well, git's "did you mean" is probably the most frustrating command line experience imaginable, but it's quite nice in a language!

It's the worst when it says something to the effect of "you made a typo, so we already ran this unrelated command for you!"

Tip: run the following to add a 1-second pause between the message and the "fixed" command being executed:

  git config --global help.autocorrect 10
Post reply on HN