Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But .. how can anyone use strace? That's not JSON. And serialization is cheap!


Do you know what strace is?

It's a command that prints the system calls (done via library). So you see write(55, "[1,2,3,4]\n")


Let me try again. You do see

  write(55, "[1,2,3,4]\n", 10)
and not

  {
    "syscall": "write",
    "params": {
      "fd": 55,
      "buf": "[1,2,3,4]\n",
      "len": 10
    }
  }
which would obviously be much better!

It can be parsed by any modern language, and deserialization is cheap.

Can we please rewrite strace with this in mind? Preferably in Rust.


How is the 2nd much better? Considering that a trace contains more than 1 single line?

Anyway they'd probably accept a patch for json output format. I don't think it's so difficult to do.

You can ask them in advance if they'd be willing to accept it, before starting to write it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: