# New to Julia

**URL:** https://discourse.julialang.org/c/first-steps/8.md?page=59

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

**Page:** 60

---

## [How to help reduce package load latency?](https://discourse.julialang.org/t/how-to-help-reduce-package-load-latency/105294)

<div class="topic-metadata">

**Author:** [@orebas](https://discourse.julialang.org/u/orebas)\
**Replies:** 38\
**Last updated:** [December 31, 2023, 11:57pm UTC](https://discourse.julialang.org/t/how-to-help-reduce-package-load-latency/105294 "2023-12-31T23:57:51Z")

</div>

In an effort to reduce package load latency for a slow loading package,I successfully added some precompilation (via @compile\_workload) and it had the desired effect. However, some dependencies are very slow as well, an…

---

## [Undefined variable error in Julia: UndefVarError:castnot defined](https://discourse.julialang.org/t/undefined-variable-error-in-julia-undefvarerror-castnot-defined/108190)

<div class="topic-metadata">

**Author:** [@Mallikarjuna\_G\_B](https://discourse.julialang.org/u/Mallikarjuna_G_B)\
**Replies:** 2\
**Last updated:** [December 30, 2023, 4:17pm UTC](https://discourse.julialang.org/t/undefined-variable-error-in-julia-undefvarerror-castnot-defined/108190 "2023-12-30T16:17:36Z")

</div>

Description: I’m trying to build a transformer-based classifier model in Julia using the TransformersLite package, but I’m encountering an error that says UndefVarError:castnot defined. I’ve updated all of the packages …

---

## [How do i expand anaconda jupyterlab editor window?](https://discourse.julialang.org/t/how-do-i-expand-anaconda-jupyterlab-editor-window/108187)

<div class="topic-metadata">

**Author:** [@awaliaro](https://discourse.julialang.org/u/awaliaro)\
**Replies:** 0\
**Last updated:** [December 30, 2023, 1:18pm UTC](https://discourse.julialang.org/t/how-do-i-expand-anaconda-jupyterlab-editor-window/108187 "2023-12-30T13:18:45Z")

</div>

How do i expand anaconda Jupyterlab editor window?

---

## [Failing to plot correlograms in Julia: Makie vs. AoG vs StatsPlots](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971)

<div class="topic-metadata">

**Author:** [@enzomar](https://discourse.julialang.org/u/enzomar)\
**Replies:** 30\
**Last updated:** [December 30, 2023, 1:00am UTC](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971 "2023-12-30T01:00:47Z")

</div>

I am trying with any possible package to plot a classic correlation plot (scatterplots for each variable vs each other and density histogram on the diagonal in the middle). Sometime they are cold correlogram or pairplots…

---

## [Help with Symbolic Programming](https://discourse.julialang.org/t/help-with-symbolic-programming/107842)

<div class="topic-metadata">

**Author:** [@ContactPatch22](https://discourse.julialang.org/u/ContactPatch22)\
**Replies:** 4\
**Last updated:** [December 29, 2023, 7:38am UTC](https://discourse.julialang.org/t/help-with-symbolic-programming/107842 "2023-12-29T07:38:09Z")

</div>

Hi all, I am new to Julia (coming from Python). I need some help with defining equations and extracting Mass, Stiffness and Damping Matrices. Does anyone have some advice to generate these matrices using the following e…

---

## [Error parsing Dates.DateTime](https://discourse.julialang.org/t/error-parsing-dates-datetime/108135)

<div class="topic-metadata">

**Author:** [@Phebe](https://discourse.julialang.org/u/Phebe)\
**Replies:** 2\
**Last updated:** [December 28, 2023, 9:42pm UTC](https://discourse.julialang.org/t/error-parsing-dates-datetime/108135 "2023-12-28T21:42:53Z")

</div>

I am trying to use the LWFBrook90 model, while running the code below I kept getting an error, can you please help me? model = loadSPAC(input\_path, input\_prefix; simulate\_isotopes = true); ERROR: thread = 1 error parsi…

---

## [Which Krylov package solves A\*x=b where x and b can be any "vector-like" object?](https://discourse.julialang.org/t/which-krylov-package-solves-a-x-b-where-x-and-b-can-be-any-vector-like-object/108121)

<div class="topic-metadata">

**Author:** [@jinfreedom](https://discourse.julialang.org/u/jinfreedom)\
**Replies:** 1\
**Last updated:** [December 28, 2023, 11:25am UTC](https://discourse.julialang.org/t/which-krylov-package-solves-a-x-b-where-x-and-b-can-be-any-vector-like-object/108121 "2023-12-28T11:25:13Z")

</div>

Hi, I would like to solve a linear equation Ax=b with Krylov method. My unknown “vector” x is a multidimensional array wrapped in a custom type that \<:AbstractArray, and my A operator is just a linear map defined on x. S…

---

## [Zygote “double where trick”](https://discourse.julialang.org/t/zygote-double-where-trick/108118)

<div class="topic-metadata">

**Author:** [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Replies:** 0\
**Last updated:** [December 28, 2023, 6:25am UTC](https://discourse.julialang.org/t/zygote-double-where-trick/108118 "2023-12-28T06:25:35Z")

</div>

I spend a lot of time with jax, where I often have to employ the “double where trick” to prevent NaNs from propagating in the backward pass. The Zygote docs mention that arrays should be immutable. So if I want to enfor…

---

## [Enzyme gives 0 derivative when I use temporary array](https://discourse.julialang.org/t/enzyme-gives-0-derivative-when-i-use-temporary-array/108018)

<div class="topic-metadata">

**Author:** [@reusens](https://discourse.julialang.org/u/reusens)\
**Replies:** 4\
**Last updated:** [December 27, 2023, 7:07pm UTC](https://discourse.julialang.org/t/enzyme-gives-0-derivative-when-i-use-temporary-array/108018 "2023-12-27T19:07:31Z")

</div>

I am trying to understand how to use Enzyme. I run the following code: using Enzyme abstract type Layer end mutable struct parameter p::Array end mutable struct Final\<:Layer A::parameter end v=Float32.(randn…

---

## [@view : No bound checkings?](https://discourse.julialang.org/t/view-no-bound-checkings/108068)

<div class="topic-metadata">

**Author:** [@hlbnet](https://discourse.julialang.org/u/hlbnet)\
**Replies:** 13\
**Last updated:** [December 27, 2023, 9:04am UTC](https://discourse.julialang.org/t/view-no-bound-checkings/108068 "2023-12-27T09:04:01Z")

</div>

I am trying the following code. v = Vector{Int8}(1:10) w = @view v\[3:8\] deleteat!(v, 3:8) println(v) w\[4\] = 42 println(w) The result is this: Int8\[1, 2, 9, 10\] Int8\[9, 10, 0, 42, 7, 8\] My question is about the second…

---

## [Flux.withgradient() doesn't work in a CUDA kernel](https://discourse.julialang.org/t/flux-withgradient-doesnt-work-in-a-cuda-kernel/108076)

<div class="topic-metadata">

**Author:** [@ily.idli](https://discourse.julialang.org/u/ily.idli)\
**Replies:** 0\
**Last updated:** [December 27, 2023, 1:24am UTC](https://discourse.julialang.org/t/flux-withgradient-doesnt-work-in-a-cuda-kernel/108076 "2023-12-27T01:24:53Z")

</div>

Hi all, I’m adapting some work for approximations of the Hilbert-Schmidt Independence Criterion (HSIC) from Python to Julia, and part of the code involves optimising which samples should be taken and what the widths of …

---

## [Error during package installation (ADCME)](https://discourse.julialang.org/t/error-during-package-installation-adcme/107824)

<div class="topic-metadata">

**Author:** [@jsbyrnes](https://discourse.julialang.org/u/jsbyrnes)\
**Replies:** 6\
**Last updated:** [December 26, 2023, 1:53pm UTC](https://discourse.julialang.org/t/error-during-package-installation-adcme/107824 "2023-12-26T13:53:54Z")

</div>

I am attempting to install the package ADCME, which is installed when installing ADSeismic. I get an error with ADCME ERROR: Error building ADSeismic: ERROR: LoadError: ADCME is not properly built; run Pkg.build("ADCME…

---

## [Help needed: Building an intuitive understanding of closures, scoping and type-stability](https://discourse.julialang.org/t/help-needed-building-an-intuitive-understanding-of-closures-scoping-and-type-stability/107960)

<div class="topic-metadata">

**Author:** [@Bizzi](https://discourse.julialang.org/u/Bizzi)\
**Replies:** 3\
**Last updated:** [December 26, 2023, 12:30am UTC](https://discourse.julialang.org/t/help-needed-building-an-intuitive-understanding-of-closures-scoping-and-type-stability/107960 "2023-12-26T00:30:20Z")

</div>

Even after quite some time, I still struggle with understanding how to create type-stable wrappers around simple functions. I’ve read the docs, I know that closures in julia use reference semantics instead of value seman…

---

## [Why am I only getting a partial string here?](https://discourse.julialang.org/t/why-am-i-only-getting-a-partial-string-here/108043)

<div class="topic-metadata">

**Author:** [@Kyjor](https://discourse.julialang.org/u/Kyjor)\
**Replies:** 0\
**Last updated:** [December 25, 2023, 10:44pm UTC](https://discourse.julialang.org/t/why-am-i-only-getting-a-partial-string-here/108043 "2023-12-25T22:44:54Z")

</div>

Hello, I’m trying to handle errors using SDL2 and I’m getting some garbled text here when an error is caught and I try to print it. I’m sure there’s something simple I’m doing wrong, but I’m not super familiar with handl…

---

## [Navigating within Julia REPL?](https://discourse.julialang.org/t/navigating-within-julia-repl/107978)

<div class="topic-metadata">

**Author:** [@benslinux](https://discourse.julialang.org/u/benslinux)\
**Replies:** 17\
**Last updated:** [December 24, 2023, 3:03pm UTC](https://discourse.julialang.org/t/navigating-within-julia-repl/107978 "2023-12-24T15:03:00Z")

</div>

"/home/grimm" julia\> julia\> using Pkg julia\> Pkg.generate("HelloWorld") Generating project HelloWorld: HelloWorld/Project.toml HelloWorld/src/HelloWorld.jl Dict{String, Base.UUID} with 1 entry: "HelloWorl…

---

## [Overloading constructor](https://discourse.julialang.org/t/overloading-constructor/107959)

<div class="topic-metadata">

**Author:** [@jabru](https://discourse.julialang.org/u/jabru)\
**Replies:** 2\
**Last updated:** [December 23, 2023, 10:37am UTC](https://discourse.julialang.org/t/overloading-constructor/107959 "2023-12-23T10:37:21Z")

</div>

Hi there, so I am currently working on a Julia script that reads unformatted binary Fortran files. For this, I am using the package “FortranFiles.jl”. After importing, one can create FortranFile objects with the comman…

---

## [How to update learning rate during Flux training in a better manner?](https://discourse.julialang.org/t/how-to-update-learning-rate-during-flux-training-in-a-better-manner/53101)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 7\
**Last updated:** [December 23, 2023, 5:37am UTC](https://discourse.julialang.org/t/how-to-update-learning-rate-during-flux-training-in-a-better-manner/53101 "2023-12-23T05:37:16Z")

</div>

Hi, I am trying to update the training rate during training. I did it with custom training loop like below: using Flux using Flux: @epochs using Flux: Flux.Data.DataLoader M = 10 N = 15 O = 2 X = repeat(1.0:10.0, ou…

---

## [Julia runs in terminal but not in vscode. Pkg manager also does not seem to work](https://discourse.julialang.org/t/julia-runs-in-terminal-but-not-in-vscode-pkg-manager-also-does-not-seem-to-work/107953)

<div class="topic-metadata">

**Author:** [@co1emi11er](https://discourse.julialang.org/u/co1emi11er)\
**Replies:** 6\
**Last updated:** [December 22, 2023, 10:09pm UTC](https://discourse.julialang.org/t/julia-runs-in-terminal-but-not-in-vscode-pkg-manager-also-does-not-seem-to-work/107953 "2023-12-22T22:09:06Z")

</div>

Hello, I am new to Julia and I have installed Julia on my work computer. Everything seems to be working on personal computer, so I think it might be a proxy issue? I can’t run Julia in vscode or add any packages. These …

---

## [Why is functional style so much slower here?](https://discourse.julialang.org/t/why-is-functional-style-so-much-slower-here/107657)

<div class="topic-metadata">

**Author:** [@glebm](https://discourse.julialang.org/u/glebm)\
**Replies:** 8\
**Last updated:** [December 22, 2023, 6:19pm UTC](https://discourse.julialang.org/t/why-is-functional-style-so-much-slower-here/107657 "2023-12-22T18:19:45Z")

</div>

I wrote my first program in Julia today, which is a solution to Advent of Code day 15. I wrote it in a functional style at first and was very surprised with how slow it ran. I narrowed it down to the score functions. H…

---

## [Broken link in Help file](https://discourse.julialang.org/t/broken-link-in-help-file/107938)

<div class="topic-metadata">

**Author:** [@vsoler](https://discourse.julialang.org/u/vsoler)\
**Replies:** 1\
**Last updated:** [December 22, 2023, 9:15am UTC](https://discourse.julialang.org/t/broken-link-in-help-file/107938 "2023-12-22T09:15:11Z")

</div>

I just asked for help on the sort! command. I’m using Jupyter notebooks. On the help provided, there is a link to “Sorting Algorithms” that points to nowhere. Where can I report this problem?

---

## [How to completely reinstall Julia on Mac](https://discourse.julialang.org/t/how-to-completely-reinstall-julia-on-mac/107924)

<div class="topic-metadata">

**Author:** [@Midez](https://discourse.julialang.org/u/Midez)\
**Replies:** 3\
**Last updated:** [December 22, 2023, 1:52am UTC](https://discourse.julialang.org/t/how-to-completely-reinstall-julia-on-mac/107924 "2023-12-22T01:52:30Z")

</div>

Hello everyone, somehow I managed to render Julia completely useless on My Mac (it happened when I tried to update Julia to a newer version via this thread) Now every time I try to work with Julia I get the error messa…

---

## [UndefVarError: \`savefig\` not defined](https://discourse.julialang.org/t/undefvarerror-savefig-not-defined/107928)

<div class="topic-metadata">

**Author:** [@Midez](https://discourse.julialang.org/u/Midez)\
**Replies:** 5\
**Last updated:** [December 21, 2023, 10:30pm UTC](https://discourse.julialang.org/t/undefvarerror-savefig-not-defined/107928 "2023-12-21T22:30:58Z")

</div>

Hello everyone, After a long run and installing the newest version of Julia (1.9) I still get a frustrating error (that I have written in the title) when trying to save a figure Here is my plain code (minimal example) …

---

## [Why do I get this error when ever I add a new package?](https://discourse.julialang.org/t/why-do-i-get-this-error-when-ever-i-add-a-new-package/107921)

<div class="topic-metadata">

**Author:** [@Sabe](https://discourse.julialang.org/u/Sabe)\
**Replies:** 8\
**Last updated:** [December 21, 2023, 9:40pm UTC](https://discourse.julialang.org/t/why-do-i-get-this-error-when-ever-i-add-a-new-package/107921 "2023-12-21T21:40:14Z")

</div>

ok so whenever I add a new package to a project no matter what it is when I try to run it I get this ERROR: LoadError: ArgumentError: Package X not found in current path. even though I did \] add X right now I am using sd…

---

## [IJulia hide code cells in notebook](https://discourse.julialang.org/t/ijulia-hide-code-cells-in-notebook/20622)

<div class="topic-metadata">

**Author:** [@lucabrugnolini](https://discourse.julialang.org/u/lucabrugnolini)\
**Replies:** 5\
**Last updated:** [December 21, 2023, 7:38pm UTC](https://discourse.julialang.org/t/ijulia-hide-code-cells-in-notebook/20622 "2023-12-21T19:38:46Z")

</div>

Hi, I am trying to hide the code cells in an IJulia notebook to show only the markdown text, fig, and tables in the output. Here is an example with the IPython: http://chris-said.io/2016/02/13/how-to-make-polished-jup…

---

## [Pivoting results](https://discourse.julialang.org/t/pivoting-results/107914)

<div class="topic-metadata">

**Author:** [@brianhfield](https://discourse.julialang.org/u/brianhfield)\
**Replies:** 3\
**Last updated:** [December 21, 2023, 3:55pm UTC](https://discourse.julialang.org/t/pivoting-results/107914 "2023-12-21T15:55:57Z")

</div>

df = DataFrame(); df\[!,:Vintage\] = \["2021-01-31","2021-01-31","2021-01-31","2021-02-28","2021-02-28", "2021-03-31","2021-04-30","2021-04-30"\]; df\[!,:Grade\] = \["A","B","C","C","A","B","C","D"\]; df\[!,:Amt\] = \[2000000,9…

---

## [Implicit plot with plots](https://discourse.julialang.org/t/implicit-plot-with-plots/6585)

<div class="topic-metadata">

**Author:** [@harven](https://discourse.julialang.org/u/harven)\
**Replies:** 17\
**Last updated:** [December 20, 2023, 4:29pm UTC](https://discourse.julialang.org/t/implicit-plot-with-plots/6585 "2023-12-20T16:29:28Z")

</div>

How do I make an implicit plot with the plots package? pyplot has a contour function which admits a fourth argument to plot a single level line. But it does not seem to be implemented in plots.

---

## [Fill an instance of a function with a "." syntax (e.g. mod.fit(x, y))](https://discourse.julialang.org/t/fill-an-instance-of-a-function-with-a-syntax-e-g-mod-fit-x-y/107847)

<div class="topic-metadata">

**Author:** [@matnbo](https://discourse.julialang.org/u/matnbo)\
**Replies:** 2\
**Last updated:** [December 20, 2023, 1:09pm UTC](https://discourse.julialang.org/t/fill-an-instance-of-a-function-with-a-syntax-e-g-mod-fit-x-y/107847 "2023-12-20T13:09:07Z")

</div>

Dear all In the simplified example below, I have the following syntax where I build an instance of a given function “foo”. I named this instance “mod” (but this name can vary) and, in this instance, I fill the sub-obje…

---

## [I'm new to Julia Programming Languages from an Asian country](https://discourse.julialang.org/t/im-new-to-julia-programming-languages-from-an-asian-country/107854)

<div class="topic-metadata">

**Author:** [@giriprasathd](https://discourse.julialang.org/u/giriprasathd)\
**Replies:** 1\
**Last updated:** [December 20, 2023, 1:29pm UTC](https://discourse.julialang.org/t/im-new-to-julia-programming-languages-from-an-asian-country/107854 "2023-12-20T13:29:20Z")

</div>

Hello Julia Programmers, I need guidance to learning Julia programming languages, What is the job opportunities, where i can able to find jobs, any online courses or youtube videos.

---

## [Gmsh generator under loop](https://discourse.julialang.org/t/gmsh-generator-under-loop/91726)

<div class="topic-metadata">

**Author:** [@AniMondal](https://discourse.julialang.org/u/AniMondal)\
**Replies:** 3\
**Last updated:** [December 20, 2023, 11:48am UTC](https://discourse.julialang.org/t/gmsh-generator-under-loop/91726 "2023-12-20T11:48:09Z")

</div>

Hello all, I am a begineer to Julia! I want to create three .vtk files. To do that, first I want to create three .msh files. The three .msh files should be generated under a for loop. To do so, I am running this Julia …

---

## [@btime does not work properly](https://discourse.julialang.org/t/btime-does-not-work-properly/107825)

<div class="topic-metadata">

**Author:** [@vsoler](https://discourse.julialang.org/u/vsoler)\
**Replies:** 3\
**Last updated:** [December 19, 2023, 5:39pm UTC](https://discourse.julialang.org/t/btime-does-not-work-properly/107825 "2023-12-19T17:39:24Z")

</div>

I am astonished by how the @btime (BenchmarkTools) macro works (or misworks). I have the following simple program, which read quotes from the S&P500 index and from Microsoft. using MarketData, DataFrames, BenchmarkTool…

[Previous page](https://discourse.julialang.org/c/first-steps/8.md?page=58)

[Next page](https://discourse.julialang.org/c/first-steps/8.md?page=60)
