Jean Privat [Sat, 22 Aug 2015 02:56:56 +0000 (22:56 -0400)]
check_contrib: additional rules are given by arguments.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 22 Aug 2015 02:54:58 +0000 (22:54 -0400)]
check_contrib: also check lib
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Aug 2015 23:31:44 +0000 (19:31 -0400)]
Merge: GitHub nitlang
Migrate references from https://github.com/privat/nit to https://github.com/nitlang/nit
Pull-Request: #1651
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 21 Aug 2015 21:54:41 +0000 (17:54 -0400)]
various lib and contrib doc: points to new github repo
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Aug 2015 21:53:34 +0000 (17:53 -0400)]
lib/github: use new github repo nitlang/nit in doc and tests
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Aug 2015 21:52:17 +0000 (17:52 -0400)]
nitrpg: use new github repo
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Aug 2015 21:51:53 +0000 (17:51 -0400)]
github_merge: use new github repo
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Aug 2015 21:51:26 +0000 (17:51 -0400)]
fdroid: update metadata with new github repo
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Aug 2015 21:50:53 +0000 (17:50 -0400)]
Makefile: link generated doc with new github repo
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Aug 2015 19:48:25 +0000 (15:48 -0400)]
Merge: objcwrapper: wrapper generator to access Objective-C services from Nit
This PR introduces *objcwrapper*, a wrapper generator to access Objective-C services from Nit. At this point, *objcwrapper* can parse large Objective-C header files from Apple, and generate valid Nit code to wrap simple classes.
This PR contains the work of @Tagachi (as the first commit), some of my refactoring and new features. Because of this, there is some rewrite between commits. I chose to keep them as-is because it may be useful to debug regressions in the future. Actually, some of the refactoring remove a few features (such as super class declaration parsing), they will be brought back in future PRs.
This is a good base for future work but also a work in progress. Please restrain comments to structural and algorithmic problems, the doc and manual will be completed with the missing features.
Working features:
- [x] Generate a Nit extern class for each Objective-C `@interface` block.
- [x] Generate Nit extern methods to wrap Objective-C methods (`- `).
- [x] Generate getters for attributes `@property`.
- [x] Basic type conversion from Objective-C to Nit.
- [x] Partial detection of supported and unsupported types.
Todo features:
- [ ] Static functions (`+`) as top-level methods.
- [ ] Attribute setter (when not `readonly`).
- [ ] Intro and use an `ObjcType` instead of a `String`.
- [ ] Reproduce class hierarchy.
- [ ] Reuse wrapped classes (serialize the model alongside the wrapper).
- [ ] Deal with incompatible types: function pointers and others.
- [ ] Print a report on unsupported services.
- [ ] Support parsing GNUstep classes.
- [ ] Generate valid Nit code with Apple classes.
- [ ] Merge with *jwrapper*?
Pull-Request: #1647
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Fri, 21 Aug 2015 19:22:36 +0000 (15:22 -0400)]
Merge: lib/code/standard: hash no more divides object_id by 8
Since objects are allocated on 64bit word boundaries, it made scene to remove the three 000 lower bits and increase the entropy of the hashcode.
Unfortunately, primitive objects like low Int values or Bool have a object_id lower than 8. shifting the 3 last bits was thus a bad idea.
Therefore, programs that used Int or Bool as keys (or part of keys) did have a lot of hash collisions.
For instance, before, for lib/ai/examples/puzzle.nit:
* number of collisions: 525428 (84.49%)
* average length of collisions: 12.44
After:
* number of collisions: 256223 (41.20%)
* average length of collisions: 3.16
The change have a limiting effect on programs that mainly use standard objects as keys.
Before, for nitc:
* number of collisions: 661715 (16.18%)
* average length of collisions: 2.24
After:
* number of collisions: 711614 (17.40%)
* average length of collisions: 2.25
Pull-Request: #1646
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 21 Aug 2015 15:36:36 +0000 (11:36 -0400)]
contrib/objcwrapper: write import only once per file
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 21 Aug 2015 15:47:35 +0000 (11:47 -0400)]
contrib/objcwrapper: refactor services and update style of CodeGenerator
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 21 Aug 2015 15:29:19 +0000 (11:29 -0400)]
contrib/objcwrapper: revamp the AST visitor
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 20 Aug 2015 20:23:33 +0000 (16:23 -0400)]
contrib/objcwrapper: rename a few AST nodes to 'parameter'
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 20 Aug 2015 20:02:16 +0000 (16:02 -0400)]
contrib/objcwrapper: add the -o option to specify the output file
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 20 Aug 2015 20:58:20 +0000 (16:58 -0400)]
contrib/objcwrapper: intro basic framework for command line options
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 20 Aug 2015 20:01:28 +0000 (16:01 -0400)]
contrib/objcwrapper: refactor `init_with_alloc` as an attribute
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 20 Aug 2015 16:30:18 +0000 (12:30 -0400)]
contrib/objcwrapper: merge some type-related tokens in grammar
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 12 Aug 2015 20:30:39 +0000 (16:30 -0400)]
contrib/objcwrapper: move header_static to local folders
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 12 Aug 2015 20:20:08 +0000 (16:20 -0400)]
contrib/objcwrapper: add a new line at the end of the generated file
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 11 Aug 2015 22:29:01 +0000 (18:29 -0400)]
contrib/objcwrapper: report parsing errors
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 11 Aug 2015 21:11:52 +0000 (17:11 -0400)]
contrib/objcwrapper: add some doc and license
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 7 Aug 2015 16:27:39 +0000 (12:27 -0400)]
contrib/objcwrapper: add the check rule with a few tests
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 7 Aug 2015 16:05:35 +0000 (12:05 -0400)]
contrib/objcwrapper: add git structure and Makefile
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Arthur Delamare [Mon, 13 Apr 2015 22:42:20 +0000 (18:42 -0400)]
contrib/objcwrapper: intro objcwrapper base code
Signed-off-by: Arthur Delamare <arthur.delamare@viacesi.fr>
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
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>
Jean Privat [Thu, 20 Aug 2015 16:50:50 +0000 (12:50 -0400)]
lib/code/standard: hash no more divides object_id by 8
Signed-off-by: Jean Privat <jean@pryen.org>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>