nit.git
7 years agoREADME: Update libgc's URL
jcbrinfo [Mon, 30 May 2016 13:03:07 +0000 (09:03 -0400)]
README: Update libgc's URL

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

7 years agotests: filter out readline on OSX
Jean Privat [Sat, 28 May 2016 14:18:54 +0000 (10:18 -0400)]
tests: filter out readline on OSX

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

7 years agoMerge: NOTICE: Update
Jean Privat [Fri, 27 May 2016 18:48:07 +0000 (14:48 -0400)]
Merge: NOTICE: Update

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #2135

7 years agoMerge: examples/fibonacci: fix off-by-one fibonacci
Jean Privat [Fri, 27 May 2016 18:48:02 +0000 (14:48 -0400)]
Merge: examples/fibonacci: fix off-by-one fibonacci

Signed-off-by: Tony Gaetani <tony.gaetani@gmail.com>

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

7 years agoMerge: Docunit --no-color
Jean Privat [Fri, 27 May 2016 18:47:56 +0000 (14:47 -0400)]
Merge: Docunit --no-color

Small last nitpicks on nitnuit

* --no-color mode
* better summary at the end
* working dir no more hidden and removed on success

Pull-Request: #2131

7 years agoMerge: GNU readline wrapper
Jean Privat [Fri, 27 May 2016 18:47:53 +0000 (14:47 -0400)]
Merge: GNU readline wrapper

This is a tiny wrapper for the GNU readline library. For some reasons, pkg-config doesn't know about libreadline so I had to hardcode the cflags using the ldflags module annotation.

Signed-off-by: Frédéric Vachon <fredvac@gmail.com>

Pull-Request: #2083
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Etienne M. Gagnon <egagnon@j-meg.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agoNOTICE: Update
Jean-Christophe Beaupré [Fri, 27 May 2016 18:30:46 +0000 (14:30 -0400)]
NOTICE: Update

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

7 years agonitunit: update tests
Jean Privat [Fri, 27 May 2016 15:28:59 +0000 (11:28 -0400)]
nitunit: update tests

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

7 years agonitunit: remove the working directory on success
Jean Privat [Fri, 27 May 2016 15:26:16 +0000 (11:26 -0400)]
nitunit: remove the working directory on success

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

7 years agoexamples/fibonacci: fix off-by-one fibonacci
Tony Gaetani [Fri, 27 May 2016 09:07:52 +0000 (11:07 +0200)]
examples/fibonacci: fix off-by-one fibonacci

Signed-off-by: Tony Gaetani <tony.gaetani@gmail.com>

7 years agolib: Add a tiny GNU readline wrapper
Frédéric Vachon [Sat, 14 May 2016 16:21:07 +0000 (12:21 -0400)]
lib: Add a tiny GNU readline wrapper

Signed-off-by: Frédéric Vachon <fredvac@gmail.com>

7 years agonitunit: the working dir is now `nitunit.out`
Jean Privat [Fri, 27 May 2016 02:31:05 +0000 (22:31 -0400)]
nitunit: the working dir is now `nitunit.out`

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

7 years agonitunit: improve summary of results
Jean Privat [Fri, 27 May 2016 02:25:30 +0000 (22:25 -0400)]
nitunit: improve summary of results

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

7 years agonitunit: honor --no-color
Jean Privat [Thu, 26 May 2016 23:53:59 +0000 (19:53 -0400)]
nitunit: honor --no-color

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

7 years agoMerge: nitcorn: FileServer default file
Jean Privat [Thu, 26 May 2016 23:55:27 +0000 (19:55 -0400)]
Merge: nitcorn: FileServer default file

This PR introduce the concept of default file in `FileServer`. This allow the user to specify what file to return instead of the 404 page if no file matches the query.

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

7 years agoMerge: lib/core: Added `is_dir` function to `Path`
Jean Privat [Thu, 26 May 2016 23:55:15 +0000 (19:55 -0400)]
Merge: lib/core: Added `is_dir` function to `Path`

Quite self-explanatory, really it is just a simpler `Path::stat` followed by a `FileStat::is_dir`.

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

7 years agolib/popcorn: update README for `default_file`
Alexandre Terrasa [Mon, 23 May 2016 20:15:00 +0000 (16:15 -0400)]
lib/popcorn: update README for `default_file`

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

7 years agolib/popcorn: update angular example and test
Alexandre Terrasa [Mon, 23 May 2016 20:12:01 +0000 (16:12 -0400)]
lib/popcorn: update angular example and test

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

7 years agolib/popcorn: add example and test for default_file
Alexandre Terrasa [Mon, 23 May 2016 20:11:25 +0000 (16:11 -0400)]
lib/popcorn: add example and test for default_file

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

7 years agolib/popcorn: StaticHandler use `default_file`
Alexandre Terrasa [Mon, 23 May 2016 20:10:15 +0000 (16:10 -0400)]
lib/popcorn: StaticHandler use `default_file`

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

7 years agonitcorn/file_server: allow default_response if not file match
Alexandre Terrasa [Mon, 23 May 2016 20:09:39 +0000 (16:09 -0400)]
nitcorn/file_server: allow default_response if not file match

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

7 years agonitcorn/file_server: fix warnings on file_stat calls
Alexandre Terrasa [Mon, 23 May 2016 19:37:15 +0000 (15:37 -0400)]
nitcorn/file_server: fix warnings on file_stat calls

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

7 years agonitcorn/file_server: extract answer_redirection method
Alexandre Terrasa [Mon, 23 May 2016 19:14:17 +0000 (15:14 -0400)]
nitcorn/file_server: extract answer_redirection method

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

7 years agonitcorn/file_server: extract answer_directory_listing method
Alexandre Terrasa [Mon, 23 May 2016 19:09:57 +0000 (15:09 -0400)]
nitcorn/file_server: extract answer_directory_listing method

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

7 years agonitcorn/file_server: extract answer_file method
Alexandre Terrasa [Mon, 23 May 2016 19:09:11 +0000 (15:09 -0400)]
nitcorn/file_server: extract answer_file method

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

7 years agolib/core: Added `is_dir` function to `Path`
Lucas Bajolet [Thu, 26 May 2016 18:55:49 +0000 (14:55 -0400)]
lib/core: Added `is_dir` function to `Path`

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

7 years agoMerge: Popcorn: use_before, use_after
Jean Privat [Thu, 26 May 2016 15:43:35 +0000 (11:43 -0400)]
Merge: Popcorn: use_before, use_after

This PR introduce two changes in the popcorn request-response cycle:
* Introduce placeholders `use_before` and `use_after` to force handler execution before or after each request. This makes the life of developer easier when using a lot of routers/routers.
* Break response cycle if a between (between as between before and after) handler gives a response then call after_handler. This encourage the use of middleware into `use_before` and `use_after` and avoid requests sent twice. Bonus the api makes more sense like this.

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

7 years agoMerge: src/model: fix mdoc_or_fallback for MClasses and MProperties
Jean Privat [Thu, 26 May 2016 15:43:33 +0000 (11:43 -0400)]
Merge: src/model: fix mdoc_or_fallback for MClasses and MProperties

Specify `mdoc_or_fallback` behavior in MClass and MProperty (return intro mdoc)

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

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

7 years agoMerge: model_collect: add services for module importation
Jean Privat [Thu, 26 May 2016 15:43:30 +0000 (11:43 -0400)]
Merge: model_collect: add services for module importation

Build a new hierarchy poset from MClass inheritance

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

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

7 years agoMerge: Less randomness and race conditions in tests
Jean Privat [Thu, 26 May 2016 13:06:47 +0000 (09:06 -0400)]
Merge: Less randomness and race conditions in tests

Parallel executions can cause some race collisions on named resources (e.g. DB table names).

To solve this issue, `tests.sh` and `nitunit` initialize  `NIT_TESTING_ID` with a distinct integer identifier that can be used to give unique names to resources.

`rand` is not a recommended way to get a distinct identifier because its randomness is disabled by default.

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

7 years agoMerge: toolcontext: introduce --share-dir
Jean Privat [Thu, 26 May 2016 13:06:43 +0000 (09:06 -0400)]
Merge: toolcontext: introduce --share-dir

So other tools than nitdoc can use it.

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

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

7 years agoMerge: Generalize MEntity visibility
Jean Privat [Thu, 26 May 2016 13:06:41 +0000 (09:06 -0400)]
Merge: Generalize MEntity visibility

Proposal to generalize the visibility concept to all the MEntities:
* packages, groups and modules are always public
* classes depend on the signature, classdefs return the class visibility (shortcut)
* properties depend on the signature, propdefs return the property visibility (shortcut)
Other exotic MEntities are always public.

This PR makes the changes in model and update `model_json` as PoC for the gain of the generalization.

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

7 years agoMerge: make nitunit more colorful (and useful?)
Jean Privat [Thu, 26 May 2016 13:06:39 +0000 (09:06 -0400)]
Merge: make nitunit  more colorful (and useful?)

This series move more information in the UnitTest class, this allow specific and unified way of displaying the test results.

See the asciinema: https://asciinema.org/a/108jd2a3tkfifg3wzoacg0a65

Comments? Needs? Ideas?

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

7 years agonitrpg&nitcorn: replace `rand` with `NIT_TESTING_ID` for their tests
Jean Privat [Wed, 25 May 2016 19:38:25 +0000 (15:38 -0400)]
nitrpg&nitcorn: replace `rand` with `NIT_TESTING_ID` for their tests

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

7 years agotests.sh: add NIT_TESTING_ID with the same semantic than with nitunit
Jean Privat [Wed, 25 May 2016 19:36:09 +0000 (15:36 -0400)]
tests.sh: add NIT_TESTING_ID with the same semantic than with nitunit

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

7 years agonitunit manual: document NIT_TESTING, SRAND and NIT_TESTING_ID
Jean Privat [Wed, 25 May 2016 19:34:38 +0000 (15:34 -0400)]
nitunit manual: document NIT_TESTING, SRAND and NIT_TESTING_ID

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

7 years agonitdoc: use --share-dir option
Alexandre Terrasa [Thu, 26 May 2016 04:31:21 +0000 (00:31 -0400)]
nitdoc: use --share-dir option

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

7 years agotoolcontext: introduce --share-dir
Alexandre Terrasa [Thu, 26 May 2016 04:31:07 +0000 (00:31 -0400)]
toolcontext: introduce --share-dir

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

7 years agolib/popcorn: document use_before and use_after
Alexandre Terrasa [Wed, 25 May 2016 23:56:50 +0000 (19:56 -0400)]
lib/popcorn: document use_before and use_after

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

7 years agotests: fix model_visitor tests since mdoc fix
Alexandre Terrasa [Wed, 25 May 2016 23:47:59 +0000 (19:47 -0400)]
tests: fix model_visitor tests since mdoc fix

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

7 years agomodel/model_collect: importation_poset do not collect direct parents and children
Alexandre Terrasa [Wed, 25 May 2016 23:43:18 +0000 (19:43 -0400)]
model/model_collect: importation_poset do not collect direct parents and children

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

7 years agomodel_collect: add services for module importation
Alexandre Terrasa [Fri, 18 Dec 2015 05:20:41 +0000 (00:20 -0500)]
model_collect: add services for module importation

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

7 years agonitunit: set more environment variables NIT_TESTING_ID and SRAND
Jean Privat [Wed, 25 May 2016 19:34:04 +0000 (15:34 -0400)]
nitunit: set more environment variables NIT_TESTING_ID and SRAND

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

7 years agolib/core: add `Sys::pid`
Jean Privat [Wed, 25 May 2016 19:33:34 +0000 (15:33 -0400)]
lib/core: add `Sys::pid`

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

7 years agotests: update nitunit tests
Jean Privat [Wed, 25 May 2016 00:15:08 +0000 (20:15 -0400)]
tests: update nitunit tests

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

7 years agonitunit: show a progress bar
Jean Privat [Wed, 25 May 2016 00:11:56 +0000 (20:11 -0400)]
nitunit: show a progress bar

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

7 years agonitunit: suites in docunits have a name
Jean Privat [Wed, 25 May 2016 00:11:08 +0000 (20:11 -0400)]
nitunit: suites in docunits have a name

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

7 years agonitunit: separate the error message from the test output
Jean Privat [Wed, 25 May 2016 00:10:27 +0000 (20:10 -0400)]
nitunit: separate the error message from the test output

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

7 years agonitunit: add more information in UnitTest
Jean Privat [Wed, 25 May 2016 00:06:57 +0000 (20:06 -0400)]
nitunit: add more information in UnitTest

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

7 years agolib/popcorn: App uses pre / post middlewares
Alexandre Terrasa [Mon, 23 May 2016 20:52:36 +0000 (16:52 -0400)]
lib/popcorn: App uses pre / post middlewares

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

7 years agolib/popcorn: introduce Router::use_after service
Alexandre Terrasa [Mon, 23 May 2016 20:52:12 +0000 (16:52 -0400)]
lib/popcorn: introduce Router::use_after service

So the user can force some middlewares to be called after the other handlers.

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

7 years agolib/popcorn: introduce Router::use_before service
Alexandre Terrasa [Mon, 23 May 2016 20:51:55 +0000 (16:51 -0400)]
lib/popcorn: introduce Router::use_before service

So the user can force some middlewares to be called before the other handlers.

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

7 years agolib/popcorn: extract Router::handler_in private service
Alexandre Terrasa [Mon, 23 May 2016 20:50:38 +0000 (16:50 -0400)]
lib/popcorn: extract Router::handler_in private service

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

7 years agolib/popcorn: extract Router::build_route private service
Alexandre Terrasa [Mon, 23 May 2016 20:49:11 +0000 (16:49 -0400)]
lib/popcorn: extract Router::build_route private service

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

7 years agosrc/model: fix mdoc_or_fallback for MClasses and MProperties
Alexandre Terrasa [Wed, 25 May 2016 02:56:27 +0000 (22:56 -0400)]
src/model: fix mdoc_or_fallback for MClasses and MProperties

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

7 years agosrc/model: model_visitor uses MEntity::visibility
Alexandre Terrasa [Wed, 25 May 2016 01:32:15 +0000 (21:32 -0400)]
src/model: model_visitor uses MEntity::visibility

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

7 years agosrc/model: model_json use MEntity::location
Alexandre Terrasa [Wed, 25 May 2016 01:20:17 +0000 (21:20 -0400)]
src/model: model_json use MEntity::location

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

7 years agosrc/model: model_json use MEntity::visibility
Alexandre Terrasa [Wed, 25 May 2016 01:18:19 +0000 (21:18 -0400)]
src/model: model_json use MEntity::visibility

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

7 years agosrc/model: generalize visibility to all MEntities
Alexandre Terrasa [Wed, 25 May 2016 01:10:36 +0000 (21:10 -0400)]
src/model: generalize visibility to all MEntities

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

7 years agonitunit: fix some nitunit flags.
Jean Privat [Tue, 24 May 2016 23:59:10 +0000 (19:59 -0400)]
nitunit: fix some nitunit flags.

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

7 years agoMerge: NOTICE: Update author list and years
Jean Privat [Tue, 24 May 2016 23:12:43 +0000 (19:12 -0400)]
Merge: NOTICE: Update author list and years

Commands used:
* `git shortlog -sne <commit range> -- benchmarks/ contrib/ c_src/ examples/ misc/ share/man/ src/ tests/ Changelog LICENSE LICENSE-BSD LICENSE-GPL-2 Makefile NOTICE README.md VERSION .gitattributes .gitignore .gitmodules .mailmap .project`
* `git shortlog -sne <commit range> -- lib/ clib/ share/nitdoc/`
* To check the first commit date of an author: `git log --author=<author BRE> --reverse --date-order | less`

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

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

7 years agoMerge: Reworked crypto.nit to introduce basic XOR attacks
Jean Privat [Tue, 24 May 2016 23:12:34 +0000 (19:12 -0400)]
Merge: Reworked crypto.nit to introduce basic XOR attacks

lib/crypto:
`crypto.nit` was getting pretty overwhelmed with the upcoming changes so it was exploded into a package.
Introduced classes for cipher management to help with attacks.

lib/crapto:
Introduced 2 attacks on basic XOR ciphers.

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

7 years agoMerge: Added `copy_from` service to `NativeString`
Jean Privat [Tue, 24 May 2016 23:12:29 +0000 (19:12 -0400)]
Merge: Added `copy_from` service to `NativeString`

Usability PR, since I got tired of handling indexes and different structures manually, this method abstracts the job of copying the content of a `Text` to a `NativeString` object.

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

7 years agolib/crapto: Introduce 2 new attacks on XOR ciphers
Philippe Pepos Petitclerc [Sat, 14 May 2016 01:20:41 +0000 (21:20 -0400)]
lib/crapto: Introduce 2 new attacks on XOR ciphers

Introduced an attack on Single-byte XOR cipher based on english frequency analysis
Introduced an attack on Repeated-key XOR cipher based on hamming distances and Single-byte XOR attacks.

Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>

7 years agolib/crypto: Introduce XOR cipher management classes
Philippe Pepos Petitclerc [Sat, 14 May 2016 01:08:53 +0000 (21:08 -0400)]
lib/crypto: Introduce XOR cipher management classes

Introduced Single-byte XOR cipher management class
Introduced Repeating-key XOR cipher management class

Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>

7 years agolib/crypto: Explode crypto.nit into package
Philippe Pepos Petitclerc [Sat, 14 May 2016 14:59:08 +0000 (10:59 -0400)]
lib/crypto: Explode crypto.nit into package

Basic ciphers and utils are in basic_ciphers.nit
XOR-focused algorithms are in xor_ciphers.nit

Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>

7 years agotests: Added `Text::copy_to_native` test
Lucas Bajolet [Tue, 24 May 2016 14:23:42 +0000 (10:23 -0400)]
tests: Added `Text::copy_to_native` test

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

7 years agoMerge: Revamp Clock to return float values for easier memory management
Jean Privat [Tue, 24 May 2016 13:16:47 +0000 (09:16 -0400)]
Merge: Revamp Clock to return float values for easier memory management

This PR updates the main services of `Clock` to return float values instead of malloced extern instances of `Timespec`. There is a precision loss, but it's sufficient for games and the likes, and a program needing higher precision can still use `Timespec` directly. Clients don't even have to worry about memory management anymore.

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

7 years agoMerge: Implementing the Nit wrapper over the native postgres wrapper
Jean Privat [Tue, 24 May 2016 13:16:42 +0000 (09:16 -0400)]
Merge: Implementing the  Nit wrapper over the native postgres wrapper

This wrapper works around the `native_postgres.nit` class and implements the minimal amount of functionality of that class to start a connection, use the execution methods, and inspect the results. It's the next phase in the postgres package, I've also added tests.

@xymus

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

7 years agostarted working on the nit wrapper over the native postgres wrapper
itsWill [Tue, 17 May 2016 21:32:38 +0000 (23:32 +0200)]
started working on the nit wrapper over the native postgres wrapper

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

7 years agoniti: filter the -lrt flag on OS X
Alexis Laferrière [Mon, 23 May 2016 23:50:24 +0000 (19:50 -0400)]
niti: filter the -lrt flag on OS X

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

7 years agoNOTICE: Update author list and years
Jean-Christophe Beaupré [Mon, 23 May 2016 23:36:37 +0000 (19:36 -0400)]
NOTICE: Update author list and years

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

7 years agoMerge: A few game related services and tweaks
Jean Privat [Mon, 23 May 2016 02:28:26 +0000 (22:28 -0400)]
Merge: A few game related services and tweaks

Once again, here are some details on less intuitive commits:

* `AMotionEventAction::down_time` is used to better understand and respond to complex touch gestures.
* Serialization caches are accessed in the game WBTW to selectively delete data from the memory.
* `ThinGame::tick` is basically a counter of the current game logic frame. This value must be modified externally in mutliplayer games or sometimes when deserializing a game.
* `ImprovedNoise` can be useful in the lib, from experience it gives a better result that our current noise algorithms and it is in 3D. However it has less customization options.
* `EulerCamera::camera_to_world` is used to translate mouse position to in-world 3D coordinates in simple games viewed from directly above or from the side, like SDO and Action Nitro.

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

7 years agoMerge: Update xymus.net to activate the full API for the mobile client
Jean Privat [Mon, 23 May 2016 02:28:15 +0000 (22:28 -0400)]
Merge: Update xymus.net to activate the full API for the mobile client

This PR activates full support for the Benilux mobile app on the [xymus.net](xymus.net) production server. It was missing only the RESTful API code which is generated by nitrestful, and the admin interface.

A future PR will update the HTML interface with info on the app, or it will drop the hard coded content of the Benitlux page/views in favor of local content.

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

7 years agotests: remove the orphaned file xymus_net.res
Alexis Laferrière [Sun, 22 May 2016 20:35:23 +0000 (16:35 -0400)]
tests: remove the orphaned file xymus_net.res

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

7 years agoxymus.net: add missing package metadata, gitignore and README
Alexis Laferrière [Sun, 22 May 2016 18:44:11 +0000 (14:44 -0400)]
xymus.net: add missing package metadata, gitignore and README

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

7 years agoxymus.net: move server config to contrib
Alexis Laferrière [Sun, 22 May 2016 18:49:13 +0000 (14:49 -0400)]
xymus.net: move server config to contrib

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

7 years agotests: remove reference to the old location of nitcorn examples
Alexis Laferrière [Sun, 22 May 2016 18:22:17 +0000 (14:22 -0400)]
tests: remove reference to the old location of nitcorn examples

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

7 years agoxymus.net: update xymus.net with the API for the mobile client
Alexis Laferrière [Sat, 21 May 2016 17:16:05 +0000 (13:16 -0400)]
xymus.net: update xymus.net with the API for the mobile client

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

7 years agotest: update test_kill_process to revamped Clock
Alexis Laferrière [Sun, 22 May 2016 15:51:18 +0000 (11:51 -0400)]
test: update test_kill_process to revamped Clock

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

7 years agolib/gamnit: intro EulerCamera::camera_to_world
Alexis Laferrière [Wed, 24 Feb 2016 22:06:01 +0000 (17:06 -0500)]
lib/gamnit: intro EulerCamera::camera_to_world

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

7 years agolib/noise: fix missing doubling of the permutation array
Alexis Laferrière [Sun, 26 Jul 2015 11:37:56 +0000 (07:37 -0400)]
lib/noise: fix missing doubling of the permutation array

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

7 years agolib/noise: move ImprovedNoise from the rosetta perlin noise example
Alexis Laferrière [Wed, 9 Sep 2015 23:55:57 +0000 (19:55 -0400)]
lib/noise: move ImprovedNoise from the rosetta perlin noise example

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

7 years agocontrib & lib: fix other clients of clock
Alexis Laferrière [Sun, 22 May 2016 13:52:48 +0000 (09:52 -0400)]
contrib & lib: fix other clients of clock

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

7 years agotests & lib/realtime: rewrite test as a nitunit
Alexis Laferrière [Sun, 22 May 2016 13:48:53 +0000 (09:48 -0400)]
tests & lib/realtime: rewrite test as a nitunit

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

7 years agoMerge: Refactorize nitunit
Jean Privat [Sun, 22 May 2016 12:56:17 +0000 (08:56 -0400)]
Merge: Refactorize nitunit

Future improvement of nitunit require a saner codebase.
This PR does not bring a lot of features but propose instead some code improvements.

Summary:

* a new class UnitTest to factorize DocUnit and TestCase
* DocUnit are created, with its metadata, while discovered
* DocUnit do not enclose a XML node to fill but will generate one with to_xml.
* Easter egg: precise locations are included in the DocUnits. Each line of *collected* code can be located back to the original source code. This feature is not really used yet, except to locate the docunit itself.

The last commits are divided in order to make the reviewing more easy. I tought that is was better than a big stashed change.

Future PR will target usability since unit-tests are now reified in a common way on both sides (docunits and testsuites).

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

7 years agolib/serialization: let refinements and subclasses access caches
Alexis Laferrière [Fri, 12 Jun 2015 21:12:38 +0000 (17:12 -0400)]
lib/serialization: let refinements and subclasses access caches

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

7 years agolib/a_star: intro `find_closest`
Alexis Laferrière [Wed, 29 Oct 2014 13:36:38 +0000 (09:36 -0400)]
lib/a_star: intro `find_closest`

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

7 years agolib/bucketed_game: make `ThinGame::tick` writable for loading and multiplayer
Alexis Laferrière [Thu, 28 May 2015 20:30:28 +0000 (16:30 -0400)]
lib/bucketed_game: make `ThinGame::tick` writable for loading and multiplayer

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

7 years agolib/bucketed_game: intro services to get stats on buckets
Alexis Laferrière [Mon, 18 May 2015 11:46:18 +0000 (07:46 -0400)]
lib/bucketed_game: intro services to get stats on buckets

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

7 years agolib/android: intro motion down_time
Alexis Laferrière [Fri, 30 Jan 2015 14:57:46 +0000 (09:57 -0500)]
lib/android: intro motion down_time

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

7 years agolib & contrib: update users of Clock
Alexis Laferrière [Sat, 21 May 2016 13:59:33 +0000 (09:59 -0400)]
lib & contrib: update users of Clock

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

7 years agolib/realtime: free attributes of Clock at finalize_once
Alexis Laferrière [Sat, 21 May 2016 13:50:25 +0000 (09:50 -0400)]
lib/realtime: free attributes of Clock at finalize_once

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

7 years agolib/realtime: fix clock to return mostly Float values
Alexis Laferrière [Sat, 21 May 2016 13:57:52 +0000 (09:57 -0400)]
lib/realtime: fix clock to return mostly Float values

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

7 years agolib/realtime: fix `Timespec::-`
Alexis Laferrière [Sat, 21 May 2016 04:19:00 +0000 (00:19 -0400)]
lib/realtime: fix `Timespec::-`

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

7 years agolib/realtime: intro `Clock::peek_lapse`
Alexis Laferrière [Fri, 12 Jun 2015 21:12:55 +0000 (17:12 -0400)]
lib/realtime: intro `Clock::peek_lapse`

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

7 years agoMerge: Document Docker
Jean Privat [Sat, 21 May 2016 05:40:50 +0000 (01:40 -0400)]
Merge: Document Docker

Add documentation and an example of a docker image for a Nit application

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

7 years agoMerge: gamnit: miscellaneous services and a few fixes
Jean Privat [Sat, 21 May 2016 05:40:41 +0000 (01:40 -0400)]
Merge: gamnit: miscellaneous services and a few fixes

This PR groups features required by my recent unpublished tech demos built on gamnit.

Here are more details on the less intuitive commits:

* The change to `current_fps` lets a program use it right from the beginning and gives a value which is somewhat realistic (vs returning 0).
* The `placeholder_model` can be useful when quickly writing the prototype of a game to get something visible in the 3D space.
* The doc of `subtexture` clarifies an ambiguity as to whether the method expected pixel offsets or proportional values out of 1.0.
* The tool `texture_atlas_parser` can be useful to other games.
* `draw_mode` is very useful to create optimized `Mesh`, using `gl_TRIANGLE_STRIP` and `gl_TRIANGLE_FAN`.
* The old API of `triangulate` was counter-intuitive. The result was put in a parameter and the list of points was cleared in the process. This PR offers a simple method and the recursive implementation as an optimized alternative. ping @BlackMinou
* `tinks_vr` is not playable but it shows how to convert a gamnit game to a basic VR version.

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

7 years agoMerge: src/platforms: fallback to version field "0" on error when asking for a git_re...
Jean Privat [Sat, 21 May 2016 05:40:13 +0000 (01:40 -0400)]
Merge: src/platforms: fallback to version field "0" on error when asking for a git_revision

The _app.nit_ annotation `version` sets the version of mobile app packages (.apk and .app). For example, `version(1, 5, git_revision)` may produce the version string "1.5.6b42a7c".

This PR fixes an error when asking for a `git_revision` but the call to `git rev-parse` fails.
Note that the normal git error is printed before the nitc warning message, so debugging should be easy.

Close #2111

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

7 years agoMerge: Nitweb uses popcorn
Jean Privat [Sat, 21 May 2016 05:40:11 +0000 (01:40 -0400)]
Merge: Nitweb uses popcorn

Get rid of plain corn boiler plate code from nitweb.

Consider only the last two commits since the others are from #2094 and #2110.

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