Hacker News new | ask | show | jobs
by caissy 4175 days ago
A few of the main contributors are good friends of mine, so this post might be biased.

One of the nicest part of Nit in my opinion is their foreign function interface (FFI). It currently supports C and Java out of the box, and Objective-C and C++ are being worked on. I had the chance to work with the FFI a few years ago when it was still a student's master project, and I really had a blast with it. Some librairies such as libcurl[1], curses[2] and sdl[3] were implemented with this FFI.

Another great part of this language is a project being worked on by the same guy that built the FFI, and it's a cross-compiler for mobile applications called Gammit[4]. You write your app in Nit and compile to Java and Objective-C natively for Android and iOS application. The iOS part isn't ready yet, but the Android one is quite advanced with a few great examples such as a small Minecraft clone working with Google Cardboard and having multiplayer functionality.

[1] https://github.com/privat/nit/tree/master/lib/curl

[2] https://github.com/privat/nit/tree/master/lib/curses

[3] https://github.com/privat/nit/tree/master/lib/sdl2

[4] https://github.com/xymus/nit/tree/gammit

1 comments

Our Curl module is due for an overhaul. A recent example of the FFI would be the bindings of OpenGL ES 2.0 at https://github.com/privat/nit/blob/master/lib/glesv2/glesv2....

The partial bindings to the Google Cardboard Java API may also be of interest: https://github.com/privat/nit/blob/master/lib/android/cardbo...