Roads Less Taken

A blend of programming, boats and life.

Ni Renamed to Spry!

| Comments

When I started out implementing my own language in Nim I named it “Ni” without that much thought actually. It was a pun on “smaller than Nim” (obviously one letter shorter!) and of course with a reference to Monty Python.

But… really, the name “Ni” sucks. It’s hard to say in general and since it’s often mentioned together with Nim the confusion is obvious. And it also turned out to be less than optimal to google for.

So from now on the language is called Spry and there are two domains registered for it pointing to the same place - and The main site is, I first registered the .net domain but later realized that sprylang is just as reasonable as spry-lang, and there the .org was not taken.

Why spry?

Well, to be honest I was just surfing for synonyms to various “nice words” and I stumbled over it. I was leaning towards “fleck” but a native english speaking friend talked me out of it. :) Spry jumped up from some thesarus site and… it just feels nice. And the meaning of spry is also very fitting IMHO:

Spry: full of life and energy

Merriam-Webster Dictionary

One of the primary goals of Spry is to be a fully 100% live programming language and environment.

Spry: Moving or performing quickly, lightly, and easily

The American Heritage Roget’s Thesaurus

…and yeah, the agility and nimbleness is also a big part. Given the influence from “older” languages like Smalltalk, Rebol, Lisp and Forth - I can also see some sense in the typical use of the adjective spry - namely as pertaining to someone elderly! That’s fine with me.

And hey, it’s triple creamed too…

Nim Meets Arduino

| Comments

I now work as the Team Lead at Evothings and our open source product is a Workbench for creating mobile HTML5 applications focused on IoT, by editing and running them live on the mobile device inside our spiced up Cordova based “Evothings Viewer”.

I am of course partial here - but the tool is really easy to use, doesn’t force you into any specific framework or editor, enables a very quick development cycle and has tons of examples, tutorials, docs and some special IoT focused libraries like for example around BLE (Bluetooth Low Energy). You can have your code running on your phone literally within 1-2 minutes and you don’t need to install XCode or the Android tools, you can even run it just fine from your trusty Linux laptop! Just go for it. Ok, enough of the sales talk…

Since we are specializing in the IoT space we have our office filled to the brink with toys… eh, I mean IoT devices of all kinds from all different vendors. Two IoT communication standards are particularly important in this space, and that’s BLE and MQTT. I have already written three blog posts around MQTT using Evothings. Now I am instead focusing on BLE and particularly the embedded device side of the story.

This led me to round up a bunch of devices at the office that are fairly technically capable and have BLE support. The one I selected was the LinkIt ONE development board from MediaTek & Seeed Studio. It’s an insanely feature packed little board (GSM/GPRS, GPS, Wifi, BLE, sound output, SD card) with decent computing power (ARM7 EJ-S, 16Mb flash, 4Mb RAM) while still remaining in the “medium” embedded space I would say, still ruling out plain Linux and regular tools. I consider the Raspberri Pi or C.H.I.P and similar machines to be in the “large” embedded space, they are real computers and you can basically use whatever you like to develop on those.

The medium and small devices can be programmed using for example Espruino or Micropython (two very interesting projects) but in many cases, for more demanding applications, C/C++ is still king simply because of size and performance advantages. And also the fact that hardware vendor SDKs are typically in C/C++. But could there be an alternative language out there?

  • A language that is just as fast and small that easily can use all these C/C++ SDKs?
  • A language with a syntax similar to Python made to be easy to write and read?
  • A language with soft realtime GC and a sane advanced type system with generics?
  • A language with a good standard library and friendlier than C++?
  • A language with compile time hygienic AST based macros written in the language itself?
  • A language offering an imperative style and not forcing OO if you don’t want to?

Yep! Read on to find out…

Evothings + Phoenix = Neato

| Comments

I have just started working at Evothings!

It’s a fun gang making slick development tools and libraries for building mobile IoT apps. Evothings is pushing the envelope on really easy mobile development focused on all the new nifty IoT-devices flooding us over the next few years.

In my last article I predicted Elixir to become big and now that I am learning the Evothings tools I wanted to make an Evothings example that uses Phoenix, the Elixir web server framework, as a backend, using its channels mechanism for websocket communication.

Coinciding with the release today of Evothings Studio 2.0 beta 2 (yay!) I will show step-by-step how to:

  1. Install Evothings Studio locally. It’s just unpacking a zip :)
  2. Make sure we can run the “BLE Scan” example app and modify it.
  3. Get a Phoenix server up on a Debian/Ubuntu server on the internet.
  4. Modify the app and server to use Phoenix channels for publish/subscribe of scan data.
  5. Verify it all works!

Since not everyone has a Linux server up on the internet you can skip step 3 and just use my public server :)

Let’s go!

Elixir Booming

| Comments

It seems like the “damp cloth of Java” that has been plastered all over the programming landscape the last 20 years is finally being lifted. I admit, I do dislike Java …immensely. And not only on technical grounds, but even more based on what I perceive as it’s community worshipping complexity for it’s own sake. Of course IMHO.

These days new and truly interesting languages are all over the place. Rust and Go are two examples with a lot of momentum, although I personally choose Nim over both.

And Smalltalk is still my “super productive dynamically typed” language of choice, but I just learned about a language that I really think is going places…

Adding Objects to Ni!

| Comments

So… Ni has almost reached the point where I can see objects appearing. The following describes the design I currently have in mind, read it and tell me what you think so I can scrap it and start over ;)