Talk:User defined pipe and redirection operators: Difference between revisions
Content added Content deleted
m (→more ambitious than unix: reword.) |
m (rm dup section) |
||
Line 90: | Line 90: | ||
[[User:NevilleDNZ|NevilleDNZ]] 03:26, 13 September 2011 (UTC) |
[[User:NevilleDNZ|NevilleDNZ]] 03:26, 13 September 2011 (UTC) |
||
== more ambitious than unix == |
|||
The task currently says "Pass each record on as soon possible running all filters/procedures concurrently." |
|||
But unix does not know anything about records and passes blocks of characters which typically do not represent complete records or complete lines (except in non-portable contexts where the programs have records which match the OS buffer block size). Meanwhile, in a non-multi-tasking language "as soon [as] possible" conflicts with the task requirement "Specifically do not cache the entire stream before the subsequent filter/procedure start". |
|||
Also, there's an implicit task "requirement" here, that output be characters. And a secondary implicit task "requirement" here that files be supported (since that what redirection means) which would also suggest that the task needs to support file reference by name. And, finally, in unix, the commands are (as a general rule) external programs, but it's not clear if this task allows for that kind of implementation. --[[User:Rdm|Rdm]] 13:17, 13 September 2011 (UTC) |
|||
== more ambitious than unix == |
== more ambitious than unix == |
||
Line 111: | Line 103: | ||
In essence that is required is the creation of the operators "<", "|", ">", "<<" & ">>", with the basic plumbing such as "cat" & "tee". |
In essence that is required is the creation of the operators "<", "|", ">", "<<" & ">>", with the basic plumbing such as "cat" & "tee". |
||
Here are my thoughts, sketched in python code, note: |
|||
⚫ | |||
* the code ''does not'' require OS pipes |
|||
* neither does it require OS multitasking |
|||
⚫ | |||
<lang python>#!/usr/bin/env python |
<lang python>#!/usr/bin/env python |
||
Line 150: | Line 145: | ||
cat("List_of_computer_scientists.lst") | grep("ALGOL") > "ALGOL_pioneers.lst"</lang> |
cat("List_of_computer_scientists.lst") | grep("ALGOL") > "ALGOL_pioneers.lst"</lang> |
||
So try not using "unix pipes". |
|||
I hope that helps. |
I hope that helps. |