# General Usage

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

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

**Page:** 62

---

## [Unstable execution time with high standard error in Julia](https://discourse.julialang.org/t/unstable-execution-time-with-high-standard-error-in-julia/129295)

<div class="topic-metadata">

**Author:** [@PanT12](https://discourse.julialang.org/u/PanT12)\
**Replies:** 27\
**Last updated:** [May 28, 2025, 8:25am UTC](https://discourse.julialang.org/t/unstable-execution-time-with-high-standard-error-in-julia/129295 "2025-05-28T08:25:31Z")

</div>

Has anyone encountered unstable results from Julia, specifically issues with large variance? For example, when I repeat the following experiment 100 times and record the time taken for each run, I find that there are alw…

---

## [General type of 2d arrays](https://discourse.julialang.org/t/general-type-of-2d-arrays/129394)

<div class="topic-metadata">

**Author:** [@Cyan](https://discourse.julialang.org/u/Cyan)\
**Replies:** 1\
**Last updated:** [May 28, 2025, 4:46am UTC](https://discourse.julialang.org/t/general-type-of-2d-arrays/129394 "2025-05-28T04:46:05Z")

</div>

Hi, all. I am writing a function of 2d array, in which xg and yg are designed to be any format of n x n array. But I always encounter the errors of TypeError of xg and yg. Is there any widely general type of 2d array to…

---

## [Mixing LaTeX equations and Chinese in Makie plot titles](https://discourse.julialang.org/t/mixing-latex-equations-and-chinese-in-makie-plot-titles/129374)

<div class="topic-metadata">

**Author:** [@xiaoming](https://discourse.julialang.org/u/xiaoming)\
**Replies:** 2\
**Last updated:** [May 27, 2025, 2:19pm UTC](https://discourse.julialang.org/t/mixing-latex-equations-and-chinese-in-makie-plot-titles/129374 "2025-05-27T14:19:16Z")

</div>

I have tried: using GLMakie f = Figure() Axis(f\[1,1\], title=(L"中文 $\\sin$")) Axis(f\[1,2\], title=(L"\\text{中文}\\ \\sin")) f It doesn’t work.

---

## [Windows 7 support](https://discourse.julialang.org/t/windows-7-support/129116)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 18\
**Last updated:** [May 27, 2025, 2:39pm UTC](https://discourse.julialang.org/t/windows-7-support/129116 "2025-05-27T14:39:05Z")

</div>

“Platform specific notes” states, that Julia is available for Windows 7 and later for both 32-bit and 64-bit versions. However, the current stable release fails to run with the message “GetSystemTimePreciseAsFileTime not…

---

## [Expose \`Base.depwarn(...; force=false)\` in \`@deprecate\`](https://discourse.julialang.org/t/expose-base-depwarn-force-false-in-deprecate/129383)

<div class="topic-metadata">

**Author:** [@drbergman](https://discourse.julialang.org/u/drbergman)\
**Replies:** 0\
**Last updated:** [May 27, 2025, 2:31pm UTC](https://discourse.julialang.org/t/expose-base-depwarn-force-false-in-deprecate/129383 "2025-05-27T14:31:41Z")

</div>

Following up on the conversation in Why is \`depwarn=no\` by default? Would it be possible to expose the force kwarg of Base.depwarn in the @deprecate call? I just opened a PR in DeprecateKeywords.jl that uses the followin…

---

## [Dynamic union of parametric types](https://discourse.julialang.org/t/dynamic-union-of-parametric-types/129247)

<div class="topic-metadata">

**Author:** [@Andrea\_Vigliotti](https://discourse.julialang.org/u/Andrea_Vigliotti)\
**Replies:** 21\
**Last updated:** [May 27, 2025, 7:23am UTC](https://discourse.julialang.org/t/dynamic-union-of-parametric-types/129247 "2025-05-27T07:23:17Z")

</div>

I am trying to define Union types that collect different instances of different types, it should be possible to append newer types that are defined later on, so that the union types can grow here an example: module Ele…

---

## [Can't remove process when added on different thread](https://discourse.julialang.org/t/cant-remove-process-when-added-on-different-thread/129357)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 2\
**Last updated:** [May 26, 2025, 9:05pm UTC](https://discourse.julialang.org/t/cant-remove-process-when-added-on-different-thread/129357 "2025-05-26T21:05:05Z")

</div>

It seems that when a worker process is added on a thread with threadid != 1 (probably), it can’t be naively removed. For example using Distributed new\_proc = fetch(Threads.@spawn addprocs(1)) |\> only rmprocs(new\_proc)…

---

## [Getting docs in C embedding](https://discourse.julialang.org/t/getting-docs-in-c-embedding/129137)

<div class="topic-metadata">

**Author:** [@alexkolzov](https://discourse.julialang.org/u/alexkolzov)\
**Replies:** 2\
**Last updated:** [May 26, 2025, 8:08pm UTC](https://discourse.julialang.org/t/getting-docs-in-c-embedding/129137 "2025-05-26T20:08:42Z")

</div>

Hello everyone! I am trying to extract documentation from module items. I am trying to use the doc function to do this: jl\_module\_t \*m = jl\_new\_module(jl\_symbol(name), nullptr); jl\_module\_using(m, jl\_base\_module); jl\_m…

---

## [Continuation of Equilibria with Bifurcation Kit - model specific issue or wrong initial conditions?](https://discourse.julialang.org/t/continuation-of-equilibria-with-bifurcation-kit-model-specific-issue-or-wrong-initial-conditions/129277)

<div class="topic-metadata">

**Author:** [@AP9](https://discourse.julialang.org/u/AP9)\
**Replies:** 3\
**Last updated:** [May 26, 2025, 6:21pm UTC](https://discourse.julialang.org/t/continuation-of-equilibria-with-bifurcation-kit-model-specific-issue-or-wrong-initial-conditions/129277 "2025-05-26T18:21:36Z")

</div>

I am using BifurcationKit.jl to analyze the steady states of my system varying a parameter A. In the figure, the bifurcation diagram predicts a stable steady state before the first Hopf bifurcation. However, when I plot …

---

## [Tests as contracts?](https://discourse.julialang.org/t/tests-as-contracts/129350)

<div class="topic-metadata">

**Author:** [@mvsoom](https://discourse.julialang.org/u/mvsoom)\
**Replies:** 6\
**Last updated:** [May 26, 2025, 5:47pm UTC](https://discourse.julialang.org/t/tests-as-contracts/129350 "2025-05-26T17:47:22Z")

</div>

Just a braindump from my blog, I’m interested in your thoughts on this. In many programming languages, when you define a new type or object, you can also define how it behaves. But often, there’s no automatic way to c…

---

## [Bug with filtering DataFrames in combination with ShiftedArrays](https://discourse.julialang.org/t/bug-with-filtering-dataframes-in-combination-with-shiftedarrays/129302)

<div class="topic-metadata">

**Author:** [@PeterDM](https://discourse.julialang.org/u/PeterDM)\
**Replies:** 6\
**Last updated:** [May 26, 2025, 2:33pm UTC](https://discourse.julialang.org/t/bug-with-filtering-dataframes-in-combination-with-shiftedarrays/129302 "2025-05-26T14:33:46Z")

</div>

It seems filtering DataFrames is not compatible with ShiftedArrays in a way one would expect it to be: using DataFrames using ShiftedArrays issquare(n::Integer)=(n==round(sqrt(n))^2) N=20 numbers=collect(1:N) successo…

---

## [Can't reopen socket (EADDRINUSE)](https://discourse.julialang.org/t/cant-reopen-socket-eaddrinuse/129345)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 1\
**Last updated:** [May 26, 2025, 2:06pm UTC](https://discourse.julialang.org/t/cant-reopen-socket-eaddrinuse/129345 "2025-05-26T14:06:34Z")

</div>

I’m writing a script where I open some TCP sockets to communicate with an external process. Once that process is finished I close the sockets and then I want to do the same thing again. When I try to open the sockets the…

---

## [C Embedding: Crash on exception check](https://discourse.julialang.org/t/c-embedding-crash-on-exception-check/129319)

<div class="topic-metadata">

**Author:** [@MDSW](https://discourse.julialang.org/u/MDSW)\
**Replies:** 0\
**Last updated:** [May 25, 2025, 4:06pm UTC](https://discourse.julialang.org/t/c-embedding-crash-on-exception-check/129319 "2025-05-25T16:06:05Z")

</div>

Following the embedding guide, I’m getting a crash when attempting to retrieve the results of an exception. This is the generic handler code (it is not C): \*ex= jl\_eval\_string(code) If jl\_exception\_occurred() sptr = …

---

## [Obtaining the ND version of a 1D type](https://discourse.julialang.org/t/obtaining-the-nd-version-of-a-1d-type/129307)

<div class="topic-metadata">

**Author:** [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Replies:** 7\
**Last updated:** [May 25, 2025, 6:02pm UTC](https://discourse.julialang.org/t/obtaining-the-nd-version-of-a-1d-type/129307 "2025-05-25T18:02:39Z")

</div>

I have an AbstractVector type x and want to get the type of the 2D version. For example, if I’m passed a x::CuArray{T,1,device}, I’d like to end up with a type CuArray{T,2,device}. One (type-unstable?) way to do this is…

---

## [Anyone uses GR framework for plotting extensively?](https://discourse.julialang.org/t/anyone-uses-gr-framework-for-plotting-extensively/129324)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 0\
**Last updated:** [May 25, 2025, 7:27pm UTC](https://discourse.julialang.org/t/anyone-uses-gr-framework-for-plotting-extensively/129324 "2025-05-25T19:27:07Z")

</div>

I’m just curious about how people think about this framework. The GR framework https://gr-framework.org/ is the default backend for Plots.jl, but little information and discussion can be found.

---

## [Return handles to functions from caller-namespace from a macro](https://discourse.julialang.org/t/return-handles-to-functions-from-caller-namespace-from-a-macro/129315)

<div class="topic-metadata">

**Author:** [@wave\_and\_matter](https://discourse.julialang.org/u/wave_and_matter)\
**Replies:** 3\
**Last updated:** [May 25, 2025, 3:18pm UTC](https://discourse.julialang.org/t/return-handles-to-functions-from-caller-namespace-from-a-macro/129315 "2025-05-25T15:18:56Z")

</div>

I have made a minimal working example of a macro that returns a list of handles for the functions it receives as input. Obviously this can be achieved more easily without a macro, but let us assume there is a more compli…

---

## [Destructuring of NamedTuple in julia 1.10](https://discourse.julialang.org/t/destructuring-of-namedtuple-in-julia-1-10/129308)

<div class="topic-metadata">

**Author:** [@o314](https://discourse.julialang.org/u/o314)\
**Replies:** 3\
**Last updated:** [May 25, 2025, 2:35pm UTC](https://discourse.julialang.org/t/destructuring-of-namedtuple-in-julia-1-10/129308 "2025-05-25T14:35:13Z")

</div>

I wonder if there is a way to destructure a namedtuple with splatting like this (; a, nt...) = (; a=1, b=2, c=3) where one is expecting to get a = 1 and nt = (; b=2, c=3) setted This forms fails @ home with julia v1.1…

---

## [Slow deserialization of booleans](https://discourse.julialang.org/t/slow-deserialization-of-booleans/129260)

<div class="topic-metadata">

**Author:** [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Replies:** 8\
**Last updated:** [May 25, 2025, 12:58am UTC](https://discourse.julialang.org/t/slow-deserialization-of-booleans/129260 "2025-05-25T00:58:38Z")

</div>

When a Vector{Bool} is deserialized, stdlib/Serialization/src/Serialization.jl:1338 allocates for each element deserialized. I changed the A = Array{Bool, length(dims)}(undef, dims) to A = Vector{Bool}(undef, n) and I wa…

---

## [Boundary for Turing parameters](https://discourse.julialang.org/t/boundary-for-turing-parameters/129290)

<div class="topic-metadata">

**Author:** [@Cyan](https://discourse.julialang.org/u/Cyan)\
**Replies:** 5\
**Last updated:** [May 24, 2025, 7:29pm UTC](https://discourse.julialang.org/t/boundary-for-turing-parameters/129290 "2025-05-24T19:29:03Z")

</div>

I set my priors for parameters like this, b ~ Normal(1.5, 1.) s ~ Normal(0.1, 1) q ~ Normal(0.7, 1.0) But I want to set strong limitation for these parameters, such as abs(b)\<10 abs(q)\<1 0\<abs(s)\<1 How …

---

## [REPL and (VSC Notebook & linter) are seeing different environments](https://discourse.julialang.org/t/repl-and-vsc-notebook-linter-are-seeing-different-environments/129236)

<div class="topic-metadata">

**Author:** [@Jerry](https://discourse.julialang.org/u/Jerry)\
**Replies:** 1\
**Last updated:** [May 23, 2025, 10:06pm UTC](https://discourse.julialang.org/t/repl-and-vsc-notebook-linter-are-seeing-different-environments/129236 "2025-05-23T22:06:53Z")

</div>

I’ve used Julia with VS Code for some years. A few days ago I started getting linting errors from the VSC extension related to missing Julia packages. I don’t know what (I) changed to make this happen. I’ve learned that…

---

## [Sphere surface and axes artefact in Makie.jl](https://discourse.julialang.org/t/sphere-surface-and-axes-artefact-in-makie-jl/129261)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 4\
**Last updated:** [May 23, 2025, 6:12pm UTC](https://discourse.julialang.org/t/sphere-surface-and-axes-artefact-in-makie-jl/129261 "2025-05-23T18:12:39Z")

</div>

I am trying to plot points on the Bloch sphere using GLMakie, but I get white lines around the lines I use to draw the sphere: Is there anything I can do to fix this? The script I used to generate the plot is below. …

---

## [\[ANN\] Refreshed JuliaHealth Website!](https://discourse.julialang.org/t/ann-refreshed-juliahealth-website/129080)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 2\
**Last updated:** [May 22, 2025, 7:10am UTC](https://discourse.julialang.org/t/ann-refreshed-juliahealth-website/129080 "2025-05-22T07:10:45Z")

</div>

Hi folks! :waving\_hand: Introducing the New JuliaHealth Website! With a tremendous thank you to @Hetarth02 and @Divital, we are excited to announce our refreshed JuliaHealth website! Supported Features As of today i…

---

## [Constructing a permutation matrix](https://discourse.julialang.org/t/constructing-a-permutation-matrix/129234)

<div class="topic-metadata">

**Author:** [@cnaak](https://discourse.julialang.org/u/cnaak)\
**Replies:** 15\
**Last updated:** [May 23, 2025, 6:47am UTC](https://discourse.julialang.org/t/constructing-a-permutation-matrix/129234 "2025-05-23T06:47:39Z")

</div>

Approaching the problem from a slightly different angle, one can first transform a permutation vector p into a permutation matrix, for instance: julia\> function MP(p) ℓ = length(p) vcat(\[ begin t=r…

---

## [Escaping newlines in multi-line string macros?](https://discourse.julialang.org/t/escaping-newlines-in-multi-line-string-macros/129240)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 3\
**Last updated:** [May 23, 2025, 6:37am UTC](https://discourse.julialang.org/t/escaping-newlines-in-multi-line-string-macros/129240 "2025-05-23T06:37:41Z")

</div>

Would this feature, to be able to write a single string literal on multiple lines of the source code without \\n in the string, be eventually implemented for all string-like objects? I was surprised that it doesn’t wor…

---

## [How to make my develop version library?](https://discourse.julialang.org/t/how-to-make-my-develop-version-library/129196)

<div class="topic-metadata">

**Author:** [@JaebeomCho](https://discourse.julialang.org/u/JaebeomCho)\
**Replies:** 3\
**Last updated:** [May 23, 2025, 2:07am UTC](https://discourse.julialang.org/t/how-to-make-my-develop-version-library/129196 "2025-05-23T02:07:17Z")

</div>

Hi, I’m developing a module for my team. I’m currently developing a Julia package that relies on a forked version of another public package (Fortran90Namelists.jl). I’ve made some important internal modifications to thi…

---

## [Using \`Lux.WrappedFunction\` for pre/post processing in Lux model](https://discourse.julialang.org/t/using-lux-wrappedfunction-for-pre-post-processing-in-lux-model/129254)

<div class="topic-metadata">

**Author:** [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Replies:** 5\
**Last updated:** [May 22, 2025, 11:36pm UTC](https://discourse.julialang.org/t/using-lux-wrappedfunction-for-pre-post-processing-in-lux-model/129254 "2025-05-22T23:36:22Z")

</div>

Hi! I recently learned about Lux.WrappedFunction() layer (docs) that allows to prescribed a parameter less function inside the Chain. I think this is a great feature to allow building of preprocessing and postprocessing…

---

## [Any memory locations known to be ok to read across platforms? Doing a VM](https://discourse.julialang.org/t/any-memory-locations-known-to-be-ok-to-read-across-platforms-doing-a-vm/129249)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 2\
**Last updated:** [May 22, 2025, 9:21pm UTC](https://discourse.julialang.org/t/any-memory-locations-known-to-be-ok-to-read-across-platforms-doing-a-vm/129249 "2025-05-22T21:21:01Z")

</div>

These work on my 64-bit Linux, but some are likely not guaranteed to work: julia\> unsafe\_load(Ptr{UInt8}(Int(0x00400000))) # reading julia itself 0x7f Is it up to ELF to use that location, and thus guaranteed to work?…

---

## [Solver performances depending on parameters](https://discourse.julialang.org/t/solver-performances-depending-on-parameters/129223)

<div class="topic-metadata">

**Author:** [@diffeqslvr](https://discourse.julialang.org/u/diffeqslvr)\
**Replies:** 2\
**Last updated:** [May 22, 2025, 4:26pm UTC](https://discourse.julialang.org/t/solver-performances-depending-on-parameters/129223 "2025-05-22T16:26:54Z")

</div>

I am solving a set of differential equations, see eqs C3a-C3e from https://journals.aps.org/prresearch/pdf/10.1103/PhysRevResearch.5.013091. I separated the equations into real and imaginary parts and propagate them …

---

## [Equivalent of \`@something\` for field access](https://discourse.julialang.org/t/equivalent-of-something-for-field-access/129177)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 14\
**Last updated:** [May 22, 2025, 2:53pm UTC](https://discourse.julialang.org/t/equivalent-of-something-for-field-access/129177 "2025-05-22T14:53:09Z")

</div>

I really like the @something operation because it lets me write concise and readable code such as: function get\_operators(expr, operators=nothing) return @something(operators, get\_metadata(expr).operators) end This…

---

## [Trouble Precompiling GLMakie.jl using ShareAdd.jl - Using Shared Environments](https://discourse.julialang.org/t/trouble-precompiling-glmakie-jl-using-shareadd-jl-using-shared-environments/126999)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 2\
**Last updated:** [May 22, 2025, 12:57pm UTC](https://discourse.julialang.org/t/trouble-precompiling-glmakie-jl-using-shareadd-jl-using-shared-environments/126999 "2025-05-22T12:57:40Z")

</div>

I tried using ShareAdd.jl to use packages from a shared environment. All other packages load and precompile successfully except GLMakie. First, I see if GLMakie.jl has been added to the environment successfully: …

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

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