Ruby One-Liners Cookbook

Languages and libraries

ruby command line one-liners

SHOW HN2020

Ruby One-Liners Cookbook

Ruby is based on programming languages like Perl, Smalltalk, Eiffel, Ada, and Lisp.

learnbyexample.github.io

#ruby one-liners#ruby command line#perl switches#text processing

191points
36comments
#295of 3,028 in 2020
Top 10%of 2020 by points

How HN took it

DebatedReal support and real criticism

3 positive, 2 neutral or asking, 0 mixed, 4 critical, out of 9 comments about the project. Thread score 0.00.

Design: 0 for, 3 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Ruby is enjoyable and fun to write

    From 2 comments
    • And mind you, i've seen and written my good share of crap Ruby code! It's not about the quality of the code or the fit-for-purposeness of the language or platform, it's about the…
      pantulis on HN
    • Ruby brings me joy of programming. Like this morning, doing a report for year, month and getting the last day of the month is absolute genius: Date.new(year, month, -1) # wow
      oogway8020 on HN
  • Maker's honest story about earning from books

    From 1 comment
    • Thanks for a detailed, honest, and inspiring share. That’s a pretty amazing story.
      tomcam on HN

Objections

  • Some one-liners are very long, around 120 characters

    From 1 comment
    • Some of these one-liners are clocking in at around 120 characters.
      bdcravens on HN
  • Inline code is unreadable in dark theme on Firefox

    From 2 comments
    • Just FYI, the code element color is impossible to see when the page loads its dark theme. Otherwise, looks great.
      save_ferris on HN
    • Firefox on MacOS causes the issue, Chrome works fine.
      save_ferris on HN

Alternatives named

  • Perl one-liners

    From 2 comments
    • It’s fascinating to me that the mindshare that was once taken up by Perl seems to slowly but surely be replaced by Ruby. This is a positive, IMO. Compared to Perl, Ruby is easier…
      revscat on HN
    • Ruby, like Perl, is really built to be a part of a *nix system and has some bash elements (like special variables). It's a natural fit for one-liners.
      jrumbut on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/24637797)