HNHacker News
TopNewBestAskShowJobs

binaryphile

84 karma · joined December 27, 2016

[ my public key: https://keybase.io/binaryphile; my proof: https://keybase.io/binaryphile/sigs/BJHRKQ7ZTR4BXjEByiyvOC3aT6kCFSnqXVgXp8Gia2c ]
submissionscomments
binaryphile··on Nix Language Primer
Finally got around to updating the post with your suggestions. Thanks again.
binaryphile··on Nix Language Primer
I can relate to the earlier poster because I had the same problem finding all of these rules in one place. I wrote it to be precisely what I wish someone had told me before I got started.

Thank you for the compliment btw.

binaryphile··on Nix Language Primer
Thanks for the tips. We're still running on 1.11 because of problems with the recent glibc updates not matching the kernels in our deployment environment.
binaryphile··on Nix Language Primer
I found the nix-repl to be very helpful in this situation...you can also invoke command-line expressions directly with nix but it's a bit more arcane.
binaryphile··on Show HN: Rb – Turns Ruby into a command line utility
A bashtardization:

    rb () {
      [[ $1 == -l ]] && shift
      case $? in
        0 ) ruby -e "STDIN.each_line { |l| puts l.chomp.instance_eval(&eval('Proc.new { $* }')) }";;
        * ) ruby -e "puts STDIN.each_line.instance_eval(&eval('Proc.new { $* }'))";;
      esac
    }
binaryphile··on More Things I Wish I’d Known About Bash
Yup. The moment you need editing capabilities more sophisticated than those three keys, though, I recommend switching to vi input mode (set -o vi) if you are familiar with vim keybindings. Although tapping Esc is not as quick as Ctrl (or, my chosen alternative, Ctrl-[), you have an entire library of editing commands already at your beck and call. I find that using 'f' or 'F' and '.' more quickly triangulates the problem area of the text in most cases.

Of course, if you are an emacs user, more power to you with the emacs bindings.

binaryphile··on ISO Rejects NSA Encryption Algorithms
Boy, those Trojans really got us with that last horse, hoowee, but this one looks solid.
binaryphile··on Statistics professor at Columbia and Georgetown banned from all Google services
The irony of using the example of a statistics professor to prove a systemic conspiracy with a sample size of 1 is not lost on me.
binaryphile··on Bashing the Bash – Replacing Shell Scripts with Python
Here's what my take on the script would be in bash (albeit untested):

https://gist.github.com/binaryphile/3cf01870516d5fffafbc84a0...

Whoever wrote the initial bash script was clearly in a rush. I don't hold that against anyone, but it makes it poor fodder for an example of why bash is "bad". In particular, for the kind of task illustrated, it's a far better choice than python and I say that as a (formerly) unabashed pythonista.

It takes some time to get chops in bash, especially since there's no culture of developing shareable libraries, but it's no harder to learn bash via stackoverflow/google searches than it is to learn python. Use python when you need data structures and objects. Use bash to automate what you would normally do on the command line. Is that so hard?

binaryphile··on ⁠Btrfs has been deprecated in RHEL
"Never go to sea with two chronometers; take one or three."

- adage cited in the Mythical Man Month