> Its use of dynamic typing makes me a little bit hesitant to use it, though, as I really love the help provided by static typing. There is dialyzer, a static type (and not only) analysis tool for Erlang. It is part of Erlang/OTP (i. e. built-in.) http://erlang.org/doc/apps/dialyzer/users_guide.html
Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
91–100 of 145 posts
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#92Whether or not this is "fearless" depends on your point of view. As a long-time pthreads programmer, these systems feel like skittish concurrency. It's for folks who are too afraid to use the underlying concurrency primitives, like shared memory, synchronization of some kind provided by OS, threads.
Exactly. Because the recorded history shows those constructs are nearly impossible to use correctly.
(Did the Python crowd ever fix the race condition in CPickle?[1] They were in denial about this about eight years ago when I reported it. Doing multiple CPickle operations in separate threads can crash CPython. If you search for "CPickle thread crash" you find many reports of hard to reproduce problems in that area.)
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#93Whether or not this is "fearless" depends on your point of view. As a long-time pthreads programmer, these systems feel like skittish concurrency. It's for folks who are too afraid to use the underlying concurrency primitives, like shared memory, synchronization of some kind provided by OS, threads.
I interpreted "fearless" to mean the opposite of "defensive programming." You have to be pathologically defensive when coding with basic synchronization primitives. These languages provide an alternative that frees you from that mindset. I only have experience with Erlang/OTP but it has been mind expanding when it comes to writing complex, robust, concurrent code. In fact one of the core Erlang style principles is "do not program defensively." Try that with pthreads!
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#94Earlier quoted context omitted.
Or Pony is not ready for the world. I mean, they don't even have arithmetic operator precedences [1]. If you're doing things concurrently it must be something uber-important, like censoring cat pictures, but apparently not arithmetics. [1] https://github.com/aksh98/Pony_Documentation#precedence
> Or Pony is not ready for the world. I mean, they don't even have arithmetic operator precedences Many languages don't have arithmetic operator precedence (Smalltalk, Lisp, etc) and that's fine. It's not some feature that's missing, it's a design choice.
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#95Earlier quoted context omitted.
I did use agents in the past, but stopped since core.async became available: it addresses the use cases for agents in a much more flexible way. Also, I found that handling errors in agents is difficult. As for the general use case, atoms and core.async are great tools, and I haven't needed to use refs (aka the STM) for years.
Don't the core.async go-blocks have issues if you need to block on IO heavy stuff, as in the thread-pool will be blocked until the side-effects are done? Agents don't have that problem, at least I don't think they do.
This is also a bit of a departure for people coming from Go or Erlang/Elixir.
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#96Earlier quoted context omitted.
> Or Pony is not ready for the world. I mean, they don't even have arithmetic operator precedences Many languages don't have arithmetic operator precedence (Smalltalk, Lisp, etc) and that's fine. It's not some feature that's missing, it's a design choice.
In Lisp and Smalltalk it's obvious enough how composite expressions are evaluated, and they don't have the usual infix syntax to begin with. Pony does and the different precedences are just a bad surprise. As far as that's a design decision, I'd call it bad design.
That's Lisp. In Smalltalk they do (have the usual infix syntax).
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#97Whether or not this is "fearless" depends on your point of view. As a long-time pthreads programmer, these systems feel like skittish concurrency. It's for folks who are too afraid to use the underlying concurrency primitives, like shared memory, synchronization of some kind provided by OS, threads.
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#98I was really excited to discover Pony a couple of years ago, sadly there is negative momentum with this project. So much potential, yet the world isn’t ready for it yet.
The problem with fancy new programming languages is that no big company is willing to back it and then actually use it (this is the most important step). But languages without backing/usage go nowhere and then get donated to the apache or eclipse foundation.
[1] https://github.com/sylvanc
[2] https://www.microsoft.com/en-us/research/people/syclebsc/
[3] https://qconlondon.com/speakers/sylvan-clebsch
Pony: Co-Designing a Type System and a Runtime [video] https://www.microsoft.com/en-us/research/video/pony-co-desig...
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#99I'm a bit surprised that there didn't appear to be any mention of Clojure's built-in concurrency support outside of basic immutability. core.async gives a nice channel-based system, agents give an actor-ish system, and STM/atoms let you mutate the variable safely, without having to manually work with locks. This is definitely a good high-level article, just something I was surprised by, since core.async is what drove…
It’s also worth noting that almost nobody uses agents or STM (except for some highly specific use cases, but I’ve never seen them in years), and core.async is a library, not a part of Clojure (which is a good thing, because it promotes choice and keeps the language small).
Re: Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
#100Earlier quoted context omitted.
It's not useful to use the same term for very different kinds of things. Shared resource deadlocks are common and disastrous problems. Share nothing mutual blocking is uncommon, not necessarily a problem at all and can be completely harmless and automatically recovered when it is a problem. For example, spawning actors to wait without timeouts would be absolutely ok, parent can do all the timeouting and kill the chil…
The term deadlock has been used for message passing issues since the dawn of time. It is literally the same issue. Using timeouts to paper over issues is just wrong. I accept that timeouts are necessary to deal with network issues (and a timeout should cause the connection to be dropped, so won't solve the deadlock issue), but certainly they are not required for in-application message passing. Finally if an actor won…
Think of it as reacting to messages, not waiting. In that model actors of course can react by sending messages, but can't have a special waiting state for specific messages, making it impossible to block other handlers. I'm not sure why this is hard to understand.
We do have this problem solved in every possible way. But it's so not a big deal with actor model, that there is no point sacrificing any flexibility for it.