4 ms·
I highly recommend anyone to look at jq's VM implementation some time, it's kind of mind-blowing how it works under the hood: https://github.com/jqlang/jq/blob/
by bouk 6mo ago
I highly recommend anyone to look at jq's VM implementation some time, it's kind of mind-blowing how it works under the hood: https://github.com/jqlang/jq/blob/master/src/execute.c https://github.com/jqlang/jq/blob/master/src/execute.c
It does some kind of stack forking which is what allows its funky syntax
- vbezhenar 6mo agoLooks like naive implementation of homemade bytecode interpreter. What's so mind blowing about that? Maybe I missed something.
- functional_dev 6mo agoThe backtracking implementation in jq is really the secret sauce for how it handles those complex filters without getting bogged down