# General Usage

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

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

**Page:** 328

---

## [Documenter.jl; Documentation workflow run failed for main branch ERROR in GitHub](https://discourse.julialang.org/t/documenter-jl-documentation-workflow-run-failed-for-main-branch-error-in-github/94744)

<div class="topic-metadata">

**Author:** [@mdogan](https://discourse.julialang.org/u/mdogan)\
**Replies:** 2\
**Last updated:** [February 17, 2023, 8:21am UTC](https://discourse.julialang.org/t/documenter-jl-documentation-workflow-run-failed-for-main-branch-error-in-github/94744 "2023-02-17T08:21:56Z")

</div>

Following the “Documenter.jl” documentation I pushed documetation.yml file to GitHub. For some reason receiving the below error. Could you please help me with that? Run julia --project=docs/ -e 'using Pkg; Pkg.develop(P…

---

## [Is there any way to plot an inequality of 7 variables?](https://discourse.julialang.org/t/is-there-any-way-to-plot-an-inequality-of-7-variables/94770)

<div class="topic-metadata">

**Author:** [@Kanishk](https://discourse.julialang.org/u/Kanishk)\
**Replies:** 2\
**Last updated:** [February 17, 2023, 8:20am UTC](https://discourse.julialang.org/t/is-there-any-way-to-plot-an-inequality-of-7-variables/94770 "2023-02-17T08:20:45Z")

</div>

Hello, Could you please explain if there is any way to plot inequality of the form f(p,q,r,s,t,u,v) \<= g(p,q,r,s,t,u,v) ? Any example will be really helpful. Thank you

---

## [Changes in for-loop don't apply outside loop](https://discourse.julialang.org/t/changes-in-for-loop-dont-apply-outside-loop/94670)

<div class="topic-metadata">

**Author:** [@Name1](https://discourse.julialang.org/u/Name1)\
**Replies:** 4\
**Last updated:** [February 17, 2023, 6:37am UTC](https://discourse.julialang.org/t/changes-in-for-loop-dont-apply-outside-loop/94670 "2023-02-17T06:37:59Z")

</div>

value = # A custom array I've made with dictionaries in them. Pretend original price values were \[1.0, 5.0, 7.0, 9.0, 12.0\]. for cur\_perm in perm\_array println(cur\_perm) # looks something like \[2.0, 10.0, 20.0, 30.0…

---

## [Anybody with an M1 Mac able to use the VSCode debugger? Unusably slow for me](https://discourse.julialang.org/t/anybody-with-an-m1-mac-able-to-use-the-vscode-debugger-unusably-slow-for-me/94773)

<div class="topic-metadata">

**Author:** [@jonathanfischer97](https://discourse.julialang.org/u/jonathanfischer97)\
**Replies:** 0\
**Last updated:** [February 17, 2023, 6:15am UTC](https://discourse.julialang.org/t/anybody-with-an-m1-mac-able-to-use-the-vscode-debugger-unusably-slow-for-me/94773 "2023-02-17T06:15:35Z")

</div>

Just wondering if anybody has the same experience on an M1 Mac. I like the features of the VSCode debugger but when I try to step through a Julia file it runs so slow that hitting the pause button only registers about 10…

---

## [How to control Julia from an external non-Julia program](https://discourse.julialang.org/t/how-to-control-julia-from-an-external-non-julia-program/93538)

<div class="topic-metadata">

**Author:** [@Jerry](https://discourse.julialang.org/u/Jerry)\
**Replies:** 4\
**Last updated:** [February 17, 2023, 4:43am UTC](https://discourse.julialang.org/t/how-to-control-julia-from-an-external-non-julia-program/93538 "2023-02-17T04:43:03Z")

</div>

I want to to use Julia to create plots from data generated by an externally compiled program written in another language. I am on macOS Monterey using Julia 1.8.3. I want to control Julia from within the external progra…

---

## [Can executables created by PackageCompiler.jl use julia command line options?](https://discourse.julialang.org/t/can-executables-created-by-packagecompiler-jl-use-julia-command-line-options/94764)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 1\
**Last updated:** [February 17, 2023, 4:07am UTC](https://discourse.julialang.org/t/can-executables-created-by-packagecompiler-jl-use-julia-command-line-options/94764 "2023-02-17T04:07:48Z")

</div>

More specifically, I want to run something like MyApp --julia-option="--trace-compile=compile.log" so that I can find what functions still need compilation, and update my precompile script accordingly.

---

## [Fail to run a compiled julia app on another machine](https://discourse.julialang.org/t/fail-to-run-a-compiled-julia-app-on-another-machine/79391)

<div class="topic-metadata">

**Author:** [@efJerryYang](https://discourse.julialang.org/u/efJerryYang)\
**Replies:** 1\
**Last updated:** [February 17, 2023, 12:42am UTC](https://discourse.julialang.org/t/fail-to-run-a-compiled-julia-app-on-another-machine/79391 "2023-02-17T00:42:54Z")

</div>

Update: I think this problem may not be solved unless the absolute path used in PyCall was fixed Hi, I am getting this error when I run a compiled Julia app on another win10 machine. I found an almost same problem iss…

---

## [Segfault calling C function, any advice?](https://discourse.julialang.org/t/segfault-calling-c-function-any-advice/94730)

<div class="topic-metadata">

**Author:** [@CodeGodz](https://discourse.julialang.org/u/CodeGodz)\
**Replies:** 7\
**Last updated:** [February 16, 2023, 11:34pm UTC](https://discourse.julialang.org/t/segfault-calling-c-function-any-advice/94730 "2023-02-16T23:34:06Z")

</div>

Hey all, I’m trying to call the libsais\_int function from libsais, with signature: int32\_t libsais\_int(int32\_t \* T, int32\_t \* SA, int32\_t n, int32\_t k, int32\_t fs); I wrote the following (and also tried using pointer(…

---

## [Avoid allocating an anonymous function](https://discourse.julialang.org/t/avoid-allocating-an-anonymous-function/94689)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 5\
**Last updated:** [February 17, 2023, 12:11am UTC](https://discourse.julialang.org/t/avoid-allocating-an-anonymous-function/94689 "2023-02-17T00:11:30Z")

</div>

I have an application where the package I am using requires the user to provide a function phi with calling statement like phi(a::Real)=.... I would like to pass additional function arguments args to phi. The way I have …

---

## [How do I add content-type to HTTP.jl server?](https://discourse.julialang.org/t/how-do-i-add-content-type-to-http-jl-server/94725)

<div class="topic-metadata">

**Author:** [@zeroexcuses](https://discourse.julialang.org/u/zeroexcuses)\
**Replies:** 1\
**Last updated:** [February 16, 2023, 7:07pm UTC](https://discourse.julialang.org/t/how-do-i-add-content-type-to-http-jl-server/94725 "2023-02-16T19:07:02Z")

</div>

Main problem here is, when serving \*.js file: Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts p…

---

## [Choosing what to precompile as a package author](https://discourse.julialang.org/t/choosing-what-to-precompile-as-a-package-author/94705)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 3\
**Last updated:** [February 16, 2023, 4:34pm UTC](https://discourse.julialang.org/t/choosing-what-to-precompile-as-a-package-author/94705 "2023-02-16T16:34:50Z")

</div>

The native code caching in 1.9 is amazing, but as a package author its sometimes hard to navigate the precompile-time / run-time tradeoff and decide what to precompile. In my case if I precompile “pretty much everything …

---

## [Searching unicode characters in Visual Studio Code](https://discourse.julialang.org/t/searching-unicode-characters-in-visual-studio-code/94722)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 1\
**Last updated:** [February 16, 2023, 1:42pm UTC](https://discourse.julialang.org/t/searching-unicode-characters-in-visual-studio-code/94722 "2023-02-16T13:42:27Z")

</div>

I love Julia and Visual Studio Code (VSC), and I have adopted Unicode characters such as \\omega\[tab\]. However, how do I search for those characters using VSC? I have not figured this out or found any information that all…

---

## [Simple DiGraph Plot Directed Graph: no method matching](https://discourse.julialang.org/t/simple-digraph-plot-directed-graph-no-method-matching/94721)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [February 16, 2023, 2:14pm UTC](https://discourse.julialang.org/t/simple-digraph-plot-directed-graph-no-method-matching/94721 "2023-02-16T14:14:44Z")

</div>

Hi all, I am reading this post: but when I try the code: # Load the packages using LightGraphs, GraphPlot, MetaGraphs, GraphRecipes, Plots # Load the adjacency matrix and graph attributes mat\_arcTwoNodes = \[0 1 …

---

## [StatsPlot error: Cannot convert Normal{Float64} to series data for plotting](https://discourse.julialang.org/t/statsplot-error-cannot-convert-normal-float64-to-series-data-for-plotting/94720)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [February 16, 2023, 12:40pm UTC](https://discourse.julialang.org/t/statsplot-error-cannot-convert-normal-float64-to-series-data-for-plotting/94720 "2023-02-16T12:40:19Z")

</div>

Hi all I am trying the plot from StatsPlot but I can’t… my status: Status \`~/LasthrimProjection/JupyterLab/Statistics/Project.toml\` \[31c24e10\] Distributions v0.25.80 \[f3b207a7\] StatsPlots v0.15.4 the code …

---

## [Embed static Makie 3D plots in package documentation](https://discourse.julialang.org/t/embed-static-makie-3d-plots-in-package-documentation/94713)

<div class="topic-metadata">

**Author:** [@kfrb](https://discourse.julialang.org/u/kfrb)\
**Replies:** 3\
**Last updated:** [February 16, 2023, 10:41am UTC](https://discourse.julialang.org/t/embed-static-makie-3d-plots-in-package-documentation/94713 "2023-02-16T10:41:17Z")

</div>

I would like to include 3D Plots with Axis3 in the documentation of my package. However, since interactivity for Axis3 is not yet available, I don’t want to include them interactively, but only statically. The problem: …

---

## [How to speed up value updating in an array?](https://discourse.julialang.org/t/how-to-speed-up-value-updating-in-an-array/94650)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 19\
**Last updated:** [February 15, 2023, 9:56pm UTC](https://discourse.julialang.org/t/how-to-speed-up-value-updating-in-an-array/94650 "2023-02-15T21:56:55Z")

</div>

Hello! I am running a code I wrote to find the nearest neighbours between some points. Benchmarking my current version of the code and using @profview I found that what is taking the longest time now, is not computation…

---

## [High performance data structure for use in image modelling](https://discourse.julialang.org/t/high-performance-data-structure-for-use-in-image-modelling/94621)

<div class="topic-metadata">

**Author:** [@evanderveer](https://discourse.julialang.org/u/evanderveer)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 9:33pm UTC](https://discourse.julialang.org/t/high-performance-data-structure-for-use-in-image-modelling/94621 "2023-02-15T21:33:02Z")

</div>

Hi there, I am writing some code which fits a model consisting of two-dimensional gaussian functions to an image. At the moment, I am using a mutable struct which holds the information about the model as well as a vecto…

---

## [Multiple keys for one value](https://discourse.julialang.org/t/multiple-keys-for-one-value/94696)

<div class="topic-metadata">

**Author:** [@ossan05](https://discourse.julialang.org/u/ossan05)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 7:38pm UTC](https://discourse.julialang.org/t/multiple-keys-for-one-value/94696 "2023-02-15T19:38:41Z")

</div>

Is it there a way to assign multiple keys to a value in a dictionary?

---

## [Why a package (Pluto here) can precompile twice in \`add\` and \`using\`?](https://discourse.julialang.org/t/why-a-package-pluto-here-can-precompile-twice-in-add-and-using/94699)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 0\
**Last updated:** [February 15, 2023, 5:53pm UTC](https://discourse.julialang.org/t/why-a-package-pluto-here-can-precompile-twice-in-add-and-using/94699 "2023-02-15T17:53:37Z")

</div>

Here is the example. I just created an empty new environment. Then add Pluto to it, which triggered precompilation. The next command using Pluto triggered precompilation again. Why this can happen? I’ve seen this sort o…

---

## [Sort keys of NamedTuple](https://discourse.julialang.org/t/sort-keys-of-namedtuple/94630)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 5\
**Last updated:** [February 15, 2023, 5:41pm UTC](https://discourse.julialang.org/t/sort-keys-of-namedtuple/94630 "2023-02-15T17:41:20Z")

</div>

I would like to sort a NamedTuple alphabetically by its keys. For instance: (b=1, a=2, c=3) ---\> (a=2, b=1, c=3) (a=1, c=2, b=3) ---\> (a=1, b=3, c=2) I am pretty sure such functionality already exists, where to look fo…

---

## [Is there a smarter way to evaluate an float power?](https://discourse.julialang.org/t/is-there-a-smarter-way-to-evaluate-an-float-power/93330)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 27\
**Last updated:** [February 15, 2023, 5:00pm UTC](https://discourse.julialang.org/t/is-there-a-smarter-way-to-evaluate-an-float-power/93330 "2023-02-15T17:00:18Z")

</div>

Hello! Suppose I have this expression: V = rand(10^5) G = 1/7 @benchmark $V .^ $G BenchmarkTools.Trial: 1871 samples with 1 evaluation. Range (min … max): 2.282 ms … 7.797 ms ┊ GC (min … max): 0.00% … 65.35% Tim…

---

## [How to efficiently multiply every matrix in a vector of matrices by another vector?](https://discourse.julialang.org/t/how-to-efficiently-multiply-every-matrix-in-a-vector-of-matrices-by-another-vector/94661)

<div class="topic-metadata">

**Author:** [@Yolo\_Tolo](https://discourse.julialang.org/u/Yolo_Tolo)\
**Replies:** 3\
**Last updated:** [February 15, 2023, 4:05pm UTC](https://discourse.julialang.org/t/how-to-efficiently-multiply-every-matrix-in-a-vector-of-matrices-by-another-vector/94661 "2023-02-15T16:05:42Z")

</div>

I have a vector of matrices t and another vector v: t = \[rand(10, 10) for \_ in 1:3\] v = rand(10) I want to multiply every matrix in t by v. I do it like this: res = \[t\_i \* v for t\_i in t\] but it’s executed slowly (an…

---

## [How to synchronize and share data correctly between processes in a loop?](https://discourse.julialang.org/t/how-to-synchronize-and-share-data-correctly-between-processes-in-a-loop/94553)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 12\
**Last updated:** [February 15, 2023, 3:15pm UTC](https://discourse.julialang.org/t/how-to-synchronize-and-share-data-correctly-between-processes-in-a-loop/94553 "2023-02-15T15:15:53Z")

</div>

I am practicing to make my real code work on parallel. My challenge is in the relation between the threads and the main process. To make it clear, I am putting the serial code func\_series(), which solves a linear equatio…

---

## [Why does this broadcast operation require specialization for optimal performance?](https://discourse.julialang.org/t/why-does-this-broadcast-operation-require-specialization-for-optimal-performance/94547)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 7\
**Last updated:** [February 15, 2023, 3:08pm UTC](https://discourse.julialang.org/t/why-does-this-broadcast-operation-require-specialization-for-optimal-performance/94547 "2023-02-15T15:08:00Z")

</div>

julia\> g1(f, x, y, z) = (y .= f.(x, z); y); julia\> g2(f, x, y, z) = (broadcast!(f, y, x, z); y); julia\> g3(f::F, x, y, z) where {F} = (y .= f.(x, z); y); julia\> x = rand(100); y = zeros(100); z = rand(100); julia\> @b…

---

## [How to use different terminals for different scripts in the same folder](https://discourse.julialang.org/t/how-to-use-different-terminals-for-different-scripts-in-the-same-folder/94686)

<div class="topic-metadata">

**Author:** [@brunbjerg](https://discourse.julialang.org/u/brunbjerg)\
**Replies:** 0\
**Last updated:** [February 15, 2023, 2:21pm UTC](https://discourse.julialang.org/t/how-to-use-different-terminals-for-different-scripts-in-the-same-folder/94686 "2023-02-15T14:21:27Z")

</div>

Hello I am developing two things simultaneously where one has a long runtime. In the meanwhile I would like to code on a different script, but when doing so both scripts try to run on the same terminal. Is there a way …

---

## [Function types unexpectedly equal](https://discourse.julialang.org/t/function-types-unexpectedly-equal/94674)

<div class="topic-metadata">

**Author:** [@fph](https://discourse.julialang.org/u/fph)\
**Replies:** 5\
**Last updated:** [February 15, 2023, 10:42am UTC](https://discourse.julialang.org/t/function-types-unexpectedly-equal/94674 "2023-02-15T10:42:20Z")

</div>

julia\> T = \[x-\>x\*k for k in 1:3\] 3-element Vector{var"#54#56"{Int64}}: #54 (generic function with 1 method) #54 (generic function with 1 method) #54 (generic function with 1 method) The three functions in the array a…

---

## [Looping over macro call produce unexpected results](https://discourse.julialang.org/t/looping-over-macro-call-produce-unexpected-results/94675)

<div class="topic-metadata">

**Author:** [@brunbjerg](https://discourse.julialang.org/u/brunbjerg)\
**Replies:** 1\
**Last updated:** [February 15, 2023, 10:32am UTC](https://discourse.julialang.org/t/looping-over-macro-call-produce-unexpected-results/94675 "2023-02-15T10:32:15Z")

</div>

Hello community I have found a macro here on Julia Discourse to help me with some testing. The macro looks as follows: macro testmsg(ex, str) quote try @test $ex catch e $st…

---

## [Implementing NODE for problems with insufficient data](https://discourse.julialang.org/t/implementing-node-for-problems-with-insufficient-data/93388)

<div class="topic-metadata">

**Author:** [@mehdi\_lotfi](https://discourse.julialang.org/u/mehdi_lotfi)\
**Replies:** 3\
**Last updated:** [February 15, 2023, 7:49am UTC](https://discourse.julialang.org/t/implementing-node-for-problems-with-insufficient-data/93388 "2023-02-15T07:49:07Z")

</div>

Hi All, How can we use neural ODE with a limited data set? For example, sometimes, we do not have data for all compartments, so how can we define the NODE problem? Suppose we have three state variables and real data on…

---

## [Uncertainty calculation in measurements.jl](https://discourse.julialang.org/t/uncertainty-calculation-in-measurements-jl/94637)

<div class="topic-metadata">

**Author:** [@CurioMath](https://discourse.julialang.org/u/CurioMath)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 4:29am UTC](https://discourse.julialang.org/t/uncertainty-calculation-in-measurements-jl/94637 "2023-02-15T04:29:51Z")

</div>

Hi, It was really amazing to see Measurents.jl handling uncertainty propagation … However I would like to know what is the level of confidence used in the uncertainty calculation in measurements.jl. Does that takes …

---

## [Why don't operations on strings constant-fold?](https://discourse.julialang.org/t/why-dont-operations-on-strings-constant-fold/94597)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 9\
**Last updated:** [February 14, 2023, 11:22pm UTC](https://discourse.julialang.org/t/why-dont-operations-on-strings-constant-fold/94597 "2023-02-14T23:22:23Z")

</div>

Why doesn’t bar constant-fold, although foo does? julia\> using BenchmarkTools julia\> foo(::Type{T}) where T = parse(T, '3') bar(::Type{T}) where T = parse(T, "3"); julia\> @btime foo(Int) @btime bar(Int);…

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

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