for Rubyists

You already know Ruby.
Now learn anything else.

Side-by-side, interactive cheatsheets for Rubyists
exploring new languages. Every example runs live in your browserβ€”no setup, no installation, no context-switching.

β–Ά Start with Python Browse all languages ↓

Choose your own path by reordering languages

Python Beta ⚑ Offline

A natural move for Rubyists, Python is elegant, readable, and dominant in data science and machine learning.

  • List comprehensions and generators vs. Ruby's Enumerable and blocks
  • Python's significant whitespace instead of Ruby's end keywords
  • The import system vs. require and Ruby's module hierarchy
  • try / except / finally vs. begin / rescue / ensure
  • Threading, the GIL, and asyncio vs. Ruby's concurrency model
JavaScript Alpha ⚑ Offline

The language of the web, JavaScript is unavoidable, powerful, and capable of running almost anywhere.

  • var / let / const vs. Ruby's local, instance, and global variables
  • Prototypal inheritance β€” a fundamentally different object model than Ruby's class-based one, with the inheritance machinery exposed and mutable at runtime
  • Closures and the this binding: where bugs hide and elegance lives
  • Promises and async/await vs. Ruby's Fibers, threads, and Ractors
  • Destructuring, spread, and rest β€” features Ruby also has, with different syntax
Go Pre-Alpha

Fast, opinionated, and built for the cloud era, Go trades Ruby's expressiveness for simplicity and raw speed.

  • Goroutines and channels β€” lightweight concurrency that makes Ruby's threads look heavy
  • Error handling without exceptions: functions return errors, you handle them explicitly
  • Interfaces without inheritance β€” implement the methods, satisfy the interface, no declaration needed
  • Pointers β€” the approachable kind, without manual malloc/free
  • The fastest compile-and-run cycle you've probably ever seen
TypeScript Alpha ⚑ Offline

JavaScript with a type system, TypeScript is able to catch whole classes of bugs before they ship, without abandoning dynamism.

  • Type annotations vs. Ruby's duck typing β€” explicit contracts vs. implicit trust
  • Interfaces and structural typing: types describe shape, not lineage
  • Generics β€” like duck typing, but verified at compile time
  • Type narrowing: TypeScript removes impossible types as it reads your code
  • Utility types like Partial, Pick, and Readonly β€” a whole algebra of type transformations
Swift Pre-Alpha

Apple's modern language. Optionals, protocols, and value types make safety and expressiveness first-class.

  • Optionals vs. Ruby's nil β€” the compiler forces you to handle the absence of a value
  • Protocols and extensions β€” like Ruby's modules and mixins, but with more teeth
  • Value types (structs, enums) vs. reference types (classes): a distinction Ruby doesn't make
  • Closures and trailing closures β€” a syntax that feels familiar to Rubyists: the last closure argument can move outside the parentheses, just like Ruby's blocks
  • Pattern matching with switch β€” far more powerful than Ruby's case/when
C Pre-Alpha

The language that built the world. Understanding C illuminates Ruby itself, and just about everything else.

  • Pointers β€” what Ruby's object references actually are at the machine level
  • Manual memory management with malloc / free, and why Ruby's GC exists
  • The compilation model vs. Ruby's interpretation: how source becomes executable
  • Structs and unions vs. Ruby's classes β€” data without behavior
  • How Ruby's C extension API works β€” the bridge between Ruby and native code
Rust Pre-Alpha

Demanding but deeply rewarding, Rust proves memory safety and bare-metal speed aren't in opposition.

  • Ownership and borrowing β€” the idea that replaces garbage collection entirely
  • No runtime, no GC: memory safety enforced at compile time, not at runtime
  • Traits β€” like Ruby's modules, but verified statically and with zero overhead
  • Result and Option β€” making failure and absence explicit, not exceptional
  • Pattern matching with match β€” exhaustive, expressive, and more powerful than Ruby's case
Zig Pre-Alpha

Optimal software with no hidden control flow. Like C but with memory safety, error handling, and compile-time code execution built in.

  • Allocators instead of a garbage collector β€” every heap allocation is explicit and the allocator can be swapped without changing library code
  • Error unions (!T) and comptime-checked exhaustive switch β€” impossible to ignore an error or miss a case the way Ruby's rescue and case/when allow
  • Comptime replaces macros, generics, and metaprogramming with a single mechanism: Zig code that runs at compile time
  • No hidden control flow β€” no operator overloading, no implicit conversions, no exceptions unwinding through stack frames
  • Optional types (?T) enforced at compile time β€” the null pointer problem that Ruby solves with nil checks is solved in Zig before the program even runs
Dart Pre-Alpha

The language behind Flutter, Dart brings sound null safety, async-first design, and ahead-of-time compilation to cross-platform development.

  • Sound null safety β€” non-nullable by default; the compiler prevents null dereferences before the program runs
  • Async-first: Future<T> and Stream<T> are core to the language, not an afterthought
  • Named parameters with required keyword β€” a more explicit alternative to Ruby's keyword arguments
  • Mixins β€” similar to Ruby's modules, but with stricter linearization rules
  • AOT and JIT compilation β€” fast startup for production, fast iteration for development
Kotlin Pre-Alpha

The pragmatic JVM language, Kotlin combines expressive syntax, null safety, and interoperability with Java β€” popular for Android and server-side development.

  • Null safety built into the type system β€” nullable vs non-nullable enforced at compile time, no NullPointerException surprises
  • Data classes β€” one line replaces dozens: equals, hashCode, toString, copy, and destructuring all generated automatically
  • Extension functions β€” add methods to existing classes without subclassing, scoped rather than global like Ruby's monkey-patching
  • when expression β€” Kotlin's answer to case/when, but exhaustive, expression-oriented, and usable as a value
  • Coroutines β€” structured concurrency that feels like sequential code, without the callback pyramid or thread overhead
Crystal Pre-Alpha

Typed Ruby β€” without leaving home. Crystal's syntax is so close to Ruby that reading it feels familiar from day one, but a static type system catches entire classes of bugs before the program runs.

  • Syntax nearly identical to Ruby β€” if you know Ruby, you can read Crystal immediately
  • Static type inference β€” no type annotations required in most code, but types are checked at compile time
  • Null safety via union types β€” String | Nil instead of String? makes nilability explicit and compiler-enforced
  • Compiled to native machine code β€” Crystal programs run at C-level speed with no runtime overhead
  • Fibers and channels β€” Go-style concurrency built into the language, not a library
Clojure Pre-Alpha ⚑ Offline

A modern Lisp for the JVM, Clojure brings immutable data, functional programming, and fearless concurrency to wherever Java runs.

  • Immutable data structures by default β€” shared state without locks or races
  • The REPL-driven development loop: evaluate and reshape code as you write it
  • Macros β€” Lisp's superpower, rewriting syntax before it runs
  • core.async β€” Go-style channels and communicating sequential processes, as a library
  • Persistent data structures β€” structural sharing makes immutable "updates" fast and memory-efficient
C#

A mature, versatile language from Microsoft, C# blends object-oriented and functional styles with a type system powerful enough to rival TypeScript's.

  • LINQ β€” SQL-style queries over any collection, with Ruby-style method chaining
  • async/await β€” the cleanest async syntax in any mainstream language
  • Pattern matching with switch expressions β€” exhaustive, expressive, far beyond Ruby's case/when
  • Nullable reference types β€” opt-in null safety without rewriting the whole language
  • Records and init-only properties β€” immutable data classes without the boilerplate
Java

The language Rubyists most often encounter in enterprise work, Java makes explicit what Ruby hides β€” types, access modifiers, checked exceptions, and the full machinery of a statically typed object system.

  • Static typing enforced at compile time β€” errors caught before the program ever runs
  • The JVM β€” bytecode, JIT, and garbage collection as a shared platform for Kotlin, Scala, Clojure, and more
  • Streams and lambdas (Java 8+) β€” functional-style collection operations that mirror Ruby's Enumerable
  • Records (Java 16+) β€” concise immutable data classes, Java's answer to Ruby's Struct
  • Pattern matching (Java 21+) β€” type-safe switch expressions that rival Ruby's case/in
  • Checked exceptions β€” the explicit error-contract system Ruby deliberately left out
Perl

Ruby's spiritual ancestor, Perl established many of the ideas Ruby refined β€” regex literals, postfix conditionals, CPAN, and the conviction that there's more than one way to do it.

  • Regular expressions as a first-class syntax β€” Perl's regex engine inspired every language that followed
  • Context sensitivity β€” the same expression means different things in scalar vs. list context
  • CPAN β€” the original package repository, predating npm, RubyGems, and pip by a decade
  • Sigils β€” $scalar, @array, %hash are the ancestors of Ruby's $global, @instance, @@class variables
  • "There's more than one way to do it" β€” the design philosophy Ruby later softened to "one preferred way"
Lua ⚑ Works Offline

The embeddable scripting language, Lua is the language inside Neovim, Redis, Nginx, and countless game engines β€” small, fast, and surprisingly deep.

  • Tables are everything β€” arrays, dictionaries, objects, and modules all use the same structure
  • Metatables replace classes β€” OOP emerges from a handful of hooks rather than built-in syntax
  • Multiple return values without arrays β€” functions return several values as naturally as one
  • Coroutines as first-class values β€” cooperative multitasking without async/await ceremony
  • 1-based indexing and global-by-default scope β€” two gotchas every Rubyist hits immediately
SQL

The language of relational databases, SQL is the raw power beneath every Rails Active Record call β€” understanding it makes your queries faster, your data models clearer, and your debugging sharper.

  • Every ActiveRecord query generates SQL β€” knowing SQL reveals exactly what .where, .joins, and .includes actually do
  • Window functions (ROW_NUMBER, RANK, LAG) have no clean ActiveRecord equivalent β€” SQL is the only way
  • CTEs name subqueries like variables β€” readable complex logic that ActiveRecord cannot express directly
  • JOINs, GROUP BY, and HAVING map to idiomatic Ruby Enumerable operations β€” surprisingly similar thinking
  • EXPLAIN QUERY PLAN shows why a query is slow; indexes fix it β€” foundations every Rails developer needs
Haskell

Pure, lazy, and relentlessly principled, Haskell enforces immutability and static typing so strictly that if your code compiles, it usually works.

  • Purely functional β€” no side effects outside of IO, making code easy to reason about and test
  • Lazy evaluation by default β€” infinite lists, on-demand computation, and novel algorithms that would be awkward elsewhere
  • Algebraic data types with exhaustive pattern matching β€” the compiler catches unhandled cases Ruby would silently miss
  • Typeclasses β€” Haskell's principled alternative to Ruby's duck typing and module mixins
  • Maybe and Either replace nil and exceptions with types the compiler forces you to handle
  • Currying and function composition as first-class idioms β€” every function is a building block
C++

C++ is C with a full OOP tower on top β€” classes, templates, lambdas, the STL, and memory safety via RAII, all the way down to bare metal.

  • Classes, inheritance, and virtual dispatch β€” Ruby's OOP model, but you control every byte
  • Templates β€” generic programming that's resolved at compile time, not via duck typing
  • RAII and smart pointers β€” deterministic memory management without a garbage collector
  • The STL: vector, map, sort, transform β€” Ruby's Enumerable, but statically typed
  • Lambdas with captures β€” closures that look and feel like Ruby's blocks
  • Modern C++23: std::format, ranges, structured bindings, std::optional
Bash

The shell every Rubyist already uses, Bash rewards understanding β€” the more you know, the fewer Ruby scripts you'll write for things the shell does natively.

  • Parameter expansion β€” ${var:-default}, ${var^^}, ${var//old/new} β€” a mini-language for string manipulation
  • Associative arrays and indexed arrays β€” Bash's answer to Ruby's Hash and Array
  • Arithmetic expansion $(( )) β€” integer math without spawning a subprocess
  • Conditionals and loops β€” the original control flow, from which all other shells descended
  • Exit codes and traps β€” error handling before exceptions were invented
COBOL

The language that runs the world's money, COBOL processes trillions of dollars daily β€” and its verbose, English-like syntax is unlike anything a Rubyist has seen.

  • Every program is divided into four mandatory DIVISIONS β€” structure enforced by the compiler, not convention
  • Variables declared with PICTURE clauses that define format byte-by-byte: PIC 9(7)V99 for a 7-digit decimal
  • Arithmetic via English verbs: ADD 1 TO COUNTER instead of counter += 1
  • No functions or methods β€” only PARAGRAPHS called with PERFORM
  • 88-level condition names: named boolean flags that make business logic read like plain English
  • Runs more financial transactions per day than any other language β€” by a wide margin
Fortran

The original language of scientific computing, Fortran introduced arrays, subroutines, and floating-point arithmetic to the world β€” and still dominates supercomputing today.

  • Arrays are a first-class type β€” whole-array arithmetic replaces explicit loops: prices * 0.9 discounts every element at once
  • Built-in complex numbers, rich math intrinsics, and DOUBLE PRECISION β€” no imports required for scientific work
  • INTENT(IN/OUT/INOUT) turns parameter contracts into compiler-enforced guarantees instead of documentation conventions
  • ELEMENTAL functions write once, run on scalars and arrays alike β€” the equivalent of writing every function and its map version simultaneously
  • Runs on every major HPC cluster and supercomputer; NumPy, LAPACK, and BLAS are all written in Fortran
Visual Basic .NET

The English-readable .NET language that pioneered RAD β€” with static typing, LINQ, and the full .NET ecosystem.

  • English-like keywords: If...Then...End If, For Each...Next
  • Case-insensitive identifiers β€” a surprisingly different mental model
  • AndAlso / OrElse short-circuit logic vs And / Or
  • LINQ query syntax reads like SQL right in your code
  • Nothing for nil, Me for self, MyBase for super
  • Full .NET ecosystem: List(Of T), Dictionary(Of K, V), async/await
Pascal

The disciplined ancestor of modern programming β€” structured, strictly typed, and the language that taught a generation how to think algorithmically.

  • begin...end blocks instead of Ruby's implicit block delimiters
  • All variables declared in a var block before any code runs
  • := for assignment, = for comparison β€” the reverse of every other language
  • div for integer division; / always returns a real number
  • Procedures (no return value) vs. functions (returns a value) β€” an explicit distinction
  • Built-in set types, enumeration types, and subrange types with no library needed
Drag cards to reorder Β· your order is saved locally

Look Forward To

Elixir

The Erlang VM with a Ruby-inspired syntax, Elixir makes fault-tolerant, massively concurrent systems approachable β€” and beautiful.

Smalltalk

The language that defined object-oriented programming, Smalltalk's ideas live inside every Ruby method call, block, and open class.

Common Lisp

The original programmable programming language, Common Lisp's macro system lets you reshape the language itself β€” a power Ruby's metaprogramming only approximates.