# General Usage

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

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

**Page:** 458

---

## [Will Julia ever fix its "using ..." latency problems?](https://discourse.julialang.org/t/will-julia-ever-fix-its-using-latency-problems/50659)

<div class="topic-metadata">

**Author:** [@Volker\_Weissmann](https://discourse.julialang.org/u/Volker_Weissmann)\
**Replies:** 68\
**Last updated:** [April 25, 2022, 2:40pm UTC](https://discourse.julialang.org/t/will-julia-ever-fix-its-using-latency-problems/50659 "2022-04-25T14:40:11Z")

</div>

The “using …” command is extremely slow: julia\> @time using Plots 12.731850 seconds (17.25 M allocations: 976.326 MiB, 3.64% gc time) julia\> @time using DifferentialEquations 34.780873 seconds (41.90 M allocations: …

---

## [How to solve a system of nonlinear equations with a lagged variable?](https://discourse.julialang.org/t/how-to-solve-a-system-of-nonlinear-equations-with-a-lagged-variable/79949)

<div class="topic-metadata">

**Author:** [@fms-1988](https://discourse.julialang.org/u/fms-1988)\
**Replies:** 4\
**Last updated:** [April 25, 2022, 1:13pm UTC](https://discourse.julialang.org/t/how-to-solve-a-system-of-nonlinear-equations-with-a-lagged-variable/79949 "2022-04-25T13:13:25Z")

</div>

I have a system of equations (f). This system has a set of variables, among them the variables (x\_t) and (x\_{t-1}). How can I represent the variable (x\_{t-1}) within this system? Thanks in advance

---

## [How use python functions from my python file in Julia?](https://discourse.julialang.org/t/how-use-python-functions-from-my-python-file-in-julia/79977)

<div class="topic-metadata">

**Author:** [@YitaoCai](https://discourse.julialang.org/u/YitaoCai)\
**Replies:** 2\
**Last updated:** [April 25, 2022, 12:14pm UTC](https://discourse.julialang.org/t/how-use-python-functions-from-my-python-file-in-julia/79977 "2022-04-25T12:14:52Z")

</div>

In python we do like from mypython\_folder.mypython\_script import mypython\_function/mypython\_class how do we use PythonCall.jl to do that? I tried mypython\_function = pyimport("mypython\_folder.mypython\_script" =\> "myp…

---

## [Is a Structure in a Collection](https://discourse.julialang.org/t/is-a-structure-in-a-collection/79957)

<div class="topic-metadata">

**Author:** [@Ordens\_Ritter](https://discourse.julialang.org/u/Ordens_Ritter)\
**Replies:** 7\
**Last updated:** [April 25, 2022, 12:18pm UTC](https://discourse.julialang.org/t/is-a-structure-in-a-collection/79957 "2022-04-25T12:18:55Z")

</div>

I want to find whether a Structure of Type A is in included in A Collection. In the next step I wanna return this collection form a Collection of a Collection of Type A^^. struct A a = Int end a = \[A(1), A(2)\] in(a,…

---

## [Struct with Parameters.jl and outer function](https://discourse.julialang.org/t/struct-with-parameters-jl-and-outer-function/79886)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 2\
**Last updated:** [April 25, 2022, 10:16am UTC](https://discourse.julialang.org/t/struct-with-parameters-jl-and-outer-function/79886 "2022-04-25T10:16:55Z")

</div>

Hi everyone, I have a simple idea: I want to create a Grid object containing the parameters of my model. I want the user to give values using Unitful to have units and to internally have consistent values without the un…

---

## [Updating a function in a type, where the function is a parameter](https://discourse.julialang.org/t/updating-a-function-in-a-type-where-the-function-is-a-parameter/79933)

<div class="topic-metadata">

**Author:** [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Replies:** 26\
**Last updated:** [April 25, 2022, 8:30am UTC](https://discourse.julialang.org/t/updating-a-function-in-a-type-where-the-function-is-a-parameter/79933 "2022-04-25T08:30:03Z")

</div>

I just ran into a problem with my idea to have performant code and updating a struct. Assume we have a struct (already mutable to change it) mutable struct MyStruct{F} f::F end where f is a function (in my applica…

---

## [Vector to @enum](https://discourse.julialang.org/t/vector-to-enum/79907)

<div class="topic-metadata">

**Author:** [@clrescobar](https://discourse.julialang.org/u/clrescobar)\
**Replies:** 8\
**Last updated:** [April 25, 2022, 8:23am UTC](https://discourse.julialang.org/t/vector-to-enum/79907 "2022-04-25T08:23:48Z")

</div>

Hello, I would like to know how to convert a vector into @enum. I have tried: AS =\[Action(τ,ρ,χ,ω) for τ in 0:5 for ρ in 0:5 for χ in 0:5 for ω in 0:5\] for i in 1:1296 action = AS\[i\] @enum Actions action end B…

---

## [Adding a package bumps another to a seemingly breaking release](https://discourse.julialang.org/t/adding-a-package-bumps-another-to-a-seemingly-breaking-release/79971)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [April 25, 2022, 7:48am UTC](https://discourse.julialang.org/t/adding-a-package-bumps-another-to-a-seemingly-breaking-release/79971 "2022-04-25T07:48:38Z")

</div>

(@v1.7) pkg\> activate --temp Activating new project at \`/tmp/jl\_TmSumB\` (jl\_TmSumB) pkg\> add TensorKit@0.9 Updating registry at \`~/.julia/registries/General\` Updating git-repo \`https://github.com/JuliaRegistri…

---

## [A simple inference bug with Dates.Period?](https://discourse.julialang.org/t/a-simple-inference-bug-with-dates-period/79966)

<div class="topic-metadata">

**Author:** [@braydenware](https://discourse.julialang.org/u/braydenware)\
**Replies:** 2\
**Last updated:** [April 25, 2022, 3:36am UTC](https://discourse.julialang.org/t/a-simple-inference-bug-with-dates-period/79966 "2022-04-25T03:36:02Z")

</div>

In some simple arithmetic subtracting types with Dates.CompoundPeriod, a bug arises when you try to subtract a Dates.CompoundPeriod that is equal to 0. However, it does not seem to be a problem with the Dates code but ra…

---

## [Migrating from GLMakie 0.4.7 to current](https://discourse.julialang.org/t/migrating-from-glmakie-0-4-7-to-current/79913)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 10\
**Last updated:** [April 25, 2022, 12:17am UTC](https://discourse.julialang.org/t/migrating-from-glmakie-0-4-7-to-current/79913 "2022-04-25T00:17:51Z")

</div>

I am trying to migrate my package GitHub - aenarete/KiteViewers.jl: 3D viewer for airborne wind energy systems (not registered) from GLMakie 0.4.7 to the current version. The first error I see is: julia\> using KiteView…

---

## [Fail to add GraphNeuralNetworks.jl](https://discourse.julialang.org/t/fail-to-add-graphneuralnetworks-jl/79935)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 1\
**Last updated:** [April 24, 2022, 7:30pm UTC](https://discourse.julialang.org/t/fail-to-add-graphneuralnetworks-jl/79935 "2022-04-24T19:30:51Z")

</div>

I try to add “GraphNeuralNetworks”. But some errors happened: My Julia is JuliaPro\_v1.5.4-1.The version is CUDA v2.4.3. Is the version incorrect causing this problem? How can I solve it? julia\> Pkg.add(“GraphNeuralNetw…

---

## [How to create a personal package](https://discourse.julialang.org/t/how-to-create-a-personal-package/79948)

<div class="topic-metadata">

**Author:** [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Replies:** 1\
**Last updated:** [April 24, 2022, 6:06pm UTC](https://discourse.julialang.org/t/how-to-create-a-personal-package/79948 "2022-04-24T18:06:04Z")

</div>

I want to create a package with some functions for personal use only. Currently what I’m using a .jl file inside my project folder and calling include("PersonalFunctions.jl") at the begging of my code. I would like to …

---

## [Plotting image data in Julia is much slower than MATLAB](https://discourse.julialang.org/t/plotting-image-data-in-julia-is-much-slower-than-matlab/79660)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 21\
**Last updated:** [April 24, 2022, 5:59pm UTC](https://discourse.julialang.org/t/plotting-image-data-in-julia-is-much-slower-than-matlab/79660 "2022-04-24T17:59:23Z")

</div>

I often visualize 2D raster grids of elevation data, where the grids can be 20,000x20,000 pixels, and each pixel contains an elevation value. In MATLAB, imagesc(x,y,Z) is lighting fast for this sort of thing, but the sam…

---

## [JIT compilation does not avoid useless computations](https://discourse.julialang.org/t/jit-compilation-does-not-avoid-useless-computations/79939)

<div class="topic-metadata">

**Author:** [@alequa](https://discourse.julialang.org/u/alequa)\
**Replies:** 6\
**Last updated:** [April 24, 2022, 5:54pm UTC](https://discourse.julialang.org/t/jit-compilation-does-not-avoid-useless-computations/79939 "2022-04-24T17:54:36Z")

</div>

Hello, I had a naïve idea bout the JIT compiler. This is that when I define a function with independent return cases it will know with computations to perform, that is: function test(z::Bool=true,array::Vector=rand(10…

---

## [How to increase stack size for Julia in Windows?](https://discourse.julialang.org/t/how-to-increase-stack-size-for-julia-in-windows/79932)

<div class="topic-metadata">

**Author:** [@Yrogirg](https://discourse.julialang.org/u/Yrogirg)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 10:03am UTC](https://discourse.julialang.org/t/how-to-increase-stack-size-for-julia-in-windows/79932 "2022-04-24T10:03:22Z")

</div>

I mirror here my question at StackOverflow: How to increase stack size for Julia in Windows? - Stack Overflow I wrote a recursive function (basically a flood fill), it works fine on smaller datasets, but for slightly la…

---

## [Read and convert JSON file from a website](https://discourse.julialang.org/t/read-and-convert-json-file-from-a-website/79556)

<div class="topic-metadata">

**Author:** [@Aminath\_Shausan](https://discourse.julialang.org/u/Aminath_Shausan)\
**Replies:** 9\
**Last updated:** [April 24, 2022, 8:38am UTC](https://discourse.julialang.org/t/read-and-convert-json-file-from-a-website/79556 "2022-04-24T08:38:26Z")

</div>

Hi I am trying to download the json file from https://raw.githubusercontent.com/hodcroftlab/covariants/master/cluster\_tables/EUClusters\_data.json And then to save it as a csv file. At the moment I have used using CSV, …

---

## [Failing to precompile CSV](https://discourse.julialang.org/t/failing-to-precompile-csv/79850)

<div class="topic-metadata">

**Author:** [@JedPhillips](https://discourse.julialang.org/u/JedPhillips)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 8:38am UTC](https://discourse.julialang.org/t/failing-to-precompile-csv/79850 "2022-04-24T08:38:36Z")

</div>

I recently upgraded to Julia v 1.7.2, and the CSV package is failing to compile. The error stack is: \[ Info: Precompiling CSV \[336ed68f-0bac-5ca0-87d4-7b16caf5d00b\] ERROR: LoadError: MethodError: no method matching Pars…

---

## [Fast Parallel ROC AUC Calculation](https://discourse.julialang.org/t/fast-parallel-roc-auc-calculation/79918)

<div class="topic-metadata">

**Author:** [@brianhempel](https://discourse.julialang.org/u/brianhempel)\
**Replies:** 1\
**Last updated:** [April 24, 2022, 12:15am UTC](https://discourse.julialang.org/t/fast-parallel-roc-auc-calculation/79918 "2022-04-24T00:15:19Z")

</div>

I’m trying to calculate the receiver operator characteristic area under curve for large amounts of data. I’ve parallelized the sorting, but I’ve got too much SARS-CoV2 in me at the moment to figure out the math to parall…

---

## [Non-allocating matrix inversion](https://discourse.julialang.org/t/non-allocating-matrix-inversion/62264)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 13\
**Last updated:** [April 23, 2022, 9:56pm UTC](https://discourse.julialang.org/t/non-allocating-matrix-inversion/62264 "2022-04-23T21:56:43Z")

</div>

Is there any way to perform matrix inversion? Say I have a Vector of Matrix where I want to perform the inverse, and then save them in the same spot where they came from in the array. I had thought of this: function bu…

---

## [Interpolation with ModelingToolkit.jl](https://discourse.julialang.org/t/interpolation-with-modelingtoolkit-jl/79867)

<div class="topic-metadata">

**Author:** [@astrobc1](https://discourse.julialang.org/u/astrobc1)\
**Replies:** 5\
**Last updated:** [April 23, 2022, 10:32pm UTC](https://discourse.julialang.org/t/interpolation-with-modelingtoolkit-jl/79867 "2022-04-23T22:32:38Z")

</div>

I’m trying to use cubic spline interpolation from DataInterpolations.jl in my loss function with ModelingToolkit.jl. There’s an older thread that seems to discuss this here but I have’t been able to get that working, an…

---

## [Warnings on Jupiter notebook](https://discourse.julialang.org/t/warnings-on-jupiter-notebook/79917)

<div class="topic-metadata">

**Author:** [@Aminath\_Shausan](https://discourse.julialang.org/u/Aminath_Shausan)\
**Replies:** 0\
**Last updated:** [April 23, 2022, 9:26pm UTC](https://discourse.julialang.org/t/warnings-on-jupiter-notebook/79917 "2022-04-23T21:26:03Z")

</div>

Hi I use Jupiter notebook for Julia coding, and sometimes gets lots of warning messages. Is there a way to suppress all warnings from notebook while running Julia. Thanks

---

## [How to further develop my package branch](https://discourse.julialang.org/t/how-to-further-develop-my-package-branch/79900)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 6\
**Last updated:** [April 23, 2022, 7:50pm UTC](https://discourse.julialang.org/t/how-to-further-develop-my-package-branch/79900 "2022-04-23T19:50:28Z")

</div>

I am working on a branch of the package DataStructures.jl. Until now I have been using git in a rather ad-hoc and tedious manner to get my commits posted to github. I would prefer to use a proper Julia package dev meth…

---

## [Precompiling non-inferrable calls](https://discourse.julialang.org/t/precompiling-non-inferrable-calls/79771)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 2\
**Last updated:** [April 23, 2022, 4:54pm UTC](https://discourse.julialang.org/t/precompiling-non-inferrable-calls/79771 "2022-04-23T16:54:21Z")

</div>

Let me start of by saying that precompile is great. It can move a lot of compilation time from the package loading to the precompilation stage. For people unfamiliar with precompile, when calling it on a function, it pr…

---

## [Best way to save/read bytes in struct](https://discourse.julialang.org/t/best-way-to-save-read-bytes-in-struct/79842)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 6\
**Last updated:** [April 23, 2022, 2:51pm UTC](https://discourse.julialang.org/t/best-way-to-save-read-bytes-in-struct/79842 "2022-04-23T14:51:52Z")

</div>

Hello! Main question I am developing a library to manipulate protocol messages in Julia. It must be able to store an incoming message, and then return its fields when asked for it. Here is a MWE for it: # incoming mes…

---

## [When to use HTTP.jl vs Downloads standard lib](https://discourse.julialang.org/t/when-to-use-http-jl-vs-downloads-standard-lib/79869)

<div class="topic-metadata">

**Author:** [@ProvocaTeach](https://discourse.julialang.org/u/ProvocaTeach)\
**Replies:** 1\
**Last updated:** [April 23, 2022, 1:42pm UTC](https://discourse.julialang.org/t/when-to-use-http-jl-vs-downloads-standard-lib/79869 "2022-04-23T13:42:37Z")

</div>

Hi all, I noticed in the Julia docs that there is a standard module called Downloads which implements a request function. Apparently you can make HTTP requests, complete with headers and HTTP/2 support, because Downloads…

---

## [Sampler for arbitrary univariate distribution?](https://discourse.julialang.org/t/sampler-for-arbitrary-univariate-distribution/41538)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 8\
**Last updated:** [April 23, 2022, 9:48am UTC](https://discourse.julialang.org/t/sampler-for-arbitrary-univariate-distribution/41538 "2022-04-23T09:48:16Z")

</div>

Do we have a sampler for arbitrary univariate distributions implemented somewhere (Ziggurat algorithm or so)?

---

## [Literate and Artifacts](https://discourse.julialang.org/t/literate-and-artifacts/79808)

<div class="topic-metadata">

**Author:** [@cortner](https://discourse.julialang.org/u/cortner)\
**Replies:** 6\
**Last updated:** [April 23, 2022, 3:15am UTC](https://discourse.julialang.org/t/literate-and-artifacts/79808 "2022-04-23T03:15:53Z")

</div>

I seem to be unable to use Literate when the script I’m trying to convert tries to load an artifact. The full setup - all files in the same folder - is printed at the bottom of this post. If I execute the script by act…

---

## [How can I detect Apple M1 chip?](https://discourse.julialang.org/t/how-can-i-detect-apple-m1-chip/79870)

<div class="topic-metadata">

**Author:** [@chkwon](https://discourse.julialang.org/u/chkwon)\
**Replies:** 2\
**Last updated:** [April 23, 2022, 2:59am UTC](https://discourse.julialang.org/t/how-can-i-detect-apple-m1-chip/79870 "2022-04-23T02:59:21Z")

</div>

I need to provide different build scripts for Apple Intel and Apple M1. How can I detect M1? Can Sys.isapple() or any other method distinguish them?

---

## [Debugger for command line script (works without REPL)?](https://discourse.julialang.org/t/debugger-for-command-line-script-works-without-repl/60286)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [April 30, 2021, 2:29am UTC](https://discourse.julialang.org/t/debugger-for-command-line-script-works-without-repl/60286 "2021-04-30T02:29:49Z")

</div>

Is there a debugger that will allow me to do something like this: JULIA\_PROJECT=/tmp/testenv julia /tmp/testenv/testdebugger.jl hithere # testdebugger.jl (does not work) println(string("julia environment is:\\n ",ENV\["J…

---

## [Julia 1.6 precompiling project, dependency skipped due to previous error - which one?](https://discourse.julialang.org/t/julia-1-6-precompiling-project-dependency-skipped-due-to-previous-error-which-one/53322)

<div class="topic-metadata">

**Author:** [@jdad](https://discourse.julialang.org/u/jdad)\
**Replies:** 4\
**Last updated:** [April 22, 2022, 6:17pm UTC](https://discourse.julialang.org/t/julia-1-6-precompiling-project-dependency-skipped-due-to-previous-error-which-one/53322 "2022-04-22T18:17:47Z")

</div>

During update of julia 1.6.0, while precompiling the project, I get indication of (previous) failed module precompilation. (@v1.6) pkg\> up Updating registry at \`C:\\Users\\davidj\\.julia\\registries\\General\` Updatin…

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

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