➤ Also functional and imperative ➤ Dynamic type system and automatic memory management ➤ Native plug-in API in C ➤ BSD / MIT license ➤ “I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby.”
Ruby 0.95 ➤ 2001, first English book ➤ 2003, Ruby 1.8 ➤ 2004, RubyGems ➤ 2005, Ruby on Rails ➤ 2011, Ruby 1.9.3 ➤ 2013-2016: Ruby 2.x “Matz is nice and so we are nice”
➤ Dynamic typing and duck typing ➤ Succinct and flexible syntax that minimises syntactic noise ➤ Dynamic reflection and alteration of objects to facilitate metaprogramming ➤ Lexical closures, iterators and generators, with a unique block syntax ➤ Strict boolean coercion rules (everything is true except false and nil) ➤ Exception handling ➤ Custom dispatch behaviour (through method_missing and const_missing) ➤ Native plug-in API in C ➤ Interactive Ruby Shell (a REPL) ➤ Centralised package management through RubyGems ➤ Implemented on all major platforms ➤ Large standard library, many gems
Ruby on JVM ➤ Rubinius :( ➤ C++ / Ruby ➤ MRuby - Lightweight and easily embeddable Ruby ➤ Opal - Ruby to JS source-to-source compiler ➤ Ruby Motion - iOS, OS X and Android
no JIT ➤ Concurrency and Parallelism ➤ Threads, GVL ➤ Dynamic typing (?) ➤ Memory usage ➤ Alternate syntaxes ➤ “The Standard Library is a ghetto” Ruby 3! (maybe)
➤ Hired by Jason Fried for 37signals' Basecamp ➤ Used the then-obscure Ruby language to develop a custom web framework ➤ 2005: Open Source Extraction from Basecamp ➤ 2007: Rails included in Mac OS X “Leopard”! ➤ 2009: Rails 2.3 ➤ 2012: Rails 3.2 ➤ 2013: Rails 4.0 ➤ 2014: Rails 4.2 ➤ 2016: Rails 5.0
web framework ➤ Model, View, Controller pattern ➤ …and other well-known patterns and paradigms ➤ “Anti-enterprise” ➤ “Rails is convincing people that they can do projects with small teams, with simpler goals and simpler results released in smaller iterations”
Convention over Configuration 3. The menu is omakase 4. No one paradigm 5. Exalt beautiful code 6. Provide sharp knives 7. Value integrated systems 8. Progress over stability 9. Push up a big tent
dressed in a DSL ➤ Hanami ➤ Full-featured, but lightweight ➤ “Bring back Object Oriented Programming to web development” ➤ Volt ➤ Your ruby code runs on both the server and the client ➤ …and lots of “micro frameworks”
actionpack: From request to response ➤ actionview: View template lookup and rendering ➤ activemodel: Model interfaces ➤ activerecord: Object-relational mapping ➤ actioncable: Integrated WebSockets ➤ railties: gluing all frameworks together ➤ sprockets: asset packaging system ➤ actionmailer: Easy email delivery and testing ➤ activejob: Make work happen later
similar to Ruby (compatibility not a goal) ➤ “Fast as C, slick as Ruby”, compile to efficient native code ➤ Statically type-checked ➤ Elixir (2012) ➤ Dynamic, functional, meta-programming aware ➤ Erlang VM, Hot-swappable code for zero-downtime deploys ➤ Low-latency, distributed, highly concurrent, scalable and fault-tolerant systems ➤ Phoenix web framework is awesome