From ccca29377a48da6dabbb08446ec7c3299f9165b9 Mon Sep 17 00:00:00 2001 From: def Date: Sun, 1 Mar 2015 15:28:37 +0100 Subject: Fix Nim a bit --- nim.html.markdown | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'nim.html.markdown') diff --git a/nim.html.markdown b/nim.html.markdown index c74fece7..2172f40f 100644 --- a/nim.html.markdown +++ b/nim.html.markdown @@ -3,14 +3,15 @@ language: Nim filename: learnNim.nim contributors: - ["Jason J. Ayala P.", "http://JasonAyala.com"] + - ["Dennis Felsing", "http://felsin9.de/nnis/"] --- -Nim (formally Nimrod) is a statically typed, imperative programming language +Nim (formerly Nimrod) is a statically typed, imperative programming language that gives the programmer power without compromises on runtime efficiency. Nim is efficient, expressive, and elegant. -```ruby +```nimrod var # Declare (and assign) variables, letter: char = 'n' # with or without type annotations lang = "N" & "im" @@ -60,6 +61,13 @@ var drinks = @["Water", "Juice", "Chocolate"] # @[V1,..,Vn] is the sequence literal +drinks.add("Milk") + +if "Milk" in drinks: + echo "We have Milk and ", drinks.len - 1, " other drinks" + +let myDrink = drinks[2] + # # Defining Types # -- cgit v1.2.3 From 0bb2a2ddc1ef1f55db6c5856cec3e01c49c89b01 Mon Sep 17 00:00:00 2001 From: Ben Wiklund Date: Sun, 1 Mar 2015 13:28:12 -0800 Subject: Update nim.html.markdown --- nim.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nim.html.markdown') diff --git a/nim.html.markdown b/nim.html.markdown index 2172f40f..aa15e591 100644 --- a/nim.html.markdown +++ b/nim.html.markdown @@ -269,5 +269,5 @@ performance, and compile-time features. * [FAQ](http://nimrod-lang.org/question.html) * [Documentation](http://nimrod-lang.org/documentation.html) * [Manual](http://nimrod-lang.org/manual.html) -* [Standard Libray](http://nimrod-lang.org/lib.html) +* [Standard Library](http://nimrod-lang.org/lib.html) * [Rosetta Code](http://rosettacode.org/wiki/Category:Nimrod) -- cgit v1.2.3 From 6df96946b43999ff8754807446d4bf4f73144480 Mon Sep 17 00:00:00 2001 From: Baurzhan Muftakhidinov Date: Mon, 18 May 2015 14:17:45 +0500 Subject: Fix links to nim-lang website. --- nim.html.markdown | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'nim.html.markdown') diff --git a/nim.html.markdown b/nim.html.markdown index aa15e591..2955c7bc 100644 --- a/nim.html.markdown +++ b/nim.html.markdown @@ -155,7 +155,7 @@ var anotherArray = ["Default index", "starts at", "0"] # More data structures are available, including tables, sets, lists, queues, # and crit bit trees. -# http://nimrod-lang.org/lib.html#collections-and-algorithms +# http://http://nim-lang.org/docs/lib.html#collections-and-algorithms # # IO and Control Flow @@ -174,7 +174,7 @@ else: # `while`, `if`, `continue`, `break` -import strutils as str # http://nimrod-lang.org/strutils.html +import strutils as str # http://nim-lang.org/docs/strutils.html echo "I'm thinking of a number between 41 and 43. Guess which!" let number: int = 42 var @@ -263,11 +263,11 @@ performance, and compile-time features. ## Further Reading -* [Home Page](http://nimrod-lang.org) -* [Download](http://nimrod-lang.org/download.html) -* [Community](http://nimrod-lang.org/community.html) -* [FAQ](http://nimrod-lang.org/question.html) -* [Documentation](http://nimrod-lang.org/documentation.html) -* [Manual](http://nimrod-lang.org/manual.html) -* [Standard Library](http://nimrod-lang.org/lib.html) -* [Rosetta Code](http://rosettacode.org/wiki/Category:Nimrod) +* [Home Page](http://nim-lang.org) +* [Download](http://nim-lang.org/download.html) +* [Community](http://nim-lang.org/community.html) +* [FAQ](http://nim-lang.org/question.html) +* [Documentation](http://nim-lang.org/documentation.html) +* [Manual](http://nim-lang.org/docs/manual.html) +* [Standard Library](http://nim-lang.org/docs/lib.html) +* [Rosetta Code](http://rosettacode.org/wiki/Category:Nim) -- cgit v1.2.3 From fb903329c65a70fce2419da98842f038cd41ba82 Mon Sep 17 00:00:00 2001 From: Baurzhan Muftakhidinov Date: Mon, 18 May 2015 14:19:46 +0500 Subject: Fix copy-paste typo. --- nim.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nim.html.markdown') diff --git a/nim.html.markdown b/nim.html.markdown index 2955c7bc..c9548a1c 100644 --- a/nim.html.markdown +++ b/nim.html.markdown @@ -155,7 +155,7 @@ var anotherArray = ["Default index", "starts at", "0"] # More data structures are available, including tables, sets, lists, queues, # and crit bit trees. -# http://http://nim-lang.org/docs/lib.html#collections-and-algorithms +# http://nim-lang.org/docs/lib.html#collections-and-algorithms # # IO and Control Flow -- cgit v1.2.3