3 ms·
Janet has close integration with C going both ways. It has built in C ffi and you can easily build and distribute a janet binary that uses C libraries. It's al
by giraffe_lady 4y ago
Janet has close integration with C going both ways. It has built in C ffi and you can easily build and distribute a janet binary that uses C libraries.
It's also easily embeddable in C programs the same way lua is, making it possible to use it as a config, extension, or scripting language in a larger program.
Aside from that having used it a fair bit I think it's got a very "practical" orientation. It provides immutable structures, but doesn't enforce immutability semantics the way clojure does. It has a good concurrency system but is cleanly single-threaded and performant by default. And imo the standard lib is a really good balance, neither forcing you to build EVERYTHING yourself (lua) or having the whole last 50 years of CS research in it (racket).
- crabbone 4y ago> is cleanly single-threaded And here I immediately lost my interest. Anything that cannot do real concurrency is a toy in my book. There's no excuse for a language developed for practical computers in 21'st century to not be able to utilize concurrency which is practically built into every existing computer.
- giraffe_lady 4y agoMaybe you should reread that sentence bc I don't think it says what you think it says.
- crabbone 4y ago[flagged]
- tmtvl 4y agoThen it's a good thing those words were preceded by: > It has a good concurrency system
- crabbone 4y agoIt has none. When code isn't executed concurrently, that's not concurrency. There's idiotic fashion to call unrelated things "concurrency", but it's the same as calling various soy drinks "milk". It just adds confusion for no reason. This language has zero concurrency. It has some mechanism to randomly / unpredictably execute bits of different functions in succession: this is worthless, but has nothing to do with concurrency.
- shadytrees 4y agoI think you're using concurrency in a non-traditional sense https://stackoverflow.com/questions/1050222/what-is-the-difference-between-concurrency-and-parallelism https://stackoverflow.com/questions/1050222/what-is-the-diff... and I also think you're being a little bit uncharitable
- crabbone 4y agoReally? You are going to quote StackOverflow for an expert opinion? Why should anyone care about what that site users have to say? "Concurrent" means that something happens at the same time. It's that easy. The use of the word you refer to is a marketing trick used to bait you and switch the products before you pay. It's used by people who want to justify the existence of a worthless tool by pretending it has something to do with the one you really want. Very similar to "vegan cheese", which is really not a cheese in any way, but it's sold to you labeled as "cheese" because you wanted cheese, not ground cashew nuts.
- c-cube 4y agoYou're wrong on all points :-) Vegan cheese is not named this way to trick you, it's for vegans who want something functionally similar to cheese. Same goes for oat milk and the likes, they're used _like_ milk, in coffee, etc. Concurrency can mean doing several things that are interleaved, even if they're not literally running on multiple cores. Otherwise, you literally couldn't have concurrent network connections because the NIC only sends one packet at a time. Similarly, fibers, promises, etc. are valid implementations of concurrency as they're running different, unrelated strands of logic in an interleaved fashion.
- jlokier 4y agoYou misread the sentence. Janet supports full parallel execution on multiple CPU cores using native operating system threads, while using clean and fast single-threaded data structures by default on each thread.