>
> It looks neat.
>
>
>
> "Garbage-collect" your compiler-generated fifo's once the show terminates:
>
> /tmp/fifo-*-* :)
>
No need, it uses Docker behind the scenes, so anything outside the filesystem directory gets deleted.
I used /tmp because since the objective of /tmp is to have files to be temporary
>
>
> You may want to work on adding some optimizing pass to get rid of useless
>
> uses of fifos and cats, so that realistic command lines are generated
>
> wherever possible.
>
My first script generator actually does this, but then I had to think the
use-case where the user splits and joins the application whenever the user
wants, that where it started to become difficult, and there is a feature called macros which my thesis advisor though it is a great idea to add, a macro in this case is a composition of interconnected commands, a macro can accept multiple inputs and multiple outputs, I implemeted it last week, but it is
buggy, so the best way to do this is my making named pipes.
After I finish my thesis (in next month), I would need to create an algorithm to find paths that would not need to create named pipes, and genereate optimized code
>
> Also, you may want to optionally take advantage of bash process substitution
>
> in the code generator (non-POSIX feature of bash). For instance, command A can
>
> send its standard output to B, and standard error to command C like this:
>
> A 2> >(C) | B
>
> bash sets up the file descriptors, eliminating the "fifology" of redirection
>
> descriptor 2 to a named pipe.
>
>
>
> I think that arbitrarily complex graphs can be compiled to a single command
>
> this way. That has its advantages because it becomes a single job under
>
> POSIX job control.
I'm aware of that actually, when you create a macro (buggy and incomplete as for now) you can create with a complete command line, like
A 2> >(C) | tee >(D) >(E) | B
and it generates a complete graph try creating a macro like this (shortcut is Shift + M)
with a command like this: grep "test" | tee >(gzip > file4.txt.gz) >(bzip2 > file4.txt.bz2) | sort > sorted.txt
the name of the macro must have one word and must not exist
its description can be anything, or empty
the command can be anything
let me give you an example:
name: compress-sort
description: an example macro that compresses and sorts it
command: grep "test" | tee >(gzip > file4.txt.gz) >(bzip2 > file4.txt.bz2) | sort > sorted.txt
An macro will be created with a generated graph based on the command