# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=300

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

**Page:** 301

---

## [Working with different versions of Julia](https://discourse.julialang.org/t/working-with-different-versions-of-julia/97573)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 6\
**Last updated:** [April 23, 2023, 8:46pm UTC](https://discourse.julialang.org/t/working-with-different-versions-of-julia/97573 "2023-04-23T20:46:12Z")

</div>

Under normal circumstances, I work with a single version of Julia, say, Julia 1.8. I have a folder of Julia code, along with Project.toml and Manifest.toml files. I would also like to work with Julia 1.9. What is the str…

---

## [Simd and dot vectorization](https://discourse.julialang.org/t/simd-and-dot-vectorization/97817)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 1\
**Last updated:** [April 23, 2023, 5:54pm UTC](https://discourse.julialang.org/t/simd-and-dot-vectorization/97817 "2023-04-23T17:54:51Z")

</div>

Does dot vectorization use SIMD explicitly or implicitly? If I look at the LLVM code for a function call to ‘myadd!’ in julia\> myadd(x, y) = x + y myadd (generic function with 1 method) julia\> function myadd!(z::Vecto…

---

## [Is there any way to avoid reimporting all deps in Pluto.jl notebook?](https://discourse.julialang.org/t/is-there-any-way-to-avoid-reimporting-all-deps-in-pluto-jl-notebook/97803)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 2\
**Last updated:** [April 23, 2023, 8:53am UTC](https://discourse.julialang.org/t/is-there-any-way-to-avoid-reimporting-all-deps-in-pluto-jl-notebook/97803 "2023-04-23T08:53:07Z")

</div>

I’m getting started with Pluto.jl, my module Tibra.jl uses many external libraries. Pluto is asking me to import them one by one. Is there any way to avoid this? I ran it from my activated project but all that seems t…

---

## [Use joins to change country names](https://discourse.julialang.org/t/use-joins-to-change-country-names/97507)

<div class="topic-metadata">

**Author:** [@akshdfyehd](https://discourse.julialang.org/u/akshdfyehd)\
**Replies:** 7\
**Last updated:** [April 23, 2023, 6:37am UTC](https://discourse.julialang.org/t/use-joins-to-change-country-names/97507 "2023-04-23T06:37:47Z")

</div>

Hi, I have got a dataset with a city and country column. However, there are some names in country column are actually the same place but different names, for example: row 7 and 123, I want both country name be Austra…

---

## [How can I add a custom ssl certificate so that HTTP.jl recognizes it by default?](https://discourse.julialang.org/t/how-can-i-add-a-custom-ssl-certificate-so-that-http-jl-recognizes-it-by-default/97698)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [April 23, 2023, 4:01am UTC](https://discourse.julialang.org/t/how-can-i-add-a-custom-ssl-certificate-so-that-http-jl-recognizes-it-by-default/97698 "2023-04-23T04:01:40Z")

</div>

Hi there, I spend a couple of hours without success. Let’s assume we have the julia docker running - how can I add a custom certificate (self-signed) which my website uses so that everything is trusted correctly? I tri…

---

## [Problem getting HTTP.Websocket Server example working](https://discourse.julialang.org/t/problem-getting-http-websocket-server-example-working/97801)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 4\
**Last updated:** [April 23, 2023, 3:56am UTC](https://discourse.julialang.org/t/problem-getting-http-websocket-server-example-working/97801 "2023-04-23T03:56:11Z")

</div>

I am using the canonical HTTP.WebSockets example but getting an iterator error on ws. using HTTP.WebSockets WebSockets.listen(host, convert(UInt16, port)) do ws for message in ws @show messa…

---

## [Configuring a subdomain with subdirectories for each project’s documentation](https://discourse.julialang.org/t/configuring-a-subdomain-with-subdirectories-for-each-project-s-documentation/97802)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 0\
**Last updated:** [April 23, 2023, 3:39am UTC](https://discourse.julialang.org/t/configuring-a-subdomain-with-subdirectories-for-each-project-s-documentation/97802 "2023-04-23T03:39:35Z")

</div>

Continuing the discussion from How do I publish documenter.jl-generated docs to a subdirectory of a custom subddomain?: I am trying to replicate this, and I’m confused about what “custom domain” I should use in my GitHu…

---

## [How to represent struct component](https://discourse.julialang.org/t/how-to-represent-struct-component/97770)

<div class="topic-metadata">

**Author:** [@David\_Sagan](https://discourse.julialang.org/u/David_Sagan)\
**Replies:** 7\
**Last updated:** [April 23, 2023, 1:34am UTC](https://discourse.julialang.org/t/how-to-represent-struct-component/97770 "2023-04-23T01:34:41Z")

</div>

I want to be able to define a variable that represents a component of a structure and then use this variable to set or get the structure component. One thought I have is to do something like: julia\> mutable struct A …

---

## [Jlcode, greek letters, subscripts, etc](https://discourse.julialang.org/t/jlcode-greek-letters-subscripts-etc/97580)

<div class="topic-metadata">

**Author:** [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Replies:** 9\
**Last updated:** [April 22, 2023, 9:26pm UTC](https://discourse.julialang.org/t/jlcode-greek-letters-subscripts-etc/97580 "2023-04-22T21:26:16Z")

</div>

Hello everyone, I am preparing a small book to invite future (and young) chemists to use Julia in order to solve problems in kinetics, quantum chemistry, etc. (ODEs, Catalyst, Flux, Neural ODEs, etc). My text is writte…

---

## [Optimizing function barrier for mapreduce](https://discourse.julialang.org/t/optimizing-function-barrier-for-mapreduce/97795)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 2\
**Last updated:** [April 22, 2023, 7:47pm UTC](https://discourse.julialang.org/t/optimizing-function-barrier-for-mapreduce/97795 "2023-04-22T19:47:47Z")

</div>

I have a function that counts the number of nodes in a binary tree: struct Node degree::Int l::Node r::Node # possibly undefined; assume degree is correct Node(::Int) = new(0) Node(::Int, l::Node) =…

---

## [Pkg: unable to connect to sa.pkg.julialang.org](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 12\
**Last updated:** [April 22, 2023, 5:48pm UTC](https://discourse.julialang.org/t/pkg-unable-to-connect-to-sa-pkg-julialang-org/91278 "2023-04-22T17:48:25Z")

</div>

Cheers, I’m having this issue under Julia 1.8.2. A clean Julia install has not been able to solve it. (@v1.8) pkg\> up ┌ Warning: could not download https://pkg.julialang.org/registries │ exception = HTTP/2 301 (Faile…

---

## [Setting the PATH variable from within julia](https://discourse.julialang.org/t/setting-the-path-variable-from-within-julia/97692)

<div class="topic-metadata">

**Author:** [@Niall](https://discourse.julialang.org/u/Niall)\
**Replies:** 12\
**Last updated:** [April 22, 2023, 10:45am UTC](https://discourse.julialang.org/t/setting-the-path-variable-from-within-julia/97692 "2023-04-22T10:45:05Z")

</div>

Hi. I’m writing a julia package to teach julia to my students as a basis for learning maths and physics. I find that particularly students with little computer experience can have great difficulties setting things up for…

---

## [Immutable types](https://discourse.julialang.org/t/immutable-types/97751)

<div class="topic-metadata">

**Author:** [@lancejnelson](https://discourse.julialang.org/u/lancejnelson)\
**Replies:** 3\
**Last updated:** [April 22, 2023, 6:05am UTC](https://discourse.julialang.org/t/immutable-types/97751 "2023-04-22T06:05:41Z")

</div>

I have an immutable struct designed like this: struct crystal lVecs::Matrix{Float64} nBasis:: Vector{Int64} latpar::Float64 atomicBasis::Vector{Matrix{Float64}} coordSys::Vector{String} end and an i…

---

## [Parametric type which contains the abstract type it subtypes](https://discourse.julialang.org/t/parametric-type-which-contains-the-abstract-type-it-subtypes/97774)

<div class="topic-metadata">

**Author:** [@nharr](https://discourse.julialang.org/u/nharr)\
**Replies:** 3\
**Last updated:** [April 22, 2023, 6:08am UTC](https://discourse.julialang.org/t/parametric-type-which-contains-the-abstract-type-it-subtypes/97774 "2023-04-22T06:08:03Z")

</div>

I’m creating a type that is a matrix with value bounds. This works: struct Map{M\<:AbstractMatrix{\<:Real}} data::M lb ub end But I want it to behave like a matrix itself too, so a subtype. This works: str…

---

## [What Is a Simple Example of Julia Solving the Two Language Problem?](https://discourse.julialang.org/t/what-is-a-simple-example-of-julia-solving-the-two-language-problem/97659)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 25\
**Last updated:** [April 22, 2023, 5:07am UTC](https://discourse.julialang.org/t/what-is-a-simple-example-of-julia-solving-the-two-language-problem/97659 "2023-04-22T05:07:24Z")

</div>

Hi folks, I am giving a talk soon and something I want to highlight is the two language problem and how Julia addresses/solves this. Does anyone have a snippet of code that shows a simple Julia implementation of some fu…

---

## [Structs defined with different fields based on concrete parameters?](https://discourse.julialang.org/t/structs-defined-with-different-fields-based-on-concrete-parameters/97772)

<div class="topic-metadata">

**Author:** [@nharr](https://discourse.julialang.org/u/nharr)\
**Replies:** 2\
**Last updated:** [April 22, 2023, 4:45am UTC](https://discourse.julialang.org/t/structs-defined-with-different-fields-based-on-concrete-parameters/97772 "2023-04-22T04:45:48Z")

</div>

Is it possible to define two different structs with the same name but different concrete parameters? I have a single type that changes and I want the rest of my code to react to that, including how other types are struct…

---

## [Problems using LsqFit inside a module](https://discourse.julialang.org/t/problems-using-lsqfit-inside-a-module/97748)

<div class="topic-metadata">

**Author:** [@amarquez](https://discourse.julialang.org/u/amarquez)\
**Replies:** 5\
**Last updated:** [April 21, 2023, 10:52pm UTC](https://discourse.julialang.org/t/problems-using-lsqfit-inside-a-module/97748 "2023-04-21T22:52:28Z")

</div>

Hello all! Thank you very much for this space. I found a problem using LsqFit within a module in Julia 1.8.5 installed on Ubuntu 22.04. If I create a simple module as as in the following MWE, I got long list of warnin…

---

## [Terminating a process on Windows](https://discourse.julialang.org/t/terminating-a-process-on-windows/87481)

<div class="topic-metadata">

**Author:** [@Ashlin\_Harris](https://discourse.julialang.org/u/Ashlin_Harris)\
**Replies:** 1\
**Last updated:** [April 21, 2023, 8:26pm UTC](https://discourse.julialang.org/t/terminating-a-process-on-windows/87481 "2023-04-21T20:26:41Z")

</div>

I’m not able to kill a Julia process on Windows. Instead, its status remains as ProcessSignaled, and it never terminates. The issue doesn’t exist on MacOS and Linux, and it occurs regardless of Julia version. I didn’t ex…

---

## [Optimization.jl, DataInterpolations.jl and Gradients](https://discourse.julialang.org/t/optimization-jl-datainterpolations-jl-and-gradients/97676)

<div class="topic-metadata">

**Author:** [@astrobc1](https://discourse.julialang.org/u/astrobc1)\
**Replies:** 4\
**Last updated:** [April 21, 2023, 7:27pm UTC](https://discourse.julialang.org/t/optimization-jl-datainterpolations-jl-and-gradients/97676 "2023-04-21T19:27:03Z")

</div>

Hello - This is sort of a follow-up to this post here which didn’t receive attention. Below I provide a more explicit example of what I’m trying to do with interpolating and gradients during optimization. I understand th…

---

## [ElectronDisplay crashing](https://discourse.julialang.org/t/electrondisplay-crashing/97756)

<div class="topic-metadata">

**Author:** [@Ritu\_Lahkar](https://discourse.julialang.org/u/Ritu_Lahkar)\
**Replies:** 0\
**Last updated:** [April 21, 2023, 7:21pm UTC](https://discourse.julialang.org/t/electrondisplay-crashing/97756 "2023-04-21T19:21:07Z")

</div>

Please help ElectronDisplay crashing with the error: \[3352:0422/003537.739221:FATAL:gpu\_data\_manager\_impl\_private.cc(439)\] GPU process isn't usable. Goodbye. Electron.Window(Application(Base.PipeEndpoint(RawFD(22) open,…

---

## [Choosing a plotting library](https://discourse.julialang.org/t/choosing-a-plotting-library/97556)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 30\
**Last updated:** [April 21, 2023, 4:31pm UTC](https://discourse.julialang.org/t/choosing-a-plotting-library/97556 "2023-04-21T16:31:35Z")

</div>

Since 9 months I am trying to find a good Julia plotting library, but I was not successful. So I am going back to PythonPlot.jl, the latest wrapper for the Python based matplotlib library. What does it offer that the…

---

## [Changing the headers in Base.download to simulate Chrome usage](https://discourse.julialang.org/t/changing-the-headers-in-base-download-to-simulate-chrome-usage/97744)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 1\
**Last updated:** [April 21, 2023, 3:22pm UTC](https://discourse.julialang.org/t/changing-the-headers-in-base-download-to-simulate-chrome-usage/97744 "2023-04-21T15:22:46Z")

</div>

Hi, How do you use specifics headers in Base.download to simulate Chrome usage? I have found this curl example and I have tried to replicate it with the latest Chrome user-agent for Linux. However, when trying to speci…

---

## [Metal throws ERROR: Exception handler triggered on unmanaged thread](https://discourse.julialang.org/t/metal-throws-error-exception-handler-triggered-on-unmanaged-thread/97727)

<div class="topic-metadata">

**Author:** [@pitsianis](https://discourse.julialang.org/u/pitsianis)\
**Replies:** 2\
**Last updated:** [April 21, 2023, 3:07pm UTC](https://discourse.julialang.org/t/metal-throws-error-exception-handler-triggered-on-unmanaged-thread/97727 "2023-04-21T15:07:49Z")

</div>

This is my very first try to use the M2 GPU using the 1.9-rc2 aa64. The following implements a straight forward imperative bitonic sort. However, when running from the REPL, from time to time, it throws ERROR: Exception…

---

## [Weird behaviour of Identity matrix with symbolic type](https://discourse.julialang.org/t/weird-behaviour-of-identity-matrix-with-symbolic-type/97186)

<div class="topic-metadata">

**Author:** [@DerongXu](https://discourse.julialang.org/u/DerongXu)\
**Replies:** 7\
**Last updated:** [April 21, 2023, 2:20pm UTC](https://discourse.julialang.org/t/weird-behaviour-of-identity-matrix-with-symbolic-type/97186 "2023-04-21T14:20:27Z")

</div>

Hi all, I’m utilizing SymPy within Julia to perform symbolic calculations, but I’ve noticed that the symbolic identity matrix operation is producing inaccurate outcomes. Can you explain why this is happening? Please fi…

---

## [Is this an expected behavior of rand.()?](https://discourse.julialang.org/t/is-this-an-expected-behavior-of-rand/97735)

<div class="topic-metadata">

**Author:** [@ovt](https://discourse.julialang.org/u/ovt)\
**Replies:** 4\
**Last updated:** [April 21, 2023, 1:23pm UTC](https://discourse.julialang.org/t/is-this-an-expected-behavior-of-rand/97735 "2023-04-21T13:23:52Z")

</div>

julia\> A = zeros(3,3) 3×3 Matrix{Float64}: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 julia\> true ? A .= rand.() : nothing 3×3 Matrix{Float64}: 0.191487 0.0617435 0.279438 0.47524 0.467929 0.45603 0.212515 0…

---

## [Julia function from non-Julia thread and pthread\_join](https://discourse.julialang.org/t/julia-function-from-non-julia-thread-and-pthread-join/97740)

<div class="topic-metadata">

**Author:** [@jonas-kr](https://discourse.julialang.org/u/jonas-kr)\
**Replies:** 0\
**Last updated:** [April 21, 2023, 1:21pm UTC](https://discourse.julialang.org/t/julia-function-from-non-julia-thread-and-pthread-join/97740 "2023-04-21T13:21:19Z")

</div>

Since 46609 has been merged, it has become possible to have non-Julia threads call Julia functions. Accordingly, I have set up the following MWE of a C++ library callback\_example compiled with g++ -shared -o callback\_exa…

---

## [Help wanted with ppo implementation in flux.jl](https://discourse.julialang.org/t/help-wanted-with-ppo-implementation-in-flux-jl/97734)

<div class="topic-metadata">

**Author:** [@aminmr1375](https://discourse.julialang.org/u/aminmr1375)\
**Replies:** 3\
**Last updated:** [April 21, 2023, 11:41am UTC](https://discourse.julialang.org/t/help-wanted-with-ppo-implementation-in-flux-jl/97734 "2023-04-21T11:41:38Z")

</div>

my implementation works well for other environments but not working well at LunarLander-v2 (can’t reach to +200) it’s learning but doesn’t solve the env but works well on other envs like CartPole, Acrobot, also a custom…

---

## [Delay Differential Equations does not provide any solution](https://discourse.julialang.org/t/delay-differential-equations-does-not-provide-any-solution/96769)

<div class="topic-metadata">

**Author:** [@pclus](https://discourse.julialang.org/u/pclus)\
**Replies:** 7\
**Last updated:** [April 21, 2023, 10:22am UTC](https://discourse.julialang.org/t/delay-differential-equations-does-not-provide-any-solution/96769 "2023-04-21T10:22:44Z")

</div>

I am trying to use DifferentialEquations.jl to solve a delay differential equation. However, I fail to reproduce the example provided in the documentation. I copy here the code of the example: using DifferentialEquatio…

---

## [HTTP.jl async is slow compared to python+aiohttp](https://discourse.julialang.org/t/http-jl-async-is-slow-compared-to-python-aiohttp/96736)

<div class="topic-metadata">

**Author:** [@agoodm](https://discourse.julialang.org/u/agoodm)\
**Replies:** 48\
**Last updated:** [April 21, 2023, 4:52am UTC](https://discourse.julialang.org/t/http-jl-async-is-slow-compared-to-python-aiohttp/96736 "2023-04-21T04:52:19Z")

</div>

So @fabiangans and I have been having discussions about improving the performance of Zarr.jl. The goal is to improve the time it takes to load data from a remote zarr store (eg on HTTP, GCS, or S3). The current implement…

---

## [Macro for struct generation using symbolic parameters](https://discourse.julialang.org/t/macro-for-struct-generation-using-symbolic-parameters/97693)

<div class="topic-metadata">

**Author:** [@bohm](https://discourse.julialang.org/u/bohm)\
**Replies:** 4\
**Last updated:** [April 21, 2023, 12:20am UTC](https://discourse.julialang.org/t/macro-for-struct-generation-using-symbolic-parameters/97693 "2023-04-21T00:20:34Z")

</div>

Hello everyone, I try to achieve the following, and can’t find a solution. Maybe its not even possible. I have created a macro, which should help a user to define a certain type of struct. This struct needs a list of p…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=299)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=301)
