# General Usage

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

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

**Page:** 42

---

## [How to update a symmetric matrix respecting API boundaries?](https://discourse.julialang.org/t/how-to-update-a-symmetric-matrix-respecting-api-boundaries/132246)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [September 11, 2025, 4:23pm UTC](https://discourse.julialang.org/t/how-to-update-a-symmetric-matrix-respecting-api-boundaries/132246 "2025-09-11T16:23:22Z")

</div>

Suppose I have a symmetric matrix H, and I would like to update it in place. For the purposes of this MWE, the update is adding f(i,j) to elements, based on index. How can I do this while respecting API boundaries? seti…

---

## [Using \`run\` to run command doesn't generate log files](https://discourse.julialang.org/t/using-run-to-run-command-doesnt-generate-log-files/132274)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 1\
**Last updated:** [September 11, 2025, 9:53am UTC](https://discourse.julialang.org/t/using-run-to-run-command-doesnt-generate-log-files/132274 "2025-09-11T09:53:28Z")

</div>

So I’m trying to update GitHub - cstook/LTspice.jl: julia interface to LTspice to work with modern Julia/LTspice and I’ve run into a strange problem. When I run the following command in cmd LTspice.exe -b -Run C:\\path…

---

## [Different modification behavior when looping over array of variables of different array types](https://discourse.julialang.org/t/different-modification-behavior-when-looping-over-array-of-variables-of-different-array-types/132243)

<div class="topic-metadata">

**Author:** [@chaseleslie](https://discourse.julialang.org/u/chaseleslie)\
**Replies:** 8\
**Last updated:** [September 10, 2025, 4:57pm UTC](https://discourse.julialang.org/t/different-modification-behavior-when-looping-over-array-of-variables-of-different-array-types/132243 "2025-09-10T16:57:41Z")

</div>

Example code: function filterarrays!(d) for arr in \[d\["a"\], d\["b"\]\] deleteat!(arr, 2) end end d = Dict("a" =\> \[1, 2, 3\], "b" =\> \[1., 2., 3.\]) display(d) filterarrays!(d) display(d) With output: Dict{S…

---

## [Using Meta/Facebook Prophet with Conda/PyCall](https://discourse.julialang.org/t/using-meta-facebook-prophet-with-conda-pycall/132011)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 10\
**Last updated:** [September 10, 2025, 4:26pm UTC](https://discourse.julialang.org/t/using-meta-facebook-prophet-with-conda-pycall/132011 "2025-09-10T16:26:55Z")

</div>

Hi, I run into problems when trying to run the example code from: What I did: import Pkg ENV\["PYTHON"\]="" Pkg.build("PyCall") Restarted the Julia CLI, then: import Pkg Pkg.add("Conda") using Conda Conda.runconda(\`…

---

## [Const facilitates change](https://discourse.julialang.org/t/const-facilitates-change/132250)

<div class="topic-metadata">

**Author:** [@Matthijs\_1971](https://discourse.julialang.org/u/Matthijs_1971)\
**Replies:** 2\
**Last updated:** [September 10, 2025, 3:55pm UTC](https://discourse.julialang.org/t/const-facilitates-change/132250 "2025-09-10T15:55:48Z")

</div>

Please have a look at the code below, it surprised me a lot. I am using 1.12.0-rc2. This file is P.jl and I developed a package called P; importing P gives this: julia\> import P Info Given P was explicitly requested, ou…

---

## [JET: How to use the function\_filter argument?](https://discourse.julialang.org/t/jet-how-to-use-the-function-filter-argument/122470)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 1\
**Last updated:** [September 10, 2025, 2:19pm UTC](https://discourse.julialang.org/t/jet-how-to-use-the-function-filter-argument/122470 "2025-09-10T14:19:34Z")

</div>

I’m trying to get the function\_filter argument to the JET macro @report\_opt to work, without success. I guess I’m missing something. Here is an example: f(x::T) where T = x \> 0 ? 1 : error("illegal argument of type $T")…

---

## [JLD2 CodecLz4 compression stopped working](https://discourse.julialang.org/t/jld2-codeclz4-compression-stopped-working/132249)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 2\
**Last updated:** [September 10, 2025, 1:07pm UTC](https://discourse.julialang.org/t/jld2-codeclz4-compression-stopped-working/132249 "2025-09-10T13:07:37Z")

</div>

Hi, all of a sudden, compressing a Jld2 with Lz4 throws an error: using JLD2 using CodecLz4 name = rand(10) detail = rand(10) values = rand(10) jldopen("./test.jdl2", "w"; compress = LZ4FrameCompressor()) do f …

---

## [Is this a bug in StatProfilerHTML.jl or Profile.jl?](https://discourse.julialang.org/t/is-this-a-bug-in-statprofilerhtml-jl-or-profile-jl/132247)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 0\
**Last updated:** [September 10, 2025, 8:44am UTC](https://discourse.julialang.org/t/is-this-a-bug-in-statprofilerhtml-jl-or-profile-jl/132247 "2025-09-10T08:44:34Z")

</div>

Recently, when I try to use StatProfilerHTML (julia-1.11.6, StatProfilerHTML-1.0.0) I get errors like julia\> statprofilehtml() ERROR: KeyError: key 0x00007e8e4a7fc010 not found Stacktrace: \[1\] getindex(h::Dict{UInt64,…

---

## [How to disable precompilation?](https://discourse.julialang.org/t/how-to-disable-precompilation/132239)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 7\
**Last updated:** [September 9, 2025, 10:25pm UTC](https://discourse.julialang.org/t/how-to-disable-precompilation/132239 "2025-09-09T22:25:46Z")

</div>

Suppose I want to load package P. If I do using P, the package and all its dependencies get precompiled before the statement returns. Is there a way to disable precompilation, so compilation would only happen on-demand, …

---

## [Multiple machines with same file system, should Julia recompile on each?](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [September 9, 2025, 9:27pm UTC](https://discourse.julialang.org/t/multiple-machines-with-same-file-system-should-julia-recompile-on-each/132219 "2025-09-09T21:27:47Z")

</div>

At work, we have a system where I have a single user account, a desktop on my desk, and multiple compute machines I can ssh into. All these share the same, shared, file system. E.g. they use the same .julia folder, if i …

---

## [Can't install 'Plots' package: 'Ghostscript' artifact not downloading - Need help with workaround](https://discourse.julialang.org/t/cant-install-plots-package-ghostscript-artifact-not-downloading-need-help-with-workaround/132240)

<div class="topic-metadata">

**Author:** [@jcc3508](https://discourse.julialang.org/u/jcc3508)\
**Replies:** 0\
**Last updated:** [September 9, 2025, 9:20pm UTC](https://discourse.julialang.org/t/cant-install-plots-package-ghostscript-artifact-not-downloading-need-help-with-workaround/132240 "2025-09-09T21:20:42Z")

</div>

Greetings and thank you for reading. julia version 1.11.6 When attempting to add Plots, I get the following message: Resolving package versions… Failure artifact: Ghostscript Failure artifact: Ghostscript ERROR: U…

---

## [The strangeness (or not) of \* as string concatenation](https://discourse.julialang.org/t/the-strangeness-or-not-of-as-string-concatenation/131943)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 78\
**Last updated:** [September 9, 2025, 7:52pm UTC](https://discourse.julialang.org/t/the-strangeness-or-not-of-as-string-concatenation/131943 "2025-09-09T19:52:13Z")

</div>

It looks strange to me, too, and I think it was a particularly poor choice in the design of the Julia language. And, quite frankly, I consider the “explanation” borderline offensive… but the important point is That is…

---

## [BinaryBuilder.jl prebuilding Syphon for a wrapper](https://discourse.julialang.org/t/binarybuilder-jl-prebuilding-syphon-for-a-wrapper/132238)

<div class="topic-metadata">

**Author:** [@skolari93](https://discourse.julialang.org/u/skolari93)\
**Replies:** 0\
**Last updated:** [September 9, 2025, 6:36pm UTC](https://discourse.julialang.org/t/binarybuilder-jl-prebuilding-syphon-for-a-wrapper/132238 "2025-09-09T18:36:11Z")

</div>

I want to create a wrapper around the MacOS only Syphon-Framework. Now I am not sure if I actually should use the BinaryBuilder for such a Mac only library. How would one ideally provide/build the framework code in a jul…

---

## [Suggestion: updating the dispatch vs. dict/switch benchmark link in the manual](https://discourse.julialang.org/t/suggestion-updating-the-dispatch-vs-dict-switch-benchmark-link-in-the-manual/132159)

<div class="topic-metadata">

**Author:** [@DanielSussman](https://discourse.julialang.org/u/DanielSussman)\
**Replies:** 1\
**Last updated:** [September 9, 2025, 6:32pm UTC](https://discourse.julialang.org/t/suggestion-updating-the-dispatch-vs-dict-switch-benchmark-link-in-the-manual/132159 "2025-09-09T18:32:24Z")

</div>

I was reading through the (extremely helpful!) “performance tips” part of of the manual. In the “dangers of absuing multiple dispatch…” section there is a link to “run-time benchmarks comparing (1) type dispatch, (2) dic…

---

## [Strange slowdown with @threads :greedy with BigInts](https://discourse.julialang.org/t/strange-slowdown-with-threads-greedy-with-bigints/132211)

<div class="topic-metadata">

**Author:** [@sumiya11](https://discourse.julialang.org/u/sumiya11)\
**Replies:** 7\
**Last updated:** [September 9, 2025, 5:06pm UTC](https://discourse.julialang.org/t/strange-slowdown-with-threads-greedy-with-bigints/132211 "2025-09-09T17:06:18Z")

</div>

Hi, I have a function that does inplace operations with BigInts (so almost no Julia-side allocations in @time report, see below). With --threads=8 it is twice slower than with --threads=1. Note: seems fine without :gree…

---

## [Narrowing the type of a nested array](https://discourse.julialang.org/t/narrowing-the-type-of-a-nested-array/132179)

<div class="topic-metadata">

**Author:** [@mkoculak](https://discourse.julialang.org/u/mkoculak)\
**Replies:** 5\
**Last updated:** [September 9, 2025, 5:05pm UTC](https://discourse.julialang.org/t/narrowing-the-type-of-a-nested-array/132179 "2025-09-09T17:05:42Z")

</div>

I am collecting data in an array that I don’t know the types of beforehand. There is a reasonable chance they will be similar, so I was wondering what would be a decent way to narrow the type of the final array. I saw a…

---

## [\[sources\] in Project.toml prior to 1.11](https://discourse.julialang.org/t/sources-in-project-toml-prior-to-1-11/132218)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [September 9, 2025, 2:26pm UTC](https://discourse.julialang.org/t/sources-in-project-toml-prior-to-1-11/132218 "2025-09-09T14:26:36Z")

</div>

Just checking: is it OK to have a \[sources\] MainPackage = {path = ".."} in the test/Project.toml of a package prior to the Julia versions which actually support it? My understanding is that those versions will just …

---

## [Comparing equivalency of ForwardDiff.Jacobian](https://discourse.julialang.org/t/comparing-equivalency-of-forwarddiff-jacobian/132194)

<div class="topic-metadata">

**Author:** [@JAY\_SHUKLA](https://discourse.julialang.org/u/JAY_SHUKLA)\
**Replies:** 4\
**Last updated:** [September 9, 2025, 1:08pm UTC](https://discourse.julialang.org/t/comparing-equivalency-of-forwarddiff-jacobian/132194 "2025-09-09T13:08:21Z")

</div>

Hello, I am trying to work on a neural network framework that identifies reaction pathways autonomously and currently trying to add an analysis tool called degree of rate control. I am comparing two approaches where I a…

---

## [Calling a macro in a function with \`eval\` fails on nightly](https://discourse.julialang.org/t/calling-a-macro-in-a-function-with-eval-fails-on-nightly/132168)

<div class="topic-metadata">

**Author:** [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Replies:** 2\
**Last updated:** [September 9, 2025, 3:49am UTC](https://discourse.julialang.org/t/calling-a-macro-in-a-function-with-eval-fails-on-nightly/132168 "2025-09-09T03:49:23Z")

</div>

Hello, I maintain the package JSONLines.jl package which has some syntactic sugar to define a StructType to read only specific columns. This fails on the Julia nightly with the following error: readcols: Error During T…

---

## [Error in program for coupled PDE](https://discourse.julialang.org/t/error-in-program-for-coupled-pde/132200)

<div class="topic-metadata">

**Author:** [@Reinoud](https://discourse.julialang.org/u/Reinoud)\
**Replies:** 0\
**Last updated:** [September 8, 2025, 9:00pm UTC](https://discourse.julialang.org/t/error-in-program-for-coupled-pde/132200 "2025-09-08T21:00:50Z")

</div>

Hello Could somebody tell me what went wrong? Here the program using OrdinaryDiffEq, ModelingToolkit, MethodOfLines, DomainSets, Plots, Optimization, OptimizationPolyalgorithms, SciMLSensitivity ForwardDiff,JLD2 # Par…

---

## [Code\_warntype errors on a function](https://discourse.julialang.org/t/code-warntype-errors-on-a-function/132171)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [September 8, 2025, 3:24pm UTC](https://discourse.julialang.org/t/code-warntype-errors-on-a-function/132171 "2025-09-08T15:24:21Z")

</div>

I am wondering if the following is a bug, or something I am missing. MWE: struct Foo{T} a::T b::T end function struct2nt(x::T) where T @assert isstructtype(T) N = fieldnames(T) NamedTuple{N}(getfiel…

---

## [Change struct dataframe value correct way](https://discourse.julialang.org/t/change-struct-dataframe-value-correct-way/132121)

<div class="topic-metadata">

**Author:** [@rdl987](https://discourse.julialang.org/u/rdl987)\
**Replies:** 6\
**Last updated:** [September 8, 2025, 3:02pm UTC](https://discourse.julialang.org/t/change-struct-dataframe-value-correct-way/132121 "2025-09-08T15:02:05Z")

</div>

Hello I have a struct with inside other two structs: Base.@kwdef mutable struct MyDataset input::MyInputDataset = MyInputDataset() processed::MyInputDataset = MyInputDataset() end Base.@kwdef mutable struct MyInput…

---

## [Simplifying trigonometric expressions in \`Symbolics\` and \`SymbolicUtils\`](https://discourse.julialang.org/t/simplifying-trigonometric-expressions-in-symbolics-and-symbolicutils/132160)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 1\
**Last updated:** [September 7, 2025, 10:33pm UTC](https://discourse.julialang.org/t/simplifying-trigonometric-expressions-in-symbolics-and-symbolicutils/132160 "2025-09-07T22:33:42Z")

</div>

Hi, I am new to Symbolics.jl and trying to verify the following trigonometric expression arising in energy system using the package: \\begin{align\*} v\_k(t) &= \\bar{V} \\cos(\\omega t + \\phi\_k) \\\\ i\_k(t) &=…

---

## [Re \`seed!\` ing the RNG at each step of a simulation?](https://discourse.julialang.org/t/re-seed-ing-the-rng-at-each-step-of-a-simulation/132158)

<div class="topic-metadata">

**Author:** [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Replies:** 4\
**Last updated:** [September 7, 2025, 9:43pm UTC](https://discourse.julialang.org/t/re-seed-ing-the-rng-at-each-step-of-a-simulation/132158 "2025-09-07T21:43:26Z")

</div>

I am running long stochastic simulations that look like: sim\_name = "example/1" Random.seed!(sim\_name) ctx = setup(sim\_name) for frame in 1:1000 ctx = loop(ctx) end I need to be able to restart simulations that crash…

---

## [Mystery of invalidations in V\>1.10. Even in precompiled code](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 10\
**Last updated:** [September 7, 2025, 3:42pm UTC](https://discourse.julialang.org/t/mystery-of-invalidations-in-v-1-10-even-in-precompiled-code/132081 "2025-09-07T15:42:15Z")

</div>

I have reported before the very large degradation in TTFP in GMT for version 1.11 and later. One example as reminder | | |\_| | | | (\_| | | Version 1.10.10 (2025-06-27) \_/ |\\\_\_'\_|\_|\_|\\\_\_'\_| | Official https://juli…

---

## [\`log\` calling \`fma\_emulated\` on hardware that doesn't need it](https://discourse.julialang.org/t/log-calling-fma-emulated-on-hardware-that-doesnt-need-it/132149)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 2\
**Last updated:** [September 7, 2025, 1:43am UTC](https://discourse.julialang.org/t/log-calling-fma-emulated-on-hardware-that-doesnt-need-it/132149 "2025-09-07T01:43:47Z")

</div>

Hi, I was doing some profiling for an application and came across this for log It should be able to use the real FMA, not emulated. It’s a newish machine: julia\> versioninfo() Julia Version 1.11.6 Commit 9615af0f26…

---

## [Type stable Base.return\_types - is it possible?](https://discourse.julialang.org/t/type-stable-base-return-types-is-it-possible/131992)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 21\
**Last updated:** [September 6, 2025, 8:34am UTC](https://discourse.julialang.org/t/type-stable-base-return-types-is-it-possible/131992 "2025-09-06T08:34:40Z")

</div>

Lets say I have this rust inspired Result type: using Moshi.Data: @data using Moshi.Match: @match @data Result{OkT, ErrT} begin Ok(OkT) Err(ErrT) end #insert pretty printer here Unlike Julia built in Union t…

---

## [Refactoring support for inlining variables?](https://discourse.julialang.org/t/refactoring-support-for-inlining-variables/132125)

<div class="topic-metadata">

**Author:** [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Replies:** 1\
**Last updated:** [September 6, 2025, 1:11am UTC](https://discourse.julialang.org/t/refactoring-support-for-inlining-variables/132125 "2025-09-06T01:11:06Z")

</div>

Are there any convenient solutions for an “inline this variable” refactoring, in VS Code or otherwise? It’s something I used to find really convenient in other IDEs like IntelliJ (for other languages like Python or Java…

---

## [How to restrict a matrix to be positive definite](https://discourse.julialang.org/t/how-to-restrict-a-matrix-to-be-positive-definite/126318)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 18\
**Last updated:** [September 5, 2025, 4:38pm UTC](https://discourse.julialang.org/t/how-to-restrict-a-matrix-to-be-positive-definite/126318 "2025-09-05T16:38:59Z")

</div>

I am estimating a model. In the process of estimation I have to convert a fixed independent and normally distributed vector to a correlated multivariate normal vector. The way I am doing that is using this: \\bf{x} \\sim…

---

## [Julia\_setup() not working with R 4.5.1 and Julia 1.11.6](https://discourse.julialang.org/t/julia-setup-not-working-with-r-4-5-1-and-julia-1-11-6/132112)

<div class="topic-metadata">

**Author:** [@RobertDorazio](https://discourse.julialang.org/u/RobertDorazio)\
**Replies:** 1\
**Last updated:** [September 5, 2025, 11:56am UTC](https://discourse.julialang.org/t/julia-setup-not-working-with-r-4-5-1-and-julia-1-11-6/132112 "2025-09-05T11:56:09Z")

</div>

My operating system is Ubuntu 24.04. To ensure I had the most recent version of the R package “JuliaCall”, I installed “JuliaCall” from github as follows: devtools::install\_github(“JuliaInterop/JuliaCall”) The proble…

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

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