Live data from Hacker News

Viewing profile — kbrazil

kbrazil

HN member
Joined
Thu, Oct 31, 2019, 8:03 PM UTC
HN karma
215
Public activity
66 items

About kbrazil

No profile information was provided.

Recent public activity

  1. comment
    Comment #38576660

    There could be a major schema change that breaks the contract, but one of the nice things about JSON output is that it allows the creation of new fields without affecting downstrea…

  2. comment
    Comment #38576608

    `jc` supports plugins: https://github.com/kellyjonbrazil/jc#parser-plugins

  3. comment
    Comment #38571761

    `jc` author here. I've been maintaining `jc` for nearly four years now. Most of the maintenance is choosing which new parsers to include. Old parsers don't seem to have too many pr…

  4. comment
    Comment #38571589

    Also, `jc` automatically selects the correct /proc/file parser so you can just do `jc /proc/meminfo` or `cat /proc/meminfo | jc --proc` without specifying the actual proc parser (t…

  5. comment
    Comment #37428321

    You can do it like this with Jello (I am the author): jello '[e.commit for e in _ if e.commit.author == "Tom Hudson"]' Jello let’s you use python syntax with dot notation without t…

  6. comment
    Comment #34098092

    Interesting - the proc-pid-parser actually parses that file name just fine: $ echo '2001 (bad) S 1 2 3 4 5) S 1888 2001 1888 34816 2001 4202496 428 0 0 0 0 0 0 0 20 0 1 0 75513 115…

  7. comment
    Comment #34097871

    It doesn't look like jc suffers from this bug since the regex match is greedy: % echo '2001 (my (file) with) S 1888 2001 1888 34816 2001 4202496 428 0 0 0 0 0 0 0 20 0 1 0 75513 11…

  8. comment
    Comment #34096573

    jc[0] supports proc files. Converts them to JSON or YAML. (I am the author) [0] https://kellyjonbrazil.github.io/jc/docs/parsers/proc

  9. comment
    Comment #34096527

    Fortunately `jc`[0] does parse `/proc/ /stat` correctly. I, of course, originally implemented it the naive/incorrect way until a contributor fixed it. :) $ cat /proc/2001/stat | jc…

  10. comment
    Comment #34072155

    Both ways work: $ jc ifconfig lo0 $ ifconfig lo0 | jc --ifconfig

  11. comment
    Comment #33535046

    Good news - `jc` supports JSONLines output for many commands and file-types, too!

  12. comment
    Comment #33469458

    Also note that you are looking at plaintext output here. By default `jc` and other JSON filtering tools do syntax highlighting when outputting to the terminal so it's actually quit…

  13. comment
    Comment #33461444

    Hi - jc author here. Just a couple points: The casting to int/float is not done unless the underlying values are predictably documented to be numbers. There are rare cases where au…

  14. comment
    Comment #33461301

    Feel free to open issues on GitHub if you would like to recommend parsers! Also, the latest version of jc supports parsing of /proc files, which may also help.

  15. comment
    Comment #33459015

    Hi there! `jc` author here. Yes, it is a documented caveat[0] that the `C` or `en_US.UTF-8` locales should be used for best results. It's not unheard of for tools to require `C` lo…

  16. comment
    Comment #33458528

    You can also run `jc -h --dig` to get the parser details that include the schema. Having true JSON Schema[0] is being considered, but on the back-burner due to the sheer number of …

  17. comment
    Comment #33457953

    `jc` is available today as a compiled binary with all dependencies self-contained. The binaries and OS package installers are available under the GitHub Releases: https://github.co…

  18. comment
    Comment #33453173

    Hi there - author of `jc` here. I originally intended to have auto-detection but put that on the backburner to focus on creating parsers, especially after introducing the magic syn…

  19. comment
    Comment #33453088

    Hi there - `jc` author here. `jc` can also output in YAML format with the `-y` flag. It is fairly trivial to add other options in the future since `jc` just turns the text into obj…

  20. comment
    Comment #33452722

    Hi there - I'm the author of `jc`. I also created `jello`[0], which works just like `jq` but uses python syntax. I find `jq` is great for many things but sometimes more complex ope…

  21. comment
    Comment #31187603

    Similar in concept to jello[0] which works like jq but uses python syntax. [0] https://github.com/kellyjonbrazil/jello

  22. comment
    Comment #30597075

    You could do something like this in pure python without the json loading boilerplate with jello[0]. An interactive TUI for jello called jellex[1} is also available. (I am the autho…

  23. comment
    Comment #29866622

    For those who are comfortable with python, I created Jello[0], which works like jq but uses python syntax. I also created Jellex[1], which is a TUI built on Jello to assist with bu…

  24. comment
    Comment #29475588

    What I was getting at is: cpu: 0.2 kw_read_s: 0.12 is describing a single 'object'. How do you describe an array or list of these objects? Something like: cpu: 0.2 kw_read_s: 0.12 …

  25. comment
    Comment #29462540

    New parser contributions for JC are always welcome!