RSSAmplifier

Blog

John Hawthorn

johnhawthorn.comRSS feed ↗2 posts

Latest posts

Searching Ruby's documentation

The official Ruby docs are at https://docs.ruby-lang.org/en/ . This documentation (and any documentation built with rdoc 6.15.0 or greater) now can be searched using a query parameter. Check it out! https://docs.ruby-lang.org/en/master/?q=String%23gsub I added this to RDoc because I was fed up with accidentally ending up on a horrible 3rd party website I won’t name with 8+ year stale docs that…

Ruby might be faster than you think

I saw a project a couple weeks back which allows writing and running Crystal methods inline inside a Ruby file . It’s a neat project, and I don’t want to take away from it but something in the README example looked off to me. require 'crystalruby' require 'benchmark' module Fibonnaci crystalize [n: :int32] => :int32 def fib_cr(n) a = 0 b = 1 n.times { a, b = b, a + b } a end module_function def…