nit.git
7 years agolib/popcorn: introduce Angular.js example
Alexandre Terrasa [Mon, 16 May 2016 21:14:12 +0000 (17:14 -0400)]
lib/popcorn: introduce Angular.js example

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

7 years agolib/popcorn: introduce mongodb example
Alexandre Terrasa [Mon, 16 May 2016 22:50:59 +0000 (18:50 -0400)]
lib/popcorn: introduce mongodb example

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

7 years agolib/popcorn: route tests
Alexandre Terrasa [Mon, 16 May 2016 19:05:08 +0000 (15:05 -0400)]
lib/popcorn: route tests

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

7 years agolib/popcorn: router tests
Alexandre Terrasa [Mon, 16 May 2016 19:04:53 +0000 (15:04 -0400)]
lib/popcorn: router tests

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

7 years agolib/popcorn: introduce middleware examples
Alexandre Terrasa [Mon, 16 May 2016 19:04:12 +0000 (15:04 -0400)]
lib/popcorn: introduce middleware examples

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

7 years agolib/popcorn: introduce session example
Alexandre Terrasa [Mon, 16 May 2016 19:03:50 +0000 (15:03 -0400)]
lib/popcorn: introduce session example

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

7 years agolib/popcorn: introduce handler examples
Alexandre Terrasa [Mon, 16 May 2016 19:03:15 +0000 (15:03 -0400)]
lib/popcorn: introduce handler examples

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

7 years agolib/popcorn: introduce static_files examples
Alexandre Terrasa [Mon, 16 May 2016 19:01:31 +0000 (15:01 -0400)]
lib/popcorn: introduce static_files examples

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

7 years agolib/popcorn: introduce routing examples
Alexandre Terrasa [Mon, 16 May 2016 19:00:31 +0000 (15:00 -0400)]
lib/popcorn: introduce routing examples

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

7 years agolib/popcorn: introduce hello example
Alexandre Terrasa [Mon, 16 May 2016 18:59:10 +0000 (14:59 -0400)]
lib/popcorn: introduce hello example

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

7 years agolib/popcorn: introduce base test features
Alexandre Terrasa [Mon, 16 May 2016 18:58:34 +0000 (14:58 -0400)]
lib/popcorn: introduce base test features

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

7 years agolib/popcorn: introduce App implementation
Alexandre Terrasa [Mon, 16 May 2016 15:47:32 +0000 (11:47 -0400)]
lib/popcorn: introduce App implementation

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

7 years agolib/popcorn: introduce default middlewares
Alexandre Terrasa [Mon, 16 May 2016 15:45:15 +0000 (11:45 -0400)]
lib/popcorn: introduce default middlewares

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

7 years agolib/nitcorn: make session writable
Alexandre Terrasa [Mon, 16 May 2016 15:44:51 +0000 (11:44 -0400)]
lib/nitcorn: make session writable

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

7 years agolib/popcorn: introduce pop_handlers
Alexandre Terrasa [Mon, 16 May 2016 15:44:26 +0000 (11:44 -0400)]
lib/popcorn: introduce pop_handlers

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

7 years agolib/nitcorn: make file server "show_directory" an option
Alexandre Terrasa [Mon, 16 May 2016 15:43:36 +0000 (11:43 -0400)]
lib/nitcorn: make file server "show_directory" an option

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

7 years agolib/nitcorn: introduce json media types
Alexandre Terrasa [Mon, 16 May 2016 15:42:58 +0000 (11:42 -0400)]
lib/nitcorn: introduce json media types

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

7 years agolib/popcorn: introduce pop_routes
Alexandre Terrasa [Mon, 16 May 2016 15:40:10 +0000 (11:40 -0400)]
lib/popcorn: introduce pop_routes

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

7 years agolib/nitcorn: redef to_s service on UriPart subclasses
Alexandre Terrasa [Mon, 16 May 2016 15:38:48 +0000 (11:38 -0400)]
lib/nitcorn: redef to_s service on UriPart subclasses

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

7 years agolib/templates: fix typo in macro documentation
Alexandre Terrasa [Mon, 16 May 2016 15:32:54 +0000 (11:32 -0400)]
lib/templates: fix typo in macro documentation

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

7 years ago.gitattributes: ignore trailing whitespaces in lib/popcorn/tests
Alexandre Terrasa [Tue, 17 May 2016 14:57:44 +0000 (10:57 -0400)]
.gitattributes: ignore trailing whitespaces in lib/popcorn/tests

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

7 years agoMerge: doc: Fix a mispelled word in the parser’s README
Jean Privat [Thu, 19 May 2016 15:06:31 +0000 (11:06 -0400)]
Merge: doc: Fix a mispelled word in the parser’s README

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

7 years agoMerge: make the nitcatalog slightly more robust on person variations
Jean Privat [Thu, 19 May 2016 14:56:40 +0000 (10:56 -0400)]
Merge: make the nitcatalog slightly more robust on person variations

The various person-related fields were parsed verbatim.
So a slight change in spaces was enough to differentiate two persons.
Now the canonical person representation is used.

e.g. `Lucas Bajolet<r4pass@hotmail.com>` vs `Lucas Bajolet <r4pass@hotmail.com>
` is now the same person (hint: the change is the space between the `t` and the `<`).

Note that to present the original information,
 names/emails/url are still distinguished.

`Lucas Bajolet <r4pass@hotmail.com>`, `R4pass <r4pass@hotmail.com>
` and `Lucas Bajolet <lucas.bajolet@hotmail.com>
` are still 3 persons.

Pull-Request: #2103

7 years agoMerge: .gitignore: ignore .swo files
Jean Privat [Thu, 19 May 2016 14:56:38 +0000 (10:56 -0400)]
Merge: .gitignore: ignore .swo files

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

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

8 years agoMerge: app.nit: navigate between windows with the back button
Jean Privat [Tue, 17 May 2016 20:17:43 +0000 (16:17 -0400)]
Merge: app.nit: navigate between windows with the back button

This should be the last big feature of _app.nit_ needed for my thesis!

Intro services to navigate between multiple windows of the same app.
Windows are added to a stack and popped back to the visible state on pressing the back key.
This behavior was implemented for Android by intercepting events raised by the "hardware" back key.
iOS offers the same features natively so there is no adaptation needed as of now.
On GNU/Linux with GTK+, a button is added to the window header when there's a window to go back to.

These feature will probably have to be tweaked in the future, but they are enough for the Benilux client app. Notably, the life-cylce of each individual window has to be reconsidered and we will probably need some adaptation on iOS to have a better integration.

This PR also fixes a few bugs. The `EditText` losing focus in a `ListLayout` is fixed by a change to the Android manifest file, and vertical layout should now look better on iOS.

I took the opportunity to add other key events while working on the Android back key support.
These will be useful when migrating games from the old low-level implementation on the NDK to our custom `NitActivity.java`.

Pull-Request: #2100
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>

8 years agoMerge: app.nit: intro `ToggleEvent`
Jean Privat [Tue, 17 May 2016 20:17:38 +0000 (16:17 -0400)]
Merge: app.nit: intro `ToggleEvent`

This PR adds an event when a checkbox is toggled. `ToggleEvent` is similar to the only previously existing event, `ButtonPressEvent`.

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

8 years agoMerge: lib/core: Fix substring issue in `ASCIIFlatString`
Jean Privat [Tue, 17 May 2016 20:17:32 +0000 (16:17 -0400)]
Merge: lib/core: Fix substring issue in `ASCIIFlatString`

A bug in the validation part of `ASCIIFlatString::substring` caused some substrings to be created with a negative length, which could be the cause of various negative side-effects.

In the example added in the substring test, this caused `stdout` to close due to a call to `fwrite` with a negative count, which was in turn converted to unsigned (I suspect this is undefined behaviour), provoking the closure of the stream in the nit part.

Reported by @Morriar
Close #2089

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

8 years agoMerge: modelize: mark properties broken if they are a bad introduction (bad redef)
Jean Privat [Tue, 17 May 2016 20:17:28 +0000 (16:17 -0400)]
Merge: modelize: mark properties broken if they are a bad introduction (bad redef)

Some broken redefinitions of properties caused the modelize phase to crash.

An infrastructure exists to prevent the use of such broken entities: the `is_broken` attributes. But they have to be set and used to be effective.

So this PR sets the `is_broken` flag on some forgotten error paths, then prevents further processing if `is_broken` is set.

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

8 years agoMerge: model: introduce model_json
Jean Privat [Tue, 17 May 2016 20:17:25 +0000 (16:17 -0400)]
Merge: model: introduce model_json

This PR makes all model entities Jsonable when `model_json` is imported.

Not sure if I was supposed to use the serialization process or not in this case? @xymus what do you think?

This is mostly hand picked services chosen to provide a comprehensive model representation usable by other tools like nitdoc, nitx, web tools or else.

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

8 years agomake the nitcatalog slightly more robust on person variations
Jean Privat [Tue, 17 May 2016 20:16:23 +0000 (16:16 -0400)]
make the nitcatalog slightly more robust on person variations

The various person-related fields were parsed verbatim.
So a slight change in spaces was enough to differentiate two persons.
Now the canonical person representation is used.

e.g. `Lucas Bajolet<r4pass@hotmail.com>` vs `Lucas Bajolet <r4pass@hotmail.com>
` is now the same person (hint: the change is the space between the `t` and the `<`).

Note that to present the original information,
 names/emails/url are still distinguished.

`Lucas Bajolet <r4pass@hotmail.com>`, `R4pass <r4pass@hotmail.com>
` and `Lucas Bajolet <lucas.bajolet@hotmail.com>
` are still 3 persons.

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

8 years agomodel: introduce model_json
Alexandre Terrasa [Tue, 17 May 2016 16:03:18 +0000 (12:03 -0400)]
model: introduce model_json

Translates model entites to plain json

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

8 years agomodel_collect: collect modifiers for all MEntities
Alexandre Terrasa [Tue, 17 May 2016 18:22:15 +0000 (14:22 -0400)]
model_collect: collect modifiers for all MEntities

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

8 years ago.gitignore: ignore .swo files
Alexandre Terrasa [Tue, 17 May 2016 15:57:31 +0000 (11:57 -0400)]
.gitignore: ignore .swo files

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

8 years agolib/ios: layouts have different behavior according to the orientation
Alexis Laferrière [Fri, 15 Apr 2016 19:08:31 +0000 (15:08 -0400)]
lib/ios: layouts have different behavior according to the orientation

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

8 years agotnitter & calculator: update app.nit clients
Alexis Laferrière [Tue, 17 May 2016 13:53:33 +0000 (09:53 -0400)]
tnitter & calculator: update app.nit clients

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

8 years agolib/android: fix text input losing focus on selection in a list layout
Alexis Laferrière [Tue, 5 Apr 2016 20:29:07 +0000 (16:29 -0400)]
lib/android: fix text input losing focus on selection in a list layout

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

8 years agolib/android: implement back_button support using the "hardware" back key
Alexis Laferrière [Fri, 18 Mar 2016 20:17:59 +0000 (16:17 -0400)]
lib/android: implement back_button support using the "hardware" back key

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

8 years agolib/android: add onKey* callbacks to Nit_activity
Alexis Laferrière [Wed, 11 Nov 2015 16:47:27 +0000 (11:47 -0500)]
lib/android: add onKey* callbacks to Nit_activity

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

8 years agolib/linux: implement back button
Alexis Laferrière [Fri, 18 Mar 2016 19:12:23 +0000 (15:12 -0400)]
lib/linux: implement back button

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

8 years agolib/app: intro back_button abstraction with navigation for multiple windows
Alexis Laferrière [Fri, 18 Mar 2016 18:50:58 +0000 (14:50 -0400)]
lib/app: intro back_button abstraction with navigation for multiple windows

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

8 years agoMerge: Rubix: Fix package
Jean Privat [Tue, 17 May 2016 15:04:42 +0000 (11:04 -0400)]
Merge: Rubix: Fix package

Wrong email in the package, fixed with this PR

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

8 years agoMerge: nitunit: set the envvar NIT_TESTING
Jean Privat [Tue, 17 May 2016 15:04:37 +0000 (11:04 -0400)]
Merge: nitunit: set the envvar NIT_TESTING

Pull-Request: #2096
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>

8 years agoMerge: Android: select the low-level implementations from other importations
Jean Privat [Tue, 17 May 2016 15:04:34 +0000 (11:04 -0400)]
Merge: Android: select the low-level implementations from other importations

This PR needs some context first: there is two low-level implementations for Nit apps on Android. The oldest is based on C code and `native_app_glue`, it is used by all our game engines. The new one is based on a custom Java class `NitActivity`, it is used to implement `app::ui` and should replace the oldest one when I have time to work on it.

Prior to this PR, importing `android` imported the old C implementation, and you had to import `android::ui` to get the Java implementation.

This PR changes this behavior and uses conditional importations to choose between the two low-level implementations. So importing `android` and `gamnit` uses the old C implementation (now `android::game`) and importing `android` and `app::ui` uses the new Java implementation (`android::nit_activity`).

This allows us to use the simple `nitc src/calculator.nit -m android`, instead of `nitc src/calculator.nit -m ../../lib/android/ui.nit`. And the most important is that the user doesn't have to chose between (or understand) the two low-level implementations.

Pull-Request: #2093
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>

8 years agoMerge: Wrap postgresql #1810
Jean Privat [Tue, 17 May 2016 15:04:29 +0000 (11:04 -0400)]
Merge: Wrap postgresql #1810

Started working on a wrapper for PostgresSQL as per issue: https://github.com/nitlang/nit/issues/1810

So far this wrapper provides basic functionality allowing:

* a connection to be made
* a statement to be executed
* creation of prepared statements
* executions of prepared statements
* connection status functions

according to the [PostgresSQL libpq interface](http://www.postgresql.org/docs/9.5/interactive/libpq.html). It's about equivalent to the `native_sqlite3.nit` class.

Just wondering how much more functionality we want to add and looking for some review on the usage of the FFI and style.

@xymus @privat

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

8 years agolib/linux: implement ToggleEvent
Alexis Laferrière [Tue, 17 May 2016 14:53:51 +0000 (10:53 -0400)]
lib/linux: implement ToggleEvent

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

8 years agolib/ios: implement ToggleEvent
Alexis Laferrière [Wed, 20 Apr 2016 18:22:51 +0000 (14:22 -0400)]
lib/ios: implement ToggleEvent

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

8 years agolib/android: implement ToggleEvent
Alexis Laferrière [Wed, 6 Apr 2016 02:04:20 +0000 (22:04 -0400)]
lib/android: implement ToggleEvent

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

8 years agolib/app: ToogleEvent
Alexis Laferrière [Wed, 6 Apr 2016 02:04:06 +0000 (22:04 -0400)]
lib/app: ToogleEvent

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

8 years agoFix package Rubix
Lucas Bajolet [Tue, 17 May 2016 14:08:01 +0000 (10:08 -0400)]
Fix package Rubix

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

8 years agolib/android: portrait and landscape import the main module
Alexis Laferrière [Tue, 17 May 2016 11:27:10 +0000 (07:27 -0400)]
lib/android: portrait and landscape import the main module

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

8 years agoMerge: Asteronits: fix mobile on-screen controls
Jean Privat [Tue, 17 May 2016 11:20:25 +0000 (07:20 -0400)]
Merge: Asteronits: fix mobile on-screen controls

This is a long overdue update to Asteronits, the on-screen controls for mobiles devices were broken since the inverted Y axis incident. The problem is that a correct Y axis in 3D, when sharing world coordinates with the 2D, doesn't look right in 2D. The origin is at the bottom left of the screen, and positive angles are counter-clockwise. I don't like this representation in 2D, but I don't know to improve it, so let's update the clients of `gamnit::flat` instead!

Pull-Request: #2095
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>

8 years agoMerge: src/nitlight: Updated client to avoid crashes on unparsed modules
Jean Privat [Tue, 17 May 2016 11:20:22 +0000 (07:20 -0400)]
Merge: src/nitlight: Updated client to avoid crashes on unparsed modules

Since the loader has been upgraded, `nitlight` crashed when using the `--full` option since some modules were recognized by the model but left unparsed, causing the program to crash when fetching the `AModule` from `modelbuilder.mmodule2node`.

This PR fixes the issue by rendering only loaded and parsed modules from the importation chain.

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

8 years agonitunit: set the envvar NIT_TESTING
Jean Privat [Tue, 17 May 2016 11:19:49 +0000 (07:19 -0400)]
nitunit: set the envvar NIT_TESTING

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

8 years agoMerge: SQLite: update and simplify wrapper
Jean Privat [Tue, 17 May 2016 01:22:59 +0000 (21:22 -0400)]
Merge: SQLite: update and simplify wrapper

This PR updates the SQLite wrapper so it is easier to understand and maintain, and as a bonus it is now compatible with the interpreter.

The C code and native layer now uses only `NativeString`, and the calls `to_cstring` and `NativeString::to_s` are moved to the Nit code and nity layer. The error code on opening a database is kept on the C side and retrieved only as needed. This removes a lot of callbacks which simplifies the code and makes the module compatible with the interpreter.

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

8 years agoMerge: Admin interface for Benitlux and fixes
Jean Privat [Tue, 17 May 2016 01:22:55 +0000 (21:22 -0400)]
Merge: Admin interface for Benitlux and fixes

This PR adds a RESTful admin interface to the Benitlux server. This interface is used to trigger sending out the daily menu notifications from an external program / cron.

As a fix to the diff showing everything as new on the menu, the server now standardizes the received dates to the format expected by SQLite. There is also a small fix to the library used by the code generated by nitrestful to correctly check for errors.

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

8 years agoMerge: Add quality metrics to the nit catalog
Jean Privat [Tue, 17 May 2016 01:22:52 +0000 (21:22 -0400)]
Merge: Add quality metrics to the nit catalog

Three new metrics:

* number of errors (boo)
* number of warnings (and advices)
* percentage of documentation (with ponderation)

The 3 firsts commits was to make errors&warnings accessible without printing them.

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

8 years agoMerge: JSON: merge 2 services into `serialize_to_json` and isolate from `static`
Jean Privat [Tue, 17 May 2016 01:22:48 +0000 (21:22 -0400)]
Merge: JSON: merge 2 services into `serialize_to_json` and isolate from `static`

The first goal of this PR is to create a simple but customizable service to write Nit objects to JSON (replacing `to_json_string` and `to_plain_json`). It also clarifies how the serialization of a single object can be customized by refining `accept_json_serializer` which allows the same customization of the existing recursive `to_json` but on any `Serializable` objects.

The second goal is to isolate `json::serialization` from `json::static`. This allows to hide the complexity of `static` to clients of `serialization` and will help to deprecate the `static` writing services. After this PR, `serialization` uses really only one service from `static`, `String::to_json` which escapes strings. While `paser_json` uses the new @R4PaSs implementation. The types of `static` didn't add any useful services in the context of the `JsonDeserializer` (they only have writing services) and added both complexity and dependencies to the module.

All of this would make it easy (if there is still interest) to unify all JSON writing APIs and replace the current `Jsonable::to_json` with a single `Serializable::to_json` using the implementation of the new method `serialize_to_json`. And we can update the existing `redef fun to_json` to `redef fun accept_json_serializer`  writing to a stream instead of a string.

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

8 years agolib/android: update import and doc of `sensors`
Alexis Laferrière [Tue, 17 May 2016 00:32:22 +0000 (20:32 -0400)]
lib/android: update import and doc of `sensors`

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

8 years agocontrib/asteronits: fix touch_ui (Mobile on screen controls)
Alexis Laferrière [Fri, 13 May 2016 16:31:53 +0000 (12:31 -0400)]
contrib/asteronits: fix touch_ui (Mobile on screen controls)

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

8 years agolib/sqlite3: update error management to be more simple use only the light FFI
Alexis Laferrière [Mon, 16 May 2016 17:22:00 +0000 (13:22 -0400)]
lib/sqlite3: update error management to be more simple use only the light FFI

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

8 years agolib/sqlite3: use only NativeString in the native layer
Alexis Laferrière [Fri, 8 Apr 2016 12:58:58 +0000 (08:58 -0400)]
lib/sqlite3: use only NativeString in the native layer

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

8 years agolib/android: update README with info on the 2 core implementations
Alexis Laferrière [Fri, 13 May 2016 16:26:24 +0000 (12:26 -0400)]
lib/android: update README with info on the 2 core implementations

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

8 years agocontrib & examples: update Android adaptations to the new entrypoint
Alexis Laferrière [Fri, 13 May 2016 16:07:50 +0000 (12:07 -0400)]
contrib & examples: update Android adaptations to the new entrypoint

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

8 years agolib/android: revamp entrypoint
Alexis Laferrière [Sun, 1 May 2016 19:11:35 +0000 (15:11 -0400)]
lib/android: revamp entrypoint

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

8 years agocontrib/benitlux: intro `BenitluxRESTAction::check_token`
Alexis Laferrière [Wed, 6 Apr 2016 02:17:41 +0000 (22:17 -0400)]
contrib/benitlux: intro `BenitluxRESTAction::check_token`

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

8 years agocontrib/benitlux: intro the admin server interface with daily notification
Alexis Laferrière [Tue, 5 Apr 2016 20:29:28 +0000 (16:29 -0400)]
contrib/benitlux: intro the admin server interface with daily notification

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

8 years agocontrib/benitlux: standardize dates on the server-side
Alexis Laferrière [Wed, 11 May 2016 13:34:19 +0000 (09:34 -0400)]
contrib/benitlux: standardize dates on the server-side

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

8 years agolib/sqlite3: intro `Text::to_sql_date_string`
Alexis Laferrière [Wed, 11 May 2016 13:33:48 +0000 (09:33 -0400)]
lib/sqlite3: intro `Text::to_sql_date_string`

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

8 years agotests: Updated `test_substring` for edge case in `ASCIIFlatString::substring`
Lucas Bajolet [Mon, 16 May 2016 20:01:36 +0000 (16:01 -0400)]
tests: Updated `test_substring` for edge case in `ASCIIFlatString::substring`

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

8 years agolib/core: Fix substring in `ASCIIFlatString`
Lucas Bajolet [Mon, 16 May 2016 19:59:03 +0000 (15:59 -0400)]
lib/core: Fix substring in `ASCIIFlatString`

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

8 years agosrc/nitlight: Updated client to avoid crashes on unparsed modules
Lucas Bajolet [Mon, 16 May 2016 18:41:42 +0000 (14:41 -0400)]
src/nitlight: Updated client to avoid crashes on unparsed modules

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

8 years agostarted working on a wrapper for postgres
itsWill [Sun, 27 Dec 2015 08:27:03 +0000 (09:27 +0100)]
started working on a wrapper for postgres

Signed-off-by: itsWill <guilhermerpmansur@gmail.com>

8 years agolib/nitcorn: fix checking errors after deserialization in nitrestful lib
Alexis Laferrière [Tue, 5 Apr 2016 03:19:06 +0000 (23:19 -0400)]
lib/nitcorn: fix checking errors after deserialization in nitrestful lib

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

8 years agodoc: Fix a mispelled word in the parser’s README
jcbrinfo [Sat, 14 May 2016 15:58:56 +0000 (11:58 -0400)]
doc: Fix a mispelled word in the parser’s README

8 years agoMerge: Some nitunit love
Jean Privat [Sat, 14 May 2016 15:56:13 +0000 (11:56 -0400)]
Merge: Some nitunit love

Two small changes

* nitunit works on directories. e.g. `nitunit lib/ contrib/`
* static errors are shown with precise location.

~~~
test_doc3.nit:17,9--15: Syntax Error: unexpected identifier 'garbage'. To suppress this message, enclose the block with a fence tagged `nitish` or `raw` (see `man nitdoc`). (invalid-block)
#      *garbage*
        ^
~~~

runtime errors are a more complex beast to track. Two solutions:

* pragma to inject line informations in the generated test program. This need to find a syntax for line pragmas and teach the parser to use them
* post-error management that parse error messages and substitute the locations from the the generated program with the original locations in the real source. Doable but more code is needed.

Pull-Request: #2075
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoMerge: CSV Benchmarks
Jean Privat [Sat, 14 May 2016 15:56:12 +0000 (11:56 -0400)]
Merge: CSV Benchmarks

This PR introduces a new benchmark script for CSV parsers.

Are tested here:

* Nit CSV Ad-hoc parser
* Go standard parser
* Java Apache Commons CSV parser
* Python - Pandas
* Python - Standard
* Ruby - Standard

Will upload some measurements later but *spoiler alert* Python - Pandas is the fastest on large files, Ruby is the slowest by far, Java is the second slower with a big margin from the rest.
Go/Nit/Python-Standard are almost equivalent.

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

8 years agoMerge: Add a Dockerfile to build a full image of a Nit install
Jean Privat [Sat, 14 May 2016 15:56:10 +0000 (11:56 -0400)]
Merge: Add a Dockerfile to build a full image of a Nit install

The image is based on Debian stable (jessie) with a lot of packages.
I'm not sure what is the point of such images for the end-users.

My objective was just to test a Nit installation on a fresh, full & reproductible base.

Image will be available in the docker hub: https://hub.docker.com/r/nitlang/nit/

The only tests that fails are:

* ballz_android dino_android shoot_android ui_test test_platform_android: no android
* emscripten_nodejs: no emstripten
* test_neo_args1 test_neo4j test_neo4j_batch: no neo4j
* mpi_simple: bizarre error messages
* simple_file_server: the user is root so 80 can be opened :/
* test_glsl_validation: not installed

nitunit need also to be run

Pull-Request: #2070
Reviewed-by: Jean-Philippe Caissy <jpcaissy@piji.ca>

8 years agomodelize: mark property broken is they are bad introduction
Jean Privat [Sat, 14 May 2016 15:23:21 +0000 (11:23 -0400)]
modelize: mark property broken is they are bad introduction

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

8 years agotests: update *light tests with more popup messages
Jean Privat [Sat, 14 May 2016 02:51:18 +0000 (22:51 -0400)]
tests: update *light tests with more popup messages

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

8 years agotests: update catalog res with quality box
Jean Privat [Sat, 14 May 2016 02:50:48 +0000 (22:50 -0400)]
tests: update catalog res with quality box

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

8 years agoMerge: Rubix cube - Catalog and documentation update
Jean Privat [Sat, 14 May 2016 02:19:43 +0000 (22:19 -0400)]
Merge: Rubix cube - Catalog and documentation update

A .ini file has been added for support in catalog, along with some module documentation for `lib/rubix.nit`

Close #2076.

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

8 years agoMerge: Promote location in MEntity
Jean Privat [Sat, 14 May 2016 02:19:34 +0000 (22:19 -0400)]
Merge: Promote location in MEntity

For some unknown historical reasons, the location was only provided to some specific model entities. By extending it to all entities, this simplify clients that need to process, visit or filter entities.

Location is not nullable for all entities. This is simpler but need some place-holder object for fictive location. ie some location objects that mean "no location".

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

8 years agocatalog: add documentation score
Jean Privat [Sat, 14 May 2016 01:48:00 +0000 (21:48 -0400)]
catalog: add documentation score

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

8 years agocatalog: count errors and warnings for each package
Jean Privat [Sat, 14 May 2016 01:28:47 +0000 (21:28 -0400)]
catalog: count errors and warnings for each package

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

8 years agotoolcontext: also register messages to the source-files
Jean Privat [Sat, 14 May 2016 01:27:47 +0000 (21:27 -0400)]
toolcontext: also register messages to the source-files

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

8 years agotoolcontext: attach messages to location, even if quieted
Jean Privat [Sat, 14 May 2016 01:26:59 +0000 (21:26 -0400)]
toolcontext: attach messages to location, even if quieted

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

8 years agotoolcontext: add Message::level
Jean Privat [Sat, 14 May 2016 01:26:08 +0000 (21:26 -0400)]
toolcontext: add Message::level

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

8 years agonitc/neo.nit: adapt code to promoted locations
Jean Privat [Fri, 13 May 2016 20:48:46 +0000 (16:48 -0400)]
nitc/neo.nit: adapt code to promoted locations

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

8 years agonitc/model: add location to MType
Jean Privat [Sun, 1 May 2016 18:55:03 +0000 (14:55 -0400)]
nitc/model: add location to MType

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

8 years agonitc: model_visitor shows the location
Jean Privat [Sun, 1 May 2016 15:58:50 +0000 (11:58 -0400)]
nitc: model_visitor shows the location

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

8 years agomodel: add location to MClass and MProperty
Jean Privat [Sun, 1 May 2016 15:45:51 +0000 (11:45 -0400)]
model: add location to MClass and MProperty

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

8 years agomodel: filepath is now just an alias on the location
Jean Privat [Fri, 13 May 2016 17:53:50 +0000 (13:53 -0400)]
model: filepath is now just an alias on the location

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

8 years agomodel: add location to packages and groups
Jean Privat [Sun, 1 May 2016 15:43:36 +0000 (11:43 -0400)]
model: add location to packages and groups

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

8 years agomodel: promote location to any `MEntity`
Jean Privat [Sun, 1 May 2016 15:42:20 +0000 (11:42 -0400)]
model: promote location to any `MEntity`

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

8 years agolib: Added catalog ini for `rubix` project
Lucas Bajolet [Fri, 13 May 2016 19:28:06 +0000 (15:28 -0400)]
lib: Added catalog ini for `rubix` project

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

8 years agolib: Added documentation on rubix module
Lucas Bajolet [Fri, 13 May 2016 19:27:33 +0000 (15:27 -0400)]
lib: Added documentation on rubix module

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

8 years agobenchmarks/csv: Added README
Lucas Bajolet [Thu, 12 May 2016 19:22:33 +0000 (15:22 -0400)]
benchmarks/csv: Added README

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

8 years agobenchmarks: Added CSV benchmark to bench suite
Lucas Bajolet [Thu, 12 May 2016 19:22:20 +0000 (15:22 -0400)]
benchmarks: Added CSV benchmark to bench suite

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

8 years agotests: update expected errors to the new JSON parser engine
Alexis Laferrière [Fri, 13 May 2016 18:09:27 +0000 (14:09 -0400)]
tests: update expected errors to the new JSON parser engine

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

8 years agocontrib: update clients of `to_json_string`
Alexis Laferrière [Fri, 13 May 2016 18:04:56 +0000 (14:04 -0400)]
contrib: update clients of `to_json_string`

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