# General Usage

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

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

**Page:** 204

---

## [Interactive visualization of fundamental concepts in calculus/linear algebra](https://discourse.julialang.org/t/interactive-visualization-of-fundamental-concepts-in-calculus-linear-algebra/90407)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 8\
**Last updated:** [February 7, 2024, 12:54am UTC](https://discourse.julialang.org/t/interactive-visualization-of-fundamental-concepts-in-calculus-linear-algebra/90407 "2024-02-07T00:54:11Z")

</div>

Is there any publicly available material suitable for in-class teaching of mathematical principles that provides interactive visualization of concepts such as eigenvectors, matrix rotation, extremal points of function gr…

---

## [Trouble with \`append!\`](https://discourse.julialang.org/t/trouble-with-append/109706)

<div class="topic-metadata">

**Author:** [@scheinerman](https://discourse.julialang.org/u/scheinerman)\
**Replies:** 7\
**Last updated:** [February 6, 2024, 11:53pm UTC](https://discourse.julialang.org/t/trouble-with-append/109706 "2024-02-06T23:53:26Z")

</div>

I often want to add an item to the end of a list (i.e., to a Vector). This works fine: julia\> x = \[1,2,3,4\] 4-element Vector{Int64}: 1 2 3 4 julia\> append!(x,5) 5-element Vector{Int64}: 1 2 3 4 5 But this doe…

---

## [Handling concurrent writes to websocket](https://discourse.julialang.org/t/handling-concurrent-writes-to-websocket/109843)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 0\
**Last updated:** [February 6, 2024, 11:16pm UTC](https://discourse.julialang.org/t/handling-concurrent-writes-to-websocket/109843 "2024-02-06T23:16:46Z")

</div>

We have a server handling websocket connections that can be written to by async tasks. It turns out that a simple Socket.send(ws, msg) is not protecting against concurrent use. I came up with a message queue that uses C…

---

## [Seeking guidance on implementing a simple interactive flow chart](https://discourse.julialang.org/t/seeking-guidance-on-implementing-a-simple-interactive-flow-chart/109258)

<div class="topic-metadata">

**Author:** [@wobagi](https://discourse.julialang.org/u/wobagi)\
**Replies:** 3\
**Last updated:** [February 6, 2024, 10:14pm UTC](https://discourse.julialang.org/t/seeking-guidance-on-implementing-a-simple-interactive-flow-chart/109258 "2024-02-06T22:14:27Z")

</div>

Hello everyone, I’m a newcomer to the Makie community. I am currently struggling to develop a very simple flowchart in which specific Julia objects are represented as rectangular nodes on a drawing, connected by arrows. …

---

## [DifferentialEquations.jl - Solving ODE with "alg\_hints=\[:stiff\]" is 20x slower, any alternatives?](https://discourse.julialang.org/t/differentialequations-jl-solving-ode-with-alg-hints-stiff-is-20x-slower-any-alternatives/109750)

<div class="topic-metadata">

**Author:** [@FJRubio](https://discourse.julialang.org/u/FJRubio)\
**Replies:** 8\
**Last updated:** [February 6, 2024, 9:59pm UTC](https://discourse.julialang.org/t/differentialequations-jl-solving-ode-with-alg-hints-stiff-is-20x-slower-any-alternatives/109750 "2024-02-06T21:59:13Z")

</div>

I am solving several thousand systems of ODEs, with an explicit Jacobian, using DifferentialEquations.jl. These systems are similar to the competitive Lotka-Volterra model. In some cases (depending on the parameter value…

---

## [Error installing Makie.jl - can't connect to download isoband](https://discourse.julialang.org/t/error-installing-makie-jl-cant-connect-to-download-isoband/109720)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 3\
**Last updated:** [February 6, 2024, 9:51pm UTC](https://discourse.julialang.org/t/error-installing-makie-jl-cant-connect-to-download-isoband/109720 "2024-02-06T21:51:45Z")

</div>

Getting an error during install that it cannot add package isoband. Looks like connection issues but it downloaded the prior packages just fine. Running on M1 Mac. pkg\> add GLMakie Resolving package versions... Do…

---

## [@assert: what is the proper tool?](https://discourse.julialang.org/t/assert-what-is-the-proper-tool/36217)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 12\
**Last updated:** [February 6, 2024, 9:48pm UTC](https://discourse.julialang.org/t/assert-what-is-the-proper-tool/36217 "2024-02-06T21:48:21Z")

</div>

Apparently @assert can be elided by the compiler for some optimization level. What is the recommended easy and fool-proof ways of asserting program behaviours?

---

## [Using MKL doesn't work](https://discourse.julialang.org/t/using-mkl-doesnt-work/109833)

<div class="topic-metadata">

**Author:** [@yhuang](https://discourse.julialang.org/u/yhuang)\
**Replies:** 5\
**Last updated:** [February 6, 2024, 8:36pm UTC](https://discourse.julialang.org/t/using-mkl-doesnt-work/109833 "2024-02-06T20:36:35Z")

</div>

I installed MKL via add MKL and when I checked if it works, it says julia\> using LinearAlgebra julia\> BLAS.get\_config() LinearAlgebra.BLAS.LBTConfig Libraries: └ \[ILP64\] libopenblas64\_.so julia\> using MKL julia\> BLA…

---

## [Understanding use of interactive thread pool](https://discourse.julialang.org/t/understanding-use-of-interactive-thread-pool/109815)

<div class="topic-metadata">

**Author:** [@samtkaplan](https://discourse.julialang.org/u/samtkaplan)\
**Replies:** 5\
**Last updated:** [February 6, 2024, 8:35pm UTC](https://discourse.julialang.org/t/understanding-use-of-interactive-thread-pool/109815 "2024-02-06T20:35:59Z")

</div>

Hello, I am trying to understand when the “interactive” thread pool is used vs when the “default” thread pool is used. My expectation is that the “default” thread pool is used unless we explicitly ask for the interacti…

---

## [Using multiple cores but the speed doesn't increase](https://discourse.julialang.org/t/using-multiple-cores-but-the-speed-doesnt-increase/109066)

<div class="topic-metadata">

**Author:** [@soldin](https://discourse.julialang.org/u/soldin)\
**Replies:** 21\
**Last updated:** [February 6, 2024, 6:03pm UTC](https://discourse.julialang.org/t/using-multiple-cores-but-the-speed-doesnt-increase/109066 "2024-02-06T18:03:16Z")

</div>

Hi, I am remotely accessing CPU with 42 cores. I ran the following command julia --threads 40 in the REPL and set julia.NumThreads": 40 in VSC. Threads.nthreads() gives 40. But there is no improvement in the speed. Ki…

---

## [Custom NamedTuple dynamic creation](https://discourse.julialang.org/t/custom-namedtuple-dynamic-creation/109807)

<div class="topic-metadata">

**Author:** [@ImreMD](https://discourse.julialang.org/u/ImreMD)\
**Replies:** 5\
**Last updated:** [February 6, 2024, 4:40pm UTC](https://discourse.julialang.org/t/custom-namedtuple-dynamic-creation/109807 "2024-02-06T16:40:32Z")

</div>

Hello guys, wondering if there’s a way of dynamically assign keys to a NamedTuple something like this: function create\_named\_tuple(x, y, z) mynames = (:position, :y, :z) mydata = (x, "free","get") return NamedTup…

---

## [Sorted Array implementation?](https://discourse.julialang.org/t/sorted-array-implementation/5897)

<div class="topic-metadata">

**Author:** [@raff](https://discourse.julialang.org/u/raff)\
**Replies:** 21\
**Last updated:** [February 6, 2024, 3:57pm UTC](https://discourse.julialang.org/t/sorted-array-implementation/5897 "2024-02-06T15:57:41Z")

</div>

Is there any implementation of sorted array? I need to store a sorted list of integer. I will frequently check what is the k-th value in the list and in what position a particular value is in the list. I checked Sorted…

---

## [Type intersection with \`NTuple{len,Any}\`](https://discourse.julialang.org/t/type-intersection-with-ntuple-len-any/109765)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [February 6, 2024, 2:30pm UTC](https://discourse.julialang.org/t/type-intersection-with-ntuple-len-any/109765 "2024-02-06T14:30:53Z")

</div>

Problem: say I have a type T such that T \<: Tuple, and len, a nonnegative Int value. I want the intersection of T and NTuple{len,Any}. Is it possible to solve the above correctly and exactly? I have three candidate solu…

---

## [Profiling in VSCode returns some red bars with "Flag: GC" - what do they mean?](https://discourse.julialang.org/t/profiling-in-vscode-returns-some-red-bars-with-flag-gc-what-do-they-mean/109570)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 12\
**Last updated:** [February 6, 2024, 2:09pm UTC](https://discourse.julialang.org/t/profiling-in-vscode-returns-some-red-bars-with-flag-gc-what-do-they-mean/109570 "2024-02-06T14:09:22Z")

</div>

Hello! When using @profview in Julia I observe that there exists both blue and red bars. The blue bars I think are fine, they just mention how much time is spent. But what about the red ones? Is this something I should…

---

## [How do I set permissions for a binary executable artifact?](https://discourse.julialang.org/t/how-do-i-set-permissions-for-a-binary-executable-artifact/109791)

<div class="topic-metadata">

**Author:** [@evanderveer](https://discourse.julialang.org/u/evanderveer)\
**Replies:** 1\
**Last updated:** [February 6, 2024, 10:37am UTC](https://discourse.julialang.org/t/how-do-i-set-permissions-for-a-binary-executable-artifact/109791 "2024-02-06T10:37:27Z")

</div>

I am trying to use Artifacts.jl to download a binary executable as part of a package I am developing. It seems like the executable file is downloading just fine when I \] add \<package\_name\>, but after installation the fil…

---

## [Nested using](https://discourse.julialang.org/t/nested-using/109788)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 1\
**Last updated:** [February 6, 2024, 9:59am UTC](https://discourse.julialang.org/t/nested-using/109788 "2024-02-06T09:59:15Z")

</div>

I see codes like using pkg1 using pkg1.mod1 using pkg1.mod1: fun1, fun2 Why is a single ‘using pkg1’ not enough?

---

## [What is meant by this tip for StaticArrays?](https://discourse.julialang.org/t/what-is-meant-by-this-tip-for-staticarrays/109757)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 6\
**Last updated:** [February 6, 2024, 8:21am UTC](https://discourse.julialang.org/t/what-is-meant-by-this-tip-for-staticarrays/109757 "2024-02-06T08:21:49Z")

</div>

Hello! In the Github of StaticArrays.jl, the following is stated: Note that in the current implementation, working with large StaticArray s puts a lot of stress on the compiler, and becomes slower than Base.Array as t…

---

## [Julia's shell mode can't recognize user-defined aliases of system commands on Linux](https://discourse.julialang.org/t/julias-shell-mode-cant-recognize-user-defined-aliases-of-system-commands-on-linux/109724)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 11\
**Last updated:** [February 6, 2024, 6:47am UTC](https://discourse.julialang.org/t/julias-shell-mode-cant-recognize-user-defined-aliases-of-system-commands-on-linux/109724 "2024-02-06T06:47:32Z")

</div>

Why can’t Julia’s shell mode recognize user-defined aliases of system commands on Linux? I defined some aliases in the ~/.bashrc file such as alias mydir="cd ~/path/to/my/directory/" so that I can conveniently cd to m…

---

## [Apply transform conditioning on laged values](https://discourse.julialang.org/t/apply-transform-conditioning-on-laged-values/109777)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 1\
**Last updated:** [February 6, 2024, 6:12am UTC](https://discourse.julialang.org/t/apply-transform-conditioning-on-laged-values/109777 "2024-02-06T06:12:26Z")

</div>

Hi there, I am trying to add a column in my DataFrame by using the function transform. I need to groupby a couple of categories and then calculate add a new column based on the lagged values of each row. The reason why …

---

## [Make @with\_kw structure display with detail all its parameters](https://discourse.julialang.org/t/make-with-kw-structure-display-with-detail-all-its-parameters/109731)

<div class="topic-metadata">

**Author:** [@K5Julien](https://discourse.julialang.org/u/K5Julien)\
**Replies:** 4\
**Last updated:** [February 5, 2024, 10:09pm UTC](https://discourse.julialang.org/t/make-with-kw-structure-display-with-detail-all-its-parameters/109731 "2024-02-05T22:09:34Z")

</div>

Suppose that I use Parameters.jl and the following @with\_kw structure: using Parameters using Dates @with\_kw struct Params @deftype Int #PARAMETERS foo = 5 bar::Dict{String,Int} = Dict("a"=\>0,"b"=\>1) ti…

---

## [How to Kronecker by row (one dimension only)](https://discourse.julialang.org/t/how-to-kronecker-by-row-one-dimension-only/33942)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 4\
**Last updated:** [February 5, 2024, 9:14pm UTC](https://discourse.julialang.org/t/how-to-kronecker-by-row-one-dimension-only/33942 "2024-02-05T21:14:29Z")

</div>

I have two matrices A and B. Rather than a full Kronecker product kron(A,B), I would like to Kronecker in a row-by-row fashion. That is, the first row of the resulting matrix should have kron(A\[1,:\],B\[1,:\]), the second r…

---

## [Promoting union types](https://discourse.julialang.org/t/promoting-union-types/109745)

<div class="topic-metadata">

**Author:** [@putianyi888](https://discourse.julialang.org/u/putianyi888)\
**Replies:** 4\
**Last updated:** [February 5, 2024, 8:08pm UTC](https://discourse.julialang.org/t/promoting-union-types/109745 "2024-02-05T20:08:59Z")

</div>

Since we have julia\> promote\_type(Float64, Rational{Int}) Float64 julia\> promote\_type(Float64, Complex{Rational{Int}}) ComplexF64 (alias for Complex{Float64}) julia\> promote\_type(Float64, ComplexF64) ComplexF64 (alias…

---

## [Using Hugo template in Franklin](https://discourse.julialang.org/t/using-hugo-template-in-franklin/109756)

<div class="topic-metadata">

**Author:** [@marcoherrera-s](https://discourse.julialang.org/u/marcoherrera-s)\
**Replies:** 0\
**Last updated:** [February 5, 2024, 5:37pm UTC](https://discourse.julialang.org/t/using-hugo-template-in-franklin/109756 "2024-02-05T17:37:27Z")

</div>

Hi!, as the title says, I would like to use a Hugo template (hello-friend-ng | Hugo Themes) in Franklin. I didn’t think I could , but I’ve seen websites made with Franklin that use a Hugo template. I tried to find inform…

---

## [Offline Development on an Air Gapped Machine](https://discourse.julialang.org/t/offline-development-on-an-air-gapped-machine/104959)

<div class="topic-metadata">

**Author:** [@bamdone](https://discourse.julialang.org/u/bamdone)\
**Replies:** 16\
**Last updated:** [February 5, 2024, 3:39pm UTC](https://discourse.julialang.org/t/offline-development-on-an-air-gapped-machine/104959 "2024-02-05T15:39:14Z")

</div>

I’ve been using Julia off and on for a number of years and the one thing that keeps pushing me away from Julia is offline development. While Matlab has a core set of tools that are extensive, it lends itself to scientifi…

---

## [How can I fix the type instability](https://discourse.julialang.org/t/how-can-i-fix-the-type-instability/109730)

<div class="topic-metadata">

**Author:** [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Replies:** 3\
**Last updated:** [February 5, 2024, 1:45pm UTC](https://discourse.julialang.org/t/how-can-i-fix-the-type-instability/109730 "2024-02-05T13:45:49Z")

</div>

Hello, I have the following MWE, where I cannot remove the type instability that appears from the call on the last line. abstract type FrictionLaw end struct Cubic{T \<: Real} \<: FrictionLaw γ::T end g(x, law::Cub…

---

## [Another way of installing a package](https://discourse.julialang.org/t/another-way-of-installing-a-package/109732)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 1\
**Last updated:** [February 5, 2024, 1:42pm UTC](https://discourse.julialang.org/t/another-way-of-installing-a-package/109732 "2024-02-05T13:42:00Z")

</div>

Generally, we use Pkg to install a package. But in my case (I am using vscode and windows 10), when I try to install some package like PyCall, the connection to github always fails (possibly because I am in china?) Is t…

---

## [How to strip tuple type of the element types](https://discourse.julialang.org/t/how-to-strip-tuple-type-of-the-element-types/109664)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 6\
**Last updated:** [February 3, 2024, 9:09pm UTC](https://discourse.julialang.org/t/how-to-strip-tuple-type-of-the-element-types/109664 "2024-02-03T21:09:57Z")

</div>

I want a function taking a type T\<:Tuple type and returning S\<:Tuple type such that T\<:S and the element types are stripped from the input, but with preserved length information. Desired behavior examples: f(Tuple{}) =…

---

## [MethodError Mystery: Unexpected Third Argument in Constructor Call After Julia Kernel Upgrade (1.5 to 1.9)](https://discourse.julialang.org/t/methoderror-mystery-unexpected-third-argument-in-constructor-call-after-julia-kernel-upgrade-1-5-to-1-9/109636)

<div class="topic-metadata">

**Author:** [@lisapisa](https://discourse.julialang.org/u/lisapisa)\
**Replies:** 4\
**Last updated:** [February 5, 2024, 10:41am UTC](https://discourse.julialang.org/t/methoderror-mystery-unexpected-third-argument-in-constructor-call-after-julia-kernel-upgrade-1-5-to-1-9/109636 "2024-02-05T10:41:41Z")

</div>

Sorry in advance if this question is stupid and belongs in the ‘new to julia’ subforum. From what I could gather that one is focused more on installing julia, so I put it here instead. Hey! I am trying to get some code…

---

## [Rewriting a MATLAB library in Julia](https://discourse.julialang.org/t/rewriting-a-matlab-library-in-julia/109515)

<div class="topic-metadata">

**Author:** [@jackmarry](https://discourse.julialang.org/u/jackmarry)\
**Replies:** 11\
**Last updated:** [February 5, 2024, 9:34am UTC](https://discourse.julialang.org/t/rewriting-a-matlab-library-in-julia/109515 "2024-02-05T09:34:19Z")

</div>

I am rewriting a MATLAB library in Julia, but I’ve noticed significant differences between Julia syntax and MATLAB. Additionally, GPT often provides incorrect responses. Is there a website that collects tables mapping MA…

---

## [Should I use multiple threads for parallel GC with otherwise sequential code?](https://discourse.julialang.org/t/should-i-use-multiple-threads-for-parallel-gc-with-otherwise-sequential-code/109719)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [February 5, 2024, 12:51am UTC](https://discourse.julialang.org/t/should-i-use-multiple-threads-for-parallel-gc-with-otherwise-sequential-code/109719 "2024-02-05T00:51:10Z")

</div>

As Julia v10 has added parallel GC, is it advisable to use multiple threads with the -t command line option of julia even if the code to be run is non-parallel? Is there any possible performance regression compared with …

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

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