# General Usage

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

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

**Page:** 249

---

## [Makie.jl Fixed Perspective when Dragging Mesh](https://discourse.julialang.org/t/makie-jl-fixed-perspective-when-dragging-mesh/103835)

<div class="topic-metadata">

**Author:** [@Ian\_L](https://discourse.julialang.org/u/Ian_L)\
**Replies:** 1\
**Last updated:** [September 14, 2023, 7:43am UTC](https://discourse.julialang.org/t/makie-jl-fixed-perspective-when-dragging-mesh/103835 "2023-09-14T07:43:00Z")

</div>

I’m using Makie.jl to generate a simple sphere. By default, the plot looks good but I would prefer if it did not resize as the user rotates the axis around. See the figure below for what I currently have. f = Figure() a…

---

## [Why is static compilation difficult](https://discourse.julialang.org/t/why-is-static-compilation-difficult/103796)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 7\
**Last updated:** [September 14, 2023, 7:12am UTC](https://discourse.julialang.org/t/why-is-static-compilation-difficult/103796 "2023-09-14T07:12:35Z")

</div>

I’d like to understand the static compilation problem better. I know that a lot of folks crave static compilation because they have constraints (embedded etc.), and that it would help to build adoption as a replacement …

---

## [Serialization error when using \`MPI.gather\`](https://discourse.julialang.org/t/serialization-error-when-using-mpi-gather/103802)

<div class="topic-metadata">

**Author:** [@pat-alt](https://discourse.julialang.org/u/pat-alt)\
**Replies:** 5\
**Last updated:** [September 14, 2023, 5:04am UTC](https://discourse.julialang.org/t/serialization-error-when-using-mpi-gather/103802 "2023-09-14T05:04:12Z")

</div>

Hi there, I’ve recently added support for multi-threading to CounterfactualExplanations.jl. This has been my first time using MPI so there are probably many things that can be improved here (any thoughts very much welco…

---

## [Oscar and DynamicaPolynomials: Convert polynomial type for basis of invariant rings](https://discourse.julialang.org/t/oscar-and-dynamicapolynomials-convert-polynomial-type-for-basis-of-invariant-rings/102422)

<div class="topic-metadata">

**Author:** [@ilovemath](https://discourse.julialang.org/u/ilovemath)\
**Replies:** 6\
**Last updated:** [September 14, 2023, 2:57am UTC](https://discourse.julialang.org/t/oscar-and-dynamicapolynomials-convert-polynomial-type-for-basis-of-invariant-rings/102422 "2023-09-14T02:57:48Z")

</div>

I would like to know if there is a way to convert a type nf\_elem to a polynomial. My goal with this code is to find all minimal monomials of degree d that obey a rotational symmetry, so I can directly construct a polyno…

---

## [New Iterator from Nested Iterators](https://discourse.julialang.org/t/new-iterator-from-nested-iterators/103377)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 19\
**Last updated:** [September 14, 2023, 12:51am UTC](https://discourse.julialang.org/t/new-iterator-from-nested-iterators/103377 "2023-09-14T00:51:41Z")

</div>

Is there any shortcut to create a new iterator from existing nested iterators? I know I can manually define a new type, length, iterate, and eltype, but I’m wondering if there’s a more direct way. Below is a MWE of a ge…

---

## [How to speed the function H in this code? (Hausdorff Chirality Measurement)](https://discourse.julialang.org/t/how-to-speed-the-function-h-in-this-code-hausdorff-chirality-measurement/103831)

<div class="topic-metadata">

**Author:** [@Luis\_Manuel\_Espinoza](https://discourse.julialang.org/u/Luis_Manuel_Espinoza)\
**Replies:** 5\
**Last updated:** [September 13, 2023, 9:43pm UTC](https://discourse.julialang.org/t/how-to-speed-the-function-h-in-this-code-hausdorff-chirality-measurement/103831 "2023-09-13T21:43:03Z")

</div>

Luis\_Manuel\_Espinoza 1m I am trying to do the Hausdorff Chirality Measurement from the article by Andrzej B. Buda and Kurt Mislow\* but as I thought it is taking too long because to obtain a reliable value, I need to ta…

---

## [Lifting functions with multiple return values](https://discourse.julialang.org/t/lifting-functions-with-multiple-return-values/103821)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 1\
**Last updated:** [September 13, 2023, 9:33pm UTC](https://discourse.julialang.org/t/lifting-functions-with-multiple-return-values/103821 "2023-09-13T21:33:46Z")

</div>

I want to lift a function with multiple return values such that each return value is an observable. Below is an example which makes an observable pair, instead, as I wish, a pair of observables. julia\> z = Observable(3 …

---

## [Is it possible to solve pdes using neuralpde.jl that involve interpolated function](https://discourse.julialang.org/t/is-it-possible-to-solve-pdes-using-neuralpde-jl-that-involve-interpolated-function/103820)

<div class="topic-metadata">

**Author:** [@Shashank](https://discourse.julialang.org/u/Shashank)\
**Replies:** 6\
**Last updated:** [September 13, 2023, 8:45pm UTC](https://discourse.julialang.org/t/is-it-possible-to-solve-pdes-using-neuralpde-jl-that-involve-interpolated-function/103820 "2023-09-13T20:45:18Z")

</div>

I am trying to solve a differential equation of the form dy(t)/dt = -y(t) f(t), but I do not know the function f(t). I generate f(t) by interpolating values from a data file. In that case, neuralpde.jl fails. Is it possi…

---

## [Log whenever a method is compiled](https://discourse.julialang.org/t/log-whenever-a-method-is-compiled/103823)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 3\
**Last updated:** [September 13, 2023, 7:25pm UTC](https://discourse.julialang.org/t/log-whenever-a-method-is-compiled/103823 "2023-09-13T19:25:59Z")

</div>

When I run certain code with @time, it’s showing that most of the time is in compilation. It happens every time even though the code hasn’t changed. Usually, it compiles code the first time, and subsequent runs use that.…

---

## [Poll Memory Utilization](https://discourse.julialang.org/t/poll-memory-utilization/103815)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 3\
**Last updated:** [September 13, 2023, 4:48pm UTC](https://discourse.julialang.org/t/poll-memory-utilization/103815 "2023-09-13T16:48:34Z")

</div>

Is there a way for me to poll system memory utilization? I am working in an AWS container that will crash out if I allocate more than my allotted memory (no swap), so I’m hoping to add some throttles to my pipeline if I …

---

## [Determining source of failure to precompile when using PrecompileTools](https://discourse.julialang.org/t/determining-source-of-failure-to-precompile-when-using-precompiletools/103705)

<div class="topic-metadata">

**Author:** [@pluie](https://discourse.julialang.org/u/pluie)\
**Replies:** 15\
**Last updated:** [September 13, 2023, 4:42pm UTC](https://discourse.julialang.org/t/determining-source-of-failure-to-precompile-when-using-precompiletools/103705 "2023-09-13T16:42:32Z")

</div>

I have a module as defined below. module MyModule using PrecompileTools export TV @compile\_workload begin include("foo.jl") #Defines TV end end When I run using MyModule, I have printouts that indicate that t…

---

## [Why doesn't \`x \< zero(x)\` for an unsigned integer lead to dead-code elimination?](https://discourse.julialang.org/t/why-doesnt-x-zero-x-for-an-unsigned-integer-lead-to-dead-code-elimination/103752)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 7\
**Last updated:** [September 13, 2023, 2:53pm UTC](https://discourse.julialang.org/t/why-doesnt-x-zero-x-for-an-unsigned-integer-lead-to-dead-code-elimination/103752 "2023-09-13T14:53:44Z")

</div>

julia\> isnegative(x) = x \< zero(x) isnegative (generic function with 1 method) julia\> @code\_typed isnegative(UInt(2)) CodeInfo( 1 ─ %1 = Base.ult\_int(x, 0x0000000000000000)::Bool └── return %1 ) =\> Bool I would ha…

---

## [In-place assignment, without allocation](https://discourse.julialang.org/t/in-place-assignment-without-allocation/103811)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 8\
**Last updated:** [September 13, 2023, 1:17pm UTC](https://discourse.julialang.org/t/in-place-assignment-without-allocation/103811 "2023-09-13T13:17:45Z")

</div>

I’m trying to do y = x\[ind\] in-place, where y, x, ind are all vectors. By in-place, I mean no memory is allocated. I’m able to achieve this using a hand-written for loop (assign2! below). I suspect there is a way to achi…

---

## [Argument confusion when calling macro with semicolon parameter syntax](https://discourse.julialang.org/t/argument-confusion-when-calling-macro-with-semicolon-parameter-syntax/103716)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 7\
**Last updated:** [September 13, 2023, 8:04am UTC](https://discourse.julialang.org/t/argument-confusion-when-calling-macro-with-semicolon-parameter-syntax/103716 "2023-09-13T08:04:07Z")

</div>

Applying semicolon parameter syntax generates a surprising order of expressions; parameters go in the first place, followed by the expected order of arguments julia\> macro m1(expressions...) @show expression…

---

## [Outer product & broadcast?](https://discourse.julialang.org/t/outer-product-broadcast/103731)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 8\
**Last updated:** [September 13, 2023, 7:24am UTC](https://discourse.julialang.org/t/outer-product-broadcast/103731 "2023-09-13T07:24:41Z")

</div>

I often need gridded versions of continuous functions. For a function with one argument, the usual broad cast is the most elegant way: oned(x) = 2\*x # 1D func xs = 0.0:1.0:10.0 # x grid oned\_gridded = oned.(xs) This …

---

## [Failed to precompile OMEinsum](https://discourse.julialang.org/t/failed-to-precompile-omeinsum/103728)

<div class="topic-metadata">

**Author:** [@mzd1893](https://discourse.julialang.org/u/mzd1893)\
**Replies:** 5\
**Last updated:** [September 13, 2023, 6:44am UTC](https://discourse.julialang.org/t/failed-to-precompile-omeinsum/103728 "2023-09-13T06:44:16Z")

</div>

There is something wrong when I am using OMEinsum, under Julia version 1.9.2. What’s the reason and how can I fix this? Here are the error report: julia\> using OMEinsum \[ Info: Precompiling OMEinsum \[ebe7aa44-baf0-506c-…

---

## [Most performant way of updating vector values?](https://discourse.julialang.org/t/most-performant-way-of-updating-vector-values/103753)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 9\
**Last updated:** [September 13, 2023, 5:39am UTC](https://discourse.julialang.org/t/most-performant-way-of-updating-vector-values/103753 "2023-09-13T05:39:56Z")

</div>

Several times in my code, I will update the values of a vector. I want to avoid allocations and other stuff, and make it as performant as possible. At the beginning the vector is preallocated with n dummy values, and the…

---

## [FFT convolution heat equation](https://discourse.julialang.org/t/fft-convolution-heat-equation/103681)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 7\
**Last updated:** [September 13, 2023, 5:32am UTC](https://discourse.julialang.org/t/fft-convolution-heat-equation/103681 "2023-09-13T05:32:51Z")

</div>

Hello, I am looking at the heat equation \\partial\_t u(x,t) = \\alpha \\partial^2\_{x} u(x,t) on \\mathbb{R} with initial condition u(x,0) = f(x) The analytical solution is given by u(x,t) = G \\star f, where G(x,t) = \\frac{…

---

## [\`eigen\` does not support keyword argumwnt \`permute\` for BigFloat matrix](https://discourse.julialang.org/t/eigen-does-not-support-keyword-argumwnt-permute-for-bigfloat-matrix/103798)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 4\
**Last updated:** [September 13, 2023, 3:26am UTC](https://discourse.julialang.org/t/eigen-does-not-support-keyword-argumwnt-permute-for-bigfloat-matrix/103798 "2023-09-13T03:26:43Z")

</div>

MWE: julia\> using LinearAlgebra julia\> m = rand(3,3) .|\> big |\> Hermitian; julia\> using GenericLinearAlgebra julia\> eigen(m); julia\> eigen(m, permute=false); ERROR: MethodError: no method matching eigen(::Hermitian{…

---

## [Julians, are you interested in making a StarCraft 2 bot in Julia?](https://discourse.julialang.org/t/julians-are-you-interested-in-making-a-starcraft-2-bot-in-julia/103767)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 3\
**Last updated:** [September 12, 2023, 11:15pm UTC](https://discourse.julialang.org/t/julians-are-you-interested-in-making-a-starcraft-2-bot-in-julia/103767 "2023-09-12T23:15:05Z")

</div>

Making a Starcraft 2 bot in Julia requires an API to interface with the game. APIs already exist in multiple languages, but there currently is no Julia API. Would anyone in the Julia community be interested in developing…

---

## [Suggestion on what Julia version to install in my class](https://discourse.julialang.org/t/suggestion-on-what-julia-version-to-install-in-my-class/103788)

<div class="topic-metadata">

**Author:** [@Andrea\_Pagnani](https://discourse.julialang.org/u/Andrea_Pagnani)\
**Replies:** 1\
**Last updated:** [September 12, 2023, 4:04pm UTC](https://discourse.julialang.org/t/suggestion-on-what-julia-version-to-install-in-my-class/103788 "2023-09-12T16:04:06Z")

</div>

Hi there My Julia class on stochastic simulation methods (~ 50 students) is going to start the first weekend of October. As usual to minimize the noise I force everyone to install the same Julia version. Do you think th…

---

## [Parameter distribution instead of range in GlobalSensitivity.jl](https://discourse.julialang.org/t/parameter-distribution-instead-of-range-in-globalsensitivity-jl/103755)

<div class="topic-metadata">

**Author:** [@ANasc](https://discourse.julialang.org/u/ANasc)\
**Replies:** 2\
**Last updated:** [September 12, 2023, 4:00pm UTC](https://discourse.julialang.org/t/parameter-distribution-instead-of-range-in-globalsensitivity-jl/103755 "2023-09-12T16:00:20Z")

</div>

I want to use the eFast method in GlobalSensitivity.jl but where parameters are input as distributions rather than ranges (param\_range asks for a vector of tuples). For example, I’d like to specify that a parameter be sa…

---

## [CairoMakie Text Box](https://discourse.julialang.org/t/cairomakie-text-box/103783)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 7\
**Last updated:** [September 12, 2023, 3:57pm UTC](https://discourse.julialang.org/t/cairomakie-text-box/103783 "2023-09-12T15:57:31Z")

</div>

Hello, I could use some advice on how to achieve the following. I am generating a large number of simulation results and I’d like to put somewhere on the plot the parameters for each run. These do not need to be public…

---

## [Why is 'interactive\_trajectory()' in 'DynamicalSystems.jl' package giving an error?](https://discourse.julialang.org/t/why-is-interactive-trajectory-in-dynamicalsystems-jl-package-giving-an-error/103778)

<div class="topic-metadata">

**Author:** [@Ashu](https://discourse.julialang.org/u/Ashu)\
**Replies:** 5\
**Last updated:** [September 12, 2023, 11:39am UTC](https://discourse.julialang.org/t/why-is-interactive-trajectory-in-dynamicalsystems-jl-package-giving-an-error/103778 "2023-09-12T11:39:36Z")

</div>

Hello, The below given code was working few days back but now it is giving an error UndefVarError: \`interactive\_trajectory\` not defined. using DynamicalSystems using OrdinaryDiffEq using GLMakie function lorenz\_rule!(…

---

## [Julia killed with Out of memory error on Linux -- runs fine on MacOS](https://discourse.julialang.org/t/julia-killed-with-out-of-memory-error-on-linux-runs-fine-on-macos/102193)

<div class="topic-metadata">

**Author:** [@nbrantut](https://discourse.julialang.org/u/nbrantut)\
**Replies:** 8\
**Last updated:** [September 12, 2023, 11:14am UTC](https://discourse.julialang.org/t/julia-killed-with-out-of-memory-error-on-linux-runs-fine-on-macos/102193 "2023-09-12T11:14:08Z")

</div>

I have a piece of code that runs smoothly on MacOS but keeps crashing on my Linux (ubuntu 22) workstation. The code is quite involved and it is hard to write a meaningful minimal working example for it – it goes through…

---

## [Is there a simple way to parallelize or distribute a function call that updates a local variable within a loop?](https://discourse.julialang.org/t/is-there-a-simple-way-to-parallelize-or-distribute-a-function-call-that-updates-a-local-variable-within-a-loop/103776)

<div class="topic-metadata">

**Author:** [@leoflotor](https://discourse.julialang.org/u/leoflotor)\
**Replies:** 1\
**Last updated:** [September 12, 2023, 11:08am UTC](https://discourse.julialang.org/t/is-there-a-simple-way-to-parallelize-or-distribute-a-function-call-that-updates-a-local-variable-within-a-loop/103776 "2023-09-12T11:08:35Z")

</div>

Hi! I am working on implementing the hill-climbing algorithm to solve the one-dimensional bin packing problem but I got to a bottleneck. The function, which I called main for lack of a better name, repeats the same set …

---

## ['ReversePropagation.jl' package](https://discourse.julialang.org/t/reversepropagation-jl-package/103779)

<div class="topic-metadata">

**Author:** [@Ashu](https://discourse.julialang.org/u/Ashu)\
**Replies:** 0\
**Last updated:** [September 12, 2023, 10:11am UTC](https://discourse.julialang.org/t/reversepropagation-jl-package/103779 "2023-09-12T10:11:31Z")

</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 mist…

---

## [Annotated unitful axis in Plots](https://discourse.julialang.org/t/annotated-unitful-axis-in-plots/103732)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 4\
**Last updated:** [September 12, 2023, 8:44am UTC](https://discourse.julialang.org/t/annotated-unitful-axis-in-plots/103732 "2023-09-12T08:44:11Z")

</div>

I’m plotting a function, which accepts a unitful argument. Now, if I want to add an x axis label p = plot!(;xlabel="particle radius") I get an error: ERROR: DimensionError: and μm are not dimensionally compatible. S…

---

## [Running two different versions of Julia simultaneously](https://discourse.julialang.org/t/running-two-different-versions-of-julia-simultaneously/103758)

<div class="topic-metadata">

**Author:** [@cnf](https://discourse.julialang.org/u/cnf)\
**Replies:** 9\
**Last updated:** [September 12, 2023, 8:39am UTC](https://discourse.julialang.org/t/running-two-different-versions-of-julia-simultaneously/103758 "2023-09-12T08:39:47Z")

</div>

Hi, I am using julia1.5.2 (on a linux machine) and noticed that it creates a directory .julia under my home directory and installs downloaded packages there. I have installed julia1.6.7 in a different directory to j…

---

## [How do libraries compiled by PackageCompiler.jl interact with Preferences.jl?](https://discourse.julialang.org/t/how-do-libraries-compiled-by-packagecompiler-jl-interact-with-preferences-jl/103479)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 4\
**Last updated:** [September 12, 2023, 7:26am UTC](https://discourse.julialang.org/t/how-do-libraries-compiled-by-packagecompiler-jl-interact-with-preferences-jl/103479 "2023-09-12T07:26:58Z")

</div>

How do Preferences.jl work together libraries created by PackageCompiler.jl? For example, where do I have to put the Preferences.jl file such that the choice of system MPI library with MPI.jl is respected while compilin…

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

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