# New to Julia

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

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

**Page:** 9

---

## [How can I find line number of source code for ERROR?](https://discourse.julialang.org/t/how-can-i-find-line-number-of-source-code-for-error/132787)

<div class="topic-metadata">

**Author:** [@psalm1750](https://discourse.julialang.org/u/psalm1750)\
**Replies:** 12\
**Last updated:** [October 1, 2025, 2:18pm UTC](https://discourse.julialang.org/t/how-can-i-find-line-number-of-source-code-for-error/132787 "2025-10-01T14:18:55Z")

</div>

I am writing Julia code for some small project. But it seems that Julia script engine (/usr/bin/julia) does not display the line number for error detection. Althought it shows a line number, it is not the place where t…

---

## [Whitespace effects in x+1](https://discourse.julialang.org/t/whitespace-effects-in-x-1/132783)

<div class="topic-metadata">

**Author:** [@Tigerbyte](https://discourse.julialang.org/u/Tigerbyte)\
**Replies:** 5\
**Last updated:** [September 30, 2025, 4:38pm UTC](https://discourse.julialang.org/t/whitespace-effects-in-x-1/132783 "2025-09-30T16:38:30Z")

</div>

Other than violating WYSIWYG here and there, Julia is awesome. An example of this, to me is when x +1 is broken, but x + 1 works. and x+1 works \[ 1 +x for x in 1:3\] Adding in lots of blanks would be a good rule o…

---

## [Understanding map/mapslices/eachslice/stack](https://discourse.julialang.org/t/understanding-map-mapslices-eachslice-stack/132744)

<div class="topic-metadata">

**Author:** [@Boris](https://discourse.julialang.org/u/Boris)\
**Replies:** 2\
**Last updated:** [September 29, 2025, 2:22pm UTC](https://discourse.julialang.org/t/understanding-map-mapslices-eachslice-stack/132744 "2025-09-29T14:22:49Z")

</div>

Hi, I’ve been trying to learn to use mapslices and don’t understand the synthax/errors for my use case. Suppose I have # MWE sb = \[true false false; false false false; true true true\] # dimensions (k \\times j) yh = ran…

---

## [Installation Issue of Python Package using CondaPkg.jl](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504)

<div class="topic-metadata">

**Author:** [@Jiongci](https://discourse.julialang.org/u/Jiongci)\
**Replies:** 10\
**Last updated:** [September 29, 2025, 3:11am UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504 "2025-09-29T03:11:59Z")

</div>

Hello, I am recently using CondaPkg.jl to manage a conda environment in a Julia Package. However, when I tried CondaPkg.add\_pip(“fairchem-core”; version=“==2.6.0”) to install the latest Fairchem package, it failed and s…

---

## [Vectorization of "complex" loops](https://discourse.julialang.org/t/vectorization-of-complex-loops/132681)

<div class="topic-metadata">

**Author:** [@eduardomartini](https://discourse.julialang.org/u/eduardomartini)\
**Replies:** 15\
**Last updated:** [September 27, 2025, 8:18pm UTC](https://discourse.julialang.org/t/vectorization-of-complex-loops/132681 "2025-09-27T20:18:51Z")

</div>

Hi, First and foremost, thanks to everyone involved in advancing Julia. I recently started testing it out, and I am having lots of fun :slight\_smile:. I am not sure if this is the proper forum for this question, but sin…

---

## [Local variable inside a loop: why it ERRORs](https://discourse.julialang.org/t/local-variable-inside-a-loop-why-it-errors/132501)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 14\
**Last updated:** [September 27, 2025, 12:30pm UTC](https://discourse.julialang.org/t/local-variable-inside-a-loop-why-it-errors/132501 "2025-09-27T12:30:41Z")

</div>

Dear all: I wonder why is the UndefVarError, and, is the Suggestion accurate? julia\> function test(C) count = 1 v = Function\[\] while count \< C local item f…

---

## [Any workaround to a bug in Base.cp?](https://discourse.julialang.org/t/any-workaround-to-a-bug-in-base-cp/59698)

<div class="topic-metadata">

**Author:** [@asyrov](https://discourse.julialang.org/u/asyrov)\
**Replies:** 2\
**Last updated:** [April 20, 2021, 9:43pm UTC](https://discourse.julialang.org/t/any-workaround-to-a-bug-in-base-cp/59698 "2021-04-20T21:43:38Z")

</div>

I’m trying to copy large (few GB) file using cp and the call fails with sendfile: unknown system error -208860302. This bug appears to be open already (IOError from cp with large file on Windows · Issue #30723 · JuliaLan…

---

## [I'm getting a ParseError and I dont know why](https://discourse.julialang.org/t/im-getting-a-parseerror-and-i-dont-know-why/132627)

<div class="topic-metadata">

**Author:** [@Queenvictoria](https://discourse.julialang.org/u/Queenvictoria)\
**Replies:** 5\
**Last updated:** [September 25, 2025, 9:25am UTC](https://discourse.julialang.org/t/im-getting-a-parseerror-and-i-dont-know-why/132627 "2025-09-25T09:25:27Z")

</div>

I’m writing a function and I keep getting this error message: LoadError: ParseError: # Error @ ./mixed-juices.jl:52:14 if length(orders) \< 1 # ┌─────── time left = 0 end #──┘ ── Expected \`end\` W…

---

## [Problems using Plots.jl](https://discourse.julialang.org/t/problems-using-plots-jl/132623)

<div class="topic-metadata">

**Author:** [@Roy\_Eisenberg](https://discourse.julialang.org/u/Roy_Eisenberg)\
**Replies:** 10\
**Last updated:** [September 25, 2025, 5:47am UTC](https://discourse.julialang.org/t/problems-using-plots-jl/132623 "2025-09-25T05:47:31Z")

</div>

So I am creating a gif of a Julia set zoom using the Plots.jl package (gr backend), and there are two problems I am unable to solve: Firstly, the plot doesn’t cover the entire window despite removing the axes and legend…

---

## [How do I access the elements of a set?](https://discourse.julialang.org/t/how-do-i-access-the-elements-of-a-set/132613)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 3\
**Last updated:** [September 24, 2025, 7:44am UTC](https://discourse.julialang.org/t/how-do-i-access-the-elements-of-a-set/132613 "2025-09-24T07:44:03Z")

</div>

Hello, I defined a set as below: S = Set(\[11, 13, 17, 19\]) How can I access the set element: julia\> S\[1\] ERROR: MethodError: no method matching getindex(::Set{Int64}, ::Int64) Stacktrace: \[1\] top-level scope @ RE…

---

## [Understanding the Lux.jl + ReverseDiff TrackedArray Warning in UDEs](https://discourse.julialang.org/t/understanding-the-lux-jl-reversediff-trackedarray-warning-in-udes/132488)

<div class="topic-metadata">

**Author:** [@guscaldas](https://discourse.julialang.org/u/guscaldas)\
**Replies:** 2\
**Last updated:** [September 22, 2025, 1:47pm UTC](https://discourse.julialang.org/t/understanding-the-lux-jl-reversediff-trackedarray-warning-in-udes/132488 "2025-09-22T13:47:43Z")

</div>

Hello everyone, I’m working with Universal Differential Equations (UDEs) using Lux.jl and Optimization.jl, and I consistently encounter the following warning when the training process begins. This also happens when runn…

---

## [Confusing about -e and CLI use (relates to package precompilation)](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526)

<div class="topic-metadata">

**Author:** [@dankelley](https://discourse.julialang.org/u/dankelley)\
**Replies:** 5\
**Last updated:** [September 21, 2025, 1:20pm UTC](https://discourse.julialang.org/t/confusing-about-e-and-cli-use-relates-to-package-precompilation/132526 "2025-09-21T13:20:11Z")

</div>

I’m trying to use the documenter package with a github action (for a crude package I’m trying to construct GitHub - dankelley/OceanAnalysis.jl: Julia code for oceanographic analysis), and am seeing problems with building…

---

## [Good way to parametrize over type parameter?](https://discourse.julialang.org/t/good-way-to-parametrize-over-type-parameter/132533)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 4\
**Last updated:** [September 21, 2025, 12:27pm UTC](https://discourse.julialang.org/t/good-way-to-parametrize-over-type-parameter/132533 "2025-09-21T12:27:28Z")

</div>

Hi, I’m writing a numerical code that is parametrized by T, which is typically T=Float64 but could be one of the other number types. It’s a PDE solver so I’ve got a bunch of other types I call “geometries”, say A{T}, B{…

---

## [Issue with rewriting by projecting out the body of a loop](https://discourse.julialang.org/t/issue-with-rewriting-by-projecting-out-the-body-of-a-loop/132520)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 5\
**Last updated:** [September 20, 2025, 9:01am UTC](https://discourse.julialang.org/t/issue-with-rewriting-by-projecting-out-the-body-of-a-loop/132520 "2025-09-20T09:01:12Z")

</div>

inspired by this observation Local variable inside a loop: why it ERRORs - #6 by sgaure, I come up with this comparative test, and wonder why they lead to distinct result function test() v = Function\[\] for i = 1…

---

## [Seek efficient fast manipulation of power series](https://discourse.julialang.org/t/seek-efficient-fast-manipulation-of-power-series/132084)

<div class="topic-metadata">

**Author:** [@TonyRoberts](https://discourse.julialang.org/u/TonyRoberts)\
**Replies:** 19\
**Last updated:** [September 19, 2025, 12:36am UTC](https://discourse.julialang.org/t/seek-efficient-fast-manipulation-of-power-series/132084 "2025-09-19T00:36:14Z")

</div>

I am investigating changing from Reduce computer algebra to Julia symbolics. My main first need is efficient manipulation of power series (aiming for multiple small variables, and coefficients being complicated algebr…

---

## [Method lookup: why does this not fail for zygote adjoint overload](https://discourse.julialang.org/t/method-lookup-why-does-this-not-fail-for-zygote-adjoint-overload/132498)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 1\
**Last updated:** [September 18, 2025, 7:54pm UTC](https://discourse.julialang.org/t/method-lookup-why-does-this-not-fail-for-zygote-adjoint-overload/132498 "2025-09-18T19:54:30Z")

</div>

when a module foo does have Zygote to take AD, how come @eval foo f'not fail: using Zygote module foo f(x) = sin(x) end using .foo @eval foo f'(1.2) - cos(1.2) src code is at Zygote.jl/src/compiler/interface.jl a…

---

## [Why won't julia ERROR if a variable is not defined when scheduling?](https://discourse.julialang.org/t/why-wont-julia-error-if-a-variable-is-not-defined-when-scheduling/132438)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 22\
**Last updated:** [September 18, 2025, 7:01am UTC](https://discourse.julialang.org/t/why-wont-julia-error-if-a-variable-is-not-defined-when-scheduling/132438 "2025-09-18T07:01:22Z")

</div>

I’m very confused by this behavior: # start a new julia REPL julia\> function work(b) sleep(3) println(b) end; julia\> function main() t = Task(() -\> work(c)) schedule(t…

---

## [How do I define a structure inside a function?](https://discourse.julialang.org/t/how-do-i-define-a-structure-inside-a-function/132379)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 8\
**Last updated:** [September 15, 2025, 9:47pm UTC](https://discourse.julialang.org/t/how-do-i-define-a-structure-inside-a-function/132379 "2025-09-15T21:47:33Z")

</div>

Hello, I want to define a structure inside a function: function PrintDate(d::Date) struct Date day::Int64 month::String year::Int64 end println(d.day,d.month,d.year) end chmas = Da…

---

## [DifferentialEquations.jl return errors](https://discourse.julialang.org/t/differentialequations-jl-return-errors/131481)

<div class="topic-metadata">

**Author:** [@Lord\_Xaradar](https://discourse.julialang.org/u/Lord_Xaradar)\
**Replies:** 9\
**Last updated:** [September 16, 2025, 1:58pm UTC](https://discourse.julialang.org/t/differentialequations-jl-return-errors/131481 "2025-09-16T13:58:05Z")

</div>

I got such output after istlalling DifferentialEquations.jl package: “”" Precompiling project… ✗ OrdinaryDiffEqRosenbrock ✗ OrdinaryDiffEqDefault ✗ OrdinaryDiffEq ✗ DelayDiffEq ✗ DifferentialEquations 31 dependen…

---

## [Package installation errors for new computer, but working on previous computer](https://discourse.julialang.org/t/package-installation-errors-for-new-computer-but-working-on-previous-computer/132421)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 1\
**Last updated:** [September 16, 2025, 2:15am UTC](https://discourse.julialang.org/t/package-installation-errors-for-new-computer-but-working-on-previous-computer/132421 "2025-09-16T02:15:37Z")

</div>

Hi, I am doing a new installation of Julia on a new (Windows 11 Pro) Laptop, using programs that run well on my previous desktop computer, and I’m getting a compilation error after adding (and first using) a package that…

---

## [Array components in Dyad](https://discourse.julialang.org/t/array-components-in-dyad/132382)

<div class="topic-metadata">

**Author:** [@junsin0106](https://discourse.julialang.org/u/junsin0106)\
**Replies:** 2\
**Last updated:** [September 16, 2025, 1:58am UTC](https://discourse.julialang.org/t/array-components-in-dyad/132382 "2025-09-16T01:58:54Z")

</div>

Hello, I’m currently modeling a nitrogen hydraulic system, and I have an issue when trying to create an array of components using a for loop. A simple model (Test\_No\_List) runs without any problems. However, the model …

---

## [" Warning: Replacing docs for ... " repeated](https://discourse.julialang.org/t/warning-replacing-docs-for-repeated/132396)

<div class="topic-metadata">

**Author:** [@JJMerelo](https://discourse.julialang.org/u/JJMerelo)\
**Replies:** 2\
**Last updated:** [September 15, 2025, 3:13pm UTC](https://discourse.julialang.org/t/warning-replacing-docs-for-repeated/132396 "2025-09-15T15:13:54Z")

</div>

Hi After introducing a test for a function, this one """ mutation\_operator(offspring, mutation\_percentage) Apply mutation to \`offspring\` based on \`mutation\_percentage\`. """ function mutation\_operator(offspring, mu…

---

## [Red output from @code\_warntype on my custom structures](https://discourse.julialang.org/t/red-output-from-code-warntype-on-my-custom-structures/132395)

<div class="topic-metadata">

**Author:** [@Boris](https://discourse.julialang.org/u/Boris)\
**Replies:** 0\
**Last updated:** [September 15, 2025, 12:04pm UTC](https://discourse.julialang.org/t/red-output-from-code-warntype-on-my-custom-structures/132395 "2025-09-15T12:04:14Z")

</div>

Hi. Long story short, I have some custom types in my code and if I do @code\_warntype on the functions that use them I see them in red. Nothing else is red, there are no Any or weird unions, just the color of the struct…

---

## [Can a function know if it called with a "!" in the name?](https://discourse.julialang.org/t/can-a-function-know-if-it-called-with-a-in-the-name/132343)

<div class="topic-metadata">

**Author:** [@dankelley](https://discourse.julialang.org/u/dankelley)\
**Replies:** 10\
**Last updated:** [September 13, 2025, 2:32pm UTC](https://discourse.julialang.org/t/can-a-function-know-if-it-called-with-a-in-the-name/132343 "2025-09-13T14:32:35Z")

</div>

I’m writing a specialized plotting function (let’s call it A(), say) that does quite a lot of logic, and then calls plot() to generate a new plot. Is there a way that I can make a paired function (let’s call it A!(), s…

---

## [Observe: no window created; process returns to prompt with no visible UI.Need Assistance on Ui visibility on my julia code](https://discourse.julialang.org/t/observe-no-window-created-process-returns-to-prompt-with-no-visible-ui-need-assistance-on-ui-visibility-on-my-julia-code/132314)

<div class="topic-metadata">

**Author:** [@adrian-254](https://discourse.julialang.org/u/adrian-254)\
**Replies:** 2\
**Last updated:** [September 12, 2025, 5:10pm UTC](https://discourse.julialang.org/t/observe-no-window-created-process-returns-to-prompt-with-no-visible-ui-need-assistance-on-ui-visibility-on-my-julia-code/132314 "2025-09-12T17:10:11Z")

</div>

I created a boid simulation using julia and the pkgs i used were Gamezero and Colors, but i cant view my code and i dont know what is wrong with it, i’ve hosted it on my github and here is the repo link GitHub - adrian-2…

---

## [Question about translating R code to Julia](https://discourse.julialang.org/t/question-about-translating-r-code-to-julia/132301)

<div class="topic-metadata">

**Author:** [@mpampuch](https://discourse.julialang.org/u/mpampuch)\
**Replies:** 3\
**Last updated:** [September 11, 2025, 8:26pm UTC](https://discourse.julialang.org/t/question-about-translating-r-code-to-julia/132301 "2025-09-11T20:26:53Z")

</div>

I am working on improving a Bioconductor package for analyzing high-throughput genetic assays by porting it from R to Julia. Currently it works well on statistical benchmarks, but one of the main limitations is speed, wh…

---

## [LinkFunctions.jl: help with package development and registration](https://discourse.julialang.org/t/linkfunctions-jl-help-with-package-development-and-registration/132296)

<div class="topic-metadata">

**Author:** [@giovannitinervia9](https://discourse.julialang.org/u/giovannitinervia9)\
**Replies:** 2\
**Last updated:** [September 11, 2025, 5:12pm UTC](https://discourse.julialang.org/t/linkfunctions-jl-help-with-package-development-and-registration/132296 "2025-09-11T17:12:43Z")

</div>

Hi everyone, I’m a new Julia user currently learning the language, and I’m interested in developing packages for distribution regression model fitting. For this work, I need to use link functions, which are implemented …

---

## [Could we wrangle breaking changes by moving the old code from core out to a library and let multiple dispatch handle it?](https://discourse.julialang.org/t/could-we-wrangle-breaking-changes-by-moving-the-old-code-from-core-out-to-a-library-and-let-multiple-dispatch-handle-it/132265)

<div class="topic-metadata">

**Author:** [@rnblough](https://discourse.julialang.org/u/rnblough)\
**Replies:** 7\
**Last updated:** [September 11, 2025, 12:50pm UTC](https://discourse.julialang.org/t/could-we-wrangle-breaking-changes-by-moving-the-old-code-from-core-out-to-a-library-and-let-multiple-dispatch-handle-it/132265 "2025-09-11T12:50:11Z")

</div>

I was reading a blog post extolling the virtues of multiple dispatch and Pkg.jl alongside a post about what’s bad in Julia from the same place, and a thought occurred to me: Imagine some library implemented a different …

---

## [How do I stop pkg\> up from breaking my ControlSystems environment?](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252)

<div class="topic-metadata">

**Author:** [@Eventine](https://discourse.julialang.org/u/Eventine)\
**Replies:** 13\
**Last updated:** [September 11, 2025, 11:55am UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252 "2025-09-11T11:55:35Z")

</div>

Hi, I’m quite new to Julia. I’m using ControlSystems a lot but I have several issues with it. In particular, when I’m doing \] up (I’m generally doing it for other reasons not related to ControlSystems), ControlSystems …

---

## [How to communicate matrices et al between Julia and Reduce using Reduce.jl](https://discourse.julialang.org/t/how-to-communicate-matrices-et-al-between-julia-and-reduce-using-reduce-jl/132199)

<div class="topic-metadata">

**Author:** [@TonyRoberts](https://discourse.julialang.org/u/TonyRoberts)\
**Replies:** 8\
**Last updated:** [September 9, 2025, 9:07pm UTC](https://discourse.julialang.org/t/how-to-communicate-matrices-et-al-between-julia-and-reduce-using-reduce-jl/132199 "2025-09-09T21:07:39Z")

</div>

One way forward for me is to combine the power of Reduce-algebra with Julia numerics. The Reduce.jl package should enable this. A crucial first step is to be able to communicate matrices of numbers between Julia and R…

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

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