News for hackers. Stuff that matters.
Re:Show HN: Jq alternative built on top of JavaScript anonym... by andrvo on Monday January 29, 2018 @12:35PM (#16259054)
While jq is definitely faster, for more complex tasks I love using ramda-cli [1]. It has all the functions from the excellent Ramda [2] AND you can use LiveScript's [3] terser syntax (and pipes!).

Here's a quick command to output a list of recent files on Linux:

    xml2json < ~/.local/share/recently-used.xbel | ramda '.xbel.bookmark |> pluck \href |> map replace /file:\/\//, ""' -o raw
1. https://github.com/raine/ramda-cli 2. http://ramdajs.com/ 3. http://livescript.net/
Re:Show HN: Jq alternative built on top of JavaScript anonym... by andrvo on Monday January 29, 2018 @12:40PM (#16259105)
And here's a more interesting example using output from Algolia's search API:

   curl 'https://<redacted Algolia url>' | ramda '.hits |> map pick <[title url story_url objectID points num_comments]> |> evolve title: take 2 |> sort (.points) |> reverse'