nit.git
8 years agoMerge: Rename Project to Package
Jean Privat [Thu, 10 Sep 2015 12:27:50 +0000 (08:27 -0400)]
Merge: Rename Project to Package

Before `project.ini` are generalized (and regenerated in `c_src`) we should decide if the renaming worth it.

* a package, in OS and for some programming languages, is a coherent and distributed piece of software.
* a package, in software engineering (UML, Java), is a group of elements. It is used as namespace, and can be nested.
* a project, in IDE (eclipse, XCode) and toolchain (maven) is the organization of source of a software and how to build, test, document, etc.
* a project, in software engineering, is an attempt to produce a piece of software (and often the associated resources and artifacts like source code and people)

Thoughts?

Pull-Request: #1669
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Etienne M. Gagnon <egagnon@j-meg.com>

8 years agoMerge: Fix Opportunity behavior with unicode characters
Jean Privat [Thu, 10 Sep 2015 00:25:20 +0000 (20:25 -0400)]
Merge: Fix Opportunity behavior with unicode characters

Fix #1695. It is already deployed on http://xymus.net/opportunity/ (Take a look at http://xymus.net/opportunity/?meetup_id=B962ECD89E0AE40FF888569AE8D816B36F128E10)

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

8 years agoMerge: UTF-8 Regex
Jean Privat [Thu, 10 Sep 2015 00:25:10 +0000 (20:25 -0400)]
Merge: UTF-8 Regex

This PR closes #1684

Instead of making `byte_to_char_index` public, it has been removed as it had no real reason to live.

Names are corrected and should correctly reflect their use.
Some examples of regular expressions with UTF-8 have been included.

Note however that the C-library underneath does not have UTF-8 semantics, as such, when using repetition operators on UTF-8 strings, capture the problematic characters with parentheses as in the example, or else the result will be erroneous.

Additionally, performances should be a bit better since less allocations and copy_to should be done.

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

8 years agomanpages: nitls talks about packages, not projects
Jean Privat [Wed, 9 Sep 2015 19:16:53 +0000 (15:16 -0400)]
manpages: nitls talks about packages, not projects

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

8 years agocontrib: value for nitserial's `-d` is now `package`
Jean Privat [Fri, 28 Aug 2015 13:21:11 +0000 (09:21 -0400)]
contrib: value for nitserial's `-d` is now `package`

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

8 years agotests: update sav with `package` instead of `project`
Jean Privat [Fri, 28 Aug 2015 13:19:58 +0000 (09:19 -0400)]
tests: update sav with `package` instead of `project`

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

8 years agocode: rename `project[s].ini` files as `package[s].ini`
Jean Privat [Fri, 28 Aug 2015 04:30:24 +0000 (00:30 -0400)]
code: rename `project[s].ini` files as `package[s].ini`

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

8 years agosrc: mass rename project->package
Jean Privat [Fri, 28 Aug 2015 03:49:33 +0000 (23:49 -0400)]
src: mass rename project->package

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

8 years agolib/nitcorn: update path to nitc to compile the examples
Alexis Laferrière [Wed, 9 Sep 2015 17:59:37 +0000 (13:59 -0400)]
lib/nitcorn: update path to nitc to compile the examples

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

8 years agocontrib/opportunity: do not force capitalize names
Alexis Laferrière [Wed, 9 Sep 2015 17:51:46 +0000 (13:51 -0400)]
contrib/opportunity: do not force capitalize names

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

8 years agolib/text: fix to|from_percent_encoding with unicode characters
Alexis Laferrière [Wed, 9 Sep 2015 17:50:15 +0000 (13:50 -0400)]
lib/text: fix to|from_percent_encoding with unicode characters

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

8 years agotests: Updated tests for Regex with more UTF-8 regexps
Lucas Bajolet [Wed, 9 Sep 2015 17:45:10 +0000 (13:45 -0400)]
tests: Updated tests for Regex with more UTF-8 regexps

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

8 years agolib/core: Sub-regular expressions API change from Array[Match] to Array[nullable...
Lucas Bajolet [Wed, 9 Sep 2015 15:42:55 +0000 (11:42 -0400)]
lib/core: Sub-regular expressions API change from Array[Match] to Array[nullable Match]

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

8 years agosrc/interpreter: fast_cstring was broken in interpreter
Lucas Bajolet [Tue, 8 Sep 2015 21:13:33 +0000 (17:13 -0400)]
src/interpreter: fast_cstring was broken in interpreter

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

8 years agoMerge: Better nitcc
Jean Privat [Wed, 9 Sep 2015 15:04:17 +0000 (11:04 -0400)]
Merge: Better nitcc

Some improvements and bugfixes for nitcc.

* Improve code size in C and in Nit
* Produce valid Nit code even in case of R/R, S/R or S/R/R conflicts. Close #1693

Before: compiling objc_test_parser on an old laptop
* 880.58 usertime
* 3GB memory
* produced executable: 50MB (31MB stripped)

after: same grammar, better nitcc
* 337.80usertime
* 788MB memory
* produced executable: 28MB (8,8MB stripped)

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

8 years agoMerge: String Stats
Jean Privat [Wed, 9 Sep 2015 15:04:12 +0000 (11:04 -0400)]
Merge: String Stats

Introducing a statistics module for Text variants usage which keeps trace of the accesses and allocations of Texts in a program.

It works in a similar way to `array_debug` or `hash_debug`, and prints statistics after the execution of a module.

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

8 years agolib/json: regenerate with new nitcc
Jean Privat [Wed, 9 Sep 2015 12:44:55 +0000 (08:44 -0400)]
lib/json: regenerate with new nitcc

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

8 years agonitcc: collect items with conflict (now that there is always a resolution attempt)
Jean Privat [Wed, 9 Sep 2015 12:44:36 +0000 (08:44 -0400)]
nitcc: collect items with conflict (now that there is always a resolution attempt)

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

8 years agonitcc: factorize code of alternative reduction
Jean Privat [Wed, 9 Sep 2015 10:06:55 +0000 (06:06 -0400)]
nitcc: factorize code of alternative reduction

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

8 years agonitcc:: when removing a reduction in S/R, notify the token to not generate the reduce...
Jean Privat [Wed, 9 Sep 2015 09:30:52 +0000 (05:30 -0400)]
nitcc:: when removing a reduction in S/R, notify the token to not generate the reduce action

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

8 years agonitcc: detect S/R even if R/R conflict as a solution is to shift in case of S/R/R
Jean Privat [Wed, 9 Sep 2015 09:28:21 +0000 (05:28 -0400)]
nitcc: detect S/R even if R/R conflict as a solution is to shift in case of S/R/R

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

8 years agonitcc: remove reduction even in non-dangling S/R conflict
Jean Privat [Wed, 9 Sep 2015 09:26:46 +0000 (05:26 -0400)]
nitcc: remove reduction even in non-dangling S/R conflict

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

8 years agonitcc: remove S/R reduction after detection to avoid concurent iteration/mutation...
Jean Privat [Wed, 9 Sep 2015 09:25:49 +0000 (05:25 -0400)]
nitcc: remove S/R reduction after detection to avoid concurent iteration/mutation issues

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

8 years agonitcc: parser&lexer: do notgenerate top-level methods in Object
Jean Privat [Wed, 9 Sep 2015 08:24:44 +0000 (04:24 -0400)]
nitcc: parser&lexer: do notgenerate top-level methods in Object

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

8 years agotests: Added test for text_stat
Lucas Bajolet [Tue, 8 Sep 2015 18:36:26 +0000 (14:36 -0400)]
tests: Added test for text_stat

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

8 years agolib/: Added statistics module for Text variants
Lucas Bajolet [Mon, 31 Aug 2015 19:14:26 +0000 (15:14 -0400)]
lib/: Added statistics module for Text variants

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

8 years agolib/core/re: Fixed search_in for Regex, should now work with UTF-8
Lucas Bajolet [Tue, 8 Sep 2015 18:19:53 +0000 (14:19 -0400)]
lib/core/re: Fixed search_in for Regex, should now work with UTF-8

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

8 years agolib/core: Fixed documentation in `NativeString::byte_to_char_index_cached`
Lucas Bajolet [Tue, 8 Sep 2015 18:19:28 +0000 (14:19 -0400)]
lib/core: Fixed documentation in `NativeString::byte_to_char_index_cached`

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

8 years agolib/core/text: Deferred utf8_length to native for FlatString
Lucas Bajolet [Tue, 8 Sep 2015 18:18:46 +0000 (14:18 -0400)]
lib/core/text: Deferred utf8_length to native for FlatString

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

8 years agolib/core/text: Removed now useless byte_to_char_index function
Lucas Bajolet [Tue, 8 Sep 2015 18:17:30 +0000 (14:17 -0400)]
lib/core/text: Removed now useless byte_to_char_index function

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

8 years agoMerge: lib/github: fix link to github doc in comment
Jean Privat [Tue, 8 Sep 2015 15:55:07 +0000 (11:55 -0400)]
Merge: lib/github: fix link to github doc in comment

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

8 years agoMerge: contrib/inkscape_tools: use Tinks! art instead of Dino's to test args
Jean Privat [Tue, 8 Sep 2015 15:55:00 +0000 (11:55 -0400)]
Merge: contrib/inkscape_tools: use Tinks! art instead of Dino's to test args

Fix #1657, it was actually the test that was broken as the SVG source file is designed for the bash script that preceded inkscape_tools and not inkscape_tools itself (see examples/mnit_dino/tools/). This PR use Tinks! art instead of Dino's. It was already tested by the Tinks! project but here we use it to test the program arguments.

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

8 years agoMerge: objcwrapper: class methods as top-level methods, generate doc and intro `gen_nit`
Jean Privat [Tue, 8 Sep 2015 15:54:40 +0000 (11:54 -0400)]
Merge: objcwrapper: class methods as top-level methods, generate doc and intro `gen_nit`

Update _objcwrapper_  so it is more useful. It now supports class/top-level methods, it generates basic doc with each methods and moving the preprocessing to Nit allows to easily parse many files at once.

This PR also extracts the Nit keywords list from jwrapper into the new `gen_nit` lib. I may move up other services common to jwrapper and objcwrapper there in the future.

At this point, we parse 89 out of 121 headers from GNUStep. And I have grammar tweaks stashed away that brind it up to 101, but I'm also considering using an existing and complete grammar... The result is not very usable as it still need to reproduce the class hierarch and avoid reintroducing introduced methods between classes.

I've added a pretty print for errors to help debug the grammar, if there is an interest I could move it up to `nitcc_runtime`, here's an example output:
~~~
Syntax Error: Unexpected rpar ')'; is acceptable instead: data_type, more_type, at 70:38-70:39
in /usr/include/GNUstep/Foundation/NSArchiver.h
- (void) serializeHeaderAt: (unsigned)positionInData
                                     ^
Syntax Error: Unexpected id 'autorelease_thread_vars'; is acceptable instead: declaration, structure_core, type, type_annotation, unsigned, data_type, more_type, function_pointer, at 9:16-9:39
in /usr/include/GNUstep/Foundation/NSAutoreleasePool.h
typedef struct autorelease_thread_vars
               ^^^^^^^^^^^^^^^^^^^^^^^
~~~

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

8 years agoMerge: Bench strings
Jean Privat [Tue, 8 Sep 2015 15:54:35 +0000 (11:54 -0400)]
Merge: Bench strings

Update for existing benches since standard was renamed to core and a few PRs have modified the code.

Also added new variant with buffered NativeStrings.

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

8 years agoMerge: lib/opts: accept non-conflicting parameters for OptionString and rename get_er...
Jean Privat [Tue, 8 Sep 2015 15:54:28 +0000 (11:54 -0400)]
Merge: lib/opts: accept non-conflicting parameters for OptionString and rename get_errors to errors

`OptionString` reads the next argument to be used as its parameter. However, to detect errors it did not read parameter beginning with `-`. This PR changes this behavior to only avoid parameters that are the name of a known option in the current `OptionContext`. This should report real errors and accept parameters beginning with `-`, such parameter are useful to forward options to subprograms.

Renaming `OptionContext::get_errors` to `errors` assign the short name to the most commonly used property. `errors` was previously reserved for errors local to the context only. From the Nit repo, only 2 projects correctly used `get_errors`, 8 wrongfully used `errors` and thus did not catch all errors.

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

8 years agolib/github: fix link to github doc in comment
Jean Privat [Tue, 8 Sep 2015 15:15:12 +0000 (11:15 -0400)]
lib/github: fix link to github doc in comment

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

8 years agocontrib/inkscape_tools: use Tinks! art instead of Dino's to test args
Alexis Laferrière [Sun, 6 Sep 2015 18:23:40 +0000 (14:23 -0400)]
contrib/inkscape_tools: use Tinks! art instead of Dino's to test args

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

8 years agolib/nitcc_runtime: extract `Position::underline` from objcwrapper
Alexis Laferrière [Fri, 4 Sep 2015 15:46:42 +0000 (11:46 -0400)]
lib/nitcc_runtime: extract `Position::underline` from objcwrapper

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

8 years agoMerge: Optimized use of escape_to_c
Jean Privat [Fri, 4 Sep 2015 03:33:35 +0000 (23:33 -0400)]
Merge: Optimized use of escape_to_c

All is in the title, @privat noticed me this morning that text::escape_to_c was taking around 4% of the time in nitc, taking the runtime to 15.183 GIr according to Valgrind.

By shortcutting all Unicode-related services since the C-side escaping is done on ASCII-sequences only and UTF-8 cannot contain invalid C sequences, the gain is substantial, one run of nitc is now done in 14.580 GIr, a gain of 600+ MIr (around 4%, what a coincidence !).

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

8 years agoMerge: Text attribute accesses optimization
Jean Privat [Fri, 4 Sep 2015 03:33:29 +0000 (23:33 -0400)]
Merge: Text attribute accesses optimization

As a small optimization, accesses to private attributes in Text are replaced by direct accesses as in `file` or `collection`.

On the compiler this yields between 3 and 4% improvement in performances, however in some programs like nitmd, this yields around 15% optimization.

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

8 years agoMerge: Better synopses in many packages for a prettier catalog
Jean Privat [Fri, 4 Sep 2015 03:33:24 +0000 (23:33 -0400)]
Merge: Better synopses in many packages for a prettier catalog

This should fix/complete the synopses of my projects. The few cases left are where the doc is in the main module of a contrib without a readme, like with `header_keeper`. I'm not sure what to do with those yet, maybe simply removing the src folder.

I seizes this opportunity to improve the `extern_methods` example and create missing readme files. And also reorganized the mnit platform implementations. There is still similar work to do with apps and submodules names to clean in mnit, but it will be for a future PR.

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

8 years agolib/core/flat: `bytepos` and `position` cache are now private
Lucas Bajolet [Mon, 31 Aug 2015 20:06:31 +0000 (16:06 -0400)]
lib/core/flat: `bytepos` and `position` cache are now private

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

8 years agocontrib/objcwrapper: redef the NSObject class as it exists in the manual lib
Alexis Laferrière [Wed, 2 Sep 2015 19:27:20 +0000 (15:27 -0400)]
contrib/objcwrapper: redef the NSObject class as it exists in the manual lib

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

8 years agocontrib/objcwrapper: filter out only typedefs over one line
Alexis Laferrière [Wed, 2 Sep 2015 19:24:40 +0000 (15:24 -0400)]
contrib/objcwrapper: filter out only typedefs over one line

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

8 years agocontrib/objcwrapper: avoid conflicts with Nit keywords and top-level methods
Alexis Laferrière [Wed, 2 Sep 2015 19:22:03 +0000 (15:22 -0400)]
contrib/objcwrapper: avoid conflicts with Nit keywords and top-level methods

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

8 years agocontrib/objcwrapper: make sure to not consider a class property as an init
Alexis Laferrière [Wed, 2 Sep 2015 19:14:39 +0000 (15:14 -0400)]
contrib/objcwrapper: make sure to not consider a class property as an init

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

8 years agocontrib/objcwrapper: collect files that failed parsing
Alexis Laferrière [Wed, 2 Sep 2015 19:13:53 +0000 (15:13 -0400)]
contrib/objcwrapper: collect files that failed parsing

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

8 years agolib/nit: extract Nit keywords from jwrapper to a support module for Nit code generators
Alexis Laferrière [Tue, 1 Sep 2015 21:43:27 +0000 (17:43 -0400)]
lib/nit: extract Nit keywords from jwrapper to a support module for Nit code generators

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

8 years agocontrib/objcwrapper: check-gnustep parse many headers at once
Alexis Laferrière [Tue, 1 Sep 2015 20:24:37 +0000 (16:24 -0400)]
contrib/objcwrapper: check-gnustep parse many headers at once

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

8 years agocontrib/objcwrapper: add few missing primitive types
Alexis Laferrière [Tue, 1 Sep 2015 20:21:59 +0000 (16:21 -0400)]
contrib/objcwrapper: add few missing primitive types

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

8 years agocontrib/objcwrapper: print clang style parsing errors
Alexis Laferrière [Tue, 1 Sep 2015 20:04:24 +0000 (16:04 -0400)]
contrib/objcwrapper: print clang style parsing errors

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

8 years agocontrib/objcwrapper: update Makefile to use the included preprocessing
Alexis Laferrière [Tue, 1 Sep 2015 18:00:26 +0000 (14:00 -0400)]
contrib/objcwrapper: update Makefile to use the included preprocessing

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

8 years agocontrib/objcwrapper: add header to generated files with the command in use
Alexis Laferrière [Tue, 1 Sep 2015 18:26:33 +0000 (14:26 -0400)]
contrib/objcwrapper: add header to generated files with the command in use

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

8 years agocontrib/objcwrapper: print opts errors, not just usage
Alexis Laferrière [Tue, 1 Sep 2015 18:25:56 +0000 (14:25 -0400)]
contrib/objcwrapper: print opts errors, not just usage

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

8 years agocontrib/objcwrapper: move file preprocessing to Nit
Alexis Laferrière [Tue, 1 Sep 2015 18:00:16 +0000 (14:00 -0400)]
contrib/objcwrapper: move file preprocessing to Nit

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

8 years agocontrib/objcwrapper: generate minimal doc above generated properties
Alexis Laferrière [Tue, 1 Sep 2015 15:37:09 +0000 (11:37 -0400)]
contrib/objcwrapper: generate minimal doc above generated properties

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

8 years agolib/core/flat: Optimized use of escape_to_c for FlatText
Lucas Bajolet [Thu, 3 Sep 2015 14:21:17 +0000 (10:21 -0400)]
lib/core/flat: Optimized use of escape_to_c for FlatText

Done by short-cutting every use of unicode-oriented operations

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

8 years agotests/test_opts: test `OptionString` avoiding known options
Alexis Laferrière [Tue, 1 Sep 2015 18:45:17 +0000 (14:45 -0400)]
tests/test_opts: test `OptionString` avoiding known options

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

8 years agobench/string: Added variant similar to buffered_ns with no indirection
Lucas Bajolet [Wed, 2 Sep 2015 19:45:38 +0000 (15:45 -0400)]
bench/string: Added variant similar to buffered_ns with no indirection

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

8 years agobench/strings: Update patch for linear substring
Lucas Bajolet [Wed, 2 Sep 2015 19:45:19 +0000 (15:45 -0400)]
bench/strings: Update patch for linear substring

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

8 years agocontrib/objcwrapper: move spacing from below each entities to above it
Alexis Laferrière [Tue, 1 Sep 2015 15:17:41 +0000 (11:17 -0400)]
contrib/objcwrapper: move spacing from below each entities to above it

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

8 years agocontrib/objcwrapper: minor style fix
Alexis Laferrière [Tue, 1 Sep 2015 15:15:30 +0000 (11:15 -0400)]
contrib/objcwrapper: minor style fix

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

8 years agocontrib/objcwrapper: adapt indent according to method scope
Alexis Laferrière [Tue, 1 Sep 2015 15:15:13 +0000 (11:15 -0400)]
contrib/objcwrapper: adapt indent according to method scope

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

8 years agocontrib/objcwrapper: differentiate between class and instance properties
Alexis Laferrière [Tue, 1 Sep 2015 15:03:33 +0000 (11:03 -0400)]
contrib/objcwrapper: differentiate between class and instance properties

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

8 years agocontrib/objcwrapper: each ObjcProperty keeps track of its declaring class
Alexis Laferrière [Tue, 1 Sep 2015 14:52:41 +0000 (10:52 -0400)]
contrib/objcwrapper: each ObjcProperty keeps track of its declaring class

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

8 years agocontrib/objcwrapper: replace `scope` by `is_class_property`
Alexis Laferrière [Tue, 1 Sep 2015 14:48:49 +0000 (10:48 -0400)]
contrib/objcwrapper: replace `scope` by `is_class_property`

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

8 years agocontrib/objcwrapper: prefix remaining entities by `Objc`
Alexis Laferrière [Tue, 1 Sep 2015 14:48:11 +0000 (10:48 -0400)]
contrib/objcwrapper: prefix remaining entities by `Objc`

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

8 years agotests/test_opts: report errors
Alexis Laferrière [Tue, 1 Sep 2015 18:44:20 +0000 (14:44 -0400)]
tests/test_opts: report errors

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

8 years agolib/opts: `OptionString` avoid ready existing options only
Alexis Laferrière [Tue, 1 Sep 2015 18:28:20 +0000 (14:28 -0400)]
lib/opts: `OptionString` avoid ready existing options only

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

8 years agosrc & contrib: update users of `OptionContext::get_errors`
Alexis Laferrière [Tue, 1 Sep 2015 18:28:41 +0000 (14:28 -0400)]
src & contrib: update users of `OptionContext::get_errors`

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

8 years agolib/opts: replace `OptionContext::errors` by `get_errors`
Alexis Laferrière [Tue, 1 Sep 2015 17:59:26 +0000 (13:59 -0400)]
lib/opts: replace `OptionContext::errors` by `get_errors`

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

8 years agolib/core/text: Replaced most polymorph accesses to Text attributes by direct accesses
Lucas Bajolet [Mon, 31 Aug 2015 20:05:45 +0000 (16:05 -0400)]
lib/core/text: Replaced most polymorph accesses to Text attributes by direct accesses

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

8 years agoMerge: regex: bug fix, less warnings and rename
Jean Privat [Wed, 2 Sep 2015 00:36:24 +0000 (20:36 -0400)]
Merge: regex: bug fix, less warnings and rename

Fix bug with sub-expressions when using a `search_from`, fix a few compiler warnings and rename `optimize_is_in` to `optimize_has` as it is closer to the public API.

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

8 years agoMerge: Ini of projects
Jean Privat [Wed, 2 Sep 2015 00:36:09 +0000 (20:36 -0400)]
Merge: Ini of projects

Now that projects can have metadata, let's just provide them.

Commits are grouped by maintainer and directory so that selfish maintainers can review only their.

Fell free to propose better tagging or metadata. See #1655 and http://nitlanguage.org/nep/project_metadata.html for current state of the discussion.

Note that the proof on concept of a catalog is available at http://nitlanguage.org/catalog

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

8 years agolib/re: mark with FIXME problems with length computations
Alexis Laferrière [Tue, 1 Sep 2015 14:43:50 +0000 (10:43 -0400)]
lib/re: mark with FIXME problems with length computations

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

8 years agoMerge: Introduce nitcatalog
Jean Privat [Tue, 1 Sep 2015 00:31:15 +0000 (20:31 -0400)]
Merge: Introduce nitcatalog

nitcatalog is the tool behind http://nitlanguage.org/catalog/

It is a simple hackish program that scan projects and generate the HTML files from various source of information:

* model
* project metadata
* git history

If you want to try it at home, consider also merging #1675

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

8 years agotests: add sav/nitcatalog.res
Jean Privat [Sat, 29 Aug 2015 00:44:07 +0000 (20:44 -0400)]
tests: add sav/nitcatalog.res

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

8 years agosrc: introduce nitcatalog.nit
Jean Privat [Sat, 29 Aug 2015 00:43:33 +0000 (20:43 -0400)]
src: introduce nitcatalog.nit

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

8 years agoMerge: Reorganize mnit submodules
Jean Privat [Mon, 31 Aug 2015 16:27:44 +0000 (12:27 -0400)]
Merge: Reorganize mnit submodules

So now Linux clients import `mnit::linux` instead of `mnit_linux` and Android clients import `mnit::android`. Also rename `mnit_display` and `mnit_input` to `mnit::display` and `mnit::input` respectively.

This may look familiar as it was a part of #1671.

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

8 years agoMerge: Benitlux mailing list: nicer and differentiate between streets
Jean Privat [Mon, 31 Aug 2015 15:22:19 +0000 (11:22 -0400)]
Merge: Benitlux mailing list: nicer and differentiate between streets

This is an ongoing effort to please GMail and the likes, so Benitlux emails are no longer sent to the spam folder. Which is vital to keep @R4PaSs happy, hydrated and productive.

This PR adds headers to the email to make it clear that it is a mailing list and to guide the assisted unsubscribe option. Specifying the street name will help differentiate between the emails from the two mailing lists. (One of which is not exposed on the website, it is available on request only.)

I've also added DKIM (to the existing SPF) as server identification, it should help a lot too.

Pull-Request: #1680
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Jean-Philippe Caissy <jpcaissy@piji.ca>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agoMerge: Relocate examples/nitcorn
Jean Privat [Mon, 31 Aug 2015 15:22:08 +0000 (11:22 -0400)]
Merge: Relocate examples/nitcorn

Follow up of #1656 that can be completed now that #1667 is merged.

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

8 years agoMerge: mailmap: add Mehdi Ait Younes and Hervé Matysiak
Jean Privat [Mon, 31 Aug 2015 15:22:04 +0000 (11:22 -0400)]
Merge: mailmap: add Mehdi Ait Younes and Hervé Matysiak

Because the result of `git shortlog` was not OCD-compliant enough.

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

8 years agoMerge: githubmerge: make public name/email access of users more robust.
Jean Privat [Mon, 31 Aug 2015 15:21:48 +0000 (11:21 -0400)]
Merge: githubmerge: make public name/email access of users more robust.

Recent changes in github API or in the @jpages account broke the script.

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

8 years agolib/re: fix offset of submatches and clarify variables name
Alexis Laferrière [Sun, 30 Aug 2015 13:52:20 +0000 (09:52 -0400)]
lib/re: fix offset of submatches and clarify variables name

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

8 years agolib/re: make `native` a local variable to check it is not null
Alexis Laferrière [Sun, 30 Aug 2015 13:51:31 +0000 (09:51 -0400)]
lib/re: make `native` a local variable to check it is not null

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

8 years agolib/re: rename `optimize_is_in` to `optimize_has`
Alexis Laferrière [Sun, 30 Aug 2015 13:34:37 +0000 (09:34 -0400)]
lib/re: rename `optimize_is_in` to `optimize_has`

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

8 years agocontrib/benitlux: show street name in email
Alexis Laferrière [Sun, 30 Aug 2015 19:14:59 +0000 (15:14 -0400)]
contrib/benitlux: show street name in email

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

8 years agosrc/project.ini: use field `maintainer`
Jean Privat [Sun, 30 Aug 2015 18:04:26 +0000 (14:04 -0400)]
src/project.ini: use field `maintainer`

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

8 years agojwrapper&nitcc: add tests/projects.ini to filter out generated files
Jean Privat [Fri, 28 Aug 2015 23:48:29 +0000 (19:48 -0400)]
jwrapper&nitcc: add tests/projects.ini to filter out generated files

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

8 years agocontrib&lib: introduce .ini for projects maintained by other contributors
Jean Privat [Fri, 28 Aug 2015 23:47:29 +0000 (19:47 -0400)]
contrib&lib: introduce .ini for projects maintained by other contributors

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

8 years agocontrib&lib: introduce .ini for projects maintained by Lucas Bajolet
Jean Privat [Fri, 28 Aug 2015 23:46:35 +0000 (19:46 -0400)]
contrib&lib: introduce .ini for projects maintained by Lucas Bajolet

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

8 years agocontrib&lib: introduce .ini for projects maintained by Alexandre Terrasa
Jean Privat [Fri, 28 Aug 2015 23:45:18 +0000 (19:45 -0400)]
contrib&lib: introduce .ini for projects maintained by Alexandre Terrasa

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

8 years agolib: introduce .ini for projects maintained by Jean Privat
Jean Privat [Fri, 28 Aug 2015 23:42:44 +0000 (19:42 -0400)]
lib: introduce .ini for projects maintained by Jean Privat

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

8 years agoexamples: introduce .ini for projects maintained by Jean Privat
Jean Privat [Fri, 28 Aug 2015 23:39:22 +0000 (19:39 -0400)]
examples: introduce .ini for projects maintained by Jean Privat

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

8 years agocontrib: introduce .ini for projects maintained by Jean Privat
Jean Privat [Fri, 28 Aug 2015 23:38:47 +0000 (19:38 -0400)]
contrib: introduce .ini for projects maintained by Jean Privat

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

8 years agolib: introduce .ini for projects maintained by Alexis Laferrière
Jean Privat [Fri, 28 Aug 2015 23:37:10 +0000 (19:37 -0400)]
lib: introduce .ini for projects maintained by Alexis Laferrière

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

8 years agoexamples: introduce .ini for projects maintained by Alexis Laferrière
Jean Privat [Sun, 30 Aug 2015 18:05:28 +0000 (14:05 -0400)]
examples: introduce .ini for projects maintained by Alexis Laferrière

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

8 years agocontrib: introduce .ini for projects maintained by Alexis Laferrière
Jean Privat [Fri, 28 Aug 2015 23:32:39 +0000 (19:32 -0400)]
contrib: introduce .ini for projects maintained by Alexis Laferrière

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

8 years agoMerge: lib/ini: give to the user `null` on undefined keys
Jean Privat [Sun, 30 Aug 2015 18:02:05 +0000 (14:02 -0400)]
Merge: lib/ini: give to the user `null` on undefined keys

Since the absence of a key is an ini file is an expected thing, I think it is better that the library return `null` instead of aborting.

This simplifies the library (and remove all aborts and cast on null).
This also simplify clients: a single call and use of advanced nullable features of Nit.

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

8 years agocontrib/benitlux: identify mailing list emails as bulk with List-unsub
Alexis Laferrière [Sat, 29 Aug 2015 19:47:15 +0000 (15:47 -0400)]
contrib/benitlux: identify mailing list emails as bulk with List-unsub

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