Talk:Shell one-liner: Difference between revisions

(→‎Incorrect solutions: what is correctness)
Line 45:
:: This is again the issue of "letter of the task" vs "spirit of the task", which is always muddy. The utility value of a shell one-liner is that for certain simple jobs, you can invoke an intepreter in a simple manner without undesired side effects such as having to open an editor or leaving behind intermediate files. The echo-compile-run methods don't quite achieve that. Plus, if that's allowed, then pretty much any program can be written this way (editor of the champions is 'cat', you know) which renders the task pointless.
:: As to the ZX basic thing, you can argue that it's one line under a prompt, but there's the fact that it's using current interpreter prompt, not quite the same as invoking a separate interpreter. You probably would agree that typing 'ls' under current interactive shell is not a 'shell one-liner', but typing 'sh -c ls' is, same idea. --[[User:Ledrug|Ledrug]] 00:16, 26 September 2011 (UTC)
 
:::+1 on letter vs spirit of the task. I would have thought most languages with only compilers might be better off omitting themselves from this task, but, that said, if a compiled language could start a web server with a one-line program then an example using cat piped to a compiler etc ''might'' be of use. (That utility thing you mentioned Ledrug). --[[User:Paddy3118|Paddy3118]] 03:50, 26 September 2011 (UTC)
Anonymous user