# General Usage

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

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

**Page:** 441

---

## [Making life easier for new users](https://discourse.julialang.org/t/making-life-easier-for-new-users/81638)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 13\
**Last updated:** [June 3, 2022, 10:22pm UTC](https://discourse.julialang.org/t/making-life-easier-for-new-users/81638 "2022-06-03T22:22:53Z")

</div>

What is already easy is to install packages. What is not so easy yet is: to create a new user project to find, copy and execute examples to create custom system image I wrote three feature requests for package manage…

---

## [Performance slowdown on AMD with Windows10 compared to Intel with Linux (arch)](https://discourse.julialang.org/t/performance-slowdown-on-amd-with-windows10-compared-to-intel-with-linux-arch/82180)

<div class="topic-metadata">

**Author:** [@Tambu](https://discourse.julialang.org/u/Tambu)\
**Replies:** 7\
**Last updated:** [June 3, 2022, 9:42pm UTC](https://discourse.julialang.org/t/performance-slowdown-on-amd-with-windows10-compared-to-intel-with-linux-arch/82180 "2022-06-03T21:42:23Z")

</div>

Update, TL;DR: the problem is the AMD processor, or the combination AMD+windows. Not Windows itself as on the same laptop, same version of julia (1.7.3), performance are similar. Hi all, I have two setups, as the title…

---

## [IMEX scheme using DifferentialEquations.jl](https://discourse.julialang.org/t/imex-scheme-using-differentialequations-jl/41435)

<div class="topic-metadata">

**Author:** [@Hgs](https://discourse.julialang.org/u/Hgs)\
**Replies:** 4\
**Last updated:** [June 3, 2022, 7:52pm UTC](https://discourse.julialang.org/t/imex-scheme-using-differentialequations-jl/41435 "2022-06-03T19:52:41Z")

</div>

Hello, I have a PDE model which contains a stiff viscous term and non-stiff nonlinear convection term. I was wondering if I can exploit the pre-developed solvers in DifferentialEquations.jl to solve the pde (or system o…

---

## [Developer's path and username is persisted in the error stack](https://discourse.julialang.org/t/developers-path-and-username-is-persisted-in-the-error-stack/30746)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 3\
**Last updated:** [June 3, 2022, 5:47pm UTC](https://discourse.julialang.org/t/developers-path-and-username-is-persisted-in-the-error-stack/30746 "2022-06-03T17:47:12Z")

</div>

I noticed in my error stack traces paths like: \[2\] top-level scope at /Users/sabae/buildbot/worker/package\_macos64/build/usr/share/julia/stdlib/v1.2/Test/src/Test.jl:1113 First, this path is not correct: it’s not a pat…

---

## [Transpose dictionary](https://discourse.julialang.org/t/transpose-dictionary/82148)

<div class="topic-metadata">

**Author:** [@markub3327](https://discourse.julialang.org/u/markub3327)\
**Replies:** 15\
**Last updated:** [June 3, 2022, 2:51pm UTC](https://discourse.julialang.org/t/transpose-dictionary/82148 "2022-06-03T14:51:36Z")

</div>

Hello, I need to transpose a dictionary, but my idea is to use the temporary dictionary X and copy the elements in a transposed manner. Exist something for the critical performance section where the transposition of a d…

---

## [Double y-axes in a sub-plot](https://discourse.julialang.org/t/double-y-axes-in-a-sub-plot/82186)

<div class="topic-metadata">

**Author:** [@Vautrin](https://discourse.julialang.org/u/Vautrin)\
**Replies:** 2\
**Last updated:** [June 3, 2022, 2:51pm UTC](https://discourse.julialang.org/t/double-y-axes-in-a-sub-plot/82186 "2022-06-03T14:51:17Z")

</div>

I would like to have dual y-axes in one of my subplots; however, it seems like I am missing something about twinx() and link = :x, but I couldn’t figure out what… Plotting double y-axis using twinx() works fine in a sta…

---

## [Generic Iterative Solvers: Krylov's methods example](https://discourse.julialang.org/t/generic-iterative-solvers-krylovs-methods-example/82086)

<div class="topic-metadata">

**Author:** [@martin.d.maas](https://discourse.julialang.org/u/martin.d.maas)\
**Replies:** 9\
**Last updated:** [June 3, 2022, 2:45pm UTC](https://discourse.julialang.org/t/generic-iterative-solvers-krylovs-methods-example/82086 "2022-06-03T14:45:49Z")

</div>

Hi, This is related to a discussion within the lengthy tread that spun off Yuri’s blog post. I don’t want to make that thread even longer with off-topic material. In that thread, when discussing Julia’s ecosystem @jul…

---

## [Drop iterator shape](https://discourse.julialang.org/t/drop-iterator-shape/82140)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [June 3, 2022, 2:17pm UTC](https://discourse.julialang.org/t/drop-iterator-shape/82140 "2022-06-03T14:17:58Z")

</div>

I am looking for the recommended way to “drop” the shape property of an iterator. Eg for itr = Iterators.product(1:5, 1:2) I want itr\_flat such that collect(itr\_flat) == vec(collect(itr)) without, of course, collecti…

---

## [Unable to extract Julia on WSL2](https://discourse.julialang.org/t/unable-to-extract-julia-on-wsl2/82153)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 9\
**Last updated:** [June 3, 2022, 2:03pm UTC](https://discourse.julialang.org/t/unable-to-extract-julia-on-wsl2/82153 "2022-06-03T14:03:24Z")

</div>

Latest Julia. I am unable to extract the archive on WSL. Has anyone seen this?

---

## [Problem using ModellingToolkit and Galacticoptim to solve a vector/matrix optimization problem](https://discourse.julialang.org/t/problem-using-modellingtoolkit-and-galacticoptim-to-solve-a-vector-matrix-optimization-problem/62470)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 6\
**Last updated:** [June 3, 2022, 1:41pm UTC](https://discourse.julialang.org/t/problem-using-modellingtoolkit-and-galacticoptim-to-solve-a-vector-matrix-optimization-problem/62470 "2022-06-03T13:41:42Z")

</div>

Hey folks, I was trying to resolve a problem using MTK and GalacticOptim to solve a simple optimization problem. The issue is that I am no really getting an error message that tells me where the problem is. Here is the …

---

## [Can I still register packages with only three characters?](https://discourse.julialang.org/t/can-i-still-register-packages-with-only-three-characters/82170)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 3\
**Last updated:** [June 3, 2022, 8:12am UTC](https://discourse.julialang.org/t/can-i-still-register-packages-with-only-three-characters/82170 "2022-06-03T08:12:13Z")

</div>

I understand new packages generally have to have names with at least five characters. However, my package has taken the name “Hop” in the registry during Julia pre-1.0 timeframe. Later, the package development became pri…

---

## [How to avoid vectors of abstract types?](https://discourse.julialang.org/t/how-to-avoid-vectors-of-abstract-types/82132)

<div class="topic-metadata">

**Author:** [@BatyLeo](https://discourse.julialang.org/u/BatyLeo)\
**Replies:** 5\
**Last updated:** [June 3, 2022, 7:47am UTC](https://discourse.julialang.org/t/how-to-avoid-vectors-of-abstract-types/82132 "2022-06-03T07:47:18Z")

</div>

Hello, I started using Julia intensively a few months ago, and I keep coming across situations where I have vectors of abstract types, which should be avoided for performance reasons. I can’t seem to find satisfying sol…

---

## [Structures and DataFrames](https://discourse.julialang.org/t/structures-and-dataframes/82166)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 2\
**Last updated:** [June 3, 2022, 7:29am UTC](https://discourse.julialang.org/t/structures-and-dataframes/82166 "2022-06-03T07:29:39Z")

</div>

Learning about structures. Appreciate any comments on the below struct BASE a::Int64 b::Int64 end struct B1 base::BASE b1::Int64 end struct B2 base::BASE b2::Int64 end df = DataFrame( type …

---

## [WGLMakie/JSServe offline export](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854)

<div class="topic-metadata">

**Author:** [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Replies:** 5\
**Last updated:** [June 2, 2022, 10:58pm UTC](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854 "2022-06-02T22:58:26Z")

</div>

Hi, I opened an issue at JSServe.jl, but I’m afraid it doesn’t catch a lot of attention and it’s not really a bug. Maybe someone else here knows?: I have trouble making an offline plot similar to the surface plot in th…

---

## [Setting the plots backend not working on M1 Mac](https://discourse.julialang.org/t/setting-the-plots-backend-not-working-on-m1-mac/82158)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 2\
**Last updated:** [June 2, 2022, 9:47pm UTC](https://discourse.julialang.org/t/setting-the-plots-backend-not-working-on-m1-mac/82158 "2022-06-02T21:47:29Z")

</div>

I am working on an M1 Mac and it has trouble with plotting. When I try it like this it works: using GR histogram(randn(10000)) But like this it does not: using Plots gr() # pyplot() # also does not work histogram(ran…

---

## [Specific columns in dataframe transform](https://discourse.julialang.org/t/specific-columns-in-dataframe-transform/82109)

<div class="topic-metadata">

**Author:** [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Replies:** 6\
**Last updated:** [June 2, 2022, 8:31pm UTC](https://discourse.julialang.org/t/specific-columns-in-dataframe-transform/82109 "2022-06-02T20:31:27Z")

</div>

mydf = DataFrame(a = \[1,2,3\], b = \[1, missing, 2\]) Works: mydf = transform(mydf, AsTable(\[:a, :b\]) =\> ByRow(x -\> x.a + x.b ) =\> :c) Works: mydf = transform(mydf,…

---

## [High numbers becoming negative](https://discourse.julialang.org/t/high-numbers-becoming-negative/82150)

<div class="topic-metadata">

**Author:** [@Gabrielforest](https://discourse.julialang.org/u/Gabrielforest)\
**Replies:** 1\
**Last updated:** [June 2, 2022, 8:27pm UTC](https://discourse.julialang.org/t/high-numbers-becoming-negative/82150 "2022-06-02T20:27:29Z")

</div>

Why 20^18 has a negative result?

---

## [What does this result mean?](https://discourse.julialang.org/t/what-does-this-result-mean/82137)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 14\
**Last updated:** [June 2, 2022, 7:49pm UTC](https://discourse.julialang.org/t/what-does-this-result-mean/82137 "2022-06-02T19:49:17Z")

</div>

julia\> A = \[2, 2, 2\] 3-element Vector{Int64}: 2 2 2 julia\> all(A, dims = 1) 1-element Vector{Bool}: 0 Why does this code return 0, not 1?

---

## [Specifying RetCodes in Event when solving ODE](https://discourse.julialang.org/t/specifying-retcodes-in-event-when-solving-ode/82145)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 4:55pm UTC](https://discourse.julialang.org/t/specifying-retcodes-in-event-when-solving-ode/82145 "2022-06-02T16:55:32Z")

</div>

Suppose I want to add a discrete event when solving an ODE using DifferentialEquations.jl, and if the condition is met I want to terminate the solving process. I can do that with the following: cb1\_fun(u,t,integrator) =…

---

## [Julia vs Trilinos](https://discourse.julialang.org/t/julia-vs-trilinos/82128)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 8\
**Last updated:** [June 2, 2022, 2:15pm UTC](https://discourse.julialang.org/t/julia-vs-trilinos/82128 "2022-06-02T14:15:07Z")

</div>

Hi all, I am just learning about Julia, and see another package for mathematics named Trilinos. TrilinosHandsOnTutorial · trilinos/Trilinos\_tutorial Wiki https://trilinos.github.io/ I was thinking and wondering if I …

---

## [Are Julia Channels/Futures thread safe (with a failing code example)?](https://discourse.julialang.org/t/are-julia-channels-futures-thread-safe-with-a-failing-code-example/64490)

<div class="topic-metadata">

**Author:** [@orenbenkiki](https://discourse.julialang.org/u/orenbenkiki)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 1:01pm UTC](https://discourse.julialang.org/t/are-julia-channels-futures-thread-safe-with-a-failing-code-example/64490 "2022-06-02T13:01:30Z")

</div>

I thought the answer is “obviously they are”, but I get an intermittent deadlock in the following code: using Base.Threads using Distributed iterations = parse(Int, ARGS\[1\]) println("threads: $(nthreads())") println("…

---

## [AMDGPU-error](https://discourse.julialang.org/t/amdgpu-error/64990)

<div class="topic-metadata">

**Author:** [@peteole](https://discourse.julialang.org/u/peteole)\
**Replies:** 9\
**Last updated:** [July 22, 2021, 11:34am UTC](https://discourse.julialang.org/t/amdgpu-error/64990 "2021-07-22T11:34:40Z")

</div>

Hi, on my manjaro (arch linux) system (with a ryzen 4500u, no dedicated GPU) I get an error initiating a simple ROCArray: a=ROCArray(\[1,2,3\]) 3-element ROCVector{Int64}: Error showing value of type ROCVector{Int64}: ER…

---

## [Rewrite Packages from Python](https://discourse.julialang.org/t/rewrite-packages-from-python/79888)

<div class="topic-metadata">

**Author:** [@Ordens\_Ritter](https://discourse.julialang.org/u/Ordens_Ritter)\
**Replies:** 7\
**Last updated:** [June 2, 2022, 12:53pm UTC](https://discourse.julialang.org/t/rewrite-packages-from-python/79888 "2022-06-02T12:53:47Z")

</div>

I am trying to advance my Julia language skill and (some concepts). Therefore am trying to work throw the book “Deep Learning and the Game of GO” but not writing the Code in Python but in Julia. I get some problems wit…

---

## [Is it possible to test using CI if a package update breaks a specific downstream package?](https://discourse.julialang.org/t/is-it-possible-to-test-using-ci-if-a-package-update-breaks-a-specific-downstream-package/82123)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [June 2, 2022, 11:52am UTC](https://discourse.julialang.org/t/is-it-possible-to-test-using-ci-if-a-package-update-breaks-a-specific-downstream-package/82123 "2022-06-02T11:52:08Z")

</div>

Suppose I have packages A and B, where B depends on A. I push an update to A, which might break B. Now I want to test B against my PR to A automatically, possibly by including the test in the CI run (using GitHub actions…

---

## [Flux 13.3 ;ERROR: UndefVarError: depwarn not defined](https://discourse.julialang.org/t/flux-13-3-error-undefvarerror-depwarn-not-defined/82118)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 1\
**Last updated:** [June 2, 2022, 10:10am UTC](https://discourse.julialang.org/t/flux-13-3-error-undefvarerror-depwarn-not-defined/82118 "2022-06-02T10:10:39Z")

</div>

julia\> versioninfo() Julia Version 1.7.3 Commit 742b9abb4d (2022-05-06 12:58 UTC) Platform Info: OS: Windows (x86\_64-w64-mingw32) CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GH WORD\_SIZE: 64 LIBM: libopenlibm LLVM…

---

## [IJulia kernel not working](https://discourse.julialang.org/t/ijulia-kernel-not-working/82122)

<div class="topic-metadata">

**Author:** [@Gridsof](https://discourse.julialang.org/u/Gridsof)\
**Replies:** 0\
**Last updated:** [June 2, 2022, 10:13am UTC](https://discourse.julialang.org/t/ijulia-kernel-not-working/82122 "2022-06-02T10:13:44Z")

</div>

Hi, I have a centrelized julia installation on a cluster. I installed the IJulia packages in a different directory and now the kernel cannot start with the following error: ArgumentError: Package IJulia not found in cur…

---

## [How to detect globals (inadvertently used) in a function?](https://discourse.julialang.org/t/how-to-detect-globals-inadvertently-used-in-a-function/82011)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 4\
**Last updated:** [June 2, 2022, 8:21am UTC](https://discourse.julialang.org/t/how-to-detect-globals-inadvertently-used-in-a-function/82011 "2022-06-02T08:21:13Z")

</div>

There is probably a simple answer, but it has somehow escaped me. Is there a way to list the variables used in a function? In particular, I want to spot any globals that are inadvertently used. a = 1 fn1(x) = a + x …

---

## [Adding Type to (working) Union{...} bricks it](https://discourse.julialang.org/t/adding-type-to-working-union-bricks-it/82041)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 8\
**Last updated:** [June 2, 2022, 7:39am UTC](https://discourse.julialang.org/t/adding-type-to-working-union-bricks-it/82041 "2022-06-02T07:39:16Z")

</div>

I’ve got a type defined as Union{Dict{Union{UInt8, String}, Number}, Nothing}. This works, but as soon as I add String to this Union it breaks and does not accept the initially working values anymore. See MWE below. The…

---

## [How to add the path?](https://discourse.julialang.org/t/how-to-add-the-path/82097)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 1\
**Last updated:** [June 2, 2022, 12:12am UTC](https://discourse.julialang.org/t/how-to-add-the-path/82097 "2022-06-02T00:12:34Z")

</div>

jill will: 1) install Julia 1.8.0-rc1 for mac-x86\_64 into /Applications 2) make symlinks in /Users/zhangdeliang/.local/bin You may need to manually add /Users/zhangdeliang/.local/bin to PATH How to manually add /Us…

---

## [Question about two variables?](https://discourse.julialang.org/t/question-about-two-variables/82094)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 6\
**Last updated:** [June 1, 2022, 11:45pm UTC](https://discourse.julialang.org/t/question-about-two-variables/82094 "2022-06-01T23:45:15Z")

</div>

Dear all, What is the difference between foo and bar below? julia\> foo = \[1, 2, 3\] 3-element Vector{Int64}: 1 2 3 julia\> bar = \[1; 2; 3\] 3-element Vector{Int64}: 1 2 3 julia\> foo === bar false julia\> varinfo()…

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

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