4 ms·
This is a really fluffy article devoid of real technical content. It does not sound like the author fully grasps all the concepts discussed, especially in the s
by ComputerGuru 5y ago
This is a really fluffy article devoid of real technical content. It does not sound like the author fully grasps all the concepts discussed, especially in the section on parallelism and concurrency.
> Many systems using other “preferred languages” also implement some form of GIL (e.g., Javascript’s V8 machine, CPython); we don’t hear complaints about it, because these languages have a rapport for heavy lifting and parallel tasks.
GIL is the biggest performance obstacle for python and is constantly discussed. JavaScript is notorious for being exclusively single threaded (unless you consider the very late arrival of workers to be true multithreading).
- pavlov 5y agoJavaScript is single-threaded, but in the most popular runtimes, almost all I/O is event-based. This is a great difference from Ruby where library functions are blocking (or at least were when I last used the language many years ago). A single thread of execution for scripts isn't so bad when those scripts are all relatively small callbacks.
- ComputerGuru 5y agoYeah, it's fine for "reactive" processing but not for anything where you'd actually spin up a separate thread (or use a threadpool thread) in a lower-level language - i.e. to perform cpu-intensive calculations/computations in parallel. In practice, JS being single-threaded isn't an obstacle for the uses the developers using JS are after. It doesn't sound like Ruby 3 affords the same with its GIL (but all I'm going off of is TFA).
- shuckforjustice 5y agoHey! I'm the writer of the article. I'm not a fantastic writer but am trying to improve and felt I needed to start somewhere, so I started with something I'm passionate about. Truth be told I do not know as much about Python as I do about Ruby, I think I was probably responding to its comparative popularity and not in fact if it is discussed about or not, so that's on me. I'd like to know more about what you would have liked to see in an article like this, it is a bit of a fluff piece; the goal wasn't to provide a super technical explanation. The goal was to get people talking about Ruby 3 and I am happy to see so much discourse here! But yeah, I was asked by the maintainer of the blog to try to provide "layman's explanations" when I could, which I think may have kneecapped me a bit in retrospect - but obviously layman's explanations usually are best when they are succinct and accurate. Is there anything else, particularly in the layman's examples for parallelism and concurrency, that felt inaccurate or misleading? I want to make sure I am communicating the concepts and implications correctly. From my perspective, the goal of the article is provide an explanation of concurrency/parallelism, so that when I begin to describe the features in Ruby 3.0 we have appropriate context to understand why fibers/ractors matter, so if I didn't do that I really bungled it!
- singhrac 5y agoI saw you edited your post, which is great. Happy to chime in from the Python side: people complain a lot about the GIL but in practice a lot of the truly parallel logic happens in C extensions, which are lately quite easy to write. This is where all the heavy lifting for machine learning happens; the I/O parallelism that one might see in e.g. a scraper is a different kind of thing (e.g. fibers). I don't know much about ractors but it's neat to see a GIL being lifted! Small nits: the image with fibonacci performance numbers needs a maximum number of significant digits. I think "implement" usually applies to an algorithm or idea; you might mean "use" Sidekiq? The thing I'm most curious about is how easy it is to write an extension in C/C++/Rust for Ruby (in comparison to cffi, pybind11, etc.). Best of luck! It's not easy to write a technical article and face criticism, but I appreciated reading it.
- shuckforjustice 5y agoCool. Thanks for the feedback and the Python context!
- jrochkind1 5y agoI think it's important when writing an article like this to stick to what you know about. If you aren't sure what is going on with the GIL in Python or v8 and whether it's discussed or how it's relevant, either research to learn more, or don't mention it. Instead of assuming things or implying assumed things, to make the article flow. Articles I trust are where I trust the author knows what they're talking about and doesn't assume things they don't know.
- shuckforjustice 5y agoTotally, I understand. I've since changed the language to not assume anything, simply stating that they exist, which is all I know. I was concerned that I was painting a picture of GIL being a Ruby concept, which isn't the case and is why I included it originally, but you're absolutely right. Thank you for the feedback, really appreciate it!
- 5y ago
- nkozyra 5y ago> JavaScript is notorious for being exclusively single threaded Sure, but this concurrency discussion is talking about green threads / event loops as much as true parallelism.