# New to Julia

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

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

**Page:** 24

---

## [How to automatically add dependencies?](https://discourse.julialang.org/t/how-to-automatically-add-dependencies/94508)

<div class="topic-metadata">

**Author:** [@baizhan](https://discourse.julialang.org/u/baizhan)\
**Replies:** 6\
**Last updated:** [January 13, 2025, 8:40am UTC](https://discourse.julialang.org/t/how-to-automatically-add-dependencies/94508 "2025-01-13T08:40:59Z")

</div>

I have written a small package, and uploaded it to github: Bai-Zhan/GluonModel I have also written another package, which depends on this GluonModel package: Bai-Zhan/ColdDSE. Now I want to install the ColdDSE package …

---

## [VS Code could not index GLMakie](https://discourse.julialang.org/t/vs-code-could-not-index-glmakie/122569)

<div class="topic-metadata">

**Author:** [@JuanJoZP](https://discourse.julialang.org/u/JuanJoZP)\
**Replies:** 7\
**Last updated:** [January 12, 2025, 10:56pm UTC](https://discourse.julialang.org/t/vs-code-could-not-index-glmakie/122569 "2025-01-12T22:56:11Z")

</div>

I just downloaded Julia form oficial source, installed VSCode recommended extension. created and activated a new env. Then installed GLMakie using Pkg Pkg.add("GLMakie") Everything works fine, the examples in Makie run…

---

## [How to save a figure with a button in GLMakie?](https://discourse.julialang.org/t/how-to-save-a-figure-with-a-button-in-glmakie/124679)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [January 12, 2025, 9:25am UTC](https://discourse.julialang.org/t/how-to-save-a-figure-with-a-button-in-glmakie/124679 "2025-01-12T09:25:57Z")

</div>

I have a figure made with GLMakie, I can add button, but I don’t know how to link an action – namely saving the figure – to the button. I have this example: using GLMakie xs = range(0, 10, length = 30) ys = 0.5 .\* sin…

---

## [Joining on a DataFrame on an argument and column](https://discourse.julialang.org/t/joining-on-a-dataframe-on-an-argument-and-column/124613)

<div class="topic-metadata">

**Author:** [@Snowy](https://discourse.julialang.org/u/Snowy)\
**Replies:** 3\
**Last updated:** [January 11, 2025, 9:33pm UTC](https://discourse.julialang.org/t/joining-on-a-dataframe-on-an-argument-and-column/124613 "2025-01-11T21:33:07Z")

</div>

Hello, Is it possible to join DataFrames on an argument and a column header? E.g.: New\_DF = innerjoin(DF1,DF2, on = ID =\> :Store\_ID) where “ID” is an argument of a function and “:Store\_ID” is a specific column within …

---

## [How to add button to GLMakie plot?](https://discourse.julialang.org/t/how-to-add-button-to-glmakie-plot/124649)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [January 11, 2025, 5:02pm UTC](https://discourse.julialang.org/t/how-to-add-button-to-glmakie-plot/124649 "2025-01-11T17:02:28Z")

</div>

I would like to add a button to a plot made with GLMakie; it looks straightforward but I get an error: julia\> using GLMakie julia\> xs = range(0, 10, length = 30) 0.0:0.3448275862068966:10.0 julia\> ys = 0.5 .\* sin.(xs)…

---

## [Package compatibility and environment issues with respect to new version](https://discourse.julialang.org/t/package-compatibility-and-environment-issues-with-respect-to-new-version/124580)

<div class="topic-metadata">

**Author:** [@Vegetasan](https://discourse.julialang.org/u/Vegetasan)\
**Replies:** 4\
**Last updated:** [January 10, 2025, 7:48pm UTC](https://discourse.julialang.org/t/package-compatibility-and-environment-issues-with-respect-to-new-version/124580 "2025-01-10T19:48:11Z")

</div>

Hello all, I have been using Julia (v1.9.3) in JupyterLab through the Anaconda distribution, and all my projects and files were functioning correctly in the global environment. However, after updating to Julia v1.11.2, …

---

## [Generate re-usable fast function from Symbolics](https://discourse.julialang.org/t/generate-re-usable-fast-function-from-symbolics/124616)

<div class="topic-metadata">

**Author:** [@MechRob](https://discourse.julialang.org/u/MechRob)\
**Replies:** 5\
**Last updated:** [January 10, 2025, 6:43pm UTC](https://discourse.julialang.org/t/generate-re-usable-fast-function-from-symbolics/124616 "2025-01-10T18:43:01Z")

</div>

I am trying to generate a function that gets multi-input (both symbolic and numeric), and multi-output that each of them have different sizes. Then I want to generate a function using build\_function, with expression = Va…

---

## [Sequentially add data to a DataFrame](https://discourse.julialang.org/t/sequentially-add-data-to-a-dataframe/12927)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 4\
**Last updated:** [January 9, 2025, 1:47pm UTC](https://discourse.julialang.org/t/sequentially-add-data-to-a-dataframe/12927 "2025-01-09T13:47:50Z")

</div>

I often need to populate a DataFrame sequentially, one iteration at a time. I therefore end up initiating a DataFrame with mock data but with the correct types, deleting that first row, and then iterating through the rea…

---

## [Constructing Vector{Distribution{Univariate, Continuous}} in Distributions.jl](https://discourse.julialang.org/t/constructing-vector-distribution-univariate-continuous-in-distributions-jl/124562)

<div class="topic-metadata">

**Author:** [@rand5](https://discourse.julialang.org/u/rand5)\
**Replies:** 2\
**Last updated:** [January 9, 2025, 3:49am UTC](https://discourse.julialang.org/t/constructing-vector-distribution-univariate-continuous-in-distributions-jl/124562 "2025-01-09T03:49:55Z")

</div>

I’m attempting to construct an array of probability distributions of a single type based on arrays of parameters, then combine it with one or more distributions of a different type, then use this to construct a MixtureMo…

---

## [Dirichlet boundary condition in gmsh](https://discourse.julialang.org/t/dirichlet-boundary-condition-in-gmsh/101232)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 4\
**Last updated:** [January 8, 2025, 3:10am UTC](https://discourse.julialang.org/t/dirichlet-boundary-condition-in-gmsh/101232 "2025-01-08T03:10:15Z")

</div>

Hi all, I want to define dirichlet boundary condition in my mesh file in gmsh and then use it in julia (not defining bc in julia just read them from mesh file). is there anyone who had experience in this field or any tut…

---

## [Evaluate a function for many values fast](https://discourse.julialang.org/t/evaluate-a-function-for-many-values-fast/124510)

<div class="topic-metadata">

**Author:** [@stefaniecg](https://discourse.julialang.org/u/stefaniecg)\
**Replies:** 2\
**Last updated:** [January 7, 2025, 7:23pm UTC](https://discourse.julialang.org/t/evaluate-a-function-for-many-values-fast/124510 "2025-01-07T19:23:45Z")

</div>

I want to evaluate my function fast for many values. Is there a easy way to do this in Julia? :slight\_smile: y(x) = 4\*x^2 + 6\*x + 34 x1 = \[44,75,45\] y(x1) # my favorite sintax does not work, i was really hopping this w…

---

## [Dispatch and junk values](https://discourse.julialang.org/t/dispatch-and-junk-values/124497)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 10\
**Last updated:** [January 7, 2025, 2:57pm UTC](https://discourse.julialang.org/t/dispatch-and-junk-values/124497 "2025-01-07T14:57:14Z")

</div>

I have the following situation, where I have a function, where depending on the types of the supplied objects, I may or may not use all arguments. I then wish to define a shortcut function for some types of the supplied …

---

## [How can i create a random signal within a fixed range ±1e-6?](https://discourse.julialang.org/t/how-can-i-create-a-random-signal-within-a-fixed-range-1e-6/124474)

<div class="topic-metadata">

**Author:** [@stefaniecg](https://discourse.julialang.org/u/stefaniecg)\
**Replies:** 9\
**Last updated:** [January 6, 2025, 7:34pm UTC](https://discourse.julialang.org/t/how-can-i-create-a-random-signal-within-a-fixed-range-1e-6/124474 "2025-01-06T19:34:43Z")

</div>

This one is close, but it goes above the ±1e-6. signal = randn(Int(1e6)) \* 1e-6 plot(signal)

---

## [Call libcuda cuLaunchKernel from Julia](https://discourse.julialang.org/t/call-libcuda-culaunchkernel-from-julia/124314)

<div class="topic-metadata">

**Author:** [@miniskar](https://discourse.julialang.org/u/miniskar)\
**Replies:** 2\
**Last updated:** [January 5, 2025, 8:30am UTC](https://discourse.julialang.org/t/call-libcuda-culaunchkernel-from-julia/124314 "2025-01-05T08:30:55Z")

</div>

I am trying to analyze the overheads of launching a CUDA task from Julia and also from C++. I see some gaps in Julia after successive launch of CUDA “saxpy\_cuda” kernel to non-blocking streams. I am wondering if it is be…

---

## [Matrix diagonalization (linear algebra)](https://discourse.julialang.org/t/matrix-diagonalization-linear-algebra/124405)

<div class="topic-metadata">

**Author:** [@fanzhy171](https://discourse.julialang.org/u/fanzhy171)\
**Replies:** 24\
**Last updated:** [January 5, 2025, 8:11am UTC](https://discourse.julialang.org/t/matrix-diagonalization-linear-algebra/124405 "2025-01-05T08:11:00Z")

</div>

Hello everyone, I have a problem related to using Linear algebra package to help me diagonalize a matrix. Normally, one would use function like eig(). But as I found out that the returned eigenvalues are sorted automatic…

---

## [Precompilation errors while adding self-developed package to another package](https://discourse.julialang.org/t/precompilation-errors-while-adding-self-developed-package-to-another-package/124028)

<div class="topic-metadata">

**Author:** [@jmaedler](https://discourse.julialang.org/u/jmaedler)\
**Replies:** 7\
**Last updated:** [January 4, 2025, 6:53pm UTC](https://discourse.julialang.org/t/precompilation-errors-while-adding-self-developed-package-to-another-package/124028 "2025-01-04T18:53:02Z")

</div>

Hi folks, I am still fairly new to Julia… especially to package development. Currently, I am running into an issue while adding a package with some ModelingToolkit model library I developed myself. When I try to precomp…

---

## [How to exit Julia altogether from bash terminal?](https://discourse.julialang.org/t/how-to-exit-julia-altogether-from-bash-terminal/124360)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 5\
**Last updated:** [January 3, 2025, 8:01am UTC](https://discourse.julialang.org/t/how-to-exit-julia-altogether-from-bash-terminal/124360 "2025-01-03T08:01:56Z")

</div>

Hello, I am launching a julia script with a bash script. How can I terminate the julia script so to go back into bash? I used exit(0) but the terminal remains in Julia… Thanks

---

## [Conditional function implementation](https://discourse.julialang.org/t/conditional-function-implementation/124356)

<div class="topic-metadata">

**Author:** [@Matthijs\_1971](https://discourse.julialang.org/u/Matthijs_1971)\
**Replies:** 2\
**Last updated:** [January 2, 2025, 11:25am UTC](https://discourse.julialang.org/t/conditional-function-implementation/124356 "2025-01-02T11:25:33Z")

</div>

Please have a look at the code below. #!/usr/bin/env julia bad\_func()::Nothing = println("Default") # Commented in: Case A. Commented out: Case B. function conditional\_implementation(choice::Int64)::Nothing println("…

---

## [CUDA async is not working properly](https://discourse.julialang.org/t/cuda-async-is-not-working-properly/123902)

<div class="topic-metadata">

**Author:** [@miniskar](https://discourse.julialang.org/u/miniskar)\
**Replies:** 4\
**Last updated:** [December 31, 2024, 2:18pm UTC](https://discourse.julialang.org/t/cuda-async-is-not-working-properly/123902 "2024-12-31T14:18:21Z")

</div>

I am trying to run saxpy\_kernel using CUDA async. I have a need to use the user specified stream to run the saxpy\_kernel. It is working good with CUDA.sync, but with CUDA.@async. Here is the minimum working example. Fi…

---

## [Installation problem](https://discourse.julialang.org/t/installation-problem/124245)

<div class="topic-metadata">

**Author:** [@Gerard](https://discourse.julialang.org/u/Gerard)\
**Replies:** 8\
**Last updated:** [December 30, 2024, 7:11pm UTC](https://discourse.julialang.org/t/installation-problem/124245 "2024-12-30T19:11:37Z")

</div>

I am using curl -fsSL https://install.julialang.org | sh to install Julia on Kubuntu 24.10. I get this error: info: downloading installer curl: (23) Failure writing output to destination juliaup: command failed: downloa…

---

## [Error in multiple dispatch](https://discourse.julialang.org/t/error-in-multiple-dispatch/124239)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 10\
**Last updated:** [December 30, 2024, 5:28am UTC](https://discourse.julialang.org/t/error-in-multiple-dispatch/124239 "2024-12-30T05:28:25Z")

</div>

Hi, I am trying to learn multiple dispatch and I can’t figure out why the following code is not working. module GeoLocation using TimeZones using DynamicQuantities using Unitful: Unitful using DocStringExtensions expo…

---

## [Can't refer to columns with spaces in names in @mutate](https://discourse.julialang.org/t/cant-refer-to-columns-with-spaces-in-names-in-mutate/123733)

<div class="topic-metadata">

**Author:** [@Geoff\_Russell](https://discourse.julialang.org/u/Geoff_Russell)\
**Replies:** 4\
**Last updated:** [December 29, 2024, 11:25pm UTC](https://discourse.julialang.org/t/cant-refer-to-columns-with-spaces-in-names-in-mutate/123733 "2024-12-29T23:25:53Z")

</div>

I want to do a simple mutate(a=b+c), but b and c have spaces in the names. Have tried various things without success. using DataFrames using TidierData df=DataFrame(“The Name”=\>\[4,5,6\],“Second Name”=\>\[7,8,9\]) @chain …

---

## [Is it okay that, in Julia, code that never executes can change the result of programs?](https://discourse.julialang.org/t/is-it-okay-that-in-julia-code-that-never-executes-can-change-the-result-of-programs/124195)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 27\
**Last updated:** [December 29, 2024, 12:18pm UTC](https://discourse.julialang.org/t/is-it-okay-that-in-julia-code-that-never-executes-can-change-the-result-of-programs/124195 "2024-12-29T12:18:39Z")

</div>

Consider the following code. The x expression right after the inner let block throws an error because x is not defined in that scope. This is expected given the scoping rules inside let end block. let let x …

---

## [Type assertion for parametric constructors behaves strangely](https://discourse.julialang.org/t/type-assertion-for-parametric-constructors-behaves-strangely/124184)

<div class="topic-metadata">

**Author:** [@Wu-Chenyang](https://discourse.julialang.org/u/Wu-Chenyang)\
**Replies:** 4\
**Last updated:** [December 29, 2024, 11:15am UTC](https://discourse.julialang.org/t/type-assertion-for-parametric-constructors-behaves-strangely/124184 "2024-12-29T11:15:56Z")

</div>

struct A{T\<:Real, N} a::T A{N}(a::T) where {T,N} = new{T,N}(a) end For this simple parametric type, A{2}(1.0) fails with a TypeError, ERROR: TypeError: in A, in T, expected T\<:Real, got a value of type In…

---

## [I need help with routing in the Genie app](https://discourse.julialang.org/t/i-need-help-with-routing-in-the-genie-app/124223)

<div class="topic-metadata">

**Author:** [@gromblr1](https://discourse.julialang.org/u/gromblr1)\
**Replies:** 4\
**Last updated:** [December 29, 2024, 4:52am UTC](https://discourse.julialang.org/t/i-need-help-with-routing-in-the-genie-app/124223 "2024-12-29T04:52:24Z")

</div>

Hola Julians :julia-smirk: i need some help por favor i am able to get the Genie app running and it opens successfully at localhost:8000 but i am getting this error every time I refresh… .how do i point the server to …

---

## [Redirect stdout, stderr to string/stream C++ (embedded)](https://discourse.julialang.org/t/redirect-stdout-stderr-to-string-stream-c-embedded/124210)

<div class="topic-metadata">

**Author:** [@Nelson-numerical-sof](https://discourse.julialang.org/u/Nelson-numerical-sof)\
**Replies:** 7\
**Last updated:** [December 27, 2024, 11:21pm UTC](https://discourse.julialang.org/t/redirect-stdout-stderr-to-string-stream-c-embedded/124210 "2024-12-27T23:21:09Z")

</div>

Hi, I am currently a newbie on julia I try to redirect all outputs stderr, stdout to C/C++ from julia Currently I do and it seems to work: # Create custom IO buffer const io = IOBuffer() Ba…

---

## [How to broadcast this function call?](https://discourse.julialang.org/t/how-to-broadcast-this-function-call/124190)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 6\
**Last updated:** [December 27, 2024, 2:58pm UTC](https://discourse.julialang.org/t/how-to-broadcast-this-function-call/124190 "2024-12-27T14:58:00Z")

</div>

I want to broadcast the function g(u,t) over the argument u: module mwe t = 1.0 xs = rand(4) u = sin.(xs) # therefore, length(xs) is always equal to length(u) function Φ(x, t) return 2 \* exp(t) + exp(t) \* (1 - x) …

---

## [Palindrome](https://discourse.julialang.org/t/palindrome/124054)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 19\
**Last updated:** [December 27, 2024, 6:20am UTC](https://discourse.julialang.org/t/palindrome/124054 "2024-12-27T06:20:14Z")

</div>

Hello, I want to write a program that determines whether a sentence is a palindrome or not. I wrote the following program and it works, but I want to know if this piece of code is flawed from a programming science persp…

---

## [Can not add FixedEffectsModels package](https://discourse.julialang.org/t/can-not-add-fixedeffectsmodels-package/124193)

<div class="topic-metadata">

**Author:** [@sb\_ali](https://discourse.julialang.org/u/sb_ali)\
**Replies:** 5\
**Last updated:** [December 26, 2024, 7:52pm UTC](https://discourse.julialang.org/t/can-not-add-fixedeffectsmodels-package/124193 "2024-12-26T19:52:53Z")

</div>

I was trying add package FixedEffectsModels. but it says, ERROR: The following package names could not be resolved: FixedEffectsModels (not found in project, manifest or registry) I updated my Julia, still it is show…

---

## [How does Any actually work?](https://discourse.julialang.org/t/how-does-any-actually-work/124135)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 46\
**Last updated:** [December 25, 2024, 3:16pm UTC](https://discourse.julialang.org/t/how-does-any-actually-work/124135 "2024-12-25T15:16:49Z")

</div>

Earlier I posted an example function which has very poor runtime performance. function demo( dict::Dict{Symbol, Vector}, datetime\_first::DateTime, datetime\_last::DateTime, ) time = dict\[:time\] data =…

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

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