Talk:Shell one-liner: Difference between revisions
Content deleted Content added
Heads up! Is the Liberty BASIC solution glitched? |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 23:
The idea was to invoke the language - in this case BASIC, from a command shell outside of the language, together with one line of text which would become the program for the language to run. The basic example seems to be invoking a command shell and another program from within the BASIC shell. --[[User:Paddy3118|Paddy3118]] 06:23, 26 January 2010 (UTC)
: I guess I misunderstood the task. There's no standard way to do ''that'' for BASIC (many implementations don't have a non-interactive mode, or else can't take their input from stdin). I'll remove it. -- [[User:Eriksiers|Eriksiers]] 00:51, 28 January 2010 (UTC)
:: I think I also misinterpreted the task. When I read SPECIFY and EXECUTE, I understood that to mean to input a program for a particular language and then run it from the (shell) command line. If you had said, "show how to execute a program in a language from a shell (command line or "prompt") ...", and the point here is that it shouldn't matter if the program is 45,000 statements long (or only 3), I would've assumed you wanted example(s) to show the syntax of how to run a program (for a particular language). Of course, I'm assuming that "short" had to do with the size of the program, not the duration of it's execution or smallness of output. -- [[User:Gerard Schildberger|Gerard Schildberger]] 18:49, 23 March 2012 (UTC)
==One Line?==
Line 36 ⟶ 38:
Second class of incorrectness: not running from shell at all. These include AutoHotkey, ZX spectrum basic, Matlab, MUMPS, and REXX. REXX example talks about how to run an executable file which is way off topic; all others substitute "shell" with "intepreter". These, in my mind, are undoubtedly incorrect, more so than the previous category even.
: --- Where does the REXX example talk about anything? For that matter, where is the REXX example? -- [[User:Gerard Schildberger|Gerard Schildberger]] 00:13, 23 March 2012 (UTC)
:: See the history, the example mentioned was [http://rosettacode.org/mw/index.php?title=Shell_one-liner&oldid=121477#REXX marked for deletion] Sept 25, 2011 along with several others, and was later deleted when it was not fixed. [[User:Xenoker|Xenoker]] 17:46, 23 March 2012 (UTC)
There is actually a third category, where the braindead compiler/intepreter can eval a file without producing an exe but would not do so with text supplied on commandline or stdin. These include second example of Go and Oz. I'm a bit indifferent about this category, it sort of fits the spirit of the task.
Line 62 ⟶ 67:
::: As a general rule, I think we encourage "best efforts" here. We are trying to encourage cross/language understandings and representations. --[[User:Rdm|Rdm]] 22:09, 26 September 2011 (UTC)
:::: I agree, to the extent that the example provides for good or common practice. For C a one-liner is actually used often (to find out a system constant when porting stuff, for example). But for Go or Java it would appear quite unnatural -- how often do you see a java programmer coding without an IDE? --[[User:Ledrug|Ledrug]] 22:28, 26 September 2011 (UTC)
==Whilst/while==
I didn't know that whilst was [http://oxforddictionaries.com/definition/whilst used mainly in Britain]. Some sentences still seem somehow better with the word rather than using while, but now that I am aware of my parochial Englishness I am quite happy to go along with swapping it :-) --[[User:Paddy3118|Paddy3118]] 04:07, 26 September 2011 (UTC)
:Heh I didn't know either. You don't need to change if you don't want to. They mean the same thing. I guess I understand now why I thought it was an unnecessary word: in my country, it isn't necessary. In any case, I guess the nature of this site means we should accept all sorts of language subtleties (spoken, written, programmed, or otherwise, where it doesn't get in the way of clarity). You can stick with "whilst" where you like it and I'll stick with "while" everywhere. --[[User:Mwn3d|Mwn3d]] 19:52, 26 September 2011 (UTC)
==Liberty BASIC oddity==
Is the Liberty BASIC one correct? Looks like it got doubled somehow.
[[User:Axtens|Axtens]] 00:57, 21 September 2012 (UTC)
|