Remix.run Logo
bouk 5 hours 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

It does some kind of stack forking which is what allows its funky syntax

functional_dev 5 hours ago | parent | next [-]

The backtracking implementation in jq is really the secret sauce for how it handles those complex filters without getting bogged down

vbezhenar 5 hours ago | parent | prev [-]

Looks like naive implementation of homemade bytecode interpreter. What's so mind blowing about that? Maybe I missed something.