# General Usage

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

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

**Page:** 85

---

## [Julia terminal crashes unexpectedly](https://discourse.julialang.org/t/julia-terminal-crashes-unexpectedly/126113)

<div class="topic-metadata">

**Author:** [@GeoPis](https://discourse.julialang.org/u/GeoPis)\
**Replies:** 13\
**Last updated:** [February 23, 2025, 9:57pm UTC](https://discourse.julialang.org/t/julia-terminal-crashes-unexpectedly/126113 "2025-02-23T21:57:28Z")

</div>

Hi ! I am using Julia to run some Finite Element simulations with code that I wrote (based on the Ferrite.jl package). Running the exact same code two times, the first time the analysis finishes with no errors, while t…

---

## [Snakemake with julia (and similarities with Dr Watson or..)](https://discourse.julialang.org/t/snakemake-with-julia-and-similarities-with-dr-watson-or/126106)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 9\
**Last updated:** [February 23, 2025, 8:39pm UTC](https://discourse.julialang.org/t/snakemake-with-julia-and-similarities-with-dr-watson-or/126106 "2025-02-23T20:39:57Z")

</div>

I have a collegue that works with Python and Snakemake, telling me how nice is this tool for scientific workflow management, but I haven’t understood much about it, and above all if what it provides is really needed much…

---

## [DimensionMismatch: arrays could not be broadcast to a common size: a has axes Base.OneTo(5) and b has axes Base.OneTo(0)](https://discourse.julialang.org/t/dimensionmismatch-arrays-could-not-be-broadcast-to-a-common-size-a-has-axes-base-oneto-5-and-b-has-axes-base-oneto-0/126193)

<div class="topic-metadata">

**Author:** [@Casper\_Casier](https://discourse.julialang.org/u/Casper_Casier)\
**Replies:** 6\
**Last updated:** [February 23, 2025, 7:17pm UTC](https://discourse.julialang.org/t/dimensionmismatch-arrays-could-not-be-broadcast-to-a-common-size-a-has-axes-base-oneto-5-and-b-has-axes-base-oneto-0/126193 "2025-02-23T19:17:23Z")

</div>

Im trying to find the ODEs of some concentration profiles using SINDy. r1 and r\_deact are known terms that can be in the ODE so I added them to the basis. (also tried already with a simpler basis but same problem). Also…

---

## [Preferences.jl persistency on package update?](https://discourse.julialang.org/t/preferences-jl-persistency-on-package-update/126210)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 3\
**Last updated:** [February 23, 2025, 5:30pm UTC](https://discourse.julialang.org/t/preferences-jl-persistency-on-package-update/126210 "2025-02-23T17:30:03Z")

</div>

By default, preferences created by Preferences.jl are saved next to the Project.toml file of this package. To my understanding, on an update of a package Foo, a new folder is created - e.g. the old version was in .../pa…

---

## [Performance in broadcasting vs function preallocation?](https://discourse.julialang.org/t/performance-in-broadcasting-vs-function-preallocation/126211)

<div class="topic-metadata">

**Author:** [@lepton01](https://discourse.julialang.org/u/lepton01)\
**Replies:** 6\
**Last updated:** [February 23, 2025, 2:00pm UTC](https://discourse.julialang.org/t/performance-in-broadcasting-vs-function-preallocation/126211 "2025-02-23T14:00:28Z")

</div>

Hello there. I have created a couple of functions with the same purpose, evaluating: f(x, y) = (x - 3)^2 + (y + 15)^2 over a matrix (really two vectors), the first column for x and the second one for y. The first func…

---

## [Memory \`isbits\` Union Optimization](https://discourse.julialang.org/t/memory-isbits-union-optimization/126175)

<div class="topic-metadata">

**Author:** [@PatrickHaecker](https://discourse.julialang.org/u/PatrickHaecker)\
**Replies:** 5\
**Last updated:** [February 23, 2025, 8:23am UTC](https://discourse.julialang.org/t/memory-isbits-union-optimization/126175 "2025-02-23T08:23:03Z")

</div>

Citing from isbits union memory optimization (emphasis mine) The optimization is accomplished by storing an extra “type tag memory” of bytes, one byte per element, alongside the bytes of the actual data. However, I s…

---

## [GameZero Documentation](https://discourse.julialang.org/t/gamezero-documentation/126195)

<div class="topic-metadata">

**Author:** [@HAL9000](https://discourse.julialang.org/u/HAL9000)\
**Replies:** 2\
**Last updated:** [February 22, 2025, 7:43pm UTC](https://discourse.julialang.org/t/gamezero-documentation/126195 "2025-02-22T19:43:50Z")

</div>

Does anyone know where the documentation is for gamezero - the links in GitHub - aviks/GameZero.jl: Zero overhead game development library for the Julia programming language no longer work. Has the package be discontin…

---

## [Building function (like OOP) inside a struct](https://discourse.julialang.org/t/building-function-like-oop-inside-a-struct/126180)

<div class="topic-metadata">

**Author:** [@xinzhicaishu](https://discourse.julialang.org/u/xinzhicaishu)\
**Replies:** 1\
**Last updated:** [February 22, 2025, 11:15am UTC](https://discourse.julialang.org/t/building-function-like-oop-inside-a-struct/126180 "2025-02-22T11:15:49Z")

</div>

This is my demo, my goal is run set\_grade! successfully. How can achieve this? # try demo mutable struct Group members::Dict{String, Int64} # project =\> grade const list::Vector{String} # pro…

---

## [Help with Automatic Differentiation of Stiffness Matrix Function](https://discourse.julialang.org/t/help-with-automatic-differentiation-of-stiffness-matrix-function/125941)

<div class="topic-metadata">

**Author:** [@Edan\_Lazerson](https://discourse.julialang.org/u/Edan_Lazerson)\
**Replies:** 5\
**Last updated:** [February 22, 2025, 8:01am UTC](https://discourse.julialang.org/t/help-with-automatic-differentiation-of-stiffness-matrix-function/125941 "2025-02-22T08:01:25Z")

</div>

I am trying to compute the gradient of a finite element stiffness matrix with respect to nodal coordinates, Young’s modulus E, and thickness t. I am new to automatic differentiation (AD) and have tried using Differentiat…

---

## [What's your preference for creating literal data-structures?](https://discourse.julialang.org/t/whats-your-preference-for-creating-literal-data-structures/126128)

<div class="topic-metadata">

**Author:** [@jballanc](https://discourse.julialang.org/u/jballanc)\
**Replies:** 9\
**Last updated:** [February 22, 2025, 4:55am UTC](https://discourse.julialang.org/t/whats-your-preference-for-creating-literal-data-structures/126128 "2025-02-22T04:55:20Z")

</div>

Having worked fairly extensively with Clojure, I came to appreciate the approach of building systems focused around data vs code. For example, if you are working on a business rules engine, rather than writing a complex …

---

## [Notebook-specific target/Project.toml (similar to test)](https://discourse.julialang.org/t/notebook-specific-target-project-toml-similar-to-test/125972)

<div class="topic-metadata">

**Author:** [@brunompacheco](https://discourse.julialang.org/u/brunompacheco)\
**Replies:** 9\
**Last updated:** [February 21, 2025, 11:53pm UTC](https://discourse.julialang.org/t/notebook-specific-target-project-toml-similar-to-test/125972 "2025-02-21T23:53:08Z")

</div>

Greetings, I am developing a Julia package in which I have some Jupyter notebooks. Those notebooks use some packages that I do not want to include as general project dependencies (e.g., Plots.jl). However, I do not seem…

---

## [Reinstall All Parts of a Julia Project](https://discourse.julialang.org/t/reinstall-all-parts-of-a-julia-project/126169)

<div class="topic-metadata">

**Author:** [@andrewkhardy](https://discourse.julialang.org/u/andrewkhardy)\
**Replies:** 0\
**Last updated:** [February 21, 2025, 11:23pm UTC](https://discourse.julialang.org/t/reinstall-all-parts-of-a-julia-project/126169 "2025-02-21T23:23:54Z")

</div>

I am attempting to run Julia on a HPCC. The most up to date version they have is v.1.10. I have somehow broken a project, so that whenever I try to load Julia v.1.10, not limited to this specific project I get an error …

---

## [@everywhere inside a module](https://discourse.julialang.org/t/everywhere-inside-a-module/126135)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 11\
**Last updated:** [February 21, 2025, 10:01pm UTC](https://discourse.julialang.org/t/everywhere-inside-a-module/126135 "2025-02-21T22:01:24Z")

</div>

I am trying to parallelize solve\_alpha from Xfoil.jl. The problem is: Xfoil.jl has global variables inside the package, so I cannot use @threads to run multiple solve\_alphas at the same time. I have to use Distributed.jl…

---

## [Testing for correct handling of (missing) globals](https://discourse.julialang.org/t/testing-for-correct-handling-of-missing-globals/126158)

<div class="topic-metadata">

**Author:** [@Rbthn](https://discourse.julialang.org/u/Rbthn)\
**Replies:** 1\
**Last updated:** [February 21, 2025, 4:30pm UTC](https://discourse.julialang.org/t/testing-for-correct-handling-of-missing-globals/126158 "2025-02-21T16:30:57Z")

</div>

When writing a script to e.g. solve an ODE, I often find myself using global (const) variables and using them in my right-hand-side function. This all works well, until I want to solve this ODE on another worker. This wo…

---

## [Any plans to support cplex 22.1.2?](https://discourse.julialang.org/t/any-plans-to-support-cplex-22-1-2/126151)

<div class="topic-metadata">

**Author:** [@jpedro1992](https://discourse.julialang.org/u/jpedro1992)\
**Replies:** 0\
**Last updated:** [February 21, 2025, 1:59pm UTC](https://discourse.julialang.org/t/any-plans-to-support-cplex-22-1-2/126151 "2025-02-21T13:59:30Z")

</div>

Hi! Any plans regarding the support for cplex 22.1.2? I am having issues accessing IBM academic program to download a supported version by CPLEX.jl… Thanks!

---

## [\`objectid\` and reproducibility](https://discourse.julialang.org/t/objectid-and-reproducibility/126119)

<div class="topic-metadata">

**Author:** [@mhinsch](https://discourse.julialang.org/u/mhinsch)\
**Replies:** 9\
**Last updated:** [February 21, 2025, 1:58pm UTC](https://discourse.julialang.org/t/objectid-and-reproducibility/126119 "2025-02-21T13:58:16Z")

</div>

I just spent half a day debugging very weird non-deterministic behaviour in my simulation. The culprit as it turns out was one little piece of code where I used sorting an array of objects by objectid as a way to make ge…

---

## [How to programmatically open Pluto in a VS Code new tab from the Julia Terminal?](https://discourse.julialang.org/t/how-to-programmatically-open-pluto-in-a-vs-code-new-tab-from-the-julia-terminal/126086)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 4\
**Last updated:** [February 21, 2025, 1:01pm UTC](https://discourse.julialang.org/t/how-to-programmatically-open-pluto-in-a-vs-code-new-tab-from-the-julia-terminal/126086 "2025-02-21T13:01:58Z")

</div>

I am trying to capture the Pluto URL programmatically ’ pluto\_url = some code’ without auto-open and afterwards opening it inside VS Code. Is it possible? using Pluto # Start Pluto @async Pluto.run(; autoopen=false) …

---

## [Hinting (autocomplete) in 1.11 REPL as opt-in instead of opt-out](https://discourse.julialang.org/t/hinting-autocomplete-in-1-11-repl-as-opt-in-instead-of-opt-out/126142)

<div class="topic-metadata">

**Author:** [@leios](https://discourse.julialang.org/u/leios)\
**Replies:** 1\
**Last updated:** [February 21, 2025, 11:54am UTC](https://discourse.julialang.org/t/hinting-autocomplete-in-1-11-repl-as-opt-in-instead-of-opt-out/126142 "2025-02-21T11:54:23Z")

</div>

Ok, 1.11 added hinting to the Julia REPL: Julia 1.11 Highlights. I think most users will find this useful, but I feel like this feature might be better in a separate package like OhMyREPL.jl or something: GitHub - Krist…

---

## [Feasible Region using PowerModels.jl](https://discourse.julialang.org/t/feasible-region-using-powermodels-jl/126137)

<div class="topic-metadata">

**Author:** [@Glon](https://discourse.julialang.org/u/Glon)\
**Replies:** 0\
**Last updated:** [February 21, 2025, 7:05am UTC](https://discourse.julialang.org/t/feasible-region-using-powermodels-jl/126137 "2025-02-21T07:05:21Z")

</div>

Hello all, Is it possible to plot the feasible region for the optimization problem in PowerModels. I understand that we can use HiGHs, Juniper, Ipopt etc. to get the optimal point, but is it possible to plot the feasibl…

---

## [Agents.jl and using a network model](https://discourse.julialang.org/t/agents-jl-and-using-a-network-model/126134)

<div class="topic-metadata">

**Author:** [@zoek](https://discourse.julialang.org/u/zoek)\
**Replies:** 0\
**Last updated:** [February 21, 2025, 1:46am UTC](https://discourse.julialang.org/t/agents-jl-and-using-a-network-model/126134 "2025-02-21T01:46:58Z")

</div>

Hi, I’m trying to use agents.jl for an SEIR network model, where each agent is a node and nodes are connected by edges. I want to run the model so that for each agent, ‘neighbours’ are identified through edges, and if a …

---

## [Display docstring for extension method in documentation](https://discourse.julialang.org/t/display-docstring-for-extension-method-in-documentation/99720)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 5\
**Last updated:** [February 20, 2025, 2:26pm UTC](https://discourse.julialang.org/t/display-docstring-for-extension-method-in-documentation/99720 "2025-02-20T14:26:49Z")

</div>

What should I do I want to document a method defined in an extension? Of course I wrote a docstring but said docstring isn’t displayed in the Documenter.jl build, even when I load the conditional dependencies before load…

---

## [How do I convert to using the package tarball format?](https://discourse.julialang.org/t/how-do-i-convert-to-using-the-package-tarball-format/126100)

<div class="topic-metadata">

**Author:** [@magister-ludi](https://discourse.julialang.org/u/magister-ludi)\
**Replies:** 5\
**Last updated:** [February 20, 2025, 10:15pm UTC](https://discourse.julialang.org/t/how-do-i-convert-to-using-the-package-tarball-format/126100 "2025-02-20T22:15:25Z")

</div>

I can’t remember when this started (I think it was when I started using the 11.x series, it definitely happens for 11.2 and 11.3). When I do a Pkg.add(...) or a Pkg.update(), if it’s time for the repository data to be re…

---

## [Memory usage discrepancy](https://discourse.julialang.org/t/memory-usage-discrepancy/126085)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 8\
**Last updated:** [February 20, 2025, 5:06pm UTC](https://discourse.julialang.org/t/memory-usage-discrepancy/126085 "2025-02-20T17:06:58Z")

</div>

I have an application running in Julia. Using htop I can see that the process consumes 2 GB of memory, but if I use summarysize of all symbols in Main I just get around 150 MB in total. How can this be? I’m using Julia…

---

## [Correct using of Reexport](https://discourse.julialang.org/t/correct-using-of-reexport/125835)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 12\
**Last updated:** [February 20, 2025, 4:58pm UTC](https://discourse.julialang.org/t/correct-using-of-reexport/125835 "2025-02-20T16:58:35Z")

</div>

Hello, I’m developing the QuantumToolbox.jl package, to simulate quantum systems in Julia. This package mainly uses linear algebra operations on sparse and dense arrays. Thus, I have those two packages as dependencies. …

---

## [Is it OK to re-export something from a different package?](https://discourse.julialang.org/t/is-it-ok-to-re-export-something-from-a-different-package/76922)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 11\
**Last updated:** [February 20, 2025, 1:11pm UTC](https://discourse.julialang.org/t/is-it-ok-to-re-export-something-from-a-different-package/76922 "2025-02-20T13:11:30Z")

</div>

As the title say, i am wandering if it is OK to reexport a method from a different package. I currently have : module MyPackage using OtherPackage struct mytype end OtherPackage.function(x::mytype) = 1 end The fact …

---

## [Use of anonymous functions has high compilation time](https://discourse.julialang.org/t/use-of-anonymous-functions-has-high-compilation-time/125923)

<div class="topic-metadata">

**Author:** [@thomasc791](https://discourse.julialang.org/u/thomasc791)\
**Replies:** 3\
**Last updated:** [February 14, 2025, 10:17pm UTC](https://discourse.julialang.org/t/use-of-anonymous-functions-has-high-compilation-time/125923 "2025-02-14T22:17:58Z")

</div>

Hi everyone, I am currently struggling with the usage of anonymous functions. I have a function dirichlet! that takes a function as one of its inputs. The function returns a value based on the position x. function diri…

---

## [Mul! allocates for custom struct which is a subtype of AbstractMatrix](https://discourse.julialang.org/t/mul-allocates-for-custom-struct-which-is-a-subtype-of-abstractmatrix/126078)

<div class="topic-metadata">

**Author:** [@Giorgos\_Vretinaris](https://discourse.julialang.org/u/Giorgos_Vretinaris)\
**Replies:** 2\
**Last updated:** [February 19, 2025, 6:35pm UTC](https://discourse.julialang.org/t/mul-allocates-for-custom-struct-which-is-a-subtype-of-abstractmatrix/126078 "2025-02-19T18:35:08Z")

</div>

I am trying to write an efficient matricization function following Kolda’s and Bader’s work on “Tensor Decompositions and Applications”. The struct I have is non-allocating when initialized as it is basically a lazy view…

---

## [Can Turing differentiate a truncated Poisson](https://discourse.julialang.org/t/can-turing-differentiate-a-truncated-poisson/126082)

<div class="topic-metadata">

**Author:** [@Domenic\_Di\_Francesco](https://discourse.julialang.org/u/Domenic_Di_Francesco)\
**Replies:** 1\
**Last updated:** [February 19, 2025, 5:49pm UTC](https://discourse.julialang.org/t/can-turing-differentiate-a-truncated-poisson/126082 "2025-02-19T17:49:55Z")

</div>

does Turing’s AD backend struggle with truncated Poisson distributions? Turing.@model function bps\_hurdle\_model(bonus::Vector{Int}, bps::Vector{Int}, μ\_αbps = 0, σ\_αbps = 1, μ\_βbps = 0, σ\_βbps = 1) α\_pzero ~ N…

---

## [Julia VSC extension not loading](https://discourse.julialang.org/t/julia-vsc-extension-not-loading/126084)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 1\
**Last updated:** [February 19, 2025, 5:21pm UTC](https://discourse.julialang.org/t/julia-vsc-extension-not-loading/126084 "2025-02-19T17:21:46Z")

</div>

Hi, I had used before VSC for Julia and the notebooks aswell. I was wondering if its this is just happening to me or a general thing, but very often for very vey simple tasks the notebook gets stuck, as in the following …

---

## [Concatenated ranges](https://discourse.julialang.org/t/concatenated-ranges/126042)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 7\
**Last updated:** [February 19, 2025, 4:51pm UTC](https://discourse.julialang.org/t/concatenated-ranges/126042 "2025-02-19T16:51:44Z")

</div>

For some applications concatenated ranges would be nice. E.g. it would simplify working with rotated indices, obviating the need for fftshift for some calculations. E.g. if I want to construct a suitable Gaussian in Four…

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

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