Why Phobos is cool
Jordan Wilson
wilsonjord at gmail.com
Wed Jul 8 20:26:19 UTC 2020
On Wednesday, 8 July 2020 at 07:39:03 UTC, Panke wrote:
> On Wednesday, 8 July 2020 at 03:53:55 UTC, Jordan Wilson wrote:
>> Here's something I just did now that might be more relevant:
>> echo 'import std; void main() {
>> "bets.json".readText.parseJSON.toPrettyString.writeln; }' |
>> dmd -run - | more
>>
>> I did this without looking up anything. Whereas before this
>> echo/import std; into dmd -run trick, I would have opened up
>> vim, and hoped that my previous command to pretty print was
>> still in the history! (using python if I remember correctly).
>
>>
>> Jordan
>
> Have a look at jq [1] and jqed.
After writing the post, I recalled that several months ago I
actually did install jq for that very issue of just quickly
inspecting a json file, but clearly forgot all about it. I
suppose it illustrates my general point...a familiar sledgehammer
might be more useful than an unfamiliar hammer.
> What's up with the bets?
Haha, not a bot, but rather data gathering of NBA odds (before
everything was shut down).
Jordan
More information about the Digitalmars-d
mailing list