Show HN: Clio Programming Language
github.com
github.com
Link to github project: https://github.com/clio-lang/clio
My goal is to get feedback and your opinions on this language, I thank you in advance for your interest and support!
1. We can use async remote function calls to run several tasks simultaneously. Why block and wait for the results when we can request the next one? This way you can also use resources on other machines on the network. This solves the single threaded only issue.
2. We can use functions and some libraries of other languages
I also wanted to make these simple tasks easier for the developer. 20-30 years ago things didn't work like now, today we have new concepts: serverless, cloud, saas... now things are different and it's nice to have some helpers in the core. I actually started working on this project because of the difficulties I had with C/Python/JavaScript when I was making a cloud heavy app.
One more reason for this is that I want to encourage our users to write smaller independent and interconnected programs instead of making a giant monolithic app. This helps a lot with maintainability and portability.
It's not clear why it is a better choice than others.
What can you do in Clio that you can't do in other langs?
Clio is a micro-services based programming language. Functions you define in Clio are isolated, they capture the outside scope when you define them, this scope is frozen for them, that means they cannot change the outside scope and they will not receive any updates from it. This reduces side effects and allows us to fork the process and be sure all functions return the same results for the provided arguments.
It has a host utility that you can use to host these functions. This host utility forks the process containing these functions. It listens to the port you provide and hosts the functions as microservices. These hosted functions can be imported and used remotely in some other Clio code. The host utility also supports sending event emitters and events over the network and allows to have a reactive stream of data.
I'm writing a remote call protocol specification for Clio, with this protocol you can write your microservices in any other language and import them in your Clio code, or import them in any other language of your choice and use them just like regular functions. In languages supporting asynchronous function calls, you can map these remote functions to a set of data and do your computations simultaneously. Clio runs in the browser too and all these features can be used on the browser.
It uses the microservices and web socket imports. To run it you'll need rethinkdb. Maybe I can host it for you if you want to see how it works? Also, if you want to see another specific example, I can make it. What would you suggest?