Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What would be a use case for this?


This is a somewhat different idea but I'd like to be able to feed structured data (in memory objects) to an (user defined) awk-like script without the need to serialize/parse everything. This could be used for packet filtering, conditional breakpoints, file searching, syscall filtering and intercepting, etc. Basically wherever you need a user defined filter more powerful than regex.

The embedder can decide what variables and functions to provide for each invocation of the script. You could get something like Wireshark filters out of the box:

    ip && port==1234 {print size, time}
Graphviz includes a tool "gvpr" which essentially implements this idea for processing graphs but of course, they end up reimplementing a large part of awk.


At this point I’be caved and just coerce through json via python and jam things through jq for most of my data inspection and sleuthing.


Text processing & extraction


Like a middle ground between regex and embedded Lua?


That's Perl.


I'm sure some element of perl is the middle ground of everything.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: