examples: annotate examples
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 26 Sep 2017 23:23:08 +0000 (19:23 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 28 Nov 2017 20:03:28 +0000 (15:03 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

82 files changed:
contrib/jwrapper/examples/java_api/api_user.nit
contrib/jwrapper/examples/queue/user_test.nit
contrib/nitcc/examples/calc.nit
contrib/nitcc/examples/minilang.nit
contrib/shibuqam/examples/reloadgame.nit
contrib/shibuqam/examples/shibuqamoauth.nit
contrib/wiringPi/examples/blink.nit
contrib/wiringPi/examples/read.nit
contrib/wiringPi/examples/shift.nit
examples/circular_list.nit
examples/fibonacci.nit
examples/int_stack.nit
examples/procedural_array.nit
lib/actors/examples/agent_simulation/agent_simulation.nit
lib/actors/examples/agent_simulation/simple_simulation.nit
lib/actors/examples/chameneos-redux/chameneosredux.nit
lib/actors/examples/fannkuchredux/fannkuchredux.nit
lib/actors/examples/mandelbrot/mandelbrot.nit
lib/actors/examples/simple/simple.nit
lib/actors/examples/thread-ring/thread_ring.nit
lib/ai/examples/puzzle.nit
lib/ai/examples/queens.nit
lib/android/examples/src/ui_test.nit
lib/app/examples/http_request_example.nit
lib/app/examples/ui_example.nit
lib/bcm2835/examples/blink.nit
lib/bcm2835/examples/input.nit
lib/cocoa/examples/cocoa_extern_types.nit
lib/cocoa/examples/cocoa_message_box.nit
lib/cocoa/examples/hello_cocoa.nit
lib/crapto/examples/repeating_key_xor_solve.nit
lib/curl/examples/curl_http.nit
lib/dom/examples/checker.nit
lib/dot/examples/clusters.nit
lib/dot/examples/hello.nit
lib/dot/examples/undirected_clusters.nit
lib/gamnit/examples/fonts_showcase/src/fonts_showcase.nit
lib/gamnit/examples/template/src/template.nit
lib/gamnit/examples/triangle/src/portable_triangle.nit
lib/gamnit/examples/triangle/src/standalone_triangle.nit
lib/gettext/examples/langannot.nit
lib/glesv2/examples/opengles2_hello_triangle.nit
lib/html/examples/html_page.nit
lib/ios/examples/hello_ios.nit
lib/mpi/examples/src/mpi_simple.nit
lib/nitcorn/examples/src/htcpcp_server.nit
lib/nitcorn/examples/src/nitcorn_hello_world.nit
lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit
lib/nitcorn/examples/src/restful_annot.nit
lib/nitcorn/examples/src/simple_file_server.nit
lib/nitcorn/examples/src/test_restful_annot.nit
lib/pnacl/examples/converter/converter.nit
lib/popcorn/examples/angular/example_angular.nit
lib/popcorn/examples/handlers/example_post_handler.nit
lib/popcorn/examples/handlers/example_query_string.nit
lib/popcorn/examples/hello_world/example_hello.nit
lib/popcorn/examples/middlewares/example_advanced_logger.nit
lib/popcorn/examples/middlewares/example_html_error_handler.nit
lib/popcorn/examples/middlewares/example_simple_logger.nit
lib/popcorn/examples/mongodb/example_mongodb.nit
lib/popcorn/examples/routing/example_glob_route.nit
lib/popcorn/examples/routing/example_param_route.nit
lib/popcorn/examples/routing/example_router.nit
lib/popcorn/examples/sessions/example_session.nit
lib/popcorn/examples/static_files/example_static.nit
lib/popcorn/examples/static_files/example_static_default.nit
lib/popcorn/examples/static_files/example_static_multiple.nit
lib/popcorn/examples/templates/example_templates.nit
lib/privileges/examples/drop_privileges.nit
lib/pthreads/examples/concurrent_array_and_barrier.nit
lib/pthreads/examples/jointask_example.nit
lib/pthreads/examples/threaded_example.nit
lib/pthreads/examples/threadpool_example.nit
lib/sdl2/examples/minimal/src/minimal.nit
lib/serialization/examples/custom_serialization.nit
lib/template/examples/tmpl_composer.nit
lib/vsm/.vsm.nit.swn [new file with mode: 0644]
lib/websocket/examples/websocket_server.nit
src/examples/get_mclasses.nit
src/examples/nitlight_as_a_service.nit
src/examples/nitwebcrawl.nit
src/examples/test_loader.nit

index a06bf95..f313c40 100644 (file)
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import java_api
+import java_api is example
 
 # Get a Java string
 var str = java_lang_integer_to_string_int(5678)
 
 # Get a Java string
 var str = java_lang_integer_to_string_int(5678)
index 882a4d4..c963dc2 100644 (file)
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module user_test is example
+
 import queue
 
 var queue = new JavaQueue
 import queue
 
 var queue = new JavaQueue
index d444f2c..924fab4 100644 (file)
@@ -14,7 +14,7 @@
 
 # Example of a calculation used nitcc
 # see `calc.sablecc` for the grammar
 
 # Example of a calculation used nitcc
 # see `calc.sablecc` for the grammar
-module calc
+module calc is example
 
 # Reuse the test program to simplify the code
 import calc_test_parser
 
 # Reuse the test program to simplify the code
 import calc_test_parser
index 29ea62e..3d587b3 100644 (file)
@@ -1,3 +1,5 @@
+module minilang is example
+
 import minilang_test_parser
 
 # An naive recursive stack-based interpreter of the minilang language.
 import minilang_test_parser
 
 # An naive recursive stack-based interpreter of the minilang language.
index 24eecf5..6fc3169 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # Example that uses `shibuqam` to authenticate users and count the number of time they reload.
 # limitations under the License.
 
 # Example that uses `shibuqam` to authenticate users and count the number of time they reload.
-module reloadgame
+module reloadgame is example
 
 import popcorn
 import counter
 
 import popcorn
 import counter
index 326f0bf..ae971c3 100644 (file)
 # * no `client_id`: because we do not want to code a db of clients. The `redirect_uri` can be seen as a simple client_id. We have also no way to present the client to the user since we do not control the authorization page of shibboleth since is done by the reverse proxy.
 # * no `scope` and no `authorisation_code` since since there is nothing to access. We just get minimal information after the successful shibboleth login. Thus we have nothing more to authorise once the user is authenticated.
 # * no `client_secret`: the user information are already public. There is no need to make the code more complex to protect public information.
 # * no `client_id`: because we do not want to code a db of clients. The `redirect_uri` can be seen as a simple client_id. We have also no way to present the client to the user since we do not control the authorization page of shibboleth since is done by the reverse proxy.
 # * no `scope` and no `authorisation_code` since since there is nothing to access. We just get minimal information after the successful shibboleth login. Thus we have nothing more to authorise once the user is authenticated.
 # * no `client_secret`: the user information are already public. There is no need to make the code more complex to protect public information.
-module shibuqamoauth
+module shibuqamoauth is example
 
 import popcorn
 import popcorn::pop_json
 
 import popcorn
 import popcorn::pop_json
index b14ded6..399f4f6 100644 (file)
@@ -13,6 +13,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
+module blink is example
+
 import wiringPi
 
 if args.length != 1 then
 import wiringPi
 
 if args.length != 1 then
index 1ea366f..568b2fb 100644 (file)
@@ -13,6 +13,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
+module read is example
+
 import wiringPi
 
 if args.length != 1 then
 import wiringPi
 
 if args.length != 1 then
index 4038d28..abb474f 100644 (file)
@@ -13,6 +13,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
+module wiringPi is example
+
 import wiringPi
 
 if args.is_empty or args.length > 2 then
 import wiringPi
 
 if args.is_empty or args.length > 2 then
index 2d1df4a..41d2e05 100644 (file)
@@ -14,7 +14,7 @@
 
 # Example of an implementation of circular lists
 # This example shows the usage of generics and somewhat a specialisation of collections.
 
 # Example of an implementation of circular lists
 # This example shows the usage of generics and somewhat a specialisation of collections.
-module circular_list
+module circular_list is example
 
 # Sequences of elements implemented with a double-linked circular list
 class CircularList[E]
 
 # Sequences of elements implemented with a double-linked circular list
 class CircularList[E]
index 66cbfb0..50b93be 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Simple example of refinement where a method is added to the integer class.
 # limitations under the License.
 
 # Simple example of refinement where a method is added to the integer class.
-module fibonacci
+module fibonacci is example
 
 redef class Int
        # Calculate the self-th element of the fibonacci sequence.
 
 redef class Int
        # Calculate the self-th element of the fibonacci sequence.
index eb2d9b3..1de6752 100644 (file)
@@ -15,7 +15,7 @@
 # An example that defines and uses stacks of integers.
 # The implementation is done with a simple linked list.
 # It features: free constructors, nullable types and some adaptive typing.
 # An example that defines and uses stacks of integers.
 # The implementation is done with a simple linked list.
 # It features: free constructors, nullable types and some adaptive typing.
-module int_stack
+module int_stack is example
 
 # A stack of integer implemented by a simple linked list.
 # Note that this is only a toy class since a real linked list will gain to use
 
 # A stack of integer implemented by a simple linked list.
 # Note that this is only a toy class since a real linked list will gain to use
index 5f88218..e7f9ce3 100644 (file)
@@ -16,7 +16,7 @@
 
 # Example of a procedural program (without explicit class definition).
 # This program manipulates arrays of integers.
 
 # Example of a procedural program (without explicit class definition).
 # This program manipulates arrays of integers.
-module procedural_array
+module procedural_array is example
 
 # The sum of the elements of `a'.
 # Uses a 'for' control structure.
 
 # The sum of the elements of `a'.
 # Uses a 'for' control structure.
index 35fe57c..e4e08cb 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # a "Framework" to make Multi-Agent Simulations in Nit
 # limitations under the License.
 
 # a "Framework" to make Multi-Agent Simulations in Nit
-module agent_simulation is no_warning("missing-doc")
+module agent_simulation is example, no_warning("missing-doc")
 
 import actors
 
 
 import actors
 
index d8be6c6..ea08535 100644 (file)
@@ -17,7 +17,7 @@
 # The steps consist of each agent greeting each other, and
 # waiting for every other agent to respond before notifying
 # to the `ClockAgent` that they finished their step.
 # The steps consist of each agent greeting each other, and
 # waiting for every other agent to respond before notifying
 # to the `ClockAgent` that they finished their step.
-module simple_simulation
+module simple_simulation is example
 
 import agent_simulation
 
 
 import agent_simulation
 
index 60361a8..4b8ba9f 100644 (file)
@@ -17,7 +17,7 @@
 #
 # Complete description of the chameneos-redux :
 # https://benchmarksgame.alioth.debian.org/u64q/chameneosredux-description.html#chameneosredux
 #
 # Complete description of the chameneos-redux :
 # https://benchmarksgame.alioth.debian.org/u64q/chameneosredux-description.html#chameneosredux
-module chameneosredux is no_warning("missing-doc")
+module chameneosredux is example, no_warning("missing-doc")
 
 import actors
 
 
 import actors
 
index 3b24800..42c251c 100644 (file)
@@ -17,7 +17,7 @@
 #
 # Complete description of the fannkuch-redux :
 # https://benchmarksgame.alioth.debian.org/u64q/fannkuchredux-description.html#fannkuchredux
 #
 # Complete description of the fannkuch-redux :
 # https://benchmarksgame.alioth.debian.org/u64q/fannkuchredux-description.html#fannkuchredux
-module fannkuchredux is no_warning("missing-doc")
+module fannkuchredux is example, no_warning("missing-doc")
 
 import actors
 
 
 import actors
 
index e04d4ec..f756970 100644 (file)
@@ -17,7 +17,7 @@
 #
 # Complete description of mandelbrot :
 # https://benchmarksgame.alioth.debian.org/u64q/mandelbrot-description.html#mandelbrot
 #
 # Complete description of mandelbrot :
 # https://benchmarksgame.alioth.debian.org/u64q/mandelbrot-description.html#mandelbrot
-module mandelbrot is no_warning("missing-doc")
+module mandelbrot is example, no_warning("missing-doc")
 
 import actors
 
 
 import actors
 
index 8c98b40..7788240 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # A very simple example of the actor model
 # limitations under the License.
 
 # A very simple example of the actor model
-module simple
+module simple is example
 
 import actors
 
 
 import actors
 
index 18da93a..3c227b4 100644 (file)
@@ -17,7 +17,7 @@
 #
 # Complete description of the thread-ring :
 # http://benchmarksgame.alioth.debian.org/u64q/threadring-description.html#threadring
 #
 # Complete description of the thread-ring :
 # http://benchmarksgame.alioth.debian.org/u64q/threadring-description.html#threadring
-module thread_ring
+module thread_ring is example
 
 import actors
 
 
 import actors
 
index 0583035..400af03 100644 (file)
@@ -41,6 +41,8 @@
 #
 # The shortest plan, in two steps, is to move *up* the tile under the hole (e),
 # then to move *left* the tile after the hole (h).
 #
 # The shortest plan, in two steps, is to move *up* the tile under the hole (e),
 # then to move *left* the tile after the hole (h).
+module puzzle is example
+
 import ai::search
 
 # The state (`S`) is a square grid, modeled as a one-dimensional array of Tile.
 import ai::search
 
 # The state (`S`) is a square grid, modeled as a one-dimensional array of Tile.
index 0e86903..2e33ff6 100644 (file)
@@ -28,7 +28,7 @@
 #
 # This program takes an integer n as argument then display all solutions for the
 # n-queens proglem (ie. on a n*n board).
 #
 # This program takes an integer n as argument then display all solutions for the
 # n-queens proglem (ie. on a n*n board).
-module queens
+module queens is example
 
 import ai::backtrack
 
 
 import ai::backtrack
 
index 4f63a92..c6316ad 100644 (file)
@@ -16,6 +16,7 @@
 
 # Test for app.nit's UI services
 module ui_test is
 
 # Test for app.nit's UI services
 module ui_test is
+       example
        app_name "app.nit UI test"
        app_version(0, 1, git_revision)
        app_namespace "org.nitlanguage.ui_test"
        app_name "app.nit UI test"
        app_version(0, 1, git_revision)
        app_namespace "org.nitlanguage.ui_test"
index 3c61498..a121f6c 100644 (file)
@@ -14,6 +14,7 @@
 
 # Example for the `app::http_request` main service `AsyncHttpRequest`
 module http_request_example is
 
 # Example for the `app::http_request` main service `AsyncHttpRequest`
 module http_request_example is
+       example
        app_name "app.nit HTTP"
        app_namespace "org.nitlanguage.http_example"
        android_api_target 15
        app_name "app.nit HTTP"
        app_namespace "org.nitlanguage.http_example"
        android_api_target 15
index 5d01592..8f4f8f1 100644 (file)
@@ -14,6 +14,7 @@
 
 # User interface example using `app::ui`
 module ui_example is
 
 # User interface example using `app::ui`
 module ui_example is
+       example
        app_name "app.nit UI"
        app_namespace "org.nitlanguage.ui_example"
        android_api_min 21
        app_name "app.nit UI"
        app_namespace "org.nitlanguage.ui_example"
        android_api_min 21
index 60a59aa..3d3bd82 100644 (file)
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module blink
+module blink is example
 
 import bcm2835
 
 
 import bcm2835
 
index 8acff6b..889ba51 100644 (file)
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module input
+module input is example
 
 import bcm2835
 
 
 import bcm2835
 
index 775e6e4..e99f43f 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Test extern classes from the Cocoa framework and extern factories
 # limitations under the License.
 
 # Test extern classes from the Cocoa framework and extern factories
-module cocoa_extern_types
+module cocoa_extern_types is example
 
 import cocoa
 
 
 import cocoa
 
index 4e96768..0f43d9e 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Simple message box using the Cocoa framework
 # limitations under the License.
 
 # Simple message box using the Cocoa framework
-module cocoa_message_box
+module cocoa_message_box is example
 
 import cocoa
 
 
 import cocoa
 
index 960b001..56fc059 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Hello world using the Cocoa framework
 # limitations under the License.
 
 # Hello world using the Cocoa framework
-module hello_cocoa
+module hello_cocoa is example
 
 import cocoa::foundation
 
 
 import cocoa::foundation
 
index f88e2d9..82d5652 100644 (file)
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module repeating_key_xor_solve is example
+
 import base64
 import crapto
 
 import base64
 import crapto
 
index 9eed5b8..e4fdf79 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Example use of the Curl module
 # limitations under the License.
 
 # Example use of the Curl module
-module curl_http
+module curl_http is example
 
 import curl
 
 
 import curl
 
index cc3b341..31fc682 100644 (file)
@@ -9,7 +9,7 @@
 # another product.
 
 # Simple XML validity checker using the `dom` module
 # another product.
 
 # Simple XML validity checker using the `dom` module
-module checker
+module checker is example
 
 import dom
 
 
 import dom
 
index 2361e0d..306ec52 100644 (file)
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 # Example from http://www.graphviz.org/content/cluster
 # limitations under the License.
 
 # Example from http://www.graphviz.org/content/cluster
+module clusters is example
 
 import dot
 
 
 import dot
 
index 645620e..d4cbfcf 100644 (file)
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 # Example from http://www.graphviz.org/content/hello
 # limitations under the License.
 
 # Example from http://www.graphviz.org/content/hello
+module hello is example
 
 import dot
 
 
 import dot
 
index 4b42567..9ef6e53 100644 (file)
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 # Example from http://www.graphviz.org/Gallery/undirected/fdpclust.html
 # limitations under the License.
 
 # Example from http://www.graphviz.org/Gallery/undirected/fdpclust.html
+module undirected_clusters is example
 
 import dot
 
 
 import dot
 
index 10ba0b4..91f3073 100644 (file)
@@ -7,6 +7,7 @@
 
 # Font support showcase
 module fonts_showcase is
 
 # Font support showcase
 module fonts_showcase is
+       example
        app_name "gamnit fonts"
        app_namespace "org.gamnit.fonts_showcase"
        app_version(1, 0, git_revision)
        app_name "gamnit fonts"
        app_namespace "org.gamnit.fonts_showcase"
        app_version(1, 0, git_revision)
index 8bd28fd..29b9618 100644 (file)
@@ -7,6 +7,7 @@
 
 # Template for a 2D gamnit game
 module template is
 
 # Template for a 2D gamnit game
 module template is
+       example
        app_name "gamnit template"
        app_namespace "org.gamnit.template"
        app_version(0, 1, git_revision)
        app_name "gamnit template"
        app_namespace "org.gamnit.template"
        app_version(0, 1, git_revision)
index 21492ad..5c276b3 100644 (file)
@@ -18,6 +18,7 @@
 # * The book OpenGL ES 2.0 Programming Guide
 # * https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c
 module portable_triangle is
 # * The book OpenGL ES 2.0 Programming Guide
 # * https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c
 module portable_triangle is
+       example
        app_name "gamnit Triangle"
        app_namespace "org.nitlanguage.triangle"
        app_version(1, 1, git_revision)
        app_name "gamnit Triangle"
        app_namespace "org.nitlanguage.triangle"
        app_version(1, 1, git_revision)
index 9817d09..a766fb2 100644 (file)
@@ -19,7 +19,7 @@
 # References:
 # * The book OpenGL ES 2.0 Programming Guide
 # * https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c
 # References:
 # * The book OpenGL ES 2.0 Programming Guide
 # * https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c
-module standalone_triangle
+module standalone_triangle is example
 
 import app
 import gamnit::display
 
 import app
 import gamnit::display
index d278893..07cca24 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # Sample module showing the use of the i18n annotation
 # limitations under the License.
 
 # Sample module showing the use of the i18n annotation
-module langannot is i18n
+module langannot is example, i18n
 
 import gettext
 
 
 import gettext
 
index da367cf..f85a1fa 100644 (file)
@@ -18,7 +18,7 @@
 #
 # From the book OpenGL ES 2.0 Programming Guide, see code reference:
 # https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c
 #
 # From the book OpenGL ES 2.0 Programming Guide, see code reference:
 # https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c
-module opengles2_hello_triangle
+module opengles2_hello_triangle is example
 
 import glesv2
 import egl
 
 import glesv2
 import egl
index cf76665..a53f56e 100644 (file)
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module html_page is example
+
 import html
 
 class NitHomepage
 import html
 
 class NitHomepage
index c5d6c8a..c06748e 100644 (file)
@@ -14,6 +14,7 @@
 
 # Simple iOS app with a single label
 module hello_ios is
 
 # Simple iOS app with a single label
 module hello_ios is
+       example
        app_name "Hello iOS"
        app_namespace "nit.app.hello_ios"
        app_version(0, 5, git_revision)
        app_name "Hello iOS"
        app_namespace "nit.app.hello_ios"
        app_version(0, 5, git_revision)
index abe289d..cc61f94 100644 (file)
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module mpi_simple
+module mpi_simple is example
 
 import mpi
 
 
 import mpi
 
index 73177a1..d58dcca 100644 (file)
@@ -17,7 +17,7 @@
 # Hyper Text Coffee Pot Control Protocol
 
 # A server that implements HTCPCP. At the moment there are no additions.
 # Hyper Text Coffee Pot Control Protocol
 
 # A server that implements HTCPCP. At the moment there are no additions.
-module htcpcp_server
+module htcpcp_server is example
 
 import nitcorn
 
 
 import nitcorn
 
index 9eb1662..adcebd2 100644 (file)
@@ -19,7 +19,7 @@
 # The main page, `index.html`, is served dynamicly with `MyAction`.
 # The rest of the Web site fetches files from the local directory
 # `www/hello_world/`.
 # The main page, `index.html`, is served dynamicly with `MyAction`.
 # The rest of the Web site fetches files from the local directory
 # `www/hello_world/`.
-module nitcorn_hello_world
+module nitcorn_hello_world is example
 
 import nitcorn
 
 
 import nitcorn
 
index 19e02fb..25e1819 100644 (file)
@@ -15,6 +15,7 @@
 # limitations under the License.
 
 # Minimal example using a `ProxyAction`
 # limitations under the License.
 
 # Minimal example using a `ProxyAction`
+module nitcorn_reverse_proxy is example
 
 import nitcorn::proxy
 
 
 import nitcorn::proxy
 
index 7b8a407..8a7a225 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # Example for the `restful` annotation documented at `lib/nitcorn/restful.nit`
 # limitations under the License.
 
 # Example for the `restful` annotation documented at `lib/nitcorn/restful.nit`
-module restful_annot
+module restful_annot is example
 
 import nitcorn::restful
 import nitcorn::pthreads
 
 import nitcorn::restful
 import nitcorn::pthreads
index 6613349..b0753fe 100644 (file)
@@ -18,7 +18,7 @@
 #
 # To be safe, it is recommended to run this program with its own username:
 # `sudo file_server -u nitcorn:www`
 #
 # To be safe, it is recommended to run this program with its own username:
 # `sudo file_server -u nitcorn:www`
-module simple_file_server
+module simple_file_server is example
 
 import nitcorn
 import privileges
 
 import nitcorn
 import privileges
index 8828162..850cce5 100644 (file)
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module test_restful_annot is example
+
 import nitcorn::restful_annot
 
 import pthreads
 import nitcorn::restful_annot
 
 import pthreads
index 69966bd..cda360e 100644 (file)
@@ -21,7 +21,7 @@
 # Creates a converter and initializes it
 # Finally checks for dictionaries
 
 # Creates a converter and initializes it
 # Finally checks for dictionaries
 
-import pnacl
+import pnacl is example
 
 class Converter
        super PnaclApp
 
 class Converter
        super PnaclApp
index e229a8c..0da9194 100644 (file)
@@ -14,6 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# This is an example of how to use angular.js with popcorn
+module example_angular is example
+
 import popcorn
 import popcorn::pop_json
 
 import popcorn
 import popcorn::pop_json
 
index 826c165..d2eb6d3 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_post_handler is example
+
 import popcorn
 import template
 
 import popcorn
 import template
 
index e8c6187..0af793c 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_query_string is example
+
 import popcorn
 import template
 
 import popcorn
 import template
 
index fc9f3e5..46120bf 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_hello is example
+
 import popcorn
 
 class HelloHandler
 import popcorn
 
 class HelloHandler
index a8ad514..d77725f 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_advanced_logger is example
+
 import popcorn
 import realtime
 
 import popcorn
 import realtime
 
index 5bd399c..d220075 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_html_error_handler is example
+
 import popcorn
 import template
 
 import popcorn
 import template
 
index 73aff4f..354a992 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_simple_logger is example
+
 import popcorn
 
 class SimpleLoggerHandler
 import popcorn
 
 class SimpleLoggerHandler
index 4f89f5b..b7de4fe 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_mongodb is example
+
 import popcorn
 import mongodb
 import template
 import popcorn
 import mongodb
 import template
index b33caec..2704358 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_glob_route is example
+
 import popcorn
 
 class UserItem
 import popcorn
 
 class UserItem
index f536771..c4b4b3e 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_param_route is example
+
 import popcorn
 
 class UserHome
 import popcorn
 
 class UserHome
index facce99..4027c39 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_router is example
+
 import popcorn
 
 class AppHome
 import popcorn
 
 class AppHome
index be79fb1..7bf0a82 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_session is example
+
 import popcorn
 
 redef class Session
 import popcorn
 
 redef class Session
index c3da6d0..f44a4c0 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_static is example
+
 import popcorn
 
 var app = new App
 import popcorn
 
 var app = new App
index 6aa5b34..8a7af54 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_static_default is example
+
 import popcorn
 
 var app = new App
 import popcorn
 
 var app = new App
index 1c730c6..6f925e1 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_static_multiple is example
+
 import popcorn
 
 var app = new App
 import popcorn
 
 var app = new App
index bddd3ed..194019a 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module example_templates is example
+
 import popcorn
 import popcorn::pop_templates
 
 import popcorn
 import popcorn::pop_templates
 
index a35ca17..016b8da 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Example using the privileges module to drop privileges from root
 # limitations under the License.
 
 # Example using the privileges module to drop privileges from root
-module drop_privileges
+module drop_privileges is example
 
 import privileges
 
 
 import privileges
 
index 750f976..f32e6c1 100644 (file)
@@ -18,7 +18,7 @@
 #
 # 20 threads share an array and a barrier. They each insert 1000 strings into
 # the array and wait at a barrier before finishing.
 #
 # 20 threads share an array and a barrier. They each insert 1000 strings into
 # the array and wait at a barrier before finishing.
-module concurrent_array_and_barrier
+module concurrent_array_and_barrier is example
 
 import pthreads::concurrent_collections
 
 
 import pthreads::concurrent_collections
 
index 3d12f6f..b2dd369 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # Simple example of joinable task using threadpool
 # limitations under the License.
 
 # Simple example of joinable task using threadpool
-module jointask_example
+module jointask_example is example
 
 import threadpool
 
 
 import threadpool
 
index fb0609b..66b2076 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # test for threaded annotation
 # limitations under the License.
 
 # test for threaded annotation
-module threaded_example
+module threaded_example is example
 
 import pthreads
 
 
 import pthreads
 
index fec1ae2..6647386 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # Simple example using threadpool
 # limitations under the License.
 
 # Simple example using threadpool
-module threadpool_example
+module threadpool_example is example
 
 import threadpool
 
 
 import threadpool
 
index 7666c10..534f86a 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # An example to test and demonstrate the `sdl2` lib with `image` and `events`
 # limitations under the License.
 
 # An example to test and demonstrate the `sdl2` lib with `image` and `events`
-module minimal
+module minimal is example
 
 import sdl2::all
 
 
 import sdl2::all
 
index 083bcfb..ef95f91 100644 (file)
@@ -29,7 +29,7 @@
 #
 # The advantage of the approach is that it is done programmatically so can be adapted to real complex use cases.
 # Basically, this is half-way between the full automatic serialization and the full manual serialisation.
 #
 # The advantage of the approach is that it is done programmatically so can be adapted to real complex use cases.
 # Basically, this is half-way between the full automatic serialization and the full manual serialisation.
-module custom_serialization
+module custom_serialization is example
 
 import serialization
 import json::serialization_write
 
 import serialization
 import json::serialization_write
index 3150c5f..c95fc62 100644 (file)
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+module tmpl_composer is example
+
 import template
 
 ### Here, definition of the specific templates
 import template
 
 ### Here, definition of the specific templates
diff --git a/lib/vsm/.vsm.nit.swn b/lib/vsm/.vsm.nit.swn
new file mode 100644 (file)
index 0000000..4faa9eb
Binary files /dev/null and b/lib/vsm/.vsm.nit.swn differ
index 8b4584c..6b9e3b8 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Sample module for a minimal chat server using Websockets on port 8088
 # limitations under the License.
 
 # Sample module for a minimal chat server using Websockets on port 8088
-module websocket_server
+module websocket_server is example
 
 import websocket
 
 
 import websocket
 
index 79e22ba..d1887ba 100644 (file)
@@ -19,7 +19,7 @@
 # ~~~raw
 # get_mclasses ../../lib core::Array Array care::Arrow Fail
 # ~~~
 # ~~~raw
 # get_mclasses ../../lib core::Array Array care::Arrow Fail
 # ~~~
-module get_mclasses
+module get_mclasses is example
 
 import parser_util
 import modelbuilder
 
 import parser_util
 import modelbuilder
index 103a3c8..88e1b94 100644 (file)
@@ -15,7 +15,7 @@
 # This is an example of a client of the frontend without command-line processing.
 #
 # It offers a simple nitcorn web server that offers a textarea and nitpick and nitlignt it.
 # This is an example of a client of the frontend without command-line processing.
 #
 # It offers a simple nitcorn web server that offers a textarea and nitpick and nitlignt it.
-module nitlight_as_a_service
+module nitlight_as_a_service is example
 
 import frontend
 import highlight
 
 import frontend
 import highlight
index 8199c16..767e64c 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # Crawler on the nitweb web API
 # limitations under the License.
 
 # Crawler on the nitweb web API
-module nitwebcrawl
+module nitwebcrawl is example
 
 import json::static
 
 
 import json::static
 
index e81a0af..2f7e3cf 100644 (file)
@@ -15,7 +15,7 @@
 # Sample program that scan and load things.
 #
 # It shows the difference betwenn the various services of the `loader`.
 # Sample program that scan and load things.
 #
 # It shows the difference betwenn the various services of the `loader`.
-module test_loader
+module test_loader is example
 
 import loader
 
 
 import loader