# General Usage

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

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

**Page:** 265

---

## [Updating registry (recent issue)](https://discourse.julialang.org/t/updating-registry-recent-issue/102108)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 1\
**Last updated:** [July 26, 2023, 11:05am UTC](https://discourse.julialang.org/t/updating-registry-recent-issue/102108 "2023-07-26T11:05:27Z")

</div>

Hi, I recently experienced the below issue (a bit out of nowhere) Any idea how to solve it? Thank you \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_…

---

## [Tuple type don't inherit as expected](https://discourse.julialang.org/t/tuple-type-dont-inherit-as-expected/17636)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 5\
**Last updated:** [July 26, 2023, 10:06am UTC](https://discourse.julialang.org/t/tuple-type-dont-inherit-as-expected/17636 "2023-07-26T10:06:55Z")

</div>

just did some experimentations with Tuple types. Take the following example d = Dict{Int, Int} d\_unionall = Type{T} where T \<: Dict u = Union{String, Int} u\_unionall = Type{T} where T\>:String isa(d, d\_unionall) # true …

---

## [Likelihood from Turing model](https://discourse.julialang.org/t/likelihood-from-turing-model/102022)

<div class="topic-metadata">

**Author:** [@99dB](https://discourse.julialang.org/u/99dB)\
**Replies:** 6\
**Last updated:** [July 26, 2023, 8:37am UTC](https://discourse.julialang.org/t/likelihood-from-turing-model/102022 "2023-07-26T08:37:47Z")

</div>

Hello all, From the following Turing ODE tutorial: https://turing.ml/v0.22/tutorials/10-bayesian-differential-equations/ I wonder if there is an easy way to compute the likelihood for each ode model variable, directly …

---

## [How To Use Lua and Julia to Create Plugins for Neovim?](https://discourse.julialang.org/t/how-to-use-lua-and-julia-to-create-plugins-for-neovim/101903)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 4\
**Last updated:** [July 26, 2023, 5:49am UTC](https://discourse.julialang.org/t/how-to-use-lua-and-julia-to-create-plugins-for-neovim/101903 "2023-07-26T05:49:07Z")

</div>

Hi all, @ExpandingMan and I had a fun conversation about perhaps one day creating neovim plugins that use Julia. Neovim plugins tend to really be written in Lua or Fennel these days and it got me wondering, how do I cal…

---

## [How to Make Precompiling Faster?](https://discourse.julialang.org/t/how-to-make-precompiling-faster/101865)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 19\
**Last updated:** [July 26, 2023, 4:49am UTC](https://discourse.julialang.org/t/how-to-make-precompiling-faster/101865 "2023-07-26T04:49:44Z")

</div>

I add InteractiveDynamics and the precompilation of OrdinaryDiffEq took 5 hours. What are required to make the precompiling fast? high RAM or internet connection or processor power?

---

## [How to cleanly initialize structure with lots of members](https://discourse.julialang.org/t/how-to-cleanly-initialize-structure-with-lots-of-members/102085)

<div class="topic-metadata">

**Author:** [@hshackle](https://discourse.julialang.org/u/hshackle)\
**Replies:** 6\
**Last updated:** [July 25, 2023, 10:39pm UTC](https://discourse.julialang.org/t/how-to-cleanly-initialize-structure-with-lots-of-members/102085 "2023-07-25T22:39:38Z")

</div>

I have a struct with lots of different members, all of which get initialized in a standard way. Currently, my code looks like struct A a::Int b::Int c::Int function A() a = 1 b = 1 …

---

## [Creating a standalone app on different platforms](https://discourse.julialang.org/t/creating-a-standalone-app-on-different-platforms/102089)

<div class="topic-metadata">

**Author:** [@merlion](https://discourse.julialang.org/u/merlion)\
**Replies:** 2\
**Last updated:** [July 25, 2023, 9:47pm UTC](https://discourse.julialang.org/t/creating-a-standalone-app-on-different-platforms/102089 "2023-07-25T21:47:17Z")

</div>

Apologies if this is slightly off-topic. I hope it’s relevant to more people in the community, and haven’t overlooked any obvious Julia documentation pages to achieve what I’m trying. I’m currently developing some softw…

---

## [Challenge: Can you beat Python and C++ in Int4 Matrix-Vector Multiply Op?](https://discourse.julialang.org/t/challenge-can-you-beat-python-and-c-in-int4-matrix-vector-multiply-op/101588)

<div class="topic-metadata">

**Author:** [@svilupp](https://discourse.julialang.org/u/svilupp)\
**Replies:** 10\
**Last updated:** [July 25, 2023, 9:44pm UTC](https://discourse.julialang.org/t/challenge-can-you-beat-python-and-c-in-int4-matrix-vector-multiply-op/101588 "2023-07-25T21:44:29Z")

</div>

TL;DR How close can we get to 4x speedup if we move from Float16 to Int4 in mat-vec multiply? Hi everyone, It’s challenge time! I’m calling on the Julia community to show Python bitsandbytes (recent release with 2-4x s…

---

## [Multithreading - schedule tasks with dependencies?](https://discourse.julialang.org/t/multithreading-schedule-tasks-with-dependencies/102062)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 2\
**Last updated:** [July 25, 2023, 9:40pm UTC](https://discourse.julialang.org/t/multithreading-schedule-tasks-with-dependencies/102062 "2023-07-25T21:40:41Z")

</div>

My only experience with multithreading is decorating for-loops with Threads.@threads, as well as using the parallelized functions in the ThreadsX package, but I’d like to learn multithreading at a lower level. Suppose I’…

---

## [Variable number of arguments with different types](https://discourse.julialang.org/t/variable-number-of-arguments-with-different-types/102035)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 8\
**Last updated:** [July 25, 2023, 9:36pm UTC](https://discourse.julialang.org/t/variable-number-of-arguments-with-different-types/102035 "2023-07-25T21:36:10Z")

</div>

This might be a strange question, but I really want to know if there is a way to construct a function where the first few variables are Int, while the rest are Float64, so that I can call it using like fn(1, 2, 3.2, 3.4,…

---

## [Why is -t auto not the default for auto-threading? And what to do about it? Would users want it by default?](https://discourse.julialang.org/t/why-is-t-auto-not-the-default-for-auto-threading-and-what-to-do-about-it-would-users-want-it-by-default/101858)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 14\
**Last updated:** [July 25, 2023, 3:20pm UTC](https://discourse.julialang.org/t/why-is-t-auto-not-the-default-for-auto-threading-and-what-to-do-about-it-would-users-want-it-by-default/101858 "2023-07-25T15:20:49Z")

</div>

I realize I can start my program like this: $ julia -t auto test.jl but I would also want to be able to just click on the file to run it (e.g. in Windows, where a file extension should run it with julia for me) or run …

---

## [How to find functions operating on type](https://discourse.julialang.org/t/how-to-find-functions-operating-on-type/101976)

<div class="topic-metadata">

**Author:** [@The\_Mastermage](https://discourse.julialang.org/u/The_Mastermage)\
**Replies:** 13\
**Last updated:** [July 25, 2023, 2:35pm UTC](https://discourse.julialang.org/t/how-to-find-functions-operating-on-type/101976 "2023-07-25T14:35:40Z")

</div>

I did mention in a few prior posts that i am new to Julia so I still have some questions for the best usage. I come from very OO languages like C# and Python where you can simply call all the functions defined on a type…

---

## [Streamplots: Streamlines to be plotted from a streamfunction matrix](https://discourse.julialang.org/t/streamplots-streamlines-to-be-plotted-from-a-streamfunction-matrix/102075)

<div class="topic-metadata">

**Author:** [@Aran](https://discourse.julialang.org/u/Aran)\
**Replies:** 0\
**Last updated:** [July 25, 2023, 12:21pm UTC](https://discourse.julialang.org/t/streamplots-streamlines-to-be-plotted-from-a-streamfunction-matrix/102075 "2023-07-25T12:21:35Z")

</div>

Hello all, I have a streamfunction \\Psi that is known in a matrix from (it has been calculated using finite differences with even gridspaces in x and y), and I am trying to understand how to produce streamline plots in…

---

## [How to normalize the input when solving ODE system by NeuralPDE](https://discourse.julialang.org/t/how-to-normalize-the-input-when-solving-ode-system-by-neuralpde/102045)

<div class="topic-metadata">

**Author:** [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)\
**Replies:** 1\
**Last updated:** [July 25, 2023, 8:55am UTC](https://discourse.julialang.org/t/how-to-normalize-the-input-when-solving-ode-system-by-neuralpde/102045 "2023-07-25T08:55:22Z")

</div>

For training data by the neural network in machine learning, the data should be normalized before using the neural network to train. So do we have any function to normalize (scale) the input before training and solving …

---

## [How do I set --heap-size-hint If start julia with -p 4?](https://discourse.julialang.org/t/how-do-i-set-heap-size-hint-if-start-julia-with-p-4/102052)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 0\
**Last updated:** [July 25, 2023, 2:32am UTC](https://discourse.julialang.org/t/how-do-i-set-heap-size-hint-if-start-julia-with-p-4/102052 "2023-07-25T02:32:12Z")

</div>

Assume the number assigned to heap-size-hint is 100G, will each process share the total 100G or each can use 100G?

---

## [Simplest way to launch a file browser](https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 4\
**Last updated:** [July 25, 2023, 1:08am UTC](https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047 "2023-07-25T01:08:11Z")

</div>

Is there some extremely lighweight package that allows choosing a file that will be an input to a function in some “point and click” way? (It is really hard to make Windows users happy with anything that requires typing…

---

## [WGLMakie via SSH](https://discourse.julialang.org/t/wglmakie-via-ssh/102042)

<div class="topic-metadata">

**Author:** [@lassepe](https://discourse.julialang.org/u/lassepe)\
**Replies:** 0\
**Last updated:** [July 24, 2023, 9:30pm UTC](https://discourse.julialang.org/t/wglmakie-via-ssh/102042 "2023-07-24T21:30:11Z")

</div>

Does anyone here have a working setup for remote plotting with WGLMakie via ssh? Thus far, I have used GLMakie with x-forwarding for this purpose but (i) it is slow and (ii) it crashes when the tmux session is detached b…

---

## [Different results coming from LBFGS in Optim.jl](https://discourse.julialang.org/t/different-results-coming-from-lbfgs-in-optim-jl/102036)

<div class="topic-metadata">

**Author:** [@filipepfarias](https://discourse.julialang.org/u/filipepfarias)\
**Replies:** 2\
**Last updated:** [July 24, 2023, 9:24pm UTC](https://discourse.julialang.org/t/different-results-coming-from-lbfgs-in-optim-jl/102036 "2023-07-24T21:24:38Z")

</div>

I’m trying to reproduce the solution of the LBFGS across different machines, but even under the same environment (same Manifest.toml), I get different minimizers. Is that possible?

---

## [Squeezing max performance out of findlast](https://discourse.julialang.org/t/squeezing-max-performance-out-of-findlast/102041)

<div class="topic-metadata">

**Author:** [@abulak](https://discourse.julialang.org/u/abulak)\
**Replies:** 0\
**Last updated:** [July 24, 2023, 8:33pm UTC](https://discourse.julialang.org/t/squeezing-max-performance-out-of-findlast/102041 "2023-07-24T20:33:21Z")

</div>

Hey, I have a very simple problem: given a vector v::AbstractVector{\<:Integer} I’d like to find the last index idx such that v\[idx\] ≠ idx. Here’s a demo/test function and some benchmarks. I tried several things but can…

---

## [Vulnerability analysis of the julia dependency library](https://discourse.julialang.org/t/vulnerability-analysis-of-the-julia-dependency-library/102039)

<div class="topic-metadata">

**Author:** [@zhenyaylitin](https://discourse.julialang.org/u/zhenyaylitin)\
**Replies:** 0\
**Last updated:** [July 24, 2023, 7:49pm UTC](https://discourse.julialang.org/t/vulnerability-analysis-of-the-julia-dependency-library/102039 "2023-07-24T19:49:51Z")

</div>

Colleagues, good afternoon! Please tell me if there are currently analyzers of libraries of their dependencies for the julia language. For example, python has pip-audit or safity, for the R language there is oysteR. May…

---

## [Solving ODE inside a double for loop](https://discourse.julialang.org/t/solving-ode-inside-a-double-for-loop/101822)

<div class="topic-metadata">

**Author:** [@David\_F](https://discourse.julialang.org/u/David_F)\
**Replies:** 9\
**Last updated:** [July 24, 2023, 1:54pm UTC](https://discourse.julialang.org/t/solving-ode-inside-a-double-for-loop/101822 "2023-07-24T13:54:56Z")

</div>

Hello, I have two for loops, say the outer one iterates on a time variable, and the inner one iterates on a position variable. Inside the position loop, I call ODEproblem() and solve() to get the solution for a system …

---

## [Vcat gives Any](https://discourse.julialang.org/t/vcat-gives-any/102012)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 8\
**Last updated:** [July 24, 2023, 1:49pm UTC](https://discourse.julialang.org/t/vcat-gives-any/102012 "2023-07-24T13:49:38Z")

</div>

v = \[\[1, 2, 3\], \[4, 5\]\] f(v) = vcat(v...) julia\> f(v) 5-element Vector{Int64}: 1 2 3 4 5 julia\> @code\_warntype f(v); MethodInstance for f(::Vector{Vector{Int64}}) from f(v) @ Main REPL\[87\]:1 Arguments #self#:…

---

## [Building Julia from source on WSL2 - Ubuntu](https://discourse.julialang.org/t/building-julia-from-source-on-wsl2-ubuntu/101994)

<div class="topic-metadata">

**Author:** [@C1Ron](https://discourse.julialang.org/u/C1Ron)\
**Replies:** 5\
**Last updated:** [July 24, 2023, 1:46pm UTC](https://discourse.julialang.org/t/building-julia-from-source-on-wsl2-ubuntu/101994 "2023-07-24T13:46:00Z")

</div>

I’ve tried to build Julia v1.9.2 from source following the instructions on Github on WSL2 - Ubuntu. I’m able to build the executable: $ make but when I run $ make testall the process fails with summary: Test Summar…

---

## [Different modules with nested structures](https://discourse.julialang.org/t/different-modules-with-nested-structures/101987)

<div class="topic-metadata">

**Author:** [@Koen](https://discourse.julialang.org/u/Koen)\
**Replies:** 3\
**Last updated:** [July 24, 2023, 10:32am UTC](https://discourse.julialang.org/t/different-modules-with-nested-structures/101987 "2023-07-24T10:32:31Z")

</div>

Consider two functions, function Y and function Z. The parameter values of these functions are stored in two different structures, ParametersY and ParametersZ. Suppose the functions are nested, where Z uses Y. Then it se…

---

## [PSA: when tests fail due to improvements in type-inference](https://discourse.julialang.org/t/psa-when-tests-fail-due-to-improvements-in-type-inference/102001)

<div class="topic-metadata">

**Author:** [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Replies:** 0\
**Last updated:** [July 24, 2023, 8:31am UTC](https://discourse.julialang.org/t/psa-when-tests-fail-due-to-improvements-in-type-inference/102001 "2023-07-24T08:31:32Z")

</div>

I recently went on a bit of a rampage updating packages in the JuliaImages ecosystem, and on Julia 1.10 I noticed quite a few packages that had started failing their tests, with the log reports showing a pattern like thi…

---

## [PlotlyJS fails on WSL2 - Ubuntu](https://discourse.julialang.org/t/plotlyjs-fails-on-wsl2-ubuntu/101992)

<div class="topic-metadata">

**Author:** [@C1Ron](https://discourse.julialang.org/u/C1Ron)\
**Replies:** 1\
**Last updated:** [July 24, 2023, 7:14am UTC](https://discourse.julialang.org/t/plotlyjs-fails-on-wsl2-ubuntu/101992 "2023-07-24T07:14:50Z")

</div>

Running PlotlyJS on WSL2 gives this error: juila\> plotlyjs() julia\> plot(x,y) Error showing value of type Plots.Plot{Plots.PlotlyJSBackend}: ERROR: IOError: connect: connection refused (ECONNREFUSED) I’ve tried install…

---

## [Interface pattern in Julia](https://discourse.julialang.org/t/interface-pattern-in-julia/101964)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 4\
**Last updated:** [July 24, 2023, 12:58am UTC](https://discourse.julialang.org/t/interface-pattern-in-julia/101964 "2023-07-24T00:58:44Z")

</div>

People have been asking for interfacing pattern in Julia, but we do things through multiple dispatch. Here’s how. Imagine you want an interface for an “ordered” type. ordered\_interface(x) = ordered\_interface(typeof(x))…

---

## [How do I do a regression using programatically defined column names?](https://discourse.julialang.org/t/how-do-i-do-a-regression-using-programatically-defined-column-names/101963)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 4\
**Last updated:** [July 24, 2023, 12:44am UTC](https://discourse.julialang.org/t/how-do-i-do-a-regression-using-programatically-defined-column-names/101963 "2023-07-24T00:44:47Z")

</div>

I have a dataframe with many columns. For example, df = DataFrame(A = randn(10), B = randn(10), C = randn(10), D = randn(10)) nms = names(df) I want to do a regression of column A on one or more of the other columns. …

---

## [Having issues speeding up code with multithreading](https://discourse.julialang.org/t/having-issues-speeding-up-code-with-multithreading/101508)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 19\
**Last updated:** [July 16, 2023, 6:14am UTC](https://discourse.julialang.org/t/having-issues-speeding-up-code-with-multithreading/101508 "2023-07-16T06:14:24Z")

</div>

I’m trying to speed up some code that takes subsets of columns from a data matrix and calculates a maximum score. The orginal code is complicated, so I’ve tried to simplfy it was much as possible here: using Combinatori…

---

## [Fast Hessian and Gradient for PINNS using Enzyme/Zygote](https://discourse.julialang.org/t/fast-hessian-and-gradient-for-pinns-using-enzyme-zygote/101993)

<div class="topic-metadata">

**Author:** [@Baba\_Yara\_Fahiz](https://discourse.julialang.org/u/Baba_Yara_Fahiz)\
**Replies:** 0\
**Last updated:** [July 23, 2023, 11:41pm UTC](https://discourse.julialang.org/t/fast-hessian-and-gradient-for-pinns-using-enzyme-zygote/101993 "2023-07-23T23:41:34Z")

</div>

I am working on a problem that involves solving partial differential equations using neural networks. The current bottleneck in my code is computing the gradient and Hessian of batched data. My current implementation us…

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

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