AI-Powered Polyglot Programming: From Ruby-Only Dev to Multi-Lingual in Under a Year

2025-07-23
AI-Powered Polyglot Programming: From Ruby-Only Dev to Multi-Lingual in Under a Year

A decade-long Ruby-only developer shares their journey of mastering multiple languages—C++, C, and Rust—in less than a year, thanks to AI coding tools like Cursor and Claude Code. The author details how AI assistance overcame the challenges of learning system programming languages, enabling efficient contributions to projects like Sorbet, RBS, and ZJIT. AI acted not as a code writer, but as a pair programmer with complementary skills, clarifying syntax, patterns, and answering questions, dramatically reducing the learning curve and enabling meaningful contributions from day one. While AI accelerates learning, human expertise remains crucial for course correction. The author believes AI-assisted programming is the future of software development.

Read more
Development polyglot programming

Ruby 3.5: Six Times Faster Object Allocation via Class#new Inlining

2025-05-22
Ruby 3.5: Six Times Faster Object Allocation via Class#new Inlining

Ruby 3.5 achieves a significant speedup in object allocation, up to six times faster, by inlining the `Class#new` method. The article details this optimization, showcasing benchmark results, analyzing performance bottlenecks, and explaining the inlining technique. By eliminating method call overhead, reducing parameter copying, and improving inline cache hit rates, this optimization effectively addresses performance issues in Ruby object allocation, though it introduces minor backward compatibility concerns.

Read more
Development

Static Type Analysis for Ruby Without Type Annotations

2025-03-13
Static Type Analysis for Ruby Without Type Annotations

Shopify engineers have developed a novel static type analyzer that infers type information for Ruby programs without requiring type annotations. The analyzer leverages an improved Sparse Conditional Constant Propagation (SCCP) algorithm and precise dataflow tracking to efficiently handle interprocedural type analysis, completing analysis in seconds even for programs with a large number of classes. This research offers a new approach to optimizing compilers for dynamic languages and opens up new possibilities for performance improvements in dynamic languages like Ruby.

Read more
Development static type analysis

Speeding Up CRuby's FFI with JIT Compilation

2025-02-12
Speeding Up CRuby's FFI with JIT Compilation

This article explores using Just-In-Time (JIT) compilation to improve the performance of Ruby's Foreign Function Interface (FFI). Benchmarks demonstrate FFI's performance drawbacks compared to native extensions. The author introduces FJIT, a solution leveraging RJIT and custom machine code generation to create runtime machine code for calling external functions, bypassing FFI overhead. FJIT outperforms native extensions in tests, offering a high-performance alternative for Ruby developers. Currently a prototype supporting only ARM64, FJIT's future expansion to other architectures and more complex function calls is anticipated.

Read more
Development