Ruby 2.0 Implementation Work Begins: What is Ruby 2.0 and What’s New? »
Created at: 20.10.2011 18:00, source: Ruby Inside, tagged: News
Yesterday, Matz made a commit to the MRI Ruby repository bumping the trunk version from 1.9.4 to 2.0.0, marking the start of the work of implementing the long-discussed ideas for Ruby 2.0.
What is Ruby 2.0?
Ruby 2.0 is the next major version release of MRI Ruby, the de facto official Ruby implementation.
Ruby 1.9.3 is due out any time soon and Ruby 1.9.4 is under active development (it has moved to a separate branch now that trunk is 2.0.0). We recently learned that Ruby 2.0 would then follow Ruby 1.9.4.
Will Ruby 2.0 be a huge leap forward?
No. While 2.0 will include a number of syntax changes, new features and general improvements, mentioned below, it is anticipated to remain backward compatible with code written for 1.9.3 and Matz has stated that the changes are less significant than those made in the 1.8 to 1.9 jump.
The version number goes up to 2.0 but the changes are rather small. Smaller than the ones we made in 1.9.
Matz
The discussion surrounding Ruby 2.0's feature set spans back several years (mostly on the ruby-talk and ruby-core mailing lists) and 2.0 was initially expected to introduce significant syntax changes and not be backwards compatible. Things have changed with Ruby 1.9 moving into production (it was originally a development only version) and 2.0 being an evolution rather than a revolution.
What will (probably) be new in Ruby 2.0?
Ruby 2.0 is still not well defined. At the moment, ideas and features are being actively suggested and discussed, but a number have been tipped to make it into Ruby 2.0 at this early stage:
Keyword Arguments
In Ruby 2.0: What We Want to Accomplish in the Near Future (recorded in 2010), Matz showed off an example where 1.step(20, 2) could become 1.step(by: 2, to: 20) with the method definition of def step(by: step, to: limit).
An implementation of keyword arguments by Yusuke Endoh actually triggered the discussion to move trunk to 2.0.0 so this is actively being discussed and implemented.
Bytecode export/import
Ruby 1.9 runs on the YARV virtual machine and so will Ruby 2.0, but Ruby 2.0 is expected to make it simple to save pre-compiled Ruby scripts to bytecode representations and to then run these directly. Running pre-compiled bytecode will skip the parsing stage of the standard interpretation process. If you use Rubinius or JRuby you may be familiar with this concept.
Refinements
"Refinements" are a construction to make monkey patching safer. Essentially you could "refine" a global class within the context of a specific module so that the monkey patches would only apply in a certain context. Yehuda Katz wrote an excellent writeup about refinements last year.
Refinements are.. controversial. The performance hit they'd introduce has recently made them less likely to arrive in Ruby 2.0 but I don't believe they're entirely off the table yet. Some form of namespacing of class modifications will probably eventually make it in, however. Another implementation has been called 'traits' and is shown off in the Matz video (linked above).
Standard libraries becoming gems
On Twitter today, Aaron 'tenderlove' Patterson of the Ruby core team said that the Ruby standard library would be 'moved to gems' in Ruby 2.0 although many of these would still be included with the implementation (rather than being an optional extra download).
And more..
As I said before, things are a bit up in the air, but the ideas surrounding Ruby 2.0 should begin to settle over the next year.
A couple of weeks ago, Koichi Sasada posted the results of a Ruby 2.0 feature questionnaire to the ruby-core mailing list and encouraged people to extend it. It's not a list of features that will make it into Ruby 2.0, but an attempt to see what people would like.
Koichi's initial list was:
- Cleanup syntax
- Bytecode export
- Symbol GC
- Remove Proc binding
- Macros
- Getting parse tree
- Getting source code
- Cross thread Fiber migration
- Standard Gem
- Review all standard libraries
- Remove obsolete one standard libraries
- Improve Proc#curry
- Non-blocking I/O
- Dtrace
- GC API (replaceable GC)
As Ruby 2.0 development continues, I'm going to regularly summarize what's going on and show off new features here on Ruby Inside, so keep your eyes peeled :-)
[ad]Gauges is a real time traffic analytics system so you can analyze all your traffic in seconds. Collect and analyze your web traffic for all your sites in real-time using their fast, reliable, hosted system and see overview data for all your sites on a single page. Click here to learn more.
more »
The Last Week in Ruby: Rails 3.1.1, Sinatra Recipes, Spree Gets Funded and more »
Created at: 18.10.2011 01:10, source: Ruby Inside, tagged: Miscellaneous News
Back in 2008 and 2009, Ruby Inside had a long line of "Interesting Ruby Tidbits That Don’t Need Separate Posts" posts, aimed at sharing a collection of news and libraries in one hit. In the last year, I've shifted Ruby Inside to focusing on less frequent tutorials or investigative features and have been putting all of the news on Ruby Weekly, my weekly newsletter.
There are still many, though, who would prefer to read the news in their RSS readers or on the Web, so I'm going to be taking the things I find for Ruby Weekly each week, doing a little reformatting, and sharing them here on Ruby Inside too. The longer articles will then slot in nicely in between :-)
So here we go, starting off from Ruby Weekly issue 63. You can check out the full 63 issue archive, if you like, or even sign up for Ruby Weekly here if you weren't familiar with it. Or, of course, stay here on Ruby Inside and get the same (or more) each week - it's your choice!
Without further ado..
Headlines
Rails Recipes: Rails 3 Edition (in Beta)
Chad Fowler has been updating the Pragmatic Programmers' Rails Recipes book to Rails 3.1 standards. It's in beta now (as an e-book) with the full print release expected in December 2011.
Spree (Open Source Rails E-commerce System) Raises $1.5 Million
Spree is a popular open source Rails e-commerce system and its creator has raised $1.5m in venture capital to take it even further (as well as offer Spree-based consulting). Tom Preston Werner (GitHub) and James Lindenbaum (Heroku) have joined as advisors.
Articles and Tutorials
Sinatra Recipes - Handy Recipes for Working with Sinatra
Sinatra Recipes is a community contributed set of recipes and techniques for working with the popular Sinatra webapp library. There are examples of using many different libraries with Sinatra that are bound to prove useful, if only to learn from.
Give It A Pry
Pry is a powerful REPL environment for Ruby and an ideal alternative to IRB. Jon Jackson shows off his top 5 reasons for switching to Pry - maybe they'll convince you too.
Rubyists Already Use Monadic Patterns
Monadic programming is a pattern that comes up in a lot of code, just like most patterns. While associated with pure functional language like Haskell, Dave Fayram demonstrates how many patterns used by Ruby developers are monadic too.
The Ruby 1.9 Walkthrough: Go Deep on Ruby 1.9
The Ruby 1.9 Walkthrough is a thorough, up-to-date video walkthrough of Ruby 1.9 - perfect for 1.8 developers who are unsure about the leap. Even Ruby 1.9 guru James Edward Gray II said he picked up plenty of stuff from it.. but beware, it's long :-)
Presentations and Videos
Gregory Moeck: Why You Don't Get Mock Objects
Not a big fan of mock objects in testing? Don't even know what mocks are? Get up to speed with Gregory Moeck who makes a convincing case for mocks in this RubyConf 2011 replay. In essence, if you're doing object orientation properly, you need mocks (ooh, controversial!)
Your Data, Your Search: ElasticSearch
A wonderful Ruby-focused slide-deck by Karel Minarik (that was presented at EURUKO 2011) all about the concept of 'searching', the flaws in naive solutions, and a tour of the ElasticSearch system and using it from a Rails app.
Complex Ruby Concepts Simplified (Presentation)
At RubyConf 2011, Matt Aimonetti gave a presentation that dug into Ruby's garbage collection, C interface, global interpreter lock, and more, and the slides are definitely easy (and worthwhile) to follow.
The Intro to Rails Screencast I Wish I Had
Over at NetTuts+, Jeffrey Way has put together an interesting 40 minute 'introduction to Rails' screencast that takes the high road and covers topics like TDD, auto testing, RSpec, and Capybara. It's an introduction for people who want to get it right first try.
Libraries and code
Tire: A Rich Ruby API for the ElasticSearch Search Engine/Database System
Tire is a Ruby client for ElasticSearch, written by Karel Minarik. ElasticSearch is a scalable, distributed, cloud-ready, highly-available, full-text search engine and database with powerfull aggregation features, communicating by JSON over RESTful HTTP, based on Lucene, written in Java.
Queue Classic: A Powerful PostgreSQL-Backed Queueing Library
Queue Classic is a PostgreSQL-backed queueing library built by Ryan Smith of Heroku that focuses on concurrent job locking, minimizing database load and providing a simple, intuitive user experience.
Ruby Jobs of the Week
Sr (Agile) Software Engineer at Apple [Cupertino, CA]
Apple is seeking the very best engineers to be part of a continuously tested and integrated development process in its Developer Publications team. The systems they build are used for all Apple developer documentation for Mac OS X and iOS. You need deep knowledge of Ruby including Rails, RSpec, Bundler and Devise.
Last but not least..
The Ruby Toolbox Gets A Makeover
The Ruby Toolbox is a popular site that categorizes and rates gems by their popularity and functionality. If you're looking for a gem and you can't quite figure out which ones are out there, it's worth a look. A recent redesign has really kicked things up a notch.
more »
fog 1.0 is here! »
Created at: 30.09.2011 17:00, source: Engine Yard Blog, tagged: News Open Source Technology fog
Many good things in life take longer than expected but in the end are well worth the wait. With the release of fog 1.0 we have a shining example. Begun in mid-2009 and with more than 2 years in production usage at Engine Yard, fog has seen 240,000 downloads. This is definitely a rock-solid 1.0 that has seen some real battle testing!
fog is a Ruby gem that allows you to control a number of cloud infrastructure services through a common API. fog provides the basis for building applications and cloud platforms that are infrastructure-independent, abstracting such functions as spinning up servers, connecting storage, managing DNS, etc. Internally, fog uses models to represent cloud structures analogously to the way ActiveRecord represents relational structures. Using fog makes your application or platform much more easily portable across infrastructures such as Amazon, Rackspace, and many others.
In addition to Engine Yard, fog is in use at other platform providers as well as in many core community projects such as Chef, Puppet, CarrierWave, and Paperclip. fog now supports 18 compute, 5 storage, 9 DNS, 2 CDN, and a variety of other infrastructure services. With 13 core committers, 121 contributors, and nearly 1,500 watchers, we're seeing really nice growth in participation and attention.
We believe that this release of fog is a really important step in making the cloud an easier and more powerful environment for developers to run great apps. We hope you'll give it a try, share your feedback, spread the word, and (most importantly) enjoy some great success with fog.
Get fog with a simple gem install fog. Read docs at fog.io, or grab source off GitHub at geemus/fog. Happy fogging!
more »
JRuby GA on an Engine Yard Cloud Near You »
Created at: 28.09.2011 16:13, source: Engine Yard Blog, tagged: News Product Technology jruby jruby on appcloud jruby on engine yard cloud trinidad
We are very excited to announce the general availability of JRuby and Trinidad on Engine Yard Cloud!
Everyone who runs production Ruby web applications should be interested in JRuby. Want a list of life-changing reasons? Reasons you cannot get with any other Ruby implementation nor any other Platform as a Service?
- Major efficiency and performance boost from real concurrent native threads
- Fast in-process caching with ehcache and many other Java libraries
- Use your own existing Java libraries (put the jar files in lib/jars)
- Your development stack is the same as our production stack with the Trinidad project
Want to try Trinidad/JRuby on your laptop right this very instant? Do this. Do it now:
rvm install jruby
rvm use jruby
git clone git://github.com/engineyard/todo.git
cd todo
bundle
trinidad
Your application is now running in development mode on your laptop!
Want to try Trinidad/JRuby with your own Ruby web app this very instant? Here is a simple tutorial to get started!
Want to learn more about the awesomeness in JRuby and Trinidad (amongst other topics)? In New Orleans this week for RubyConf? Then on Saturday come and see “High Performance Ruby: Evented vs Threaded”.
We are so excited to be able to support JRuby and to finally be offering it and supporting it for big businesses and small on our Engine Yard Cloud and Engine Yard Managed platforms.
For the last two years, Engine Yard has been funding the development of JRuby and we are excited to provide fully supported JRuby for your application development. This is a major milestone for the JRuby project led by Charlie Nutter, Thomas Enebo, Nick Seiger, Hiro Asari, and David Calavera. Charlie has written a great post about the history and next steps of the project here.
more »
Engine Yard Launches Platform Services Program with Over 40 Partners »
Created at: 21.09.2011 19:42, source: Engine Yard Blog, tagged: News
Today we are very excited to launch our Platform Services program, aimed at formalizing and expanding our existing practice of integrating important partner technologies and services into the Engine Yard platform. There are many great companies out there whose offerings are highly complementary to our own and in high demand by our customers. The Platform Services program will make it easier for customers to find, learn about, and incorporate third-party services for the applications they deploy on Engine Yard Cloud.
Supporting the program will be an API that makes it especially easy for select partners to set up their offerings on the Engine Yard platform. Customers will be able to activate these API-integrated offerings for their apps with a simple button-click, and billing for these services will be part of the unified monthly Engine Yard invoice. The API is in private beta now and will be generally available in the near future.
Services that will be available from within the Engine Yard platform via the API include: Brighter Planet, CloudMailIn, Logentries, MailGun, MongoHQ, MongoLab, New Relic, OneSky, Papertrail, PubNub, Scout Monitoring, SendGrid, SimpleWorker, Xeround, and others. In addition, numerous services will be promoted through the Partner Services program and activated directly with the providers (outside the Engine Yard dashboard); services available from partners include: 10gen, AirBrake, Appcelerator, AppFirst, Assistly, Blitz.io, Braintree, Cenzic, Chargify, CloudFlare, Cloudkick, DNSimple, DocRaptor, Dynect SMB, Exceptional, IndexTank, InfoChimps, Janrain, Loggly, LucidWorks Cloud, Postmark, Pusher, SauceLabs, SpacialDB, StatsMix, StillAlive, websolr, Zencoder, and Zendesk.
We believe this new program will further enhance and simplify customers’ experiences with Engine Yard while bringing a growing ecosystem of new capabilities to the table. As always, we look forward to hearing your experiences and feedback!
more »


