Post #2280766
2025-10-29 20:08 UTC
The in-progress PR for the rewrite is here: https://github.com/sminez/ad/pull/156
I need to add a _lot_ more tests and sort out the error reporting but for now its a decent start I think.
Ideally I'd like to be able to run "structex" scripts from the command line over streaming inputs but I still have the same limitation that I think the original Sam / Sam helper scripts had which is that the full input needs to be read prior to execution which is...not ideal. You could avoid that if you got rid of the parallel execution semantics of groups but that's a _really_ nice feature of the engine that I'd like to keep, so maybe my hopes of ending up with the "awk of the future" as Rob originally proposed are a pipe dream?
Replies (1)
-
@sminez@hachyderm.io 2025-10-29 20:11
For anyone not familiar with the parallel execution idea: the following script swaps all occurrences of "Alice" and "Bob" (something that involves replacing one of the strings with an intermediate value using traditional regex based search and replace approaches): , { x/Alice/ c/Bob/; x/Bob/ c/Alice/; } With the following input: 'Alice and Bob are friends with Claire and Bob and Alice are friends with Dave.' We end up with: 'Bob and Alice are friends with Claire and Alice and Bob are friends with Dave.'