# New to Julia

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

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

**Page:** 32

---

## [Float64 error in plotting](https://discourse.julialang.org/t/float64-error-in-plotting/121603)

<div class="topic-metadata">

**Author:** [@agme2014](https://discourse.julialang.org/u/agme2014)\
**Replies:** 3\
**Last updated:** [October 23, 2024, 1:34pm UTC](https://discourse.julialang.org/t/float64-error-in-plotting/121603 "2024-10-23T13:34:10Z")

</div>

Hi, I am new to SciML and Julia. I am trying to use neural ODE to model the system. Everything else in my code except the plotting works. The problem occurs when I try to plot the prediction vs the original using scatte…

---

## [Understanding package directories and entry point files](https://discourse.julialang.org/t/understanding-package-directories-and-entry-point-files/121625)

<div class="topic-metadata">

**Author:** [@StohleF](https://discourse.julialang.org/u/StohleF)\
**Replies:** 6\
**Last updated:** [October 23, 2024, 1:06pm UTC](https://discourse.julialang.org/t/understanding-package-directories-and-entry-point-files/121625 "2024-10-23T13:06:18Z")

</div>

Dear Community, I am currently restructuring some existing code, which is set up to be a package. When moving around some files into a (for me) logic new structure, I got entangled with problems related to Package direc…

---

## [What is the difference between \`Dates.Period\` and \`Dates.TimePeriod\`?](https://discourse.julialang.org/t/what-is-the-difference-between-dates-period-and-dates-timeperiod/121631)

<div class="topic-metadata">

**Author:** [@anon91151494](https://discourse.julialang.org/u/anon91151494)\
**Replies:** 1\
**Last updated:** [October 23, 2024, 11:38am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-dates-period-and-dates-timeperiod/121631 "2024-10-23T11:38:58Z")

</div>

I’m looking at this documentation page and I can’t figure out what the difference between these two types is Dates · The Julia Language It certainly seems like there are two distinct types: Dates.Period Dates.TimePe…

---

## [Julia crashes on installation of the RCall module](https://discourse.julialang.org/t/julia-crashes-on-installation-of-the-rcall-module/121560)

<div class="topic-metadata">

**Author:** [@Feng\_Chen](https://discourse.julialang.org/u/Feng_Chen)\
**Replies:** 11\
**Last updated:** [October 23, 2024, 8:08am UTC](https://discourse.julialang.org/t/julia-crashes-on-installation-of-the-rcall-module/121560 "2024-10-23T08:08:09Z")

</div>

I am using Julia 1.11.1 and whenever I try to install RCall, Julia would crash with the following error/log (this also happens with some recent version of Julia). Any suggestions on how to fix it are greatly appreciated.…

---

## [Types and arguments](https://discourse.julialang.org/t/types-and-arguments/121612)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 4\
**Last updated:** [October 22, 2024, 10:59pm UTC](https://discourse.julialang.org/t/types-and-arguments/121612 "2024-10-22T22:59:40Z")

</div>

I have a doubt. Sorry if is very obvious. First: is the type specification used as a cast? For example, if f receives a real number as argument, is a=2 f(a::Real) doing a type conversion? And a second doubt is: can’t …

---

## [Why VonMisesFisher doesn't work for k = 0?](https://discourse.julialang.org/t/why-vonmisesfisher-doesnt-work-for-k-0/121595)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [October 22, 2024, 7:02pm UTC](https://discourse.julialang.org/t/why-vonmisesfisher-doesnt-work-for-k-0/121595 "2024-10-22T19:02:47Z")

</div>

Hello everyone, I was planning to use VonMisesFisher distribution for some modelling purpose like random walk. But when I tried to sample vectors for k=0 which should be giving values following uniform distribution, fun…

---

## [How to use local, relative modules (best practice, simple)?](https://discourse.julialang.org/t/how-to-use-local-relative-modules-best-practice-simple/81634)

<div class="topic-metadata">

**Author:** [@jakob1](https://discourse.julialang.org/u/jakob1)\
**Replies:** 15\
**Last updated:** [October 22, 2024, 9:56am UTC](https://discourse.julialang.org/t/how-to-use-local-relative-modules-best-practice-simple/81634 "2024-10-22T09:56:41Z")

</div>

Hi, Julia states to feel like a scripting language. Hence I would like to find out the most simple way to modularize (smaller) projects in julia. Here is a minimal example that worked for me after some research and tri…

---

## [Where to begin for using Julia ML (Flux/MLJ/MLJFlux) with custom datasets?](https://discourse.julialang.org/t/where-to-begin-for-using-julia-ml-flux-mlj-mljflux-with-custom-datasets/121470)

<div class="topic-metadata">

**Author:** [@alecStewart1](https://discourse.julialang.org/u/alecStewart1)\
**Replies:** 10\
**Last updated:** [October 21, 2024, 5:41pm UTC](https://discourse.julialang.org/t/where-to-begin-for-using-julia-ml-flux-mlj-mljflux-with-custom-datasets/121470 "2024-10-21T17:41:05Z")

</div>

Hello again, friends, I thought I’d ask this as ML and data science are somewhat out of my forte. I’d like to use Julia for analyzing different datasets, not just for work. So to give you an idea, let me give a simple …

---

## [How to get the reference to a text object in GLMakie](https://discourse.julialang.org/t/how-to-get-the-reference-to-a-text-object-in-glmakie/121555)

<div class="topic-metadata">

**Author:** [@heinfleuren](https://discourse.julialang.org/u/heinfleuren)\
**Replies:** 0\
**Last updated:** [October 21, 2024, 8:33pm UTC](https://discourse.julialang.org/t/how-to-get-the-reference-to-a-text-object-in-glmakie/121555 "2024-10-21T20:33:39Z")

</div>

I’m working on an application where you see locations in a map. Each location has a particular name created with the text! function. I now want to click in the ‘geo space’ on the text and with pick I want to get the refe…

---

## [New to Julia: Help with configuring a "sane" dev environment and editing experience](https://discourse.julialang.org/t/new-to-julia-help-with-configuring-a-sane-dev-environment-and-editing-experience/121387)

<div class="topic-metadata">

**Author:** [@alecStewart1](https://discourse.julialang.org/u/alecStewart1)\
**Replies:** 3\
**Last updated:** [October 21, 2024, 8:07pm UTC](https://discourse.julialang.org/t/new-to-julia-help-with-configuring-a-sane-dev-environment-and-editing-experience/121387 "2024-10-21T20:07:47Z")

</div>

Hey friends! I’m new to Julia, but I’ve been programming for a bit now. I’m mostly used to Common Lisp, Java, Kotlin, Elixir, Python, Javascript/Typescript, pretty much all shell scripting languages. Part of my interes…

---

## [Parametric Types with Union](https://discourse.julialang.org/t/parametric-types-with-union/121507)

<div class="topic-metadata">

**Author:** [@danrib07](https://discourse.julialang.org/u/danrib07)\
**Replies:** 2\
**Last updated:** [October 21, 2024, 1:42pm UTC](https://discourse.julialang.org/t/parametric-types-with-union/121507 "2024-10-21T13:42:45Z")

</div>

I have the following snippet: abstract type AbstractReaction end abstract type AbstractSpecies end abstract type AbstractRateLaw end struct Species \<: AbstractSpecies name::Union{AbstractString,Symbol} end struct …

---

## [Sieve of Eratosthenes iterator](https://discourse.julialang.org/t/sieve-of-eratosthenes-iterator/121512)

<div class="topic-metadata">

**Author:** [@Brinkhuis](https://discourse.julialang.org/u/Brinkhuis)\
**Replies:** 1\
**Last updated:** [October 20, 2024, 7:56pm UTC](https://discourse.julialang.org/t/sieve-of-eratosthenes-iterator/121512 "2024-10-20T19:56:40Z")

</div>

I would like to create an Iterator for prime numbers (I know there is a package Primes). Based on Pythons code for the Sieve of Eratosthenes I coded a function sieve(). sieve(10) returns a vector of the first 10 primes. …

---

## [How to use GitHub pages with Pluto notebooks?](https://discourse.julialang.org/t/how-to-use-github-pages-with-pluto-notebooks/121482)

<div class="topic-metadata">

**Author:** [@selinguler94](https://discourse.julialang.org/u/selinguler94)\
**Replies:** 2\
**Last updated:** [October 20, 2024, 5:32am UTC](https://discourse.julialang.org/t/how-to-use-github-pages-with-pluto-notebooks/121482 "2024-10-20T05:32:14Z")

</div>

I want to create something similar to " https "://alvarmaciel.gitlab.io/pluto-static-export-template/My%20cool%20notebook.html . (not allowed to give links so I needed to modify a bit) I don’t know much about github pag…

---

## [Why does it matter where I place return in above code?](https://discourse.julialang.org/t/why-does-it-matter-where-i-place-return-in-above-code/121484)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 8\
**Last updated:** [October 20, 2024, 4:55pm UTC](https://discourse.julialang.org/t/why-does-it-matter-where-i-place-return-in-above-code/121484 "2024-10-20T16:55:36Z")

</div>

I’ve tried making a simple Greatest Common Denominator code but output differs depending on where I use return. First is the code that works as intendent. By using else statement, as far as I understand return runs only…

---

## [Where do backup files go when I ignore them by \*.jl.bak in .gitignore file?](https://discourse.julialang.org/t/where-do-backup-files-go-when-i-ignore-them-by-jl-bak-in-gitignore-file/121504)

<div class="topic-metadata">

**Author:** [@selinguler94](https://discourse.julialang.org/u/selinguler94)\
**Replies:** 3\
**Last updated:** [October 20, 2024, 2:46pm UTC](https://discourse.julialang.org/t/where-do-backup-files-go-when-i-ignore-them-by-jl-bak-in-gitignore-file/121504 "2024-10-20T14:46:33Z")

</div>

I want to keep the backup files because I am asked to keep the old versions of the updated code, but I also don’t want to host them in Github pages so I placed them in .gitignore. But where did they go? I created a move…

---

## [My pluto notebooks changes aren't recognized by git bash](https://discourse.julialang.org/t/my-pluto-notebooks-changes-arent-recognized-by-git-bash/121487)

<div class="topic-metadata">

**Author:** [@selinguler94](https://discourse.julialang.org/u/selinguler94)\
**Replies:** 2\
**Last updated:** [October 20, 2024, 11:03am UTC](https://discourse.julialang.org/t/my-pluto-notebooks-changes-arent-recognized-by-git-bash/121487 "2024-10-20T11:03:30Z")

</div>

I have a pluto notebook that I pushed to github, and now I open the notebook on pluto, edit it and save it (maybe not exactly save it because when I go to save notebook section and choose the directory and the same file …

---

## [How to query the number of arguments passed to a CLI program?](https://discourse.julialang.org/t/how-to-query-the-number-of-arguments-passed-to-a-cli-program/121461)

<div class="topic-metadata">

**Author:** [@anon91151494](https://discourse.julialang.org/u/anon91151494)\
**Replies:** 2\
**Last updated:** [October 18, 2024, 5:13pm UTC](https://discourse.julialang.org/t/how-to-query-the-number-of-arguments-passed-to-a-cli-program/121461 "2024-10-18T17:13:33Z")

</div>

I am trying to find a way to query the number of arguments passed to a Julia CLI program. This is what I have come up with, but it doesn’t quite make sense. (Explanation below.) function main() if size(ARGS) != 1 …

---

## [Best practice for handling "same" types between different packages](https://discourse.julialang.org/t/best-practice-for-handling-same-types-between-different-packages/121451)

<div class="topic-metadata">

**Author:** [@mattsignorelli](https://discourse.julialang.org/u/mattsignorelli)\
**Replies:** 17\
**Last updated:** [October 18, 2024, 2:59pm UTC](https://discourse.julialang.org/t/best-practice-for-handling-same-types-between-different-packages/121451 "2024-10-18T14:59:54Z")

</div>

My organization is writing a small ecosystem of packages for physics simulations. The goal is to make them as modular as possible, of course. One issue we’ve run into is the following: Package A contains some useful stu…

---

## [Help Using DuckDB](https://discourse.julialang.org/t/help-using-duckdb/121401)

<div class="topic-metadata">

**Author:** [@jdpavek](https://discourse.julialang.org/u/jdpavek)\
**Replies:** 5\
**Last updated:** [October 17, 2024, 9:31am UTC](https://discourse.julialang.org/t/help-using-duckdb/121401 "2024-10-17T09:31:23Z")

</div>

I get an error when trying to use DuckDB. Is it my setup, something I might be doing wrong, or possibly a package issue? julia\> using DuckDB Precompiling DuckDB Info Given DuckDB was explicitly requested, output will…

---

## [Integral over an irregular triangle mesh](https://discourse.julialang.org/t/integral-over-an-irregular-triangle-mesh/121298)

<div class="topic-metadata">

**Author:** [@sofiane](https://discourse.julialang.org/u/sofiane)\
**Replies:** 10\
**Last updated:** [October 17, 2024, 6:10am UTC](https://discourse.julialang.org/t/integral-over-an-irregular-triangle-mesh/121298 "2024-10-17T06:10:53Z")

</div>

Hi everyone, lately I’ve been using Julia to solve a stochastic partial differential equation for a 2D problem. I used a refined triangular mesh for my mesh generation, but I encountered some issues while implementing my…

---

## [Why does Julia have multiple ways to define functions?](https://discourse.julialang.org/t/why-does-julia-have-multiple-ways-to-define-functions/102424)

<div class="topic-metadata">

**Author:** [@hatmatrix](https://discourse.julialang.org/u/hatmatrix)\
**Replies:** 24\
**Last updated:** [October 16, 2024, 12:47pm UTC](https://discourse.julialang.org/t/why-does-julia-have-multiple-ways-to-define-functions/102424 "2024-10-16T12:47:23Z")

</div>

The docs present at least three ways: the standard form, “compact” form, anonymous form, etc. Then there are the do blocks… In that you can assign the anonymous function to a symbol, the compact form seems redundant? Th…

---

## [Integration with C++ : “runtime” compilation?](https://discourse.julialang.org/t/integration-with-c-runtime-compilation/121337)

<div class="topic-metadata">

**Author:** [@Oblomov](https://discourse.julialang.org/u/Oblomov)\
**Replies:** 6\
**Last updated:** [October 16, 2024, 10:10am UTC](https://discourse.julialang.org/t/integration-with-c-runtime-compilation/121337 "2024-10-16T10:10:04Z")

</div>

Hello all, we have a large C++ scientific codebase that offers a large variety of formulations to the end user. This is implemented through heavy use of template metaprogramming to keep the code compact while avoiding t…

---

## [Agents.jl -- how to return the pos of an agent in Continuous space](https://discourse.julialang.org/t/agents-jl-how-to-return-the-pos-of-an-agent-in-continuous-space/121305)

<div class="topic-metadata">

**Author:** [@pogikano](https://discourse.julialang.org/u/pogikano)\
**Replies:** 2\
**Last updated:** [October 16, 2024, 1:15am UTC](https://discourse.julialang.org/t/agents-jl-how-to-return-the-pos-of-an-agent-in-continuous-space/121305 "2024-10-16T01:15:38Z")

</div>

I want to implement various custom agent moves. I need to obtain the x and y positions of an agent, and then update them. For example, this does not work: ‘’’ function agent\_step!(fish, model) xAdd = rand( -1:1 ) yAd…

---

## [Help with Julia installation](https://discourse.julialang.org/t/help-with-julia-installation/121336)

<div class="topic-metadata">

**Author:** [@tamarapino](https://discourse.julialang.org/u/tamarapino)\
**Replies:** 7\
**Last updated:** [October 15, 2024, 10:57pm UTC](https://discourse.julialang.org/t/help-with-julia-installation/121336 "2024-10-15T22:57:37Z")

</div>

Hi everyone, I hope you’re doing well, I’m new to Julia and I’m having problems using Julia. I have a 2022 MacBook Air that works with an M2 chip, I have installed an uninstalled Julia many times. I understand that due …

---

## [Generating a new project from empty directory](https://discourse.julialang.org/t/generating-a-new-project-from-empty-directory/121349)

<div class="topic-metadata">

**Author:** [@danrib07](https://discourse.julialang.org/u/danrib07)\
**Replies:** 3\
**Last updated:** [October 15, 2024, 8:25pm UTC](https://discourse.julialang.org/t/generating-a-new-project-from-empty-directory/121349 "2024-10-15T20:25:55Z")

</div>

I’ve cloned an empty repository Test2 from Github. I want to create a Julia package within this folder. After cloning the repository in the following directory C:\\Users\\someuser\\Test2, after accessing it via cd command, …

---

## [Define equality for struct by checking all fields](https://discourse.julialang.org/t/define-equality-for-struct-by-checking-all-fields/121325)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 4\
**Last updated:** [October 15, 2024, 3:47pm UTC](https://discourse.julialang.org/t/define-equality-for-struct-by-checking-all-fields/121325 "2024-10-15T15:47:45Z")

</div>

I find myself in the position of defining various structs of the form struct Foo{T, U} bar::T bar2::U end where I want to define Foo(a,b) == Foo(c,d) iff a == c and b == d. I can do this manually: Base.:(==)(op1::Fo…

---

## [Can you twiddle bits in a Float64 variable?](https://discourse.julialang.org/t/can-you-twiddle-bits-in-a-float64-variable/121271)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 6\
**Last updated:** [October 14, 2024, 2:45pm UTC](https://discourse.julialang.org/t/can-you-twiddle-bits-in-a-float64-variable/121271 "2024-10-14T14:45:49Z")

</div>

Can you twiddle bits in a Float64 variable? Can you have x = 123.456 then type cast x into UInt64 Twiddle its bits then type cast it back to Float64 to get a different Float64 number? Just wondering.

---

## [Is there a built in macro like @show that returns a string?](https://discourse.julialang.org/t/is-there-a-built-in-macro-like-show-that-returns-a-string/88234)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 9\
**Last updated:** [October 13, 2024, 11:41pm UTC](https://discourse.julialang.org/t/is-there-a-built-in-macro-like-show-that-returns-a-string/88234 "2024-10-13T23:41:40Z")

</div>

I want the macro @show but to return a string instead of printing. Does something like that already exist?

---

## [New to managing package dependencies and environments](https://discourse.julialang.org/t/new-to-managing-package-dependencies-and-environments/111837)

<div class="topic-metadata">

**Author:** [@Niall](https://discourse.julialang.org/u/Niall)\
**Replies:** 10\
**Last updated:** [October 13, 2024, 11:22am UTC](https://discourse.julialang.org/t/new-to-managing-package-dependencies-and-environments/111837 "2024-10-13T11:22:59Z")

</div>

Hi. I don’t really understand very well how to set up the project.toml file for my package - in particular I don’t understand how to set up package dependencies or use environments. So I have two questions. First, can an…

---

## [Why does Julia need an administrator account to run?](https://discourse.julialang.org/t/why-does-julia-need-an-administrator-account-to-run/121201)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 4\
**Last updated:** [October 12, 2024, 4:15pm UTC](https://discourse.julialang.org/t/why-does-julia-need-an-administrator-account-to-run/121201 "2024-10-12T16:15:37Z")

</div>

Hello, I installed Julia on a computer that is a member of a Windows domain network, but it requires an administrator account to run. Why? Thank you.

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

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