# General Usage

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

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

**Page:** 231

---

## [Julia 1.10-rc1 gives a huge speed-up over Julia 1.9](https://discourse.julialang.org/t/julia-1-10-rc1-gives-a-huge-speed-up-over-julia-1-9/106072)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [November 11, 2023, 3:30pm UTC](https://discourse.julialang.org/t/julia-1-10-rc1-gives-a-huge-speed-up-over-julia-1-9/106072 "2023-11-11T15:30:50Z")

</div>

I am running 400 simulations, based on ModelingToolkit, each 11h of real-time. With Julia 1.9, launching Julia with: julia --project -i -q -t 16 it takes 44 s (second run). With Julia 1.10-rc1, launching Julia with: …

---

## [Modifying Plots.jl subplots in-place](https://discourse.julialang.org/t/modifying-plots-jl-subplots-in-place/106069)

<div class="topic-metadata">

**Author:** [@CM1](https://discourse.julialang.org/u/CM1)\
**Replies:** 5\
**Last updated:** [November 11, 2023, 4:03pm UTC](https://discourse.julialang.org/t/modifying-plots-jl-subplots-in-place/106069 "2023-11-11T16:03:59Z")

</div>

As discussed recently in this thread, we are wondering whether it is possible to create one initial plot with subplots, which then can be individually modified by push!. So instead of creating two separate plots and the…

---

## [How to create an animation based on t, x, y and z data?](https://discourse.julialang.org/t/how-to-create-an-animation-based-on-t-x-y-and-z-data/25672)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 10\
**Last updated:** [November 11, 2023, 9:57am UTC](https://discourse.julialang.org/t/how-to-create-an-animation-based-on-t-x-y-and-z-data/25672 "2023-11-11T09:57:55Z")

</div>

I would like to simulate a Lorenz system, showing how the solution vector (x, y, z) changes with time. I know how to plot x, y and z data using PyPlot.plot3D, but how does one do a time plot, that is an animation based o…

---

## [Broadcasting call to a vector-valued function](https://discourse.julialang.org/t/broadcasting-call-to-a-vector-valued-function/106056)

<div class="topic-metadata">

**Author:** [@elenev](https://discourse.julialang.org/u/elenev)\
**Replies:** 4\
**Last updated:** [November 11, 2023, 1:55am UTC](https://discourse.julialang.org/t/broadcasting-call-to-a-vector-valued-function/106056 "2023-11-11T01:55:38Z")

</div>

What is the most julian way to broadcast a call to a vector-valued function? For example, take the following function. function return\_vec(x) return \[x, x^2\] end I would like to collect outputs for each x in 1:15 …

---

## [Taking advantage of Apple M1?](https://discourse.julialang.org/t/taking-advantage-of-apple-m1/93310)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 27\
**Last updated:** [November 10, 2023, 8:45pm UTC](https://discourse.julialang.org/t/taking-advantage-of-apple-m1/93310 "2023-11-10T20:45:31Z")

</div>

Hi all. So, I got my new laptop with a Apple M1 chip. I have heard is great. I wonder how are you guys taking advange of it and its cores/GPU. How do you start Julia, use Metal.jl, and other tips to speed up processes. …

---

## [Again errors with no BLAS/LAPACK library loaded!](https://discourse.julialang.org/t/again-errors-with-no-blas-lapack-library-loaded/105943)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 11\
**Last updated:** [November 10, 2023, 4:13pm UTC](https://discourse.julialang.org/t/again-errors-with-no-blas-lapack-library-loaded/105943 "2023-11-10T16:13:08Z")

</div>

After one week of a successful registration of a new version of PeriodicSystems, I am trying to prepare a new version by performing several commits. Running the tests, the following error pops up repeatedly Error: no BL…

---

## [Memoized inverse function through bisection](https://discourse.julialang.org/t/memoized-inverse-function-through-bisection/106027)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 10\
**Last updated:** [November 10, 2023, 2:31pm UTC](https://discourse.julialang.org/t/memoized-inverse-function-through-bisection/106027 "2023-11-10T14:31:01Z")

</div>

Hey, I am trying to implement some memoized version of a inversion algorithm by bisection, but i currently hit a stackoverflow and i cannot understand why : struct MemoizedInverse{Tf,Tstore} f::Tf store::Tstore…

---

## [Why am I getting type instability?](https://discourse.julialang.org/t/why-am-i-getting-type-instability/106020)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 4\
**Last updated:** [November 10, 2023, 1:58pm UTC](https://discourse.julialang.org/t/why-am-i-getting-type-instability/106020 "2023-11-10T13:58:46Z")

</div>

I’m trying to access linked entries in a sparse matrix where only the values change and thought it would be faster to save the locations of the values, but accessing them like this is much slower than just matrix indexin…

---

## [Different memory usage under Windows and linux?](https://discourse.julialang.org/t/different-memory-usage-under-windows-and-linux/105984)

<div class="topic-metadata">

**Author:** [@Ali\_Vahdati](https://discourse.julialang.org/u/Ali_Vahdati)\
**Replies:** 11\
**Last updated:** [November 10, 2023, 1:51pm UTC](https://discourse.julialang.org/t/different-memory-usage-under-windows-and-linux/105984 "2023-11-10T13:51:01Z")

</div>

I am trying to run a simulation using EvoDynamics.jl, a package I wrote myself. The simulation is quite complicated, so I am putting the code here. The problem I am facing is different memory usage under Windows vs Ubun…

---

## [Best practice for managing multiple projects with package/module dependency](https://discourse.julialang.org/t/best-practice-for-managing-multiple-projects-with-package-module-dependency/105971)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 3\
**Last updated:** [November 10, 2023, 1:27pm UTC](https://discourse.julialang.org/t/best-practice-for-managing-multiple-projects-with-package-module-dependency/105971 "2023-11-10T13:27:45Z")

</div>

Suppose I have a project directory called ProjectA where I have created the module CoreFunctions.jl (which requires some common packages like DifferentialEquations.jl), which basically provides the core functionality for…

---

## [OpenMPI+Threading: Segfault in compilation?](https://discourse.julialang.org/t/openmpi-threading-segfault-in-compilation/105881)

<div class="topic-metadata">

**Author:** [@mmesiti](https://discourse.julialang.org/u/mmesiti)\
**Replies:** 7\
**Last updated:** [November 10, 2023, 1:23pm UTC](https://discourse.julialang.org/t/openmpi-threading-segfault-in-compilation/105881 "2023-11-10T13:23:13Z")

</div>

I have a package that uses multithreading (with Threads.@threads) and I am trying to parallelize it further using MPI.jl, and it segfaults when I run it on our HPC cluster (using the installation of OpenMPI 4.1.5 provide…

---

## [Why does \`mul!(u, A, v)\` allocate when \`A\` is sparse and \`u, v\` are views?](https://discourse.julialang.org/t/why-does-mul-u-a-v-allocate-when-a-is-sparse-and-u-v-are-views/105995)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 9\
**Last updated:** [November 10, 2023, 12:04pm UTC](https://discourse.julialang.org/t/why-does-mul-u-a-v-allocate-when-a-is-sparse-and-u-v-are-views/105995 "2023-11-10T12:04:42Z")

</div>

I’m wondering if there is a way to avoid allocations in the following scenario: julia\> using BenchmarkTools, LinearAlgebra, SparseArrays julia\> A = sprand(2, 3, 0.5); julia\> u, v = rand(2), rand(3); julia\> @btime mul…

---

## [Reduce memory allocated in array view and in place sum](https://discourse.julialang.org/t/reduce-memory-allocated-in-array-view-and-in-place-sum/105974)

<div class="topic-metadata">

**Author:** [@ian](https://discourse.julialang.org/u/ian)\
**Replies:** 12\
**Last updated:** [November 10, 2023, 3:01am UTC](https://discourse.julialang.org/t/reduce-memory-allocated-in-array-view-and-in-place-sum/105974 "2023-11-10T03:01:18Z")

</div>

Hi all. New Julia user here. I want to significantly increase performance/reduce the amount of memory allocated in a function similar to the MWE below. Basically I need to access the elements of an array (sliced using a …

---

## [Type Inference Issues in IterativeSolvers with LinearMaps](https://discourse.julialang.org/t/type-inference-issues-in-iterativesolvers-with-linearmaps/106007)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 8:07pm UTC](https://discourse.julialang.org/t/type-inference-issues-in-iterativesolvers-with-linearmaps/106007 "2023-11-09T20:07:53Z")

</div>

I was trying to improve the performance of a program I use that makes heavy use of implicit time stepping, which results in me solving linear systems of equations ‘Ax=b’. Because of things that have to do with my specifi…

---

## [Mutable ProtoStruct beats Base Mutable Struct in microbenchmark...and then it is much slower in real program](https://discourse.julialang.org/t/mutable-protostruct-beats-base-mutable-struct-in-microbenchmark-and-then-it-is-much-slower-in-real-program/105982)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 9\
**Last updated:** [November 9, 2023, 5:21pm UTC](https://discourse.julialang.org/t/mutable-protostruct-beats-base-mutable-struct-in-microbenchmark-and-then-it-is-much-slower-in-real-program/105982 "2023-11-09T17:21:12Z")

</div>

I developed a bit the ProtoStructs.jl package recently and I managed to improve the performance of the implementation, but there is something I don’t understand why is happening: microbenchmarks seems to lie with julia\>…

---

## [Multi-threaded worker processes](https://discourse.julialang.org/t/multi-threaded-worker-processes/33034)

<div class="topic-metadata">

**Author:** [@orenbenkiki](https://discourse.julialang.org/u/orenbenkiki)\
**Replies:** 14\
**Last updated:** [November 9, 2023, 3:57pm UTC](https://discourse.julialang.org/t/multi-threaded-worker-processes/33034 "2023-11-09T15:57:08Z")

</div>

My use case is running a rather large application on a cluster of multi-core machines. Using @threads is extremely convenient as one gets shared memory of “all things” (of course one needs to be careful). However, being …

---

## [How to queue a sequence of codes?](https://discourse.julialang.org/t/how-to-queue-a-sequence-of-codes/105990)

<div class="topic-metadata">

**Author:** [@soldin](https://discourse.julialang.org/u/soldin)\
**Replies:** 4\
**Last updated:** [November 9, 2023, 2:28pm UTC](https://discourse.julialang.org/t/how-to-queue-a-sequence-of-codes/105990 "2023-11-09T14:28:37Z")

</div>

Hi, I have a sequence of programs to run one after another. Could anyone plz let me know how to queue them?

---

## [ModelingToolkit external base excitation](https://discourse.julialang.org/t/modelingtoolkit-external-base-excitation/105983)

<div class="topic-metadata">

**Author:** [@Daniel\_Lewis](https://discourse.julialang.org/u/Daniel_Lewis)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 11:48am UTC](https://discourse.julialang.org/t/modelingtoolkit-external-base-excitation/105983 "2023-11-09T11:48:57Z")

</div>

hello I’m trying to simulate a TMD system using ModelingToolkit. This is the code i’m runing: using ModelingToolkit using DifferentialEquations using LinearAlgebra using Symbolics: scalarize @variables t D = Differen…

---

## [Revise not working in WSL2?](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981)

<div class="topic-metadata">

**Author:** [@chris101112](https://discourse.julialang.org/u/chris101112)\
**Replies:** 5\
**Last updated:** [November 9, 2023, 10:24am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981 "2023-11-09T10:24:59Z")

</div>

I have created a simple test project with the following structure: . ├── Manifest.toml ├── Project.toml ├── main.jl └── src └── TestRevise.jl TestRevise.jl: module TestRevise export greet greet() = print("Hello …

---

## [How to use Pkg.dependencies() instead of Pkg.installed()](https://discourse.julialang.org/t/how-to-use-pkg-dependencies-instead-of-pkg-installed/36416)

<div class="topic-metadata">

**Author:** [@AtsushiSakai](https://discourse.julialang.org/u/AtsushiSakai)\
**Replies:** 21\
**Last updated:** [November 9, 2023, 8:35am UTC](https://discourse.julialang.org/t/how-to-use-pkg-dependencies-instead-of-pkg-installed/36416 "2023-11-09T08:35:54Z")

</div>

From Julia v1.4, Pkg.installed() shows deprecation message. Using Pkg.dependencies() is recommended instead of Pkg.installed() in this issue: https://github.com/JuliaLang/Pkg.jl/issues/1724 However, Pkg.dependencies r…

---

## [How to check if a package is installed from startup.jl?](https://discourse.julialang.org/t/how-to-check-if-a-package-is-installed-from-startup-jl/55706)

<div class="topic-metadata">

**Author:** [@benibilme](https://discourse.julialang.org/u/benibilme)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 8:20am UTC](https://discourse.julialang.org/t/how-to-check-if-a-package-is-installed-from-startup-jl/55706 "2023-11-09T08:20:08Z")

</div>

There are several old posts about this issue but according to me this issue has not been fully addressed. I would like query if a package is installed, if not, install it and selectively make some additional calls to t…

---

## [Tricks to compile away step in calculation?](https://discourse.julialang.org/t/tricks-to-compile-away-step-in-calculation/105760)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 20\
**Last updated:** [November 9, 2023, 12:02am UTC](https://discourse.julialang.org/t/tricks-to-compile-away-step-in-calculation/105760 "2023-11-09T00:02:02Z")

</div>

Is there a way to compile away a step in a calculation internal to some function called in a closure but without manually decomposing the function into its constituent calculations within the closure? Below I provide a …

---

## [Modifying Julia code using macros to substitute variables](https://discourse.julialang.org/t/modifying-julia-code-using-macros-to-substitute-variables/105921)

<div class="topic-metadata">

**Author:** [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)\
**Replies:** 5\
**Last updated:** [November 8, 2023, 4:27am UTC](https://discourse.julialang.org/t/modifying-julia-code-using-macros-to-substitute-variables/105921 "2023-11-08T04:27:42Z")

</div>

I’m trying to create a Julia macro to substitute specific variables in a Julia program with new ones. I have a working example, but I’m facing a challenge when I need to reassign variables within nested functions. Here’…

---

## [Plotting nonlinear ODEs in Julia](https://discourse.julialang.org/t/plotting-nonlinear-odes-in-julia/105918)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 2\
**Last updated:** [November 8, 2023, 7:27pm UTC](https://discourse.julialang.org/t/plotting-nonlinear-odes-in-julia/105918 "2023-11-08T19:27:37Z")

</div>

Hey folks. I am writing some instructional materials in a set of Pluto notebooks. The topic is nonlinear ODEs, so there are some plots from the Strogatz textbook that I want to emulate. I was wondering if anyone can tell…

---

## [Setting the display order of entries in (unordered) Dict](https://discourse.julialang.org/t/setting-the-display-order-of-entries-in-unordered-dict/105954)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [November 8, 2023, 6:46pm UTC](https://discourse.julialang.org/t/setting-the-display-order-of-entries-in-unordered-dict/105954 "2023-11-08T18:46:48Z")

</div>

Is there a way to designate what order the pairs of a Julai dictionary are displayed in (without using OrderedDict)? Elaboration: StructuralIdentifiability.jl takes a model, and assesses the identifiability of each para…

---

## [Help fixing a huge amount of rerecompilation time when using ODBC.jl](https://discourse.julialang.org/t/help-fixing-a-huge-amount-of-rerecompilation-time-when-using-odbc-jl/105946)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 6\
**Last updated:** [November 8, 2023, 6:06pm UTC](https://discourse.julialang.org/t/help-fixing-a-huge-amount-of-rerecompilation-time-when-using-odbc-jl/105946 "2023-11-08T18:06:17Z")

</div>

Hi! We use everyday the ODBC.jl package to fetch satellite telemetries from our database and perform some automatic analysis. However, since Julia v1.9, we are experiencing a huge precompilation time. The first SQL exec…

---

## [Efficient computation of largest eigenvalue](https://discourse.julialang.org/t/efficient-computation-of-largest-eigenvalue/105933)

<div class="topic-metadata">

**Author:** [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)\
**Replies:** 9\
**Last updated:** [November 8, 2023, 3:48pm UTC](https://discourse.julialang.org/t/efficient-computation-of-largest-eigenvalue/105933 "2023-11-08T15:48:20Z")

</div>

For some numerical simulations I run, I need to construct a matrix and obtain its leading eigenvalue. I will make use of both of them. I was using the LinearAlgebra package, and computing the leading eigenvalue as maxim…

---

## [Images.jl spacing, orientation](https://discourse.julialang.org/t/images-jl-spacing-orientation/105955)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 3\
**Last updated:** [November 8, 2023, 3:41pm UTC](https://discourse.julialang.org/t/images-jl-spacing-orientation/105955 "2023-11-08T15:41:41Z")

</div>

Hello in the Quickstart of the Images.jl there is a sentence The AxisArrays package supports rich and efficient operations on such arrays, and can be useful to keep track of not just pixel spacing but the orientation c…

---

## [Retrieve element from a set](https://discourse.julialang.org/t/retrieve-element-from-a-set/105658)

<div class="topic-metadata">

**Author:** [@odddot](https://discourse.julialang.org/u/odddot)\
**Replies:** 9\
**Last updated:** [November 8, 2023, 3:38pm UTC](https://discourse.julialang.org/t/retrieve-element-from-a-set/105658 "2023-11-08T15:38:51Z")

</div>

Hi, I want to do something that may be impossible to do. It is not very important (I have possible workarounds), but I am curious… I have a struct that represents an edge, defined as: struct Edge{I\<Integer} e::Tup…

---

## [Is a parametric Collection trait useful?](https://discourse.julialang.org/t/is-a-parametric-collection-trait-useful/105941)

<div class="topic-metadata">

**Author:** [@Sebastiaan](https://discourse.julialang.org/u/Sebastiaan)\
**Replies:** 5\
**Last updated:** [November 8, 2023, 3:29pm UTC](https://discourse.julialang.org/t/is-a-parametric-collection-trait-useful/105941 "2023-11-08T15:29:49Z")

</div>

I’ve been writing Julia for a while, and I find that I often want to have a function dispatch on the type that’s in a collection, where I don’t really care what type of collection is used, be it a set or a vector or a tu…

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

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