nit.git
8 years agoScope & Typing: visits the catch part of a do ... catch ... end
BlackMinou [Sat, 9 Apr 2016 00:20:43 +0000 (20:20 -0400)]
Scope & Typing: visits the catch part of a do ... catch ... end

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

8 years agoFlow: managing the flow context for a do ... catch ... end
BlackMinou [Sat, 9 Apr 2016 00:19:43 +0000 (20:19 -0400)]
Flow: managing the flow context for a do ... catch ... end

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

8 years agoParser: Modifications due to the introduction of catch
BlackMinou [Sat, 9 Apr 2016 00:18:27 +0000 (20:18 -0400)]
Parser: Modifications due to the introduction of catch

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

8 years agoGrammar: Adding an optionnal catch bloc to a do end
BlackMinou [Sat, 9 Apr 2016 00:17:47 +0000 (20:17 -0400)]
Grammar: Adding an optionnal catch bloc to a do end

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

8 years agoMerge: Augmented literal strings
Jean Privat [Thu, 7 Apr 2016 12:50:34 +0000 (08:50 -0400)]
Merge: Augmented literal strings

As a follow-up to #1991, here's the support mentioned in #1734 for bytestrings, regex and raw strings

NOTE: Depends on #1991 for integration, you may review the last 3 commits while #1991 is reviewed and eventually merged

TODO: Support degraded mode (Bytes and Byte only) for byte SuperStrings instead of refusing at compile-time

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

8 years agoMerge: Friendz: fix missing music file
Jean Privat [Thu, 7 Apr 2016 12:50:29 +0000 (08:50 -0400)]
Merge: Friendz: fix missing music file

This PR moves the music file in the Chainz of Friendz project to the new location of Android specific resources (changed in #1952). This missing file crashed the app at launch on Android.

Also use a Nit constructor/factory to wrap the static Java function `MediaPlayer.create` which is a convenience method acting as a constructor and applying some of the boilerplate code.

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

8 years agoMerge: interpreter: fix rand by leaving rand methods to the FFI
Jean Privat [Thu, 7 Apr 2016 12:50:24 +0000 (08:50 -0400)]
Merge: interpreter: fix rand by leaving rand methods to the FFI

This PR fix `rand` with the interpreter so setting a seed with `srand_from` produces predictable results in the following calls to `rand`, and the same results as the same compiled program. The problem was caused by the interception of `rand` which was executed in the interpreter itself, while `srand_from` was executed on the side of the interpreted program. So setting the seed did not affect in anyway the values returned by `rand`.

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

8 years agoMerge: Benitlux: intro server side of social network
Jean Privat [Thu, 7 Apr 2016 12:50:21 +0000 (08:50 -0400)]
Merge: Benitlux: intro server side of social network

This PR extends the Benitlux web server with a RESTful interface for a social network. This interface will be used by the mobile client, which will be introduced in a future PR.

The new module `benitlux_social` implements all the core logic and SQL request to implement the database. It uses existing services of `benitlux_db` which only keeps track of the beers and their availability.

Most of this code is already deployed on xymus.net and used by the commuNity using the alpha version of the mobile app. Also note that this is the first real-world use of nitrestful, which handles very well all the `restful` methods of `benitlux_controller`.

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

8 years agotests: Added augmented strings test
Lucas Bajolet [Tue, 22 Mar 2016 16:03:18 +0000 (12:03 -0400)]
tests: Added augmented strings test

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

8 years agointerpreter: Added support for prefixed/suffixed strings
Lucas Bajolet [Tue, 22 Mar 2016 16:01:57 +0000 (12:01 -0400)]
interpreter: Added support for prefixed/suffixed strings

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

8 years agocompiler: Added prefixed and suffixed `String` support
Lucas Bajolet [Tue, 22 Mar 2016 15:42:30 +0000 (11:42 -0400)]
compiler: Added prefixed and suffixed `String` support

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

8 years agoxymus.net: update to latest benitlux server features
Alexis Laferrière [Tue, 5 Apr 2016 15:24:55 +0000 (11:24 -0400)]
xymus.net: update to latest benitlux server features

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

8 years agocontrib/benitlux: rename DB to BenitluxDB waiting for working qualified names
Alexis Laferrière [Tue, 5 Apr 2016 15:24:35 +0000 (11:24 -0400)]
contrib/benitlux: rename DB to BenitluxDB waiting for working qualified names

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

8 years agocontrib/benitlux: share a single connexion to the DB
Alexis Laferrière [Mon, 4 Apr 2016 20:26:42 +0000 (16:26 -0400)]
contrib/benitlux: share a single connexion to the DB

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

8 years agolib/sqlite: to_sql_string escape `\`
Alexis Laferrière [Mon, 4 Apr 2016 21:08:52 +0000 (17:08 -0400)]
lib/sqlite: to_sql_string escape `\`

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

8 years agolib/nitcorn: use generate_token in sessions
Alexis Laferrière [Fri, 1 Apr 2016 20:44:58 +0000 (16:44 -0400)]
lib/nitcorn: use generate_token in sessions

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

8 years agocontrib/benitlux: add push notification support
Alexis Laferrière [Fri, 1 Apr 2016 15:58:33 +0000 (11:58 -0400)]
contrib/benitlux: add push notification support

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

8 years agocontrib/benitlux: drop the non-nitrestful service `since/`
Alexis Laferrière [Fri, 1 Apr 2016 15:58:13 +0000 (11:58 -0400)]
contrib/benitlux: drop the non-nitrestful service `since/`

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

8 years agocontrib/benitlux: use nitrestful to expose social network services to clients
Alexis Laferrière [Fri, 1 Apr 2016 15:54:16 +0000 (11:54 -0400)]
contrib/benitlux: use nitrestful to expose social network services to clients

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

8 years agocontrib/benitlux: intro core logic and DB services for a social network
Alexis Laferrière [Fri, 1 Apr 2016 16:02:53 +0000 (12:02 -0400)]
contrib/benitlux: intro core logic and DB services for a social network

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

8 years agocontrib/benitlux: intro shared model objects for a social network
Alexis Laferrière [Sat, 22 Aug 2015 21:35:34 +0000 (17:35 -0400)]
contrib/benitlux: intro shared model objects for a social network

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

8 years agolib/android: Java's `MediaPlayer.create` is a pseudo constructor
Alexis Laferrière [Mon, 4 Apr 2016 17:24:51 +0000 (13:24 -0400)]
lib/android: Java's `MediaPlayer.create` is a pseudo constructor

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

8 years agocontrib/friendz: fix missing sound
Alexis Laferrière [Mon, 4 Apr 2016 17:22:05 +0000 (13:22 -0400)]
contrib/friendz: fix missing sound

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

8 years agointerpreter: do not intercept rand methods
Alexis Laferrière [Mon, 4 Apr 2016 15:07:30 +0000 (11:07 -0400)]
interpreter: do not intercept rand methods

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

8 years agocontrib/benitlux: use print_error to print unexpected errors
Alexis Laferrière [Fri, 1 Apr 2016 15:50:56 +0000 (11:50 -0400)]
contrib/benitlux: use print_error to print unexpected errors

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

8 years agocontrib/benitlux: update pre-existing client of beer_events_today
Alexis Laferrière [Fri, 1 Apr 2016 18:42:08 +0000 (14:42 -0400)]
contrib/benitlux: update pre-existing client of beer_events_today

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

8 years agocontrib/benitlux: fix beer_events_today returning null on error
Alexis Laferrière [Fri, 1 Apr 2016 15:50:16 +0000 (11:50 -0400)]
contrib/benitlux: fix beer_events_today returning null on error

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

8 years agolib/nitcorn: intro a method to generate a random token
Alexis Laferrière [Fri, 1 Apr 2016 20:31:40 +0000 (16:31 -0400)]
lib/nitcorn: intro a method to generate a random token

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

8 years agolib/sqlite3: use less callbacks
Alexis Laferrière [Sun, 25 Oct 2015 17:31:18 +0000 (13:31 -0400)]
lib/sqlite3: use less callbacks

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

8 years agoMerge: Rewrite benchlang
Jean Privat [Thu, 31 Mar 2016 13:59:00 +0000 (09:59 -0400)]
Merge: Rewrite benchlang

This is a major rewrite of the existing but broken `bench_languages` script.

I squashed most of the whole work since a detailed bunch of commits does not make so much sense, just consider it as a new work.

what's new?

* update to lastest eiffel studio thing
* added pypy engine for python
* bench method and attribute access (not only type tests)
* add real polymorphism
* add null bench to test the bottom line
* improved html result

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

8 years agoMerge: Improve `Text::justify` and use it for a pretty `PerfMap::to_s`
Jean Privat [Thu, 31 Mar 2016 13:58:57 +0000 (09:58 -0400)]
Merge: Improve `Text::justify` and use it for a pretty `PerfMap::to_s`

This PR introduces padding services ( `pad_left` and `pad_right`) to `Text` and uses it for a cleaner print in `performance_analysis`.

Seeing how the left-pad package was critical to the node.js ecosystem motivated this PR. These methods should be useful in the long term!

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

8 years agolib/performance_analysis: cleaner output for to_s
Alexis Laferrière [Sun, 27 Mar 2016 00:56:30 +0000 (20:56 -0400)]
lib/performance_analysis: cleaner output for to_s

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

8 years agolib/core: add optional char parameter to `Text::justify`
Alexis Laferrière [Tue, 29 Mar 2016 14:54:55 +0000 (10:54 -0400)]
lib/core: add optional char parameter to `Text::justify`

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

8 years agoMerge: niti: fix escaping in `with`
Jean Privat [Fri, 25 Mar 2016 16:44:09 +0000 (12:44 -0400)]
Merge: niti: fix escaping in `with`

Possible escape flag was let as is in the finish code of a with statement, that caused issues when executing complex code. The correct semantic is to temporarily clear any escape flag while executing the finish.
If an uncatched espace mark is generated while executing the finish, it takes precedence over the possible old one.

Pull-Request: #1997

8 years agoMerge: Fix autoadapt and NULL comparaison
Jean Privat [Fri, 25 Mar 2016 16:44:05 +0000 (12:44 -0400)]
Merge: Fix autoadapt and NULL comparaison

Small fixes in the compilers that mainly triggered bugs on --global but was nevertheless potentially present in other cases.

close #1969

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

8 years agotests: remove sav/nitcg/test_text_stat.res that is now unneded
Jean Privat [Fri, 25 Mar 2016 16:43:05 +0000 (12:43 -0400)]
tests: remove sav/nitcg/test_text_stat.res that is now unneded

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

8 years agoMerge: nitc/transform: maintain vararg information when transforming expressions
Jean Privat [Fri, 25 Mar 2016 13:41:52 +0000 (09:41 -0400)]
Merge: nitc/transform: maintain vararg information when transforming expressions

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

8 years agotests: add base_covar_adapt.nit base_gen_nest.nit to test dead-code adaptations
Jean Privat [Fri, 25 Mar 2016 02:46:35 +0000 (22:46 -0400)]
tests: add base_covar_adapt.nit base_gen_nest.nit to test dead-code adaptations

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

8 years agolib/json/serialization: fix unsafe covariant assignment
Jean Privat [Fri, 25 Mar 2016 02:50:40 +0000 (22:50 -0400)]
lib/json/serialization: fix unsafe covariant assignment

`key = "null"` may abort since `key` is typed by `E`

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

8 years agotests: add base_with2.nit
Jean Privat [Fri, 25 Mar 2016 02:57:55 +0000 (22:57 -0400)]
tests: add base_with2.nit

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

8 years agonitc/globalcomp: avoid looking at unexisting methods
Jean Privat [Fri, 25 Mar 2016 02:31:45 +0000 (22:31 -0400)]
nitc/globalcomp: avoid looking at unexisting methods

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

8 years agonitc/abscomp: cleanup, document and fix autoadapt (no change)
Jean Privat [Fri, 25 Mar 2016 01:27:00 +0000 (21:27 -0400)]
nitc/abscomp: cleanup, document and fix autoadapt (no change)

The fix is do not change the static type on type adaptation!

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

8 years agonitc/abscomp: protect some NULL test with maybenull
Jean Privat [Fri, 25 Mar 2016 00:12:54 +0000 (20:12 -0400)]
nitc/abscomp: protect some NULL test with maybenull

Whereas a potential optimization, this also prevent to generate invalid
C code that compares floats and NULL.

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

8 years agonitc/abscomp: add helper function maybenull to factorize code
Jean Privat [Fri, 25 Mar 2016 00:10:59 +0000 (20:10 -0400)]
nitc/abscomp: add helper function maybenull to factorize code

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

8 years agonitc/transform: maintain vararg information when transforming expressions
Jean Privat [Thu, 24 Mar 2016 23:29:00 +0000 (19:29 -0400)]
nitc/transform: maintain vararg information when transforming expressions

close #1971

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

8 years agobenchmark: complete rewrite of benchlang
Jean Privat [Thu, 24 Mar 2016 22:55:24 +0000 (18:55 -0400)]
benchmark: complete rewrite of benchlang

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

8 years agoniti: fix escaping flag when executing the finish of with
Jean Privat [Thu, 24 Mar 2016 22:44:29 +0000 (18:44 -0400)]
niti: fix escaping flag when executing the finish of with

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

8 years agoMerge: Two trivial rosetta tasks
Jean Privat [Thu, 24 Mar 2016 13:10:51 +0000 (09:10 -0400)]
Merge: Two trivial rosetta tasks

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

8 years agoMerge: lib/core/time: use lightffi for asctime, so niti can run it
Jean Privat [Thu, 24 Mar 2016 13:10:49 +0000 (09:10 -0400)]
Merge: lib/core/time: use lightffi for asctime, so niti can run it

now you can run nitiwiki with the interpreter

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

8 years agoMerge: compiler: Added prefix and suffix support for `Char`
Jean Privat [Thu, 24 Mar 2016 13:10:47 +0000 (09:10 -0400)]
Merge: compiler: Added prefix and suffix support for `Char`

As discussed in #1734, here's the PR for the support of prefixed characters.

For now only u and b are supported, respectively to get the code point as an int and the ascii code as a byte.

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

8 years agotets: remove sav/niti//fixme/nitiwiki_args2.res that now pass
Jean Privat [Thu, 24 Mar 2016 13:09:23 +0000 (09:09 -0400)]
tets: remove sav/niti//fixme/nitiwiki_args2.res that now pass

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

8 years agobench_common: do not reexecute failed commands
Jean Privat [Wed, 23 Mar 2016 20:25:56 +0000 (16:25 -0400)]
bench_common: do not reexecute failed commands

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

8 years agobench_common: add a time limit
Jean Privat [Wed, 23 Mar 2016 20:25:32 +0000 (16:25 -0400)]
bench_common: add a time limit

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

8 years agobench_common: add a documentation and a default value to `count`
Jean Privat [Wed, 23 Mar 2016 20:23:22 +0000 (16:23 -0400)]
bench_common: add a documentation and a default value to `count`

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

8 years agobench_common: add `id` in the generated html
Jean Privat [Wed, 23 Mar 2016 20:19:11 +0000 (16:19 -0400)]
bench_common: add `id` in the generated html

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

8 years agobench_common: skip_test and bench_command returns status code
Jean Privat [Wed, 23 Mar 2016 20:18:42 +0000 (16:18 -0400)]
bench_common: skip_test and bench_command returns status code

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

8 years agorosetta code: empty_string
Jean Privat [Mon, 7 Mar 2016 20:31:26 +0000 (15:31 -0500)]
rosetta code: empty_string

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

8 years agorosetta code: tape
Jean Privat [Mon, 7 Mar 2016 20:26:34 +0000 (15:26 -0500)]
rosetta code: tape

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

8 years agolib/core/time: fix import in strftime
Jean Privat [Wed, 23 Mar 2016 19:41:29 +0000 (15:41 -0400)]
lib/core/time: fix import in strftime

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

8 years agolib/core/time: use lightffi for asctime, so niti can run it
Jean Privat [Wed, 23 Mar 2016 18:01:56 +0000 (14:01 -0400)]
lib/core/time: use lightffi for asctime, so niti can run it

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

8 years agotests: Added prefixed character test
Lucas Bajolet [Tue, 22 Mar 2016 15:18:23 +0000 (11:18 -0400)]
tests: Added prefixed character test

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

8 years agointerpreter: Added support for prefixed chars
Lucas Bajolet [Tue, 22 Mar 2016 15:21:54 +0000 (11:21 -0400)]
interpreter: Added support for prefixed chars

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

8 years agocompiler: Added prefix and suffix support for `Char`
Lucas Bajolet [Mon, 30 Nov 2015 17:18:48 +0000 (12:18 -0500)]
compiler: Added prefix and suffix support for `Char`

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

8 years agoMerge: app.nit on GNU/Linux: implement multiple windows support using a GtkStack
Jean Privat [Tue, 22 Mar 2016 00:02:12 +0000 (20:02 -0400)]
Merge: app.nit on GNU/Linux: implement  multiple windows support using a GtkStack

This PR implement support for mobile-like multiple windows on GNU/Linux with GTK. It uses a single GTK window and a GtkStack showing one app.nit window at a time. This results in a single window with changing content.

The change to ListView provides a scrollable list of items, which is closer to the mobile equivalent.

Support for a back button will be introduced in a future PR.

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

8 years agoMerge: app.nit on Android: implement multiple windows support with fragments
Jean Privat [Mon, 21 Mar 2016 20:32:24 +0000 (16:32 -0400)]
Merge: app.nit on Android: implement multiple windows support with fragments

This PR intro support for Andorid apps composed of multiple windows. There is now one fragment par app.nit window, and it is set as visible when assigned to `app.window=`.

Support for multi-windows apps on other platforms will be provided by future PRs, along with a portable API for the back button and to navigate between windows. This system, on Android at least, could probably be extended to show more that one window at a time on larger tablet devices.

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

8 years agoMerge: app.nit UI: intro the CheckBox and implementation on Android, iOS & GNU/Linux
Jean Privat [Mon, 21 Mar 2016 20:32:21 +0000 (16:32 -0400)]
Merge: app.nit UI: intro the CheckBox and implementation on Android, iOS & GNU/Linux

The check box control varies per platform. For app.nit, we chose to implement it as a form available on Android and GNU/Linux with GTK+, the classic check box with a label.

On GNU/Linux there is the GTK+ check box widget which is used as is. On Android, there is two similar controls, the toggle (for On/Off, like in the preferences window) and the check button (which is more similar to the GTK check box). We used the check button for consistency, but it could be changed in the future. On iOS, there is only the UISwitch, an on/off button, without a label. The app.nit CheckBox is implemented by a layout composed of the UISwitch and a label.

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

8 years agoMerge: nitcorn & xymus.net: better log and tracking
Jean Privat [Mon, 21 Mar 2016 20:32:17 +0000 (16:32 -0400)]
Merge: nitcorn & xymus.net: better log and tracking

Better services to debug nitcorn servers and understand users behavior:

* Improve `nitcorn::log` with an uniform print format and the remote IP address.
* Alow custom JavaScript code in Tnitter which is used to insert Google Analytics code in xymus.net.

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

8 years agoMerge: frontend & vim plugin: no doc warnings on `new` factories and no doc preview...
Jean Privat [Mon, 21 Mar 2016 20:32:15 +0000 (16:32 -0400)]
Merge: frontend & vim plugin: no doc warnings on `new` factories and no doc preview with omnifunc

Do no show missing-doc warnings on anonymous `new` factories. These factories usually replace de default init and as such are documented with the class.

The Nit omnifunc is used to complete words in vim, it popups up when pressing Ctrl-X Ctrl-O. The default behavior was to show the doc of the highlighted suggestion in the preview window. This was not appreciated by some, and it was unneeded since the popup menu already shows the synopsis.

This can still be customized by the user by setting the `completeopt` global variable. And as before, the doc can be shown in the preview window by calling `:Nitdoc` with the cursor over the string to search for.

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

8 years agolib/linux: do not ask for homogeneous height of controls in vertical layouts
Alexis Laferrière [Mon, 21 Mar 2016 19:09:43 +0000 (15:09 -0400)]
lib/linux: do not ask for homogeneous height of controls in vertical layouts

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

8 years agolib/linux: nest the GtkListBox in a GtkScolledWindow to have scrollbars
Alexis Laferrière [Mon, 21 Mar 2016 13:25:56 +0000 (09:25 -0400)]
lib/linux: nest the GtkListBox in a GtkScolledWindow to have scrollbars

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

8 years agolib/linux: set a minimum window width for better transitions between windows
Alexis Laferrière [Mon, 21 Mar 2016 13:25:21 +0000 (09:25 -0400)]
lib/linux: set a minimum window width for better transitions between windows

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

8 years agolib/linux: move down add and remove logic to Layout only (where it was used)
Alexis Laferrière [Sun, 20 Mar 2016 13:39:15 +0000 (09:39 -0400)]
lib/linux: move down add and remove logic to Layout only (where it was used)

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

8 years agolib/linux: implement multiple windows
Alexis Laferrière [Wed, 25 Nov 2015 21:28:20 +0000 (16:28 -0500)]
lib/linux: implement multiple windows

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

8 years agolib/gtk: rename set_size_request
Alexis Laferrière [Sun, 20 Mar 2016 14:41:58 +0000 (10:41 -0400)]
lib/gtk: rename set_size_request

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

8 years agolib/gtk: intro wrapper for GtkScrolledWindow
Alexis Laferrière [Mon, 21 Mar 2016 13:30:15 +0000 (09:30 -0400)]
lib/gtk: intro wrapper for GtkScrolledWindow

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

8 years agolib/gtk: intro GtkAlign and some related services
Alexis Laferrière [Sun, 20 Mar 2016 13:36:06 +0000 (09:36 -0400)]
lib/gtk: intro GtkAlign and some related services

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

8 years agolib/ios: uncomment and fix baseline_relative_arrangement and layout_margin...
Alexis Laferrière [Tue, 15 Mar 2016 16:44:12 +0000 (12:44 -0400)]
lib/ios: uncomment and fix baseline_relative_arrangement and layout_margin...

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

8 years agolib/android: use a Fragment to simulate multiple windows
Alexis Laferrière [Mon, 21 Mar 2016 18:03:01 +0000 (14:03 -0400)]
lib/android: use a Fragment to simulate multiple windows

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

8 years agolib/android: intro wrapper for basic fragment services
Alexis Laferrière [Wed, 25 Nov 2015 21:28:20 +0000 (16:28 -0500)]
lib/android: intro wrapper for basic fragment services

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

8 years agolib/android: fix typo in service module
Alexis Laferrière [Tue, 15 Mar 2016 15:53:39 +0000 (11:53 -0400)]
lib/android: fix typo in service module

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

8 years agolib/android: force linearization of print between pthreads and android::log
Alexis Laferrière [Fri, 11 Mar 2016 20:53:29 +0000 (15:53 -0500)]
lib/android: force linearization of print between pthreads and android::log

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

8 years agolib/android: hide the title bar at the top of the screen
Alexis Laferrière [Sun, 13 Mar 2016 17:40:22 +0000 (13:40 -0400)]
lib/android: hide the title bar at the top of the screen

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

8 years agolib/ios: implement CheckBox with a UISwitch
Alexis Laferrière [Tue, 15 Mar 2016 15:56:21 +0000 (11:56 -0400)]
lib/ios: implement CheckBox with a UISwitch

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

8 years agolib/android: implement CheckBox with a android.widget.CheckBox
Alexis Laferrière [Tue, 15 Mar 2016 15:55:33 +0000 (11:55 -0400)]
lib/android: implement CheckBox with a android.widget.CheckBox

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

8 years agolib/linux & gtk: implement CheckBox with a GtkCheckButton
Alexis Laferrière [Tue, 15 Mar 2016 15:55:06 +0000 (11:55 -0400)]
lib/linux & gtk: implement CheckBox with a GtkCheckButton

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

8 years agolib/app: intro CheckBox
Alexis Laferrière [Tue, 15 Mar 2016 15:54:31 +0000 (11:54 -0400)]
lib/app: intro CheckBox

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

8 years agolib/nitcorn: log initial request reception and response
Alexis Laferrière [Thu, 17 Mar 2016 16:00:57 +0000 (12:00 -0400)]
lib/nitcorn: log initial request reception and response

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

8 years agolib/nitcorn: oneline the log on prepare_reponse_and_close
Alexis Laferrière [Thu, 17 Mar 2016 16:00:15 +0000 (12:00 -0400)]
lib/nitcorn: oneline the log on prepare_reponse_and_close

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

8 years agolib/libevent & nitcorn: keep human readable address of the remote client
Alexis Laferrière [Mon, 21 Mar 2016 16:11:57 +0000 (12:11 -0400)]
lib/libevent & nitcorn: keep human readable address of the remote client

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

8 years agolib/nitcorn: fix last references to unitcorn
Alexis Laferrière [Thu, 17 Mar 2016 15:55:00 +0000 (11:55 -0400)]
lib/nitcorn: fix last references to unitcorn

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

8 years agotnitter & xymus.net: support custom JS code and track clients on tnitter
Alexis Laferrière [Thu, 17 Mar 2016 14:09:36 +0000 (10:09 -0400)]
tnitter & xymus.net: support custom JS code and track clients on tnitter

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

8 years agofrontend: do not remport missing-doc warnings on anonymous `new` factories
Alexis Laferrière [Sat, 19 Mar 2016 03:23:09 +0000 (23:23 -0400)]
frontend: do not remport missing-doc warnings on anonymous `new` factories

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

8 years agoMerge: serialization: new annotation to rename an attribute in the serialization...
Jean Privat [Fri, 18 Mar 2016 20:14:49 +0000 (16:14 -0400)]
Merge: serialization: new annotation to rename an attribute in the serialization format

By default, an attribute is identified in the serialization format by its Nit name. The `serialize_as` attribute changes this behavior and sets the name of an attribute in the serialization format. It works with both the JSON and the binary implementations.

This annotation can be useful to change the name of an attribute to what is expected by a remote service. Or to use identifiers in the serialization format that are reserved keywords in Nit (like `class` and `type`).

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

8 years agomisc/vim: do not show the preview window when using the omnifunc
Alexis Laferrière [Tue, 15 Mar 2016 15:57:12 +0000 (11:57 -0400)]
misc/vim: do not show the preview window when using the omnifunc

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

8 years agotests: test serialize_as with both json and binary serialization
Alexis Laferrière [Thu, 17 Mar 2016 13:40:35 +0000 (09:40 -0400)]
tests: test serialize_as with both json and binary serialization

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

8 years agolib/serialization: document the `serialize_as` annotation
Alexis Laferrière [Thu, 17 Mar 2016 13:56:01 +0000 (09:56 -0400)]
lib/serialization: document the `serialize_as` annotation

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

8 years agofrontend serialization: serialize_as renames attributes in JSON/bin
Alexis Laferrière [Wed, 16 Mar 2016 22:57:55 +0000 (18:57 -0400)]
frontend serialization: serialize_as renames attributes in JSON/bin

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

8 years agofrontend serialization: do not generate from_deserializer if it exists locally
Alexis Laferrière [Wed, 16 Mar 2016 14:45:19 +0000 (10:45 -0400)]
frontend serialization: do not generate from_deserializer if it exists locally

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

8 years agoMerge: lib/android: intro WiFi services wrapper
Jean Privat [Mon, 14 Mar 2016 18:45:19 +0000 (14:45 -0400)]
Merge: lib/android: intro WiFi services wrapper

Intro a simple wrapper for Android WiFi services. It allows to list WiFi networks in range, and could be extended with more features in the future.

It was partially generated by jwrapper (with the included command) and completed by hand. As usual with generated wrapper, the client of the library should refer to the corresponding Java/Android documentation to know more about these services.

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

8 years agoMerge: http_request: intro an attribute to delay sending the request
Jean Privat [Mon, 14 Mar 2016 18:45:18 +0000 (14:45 -0400)]
Merge: http_request: intro an attribute to delay sending the request

Move up the delay service from Tnitter to AsyncHttpRequest. It can be useful for other apps, for regular polling or to avoid to overwhelm the server on errors.

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