# General Usage

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

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

**Page:** 407

---

## [Standalone app: how to embed julia by calling DLL in c/c++](https://discourse.julialang.org/t/standalone-app-how-to-embed-julia-by-calling-dll-in-c-c/85088)

<div class="topic-metadata">

**Author:** [@islent](https://discourse.julialang.org/u/islent)\
**Replies:** 6\
**Last updated:** [August 21, 2022, 11:07am UTC](https://discourse.julialang.org/t/standalone-app-how-to-embed-julia-by-calling-dll-in-c-c/85088 "2022-08-21T11:07:51Z")

</div>

Following instructions from the doc: Libraries · PackageCompiler, I have successfully built julia package to DLL. However, I did not find a way to link the final executable in my Visual Studio C++ project: I got LNK2019 …

---

## [Nested async and sync](https://discourse.julialang.org/t/nested-async-and-sync/86063)

<div class="topic-metadata">

**Author:** [@wuxinyu](https://discourse.julialang.org/u/wuxinyu)\
**Replies:** 1\
**Last updated:** [August 21, 2022, 5:17am UTC](https://discourse.julialang.org/t/nested-async-and-sync/86063 "2022-08-21T05:17:25Z")

</div>

I want to do multi Task (A,B) pairs which have no connections with each other. Each Task A include multi Task a. Task A has to be done before B start in the same one (A,B) pair. So it’s like @async for loop do multi (A,…

---

## [ERROR: UndefVarError: readdlm not defined](https://discourse.julialang.org/t/error-undefvarerror-readdlm-not-defined/24552)

<div class="topic-metadata">

**Author:** [@phylofun](https://discourse.julialang.org/u/phylofun)\
**Replies:** 3\
**Last updated:** [August 20, 2022, 9:59pm UTC](https://discourse.julialang.org/t/error-undefvarerror-readdlm-not-defined/24552 "2022-08-20T21:59:11Z")

</div>

I get this message when I try doing an analysis using Julia 1.1: ERROR: UndefVarError: readdlm not defined I tried using DelimitedFiles as suggested elsewhere (error in read data in JULIA v1.0) but received the same er…

---

## [Testing async tasks](https://discourse.julialang.org/t/testing-async-tasks/23613)

<div class="topic-metadata">

**Author:** [@MaxPauer](https://discourse.julialang.org/u/MaxPauer)\
**Replies:** 1\
**Last updated:** [August 20, 2022, 7:42pm UTC](https://discourse.julialang.org/t/testing-async-tasks/23613 "2022-08-20T19:42:02Z")

</div>

Consider the following example: using Test function fail(fail::Bool) @test !fail end @testset "task\_good" begin task = @async fail(false) fetch(task) end @testset "task\_bad" begin task = @async fail(true) fetch(…

---

## [Turing NUTS chains getting stuck at the parameter bounds](https://discourse.julialang.org/t/turing-nuts-chains-getting-stuck-at-the-parameter-bounds/85947)

<div class="topic-metadata">

**Author:** [@fkrauer](https://discourse.julialang.org/u/fkrauer)\
**Replies:** 43\
**Last updated:** [August 20, 2022, 6:55pm UTC](https://discourse.julialang.org/t/turing-nuts-chains-getting-stuck-at-the-parameter-bounds/85947 "2022-08-20T18:55:16Z")

</div>

Hi all I have a medium sized ODE model with four estimated parameters, and I have problems with chain convergence when using Turing (NUTS) for inference. Depending on the initial draws, some chains converge, and some ch…

---

## [Does this style of “property broadcasting” already exist?](https://discourse.julialang.org/t/does-this-style-of-property-broadcasting-already-exist/85288)

<div class="topic-metadata">

**Author:** [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Replies:** 3\
**Last updated:** [August 20, 2022, 5:52pm UTC](https://discourse.julialang.org/t/does-this-style-of-property-broadcasting-already-exist/85288 "2022-08-20T17:52:09Z")

</div>

Hi Julians, I’ve found myself wanting convenient ways to manipulate arrays of struct-like objects, such as: julia\> df = \[(x = 1,), (x = 2,), (x = 3,), (x = 4,), (x = 5,)\]; julia\> “df.y = df.x .^ 2” # pseudocode 5-elem…

---

## [MethodOfLines.jl: time derivative as initial conditions](https://discourse.julialang.org/t/methodoflines-jl-time-derivative-as-initial-conditions/86053)

<div class="topic-metadata">

**Author:** [@Molox](https://discourse.julialang.org/u/Molox)\
**Replies:** 4\
**Last updated:** [August 20, 2022, 5:08pm UTC](https://discourse.julialang.org/t/methodoflines-jl-time-derivative-as-initial-conditions/86053 "2022-08-20T17:08:56Z")

</div>

Hi, I am using MethodOfLines.jl for solving the beam vibration PDE. I need to implement an initial condition that the initial velocity is zero, or Dt(u(t=0,x)) ~ 0. I tried to put it into the bcs but failed. The prob…

---

## [ByRow vs broadcasting performance](https://discourse.julialang.org/t/byrow-vs-broadcasting-performance/86069)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 0\
**Last updated:** [August 20, 2022, 4:42pm UTC](https://discourse.julialang.org/t/byrow-vs-broadcasting-performance/86069 "2022-08-20T16:42:46Z")

</div>

I was under the impression that ByRow would have better performance than broadcasting. However, trying an example today I found that it seems to be the other way. It may be due to some specific characteristic of my examp…

---

## [Keyword vs Optional Function Arguments?](https://discourse.julialang.org/t/keyword-vs-optional-function-arguments/86065)

<div class="topic-metadata">

**Author:** [@ejlongman](https://discourse.julialang.org/u/ejlongman)\
**Replies:** 2\
**Last updated:** [August 20, 2022, 2:57pm UTC](https://discourse.julialang.org/t/keyword-vs-optional-function-arguments/86065 "2022-08-20T14:57:04Z")

</div>

What is the difference between a keyword and an optional argument? Arguments with default values on the left of the semi-colon are optional, but the same arguments on the right are keys. Do they behave differently? When …

---

## [Using JuliaInterpreter breakpoints for custom code execution](https://discourse.julialang.org/t/using-juliainterpreter-breakpoints-for-custom-code-execution/85890)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 1\
**Last updated:** [August 20, 2022, 10:24am UTC](https://discourse.julialang.org/t/using-juliainterpreter-breakpoints-for-custom-code-execution/85890 "2022-08-20T10:24:45Z")

</div>

Let’s say that I’d like to run foo(), which calls bar, but replace the bar calls with calls to yummy(). This is the standard use case for packages like Cassette and IRTools (are there others now?), but even after all the…

---

## [Recursive inner functions a thousand times slower?](https://discourse.julialang.org/t/recursive-inner-functions-a-thousand-times-slower/85604)

<div class="topic-metadata">

**Author:** [@ikirill](https://discourse.julialang.org/u/ikirill)\
**Replies:** 8\
**Last updated:** [August 20, 2022, 7:57am UTC](https://discourse.julialang.org/t/recursive-inner-functions-a-thousand-times-slower/85604 "2022-08-20T07:57:58Z")

</div>

In the following code function f(y) loop(x::Int)::Int = x \> 0 ? 1 + loop(x-1) : 0 loop(y) end g(x::Int)::Int = x \> 0 ? 1 + g(x-1) : 0 I get the following timings: julia\> @btime f(100) 12.770 μs (2 allocatio…

---

## [Extra allocation with \`T::DataType\`?](https://discourse.julialang.org/t/extra-allocation-with-t-datatype/85930)

<div class="topic-metadata">

**Author:** [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)\
**Replies:** 17\
**Last updated:** [August 19, 2022, 7:04am UTC](https://discourse.julialang.org/t/extra-allocation-with-t-datatype/85930 "2022-08-19T07:04:54Z")

</div>

function A(T::DataType, m::Integer, n::Integer, s::Integer, θ::Number) θ = T(θ) half = θ / 2 cos\_half = cos(half) sin\_half = sin(half) kmin = max(0, m - n) kmax = min(s + m, s - n) sig = (-1)^…

---

## [Ominous type instability](https://discourse.julialang.org/t/ominous-type-instability/85169)

<div class="topic-metadata">

**Author:** [@arik](https://discourse.julialang.org/u/arik)\
**Replies:** 10\
**Last updated:** [August 20, 2022, 3:46am UTC](https://discourse.julialang.org/t/ominous-type-instability/85169 "2022-08-20T03:46:06Z")

</div>

Hi there! I am working on some Code that is supposed to be a demonstration of how you can create fast and efficient code with just a few easy, readable lines in Julia. Sadly one of the functions turns out to be not type…

---

## [JumpProblem hopping\_constants callback?](https://discourse.julialang.org/t/jumpproblem-hopping-constants-callback/86045)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 2\
**Last updated:** [August 20, 2022, 12:33am UTC](https://discourse.julialang.org/t/jumpproblem-hopping-constants-callback/86045 "2022-08-20T00:33:48Z")

</div>

There’s a new feature in JumpProcesses.jl (formerly DiffEqJump.jl) where you can model spatial jump processes like in this example post. One of the inputs is a hopping\_constants matrix which controls how long a species w…

---

## [Read lines from file without new allocations](https://discourse.julialang.org/t/read-lines-from-file-without-new-allocations/86018)

<div class="topic-metadata">

**Author:** [@CodeGodz](https://discourse.julialang.org/u/CodeGodz)\
**Replies:** 1\
**Last updated:** [August 19, 2022, 11:15pm UTC](https://discourse.julialang.org/t/read-lines-from-file-without-new-allocations/86018 "2022-08-19T23:15:56Z")

</div>

I have to read a 7TB file and noticed that each line, when read with eachline(..), comes with a new allocation. Since I know that a line can never exceed length X (but can be smaller) I thought I could pre-alloc a Vector…

---

## [Revise complains that there's an error watching manifest while updating packages](https://discourse.julialang.org/t/revise-complains-that-theres-an-error-watching-manifest-while-updating-packages/75706)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [August 19, 2022, 9:01pm UTC](https://discourse.julialang.org/t/revise-complains-that-theres-an-error-watching-manifest-while-updating-packages/75706 "2022-08-19T21:01:50Z")

</div>

While trying to update packages, I encountered this error today: (..) pkg\> add https://github.com/JuliaLinearAlgebra/MKL.jl#vs/lp64 Updating git-repo \`https://github.com/JuliaLinearAlgebra/MKL.jl\` Updating regis…

---

## [Julia 1.8.0: 10.0^-Inf = NaN](https://discourse.julialang.org/t/julia-1-8-0-10-0-inf-nan/86004)

<div class="topic-metadata">

**Author:** [@ethomag](https://discourse.julialang.org/u/ethomag)\
**Replies:** 6\
**Last updated:** [August 19, 2022, 8:36pm UTC](https://discourse.julialang.org/t/julia-1-8-0-10-0-inf-nan/86004 "2022-08-19T20:36:59Z")

</div>

Just switched to Julia 1.8 and was surprised by this: julia\> 10.0^-Inf NaN However: julia\> exp10(-Inf) 0.0 I am pretty sure that 10.0^-Inf returned 0.0 in 1.6 and 1.7

---

## [Julia 1.8, 1.9 (rapid release?)](https://discourse.julialang.org/t/julia-1-8-1-9-rapid-release/85949)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 16\
**Last updated:** [August 19, 2022, 6:46pm UTC](https://discourse.julialang.org/t/julia-1-8-1-9-rapid-release/85949 "2022-08-19T18:46:17Z")

</div>

First, Julia 1.8.0 is a great release! 1.8.1 expected, but given @ViralBShah’s quote: Given that 1.7 is not too far away (timed releases going forward) when will 1.9.0-DEV be ready? It was already in dev “6 months ag…

---

## [Custom docs do not show up in VSCode browser](https://discourse.julialang.org/t/custom-docs-do-not-show-up-in-vscode-browser/79449)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 9\
**Last updated:** [August 19, 2022, 5:39pm UTC](https://discourse.julialang.org/t/custom-docs-do-not-show-up-in-vscode-browser/79449 "2022-08-19T17:39:33Z")

</div>

I noticed that documentation for custom functions does not show up in my VSCode documentation broswser. The following does not work if executed in the REPL “”" Here’s some inline maths: \\\\sqrt\[n\]{1 + x + x^2 + \\\\ldots}.…

---

## [Juliaup and Julia 1.8.0](https://discourse.julialang.org/t/juliaup-and-julia-1-8-0/85973)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [August 19, 2022, 5:15pm UTC](https://discourse.julialang.org/t/juliaup-and-julia-1-8-0/85973 "2022-08-19T17:15:35Z")

</div>

Having been away from my computers for a while, I ran juliaup up a couple of days ago, and it upgraded my system to Julia v. 1.7.3. IJulia ran fine, using kernel 1.7.3. Today, I did juliaup up again, and it installed Ju…

---

## [Change line attributes in GraphMakie](https://discourse.julialang.org/t/change-line-attributes-in-graphmakie/85923)

<div class="topic-metadata">

**Author:** [@PavanChaggar](https://discourse.julialang.org/u/PavanChaggar)\
**Replies:** 6\
**Last updated:** [August 19, 2022, 4:38pm UTC](https://discourse.julialang.org/t/change-line-attributes-in-graphmakie/85923 "2022-08-19T16:38:20Z")

</div>

Hi, Is there a way to change the transparency of the linesegments in a graphplot? At the moment I have a graphplot that looks like this: where the seems to be a white border around edges with a small width. I think…

---

## [\`ylabel\` and \`xlabel\` next to axes in facet plot](https://discourse.julialang.org/t/ylabel-and-xlabel-next-to-axes-in-facet-plot/86002)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 2\
**Last updated:** [August 19, 2022, 2:14pm UTC](https://discourse.julialang.org/t/ylabel-and-xlabel-next-to-axes-in-facet-plot/86002 "2022-08-19T14:14:19Z")

</div>

Is there a way in Makie.jl to “combine” the xlabel and ylabel by putting them in the middle of the axes? This would be useful for facet plots. For example, I have the following plot and I would like to avoid the dupl…

---

## [Compat of a child package ignored](https://discourse.julialang.org/t/compat-of-a-child-package-ignored/85937)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 3\
**Last updated:** [August 19, 2022, 1:05pm UTC](https://discourse.julialang.org/t/compat-of-a-child-package-ignored/85937 "2022-08-19T13:05:40Z")

</div>

I have a couple private packages I’m developing, let’s call them Pkg A and B (which is a dependency of A). For Pkg B, I have a dependency of TerminalLoggers.jl, which I’ve just set the compat section to \[compat\] Termin…

---

## [Help me to plot point-normal equations of plane](https://discourse.julialang.org/t/help-me-to-plot-point-normal-equations-of-plane/86001)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 0\
**Last updated:** [August 19, 2022, 12:33pm UTC](https://discourse.julialang.org/t/help-me-to-plot-point-normal-equations-of-plane/86001 "2022-08-19T12:33:57Z")

</div>

Hi all, I am able to use and modify a bit LazySets with Plots to create 2-dimension point-normal equations of a line. using LazySets, LaTeXStrings using Plots: plot, plot!, text, lens!, bbox gr() p(args...; kwargs...) …

---

## [jUnit compatible output of tests](https://discourse.julialang.org/t/junit-compatible-output-of-tests/85999)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [August 19, 2022, 12:21pm UTC](https://discourse.julialang.org/t/junit-compatible-output-of-tests/85999 "2022-08-19T12:21:49Z")

</div>

For running Julia tests on azure I was asked if my tests can produce jUnit compatible output. Any idea how to achieve that?

---

## [Plotting a Sphere with Inputs of Radius and center](https://discourse.julialang.org/t/plotting-a-sphere-with-inputs-of-radius-and-center/85978)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 4\
**Last updated:** [August 19, 2022, 12:05pm UTC](https://discourse.julialang.org/t/plotting-a-sphere-with-inputs-of-radius-and-center/85978 "2022-08-19T12:05:14Z")

</div>

Hi all, I read this forum: I want to know whether there is a way to plot a sphere based on an inputs of: radius center of the sphere (x,y,z) Instead of using sin,cos inputs. I use this code from the forum: using…

---

## [Accessing variables constructed within another function](https://discourse.julialang.org/t/accessing-variables-constructed-within-another-function/85897)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 15\
**Last updated:** [August 19, 2022, 11:54am UTC](https://discourse.julialang.org/t/accessing-variables-constructed-within-another-function/85897 "2022-08-19T11:54:11Z")

</div>

I need to create many variables within a function and input these data into numerous functions which conduct operations on the data. How can I do this without declaring the variables as globals? As I understand it variab…

---

## [Vectors/matrices with units vs. units for individual entries (Unitful.jl)](https://discourse.julialang.org/t/vectors-matrices-with-units-vs-units-for-individual-entries-unitful-jl/50453)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 2\
**Last updated:** [August 19, 2022, 11:35am UTC](https://discourse.julialang.org/t/vectors-matrices-with-units-vs-units-for-individual-entries-unitful-jl/50453 "2022-08-19T11:35:42Z")

</div>

I ran into something interesting yesterday - I wrote this function to create the cross-product matrix for 3-vector (sometimes known as the tilde operator): tilde(x) = \[0 -x\[3\] x\[2\]; x\[3\] 0 -x\[1\]; -x\[2\] x\[1\] 0\] If I the…

---

## [How to stack a new environment over the present one?](https://discourse.julialang.org/t/how-to-stack-a-new-environment-over-the-present-one/85993)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [August 19, 2022, 10:07am UTC](https://discourse.julialang.org/t/how-to-stack-a-new-environment-over-the-present-one/85993 "2022-08-19T10:07:14Z")

</div>

For example, in this sequence: (@v1.8) pkg\> activate a Activating new project at \`~/a\` julia\> Base.load\_path() 4-element Vector{String}: "/home/jishnu/a/Project.toml" "/tmp/jl\_wT5lem" "/home/jishnu/.julia/environm…

---

## [Change the color of shaded area in plotting uncertain quantity in MonteCarloMeasurements.jl](https://discourse.julialang.org/t/change-the-color-of-shaded-area-in-plotting-uncertain-quantity-in-montecarlomeasurements-jl/85956)

<div class="topic-metadata">

**Author:** [@Firstname\_Lastname](https://discourse.julialang.org/u/Firstname_Lastname)\
**Replies:** 2\
**Last updated:** [August 19, 2022, 8:24am UTC](https://discourse.julialang.org/t/change-the-color-of-shaded-area-in-plotting-uncertain-quantity-in-montecarlomeasurements-jl/85956 "2022-08-19T08:24:29Z")

</div>

From the following code using MonteCarloMeasurements, Plots x = LinRange(1:0.1:3) a = 1 \\pm 0.1 b = 2 \\pm 0.3 f(x) = a\*x + b plot(x, f.(x)) I obtained a plot with shaded area in light blue. How can I change this co…

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

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