nit.git
8 years agosrc/i18n_phase: accepts string literals within a superstring
Alexis Laferrière [Fri, 19 Jun 2015 14:59:53 +0000 (10:59 -0400)]
src/i18n_phase: accepts string literals within a superstring

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

8 years agoMerge: Check for errors in regex within string literals at compilation
Jean Privat [Fri, 19 Jun 2015 19:41:12 +0000 (15:41 -0400)]
Merge: Check for errors in regex within string literals at compilation

This is the first part for #1511.

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

8 years agoMerge: niti-ffi: NativeString is re-a `char*` since #1502
Jean Privat [Fri, 19 Jun 2015 19:41:09 +0000 (15:41 -0400)]
Merge: niti-ffi: NativeString is re-a `char*` since #1502

This removes a warning during the initial make.

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

8 years agoniti-ffi: NativeString is re-a `char*` since #1502
Jean Privat [Fri, 19 Jun 2015 02:06:57 +0000 (22:06 -0400)]
niti-ffi: NativeString is re-a `char*` since #1502

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

8 years agoMerge: Bug fixes in SSA module
Jean Privat [Fri, 19 Jun 2015 01:34:47 +0000 (21:34 -0400)]
Merge: Bug fixes in SSA module

This small PR fixes two bugs in SSA.

First: A property was unecessary specific in the hierarchy.
Second: Bad initialization of two attributes which cause runtime error in new tests.

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

8 years agoMerge: Fix FFI with private extern classes not needing a "C Header" block
Jean Privat [Fri, 19 Jun 2015 01:33:41 +0000 (21:33 -0400)]
Merge: Fix FFI with private extern classes not needing a "C Header" block

According to the [manual of the C FFI for wrappers](http://nitlanguage.org/FFI/wrapping_C_libraries/), a private extern class does not need to import (or declare) its C equivalent type in the "C header" it can be done only in the "C body" (or the default "C" block).

This bug broke this feature. It may have been reintroduced by 16f94e0, or maybe even before. This PR adds a test to prevent future regression.

Bug referenced in #1520.

Pull-Request: #1521
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

8 years agotests: test regular expression validation phase
Alexis Laferrière [Thu, 18 Jun 2015 19:30:29 +0000 (15:30 -0400)]
tests: test regular expression validation phase

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

8 years agosrc/frontend: add a phase to validate regular expression
Alexis Laferrière [Thu, 18 Jun 2015 14:25:53 +0000 (10:25 -0400)]
src/frontend: add a phase to validate regular expression

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

8 years agossa: Delete an unused variable
Julien Pagès [Thu, 18 Jun 2015 14:03:13 +0000 (16:03 +0200)]
ssa: Delete an unused variable

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

8 years agossa: Bug fixe with a wrong initialization
Julien Pagès [Thu, 18 Jun 2015 13:14:06 +0000 (15:14 +0200)]
ssa: Bug fixe with a wrong initialization

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

8 years agossa: Make a property more general
Julien Pagès [Mon, 15 Jun 2015 14:46:38 +0000 (16:46 +0200)]
ssa: Make a property more general

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

8 years agotests: mark as undefined tests using NativeFile, hacked in niti
Alexis Laferrière [Thu, 18 Jun 2015 12:48:22 +0000 (08:48 -0400)]
tests: mark as undefined tests using NativeFile, hacked in niti

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

8 years agolib/signals: fix missing import and initializer for GCC
Alexis Laferrière [Thu, 18 Jun 2015 12:45:06 +0000 (08:45 -0400)]
lib/signals: fix missing import and initializer for GCC

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

8 years agolib/signals: do no pin references if the FFI feature is not available
Alexis Laferrière [Thu, 18 Jun 2015 12:39:17 +0000 (08:39 -0400)]
lib/signals: do no pin references if the FFI feature is not available

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

8 years agolib/signals: clean up whitespaces and style
Alexis Laferrière [Thu, 18 Jun 2015 12:37:54 +0000 (08:37 -0400)]
lib/signals: clean up whitespaces and style

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

8 years agolib/signals: remove full FFI features from the module blocks
Alexis Laferrière [Thu, 18 Jun 2015 12:37:21 +0000 (08:37 -0400)]
lib/signals: remove full FFI features from the module blocks

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

8 years agotests: intro a test with the different FFI module block
Alexis Laferrière [Tue, 16 Jun 2015 23:50:37 +0000 (19:50 -0400)]
tests: intro a test with the different FFI module block

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

8 years agosrc/ffi: do not declare the impl signature before the custom C code
Alexis Laferrière [Tue, 16 Jun 2015 23:16:50 +0000 (19:16 -0400)]
src/ffi: do not declare the impl signature before the custom C code

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

8 years agoMerge branch 'master' into lib-use-light-ffi
Alexis Laferrière [Thu, 18 Jun 2015 11:28:23 +0000 (07:28 -0400)]
Merge branch 'master' into lib-use-light-ffi

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

8 years agoMerge: Second batch of RosettaCode
Jean Privat [Thu, 18 Jun 2015 03:09:37 +0000 (23:09 -0400)]
Merge: Second batch of RosettaCode

In this one, I rewrote the commits to squash them, clean them and add tests.

Since the commits are rewrote, their sha1 differ so the PR numbers are added in the descriptions of the commits to keep track of the original request.

Pull-Request: #1519
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

8 years agoMerge: Do not compile dead modules
Jean Privat [Thu, 18 Jun 2015 03:09:33 +0000 (23:09 -0400)]
Merge: Do not compile dead modules

Separate compilation implies that a module is compiled independently of its clients.
This point ensure us that the recompilation of programs is fast since only modified modules need to be recompiled and that modules used by multiples clients need to be compiled only once.

Unfortunately, currently an already compiled module need to still to be fully compiled in C on each compilation (avoiding doing it is a very complex matter). Fortunately, most of the compilation time is spend by the C compiler (especially when #1498) and this time is safely decimated by ccache.

However, a thing that some modules are imported by programs (thus provide declarations, introductions, importations) but are only made of method definitions that will never be executed by the program. Such a module is called a *dead* module and our static analysis RTA can approximate them.
So, now, the generation of C code for such a module is skipped (and its associated C compilation, obviously)

This will benefit mostly small programs that imports standard and other libraries but only use a small portion of them. Eg: programs in `tests/` or in `examples/rossetacode`.

For numbers, lets try with `time ./tests.sh ../examples/rosettacode/*.nit` to test the 32 (currently) programs.

* before: 30s
* after: 21s

I hope that CI servers will like what we, human masters, do for them!

Pull-Request: #1509
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

8 years agotests: other update related to adaptive typing messages
Jean Privat [Thu, 18 Jun 2015 02:26:12 +0000 (22:26 -0400)]
tests: other update related to adaptive typing messages

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

8 years agotests: new tests base_adaptive_loop_null2.nit base_adaptive_loop_isa.nit
Jean Privat [Thu, 18 Jun 2015 02:12:29 +0000 (22:12 -0400)]
tests: new tests base_adaptive_loop_null2.nit base_adaptive_loop_isa.nit

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

8 years agotyping: warn about useless null when the target is always `null`
Jean Privat [Thu, 18 Jun 2015 01:51:44 +0000 (21:51 -0400)]
typing: warn about useless null when the target is always `null`

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

8 years agotyping: warnings related to adaptive typing are moved to the post_typing
Jean Privat [Thu, 18 Jun 2015 01:49:56 +0000 (21:49 -0400)]
typing: warnings related to adaptive typing are moved to the post_typing

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

8 years agolib/markdown: fix markdown used in documentation (how ironic)
Jean Privat [Thu, 18 Jun 2015 02:51:02 +0000 (22:51 -0400)]
lib/markdown: fix markdown used in documentation (how ironic)

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

8 years agotyping: new PostTypingVisitor that is run after the visit
Jean Privat [Thu, 18 Jun 2015 01:49:38 +0000 (21:49 -0400)]
typing: new PostTypingVisitor that is run after the visit

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

8 years agotyping: factorize AEqExpr and ANeExpr into AEqFormExpr
Jean Privat [Thu, 18 Jun 2015 01:46:19 +0000 (21:46 -0400)]
typing: factorize AEqExpr and ANeExpr into AEqFormExpr

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

8 years agoast: new class AEqFormExpr to factorize AEqExpr and ANeExpr
Jean Privat [Thu, 18 Jun 2015 01:44:22 +0000 (21:44 -0400)]
ast: new class AEqFormExpr to factorize AEqExpr and ANeExpr

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

8 years agotyping: `or else` on null is no more an error
Jean Privat [Thu, 18 Jun 2015 01:14:51 +0000 (21:14 -0400)]
typing: `or else` on null is no more an error

A warning at most

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

8 years agotests: update line number with latest changes to the lib
Alexis Laferrière [Wed, 17 Jun 2015 20:17:50 +0000 (16:17 -0400)]
tests: update line number with latest changes to the lib

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

8 years agofixup: add first_letter_last_letter niti.skip
Jean Privat [Wed, 17 Jun 2015 20:15:13 +0000 (16:15 -0400)]
fixup: add first_letter_last_letter niti.skip

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

8 years agoMerge: Light FFI for the interpreter
Jean Privat [Wed, 17 Jun 2015 20:14:38 +0000 (16:14 -0400)]
Merge: Light FFI for the interpreter

Intro an FFI for the interpreter. This is a first draft/proof of concept to support the light FFI and few more features, more work is needed to implement the full FFI and support for other languages.

When the interpreter has to execute an extern method, it compiles all the extern code of the modules into an external native shared library (.so). Then the interpreter load dynamically the module, and invoke the C implementation function. The handle to the library is cached so a module isn't compiled twice per execution.

The current version is limited to the light FFI with a few more features. So there is extern methods, native type support and extern classes but it does not support callbacks.

The interpreter can now run 7 out of the 24 tests for the FFI with C.

This version was kept "simple" by design, it lacks some not-so-hard to implement features as well as portability concerns:
* Choosing the compiler (hard coded gcc) and the compile folder.
* Recompile the extern library only when the source is updated.
* Clear the compile folder.
* Support shared library format on OS X.
* Ensure call compatibility between the interpreter and extern libraries

The remaining features of the FFI, the callbacks and the other languages, require a decent amount of work but less than this PR.

Note that not a single line of code was added to the FFI folder, it uses the exact same backend as the compiler without modifications.

The design was inspired by other interpreters and VM-based languages. The JNI expect the user to manually compile the extern code into a native shared library before executing the Java code. This FFI automates the same process.

---

Please ignore the first 6 commits from #1441 and #1442.

Pull-Request: #1443
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Ait younes Mehdi Adel <overpex@gmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agoMerge: More limit on tests
Jean Privat [Wed, 17 Jun 2015 19:47:24 +0000 (15:47 -0400)]
Merge: More limit on tests

Implemented more kind of size and time limits in `tests.sh` so that broken tests will not fill the disk with useless garbage.

realtimelimit is the existing time limit (in seconds)
It is used to avoid waiting or sleeping tests.
It requires timeout or timelimit, or else is not used.
The main change is the name (there is one now) and is lowered to 5 min

usertimelimit is an additional user CPU time limit (in seconds)
It is used to avoid to CPU intensive test (infinite loops). See ulimit -t
Is set to 1 CPU minute

filelimit is the user limit for write files (in kilo-bytes)
Is used to avoid execution that loop and fill the hard drive. See ulimit -f
Note that a test might require a lot of temporary disk space (eg. nitc+gcc) so it is set to approximately 100MB

reslimit is the limit (in bytes) for generated .res file.
Larger ones are truncated and will fail tests
It is used to avoid processing huge crappy res file (diff, xml, etc)
Is set to approximately 100KB

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

8 years agoMerge: code: cleanup some docunits
Jean Privat [Wed, 17 Jun 2015 19:47:19 +0000 (15:47 -0400)]
Merge: code: cleanup some docunits

They where detected since #1332 is merged

Pull-Request: #1508
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

8 years agotests: force compilation of the test error_annot_pkgconfig
Alexis Laferrière [Wed, 17 Jun 2015 16:50:40 +0000 (12:50 -0400)]
tests: force compilation of the test error_annot_pkgconfig

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

8 years agotests: skip raspberry pi tests on niti and nitvm
Alexis Laferrière [Wed, 17 Jun 2015 10:56:00 +0000 (06:56 -0400)]
tests: skip raspberry pi tests on niti and nitvm

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

8 years agotests: nitvm also skip the mpi_simple test
Alexis Laferrière [Tue, 16 Jun 2015 17:25:35 +0000 (13:25 -0400)]
tests: nitvm also skip the mpi_simple test

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

8 years agosrc: fix interpreter FFI to support nitvm
Alexis Laferrière [Tue, 16 Jun 2015 17:05:21 +0000 (13:05 -0400)]
src: fix interpreter FFI to support nitvm

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

8 years agotests: make as UNDEFINED tests that break niti at the FFI level
Alexis Laferrière [Tue, 16 Jun 2015 15:25:06 +0000 (11:25 -0400)]
tests: make as UNDEFINED tests that break niti at the FFI level

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

8 years agotests: test bad code in nitunits
Jean Privat [Wed, 17 Jun 2015 15:15:05 +0000 (11:15 -0400)]
tests: test bad code in nitunits

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

8 years agonitunit: bad code count as code (to avoid more failures that code)
Jean Privat [Wed, 17 Jun 2015 15:12:16 +0000 (11:12 -0400)]
nitunit: bad code count as code (to avoid more failures that code)

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

8 years agonitunit: process failures (bad code) before leaving
Jean Privat [Wed, 17 Jun 2015 15:11:42 +0000 (11:11 -0400)]
nitunit: process failures (bad code) before leaving

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

8 years agolib/mnit: remove the `is extern` declaration
Alexis Laferrière [Tue, 16 Jun 2015 20:45:52 +0000 (16:45 -0400)]
lib/mnit: remove the `is extern` declaration

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

8 years agolib: update the text group to the light FFI
Alexis Laferrière [Tue, 16 Jun 2015 20:34:01 +0000 (16:34 -0400)]
lib: update the text group to the light FFI

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

8 years agolib/file: move macros to the light FFI
Alexis Laferrière [Tue, 16 Jun 2015 20:25:04 +0000 (16:25 -0400)]
lib/file: move macros to the light FFI

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

8 years agolib/file: move implementation code to light FFI
Alexis Laferrière [Tue, 16 Jun 2015 20:23:21 +0000 (16:23 -0400)]
lib/file: move implementation code to light FFI

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

8 years agolib/file: wrap a long signature and add some space between methods
Alexis Laferrière [Tue, 16 Jun 2015 20:24:33 +0000 (16:24 -0400)]
lib/file: wrap a long signature and add some space between methods

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

8 years agolib: update the math module to use the light FFI
Alexis Laferrière [Tue, 16 Jun 2015 19:57:23 +0000 (15:57 -0400)]
lib: update the math module to use the light FFI

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

8 years agolib/exec: move the C structure se_exec_data to the light FFI
Alexis Laferrière [Tue, 16 Jun 2015 19:44:39 +0000 (15:44 -0400)]
lib/exec: move the C structure se_exec_data to the light FFI

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

8 years agotests: add sav files for some rosettacode
Jean Privat [Tue, 16 Jun 2015 19:44:09 +0000 (15:44 -0400)]
tests: add sav files for some rosettacode

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

8 years agoRosettaCode: Random numbers
Simon Zeni [Wed, 10 Jun 2015 12:42:44 +0000 (12:42 +0000)]
RosettaCode: Random numbers

Close #1466

8 years agorosettacode: cleanup and test guess_the_number.nit
Jean Privat [Tue, 16 Jun 2015 19:26:11 +0000 (15:26 -0400)]
rosettacode: cleanup and test guess_the_number.nit

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

8 years agoRosettaCode: Guess the Number
Istvan SZALAI [Wed, 10 Jun 2015 17:57:42 +0000 (13:57 -0400)]
RosettaCode: Guess the Number

Close #1476

Signed-off-by: Istvan SZALAI <szalai972@gmail.com>

8 years agoRosetta Code: added HTML Table
Anis Boubaker [Wed, 10 Jun 2015 18:42:14 +0000 (14:42 -0400)]
Rosetta Code: added HTML Table

Close #1486

8 years agoRosetta Code: added dot_product
Anis Boubaker [Wed, 10 Jun 2015 18:23:21 +0000 (14:23 -0400)]
Rosetta Code: added dot_product

Close #1481

8 years agoRosetta Code: Added Even/Odd
Anis Boubaker [Wed, 10 Jun 2015 17:48:27 +0000 (13:48 -0400)]
Rosetta Code: Added Even/Odd

8 years agoRosettacode: add Tokenizer
Anis Boubaker [Wed, 10 Jun 2015 16:52:53 +0000 (12:52 -0400)]
Rosettacode: add Tokenizer

Close #1475

8 years agotests: blacklist most things from src in nitg-g.skip
Jean Privat [Wed, 17 Jun 2015 13:28:14 +0000 (09:28 -0400)]
tests: blacklist most things from src in nitg-g.skip

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

8 years agosep_comp: declare method __attribute__((weak)) to allow skip of undead methods
Jean Privat [Wed, 17 Jun 2015 01:34:09 +0000 (21:34 -0400)]
sep_comp: declare method __attribute__((weak)) to allow skip of undead methods

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

8 years agosep_comp: SeparateRuntimeFunction::compile_to_c only declare if module is dead
Jean Privat [Wed, 17 Jun 2015 01:23:45 +0000 (21:23 -0400)]
sep_comp: SeparateRuntimeFunction::compile_to_c only declare if module is dead

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

8 years agosep_compiler: move up declaration in SeparateRuntimeFunction::compile_to_c
Jean Privat [Wed, 17 Jun 2015 01:22:57 +0000 (21:22 -0400)]
sep_compiler: move up declaration in SeparateRuntimeFunction::compile_to_c

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

8 years agotests: MPI is not supported within the interpreter
Alexis Laferrière [Fri, 12 Jun 2015 20:31:03 +0000 (16:31 -0400)]
tests: MPI is not supported within the interpreter

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

8 years agotests: expect unsupported Android platform error with the interpreter
Alexis Laferrière [Fri, 12 Jun 2015 20:30:44 +0000 (16:30 -0400)]
tests: expect unsupported Android platform error with the interpreter

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

8 years agoMerge: Remove RopeString
Jean Privat [Wed, 17 Jun 2015 10:24:37 +0000 (06:24 -0400)]
Merge: Remove RopeString

As part of the cleaning of the text group, the `RopeString` class was adding a useless extra layer of abstraction to an already sufficiently complex module, it was decided to remove it.

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

8 years agosep_comp: remove unrobust SeparateRuntimeFunction::arguments attribute
Jean Privat [Wed, 17 Jun 2015 01:22:04 +0000 (21:22 -0400)]
sep_comp: remove unrobust SeparateRuntimeFunction::arguments attribute

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

8 years agosep_comp: SeparateRuntimeFunction::compile_trampolines build its own argument list
Jean Privat [Wed, 17 Jun 2015 01:21:30 +0000 (21:21 -0400)]
sep_comp: SeparateRuntimeFunction::compile_trampolines build its own argument list

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

8 years agorta: add `RapidTypeAnalysis::live_mmodules`
Jean Privat [Fri, 12 Jun 2015 20:47:15 +0000 (16:47 -0400)]
rta: add `RapidTypeAnalysis::live_mmodules`

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

8 years agoMerge: Rosetta, batch 1
Jean Privat [Tue, 16 Jun 2015 23:25:42 +0000 (19:25 -0400)]
Merge: Rosetta, batch 1

First batch of rosetta code examples from the Nit coding party.

This PR only include merges of code that seems integrable as is without specific modification, and small follow-up code to pass tests.

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

8 years agoMerge: Harden AAsCastExpr
Jean Privat [Tue, 16 Jun 2015 23:25:36 +0000 (19:25 -0400)]
Merge: Harden AAsCastExpr

Make RTA and the compiler more robust so it does not crashes on #1512
Also some refactorization is added.

Close #1512 (because not more segfault) but does not fix the underlying problem.

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

8 years agoMerge: Int/Byte Binops
Jean Privat [Tue, 16 Jun 2015 23:25:30 +0000 (19:25 -0400)]
Merge: Int/Byte Binops

Added some binops to the Int and Byte types, including their C-like syntax.

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

8 years agoMerge: Nitiwiki: relative links
Jean Privat [Tue, 16 Jun 2015 23:25:24 +0000 (19:25 -0400)]
Merge: Nitiwiki: relative links

Use relative links in generated documents to avoid hard_coding `root_url`.

Demo: http://nitlanguage.org/beta/

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

8 years agolib/exec: C implementation code to light FFI
Alexis Laferrière [Tue, 16 Jun 2015 19:19:31 +0000 (15:19 -0400)]
lib/exec: C implementation code to light FFI

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

8 years agoRosettacode: Add BoxTheCompass
MATYSIAK Herve [Wed, 10 Jun 2015 19:42:23 +0000 (15:42 -0400)]
Rosettacode: Add BoxTheCompass

Close #1491

8 years agoRosettacode: Add Bitwise Op.
MATYSIAK Herve [Wed, 10 Jun 2015 18:26:38 +0000 (14:26 -0400)]
Rosettacode: Add Bitwise Op.

Close #1488

8 years agotests: add count_the_coins and semordnilap_args1 to niti.skip
Jean Privat [Tue, 16 Jun 2015 17:13:00 +0000 (13:13 -0400)]
tests: add count_the_coins and semordnilap_args1 to niti.skip

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

8 years agoexample: rosetta/catalan_numbers skip the 11th element to avoid overflox issue
Jean Privat [Tue, 16 Jun 2015 17:04:34 +0000 (13:04 -0400)]
example: rosetta/catalan_numbers skip the 11th element to avoid overflox issue

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

8 years agoMerge: examples: Add 99_Bottles_of_Beer rosetta code example
Jean Privat [Tue, 16 Jun 2015 15:35:38 +0000 (11:35 -0400)]
Merge: examples: Add 99_Bottles_of_Beer rosetta code example

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

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

8 years agoMerge: rosetta code: factorial
Jean Privat [Tue, 16 Jun 2015 15:35:26 +0000 (11:35 -0400)]
Merge: rosetta code: factorial

Signed-off-by: Renata Carvalho <renatawm@gmail.com>

Pull-Request: #1458
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: ArthurDelamare <arthur.delamare@viacesi.fr>

8 years agoMerge: rosetta code: here_document
Jean Privat [Tue, 16 Jun 2015 15:35:13 +0000 (11:35 -0400)]
Merge: rosetta code: here_document

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

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

8 years agoMerge: example: add catalan_numbers task of Rosetta code
Jean Privat [Tue, 16 Jun 2015 15:35:04 +0000 (11:35 -0400)]
Merge: example: add catalan_numbers task of Rosetta code

Rosetta code example of catalan numbers
http://rosettacode.org/wiki/Catalan_numbers

Pull-Request: #1460
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Ait younes Mehdi Adel <overpex@gmail.com>

8 years agoMerge: Rosetta count the coins
Jean Privat [Tue, 16 Jun 2015 15:34:52 +0000 (11:34 -0400)]
Merge: Rosetta count the coins

Pull-Request: #1462
Reviewed-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>

8 years agoMerge: Implementation of rosettacode : pernicious numbers and primality by trial...
Jean Privat [Tue, 16 Jun 2015 15:34:38 +0000 (11:34 -0400)]
Merge: Implementation of rosettacode : pernicious numbers and primality by trial division

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

8 years agoMerge: rosettacode: pick random element
Jean Privat [Tue, 16 Jun 2015 15:33:34 +0000 (11:33 -0400)]
Merge: rosettacode: pick random element

Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>

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

8 years agoMerge: rosetta: perfect_numbers
Jean Privat [Tue, 16 Jun 2015 15:32:32 +0000 (11:32 -0400)]
Merge: rosetta: perfect_numbers

Signed-off-by: Renata Carvalho <renatawm@gmail.com>

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

8 years agoMerge: rosetta code: first_letter_last_letter
Jean Privat [Tue, 16 Jun 2015 15:32:19 +0000 (11:32 -0400)]
Merge: rosetta code: first_letter_last_letter

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

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

8 years agoMerge: example: Rosetta Code example for letter frequency
Jean Privat [Tue, 16 Jun 2015 15:32:08 +0000 (11:32 -0400)]
Merge: example: Rosetta Code example for letter frequency

Signed-off-by: Jean-Philippe Caissy <jean-philippe.caissy@shopify.com>

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

8 years agoMerge: examples: add rosetta code Median
Jean Privat [Tue, 16 Jun 2015 15:31:59 +0000 (11:31 -0400)]
Merge: examples: add rosetta code Median

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

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

8 years agoMerge: rosetta code: visualize_a_tree
Jean Privat [Tue, 16 Jun 2015 15:31:48 +0000 (11:31 -0400)]
Merge: rosetta code: visualize_a_tree

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

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

8 years agotests: search_tests_git filters out zzz_tests (we do not want to execute them)
Jean Privat [Sat, 13 Jun 2015 02:14:21 +0000 (22:14 -0400)]
tests: search_tests_git filters out zzz_tests (we do not want to execute them)

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

8 years agotests: add zzz_tests for limits (run them if you wish)
Jean Privat [Sat, 13 Jun 2015 02:10:01 +0000 (22:10 -0400)]
tests: add zzz_tests for limits (run them if you wish)

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

8 years agolib: update the kernel module to the light FFI
Alexis Laferrière [Tue, 16 Jun 2015 18:01:34 +0000 (14:01 -0400)]
lib: update the kernel module to the light FFI

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

8 years agolib: update the time module to the light FFI
Alexis Laferrière [Tue, 16 Jun 2015 17:58:19 +0000 (13:58 -0400)]
lib: update the time module to the light FFI

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

8 years agolib: update the environ module to use the light FFI
Alexis Laferrière [Tue, 16 Jun 2015 17:53:14 +0000 (13:53 -0400)]
lib: update the environ module to use the light FFI

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

8 years agotests: add base_dead_code
Jean Privat [Tue, 16 Jun 2015 17:20:54 +0000 (13:20 -0400)]
tests: add base_dead_code

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

8 years agoMerge: rosetta: symmetric_difference
Jean Privat [Tue, 16 Jun 2015 15:30:42 +0000 (11:30 -0400)]
Merge: rosetta: symmetric_difference

Signed-off-by: Renata Carvalho <renatawm@gmail.com>

Pull-Request: #1478
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Istvan SZALAÏ <szalai972@gmail.com>

8 years agoMerge: rosettacode: Added semordnilap task
Jean Privat [Tue, 16 Jun 2015 15:29:41 +0000 (11:29 -0400)]
Merge: rosettacode: Added semordnilap task

See: http://rosettacode.org/wiki/Semordnilap

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

8 years agoMerge: example: add artihmetic mode example from rosetta code
Jean Privat [Tue, 16 Jun 2015 15:29:14 +0000 (11:29 -0400)]
Merge: example: add artihmetic mode example from rosetta code

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

Pull-Request: #1484
Reviewed-by: Istvan SZALAÏ <szalai972@gmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agoMerge: example: add caesar cipher example from rosetta code
Jean Privat [Tue, 16 Jun 2015 15:25:29 +0000 (11:25 -0400)]
Merge: example: add caesar cipher example from rosetta code

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

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

8 years agoMerge: exemple: add zig-zag_matrix task of Rosetta code
Jean Privat [Tue, 16 Jun 2015 15:25:13 +0000 (11:25 -0400)]
Merge: exemple: add zig-zag_matrix task of Rosetta code

Rosetta code example of zig-zag matrix
http://rosettacode.org/wiki/Zig-zag_matrix

Pull-Request: #1490
Reviewed-by: Istvan SZALAÏ <szalai972@gmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>