# General Usage

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

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

**Page:** 248

---

## [Benchmarking questions](https://discourse.julialang.org/t/benchmarking-questions/103961)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 3\
**Last updated:** [September 18, 2023, 6:20am UTC](https://discourse.julialang.org/t/benchmarking-questions/103961 "2023-09-18T06:20:08Z")

</div>

Dear all, I was testing some acceleration of for loops (and reducing the allocations), and I made a less complex example for testing: Julia\>julia\> function test\_1(a,b) @views for i in 1:a, j in 1:b …

---

## [Julia package for workflow management](https://discourse.julialang.org/t/julia-package-for-workflow-management/103947)

<div class="topic-metadata">

**Author:** [@berceanu](https://discourse.julialang.org/u/berceanu)\
**Replies:** 5\
**Last updated:** [September 18, 2023, 1:54am UTC](https://discourse.julialang.org/t/julia-package-for-workflow-management/103947 "2023-09-18T01:54:43Z")

</div>

Is there anything in the Julia ecosystem similar to GitHub - Libensemble/libensemble: A Python toolkit for coordinating asynchronous and dynamic ensembles of calculations. ?

---

## [Questions about macro interpolation inside @generated](https://discourse.julialang.org/t/questions-about-macro-interpolation-inside-generated/103922)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 12\
**Last updated:** [September 17, 2023, 10:38pm UTC](https://discourse.julialang.org/t/questions-about-macro-interpolation-inside-generated/103922 "2023-09-17T22:38:26Z")

</div>

I would like to have a macro @m f g that produces @generated function f(x) quote g(x) end end where f and g are the macro parameters. This has essentially been discussed in @simeonschaub’s solution, adapted to my …

---

## [Non-code analysis documentation - TOML, YAML, something else?](https://discourse.julialang.org/t/non-code-analysis-documentation-toml-yaml-something-else/103918)

<div class="topic-metadata">

**Author:** [@mkoculak](https://discourse.julialang.org/u/mkoculak)\
**Replies:** 6\
**Last updated:** [September 17, 2023, 6:49pm UTC](https://discourse.julialang.org/t/non-code-analysis-documentation-toml-yaml-something-else/103918 "2023-09-17T18:49:00Z")

</div>

I am toying with an idea of having something like config files / pipeline documention in a form of human readable and writable format. It would be best to be language agnostic, so I can later write e.g. a parser in pytho…

---

## [Sorting a matrix according to a matrix of column-wise sorted indices](https://discourse.julialang.org/t/sorting-a-matrix-according-to-a-matrix-of-column-wise-sorted-indices/103944)

<div class="topic-metadata">

**Author:** [@kingoslo](https://discourse.julialang.org/u/kingoslo)\
**Replies:** 6\
**Last updated:** [September 17, 2023, 9:26pm UTC](https://discourse.julialang.org/t/sorting-a-matrix-according-to-a-matrix-of-column-wise-sorted-indices/103944 "2023-09-17T21:26:17Z")

</div>

I have a matrix that looks like this: A = rand( 40000000,30000000) I have already used measurable computational power to find the indices that will sort it column-wise: idx = mapslices(sortperm, A, dims=1) Now I want…

---

## [Problems using GLMakie on Windows 11](https://discourse.julialang.org/t/problems-using-glmakie-on-windows-11/103955)

<div class="topic-metadata">

**Author:** [@Luis\_Manuel\_Espinoza](https://discourse.julialang.org/u/Luis_Manuel_Espinoza)\
**Replies:** 4\
**Last updated:** [September 17, 2023, 7:37pm UTC](https://discourse.julialang.org/t/problems-using-glmakie-on-windows-11/103955 "2023-09-17T19:37:27Z")

</div>

I am currently developing various graphics using GLmakie on a desktop computer with Windows 10, I have had no problems using it but when I try to run my graphics on a laptop with Windows 11 it gives me the following, I a…

---

## [Problem with the scaling of the plot axes in GLMakie](https://discourse.julialang.org/t/problem-with-the-scaling-of-the-plot-axes-in-glmakie/103937)

<div class="topic-metadata">

**Author:** [@Luis\_Manuel\_Espinoza](https://discourse.julialang.org/u/Luis_Manuel_Espinoza)\
**Replies:** 2\
**Last updated:** [September 17, 2023, 6:10pm UTC](https://discourse.julialang.org/t/problem-with-the-scaling-of-the-plot-axes-in-glmakie/103937 "2023-09-17T18:10:02Z")

</div>

I am trying to make a plot in GLMakie but when I try, the “y” axis does not scale correctly and then I only get a straight line when it is not what I want, the Plots package does not have this problem but I am learning t…

---

## [Batched probability distribution specification in Turing similar to Tensorflow Probability](https://discourse.julialang.org/t/batched-probability-distribution-specification-in-turing-similar-to-tensorflow-probability/103953)

<div class="topic-metadata">

**Author:** [@gsood-gaurav](https://discourse.julialang.org/u/gsood-gaurav)\
**Replies:** 0\
**Last updated:** [September 17, 2023, 4:18pm UTC](https://discourse.julialang.org/t/batched-probability-distribution-specification-in-turing-similar-to-tensorflow-probability/103953 "2023-09-17T16:18:38Z")

</div>

In tensorflow probability there is this idea of batch\_shape and event\_shape while declaring a set of distribtuions. What is the equivalent of it in Turing.jl + Distributions.jl For instance if I want to declare a batch …

---

## [Can expressions containing syntax errors be used in macro calls?](https://discourse.julialang.org/t/can-expressions-containing-syntax-errors-be-used-in-macro-calls/103949)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 2\
**Last updated:** [September 17, 2023, 1:57pm UTC](https://discourse.julialang.org/t/can-expressions-containing-syntax-errors-be-used-in-macro-calls/103949 "2023-09-17T13:57:59Z")

</div>

I’d like to use an expression like this one in a macro call struct A(B) x::Int end which gives a syntax error when called without the macro wrap: julia\> struct A(B) x::Int end ERROR: syntax: inva…

---

## [Synchronizing Colors for Functions and Derivatives in Julia Plots using RecipesBase.jl](https://discourse.julialang.org/t/synchronizing-colors-for-functions-and-derivatives-in-julia-plots-using-recipesbase-jl/103939)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 0\
**Last updated:** [September 17, 2023, 1:44am UTC](https://discourse.julialang.org/t/synchronizing-colors-for-functions-and-derivatives-in-julia-plots-using-recipesbase-jl/103939 "2023-09-17T01:44:11Z")

</div>

I’m working with Julia and the Plots.jl package to create subplots of functions and their derivatives, and I want to synchronize the colors between corresponding functions and their derivatives using RecipesBase.jl . Her…

---

## [Does Julia have anything like Measurements.jl for multivariate error propagation?](https://discourse.julialang.org/t/does-julia-have-anything-like-measurements-jl-for-multivariate-error-propagation/103879)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 8\
**Last updated:** [September 16, 2023, 12:09pm UTC](https://discourse.julialang.org/t/does-julia-have-anything-like-measurements-jl-for-multivariate-error-propagation/103879 "2023-09-16T12:09:54Z")

</div>

Say I have two variables a and b and I know the full 2x2 covariance between them. Is there a Julia package to conveniently propagate Gaussian uncertainy through arbitrary functions of them in the same way that Measuremen…

---

## [Display image as Array{UInt8, 4}: in julia](https://discourse.julialang.org/t/display-image-as-array-uint8-4-in-julia/103924)

<div class="topic-metadata">

**Author:** [@hungpham3112](https://discourse.julialang.org/u/hungpham3112)\
**Replies:** 3\
**Last updated:** [September 16, 2023, 11:03am UTC](https://discourse.julialang.org/t/display-image-as-array-uint8-4-in-julia/103924 "2023-09-16T11:03:25Z")

</div>

I load the dataset from h5 file with HDF5.jl to work with binary classifying problems with neural networks I want to display an image from train\_set\_x 3×64×64×209 Array{UInt8, 4}: Element type of this array is UInt…

---

## [How to use \`@generated\` to eliminate a for loop?](https://discourse.julialang.org/t/how-to-use-generated-to-eliminate-a-for-loop/103915)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 4\
**Last updated:** [September 16, 2023, 1:56am UTC](https://discourse.julialang.org/t/how-to-use-generated-to-eliminate-a-for-loop/103915 "2023-09-16T01:56:51Z")

</div>

As the title implies, I have some code that either requires hard coding a certain number of operations, or using a for loop to cycle through one of the indices. Performance-wise I have found that hard coding the operatio…

---

## [Preallocate u and du in DifferentialEquations.jl](https://discourse.julialang.org/t/preallocate-u-and-du-in-differentialequations-jl/103911)

<div class="topic-metadata">

**Author:** [@Dom](https://discourse.julialang.org/u/Dom)\
**Replies:** 8\
**Last updated:** [September 15, 2023, 7:19pm UTC](https://discourse.julialang.org/t/preallocate-u-and-du-in-differentialequations-jl/103911 "2023-09-15T19:19:29Z")

</div>

Hi all, we are currently writing a simulation engine which is a massive ODE with \>\>100k elements and therefore need to be very memory conscious. We need to pre-allocate the u and du vectors and have DifferentialEquatio…

---

## [Question mark sign in Julia Package status](https://discourse.julialang.org/t/question-mark-sign-in-julia-package-status/25798)

<div class="topic-metadata">

**Author:** [@abx](https://discourse.julialang.org/u/abx)\
**Replies:** 8\
**Last updated:** [September 15, 2023, 5:26pm UTC](https://discourse.julialang.org/t/question-mark-sign-in-julia-package-status/25798 "2023-09-15T17:26:08Z")

</div>

Hello, when I check the status of Packages in Julia I see this A few packages are marked with a strange question mark sign. What does it mean and how do I look into it? Thanks

---

## [How to use LoopVectorization.jl?](https://discourse.julialang.org/t/how-to-use-loopvectorization-jl/103858)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 7\
**Last updated:** [September 15, 2023, 3:34pm UTC](https://discourse.julialang.org/t/how-to-use-loopvectorization-jl/103858 "2023-09-15T15:34:05Z")

</div>

I have a question regarding LoopVectorization.jl. I’ve been trying to integrate it into my project but am stuck with some errors. Here is a MWE that reproduces it: function F!(xllp ::Vector{Vector{Int}}, xllw ::Vector{V…

---

## [Autocompletion failed in jupyter lab](https://discourse.julialang.org/t/autocompletion-failed-in-jupyter-lab/103839)

<div class="topic-metadata">

**Author:** [@y-iizawa](https://discourse.julialang.org/u/y-iizawa)\
**Replies:** 1\
**Last updated:** [September 15, 2023, 2:59pm UTC](https://discourse.julialang.org/t/autocompletion-failed-in-jupyter-lab/103839 "2023-09-15T14:59:35Z")

</div>

When using julia in jupyter lab. the completion function sometimes does not work. For example, when I press the tab key after \\pi, it is not converted to the Greek letter π, but to a space. Is there a cause for this? j…

---

## [SQL syntax hightlighting](https://discourse.julialang.org/t/sql-syntax-hightlighting/103845)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 6\
**Last updated:** [September 15, 2023, 1:25pm UTC](https://discourse.julialang.org/t/sql-syntax-hightlighting/103845 "2023-09-15T13:25:15Z")

</div>

This provides syntax highlighting and auto-completion of SQL in VS Code. Would it be possible to have a section in a .jl file that VS Code treats as SQL (for syntax highlight and autocompletion) ? Then convert the r…

---

## [Temporarily inject development dependencies into package](https://discourse.julialang.org/t/temporarily-inject-development-dependencies-into-package/103838)

<div class="topic-metadata">

**Author:** [@frankier](https://discourse.julialang.org/u/frankier)\
**Replies:** 10\
**Last updated:** [September 15, 2023, 11:27am UTC](https://discourse.julialang.org/t/temporarily-inject-development-dependencies-into-package/103838 "2023-09-15T11:27:39Z")

</div>

Typically for development packages, including the defaults such as InteractiveUtils, we install them into the global environment, and are able to access them from the REPL, no matter what project we are in. Sometimes rat…

---

## [How to halt Julia mid execution?](https://discourse.julialang.org/t/how-to-halt-julia-mid-execution/103874)

<div class="topic-metadata">

**Author:** [@MaxM](https://discourse.julialang.org/u/MaxM)\
**Replies:** 0\
**Last updated:** [September 15, 2023, 3:09am UTC](https://discourse.julialang.org/t/how-to-halt-julia-mid-execution/103874 "2023-09-15T03:09:47Z")

</div>

I’m running Julia in Jupyter Notebook. My program was recording a large amount of data that I wanted to keep in a large array final\_ans. It was about 60% done and I just wanted to give up and save what I had so far. I wa…

---

## [LazyArtifacts and offline environments](https://discourse.julialang.org/t/lazyartifacts-and-offline-environments/103866)

<div class="topic-metadata">

**Author:** [@miguelbiron](https://discourse.julialang.org/u/miguelbiron)\
**Replies:** 0\
**Last updated:** [September 14, 2023, 11:37pm UTC](https://discourse.julialang.org/t/lazyartifacts-and-offline-environments/103866 "2023-09-14T23:37:51Z")

</div>

I’m running Julia on my uni’s cluster, where – except for the login node – there is no internet access. I have a script that sets up a Julia environment with all the necessary deps, and calls Pkg.instantiate() and Pkg.pr…

---

## [AutoForwardDiff() Error no method matching](https://discourse.julialang.org/t/autoforwarddiff-error-no-method-matching/103854)

<div class="topic-metadata">

**Author:** [@Francesco\_C](https://discourse.julialang.org/u/Francesco_C)\
**Replies:** 10\
**Last updated:** [September 14, 2023, 10:00pm UTC](https://discourse.julialang.org/t/autoforwarddiff-error-no-method-matching/103854 "2023-09-14T22:00:01Z")

</div>

Hi, I am trying to replicate the main examples for the Optimization package https://docs.sciml.ai/Optimization/stable/getting\_started/ However, when I try using the automatic differentiation Optimization.AutoForwardDif…

---

## [Print variable value in plot title with custom precision after decimal point (Plots.jl)](https://discourse.julialang.org/t/print-variable-value-in-plot-title-with-custom-precision-after-decimal-point-plots-jl/103861)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 4\
**Last updated:** [September 14, 2023, 6:50pm UTC](https://discourse.julialang.org/t/print-variable-value-in-plot-title-with-custom-precision-after-decimal-point-plots-jl/103861 "2023-09-14T18:50:21Z")

</div>

Hi all! I’m trying to print variable values in the title of a plot using: title = L"\\eta\_1 = %$(mean(df\_b.η))" But the result shows many numbers after the decimal point which takes the whole line of the title. How can…

---

## [JSServe Slider to Vary Number of Points](https://discourse.julialang.org/t/jsserve-slider-to-vary-number-of-points/103859)

<div class="topic-metadata">

**Author:** [@Ian\_L](https://discourse.julialang.org/u/Ian_L)\
**Replies:** 0\
**Last updated:** [September 14, 2023, 4:57pm UTC](https://discourse.julialang.org/t/jsserve-slider-to-vary-number-of-points/103859 "2023-09-14T16:57:49Z")

</div>

Hi. I’m working with Makie and Pluto. To demonstrate how a plot varies as a parameter is changed, I originally used Pluto’s Slider to modify the parameter. This was fine but wasn’t snappy as Pluto generated each plot fro…

---

## [ImpedanceFitter](https://discourse.julialang.org/t/impedancefitter/90103)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 1\
**Last updated:** [September 14, 2023, 1:42pm UTC](https://discourse.julialang.org/t/impedancefitter/90103 "2023-09-14T13:42:07Z")

</div>

I have the impression that currently only one Julia package exists for the purpose of equivalent-circuit fitting, which is: EquivalentCircuits And there some around in the Python world. One of them is impedancefitter. …

---

## [Julia just... vanished in the middle of the night during a large task. Help troubleshooting/optimising would be appreciated](https://discourse.julialang.org/t/julia-just-vanished-in-the-middle-of-the-night-during-a-large-task-help-troubleshooting-optimising-would-be-appreciated/103834)

<div class="topic-metadata">

**Author:** [@MaxM](https://discourse.julialang.org/u/MaxM)\
**Replies:** 15\
**Last updated:** [September 14, 2023, 1:07pm UTC](https://discourse.julialang.org/t/julia-just-vanished-in-the-middle-of-the-night-during-a-large-task-help-troubleshooting-optimising-would-be-appreciated/103834 "2023-09-14T13:07:21Z")

</div>

I have quite a large task to run and in doing so I’ve encountered unfortunate issues. Below there are two blocks of code, one with a bunch of for loops (attempt 1), the other using functions (attempt 2). I’m running thes…

---

## [Bounds are not contracting using 'ReversePropagation.jl'](https://discourse.julialang.org/t/bounds-are-not-contracting-using-reversepropagation-jl/103846)

<div class="topic-metadata">

**Author:** [@Ashu](https://discourse.julialang.org/u/Ashu)\
**Replies:** 0\
**Last updated:** [September 14, 2023, 11:29am UTC](https://discourse.julialang.org/t/bounds-are-not-contracting-using-reversepropagation-jl/103846 "2023-09-14T11:29:40Z")

</div>

Hello, I am trying to run an example code given for illustrating the working of ReversePropagation.jl. But it is neither working in Pluto.jl notebook nor in VSCode. Could anyone please check if I am making any mistakes?…

---

## [Creating app with PackageCompiler.jl --\> how to include R dependency?](https://discourse.julialang.org/t/creating-app-with-packagecompiler-jl-how-to-include-r-dependency/103167)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 7\
**Last updated:** [September 14, 2023, 10:32am UTC](https://discourse.julialang.org/t/creating-app-with-packagecompiler-jl-how-to-include-r-dependency/103167 "2023-09-14T10:32:00Z")

</div>

I’m trying to create an app using PackageCompiler.jl, but my app depends on an R package, where I pass variables between Julia and R using RCall.jl. To create this app, I tried a minimal example that just puts some stri…

---

## [How to Make Tuple of Tuple generation Type Stable](https://discourse.julialang.org/t/how-to-make-tuple-of-tuple-generation-type-stable/103842)

<div class="topic-metadata">

**Author:** [@AlexanderNenninger](https://discourse.julialang.org/u/AlexanderNenninger)\
**Replies:** 1\
**Last updated:** [September 14, 2023, 10:33am UTC](https://discourse.julialang.org/t/how-to-make-tuple-of-tuple-generation-type-stable/103842 "2023-09-14T10:33:24Z")

</div>

I have code that needs to generate lists of indices. Cutting away all the fuzz, it boils down to using JET function foobar(K::Int, t::NTuple{N,T}) where {N,T} return \[t\[1:K\]\] end function foo(::Val{N}, k::Int) whe…

---

## [Reduce GC time](https://discourse.julialang.org/t/reduce-gc-time/103736)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 7\
**Last updated:** [September 14, 2023, 10:28am UTC](https://discourse.julialang.org/t/reduce-gc-time/103736 "2023-09-14T10:28:23Z")

</div>

Hello :grin:, I tried to optimize my code to reduce GC time. Among other things, I tried to implement “in place” operations, in particular with a long GC function “is\_intersect!”, which checks whether a given interval i…

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

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