1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
21 add
("meta").attr
("charset", "utf-8")
22 add
("title").text
("Nit")
23 add
("link").attr
("rel", "icon").attr
("href", "http://nitlanguage.org/favicon.ico").attr
("type", "image/x-icon")
24 add
("link").attr
("rel", "stylesheet").attr
("href", "http://nitlanguage.org/style.css").attr
("type", "text/css")
25 add
("link").attr
("rel", "stylesheet").attr
("href", "http://nitlanguage.org/local.css").attr
("type", "text/css")
29 open
("article").add_class
("page")
30 open
("section").add_class
("pageheader")
31 add_html
("<a id='toptitle_first' class='toptitle'>the</a><a id='toptitle_second' class='toptitle' href=''>Nit</a><a id='toptitle_third' class='toptitle' href=''>Programming Language</a>")
32 open
("header").add_class
("header")
33 open
("div").add_class
("topsubtitle")
34 add
("p").text
("A Fun Language for Serious Programming")
39 open
("div").attr
("id", "pagebody")
40 open
("section").attr
("id", "content")
41 add
("h1").text
("# What is Nit?")
42 add
("p").text
("Nit is an object-oriented programming language. The goal of Nit is to propose a robust statically typed programming language where structure is not a pain.")
43 add
("p").text
("So, what does the famous hello world program look like, in Nit?")
44 add_html
("<pre><tt><span class='normal'>print </span><span class='string'>'Hello, World!'</span></tt></pre>")
46 add
("h1").text
("# Feature Highlights")
47 add
("h2").text
("Usability")
48 add
("p").text
("Nit's goal is to be usable by real programmers for real projects")
52 add
("a").attr
("href", "http://en.wikipedia.org/wiki/KISS_principle").text
("KISS principle")
54 add
("li").text
("Script-like language without verbosity nor cryptic statements")
55 add
("li").text
("Painless static types: static typing should help programmers")
56 add
("li").text
("Efficient development, efficient execution, efficient evolution.")
59 add
("h2").text
("Robustness")
60 add
("p").text
("Nit will help you to write bug-free programs")
63 add
("li").text
("Strong static typing")
64 add
("li").text
("No more NullPointerException")
67 add
("h2").text
("Object-Oriented")
68 add
("p").text
("Nit's guideline is to follow the most powerful OO principles")
72 add
("a").attr
("href", "./everything_is_an_object/").text
("Everything is an object")
75 add
("a").attr
("href", "./multiple_inheritance/").text
("Multiple inheritance")
78 add
("a").attr
("href", "./refinement/").text
("Open classes")
81 add
("a").attr
("href", "./virtual_types/").text
("Virtual types")
86 add
("h1").text
("# Getting Started")
87 add
("p").text
("Get Nit from its Git repository:")
89 add_html
("<pre><code>$ git clone http://nitlanguage.org/nit.git</code></pre>")
90 add
("p").text
("Build the compiler (may be long):")
91 add_html
("<pre><code>$ cd nit\n")
92 add_html
("$ make</code></pre>")
93 add
("p").text
("Compile a program:")
94 add_html
("<pre><code>$ bin/nitc examples/hello_world.nit</code></pre>")
95 add
("p").text
("Execute the program:")
96 add_html
("<pre><code>$ ./hello_world</code></pre>")
103 var page
= new NitHomepage
105 page
.write_to_file
("nit.html")