# General Usage

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

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

**Page:** 11

---

## [Julia alternative for project.scripts (and Typer)](https://discourse.julialang.org/t/julia-alternative-for-project-scripts-and-typer/137129)

<div class="topic-metadata">

**Author:** [@lilachint](https://discourse.julialang.org/u/lilachint)\
**Replies:** 2\
**Last updated:** [May 15, 2026, 2:26pm UTC](https://discourse.julialang.org/t/julia-alternative-for-project-scripts-and-typer/137129 "2026-05-15T14:26:59Z")

</div>

I used to use Python to build CLI applications, and using pip I could conveniently define \[project.scripts\] in pyproject.toml, e.g. \[project.scripts\] gradupe = "gradupe.cli:app" Along with using Typer. I could call gra…

---

## [JSON.jl (v1.0) vs JSON3.jl for intensive struct materialization (20,000+ files)](https://discourse.julialang.org/t/json-jl-v1-0-vs-json3-jl-for-intensive-struct-materialization-20-000-files/136980)

<div class="topic-metadata">

**Author:** [@fchichorro](https://discourse.julialang.org/u/fchichorro)\
**Replies:** 4\
**Last updated:** [May 14, 2026, 10:31pm UTC](https://discourse.julialang.org/t/json-jl-v1-0-vs-json3-jl-for-intensive-struct-materialization-20-000-files/136980 "2026-05-14T22:31:22Z")

</div>

Hello everyone I have an ETL process that reads ~20,000 JSON files (avg. 60kb each), materializes them into nested structs, performs some operations, and saves them back to disk. I recently tried transitioning from JSO…

---

## [Tachikoma, Kaimon and byobu](https://discourse.julialang.org/t/tachikoma-kaimon-and-byobu/136983)

<div class="topic-metadata">

**Author:** [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Replies:** 6\
**Last updated:** [May 13, 2026, 8:05pm UTC](https://discourse.julialang.org/t/tachikoma-kaimon-and-byobu/136983 "2026-05-13T20:05:58Z")

</div>

I’d like to run Kaimon server in byobu and detach, it seems that Tachikoma grabs F12. Is there a way to do that?

---

## [Plots.jl: Could not create decoration from factory! Running with no decorations](https://discourse.julialang.org/t/plots-jl-could-not-create-decoration-from-factory-running-with-no-decorations/137109)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 1\
**Last updated:** [May 13, 2026, 7:42pm UTC](https://discourse.julialang.org/t/plots-jl-could-not-create-decoration-from-factory-running-with-no-decorations/137109 "2026-05-13T19:42:34Z")

</div>

I encountered the following problem: julia\> using Plots julia\> plot(rand(10)) Could not create decoration from factory! Running with no decorations. I got a plot with no window decorations: The issue originates f…

---

## [Recommended way to destructuring a type](https://discourse.julialang.org/t/recommended-way-to-destructuring-a-type/137103)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [May 13, 2026, 4:22pm UTC](https://discourse.julialang.org/t/recommended-way-to-destructuring-a-type/137103 "2026-05-13T16:22:32Z")

</div>

I would like to provide destructuring assignment as a syntactic sugar for a custom type. I understand that the way to do it is iteration, but I am wondering if there is something more elegant than the MWE below, also co…

---

## [C calling convention mismatch?](https://discourse.julialang.org/t/c-calling-convention-mismatch/136624)

<div class="topic-metadata">

**Author:** [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Replies:** 12\
**Last updated:** [May 13, 2026, 11:48am UTC](https://discourse.julialang.org/t/c-calling-convention-mismatch/136624 "2026-05-13T11:48:35Z")

</div>

I’m using PackageCompiler.jl to build a shared library, which I then link into a C driver program. One of my @ccallable functions takes a “large” (168 bytes) struct as an argument by value. Things worked fine on macOS, b…

---

## [Execute consecutive scripts](https://discourse.julialang.org/t/execute-consecutive-scripts/137064)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 7\
**Last updated:** [May 13, 2026, 6:44am UTC](https://discourse.julialang.org/t/execute-consecutive-scripts/137064 "2026-05-13T06:44:54Z")

</div>

Is there a simple way to execute either multiple scripts consecutively, or execute a script with some additional imports? Consider this use case: I have a NN training script, and if I import CUDA, it trains on the GPU. C…

---

## [How to make GLMakie's Volume function look like a solid](https://discourse.julialang.org/t/how-to-make-glmakies-volume-function-look-like-a-solid/137090)

<div class="topic-metadata">

**Author:** [@jhai](https://discourse.julialang.org/u/jhai)\
**Replies:** 1\
**Last updated:** [May 12, 2026, 9:44pm UTC](https://discourse.julialang.org/t/how-to-make-glmakies-volume-function-look-like-a-solid/137090 "2026-05-12T21:44:23Z")

</div>

I’m trying to visualize a solid 3d object using GLMakie’s volume function: using GLMakie n = 150 # Resolution x = range(0, 1, length=n) y = range(0, 1, length=n) z = range(0, 1, length=n) vol = \[ (0 ≤ xi ≤ 1 && 0 ≤ y…

---

## [Readln() missing in debian 11 Main](https://discourse.julialang.org/t/readln-missing-in-debian-11-main/137083)

<div class="topic-metadata">

**Author:** [@dave3897](https://discourse.julialang.org/u/dave3897)\
**Replies:** 8\
**Last updated:** [May 12, 2026, 11:56am UTC](https://discourse.julialang.org/t/readln-missing-in-debian-11-main/137083 "2026-05-12T11:56:18Z")

</div>

system stack: AMD64 hardware Debian 11 linux MATE desktop & terminal println("What is your name?") name2 = readln(); println( "Welcome to Julia $name2") What is your name? ERROR: LoadError: UndefVarError: readln no…

---

## [How to update from the archived \`StochasticDelayDiffEq.jl\`?](https://discourse.julialang.org/t/how-to-update-from-the-archived-stochasticdelaydiffeq-jl/137041)

<div class="topic-metadata">

**Author:** [@scheidan1](https://discourse.julialang.org/u/scheidan1)\
**Replies:** 8\
**Last updated:** [May 12, 2026, 10:41am UTC](https://discourse.julialang.org/t/how-to-update-from-the-archived-stochasticdelaydiffeq-jl/137041 "2026-05-12T10:41:23Z")

</div>

Hello I’m try to modernize a package that is based on the now archived StochasticDelayDiffEq.jl. As described here the SciML packages have been reorganized. The migration path from StochasticDelayDiffEq.jl is not descr…

---

## [If @generated branch selection](https://discourse.julialang.org/t/if-generated-branch-selection/137067)

<div class="topic-metadata">

**Author:** [@cshen](https://discourse.julialang.org/u/cshen)\
**Replies:** 14\
**Last updated:** [May 12, 2026, 4:39am UTC](https://discourse.julialang.org/t/if-generated-branch-selection/137067 "2026-05-12T04:39:30Z")

</div>

Hello, I was wondering what are the heuristics (if any) that the compiler uses to decide whether to use the @generated branch instead of the normal branch. The docs remain a little bit vague and only talk about this as …

---

## [Revise.jl not working](https://discourse.julialang.org/t/revise-jl-not-working/137079)

<div class="topic-metadata">

**Author:** [@AndreasKuhn](https://discourse.julialang.org/u/AndreasKuhn)\
**Replies:** 0\
**Last updated:** [May 11, 2026, 4:56pm UTC](https://discourse.julialang.org/t/revise-jl-not-working/137079 "2026-05-11T16:56:47Z")

</div>

Description When using Revise via IJulia (Jupyter notebook) with a local dev package, after the package is precompiled, Revise fails to track all source files and reports that none of them are stored in the source-text c…

---

## [New to Julia - questions about optimizing my Turing code](https://discourse.julialang.org/t/new-to-julia-questions-about-optimizing-my-turing-code/137008)

<div class="topic-metadata">

**Author:** [@petalmokryn](https://discourse.julialang.org/u/petalmokryn)\
**Replies:** 8\
**Last updated:** [May 9, 2026, 8:53pm UTC](https://discourse.julialang.org/t/new-to-julia-questions-about-optimizing-my-turing-code/137008 "2026-05-09T20:53:58Z")

</div>

Hi everyone, nice to meet you I’m trying to write a custom multivariate model in Julia using banded matrix operations, starting with the simple example of a Gaussian random walk with IID innovations and IID observation …

---

## [Make Unitful simplify expressions like 1μm/1m to a unitless value by default](https://discourse.julialang.org/t/make-unitful-simplify-expressions-like-1-m-1m-to-a-unitless-value-by-default/71866)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 10\
**Last updated:** [May 9, 2026, 1:10pm UTC](https://discourse.julialang.org/t/make-unitful-simplify-expressions-like-1-m-1m-to-a-unitless-value-by-default/71866 "2026-05-09T13:10:23Z")

</div>

I freguently perform computations like 1μm/1m and would like Unitful to return a unitless number by default rather than having to do NoUnits(1μm/1m). Is there a setting to make this the default?

---

## [Why are the FFT outputs always zero for some specific point numbers when using FFTW with MKL](https://discourse.julialang.org/t/why-are-the-fft-outputs-always-zero-for-some-specific-point-numbers-when-using-fftw-with-mkl/137038)

<div class="topic-metadata">

**Author:** [@DN\_Silence](https://discourse.julialang.org/u/DN_Silence)\
**Replies:** 1\
**Last updated:** [May 8, 2026, 1:44pm UTC](https://discourse.julialang.org/t/why-are-the-fft-outputs-always-zero-for-some-specific-point-numbers-when-using-fftw-with-mkl/137038 "2026-05-08T13:44:48Z")

</div>

I’m using an Intel CPU with Julia 1.12. When my FFT size is 178848185, whether I do FFT or rFFT, the output is always all zeros. But if I use fftw provider, it works normally. This issue is very easy to reproduce. The co…

---

## [Making Julia as Fast as C++](https://discourse.julialang.org/t/making-julia-as-fast-as-c/137016)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 19\
**Last updated:** [May 8, 2026, 1:03pm UTC](https://discourse.julialang.org/t/making-julia-as-fast-as-c/137016 "2026-05-08T13:03:49Z")

</div>

This is an old post but it seems it hasn’t been discussed yet. An interesting observation the author found is that non-integer powers in Julia are fairly slow at that time, compared to C++. I am not sure if this is re…

---

## [An unexpected clash between NonlinearSolve and ForwardDiff](https://discourse.julialang.org/t/an-unexpected-clash-between-nonlinearsolve-and-forwarddiff/137034)

<div class="topic-metadata">

**Author:** [@ij05](https://discourse.julialang.org/u/ij05)\
**Replies:** 2\
**Last updated:** [May 8, 2026, 12:36pm UTC](https://discourse.julialang.org/t/an-unexpected-clash-between-nonlinearsolve-and-forwarddiff/137034 "2026-05-08T12:36:52Z")

</div>

Hello, I was successfully using the following block of code which uses ForwardDiff.gradient on a function, that has a Nonlinearsolve.NonlinearLeastSquaresProblem. It was giving out correct gradients (and jacobians) unti…

---

## [Best environment practice when working on a package](https://discourse.julialang.org/t/best-environment-practice-when-working-on-a-package/137003)

<div class="topic-metadata">

**Author:** [@Niclas\_Wiberg](https://discourse.julialang.org/u/Niclas_Wiberg)\
**Replies:** 6\
**Last updated:** [May 8, 2026, 9:50am UTC](https://discourse.julialang.org/t/best-environment-practice-when-working-on-a-package/137003 "2026-05-08T09:50:57Z")

</div>

When working on a package MyPackage, I have so far also used MyPackage as my current environment. This seems to work well, for instance I can easily add package dependencies using \]add. But sometimes, e.g. during debugg…

---

## [JSON type serialization](https://discourse.julialang.org/t/json-type-serialization/9794)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 20\
**Last updated:** [May 7, 2026, 6:05pm UTC](https://discourse.julialang.org/t/json-type-serialization/9794 "2026-05-07T18:05:01Z")

</div>

Hi, I wonder why serialisation of JSONs does not contain information about type? Has anyone encountered similar need? For example struct TestType{A} a::A end println(JSON.json(TestType("Hello"))) {"a":"Hello"} Do…

---

## [Type instability in code with branches and QuadGK uses](https://discourse.julialang.org/t/type-instability-in-code-with-branches-and-quadgk-uses/136996)

<div class="topic-metadata">

**Author:** [@Tbl](https://discourse.julialang.org/u/Tbl)\
**Replies:** 9\
**Last updated:** [May 6, 2026, 5:49pm UTC](https://discourse.julialang.org/t/type-instability-in-code-with-branches-and-quadgk-uses/136996 "2026-05-06T17:49:26Z")

</div>

I have a code which calculates complicated integral and which one should be used depends on the parameters. The code is chronically type-unstable (union with Core.Box appears) which makes it few times slower than it shou…

---

## [Loading Unitful from cache takes forever at every VScode restart](https://discourse.julialang.org/t/loading-unitful-from-cache-takes-forever-at-every-vscode-restart/136979)

<div class="topic-metadata">

**Author:** [@alequa](https://discourse.julialang.org/u/alequa)\
**Replies:** 8\
**Last updated:** [May 6, 2026, 11:24am UTC](https://discourse.julialang.org/t/loading-unitful-from-cache-takes-forever-at-every-vscode-restart/136979 "2026-05-06T11:24:29Z")

</div>

Hello, I am using a large environment that loads several packages. The language server takes several minutes (!!!) every time it loads Unitful from cache. The other packages go just fine! \[ Info: Done loading EasyFit f…

---

## [Type stable \`mapreduce\` on Tuples](https://discourse.julialang.org/t/type-stable-mapreduce-on-tuples/136978)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 6\
**Last updated:** [May 5, 2026, 2:52pm UTC](https://discourse.julialang.org/t/type-stable-mapreduce-on-tuples/136978 "2026-05-05T14:52:43Z")

</div>

Hello, I want to apply this very simple example of mapreduce involving eachindex on two tuples function test\_standard(x::Tuple, y::Tuple) length(x) == length(y) || throw(ArgumentError("Input tuples must have the sam…

---

## [Sum over LazyArray is slower than over regular array](https://discourse.julialang.org/t/sum-over-lazyarray-is-slower-than-over-regular-array/136989)

<div class="topic-metadata">

**Author:** [@jecs](https://discourse.julialang.org/u/jecs)\
**Replies:** 3\
**Last updated:** [May 5, 2026, 2:32pm UTC](https://discourse.julialang.org/t/sum-over-lazyarray-is-slower-than-over-regular-array/136989 "2026-05-05T14:32:56Z")

</div>

julia\> N = 64; A = randn(N,N); B = randn(N,N); C = similar(A,1,N); Using Lazy Arrays: julia\> @btime sum!($C,LazyArray(@~ $A.\*$B)) 3.047 μs (0 allocations: 0 bytes) Without LazyArrays: julia\> @btime sum!($C,$A.\*$B) …

---

## [Could not instantiate \`CUDA\` in container](https://discourse.julialang.org/t/could-not-instantiate-cuda-in-container/136964)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 2\
**Last updated:** [May 3, 2026, 7:07pm UTC](https://discourse.julialang.org/t/could-not-instantiate-cuda-in-container/136964 "2026-05-03T19:07:33Z")

</div>

I have a project manifest for Julia 1.12.4 containing \[\[deps.CUDA\]\] deps = \["AbstractFFTs", "Adapt", "BFloat16s", "CEnum", "CUDA\_Compiler\_jll", "CUDA\_Driver\_jll", "CUDA\_Runtime\_Discovery", "CUDA\_Runtime\_jll", "Crayons",…

---

## [Ignore{N} similar to Fix{N}](https://discourse.julialang.org/t/ignore-n-similar-to-fix-n/136932)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [May 3, 2026, 10:01am UTC](https://discourse.julialang.org/t/ignore-n-similar-to-fix-n/136932 "2026-05-03T10:01:40Z")

</div>

I am occasionally finding something like this useful: struct Ignore{N,F} f::F Ignore{N}(f::F) where {N,F} = new{N,F}(f) # no checks etc, just an MWE end function (f::Ignore{N})(args::Vararg{Any,M}) where {N,M} …

---

## [Package installation time on 1.13beta3 improved](https://discourse.julialang.org/t/package-installation-time-on-1-13beta3-improved/136433)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [May 2, 2026, 2:45pm UTC](https://discourse.julialang.org/t/package-installation-time-on-1-13beta3-improved/136433 "2026-05-02T14:45:49Z")

</div>

For my package KiteModels.jl I compared the time it took to run my install script. time ./install Julia 1.10: 5:40 minutes Julia 1.11: 9:30 minutes Julia 1.12: 9:27 minutes Julia 1.13: 7:51 minutes This includes the t…

---

## [The current state of function naming style](https://discourse.julialang.org/t/the-current-state-of-function-naming-style/136849)

<div class="topic-metadata">

**Author:** [@lilachint](https://discourse.julialang.org/u/lilachint)\
**Replies:** 24\
**Last updated:** [May 2, 2026, 3:35am UTC](https://discourse.julialang.org/t/the-current-state-of-function-naming-style/136849 "2026-05-02T03:35:02Z")

</div>

I just came across this reply to a new package announcement. In it, they suggested removing underscores from function names to make them more idiomatic for Julia. The question is, is Julia today still strictly abiding …

---

## [Code execution in VSCode remote server](https://discourse.julialang.org/t/code-execution-in-vscode-remote-server/136946)

<div class="topic-metadata">

**Author:** [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Replies:** 2\
**Last updated:** [May 1, 2026, 4:01pm UTC](https://discourse.julialang.org/t/code-execution-in-vscode-remote-server/136946 "2026-05-01T16:01:03Z")

</div>

Hi everyone, I’ve been working quite effectively by executing code on a remote vs code window. I enjoyed the fact that I can have a standard Julia file and run lines and get a plot window. However, since a few weeks thi…

---

## [Can I get away with memoizing a :foldable method?](https://discourse.julialang.org/t/can-i-get-away-with-memoizing-a-foldable-method/136951)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 0\
**Last updated:** [May 1, 2026, 3:48pm UTC](https://discourse.julialang.org/t/can-i-get-away-with-memoizing-a-foldable-method/136951 "2026-05-01T15:48:59Z")

</div>

Starting to dabble in moving long calls from runtime into compile-time, and I’m finding that repeated calls in compile-time are also annoying. Naively, I tried compile-time memoization, also avoiding cache access overhea…

---

## [Is the linear system solver \\ also multi threaded in Julia as in Matlab? And how to “multithread” it in Julia?](https://discourse.julialang.org/t/is-the-linear-system-solver-also-multi-threaded-in-julia-as-in-matlab-and-how-to-multithread-it-in-julia/47404)

<div class="topic-metadata">

**Author:** [@nico](https://discourse.julialang.org/u/nico)\
**Replies:** 34\
**Last updated:** [May 1, 2026, 7:34am UTC](https://discourse.julialang.org/t/is-the-linear-system-solver-also-multi-threaded-in-julia-as-in-matlab-and-how-to-multithread-it-in-julia/47404 "2026-05-01T07:34:35Z")

</div>

I am trying to compare speed and performance between Matlab and Julia. I am looking at a code that does topology optimization of a continuum structure subjected to a given load. The code I am looking at is the public cod…

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

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