nit.git
8 years agogitattributes: Stop watching for whitespaces in patch files
Lucas Bajolet [Wed, 19 Aug 2015 18:02:48 +0000 (14:02 -0400)]
gitattributes: Stop watching for whitespaces in patch files

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

8 years agobenchmarks/string: Added variants of lib to benchmarks
Lucas Bajolet [Tue, 18 Aug 2015 18:50:17 +0000 (14:50 -0400)]
benchmarks/string: Added variants of lib to benchmarks

* linear_substring: old version of String::substring
* buffered_ns: Perl-like over-allocation when concatenating Strings

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

8 years agobenchs/strings: Updated bench_strings, simplified code
Lucas Bajolet [Tue, 18 Aug 2015 18:42:45 +0000 (14:42 -0400)]
benchs/strings: Updated bench_strings, simplified code

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

8 years agobenchs/strings: Update string basic functions benchmarks
Lucas Bajolet [Mon, 17 Aug 2015 15:02:28 +0000 (11:02 -0400)]
benchs/strings: Update string basic functions benchmarks

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

8 years agoMerge: Better module doc within Vim
Jean Privat [Thu, 20 Aug 2015 20:22:40 +0000 (16:22 -0400)]
Merge: Better module doc within Vim

When searching for a module, generate list of introduced classes and properties to add to the user module documentation.

So from within vim, when entering `:Nit opts`, it shows:
~~~
# opts

Management of options on the command line

## Introduced classes
* Option: Super class of all option's class
* OptionArray: An option with an array as parameter
* OptionBool: A boolean option, `true` when present, `false` if not
* OptionContext: Context where the options process
* OptionCount: A count option. Count the number of time this option is present
* OptionEnum: An option to choose from an enumeration
* OptionFloat: An option with a Float as parameter
* OptionInt: An option with an Int as parameter
* OptionParameter: Option with one parameter (mandatory by default)
* OptionString: An option with a `String` as parameter
* OptionText: Not really an option. Just add a line of text when displaying the usage

## Introduced properties
+ VALUE  # Type of the value of the option
+ add_aliases(names: String...)  # Add new aliases for this option
+ default_value: VALUE  # Default value of this option
+ default_value=(default_value: VALUE)  # Default value of this option
+ errors: Array[String]  # Gathering errors during parsing
~ errors=(errors: Array[String])  # Gathering errors during parsing
+ helptext: String  # Human readable description of the option
~ helptext=(helptext: String)  # Human readable description of the option
+ hidden: Bool  # Is this option hidden from `usage`?
+ hidden=(hidden: Bool)  # Is this option hidden from `usage`?
+ init(help: String, default: VALUE, names: nullable Array[String])  # Create a new option
[...]
~~~

The list of properties can be long, but it is useful to search by keywords.

As usual, use `:pc` to **c**lose the **p**review window showing the doc.

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

8 years agovim doc: show introduced classes and props in the module doc
Alexis Laferrière [Thu, 20 Aug 2015 15:36:44 +0000 (11:36 -0400)]
vim doc: show introduced classes and props in the module doc

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

8 years agovim doc: extract writing the synopsis of a property
Alexis Laferrière [Thu, 20 Aug 2015 15:35:58 +0000 (11:35 -0400)]
vim doc: extract writing the synopsis of a property

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

8 years agovim doc: fix constructor names in generated doc
Alexis Laferrière [Thu, 20 Aug 2015 15:35:15 +0000 (11:35 -0400)]
vim doc: fix constructor names in generated doc

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

8 years agoMerge: Performance update on Buffer
Jean Privat [Thu, 20 Aug 2015 15:04:44 +0000 (11:04 -0400)]
Merge: Performance update on Buffer

This PR is essentially the same as #1632, which has been invalidated by some black magic.

This PR heavily improves the performance on FlatBuffer by introducing cache mechanisms on indexed access.

This is possible through removal of byte-level manipulation on Buffers and re-introduction of a constant-time length attribute on Buffer.

nitmd is now practicable again and should no longer take too much time when running benches.

This PR still depends on #1628, and as such will not pass no tests as long as it is not integrated

Pull-Request: #1644

8 years agotests: Update test_string_bytes
Lucas Bajolet [Tue, 11 Aug 2015 20:54:31 +0000 (16:54 -0400)]
tests: Update test_string_bytes

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

8 years agolib/binary: Fix binary lib to properly use Bytes instead of FlatBuffer
Lucas Bajolet [Tue, 11 Aug 2015 20:53:59 +0000 (16:53 -0400)]
lib/binary: Fix binary lib to properly use Bytes instead of FlatBuffer

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

8 years agolib/standard/text: Mutualized cache mechanism to FlatText
Lucas Bajolet [Tue, 11 Aug 2015 14:27:50 +0000 (10:27 -0400)]
lib/standard/text: Mutualized cache mechanism to FlatText

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

8 years agolib/standard/text: Removed byte-level modification on Buffers
Lucas Bajolet [Tue, 11 Aug 2015 14:13:54 +0000 (10:13 -0400)]
lib/standard/text: Removed byte-level modification on Buffers

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

8 years agoMerge: Intro Codec
Jean Privat [Thu, 20 Aug 2015 14:45:44 +0000 (10:45 -0400)]
Merge: Intro Codec

As UTF-8 is now part of Nit, the standard imposes conforming implementations to properly handle borderline cases like overlong sequences and such.

The codec defined here sanitizes an input before letting Nit play with it, avoiding potential security [issues](https://www.owasp.org/index.php/Canonicalization,_locale_and_Unicode)

The codec architecture can also be used later to handle different codings for source files (that or we decide that all that is not UTF-8 is to be rejected/misinterpreted) or text.

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

8 years agoMerge: Cleanup loader
Jean Privat [Thu, 20 Aug 2015 10:22:39 +0000 (06:22 -0400)]
Merge: Cleanup loader

Because #1250 is starting to stall and that my rewrite of the loader is not going well, I started last night an alternative approach: improve the existing loader in small steps.

This PR contains small cleaning on the loader, mainly documentation, small refactorization and bugfixes.
This is a small part of bigger modification still in progress, but I expect these commits to be good enough to be merged.

Pull-Request: #1638
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agoMerge: simplify glslangValidator test to support different versions of the tool
Jean Privat [Thu, 20 Aug 2015 02:30:47 +0000 (22:30 -0400)]
Merge: simplify glslangValidator test to support different versions of the tool

As reported in #1537, different versions of glslangValidator do not output the same error messages as they do not use the same default type for undeclared variables. This PR removes an error from the glsl code (or fix it if you prefer) so different versions of the tools have the same output. There are still many more errors to check that the integration of the tool within nitc works.

Fix #1537.

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

8 years agoMerge: Fix light FFI in interpreter on OS X
Jean Privat [Thu, 20 Aug 2015 02:30:39 +0000 (22:30 -0400)]
Merge: Fix light FFI in interpreter on OS X

Fix #1623 by removing the soname declaration (the soname was more of a placeholder at this time anyway). Also take this opportunity to remove the `-g` flag.

The fixes to the md5 modules update it to the latest style and use the nity/native pattern to avoid callbacks so it is light FFI compatible. This was used to test the interpreter on OS X.

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

8 years agotests: remove todo on soname error
Alexis Laferrière [Wed, 19 Aug 2015 19:07:01 +0000 (15:07 -0400)]
tests: remove todo on soname error

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

8 years agolib/md5: improve doc
Alexis Laferrière [Wed, 19 Aug 2015 18:46:47 +0000 (14:46 -0400)]
lib/md5: improve doc

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

8 years agotests: simplify glslValidator test to support different versions
Alexis Laferrière [Wed, 19 Aug 2015 19:22:46 +0000 (15:22 -0400)]
tests: simplify glslValidator test to support different versions

Fix #1537.

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

8 years agoMerge: Friendly jenkins checks
Jean Privat [Wed, 19 Aug 2015 19:02:06 +0000 (15:02 -0400)]
Merge: Friendly jenkins checks

Improve scripts to make jenkins error friendlier about licenses, signed-off-bys and whitespaces.

Scripts now write sentences and add a final note in case of error to explain how to solve the issues.
Once #1639 is merged, the life of new contributors will never be that easy.

Examples of new messages:

* `./checklicense.sh v0.7 63e0f2c` gives:

~~~
checklicense v0.7 (68561eb8d91800ccb3fa289bff6721ddd11dbe25) .. 63e0f2c (63e0f2c7cd96f4c40366d92614785b1006e52367)
These files are missing their licence:

benchmarks/polygons/nit/bench_polygon.nit

Please double check that the licence text (i.e. `This file is part of NIT...`) is included at the begin of these files.
~~~

* `./checksignedoffby.sh origin/master 63e0f2c7cd96f4c40366d92614785b1006e52367` gives:

~~~
checksignedoffby origin/master (b144984d92908662f47a251f1cca1fd8e57b2594) .. 63e0f2c7cd96f4c40366d92614785b1006e52367 (63e0f2c7cd96f4c40366d92614785b1006e52367)

Bad or missing Signed-off-by for commit
63e0f2c lib/graphs: add module for directed graphs
Expected (from local git config):
Signed-off-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Got:
Signed-off-by: Alexandre Blondin Massé <blondin_masse.alexandre@uqam.ca>

Please check that each commit contains a `Signed-off-by:` statement that matches the author's name and email.
Note that existing commits should be amended; pushing new commit is not sufficient.
~~~

* `./checkwhitespaces.sh origin/master e6cfa93` gives:

~~~
checkwhitespaces origin/master (b144984d92908662f47a251f1cca1fd8e57b2594) .. e6cfa93 (e6cfa93970687e33784c0251cf4da2f6e13d9f2c)

Found whitespace errors in commit
e6cfa93 Started documenting the digraph module.
lib/graphs/digraph.nit:5: trailing whitespace.
+#
lib/graphs/digraph.nit:13: trailing whitespace.
+#
lib/graphs/digraph.nit:18: trailing whitespace.
+#
lib/graphs/digraph.nit:21: trailing whitespace.
+#

Found whitespace errors in commit
e5c4311 Moved modules to lib/graphs.
lib/graphs/digraph.nit:313: trailing whitespace.
+ for

Found whitespace errors in commit
5e7bf24 Started MatrixDigraph.
lib/digraph.nit:313: trailing whitespace.
+ for

Found whitespace errors in commit
e6fd4d4 Basic methods for digraphs.
tests/test_graph.nit:34: new blank line at EOF.

Please check that each file in each commit does not contain whitespace errors.
Note that existing commits should be amended; pushing new commit is not sufficient.
Hint: use "git log --check" to see whitespace errors.
~~~

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

8 years agoMerge: jenkins: name command test results with `cmd` instead of `run`
Jean Privat [Wed, 19 Aug 2015 19:02:02 +0000 (15:02 -0400)]
Merge: jenkins: name command test results with `cmd` instead of `run`

The infamous bug that caused some tests result to silently make Jenkins go mad is found.
The issue was to have a junit package named `run`; unfortunately, package names are used as is in URL by Jenkins and `run` in URL seems to have a special buggy behavior. Eg

* http://gresil.org/jenkins/job/CI_github/lastCompletedBuild/testReport/run/foo
* http://gresil.org/jenkins/job/CI_github/lastCompletedBuild/testReport/notrun/foo

The solution is to name the pseudo-package `cmd` instead.

Pull-Request: #1639
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/md5: update to only rely on the light FFI
Alexis Laferrière [Wed, 19 Aug 2015 18:44:11 +0000 (14:44 -0400)]
lib/md5: update to only rely on the light FFI

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

8 years agonit: do not specify an soname (or -g) for JIT FFI libraries
Alexis Laferrière [Wed, 19 Aug 2015 18:34:57 +0000 (14:34 -0400)]
nit: do not specify an soname (or -g) for JIT FFI libraries

Fix #1623

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

8 years agojenkins: unitrun.sh does not generate empty system-out and system-err blocks
Jean Privat [Wed, 19 Aug 2015 18:33:05 +0000 (14:33 -0400)]
jenkins: unitrun.sh does not generate empty system-out and system-err blocks

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

8 years agojenkins: add checkwhitespace to be a more explicit and friendly `git log --check`
Jean Privat [Wed, 19 Aug 2015 06:56:36 +0000 (02:56 -0400)]
jenkins: add checkwhitespace to be a more explicit and friendly `git log --check`

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

8 years agojenkins: improve checksignedoffby to be more explicit and friendly
Jean Privat [Wed, 19 Aug 2015 06:55:53 +0000 (02:55 -0400)]
jenkins: improve checksignedoffby to be more explicit and friendly

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

8 years agojenkins: improve checklicense to be more explicit and friendly
Jean Privat [Wed, 19 Aug 2015 06:55:14 +0000 (02:55 -0400)]
jenkins: improve checklicense to be more explicit and friendly

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

8 years agoMerge: extends nitmd to handle manpages output format
Jean Privat [Wed, 19 Aug 2015 05:41:04 +0000 (01:41 -0400)]
Merge: extends nitmd to handle manpages output format

A lot of things are done here:

* extension of nitmd to handle more output formats
* new man decorator to transform markdown into basic groff suitable for manpages. Close #1506
* remove dubious usage of definition list in our markdown. Close #1594
* remove the use of pandoc and use nitmd to generate our manpages. Close #824

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

8 years agomanpages: use nitmd instead of pandoc
Jean Privat [Wed, 19 Aug 2015 05:33:14 +0000 (01:33 -0400)]
manpages: use nitmd instead of pandoc

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

8 years agoloader: document ` identify_file`
Jean Privat [Tue, 18 Aug 2015 12:47:14 +0000 (08:47 -0400)]
loader: document ` identify_file`

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

8 years agoloader: identify_file do really return null is the path does not exists
Jean Privat [Tue, 18 Aug 2015 12:45:17 +0000 (08:45 -0400)]
loader: identify_file do really return null is the path does not exists

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

8 years agoloader: single module group `is_interesting` if the module is not the default one
Jean Privat [Tue, 18 Aug 2015 12:31:50 +0000 (08:31 -0400)]
loader: single module group `is_interesting` if the module is not the default one

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

8 years agoMerge: Graph theory in Nit
Jean Privat [Tue, 18 Aug 2015 17:59:22 +0000 (13:59 -0400)]
Merge: Graph theory in Nit

Close #1386

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

8 years agolib/graphs: adds module for directed graphs.
Alexandre Blondin Massé [Tue, 25 Nov 2014 22:17:54 +0000 (17:17 -0500)]
lib/graphs: adds module for directed graphs.

Signed-off-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>

8 years agojenkins: name command test results with `cmd` instead of `run`
Jean Privat [Tue, 18 Aug 2015 15:56:56 +0000 (11:56 -0400)]
jenkins: name command test results with `cmd` instead of `run`

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

8 years agoloader: scan_group do not rescan
Jean Privat [Tue, 18 Aug 2015 12:30:47 +0000 (08:30 -0400)]
loader: scan_group do not rescan

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

8 years agoloader: rename (and document) `visit_group` as `scan_group`
Jean Privat [Tue, 18 Aug 2015 12:29:22 +0000 (08:29 -0400)]
loader: rename (and document) `visit_group` as `scan_group`

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

8 years agoloader: identify_file use the absence of '/' for special behavior
Jean Privat [Tue, 18 Aug 2015 12:20:08 +0000 (08:20 -0400)]
loader: identify_file use the absence of '/' for special behavior

Now `./standard` and `standard` have a different meaning

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

8 years agoMerge: Performance improvement in read_all_bytes
Jean Privat [Mon, 17 Aug 2015 20:15:27 +0000 (16:15 -0400)]
Merge: Performance improvement in read_all_bytes

As @privat notified me of yesterday, a lot of time is wasted in read_all by boxing and unboxing bytes when doing the infamous `_buffer.add` operation in `read_all_bytes`.

This PR removes the boxing operations by bulk-writing a NativeString to a Bytes.
The buffer on files is also tenfold-bigger, which cuts I/O times while still retaining a reasonable size.

# Performances

On the Batmobile™

## Valgrind

Before:
standard___standard__BufferedReader___Reader__read_all_bytes: 90.816 MIr
After:
standard___standard__BufferedReader___Reader__read_all_bytes: 7.596 MIr

## ./ncall-best

Before
user 0m4.316s
After
user 0m4.182s

Close #1298

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

8 years agomanpages: use 3rd heading level instead of definition lists
Jean Privat [Mon, 17 Aug 2015 19:58:14 +0000 (15:58 -0400)]
manpages: use 3rd heading level instead of definition lists

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

8 years agomarkdown: add a makefile
Jean Privat [Mon, 17 Aug 2015 19:33:18 +0000 (15:33 -0400)]
markdown: add a makefile

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

8 years agomarkdown: new decorator for manpages
Jean Privat [Mon, 17 Aug 2015 19:21:11 +0000 (15:21 -0400)]
markdown: new decorator for manpages

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

8 years agomarkdown: nitmd have a --to option (`html` and `md` for now)
Jean Privat [Mon, 17 Aug 2015 19:12:07 +0000 (15:12 -0400)]
markdown: nitmd have a --to option (`html` and `md` for now)

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

8 years agomarkdown: nitmd use lib/opts
Jean Privat [Mon, 17 Aug 2015 19:10:14 +0000 (15:10 -0400)]
markdown: nitmd use lib/opts

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

8 years agomarkdown: add another indirection to render a single character
Jean Privat [Mon, 17 Aug 2015 18:45:35 +0000 (14:45 -0400)]
markdown: add another indirection to render a single character

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

8 years agomarkdown: fix ordered list in MdDecorator
Jean Privat [Mon, 17 Aug 2015 18:44:58 +0000 (14:44 -0400)]
markdown: fix ordered list in MdDecorator

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

8 years agotests: Added read_all test
Lucas Bajolet [Tue, 11 Aug 2015 13:48:37 +0000 (09:48 -0400)]
tests: Added read_all test

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

8 years agolib/standard/stream: Fix doc of buffer_reset
Lucas Bajolet [Tue, 11 Aug 2015 13:45:33 +0000 (09:45 -0400)]
lib/standard/stream: Fix doc of buffer_reset

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

8 years agolib/standard: Added coder and decoder to streams
Lucas Bajolet [Tue, 11 Aug 2015 15:02:22 +0000 (11:02 -0400)]
lib/standard: Added coder and decoder to streams

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

8 years agolib/standard/: Added codecs group to Standard
Lucas Bajolet [Wed, 5 Aug 2015 17:17:54 +0000 (13:17 -0400)]
lib/standard/: Added codecs group to Standard

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

8 years agolib/standard/bytes: Modified implementation of `to_bytes` in Text and added append
Lucas Bajolet [Fri, 14 Aug 2015 17:32:50 +0000 (13:32 -0400)]
lib/standard/bytes: Modified implementation of `to_bytes` in Text and added append

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

8 years agolib/file: Remove _buffer.add in stream.read_all
Lucas Bajolet [Fri, 14 Aug 2015 16:40:36 +0000 (12:40 -0400)]
lib/file: Remove _buffer.add in stream.read_all

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

8 years agoMerge: Fixints
Jean Privat [Fri, 14 Aug 2015 12:59:25 +0000 (08:59 -0400)]
Merge: Fixints

As promised, a check off the TODO list for #1266 and for low-level users: fixed-size Integers.

A literal rule has been added for these types, namely:

* i8: Signed Integer 8 bits
* i16: Signed Integer 16 bits
* i32: Signed Integer 32 bits
* u16: Unsigned Integer 16 bits
* u32: Unsigned Integer 32 bits

Note that an Unsigned Integer 8 bits is missing because of Bytes, which gets to keep its `u8` suffix until we decide of something

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

8 years agoMerge: Tinks! remove duplicated code in event reaction
Jean Privat [Thu, 13 Aug 2015 22:15:13 +0000 (18:15 -0400)]
Merge: Tinks! remove duplicated code in event reaction

The sequence of `isa` is redundant with the polymorphic calls client_react. Possibly an unfinished refactorization or some git rebase issue.

ping @xymus

Pull-Request: #1635
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agoMerge: Benitlux report: prettier availability graph and fix errors in beer names
Jean Privat [Thu, 13 Aug 2015 22:15:11 +0000 (18:15 -0400)]
Merge: Benitlux report: prettier availability graph and fix errors in beer names

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

8 years agotinks: remove duplicated code in event reaction
Jean Privat [Thu, 13 Aug 2015 15:55:33 +0000 (11:55 -0400)]
tinks: remove duplicated code in event reaction

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

8 years agotests: Added test for fixed-size integers
Lucas Bajolet [Mon, 10 Aug 2015 15:24:45 +0000 (11:24 -0400)]
tests: Added test for fixed-size integers

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

8 years agolib/standard: Added fixints in standard imports
Lucas Bajolet [Mon, 10 Aug 2015 15:24:23 +0000 (11:24 -0400)]
lib/standard: Added fixints in standard imports

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

8 years agolib/standard/text: Moved all number-related functions to fixed_ints
Lucas Bajolet [Mon, 10 Aug 2015 15:23:17 +0000 (11:23 -0400)]
lib/standard/text: Moved all number-related functions to fixed_ints

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

8 years agolib/standard: Added fixed-size integers to standard
Lucas Bajolet [Mon, 10 Aug 2015 15:22:40 +0000 (11:22 -0400)]
lib/standard: Added fixed-size integers to standard

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

8 years agosrc/interpreter: Added fixints to interpreter
Lucas Bajolet [Mon, 10 Aug 2015 18:12:21 +0000 (14:12 -0400)]
src/interpreter: Added fixints to interpreter

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

8 years agosrc/compiler: Added fixint variants to compiler
Lucas Bajolet [Fri, 7 Aug 2015 19:49:15 +0000 (15:49 -0400)]
src/compiler: Added fixint variants to compiler

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

8 years agocontrib/benitlux: add year-month as column headers in graph
Alexis Laferrière [Wed, 12 Aug 2015 15:01:48 +0000 (11:01 -0400)]
contrib/benitlux: add year-month as column headers in graph

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

8 years agocontrib/benitlux: use a different background for half of the year
Alexis Laferrière [Wed, 12 Aug 2015 15:01:08 +0000 (11:01 -0400)]
contrib/benitlux: use a different background for half of the year

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

8 years agocontrib/benitlux: update old constructors
Alexis Laferrière [Wed, 12 Aug 2015 15:00:41 +0000 (11:00 -0400)]
contrib/benitlux: update old constructors

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

8 years agocontrib/benitlux: add module to correct beer name errors
Alexis Laferrière [Wed, 12 Aug 2015 14:57:23 +0000 (10:57 -0400)]
contrib/benitlux: add module to correct beer name errors

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

8 years agoMerge: Crazy Moles with particle effects, nukes, Bézier curves and cacti disguised...
Jean Privat [Thu, 13 Aug 2015 01:59:39 +0000 (21:59 -0400)]
Merge: Crazy Moles with particle effects, nukes, Bézier curves and cacti disguised as moles

This PR adds new features to the Crazy Moles/Groundhogs game. Pretty graphical effects with particles, Bézier curves and a custom C method to display flash effects. Plus two new traps; the cactus disguised as a mole and the much awaited nuke. This PR also updates the project tools and style, fix a few annoyances and adds a basic script to stress test on Android.

The script to test on Android was an experiment with adb monkey for a future integration with Jenkins.

What is not in this PR: sounds, fullscreen on Android and other Android specific features.

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

8 years agoMerge: Mongodb: fix C warnings and avoid crash caused by GC
Jean Privat [Thu, 13 Aug 2015 01:59:31 +0000 (21:59 -0400)]
Merge: Mongodb: fix C warnings and avoid crash caused by GC

Everything is in the title.

For more about the crash see issue #1629.

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

8 years agotests: remove sav for moles as its execution is no more tested
Alexis Laferrière [Wed, 12 Aug 2015 21:09:42 +0000 (17:09 -0400)]
tests: remove sav for moles as its execution is no more tested

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

8 years agoexamples/moles: move crazy moles to the contrib folder
Alexis Laferrière [Wed, 12 Aug 2015 18:45:23 +0000 (14:45 -0400)]
examples/moles: move crazy moles to the contrib folder

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

8 years agolib/standard/bytes: Update bytes::to_s for cleaning purposes
Lucas Bajolet [Wed, 12 Aug 2015 18:53:01 +0000 (14:53 -0400)]
lib/standard/bytes: Update bytes::to_s for cleaning purposes

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

8 years agolib/standard/bytes: Added cleaning method on Bytes when converting to String
Lucas Bajolet [Wed, 5 Aug 2015 19:35:53 +0000 (15:35 -0400)]
lib/standard/bytes: Added cleaning method on Bytes when converting to String

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

8 years agoexamples/moles: use a timeout to prevent changing state too fast
Alexis Laferrière [Tue, 11 Aug 2015 19:58:05 +0000 (15:58 -0400)]
examples/moles: use a timeout to prevent changing state too fast

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

8 years agoexamples/moles: apply FIXME with `min` as instructed by past me
Alexis Laferrière [Tue, 11 Aug 2015 19:21:43 +0000 (15:21 -0400)]
examples/moles: apply FIXME with `min` as instructed by past me

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

8 years agoexamples/moles: make `Screen::game` lazy to fix scaling problems on Android
Alexis Laferrière [Tue, 11 Aug 2015 18:47:54 +0000 (14:47 -0400)]
examples/moles: make `Screen::game` lazy to fix scaling problems on Android

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

8 years agoexamples/moles: tweak distances
Alexis Laferrière [Tue, 11 Aug 2015 18:47:10 +0000 (14:47 -0400)]
examples/moles: tweak distances

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

8 years agoexamples/moles: intro new traps; nukes and big cacti disguised as moles
Alexis Laferrière [Sun, 9 Aug 2015 15:00:34 +0000 (11:00 -0400)]
examples/moles: intro new traps; nukes and big cacti disguised as moles

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

8 years agoexamples/moles: add graphical effects; particles and flashes
Alexis Laferrière [Tue, 11 Aug 2015 18:58:20 +0000 (14:58 -0400)]
examples/moles: add graphical effects; particles and flashes

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

8 years agoexamples/moles: update the top UI
Alexis Laferrière [Tue, 11 Aug 2015 13:38:52 +0000 (09:38 -0400)]
examples/moles: update the top UI

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

8 years agoexamples/moles: use a darker background
Alexis Laferrière [Tue, 11 Aug 2015 13:38:34 +0000 (09:38 -0400)]
examples/moles: use a darker background

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

8 years agoexamples/moles: update and add new art
Alexis Laferrière [Tue, 11 Aug 2015 18:51:45 +0000 (14:51 -0400)]
examples/moles: update and add new art

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

8 years agoexamples/moles: avoid tapping the moles in the back first
Alexis Laferrière [Sun, 9 Aug 2015 15:00:05 +0000 (11:00 -0400)]
examples/moles: avoid tapping the moles in the back first

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

8 years agoexamples/moles: extract selection of what appears in holes
Alexis Laferrière [Sun, 9 Aug 2015 14:59:43 +0000 (10:59 -0400)]
examples/moles: extract selection of what appears in holes

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

8 years agoexamples/moles: revamp the hole state logic with HoleContent
Alexis Laferrière [Sun, 9 Aug 2015 13:31:35 +0000 (09:31 -0400)]
examples/moles: revamp the hole state logic with HoleContent

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

8 years agoexamples/moles: update style and doc
Alexis Laferrière [Sun, 9 Aug 2015 13:20:46 +0000 (09:20 -0400)]
examples/moles: update style and doc

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

8 years agoexamples/moles: update Makefile
Alexis Laferrière [Sun, 9 Aug 2015 02:48:48 +0000 (22:48 -0400)]
examples/moles: update Makefile

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

8 years agoexamples/moles: clean up management of `App::screen`
Alexis Laferrière [Sun, 9 Aug 2015 13:23:20 +0000 (09:23 -0400)]
examples/moles: clean up management of `App::screen`

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

8 years agoexamples/moles: update to inkscape_tools instead of the old bash script
Alexis Laferrière [Sun, 9 Aug 2015 02:48:32 +0000 (22:48 -0400)]
examples/moles: update to inkscape_tools instead of the old bash script

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

8 years agoMerge: Markdown fix
Jean Privat [Wed, 12 Aug 2015 14:59:41 +0000 (10:59 -0400)]
Merge: Markdown fix

Fix a small bug in Markdown, in some cases pos could be negative if `skip_spaces` at line 2093 returned -1

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

8 years agoexamples/moles: check android version using adb monkey and an emulator
Alexis Laferrière [Sat, 8 Aug 2015 17:48:16 +0000 (13:48 -0400)]
examples/moles: check android version using adb monkey and an emulator

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

8 years agolib/markdown: Fix a bug in check_link
Lucas Bajolet [Wed, 29 Jul 2015 15:41:20 +0000 (11:41 -0400)]
lib/markdown: Fix a bug in check_link

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

8 years agomongodb: avoid MongoCollection finalization by garbage collection
Alexandre Terrasa [Mon, 10 Aug 2015 22:29:18 +0000 (18:29 -0400)]
mongodb: avoid MongoCollection finalization by garbage collection

Related to #1629

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

8 years agomongodb: fix C warnings
Alexandre Terrasa [Mon, 10 Aug 2015 22:27:37 +0000 (18:27 -0400)]
mongodb: fix C warnings

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

8 years agoMerge: c_tool: reorder CC arguments since the semantic between gcc and clang differs
Jean Privat [Mon, 10 Aug 2015 19:36:23 +0000 (15:36 -0400)]
Merge: c_tool: reorder CC arguments since the semantic between gcc and clang differs

Just a reordering to really silent the warning on osx

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

8 years agolib/standard/text: Updated to_num to support fix ints
Lucas Bajolet [Fri, 7 Aug 2015 17:43:10 +0000 (13:43 -0400)]
lib/standard/text: Updated to_num to support fix ints

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

8 years agoMerge: tests: specific mass-definition of tests marked todo
Jean Privat [Mon, 10 Aug 2015 16:13:02 +0000 (12:13 -0400)]
Merge: tests: specific mass-definition of tests marked todo

The magic string "NOT YET IMPLEMENTED" that is used to mark tests as *todo* are now extendable as new magic strings can be added to the `todo` file (one per line)
Moreover, specific engines and platforms can define additional magic strings in the `todo` files in their `sav` subdirectories.
E.g. `sav/Darwin/todo` for magic strings that will be used only for tests run on max os x.

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

8 years agoMerge: separate_compiler: remove the use of weak symbols.
Jean Privat [Mon, 10 Aug 2015 16:13:00 +0000 (12:13 -0400)]
Merge: separate_compiler: remove the use of weak symbols.

thus always compile stub of methods to avoid unresolved symbols

weak symbols seem to cause issues on some platforms *cough mac os x cough*

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

8 years agoMerge: Clean primitive
Jean Privat [Mon, 10 Aug 2015 16:12:58 +0000 (12:12 -0400)]
Merge: Clean primitive

Cleaning of binary operations on primitive data types:

* `lshift` and `rshift` are replaced by the usual `<<` and `>>`
* `bin_and` is replaced by `&`
* `bin_or` is replaced by `|`
* `bin_not` is replaced by `~`
* `bin_xor` is replaced by `^`

Note: Due to bootstrap issues, `<<` and `>>` are now FFI

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

8 years agoMerge: More abstract classes
Jean Privat [Mon, 10 Aug 2015 16:12:53 +0000 (12:12 -0400)]
Merge: More abstract classes

The current leniency of abstract methods (see #808) make that a lot of concrete classes inherit abstract methods (I counted 5048 cases in the whole code base).
Some trivial cases are classes that just should be abstract.

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