Weekly notes #14
Multithreading performance and variable shadowing in Ruby, basic block versioning.
Why Is Ruby Multithreading Slow - fast producer/slow consumer problem bites on MRI.
Shadowing bug in the wild - when local variables shadow instance methods.
On Ruby - an ‘I am leaving Ruby’ post. Reasons: low code quality of libraries, monkey-patching. Requires high test coverage and discipline to achieve confidence in correctness due to dynamism.
tmm1/rblineprof - Does what it says on the label - line profiler for Ruby.
Signal handling in Ruby and its
Mutex#lock cannot be called from inside the signal handler => no Logger,
mono_logger gem is a lockless logger implementation that overcomes this limitation.
Model checking for the working man - an awesome, practical tutorial for TLA+/PlusCal, explained on a simple model (register increment backed by a DB + a read cache)
Basic block versioning, VM optimisation - still reading the paper, but this method of JIT code generation is very efficient in eliminating dynamic type checks.