# General Usage

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

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

**Page:** 152

---

## [VS Code GenieBuilder - Genie Tab not appearing](https://discourse.julialang.org/t/vs-code-geniebuilder-genie-tab-not-appearing/116827)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 0\
**Last updated:** [July 9, 2024, 1:52pm UTC](https://discourse.julialang.org/t/vs-code-geniebuilder-genie-tab-not-appearing/116827 "2024-07-09T13:52:45Z")

</div>

I started using GenieBuilder recently (in VSCode). However, sometimes the “Genie Tab” (which usually appears in the bottom left of vs Code) does not pop up. Any idea why this is the case? As you can see from the scree…

---

## [Problem not finding initial step in Bayesian Differential Equations Turing](https://discourse.julialang.org/t/problem-not-finding-initial-step-in-bayesian-differential-equations-turing/116648)

<div class="topic-metadata">

**Author:** [@Marta\_Pardo\_Araujo](https://discourse.julialang.org/u/Marta_Pardo_Araujo)\
**Replies:** 6\
**Last updated:** [July 9, 2024, 1:17pm UTC](https://discourse.julialang.org/t/problem-not-finding-initial-step-in-bayesian-differential-equations-turing/116648 "2024-07-09T13:17:28Z")

</div>

Hi, I am trying to estimate the parameters of a ODE model with N equations. The model’s output are probabilities, ie, a vector of N probabilities each time step. Each coordinate of the vector defines the probability tha…

---

## [Is there a builtin type in julia equivalent to python \`None\`?](https://discourse.julialang.org/t/is-there-a-builtin-type-in-julia-equivalent-to-python-none/116560)

<div class="topic-metadata">

**Author:** [@VinodV](https://discourse.julialang.org/u/VinodV)\
**Replies:** 16\
**Last updated:** [July 9, 2024, 12:54pm UTC](https://discourse.julialang.org/t/is-there-a-builtin-type-in-julia-equivalent-to-python-none/116560 "2024-07-09T12:54:22Z")

</div>

Is there a builtin type in julia equivalent to python None in Julia? \[0, 1, false, 2, "", 3, 'a', 's', 34,\[\],missing\] |\> filter(func) # \[ 1, 2, 3, 'a', 's', 34\] What func could be. Why empty character '' is disallowe…

---

## [A macro for removing calls to Base.convert: @noconvert](https://discourse.julialang.org/t/a-macro-for-removing-calls-to-base-convert-noconvert/116651)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 2\
**Last updated:** [July 9, 2024, 9:41am UTC](https://discourse.julialang.org/t/a-macro-for-removing-calls-to-base-convert-noconvert/116651 "2024-07-09T09:41:13Z")

</div>

From the prior discussion on type annotations I was wondering what a macro that removed all calls to Base.convert would look like. Here’s my prototype via Cassette.jl: using Cassette Cassette.@context NoConvertCtx; Cas…

---

## [Crash: illegal instruction 4, StackOverflowError, or freeze](https://discourse.julialang.org/t/crash-illegal-instruction-4-stackoverflowerror-or-freeze/116754)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 5\
**Last updated:** [July 9, 2024, 4:39am UTC](https://discourse.julialang.org/t/crash-illegal-instruction-4-stackoverflowerror-or-freeze/116754 "2024-07-09T04:39:37Z")

</div>

\[Edit 2: I’ve just posted a small program that reproduces this error in a separate message below.\] Can someone give me advice as to how to proceed when Julia crashes? At first, I got the following error \[8865\] signal…

---

## [How to animate multiple stochastic processes with GLMakie](https://discourse.julialang.org/t/how-to-animate-multiple-stochastic-processes-with-glmakie/116718)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [July 8, 2024, 10:16pm UTC](https://discourse.julialang.org/t/how-to-animate-multiple-stochastic-processes-with-glmakie/116718 "2024-07-08T22:16:56Z")

</div>

I would like to animate a stochastic process with GLMakie. I have two related questions. First, in the code below, how do I fix the conversion error? Second, how can I programatically generate lines based on the number o…

---

## [Looping through NamedTuple is slow](https://discourse.julialang.org/t/looping-through-namedtuple-is-slow/116745)

<div class="topic-metadata">

**Author:** [@z-wang](https://discourse.julialang.org/u/z-wang)\
**Replies:** 7\
**Last updated:** [July 8, 2024, 8:47pm UTC](https://discourse.julialang.org/t/looping-through-namedtuple-is-slow/116745 "2024-07-08T20:47:54Z")

</div>

Hi, i was comparing the performance between NamedTuple and Dict, and the results are very confusing. In the following code, if the elements inside containers are accessed through a loop, the performance of NamedTuple is…

---

## [Memory Allocation when using mul! with sparse arrays and views](https://discourse.julialang.org/t/memory-allocation-when-using-mul-with-sparse-arrays-and-views/111276)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 4\
**Last updated:** [July 8, 2024, 6:30pm UTC](https://discourse.julialang.org/t/memory-allocation-when-using-mul-with-sparse-arrays-and-views/111276 "2024-07-08T18:30:07Z")

</div>

I am writing code which performs a five argument mul! operation (from LinearAlgebra) inside a for loop where performance is critical. When using a sparse array instead of a matrix, the operation allocates memory: julia\>…

---

## [Julia on Copilot+ PCs?](https://discourse.julialang.org/t/julia-on-copilot-pcs/116772)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [July 8, 2024, 5:11pm UTC](https://discourse.julialang.org/t/julia-on-copilot-pcs/116772 "2024-07-08T17:11:03Z")

</div>

Microsoft has defined CoPilot+ PCs as PCs with NPUs that offer a minimum of 40 TOPS (Apple has similar plans, I think). I’m not the kind of guy who tends to socialize with a machine, so I’m interested if this can be util…

---

## [What's the best practice to dev a package with pluto and Revise when i need to change struct very often?](https://discourse.julialang.org/t/whats-the-best-practice-to-dev-a-package-with-pluto-and-revise-when-i-need-to-change-struct-very-often/58814)

<div class="topic-metadata">

**Author:** [@ChunXi\_Zhang](https://discourse.julialang.org/u/ChunXi_Zhang)\
**Replies:** 14\
**Last updated:** [July 8, 2024, 4:29pm UTC](https://discourse.julialang.org/t/whats-the-best-practice-to-dev-a-package-with-pluto-and-revise-when-i-need-to-change-struct-very-often/58814 "2024-07-08T16:29:53Z")

</div>

The main issue is i need to change the definition of struct very frequently when developing my package, but revise cannot deal with that, which is a known limitation of Revise.jl. So everytime I changed something with m…

---

## [Segmentation Fault with FFTW plans and multi-threading](https://discourse.julialang.org/t/segmentation-fault-with-fftw-plans-and-multi-threading/116777)

<div class="topic-metadata">

**Author:** [@leonardromano](https://discourse.julialang.org/u/leonardromano)\
**Replies:** 1\
**Last updated:** [July 8, 2024, 3:47pm UTC](https://discourse.julialang.org/t/segmentation-fault-with-fftw-plans-and-multi-threading/116777 "2024-07-08T15:47:14Z")

</div>

I am trying to optimize a routine that performs FFTs on timeseries of various 3D boxes with fixed but different sizes (typically 256 - 512 cells per dimension). For each box I thus had in mind to plan an FFT using FFTWs…

---

## [Dangling / inexistant Genie app](https://discourse.julialang.org/t/dangling-inexistant-genie-app/116776)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 0\
**Last updated:** [July 8, 2024, 2:39pm UTC](https://discourse.julialang.org/t/dangling-inexistant-genie-app/116776 "2024-07-08T14:39:15Z")

</div>

I have a few folders that do not exist any more, see screenshot. Can anyone please tell me where GenieBuilder.jl stores this list of folders (such that I can edit it). The screenshot is from VSCode.

---

## [Avoid namespace pollution from startup.jl](https://discourse.julialang.org/t/avoid-namespace-pollution-from-startup-jl/116743)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 11\
**Last updated:** [July 8, 2024, 2:30pm UTC](https://discourse.julialang.org/t/avoid-namespace-pollution-from-startup-jl/116743 "2024-07-08T14:30:13Z")

</div>

I have startup.jl file that I’m mostly happy with. Any time Julia is updated and I start an interactive session without explicitly activating some environment, startup.jl adds a few key packages to the base environment.…

---

## [PythonCall Segmentation Fault](https://discourse.julialang.org/t/pythoncall-segmentation-fault/116742)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 4\
**Last updated:** [July 8, 2024, 11:31am UTC](https://discourse.julialang.org/t/pythoncall-segmentation-fault/116742 "2024-07-08T11:31:31Z")

</div>

Hi there, I don’t have a reproducible minimal example yet, but maybe someone stumpled into the same thing I get a Segmentation fault almost right at the beginning when using PythonCall inside Pluto. The key trigger is \_…

---

## [@everywhere works, sort of](https://discourse.julialang.org/t/everywhere-works-sort-of/116746)

<div class="topic-metadata">

**Author:** [@ilovemath](https://discourse.julialang.org/u/ilovemath)\
**Replies:** 2\
**Last updated:** [July 8, 2024, 6:29am UTC](https://discourse.julialang.org/t/everywhere-works-sort-of/116746 "2024-07-08T06:29:36Z")

</div>

I am working on setting up a parallel code, and I am putting in one piece at a time to make sure I actually understand how to do this properly. Primarily, I put the following piece of code in to Julia on the front end o…

---

## [Is it possible to run Julia / Turing sampling with multicores without using the command line or the env file](https://discourse.julialang.org/t/is-it-possible-to-run-julia-turing-sampling-with-multicores-without-using-the-command-line-or-the-env-file/116720)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 1\
**Last updated:** [July 8, 2024, 2:01am UTC](https://discourse.julialang.org/t/is-it-possible-to-run-julia-turing-sampling-with-multicores-without-using-the-command-line-or-the-env-file/116720 "2024-07-08T02:01:56Z")

</div>

Might be a silly question, but I am wondering if it is possible to run MCMC sampling from a Turing model using the multiple cores of the CPU without having to start Julia in a particular way / setting environment variabl…

---

## [Quick question about ExcelFiles.jl](https://discourse.julialang.org/t/quick-question-about-excelfiles-jl/22962)

<div class="topic-metadata">

**Author:** [@adriano.vilela](https://discourse.julialang.org/u/adriano.vilela)\
**Replies:** 6\
**Last updated:** [July 7, 2024, 9:30pm UTC](https://discourse.julialang.org/t/quick-question-about-excelfiles-jl/22962 "2024-07-07T21:30:58Z")

</div>

Does anybody know if it’s possible to use ExcelFiles.jl to save multiple sheets to a single xlsx file? I have 3 DataFrames that I would like to save as 3 separate sheets in a xlsx file.

---

## [MethodError: no method matching (::Base.RedirectStdStream)(::IOBuffer)](https://discourse.julialang.org/t/methoderror-no-method-matching-base-redirectstdstream-iobuffer/116725)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 0\
**Last updated:** [July 7, 2024, 3:10pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-base-redirectstdstream-iobuffer/116725 "2024-07-07T15:10:13Z")

</div>

couldn’t find anything about this using googling Does anyone know, why redirect\_stdout cannot be used with IOBuffer? Is there a simple workarond?

---

## [PackageCompiler crash after 6 hours of compilation, seemingly running out of memory](https://discourse.julialang.org/t/packagecompiler-crash-after-6-hours-of-compilation-seemingly-running-out-of-memory/115711)

<div class="topic-metadata">

**Author:** [@ErikBuer](https://discourse.julialang.org/u/ErikBuer)\
**Replies:** 3\
**Last updated:** [July 7, 2024, 2:08pm UTC](https://discourse.julialang.org/t/packagecompiler-crash-after-6-hours-of-compilation-seemingly-running-out-of-memory/115711 "2024-07-07T14:08:06Z")

</div>

Hi. I am attempting to build an application with create\_app that will run on a Raspberry Pi 5 (8 GB RAM). I am therefore also compiling my application on the PI. The PI is running the latest Rasbian and is a 64-bit devi…

---

## [HyperTuning.jl with multiple GPUs](https://discourse.julialang.org/t/hypertuning-jl-with-multiple-gpus/116721)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 0\
**Last updated:** [July 7, 2024, 1:44pm UTC](https://discourse.julialang.org/t/hypertuning-jl-with-multiple-gpus/116721 "2024-07-07T13:44:00Z")

</div>

Cheers, I’m working with a machine with two GPUs. The search execution process in parallel for the package is pretty much straightforward and runs smoothly, except for the fact that multiple threads are executed on a si…

---

## [Threads.@threads does not work properly](https://discourse.julialang.org/t/threads-threads-does-not-work-properly/116701)

<div class="topic-metadata">

**Author:** [@CaG21](https://discourse.julialang.org/u/CaG21)\
**Replies:** 6\
**Last updated:** [July 7, 2024, 12:58pm UTC](https://discourse.julialang.org/t/threads-threads-does-not-work-properly/116701 "2024-07-07T12:58:06Z")

</div>

Hi everyone, for the first time I am trying to exploit multi-threading in Julia. However, it seems I am doing some rookie mistake, since it does not work. I am running this very simple code (not a MWE) t = 0.0 ℓ = 1000…

---

## [Summing a vector is faster than summing a multi-dimensional array of the same length using CUDA](https://discourse.julialang.org/t/summing-a-vector-is-faster-than-summing-a-multi-dimensional-array-of-the-same-length-using-cuda/116711)

<div class="topic-metadata">

**Author:** [@lance\_xwq](https://discourse.julialang.org/u/lance_xwq)\
**Replies:** 2\
**Last updated:** [July 7, 2024, 9:32am UTC](https://discourse.julialang.org/t/summing-a-vector-is-faster-than-summing-a-multi-dimensional-array-of-the-same-length-using-cuda/116711 "2024-07-07T09:32:40Z")

</div>

A MWE: using BenchmarkTools using CUDA CUDA.allowscalar(false) function foo(dims) x = rand(Float32, dims) print("\\nCPU sum: ") @btime sum($x) print("CPU vec + sum: ") @btime sum(vec($x)) y = C…

---

## [Using metaprogramming to combine multiple functions and construct a composite temporary function](https://discourse.julialang.org/t/using-metaprogramming-to-combine-multiple-functions-and-construct-a-composite-temporary-function/116647)

<div class="topic-metadata">

**Author:** [@chooron](https://discourse.julialang.org/u/chooron)\
**Replies:** 10\
**Last updated:** [July 7, 2024, 2:35am UTC](https://discourse.julialang.org/t/using-metaprogramming-to-combine-multiple-functions-and-construct-a-composite-temporary-function/116647 "2024-07-07T02:35:04Z")

</div>

I can identify the input and output variable names of the functions. Using this information, I want to combine these functions to construct a composite function. I hope to obtain the result with the specified variable na…

---

## [How to manage Fortran file units in Julia?](https://discourse.julialang.org/t/how-to-manage-fortran-file-units-in-julia/116688)

<div class="topic-metadata">

**Author:** [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Replies:** 3\
**Last updated:** [July 6, 2024, 1:06pm UTC](https://discourse.julialang.org/t/how-to-manage-fortran-file-units-in-julia/116688 "2024-07-06T13:06:38Z")

</div>

I’m calling a Fortran subroutine through @ccall which is declared as subroutine data\_input(..., fileunit) integer, intent(out) :: fileunit ... open(newunit = fileunit, ...) ... end subroutine And various other Fortran …

---

## [Does \`@atomic\` syntax support non-primitive-type fields in a \`mutable struct\`?](https://discourse.julialang.org/t/does-atomic-syntax-support-non-primitive-type-fields-in-a-mutable-struct/116703)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 2\
**Last updated:** [July 6, 2024, 7:30pm UTC](https://discourse.julialang.org/t/does-atomic-syntax-support-non-primitive-type-fields-in-a-mutable-struct/116703 "2024-07-06T19:30:30Z")

</div>

I was reading the documentation on per-field atomics, and it seems that @atomic can be put in front of any type of field (unlike Base.Threads.Atomic) as long as the struct is mutable. I also tested it with the following …

---

## [Does NonlinearSolve use the analytical jacobian?](https://discourse.julialang.org/t/does-nonlinearsolve-use-the-analytical-jacobian/116508)

<div class="topic-metadata">

**Author:** [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Replies:** 6\
**Last updated:** [July 6, 2024, 7:05pm UTC](https://discourse.julialang.org/t/does-nonlinearsolve-use-the-analytical-jacobian/116508 "2024-07-06T19:05:26Z")

</div>

This question came up when I did some tests related to this post. Imagine I have the code using NonlinearSolve function f(u, p) return u^2 - 2 end function df(u, p) println("Hey") return 2u end fn = Nonl…

---

## [Installing GLMakie on Linux fails](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 14\
**Last updated:** [July 6, 2024, 6:52pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468 "2024-07-06T18:52:02Z")

</div>

I did: mkdir glmakie cd glmakie julia --project="." and then in Julia using Pkg Pkg.add("GLMakie") This results in the following error: julia\> err PkgPrecompileError: The following 1 direct dependency failed to prec…

---

## [Type instabilities when using broadcasting with splat operator](https://discourse.julialang.org/t/type-instabilities-when-using-broadcasting-with-splat-operator/116698)

<div class="topic-metadata">

**Author:** [@danielelamberto](https://discourse.julialang.org/u/danielelamberto)\
**Replies:** 2\
**Last updated:** [July 6, 2024, 4:03pm UTC](https://discourse.julialang.org/t/type-instabilities-when-using-broadcasting-with-splat-operator/116698 "2024-07-06T16:03:39Z")

</div>

Hi, I’m trying to optimize my code and I noticed a type instability when using broadcasting together with the splat operator, as in the following code: function f(x, p1, p2) return x \* p1 + p2 end x = rand(1000) p…

---

## [Why some variables in a package are not properly included when calling that package](https://discourse.julialang.org/t/why-some-variables-in-a-package-are-not-properly-included-when-calling-that-package/116638)

<div class="topic-metadata">

**Author:** [@Khashayar-Neshat](https://discourse.julialang.org/u/Khashayar-Neshat)\
**Replies:** 15\
**Last updated:** [July 5, 2024, 9:05pm UTC](https://discourse.julialang.org/t/why-some-variables-in-a-package-are-not-properly-included-when-calling-that-package/116638 "2024-07-05T21:05:29Z")

</div>

I do not understand why some functions and variables are not included properly in my project, and as a result, I get an error: UndefVarError: something not defined. I am working with SymbolicWedderburn.jl (@abulak ). Ho…

---

## [MethodOfLines.jl not working](https://discourse.julialang.org/t/methodoflines-jl-not-working/116346)

<div class="topic-metadata">

**Author:** [@Kaguro](https://discourse.julialang.org/u/Kaguro)\
**Replies:** 6\
**Last updated:** [July 5, 2024, 6:25pm UTC](https://discourse.julialang.org/t/methodoflines-jl-not-working/116346 "2024-07-05T18:25:58Z")

</div>

Hello All. I am to solve a PDE numerically (called Klein-Kramers-Chandrasekhar equation KKC eqn ) for some parameters. I followed the getting started instructions intro and after writing the step for prob = discretize…

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

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