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>
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>
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>
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>
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>
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>
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>
Jean Privat [Mon, 7 Mar 2016 20:26:34 +0000 (15:26 -0500)]
rosetta code: tape
Signed-off-by: Jean Privat <jean@pryen.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Jean Privat [Mon, 14 Mar 2016 18:45:16 +0000 (14:45 -0400)]
Merge: Android service support: reliably run Nit code in the background
Add support to create Android services in Nit, working alongside activities implemented in Nit. The service can be launched on demande or at the device boot. Only one Nit service at a time can run per package. However the same service can be started more than once and you can do pretty much anything on the Nit side since it shares the same process as the activities.
Uses a broadcast receiver to launch service at boot. This receiver could be used to catch other broadcast, but it currently does not preserve the original intent.
Also updates most Android related modules to use `native_context` instead of `native_activity` so they can be called from services, when the Android API allows it. Some services had to be modified sightly, like the default `SharedPreferences` which is now named (instead of using the one attached to the activity). It should not break any clients as most use `data_store` which was already named.
Pull-Request: #1982
Reviewed-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Wed, 25 Nov 2015 13:05:14 +0000 (08:05 -0500)]
contrib/jwrapper: add command to wrap wifi services to the examples
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 11 Sep 2014 18:46:42 +0000 (14:46 -0400)]
lib/android: intro the `wifi` module
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 11 Mar 2016 18:55:55 +0000 (13:55 -0500)]
lib/android: if there is no activities, run UI code on the caller thread
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 19 Feb 2016 23:39:40 +0000 (18:39 -0500)]
lib/android: intro support for launching service at device boot
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 18 Feb 2016 04:08:17 +0000 (23:08 -0500)]
lib/android: intro service support
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 12 Mar 2016 18:42:00 +0000 (13:42 -0500)]
lib/android: update other modules to use android_context
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 12 Mar 2016 18:58:17 +0000 (13:58 -0500)]
lib/android/shared_prefs: use `native_context` and change to a named prefs set
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 11 Mar 2016 18:54:09 +0000 (13:54 -0500)]
lib/android/toast: remove some callbacks
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 11 Mar 2016 18:50:47 +0000 (13:50 -0500)]
lib/android: intro `app::native_context` and use in `dalvik`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 21 Nov 2015 21:58:52 +0000 (16:58 -0500)]
lib/app: move up the delay services to AsyncHttpRequest
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 11 Mar 2016 20:05:52 +0000 (15:05 -0500)]
Merge: Interpreter FFI: support the pkgconfig annotation
Pull-Request: #1980
Reviewed-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Fri, 11 Mar 2016 14:31:17 +0000 (09:31 -0500)]
tests: skip lots_of_refs test with niti and nitvm
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 11 Mar 2016 05:10:42 +0000 (00:10 -0500)]
Merge: Benitlux: Minor improvements to the server
This is in preparation to the introduction of all the social network features.
I expect to have some .sav to update because of the commit removing the check of NIT_TESTING.
Pull-Request: #1981
Reviewed-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Thu, 10 Mar 2016 15:09:34 +0000 (10:09 -0500)]
niti FFI: do not attempt to run extern methods returning a non-primitive type
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 10 Mar 2016 15:02:30 +0000 (10:02 -0500)]
libevent: protect callbacks for compatibility with the light FFI
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 10 Mar 2016 04:55:52 +0000 (23:55 -0500)]
Merge: nitcc open class
Accept open classes in regular expression in nitcc.
I thought that the feature was already here, since it is in SableCC4 and already handled by the current nitcc engine.
For information, this allows to indicate an open range of accepted characters.
~~~
a = 'A'...; // `a` can match "A", "B" or "䕫" and a lot other character
~~~
It is basically equivalent to
~~~
a = Any - (#0 .. '@');
~~~
It is also used by the grammar to extends the range of possible literals and enable language description with phoenician keyword and complex emoji-based regular expressions.
Pull-Request: #1979
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 10 Mar 2016 04:55:45 +0000 (23:55 -0500)]
Merge: app.nit UI: Intro an attribute to toggle password entry on TextFields
The attribute `TextField::is_password` toggles hiding the content of the field using platform specific services. So on Android, not only is the text hidden but it also notifies the soft keyboard to behave accordingly.
In the future, we could add alternative modes for email entry and more.
Pull-Request: #1978
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 10 Mar 2016 04:55:35 +0000 (23:55 -0500)]
Merge: Misc text: some improvement on `join` and `to_base`
Pull-Request: #1977
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 10 Mar 2016 04:55:19 +0000 (23:55 -0500)]
Merge: Interpreter FFI: custom compile_dir, use /tmp/ by default, and delete after execution
Generate native files in the `/tmp/` directory and delete them after execution. The directory can be customized using `--compile-dir`.
This should fix #1974 and #1975.
To support some other OS, we will need to use something other than `getpid` and `/tmp/`. We could also improve upon this by reusing the generated libraries between executions.
Pull-Request: #1976
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 7 Mar 2016 17:07:06 +0000 (12:07 -0500)]
lib/core/text: move `to_base` to the main base module and remove the useless `signed` parameter
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 7 Mar 2016 16:02:58 +0000 (11:02 -0500)]
lib/core/text: add a last_separator to `Collection::join`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 9 Mar 2016 04:57:44 +0000 (23:57 -0500)]
nitcc: test open class
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 9 Mar 2016 05:00:30 +0000 (00:00 -0500)]
nitcc: do not limit accepted literal char to `~`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 9 Mar 2016 04:59:36 +0000 (23:59 -0500)]
nitcc: add open-class regexp for tokens.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Wed, 9 Mar 2016 18:15:52 +0000 (13:15 -0500)]
contrib: do not check for NIT_TESTING, nitcorn already checks
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 2 Nov 2015 20:33:20 +0000 (15:33 -0500)]
contrib/benitlux: use result based rules to compose the server rule
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 1 Nov 2015 15:34:15 +0000 (10:34 -0500)]
contrib/benitlux: move the iface declaration to the toplevel for use with -D
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 25 Oct 2015 17:30:47 +0000 (13:30 -0400)]
contrib/benitlux: add `Beer::id`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 9 Mar 2016 17:57:17 +0000 (12:57 -0500)]
niti FFI: support the pkgconfig annotation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 3 Mar 2016 16:11:21 +0000 (11:11 -0500)]
lib/ios: implement `TextInput::is_password`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 3 Mar 2016 16:11:04 +0000 (11:11 -0500)]
lib/android: implement `TextInput::is_password`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 7 Mar 2016 19:34:46 +0000 (14:34 -0500)]
niti FFI: create compile_dir with permissions 0o700
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 7 Mar 2016 19:23:05 +0000 (14:23 -0500)]
lib/core: add optional mode parameter to mkdir
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Sat, 5 Mar 2016 23:14:34 +0000 (18:14 -0500)]
Merge: FFI: use more c_name and protect some macros for global compilation
Pull-Request: #1967
Reviewed-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Fri, 4 Mar 2016 19:21:05 +0000 (14:21 -0500)]
niti FFI: delete the nit_compile directory after execution
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 4 Mar 2016 19:19:05 +0000 (14:19 -0500)]
niti FFI: cmd line option to change the nit_compile dir and default to /tmp/
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 4 Mar 2016 14:01:34 +0000 (09:01 -0500)]
Merge: Faster text get
Try to improve the efficiency of the FlatText[] method by shortcuting some common and easy cases.
using benchmarks/json:
![bench_json](https://cloud.githubusercontent.com/assets/135828/
13518437/
bc07c954-e19b-11e5-9ddf-
8f69307fcd0a.png)
Ping @R4PaSs for review
Pull-Request: #1973
Jean Privat [Fri, 4 Mar 2016 14:00:28 +0000 (09:00 -0500)]
Merge: lib/markdown: improve performance a bit
Using benchmarks/markdown:
* nitmd_master is before
* nitmd_md is this now
* nitmd_md_fast is with #1973 in addition
* the 3 same avain with with --semi-global
* 2 Java libs: txtmark, markdown4j
![bench_markdown](https://cloud.githubusercontent.com/assets/135828/
13517453/
b008a7fe-e191-11e5-80c8-
d17cd85df6be.png)
There is still a lot of performance improvements to do anyway.
Pull-Request: #1972
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Fri, 4 Mar 2016 06:24:48 +0000 (01:24 -0500)]
tests: update sav//test_text_stat.res
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 4 Mar 2016 06:22:51 +0000 (01:22 -0500)]
lib/markdown: allow to ignore the MDlocation on Tokens
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 4 Mar 2016 02:47:09 +0000 (21:47 -0500)]
text/flat: FlatText::[] handle statistically common cases first
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 4 Mar 2016 02:40:57 +0000 (21:40 -0500)]
text/flat: FlatText::char_to_byte_index shortcut length_of_char_at if possible
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 4 Mar 2016 02:40:27 +0000 (21:40 -0500)]
text/flat: FlatText::char_to_byte_index do the +1 first (and 0 last)
Because stats!
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 4 Mar 2016 02:39:44 +0000 (21:39 -0500)]
text/flat: FlatText::char_to_byte_index factorize `item` accessor
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 4 Mar 2016 02:38:34 +0000 (21:38 -0500)]
text/flat: faster NativeString::set_char_at
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 4 Mar 2016 02:30:44 +0000 (21:30 -0500)]
lib/markdown: use a break label instead of a local flag
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Mar 2016 21:15:27 +0000 (16:15 -0500)]
lib/markdown: avoid useless `to_s` on Chars
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Sat, 22 Aug 2015 21:35:18 +0000 (17:35 -0400)]
contrib/benitlux: use the latest entry as reference for the current offering
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 22 Aug 2015 21:34:26 +0000 (17:34 -0400)]
contrib/benitlux: accept more date formats
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>