# General Usage

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

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

**Page:** 32

---

## [Figure dashboard with Bonito and WGLMakie](https://discourse.julialang.org/t/figure-dashboard-with-bonito-and-wglmakie/133387)

<div class="topic-metadata">

**Author:** [@gdestouet](https://discourse.julialang.org/u/gdestouet)\
**Replies:** 4\
**Last updated:** [November 5, 2025, 1:37pm UTC](https://discourse.julialang.org/t/figure-dashboard-with-bonito-and-wglmakie/133387 "2025-11-05T13:37:56Z")

</div>

Hello everyone, I am currently trying to set up a dashboard of figures using the following code using Bonito using WGLMakie all\_figs = Dict() function newfig(title) fig = Figure() if title in keys(all\_figs) all…

---

## [Assignment and named tuples](https://discourse.julialang.org/t/assignment-and-named-tuples/133674)

<div class="topic-metadata">

**Author:** [@rokke](https://discourse.julialang.org/u/rokke)\
**Replies:** 5\
**Last updated:** [November 5, 2025, 12:19pm UTC](https://discourse.julialang.org/t/assignment-and-named-tuples/133674 "2025-11-05T12:19:22Z")

</div>

I love the (a=4) syntax which both assigns a variable and returns its value, for example: vector = \[(a=1+2+3)+4+5, a+4+5\] there is also a very similar syntax used in named tuples, (a=4,) which creates a tuple with a na…

---

## [Dagger.jl mutable data on different workers](https://discourse.julialang.org/t/dagger-jl-mutable-data-on-different-workers/133676)

<div class="topic-metadata">

**Author:** [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Replies:** 0\
**Last updated:** [November 5, 2025, 11:31am UTC](https://discourse.julialang.org/t/dagger-jl-mutable-data-on-different-workers/133676 "2025-11-05T11:31:54Z")

</div>

Hello people, I am new to Dagger and I have a beginner question. I am planning to create a bunch (lets say 10) of instances of a problem. Each instance should be allocated on a separate worker - Each instance should f…

---

## [Terminate simulation on event using ModelingToolkit](https://discourse.julialang.org/t/terminate-simulation-on-event-using-modelingtoolkit/133243)

<div class="topic-metadata">

**Author:** [@klinders](https://discourse.julialang.org/u/klinders)\
**Replies:** 4\
**Last updated:** [November 5, 2025, 10:57am UTC](https://discourse.julialang.org/t/terminate-simulation-on-event-using-modelingtoolkit/133243 "2025-11-05T10:57:05Z")

</div>

Hi all, First of all, thank you all for your immense efforts on Julia and ModelingToolkit. I’ve been using it for over 2 years and I keep being impressed with the power and capabilities. I’m trying to terminate an MTK …

---

## [Are rand(Float32) really uniform in \[0,1)?](https://discourse.julialang.org/t/are-rand-float32-really-uniform-in-0-1/133585)

<div class="topic-metadata">

**Author:** [@FattiMei](https://discourse.julialang.org/u/FattiMei)\
**Replies:** 29\
**Last updated:** [November 5, 2025, 9:15am UTC](https://discourse.julialang.org/t/are-rand-float32-really-uniform-in-0-1/133585 "2025-11-05T09:15:18Z")

</div>

Hello, this is my first post. I started tinkering with Julia and I wanted to understand more how random floating point numbers are generated. I will usually call rand(Float32) and be happy. I make the following statemen…

---

## [Column of Pretty Tables tables and a plot to a png file](https://discourse.julialang.org/t/column-of-pretty-tables-tables-and-a-plot-to-a-png-file/133577)

<div class="topic-metadata">

**Author:** [@Arby111](https://discourse.julialang.org/u/Arby111)\
**Replies:** 8\
**Last updated:** [November 4, 2025, 7:04pm UTC](https://discourse.julialang.org/t/column-of-pretty-tables-tables-and-a-plot-to-a-png-file/133577 "2025-11-04T19:04:13Z")

</div>

Hello, Does anyone know how to write a column of, say, three small Pretty Tables tables followed by a plot to a png file with mankie.jl or with some other tool? Thanks

---

## [Can I define a custom IO wrapper type that works with all IO functions like print?](https://discourse.julialang.org/t/can-i-define-a-custom-io-wrapper-type-that-works-with-all-io-functions-like-print/133652)

<div class="topic-metadata">

**Author:** [@BYH-1](https://discourse.julialang.org/u/BYH-1)\
**Replies:** 4\
**Last updated:** [November 4, 2025, 2:29pm UTC](https://discourse.julialang.org/t/can-i-define-a-custom-io-wrapper-type-that-works-with-all-io-functions-like-print/133652 "2025-11-04T14:29:53Z")

</div>

I’d like to define a new type that wraps an existing IO object, for example: struct MyIOWrapper \<: IO inner::IO end Base.write(io::MyIOWrapper, x) = # custom write logic here #Base.unsafe\_write is also define…

---

## [Defining a new function produces a warning in Revise (1.12)](https://discourse.julialang.org/t/defining-a-new-function-produces-a-warning-in-revise-1-12/133635)

<div class="topic-metadata">

**Author:** [@phma](https://discourse.julialang.org/u/phma)\
**Replies:** 1\
**Last updated:** [November 4, 2025, 10:17am UTC](https://discourse.julialang.org/t/defining-a-new-function-produces-a-warning-in-revise-1-12/133635 "2025-11-04T10:17:29Z")

</div>

I recently upgraded from Julia 1.11 to 1.12.1. I’m writing a program and have Revise in startup.jl. I write a new function permcode, export it, and call it to test if it works right. I get this warning: julia\> permcode(…

---

## [An HDR PIxel Type](https://discourse.julialang.org/t/an-hdr-pixel-type/133406)

<div class="topic-metadata">

**Author:** [@rmfritz](https://discourse.julialang.org/u/rmfritz)\
**Replies:** 5\
**Last updated:** [November 4, 2025, 10:11am UTC](https://discourse.julialang.org/t/an-hdr-pixel-type/133406 "2025-11-04T10:11:16Z")

</div>

This is an implementation of a RGB/XYZ pixel format commonly used to store HDR lumiance maps. It falls somewhere between visualization and modeling & simulation in subject area, and so I am posting it here, in the hope o…

---

## [Inferring Parametric Types that aren't the last one](https://discourse.julialang.org/t/inferring-parametric-types-that-arent-the-last-one/133629)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 2\
**Last updated:** [November 4, 2025, 2:04am UTC](https://discourse.julialang.org/t/inferring-parametric-types-that-arent-the-last-one/133629 "2025-11-04T02:04:38Z")

</div>

I apologize in advance for the basic question. I’m trying to write an outer constructor for the following MWE that infers the numeric type T from the arguments. The final constructor fails, because you’re only allowed to…

---

## [Using neovim 0.11 native LSP API to set up julials](https://discourse.julialang.org/t/using-neovim-0-11-native-lsp-api-to-set-up-julials/133632)

<div class="topic-metadata">

**Author:** [@ghost\_nation](https://discourse.julialang.org/u/ghost_nation)\
**Replies:** 0\
**Last updated:** [November 4, 2025, 1:10am UTC](https://discourse.julialang.org/t/using-neovim-0-11-native-lsp-api-to-set-up-julials/133632 "2025-11-04T01:10:51Z")

</div>

Hello all, I am attempting to set up the julials in my neovim configuration but I am not able to access the lsp so far… I have been reading through the julials docs and came across this config: require'lspconfig'.julia…

---

## [Memory kills this code](https://discourse.julialang.org/t/memory-kills-this-code/133583)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 5\
**Last updated:** [November 3, 2025, 9:33pm UTC](https://discourse.julialang.org/t/memory-kills-this-code/133583 "2025-11-03T21:33:45Z")

</div>

This code is giving accurate plot but needs too much memory and is slow. I have been working since few months to get 3D volume plot of this Astrophysical data linked here. You can download this data by clicking on Downlo…

---

## [Is it safe to broadcast \`setindex!\` with views of the same array?](https://discourse.julialang.org/t/is-it-safe-to-broadcast-setindex-with-views-of-the-same-array/133620)

<div class="topic-metadata">

**Author:** [@Sevi](https://discourse.julialang.org/u/Sevi)\
**Replies:** 4\
**Last updated:** [November 3, 2025, 4:53pm UTC](https://discourse.julialang.org/t/is-it-safe-to-broadcast-setindex-with-views-of-the-same-array/133620 "2025-11-03T16:53:25Z")

</div>

I tried to find out looking here and through the documentation, but I couldn’t find a concrete answer so far: Is it safe to re-order array elements in-place using a view into the same array, like so: julia\> A = rand(10…

---

## [How to make the double parallelization in the CMAEvolutionStrategy.jl?](https://discourse.julialang.org/t/how-to-make-the-double-parallelization-in-the-cmaevolutionstrategy-jl/133611)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 5\
**Last updated:** [November 3, 2025, 2:38pm UTC](https://discourse.julialang.org/t/how-to-make-the-double-parallelization-in-the-cmaevolutionstrategy-jl/133611 "2025-11-03T14:38:34Z")

</div>

Hi, I’m wondering whether it’s possible to combine parallelization inside the cost function with the parallel evaluation across the CMA-ES population (CMAEvolutionStrategy.jl). Here’s my situation: I’m optimizing mode…

---

## [How does the j\_xx function generated?](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590)

<div class="topic-metadata">

**Author:** [@envyslee](https://discourse.julialang.org/u/envyslee)\
**Replies:** 7\
**Last updated:** [November 2, 2025, 11:46pm UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590 "2025-11-02T23:46:39Z")

</div>

Julia 1.12.1 LLVM 18.1.0 When I build Julia, it runs command “./julia-debug -O0 -C “native” --output-o path/basecompiler-debug-o.a.tmp --startup-file=no --warn-overwrite=yes -g1 Base\_compiler.jl --buildroot ./ --dataro…

---

## [Makie Poly Tooltips issue](https://discourse.julialang.org/t/makie-poly-tooltips-issue/133606)

<div class="topic-metadata">

**Author:** [@AUK1939](https://discourse.julialang.org/u/AUK1939)\
**Replies:** 2\
**Last updated:** [November 2, 2025, 10:06pm UTC](https://discourse.julialang.org/t/makie-poly-tooltips-issue/133606 "2025-11-02T22:06:49Z")

</div>

I can’t seem to get makie tooltips working for Poly objects. Here is a MWE using GLMakie using GLMakie.Makie.GeometryBasics f = Figure() Axis(f\[1, 1\], aspect = DataAspect()) # shape decomposition with custom tooltip …

---

## [Juliaup likely corrupted, no longer works for 1.12 (only) for me](https://discourse.julialang.org/t/juliaup-likely-corrupted-no-longer-works-for-1-12-only-for-me/133184)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 7\
**Last updated:** [November 2, 2025, 7:54pm UTC](https://discourse.julialang.org/t/juliaup-likely-corrupted-no-longer-works-for-1-12-only-for-me/133184 "2025-11-02T19:54:40Z")

</div>

I had a problem, and now a new one, very likely related. For a while now I’ve gotten (and for RCs, that I could run): $ juliaup default 1.12 Configured the default Julia version to be '1.12'. but it wasn’t working (I …

---

## [How to color points in scatter plot by value?](https://discourse.julialang.org/t/how-to-color-points-in-scatter-plot-by-value/11740)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 23\
**Last updated:** [November 2, 2025, 4:26pm UTC](https://discourse.julialang.org/t/how-to-color-points-in-scatter-plot-by-value/11740 "2025-11-02T16:26:24Z")

</div>

I have a list of 3-dimensional points. I want to plot them in a plane scatter plot (using the first two-dimensions), and then color each point according to the third value. How can I do this?

---

## [Fail to register: "Project file should contain name, uuid and version"](https://discourse.julialang.org/t/fail-to-register-project-file-should-contain-name-uuid-and-version/133587)

<div class="topic-metadata">

**Author:** [@AliceandBob](https://discourse.julialang.org/u/AliceandBob)\
**Replies:** 3\
**Last updated:** [November 2, 2025, 1:53pm UTC](https://discourse.julialang.org/t/fail-to-register-project-file-should-contain-name-uuid-and-version/133587 "2025-11-02T13:53:03Z")

</div>

Error while trying to register: “Project file should contain name, uuid and version” Zou-Bo/MomentumED.jl@18103e1

---

## [JuliaC - Modifying flags passed to julia and cc compiler](https://discourse.julialang.org/t/juliac-modifying-flags-passed-to-julia-and-cc-compiler/133601)

<div class="topic-metadata">

**Author:** [@xlxs4](https://discourse.julialang.org/u/xlxs4)\
**Replies:** 0\
**Last updated:** [November 2, 2025, 9:42am UTC](https://discourse.julialang.org/t/juliac-modifying-flags-passed-to-julia-and-cc-compiler/133601 "2025-11-02T09:42:24Z")

</div>

To modify the flags passed to the julia and cc compiler invocations by JuliaC, I’m using it programmatically. To modify the arguments passed to julia I can use julia\_args. If I use the JuliaC binary (juliac) I can pass a…

---

## [How to set python version in a package wrapped by PythonCall (Solved: operator error)](https://discourse.julialang.org/t/how-to-set-python-version-in-a-package-wrapped-by-pythoncall-solved-operator-error/133598)

<div class="topic-metadata">

**Author:** [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Replies:** 1\
**Last updated:** [November 2, 2025, 8:27am UTC](https://discourse.julialang.org/t/how-to-set-python-version-in-a-package-wrapped-by-pythoncall-solved-operator-error/133598 "2025-11-02T08:27:12Z")

</div>

I am writing a wrapper package using PythonCall and I would like to set the python version to \<= 3.13. I tried to set the version in CondaPkg.toml: \[deps\] python = "\<=3.13" but it doesn’t seem to work (version is still…

---

## [Best way to install and use julia on Nix/NixoS](https://discourse.julialang.org/t/best-way-to-install-and-use-julia-on-nix-nixos/109948)

<div class="topic-metadata">

**Author:** [@Sparsetacus](https://discourse.julialang.org/u/Sparsetacus)\
**Replies:** 18\
**Last updated:** [November 1, 2025, 9:42pm UTC](https://discourse.julialang.org/t/best-way-to-install-and-use-julia-on-nix-nixos/109948 "2025-11-01T21:42:32Z")

</div>

Hi there, I am a julia user new to Nix environment. And I am wondering what is the best way to install julia and use it under this platform. I see 3 ways : using julia package from Nix pkgs; using julia-bin packag…

---

## [Compositional Methods in GeometricIntegrators.jl](https://discourse.julialang.org/t/compositional-methods-in-geometricintegrators-jl/133595)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 0\
**Last updated:** [November 1, 2025, 6:23pm UTC](https://discourse.julialang.org/t/compositional-methods-in-geometricintegrators-jl/133595 "2025-11-01T18:23:05Z")

</div>

How can I use a compositional method, based on the implicit midpoint rule, in GeometricIntegrators.jl? My idea of a compositional method is based on Chapter V.3 Symmetric Composition Methods of Hairer et al.'s Geometric…

---

## [Experiences with small binary compilation? Python wrapper, interface with NumPy?](https://discourse.julialang.org/t/experiences-with-small-binary-compilation-python-wrapper-interface-with-numpy/133578)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 5\
**Last updated:** [November 1, 2025, 3:28pm UTC](https://discourse.julialang.org/t/experiences-with-small-binary-compilation-python-wrapper-interface-with-numpy/133578 "2025-11-01T15:28:12Z")

</div>

This post is asking about the practical status of Julia small binary compilation, particularly for interfacing with Numpy Arrays in Python. Suppose: (1) There is a large model written in python, where data is passed ar…

---

## [JuliaC with --trim=no](https://discourse.julialang.org/t/juliac-with-trim-no/133592)

<div class="topic-metadata">

**Author:** [@jdm204](https://discourse.julialang.org/u/jdm204)\
**Replies:** 2\
**Last updated:** [November 1, 2025, 3:25pm UTC](https://discourse.julialang.org/t/juliac-with-trim-no/133592 "2025-11-01T15:25:01Z")

</div>

Hi, Is JuliaC supposed to work compiling arbitrary code with --trim=no? I’m trying to compile an interactive Makie plot (wouldn’t expect it to work with --trim), so I set --trim=no. I don’t mind a (very) large binary i…

---

## [Test deps with workspaces](https://discourse.julialang.org/t/test-deps-with-workspaces/133591)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 2\
**Last updated:** [November 1, 2025, 3:10pm UTC](https://discourse.julialang.org/t/test-deps-with-workspaces/133591 "2025-11-01T15:10:29Z")

</div>

I have a few questions on the new workflow for test dependencies, which should be enabled in 1.12 thanks to the \[workspace\] section: Does the parent package have to be listed in test/Project.toml now? It didn’t have to…

---

## [Simple Python Program with Juliacall Segfaults](https://discourse.julialang.org/t/simple-python-program-with-juliacall-segfaults/133517)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 4\
**Last updated:** [October 31, 2025, 8:28pm UTC](https://discourse.julialang.org/t/simple-python-program-with-juliacall-segfaults/133517 "2025-10-31T20:28:24Z")

</div>

This simple Python program calling a Julia function crashes sporadically with segfault. # juliacall\_compute\_square.py from juliacall import Main as jl print(f"julia version : {jl.VERSION}") numstring = input("Enter a nu…

---

## [Dynamic include file selection with world age constraints in Julia 1.12 - alternatives to conditional include?](https://discourse.julialang.org/t/dynamic-include-file-selection-with-world-age-constraints-in-julia-1-12-alternatives-to-conditional-include/133581)

<div class="topic-metadata">

**Author:** [@sfuerst](https://discourse.julialang.org/u/sfuerst)\
**Replies:** 3\
**Last updated:** [October 31, 2025, 6:36pm UTC](https://discourse.julialang.org/t/dynamic-include-file-selection-with-world-age-constraints-in-julia-1-12-alternatives-to-conditional-include/133581 "2025-10-31T18:36:03Z")

</div>

Hi everyone, I’m facing a challenge with Julia 1.12’s stricter world age semantics. I have a pattern where I conditionally include different implementation variants based on configuration, but this no longer works in Ju…

---

## [Clearing up common beginner misconceptions](https://discourse.julialang.org/t/clearing-up-common-beginner-misconceptions/133404)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 16\
**Last updated:** [October 31, 2025, 2:23pm UTC](https://discourse.julialang.org/t/clearing-up-common-beginner-misconceptions/133404 "2025-10-31T14:23:31Z")

</div>

To preface, this is just one person’s attempt to help people save some time and engage with a new language with more reasonable expectations, not a standalone or authoritative source of information. I expect learning abo…

---

## [DataAugmentation error with masks](https://discourse.julialang.org/t/dataaugmentation-error-with-masks/133574)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 0\
**Last updated:** [October 31, 2025, 11:31am UTC](https://discourse.julialang.org/t/dataaugmentation-error-with-masks/133574 "2025-10-31T11:31:23Z")

</div>

Cheers, I’m receiving an error when augmenting masks prior to training a model for semantic segmentation. Consider img as RGB image matrix. Consider mask as a matrix with integer elements from 1 to 11. Code is as follow…

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

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