LunaReviewed 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.
- 👍 Intermediate results live-computed
- 👍 Slick app, visually appealing, clever design
- 👎 Cumbersome node editor
- 👎 Confusing type errors
- 👎 Crashes more than any other app I've ever used
The above video creates a Luna program that returns the host computer's IP address. It demonstrates:
- adding and deleting nodes
- hooking up the output of one node as the input to the next
- live intermediate results at each node
- searching for a node as you add it
- hitting tab on a node to search for likely nodes to further process it
- editing the text of the program (which updates the nodes)
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:
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.
- Respond to interaction events, like keyboard or mouse events
- The ability to export a standalone executable, like a webserver. Or be able to compile to another language and use as a library.