LWN: Comments on "Concurrency in Julia" https://lwn.net/Articles/875367/ This is a special feed containing comments posted to the individual LWN article titled "Concurrency in Julia". en-us Sat, 30 Aug 2025 09:59:11 +0000 Sat, 30 Aug 2025 09:59:11 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Concurrency in Julia https://lwn.net/Articles/875968/ https://lwn.net/Articles/875968/ leephillips <div class="FormattedComment"> The oops is mine—I didn’t realize that was cut. But for those with the wisdom to read the comments, there it is. It’s a shell command, nothing to do with Julia.<br> </div> Fri, 12 Nov 2021 21:46:36 +0000 Concurrency in Julia https://lwn.net/Articles/875967/ https://lwn.net/Articles/875967/ jake <div class="FormattedComment"> <font class="QuotedText">&gt; That’s true, which is why I thought it worth mentioning the lscpu </font><br> <font class="QuotedText">&gt; command, which will tell you the truth about your CPU.</font><br> <p> some darned editor may have dropped that line on the editing room floor ... oops :)<br> <p> jake<br> </div> Fri, 12 Nov 2021 21:30:32 +0000 Concurrency in Julia https://lwn.net/Articles/875966/ https://lwn.net/Articles/875966/ leephillips <div class="FormattedComment"> That’s true, which is why I thought it worth mentioning the lscpu command, which will tell you the truth about your CPU.<br> </div> Fri, 12 Nov 2021 21:24:43 +0000 Concurrency in Julia https://lwn.net/Articles/875962/ https://lwn.net/Articles/875962/ ballombe <div class="FormattedComment"> <font class="QuotedText">&gt; This allows access to all of the logical threads on the machine. This is often not optimal, and a better choice can be -t n, where n is the number of physical cores.</font><br> <p> This is true, and this is not a Julia-specific issue. However, OS make it much easier to query the number of logical threads than of physical threads.<br> </div> Fri, 12 Nov 2021 20:24:34 +0000 Concurrency in Julia https://lwn.net/Articles/875848/ https://lwn.net/Articles/875848/ rsidd Even for factorial, the parameter type can be anything, the function body can convert it to bigint if needed. <pre> julia&gt; function factorial(n::Integer) return prod(1:convert(BigInt,n)) end factorial (generic function with 1 method) julia&gt; factorial(convert(Int32,100)) 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 </pre> Fri, 12 Nov 2021 06:29:29 +0000 Concurrency in Julia https://lwn.net/Articles/875846/ https://lwn.net/Articles/875846/ droundy <div class="FormattedComment"> My brain somehow converted it to a factorial program. Not sure how that happened.<br> </div> Fri, 12 Nov 2021 04:34:57 +0000 Concurrency in Julia https://lwn.net/Articles/875742/ https://lwn.net/Articles/875742/ rsidd <div class="FormattedComment"> I&#x27;m only an occasional user of Julia but should have thought of that point, that if you don&#x27;t define the second function a method exception will be thrown anyway for wrong type of argument. But leaving it out would confuse readers... <br> <p> </div> Thu, 11 Nov 2021 05:36:36 +0000 Concurrency in Julia https://lwn.net/Articles/875735/ https://lwn.net/Articles/875735/ mathstuf <div class="FormattedComment"> What `isprime` algorithm requires values larger than the queried number (assuming non-negative values)?<br> </div> Wed, 10 Nov 2021 22:28:01 +0000 Concurrency in Julia https://lwn.net/Articles/875710/ https://lwn.net/Articles/875710/ droundy <div class="FormattedComment"> Wouldn&#x27;t using smaller int types simply make overflow almost inevitable? An Int version of factorial is bad enough in terms of uselessness.<br> </div> Wed, 10 Nov 2021 16:08:47 +0000 Concurrency in Julia https://lwn.net/Articles/875593/ https://lwn.net/Articles/875593/ leephillips <div class="FormattedComment"> All relevant observations! The Integer type would also include BigInt, so you could supply as big a prime candidate as you wanted.<br> <p> </div> Wed, 10 Nov 2021 16:06:00 +0000 Concurrency in Julia https://lwn.net/Articles/875592/ https://lwn.net/Articles/875592/ xecycle <div class="FormattedComment"> Threads in Julia indeed was a part that confused me a lot when getting started. Wow I couldn’t find a primitive to start a new OS thread? Either I can use the auto-parallelize tools feeling very similar to OpenMP, or I can go with M:N user threads.<br> <p> Now I think I have a better grasp of the whole picture and no longer worry about that. I used to think of Julia as “a high-performance general-purpose langauge with sugar for numeric computation”, but that view doesn’t fit well. Perhaps it is better viewed as “a high-performance numeric computing DSL with abilities to do some general-purpose programming”. The community measures and improves performance of Julia based on FLOPS numbers, instead of e.g. packets/s or 99.9% response time; this is not the tool for me if I wrap up a flat-combining data structure every other day, but it’s an excellent choice for crunching terabytes of tabular data, millions-by-millions sparse matrices, etc. Its bias towards OLAP made it a great tool, but also made some scenarios harder. The term “high performance” need some qualifications, but well, OLTP and OLAP community never agreed with each other on this topic…<br> </div> Wed, 10 Nov 2021 15:39:10 +0000 Concurrency in Julia https://lwn.net/Articles/875589/ https://lwn.net/Articles/875589/ garrison <p>I think the version in the article is great in that is succinctly illustrates the important point to a reader potentially unfamiliar with Julia. If we want to talk about <em>idiomatic</em> Julia, however, instead of defining a second <tt>isprime</tt> method that throws an exception, one should simply get rid of the second method. When no method is given with compatible types, a <tt>MethodError</tt> will be thrown, and this is the best way to communicate that a method has not been implemented for the given type(s).</p> <p>Another comment about making <tt>isprime</tt> more idiomatic: instead of specializing on <tt>Int</tt> (which, as the article notes, is a synonym for <tt>Int64</tt>), it could specialize on <tt>Integer</tt> instead. <tt>Integer</tt> is an abstract type that includes all integers, so with this change, the function would still work if passed e.g. an <tt>Int32</tt>. (The JIT will automatically compile specialized machine code for each case encountered.)</p> Wed, 10 Nov 2021 14:57:20 +0000 Concurrency in Julia https://lwn.net/Articles/875553/ https://lwn.net/Articles/875553/ leephillips <div class="FormattedComment"> I suppose throwing an exception is a better idea. But then I would have to explain the syntax for that, and my version does what I want. <br> </div> Wed, 10 Nov 2021 05:24:35 +0000 Concurrency in Julia https://lwn.net/Articles/875550/ https://lwn.net/Articles/875550/ rsidd <div class="FormattedComment"> Thanks for all the articles on Julia. Interesting point on using multiple dispatch in Julia to check for invalid data types without polluting your main function with checks. But shouldn&#x27;t the type-check function throw an exception, rather than return a string value? It&#x27;s equally short and better programming practice I&#x27;d think, and wouldn&#x27;t confuse LWN readers. A minor and tangential matter, but a bit of a turn-off when it&#x27;s right at the top of the article. <br> </div> Wed, 10 Nov 2021 04:30:17 +0000