# General Usage

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

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

**Page:** 316

---

## [Does \[noblock\] override previous blocking comments in a registrator PR?](https://discourse.julialang.org/t/does-noblock-override-previous-blocking-comments-in-a-registrator-pr/96151)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 1\
**Last updated:** [March 15, 2023, 9:21pm UTC](https://discourse.julialang.org/t/does-noblock-override-previous-blocking-comments-in-a-registrator-pr/96151 "2023-03-15T21:21:51Z")

</div>

Just want to confirm that that auto merging will still happen if a comment like this: this looks shady... Is followed by a comment like this: \[noblock\] let's auto merge anyway

---

## [How can I see what parameters are making my code erroring when broadcasting a function call?](https://discourse.julialang.org/t/how-can-i-see-what-parameters-are-making-my-code-erroring-when-broadcasting-a-function-call/96130)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 3\
**Last updated:** [March 15, 2023, 8:59pm UTC](https://discourse.julialang.org/t/how-can-i-see-what-parameters-are-making-my-code-erroring-when-broadcasting-a-function-call/96130 "2023-03-15T20:59:04Z")

</div>

Hi all! I have a function that raises a MethodError when broadcasted to a large vector of Strings. The error simply says julia\> df\_model\_measure\_master\[!, dest\_source\_eq\_sym\] = has\_dest\_source\_eq.(df\_model\_measure\_mast…

---

## [Relocability problems about Requires.jl](https://discourse.julialang.org/t/relocability-problems-about-requires-jl/96110)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 5\
**Last updated:** [March 15, 2023, 5:30pm UTC](https://discourse.julialang.org/t/relocability-problems-about-requires-jl/96110 "2023-03-15T17:30:46Z")

</div>

I compiled my package, which depends on HDF5.jl. I compiled it in docker and then use the compiled executable directly in the host machine. It generally works fine, but there is a warning: ┌ Warning: Error requiring \`MP…

---

## [Creating Regular Grids with Triangulate.jl and Extendable Grids](https://discourse.julialang.org/t/creating-regular-grids-with-triangulate-jl-and-extendable-grids/96124)

<div class="topic-metadata">

**Author:** [@mm-crj](https://discourse.julialang.org/u/mm-crj)\
**Replies:** 10\
**Last updated:** [March 15, 2023, 4:26pm UTC](https://discourse.julialang.org/t/creating-regular-grids-with-triangulate-jl-and-extendable-grids/96124 "2023-03-15T16:26:25Z")

</div>

I am trying to solve a PDE system on an unstructured mesh. I currently use the Triangulate.jl to create the mesh and then use OrdinaryDiffEq.jl to solve the system of ODEs, one for each cell of the mesh. Now I am interes…

---

## [Allocations for abstract field of struct](https://discourse.julialang.org/t/allocations-for-abstract-field-of-struct/96088)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 8\
**Last updated:** [March 15, 2023, 3:02pm UTC](https://discourse.julialang.org/t/allocations-for-abstract-field-of-struct/96088 "2023-03-15T15:02:24Z")

</div>

Considering the following struct definition for \_MyTest1: using BenchmarkTools abstract type \_AbstractReference end struct \_TestStringReference \<: \_AbstractReference val::String end struct \_TestIntReference \<: \_A…

---

## [Allocation when applying in place multiplication to matrix of SVector](https://discourse.julialang.org/t/allocation-when-applying-in-place-multiplication-to-matrix-of-svector/96074)

<div class="topic-metadata">

**Author:** [@yiminlin](https://discourse.julialang.org/u/yiminlin)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 2:51pm UTC](https://discourse.julialang.org/t/allocation-when-applying-in-place-multiplication-to-matrix-of-svector/96074 "2023-03-15T14:51:56Z")

</div>

I am trying to apply in-place matrix multiplication to a matrix of SVector. However, there are 3 allocations if I apply mul! directly. If I apply the multiplication over each column, the allocations disappear. Here is th…

---

## [LLVM code changes if code is wrapped in function](https://discourse.julialang.org/t/llvm-code-changes-if-code-is-wrapped-in-function/96107)

<div class="topic-metadata">

**Author:** [@amansawhney](https://discourse.julialang.org/u/amansawhney)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 1:35pm UTC](https://discourse.julialang.org/t/llvm-code-changes-if-code-is-wrapped-in-function/96107 "2023-03-15T13:35:55Z")

</div>

Hi! I am looking to use SIMD to speed up some operations on strings. I noticed that when I wrap my code in a function it seems that julia doesn’t use the vector instructions. I am using SIMD.jl for my simd functions. He…

---

## [How can I "flag" that I mutated a field in a struct such as a vector](https://discourse.julialang.org/t/how-can-i-flag-that-i-mutated-a-field-in-a-struct-such-as-a-vector/96099)

<div class="topic-metadata">

**Author:** [@kylebeggs](https://discourse.julialang.org/u/kylebeggs)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 1:05pm UTC](https://discourse.julialang.org/t/how-can-i-flag-that-i-mutated-a-field-in-a-struct-such-as-a-vector/96099 "2023-03-15T13:05:23Z")

</div>

Suppose I have a struct where I am mutating one of the fields (say it is a Vector) like struct A x::Vector end a = A(\[1, 2\]) a.x\[1\] = 0 and I want to have some sort of flag to indicate whether I have mutated a.x. …

---

## [Graphemes vs chars](https://discourse.julialang.org/t/graphemes-vs-chars/96118)

<div class="topic-metadata">

**Author:** [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Replies:** 8\
**Last updated:** [March 15, 2023, 12:07pm UTC](https://discourse.julialang.org/t/graphemes-vs-chars/96118 "2023-03-15T12:07:18Z")

</div>

Cthulhu has an internal TextWidthLimiter\<:IO which allows you to print text, attempting (but not always succeeding) in limiting output to a certain number of characters. I’m considering splitting it out into its own pack…

---

## [Ternary plots](https://discourse.julialang.org/t/ternary-plots/60867)

<div class="topic-metadata">

**Author:** [@Dan.phi](https://discourse.julialang.org/u/Dan.phi)\
**Replies:** 5\
**Last updated:** [March 15, 2023, 12:18pm UTC](https://discourse.julialang.org/t/ternary-plots/60867 "2023-03-15T12:18:17Z")

</div>

I am looking to replicate the figure below (from Wikipedia on the Dirichlet distribution). Is there any way to do this currently in Julia (the vertical color scale is not that important)?

---

## [Add package, but the following error was reported, how to solve it, thank you](https://discourse.julialang.org/t/add-package-but-the-following-error-was-reported-how-to-solve-it-thank-you/96112)

<div class="topic-metadata">

**Author:** [@Yanjj1](https://discourse.julialang.org/u/Yanjj1)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 11:52am UTC](https://discourse.julialang.org/t/add-package-but-the-following-error-was-reported-how-to-solve-it-thank-you/96112 "2023-03-15T11:52:38Z")

</div>

(@v1.7) pkg\> add GLM Updating registry at ~/.julia/registries/General ERROR: GitError(Code:ENOTFOUND, Class:Repository, could not find repository from ‘/public/user/.julia/registries/General’) Stacktrace: \[1\] macro e…

---

## [Continuous precompile?](https://discourse.julialang.org/t/continuous-precompile/96111)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 0\
**Last updated:** [March 15, 2023, 9:04am UTC](https://discourse.julialang.org/t/continuous-precompile/96111 "2023-03-15T09:04:21Z")

</div>

With the new native code caching in 1.9, has anyone thought to make a tool which basically just runs in the background watching your project and triggers a background precompile anytime a file changes (killing any previo…

---

## [Shorten time to create\_app() using PackageCompiler](https://discourse.julialang.org/t/shorten-time-to-create-app-using-packagecompiler/95274)

<div class="topic-metadata">

**Author:** [@Pablo](https://discourse.julialang.org/u/Pablo)\
**Replies:** 6\
**Last updated:** [March 15, 2023, 8:41am UTC](https://discourse.julialang.org/t/shorten-time-to-create-app-using-packagecompiler/95274 "2023-03-15T08:41:22Z")

</div>

Is there any way to reduce the time it takes to create a julia app with package compiler? I have found the filter\_stdlibs=true arg in the PackageCompiler docs, but I wonder if there’s anything else I can do

---

## [Nested sampling for Bayesian parameter estimation in Julia](https://discourse.julialang.org/t/nested-sampling-for-bayesian-parameter-estimation-in-julia/96105)

<div class="topic-metadata">

**Author:** [@tomkimpson](https://discourse.julialang.org/u/tomkimpson)\
**Replies:** 0\
**Last updated:** [March 15, 2023, 4:32am UTC](https://discourse.julialang.org/t/nested-sampling-for-bayesian-parameter-estimation-in-julia/96105 "2023-03-15T04:32:33Z")

</div>

It is a common problem to want to infer parameters (Bayesian) given some data, a set of priors on those parameters, and a (parameterised) model. In the past, coming from Python, I have used tools such as Bilby, a Python…

---

## [Is it always safe to “re-use” an iterator/generator?](https://discourse.julialang.org/t/is-it-always-safe-to-re-use-an-iterator-generator/95697)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 8\
**Last updated:** [March 15, 2023, 2:21am UTC](https://discourse.julialang.org/t/is-it-always-safe-to-re-use-an-iterator-generator/95697 "2023-03-15T02:21:05Z")

</div>

The way iterators work in Python, there is the following (potentially surprising) behavior: \>\>\> l = \[1, 2, 3\] \>\>\> g = (x for x in l) \>\>\> list(g) \[1, 2, 3\] \>\>\> list(g) \[\] That is, iterators are “used up” during the iter…

---

## [Memory allocation issue of a Euler solver implementation](https://discourse.julialang.org/t/memory-allocation-issue-of-a-euler-solver-implementation/96086)

<div class="topic-metadata">

**Author:** [@stevengogogo](https://discourse.julialang.org/u/stevengogogo)\
**Replies:** 2\
**Last updated:** [March 14, 2023, 8:47pm UTC](https://discourse.julialang.org/t/memory-allocation-issue-of-a-euler-solver-implementation/96086 "2023-03-14T20:47:31Z")

</div>

Hello all, I am implementing ODE solvers for a class assignment. Unfortunately, there is a memory allocation problem with my script, and the performance is not optimal. Problem Description The implementation uses the f…

---

## [Perf help: Random Walks for BoundaryValueProblems](https://discourse.julialang.org/t/perf-help-random-walks-for-boundaryvalueproblems/96082)

<div class="topic-metadata">

**Author:** [@miguelraz](https://discourse.julialang.org/u/miguelraz)\
**Replies:** 2\
**Last updated:** [March 14, 2023, 8:27pm UTC](https://discourse.julialang.org/t/perf-help-random-walks-for-boundaryvalueproblems/96082 "2023-03-14T20:27:47Z")

</div>

Hey all :wave: I started working on some code for a class project and I’m proud to say I took it down from my professor’s 300s to sub 6s :smiley: . I am now trying to do the fastest serial version of it before making it…

---

## [Time Series Plots with percentiles](https://discourse.julialang.org/t/time-series-plots-with-percentiles/95902)

<div class="topic-metadata">

**Author:** [@gokulbalagopal](https://discourse.julialang.org/u/gokulbalagopal)\
**Replies:** 2\
**Last updated:** [March 14, 2023, 3:13pm UTC](https://discourse.julialang.org/t/time-series-plots-with-percentiles/95902 "2023-03-14T15:13:41Z")

</div>

Hi, I was wondering if there was a way in Julia to create timeseries plots with percentile bands. I have tried it using ribbon option in plot recipies. I do get some bands, but I am not understanding how to adjust the w…

---

## [How to change the entire column form for different situation?](https://discourse.julialang.org/t/how-to-change-the-entire-column-form-for-different-situation/96037)

<div class="topic-metadata">

**Author:** [@akshdfyehd](https://discourse.julialang.org/u/akshdfyehd)\
**Replies:** 2\
**Last updated:** [March 14, 2023, 3:28pm UTC](https://discourse.julialang.org/t/how-to-change-the-entire-column-form-for-different-situation/96037 "2023-03-14T15:28:20Z")

</div>

Hi, I have got a dataset from kaggle and its relate to travel, Here are the link for raw datasets: https://raw.githubusercontent.com/akshdfyehd/travel/main/Travel%20details%20dataset.csv there is a column call “Destina…

---

## [JSON3 string to Numeric](https://discourse.julialang.org/t/json3-string-to-numeric/96050)

<div class="topic-metadata">

**Author:** [@oliviermilla](https://discourse.julialang.org/u/oliviermilla)\
**Replies:** 2\
**Last updated:** [March 14, 2023, 11:55am UTC](https://discourse.julialang.org/t/json3-string-to-numeric/96050 "2023-03-14T11:55:16Z")

</div>

I have this API that returns all data as string: { value: "35.2" } Yet I want to map it to astruct with the proper type struct Data vaue::Float16 end How can I instruct JSON3 to do the conversion?

---

## [How does replace.() work on a string vector containing missing?](https://discourse.julialang.org/t/how-does-replace-work-on-a-string-vector-containing-missing/96029)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 16\
**Last updated:** [March 14, 2023, 10:30am UTC](https://discourse.julialang.org/t/how-does-replace-work-on-a-string-vector-containing-missing/96029 "2023-03-14T10:30:37Z")

</div>

replace() and replace.() both work on the same string vector containing no missing julia\> vs=\["1.","2","3.","1"\] 4-element Vector{String}: "1." "2" "3." "1" julia\> replace(vs, "1"=\>"999") 4-element Vector{String}: …

---

## [Getting Help '?' doesn't work in vscode with julia notebook kernel](https://discourse.julialang.org/t/getting-help-doesnt-work-in-vscode-with-julia-notebook-kernel/96032)

<div class="topic-metadata">

**Author:** [@JackaChou](https://discourse.julialang.org/u/JackaChou)\
**Replies:** 2\
**Last updated:** [March 14, 2023, 10:30am UTC](https://discourse.julialang.org/t/getting-help-doesnt-work-in-vscode-with-julia-notebook-kernel/96032 "2023-03-14T10:30:20Z")

</div>

Getting Help ‘?’ doesn’t work in the vs code with Julia notebook kernel, how can I make it work, or are there some alternative methods to solve it?

---

## [Let block in an inner function captures variables from outer function](https://discourse.julialang.org/t/let-block-in-an-inner-function-captures-variables-from-outer-function/96027)

<div class="topic-metadata">

**Author:** [@artemsolod](https://discourse.julialang.org/u/artemsolod)\
**Replies:** 4\
**Last updated:** [March 13, 2023, 11:55pm UTC](https://discourse.julialang.org/t/let-block-in-an-inner-function-captures-variables-from-outer-function/96027 "2023-03-13T23:55:12Z")

</div>

I expected the following definitions f1 and f2 to be equivalent but inner in f1 overwrites state variable from its outer scope despite being assigned in a let-block. Just trying to understand whether this is a bug? Teste…

---

## [How to split a very long string used in a macro?](https://discourse.julialang.org/t/how-to-split-a-very-long-string-used-in-a-macro/96021)

<div class="topic-metadata">

**Author:** [@g2g](https://discourse.julialang.org/u/g2g)\
**Replies:** 4\
**Last updated:** [March 13, 2023, 10:28pm UTC](https://discourse.julialang.org/t/how-to-split-a-very-long-string-used-in-a-macro/96021 "2023-03-13T22:28:39Z")

</div>

To avoid the horizontal scrolling necessary to read a very long unsplit string, any suggestions on how to split the following very long string used in a macro? # mwestr.jl : very long string used by a macro using GLMaki…

---

## [Two legends in PyPlot](https://discourse.julialang.org/t/two-legends-in-pyplot/95946)

<div class="topic-metadata">

**Author:** [@marllos](https://discourse.julialang.org/u/marllos)\
**Replies:** 3\
**Last updated:** [March 13, 2023, 5:35pm UTC](https://discourse.julialang.org/t/two-legends-in-pyplot/95946 "2023-03-13T17:35:09Z")

</div>

Hello everyone! How to add two legends in PyPlot (only). I tried to replicate some Python examples but they use the add\_artist function which I don’t find in Julia.

---

## [Substituting a TaylorN variable into another TaylorN variable](https://discourse.julialang.org/t/substituting-a-taylorn-variable-into-another-taylorn-variable/96014)

<div class="topic-metadata">

**Author:** [@Vaclav\_Mikeska](https://discourse.julialang.org/u/Vaclav_Mikeska)\
**Replies:** 0\
**Last updated:** [March 13, 2023, 4:43pm UTC](https://discourse.julialang.org/t/substituting-a-taylorn-variable-into-another-taylorn-variable/96014 "2023-03-13T16:43:36Z")

</div>

Let’s have some multivariable polynomials P1 and P2 represented by TaylorN variable from TaylorSeries package, e.g. using TaylorSeries x, y = set\_variables("x y") P1 = TaylorN(\[HomogeneousPolynomial(\[1\]), HomogeneousPo…

---

## [Package for remote computation](https://discourse.julialang.org/t/package-for-remote-computation/95960)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 15\
**Last updated:** [March 13, 2023, 1:24pm UTC](https://discourse.julialang.org/t/package-for-remote-computation/95960 "2023-03-13T13:24:45Z")

</div>

Consider the following scenario: the user has access to a “workstation”, ideal for interactive debugging and development, and exploration of results (such as generating graphs for a paper) “server”, much more powerful …

---

## [Julia's A\\b solution of a linear system is logically inconsistent when A is square](https://discourse.julialang.org/t/julias-a-b-solution-of-a-linear-system-is-logically-inconsistent-when-a-is-square/95911)

<div class="topic-metadata">

**Author:** [@MaxM](https://discourse.julialang.org/u/MaxM)\
**Replies:** 5\
**Last updated:** [March 13, 2023, 12:13pm UTC](https://discourse.julialang.org/t/julias-a-b-solution-of-a-linear-system-is-logically-inconsistent-when-a-is-square/95911 "2023-03-13T12:13:39Z")

</div>

Please correct me if I’m wrong as I fiddle around. As far as I can see, if A is an m \\times n non-square matrix and b is an m \\times 1 vector, then A\\b returns the minimal norm minimal least square solution. That is, con…

---

## [Is using @btime before the include("code\_paralell.jl") correct for measuring the time of multi-threaded code?](https://discourse.julialang.org/t/is-using-btime-before-the-include-code-paralell-jl-correct-for-measuring-the-time-of-multi-threaded-code/95635)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 3\
**Last updated:** [March 13, 2023, 11:43am UTC](https://discourse.julialang.org/t/is-using-btime-before-the-include-code-paralell-jl-correct-for-measuring-the-time-of-multi-threaded-code/95635 "2023-03-13T11:43:58Z")

</div>

I have a file code\_paralell.jl in which I am parallelizing its for-loop of simulation time. At the beginning, I am preparing some variables, in which some needs @eval in front of them (due to world age). To measure the …

---

## [How to represent an Ornstein-like stochastic ODE in Julia?](https://discourse.julialang.org/t/how-to-represent-an-ornstein-like-stochastic-ode-in-julia/95987)

<div class="topic-metadata">

**Author:** [@tomkimpson](https://discourse.julialang.org/u/tomkimpson)\
**Replies:** 1\
**Last updated:** [March 13, 2023, 10:52am UTC](https://discourse.julialang.org/t/how-to-represent-an-ornstein-like-stochastic-ode-in-julia/95987 "2023-03-13T10:52:37Z")

</div>

1. The equation I want to solve I have some vector stochastic ODE that has an almost Langevin form, but with an additional time dependence: \\frac{dy}{dt} = -\\gamma (y - a - bt) + b + \\xi(t) where a,b,\\gamma are consta…

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

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