qlova / ilang

"i" is a clear, concise programming language that is multi-lingual cross-platform, deterministic and resilient.
Artistic License 2.0
7 stars 1 forks source link

Zeroconfig distributed computing. #9

Open Splizard opened 6 years ago

Splizard commented 6 years ago

Distributed computing should be easy, like threading. I propose:

function helloworld() {
    print("Hello World")
    outbox("done")
}

software {
    if load(1) = "start"
        offload helloworld()
    else
        onload()
    end
    print(inbox())
}

This will run helloworld on a different machine to the software which is run with the "start" argument. Communication model is the same as threads, there might need to be a sort of select feature in I.

Splizard commented 6 years ago

A select feature is in development, it works with threading. It will support pipes in the future too.

if ready()
   var i = inbox()
   //do something with inbox
end