nit.git
9 years agoUpdated the example for pnacl, to make it work with the threading update
Djomanix [Tue, 10 Jun 2014 19:53:34 +0000 (15:53 -0400)]
Updated the example for pnacl, to make it work with the threading update

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>

9 years agoExecution of the nit code on another thread, and redefinition of basic input and...
Djomanix [Tue, 10 Jun 2014 19:52:47 +0000 (15:52 -0400)]
Execution of the nit code on another thread, and redefinition of basic input and output methods

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>

9 years agoMerge: lib/math: Added gcd method on Int.
Jean Privat [Wed, 11 Jun 2014 00:16:16 +0000 (20:16 -0400)]
Merge: lib/math: Added gcd method on Int.

Added GCD method using Stein's algorithm on Int.

Pull-Request: #490
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agolib/math: Added gcd method on Int.
Lucas Bajolet [Tue, 10 Jun 2014 19:41:51 +0000 (15:41 -0400)]
lib/math: Added gcd method on Int.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoMerge: Move sensors and Dalvik related services from mnit to android (and fixes)
Jean Privat [Tue, 10 Jun 2014 19:10:59 +0000 (15:10 -0400)]
Merge: Move sensors and Dalvik related services from mnit to android (and fixes)

Pull-Request: #487
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoMerge: lib/opengles1: add color methods
Jean Privat [Tue, 10 Jun 2014 19:10:56 +0000 (15:10 -0400)]
Merge: lib/opengles1: add color methods

As asked by @privat, should work well with #484.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

Pull-Request: #488
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoMerge: App n tiles
Jean Privat [Tue, 10 Jun 2014 19:10:46 +0000 (15:10 -0400)]
Merge: App n tiles

Introduce tileset, monospace bitmap fonts for mnit

Also some bugfixes

Pull-Request: #484
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoMerge: Ropes integration
Jean Privat [Tue, 10 Jun 2014 17:18:19 +0000 (13:18 -0400)]
Merge: Ropes integration

Reroll for the integration of Ropes in the new API.

Now that the parent relation is gone in RopeNode, subropes may be shared, this simplifies the code and also improves the overall performance of the structure.

The names have been simplified too, I got tired of writing "ForwardDFSRopeCharIterator".

Pull-Request: #480
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agolib/app: move stuff from `App::init` to a new function, `App::sepup`
Jean Privat [Mon, 9 Jun 2014 14:03:20 +0000 (10:03 -0400)]
lib/app: move stuff from `App::init` to a new function, `App::sepup`

Because of the `app` method is a `once new App`, the result of the `new`
is not stored until the `new` returns.
Therefore, suggests to doing stuff during the construction of App might
invoke something that use `app` as a global symbol, thus causing an
infinite recursions.

9 years agoandroid: exit application on destroy request
Alexis Laferrière [Tue, 10 Jun 2014 00:34:47 +0000 (20:34 -0400)]
android: exit application on destroy request

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoandroid: pause on lost focus too
Alexis Laferrière [Tue, 10 Jun 2014 00:34:09 +0000 (20:34 -0400)]
android: pause on lost focus too

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoandroid: extract Dalvik VM related services to their own module
Alexis Laferrière [Fri, 6 Jun 2014 18:36:28 +0000 (14:36 -0400)]
android: extract Dalvik VM related services to their own module

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoMerge: nitg: add support for unary - as an extern method
Jean Privat [Tue, 10 Jun 2014 15:37:31 +0000 (11:37 -0400)]
Merge: nitg: add support for unary - as an extern method

Fixes #483.

TODO: Since "unary -" is an overload of "-", it cannot be declared as a callback from C. We could either extend the importation syntax or import both "-" and "unary -" on import of "-".

Pull-Request: #486
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agolib/opengles1: add color methods
Alexis Laferrière [Tue, 10 Jun 2014 15:28:05 +0000 (11:28 -0400)]
lib/opengles1: add color methods

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agonitg: add support for unary - as an extern method
Alexis Laferrière [Tue, 10 Jun 2014 15:06:03 +0000 (11:06 -0400)]
nitg: add support for unary - as an extern method

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agolib/mnit: introduce `blit_scaled`
Jean Privat [Sat, 7 Jun 2014 03:04:52 +0000 (23:04 -0400)]
lib/mnit: introduce `blit_scaled`

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agolib/mnit: fix an clarify documentation of blit_stretched
Jean Privat [Sat, 7 Jun 2014 03:04:05 +0000 (23:04 -0400)]
lib/mnit: fix an clarify documentation of blit_stretched

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agolib/mnit/antroid: backkey has code 4 on my phone
Jean Privat [Sat, 7 Jun 2014 01:55:47 +0000 (21:55 -0400)]
lib/mnit/antroid: backkey has code 4 on my phone

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agolib/mnit: add tileset to manage tilesets and monospace bitmap fonts
Jean Privat [Sat, 7 Jun 2014 01:50:13 +0000 (21:50 -0400)]
lib/mnit: add tileset to manage tilesets and monospace bitmap fonts

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agolib/standard/string: Added methods prepend, append and insert_at to String interface...
Lucas Bajolet [Mon, 9 Jun 2014 15:40:27 +0000 (11:40 -0400)]
lib/standard/string: Added methods prepend, append and insert_at to String interface and implementations.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/string: SELFTYPE now refers to String instead of its implementations.
Lucas Bajolet [Thu, 5 Jun 2014 18:03:44 +0000 (14:03 -0400)]
lib/standard/string: SELFTYPE now refers to String instead of its implementations.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/text: Added global test on all the API of Text and subclasses.
Lucas Bajolet [Thu, 5 Jun 2014 15:28:17 +0000 (11:28 -0400)]
lib/standard/text: Added global test on all the API of Text and subclasses.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added test for Ropes.
Lucas Bajolet [Thu, 5 Jun 2014 15:25:02 +0000 (11:25 -0400)]
lib/standard/ropes: Added test for Ropes.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Re-activated ropes in standard.
Lucas Bajolet [Thu, 5 Jun 2014 15:15:13 +0000 (11:15 -0400)]
lib/standard/ropes: Re-activated ropes in standard.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Introduced method to_dot on Ropes, used for debugging
Lucas Bajolet [Thu, 5 Jun 2014 15:14:59 +0000 (11:14 -0400)]
lib/standard/ropes: Introduced method to_dot on Ropes, used for debugging

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/streams: Rope now capable of using write_to
Lucas Bajolet [Thu, 5 Jun 2014 14:52:36 +0000 (10:52 -0400)]
lib/streams: Rope now capable of using write_to

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Adapted write for performance with other String representations.
Lucas Bajolet [Mon, 9 Jun 2014 15:58:44 +0000 (11:58 -0400)]
lib/standard/ropes: Adapted write for performance with other String representations.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/file: Preparing substrings method, to be used by write method in an...
Lucas Bajolet [Mon, 9 Jun 2014 15:58:16 +0000 (11:58 -0400)]
lib/standard/file: Preparing substrings method, to be used by write method in an optimized way.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoMerge: Nitdoc bootstrap
Jean Privat [Fri, 6 Jun 2014 19:36:35 +0000 (15:36 -0400)]
Merge: Nitdoc bootstrap

New version of the Nitdoc tool based on Bootstrap.

Changed the display to be more "user manual", included summary and removed many borders and boxes.

Also fixed graph display and missing properties in lists.

Pull-Request: #481
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoMerge: nitlight: fix style.css
Jean Privat [Fri, 6 Jun 2014 19:36:12 +0000 (15:36 -0400)]
Merge: nitlight: fix style.css

A previous commit dropped the inclusion of the css style file in the generated HTML

Pull-Request: #482
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Android.nit using native_app_glue and vibration
Jean Privat [Fri, 6 Jun 2014 19:35:46 +0000 (15:35 -0400)]
Merge: Android.nit using native_app_glue and vibration

* Wrap and use the core features of the NDK's ANativeActivity and native_app_glue's android_app to implement app.nit on Android
* Cleans up a lot a code from mnit_android::android_app
* Intro android::vibration and use it in Dino
* Bonus: Fix mnit apps under Linux

Pull-Request: #479
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agonitdoc: update test on nitdoc
Alexandre Terrasa [Fri, 6 Jun 2014 18:42:50 +0000 (14:42 -0400)]
nitdoc: update test on nitdoc

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agonitdoc: migrate javascript plugins
Alexandre Terrasa [Fri, 6 Jun 2014 16:55:10 +0000 (12:55 -0400)]
nitdoc: migrate javascript plugins

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agonitdoc: nitdoc imports doc group
Alexandre Terrasa [Fri, 6 Jun 2014 07:40:48 +0000 (03:40 -0400)]
nitdoc: nitdoc imports doc group

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agonitdoc: introduce group doc
Alexandre Terrasa [Fri, 6 Jun 2014 07:32:47 +0000 (03:32 -0400)]
nitdoc: introduce group doc

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agonitdoc: generate pages with bootstrap
Alexandre Terrasa [Fri, 6 Jun 2014 07:24:25 +0000 (03:24 -0400)]
nitdoc: generate pages with bootstrap

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agonitdoc: generate templates from model
Alexandre Terrasa [Fri, 6 Jun 2014 07:21:07 +0000 (03:21 -0400)]
nitdoc: generate templates from model

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agonitdoc: migrate templates to bootstrap
Alexandre Terrasa [Fri, 6 Jun 2014 07:20:36 +0000 (03:20 -0400)]
nitdoc: migrate templates to bootstrap

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agonitdoc: introduce bootstrap
Alexandre Terrasa [Fri, 6 Jun 2014 07:20:04 +0000 (03:20 -0400)]
nitdoc: introduce bootstrap

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoexamples: update imports of sensors in mnit_ballz
Alexis Laferrière [Fri, 6 Jun 2014 18:31:00 +0000 (14:31 -0400)]
examples: update imports of sensors in mnit_ballz

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoandroid: move sensors from mnit_android to android
Alexis Laferrière [Fri, 6 Jun 2014 18:30:40 +0000 (14:30 -0400)]
android: move sensors from mnit_android to android

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agonitlight: fix style.css
Jean Privat [Fri, 6 Jun 2014 18:24:05 +0000 (14:24 -0400)]
nitlight: fix style.css

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agoandroid: move the event loop from mnit_android to android
Alexis Laferrière [Fri, 6 Jun 2014 18:22:08 +0000 (14:22 -0400)]
android: move the event loop from mnit_android to android

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agotests: skip mnit in niti as does nitg-g
Alexis Laferrière [Fri, 6 Jun 2014 17:30:50 +0000 (13:30 -0400)]
tests: skip mnit in niti as does nitg-g

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agotests: add mnit_linux to exec skip with other mnit projects
Alexis Laferrière [Fri, 6 Jun 2014 15:26:43 +0000 (11:26 -0400)]
tests: add mnit_linux to exec skip with other mnit projects

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agomodel_utils: extract mclass mproperties
Alexandre Terrasa [Thu, 5 Jun 2014 20:59:14 +0000 (16:59 -0400)]
model_utils: extract mclass mproperties

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agomodel_utils: extract classes in mmodule nesting
Alexandre Terrasa [Thu, 5 Jun 2014 20:58:11 +0000 (16:58 -0400)]
model_utils: extract classes in mmodule nesting

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Debugger clean
Jean Privat [Thu, 5 Jun 2014 19:53:47 +0000 (15:53 -0400)]
Merge: Debugger clean

Simple cosmetic changes to the debugger, clearer, less verbose when executing several commands.

Pull-Request: #478
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoexamples: fix mnit_ballz and shoot for latest android.nit
Alexis Laferrière [Thu, 5 Jun 2014 19:50:01 +0000 (15:50 -0400)]
examples: fix mnit_ballz and shoot for latest android.nit

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agolib/mnit: frame_core is not abstract
Alexis Laferrière [Thu, 5 Jun 2014 19:49:19 +0000 (15:49 -0400)]
lib/mnit: frame_core is not abstract

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agolib/standard/ropes: Adapted chars method and related class to Ropes.
Lucas Bajolet [Thu, 5 Jun 2014 14:44:28 +0000 (10:44 -0400)]
lib/standard/ropes: Adapted chars method and related class to Ropes.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added backwards equivalents of previously defined iterators.
Lucas Bajolet [Thu, 5 Jun 2014 14:43:00 +0000 (10:43 -0400)]
lib/standard/ropes: Added backwards equivalents of previously defined iterators.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Adapted output to Ropes.
Lucas Bajolet [Thu, 5 Jun 2014 14:40:29 +0000 (10:40 -0400)]
lib/standard/ropes: Adapted output to Ropes.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Adapted to_cstring for Ropes.
Lucas Bajolet [Thu, 5 Jun 2014 14:39:23 +0000 (10:39 -0400)]
lib/standard/ropes: Adapted to_cstring for Ropes.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Adapted == method for Ropes since the == method from Collection...
Lucas Bajolet [Thu, 5 Jun 2014 14:37:48 +0000 (10:37 -0400)]
lib/standard/ropes: Adapted == method for Ropes since the == method from Collection uses indexed access => very slow on ropes.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Adapted some services from Text.
Lucas Bajolet [Thu, 5 Jun 2014 14:34:43 +0000 (10:34 -0400)]
lib/standard/ropes: Adapted some services from Text.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added prepend service, alias to insert_at(0).
Lucas Bajolet [Thu, 5 Jun 2014 14:32:03 +0000 (10:32 -0400)]
lib/standard/ropes: Added prepend service, alias to insert_at(0).

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added a final forward iterator on the chars.
Lucas Bajolet [Thu, 5 Jun 2014 14:30:00 +0000 (10:30 -0400)]
lib/standard/ropes: Added a final forward iterator on the chars.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added an iterator on the substrings of a Rope.
Lucas Bajolet [Thu, 5 Jun 2014 14:29:42 +0000 (10:29 -0400)]
lib/standard/ropes: Added an iterator on the substrings of a Rope.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added an iterator on the leaves of the Rope.
Lucas Bajolet [Thu, 5 Jun 2014 14:27:54 +0000 (10:27 -0400)]
lib/standard/ropes: Added an iterator on the leaves of the Rope.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added a forward postfix iterator on Rope.
Lucas Bajolet [Thu, 5 Jun 2014 14:25:57 +0000 (10:25 -0400)]
lib/standard/ropes: Added a forward postfix iterator on Rope.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Preparing introduction of iterators on Rope.
Lucas Bajolet [Thu, 5 Jun 2014 14:24:56 +0000 (10:24 -0400)]
lib/standard/ropes: Preparing introduction of iterators on Rope.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Adapted substring method for Ropes.
Lucas Bajolet [Thu, 5 Jun 2014 14:22:21 +0000 (10:22 -0400)]
lib/standard/ropes: Adapted substring method for Ropes.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoandroid: intro `App::paused` and use it in mnit
Alexis Laferrière [Thu, 5 Jun 2014 15:11:36 +0000 (11:11 -0400)]
android: intro `App::paused` and use it in mnit

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agodino: use vibration on Android
Alexis Laferrière [Tue, 8 Apr 2014 19:53:29 +0000 (15:53 -0400)]
dino: use vibration on Android

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agolib: intro android::vibration
Alexis Laferrière [Mon, 28 Apr 2014 16:22:38 +0000 (12:22 -0400)]
lib: intro android::vibration

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoexamples: update moles to use app.nit
Alexis Laferrière [Mon, 2 Jun 2014 18:47:01 +0000 (14:47 -0400)]
examples: update moles to use app.nit

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoexamples: update dino to use app.nit
Alexis Laferrière [Mon, 2 Jun 2014 18:46:45 +0000 (14:46 -0400)]
examples: update dino to use app.nit

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoexamples: update mnit_simple to android.nit
Alexis Laferrière [Sat, 31 May 2014 19:04:08 +0000 (15:04 -0400)]
examples: update mnit_simple to android.nit

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agomnit/android: update sensors to use new android module
Alexis Laferrière [Wed, 28 May 2014 21:41:05 +0000 (17:41 -0400)]
mnit/android: update sensors to use new android module

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agolib/mnit_android: update to use android::native_app_glue
Alexis Laferrière [Sat, 31 May 2014 19:16:30 +0000 (15:16 -0400)]
lib/mnit_android: update to use android::native_app_glue

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoMerge: QuadTree API introduction
Jean Privat [Wed, 4 Jun 2014 23:10:19 +0000 (19:10 -0400)]
Merge: QuadTree API introduction

QuadTree data structure API used to partition two-dimensional space. Includes a Static and a dynamic implementation, and a simple implementation with an array

Pull-Request: #472
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agolib/standard/ropes: Added the insertion of a string in the rope.
Lucas Bajolet [Wed, 4 Jun 2014 20:54:09 +0000 (16:54 -0400)]
lib/standard/ropes: Added the insertion of a string in the rope.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added append method.
Lucas Bajolet [Wed, 4 Jun 2014 20:51:48 +0000 (16:51 -0400)]
lib/standard/ropes: Added append method.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Search method and classes added.
Lucas Bajolet [Wed, 4 Jun 2014 20:41:48 +0000 (16:41 -0400)]
lib/standard/ropes: Search method and classes added.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added constructors for a Rope
Lucas Bajolet [Wed, 4 Jun 2014 20:39:12 +0000 (16:39 -0400)]
lib/standard/ropes: Added constructors for a Rope

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Bases of RopeString class.
Lucas Bajolet [Wed, 4 Jun 2014 20:38:26 +0000 (16:38 -0400)]
lib/standard/ropes: Bases of RopeString class.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Added basic structure for Ropes.
Lucas Bajolet [Wed, 4 Jun 2014 20:36:40 +0000 (16:36 -0400)]
lib/standard/ropes: Added basic structure for Ropes.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard/ropes: Nodes for Ropes.
Lucas Bajolet [Wed, 4 Jun 2014 20:31:54 +0000 (16:31 -0400)]
lib/standard/ropes: Nodes for Ropes.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard: Removal of all of ropes.nit content for complete rewrite.
Lucas Bajolet [Wed, 4 Jun 2014 20:30:21 +0000 (16:30 -0400)]
lib/standard: Removal of all of ropes.nit content for complete rewrite.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agodebugger: Less noise when printing all available variables in the prompt.
Lucas Bajolet [Wed, 4 Jun 2014 20:02:17 +0000 (16:02 -0400)]
debugger: Less noise when printing all available variables in the prompt.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agodebugger: Use a JSON-like notation for printing a variable's structure.
Lucas Bajolet [Wed, 4 Jun 2014 20:01:25 +0000 (16:01 -0400)]
debugger: Use a JSON-like notation for printing a variable's structure.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoQuadTree API Introduction
Romain Chanoir [Wed, 4 Jun 2014 16:52:18 +0000 (12:52 -0400)]
QuadTree API Introduction

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoGeometry: Introducing BoxedCollection
Romain Chanoir [Wed, 4 Jun 2014 16:51:54 +0000 (12:51 -0400)]
Geometry: Introducing BoxedCollection

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoGeometry: Adds padded on boxes
Romain Chanoir [Wed, 4 Jun 2014 16:51:39 +0000 (12:51 -0400)]
Geometry: Adds padded on boxes

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoMerge: Improve mdoc & markdown
Jean Privat [Tue, 3 Jun 2014 20:37:29 +0000 (16:37 -0400)]
Merge: Improve mdoc & markdown

Various small improvement on the mdoc and markdown side

more important stuff in no particular order:
* MDoc::original_mentity gives context
* README documents mgroups
* markdown need 4 spaces (not 5) for code-block and trims them
* most parts of test_markdown are refreshed

See examples in http://nitlanguage.org/code/test-markdown.html ; it just lists entities in an <h?> tag followed by its documentation

Pull-Request: #477
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Typing gets its context from the model, not the AST
Jean Privat [Tue, 3 Jun 2014 18:56:40 +0000 (14:56 -0400)]
Merge: Typing gets its context from the model, not the AST

This replace some usage of AST nodes with model entities in the signature of some services in modelbuilder and typing.

This simplifies the clients that can now think less about the AST.
But the main objective is to permit, in some reasonable future, to feed arbitrary piece of code to the phase system.

Eg. of concrete future use: safe and clean analysis of pieces of code in documentation.

Pull-Request: #476
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agomodelbuilder: considers that mentities outside the modelbuilder are safe
Jean Privat [Tue, 3 Jun 2014 13:09:56 +0000 (09:09 -0400)]
modelbuilder: considers that mentities outside the modelbuilder are safe

When playing with injected code, a specific modelbuilder should only bother
to recursively build its knowledge

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agotyping: TypeVisitor need mmodule and mpropdef, not aclassdef
Jean Privat [Tue, 3 Jun 2014 12:42:56 +0000 (08:42 -0400)]
typing: TypeVisitor need mmodule and mpropdef, not aclassdef

This will help to analyze code with a injected context

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agomodelize_property: remove usage of `nclassdef`
Jean Privat [Mon, 2 Jun 2014 19:21:49 +0000 (15:21 -0400)]
modelize_property: remove usage of `nclassdef`

nclassdef are less needed, so just not use them when possible.

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agomodelbuilder: `resolve_mtype` require a MClassDef instead of a AClassdef
Jean Privat [Mon, 2 Jun 2014 19:09:57 +0000 (15:09 -0400)]
modelbuilder: `resolve_mtype` require a MClassDef instead of a AClassdef

This also simplify some the clients.

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agotyping: promote `TV::mmodule` and `TV::anchor` to attributes
Jean Privat [Mon, 2 Jun 2014 18:43:24 +0000 (14:43 -0400)]
typing: promote `TV::mmodule` and `TV::anchor` to attributes

Also teach function to use them instead going trough `nclassdef`

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agotests: update test_markdown
Jean Privat [Tue, 3 Jun 2014 15:47:10 +0000 (11:47 -0400)]
tests: update test_markdown

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agotest_markdown: refine href in MEntities to match the generated HTML
Jean Privat [Tue, 3 Jun 2014 14:34:01 +0000 (10:34 -0400)]
test_markdown: refine href in MEntities to match the generated HTML

I am not sure this is the way to go ; maybe, a better API could be
to have to kind of double dispatch between the Higliter and the MEntity
so that a specific highliting behavior could be done by creating a subclass
of HighlightVisitor.

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agotest_markdown: --full also document projects and groups
Jean Privat [Tue, 3 Jun 2014 14:03:38 +0000 (10:03 -0400)]
test_markdown: --full also document projects and groups

Currently, there is no way to document projects, but groups have the new
`README` feature

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agotest_markdown: rewrite core method
Jean Privat [Tue, 3 Jun 2014 14:02:22 +0000 (10:02 -0400)]
test_markdown: rewrite core method

Because used services are in the model

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agotest_markdown: use more css and js from highlight
Jean Privat [Tue, 3 Jun 2014 14:01:54 +0000 (10:01 -0400)]
test_markdown: use more css and js from highlight

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agohighlight: do not add html classes to unresolved local variables
Jean Privat [Tue, 3 Jun 2014 13:47:59 +0000 (09:47 -0400)]
highlight: do not add html classes to unresolved local variables

Eg. this avoid highlighting to only highlight the fist occurrence of `x`
in the following AST if no semantic analysis is run

~~~
var x = 5
print x
~~~

Now, either none, or both `x` are identified as variables according to how
mush semantic analysis is performed.

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agohighlight: factorizes css and js requirements
Jean Privat [Tue, 3 Jun 2014 13:06:10 +0000 (09:06 -0400)]
highlight: factorizes css and js requirements

Signed-off-by: Jean Privat <jean@pryen.org>

9 years agohighlight: "display: block" and "line" only make sense in <pre> tags
Jean Privat [Tue, 3 Jun 2014 13:05:21 +0000 (09:05 -0400)]
highlight: "display: block" and "line" only make sense in <pre> tags

Signed-off-by: Jean Privat <jean@pryen.org>