ryanmjacobs

Joined 11 years ago

Karma
582
Submissions
156
Member since
Jan 31
notryan.com webfpga.io
View on Hacker News

Recent submissions

Comment · 1 year ago
Oh that's embarrassing -- you're right, the first example doesn't make sense. Kinda pointless actually haha

I use it for code like this:

  raw = IO.popen(%W[gzip -d -c -- #{path}]){_1.read}
  raw = IO.popen(%W[gzip -d -c], in: pipe){_1.read}
  raw = IO.popen(%W[git status --porcelain -- #{path}]){_1.read}
Useful because it eliminates /bin/sh footguns (e.g. `md5sum hello&world` forking or `~john` expanding), plus you get kernel.spawn() options. `open("| ...)` only made sense for the second example.

Anyway, I find "_1" more eye-pleasing than:

  IO.popen(%W[gzip -d -c #{path}]){|io| io.read}
Comment · 1 year ago
FYI, one of my favorite Ruby idioms is to capture command output with `open(...){_1.read}`

  pp open("|ls -lh /usr/bin/ls"){_1.read}
  "-rwxr-xr-x 1 root root 135K Aug 30 04:57 /usr/bin/ls\n"
or to quickly print tabular data

  open("|column -t -s \\t", "w"){_1 << tsv_data}
Comment · 1 year ago
Oh damn. I have been using `_1`, `_2`, etc. extensively for years... I didn't know about that footgun.

I'd like know if `it` is merely an alias for `_1`, or if protects from this "arity issue" too.

Comment · 1 year ago
Comment · 3 years ago
Rest in peace, Bram. I was introduced to Vim by my father when I was a kid, and have been using it for the past 15 years. Your software has touched many lives.
Comment · 3 years ago
I tried Mint. AFAIK Apple CC doesn't allowing pulling live transactions.
Comment · 3 years ago
Oh nice. This is a very useful tip. I wish I knew that a month ago.
Comment · 3 years ago
I had the same exact situation. I used the Apple card almost exclusively in 2022 because of the 1% card + 2% apple pay rewards.

Doing taxes right now and I spent about 10 minutes manually exporting+emailing OFX/QFX files to myself for Quicken. Kind of a pain. Every other card I have supports automatic data pulling.

Probably will move my main card to something that has automatic integration.

Comment · 3 years ago
Well written story. Worth the read.
Comment · 5 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton