Date: Sun, 08 Sep 2019 18:37:00 +0000
Thiago Macieira:
> So you're going to do all of this just to produce a simple JSON payload with
> the result of an operation?
That depends on the specifics of the job. I prefer to code general
solution if I can afford to write it. Right now I need general JSON
reader/writer and I'm gonna write everything I mentioned.
In a perfect world binary IO and Unicode would be in standard library
while JSON can be downloaded via a standard package manager. But we
don't live in a perfect world.
> I'm not mixing them. They are in different channels.
>
> The error message goes to the user. The JSON payload goes to a file.
The original example was using LC_ALL and pipes so I assumed interchange
via stdin/stdout.
You know... why does POSIX have the same file descriptor for both text
and binary? There should be std_text_in, std_text_out, std_binary_in and
std_binary_out. That's the only sane way if you think about it.
Well, just gotta wait another 30 years until OSes become more sane.
> So you're going to do all of this just to produce a simple JSON payload with
> the result of an operation?
That depends on the specifics of the job. I prefer to code general
solution if I can afford to write it. Right now I need general JSON
reader/writer and I'm gonna write everything I mentioned.
In a perfect world binary IO and Unicode would be in standard library
while JSON can be downloaded via a standard package manager. But we
don't live in a perfect world.
> I'm not mixing them. They are in different channels.
>
> The error message goes to the user. The JSON payload goes to a file.
The original example was using LC_ALL and pipes so I assumed interchange
via stdin/stdout.
You know... why does POSIX have the same file descriptor for both text
and binary? There should be std_text_in, std_text_out, std_binary_in and
std_binary_out. That's the only sane way if you think about it.
Well, just gotta wait another 30 years until OSes become more sane.
Received on 2019-09-08 20:37:24