# General Usage

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

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

**Page:** 70

---

## [What does Core.PartialStruct means for type stability?](https://discourse.julialang.org/t/what-does-core-partialstruct-means-for-type-stability/128310)

<div class="topic-metadata">

**Author:** [@mleseach](https://discourse.julialang.org/u/mleseach)\
**Replies:** 1\
**Last updated:** [April 22, 2025, 9:42pm UTC](https://discourse.julialang.org/t/what-does-core-partialstruct-means-for-type-stability/128310 "2025-04-22T21:42:51Z")

</div>

Hi, I was toying around with NamedTuple and I’m wondering if my code is type-stable. struct A end name(::A) = :a value(::A) = "test" struct B end name(::B) = :b value(::B) = ones(3, 3) function get\_values(inputs) …

---

## [Check which packages are actually used in script?](https://discourse.julialang.org/t/check-which-packages-are-actually-used-in-script/128279)

<div class="topic-metadata">

**Author:** [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Replies:** 1\
**Last updated:** [April 22, 2025, 12:36am UTC](https://discourse.julialang.org/t/check-which-packages-are-actually-used-in-script/128279 "2025-04-22T00:36:33Z")

</div>

We have a fairly bloated Project.toml that I’m trying to trim down. Is there any way to, e.g., run tests and track which packages were in Project.toml or imported with using but never actually called?

---

## [Understanding build products](https://discourse.julialang.org/t/understanding-build-products/128278)

<div class="topic-metadata">

**Author:** [@luke-kiernan](https://discourse.julialang.org/u/luke-kiernan)\
**Replies:** 1\
**Last updated:** [April 22, 2025, 6:33am UTC](https://discourse.julialang.org/t/understanding-build-products/128278 "2025-04-22T06:33:39Z")

</div>

There’s a windows-specific issue with MUMPS\_jll on Yggdrasil, so I’m trying to troubleshoot. As I understand things, I need to: Tweak the build script. Compile for the target system: on a Mac/Linux system, tell BinaryB…

---

## [How to include non-jl files in a package](https://discourse.julialang.org/t/how-to-include-non-jl-files-in-a-package/111106)

<div class="topic-metadata">

**Author:** [@janonime](https://discourse.julialang.org/u/janonime)\
**Replies:** 5\
**Last updated:** [April 22, 2025, 5:09am UTC](https://discourse.julialang.org/t/how-to-include-non-jl-files-in-a-package/111106 "2025-04-22T05:09:12Z")

</div>

Can I include data files (.json, .csv) with a Julia package? For example, could I include a file called data.csv in my package structure containing the following text: x,y 1,2 and a function in test.jl that calls test…

---

## [Why does @fastmath have problems with promoting integers?](https://discourse.julialang.org/t/why-does-fastmath-have-problems-with-promoting-integers/128276)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 4\
**Last updated:** [April 22, 2025, 1:01am UTC](https://discourse.julialang.org/t/why-does-fastmath-have-problems-with-promoting-integers/128276 "2025-04-22T01:01:10Z")

</div>

Why do I get the following error? julia\> (-1) \* UInt(1) 0xffffffffffffffff julia\> @fastmath (-1) \* UInt(1) ERROR: InexactError: convert(UInt64, -1) Tested with Julia 1.11.4.

---

## [Vector of MVectors](https://discourse.julialang.org/t/vector-of-mvectors/128275)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 9\
**Last updated:** [April 21, 2025, 10:55pm UTC](https://discourse.julialang.org/t/vector-of-mvectors/128275 "2025-04-21T22:55:18Z")

</div>

What am I doing wrong? I want to have a vector of MVectors, but each of them shall be different. using StaticArrays vec=zeros(MVector{3, Float64}, 4) vec\[1\] .= \[1,2,3\] vec has as output: \[1.0, 2.0, 3.0\] \[1.0, 2.0, 3…

---

## [Visualizing another process with Pluto notebook](https://discourse.julialang.org/t/visualizing-another-process-with-pluto-notebook/128190)

<div class="topic-metadata">

**Author:** [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Replies:** 1\
**Last updated:** [April 21, 2025, 6:45pm UTC](https://discourse.julialang.org/t/visualizing-another-process-with-pluto-notebook/128190 "2025-04-21T18:45:31Z")

</div>

I’m considering to use Pluto as an internal dash boarding application. This seems like a natural progression to me because I’ve been using Pluto for offline analysis, and I want to make it possible to monitor real-time a…

---

## [How to document an enum?](https://discourse.julialang.org/t/how-to-document-an-enum/126329)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [April 21, 2025, 2:05pm UTC](https://discourse.julialang.org/t/how-to-document-an-enum/126329 "2025-04-21T14:05:28Z")

</div>

What is a good way to document an enum? I currently do this: """ Model \`VSM\` \`LLT\` Enumeration of the implemented model types. # Elements - VSM: Vortex Step Method - LLT: Lifting Line Theory """ @enum Model VSM LL…

---

## [How to plot lines with x-direction error filled with Semi-transparent color using Makie?](https://discourse.julialang.org/t/how-to-plot-lines-with-x-direction-error-filled-with-semi-transparent-color-using-makie/128265)

<div class="topic-metadata">

**Author:** [@dk-zen](https://discourse.julialang.org/u/dk-zen)\
**Replies:** 2\
**Last updated:** [April 21, 2025, 2:03pm UTC](https://discourse.julialang.org/t/how-to-plot-lines-with-x-direction-error-filled-with-semi-transparent-color-using-makie/128265 "2025-04-21T14:03:22Z")

</div>

Hi, everyone. How to plot lines with x-direction error filled with Semi-transparent color using Makie? The figure I want is as follows.

---

## [Quaternions with symbolic equations (MTK)](https://discourse.julialang.org/t/quaternions-with-symbolic-equations-mtk/128263)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [April 21, 2025, 12:16pm UTC](https://discourse.julialang.org/t/quaternions-with-symbolic-equations-mtk/128263 "2025-04-21T12:16:37Z")

</div>

Is their a package for quaternions that works well with symbolic equations? We wrote now our own functions, but I think this should be done either in a new package, or added to one of the existing packages like Rotations…

---

## [ComponentArray and generation of JumpSet](https://discourse.julialang.org/t/componentarray-and-generation-of-jumpset/127875)

<div class="topic-metadata">

**Author:** [@paolo-mgi](https://discourse.julialang.org/u/paolo-mgi)\
**Replies:** 2\
**Last updated:** [April 21, 2025, 10:53am UTC](https://discourse.julialang.org/t/componentarray-and-generation-of-jumpset/127875 "2025-04-21T10:53:10Z")

</div>

Hello, I wish to integrate a system of jump differential equations with JumpProblem. Variables in the system behave differently and I discrimiate between them using ComponentArray. The problem requires the definition of…

---

## [How can I improve the efficiency of the CUDA kernel？](https://discourse.julialang.org/t/how-can-i-improve-the-efficiency-of-the-cuda-kernel/128260)

<div class="topic-metadata">

**Author:** [@zihuizh](https://discourse.julialang.org/u/zihuizh)\
**Replies:** 4\
**Last updated:** [April 21, 2025, 10:41am UTC](https://discourse.julialang.org/t/how-can-i-improve-the-efficiency-of-the-cuda-kernel/128260 "2025-04-21T10:41:54Z")

</div>

I’m using Julia’s CUDA.jl to develop a Smoothed Particle Hydrodynamics program, and I’m wondering what methods can improve the performance of CUDA kernels. Should I use shared memory? Would using something like ParallelS…

---

## [Startup option to turn off @assert](https://discourse.julialang.org/t/startup-option-to-turn-off-assert/128238)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 10\
**Last updated:** [April 21, 2025, 7:56am UTC](https://discourse.julialang.org/t/startup-option-to-turn-off-assert/128238 "2025-04-21T07:56:38Z")

</div>

I often use something like @boundscheck all(x .\> 0) || error() instead of @assert all(x .\> 0) so that I could “test run” the code first. If no error, I would then start with check-bounds=no to run the code in “perfor…

---

## [Faster setup for a new machine?](https://discourse.julialang.org/t/faster-setup-for-a-new-machine/128253)

<div class="topic-metadata">

**Author:** [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Replies:** 4\
**Last updated:** [April 20, 2025, 10:26pm UTC](https://discourse.julialang.org/t/faster-setup-for-a-new-machine/128253 "2025-04-20T22:26:59Z")

</div>

At my work, we develop and run code on AWS ec2 machines, and often spin new ones with the same environment. We have both a big Python and Julia environment, but the Julia portion of the setup Pkg.instantiate() is by far…

---

## [Save a local variable when program is killed](https://discourse.julialang.org/t/save-a-local-variable-when-program-is-killed/128218)

<div class="topic-metadata">

**Author:** [@Yue-Zhengyuan](https://discourse.julialang.org/u/Yue-Zhengyuan)\
**Replies:** 5\
**Last updated:** [April 20, 2025, 9:54pm UTC](https://discourse.julialang.org/t/save-a-local-variable-when-program-is-killed/128218 "2025-04-20T21:54:57Z")

</div>

I have a Julia program that performs some long operation on a variable, and I hope that when the program is killed by a job management system such as SLURM, the program can save the current local state of the variable to…

---

## [LocalRegistry doesn't automatically pull](https://discourse.julialang.org/t/localregistry-doesnt-automatically-pull/128227)

<div class="topic-metadata">

**Author:** [@freeman](https://discourse.julialang.org/u/freeman)\
**Replies:** 7\
**Last updated:** [April 20, 2025, 8:19pm UTC](https://discourse.julialang.org/t/localregistry-doesnt-automatically-pull/128227 "2025-04-20T20:19:50Z")

</div>

I’ve been using LocalRegistry to manage a personal registry in a remote git hosting website. It allows me to do what I wanted, versioning my own packages and have Pkg do its dependency resolution job. But there’s a slig…

---

## [My new random number generator](https://discourse.julialang.org/t/my-new-random-number-generator/128244)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 3\
**Last updated:** [April 20, 2025, 6:51pm UTC](https://discourse.julialang.org/t/my-new-random-number-generator/128244 "2025-04-20T18:51:42Z")

</div>

Please note I’m not a professional rng designer so this might not be up to the standard, but feel free to check it out. It passes the smallcrush test. #= This is free and unencumbered software released into the public d…

---

## [Warning about importing SpkSparseSpdBase.\_triangularsolve!](https://discourse.julialang.org/t/warning-about-importing-spksparsespdbase-triangularsolve/128195)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [April 20, 2025, 2:04pm UTC](https://discourse.julialang.org/t/warning-about-importing-spksparsespdbase-triangularsolve/128195 "2025-04-20T14:04:28Z")

</div>

When installing KiteModels.jl I get the warning: │ WARNING: could not import SpkSparseSpdBase.\_triangularsolve! into SpkSparseSpdSolver Any idea what could be the reason? I am not using any of these packages on purpo…

---

## [GLMakie datainspector: Tooltip from x,y-coordinate to date, value](https://discourse.julialang.org/t/glmakie-datainspector-tooltip-from-x-y-coordinate-to-date-value/128241)

<div class="topic-metadata">

**Author:** [@Fred\_van\_der\_Zeeuw](https://discourse.julialang.org/u/Fred_van_der_Zeeuw)\
**Replies:** 3\
**Last updated:** [April 20, 2025, 9:58am UTC](https://discourse.julialang.org/t/glmakie-datainspector-tooltip-from-x-y-coordinate-to-date-value/128241 "2025-04-20T09:58:52Z")

</div>

I am trying to plot a candlestick chart which can show tooltips with the date and open, high, low, close values but I am getting just x,y coordinates. I tried tooltip but didn’t get it to work. Tried datainspector which …

---

## [Why functions in SpecialFunctions package work on CUDA arrays?](https://discourse.julialang.org/t/why-functions-in-specialfunctions-package-work-on-cuda-arrays/128194)

<div class="topic-metadata">

**Author:** [@singularity](https://discourse.julialang.org/u/singularity)\
**Replies:** 7\
**Last updated:** [April 20, 2025, 7:04am UTC](https://discourse.julialang.org/t/why-functions-in-specialfunctions-package-work-on-cuda-arrays/128194 "2025-04-20T07:04:45Z")

</div>

HI. I am confused how the behavior of functions inside the SpecialFunctions package on CUDA arrays. I am confused why the code below works and doesn’t throw an error at the last line. using CUDA using SpecialFunctions…

---

## [How to avoid memory allocation while doing sum on a GPU?](https://discourse.julialang.org/t/how-to-avoid-memory-allocation-while-doing-sum-on-a-gpu/128225)

<div class="topic-metadata">

**Author:** [@Shashank](https://discourse.julialang.org/u/Shashank)\
**Replies:** 7\
**Last updated:** [April 20, 2025, 7:00am UTC](https://discourse.julialang.org/t/how-to-avoid-memory-allocation-while-doing-sum-on-a-gpu/128225 "2025-04-20T07:00:48Z")

</div>

I have been having a problem with memory allocation when using sum on a CUDA array. Is there a way to avoid it? I have pasted the relevant parts of the code below: println("3:", CUDA.memory\_status()) Cgain1\_reshaped\_for…

---

## [What to remove when packages incompatible](https://discourse.julialang.org/t/what-to-remove-when-packages-incompatible/128233)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [April 20, 2025, 1:53am UTC](https://discourse.julialang.org/t/what-to-remove-when-packages-incompatible/128233 "2025-04-20T01:53:57Z")

</div>

I have a large environment with many packages. Is there an algorithm or heuristic that can suggest what to remove when I want to add a new thing? The log is too long to fit in a Discourse post so I’ve truncated it. pkg\>…

---

## [Mutually recursive types, recommended style?](https://discourse.julialang.org/t/mutually-recursive-types-recommended-style/128228)

<div class="topic-metadata">

**Author:** [@DrEntropy](https://discourse.julialang.org/u/DrEntropy)\
**Replies:** 2\
**Last updated:** [April 20, 2025, 12:41am UTC](https://discourse.julialang.org/t/mutually-recursive-types-recommended-style/128228 "2025-04-20T00:41:39Z")

</div>

When faced with a situation where you may need mutually recursive types like this: mutable struct MyAgent \<: AbstractAgent id::Int friendB :: AbstractAgent # will always be AgentB type though #other fields …

---

## [Prune "compiled" folder](https://discourse.julialang.org/t/prune-compiled-folder/109567)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 25\
**Last updated:** [April 19, 2025, 7:12pm UTC](https://discourse.julialang.org/t/prune-compiled-folder/109567 "2025-04-19T19:12:07Z")

</div>

Is there a way to prune the .julia/compiled folder? It is getting quite big.

---

## [Computation Expansions to Float64 invalid with certain GPUs](https://discourse.julialang.org/t/computation-expansions-to-float64-invalid-with-certain-gpus/128223)

<div class="topic-metadata">

**Author:** [@mj2984](https://discourse.julialang.org/u/mj2984)\
**Replies:** 0\
**Last updated:** [April 19, 2025, 2:40pm UTC](https://discourse.julialang.org/t/computation-expansions-to-float64-invalid-with-certain-gpus/128223 "2025-04-19T14:40:13Z")

</div>

I encountered an issue trying to use OpenCL on my Laptop with intel iGPU, using Float16 computations. The GPU does not support Float64. The typical error message for this would be :: Reason :: unsupported use of double …

---

## [How to inspect fused loop?](https://discourse.julialang.org/t/how-to-inspect-fused-loop/128220)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 1\
**Last updated:** [April 19, 2025, 1:54pm UTC](https://discourse.julialang.org/t/how-to-inspect-fused-loop/128220 "2025-04-19T13:54:32Z")

</div>

given x = randn(5) y = randn(5) i = \[1, 3\] is there any speed difference between y\[i\] .= x\[i\] .+ 1.0 and y\[i\] .= view(x, i) .+ 1.0 ? to be more specific, would x\[i\] in the RHS of a fused loop create a copy of vect…

---

## [GC error (probable corruption) in 1.11](https://discourse.julialang.org/t/gc-error-probable-corruption-in-1-11/128219)

<div class="topic-metadata">

**Author:** [@fastwave](https://discourse.julialang.org/u/fastwave)\
**Replies:** 0\
**Last updated:** [April 19, 2025, 1:01pm UTC](https://discourse.julialang.org/t/gc-error-probable-corruption-in-1-11/128219 "2025-04-19T13:01:27Z")

</div>

I could not find much about GC corruptions in recent posts. If someone can shed a light on it that would be helpful. I get these crashes randomly sometimes after just a few minutes, other times after couple of days of co…

---

## [Makie.jl Extensions frequently recompiled](https://discourse.julialang.org/t/makie-jl-extensions-frequently-recompiled/128203)

<div class="topic-metadata">

**Author:** [@kongdd](https://discourse.julialang.org/u/kongdd)\
**Replies:** 2\
**Last updated:** [April 19, 2025, 12:38pm UTC](https://discourse.julialang.org/t/makie-jl-extensions-frequently-recompiled/128203 "2025-04-19T12:38:27Z")

</div>

ArchGDAL.jl has the extension ArchGDALMakieExt (ArchGDAL.jl/Project.toml at master · yeesian/ArchGDAL.jl · GitHub). My pkg Ipaper.jl has an extension relies on ArchGDAL.jl. Each time I update Ipaper.jl in the system env…

---

## [Julia : strange (Windows) cygwin/mintty hang](https://discourse.julialang.org/t/julia-strange-windows-cygwin-mintty-hang/128155)

<div class="topic-metadata">

**Author:** [@jdad](https://discourse.julialang.org/u/jdad)\
**Replies:** 10\
**Last updated:** [April 19, 2025, 8:24am UTC](https://discourse.julialang.org/t/julia-strange-windows-cygwin-mintty-hang/128155 "2025-04-19T08:24:58Z")

</div>

Hello, Since yesterday I encounter a very strange hang-up of Julia interactive repl under Cygwin/mintty : no response to my typing until I hit Ctrl-C. Then it dump with following results (see later) where I see that wh…

---

## [Bug on JSON3 serialization?](https://discourse.julialang.org/t/bug-on-json3-serialization/128193)

<div class="topic-metadata">

**Author:** [@freeman](https://discourse.julialang.org/u/freeman)\
**Replies:** 3\
**Last updated:** [April 18, 2025, 10:38pm UTC](https://discourse.julialang.org/t/bug-on-json3-serialization/128193 "2025-04-18T22:38:26Z")

</div>

Could someone clarify whether this is a bug or I’m doing something wrong? import JSON3 d = Dict{Tuple{Int,String},Float64}() d\[(10,"a")\] = 1. d\[(20,"b")\] = 2. JSON3.write("/tmp/temp.json", d) JSON3.read("/tmp/temp.json"…

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

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