Category:UnixPipes: Difference between revisions
(New page: Unix Pipes with out using any turing complete sublanguages. The attempt is to solve programming problems using the pipelines alone. The tools are not restricted to the commonly available t...) |
(→Deleted solutions: Sieve of Eratosthenes) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{language |
|||
⚫ | Unix Pipes |
||
|hopl=no |
|||
}} |
|||
''UnixPipes is really the same language as [[:Category:UNIX Shell|UNIX Shell]].'' |
|||
⚫ | '''Unix Pipes''' is a collection of tools which doesn't use any Turing complete sublanguages. The idea of the system is to solve programming problems using only the pipelines alone. The tools are not restricted to the commonly available tools in [[UNIX]]. Any new tool is allowed as long as it is sharp enough. (i.e does one and only one thing very well). |
||
It does not include programming problems solved with normal shell by using the control structures available as a part of shell. |
|||
If a new tool is introduced, a description of the tool is required. |
|||
Using utilities from, [http://packages.debian.org/unstable/utils/moreutils moreutils] |
|||
'''unfold''' |
|||
Defining unfold as the opposite of xargs, i.e take a list of arguments and send them one at a time. |
|||
The definition would be |
|||
<lang bash> |
|||
|cat unfold |
|||
num=$1 |
|||
while read xxx; do |
|||
for i in $xxx; do |
|||
echo $i |
|||
done |xargs -n $num echo |
|||
done |
|||
|echo 1 2 3 4 5 6 7 8 |unfold 3 |
|||
1 2 3 |
|||
4 5 6 |
|||
7 8 |
|||
</lang> |
|||
== Deleted solutions == |
|||
We delete a UnixPipes solution when it is too similar to its UNIX Shell equivalent, or when it is incorrect (but the UNIX Shell solution is correct). |
|||
# [[Hello world/Standard error]] -- Merged to UNIX Shell. |
|||
# [[Sieve of Eratosthenes]] -- Deleted for being incorrect. |
|||
# [[Sockets]] -- Merged to UNIX Shell. |
|||
# [[String case]] -- Merged to UNIX Shell. |
Latest revision as of 16:28, 1 November 2011
This programming language may be used to instruct a computer to perform a task.
|
UnixPipes is really the same language as UNIX Shell.
Unix Pipes is a collection of tools which doesn't use any Turing complete sublanguages. The idea of the system is to solve programming problems using only the pipelines alone. The tools are not restricted to the commonly available tools in UNIX. Any new tool is allowed as long as it is sharp enough. (i.e does one and only one thing very well).
If a new tool is introduced, a description of the tool is required.
Using utilities from, moreutils
unfold
Defining unfold as the opposite of xargs, i.e take a list of arguments and send them one at a time. The definition would be <lang bash> |cat unfold num=$1 while read xxx; do
for i in $xxx; do echo $i done |xargs -n $num echo
done
|echo 1 2 3 4 5 6 7 8 |unfold 3 1 2 3 4 5 6 7 8
</lang>
Deleted solutions
We delete a UnixPipes solution when it is too similar to its UNIX Shell equivalent, or when it is incorrect (but the UNIX Shell solution is correct).
- Hello world/Standard error -- Merged to UNIX Shell.
- Sieve of Eratosthenes -- Deleted for being incorrect.
- Sockets -- Merged to UNIX Shell.
- String case -- Merged to UNIX Shell.
Subcategories
This category has the following 3 subcategories, out of 3 total.
@
- UnixPipes Implementations (empty)
- UnixPipes User (11 P)
Pages in category "UnixPipes"
The following 36 pages are in this category, out of 36 total.