# New to Julia

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

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

**Page:** 15

---

## [Varinfo() not working on script](https://discourse.julialang.org/t/varinfo-not-working-on-script/129365)

<div class="topic-metadata">

**Author:** [@stefaniecg](https://discourse.julialang.org/u/stefaniecg)\
**Replies:** 4\
**Last updated:** [May 27, 2025, 8:58am UTC](https://discourse.julialang.org/t/varinfo-not-working-on-script/129365 "2025-05-27T08:58:26Z")

</div>

I run the below script via command line: julia script.jl. # file name: script.jl a = 1 b = 2 c = a + b varinfo() My problem is that the varinfo() does not run in terminal, i get the following error: ERROR: LoadError: …

---

## [Condition number of sparse matrix](https://discourse.julialang.org/t/condition-number-of-sparse-matrix/77131)

<div class="topic-metadata">

**Author:** [@jecs](https://discourse.julialang.org/u/jecs)\
**Replies:** 6\
**Last updated:** [May 27, 2025, 7:08am UTC](https://discourse.julialang.org/t/condition-number-of-sparse-matrix/77131 "2025-05-27T07:08:48Z")

</div>

Hello. Early adopter (v0.4-v0.5) coming back to Julia after wrangling with other languages for too long. I am trying to compute the condition number of a sparse matrix but cannot find a method overloaded for sparse matr…

---

## [Ferrite.jl Stokes Flow Example: Windows-Specific File Locking Issue](https://discourse.julialang.org/t/ferrite-jl-stokes-flow-example-windows-specific-file-locking-issue/129099)

<div class="topic-metadata">

**Author:** [@sumor](https://discourse.julialang.org/u/sumor)\
**Replies:** 3\
**Last updated:** [May 27, 2025, 2:43am UTC](https://discourse.julialang.org/t/ferrite-jl-stokes-flow-example-windows-specific-file-locking-issue/129099 "2025-05-27T02:43:28Z")

</div>

Hello everyone, I’m a begineer to Julia! I’m working through the Stokes flow tutorial using Ferrite.jl and encountering an issue specifically on my Windows machine. The example code stokes-flow.jl runs fine on Linux (e.…

---

## [ApproxFun with Robin boundary conditions](https://discourse.julialang.org/t/approxfun-with-robin-boundary-conditions/113938)

<div class="topic-metadata">

**Author:** [@HankelGretel](https://discourse.julialang.org/u/HankelGretel)\
**Replies:** 8\
**Last updated:** [May 26, 2025, 10:33pm UTC](https://discourse.julialang.org/t/approxfun-with-robin-boundary-conditions/113938 "2025-05-26T22:33:51Z")

</div>

Hi, I am new to Julia and am interested in using the ApproxFun package to solve 1D boundary value problems. I found interesting examples here : ApproxFunExamples/PDEs/Manipulate ODEs and PDEs.ipynb at master · JuliaAppr…

---

## [Beginner | Basic Cyclic Scheduling | New To Julia and Scheduling](https://discourse.julialang.org/t/beginner-basic-cyclic-scheduling-new-to-julia-and-scheduling/129344)

<div class="topic-metadata">

**Author:** [@Ely](https://discourse.julialang.org/u/Ely)\
**Replies:** 8\
**Last updated:** [May 26, 2025, 5:32pm UTC](https://discourse.julialang.org/t/beginner-basic-cyclic-scheduling-new-to-julia-and-scheduling/129344 "2025-05-26T17:32:13Z")

</div>

Hi, i am trying to work on some cyclic scheduling problems with CPLEX and Julia and i need to admit i am quite new to both. Any idea please how a similar program can be solved: With the following data: Tasks from 1…

---

## [How can i make Julia array index to start from zero 0 and not from one 1?](https://discourse.julialang.org/t/how-can-i-make-julia-array-index-to-start-from-zero-0-and-not-from-one-1/129268)

<div class="topic-metadata">

**Author:** [@stefaniecg](https://discourse.julialang.org/u/stefaniecg)\
**Replies:** 31\
**Last updated:** [May 25, 2025, 12:27pm UTC](https://discourse.julialang.org/t/how-can-i-make-julia-array-index-to-start-from-zero-0-and-not-from-one-1/129268 "2025-05-25T12:27:31Z")

</div>

For a = \[0,1,2\] the index starts at a\[1\]=0 I want all my arrays to allways start at index zero a\[0\]=0. How can configure Julia to do this?

---

## [The question about Turing likelihood](https://discourse.julialang.org/t/the-question-about-turing-likelihood/129293)

<div class="topic-metadata">

**Author:** [@Cyan](https://discourse.julialang.org/u/Cyan)\
**Replies:** 3\
**Last updated:** [May 24, 2025, 7:24pm UTC](https://discourse.julialang.org/t/the-question-about-turing-likelihood/129293 "2025-05-24T19:24:41Z")

</div>

Hi, all. I am new to Julia, I am trying to fit an image model, I aim to minimize the model image and observed image: minimize(sum(model\_intensity - data\_obs)) both model\_intensity and data\_obs are 2d-array. I am not s…

---

## [A type error of Turing](https://discourse.julialang.org/t/a-type-error-of-turing/129279)

<div class="topic-metadata">

**Author:** [@Cyan](https://discourse.julialang.org/u/Cyan)\
**Replies:** 3\
**Last updated:** [May 23, 2025, 4:23pm UTC](https://discourse.julialang.org/t/a-type-error-of-turing/129279 "2025-05-23T16:23:27Z")

</div>

I want to use Turing to fit parameters from my costume function like function sersic2d(x, y; I\_e::Float64=1.0, r\_e::Float64=1.0, n::Float64=1.0, x0::Float64=1.0, y0::Float64=1.0) r = sqrt.((x .- x0) .^ 2 .+ (y .- y0…

---

## [Distributed Performance Degradation](https://discourse.julialang.org/t/distributed-performance-degradation/129246)

<div class="topic-metadata">

**Author:** [@Rbthn](https://discourse.julialang.org/u/Rbthn)\
**Replies:** 5\
**Last updated:** [May 23, 2025, 9:32am UTC](https://discourse.julialang.org/t/distributed-performance-degradation/129246 "2025-05-23T09:32:18Z")

</div>

Hi everyone! I’m investigating the parallel performance of my code and discovered some behavior I’m not sure I completely understand. I’m using Distributed with worker processes on a single machine. In a MWE, I’m solvi…

---

## [Automatically generate default instances for all concrete subtypes of a type](https://discourse.julialang.org/t/automatically-generate-default-instances-for-all-concrete-subtypes-of-a-type/129212)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 6\
**Last updated:** [May 21, 2025, 12:21pm UTC](https://discourse.julialang.org/t/automatically-generate-default-instances-for-all-concrete-subtypes-of-a-type/129212 "2025-05-21T12:21:29Z")

</div>

TL; DR: for a given abstract type, generate a vector/tuple/whatever containing a default instance for each of its concrete subtypes. un-XY: I have several concrete types that subtype an abstract supertype (possibly indi…

---

## [Mapreduce with multiple arguments](https://discourse.julialang.org/t/mapreduce-with-multiple-arguments/129158)

<div class="topic-metadata">

**Author:** [@emmacooper](https://discourse.julialang.org/u/emmacooper)\
**Replies:** 2\
**Last updated:** [May 19, 2025, 9:05pm UTC](https://discourse.julialang.org/t/mapreduce-with-multiple-arguments/129158 "2025-05-19T21:05:38Z")

</div>

A similar question was asked in “Method of Mapreduce with multiple arguments” but my implementation of the solution offered in this post did not seem to work. The problem: I have many TimeArrays (created using TimeSerie…

---

## [Intermediate Development Workflow](https://discourse.julialang.org/t/intermediate-development-workflow/128903)

<div class="topic-metadata">

**Author:** [@stevenhughes](https://discourse.julialang.org/u/stevenhughes)\
**Replies:** 8\
**Last updated:** [May 17, 2025, 1:53pm UTC](https://discourse.julialang.org/t/intermediate-development-workflow/128903 "2025-05-17T13:53:30Z")

</div>

Hi Everyone, I am relatively new to Julia, I’ve been using it for a few months. In the first month, I was able to write several thousand lines of code and solve some problems that took far longer in other languages. I…

---

## [How to use protected characters in a string (e.g. percent in printf)](https://discourse.julialang.org/t/how-to-use-protected-characters-in-a-string-e-g-percent-in-printf/67239)

<div class="topic-metadata">

**Author:** [@hdcpereira](https://discourse.julialang.org/u/hdcpereira)\
**Replies:** 1\
**Last updated:** [August 28, 2021, 6:25pm UTC](https://discourse.julialang.org/t/how-to-use-protected-characters-in-a-string-e-g-percent-in-printf/67239 "2021-08-28T18:25:41Z")

</div>

Hello there. How do I use these protected characters when writing a string? @printf "this code has failed in %.2f" fail\_percentage I would like the output to be this code has failed in 10.00% but when I use the % sy…

---

## [What is the advantage of "foreach(v) do.." over "for i in v..."?](https://discourse.julialang.org/t/what-is-the-advantage-of-foreach-v-do-over-for-i-in-v/129007)

<div class="topic-metadata">

**Author:** [@Leon\_Niceday](https://discourse.julialang.org/u/Leon_Niceday)\
**Replies:** 12\
**Last updated:** [May 16, 2025, 1:15pm UTC](https://discourse.julialang.org/t/what-is-the-advantage-of-foreach-v-do-over-for-i-in-v/129007 "2025-05-16T13:15:57Z")

</div>

This julia\> let t = 0 for x in v t += x end t end vs julia\> let t = 0 foreach(v) do x t += x end t end It …

---

## [Precompiling error with DifferentialEquations](https://discourse.julialang.org/t/precompiling-error-with-differentialequations/127848)

<div class="topic-metadata">

**Author:** [@a\_will](https://discourse.julialang.org/u/a_will)\
**Replies:** 19\
**Last updated:** [May 15, 2025, 6:15pm UTC](https://discourse.julialang.org/t/precompiling-error-with-differentialequations/127848 "2025-05-15T18:15:19Z")

</div>

Hello, I am very new to Julia and I’ve been struggling with a problem since DifferentialEquations got updated. My code was working but now several dependencies that I need will not precompile, and my code won’t execute …

---

## [Why the free variables in function body don't get bound at function definition time?](https://discourse.julialang.org/t/why-the-free-variables-in-function-body-dont-get-bound-at-function-definition-time/128860)

<div class="topic-metadata">

**Author:** [@Leon\_Niceday](https://discourse.julialang.org/u/Leon_Niceday)\
**Replies:** 52\
**Last updated:** [May 14, 2025, 8:54pm UTC](https://discourse.julialang.org/t/why-the-free-variables-in-function-body-dont-get-bound-at-function-definition-time/128860 "2025-05-14T20:54:08Z")

</div>

Hi, What is the advantage to having such a difference between how variables use another variables vs how functions use them? # Assigning to variable julia\> a=1; julia\> b=a 1 julia\> a="asdf"; julia\> b 1 # OK, as expe…

---

## [Slow package precompilation of Julia packages in Colab due to filesystem](https://discourse.julialang.org/t/slow-package-precompilation-of-julia-packages-in-colab-due-to-filesystem/128956)

<div class="topic-metadata">

**Author:** [@Tato\_Khundadze](https://discourse.julialang.org/u/Tato_Khundadze)\
**Replies:** 5\
**Last updated:** [May 14, 2025, 12:49am UTC](https://discourse.julialang.org/t/slow-package-precompilation-of-julia-packages-in-colab-due-to-filesystem/128956 "2025-05-14T00:49:33Z")

</div>

Hi everyone, I’m new to Julia and currently using it in Google Colab for some modeling work. I’ve noticed that package installation is quite slow — it takes several minutes. Is this expected behavior, or am I missing so…

---

## [Problem rendering Compose.Context from GraphPlot.gplot() with gksqt backend on Windows (Julia v1.11.4)](https://discourse.julialang.org/t/problem-rendering-compose-context-from-graphplot-gplot-with-gksqt-backend-on-windows-julia-v1-11-4/128908)

<div class="topic-metadata">

**Author:** [@ChaucAPA](https://discourse.julialang.org/u/ChaucAPA)\
**Replies:** 1\
**Last updated:** [May 12, 2025, 4:01am UTC](https://discourse.julialang.org/t/problem-rendering-compose-context-from-graphplot-gplot-with-gksqt-backend-on-windows-julia-v1-11-4/128908 "2025-05-12T04:01:45Z")

</div>

Dear Julia Community, I am encountering an issue while trying to visualize a simple graph using the GraphPlot package (v0.6.1) in Julia (v1.11.4) on a 64-bit Windows operating system. My goal is to use the gksqt graphic…

---

## [Seeking introduction to Julia on Rescale HPC platform](https://discourse.julialang.org/t/seeking-introduction-to-julia-on-rescale-hpc-platform/128887)

<div class="topic-metadata">

**Author:** [@Bananthahally](https://discourse.julialang.org/u/Bananthahally)\
**Replies:** 0\
**Last updated:** [May 10, 2025, 4:09am UTC](https://discourse.julialang.org/t/seeking-introduction-to-julia-on-rescale-hpc-platform/128887 "2025-05-10T04:09:27Z")

</div>

Hello users As part of a project on topological optimization for structural performance, I’m trying to build a Julia application on the Rescale HPC platform, https://rescale.com/ As of May 2025, Rescale hosts Julia v1.…

---

## [Unexpected behaviour when using ˋrepeatˋ](https://discourse.julialang.org/t/unexpected-behaviour-when-using-repeat/128875)

<div class="topic-metadata">

**Author:** [@azeredo-e](https://discourse.julialang.org/u/azeredo-e)\
**Replies:** 7\
**Last updated:** [May 10, 2025, 12:33am UTC](https://discourse.julialang.org/t/unexpected-behaviour-when-using-repeat/128875 "2025-05-10T00:33:07Z")

</div>

Hello everyone, I’m encountering some difficulties when using the repeat function and repeating arrays. My objective is creating an array of arrays, applying some function to it and getting the array back with its new v…

---

## [Why dependencies of a dependency are not available in the environment?](https://discourse.julialang.org/t/why-dependencies-of-a-dependency-are-not-available-in-the-environment/128810)

<div class="topic-metadata">

**Author:** [@dmitry-kabanov](https://discourse.julialang.org/u/dmitry-kabanov)\
**Replies:** 8\
**Last updated:** [May 8, 2025, 4:37pm UTC](https://discourse.julialang.org/t/why-dependencies-of-a-dependency-are-not-available-in-the-environment/128810 "2025-05-08T16:37:12Z")

</div>

Hi, I have defined an environment (Project.toml) that depends on two (local) packages: package A and B. Package B depends on OrdinaryDiffEq. Question: Why, when I activate an environment in which I have added (via devel…

---

## [Julia adoption: Method confusion](https://discourse.julialang.org/t/julia-adoption-method-confusion/128672)

<div class="topic-metadata">

**Author:** [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Replies:** 12\
**Last updated:** [May 8, 2025, 1:22pm UTC](https://discourse.julialang.org/t/julia-adoption-method-confusion/128672 "2025-05-08T13:22:24Z")

</div>

I have been in the ‘Programming Languages Development’ Discord (fun place) for a couple of weeks now, so many times when I bring up multiple dispatch, someone says: “That’s messy, you quickly drown in methods, and loose…

---

## [What is a recommended way to solve a linear equation?](https://discourse.julialang.org/t/what-is-a-recommended-way-to-solve-a-linear-equation/128420)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 31\
**Last updated:** [May 8, 2025, 6:48am UTC](https://discourse.julialang.org/t/what-is-a-recommended-way-to-solve-a-linear-equation/128420 "2025-05-08T06:48:34Z")

</div>

I wonder what is a fair way to solve (maybe approximately) a linear equation system Ax = b, at this time. The A may be very large scale and sparse. I might want to use an iterative solution approach (e.g. CG, MINRES etc.…

---

## [Sprand fails to construct a SparseVector](https://discourse.julialang.org/t/sprand-fails-to-construct-a-sparsevector/128828)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 3\
**Last updated:** [May 8, 2025, 6:36am UTC](https://discourse.julialang.org/t/sprand-fails-to-construct-a-sparsevector/128828 "2025-05-08T06:36:36Z")

</div>

I can construct a random SparseMatrixCSC, but not a SparseVector in the same way. Where am I wrong? julia\> using SparseArrays julia\> rfn = n -\> rand(-9:.1:9, n) #1 (generic function with 1 method) julia\> sprand(7, 8, …

---

## [Formatting assignment in function call](https://discourse.julialang.org/t/formatting-assignment-in-function-call/105269)

<div class="topic-metadata">

**Author:** [@jdm204](https://discourse.julialang.org/u/jdm204)\
**Replies:** 3\
**Last updated:** [May 8, 2025, 5:57am UTC](https://discourse.julialang.org/t/formatting-assignment-in-function-call/105269 "2025-05-08T05:57:14Z")

</div>

I assign to a variable in the condition of a while loop in this working code: getdata() = rand() \< 0.5 ? rand() : missing function dowork() while !ismissing((val = getdata();)) println(val^2) end end W…

---

## [How to call blas getrf, getri properly ? i want to create a benchmark inverse matrix using gauss, crout, native julia inv(A) and BLAS direct](https://discourse.julialang.org/t/how-to-call-blas-getrf-getri-properly-i-want-to-create-a-benchmark-inverse-matrix-using-gauss-crout-native-julia-inv-a-and-blas-direct/128771)

<div class="topic-metadata">

**Author:** [@Roberto\_Bagyo](https://discourse.julialang.org/u/Roberto_Bagyo)\
**Replies:** 5\
**Last updated:** [May 7, 2025, 5:38pm UTC](https://discourse.julialang.org/t/how-to-call-blas-getrf-getri-properly-i-want-to-create-a-benchmark-inverse-matrix-using-gauss-crout-native-julia-inv-a-and-blas-direct/128771 "2025-05-07T17:38:06Z")

</div>

hello, i am new here. fortran based but just for fun actually. i tried to convert test\_fpu.f90 from polyhedron benchmark inverse matrix. i heard julia is multihreading and easier to code, then dgemm performance is highe…

---

## [Problem with github action \`julia-docdeploy\`](https://discourse.julialang.org/t/problem-with-github-action-julia-docdeploy/128789)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 1\
**Last updated:** [May 7, 2025, 12:55pm UTC](https://discourse.julialang.org/t/problem-with-github-action-julia-docdeploy/128789 "2025-05-07T12:55:32Z")

</div>

I’m getting this error on github action julia-docdeploy (log): ERROR: LoadError: InitError: could not load library "/home/runner/.julia/artifacts/a696e1e3e6b8d3c2c4b67609357ebc5c35eabde1/lib/libssl.so" /lib/x86\_64-linux…

---

## [Set default julia version for a given folder (in VS Code)](https://discourse.julialang.org/t/set-default-julia-version-for-a-given-folder-in-vs-code/128656)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 4\
**Last updated:** [May 7, 2025, 7:35am UTC](https://discourse.julialang.org/t/set-default-julia-version-for-a-given-folder-in-vs-code/128656 "2025-05-07T07:35:58Z")

</div>

Hi, for a given project I’m restricted to a given version of julia. However, I’d like to work with the release version of julia when I’m just tinkering around with some julia code. I’ve tried juliaup to override the chan…

---

## [How to compute inner product of MPS with another MPS translated by 1 right sites](https://discourse.julialang.org/t/how-to-compute-inner-product-of-mps-with-another-mps-translated-by-1-right-sites/128756)

<div class="topic-metadata">

**Author:** [@Juan\_D](https://discourse.julialang.org/u/Juan_D)\
**Replies:** 2\
**Last updated:** [May 6, 2025, 8:10pm UTC](https://discourse.julialang.org/t/how-to-compute-inner-product-of-mps-with-another-mps-translated-by-1-right-sites/128756 "2025-05-06T20:10:43Z")

</div>

Hello everyone, I would like to ask if there is a way to compute the inner product ⟨ψ | T₁ | ψ⟩, where T₁ is a cyclic translation operator that shifts site n-to-n+1, by successively applying ITensor’s movesite functions…

---

## [Notebook cells hung up in VS Code](https://discourse.julialang.org/t/notebook-cells-hung-up-in-vs-code/78492)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 42\
**Last updated:** [May 6, 2025, 2:22pm UTC](https://discourse.julialang.org/t/notebook-cells-hung-up-in-vs-code/78492 "2025-05-06T14:22:25Z")

</div>

I’m just getting started with Julia in VS Code, and I’m running into an issue where notebook cells run for hours with the progress wheels spinning. Even this simple calculation seems to be too much for my computer to han…

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

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