[Niteration] August and September 2015

14 views
Skip to first unread message

Jean Privat

unread,
Oct 6, 2015, 11:18:38 AM10/6/15
to nitlanguage

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

  • changes: v0.7.7 .. v0.7.8
  • shortstat: 1079 files changed, 149762 insertions(+), 28963 deletions(-)
  • pull requests: 117
  • non-merge commits: 573

Have contributed (or co-authored patches): Alexis Laferrière, Jean Privat, Lucas Bajolet, Romain Chanoir, Alexandre Terrasa, Alexandre Blondin Massé and Arthur Delamare.


Highlight of The Month


High numbers

  • Over 9000 commits
  • Over 9000 classes (in src, lib, contrib and examples)

Repository Migration

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.

Catalog of packages

A new service, the nit catalog lists all the current programs and libraries.

  • Merge: Introduce nitcatalog 4f43e28
  • Merge: nitcatalog: content and options 94353a4
  • Merge: nitcatalog: isolate package page into a subdirectory 3db1439
  • Merge: Extends catalog with a try it and a download apk links c5c3020

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:

  • 145 packages
  • 11 maintainers
  • 31 contributors
  • 32 tags
  • 841 modules
  • 9257 classes
  • 50192 methods
  • 300901 lines of code

This new service required the implementation of the new loader policy. See issue #1250.

  • Merge: Cleanup loader 97eccaa
  • Merge: New loader policy that features project.ini 5adfdf4
  • Merge: After new loader a22e7fc
  • Merge: Faster scan in the loader ff74c0e

To fill-up the catalog, a cleanup, documentation and reorganization of the various package was done. Especially the packagestandard was renamed to core.

  • Merge: Rename standard as core aad8668
  • Merge: Relocate examples 8cbe291
  • Merge: Improve ini 1d16c38
  • Merge: projects: update some short descriptions 4f8b2db
  • Merge: Reorganize mnit submodules 1caa807
  • Merge: Relocate examples/nitcorn 55c3fd6
  • Merge: Ini of projects d15dd59
  • Merge: Better synopses in many packages for a prettier catalog 77c2978
  • Merge: More ini 5098103

Lastly, packages are now named package instead of project.

  • Merge: Rename Project to Package b13ba2d

Platform and Continuous integration and deployment


Mac OS X

The platform OSX is now officially supported since the last issues that caused some tests to fail were solved (or worked around).

  • Merge: Own rand seed 47651a1
  • Merge: separate_compiler: remove the use of weak symbols. 05a4c9d
  • Merge: tests: specific mass-definition of tests marked todo 8d1bd15
  • Merge: c_tool: reorder CC arguments since the semantic between gcc and clang differs 3bf9602
  • Merge: Fix light FFI in interpreter on OS X fd425db

This allows us to ensure the absence of regression with a systematic execution of the test suite on OSX, thanks to Jenkins.


Android

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.

  • Merge: android: skip signing the APK if KEY_ALIAS env var is not set f596824
  • Merge: Prepare Android projects to be compiled in release mode for F-Droid 2b0983a
  • Merge: Prepare FDroid deployment f267ad6
  • Merge: Fix fdroid 7b076a9

Jenkins

Some broken links in the tests results pages are functional again (it was a Jenkins bug that was worked around):

  • Merge: jenkins: name command test results with cmd instead of run bce4aae

The various check scripts are more explicit and user-friendly. The occasional contributor gets a more explicit explanation of why various checks failed.

  • Merge: Friendly jenkins checks 20a555b

The check_contrib is improved to be more versatile and useful.

  • Merge: Report check contrib 1f1aaec
  • Merge: Beefup check contrib e315432

An automatic Android testing framework was experimented and is still in progress.

  • Merge: Work towards an Android testing framework and fix a few bugs 5315432

Nit uses Nit

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).

  • Merge: extends nitmd to handle manpages output format b144984

The official website uses a cleaned-up and configurable highlighter for blocks of code.

  • Merge: nitiwiki: external highlighter 88a5940

New policy for optional (default) arguments

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.

  • Merge: Stricter default arguments 413b0f0
  • Merge: example: optional attribute with a default value 0619c0c

Lib and Contrib

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.


Data-structures and Algorithms

A new graph theory package. It provides basic interfaces for digraphs (including some algorithms) and a concrete class.

  • Merge: Graph theory in Nit ef9654a

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.

  • Merge: lib: intro the matrix package 2d02e7d

geometry gains an abstraction for polygons and an algorithm to triangulate them.

ordered_tree gains services that makes it more versatile and robust.

  • Merge: Beef up OrderedTree API 5e1eef8
  • Merge: Fixes for ordered trees a06347f

ai gains an additional example as a basic planner.

  • Merge: contrib: add a simple planner that use lib/ai a3ee09c

Games

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.

  • Merge: android/audio: fix multiple music playing when pausing app 4526082
  • Merge: Fix Music loading bug for friendz e57ec85
  • Merge: Friendz: save states 1d60767

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.

  • Merge: Crazy Moles with particle effects, nukes, Bézier curves and cacti disguised as moles cda767f

Changes in Tinks! greatly improves multiplayer performance by removing the synchronous frames between clients and server.

  • Merge: Tinks! fix frame lock between clients and servers 677d5f9
  • Merge: Tinks! remove duplicated code in event reaction 6f2650b

Better concern division into modules in Ballz, and it now works on Linux!

UTF-8, strings and bytes related things

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.

  • Merge: Text::to_bytes da5dd50
  • Merge: Migration from ascii to code_point 23dfa0e
  • Merge: Bytes from hexdigest 32b79dd
  • Merge: Bytes is now Writable f0a1989

Some fixes related to UTF-8 processing, especially when programs expect bytes but wrongly ask for chars.

  • Merge: Fix nitcorn Content-Length when working with UTF-8 files 62564b2
  • Merge: regex: bug fix, less warnings and rename bd0c71a
  • Merge: Regular Expression fix with Unicode 6578be6
  • Merge: UTF-8 Regex afb9258
  • Merge: Fix Opportunity behavior with unicode characters 9a993ad

Some 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.

  • Merge: Intro Codec a672b1d
  • Merge: UTF-8 byte reading error 1282951
  • Merge: Clean UTF-8 string update 827c9ea

A lot of improvements related to performance degradation in specific cases:

  • Merge: Performance improvement in read_all_bytes 4d2df68
  • Merge: Performance update on Buffer b7cd48a
  • Merge: Text optimization ee05e04
  • Merge: Text attribute accesses optimization 8c0f2bf
  • Merge: Optimized use of escape_to_c 9383732
  • Merge: Basename fix 1829b22

Java and Objective-C wrappers

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.

  • Merge: jwrapper reproduces Java class hierarchy in Nit and serialize model 7f96835
  • Merge: jwrapper: prevent nitls to parse the generated files e35fbe9

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.

  • Merge: objcwrapper: wrapper generator to access Objective-C services from Nit aeb87fd
  • Merge: objcwrapper: generate valid Nit code for large Objective-C classes 6286532
  • Merge: objcwrapper: class methods as top-level methods, generate doc and intro gen_nit ca4cebb

App.nit, Gamnit and OpenGL-ES2

Intro 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.

  • Merge: glesv2: more services from OpenGL ES 2.0 to prepare for gamnit 0bd9f5a
  • Merge: gamnit: portable services to setup an OpenGL ES 2.0 display 217fdc3
  • Merge: glesv2: services for textures, shaders, framebuffers, renderbuffers & more, and update API 183dc9b
  • Merge: Fix app.nit Calc example 283e112
  • Merge: Small fix to iOS support 1d2db0b

More Low-level Integers

For low-level users: fixed-size Integers. A literal rule has been added for these types, namely:

  • i8: Signed Integer 8 bits
  • i16: Signed Integer 16 bits
  • i32: Signed Integer 32 bits
  • u16: Unsigned Integer 16 bits
  • u32: Unsigned Integer 32 bits

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.

Benitlux

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.

  • Merge: Benitlux report tool 5fa58b0
  • Merge: Benitlux report: prettier availability graph and fix errors in beer names 00ade46
  • Merge: Benitlux mailing list: nicer and differentiate between streets 55083e1

Misc changes in libraries and in contrib

  • Merge: lib/performance_analysis: relax nitunit expected results 1c97ced
  • Merge: curl: implement CURLOPT_TIMEOUT and CURLOPT_TIMEOUT_MS 1492417
  • Merge: Can use lib/github/github_curl without a oauth token 9ad73cd
  • Merge: lib/maths: add nan and inf as special Float 1a3d0a1
  • Merge: Cleanup lib/dom 06cef8a
  • Merge: More abstract classes cbf9358
  • Merge: Markdown fix 5338f27
  • Merge: Mongodb: fix C warnings and avoid crash caused by GC 6bd9d86
  • Merge: lib/code/standard: hash no more divides object_id by 8 a7621d3
  • Merge: Update remove_all to accept any patterns ff0b6bb
  • Merge: Fix qualified imports cd783ae
  • Merge: lib/ini: give to the user null on undefined keys 4a22512
  • Merge: lib/opts: accept non-conflicting parameters for OptionString and rename get_errors to errors a878479
  • Merge: lib/github: fix link to github doc in comment 676ba9d
  • Merge: Make stream and iterators withable b1dc501
  • Merge: githubmerge: make public name/email access of users more robust. 0d5a6f9
  • Merge: contrib/inkscape_tools: use Tinks! art instead of Dino's to test args e7f699e
  • Merge: Better nitcc 1c55b90

Vim

The vim plugin is improved to provide a better documentation and easy code interpretation.

  • Merge: Better module doc within Vim 1bf79dc
  • Merge: misc/vim: update the vim plugin to use core instead of standard feea1e8
  • Merge: vim plugin: intro NitExecute to interpret the current file with nit 19b8d73

Misc changes in nitc

Nothing fancy on the src/ side these two months (except packages and the catalog)

  • Merge: simplify glslangValidator test to support different versions of the tool 5a7dab4
  • Merge: Prepare qualified identifiers 02961c0
  • Merge: Stricter default arguments 413b0f0
  • Merge: nitc: fix --typing-test-metrics by using correct tags in FFI 06798e4
  • Merge: nitc: fix some broken case in equal_test 2b44410

Benchmarks

Some various improvement in the benchmarks/ directory, especially to enable automatic regression testing (Jenkins again).

  • Merge: Some improvement of benchmarks aea40c3
  • Merge: Bench strings 0eb90f3
  • Merge: Benchmark strings update f8c1cfa
Reply all
Reply to author
Forward
0 new messages