Update all new Tasks

This commit is contained in:
Ingy döt Net 2015-02-20 09:02:09 -05:00
parent 00a190b0a6
commit 91df62d461
5697 changed files with 93386 additions and 804 deletions

View file

@ -0,0 +1,13 @@
Guide a new user of a language through the steps necessary
to install the programming language and selection of a [[Editor|text editor]] if needed,
to run the languages' example in the [[Hello world/Text]] task.
* Assume the language-newbie is a programmer in another language.
* Assume the language-newbie is competent in installing software for the platform.
* Assume the language-newbie can use one simple text editor for the OS/platform, (but that may not necessarily be a particular one if the installation needs a particular editor).
* Refer to, (and link to), already existing documentation as much as possible (but provide a summary here).
* Remember to state where to view the output.
* If particular IDE's or editors are required that are not standard, then point to/explain their installation too.
;Note<nowiki>:</nowiki>
* If it is more natural for a language to give output via a GUI or to a file etc, then use that method of output rather than as text to a terminal/command-line, but remember to give instructions on how to view the output generated.
* You may use sub-headings if giving instructions for multiple platforms.

View file

@ -0,0 +1,3 @@
main: (
printf($"Goodbye, World!"l$)
)

View file

@ -0,0 +1,3 @@
BEGIN {
print "Hello" 3-1 "U", sprintf("%c",33)
}

View file

@ -0,0 +1 @@
MsgBox, Hello World!

View file

@ -0,0 +1 @@
$ sudo apt-get install open-cobol

View file

@ -0,0 +1,7 @@
program-id. hello-world.
procedure division.
display "Hello, World!"
goback
.

View file

@ -0,0 +1 @@
$ cobc -x -Wall -free ./hello.cob

View file

@ -0,0 +1,2 @@
$ ./hello
Hello, World!

View file

@ -0,0 +1 @@
$ lein new app my-hello

View file

@ -0,0 +1,3 @@
$ cd my-hello
$ lein run
Hello, World!

View file

@ -0,0 +1 @@
$ lein repl

View file

@ -0,0 +1,6 @@
import std.stdio;
void main()
{
writeln("Hello world!");
}

View file

@ -0,0 +1,6 @@
% Implemented by Arjun Sunel
-module(helloworld).
-export([main/0]).
main() ->
io:fwrite("Hello world!\n").

View file

@ -0,0 +1 @@
$ sudo apt-get install ghc

View file

@ -0,0 +1,4 @@
$ touch hello.hs
$ cat > hello.hs << HERE
main = putStrLn "Hello, World!"
HERE

View file

@ -0,0 +1 @@
$ ghc hello.hs -o hello

View file

@ -0,0 +1,2 @@
$ ./hello
Hello, World!

View file

@ -0,0 +1 @@
'Goodbye, World!'

View file

@ -0,0 +1,2 @@
10 print "Goodbye, World!"
run

View file

@ -0,0 +1 @@
print_string "Hello world!\n";;

View file

@ -0,0 +1 @@
ocamlc -o hello hello.ml

View file

@ -0,0 +1 @@
./hello

View file

@ -0,0 +1 @@
print("Hello, world!")

View file

@ -0,0 +1,69 @@
=head1 Obtaining perl
On the majority of UNIX and UNIX-like operating systems
(Linux, Solaris, AIX, HPUX, et cetera), perl will already be installed.
Mac OS X also ships with perl.
Note that "Perl" refers to the language
while "perl" refers to the interpreter used to run Perl programs.
Windows does not ship with perl. Instead, you will have to install one of
the following perl distributions:
=over 4
=item Strawberry Perl
L<Strawberry Perl|http://strawberryperl.com/>: A 100% Open Source Perl for
Windows that is exactly the same as Perl everywhere else; this includes using
modules from CPAN, without the need for binary packages.
=item DWIM Perl for Windows
L<DWIM Perl for Windows|http://dwimperl.com/windows.html>: A 100% Open Source
Perl for Windows, based on Strawberry Perl.
It aims to include as many useful CPAN modules as possible.
=item ActiveState Perl
L<http://www.activestate.com/activeperl/downloads>
=back
Links and further instructions on installation can be found on
L<http://www.perl.org/get.html>.
Once perl is installed, the task of printing "Hello, World!" is quite simple.
From the command line, first check if your environment's C<PATH> variable
knows where to find perl.
On most systems, this can be achieved by entering C<which perl>;
if it spits out something like F</usr/bin/perl>, you're good to go!
If it tells you
which: no perl in (...)
it means you need to add perl to your environment's C<PATH> variable.
This is done on most systems by entering
export PATH=$PATH:[...]
where [...] is the full path to your perl installation (usually /usr/bin/perl).
If you do not have the C<which> command, you can probably just type C<perl>
to see if it fires up the perl interpreter.
If it does, press Ctrl+D to exit it and proceed.
Otherwise, perform the steps above to add perl to your PATH variable.
Once perl is installed, one-liners can be executed from the command line
by invoking perl with the C<-e> switch.
$ perl -e 'print "Hello, World!\n";'
To create a script file that's more permanent, it can be put in a text file.
The name can be anything, but F<.pl> is encouraged.
The #!/usr/bin/perl at the beginning is called the shebang line;
if the operating system supports it, it tells where to find the perl interpreter.
If the script is run with C<perl>, this line will be ignored--
this is for invoking the file as an executable.
=cut
#!/usr/bin/perl
print "Hello, World!\n";

View file

@ -0,0 +1 @@
print "Goodbye, World!"

View file

@ -0,0 +1 @@
Data source: http://rosettacode.org/wiki/Hello_world/Newbie

View file

@ -0,0 +1,2 @@
/*REXX program to greet the world enthusiastically. */
say "Hello world!"

View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello world!");
}

View file

@ -0,0 +1 @@
scala -e 'println(\"Hello_world\")'

View file

@ -0,0 +1,2 @@
PROGRAM:MYPROGRM
:Disp "HELLO, WORLD!"

View file

@ -0,0 +1 @@
puts "Hello World"

View file

@ -0,0 +1 @@
10 PRINT "Hello"