# General Usage

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

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

**Page:** 38

---

## [Julia Type system manual confusions](https://discourse.julialang.org/t/julia-type-system-manual-confusions/132583)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 38\
**Last updated:** [October 6, 2025, 6:51am UTC](https://discourse.julialang.org/t/julia-type-system-manual-confusions/132583 "2025-10-06T06:51:31Z")

</div>

What are now latest best learning resources of Julia type system? I am Physics student. I have been using Julia since last 2 years. I have read this Types introduction section many times but still i don’t grasp it compl…

---

## [Associated legendre polynomials](https://discourse.julialang.org/t/associated-legendre-polynomials/132892)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 5\
**Last updated:** [October 6, 2025, 6:12am UTC](https://discourse.julialang.org/t/associated-legendre-polynomials/132892 "2025-10-06T06:12:05Z")

</div>

Hi, Is there a way to get the analytical expression of associated legendre polynomials in term of cos(theta) (see here) ? Thank you for your help!

---

## [How can the weight of package dependencies be determined?](https://discourse.julialang.org/t/how-can-the-weight-of-package-dependencies-be-determined/132876)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 8\
**Last updated:** [October 5, 2025, 9:54pm UTC](https://discourse.julialang.org/t/how-can-the-weight-of-package-dependencies-be-determined/132876 "2025-10-05T21:54:08Z")

</div>

I often hear people talking about ‘heavy’ and ‘light’ package dependencies. How is this determined? Is the weight of each package determined by its size within the folder: “.julia/compiled/v1.11” ? ▶ For example:

---

## [How to manage and reuse FFTW.jl plans for multiple input sizes in Julia?](https://discourse.julialang.org/t/how-to-manage-and-reuse-fftw-jl-plans-for-multiple-input-sizes-in-julia/132877)

<div class="topic-metadata">

**Author:** [@DN\_Silence](https://discourse.julialang.org/u/DN_Silence)\
**Replies:** 5\
**Last updated:** [October 5, 2025, 4:31pm UTC](https://discourse.julialang.org/t/how-to-manage-and-reuse-fftw-jl-plans-for-multiple-input-sizes-in-julia/132877 "2025-10-05T16:31:15Z")

</div>

I am working on a Julia project where I need to perform FFTs on inputs of different sizes(and eltype, fft/ifft, in/out place). FFTW.jl allows creating plans with plan\_fft or plan\_fft!, which can significantly speed up re…

---

## [Strange behaviour when copying into an element of a vector of matrices](https://discourse.julialang.org/t/strange-behaviour-when-copying-into-an-element-of-a-vector-of-matrices/132889)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 4\
**Last updated:** [October 5, 2025, 3:22pm UTC](https://discourse.julialang.org/t/strange-behaviour-when-copying-into-an-element-of-a-vector-of-matrices/132889 "2025-10-05T15:22:35Z")

</div>

The following is a statement within a for loop of a function, where I have an array of matrices Zd with three 1x1 matrix elements all equal to \[1.0\] and I would like to modify Zd\[2\] using the following command (exact co…

---

## [Difficulty understanding JuliaRegistrator instructions on breaking changes](https://discourse.julialang.org/t/difficulty-understanding-juliaregistrator-instructions-on-breaking-changes/132886)

<div class="topic-metadata">

**Author:** [@dankelley](https://discourse.julialang.org/u/dankelley)\
**Replies:** 4\
**Last updated:** [October 5, 2025, 2:06pm UTC](https://discourse.julialang.org/t/difficulty-understanding-juliaregistrator-instructions-on-breaking-changes/132886 "2025-10-05T14:06:14Z")

</div>

I am having difficulty understanding the TagBot github action for Julia releases. (This is for my package at GitHub - dankelley/OceanAnalysis.jl: Julia code for oceanographic analysis). I added Appendix 1 (below) as a …

---

## [How do you use RadixSort in the Julia v1.9?](https://discourse.julialang.org/t/how-do-you-use-radixsort-in-the-julia-v1-9/95954)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [October 5, 2025, 12:03pm UTC](https://discourse.julialang.org/t/how-do-you-use-radixsort-in-the-julia-v1-9/95954 "2025-10-05T12:03:42Z")

</div>

using Base.Sort: RadixSort; x = rand(100) sort(x, alg=RadixSort()) This should sort x but is giving me the error and I don’t understand the issue here. Also, the doc doesn’t currently list RadixSort yet Sorting and Rela…

---

## [Error when specifying trace level with NonlinearSolve.jl](https://discourse.julialang.org/t/error-when-specifying-trace-level-with-nonlinearsolve-jl/132844)

<div class="topic-metadata">

**Author:** [@rpetit](https://discourse.julialang.org/u/rpetit)\
**Replies:** 3\
**Last updated:** [October 5, 2025, 3:17am UTC](https://discourse.julialang.org/t/error-when-specifying-trace-level-with-nonlinearsolve-jl/132844 "2025-10-05T03:17:37Z")

</div>

Hi, I got an error with NonlinearSolve.jl v4.12.0 when specifying a trace level different than TraceMinimal(). The following code is taken from the diagnostics API page of the documentation. using NonlinearSolve funct…

---

## [Using straight font with Makie and LaTeXStrings](https://discourse.julialang.org/t/using-straight-font-with-makie-and-latexstrings/132832)

<div class="topic-metadata">

**Author:** [@tduretz](https://discourse.julialang.org/u/tduretz)\
**Replies:** 11\
**Last updated:** [October 4, 2025, 9:09pm UTC](https://discourse.julialang.org/t/using-straight-font-with-makie-and-latexstrings/132832 "2025-10-04T21:09:32Z")

</div>

Hi everyone, I am currently having issues because I’m being asked to produce a figure in which all greek characters should appear in straight fonts. I have tried many ways (using \\upmu instead of \\mu, using unicode dire…

---

## [@debug allocate even when not in DEBUG mode](https://discourse.julialang.org/t/debug-allocate-even-when-not-in-debug-mode/132854)

<div class="topic-metadata">

**Author:** [@zmoitier](https://discourse.julialang.org/u/zmoitier)\
**Replies:** 6\
**Last updated:** [October 4, 2025, 5:56pm UTC](https://discourse.julialang.org/t/debug-allocate-even-when-not-in-debug-mode/132854 "2025-10-04T17:56:54Z")

</div>

I would like to add debug statement in a function that is meant to be call in loops, so I would like the performance to be independent of the @debug statement when not in DEBUG mode. As an MRE, I have the function foo, a…

---

## [How to get vectorized code for single-field structs?](https://discourse.julialang.org/t/how-to-get-vectorized-code-for-single-field-structs/132875)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 1\
**Last updated:** [October 4, 2025, 3:36pm UTC](https://discourse.julialang.org/t/how-to-get-vectorized-code-for-single-field-structs/132875 "2025-10-04T15:36:25Z")

</div>

I have noticed that structs with a single field do not vectorize the same way as the underlying type. Here is an example: struct A x::Int end function f(s::NTuple{N,T}, t::NTuple{N,T}, i) where {N,T} ntuple(j -\>…

---

## [Analysis of binomial counts using glm](https://discourse.julialang.org/t/analysis-of-binomial-counts-using-glm/132837)

<div class="topic-metadata">

**Author:** [@RobertDorazio](https://discourse.julialang.org/u/RobertDorazio)\
**Replies:** 11\
**Last updated:** [October 4, 2025, 1:51pm UTC](https://discourse.julialang.org/t/analysis-of-binomial-counts-using-glm/132837 "2025-10-04T13:51:18Z")

</div>

It seems as though the glm() function in Julia does not always yield the maximum likelihood estimates of parameters when fitting logistic regression models of binomial count data. Moreover, the uncertainties of the para…

---

## [How does JuliaCall (PythonCall) protect Julia objects in Python code from Julia's GC?](https://discourse.julialang.org/t/how-does-juliacall-pythoncall-protect-julia-objects-in-python-code-from-julias-gc/132836)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 4\
**Last updated:** [October 4, 2025, 11:16am UTC](https://discourse.julialang.org/t/how-does-juliacall-pythoncall-protect-julia-objects-in-python-code-from-julias-gc/132836 "2025-10-04T11:16:43Z")

</div>

No practical purpose, just curious. For PythonCall in Julia code, it’s easy to imagine that a Julia wrapper increments an underlying CPython object’s reference count to protect it from CPython’s GC (I don’t know if this …

---

## [Polyester.jl: how to properly pass complex hermitian conjugate?](https://discourse.julialang.org/t/polyester-jl-how-to-properly-pass-complex-hermitian-conjugate/132866)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 1\
**Last updated:** [October 4, 2025, 4:36am UTC](https://discourse.julialang.org/t/polyester-jl-how-to-properly-pass-complex-hermitian-conjugate/132866 "2025-10-04T04:36:53Z")

</div>

Polyester mentions that it moves arrays to threads by turning them into StrideArraysCore.PtrArrays. This means that under an @batch slices will create views by default(!). You may want to start Julia with --check-bound…

---

## [Efficient automatic differentation for Julia version \`jax.scan\`?](https://discourse.julialang.org/t/efficient-automatic-differentation-for-julia-version-jax-scan/132853)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 4\
**Last updated:** [October 3, 2025, 4:14pm UTC](https://discourse.julialang.org/t/efficient-automatic-differentation-for-julia-version-jax-scan/132853 "2025-10-03T16:14:03Z")

</div>

Hi, I am using in some JAX array code jax.lax.scan which implements something like this in my example: function jax\_lax\_scan(f, x; accumulator\_init) acc = accumulator\_init for i in axes(x, 1) acc = …

---

## [Simple Timeout of Function](https://discourse.julialang.org/t/simple-timeout-of-function/99578)

<div class="topic-metadata">

**Author:** [@anodos](https://discourse.julialang.org/u/anodos)\
**Replies:** 8\
**Last updated:** [October 3, 2025, 3:43pm UTC](https://discourse.julialang.org/t/simple-timeout-of-function/99578 "2025-10-03T15:43:11Z")

</div>

I often find myself in a situation where I’m calling a Julia function many times in a for loop, and I would like to run the function for, say, 10 seconds, and if it hasn’t finished executing in that time, it should retur…

---

## [How to text-save a DataFrame in markdown?](https://discourse.julialang.org/t/how-to-text-save-a-dataframe-in-markdown/132628)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 12\
**Last updated:** [October 3, 2025, 1:26pm UTC](https://discourse.julialang.org/t/how-to-text-save-a-dataframe-in-markdown/132628 "2025-10-03T13:26:20Z")

</div>

I know about PrettyTables, but how do I save to file, let’s say table\_xy.md, a DataFrame ?

---

## [Overloading anonymous functions](https://discourse.julialang.org/t/overloading-anonymous-functions/132823)

<div class="topic-metadata">

**Author:** [@AntonReinhard](https://discourse.julialang.org/u/AntonReinhard)\
**Replies:** 9\
**Last updated:** [October 3, 2025, 11:32am UTC](https://discourse.julialang.org/t/overloading-anonymous-functions/132823 "2025-10-03T11:32:20Z")

</div>

I was playing around with anonymous functions a bit and found that you can use where clauses with them, if you wrap the header in brackets: julia\> ((x::T) where {T\<:Int}) -\> x #11 (generic function with 1 method) julia\>…

---

## [How to hide the types line when pretty printing a data frame](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 9\
**Last updated:** [October 3, 2025, 11:25am UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393 "2025-10-03T11:25:31Z")

</div>

I’m sure this was mentioned before, I just can’t find it in PrettyTables.jl’s documentation nor here on Discourse. How can I hide the row indicating the columns’ types when printing a DataFrame? julia\> using DataFrames,…

---

## [Structure for Concurrent reads a single thread writing](https://discourse.julialang.org/t/structure-for-concurrent-reads-a-single-thread-writing/132811)

<div class="topic-metadata">

**Author:** [@Card1gan](https://discourse.julialang.org/u/Card1gan)\
**Replies:** 6\
**Last updated:** [October 3, 2025, 12:34am UTC](https://discourse.julialang.org/t/structure-for-concurrent-reads-a-single-thread-writing/132811 "2025-10-03T00:34:38Z")

</div>

Firstly, I am relatively new to julia, but have been enjoying it so far. I am working on a parallel algorithm that requires multiple threads to read while one thread can update the vector, so my plan would be to use eit…

---

## [Nerd-sniping: can you make this faster?](https://discourse.julialang.org/t/nerd-sniping-can-you-make-this-faster/132793)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 38\
**Last updated:** [October 2, 2025, 9:16pm UTC](https://discourse.julialang.org/t/nerd-sniping-can-you-make-this-faster/132793 "2025-10-02T21:16:14Z")

</div>

This is the core function of a module to compute solvent accessible surface areas of molecules. It works fine, but it would benefit of being faster. Without a full reworking of the data structures, etc, performance boil…

---

## [Pkg is not using the latest version of a package in the general registry](https://discourse.julialang.org/t/pkg-is-not-using-the-latest-version-of-a-package-in-the-general-registry/132022)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 6\
**Last updated:** [October 2, 2025, 5:33pm UTC](https://discourse.julialang.org/t/pkg-is-not-using-the-latest-version-of-a-package-in-the-general-registry/132022 "2025-10-02T17:33:42Z")

</div>

Hi! I tagged PrettyTables.jl v3.0.8 three days ago (General/P/PrettyTables/Versions.toml at b6e131502024d4d2f6e6c7d9ab8a808717539321 · JuliaRegistries/General · GitHub) but if you try to install it now, it gets v3.0.7. …

---

## [Julia servers are down again](https://discourse.julialang.org/t/julia-servers-are-down-again/132820)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 1\
**Last updated:** [October 2, 2025, 3:28pm UTC](https://discourse.julialang.org/t/julia-servers-are-down-again/132820 "2025-10-02T15:28:57Z")

</div>

I don’t know what is causing these frequent issues with the servers, but it would be really nice if someone could restart them somehow: Currently unable to bump versions of packages.

---

## [Uninstalling julia completely](https://discourse.julialang.org/t/uninstalling-julia-completely/38493)

<div class="topic-metadata">

**Author:** [@benoitseron](https://discourse.julialang.org/u/benoitseron)\
**Replies:** 9\
**Last updated:** [October 2, 2025, 1:58pm UTC](https://discourse.julialang.org/t/uninstalling-julia-completely/38493 "2025-10-02T13:58:39Z")

</div>

I am trying to uninstall and then reinstall julia entirely as I had issues similar to this one using Atom/Juno. I followed the steps I could find online, as described in the second section here. I also tried to find rel…

---

## [Help to understand the performance gain when using Base.throw\_boundscheck](https://discourse.julialang.org/t/help-to-understand-the-performance-gain-when-using-base-throw-boundscheck/132801)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 13\
**Last updated:** [October 1, 2025, 10:08pm UTC](https://discourse.julialang.org/t/help-to-understand-the-performance-gain-when-using-base-throw-boundscheck/132801 "2025-10-01T22:08:06Z")

</div>

Hi! I want to understand a strange behavior for me. We are building a lower triangular storage for gravity models. If I use the following getindex: function Base.getindex( L::LowerTriangularStorage{T}, i::Int, …

---

## [Solvent Accessible Surface Area](https://discourse.julialang.org/t/solvent-accessible-surface-area/132751)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 2\
**Last updated:** [October 1, 2025, 9:36pm UTC](https://discourse.julialang.org/t/solvent-accessible-surface-area/132751 "2025-10-01T21:36:06Z")

</div>

For anyone that might be interested, we implemented a molecular Solvent Accessible Surface Area calculator in PDBTools.jl: The interface is useful (for us) for allowing extracting contributions to the SASA very easily…

---

## [How many task can you create (related to wold age)?](https://discourse.julialang.org/t/how-many-task-can-you-create-related-to-wold-age/132807)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 1\
**Last updated:** [October 1, 2025, 4:57pm UTC](https://discourse.julialang.org/t/how-many-task-can-you-create-related-to-wold-age/132807 "2025-10-01T16:57:41Z")

</div>

\[Possible should be in internals category?\] I see the world age is increased when I create tasks so I ask, and world age is an UInt i.e. 32-bit on 32-bit platforms. Certain language features capture the current task’s…

---

## [\`mul\_hi\` in Julia?](https://discourse.julialang.org/t/mul-hi-in-julia/14235)

<div class="topic-metadata">

**Author:** [@fjarri](https://discourse.julialang.org/u/fjarri)\
**Replies:** 19\
**Last updated:** [October 1, 2025, 12:05pm UTC](https://discourse.julialang.org/t/mul-hi-in-julia/14235 "2025-10-01T12:05:09Z")

</div>

Is there some way to get the higher bits of the result of multiplying two integers (of the same type) in Julia? Something that’s usually called mul\_hi or mulhi in assembly languages. Of course, one could implement it by …

---

## [Closure: life of the referred-to object?](https://discourse.julialang.org/t/closure-life-of-the-referred-to-object/132689)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 15\
**Last updated:** [October 1, 2025, 8:28am UTC](https://discourse.julialang.org/t/closure-life-of-the-referred-to-object/132689 "2025-10-01T08:28:52Z")

</div>

I’m not sure whether the object created in a function persists (not GC’ed) when it is referred to in a closure: function ref\_i(ref) function inner(i) ref\[i\] \* 10 end return inner end function get\_func(r) a …

---

## [Adding base level when interacting categorical variables](https://discourse.julialang.org/t/adding-base-level-when-interacting-categorical-variables/132796)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 0\
**Last updated:** [September 30, 2025, 11:00pm UTC](https://discourse.julialang.org/t/adding-base-level-when-interacting-categorical-variables/132796 "2025-09-30T23:00:24Z")

</div>

High level problem: reg from FixedEffectModels seem to ignore contrasts for a categorical variable if I interact this variable with another one. MWE df = DataFrame(y = rand(100), x1 = categorical(rand(1:3, 100)), x2 =…

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

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