Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
13
Task/Hello-world-Newbie/00DESCRIPTION
Normal file
13
Task/Hello-world-Newbie/00DESCRIPTION
Normal 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.
|
||||
3
Task/Hello-world-Newbie/ALGOL-68/hello-world-newbie.alg
Normal file
3
Task/Hello-world-Newbie/ALGOL-68/hello-world-newbie.alg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
main: (
|
||||
printf($"Goodbye, World!"l$)
|
||||
)
|
||||
3
Task/Hello-world-Newbie/AWK/hello-world-newbie.awk
Normal file
3
Task/Hello-world-Newbie/AWK/hello-world-newbie.awk
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
BEGIN {
|
||||
print "Hello" 3-1 "U", sprintf("%c",33)
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
MsgBox, Hello World!
|
||||
1
Task/Hello-world-Newbie/COBOL/hello-world-newbie-1.cobol
Normal file
1
Task/Hello-world-Newbie/COBOL/hello-world-newbie-1.cobol
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ sudo apt-get install open-cobol
|
||||
7
Task/Hello-world-Newbie/COBOL/hello-world-newbie-2.cobol
Normal file
7
Task/Hello-world-Newbie/COBOL/hello-world-newbie-2.cobol
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
program-id. hello-world.
|
||||
|
||||
procedure division.
|
||||
display "Hello, World!"
|
||||
|
||||
goback
|
||||
.
|
||||
1
Task/Hello-world-Newbie/COBOL/hello-world-newbie-3.cobol
Normal file
1
Task/Hello-world-Newbie/COBOL/hello-world-newbie-3.cobol
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ cobc -x -Wall -free ./hello.cob
|
||||
2
Task/Hello-world-Newbie/COBOL/hello-world-newbie-4.cobol
Normal file
2
Task/Hello-world-Newbie/COBOL/hello-world-newbie-4.cobol
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
$ ./hello
|
||||
Hello, World!
|
||||
1
Task/Hello-world-Newbie/Clojure/hello-world-newbie-1.clj
Normal file
1
Task/Hello-world-Newbie/Clojure/hello-world-newbie-1.clj
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ lein new app my-hello
|
||||
3
Task/Hello-world-Newbie/Clojure/hello-world-newbie-2.clj
Normal file
3
Task/Hello-world-Newbie/Clojure/hello-world-newbie-2.clj
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$ cd my-hello
|
||||
$ lein run
|
||||
Hello, World!
|
||||
1
Task/Hello-world-Newbie/Clojure/hello-world-newbie-3.clj
Normal file
1
Task/Hello-world-Newbie/Clojure/hello-world-newbie-3.clj
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ lein repl
|
||||
6
Task/Hello-world-Newbie/D/hello-world-newbie.d
Normal file
6
Task/Hello-world-Newbie/D/hello-world-newbie.d
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
writeln("Hello world!");
|
||||
}
|
||||
6
Task/Hello-world-Newbie/Erlang/hello-world-newbie.erl
Normal file
6
Task/Hello-world-Newbie/Erlang/hello-world-newbie.erl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
% Implemented by Arjun Sunel
|
||||
-module(helloworld).
|
||||
-export([main/0]).
|
||||
|
||||
main() ->
|
||||
io:fwrite("Hello world!\n").
|
||||
1
Task/Hello-world-Newbie/Haskell/hello-world-newbie-1.hs
Normal file
1
Task/Hello-world-Newbie/Haskell/hello-world-newbie-1.hs
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ sudo apt-get install ghc
|
||||
4
Task/Hello-world-Newbie/Haskell/hello-world-newbie-2.hs
Normal file
4
Task/Hello-world-Newbie/Haskell/hello-world-newbie-2.hs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
$ touch hello.hs
|
||||
$ cat > hello.hs << HERE
|
||||
main = putStrLn "Hello, World!"
|
||||
HERE
|
||||
1
Task/Hello-world-Newbie/Haskell/hello-world-newbie-3.hs
Normal file
1
Task/Hello-world-Newbie/Haskell/hello-world-newbie-3.hs
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ ghc hello.hs -o hello
|
||||
2
Task/Hello-world-Newbie/Haskell/hello-world-newbie-4.hs
Normal file
2
Task/Hello-world-Newbie/Haskell/hello-world-newbie-4.hs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
$ ./hello
|
||||
Hello, World!
|
||||
1
Task/Hello-world-Newbie/J/hello-world-newbie.j
Normal file
1
Task/Hello-world-Newbie/J/hello-world-newbie.j
Normal file
|
|
@ -0,0 +1 @@
|
|||
'Goodbye, World!'
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
10 print "Goodbye, World!"
|
||||
run
|
||||
1
Task/Hello-world-Newbie/OCaml/hello-world-newbie-1.ocaml
Normal file
1
Task/Hello-world-Newbie/OCaml/hello-world-newbie-1.ocaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
print_string "Hello world!\n";;
|
||||
1
Task/Hello-world-Newbie/OCaml/hello-world-newbie-2.ocaml
Normal file
1
Task/Hello-world-Newbie/OCaml/hello-world-newbie-2.ocaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
ocamlc -o hello hello.ml
|
||||
1
Task/Hello-world-Newbie/OCaml/hello-world-newbie-3.ocaml
Normal file
1
Task/Hello-world-Newbie/OCaml/hello-world-newbie-3.ocaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
./hello
|
||||
1
Task/Hello-world-Newbie/PARI-GP/hello-world-newbie.pari
Normal file
1
Task/Hello-world-Newbie/PARI-GP/hello-world-newbie.pari
Normal file
|
|
@ -0,0 +1 @@
|
|||
print("Hello, world!")
|
||||
69
Task/Hello-world-Newbie/Perl/hello-world-newbie.pl
Normal file
69
Task/Hello-world-Newbie/Perl/hello-world-newbie.pl
Normal 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";
|
||||
1
Task/Hello-world-Newbie/Python/hello-world-newbie.py
Normal file
1
Task/Hello-world-Newbie/Python/hello-world-newbie.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
print "Goodbye, World!"
|
||||
1
Task/Hello-world-Newbie/README
Normal file
1
Task/Hello-world-Newbie/README
Normal file
|
|
@ -0,0 +1 @@
|
|||
Data source: http://rosettacode.org/wiki/Hello_world/Newbie
|
||||
2
Task/Hello-world-Newbie/REXX/hello-world-newbie.rexx
Normal file
2
Task/Hello-world-Newbie/REXX/hello-world-newbie.rexx
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/*REXX program to greet the world enthusiastically. */
|
||||
say "Hello world!"
|
||||
3
Task/Hello-world-Newbie/Rust/hello-world-newbie.rust
Normal file
3
Task/Hello-world-Newbie/Rust/hello-world-newbie.rust
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello world!");
|
||||
}
|
||||
1
Task/Hello-world-Newbie/Scala/hello-world-newbie.scala
Normal file
1
Task/Hello-world-Newbie/Scala/hello-world-newbie.scala
Normal file
|
|
@ -0,0 +1 @@
|
|||
scala -e 'println(\"Hello_world\")'
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
PROGRAM:MYPROGRM
|
||||
:Disp "HELLO, WORLD!"
|
||||
1
Task/Hello-world-Newbie/Tcl/hello-world-newbie.tcl
Normal file
1
Task/Hello-world-Newbie/Tcl/hello-world-newbie.tcl
Normal file
|
|
@ -0,0 +1 @@
|
|||
puts "Hello World"
|
||||
|
|
@ -0,0 +1 @@
|
|||
10 PRINT "Hello"
|
||||
Loading…
Add table
Add a link
Reference in a new issue