Hello World with Nucleoid

Can Mingir
Jun 18 · 2 min read
Hello World with Nucleoid
Hello World with Nucleoid

Nucleoid is a runtime environment that is designed for declarative programming so that it executes statements based on formal logic in syntax of ES6 (JavaScript). This enables the runtime to provide logical integrity and store statements so that it doesn’t require external database.

The runtime accepts statements any time without requiring compile or restart.

Here is the simplest form:

> a = 1
> b = a + 2
> a = 2
> b
4

Unlike in imperative language, when b = a + 2 is defined, Nucleoid creates data graph with connections among statements, so when a is changed, b is updated by the runtime.

This concept can be applied to objects as well:

> class User {}
> user1 = new User()
> user1.email = user1.username + "@domain.com"
> user1.username = "first-user"
> user1.email
"first-user@domain.com"

this is class level declaration of sample example, so this statement applies to all users:

> User.email = User.username + "@domain.com"
> user1.email
"first-user@domain.com"

Nucleoid runtime accepts all statements of ES6 and builds graph accordingly:

> m = false
> n = false
> if( m == true ) {
n = m && true
}

> n
false
> m = true
> n
true
Image for post
Image for post

Nucleoid runtime creates state of variable or object in memory, builds data graph and stores statement cumulatively on the disk, so that it doesn’t require external database, but it supports all database functions at the same time.

Ubuntu:

sudo apt-add-repository ppa:nucleoid/nucleoid
sudo apt install nucleoid

Docker:

docker run -d -p 80:80 nucleoid/nucleoid

See for more details at nucleoid.org/get-started

Once installed, open the terminal on browser:

Image for post
Image for post

See the project at gitlab.com/nucleoid/nucleoid

Nucleoid

Declarative Runtime System

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store