pmarreck/ruby-snippets
View on GitHub ↗ ★ 11 Ruby
Just some ideas or playing around in ruby that might one day be promoted to their own projects.
5 mentions on Hacker News by 2 people: 0 stories, 5 comments · first 2013-06-03 · latest 2021-05-06
20082026
-
…with writing a version of fizzbuzz that avoided conditionals entirely, and was purely functional: https://github.com/pmarreck/ruby-snippets/blob/master/functi... (I actually regret using currying here because it hurts the portability of…
comment by pmarreck · 2021-05-06 · in Branch predictor: How many “if”s are too many? -
…not have a "!" at the end. To that end I created a little library called "Bang All The Things" :) https://github.com/pmarreck/ruby-snippets/blob/master/bang_a... I'm convinced that this simplification helps prevent bugs, at the minor cost…
comment by pmarreck · 2017-02-21 · in Ruby `reject!` -
…I rewrote as a well-commented Regex which was something like 300x faster than using the Mail gem: https://github.com/pmarreck/ruby-snippets/blob/master/header... Once you know what to look for re: catastrophic backtracking, you know how to…
comment by pmarreck · 2016-07-21 · in Stack Overflow Outage Postmortem -
…wrote something in Ruby as an idea based off it (although it hasn't been used in production yet) https://github.com/pmarreck/ruby-snippets/blob/master/star_i...
comment by lectrick · 2014-05-18 · in Distributed ID Generation and Bit Packing -
https://github.com/pmarreck/ruby-snippets One day (...maybe today), I'll turn some of these into Ruby gems. I have some kind of weird open-source stage fright, even after multiple coworkers have told me some of these deserve to be gemmed…
comment by lectrick · 2013-06-03 · in Ask HN: do you keep a stash of ideas?