# New to Julia

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

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

**Page:** 67

---

## [MPIClusterManagers add more nodes interactive session](https://discourse.julialang.org/t/mpiclustermanagers-add-more-nodes-interactive-session/105465)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 0\
**Last updated:** [October 27, 2023, 6:37am UTC](https://discourse.julialang.org/t/mpiclustermanagers-add-more-nodes-interactive-session/105465 "2023-10-27T06:37:37Z")

</div>

Hi, It seems possible to do: man = MPIWorkerManager(20); to get more MPI nodes in an interactive session with MPIClusterManagers.jl. However, I’d like to take nodes from other machines, similar to addprocs from Distri…

---

## [I tried to solve julia executable VScode problem](https://discourse.julialang.org/t/i-tried-to-solve-julia-executable-vscode-problem/105455)

<div class="topic-metadata">

**Author:** [@Redmusk888](https://discourse.julialang.org/u/Redmusk888)\
**Replies:** 2\
**Last updated:** [October 27, 2023, 12:23am UTC](https://discourse.julialang.org/t/i-tried-to-solve-julia-executable-vscode-problem/105455 "2023-10-27T00:23:09Z")

</div>

1.I’m windows 11 2.i tried to solve julia executable problem so i follow the this page Could not start the julia language server in VS Code - Stack Overflow and it get worse…when i add LanguageServer package

---

## [How do I retrieve values using an array generator?](https://discourse.julialang.org/t/how-do-i-retrieve-values-using-an-array-generator/105421)

<div class="topic-metadata">

**Author:** [@crustaccione](https://discourse.julialang.org/u/crustaccione)\
**Replies:** 11\
**Last updated:** [October 26, 2023, 3:45pm UTC](https://discourse.julialang.org/t/how-do-i-retrieve-values-using-an-array-generator/105421 "2023-10-26T15:45:02Z")

</div>

I know how to create an array using array = \[x + y for x in 2:8, y in -1:3\] But I am trying to figure out how to retrieve elements of an array that the array generator creates e.g. array\_gen = (x + y for x in 2:8, y i…

---

## [Could Julia embed graphics lib.?](https://discourse.julialang.org/t/could-julia-embed-graphics-lib/105433)

<div class="topic-metadata">

**Author:** [@nodrygo](https://discourse.julialang.org/u/nodrygo)\
**Replies:** 8\
**Last updated:** [October 26, 2023, 12:03pm UTC](https://discourse.julialang.org/t/could-julia-embed-graphics-lib/105433 "2023-10-26T12:03:34Z")

</div>

The Julia installer already embeds many libraries so could the Julia installer embed graphical libraries for all platforms such as Pharo (Smalltalk) does? (cairo? gtk4? sdl2) is this a bad idea? this could be good for…

---

## [Infer return type from ambiguous input](https://discourse.julialang.org/t/infer-return-type-from-ambiguous-input/105396)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 6\
**Last updated:** [October 26, 2023, 6:38am UTC](https://discourse.julialang.org/t/infer-return-type-from-ambiguous-input/105396 "2023-10-26T06:38:44Z")

</div>

What is the best way to help Julia’s compiler infer that the output type of the following function can only be Union{Int64, Nothing}? function inferme(x::Dict{String, Any}, y::String) if haskey(x, y) return …

---

## [Why the y-axis is not showing as log scale even it is scaled](https://discourse.julialang.org/t/why-the-y-axis-is-not-showing-as-log-scale-even-it-is-scaled/105398)

<div class="topic-metadata">

**Author:** [@Chao](https://discourse.julialang.org/u/Chao)\
**Replies:** 1\
**Last updated:** [October 25, 2023, 9:04pm UTC](https://discourse.julialang.org/t/why-the-y-axis-is-not-showing-as-log-scale-even-it-is-scaled/105398 "2023-10-25T21:04:07Z")

</div>

Hello, I am doing a degree distribution. This is the degree distribution without scaled. The code for the above plot is this: histogram(degree, bins=50) title!("Degree distribution") Because I want to check whethe…

---

## [Is a character a member of an vector](https://discourse.julialang.org/t/is-a-character-a-member-of-an-vector/104634)

<div class="topic-metadata">

**Author:** [@neophytedave](https://discourse.julialang.org/u/neophytedave)\
**Replies:** 5\
**Last updated:** [October 25, 2023, 8:14pm UTC](https://discourse.julialang.org/t/is-a-character-a-member-of-an-vector/104634 "2023-10-25T20:14:38Z")

</div>

the subject line says it all. I can laboriously loop through the array. However, I am wondering if there is not a function which will do this more elegantly.

---

## [Plotting and returning values from within a function](https://discourse.julialang.org/t/plotting-and-returning-values-from-within-a-function/74619)

<div class="topic-metadata">

**Author:** [@Timothy](https://discourse.julialang.org/u/Timothy)\
**Replies:** 2\
**Last updated:** [January 14, 2022, 1:39pm UTC](https://discourse.julialang.org/t/plotting-and-returning-values-from-within-a-function/74619 "2022-01-14T13:39:10Z")

</div>

I am trying to call a plotting function and return a value from another function (plot\_and\_return\_points(x,y)): function plot\_stuff(x, y) plot(x, y) end function plot\_and\_return\_points(x, y) println(“The plot bel…

---

## [Is it possible to specify an object as not thread safe?](https://discourse.julialang.org/t/is-it-possible-to-specify-an-object-as-not-thread-safe/105359)

<div class="topic-metadata">

**Author:** [@rdavis120](https://discourse.julialang.org/u/rdavis120)\
**Replies:** 1\
**Last updated:** [October 24, 2023, 10:48pm UTC](https://discourse.julialang.org/t/is-it-possible-to-specify-an-object-as-not-thread-safe/105359 "2023-10-24T22:48:43Z")

</div>

Is it possible to specify the type of an object as not being safe to pass between tasks, such as a database connection or an RCall instance which is inherently synchronous? If I make a mistake I usually just get a seg f…

---

## [Accessing Fortran derived types from Julia](https://discourse.julialang.org/t/accessing-fortran-derived-types-from-julia/105327)

<div class="topic-metadata">

**Author:** [@danmohedano](https://discourse.julialang.org/u/danmohedano)\
**Replies:** 11\
**Last updated:** [October 24, 2023, 8:54pm UTC](https://discourse.julialang.org/t/accessing-fortran-derived-types-from-julia/105327 "2023-10-24T20:54:39Z")

</div>

Hello everyone. I’ve been performing some tests to try and port some functionality from a Fortran module to Julia. While testing out some of Julia’s interoperability features with Fortran I have run into some issues whe…

---

## [Why is the argument of vectorized in-place function is marked as not used?](https://discourse.julialang.org/t/why-is-the-argument-of-vectorized-in-place-function-is-marked-as-not-used/105356)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 5\
**Last updated:** [October 24, 2023, 8:26pm UTC](https://discourse.julialang.org/t/why-is-the-argument-of-vectorized-in-place-function-is-marked-as-not-used/105356 "2023-10-24T20:26:40Z")

</div>

Following the tutorial, I want to use OrdinaryDiffEq to solve an equation: using OrdinaryDiffEq function A(t, p) ω, ε = p return \[\[0.0 1.0\]; \[-(ω + ε \* cos(t)) 0.0\]\] end function mathieu!(du, u, p, t) du =…

---

## [Unusual Error in Julia](https://discourse.julialang.org/t/unusual-error-in-julia/105062)

<div class="topic-metadata">

**Author:** [@tomberrrington](https://discourse.julialang.org/u/tomberrrington)\
**Replies:** 22\
**Last updated:** [October 24, 2023, 1:21pm UTC](https://discourse.julialang.org/t/unusual-error-in-julia/105062 "2023-10-24T13:21:37Z")

</div>

Whenever I download Julia I get the error “ArgumentError: “/private/tmp/PKInstallSandbox.21we0o/tmp” is not a directory” Does anyone know I can get around this so that I can download pluto

---

## [Running from different version of Julia](https://discourse.julialang.org/t/running-from-different-version-of-julia/105298)

<div class="topic-metadata">

**Author:** [@Allan\_Olave](https://discourse.julialang.org/u/Allan_Olave)\
**Replies:** 19\
**Last updated:** [October 24, 2023, 12:40am UTC](https://discourse.julialang.org/t/running-from-different-version-of-julia/105298 "2023-10-24T00:40:27Z")

</div>

With the following code function finding\_minimum\_sum(list\_of\_distance, list\_of\_projected\_load, show\_list = true) x = list\_of\_distance y = list\_of\_projected\_load l1 = length(x) l2 = length(y) xy = \[\] for i in 1:l2 …

---

## [Profiling crashing or perhaps non-responsive - where to report?](https://discourse.julialang.org/t/profiling-crashing-or-perhaps-non-responsive-where-to-report/104879)

<div class="topic-metadata">

**Author:** [@orebas](https://discourse.julialang.org/u/orebas)\
**Replies:** 6\
**Last updated:** [October 23, 2023, 12:12am UTC](https://discourse.julialang.org/t/profiling-crashing-or-perhaps-non-responsive-where-to-report/104879 "2023-10-23T00:12:23Z")

</div>

I am trying to profile a package I am working on. I have code that runs successfully when called normally, or with @time. When run under “@profile”, it runs partway and then seems to crash. The REPL becomes totally no…

---

## [Changing the field value inside the structure](https://discourse.julialang.org/t/changing-the-field-value-inside-the-structure/105281)

<div class="topic-metadata">

**Author:** [@kiboko123](https://discourse.julialang.org/u/kiboko123)\
**Replies:** 5\
**Last updated:** [October 22, 2023, 8:38pm UTC](https://discourse.julialang.org/t/changing-the-field-value-inside-the-structure/105281 "2023-10-22T20:38:22Z")

</div>

Hi everyone, I have some structure with only one field. Is it possible to declare some function inside this structure that use field variable and change its components. For example I have following code: using Paramet…

---

## [Error while indexing an array](https://discourse.julialang.org/t/error-while-indexing-an-array/105274)

<div class="topic-metadata">

**Author:** [@jddorellanao](https://discourse.julialang.org/u/jddorellanao)\
**Replies:** 6\
**Last updated:** [October 22, 2023, 5:20pm UTC](https://discourse.julialang.org/t/error-while-indexing-an-array/105274 "2023-10-22T17:20:51Z")

</div>

I’m trying to code the next equation: Here, S is an array of size (n,n) A is an array of size n H is an array of size (n,n) T is an array of size n Ť is an array of size n with the cumulative sum of T (Tc in the c…

---

## [Memory leak with a distributed code](https://discourse.julialang.org/t/memory-leak-with-a-distributed-code/103754)

<div class="topic-metadata">

**Author:** [@chedy](https://discourse.julialang.org/u/chedy)\
**Replies:** 2\
**Last updated:** [October 21, 2023, 1:16am UTC](https://discourse.julialang.org/t/memory-leak-with-a-distributed-code/103754 "2023-10-21T01:16:57Z")

</div>

Hello everyone, I’m working on an algorithm that computes 8 corpus linguistic measures that capture association between words (for short) and then merges the words that score highest in each iteration. I’m writing the a…

---

## [Polynomial overfitting and y3- Help](https://discourse.julialang.org/t/polynomial-overfitting-and-y3-help/105239)

<div class="topic-metadata">

**Author:** [@anafranchi](https://discourse.julialang.org/u/anafranchi)\
**Replies:** 1\
**Last updated:** [October 20, 2023, 1:29pm UTC](https://discourse.julialang.org/t/polynomial-overfitting-and-y3-help/105239 "2023-10-20T13:29:31Z")

</div>

Hi guys, I’m learning Julia. I would like to ask you a question. How do I insert y3 into the graph? and then why order 8 comes out with so much overfitting. A more compliant line should emerge as the result of the photo…

---

## [LoadError:SystemError:opening file XXX: permission denied](https://discourse.julialang.org/t/loaderroropening-file-xxx-permission-denied/105150)

<div class="topic-metadata">

**Author:** [@yuxia](https://discourse.julialang.org/u/yuxia)\
**Replies:** 3\
**Last updated:** [October 20, 2023, 12:51pm UTC](https://discourse.julialang.org/t/loaderroropening-file-xxx-permission-denied/105150 "2023-10-20T12:51:11Z")

</div>

The command I type in: julia xxx.jl 1 100 1 400 output.txt & xxx is the filename. Error: LoadError:SystemError:opening file XXX: permission denied OS:Ubuntu julia version:1.9.3 This my first time running julia…

---

## [\`InexactError\` in my Plots.jl related script](https://discourse.julialang.org/t/inexacterror-in-my-plots-jl-related-script/105170)

<div class="topic-metadata">

**Author:** [@Alex\_Beck](https://discourse.julialang.org/u/Alex_Beck)\
**Replies:** 11\
**Last updated:** [October 20, 2023, 11:28am UTC](https://discourse.julialang.org/t/inexacterror-in-my-plots-jl-related-script/105170 "2023-10-20T11:28:17Z")

</div>

Hello again, thanks for your help, I’ve made what you told me to, but now I have this: ERROR: LoadError: InexactError: Int64(998.8002) Stacktrace: \[1\] Int64 @ ./float.jl:900 \[inlined\] \[2\] convert @ ./number.jl:7…

---

## [Having Problems when creating an app](https://discourse.julialang.org/t/having-problems-when-creating-an-app/105141)

<div class="topic-metadata">

**Author:** [@gugong](https://discourse.julialang.org/u/gugong)\
**Replies:** 4\
**Last updated:** [October 20, 2023, 3:22am UTC](https://discourse.julialang.org/t/having-problems-when-creating-an-app/105141 "2023-10-20T03:22:00Z")

</div>

Hello, I am haivng problems when converting my code into an exe file. While I have to use isdefined function to check if there is an variable in my main environment such as ’ if isdefined(:term\_symbol)', and the package…

---

## [How to find unique values into Vector{Vector{Int64}}?](https://discourse.julialang.org/t/how-to-find-unique-values-into-vector-vector-int64/105188)

<div class="topic-metadata">

**Author:** [@rodolforbcoutinho](https://discourse.julialang.org/u/rodolforbcoutinho)\
**Replies:** 6\
**Last updated:** [October 19, 2023, 10:25pm UTC](https://discourse.julialang.org/t/how-to-find-unique-values-into-vector-vector-int64/105188 "2023-10-19T22:25:45Z")

</div>

Hi I’m trying to get the unique values into A variable bellow, but unique(A) isn’t showing the correct result, is repeating A. How could I get the real result: \[1,2,4,5,6,7,8,10,11\] ? Thanks in advance!!! A 5-element …

---

## [Polynomial problem-help me please](https://discourse.julialang.org/t/polynomial-problem-help-me-please/105195)

<div class="topic-metadata">

**Author:** [@condor98](https://discourse.julialang.org/u/condor98)\
**Replies:** 8\
**Last updated:** [October 19, 2023, 9:43pm UTC](https://discourse.julialang.org/t/polynomial-problem-help-me-please/105195 "2023-10-19T21:43:44Z")

</div>

this post is deleted for nother topic

---

## [Overfitting polynomial. help](https://discourse.julialang.org/t/overfitting-polynomial-help/105200)

<div class="topic-metadata">

**Author:** [@condor98](https://discourse.julialang.org/u/condor98)\
**Replies:** 2\
**Last updated:** [October 19, 2023, 9:36pm UTC](https://discourse.julialang.org/t/overfitting-polynomial-help/105200 "2023-10-19T21:36:54Z")

</div>

Hi guys, I’m having trouble with this exercise. Order 18 is too overfitting for me. how can I solve it? a graph like the one on the orange line should come out. the one with the red line is mine. where I’m wrong in the c…

---

## [Error in my code](https://discourse.julialang.org/t/error-in-my-code/104930)

<div class="topic-metadata">

**Author:** [@Alex\_Beck](https://discourse.julialang.org/u/Alex_Beck)\
**Replies:** 4\
**Last updated:** [October 19, 2023, 10:39am UTC](https://discourse.julialang.org/t/error-in-my-code/104930 "2023-10-19T10:39:42Z")

</div>

I have this code :slight\_smile: ‘’'function virus\_spread(transmission\_rate, initial\_infected, total\_population, simulation\_duration) # Initialize arrays to track data time = 1:simulation\_duration susceptibles = Int\[t…

---

## [Using an ITensors sysimage when starting the Julia REPL in VS Code?](https://discourse.julialang.org/t/using-an-itensors-sysimage-when-starting-the-julia-repl-in-vs-code/98625)

<div class="topic-metadata">

**Author:** [@Ludwig\_Hruza](https://discourse.julialang.org/u/Ludwig_Hruza)\
**Replies:** 8\
**Last updated:** [October 19, 2023, 6:58am UTC](https://discourse.julialang.org/t/using-an-itensors-sysimage-when-starting-the-julia-repl-in-vs-code/98625 "2023-10-19T06:58:43Z")

</div>

Hi, I am using the library ITensors, which suggests on its website (Running ITensor and Julia Codes · ITensors.jl) to generate a sysimage for faster startup times julia\> using ITensors; ITensors.compile() In a terminal…

---

## [VSCode autocomplete doesn't work beyond first character](https://discourse.julialang.org/t/vscode-autocomplete-doesnt-work-beyond-first-character/105107)

<div class="topic-metadata">

**Author:** [@Lauel](https://discourse.julialang.org/u/Lauel)\
**Replies:** 1\
**Last updated:** [October 18, 2023, 7:01am UTC](https://discourse.julialang.org/t/vscode-autocomplete-doesnt-work-beyond-first-character/105107 "2023-10-18T07:01:04Z")

</div>

I am new to Julia (coming from a python background). I have done the basic installation and setup in the vscode, but an issue I face is that, autocomplete doesn’t work beyond the first letter. I have attached the screen…

---

## [Why does \`1 \* String\[\]\` return a Vector{Union{}}?](https://discourse.julialang.org/t/why-does-1-string-return-a-vector-union/105049)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 9\
**Last updated:** [October 17, 2023, 10:08pm UTC](https://discourse.julialang.org/t/why-does-1-string-return-a-vector-union/105049 "2023-10-17T22:08:25Z")

</div>

1 \* \["a"\] # gives error 1 \* String\[\] # returns Vector{Union{}} Why is the second allowed?

---

## [Package Manager - Unrecoverable error using packages from GitHub](https://discourse.julialang.org/t/package-manager-unrecoverable-error-using-packages-from-github/105080)

<div class="topic-metadata">

**Author:** [@GenerallyClueless](https://discourse.julialang.org/u/GenerallyClueless)\
**Replies:** 0\
**Last updated:** [October 17, 2023, 4:02pm UTC](https://discourse.julialang.org/t/package-manager-unrecoverable-error-using-packages-from-github/105080 "2023-10-17T16:02:09Z")

</div>

Hello Julia Community! I am working my way through the rest of the POMDP course in Julia Academy. Great course! The Pluto Notebooks seem to be a bit out of date… and this particular challenge relates to the 5th course…

---

## [Problem in my code](https://discourse.julialang.org/t/problem-in-my-code/105021)

<div class="topic-metadata">

**Author:** [@Alex\_Beck](https://discourse.julialang.org/u/Alex_Beck)\
**Replies:** 2\
**Last updated:** [October 16, 2023, 3:31pm UTC](https://discourse.julialang.org/t/problem-in-my-code/105021 "2023-10-16T15:31:47Z")

</div>

Hello, can you please correct my code ? I have to do un small presentation and I’ve look for hours… I can’t find anything… Here is the error: and here the file of the code: using Plots function propagation\_virus(t…

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

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