Today I had great success with implementing some basic reactive functionality.

At the basis of the editor UI there is a really crude reactive library I wrote. The idea is that you create boxes for values, and you call a getter to retrieve the value, but every time you call it, a dependency is recorded. There’s also a compute function which takes a computation function as argument, and takes the dependencies recorded during the execution of the computation and sets things up so when any dependency box’s content changes the whole computation function is re-run. This computation function should have some sort of side-effect, e.g. setting another box’s value or updating a DOM element.

This method results in a lot of noise in the code for setting up each box. Now, as I’m in the process of reimplementing the UI with itself, it occurred to me that I can just add a new language element for defining a box. I can set the type of a class property to a box and then just use it as a normal variable, and let the transpiler insert all the repetitive code that makes it work.

This now works for my little contrived example: I have a class with three reactive box properties; x is initialised through the constructor and can also be set from the outside. Whenever x changes, y will be automatically set to x*5. When y changes, z is set to the string "Z:"+y. Whenever z changes, the compute block on the top updates the DOM. As I set the value of x to 0, 1, 2, the DOM shows Z:0, Z:5, Z:10, etc.

I’m working on Whilelse, a software development platform that aims to make programming faster and easier.

The main idea is that the program is represented as a graph and can be edited through a projectional editor in a web browser. The UI is keyboard-based, so after getting used to the keyboard commands, you can code so quickly no-one will be able to follow.

Vision

domain-specific languages (DSL) for common programming patterns (models, views, database queries, templates, promises, reactive programming, etc) and custom UI behaviour for each kind of programming element, so that you can create programs faster and eliminate noise in the code which will make it easier to maintain

you code with high-level concepts and the platform takes care of optimising it for speed

a platform that you can start using without installing or configuring any software; the UI guides you through creating your app and you can deploy it without having to configure a server; in essence you just code the unique & relevant bits of your app and let the system take care of the boring, repetitive stuff

Status

It’s possible to build a simple Javascript application and export it with a keypress. You can either run it and have the output displayed on the UI, or run it as a service that listens on a port, e.g. a web application. There’s also a DSL for creating simple REST APIs.

The language is both statically and dynamically typed, you can simply choose whether to specify a type or not; if you do, you get autocompletion for method names.

I’m in the process of re-implementing parts of the code with itself – as in self-hosting – and improving the editor as I run into problems. I’m planning a one-day spike to see if I can make a really simple test framework and test runner, so I can do TDD with instant feedback on the UI.

Roadmap

I’ll spend February trying to re-implement the platform with itself. If that goes well, I’ll have something that’s useful so I’ll spend March turning it into something that can be used by others, and if you’re lucky, you’ll be invited to try it out in April.