# General Usage

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

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

**Page:** 391

---

## [Need Help to Create Animation for Tangent Line with Luxor](https://discourse.julialang.org/t/need-help-to-create-animation-for-tangent-line-with-luxor/87809)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 8\
**Last updated:** [September 28, 2022, 5:50pm UTC](https://discourse.julialang.org/t/need-help-to-create-animation-for-tangent-line-with-luxor/87809 "2022-09-28T17:50:35Z")

</div>

Hi all, I want to understand more of tangent line / gradient line then read the wikipedia and saw the animation here for the tangent line: I create the plot (static image): using Plots, LaTeXStrings gr() f(x) = -…

---

## [Now that Julia w/o LLVM is a thing, how long before I can run Julia on RPi Pico?](https://discourse.julialang.org/t/now-that-julia-w-o-llvm-is-a-thing-how-long-before-i-can-run-julia-on-rpi-pico/87676)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 11\
**Last updated:** [September 28, 2022, 4:16pm UTC](https://discourse.julialang.org/t/now-that-julia-w-o-llvm-is-a-thing-how-long-before-i-can-run-julia-on-rpi-pico/87676 "2022-09-28T16:16:51Z")

</div>

So with Julia 1.8 as I understand it you can now separate out the Julia runtime and the LLVM runtime. Stuff like the RPi Pico which is based on a low powered ARM core is really ripe for a scientific programming language…

---

## [Should upgrading \`\[compat\]\` bounds be considered a breaking change? LoopVectorization and ArrayInterface](https://discourse.julialang.org/t/should-upgrading-compat-bounds-be-considered-a-breaking-change-loopvectorization-and-arrayinterface/87817)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 15\
**Last updated:** [September 28, 2022, 3:11pm UTC](https://discourse.julialang.org/t/should-upgrading-compat-bounds-be-considered-a-breaking-change-loopvectorization-and-arrayinterface/87817 "2022-09-28T15:11:50Z")

</div>

LoopVectorization in v0.12.110 had ArrayInterface compat entries for 3.1.32, 3.2.1, and 5.0.1. Then v0.12.111 dropped those in favor of v6.0.1. Even though it’s a dependency and thus doesn’t break the API of LoopVectori…

---

## [Macro accessing fields of struct at another module](https://discourse.julialang.org/t/macro-accessing-fields-of-struct-at-another-module/87893)

<div class="topic-metadata">

**Author:** [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Replies:** 1\
**Last updated:** [September 28, 2022, 2:48pm UTC](https://discourse.julialang.org/t/macro-accessing-fields-of-struct-at-another-module/87893 "2022-09-28T14:48:15Z")

</div>

Hello, I’ve a module with a macro: julia\> module MyModule export @mymacro macro mymacro(T) return fieldnames( eval(T) ) end end When I’m at another module or at Julia’s shell I can’t use my macro: j…

---

## [Cannot build PyPlot](https://discourse.julialang.org/t/cannot-build-pyplot/87616)

<div class="topic-metadata">

**Author:** [@TimeValley](https://discourse.julialang.org/u/TimeValley)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 2:32pm UTC](https://discourse.julialang.org/t/cannot-build-pyplot/87616 "2022-09-28T14:32:13Z")

</div>

Hello everyone, i just started programming julia and encountered a problem. When I added the PyPlot package and tried to build it: build PyPlot It gave those error messages: Error building \`PyCall\`, showing the last …

---

## [PlutoPlotly and PlotlyJS: subplots](https://discourse.julialang.org/t/plutoplotly-and-plotlyjs-subplots/87886)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 2:06pm UTC](https://discourse.julialang.org/t/plutoplotly-and-plotlyjs-subplots/87886 "2022-09-28T14:06:56Z")

</div>

Hi, I am trying to produce a figure with two subplots in Pluto, using PlotlyJS and PlutoPlotly. If I create each plot individually, there is no problem: all the layout attributes of the individual plots will come out co…

---

## [PlotlyJS: modify parts of the plot](https://discourse.julialang.org/t/plotlyjs-modify-parts-of-the-plot/86212)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 9\
**Last updated:** [September 28, 2022, 1:46pm UTC](https://discourse.julialang.org/t/plotlyjs-modify-parts-of-the-plot/86212 "2022-09-28T13:46:02Z")

</div>

Today I wanted to figure out, how to modify the axis type of one specific subplot. My question is, how do I figure out stuff like this, if I am not successful to find anything by internet search? What is the best appro…

---

## [Multi-threading monotonic dynamic](https://discourse.julialang.org/t/multi-threading-monotonic-dynamic/87642)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 12:38pm UTC](https://discourse.julialang.org/t/multi-threading-monotonic-dynamic/87642 "2022-09-28T12:38:57Z")

</div>

Hi, I am trying to use multi-threading in a monotonic dynamic way (in the sense of openmp). By monotonic , I mean that if a thread exected iteration i then the thread must execute iterations larger than i subsequently. …

---

## [Analyzing startup cost of julia itself (to possibly make better before the feature freeze)](https://discourse.julialang.org/t/analyzing-startup-cost-of-julia-itself-to-possibly-make-better-before-the-feature-freeze/87925)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [September 28, 2022, 12:34pm UTC](https://discourse.julialang.org/t/analyzing-startup-cost-of-julia-itself-to-possibly-make-better-before-the-feature-freeze/87925 "2022-09-28T12:34:54Z")

</div>

What’s the best way to analyze startup? I suppose I want to profile (with gdb?). Strace gets me some even higher level view. I suppose what needs to happen, at a minimum, is open the sysimage, and mmap involved in that?…

---

## [Multithreading a for loop](https://discourse.julialang.org/t/multithreading-a-for-loop/87920)

<div class="topic-metadata">

**Author:** [@Sagar\_123](https://discourse.julialang.org/u/Sagar_123)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 12:27pm UTC](https://discourse.julialang.org/t/multithreading-a-for-loop/87920 "2022-09-28T12:27:59Z")

</div>

function collect\_nodes\_frac\_serial(nodes, weights, pos, grid\_spacing) @turbo for i = 1:length(pos) nodes\[i\] = div(pos\[i\],grid\_spacing) weights\[i\] = (pos\[i\] - nodes\[i\]\*grid\_spacing)/grid\_spacing en…

---

## [Jupyter notebooks all use latest version of Julia, even if marked as previous version](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 4\
**Last updated:** [September 28, 2022, 12:04pm UTC](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913 "2022-09-28T12:04:59Z")

</div>

I just installed the latest version of Julia (1.8.1). I set it so that is the version that is run when I write “julia” in my terminal (I am on Ubuntu). However, now when I open my previous (1.7.3) Julia notebooks, they …

---

## [Create Tangent Line / Derivative Line Animation with Plots got Errors](https://discourse.julialang.org/t/create-tangent-line-derivative-line-animation-with-plots-got-errors/87814)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 10:17am UTC](https://discourse.julialang.org/t/create-tangent-line-derivative-line-animation-with-plots-got-errors/87814 "2022-09-28T10:17:58Z")

</div>

Hi all, Is it possible to create the animation of sliding tangent line with Plots? I got error with my code: using Plots f(x) = -x^2 + 2x + 2 gradient\_line(f, x₀) = (x -\> f(x₀) + f'(x₀)\*(x-x₀)) plot(f, -3:0.1:5, la…

---

## [Bikeshedding: Name of package with AbstractStrings based on NTuples](https://discourse.julialang.org/t/bikeshedding-name-of-package-with-abstractstrings-based-on-ntuples/87881)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 15\
**Last updated:** [September 28, 2022, 7:48am UTC](https://discourse.julialang.org/t/bikeshedding-name-of-package-with-abstractstrings-based-on-ntuples/87881 "2022-09-28T07:48:31Z")

</div>

I’m in the process of creating a new package for strings based on NTuples. It is similar in concept to InlineStrings.jl, but it uses NTuple{N,UInt8} instead of primitives. It allows for more variation in N. In part, it i…

---

## [Confusion about type parameterization and method applicability](https://discourse.julialang.org/t/confusion-about-type-parameterization-and-method-applicability/87874)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 9\
**Last updated:** [September 28, 2022, 12:37am UTC](https://discourse.julialang.org/t/confusion-about-type-parameterization-and-method-applicability/87874 "2022-09-28T00:37:39Z")

</div>

I define the type @kwdef mutable struct Tablet{T} id = nothing a::T # ... end My program mostly operates on Vectors of these. One thing I need to do is jusxtopose such vectors to make longer vectors. I ov…

---

## [Invalidation free copyto! depending on destination?](https://discourse.julialang.org/t/invalidation-free-copyto-depending-on-destination/87824)

<div class="topic-metadata">

**Author:** [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Replies:** 1\
**Last updated:** [September 27, 2022, 8:12pm UTC](https://discourse.julialang.org/t/invalidation-free-copyto-depending-on-destination/87824 "2022-09-27T20:12:21Z")

</div>

Hi. i have a type that is not a subtype of AbstractArray, but it has a notion of size: #basically, vector + metadata struct SingleParam{T,M} names::Vector{String} values::Vector{T} #same size as names metadata::M …

---

## [Transfer elements of an array to a shared array](https://discourse.julialang.org/t/transfer-elements-of-an-array-to-a-shared-array/87746)

<div class="topic-metadata">

**Author:** [@jisutich](https://discourse.julialang.org/u/jisutich)\
**Replies:** 7\
**Last updated:** [September 27, 2022, 7:35pm UTC](https://discourse.julialang.org/t/transfer-elements-of-an-array-to-a-shared-array/87746 "2022-09-27T19:35:05Z")

</div>

Hi, Suppose I have a SharedArray and now I have a normal vector which contains some values. I want to update the elements of my Shared Array by this vector. How to do it? Basically I have sample code using Distributed …

---

## [Running Julia in Terminal vs. VsCode](https://discourse.julialang.org/t/running-julia-in-terminal-vs-vscode/87873)

<div class="topic-metadata">

**Author:** [@mengxiaoliu](https://discourse.julialang.org/u/mengxiaoliu)\
**Replies:** 2\
**Last updated:** [September 27, 2022, 3:10pm UTC](https://discourse.julialang.org/t/running-julia-in-terminal-vs-vscode/87873 "2022-09-27T15:10:34Z")

</div>

Hello, I run Julia on MacBook Air (M2, 2022) and am wondering if there is any difference between running Julia codes in VSCode versus from the Terminal. Thanks you.

---

## [Symbol in type signature?](https://discourse.julialang.org/t/symbol-in-type-signature/87887)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 2\
**Last updated:** [September 27, 2022, 7:15pm UTC](https://discourse.julialang.org/t/symbol-in-type-signature/87887 "2022-09-27T19:15:51Z")

</div>

The Polynomial type from the Polynomials package has a symbol in its type signature that I don’t understand. julia\> typeof(Polynomial(\[1,2\])) Polynomial{Int64, :x} julia\> typeof(Polynomial(\[1,2\], :s)) Polynomial{Int64,…

---

## [Difference between multiprocessors and multithreads](https://discourse.julialang.org/t/difference-between-multiprocessors-and-multithreads/87884)

<div class="topic-metadata">

**Author:** [@jisutich](https://discourse.julialang.org/u/jisutich)\
**Replies:** 2\
**Last updated:** [September 27, 2022, 7:13pm UTC](https://discourse.julialang.org/t/difference-between-multiprocessors-and-multithreads/87884 "2022-09-27T19:13:18Z")

</div>

Hi, I used to use package Distributed to do parallel computation. I may require multiple processors by addprocs() and use pmap to execute a function f on multiple cpus. But I just realize that Julia also provides multit…

---

## [What is the correct order to use factorization matrices in multiplication?](https://discourse.julialang.org/t/what-is-the-correct-order-to-use-factorization-matrices-in-multiplication/85194)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 28\
**Last updated:** [September 27, 2022, 4:54pm UTC](https://discourse.julialang.org/t/what-is-the-correct-order-to-use-factorization-matrices-in-multiplication/85194 "2022-09-27T16:54:17Z")

</div>

I tried to have the result of \`\` but it gave error. So, I tried adj\_factor.L\*adj\_factor.U\*adj\_factor.F\*V but it gave different result with adj\*V. Could you please tell me what is the correct order of L,U,P to have the s…

---

## [What makes bash forget the environment variable?](https://discourse.julialang.org/t/what-makes-bash-forget-the-environment-variable/87821)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 21\
**Last updated:** [September 27, 2022, 4:16pm UTC](https://discourse.julialang.org/t/what-makes-bash-forget-the-environment-variable/87821 "2022-09-27T16:16:28Z")

</div>

My bash knows what PATH is: pkonl@Hedwig MINGW64 ~/ (main)$ echo $PATH /mingw64/bin:/usr/bin.... …

---

## [Efficiently copying a tree with shared children](https://discourse.julialang.org/t/efficiently-copying-a-tree-with-shared-children/87787)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 20\
**Last updated:** [September 27, 2022, 4:07pm UTC](https://discourse.julialang.org/t/efficiently-copying-a-tree-with-shared-children/87787 "2022-09-27T16:07:35Z")

</div>

What is the most efficient way to copy a tree with shared children? While this is technically a graph rather than a tree, here there is a clear root node and directionality, so it’s more intuitive to think of it as a tre…

---

## [Tar for files?](https://discourse.julialang.org/t/tar-for-files/87422)

<div class="topic-metadata">

**Author:** [@marllos](https://discourse.julialang.org/u/marllos)\
**Replies:** 5\
**Last updated:** [September 27, 2022, 3:45pm UTC](https://discourse.julialang.org/t/tar-for-files/87422 "2022-09-27T15:45:57Z")

</div>

Hello everyone. I really liked the idea of the Tar.jl package. Can you use them for files instead of a complete folder? I have code that generates many files, and it would be interesting to compress these files into a si…

---

## [Interest in a Pure Julia Luigi Pipeline?](https://discourse.julialang.org/t/interest-in-a-pure-julia-luigi-pipeline/87729)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 5\
**Last updated:** [September 27, 2022, 3:09pm UTC](https://discourse.julialang.org/t/interest-in-a-pure-julia-luigi-pipeline/87729 "2022-09-27T15:09:35Z")

</div>

My company often uses Luigi to manage complex pipelines. We are doing more and more programming in Julia here, so I’ve been kicking around the idea of a native Julia solution for defining and managing a pipeline. Would …

---

## [Block Sparse Matrix](https://discourse.julialang.org/t/block-sparse-matrix/81465)

<div class="topic-metadata">

**Author:** [@00shiv](https://discourse.julialang.org/u/00shiv)\
**Replies:** 2\
**Last updated:** [September 27, 2022, 3:02pm UTC](https://discourse.julialang.org/t/block-sparse-matrix/81465 "2022-09-27T15:02:54Z")

</div>

I would like to deal with very large sparse matrices with dense sub-blocks; for example, block arrow-head matrices, or a block periodic tridiagonal matrices. I know about the BlockArrays package. That supports blocking …

---

## [LibGit2 question](https://discourse.julialang.org/t/libgit2-question/87871)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [September 27, 2022, 2:15pm UTC](https://discourse.julialang.org/t/libgit2-question/87871 "2022-09-27T14:15:26Z")

</div>

The library LibGit2 is part of Julia, I think. How can I achieve the aquivalent of: git diff --name-only --cached using LibGit2? I tried: repo = LibGit2.GitRepo(".") LibGit2.diff\_files(repo, "main", "origin/…

---

## [How to skip certification check when using Downloads.download?](https://discourse.julialang.org/t/how-to-skip-certification-check-when-using-downloads-download/87865)

<div class="topic-metadata">

**Author:** [@MJulia](https://discourse.julialang.org/u/MJulia)\
**Replies:** 1\
**Last updated:** [September 27, 2022, 11:19am UTC](https://discourse.julialang.org/t/how-to-skip-certification-check-when-using-downloads-download/87865 "2022-09-27T11:19:35Z")

</div>

If using wget, it has an option --no-check-certificate, how to specify an equivalent option in Downloads.download? Thanks.

---

## [Higher order function as macro](https://discourse.julialang.org/t/higher-order-function-as-macro/87867)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 1\
**Last updated:** [September 27, 2022, 11:07am UTC](https://discourse.julialang.org/t/higher-order-function-as-macro/87867 "2022-09-27T11:07:37Z")

</div>

I am trying provide a macro form of a higher order function, but the automatic macro hygiene means that the name of the resulting function gets mangled. Here is my attempt so far: # The higher order function I want to…

---

## [How to pass a buffer to a C callback function?](https://discourse.julialang.org/t/how-to-pass-a-buffer-to-a-c-callback-function/87716)

<div class="topic-metadata">

**Author:** [@tt1234567](https://discourse.julialang.org/u/tt1234567)\
**Replies:** 10\
**Last updated:** [September 27, 2022, 10:27am UTC](https://discourse.julialang.org/t/how-to-pass-a-buffer-to-a-c-callback-function/87716 "2022-09-27T10:27:00Z")

</div>

Following my question in Help with real-time performance needed - #16 by tt1234567, I’ve been thinking about writing a non-allocating recv\_into! function to receive a UDP packet into an existing buffer without creating a…

---

## [Convert a NTuple{N,UInt8} to a String and back?](https://discourse.julialang.org/t/convert-a-ntuple-n-uint8-to-a-string-and-back/87720)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 5\
**Last updated:** [September 27, 2022, 9:20am UTC](https://discourse.julialang.org/t/convert-a-ntuple-n-uint8-to-a-string-and-back/87720 "2022-09-27T09:20:17Z")

</div>

What is the best practice for go back and forth between a NTuple{N,UInt8} where N and a String? x = "Dfsddfs" a = ntuple(i -\> i \<= ncodeunits(x) ? codeunit(x,i) : 0x0, 10 + 1) function \_ntuple\_to\_string(x) r = Ref(x…

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

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