Incremental garbage collection is great for realtime-ish use cases like games and multimedia, too, because if you tune the collector right, you can ensure your GC never causes you to drop frames or fail to mix a sound buffer on time.
Need to hit vsync every 16ms? Just run a 1-3ms incremental GC every frame when you have time to spare, and as long as your game's theoretical performance is good enough, you won't ever hitch. This is one of Lua's advantages for game scripting because it's had a fairly solid incremental collector for a while, making it easy to give the GC a fixed chunk of time to operate in every frame so your game never pauses.
Scripting is a huge boon for people doing game development, game prototyping, and multimedia scripting (toolsets like Processing, for example), so having another scripting language to choose from for that is awesome.
It's too bad that keyword arguments are semantically opposite between CRuby and RubyMotion in Ruby 2.0+. It'll cause a divergence and makes it a little more difficult for Rails+RubyMotion engineers like me to switch.
I understand the reasoning behind both decisions (RubyMotion is following Objective-C's semantics, CRuby is following Python et al).
For those who aren't familiar with RubyMotion's syntax:
def my_method(arg1, keyword: arg2)
puts arg1
puts arg2
end
my_method("test", keyword: "test2")
# output
test
test2
Ruby is a wonderful language. It would be great if there was some deep-pocketed multinational willing to fund its development in the same way as Facebook has done for PHP or Google has done for Python.
Heroku pays Ko1 and Matz [0], and Heroku is owned by Salesforce, which is a public company. Granted, Salesforce doesn't have Google or FB's war chest -- but it's not like Ruby isn't being supported by companies.
I wouldn't say Facebook funds the development of PHP per se, but they do fund the development of HHVM and they made the initial draft of the language spec.
So the keyword argument speed-up is pretty insane, but how does it compare to normal positional arguments? Is there an advantage over them too? In the bigger picture, there's obviously arguments for and against keyword arguments (biggest one is increasing connascence).
Well, you're trading connascence of position for connascence of name, which in this case is much better because you are providing context for the argument data.
Even with a reasonable amount of Google-fu I can't find out how to track the development version of Ruby where these changes land with rbenv (I don't use RVM). Would some kind soul enlighten me?
Very misleading title. This is not about a GC speed up, it is about a reduction in pause time. The GC a itself is eating as many cycles as before (possibly more due to the cost of making things incremental) and they are clear about this in the article.
[+] [-] kevingadd|11 years ago|reply
Need to hit vsync every 16ms? Just run a 1-3ms incremental GC every frame when you have time to spare, and as long as your game's theoretical performance is good enough, you won't ever hitch. This is one of Lua's advantages for game scripting because it's had a fairly solid incremental collector for a while, making it easy to give the GC a fixed chunk of time to operate in every frame so your game never pauses.
Scripting is a huge boon for people doing game development, game prototyping, and multimedia scripting (toolsets like Processing, for example), so having another scripting language to choose from for that is awesome.
[+] [-] dmpk2k|11 years ago|reply
Having said that, GC improvements are a good thing. Some of the RPG Maker folks will be delighted when this eventually reaches them.
[+] [-] the8472|11 years ago|reply
IO/waiting for forked jobs can be done in background threads since the lock is released on some select function calls.
So while incremental GC certainly does bring down latency caused by the GC it does not bring down latency for tasks that could be parallelized.
[+] [-] digi_owl|11 years ago|reply
[+] [-] jamon51|11 years ago|reply
I understand the reasoning behind both decisions (RubyMotion is following Objective-C's semantics, CRuby is following Python et al).
For those who aren't familiar with RubyMotion's syntax:
[+] [-] rmchugh|11 years ago|reply
[+] [-] jxf|11 years ago|reply
[0]: https://blog.heroku.com/archives/2011/7/12/matz_joins_heroku
[+] [-] throwaway9821|11 years ago|reply
[+] [-] TazeTSchnitzel|11 years ago|reply
[+] [-] loganfrederick|11 years ago|reply
http://rubini.us/
[+] [-] esaym|11 years ago|reply
[+] [-] dons|11 years ago|reply
[+] [-] fsiefken|11 years ago|reply
[+] [-] unknown|11 years ago|reply
[deleted]
[+] [-] Dirlewanger|11 years ago|reply
[+] [-] jcoder|11 years ago|reply
Well, you're trading connascence of position for connascence of name, which in this case is much better because you are providing context for the argument data.
[+] [-] gkop|11 years ago|reply
[+] [-] matthewmacleod|11 years ago|reply
Is that a valid argument? IMO, keyword arguments are just making it explicit.
[+] [-] sdsykes|11 years ago|reply
I wouldn't call an 81% reduction a 500% improvement.
[+] [-] igravious|11 years ago|reply
[+] [-] jacques_chester|11 years ago|reply
[+] [-] igravious|11 years ago|reply
[+] [-] aikah|11 years ago|reply
[+] [-] SEMW|11 years ago|reply
[+] [-] jblow|11 years ago|reply
[+] [-] dang|11 years ago|reply