nit.git
9 years agonitdoc: introduce StructurePhase
Alexandre Terrasa [Wed, 4 Feb 2015 20:03:46 +0000 (21:03 +0100)]
nitdoc: introduce StructurePhase

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

9 years agonitdoc: introduce ConcernsPhase
Alexandre Terrasa [Wed, 4 Feb 2015 20:00:28 +0000 (21:00 +0100)]
nitdoc: introduce ConcernsPhase

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

9 years agonitdoc: introduce MakePagePhase
Alexandre Terrasa [Wed, 4 Feb 2015 19:55:08 +0000 (20:55 +0100)]
nitdoc: introduce MakePagePhase

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

9 years agonitdoc: introduce ExtractionPhase
Alexandre Terrasa [Wed, 4 Feb 2015 19:53:31 +0000 (20:53 +0100)]
nitdoc: introduce ExtractionPhase

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

9 years agonitdoc: migrate nitdoc from `doc_pages` to `doc_phases`
Alexandre Terrasa [Wed, 4 Feb 2015 19:51:02 +0000 (20:51 +0100)]
nitdoc: migrate nitdoc from `doc_pages` to `doc_phases`

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

9 years agonitdoc: create `doc_phases` group
Alexandre Terrasa [Wed, 4 Feb 2015 18:30:59 +0000 (19:30 +0100)]
nitdoc: create `doc_phases` group

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

9 years agonitdoc: introduce `doc_base` module
Alexandre Terrasa [Mon, 2 Feb 2015 18:36:59 +0000 (19:36 +0100)]
nitdoc: introduce `doc_base` module

This module introduces new Nitdoc concepts:
* DocModel
* DocPage and DocComposite
* DocPhase

These concepts will be used in further commits to "phasify" Nitdoc.

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

9 years agocontrib/nitrpg: gitignore binaries, cache and game data
Alexandre Terrasa [Wed, 4 Feb 2015 18:55:15 +0000 (19:55 +0100)]
contrib/nitrpg: gitignore binaries, cache and game data

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

9 years agocontrib/nitrpg: add a Makefile
Alexandre Terrasa [Tue, 3 Feb 2015 21:40:42 +0000 (22:40 +0100)]
contrib/nitrpg: add a Makefile

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

9 years agocontrib/nitrpg: introduce the tool that run the website
Alexandre Terrasa [Tue, 3 Feb 2015 21:40:07 +0000 (22:40 +0100)]
contrib/nitrpg: introduce the tool that run the website

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

9 years agocontrib/nitrpg: introduce templates to render the game as an HTML website
Alexandre Terrasa [Tue, 3 Feb 2015 21:38:27 +0000 (22:38 +0100)]
contrib/nitrpg: introduce templates to render the game as an HTML website

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

9 years agocontrib/nitrpg: add a listener tool to update the game from GithubEvents
Alexandre Terrasa [Tue, 3 Feb 2015 21:37:21 +0000 (22:37 +0100)]
contrib/nitrpg: add a listener tool to update the game from GithubEvents

This listener must be running to keep the game up to date.

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

9 years agocontrib/nitrpg: add some basic reactors
Alexandre Terrasa [Tue, 3 Feb 2015 21:35:45 +0000 (22:35 +0100)]
contrib/nitrpg: add some basic reactors

Here the reactors are used to collect new pull request and comments to reward the player with nitcoins.

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

9 years agocontrib/nitrpg: enable statistics collection from GithubEvent
Alexandre Terrasa [Tue, 3 Feb 2015 21:34:46 +0000 (22:34 +0100)]
contrib/nitrpg: enable statistics collection from GithubEvent

This shows how to implement GameReactors.
Statistics will also be used latter in the web display.

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

9 years agocontrib: introduce nitrpg base structures
Alexandre Terrasa [Tue, 3 Feb 2015 21:33:16 +0000 (22:33 +0100)]
contrib: introduce nitrpg base structures

Nitrpg is a rpg game coded in nit that works with Github.

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

9 years agocompiler: use global constant instead of literal to indicate file-name in errors
Jean Privat [Wed, 4 Feb 2015 15:14:02 +0000 (22:14 +0700)]
compiler: use global constant instead of literal to indicate file-name in errors

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

9 years agoloader: attach mmodule to sourcefile
Jean Privat [Wed, 4 Feb 2015 15:15:05 +0000 (22:15 +0700)]
loader: attach mmodule to sourcefile

So the associated module can be retrieved from any node

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

9 years agoMerge: GitHub misc
Jean Privat [Wed, 4 Feb 2015 08:38:19 +0000 (15:38 +0700)]
Merge: GitHub misc

Some fixes for the Github API.

Also introduce `Repo::search_issues` which allow to list specific issues with an advanced query.

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

9 years agoMerge: Optimize get_or_null
Jean Privat [Wed, 4 Feb 2015 08:38:06 +0000 (15:38 +0700)]
Merge: Optimize get_or_null

Recent profiling of the interpreter nit shows that a lof of time is used in hashmaps. This PR improves the standard use-path with the safe method `get_or_null` that is more efficient (and simple) than `has_key` followed by `[]`.

The time for `nit doors_with_classes.nit 5000` give

before: 0m5.592s
after: 0m5.208s (-6,7%)

Note: by comparison, the ruby version is 0m2.284s, and the python is 0m0.116s ; there is still a lot of work

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

9 years agoMerge: jwrapper: interfaces, "Compiled from" line and output file without .nit
Jean Privat [Wed, 4 Feb 2015 08:37:57 +0000 (15:37 +0700)]
Merge: jwrapper: interfaces, "Compiled from" line and output file without .nit

Pull-Request: #1137
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoMerge: Better Vim autocomplete by scanning all imported modules
Jean Privat [Wed, 4 Feb 2015 08:37:50 +0000 (15:37 +0700)]
Merge: Better Vim autocomplete by scanning all imported modules

The new Vim plugin uses `nitls` to locate all Nit modules relevant to the current directory. This is a nice way to support both complex projects and new incomplete modules.

The recommended usage is to update the list of modules when launching Vim and then do it manually afterwards. You may want to update it after adding an importation and saving the file. It could also be updated on each file save or loading but it gets pretty slow. Actually, the whole system may be too slow for older computers (sorry @R4PaSs) or those running inside a slow VM (sorry @BlackMinou and @MehdiAit).

A nice feature to have, would be to call `nitls` on the standard library when there's not local Nit source file or project. It occurs when creating the first Nit source file in an empty directory. @privat, what would be the best way to do that? Could we have `nitls -M standard`?

Pull-Request: #1134
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoloader: get_mgroup look in path
Jean Privat [Wed, 4 Feb 2015 05:18:40 +0000 (12:18 +0700)]
loader: get_mgroup look in path

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

9 years agomodel: precise contracts for `lookup_*_definition?`
Jean Privat [Wed, 4 Feb 2015 02:07:27 +0000 (09:07 +0700)]
model: precise contracts for `lookup_*_definition?`

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

9 years agogithub/api: add `search_issue` service in Repo
Alexandre Terrasa [Tue, 3 Feb 2015 21:29:13 +0000 (22:29 +0100)]
github/api: add `search_issue` service in Repo

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

9 years agogithub/api: move `html_url` to GithubEntity since it's shared by all of them
Alexandre Terrasa [Tue, 3 Feb 2015 21:25:41 +0000 (22:25 +0100)]
github/api: move `html_url` to GithubEntity since it's shared by all of them

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

9 years agogithub/api: return an empty list instead of crashing for issues without labels
Alexandre Terrasa [Tue, 3 Feb 2015 21:24:49 +0000 (22:24 +0100)]
github/api: return an empty list instead of crashing for issues without labels

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

9 years agogithub/api: uniformize `load_issue_event` implementation with other services.
Alexandre Terrasa [Tue, 3 Feb 2015 21:22:59 +0000 (22:22 +0100)]
github/api: uniformize `load_issue_event` implementation with other services.

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

9 years agorosetacode: improve doors_with_class (add optional argument)
Jean Privat [Tue, 3 Feb 2015 14:40:19 +0000 (21:40 +0700)]
rosetacode: improve doors_with_class (add optional argument)

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

9 years agolib/more_collections: simplify by using `Map::get_or_null`
Jean Privat [Tue, 3 Feb 2015 14:39:39 +0000 (21:39 +0700)]
lib/more_collections: simplify by using `Map::get_or_null`

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

9 years agomodel: use `Map::get_or_null` for `get_x_by_name`
Jean Privat [Tue, 3 Feb 2015 14:38:15 +0000 (21:38 +0700)]
model: use `Map::get_or_null` for `get_x_by_name`

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

9 years agomodel: move guards `lookup_first_definition` after cache miss
Jean Privat [Tue, 3 Feb 2015 13:54:44 +0000 (20:54 +0700)]
model: move guards `lookup_first_definition` after cache miss

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

9 years agolib/standard: redef a fast path for `HashMap#get_or_null`
Jean Privat [Tue, 3 Feb 2015 13:53:05 +0000 (20:53 +0700)]
lib/standard: redef a fast path for `HashMap#get_or_null`

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

9 years agojwrapper: accept interfaces
Alexis Laferrière [Tue, 3 Feb 2015 00:38:48 +0000 (19:38 -0500)]
jwrapper: accept interfaces

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

9 years agojwrapper: accept output files that do not look like Nit modules
Alexis Laferrière [Tue, 3 Feb 2015 00:38:10 +0000 (19:38 -0500)]
jwrapper: accept output files that do not look like Nit modules

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

9 years agomisc: rename README to README.md
Alexis Laferrière [Tue, 3 Feb 2015 02:46:42 +0000 (21:46 -0500)]
misc: rename README to README.md

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

9 years agomisc: intro a vim plugin with better autocomplete
Alexis Laferrière [Sat, 31 Jan 2015 16:40:20 +0000 (11:40 -0500)]
misc: intro a vim plugin with better autocomplete

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

9 years agojwrapper: deal with the optional "Compiled from" line in the grammar
Alexis Laferrière [Tue, 3 Feb 2015 00:36:29 +0000 (19:36 -0500)]
jwrapper: deal with the optional "Compiled from" line in the grammar

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

9 years agoMerge: Fix virtual types in string
Jean Privat [Sun, 1 Feb 2015 08:46:43 +0000 (15:46 +0700)]
Merge: Fix virtual types in string

`SELFTYPE` in String is used to dintinguish buffers from strings. Unfortunately it is sometime badly used.

This series try to at least improve thing so that operations on buffers do not crash at runtime.

Still, I think there is something fishy in the String vs Buffer API

Pull-Request: #1133
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Set accept null
Jean Privat [Sun, 1 Feb 2015 08:46:37 +0000 (15:46 +0700)]
Merge: Set accept null

Since keys of Maps can now be null, it enables the same rule with the Sets

Pull-Request: #1132
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: parser: slight improvement of the README
Jean Privat [Sun, 1 Feb 2015 08:46:32 +0000 (15:46 +0700)]
Merge: parser: slight improvement of the README

Copy a sentence from a page of the website before removing it.

nitdoc will soon nicely presents components of the compiler ; so just move existing doc in a single place make sense.

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

9 years agoMerge: Clean up to prepare for NitActivity
Jean Privat [Sun, 1 Feb 2015 08:46:23 +0000 (15:46 +0700)]
Merge: Clean up to prepare for NitActivity

This PR cleans the way to replace our current use of `NativeActivity` by our own `NitActivity` a direct subclass to `Activity`. The result of this PR that we are less dependent on `NativeActivity` and the `native_app_glue` module.

Notable modifications:

* Use Java `Activity` instead of `NativeActivity` wherever possible.
* Rename, to follow convention, Nit `NativeActivity` to `NativeNativeActivity` and `Activity` to `NativeActivity`. Thus all previous Java code using the Java `NativeActivity`, will now use Java `Activity`. The name `NativeNativeActivity` is weird, but temporary as the class will be removed once we have our `NitActivity`.

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

9 years agoparser: slight improvement of the README
Jean Privat [Fri, 30 Jan 2015 14:46:05 +0000 (21:46 +0700)]
parser: slight improvement of the README

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

9 years agoversion 0.7.1 v0.7.1
Jean Privat [Fri, 30 Jan 2015 13:54:22 +0000 (20:54 +0700)]
version 0.7.1

9 years agolib/android: Bundle do not need a context or to import native_app_glue
Alexis Laferrière [Mon, 26 Jan 2015 11:58:37 +0000 (06:58 -0500)]
lib/android: Bundle do not need a context or to import native_app_glue

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

9 years agolib/android: extract activities from native_app_glue
Alexis Laferrière [Mon, 26 Jan 2015 11:55:28 +0000 (06:55 -0500)]
lib/android: extract activities from native_app_glue

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

9 years agolib/android: in Java, use Activity instead of NativeActivity
Alexis Laferrière [Mon, 26 Jan 2015 10:48:14 +0000 (05:48 -0500)]
lib/android: in Java, use Activity instead of NativeActivity

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

9 years agoSince keys of Maps can now be null, it enables the same rule with the Sets
Jean Privat [Fri, 30 Jan 2015 09:36:28 +0000 (16:36 +0700)]
Since keys of Maps can now be null, it enables the same rule with the Sets

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

9 years agostring: some methods sould return String instead of SELFTYPE
Jean Privat [Fri, 30 Jan 2015 09:29:39 +0000 (16:29 +0700)]
string: some methods sould return String instead of SELFTYPE

because it is what they returns

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

9 years agostring: fix SELFTYPE in String and Buffer
Jean Privat [Fri, 30 Jan 2015 09:03:44 +0000 (16:03 +0700)]
string: fix SELFTYPE in String and Buffer

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

9 years agostring: do not redef SELFTYPE in FlatBuffer
Jean Privat [Fri, 30 Jan 2015 09:02:53 +0000 (16:02 +0700)]
string: do not redef SELFTYPE in FlatBuffer

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

9 years agoupdate NOTICE
Jean Privat [Fri, 30 Jan 2015 02:14:33 +0000 (09:14 +0700)]
update NOTICE

9 years agoMerge: Ropefix
Jean Privat [Fri, 30 Jan 2015 02:01:18 +0000 (09:01 +0700)]
Merge: Ropefix

A few modifications to ropes, I discovered that the `+` routine used to create too many Concat nodes passed a certain point, which inceased the RAM use of Strings unnecessarily (might help with #1106's example program, on my machine the memory went from 200M+ used to 20M).

While I was at it, I removed a few old-style-inits that were no longer necessary.

Some others however I could not remove, maybe there is a way I can do so, but with the spec of the new constructors I'm not entirely sure how to do so without retaining unnneeded information or complexifying instanciation, that'll have to wait.

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

9 years agoMerge: ldflags for Android
Jean Privat [Thu, 29 Jan 2015 11:59:01 +0000 (18:59 +0700)]
Merge: ldflags for Android

For the same module, cflags and ldflags can vary per platform. This new annotation on annotations targets a platform for each cflags or ldflags. By default, the target platform is that of the host. It will probably need to be clarified on more modules once we support more platforms.

It will be used to load (or not load) OpenGL ES v1.0 vs 2.0 and libandroid in future PR. For now, only `calculator` should save on linking with OpenGL.

I hesitated between different annotations before settling on `@android`:
* `@target(android)` makes it clear that it is the target, but it gets a bit heavy to read: `module android_opengles1 is ldflags("-lEGL -lGLESv1_CM")@target(android)`
* `@only(android)` makes it clear that only Android is affected by this annotation.
* but `@android` is easy to read and clear enough to fit with an already complex syntax.

TODO `cflags@android` declarations are accepted but unused at this time.

Pull-Request: #1124
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Optimizations in nitvm
Jean Privat [Thu, 29 Jan 2015 11:58:53 +0000 (18:58 +0700)]
Merge: Optimizations in nitvm

This PR introduces some change in the implementation of object mechanisms in the nitvm.

Now, the dispatch between several mechanisms is made directly in the AST nodes instead of in runtime mechanisms themselves.
This PR is preliminary work before the implementation of complex optimization systems, but now the nitvm is sligtly more efficent than before because the choice between implementations is only made once (the first time).

I use a workaround in AST nodes to avoid conflict with refinements between the interpreter and the vm.
In the future this will need to be well implemented, maybe by creating a sort of ```CallSite``` for subtyping test and attribute access and store informations into them instead of into the nodes.

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

9 years agolib/standard/ropes: Removed a few old-style-inits
Lucas Bajolet [Wed, 28 Jan 2015 21:19:48 +0000 (16:19 -0500)]
lib/standard/ropes: Removed a few old-style-inits

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

9 years agolib/standard/ropes: Fixed concatenation routine for Concat + FlatString
Lucas Bajolet [Wed, 28 Jan 2015 15:58:48 +0000 (10:58 -0500)]
lib/standard/ropes: Fixed concatenation routine for Concat + FlatString

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

9 years agonitvm: Optimize method call by dispatching between implementions in CallSites
Julien Pagès [Fri, 23 Jan 2015 09:58:54 +0000 (10:58 +0100)]
nitvm: Optimize method call by dispatching between implementions in CallSites

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

9 years agolib: update portable modules with ldflags specific to Android
Alexis Laferrière [Wed, 28 Jan 2015 14:52:36 +0000 (09:52 -0500)]
lib: update portable modules with ldflags specific to Android

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

9 years agolib: define Android ldflags in user modules
Alexis Laferrière [Wed, 28 Jan 2015 14:54:23 +0000 (09:54 -0500)]
lib: define Android ldflags in user modules

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

9 years agonitc & lib: intro the @android annotation and use it in nitc
Alexis Laferrière [Tue, 27 Jan 2015 02:41:22 +0000 (21:41 -0500)]
nitc & lib: intro the @android annotation and use it in nitc

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

9 years agonitc: refactor MModule cflags and ldflags to support different target platforms
Alexis Laferrière [Sun, 25 Jan 2015 16:10:52 +0000 (11:10 -0500)]
nitc: refactor MModule cflags and ldflags to support different target platforms

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

9 years agosrc: each platform has a name, except for the default
Alexis Laferrière [Wed, 28 Jan 2015 14:40:10 +0000 (09:40 -0500)]
src: each platform has a name, except for the default

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

9 years agonitvm: Optimize attribute access and subtyping test by orienting between implementati...
Julien Pagès [Fri, 23 Jan 2015 09:52:13 +0000 (10:52 +0100)]
nitvm: Optimize attribute access and subtyping test by orienting between implementations in AST nodes

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

9 years agoniti: Allow to redefine AST nodes in other engines, add documentation in vm
Julien Pagès [Tue, 13 Jan 2015 16:18:15 +0000 (17:18 +0100)]
niti: Allow to redefine AST nodes in other engines, add documentation in vm

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

9 years agoMerge: A collection of miscellaneous commits
Jean Privat [Tue, 27 Jan 2015 03:59:43 +0000 (10:59 +0700)]
Merge: A collection of miscellaneous commits

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

9 years agoMerge: Android support improvements
Jean Privat [Tue, 27 Jan 2015 03:32:49 +0000 (10:32 +0700)]
Merge: Android support improvements

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

9 years agoexamples/calculator: revamp style of the calculator code
Alexis Laferrière [Sun, 25 Jan 2015 23:32:17 +0000 (18:32 -0500)]
examples/calculator: revamp style of the calculator code

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

9 years agoC FFI: fix line offset in gcc errors on custom header code
Alexis Laferrière [Sun, 25 Jan 2015 17:55:47 +0000 (12:55 -0500)]
C FFI: fix line offset in gcc errors on custom header code

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

9 years agolib/egl: add `renderable_type` related features
Alexis Laferrière [Sat, 24 Jan 2015 19:49:19 +0000 (14:49 -0500)]
lib/egl: add `renderable_type` related features

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

9 years agolib/more_collections: add `remove_at` to `HashMap[23]`
Alexis Laferrière [Tue, 16 Dec 2014 14:14:09 +0000 (09:14 -0500)]
lib/more_collections: add `remove_at` to `HashMap[23]`

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

9 years agolib/gtk: copy string returned from `GTKEntry`
Alexis Laferrière [Fri, 2 Jan 2015 15:36:36 +0000 (10:36 -0500)]
lib/gtk: copy string returned from `GTKEntry`

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

9 years agolib/sdl: intro `has_mouse|input_focus`
Alexis Laferrière [Mon, 22 Dec 2014 15:42:49 +0000 (10:42 -0500)]
lib/sdl: intro `has_mouse|input_focus`

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

9 years agolib/mnit_input: add `KeyEvent::name`
Alexis Laferrière [Thu, 18 Dec 2014 16:21:15 +0000 (11:21 -0500)]
lib/mnit_input: add `KeyEvent::name`

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

9 years agonitc/android: "handle" all config changes
Alexis Laferrière [Mon, 26 Jan 2015 19:45:19 +0000 (14:45 -0500)]
nitc/android: "handle" all config changes

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

9 years agonitc/android: differentiate between debug and release versions
Alexis Laferrière [Sat, 24 Jan 2015 19:27:05 +0000 (14:27 -0500)]
nitc/android: differentiate between debug and release versions

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

9 years agonitc/android: support using -m with Android compilation
Alexis Laferrière [Fri, 23 Jan 2015 16:57:41 +0000 (11:57 -0500)]
nitc/android: support using -m with Android compilation

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

9 years agoMerge: Jwrapper: more clean up
Jean Privat [Tue, 27 Jan 2015 01:29:14 +0000 (08:29 +0700)]
Merge: Jwrapper: more clean up

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

9 years agoMerge: Nitmd benches
Jean Privat [Tue, 27 Jan 2015 01:29:04 +0000 (08:29 +0700)]
Merge: Nitmd benches

Copied from README:

# Bench Markdown

Benches markdown parsers.

## Usage

        ./bench_markdown.sh all

## Engines

* nitmd
* txtmark 0.11 (https://github.com/rjeschke/txtmark)
* markdown4j 2.2 (https://code.google.com/p/markdown4j/)

## Benches

Benches are inspired from the [Henkelmann's Actuarius benches](http://henkelmann.eu/2011/01/10/performance_comparison_of_markdown_processor_for_the_jvm).

Benches are variations of the same text generate from `benches/plain.md`
This text is De finibus bonorum et malorum which is said to be the basis for
the commonly used Lorem Ipsum test text.

The generator rudely chops it up in a configurable number of paragraphs,
lines per paragraph and approximate chars per line.
Depending on the variation, it “decorates” parts of the text with Markdown syntax.
All tests consist of 30 Paragraphs with 20 lines each and approx. 80 chars per line (before “decoration”).

Here are the descriptions of the variations:

* Plain Paragraphs: No modifications, just the plain text.

* Emphasis: Every word emphasized,

  so the input `foo` is decorated as `*foo*` which should render as `<em>foo</em>`

* Strong: Every word emphasized,

  `foo` → `**foo**` → `<strong>foo</strong>`

* Inline Code: Every word marked as inline code:

  `foo` → ````foo```` → `<code>foo</code>`

* Fast Links: Every word a link without title or wrapped text:

  `foo` → `<foo>` → `<a href="foo">foo</a>`

* Special XML Chars: Every word is replaced by chars that need to be escaped in XML:

  `foo` → `"><&` → `&quot;&gt;&lt;'&amp;`

* Inline HTML: Every word is wrapped in verbatim HTML:

  `foo` → `<blink>foo</blink>` → `<blink>foo</blink>`

* Manual Line Breaks: Every line gets appended with `\n`:

  `some line` → `some line\n` → `some line<br/>\n`

* Full Links: Every word is turned into a link with wrapped text, url and title:

  `foo` → `[foo](http://example.com/foo "foo Title")` → `<a href="http://example.com/foo" title="foo Title">foo</a>`

* Full Images: Like full links, every word turned into an image reference

* Reference Links: Every word is turned into a link reference with an increasing id counter.
  The link reference definition is added after the paragraph the link occurs in:

  `foo` → `[foo][id123]` → `<a href="http://example.com/foo" title="foo Title">foo</a>`

* Block Quotes: Every paragraph is turned into a block quote by prepending a `>` to each line.

* Code Blocks: Every paragraph is turned into a code block by prepending four spaces to each line.

* Unordered Lists: Every paragraph is turned into a list with an item for each line by prepending `*` to each line.

* Mixed Test: A mix of all of the above: Some paragraphs lists, some code, some word emphasized etc.

Variation details can be found in `benches/gen_bench.nit`.

Pull-Request: #1116
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoMerge: lib/github: uses nitcorn to listen Github hook events.
Jean Privat [Tue, 27 Jan 2015 01:28:54 +0000 (08:28 +0700)]
Merge: lib/github: uses nitcorn to listen Github hook events.

This module introduces an abstract listener for Github hooks with nitcorn.

PS: OMG first PR with syntax highligh!!!! Thx @R4PaSs !

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

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

9 years agoMerge: example: rosettacode 100 doors
Jean Privat [Tue, 27 Jan 2015 01:28:44 +0000 (08:28 +0700)]
Merge: example: rosettacode 100 doors

Signed-off-by: Arthur Delamare <arthur.delamare@viacesi.fr>

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

9 years agobenches/markdowm: adds README
Alexandre Terrasa [Thu, 22 Jan 2015 11:12:13 +0000 (12:12 +0100)]
benches/markdowm: adds README

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

9 years agobenches/markdown: introduces engine markdown4j
Alexandre Terrasa [Mon, 26 Jan 2015 17:50:17 +0000 (18:50 +0100)]
benches/markdown: introduces engine markdown4j

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

9 years agobenches/markdown: introduces engine txtmark
Alexandre Terrasa [Mon, 26 Jan 2015 17:49:20 +0000 (18:49 +0100)]
benches/markdown: introduces engine txtmark

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

9 years agobenches/markdown: introduces engine nitmd
Alexandre Terrasa [Mon, 26 Jan 2015 17:46:48 +0000 (18:46 +0100)]
benches/markdown: introduces engine nitmd

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

9 years agobenches/markdown: introduces markdown benches
Alexandre Terrasa [Tue, 20 Jan 2015 23:19:34 +0000 (00:19 +0100)]
benches/markdown: introduces markdown benches

`gen_benches` program is used to generate a bunch of variations from an original md file.

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

9 years agocontrib/jwrapper: refactor some duplicated code
Alexis Laferrière [Mon, 26 Jan 2015 16:21:44 +0000 (11:21 -0500)]
contrib/jwrapper: refactor some duplicated code

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

9 years agocontrib/jwrapper: update generated headers
Alexis Laferrière [Mon, 26 Jan 2015 16:12:32 +0000 (11:12 -0500)]
contrib/jwrapper: update generated headers

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

9 years agocontrib/jwrapper: remove even more code related to collection hack
Alexis Laferrière [Mon, 26 Jan 2015 16:10:31 +0000 (11:10 -0500)]
contrib/jwrapper: remove even more code related to collection hack

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

9 years agocontrib/jwrapper: support converting getter/setter names beginning in lowercase
Alexis Laferrière [Mon, 26 Jan 2015 16:09:28 +0000 (11:09 -0500)]
contrib/jwrapper: support converting getter/setter names beginning in lowercase

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

9 years agoexample: rosettacode 100 doors
Arthur Delamare [Tue, 13 Jan 2015 15:24:48 +0000 (10:24 -0500)]
example: rosettacode 100 doors

Signed-off-by: Arthur Delamare <arthur.delamare@viacesi.fr>

9 years agoMerge: Rename annotations for the C/C++ compilers and linker to `cflags` and `ldflags`
Jean Privat [Mon, 26 Jan 2015 07:37:31 +0000 (14:37 +0700)]
Merge: Rename annotations for the C/C++ compilers and linker to `cflags` and `ldflags`

The new name is shorter, easier to remember and more standard. I may soon extend these annotations to provide information per platform, mainly to provide ldflags for Android only.

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

9 years agolib & contrib & tests: update users of `cflags` and `ldflags`
Alexis Laferrière [Sat, 24 Jan 2015 14:18:41 +0000 (09:18 -0500)]
lib & contrib & tests: update users of `cflags` and `ldflags`

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

9 years agolib/android: pin the App instance being registered in C
Alexis Laferrière [Tue, 20 Jan 2015 19:25:26 +0000 (14:25 -0500)]
lib/android: pin the App instance being registered in C

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

9 years agoandroid: use libgc on Android
Alexis Laferrière [Sun, 16 Nov 2014 20:55:00 +0000 (15:55 -0500)]
android: use libgc on Android

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

9 years agoandroid: intro a script to fetch and build libgc
Alexis Laferrière [Thu, 22 Jan 2015 14:46:36 +0000 (09:46 -0500)]
android: intro a script to fetch and build libgc

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

9 years agolib/android: clean up debug code from the UI module
Alexis Laferrière [Tue, 20 Jan 2015 21:37:31 +0000 (16:37 -0500)]
lib/android: clean up debug code from the UI module

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

9 years agonitc: rename `c_compiler_option` and cie to `cflags` and `ldflags`
Alexis Laferrière [Sat, 24 Jan 2015 14:17:45 +0000 (09:17 -0500)]
nitc: rename `c_compiler_option` and cie to `cflags` and `ldflags`

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

9 years agoMerge: improve changelog.sh
Jean Privat [Fri, 23 Jan 2015 04:14:12 +0000 (11:14 +0700)]
Merge: improve changelog.sh

Don't count merges and display number of commits

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

9 years agoMerge: lib/github: implements caching to maximize rate limit.
Jean Privat [Fri, 23 Jan 2015 04:14:01 +0000 (11:14 +0700)]
Merge: lib/github: implements caching to maximize rate limit.

Using JsonStore to save data locally and lighten the stress on API rate limit.

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

9 years agolib/github: uses nitcorn to listen Github hook events.
Alexandre Terrasa [Thu, 22 Jan 2015 11:03:07 +0000 (12:03 +0100)]
lib/github: uses nitcorn to listen Github hook events.

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