# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=176

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 177

---

## [Why does JET seemingly not flag dynamic dispatch in this string interpolation?](https://discourse.julialang.org/t/why-does-jet-seemingly-not-flag-dynamic-dispatch-in-this-string-interpolation/112603)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [April 23, 2024, 1:13pm UTC](https://discourse.julialang.org/t/why-does-jet-seemingly-not-flag-dynamic-dispatch-in-this-string-interpolation/112603 "2024-04-23T13:13:54Z")

</div>

julia\> using LinearAlgebra, Cthulhu, JET julia\> D = Diagonal(rand(2)); julia\> @descend setindex!(D, 2, 1, 2) # Cthulhu setindex!(D::Diagonal, v, i::Int64, j::Int64) @ LinearAlgebra ~/.julia/juliaup/julia-1.11.0-alpha2+…

---

## [What is the minimum mac os version supported](https://discourse.julialang.org/t/what-is-the-minimum-mac-os-version-supported/113372)

<div class="topic-metadata">

**Author:** [@Zentrik](https://discourse.julialang.org/u/Zentrik)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 12:36pm UTC](https://discourse.julialang.org/t/what-is-the-minimum-mac-os-version-supported/113372 "2024-04-23T12:36:56Z")

</div>

As far as I can tell we build LLVM \>= 15 with Mac os SDK 10.14 on binarybuilder. So I presume that means Julia wouldn’t build on earlier versions and the distributed binaries are incompatible. Am I correct? Download Jul…

---

## [Unexpected change of field value in struct](https://discourse.julialang.org/t/unexpected-change-of-field-value-in-struct/113364)

<div class="topic-metadata">

**Author:** [@pmarg](https://discourse.julialang.org/u/pmarg)\
**Replies:** 11\
**Last updated:** [April 23, 2024, 11:40am UTC](https://discourse.julialang.org/t/unexpected-change-of-field-value-in-struct/113364 "2024-04-23T11:40:17Z")

</div>

I was not expecting the change in the field values in the following example. Is this a recent change? julia\> x = \[10., 10.\] 2-element Vector{Float64}: 10.0 10.0 julia\> @kwdef struct Test a = x b = x…

---

## [/dev/gpiomem error for BaremetalPi (Mmap.mmap regression)](https://discourse.julialang.org/t/dev-gpiomem-error-for-baremetalpi-mmap-mmap-regression/112611)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 8\
**Last updated:** [April 23, 2024, 10:55am UTC](https://discourse.julialang.org/t/dev-gpiomem-error-for-baremetalpi-mmap-mmap-regression/112611 "2024-04-23T10:55:58Z")

</div>

On a Raspberry PI 4 with 8 gig memory, I have upgraded the OS to Bookworm. Now when I execute the function init\_gpio() it gives me the error Could not map /dev/gpiomem . Make sure you have the required permissions. W…

---

## [MPI error for compiled bundle](https://discourse.julialang.org/t/mpi-error-for-compiled-bundle/113380)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 0\
**Last updated:** [April 23, 2024, 8:53am UTC](https://discourse.julialang.org/t/mpi-error-for-compiled-bundle/113380 "2024-04-23T08:53:43Z")

</div>

Because I use MPI.jl in my code, the compiled bundle will contain MPI in it, and I’ve always been using that MPI for consistence. However, recently this MPI fails. After some digging, I think the problem is in the 4.2.0+…

---

## [BLAS vs Threads on a cluster](https://discourse.julialang.org/t/blas-vs-threads-on-a-cluster/113332)

<div class="topic-metadata">

**Author:** [@SpuriousEigenstate](https://discourse.julialang.org/u/SpuriousEigenstate)\
**Replies:** 6\
**Last updated:** [April 23, 2024, 8:06am UTC](https://discourse.julialang.org/t/blas-vs-threads-on-a-cluster/113332 "2024-04-23T08:06:29Z")

</div>

I’m developing a script which, at its core, is mainly diagonalizing a large number of Hermitian matrices, i.e., eigen(Hermitian(A)). I want to run the code on a cluster (on a single machine, 96 threads) and am looking in…

---

## [Typevariables - how about \`struct MyType{T isa MyEnum} end\`?](https://discourse.julialang.org/t/typevariables-how-about-struct-mytype-t-isa-myenum-end/113340)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 4:58am UTC](https://discourse.julialang.org/t/typevariables-how-about-struct-mytype-t-isa-myenum-end/113340 "2024-04-23T04:58:30Z")

</div>

Hi there, I am thinking about a good way to selfdocument type variables. My first attempt is using @enum, but it seems this is not really useful, as the different enum instances are values and no types and hence cannot …

---

## [Hybrid Sorting Algorithmn Timsort and Introsort](https://discourse.julialang.org/t/hybrid-sorting-algorithmn-timsort-and-introsort/113365)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 2\
**Last updated:** [April 23, 2024, 3:20am UTC](https://discourse.julialang.org/t/hybrid-sorting-algorithmn-timsort-and-introsort/113365 "2024-04-23T03:20:12Z")

</div>

Does anyone know if there is a package to implement this two hybrid sorting algorithmn in Julia. I noticed that it is NOT implemented in the BASE sort function in Julia. Timsort - Wikipedia (used by Python) Introsort …

---

## [Community package for Delaunay triangulation and Voronoi cells](https://discourse.julialang.org/t/community-package-for-delaunay-triangulation-and-voronoi-cells/113249)

<div class="topic-metadata">

**Author:** [@charperflow](https://discourse.julialang.org/u/charperflow)\
**Replies:** 9\
**Last updated:** [April 22, 2024, 9:45pm UTC](https://discourse.julialang.org/t/community-package-for-delaunay-triangulation-and-voronoi-cells/113249 "2024-04-22T21:45:13Z")

</div>

I have been using a variety of julia packages for delaunnay triangulations and voronoi cell generation, all of which seem to become deprecated. First, I used VoronoiCells, but it is pretty limited in its implementation, …

---

## [Multithreading: cannot access struct member in another thread in ModernGL/GLFW app](https://discourse.julialang.org/t/multithreading-cannot-access-struct-member-in-another-thread-in-moderngl-glfw-app/113359)

<div class="topic-metadata">

**Author:** [@karna48](https://discourse.julialang.org/u/karna48)\
**Replies:** 0\
**Last updated:** [April 22, 2024, 8:42pm UTC](https://discourse.julialang.org/t/multithreading-cannot-access-struct-member-in-another-thread-in-moderngl-glfw-app/113359 "2024-04-22T20:42:40Z")

</div>

I’m trying to play audio in another thread using WAV.jl via @Threads.spawn . I do run julia with multiple threads via --threads parameter. (referenced data: SnakeGameCollection/common\_data at main · karna48/SnakeGameCo…

---

## [My function works on it's own but not in NonLinearSolve](https://discourse.julialang.org/t/my-function-works-on-its-own-but-not-in-nonlinearsolve/113204)

<div class="topic-metadata">

**Author:** [@Laura](https://discourse.julialang.org/u/Laura)\
**Replies:** 10\
**Last updated:** [April 22, 2024, 3:13pm UTC](https://discourse.julialang.org/t/my-function-works-on-its-own-but-not-in-nonlinearsolve/113204 "2024-04-22T15:13:41Z")

</div>

I have a set of equations that I would like to solve using the non linear equation solver NonLinearSolve.jl. I have writen a function for this which runs fine on it’s own but when I try to solve it I get an error message…

---

## [Installation Issues for TidierDB with Tidier](https://discourse.julialang.org/t/installation-issues-for-tidierdb-with-tidier/112967)

<div class="topic-metadata">

**Author:** [@jjAtNxtPt](https://discourse.julialang.org/u/jjAtNxtPt)\
**Replies:** 6\
**Last updated:** [April 22, 2024, 2:53pm UTC](https://discourse.julialang.org/t/installation-issues-for-tidierdb-with-tidier/112967 "2024-04-22T14:53:47Z")

</div>

I’m pretty new to using Julia and was trying to test out the Tidier packages and add in the TidierDB. However, when I try to add the TidierDB package after already having Tidier installed I get a requirements issue. It…

---

## [Performance issue: Axelrod model of dissemination of culture optimization](https://discourse.julialang.org/t/performance-issue-axelrod-model-of-dissemination-of-culture-optimization/113326)

<div class="topic-metadata">

**Author:** [@alex180500](https://discourse.julialang.org/u/alex180500)\
**Replies:** 6\
**Last updated:** [April 22, 2024, 1:30pm UTC](https://discourse.julialang.org/t/performance-issue-axelrod-model-of-dissemination-of-culture-optimization/113326 "2024-04-22T13:30:40Z")

</div>

Hello! I’m implementing an Agent Based Model (axelrod model of dissemination of culture). Every node has an associated vector of “opinions” (data) on different subjects (number of features is feat). Each step two nodes a…

---

## [Why does julia launch kernel threads?](https://discourse.julialang.org/t/why-does-julia-launch-kernel-threads/113053)

<div class="topic-metadata">

**Author:** [@SpuriousEigenstate](https://discourse.julialang.org/u/SpuriousEigenstate)\
**Replies:** 5\
**Last updated:** [April 22, 2024, 12:26pm UTC](https://discourse.julialang.org/t/why-does-julia-launch-kernel-threads/113053 "2024-04-22T12:26:52Z")

</div>

I’m currently trying to parallelize my code to run on a cluster, and using Threads.@threads. I noticed that in htop the cpu usage indicates that the running threads are “kernel threads” (red), meaning (insofar I underst…

---

## [Spending a lot of time resetting and reduction of arrays in custom simulation](https://discourse.julialang.org/t/spending-a-lot-of-time-resetting-and-reduction-of-arrays-in-custom-simulation/113073)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 8\
**Last updated:** [April 22, 2024, 8:06am UTC](https://discourse.julialang.org/t/spending-a-lot-of-time-resetting-and-reduction-of-arrays-in-custom-simulation/113073 "2024-04-22T08:06:59Z")

</div>

Hello! I am using TimerOutputs.jl to time the performance of specific componenets, which to be clear is really awesome and great. It has made me aware of how long I actually spend setting values back to zero: …

---

## [How to custom unicode completions?](https://discourse.julialang.org/t/how-to-custom-unicode-completions/113304)

<div class="topic-metadata">

**Author:** [@NeroBlackstone](https://discourse.julialang.org/u/NeroBlackstone)\
**Replies:** 3\
**Last updated:** [April 22, 2024, 3:58am UTC](https://discourse.julialang.org/t/how-to-custom-unicode-completions/113304 "2024-04-22T03:58:25Z")

</div>

I want to add 𝄫(double flat) and 𝄪(double sharp) to REPL unicode completion, but I don’t know how to do. I found this in github, but it seems that the Base module does not export the REPLCompletions submodule, and the R…

---

## [Would it be possible to use multiple CPU cores in Solving Nonlinear Equations?](https://discourse.julialang.org/t/would-it-be-possible-to-use-multiple-cpu-cores-in-solving-nonlinear-equations/113143)

<div class="topic-metadata">

**Author:** [@LINGXIAO\_QIN](https://discourse.julialang.org/u/LINGXIAO_QIN)\
**Replies:** 6\
**Last updated:** [April 22, 2024, 12:53am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-use-multiple-cpu-cores-in-solving-nonlinear-equations/113143 "2024-04-22T00:53:07Z")

</div>

I am trying to solve a system of nonlinear equations (~25 variables). Currently, I am using NonlinearSolve.jl, it works but I want to expedite the computation. Except for some strategies introduced here such as using Sta…

---

## [Potential error in the performance tips page](https://discourse.julialang.org/t/potential-error-in-the-performance-tips-page/113286)

<div class="topic-metadata">

**Author:** [@lee-ranaweer](https://discourse.julialang.org/u/lee-ranaweer)\
**Replies:** 2\
**Last updated:** [April 21, 2024, 10:41pm UTC](https://discourse.julialang.org/t/potential-error-in-the-performance-tips-page/113286 "2024-04-21T22:41:10Z")

</div>

Hello, I am new to Julia. I was working through the examples on the performance tips page when I ran into this code in the types with values-as-parameters section. The example code is included below as well. function ar…

---

## [\`vcat(\[\], \[1 2\])\` # OK. \`vcat(\[\], \[1 "2"\])\` # Not OK](https://discourse.julialang.org/t/vcat-1-2-ok-vcat-1-2-not-ok/112991)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 18\
**Last updated:** [April 21, 2024, 5:22pm UTC](https://discourse.julialang.org/t/vcat-1-2-ok-vcat-1-2-not-ok/112991 "2024-04-21T17:22:22Z")

</div>

vcat(\[\], \[1 2\]) # OK vcat(\[\], \[1 "2"\]) # Not OK: ERROR: ArgumentError: number of columns of each array must match (got (1, 2)) \[\[\];\[1 2\]\] # OK \[\[\];\[1 "2"\]\] # Not OK: ERROR: ArgumentError: number of columns of each array…

---

## [Is it possible to tell which processes are currently free?](https://discourse.julialang.org/t/is-it-possible-to-tell-which-processes-are-currently-free/113305)

<div class="topic-metadata">

**Author:** [@mikel8](https://discourse.julialang.org/u/mikel8)\
**Replies:** 0\
**Last updated:** [April 21, 2024, 3:57pm UTC](https://discourse.julialang.org/t/is-it-possible-to-tell-which-processes-are-currently-free/113305 "2024-04-21T15:57:17Z")

</div>

Hi all, I’m currently writing a distributed program with several workers. At one point in the code, I am trying to have all free workers split up a loop and execute a function for different input data. While I can make …

---

## [Apparently \`getindex\` of a vector accepts more than one index?!](https://discourse.julialang.org/t/apparently-getindex-of-a-vector-accepts-more-than-one-index/113302)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [April 21, 2024, 12:06pm UTC](https://discourse.julialang.org/t/apparently-getindex-of-a-vector-accepts-more-than-one-index/113302 "2024-04-21T12:06:59Z")

</div>

Why doesn’t this throw, given that the array \[10, 20\] is one-dimensional? I would expect a MethodError. julia\> \[10, 20\]\[1, 1, 1\] 10

---

## [How to download the html file of through a browser like Chrome](https://discourse.julialang.org/t/how-to-download-the-html-file-of-through-a-browser-like-chrome/113276)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 3\
**Last updated:** [April 21, 2024, 8:31am UTC](https://discourse.julialang.org/t/how-to-download-the-html-file-of-through-a-browser-like-chrome/113276 "2024-04-21T08:31:35Z")

</div>

How to download the html file of a website from juli, e.g.: https://page.com through a browser like chrom, if the website blocks access to robots. Some package? Paul

---

## [Reading/writing to stdio of running process/command does not work - reading blocks or is empty](https://discourse.julialang.org/t/reading-writing-to-stdio-of-running-process-command-does-not-work-reading-blocks-or-is-empty/113262)

<div class="topic-metadata">

**Author:** [@efficiencynuts](https://discourse.julialang.org/u/efficiencynuts)\
**Replies:** 6\
**Last updated:** [April 21, 2024, 7:42am UTC](https://discourse.julialang.org/t/reading-writing-to-stdio-of-running-process-command-does-not-work-reading-blocks-or-is-empty/113262 "2024-04-21T07:42:07Z")

</div>

Opening a prolog shell/repl process and sending strings to stdin and reading output doesn’t work. I don’t know what I am doing wrong but I tried a few methods and none of them seem to succeed. I just wanna run a long run…

---

## [Unusual non-deterministic benchmark results](https://discourse.julialang.org/t/unusual-non-deterministic-benchmark-results/113273)

<div class="topic-metadata">

**Author:** [@kdheepak](https://discourse.julialang.org/u/kdheepak)\
**Replies:** 8\
**Last updated:** [April 21, 2024, 3:15am UTC](https://discourse.julialang.org/t/unusual-non-deterministic-benchmark-results/113273 "2024-04-21T03:15:15Z")

</div>

I’m getting some quite unexpected non-deterministic benchmarking results on a toy problem. abstract type Shape end area(::Shape) = 0.0 struct Square \<: Shape side::Float64 end area(s::Square) = s.side \* s.side …

---

## [Thread-safe dict?](https://discourse.julialang.org/t/thread-safe-dict/64024)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [April 20, 2024, 9:24pm UTC](https://discourse.julialang.org/t/thread-safe-dict/64024 "2024-04-20T21:24:23Z")

</div>

Is there any dictionary implementation that can be updated safely within threaded code? References:

---

## [Replace data from specific column in dataframe](https://discourse.julialang.org/t/replace-data-from-specific-column-in-dataframe/113248)

<div class="topic-metadata">

**Author:** [@Sandy45](https://discourse.julialang.org/u/Sandy45)\
**Replies:** 5\
**Last updated:** [April 20, 2024, 1:52pm UTC](https://discourse.julialang.org/t/replace-data-from-specific-column-in-dataframe/113248 "2024-04-20T13:52:29Z")

</div>

I have two dataframes as shown below and need to replace one column(df.M02) with column(df2.M02) for year 2024 only. I know this can be achieved in multiple ways but I am just trying to find better way to do this. 2×13 …

---

## [\`isdefined\` documentation](https://discourse.julialang.org/t/isdefined-documentation/113067)

<div class="topic-metadata">

**Author:** [@Marco\_Antoniotti](https://discourse.julialang.org/u/Marco_Antoniotti)\
**Replies:** 9\
**Last updated:** [April 20, 2024, 7:49am UTC](https://discourse.julialang.org/t/isdefined-documentation/113067 "2024-04-20T07:49:08Z")

</div>

Hi I am very confused about the documentation of the isdefined function. What exactly is the index mentioned in the documentation? Or the symbol (I assume a field in a struct)? The example with a = 1//2 is not very u…

---

## [How do I read .webp images with Julia?](https://discourse.julialang.org/t/how-do-i-read-webp-images-with-julia/53597)

<div class="topic-metadata">

**Author:** [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Replies:** 9\
**Last updated:** [April 10, 2024, 6:25pm UTC](https://discourse.julialang.org/t/how-do-i-read-webp-images-with-julia/53597 "2024-04-10T18:25:45Z")

</div>

Title and demo says it all. julia\> using Images julia\> baseurl = "https://www.gstatic.com/webp/gallery3/2\_webp\_ll" "https://www.gstatic.com/webp/gallery3/2\_webp\_ll" julia\> img = download(baseurl \* ".png") |\> load 395×…

---

## [Guidelines on syntax checking for macros](https://discourse.julialang.org/t/guidelines-on-syntax-checking-for-macros/113258)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 1\
**Last updated:** [April 20, 2024, 4:51am UTC](https://discourse.julialang.org/t/guidelines-on-syntax-checking-for-macros/113258 "2024-04-20T04:51:25Z")

</div>

Currently I’m developing a few macros that behave a bit like language keywords (there is no public non-macro interface). I’ve been leaning towards aggressively checking the syntax/expressions that the user provides and t…

---

## [How to test that bounds checks are happening](https://discourse.julialang.org/t/how-to-test-that-bounds-checks-are-happening/90585)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 11\
**Last updated:** [April 19, 2024, 9:42pm UTC](https://discourse.julialang.org/t/how-to-test-that-bounds-checks-are-happening/90585 "2024-04-19T21:42:08Z")

</div>

When running CI, --check-bounds=yes is passed to julia as a startup option. How can I test to make sure I’m not misusing @inbounds? In this example, my bounds checking is broken, but the test still passes: x@X ~ % juli…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=175)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=177)
