I'm going to GitHub Satellite (githubsatellite.com/) in Berlin, May 23rd. anyone else going? (or in the area at the same time?)

I wouldn't think I would ever say this, but right now I have a parsing problem where COBOL would be the perfect solution.

(of course, the reason is that the file format is designed for COBOL, but still)

Holm :ruby: boosted
Holm :ruby: boosted

Me: How do I work with currency?

Ruby: Just use BigDecimal.

JS: Deal with floating point math edge cases on every operation you do, forever.

Holm :ruby: boosted

A Noble Circle is free for PI Day. Hope you enjoy it. It is best played with sound on, and with a loved one. itunes.apple.com/pl/app/a-nobl

Holm :ruby: boosted

Hey all! So who鈥檚 going to RailsConf this year?

Holm :ruby: boosted

Hi all, my name is Rodrigo and I've been developing with Ruby for 4 years now.
Lately I've been using Hanami at work and in some personal projects, but I really want to get back to develop some stuff with Rails again.

Holm :ruby: boosted
Holm :ruby: boosted

A script to run tests changed since master, pretty handy when checking PRs:

test_runner = File.exists?("Gemfile") ? "bundle exec " : ""
test_runner += if File.exists?("config/application.rb")
"rails test"
elsif File.directory?("spec")
elsif File.directory?("test")
"ruby -Itest"
changed_test_files = `git log --name-only --pretty=oneline --full-index master..HEAD`.split.select { |f| f =~ /\Atest|spec/ }
exec "#{test_runner} #{changed_test_files.join(' ')}"

Holm :ruby: boosted

does anyone know *why* Kernel module exist? why isn't the methods just defined directly on Object?

blast from the past: github.com/judofyr/tipi/blob/m

in 2014 I wrote a Ruby REST API system which had:

- a router that was based on a graph-structure: e.g. you say that "/users/:id" returns a User resource, and then you define the other actions available on a User resource

- strict types on input/output of actions

- usage of a `state` variable that is passed around internally to communicate across resources

this is like 80% of the GraphQL ideas

Derivation representation using binary subtree sets (by Elizabeth Scott, Adrian Johnstone, L.Thomas van Binsbergen): sciencedirect.com/science/arti

always interesting to see a new Scott/Johnstone paper! going to have to see if I can use some of these techniques in my own experiments. /cc @jamey

Holm :ruby: boosted

Starting to write up some blog posts on generally useful programming topics. Partially to try to solidify my own knowledge - it's tough to write about a subject you only have a fuzzy understanding of. Hopefully it will be useful to someone else down the line as well!

First one is a intro, feedback welcome:


@jamey I should probably write something proper about it. it might be hard to understand if you're not in my head

@jamey it's neat how Seq/Alt/Rep/Eps are "dissolved" due to and the only thing that matters while matching are terminal matchers (Char) and rule calls/returns.

@jamey here we go: gist.github.com/judofyr/80bd41

should be able to recognize CFG with left-recursion, hopefully in O(n^3) time. there's a benchmark there for the ambiguous "n+n+n+"-grammar, and that seems to fit best in O(n^2) actually

$ du -sh .

oh. this was a neat repo.

$ yarn
$ du -sh .


Holm :ruby: boosted

How ERB uses `Binding` objects:

class DiyErb
def initialize(template)
@template = template

def result(binding)
@template.gsub(/<%=(.+?)%>/) do


Show more

A Mastodon instance for Rubyists & friends