Lucas Bajolet [Fri, 31 Jul 2015 18:13:14 +0000 (14:13 -0400)]
parser: Factorized variants of Integer under one production
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Mon, 3 Aug 2015 22:10:37 +0000 (18:10 -0400)]
lib/standard/text: Added parsing method for all integers
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Alexis Laferrière [Tue, 4 Aug 2015 15:54:42 +0000 (11:54 -0400)]
contrib/tinks: increment the comm version number
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 31 Jul 2015 20:44:11 +0000 (16:44 -0400)]
contrib/tinks: greatly reduce the vibration strength under android
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 31 Jul 2015 13:33:27 +0000 (09:33 -0400)]
contrib/tinks: client do not send empty orders array to server
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 31 Jul 2015 13:28:21 +0000 (09:28 -0400)]
contrib/tinks: server does not wait after its clients at each frame
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 31 Jul 2015 13:28:15 +0000 (09:28 -0400)]
lib/gamnit: use async cache for the client/server logic
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 31 Jul 2015 12:57:36 +0000 (08:57 -0400)]
lib/serialization: intro AsyncCache
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 31 Jul 2015 13:20:55 +0000 (09:20 -0400)]
lib/socket: use a custom C call to detect error on sockets
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexandre Terrasa [Mon, 3 Aug 2015 21:18:19 +0000 (17:18 -0400)]
nitcorn: add media types for web fonts.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 3 Aug 2015 21:17:32 +0000 (17:17 -0400)]
nitcorn: use `bytelen` instead of `length` when setting `Content-Length` header
So UTF-8 files are rendered correctly.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Mon, 3 Aug 2015 18:35:23 +0000 (14:35 -0400)]
Merge: Tinks! a multiplayer crossplatform action game with destructible procedurally generated worlds
Players control a tank, open fire from its turret and navigate between the terrain features. Explosions from turret fire and tank destruction have different forces and destroy the terrain. Each tank needs 4 hits to be destroyed. Destroyed tanks drops health powerups which can repair other tanks.
The game is meant for the multiplayer but one can play alone to practice. Upon launch, a client searches for server by broadcasting a UDP socket. A server may respond with its TCP connection port. If there is no answer, the client starts its own server which will accept other clients.
The game logic is mostly event based. Only the events are passed to the clients at each frame, by serializing them to binary. So both the clients and the server keep the game knowledge.
The world is different in each game, it is procedurally generated with an "unlimited" size. Each world feature is discovered only as needed by either the server or the clients. The server discover the features affected by possible collisions and by explosions. The clients discovers the features visible on screen. The clients and servers share the seed for the noise generator, so they discover the same features. Only the destroyed features and new powerups are passed to the clients by the server as events.
Notes for future work:
* Tanks and turret position is updated every turn causing a lot of events and traffic.
This may be solved by moving more logic client-side, so only changes in the direction of a tank trigger the broadcast of an event.
* The multiplayer looks like it slows down after a while.
This may be caused by the serialization caches that can get pretty big.
They may need to cleared and updated with a server/client sync.
* The framerate of the server and the clients are locked.
Effectively slowing down everyone at the speed of the slowest computer.
* Implement zoom, this will be very useful for the small screen / phone version.
* The Android version crashes on some device (please test it and tell me if it works on yours).
* As the client can easily be modified, the server may need to be more restrictive against abusive orders, like firing way outside of the normal view range.
* The noise generation could be improved, there are still visible patterns.
Pull-Request: #1601
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Ait younes Mehdi Adel <overpex@gmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Mon, 3 Aug 2015 18:35:20 +0000 (14:35 -0400)]
Merge: nitrpg: fix crash when the Reviews/Work requests return nothing
Nitrpg was down since last wednesday because of this. It's now back on track: http://nitlanguage.org/rpg/games/privat/nit
Since the listener didn't crash, no data were loss during the downtime.
Pull-Request: #1604
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 3 Aug 2015 18:35:17 +0000 (14:35 -0400)]
Merge: to_i behaviour coherent with parser
This PR changes the behaviour of `to_i` in Strings to support all the derivatives from the parser (hex, bin, oct and underscores)
The change in behaviour helps clean a bit of literal, though some more factorization is yet to come.
As for perfs, on Valgrind (`nitg src/nitg.nit`)
* Before : 14 289 384 832 Ir
* After : 14 348 036 981 Ir
A little slowdown, but acceptable imho since the function accepts more valid inputs and is safer.
Pull-Request: #1602
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Mon, 3 Aug 2015 18:25:15 +0000 (14:25 -0400)]
Merge: Remove memory leak in Ropes
Early on, the `to_s` of a RopeBuffer was calling `dump_buffer`, which like to double the size of the buffered part after persisting.
By doing do, a simple program like the one submitted along with this PR was consuming an awful lot of RAM, which has the undesirable side-effect of freezing my machine after a few milliseconds of run.
By replacing it with the more memory-friendly `persist buffer`, all my troubles seem so far away !
Pull-Request: #1598
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Lucas Bajolet [Fri, 31 Jul 2015 20:37:26 +0000 (16:37 -0400)]
tests: Updated sav for base_error_literal
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 31 Jul 2015 20:36:27 +0000 (16:36 -0400)]
src: Update literal to simplify the code
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Mon, 3 Aug 2015 14:50:10 +0000 (10:50 -0400)]
lib/standard/text: Update Text.to_i to parse all bases
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Mon, 3 Aug 2015 14:50:01 +0000 (10:50 -0400)]
lib/standard/text: Added is_int validation function to Text
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 31 Jul 2015 20:34:38 +0000 (16:34 -0400)]
lib/standard/text: Added validation and conversion functions for dec/oct and bin
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 31 Jul 2015 20:33:57 +0000 (16:33 -0400)]
lib/standard/text: Move and generalize remove_underscores to Text
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Mon, 3 Aug 2015 12:46:02 +0000 (08:46 -0400)]
version 0.7.7
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Thu, 30 Jul 2015 12:14:24 +0000 (08:14 -0400)]
contrib/tinks: add README.md
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 30 Jul 2015 12:21:43 +0000 (08:21 -0400)]
contrib/tinks: intro the android client
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 4 Jul 2015 19:20:09 +0000 (15:20 -0400)]
contrib/tinks: add icon source
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 30 Jul 2015 13:38:11 +0000 (09:38 -0400)]
lib/android: fix `just_went_down` to support secondary pointers
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 30 Jul 2015 01:05:51 +0000 (21:05 -0400)]
contrib/tinks: add makefile
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 30 Jul 2015 10:20:20 +0000 (06:20 -0400)]
contrib/tinks: intro art source
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 2 Jul 2015 16:35:20 +0000 (12:35 -0400)]
contrib/tinks: add sounds
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 2 Jul 2015 00:14:08 +0000 (20:14 -0400)]
contrib/tinks: add the client
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 3 Jul 2015 21:14:36 +0000 (17:14 -0400)]
contrib/tinks: add the server
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 2 Jul 2015 00:13:49 +0000 (20:13 -0400)]
contrib/tinks: add the game logic
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 30 Jun 2015 21:29:04 +0000 (17:29 -0400)]
contrib/tinks: intro git structure for tinks
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 2 Jul 2015 11:50:58 +0000 (07:50 -0400)]
lib: intro gamnit::network
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Sat, 1 Aug 2015 01:15:07 +0000 (21:15 -0400)]
Merge: misc/vim: highlight the new Int literals
Add support for bin, oct and hex literals which are restrictive enough to detect invalid digits. Also accept `_` in all Int literals, and the suffixes `[iu]8|16|32` proposed by #1588.
Supports `_` in Float literals, it's not yet available but it can't be too far off.
Pull-Request: #1600
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 31 Jul 2015 15:03:51 +0000 (11:03 -0400)]
nitrpg: fix crash when the Reviews/Work requests return nothing
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Lucas Bajolet [Fri, 31 Jul 2015 14:16:32 +0000 (10:16 -0400)]
ropes: Removed useless dump_buffer in to_s
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Alexis Laferrière [Thu, 30 Jul 2015 13:54:11 +0000 (09:54 -0400)]
misc/vim: highlight the new Int literals
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 30 Jul 2015 00:04:27 +0000 (20:04 -0400)]
Merge: jwrapper supports static properties, primitive arrays and generic parameters
This PR continues the work of #1578 and #1589. It improves jwrapper to support more features of the Java language: static functions and attributes, primitives arrays and generic parameters. The resulting generated wrapper of large Java namespaces is now usable with semi-global compilation!
Main changes:
* Wrap static functions and attributes as top-level methods.
* Generate a primitive array wrapper for each target class. By default, only wrap 1 dimension arrays, it's enough in most cases (see stats at the bottom).
* Resolve generic parameters and use the closest bound (only the first bound).
* Add JNI services to each classes.
* Jwrapper is now good enough to wrap the `java` and `org` namespace of the Java library
and to use them in semi-global compilation. See the new example `java_api` to see it in action.
The _full_ Java generated by this tool and by the FFI pass the basic semantic check of javac,
but it still raise errors and warnings on illegal access of internal, protected or obsolete entities.
This may need manual tweaking of the tool to block these cases, that information is not made available by the output of javap.
Compiling `java_api` in separate compilation takes about 20 minutes and crashes at the compilation of the generated C code. More investigation is required to find the problem, but I suspect the C file of 132 mo generated by the FFI to manipulate the JNI.
What's to do next:
* Class hierarchy!
* Negative filtering of the target classes in a Jar archive.
* Filtering of methods to avoid obsolete ones? Or simply remove them manually after generation?
* vararg support.
* Revamp the `java` module and low-level types.
## Some stats on the Android lib example
Disabled functions before this PR:
* java_api.nit: 1448 / 12805
* android_api.nit: 1075 / 22084
Disabled functions now:
* java_api.nit: 5 / 14248 # From a multi-dimensional array
* java_api.nit: 29 / 14248 # From a vararg
* android_api.nit: 1 / 23138 # From a multi-dimensional array
* android_api.nit: 21 / 23138 # From a vararg
All the unknown multi-dimensional array: (these could be added by hand to the library)
* int[][]
* java.lang.String[][]
* java.lang.annotation.Annotation[][]
Pull-Request: #1599
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Thu, 30 Jul 2015 00:04:25 +0000 (20:04 -0400)]
Merge: A little fix to android::audio
As explained in PR #1587, there is a bit of a problem when making applications which runs on both linux and android about the loading of the sounds
This PR just reverse the order of the loading for the android audio API, so that if you want to use the sounds in the res folder for your android application, and the sounds in the assets folder for the linux application, you just have to create a new sound with its extension and it will work fine :)
Edit: It also enables the use of different sound formats between android and Linux
Pull-Request: #1592
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 30 Jul 2015 00:04:22 +0000 (20:04 -0400)]
Merge: contrib/rss_downloader: compressed feeds and report errors
This PR adds a few features to rss_downloader to support more RSS feeds. It can be configured to decompress the feed and to customize the tag to find the download link. The output has be improved, both on normal behavior and on errors.
As a bonus, add the program I used to debug the RSS feeds as an example for the `dom` module.
Pull-Request: #1590
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Alexis Laferrière [Wed, 29 Jul 2015 17:36:56 +0000 (13:36 -0400)]
contrib/jwrapper examples: make the java_lib example lighter and test it in check
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 21:51:24 +0000 (17:51 -0400)]
contrib/jwrapper examples: intro an example using the standard Java API
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 13:49:41 +0000 (09:49 -0400)]
contrib/jwrapper tests: add 2 tests with static properties and a generic class
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 12:56:05 +0000 (08:56 -0400)]
contrib/jwrapper examples: fix dependency of the queue example main rule
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 21:52:38 +0000 (17:52 -0400)]
contrib/jwrapper examples: fix gitignore of examples/android_api/
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 16:09:25 +0000 (12:09 -0400)]
contrib/jwrapper examples: android_lib extract more and support collections
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 29 Jul 2015 12:24:15 +0000 (08:24 -0400)]
contrib/jwrapper: skip wrapping Java classes with invalid names
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 29 Jul 2015 11:04:45 +0000 (07:04 -0400)]
contrib/jwrapper: skip wrapping anonymous classes
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 29 Jul 2015 09:40:28 +0000 (05:40 -0400)]
contrib/jwrapper: skip all vararg types in code generation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 29 Jul 2015 01:47:25 +0000 (21:47 -0400)]
contrib/jwrapper: fix constructors of generics classes
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 29 Jul 2015 12:52:40 +0000 (08:52 -0400)]
contrib/jwrapper: use declared upper bounds to set extern parameters types
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 20:22:00 +0000 (16:22 -0400)]
contrib/jwrapper: resolve parameter types before code generation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 18:02:11 +0000 (14:02 -0400)]
contrib/jwrapper: collect methods and constructors generic paramters
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 21:56:55 +0000 (17:56 -0400)]
contrib/jwrapper: add more top-level methods as reserved keywords
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 20:16:49 +0000 (16:16 -0400)]
contrib/jwrapper: avoid property name conflicts on top-level methods
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 16:00:18 +0000 (12:00 -0400)]
contrib/jwrapper: fix == between arrays of different dimensions
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 15:59:37 +0000 (11:59 -0400)]
contrib/jwrapper: print unsupported types in verbose mode
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 13:45:28 +0000 (09:45 -0400)]
contrib/jwrapper: reorganize and document the different names of a JavaType
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 29 Jul 2015 12:47:00 +0000 (08:47 -0400)]
contrib/jwrapper: generate JNI services for each extern class
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 18:10:18 +0000 (14:10 -0400)]
contrib/jwrapper: do not skip primitive array types
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 18:07:16 +0000 (14:07 -0400)]
contrib/jwrapper: generate primitive array variants for each extern classes
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 12:37:22 +0000 (08:37 -0400)]
contrib/jwrapper: accept [] (and anything) in search for existing wrappers
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 13:22:21 +0000 (09:22 -0400)]
contrib/jwrapper: intro `JavaType::clone`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 16:23:05 +0000 (12:23 -0400)]
contrib/jwrapper: generate top-level getter & setter for static attributes
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 17:01:42 +0000 (13:01 -0400)]
contrib/rss_downloader: use `ProcessDuplex::write_and_read`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 17:01:14 +0000 (13:01 -0400)]
lib/exec: intro `ProcessDuplex::write_and_read`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 17:00:45 +0000 (13:00 -0400)]
lib/file: revamp `poll_in` to use in `FileReader`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 21 Jul 2015 20:37:32 +0000 (16:37 -0400)]
contrib/rss_downloader: prettier output when the links are very long
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 21 Jul 2015 20:36:32 +0000 (16:36 -0400)]
contrib/rss_downloader: support compressed RSS feeds
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 21 Jul 2015 13:26:42 +0000 (09:26 -0400)]
contrib/rss_downloader: move tag link to Config
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 21 Jul 2015 13:26:03 +0000 (09:26 -0400)]
contrib/rss_downloader: report errors parsing XML
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 21 Jul 2015 15:36:45 +0000 (11:36 -0400)]
lib/dom: intro a checker/example program
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 13:24:21 +0000 (09:24 -0400)]
contrib/jwrapper: generate top-level methods for static functions
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 13:02:18 +0000 (09:02 -0400)]
contrib/jwrapper: add more of the signature to generated doc
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 27 Jul 2015 12:47:34 +0000 (08:47 -0400)]
contrib/jwrapper: revamp method generation code
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 15:55:23 +0000 (11:55 -0400)]
lib/java: reorganize the java group to include the primitive arrays
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 18:11:38 +0000 (14:11 -0400)]
lib/java: make pop_from_local_frame_with_env protected to be redefable
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 28 Jul 2015 16:09:45 +0000 (12:09 -0400)]
lib/collections: intro `Map::not_empty`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 29 Jul 2015 02:23:17 +0000 (22:23 -0400)]
Merge: Decimal literals with underscores
As requested by @xymus in PR #1588, the support of underscores in decimal literals is added to the parser in this PR
Pull-Request: #1597
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 29 Jul 2015 02:23:12 +0000 (22:23 -0400)]
Merge: Cached ropes
Added a wee bit of optimization on Ropes, indexed accesses are properly cached and file manipulations (especially `read_all`) now yields a good balanced Rope, which should reduce the degenerative cases of random indexed access whilst preserving most of the performance in local access.
This has a positive (though small) impact on a the compiler :
* Before: `I refs: 14,286,788,827`
* After: `I refs: 14,197,458,800` (-0.63%)
What is seen in Valgrind is unfortunately unchanged in user-time (nitc-sg compiling nitg-sg) :
* Before: `user 0m5.360s`
* After: `user 0m5.367s`
Pull-Request: #1595
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Lucas Bajolet [Tue, 28 Jul 2015 15:32:16 +0000 (11:32 -0400)]
tests: Update base_test_bases to check support of undercore
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 28 Jul 2015 15:32:03 +0000 (11:32 -0400)]
src: Update literal to properly support underscores in decimal literals
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 28 Jul 2015 15:31:37 +0000 (11:31 -0400)]
Parser regeneration
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 28 Jul 2015 15:31:27 +0000 (11:31 -0400)]
parser: Update parser for underscores support in decimal literals
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 28 Jul 2015 15:05:31 +0000 (11:05 -0400)]
tests: Fix for cached_ropes, lines had changed in Nitpick
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
BlackMinou [Sat, 25 Jul 2015 20:12:30 +0000 (22:12 +0200)]
Android/audio: load from res before assets
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Lucas Bajolet [Mon, 27 Jul 2015 18:20:47 +0000 (14:20 -0400)]
lib/standard: Read all now builds ropes
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 21 Jul 2015 15:23:26 +0000 (11:23 -0400)]
lib/standard/ropes: Added balancing method to Concat
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 21 Jul 2015 15:12:10 +0000 (11:12 -0400)]
lib/standard/ropes: Added cache mechanism on indexed access for Concat
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Mon, 27 Jul 2015 01:14:18 +0000 (21:14 -0400)]
Merge: Fix Chainz of Friendz buttons on Android
Intro `AndroidPointerEvent::is_move` and tweak Chainz of Friendz so it doesn't consider the release event as a move event.
Pull-Request: #1591
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Alexis Laferrière [Sun, 26 Jul 2015 12:28:23 +0000 (08:28 -0400)]
contrib/friendz: fix input using is_move
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 26 Jul 2015 12:28:05 +0000 (08:28 -0400)]
lib/android: intro `AndroidPointerEvent::is_move`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 26 Jul 2015 12:27:09 +0000 (08:27 -0400)]
lib/android: remove a few warnings
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Sat, 25 Jul 2015 23:55:12 +0000 (19:55 -0400)]
Merge: jwrapper generates full APIs, with contructors, getters and setters
This PR is the second part to #1578, it updates the structure of jwrapper, adds a lot of features and creates usable APIs.
Main changes:
* Rewrite of the AST visitor, type conversion and entity naming.
* Generate constructors.
* Generate getter/setters to attributes.
* Add the -p option to choose the prefix of extern class names, use the namespace by default.
* Add the -i option to scan for existing wrappers in any directory or file.
* Add the -r option to filter the target classes from a Jar archive using a regular expression.
* Add more simple tests with javap outputs.
* Add a complete (and working) example of using a custom Java collection from Nit.
* Add an example of generating an API for Android using jwrapper. This API passes nitpick, but it has not been tested as it needs to be integrated in our Android framework.
What's to do next:
* Support for primitive arrays. (This is the main reason why ~10% of the functions are disabled)
* Add static functions as top-level methods.
* Generate class hierarchy.
* Use nitls with the -i option and to add importations to the generated module.
* Fix generic params usage.
Pull-Request: #1589
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Sat, 25 Jul 2015 01:17:47 +0000 (21:17 -0400)]
Merge: Improve documentation of kernel
Improve the documentation of Object and Sys.
Also experiments with the new nitdoc features #1447
Some issues I discovered while writing and using the doc while thinking about nitdoc.
* micro-picking classes and methods to include in the README is not fun
* headings (`###`) in the markdown might not have the right level in the generated HTML
* having reified property groups (#1413) should help to organize thing and have automatic feedback on it trough the doc
* maybe the `[[list:]]` directive should no list entities not already included by `[[doc:]]` (or a new `[[list_other:]]` directive?)
* having a way to generate a full linear and strucuted documentation in a single page could simplify the job of the writer when checking the doc.
Pull-Request: #1584
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Fri, 24 Jul 2015 20:50:46 +0000 (16:50 -0400)]
tests: update sav because line changes in kernel
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 23 Jul 2015 03:06:26 +0000 (23:06 -0400)]
lib: add a README for standard
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 23 Jul 2015 03:06:07 +0000 (23:06 -0400)]
lib: improve documentation of Object and Sys in kernel
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Fri, 24 Jul 2015 13:16:47 +0000 (09:16 -0400)]
contrib/jwrapper: fix commenting out unknown types on `-u comment` only
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>