Welcome to this year's eighth issue of Niteration, the newsletter for the Nit project.
Because of the busy start of the academic semester, here is since news letter for the both months of August and September.
Combined Changes for August and September 2015
Have contributed (or co-authored patches): Alexis Laferrière, Jean Privat, Lucas Bajolet, Romain Chanoir, Alexandre Terrasa, Alexandre Blondin Massé and Arthur Delamare.
The Nit repository is now hosted at https://github.com/nitlang/nit. The old https://github.com/privat/nit is still working as a redirection.
Using the organization https://github.com/nitlang helps us manage more efficiently the contributors.
A new service, the nit catalog lists all the current programs and libraries.
The metadata of the packages are gathered from the package.ini
file present in the directory. The current specification of these metadata is available at http://nitlanguage.org/nep/package_metadata.html.
Currently, the catalog lists:
This new service required the implementation of the new loader policy. See issue #1250.
To fill-up the catalog, a cleanup, documentation and reorganization of the various package was done. Especially the packagestandard
was renamed to core
.
standard
as core
aad8668Lastly, packages are now named package
instead of project
.
The platform OSX is now officially supported since the last issues that caused some tests to fail were solved (or worked around).
This allows us to ensure the absence of regression with a systematic execution of the test suite on OSX, thanks to Jenkins.
The F-Droid repository that was broken is now fixed. Applications in the repository are compiled in release mode, which allows for the co-installation of the debug version of a package.
Some broken links in the tests results pages are functional again (it was a Jenkins bug that was worked around):
cmd
instead of run
bce4aaeThe various check
scripts are more explicit and user-friendly. The occasional contributor gets a more explicit explanation of why various checks failed.
The check_contrib
is improved to be more versatile and useful.
An automatic Android testing framework was experimented and is still in progress.
Markdown (nitmd) was extended to generate basic Groff manpages, so manpages in http://nitlanguage.org/tools/ and in theshare/man
directory are now managed internally by our tools (no more pandoc recommended as a dependency).
The official website uses a cleaned-up and configurable highlighter for blocks of code.
Now, default arguments can only follow the non-default ones. This improves the readability of calls and the association between calls and declarations; thus solving a lot of issues for users.
fun foo(a: nullable Int, b: Int, c: nullable Int) do ...
foo(null,2,null) # OK
foo(null,2) # equivalent
foo(2) # now refused! but previously accepted as equivalent.
Only exception: the last parameter of an assignment method is always the last argument
fun foo=(a: nullable Int, b: Int, c: nullable Int, d: nullable Int) do ...
foo(null,2,null) = 0 # OK
foo(null,2) = 0 # equivalent
foo(2) = 0 # now refused! but previously accepted as equivalent
No specific black magic is added to automatic constructor. Therefore an optional constructor parameter in a class can become mandatory in a subclass if a new mandatory attribute is introduced.
class A
var a: nullable Int
end
class B
super A
var b: Int
end
var a1 = new A(null) # OK
var a2 = new A # equivalent
var b1 = new B(null, 2) # OK
var b2 = new B(2) # now refused! but previously accepted as equivalent
This new policy also has the advantage of simplifying the model as this whole policy of the default argument is moved to the typing analysis: it is now just a pure calling convention.
Approximately 2/3 of the PR of the last two months concern libraries and programs. This either shows the maturity of the language and the tool chains, or that what remain to be done in these is unsexy and/or hard to do.
A new graph theory package. It provides basic interfaces for digraphs (including some algorithms) and a concrete class.
A new package matrix, to manipulate matrices of floats. The main module offers only general services and the advancedprojection
module adds services useful for 3D manipulations.
geometry gains an abstraction for polygons and an algorithm to triangulate them.
ordered_tree gains services that makes it more versatile and robust.
ai gains an additional example as a basic planner.
There is a new memory-based game where figures are cliqued in sequence by the computer and should be replayed by the player in the same order. As the player progresses, more figures are added and the sequences to remember become longer.
The game displays a very simple user interface and features big figures with bright colors and simple, distinguishable shapes; that makes it suitable for young children.
Chainz of Friendz has functioning sound on Android and improved save states: each level grid is saved so you do not have to replay the level from the beginning when you pause the application.
Improved eye-candy for Crazy Moles with particles, Bézier curves and a custom C method to display flash effects. Plus two new traps; the cactus disguised as a mole and the much awaited nuke.
Changes in Tinks! greatly improves multiplayer performance by removing the synchronous frames between clients and server.
Better concern division into modules in Ballz, and it now works on Linux!
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.
Extended API, Especially a new service code_point
in lieu of ascii
since Unicode is a bit more than ASCII, let's try using the right vocabulary when dealing with it. The ascii
service is however kept alive, but its contract is changed from Int to Byte to be used directly on a Char
without the need to have the old 'c'.ascii.to_b
, now a simple 'c'.ascii
will do the exact same.
Some fixes related to UTF-8 processing, especially when programs expect bytes but wrongly ask for chars.
Content-Length
when working with UTF-8 files 62564b2Some additional robustness when dealing with malformed UTF-8 strings. As UTF-8 is now part of Nit, the standard imposes conforming implementations to properly handle borderline cases like overlong sequences and such.
A lot of improvements related to performance degradation in specific cases:
Addition of the last big feature missing from jwrapper: duplicating the class hierarchy from Java to the generated wrapper classes. This allows user code to benefit from polymorphism when invoking Java methods wrappers.
This is done by collecting the implements and extends declaration from the javap output, rebuilding the class hierarchy and adding the super declarations needed to reproduce the hierarchy in Nit. To support a compatible hierarchy across modules, the model can now be serialized to a file and read by the following passes. Note that jwrapper wraps classes and interfaces in the same way so the implements and the extends hierarchy are merged into one on the Nit side.
New package, objcwrapper, a wrapper generator to access Objective-C services from Nit. At this point, objcwrapper can parse large Objective-C header files from Apple, and generate valid Nit code to wrap simple classes.
gen_nit
ca4cebbIntro portable services in gamnit to setup and use an OpenGL ES 2.0 display: GamnitDisplay, setup, close, flip
. These services can be used standalone when importing gamnit::display
, or integrated in the portability framework app.nit
by importing the whole gamnit
.
This is an important step for Gamnit as it allows to develop portable games and will simplify building new graphic APIs gradually. However, some very useful services are still missing: textures loading, input events, full app life-cycle support (pause/resume), etc.
The display still depends on the same libraries as mnit (sdl, egl, native_app_glue, etc.), but it is much cleaner and changing the libs should be easier.
For low-level users: fixed-size Integers. A literal rule has been added for these types, namely:
Note that an Unsigned Integer 8 bits is missing because of Bytes, which gets to keep its u8
suffix until we decide of something.
Moreover, there is a cleaning of binary operations on primitive data types:
lshift
and rshift
are replaced by the usual <<
and >>
bin_and
is replaced by &
bin_or
is replaced by |
bin_not
is replaced by ~
bin_xor
is replaced by ^
All this with additional bug-fixes.
Intro a tool to print a pretty report on the historic availability of beers at the excellent Brasserie Bénélux
There is also an ongoing effort to please GMail and the likes, so Benitlux emails are no longer sent to the spam folder.
nan
and inf
as special Float 1a3d0a1null
on undefined keys 4a22512The vim plugin is improved to provide a better documentation and easy code interpretation.
nit
19b8d73nitc
Nothing fancy on the src/
side these two months (except packages and the catalog)
Some various improvement in the benchmarks/
directory, especially to enable automatic regression testing (Jenkins again).