# General Usage

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

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

**Page:** 35

---

## [Completely vertical polygons not showing with GLMakie poly!()](https://discourse.julialang.org/t/completely-vertical-polygons-not-showing-with-glmakie-poly/133350)

<div class="topic-metadata">

**Author:** [@Michael\_Wang](https://discourse.julialang.org/u/Michael_Wang)\
**Replies:** 1\
**Last updated:** [October 22, 2025, 1:18am UTC](https://discourse.julialang.org/t/completely-vertical-polygons-not-showing-with-glmakie-poly/133350 "2025-10-22T01:18:27Z")

</div>

I’m trying to plot some polygons in 3D space with GLMakie and noticed that polygons that are complete vertical do not show up. Below is a script that plots a set of triangles where I drag one vertex along a line. Notic…

---

## [Why does sort! allocate inside loops when the input is large?](https://discourse.julialang.org/t/why-does-sort-allocate-inside-loops-when-the-input-is-large/133255)

<div class="topic-metadata">

**Author:** [@HMegh](https://discourse.julialang.org/u/HMegh)\
**Replies:** 6\
**Last updated:** [October 21, 2025, 9:46pm UTC](https://discourse.julialang.org/t/why-does-sort-allocate-inside-loops-when-the-input-is-large/133255 "2025-10-21T21:46:06Z")

</div>

Hi, I have noticed that sort! allocates when called repetitively, but I am not sure why since I did not expect it to allocate: v=rand(1000); @btime sort!(v) # 1.744 μs (0 allocations: 0 bytes) In my code, I need to a…

---

## [Rotating animation of 3D plot changes size as it rotates (GLMakie)](https://discourse.julialang.org/t/rotating-animation-of-3d-plot-changes-size-as-it-rotates-glmakie/133219)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 15\
**Last updated:** [October 21, 2025, 9:05pm UTC](https://discourse.julialang.org/t/rotating-animation-of-3d-plot-changes-size-as-it-rotates-glmakie/133219 "2025-10-21T21:05:24Z")

</div>

I’m animating a rotation of a 3D scatter plot. As the figure rotates, it changes size. This is because the camera distance to the plot changes to keep the field of view “full” as the plot rotates but it also avoids cutti…

---

## [Programmatically defining a global variable in a new module](https://discourse.julialang.org/t/programmatically-defining-a-global-variable-in-a-new-module/133188)

<div class="topic-metadata">

**Author:** [@Marco\_Lombardi](https://discourse.julialang.org/u/Marco_Lombardi)\
**Replies:** 17\
**Last updated:** [October 21, 2025, 5:10pm UTC](https://discourse.julialang.org/t/programmatically-defining-a-global-variable-in-a-new-module/133188 "2025-10-21T17:10:59Z")

</div>

I need to be able to programmatically define a new global variable in a module. Till Julia v1.11 I was able to do this as function define\_global() m = Module(:MyModule) Core.eval(m, :(global data)) setglobal…

---

## [Strange speed gain from eachindex and writing in a useless array?](https://discourse.julialang.org/t/strange-speed-gain-from-eachindex-and-writing-in-a-useless-array/132724)

<div class="topic-metadata">

**Author:** [@nicolas](https://discourse.julialang.org/u/nicolas)\
**Replies:** 13\
**Last updated:** [October 21, 2025, 7:53am UTC](https://discourse.julialang.org/t/strange-speed-gain-from-eachindex-and-writing-in-a-useless-array/132724 "2025-10-21T07:53:33Z")

</div>

This code doesn’t do anything useful, it is just intended as a MWE. my\_func! outputs the sum s in ≈ 120μs on my computer. Strangely, when I uncomment the lines adding to the array useless, it seems to do the same computa…

---

## [CMake configuration for working with juliac-compiled libraries](https://discourse.julialang.org/t/cmake-configuration-for-working-with-juliac-compiled-libraries/133320)

<div class="topic-metadata">

**Author:** [@xlxs4](https://discourse.julialang.org/u/xlxs4)\
**Replies:** 0\
**Last updated:** [October 21, 2025, 7:17am UTC](https://discourse.julialang.org/t/cmake-configuration-for-working-with-juliac-compiled-libraries/133320 "2025-10-21T07:17:06Z")

</div>

Yesterday I gave juliac a spin to compile Julia code to a library I can then use from other languages that are C ABI compatible. I wanted to share what I ended up with. The project structure is very simple. I keep all o…

---

## [What do generated functions actually disallow?](https://discourse.julialang.org/t/what-do-generated-functions-actually-disallow/133294)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 5\
**Last updated:** [October 21, 2025, 6:46am UTC](https://discourse.julialang.org/t/what-do-generated-functions-actually-disallow/133294 "2025-10-21T06:46:12Z")

</div>

The Manual states the following restrictions: Generated functions are only permitted to call functions that were defined before the definition of the generated function. (Failure to follow this may result in getting M…

---

## [Seven Lines of Julia (examples sought)](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 184\
**Last updated:** [October 20, 2025, 3:57pm UTC](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416 "2025-10-20T15:57:51Z")

</div>

I am looking for examples: show me some real computational power in seven or fewer lines of Julia that read clearly. It is ok to be using other packages, though no more than four (and it is ok to use fewer). Each examp…

---

## [\`waitall(tasks)\` doesn't throw as \`foreach(wait, tasks)\` does](https://discourse.julialang.org/t/waitall-tasks-doesnt-throw-as-foreach-wait-tasks-does/133260)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 4\
**Last updated:** [October 20, 2025, 1:42pm UTC](https://discourse.julialang.org/t/waitall-tasks-doesnt-throw-as-foreach-wait-tasks-does/133260 "2025-10-20T13:42:03Z")

</div>

I have a tasks which is a vector of Tasks. If I use foreach(wait, tasks), then it will throw like this (which is expected behavior) julia\> fill\_model\_D\_X!(inn, X) rest = 1, j = 40304412 Warning: 1.760797410756771e9 te…

---

## [Type instability with (fairly) simple Tuples](https://discourse.julialang.org/t/type-instability-with-fairly-simple-tuples/133304)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 7\
**Last updated:** [October 20, 2025, 12:25pm UTC](https://discourse.julialang.org/t/type-instability-with-fairly-simple-tuples/133304 "2025-10-20T12:25:03Z")

</div>

Should I expect the following to be type-stable? I think the types are inferrable in principle, but maybe the Tuple-of-Pairs structure is just too ‘complicated’? julia\> using Cthulhu julia\> function foo(t::Pair{Symbol,…

---

## [Sun's trajectory around earth](https://discourse.julialang.org/t/suns-trajectory-around-earth/81485)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 19\
**Last updated:** [October 20, 2025, 10:52am UTC](https://discourse.julialang.org/t/suns-trajectory-around-earth/81485 "2025-10-20T10:52:07Z")

</div>

Hi All, My father (82) has decided to put a photovoltaic panels to his flat roof. And since he is a die hard engineer and wants to optimizing everything, he decided that he will allow to change angle of panels, but only…

---

## [MbedTLS error on WSL](https://discourse.julialang.org/t/mbedtls-error-on-wsl/133173)

<div class="topic-metadata">

**Author:** [@sschmidhuber](https://discourse.julialang.org/u/sschmidhuber)\
**Replies:** 3\
**Last updated:** [October 20, 2025, 10:41am UTC](https://discourse.julialang.org/t/mbedtls-error-on-wsl/133173 "2025-10-20T10:41:48Z")

</div>

Hello, I run Julia on Win 11 within WSL2 (Debian), in general without issues so far. But recently I encountered the following issue with MbedTLS, when I attempt to create a SSLConfig. MWE # installing MbedTLS in a cle…

---

## [Using \`...\` syntax and \`--trim\`](https://discourse.julialang.org/t/using-syntax-and-trim/133201)

<div class="topic-metadata">

**Author:** [@apozharski](https://discourse.julialang.org/u/apozharski)\
**Replies:** 4\
**Last updated:** [October 20, 2025, 10:20am UTC](https://discourse.julialang.org/t/using-syntax-and-trim/133201 "2025-10-20T10:20:04Z")

</div>

Hello, I am working on a package for building c interfaces for an NLP solver packages and have run into something of an impasse regarding the --trim functionality and calling functions with keyword arguments which need …

---

## [Standard/common/popular command-line arg parser?](https://discourse.julialang.org/t/standard-common-popular-command-line-arg-parser/133038)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 5\
**Last updated:** [October 20, 2025, 10:09am UTC](https://discourse.julialang.org/t/standard-common-popular-command-line-arg-parser/133038 "2025-10-20T10:09:24Z")

</div>

I used ArgMacros.jl for one of my Julia scripts. But it’s been broken with Julia 1.12.0. The initial bug report was 3 weeks ago (for the pre-release version of 1.12.0). I’m not complaining at all. I just wonder whether …

---

## [Performance drop x10 if \`missing\` used or two values returned from function](https://discourse.julialang.org/t/performance-drop-x10-if-missing-used-or-two-values-returned-from-function/133200)

<div class="topic-metadata">

**Author:** [@Alex1](https://discourse.julialang.org/u/Alex1)\
**Replies:** 13\
**Last updated:** [October 20, 2025, 5:08am UTC](https://discourse.julialang.org/t/performance-drop-x10-if-missing-used-or-two-values-returned-from-function/133200 "2025-10-20T05:08:49Z")

</div>

Hi, while doning GARCH fitting I discovered strange performance drop: Case 1 Returning two values instead of one is x10 times slower 1.5ms vs 23μs. See place marked with CHANGE1. Is that a known issue and should not be …

---

## [Change \`ScopedValue\` default outside of \`with\`](https://discourse.julialang.org/t/change-scopedvalue-default-outside-of-with/130631)

<div class="topic-metadata">

**Author:** [@disberd](https://discourse.julialang.org/u/disberd)\
**Replies:** 6\
**Last updated:** [October 19, 2025, 7:19pm UTC](https://discourse.julialang.org/t/change-scopedvalue-default-outside-of-with/130631 "2025-10-19T19:19:49Z")

</div>

Hi All, I like the recently introduced ScopedValue type, but found myself wanting to be able to change it’s default value persistently outside of ScopedValues.with calls. An example for this is that in GitHub - JuliaPl…

---

## [Links to online help in command line help?](https://discourse.julialang.org/t/links-to-online-help-in-command-line-help/133281)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 8\
**Last updated:** [October 19, 2025, 5:24pm UTC](https://discourse.julialang.org/t/links-to-online-help-in-command-line-help/133281 "2025-10-19T17:24:02Z")

</div>

Sometimes, the doc strings are too short: help?\> import search: import export import\_log isqrt ispow2 isperm insorted Cshort sort hypot import import Foo will load the module or package Foo. Names from the importe…

---

## [Stacked Histogram](https://discourse.julialang.org/t/stacked-histogram/133248)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 6\
**Last updated:** [October 19, 2025, 7:06am UTC](https://discourse.julialang.org/t/stacked-histogram/133248 "2025-10-19T07:06:21Z")

</div>

Is there a way to make a stacked histogram in Makie like Stacked histogram on a log scale — seaborn 0.13.2 documentation? The documentation only has examples about multiple histograms.

---

## [Vectorizing an awkward computation: any Julia magic?](https://discourse.julialang.org/t/vectorizing-an-awkward-computation-any-julia-magic/133212)

<div class="topic-metadata">

**Author:** [@moble](https://discourse.julialang.org/u/moble)\
**Replies:** 6\
**Last updated:** [October 19, 2025, 4:19am UTC](https://discourse.julialang.org/t/vectorizing-an-awkward-computation-any-julia-magic/133212 "2025-10-19T04:19:06Z")

</div>

I’m computing a matrix of values (specifically, a Wigner D matrix for a given ℓ value) via recurrence for a given input value R. The nature of this recurrence makes the memory-access patterns pretty ugly, and there’s re…

---

## [End of line ParseError](https://discourse.julialang.org/t/end-of-line-parseerror/133273)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 4\
**Last updated:** [October 19, 2025, 4:00am UTC](https://discourse.julialang.org/t/end-of-line-parseerror/133273 "2025-10-19T04:00:18Z")

</div>

I find this ParseError on a windows machine, can you reproduce? function add\_circuit\_breaker\_pair\_module!(model, P\_BUS\_1, P\_BUS\_2, p\_ES, G, pLent, pEV\_1, pU\_1, pAC\_1, D\_1, pEV\_2, pU\_2, pAC\_2, D\_2) pBus\_1 =…

---

## [What happened to the downloads counter eu-central after 8 October?](https://discourse.julialang.org/t/what-happened-to-the-downloads-counter-eu-central-after-8-october/133267)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 0\
**Last updated:** [October 18, 2025, 6:48pm UTC](https://discourse.julialang.org/t/what-happened-to-the-downloads-counter-eu-central-after-8-october/133267 "2025-10-18T18:48:57Z")

</div>

Looks like the eu-central downloads counter went crazzy after 8´th October. Just a few examples. PrecompileTools Images PrettyTables StaticArrays

---

## [Type instability seemingly due to redundant inner functions that are never called](https://discourse.julialang.org/t/type-instability-seemingly-due-to-redundant-inner-functions-that-are-never-called/133227)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 5\
**Last updated:** [October 18, 2025, 5:27pm UTC](https://discourse.julialang.org/t/type-instability-seemingly-due-to-redundant-inner-functions-that-are-never-called/133227 "2025-10-18T17:27:26Z")

</div>

I have created an MWE that can readily executed by copy-pasting to the REPL, provided package DispatchDoctor.jl is installed. What follows below is: A variable Z is created in global scope (see end of script below). …

---

## [Strange Quarto output using PrettyTables](https://discourse.julialang.org/t/strange-quarto-output-using-prettytables/133104)

<div class="topic-metadata">

**Author:** [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Replies:** 2\
**Last updated:** [October 18, 2025, 9:37am UTC](https://discourse.julialang.org/t/strange-quarto-output-using-prettytables/133104 "2025-10-18T09:37:23Z")

</div>

I have a relatively simple task I want to achieve: Render a quarto notebook into Markdown, so that I can include it in my docs. I am of course running QuartoNotebookRunner.jl. When I have to work with tables, using Pre…

---

## [Problems when installing Revise.jl in Julia 1.12 on WSL2-Fedora43](https://discourse.julialang.org/t/problems-when-installing-revise-jl-in-julia-1-12-on-wsl2-fedora43/133254)

<div class="topic-metadata">

**Author:** [@rtchoucz](https://discourse.julialang.org/u/rtchoucz)\
**Replies:** 1\
**Last updated:** [October 18, 2025, 6:15am UTC](https://discourse.julialang.org/t/problems-when-installing-revise-jl-in-julia-1-12-on-wsl2-fedora43/133254 "2025-10-18T06:15:52Z")

</div>

---

## [Coloring background planes of 3d plot in Makie](https://discourse.julialang.org/t/coloring-background-planes-of-3d-plot-in-makie/133247)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 3\
**Last updated:** [October 17, 2025, 10:46pm UTC](https://discourse.julialang.org/t/coloring-background-planes-of-3d-plot-in-makie/133247 "2025-10-17T22:46:50Z")

</div>

I’m making a 3d plot, like the one shown below, but I can’t figure out how to color the background planes (or the “axis planes”, not sure what to call them). Changing the Figure() background colors the entire scene’s bac…

---

## [How to change struct without julia restart?](https://discourse.julialang.org/t/how-to-change-struct-without-julia-restart/133242)

<div class="topic-metadata">

**Author:** [@Alex1](https://discourse.julialang.org/u/Alex1)\
**Replies:** 2\
**Last updated:** [October 17, 2025, 2:54pm UTC](https://discourse.julialang.org/t/how-to-change-struct-without-julia-restart/133242 "2025-10-17T14:54:00Z")

</div>

I use named tuples, the problem - it’s hard to make code typed properly and it’s slow. Working with struct requires julia restart, so also not an option. Is there a way to somehow update struct without restarting julia…

---

## [@snoop\_inference taking a very long time?](https://discourse.julialang.org/t/snoop-inference-taking-a-very-long-time/133233)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 2\
**Last updated:** [October 17, 2025, 2:03pm UTC](https://discourse.julialang.org/t/snoop-inference-taking-a-very-long-time/133233 "2025-10-17T14:03:51Z")

</div>

Running @snoop\_inference on a function from my package is taking a very long time - it’s been running for an hour since the function finished executing and hasn’t returned yet. Is this a known issue in any cases? Any sug…

---

## [Recommendations for larger than memory data](https://discourse.julialang.org/t/recommendations-for-larger-than-memory-data/129015)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 5\
**Last updated:** [October 17, 2025, 12:08pm UTC](https://discourse.julialang.org/t/recommendations-for-larger-than-memory-data/129015 "2025-10-17T12:08:24Z")

</div>

I’m starting to work with a large dataset that does not fit into memory. The data is approximately 5000 samples, 1 million features, and two time points. The features are continuous values that range from 0 to 1. I’m try…

---

## [The separate function in combination with BigFloat?](https://discourse.julialang.org/t/the-separate-function-in-combination-with-bigfloat/133226)

<div class="topic-metadata">

**Author:** [@lihui3060796568](https://discourse.julialang.org/u/lihui3060796568)\
**Replies:** 0\
**Last updated:** [October 17, 2025, 5:50am UTC](https://discourse.julialang.org/t/the-separate-function-in-combination-with-bigfloat/133226 "2025-10-17T05:50:52Z")

</div>

In the IntervalConstrainedProgramming package (Version 0.14.0) for Julia 1.11.6, how can I use the separate function in combination with BigFloat? Specifically, I want every step of iteration, calculation, and optimizati…

---

## [ConcurrencyViolationError in precompiling JLD2 on Julia 1.12](https://discourse.julialang.org/t/concurrencyviolationerror-in-precompiling-jld2-on-julia-1-12/133080)

<div class="topic-metadata">

**Author:** [@ultradian](https://discourse.julialang.org/u/ultradian)\
**Replies:** 9\
**Last updated:** [October 17, 2025, 2:47am UTC](https://discourse.julialang.org/t/concurrencyviolationerror-in-precompiling-jld2-on-julia-1-12/133080 "2025-10-17T02:47:42Z")

</div>

I just did a new install of Julia 1.12.0 and was adding packages when I got this error: PkgPrecompileError: The following 1 direct dependency failed to precompile: JLD2 rror encountered while load FileIO.File{FileIO.D…

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

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