Ruby feature: Regular Expression replace once

About a year ago, programmer Tony Arcieri posed a question on the Ruby language bug tracker:  Why was Thread.exclusive deprecated? Among the answers to this question, Shyouhei Urabe’s one of the tersest feature descriptions yet: “we already have such thing, to some extent at least”: /#{}/o The pair of slashes are Regular Expression delimiters. A Regular […]

How to use very latest Bundler in Travis

TL;DR: When Bundler has fixes in master that you need, use the specific_install Rubygems plugin to install and use Bundler directly from a git branch. Example Travis YAML configuration excerpt: before_install: – gem update –system – gem install specific_install – gem specific_install I will spend the rest of this post unpacking what the above means. […]

A disciplined method to fix Rubocop TODOs

Here, a listicle of advice you never asked for! A method to locate and fix linting errors in Rubocop one at a time: choose a “cop” from the .rubocop_todo.yml file remove the line which includes the .rubocop_todo.yml rubocop –only Lint/IneffectiveAccessModifier fix issues and test fixes with the –only invocation rubocop –auto-gen-config to regenerate the .rubocop_todo.yml […]

Hold Elasticsearch back on 2.4 for Chewy on macOS

So, Elasticsearch 5.0.0 is out. I’m using Chewy, a Ruby DSL gem that’s quite good. It’s not quite there yet with the deprecated Query APIs, (see Release Notes), so to keep using it you need to hold back to the Elasticsearch 2.4 series which is the last stable release. (Question about this, answered in the issue […]

Ruby: Rubocop-friendly Hash pretty-printer

You’re desperate. Your legacy code-generation code outputs a Hash using hash#to_s. You’ve flouted many Rubocop rules to get to where you are. Suddenly, it gets too much. You search the Web for a pretty-print function that you want: a Rubocop-friendly Hash pretty-printer. Empty-handed, you cough up blood, while a police car’s red-blue lights flicker in […]

FYI: RAD (Ruby+Arduino) MIDI bounty

A quickie, I found this very interesting. I want to have happened, already: Ruby Arduino MIDI bounty. Ain’t it cool? He is enticing you and me with some undefined hardware bounty. And pointing to GitHub as the place where you should upload your RAD-compatible MIDI library. Note to self: RAD uses some language transformations to […]

Copenhagen.rb meetup: Puppet and fringe activity

Juri presented the amazing Puppet framework for controlling servers. He controls about 20 servers with it. Think of Puppet’s files as “setup Rakefiles for servers” which is version-controlled, monitored, and written in a very terse DSL. Seems slick. Juri might publish his nice slides, who knows. While he was presenting, me and Lars SG were […]

RuPy 2007, European hacker meetup

Dear hackers: %w(Ruby Python).each {|lang| lang.discuss } Thanks for a great weekend. “I’ll see you on the Internets” has never rung more true than when I and Tomek and Krzysztof hurried out to a waiting taxi (driven by a talkative bard-type, who talked “about nothing” with many words). Now: go empty your camera, upload them […]

Visited a gamefest: Nordic Game Jam 2007

Copy-party (or less aggressively, and perhaps more descriptively “demo-party”), that was the name of a weekend of mildly Dionysian digital festival here in Northern Europe during the late 80s and the 90s. *Update:* Danish radio DR1’s show Harddisken has Frederik Berg Olsen’s radio programme about NGJ07. FBO had a tape recorder with him, and made […]