Whole Code



Reviewed July 18, 2019

Luna is a Haskell-inspired functional programming language, with both a node-and-wire and a textual representations. Despite its visual environment, Luna is targeting a technical user base, and expects its users to be fluent in its textual language as well. Luna was designed with data processing in mind, for industries such as "data science, machine learning, IoT,Bioinformatics, computer graphics or architecture." The Luna Electron app was released and open-source in Jan 2018.

Product Feel

Basic Usage

The above video creates a Luna program that returns the host computer's IP address. It demonstrates:

Strong visual metaphors for functions

Inputs are to the left and output is to the right, in both the functions you’re using and defining. It feels like a fractal structure because every screen accepts inputs on the far-left and ouputs on the far-right, and in-between are function nodes that also accept their inputs on the left and outputs on the right.

You can select a number of nodes and hit the f-key to abstract them into a function. Luna intelligently figures out what inputs and outputs there are to your function, and hooks them up correctly. Below is Luna program where we want to abstract the middle five nodes:

Which then looks like this:

Intermediate results

Live-updated intermediate values is a very compelling feature. The following video shows a stream of numbers which create an animation of a growing circle. Both the stream of numbers and the circle update live. In the video, I mouse over both nodes to show their type signatures.

Node expression editor

Nodes in Luna can be arbitrary Luna expressions, which can be great for compactness. The following video demonstrates how their autocomplete functionality pairs well with their dot-syntax (which normally isn't found in functional languages). However, you may notice how selecting each autocomplete suggestion bounces me out of the textbox, and I have to scroll and double-click to resume typing.


Further Reading