12 ms·
Congrats on the release! The biggest factor drawing me to experiment a little with Crystal is that it is one of very few languages providing what otherwise has
by samuell 6y ago
Congrats on the release!
The biggest factor drawing me to experiment a little with Crystal is that it is one of very few languages providing what otherwise has been pretty unique to Go: Lightweight threads+Channels+M:N concurrency (automatically multiplexing the lightweight threads onto a smaller number of OS threads).
Also it does it with a very readable and clean syntax.
Wrote a little about it, with code comparisons, before:
https://rillabs.com/posts/crystal-concurrency-easier-syntax-than-golang https://rillabs.com/posts/crystal-concurrency-easier-syntax-...
- The_rationalist 6y agoThe biggest factor drawing me to experiment a little with Crystal is that it is one of very few languages providing what otherwise has been pretty unique to Go: Lightweight threads+Channels+M:N concurrency This has no value proposition versus Kotlin coroutines and if it doesn't have first class support for structured concurrency, cancelation and most importantly reactive streams then this language is sub-par.
- adenozine 6y agoHave you ever thought about why so many of your comments get downvoted?
- The_rationalist 6y agoThe conflict between mental expectations / wishful thinking of people reading me and the sounds, grounded in truth arguments that I provide likely hurt some feelings and thus is downvoted. Platforms like HN definitely lack truth seekers like me that make online conversations more epistemologically valid, especially in this post truth era. Do you realize the human resources cost that a new language imply? A new programming language (which is not polyglot aka based on graalvm) imply an almost complete duplication of work for creating their library ecosystem instead of reusing the existings. We talk about so many human hours wasted that could have instead be used for making the world a better place. Justifying such a cost is already almost impossible with a language that has a clear value proposition but to not realize the absurdness of this cost for a language that has no clear value proposition really is something intellectually...
- adenozine 6y agoYou just spam java facts, you're hardly an epistemological wonder of conversation. I fact checked a couple of your comments and only one was right. Take a look at yourself and reflect. If there's dozens or hundreds of interactions that go poorly, notice that YOU are the common denominator. What you've written here is clearly delusional and makes me worry for your health.
- The_rationalist 6y agoAnswer to the second part of my message instead of ad homineming my health, attack the ideas not the human being, which is something that evidently should not need to be stated.
- adenozine 6y agoI don't care about your ideas on Crystal, and clearly others don't either. Nobody is attacking you, I'm expressing concern for you. Want to talk privately? Email in my bio.
- pansa2 6y ago> automatically multiplexing the lightweight threads onto a smaller number of OS threads For Crystal 1.0, the number of OS threads is always 1, isn’t it? So although this provides concurrency, it’s less powerful than Go where the same mechanism also provides parallelism.
- deleted 6y ago[deleted]
- resonantjacket5 6y agoIt seems they're planning for multi (OS) threads soon, but it wasn't able to make it into 1.0
- samuell 6y agoUnless you supply the -Dpreview_mt flag, as in the post, as far as I understand :)
- YorickPeterse 6y agoErlang has been doing this for the better part of three decades. Of course Erlang doesn't compile to native code, so at least that's a difference.
- butterisgood 6y agoIt does have a JIT now.
- nine_k 6y agoFunnily, there is also a language with Ruby syntax, but for Erlang VM, called Elixir.
- sullyj3 6y agoHaskell's concurrency has those features! The Async library contains high level combinators for concurrency that are particularly nice to use. (page1, page2) <- concurrently (getURL url1) (getURL url2) https://hackage.haskell.org/package/async-2.2.3/docs/Control-Concurrent-Async.html https://hackage.haskell.org/package/async-2.2.3/docs/Control...
- samuell 6y agoThanks for the pointer!
- fulafel 6y agoInteresting. I wonder what the complexity cost in the runtime and C FFI limitations arising from it are in Crystal - these seem to be the main reason most languages don't do it (weighed against the benefit over normal OS threads which are also pretty lightweight). edit: there seem to be some clues about FFI effects in this case of the PG connection library: https://forum.crystal-lang.org/t/issue-with-crashes-hangs-with-fibers-channel-and-pg-db/3003 https://forum.crystal-lang.org/t/issue-with-crashes-hangs-wi...