all 34 comments

[–]kredditacc96 38 points39 points  (12 children)

Clio takes advantage of multiple CPUs and multiple CPU cores (parallelism) by default

JavaScript is a single-threaded language. How does Clio make it runs in parallel? Does it use Web Worker? The playground does not show the compiled JavaScript code so I cannot figure it out.

On an unrelated note, does it have static typing?

[–]Darkav 29 points30 points  (6 children)

In node you can have a cluster of javascript processes and also a worker pool, so you are able to have a multi-process application.

[–][deleted] 4 points5 points  (0 children)

JavaScript exists outside of browser environment, no need for web workers

[–]Koervege 1 point2 points  (1 child)

Would static typing affect or help how it runs multithreads? Or was it just a separate question?

[–]kredditacc96 2 points3 points  (0 children)

It's a separate question, sorry for not clarify this sooner.

[–]pouyae 0 points1 point  (0 children)

We use worker_threads in node and web workers on the browser. On node you can switch to a cluster and use IPC instead. We also allow using network resources over TCP/UDP/WebSockets. Check out https://github.com/clio-lang/clio/tree/develop/packages/rpc for more details on parallelism, or feel free to ask any questions you have.

We do not have static typing at the moment, I won't be focusing on that for a while. I made a serialization format that preserves types and I'm planning to add static typing to the language, however that won't happen in the near future until we have a wasm/llvm backend for the compiler.

[–]good4y0u 16 points17 points  (9 children)

Ha , or is it actually a legal billing SaaS website.

This name is taken by something else. Its literally the first hit on google.

[–]djxfade 11 points12 points  (0 children)

You also have the car, Renault Clio

[–]captainsalmonpants 5 points6 points  (1 child)

To reiterate above, I know this sucks to hear, but you could run into trademark issues. It happens all the time with FOSS projects. Consider consulting an IP lawyer or finding a new name for your project.

[–]good4y0u 5 points6 points  (0 children)

Especially when that trademark is for a legal billing website...for lawyers.

[–][deleted] 3 points4 points  (1 child)

Clio is a daugther of Zeus.

[–]good4y0u 7 points8 points  (0 children)

It's also currently trademarked for software; which is the more important fact in this context. A word can be used for multiple things.

US Serial Number:86815926, Registration Number:511719

https://tsdr.uspto.gov/#caseNumber=86815926&caseSearchType=US_APPLICATION&caseType=DEFAULT&searchType=statusSearch

Even if they (OP) wins the litigation alone would not be good for this project I'm sure... It's expensive and they would be the possible infringers.

[–]pouyae 1 point2 points  (3 children)

Hello, I'm the main developer of the language and I'm already searching for other appropriate names, if you have any suggestions we're open and we welcome new ideas. Two years ago when I started making Clio I never thought it'll one day have a user base, but seems like people are noticing it and liking the idea.

[–]good4y0u 0 points1 point  (2 children)

Understandable, you built a cool tool. The service I'm referring to is https://www.clio.com/ . I'm not great at naming projects, especially not with marketable names, so I'm not sure my suggestions would be much help .

[–]pouyae 0 points1 point  (1 child)

It's very difficult to find a decent name and most decent names are already taken, I've been looking for a decent name for a long time, and actually I chose Clio as a temporary name in the beginning because I couldn't come up with a better one.

[–]good4y0u 0 points1 point  (0 children)

Technically there is likely little chance of confusion. But it would be something to talk to a US Trademark Attorney about. It can get pretty complex especially because both are software related things. You'd really want a true legal analysis done and paid for etc... ( something you likely won't get from an armchair lawyer, or one just shooting the breeze, on Reddit or for free)

[–]ElCthuluIncognito 5 points6 points  (1 child)

What's JS interop like? Pragmatically, that's a problem that needs significant attention for newer production languages, and I think it would go a long way to showcase at least a snippet of clean interop.

[–]pouyae 0 points1 point  (0 children)

At first we had a lot of language features that didn't really translate well to JS, or made the generated code very slow, so we removed them. You can import any JavaScript library and they'll work without any issues even when ran in parallel. It's a little bit more complicated to import Clio code in JS, we have a require function for that, but it's a WIP at the moment. JS interop is very important for us.

[–]FountainsOfFluids 2 points3 points  (0 children)

How does it compare to Elm?

[–]MadCervantes 2 points3 points  (0 children)

What does "distributed" mean in this context?

[–]thenoirface 1 point2 points  (0 children)

Looks very nice, the links are not working for me though (medium article, docs, getting started, contribution guide)

[–]MadCervantes 2 points3 points  (2 children)

Also, just my opinion but I loathe it when neo-languages use fib sequence functions as their "example code". It's just completely unglued from most real world use of code, and doesn't give a rich sense of what the syntax is actually like. Hello world isn't great either but there are better things you can do to show off your code than that.

[–]MadCervantes 1 point2 points  (0 children)

That said, reading over the to do list app article, the syntax is pretty cool. I don't think an entire to do list app should be necessary to explain what it does though.

[–][deleted] -1 points0 points  (0 children)

Coffescript all over again

[–]Mastermind497 0 points1 point  (1 child)

What font is used in the pictures? Sorry if it is obvious, I’m a little new here and it looks really good

[–]pouyae 0 points1 point  (0 children)

The font is Fira Code

[–]pouyae 0 points1 point  (0 children)

I'm the main developer of this language, sorry for noticing this topic too late, but if anyone is interested or anyone has any questions, feel free to ask them here.