nit.git
9 years agonitg & lib: intro `Finalizable` to be called when an object is freed
Alexis Laferrière [Fri, 8 Aug 2014 23:18:20 +0000 (19:18 -0400)]
nitg & lib: intro `Finalizable` to be called when an object is freed

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

9 years agoMerge: jwrapper: New features added
Jean Privat [Thu, 7 Aug 2014 11:07:08 +0000 (07:07 -0400)]
Merge: jwrapper: New features added

This may be considered as the first release of jwrapper. Here's a list of the new implemented features since the last PR:
* Grep into `lib/android` to retrieve already wrapped classes
* Auto-generate licence
* Basic user interface added
* Choice between :
  * Auto-wrap unknown types
  * Comment methods containing unknown types

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

9 years agoMerge: Sys.run
Jean Privat [Thu, 7 Aug 2014 01:24:03 +0000 (21:24 -0400)]
Merge: Sys.run

Add `Sys::run` as the new entry point of programs.
So some modules (eg. platforms) can more easily inject code before or after the execution of programs.

Pull-Request: #652
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agocontrib/jwrapper: Added jwrapper.res to sav
Frédéric Vachon [Mon, 4 Aug 2014 01:42:01 +0000 (21:42 -0400)]
contrib/jwrapper: Added jwrapper.res to sav

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

9 years agoMerge: Improve hash perfs
Jean Privat [Thu, 7 Aug 2014 01:24:01 +0000 (21:24 -0400)]
Merge: Improve hash perfs

Some improvements.

## nitg nitg.nit
before: 0m9.688s
after: 0m9.172s

## ./nit naive_interpreter.nit
usage of HashCollection before:
average length: 128.41
average capacity: 294.06 (229.01%)
average number of collisions: 113571 (35.27%)
average length of collision: 3.74

usage of HashCollection after:
average length: 128.40
average capacity: 327.42 (255.00%)
average number of collisions: 62608 (19.44%)
average length of collision: 2.29

All this is needed for the ai library

Pull-Request: #651
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agocontrib/jwrapper: Added README
Frédéric Vachon [Mon, 4 Aug 2014 01:25:29 +0000 (21:25 -0400)]
contrib/jwrapper: Added README

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

9 years agocontrib/jwrapper: Auto-generate licence
Frédéric Vachon [Mon, 4 Aug 2014 01:52:03 +0000 (21:52 -0400)]
contrib/jwrapper: Auto-generate licence

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

9 years agoMerge: tests: remove duplicated contrib tests from testfull
Jean Privat [Thu, 7 Aug 2014 01:23:49 +0000 (21:23 -0400)]
Merge: tests: remove duplicated contrib tests from testfull

The previous globs already get them

Pull-Request: #648
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoMerge: A few Java and Android fixes
Jean Privat [Thu, 7 Aug 2014 01:23:21 +0000 (21:23 -0400)]
Merge: A few Java and Android fixes

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

9 years agocontrib/jwrapper: Added basic UI
Frédéric Vachon [Mon, 4 Aug 2014 01:24:02 +0000 (21:24 -0400)]
contrib/jwrapper: Added basic UI

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

9 years agocontrib/jwrapper: Retrieves existing extern classes using grep
Frédéric Vachon [Mon, 4 Aug 2014 01:22:48 +0000 (21:22 -0400)]
contrib/jwrapper: Retrieves existing extern classes using grep

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

9 years agotests: update sav because line changes in standard::array
Jean Privat [Thu, 7 Aug 2014 00:19:51 +0000 (20:19 -0400)]
tests: update sav because line changes in standard::array

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

9 years agolib/std: improve implementation of `Set.hash` and `Sequence.hash`
Jean Privat [Wed, 6 Aug 2014 19:44:25 +0000 (15:44 -0400)]
lib/std: improve implementation of `Set.hash` and `Sequence.hash`

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

9 years agolib/std: better policy for enlarging HashCollection
Jean Privat [Wed, 6 Aug 2014 19:32:55 +0000 (15:32 -0400)]
lib/std: better policy for enlarging HashCollection

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

9 years agotests: update because line changes in kernel.nit
Jean Privat [Wed, 6 Aug 2014 23:56:13 +0000 (19:56 -0400)]
tests: update because line changes in kernel.nit

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

9 years agotests: add base_redef_run
Jean Privat [Wed, 6 Aug 2014 20:17:21 +0000 (16:17 -0400)]
tests: add base_redef_run

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

9 years agolib/kernel: introduce `Sys::run` as the entry point of programs
Jean Privat [Wed, 6 Aug 2014 20:14:47 +0000 (16:14 -0400)]
lib/kernel: introduce `Sys::run` as the entry point of programs

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

9 years agoengines: the entry point is `sys.run` or else `sys.main`
Jean Privat [Wed, 6 Aug 2014 20:07:35 +0000 (16:07 -0400)]
engines: the entry point is `sys.run` or else `sys.main`

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

9 years agolib/std: more efficient Collection::to_a
Jean Privat [Wed, 6 Aug 2014 19:32:12 +0000 (15:32 -0400)]
lib/std: more efficient Collection::to_a

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

9 years agolib/java: move up `to_java_string` from `String` to `Text`
Alexis Laferrière [Sat, 2 Aug 2014 04:06:23 +0000 (00:06 -0400)]
lib/java: move up `to_java_string` from `String` to `Text`

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

9 years agojava: allow code block inside generated class (works only on Android)
Alexis Laferrière [Tue, 5 Aug 2014 15:16:01 +0000 (11:16 -0400)]
java: allow code block inside generated class (works only on Android)

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

9 years agoandroid: compile C code with an "infinity" of threads (~12% faster)
Alexis Laferrière [Tue, 5 Aug 2014 15:15:42 +0000 (11:15 -0400)]
android: compile C code with an "infinity" of threads (~12% faster)

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

9 years agoandroid: fix min/max/taget_api_version annotation reduce
Alexis Laferrière [Mon, 4 Aug 2014 19:24:43 +0000 (15:24 -0400)]
android: fix min/max/taget_api_version annotation reduce

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

9 years agotests: remove duplicated contrib tests from testfull
Jean Privat [Wed, 6 Aug 2014 03:13:36 +0000 (23:13 -0400)]
tests: remove duplicated contrib tests from testfull

The previous globs already get. them

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

9 years agoMerge: vim: allow spell check on string literals and comments.
Jean Privat [Tue, 5 Aug 2014 19:37:07 +0000 (15:37 -0400)]
Merge: vim: allow spell check on string literals and comments.

Just `:set spell` to see errors, and `z=` on highlighted words to see
suggestions.

Pull-Request: #643
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Frédéric Vachon <fredvac@gmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agovim: allow spell check on string literals and comments.
Jean Privat [Tue, 5 Aug 2014 14:35:02 +0000 (10:35 -0400)]
vim: allow spell check on string literals and comments.

Just `:set spell` to see errors, and `z=` on highlighted words to see
suggestions.

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

9 years agoMerge: sendmail & detect programs in path (also used in Inkscape)
Jean Privat [Mon, 4 Aug 2014 16:21:36 +0000 (12:21 -0400)]
Merge: sendmail & detect programs in path (also used in Inkscape)

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

9 years agoMerge: lib/standard: rework and factorise queues and heaps.
Jean Privat [Mon, 4 Aug 2014 16:21:21 +0000 (12:21 -0400)]
Merge: lib/standard: rework and factorise queues and heaps.

Rewrite most of the queue and head data-structures.

1. move them is their own module (instead of the end of the collection files)
2. make Queue the abstract queuing interface (I need this for my IA library)
3. faster Heap implementation

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

9 years agoMerge: introduce and use MModuleData
Jean Privat [Mon, 4 Aug 2014 16:21:08 +0000 (12:21 -0400)]
Merge: introduce and use MModuleData

This introduces a helper module `mmodule_data` to store and retrieve arbitrary data trough module hierarchies.
Then `annotation` helper is extended to simplify the retrieval of annotations trough hierarchies of moduledecl
This allows the simplification of `android_annotations` by the use of the new services.

user-declared annotations in then implemented annotations (closes #623)

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

9 years agotests: base_user_annotation4 for multiple annotation declaration
Jean Privat [Thu, 31 Jul 2014 13:03:05 +0000 (09:03 -0400)]
tests: base_user_annotation4 for multiple annotation declaration

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

9 years agocheck_annotation: warn if a module declares again annotation
Jean Privat [Thu, 31 Jul 2014 13:01:28 +0000 (09:01 -0400)]
check_annotation: warn if a module declares again annotation

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

9 years agotests: updates for user-declated annotations
Jean Privat [Thu, 31 Jul 2014 05:59:22 +0000 (01:59 -0400)]
tests: updates for user-declated annotations

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

9 years agolib: add user-declared annotations on some modules
Jean Privat [Thu, 31 Jul 2014 05:38:12 +0000 (01:38 -0400)]
lib: add user-declared annotations on some modules

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

9 years agosrc: new phase check_annotation
Jean Privat [Thu, 31 Jul 2014 05:36:47 +0000 (01:36 -0400)]
src: new phase check_annotation

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

9 years agoandroid: remove priority_annotation_on_modules and use lookup_annotation_on_modules...
Jean Privat [Thu, 31 Jul 2014 03:31:37 +0000 (23:31 -0400)]
android: remove priority_annotation_on_modules and use lookup_annotation_on_modules instead

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

9 years agoannotation: add lookup_annotation_on_modules and related methods
Jean Privat [Thu, 31 Jul 2014 03:28:37 +0000 (23:28 -0400)]
annotation: add lookup_annotation_on_modules and related methods

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

9 years agolib/standard: rework and factorise queues and heaps.
Jean Privat [Fri, 1 Aug 2014 18:22:48 +0000 (14:22 -0400)]
lib/standard: rework and factorise queues and heaps.

Rewrite most of the queue and head data-structures.

1. move them is their own module (instead of the end of the collection files)
2. make Queue the abstract queuing interface (I need this for my IA library)
3. faster Heap implementation

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

9 years agolib: intro the sendmail module
Alexis Laferrière [Fri, 25 Jul 2014 23:14:20 +0000 (19:14 -0400)]
lib: intro the sendmail module

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

9 years agoversion 0.6.7 v0.6.7
Jean Privat [Mon, 4 Aug 2014 14:47:10 +0000 (10:47 -0400)]
version 0.6.7

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

9 years agoMerge: Add and icon, an app name and a version for Ballz & fix version for Moles
Jean Privat [Mon, 4 Aug 2014 14:44:14 +0000 (10:44 -0400)]
Merge: Add and icon, an app name and a version for Ballz & fix version for Moles

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

9 years agoMerge: Minor fixes to the Android support
Jean Privat [Mon, 4 Aug 2014 14:44:11 +0000 (10:44 -0400)]
Merge: Minor fixes to the Android support

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

9 years agoinkscape_tools: detect if inkscape is installed
Alexis Laferrière [Fri, 1 Aug 2014 13:47:32 +0000 (09:47 -0400)]
inkscape_tools: detect if inkscape is installed

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

9 years agolib: intro `program_is_in_path`
Alexis Laferrière [Fri, 1 Aug 2014 13:46:58 +0000 (09:46 -0400)]
lib: intro `program_is_in_path`

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

9 years agoMerge: Tnitter
Jean Privat [Thu, 31 Jul 2014 22:55:13 +0000 (18:55 -0400)]
Merge: Tnitter

Look only at the last 3 commits, the first part is from #620.

Almost the same version as what is running at http://tnitter.xymus.net/.

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

9 years agocontrib: intro of tnitter
Alexis Laferrière [Thu, 24 Jul 2014 00:40:19 +0000 (20:40 -0400)]
contrib: intro of tnitter

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

9 years agonitcorn: harden request processing
Alexis Laferrière [Thu, 31 Jul 2014 17:38:00 +0000 (13:38 -0400)]
nitcorn: harden request processing

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

9 years agonitcorn: force delete session cookie when no session associated to response
Alexis Laferrière [Wed, 30 Jul 2014 18:40:29 +0000 (14:40 -0400)]
nitcorn: force delete session cookie when no session associated to response

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

9 years agomnit_moles: add git version to moles version
Alexis Laferrière [Thu, 31 Jul 2014 17:52:23 +0000 (13:52 -0400)]
mnit_moles: add git version to moles version

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

9 years agomnit_ballz: add app_name and icon
Alexis Laferrière [Thu, 31 Jul 2014 17:51:17 +0000 (13:51 -0400)]
mnit_ballz: add app_name and icon

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

9 years agoannotation: move collect_annotations_on_modules from android_annotations to annotation
Jean Privat [Thu, 31 Jul 2014 03:27:51 +0000 (23:27 -0400)]
annotation: move collect_annotations_on_modules from android_annotations to annotation

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

9 years agosrc: use `get_annotations` instead of `collect_annotations_by_name`
Jean Privat [Mon, 28 Jul 2014 20:09:51 +0000 (16:09 -0400)]
src: use `get_annotations` instead of `collect_annotations_by_name`

The former does what is implied, the second is a deep search

Update the comment on the latter.

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

9 years agomodel: add mmodule_data
Jean Privat [Thu, 31 Jul 2014 03:46:50 +0000 (23:46 -0400)]
model: add mmodule_data

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

9 years agoandroid: copy the extra java files to the right directory
Alexis Laferrière [Thu, 17 Jul 2014 14:49:48 +0000 (10:49 -0400)]
android: copy the extra java files to the right directory

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

9 years agolib/android: precise that Java FFI errors are failures
Alexis Laferrière [Thu, 17 Jul 2014 14:49:20 +0000 (10:49 -0400)]
lib/android: precise that Java FFI errors are failures

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

9 years agoMerge: Icons on Android
Jean Privat [Thu, 31 Jul 2014 03:54:15 +0000 (23:54 -0400)]
Merge: Icons on Android

Icons for Android apps. You must have Inkscape and compile the contrib inkscape_tools to generate the icons.

fixes #558

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

9 years agoMerge: Clean some imports
Jean Privat [Thu, 31 Jul 2014 03:54:09 +0000 (23:54 -0400)]
Merge: Clean some imports

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

9 years agoposet: add select_smallest and select_greatest
Jean Privat [Thu, 31 Jul 2014 02:26:44 +0000 (22:26 -0400)]
poset: add select_smallest and select_greatest

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

9 years agodino: add icon
Alexis Laferrière [Wed, 30 Jul 2014 21:25:44 +0000 (17:25 -0400)]
dino: add icon

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

9 years agomoles: add icon
Alexis Laferrière [Wed, 30 Jul 2014 21:25:25 +0000 (17:25 -0400)]
moles: add icon

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

9 years agoandroid: alwas generate `res/values/string.xml` if it does not exist
Alexis Laferrière [Wed, 30 Jul 2014 21:24:56 +0000 (17:24 -0400)]
android: alwas generate `res/values/string.xml` if it does not exist

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

9 years agoandroid: search for an icon in the res folder
Alexis Laferrière [Wed, 30 Jul 2014 21:24:18 +0000 (17:24 -0400)]
android: search for an icon in the res folder

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

9 years agoMerge: Toplevel for sys and exit
Jean Privat [Wed, 30 Jul 2014 18:08:58 +0000 (14:08 -0400)]
Merge: Toplevel for sys and exit

Because the new c_src can deal with it

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

9 years agoMerge: Android annotations and longs
Jean Privat [Wed, 30 Jul 2014 18:08:56 +0000 (14:08 -0400)]
Merge: Android annotations and longs

Fixes #621 and problems with annotations priority.

The new organization of mnit_simple, and its annotations, means that you can compile any of the test_*.nit and it will create a `.apk` with a distinct package. Thus they can be installed side by side, but they all have the same display name :(

Using Java `long` on Android works again, but they are not fully compatible with Nit's `Int`. Java's `long` are on 64 bits, and Nit's `Int` on 32 bit under ARM. There may be data loss.

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

9 years agoMerge: The Web server nitcorn, libevent and others
Jean Privat [Wed, 30 Jul 2014 18:08:53 +0000 (14:08 -0400)]
Merge: The Web server nitcorn, libevent and others

This PR contains many fixes and a major rework of the Nitcorn project by Jean-Philippe Caissy, Frederic Sevillano and Guillaume Auger.

Nitcorn is a Web server framework to create sever-side applications in Nit. It is currently used at http://tnitter.xymus.net/ and http://vps.xymus.net/nit/index.html The README files is missing and will be added soon.

What it does do:
* GET and POST support (for small uploads)
* Virtual hosts and routes
* Sessions
* Reading cookies
* Adding virtual hosts (and interfaces) on the fly
* Adding/removing route on the fly
* Play well with existing modules `drop_privileges`, `md5` and `sqlite3`.

What it does not do (yet):
* Encryption
* Support receiving big files
* Writing cookies
* Remove virtual hosts (and interfaces) on the fly

The Tnitter project will be in a future PR.

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

9 years agopnacl: redef exit as a top-level
Jean Privat [Wed, 30 Jul 2014 12:41:46 +0000 (08:41 -0400)]
pnacl: redef exit as a top-level

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

9 years agotests: update sav/base_gen_reassign because line changes in kernel.nit
Jean Privat [Wed, 30 Jul 2014 15:44:17 +0000 (11:44 -0400)]
tests: update sav/base_gen_reassign because line changes in kernel.nit

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

9 years agosrc: remove some useless import
Jean Privat [Wed, 30 Jul 2014 17:32:31 +0000 (13:32 -0400)]
src: remove some useless import

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

9 years agomodelbuilder: TODO, check for useless importation
Jean Privat [Wed, 30 Jul 2014 17:30:56 +0000 (13:30 -0400)]
modelbuilder: TODO, check for useless importation

A stub, useless for anybody except by those who understand what this does
and who are willing to dig into a bunch of false positive.

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

9 years agojava: cast arguments passed to JNI
Alexis Laferrière [Wed, 30 Jul 2014 17:14:01 +0000 (13:14 -0400)]
java: cast arguments passed to JNI

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

9 years agoexamples: remove annotations used to avoid bug in mnit_simple
Alexis Laferrière [Wed, 30 Jul 2014 17:13:23 +0000 (13:13 -0400)]
examples: remove annotations used to avoid bug in mnit_simple

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

9 years agoandroid: fix priority annotations bug
Alexis Laferrière [Wed, 30 Jul 2014 16:12:42 +0000 (12:12 -0400)]
android: fix priority annotations bug

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

9 years agoexamples: add two nitcorn examples
Alexis Laferrière [Thu, 24 Jul 2014 19:04:45 +0000 (15:04 -0400)]
examples: add two nitcorn examples

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

9 years agolib: intro the web server nitcorn
Alexis Laferrière [Tue, 22 Jul 2014 21:41:40 +0000 (17:41 -0400)]
lib: intro the web server nitcorn

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

9 years agolib: intro libevent
Alexis Laferrière [Thu, 24 Jul 2014 14:45:37 +0000 (10:45 -0400)]
lib: intro libevent

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

9 years agolib: intro Text::split_once_on
Alexis Laferrière [Wed, 30 Jul 2014 12:46:47 +0000 (08:46 -0400)]
lib: intro Text::split_once_on

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

9 years agolib: intro `Text::is_hex`
Alexis Laferrière [Thu, 24 Jul 2014 14:38:11 +0000 (10:38 -0400)]
lib: intro `Text::is_hex`

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

9 years agolib: intro percent encoding/decoding methods
Alexis Laferrière [Thu, 24 Jul 2014 03:46:28 +0000 (23:46 -0400)]
lib: intro percent encoding/decoding methods

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

9 years agolib/sqlite3: fix empty row on select without results
Alexis Laferrière [Thu, 24 Jul 2014 02:26:21 +0000 (22:26 -0400)]
lib/sqlite3: fix empty row on select without results

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

9 years agolib/sqlite3: fix conversion of NativeString to String
Alexis Laferrière [Mon, 21 Jul 2014 18:50:38 +0000 (14:50 -0400)]
lib/sqlite3: fix conversion of NativeString to String

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

9 years agolib/sqlite3: add the service `String::to_sql_string`
Alexis Laferrière [Thu, 24 Jul 2014 00:40:03 +0000 (20:40 -0400)]
lib/sqlite3: add the service `String::to_sql_string`

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

9 years agoparser: do not export tables
Jean Privat [Wed, 30 Jul 2014 12:31:28 +0000 (08:31 -0400)]
parser: do not export tables

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

9 years agolib: string does not need anymore to intrude array
Jean Privat [Tue, 29 Jul 2014 14:12:20 +0000 (10:12 -0400)]
lib: string does not need anymore to intrude array

since the rewrite of string, some time ago, it seems

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

9 years agoMerge: Utf8 strings
Jean Privat [Wed, 30 Jul 2014 01:06:54 +0000 (21:06 -0400)]
Merge: Utf8 strings

(Re?)Introducing Unicode strings (with UTF-8) with mandatory indexes for now, the module is incomplete yet (don't go and try to concatenate two UTF-8 FlatStrings, you'll be surprised by the result).

There's still some work to do on the global API, but here's a WIP version that should not break anything, any comments are welcome !

Pull-Request: #602
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Frédéric Vachon <fredvac@gmail.com>

9 years agoMerge: Ropes optimizations
Jean Privat [Wed, 30 Jul 2014 01:06:51 +0000 (21:06 -0400)]
Merge: Ropes optimizations

Small optimizations on Rope, significantly speeds-up concatenation and indexed access, however, slows substring.

Before :
 * `./substr_bench -m rope --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 0.12s
 * `./chain_concat -m rope --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 1.47s
 * `./iteration_bench -m rope --iter-mode index --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 20.95s

After :
 * `./substr_bench -m rope --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 0.36s
 * `./chain_concat -m rope --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 0.25s
 * `./iteration_bench -m rope --iter-mode index --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 1.47s

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

9 years agoMerge: Benchmarks string
Jean Privat [Wed, 30 Jul 2014 01:06:48 +0000 (21:06 -0400)]
Merge: Benchmarks string

After postponing for a while, here are a few micro-benches (concat, substring, iteration using indexes or iterator) for variants of Text available at the moment with a shell script for automation.

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

9 years agoMerge: mnit_simple: rename FDROID metadata to match the java_package
Jean Privat [Tue, 29 Jul 2014 20:16:28 +0000 (16:16 -0400)]
Merge: mnit_simple: rename FDROID metadata to match the java_package

Pull-Request: #622

9 years agoMerge: gitignore: some update
Jean Privat [Tue, 29 Jul 2014 20:16:23 +0000 (16:16 -0400)]
Merge: gitignore: some update

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

9 years agoMerge: c_src: update
Jean Privat [Tue, 29 Jul 2014 20:16:06 +0000 (16:16 -0400)]
Merge: c_src: update

A fresh regeneration of the c_src. It is the first one based on `nitg --semi-global`.
Developers of the compiler and the stdlib can now use more new and fancy features of the Nit language.

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

9 years agolib/bufferized_ropes: Force insert_at for + operation
Lucas Bajolet [Tue, 29 Jul 2014 18:24:12 +0000 (14:24 -0400)]
lib/bufferized_ropes: Force insert_at for + operation

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

9 years agobenchmarks: Added script for all string-related benchmarks
Lucas Bajolet [Tue, 29 Jul 2014 14:59:47 +0000 (10:59 -0400)]
benchmarks: Added script for all string-related benchmarks

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

9 years agobenchmarks/string: Added String benchmarks
Lucas Bajolet [Tue, 29 Jul 2014 17:20:36 +0000 (13:20 -0400)]
benchmarks/string: Added String benchmarks

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

9 years agolib/standard/ropes: + operation in O(1) time now
Lucas Bajolet [Tue, 29 Jul 2014 17:14:38 +0000 (13:14 -0400)]
lib/standard/ropes: + operation in O(1) time now

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

9 years agotyping: no more special case for `sys` and `exit`
Jean Privat [Tue, 29 Jul 2014 14:08:43 +0000 (10:08 -0400)]
typing: no more special case for `sys` and `exit`

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

9 years agolib: `sys` and `exit` are toplevel
Jean Privat [Tue, 29 Jul 2014 14:07:57 +0000 (10:07 -0400)]
lib: `sys` and `exit` are toplevel

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

9 years agoc_src: update
Jean Privat [Mon, 28 Jul 2014 22:28:29 +0000 (18:28 -0400)]
c_src: update

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

9 years agotests: add passing Int in basic Java test
Alexis Laferrière [Tue, 29 Jul 2014 16:56:59 +0000 (12:56 -0400)]
tests: add passing Int in basic Java test

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

9 years agotests: Test for UTF-8 Strings.
Lucas Bajolet [Thu, 17 Jul 2014 17:54:23 +0000 (13:54 -0400)]
tests: Test for UTF-8 Strings.

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

9 years agolib/string_exp/utf8: Fixed print routine to support UTF8 strings.
Lucas Bajolet [Tue, 29 Jul 2014 15:13:42 +0000 (11:13 -0400)]
lib/string_exp/utf8: Fixed print routine to support UTF8 strings.

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

9 years agolib/string_exp/utf8: Output usable with UTF-8.
Lucas Bajolet [Mon, 21 Jul 2014 14:57:38 +0000 (10:57 -0400)]
lib/string_exp/utf8: Output usable with UTF-8.

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

9 years agolib/string_exp/utf8: to_upper/lower usable with UTF-8 strings.
Lucas Bajolet [Mon, 21 Jul 2014 14:56:22 +0000 (10:56 -0400)]
lib/string_exp/utf8: to_upper/lower usable with UTF-8 strings.

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