stedolan | 4 years ago | on: Stack size invisibility in C and the effects on "portability"
stedolan's comments
stedolan | 13 years ago | on: Jq - a lightweight and flexible command-line JSON processor
1. I think your example shows sed/awk's failings with JSON data :) I don't want to write a JSON parser by hand every time I want to pull a field out of an object, and parsing recursive structures with regexes is never a good plan.
2. It reads JSON items from stdin into memory, one at a time. So if the input is a single giant JSON value, it all goes into memory, but if it's a series of whitespace-separated values they'll be processed sequentially.
It's cat-friendly: if you do
cat a | jq foo; cat b | jq foo
then it's the same as doing cat a b | jq foostedolan | 13 years ago | on: Jq - a lightweight and flexible command-line JSON processor
stedolan | 13 years ago | on: Jq - a lightweight and flexible command-line JSON processor
stedolan | 13 years ago | on: Jq - a lightweight and flexible command-line JSON processor
For now, I've just checked in the autogenerated parser, so that bison won't have to run when you build master. git-pull and try again :)
This is also how the kernel grows the stack. When there's a fault, it compares the faulting address to the stack pointer register. This way, big frames don't confuse the automatic growing. (On Windows, by contrast, stack growth is detected using a single 4k guard page, so compilers must be careful with big frames and insert strided accesses)