# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1404

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

**Page:** 1405

---

## [Execute a CodeInfo object?](https://discourse.julialang.org/t/execute-a-codeinfo-object/60446)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [May 3, 2021, 2:50am UTC](https://discourse.julialang.org/t/execute-a-codeinfo-object/60446 "2021-05-03T02:50:02Z")

</div>

I used @code\_typed f(100) to get a CodeInfo object. Is it possible to execute that object to get the result? CodeInfo( 1 ─ goto #3 if not false 2 ─ nothing::Nothing 3 ┄ goto #4 4 ─ %4 = Base.add\_int(99, a…

---

## [Expression #= none:3 =# should not be used as a variable name](https://discourse.julialang.org/t/expression-none-3-should-not-be-used-as-a-variable-name/60422)

<div class="topic-metadata">

**Author:** [@BYS](https://discourse.julialang.org/u/BYS)\
**Replies:** 4\
**Last updated:** [May 3, 2021, 1:48am UTC](https://discourse.julialang.org/t/expression-none-3-should-not-be-used-as-a-variable-name/60422 "2021-05-03T01:48:16Z")

</div>

If I write using JuMP @variable(pro,begin t1\>=1 t2\>=2 t3\>=3 end) I find a error like this ERROR: LoadError: Expression #= none:3 =# should not be used as a variable name. Use the "anonymous" syntax #= no…

---

## [Codecov Bash uploader security notice](https://discourse.julialang.org/t/codecov-bash-uploader-security-notice/59408)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 9\
**Last updated:** [May 2, 2021, 9:27pm UTC](https://discourse.julialang.org/t/codecov-bash-uploader-security-notice/59408 "2021-05-02T21:27:27Z")

</div>

Yesterday I got an e-mail from Codecov about an incident that concerns their Bash uploader. I read the relevant page and their docs, and just want to check the following: if I am only using Codecov for public repos, via…

---

## [Bayesian Model Selection](https://discourse.julialang.org/t/bayesian-model-selection/55725)

<div class="topic-metadata">

**Author:** [@ANasc](https://discourse.julialang.org/u/ANasc)\
**Replies:** 18\
**Last updated:** [May 2, 2021, 8:58pm UTC](https://discourse.julialang.org/t/bayesian-model-selection/55725 "2021-05-02T20:58:15Z")

</div>

Hi All, This question might reveal my limited knowledge of Bayesian estimation, but I am having difficulty figuring out how to perform basic Bayesian model selection in Turing. The documentation for MCMCChains.jl has a …

---

## [How to use string substitution in variable names](https://discourse.julialang.org/t/how-to-use-string-substitution-in-variable-names/55192)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 15\
**Last updated:** [May 2, 2021, 8:35pm UTC](https://discourse.julialang.org/t/how-to-use-string-substitution-in-variable-names/55192 "2021-05-02T20:35:33Z")

</div>

I would like to do something like the following but that doesn’t work. How can I do this? Maybe use $ somehow? Edit: To be clear, I am trying to create the first 7 unit vectors. Thanks for i in 1:7 e\_i = zeros(7) …

---

## [Problem parsing a txt file](https://discourse.julialang.org/t/problem-parsing-a-txt-file/60432)

<div class="topic-metadata">

**Author:** [@statspy](https://discourse.julialang.org/u/statspy)\
**Replies:** 4\
**Last updated:** [May 2, 2021, 8:22pm UTC](https://discourse.julialang.org/t/problem-parsing-a-txt-file/60432 "2021-05-02T20:22:19Z")

</div>

Hello, I am reading a txt file with this format: 06/22/2021 {somenthing} 06/22/2021 {somenthing} 06/22/2021 {somenthing so long that goes to the other line} 06/22/2021 {somenthing} To read this file i am using: open(…

---

## [Makie.jl resize event](https://discourse.julialang.org/t/makie-jl-resize-event/60418)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [May 2, 2021, 8:21pm UTC](https://discourse.julialang.org/t/makie-jl-resize-event/60418 "2021-05-02T20:21:14Z")

</div>

Hello, one more question: Is it possible in GLMakie to capture window resize events? I need this because the automatic layout is not doing 100% what I want.

---

## [Supressing banner from a package](https://discourse.julialang.org/t/supressing-banner-from-a-package/60321)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 11\
**Last updated:** [May 2, 2021, 7:38pm UTC](https://discourse.julialang.org/t/supressing-banner-from-a-package/60321 "2021-05-02T19:38:25Z")

</div>

Hello, I am writing my first small package. I found Nemo useful for my purpose and I am using it in my package. But it comes with a small trouble: it prints a banner in the Jupyter notebook when it is loaded. Below…

---

## [Parsing WhatsApp text chat](https://discourse.julialang.org/t/parsing-whatsapp-text-chat/60427)

<div class="topic-metadata">

**Author:** [@statspy](https://discourse.julialang.org/u/statspy)\
**Replies:** 2\
**Last updated:** [May 2, 2021, 6:55pm UTC](https://discourse.julialang.org/t/parsing-whatsapp-text-chat/60427 "2021-05-02T18:55:27Z")

</div>

Hello, I am trying to parse a whatsapp text chat as a DataFrame . What I need is to parse this format: 06/18/2021 20:48 - +36 41 9989-8989: Hello, how are you? \<= all in one column or 06/18/2021 20:48 - Paul F…

---

## [Destructuring and broadcast](https://discourse.julialang.org/t/destructuring-and-broadcast/5672)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 12\
**Last updated:** [May 2, 2021, 6:49pm UTC](https://discourse.julialang.org/t/destructuring-and-broadcast/5672 "2021-05-02T18:49:04Z")

</div>

If I want to broadcast a function that returns a tuple, is there a simple way to “broadcast” the left hand side destructuring? a = 1:10 b = 11:20 transform(a, b) = a+b, a\*b, a-b # MWE, the real one is more compicated …

---

## [Plotting an ellipsoid as 2D surface in 3D, given the principal axes](https://discourse.julialang.org/t/plotting-an-ellipsoid-as-2d-surface-in-3d-given-the-principal-axes/60393)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 14\
**Last updated:** [May 2, 2021, 3:28pm UTC](https://discourse.julialang.org/t/plotting-an-ellipsoid-as-2d-surface-in-3d-given-the-principal-axes/60393 "2021-05-02T15:28:17Z")

</div>

Hi there, Let’s say I have some lengths \[5.0, 2.0, 1.0\] and I want to plot an ellipsoid whose axis have these lengths as a surface in 3D. Extra bonus if I can also provide two angles of rotation for azimuth / polar angl…

---

## [Better way to solve jacobian dependent differential equation](https://discourse.julialang.org/t/better-way-to-solve-jacobian-dependent-differential-equation/60259)

<div class="topic-metadata">

**Author:** [@willian](https://discourse.julialang.org/u/willian)\
**Replies:** 4\
**Last updated:** [May 2, 2021, 3:18pm UTC](https://discourse.julialang.org/t/better-way-to-solve-jacobian-dependent-differential-equation/60259 "2021-05-02T15:18:47Z")

</div>

What is the best way to solve the following differential equations ? I mean, I could solve the first equation x(t) alone and use the solutions to run the solver again and find P(t). I would like to know if there is a…

---

## [Vector of pointers to struct array elements](https://discourse.julialang.org/t/vector-of-pointers-to-struct-array-elements/60417)

<div class="topic-metadata">

**Author:** [@vitelot](https://discourse.julialang.org/u/vitelot)\
**Replies:** 6\
**Last updated:** [May 2, 2021, 1:28pm UTC](https://discourse.julialang.org/t/vector-of-pointers-to-struct-array-elements/60417 "2021-05-02T13:28:48Z")

</div>

Hi, I’m trying to avoid multiple vector allocations to speed up the weighted sampling of a vector of structs: using StatsBase function chooseBox(room::Vector{Box}) v = \[x.k for x in room\] sample(room, Weights(v)…

---

## [Differences in MATLAB's versus Julia's beta(x, y) for large x or y?](https://discourse.julialang.org/t/differences-in-matlabs-versus-julias-beta-x-y-for-large-x-or-y/60138)

<div class="topic-metadata">

**Author:** [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Replies:** 16\
**Last updated:** [May 1, 2021, 7:20pm UTC](https://discourse.julialang.org/t/differences-in-matlabs-versus-julias-beta-x-y-for-large-x-or-y/60138 "2021-05-01T19:20:06Z")

</div>

Hi everyone, I was comparing a colleague’s MATLAB code to my version (we are coding in parallel, and I am using Julia. I am also trying to convince him to move to Julia. Making progress… :slight\_smile: ), and I noticed …

---

## [\[ANN\] jvc.sh - yet another shell installer for Julia](https://discourse.julialang.org/t/ann-jvc-sh-yet-another-shell-installer-for-julia/60306)

<div class="topic-metadata">

**Author:** [@songxianxu](https://discourse.julialang.org/u/songxianxu)\
**Replies:** 2\
**Last updated:** [May 2, 2021, 12:43pm UTC](https://discourse.julialang.org/t/ann-jvc-sh-yet-another-shell-installer-for-julia/60306 "2021-05-02T12:43:09Z")

</div>

Hi all, I have written an ugly (at least at the current stage) but probably(?) useful shell script jvc.sh for Julia installation and version management. Perhaps you can consider jvc.sh as a heavy version of jill.sh or …

---

## [Some questions about finalizers](https://discourse.julialang.org/t/some-questions-about-finalizers/60413)

<div class="topic-metadata">

**Author:** [@timoore](https://discourse.julialang.org/u/timoore)\
**Replies:** 1\
**Last updated:** [May 2, 2021, 9:46am UTC](https://discourse.julialang.org/t/some-questions-about-finalizers/60413 "2021-05-02T09:46:38Z")

</div>

Hi, old Common Lisp hand and Julia newbie here. I have some questions about finalizers that probably have obvious answers, but I’m having trouble finding them in the docs. It appears that on entry to a finalizer, the …

---

## [Asynchronous computations: I only want the result that finishes first and then stop the other](https://discourse.julialang.org/t/asynchronous-computations-i-only-want-the-result-that-finishes-first-and-then-stop-the-other/60326)

<div class="topic-metadata">

**Author:** [@scheinerman](https://discourse.julialang.org/u/scheinerman)\
**Replies:** 9\
**Last updated:** [May 2, 2021, 7:55am UTC](https://discourse.julialang.org/t/asynchronous-computations-i-only-want-the-result-that-finishes-first-and-then-stop-the-other/60326 "2021-05-02T07:55:56Z")

</div>

I am thinking about a situation in which if have different ways to compute the same thing. I want both calculations to start and when one of them finishes, give me the result. I then can abandon the other calculation. I…

---

## [How to do multiple imputation on Julia?](https://discourse.julialang.org/t/how-to-do-multiple-imputation-on-julia/17713)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 15\
**Last updated:** [May 2, 2021, 7:46am UTC](https://discourse.julialang.org/t/how-to-do-multiple-imputation-on-julia/17713 "2021-05-02T07:46:02Z")

</div>

I’ve found the package Impute.jl but it seems it’s only able to use these simple methods: drop - remove missing locf - last observation carried forward nocb - next observation carried backward interp - linear interpola…

---

## [DDE parameter estimation using DiffEqFlux](https://discourse.julialang.org/t/dde-parameter-estimation-using-diffeqflux/60399)

<div class="topic-metadata">

**Author:** [@ANasc](https://discourse.julialang.org/u/ANasc)\
**Replies:** 4\
**Last updated:** [May 2, 2021, 5:47am UTC](https://discourse.julialang.org/t/dde-parameter-estimation-using-diffeqflux/60399 "2021-05-02T05:47:27Z")

</div>

Hi, I’m trying to estimate a parameter in a DDE model using DiffEqFlux. I’ve tried to adapt the tutorial at https://diffeqflux.sciml.ai/dev/examples/optimization\_ode/ to my problem but have not been able to get it to ru…

---

## [How to set JULIA\_PROJECT for JuliaCall?](https://discourse.julialang.org/t/how-to-set-julia-project-for-juliacall/60408)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 2\
**Last updated:** [May 2, 2021, 5:17am UTC](https://discourse.julialang.org/t/how-to-set-julia-project-for-juliacall/60408 "2021-05-02T05:17:09Z")

</div>

I need access to a pre-existing project environment within JuliaCall. The following MWE does not work: MWE: Create the ‘pre-existing’ environment # run this in the terminal $ cd ~/ $ mkdir /tmp/testenv && cd /tmp/teste…

---

## [Status of integration, optimization, and nl solvers](https://discourse.julialang.org/t/status-of-integration-optimization-and-nl-solvers/60025)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 22\
**Last updated:** [May 2, 2021, 3:27am UTC](https://discourse.julialang.org/t/status-of-integration-optimization-and-nl-solvers/60025 "2021-05-02T03:27:22Z")

</div>

I’m working on a project in which, given a vector of parameters θ, I have to solve a nonlinear system of equations that involve some integrals. After solving the system, I need to optimize with respect to θ to obtain opt…

---

## [\[ANN\] Introducing ReadStatTables.jl for loading Stata, SAS and SPSS files](https://discourse.julialang.org/t/ann-introducing-readstattables-jl-for-loading-stata-sas-and-spss-files/60407)

<div class="topic-metadata">

**Author:** [@Norman](https://discourse.julialang.org/u/Norman)\
**Replies:** 0\
**Last updated:** [May 2, 2021, 3:06am UTC](https://discourse.julialang.org/t/ann-introducing-readstattables-jl-for-loading-stata-sas-and-spss-files/60407 "2021-05-02T03:06:01Z")

</div>

I am glad to announce that the first release of ReadStatTables.jl is now available via the General registry. ReadStatTables.jl relies on ReadStat.jl. It adds the following features on top of the read support from ReadSt…

---

## [Thread safe buffer correctness](https://discourse.julialang.org/t/thread-safe-buffer-correctness/60183)

<div class="topic-metadata">

**Author:** [@halleysfifthinc](https://discourse.julialang.org/u/halleysfifthinc)\
**Replies:** 13\
**Last updated:** [May 2, 2021, 1:17am UTC](https://discourse.julialang.org/t/thread-safe-buffer-correctness/60183 "2021-05-02T01:17:21Z")

</div>

For a recent multi-threaded simulation, I needed a thread-safe way to use pre-allocated arrays, and the simple “nthreads() length vector of arrays” wasn’t working due to the presence of yield points in the spawn’ed tasks…

---

## [Transform DataFrame into a single row by adding row contents as new columns](https://discourse.julialang.org/t/transform-dataframe-into-a-single-row-by-adding-row-contents-as-new-columns/60400)

<div class="topic-metadata">

**Author:** [@alessio](https://discourse.julialang.org/u/alessio)\
**Replies:** 3\
**Last updated:** [May 1, 2021, 9:31pm UTC](https://discourse.julialang.org/t/transform-dataframe-into-a-single-row-by-adding-row-contents-as-new-columns/60400 "2021-05-01T21:31:27Z")

</div>

I would like to convert df = DataFrame(A=\['x','y','z','t'\], B=\[1,2,3,4\]) 4×2 DataFrame Row │ A B │ Char Int64 ─────┼───────────── 1 │ x 1 2 │ y 2 3 │ z 3 4 │ t 4 t…

---

## [Wengert list -- possible graphs?](https://discourse.julialang.org/t/wengert-list-possible-graphs/59891)

<div class="topic-metadata">

**Author:** [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Replies:** 11\
**Last updated:** [May 1, 2021, 5:50pm UTC](https://discourse.julialang.org/t/wengert-list-possible-graphs/59891 "2021-05-01T17:50:56Z")

</div>

Hello everybody, I wonder if there is a Julia package that, from a given equation, produces the calculation graph (Wenger’s list). As if: f(x1,x2) = x1\*x2 - sin(x2) gives: A bit like Catalyst.jl allows the use of …

---

## [Help with Gaussian Mixer Model in Turing.jl](https://discourse.julialang.org/t/help-with-gaussian-mixer-model-in-turing-jl/60396)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 0\
**Last updated:** [May 1, 2021, 8:10pm UTC](https://discourse.julialang.org/t/help-with-gaussian-mixer-model-in-turing-jl/60396 "2021-05-01T20:10:28Z")

</div>

Random.seed!(3) N = 30 μs = \[-3.5, 0.0\] x = mapreduce(c -\> rand(MvNormal(\[μs\[c\], μs\[c\]\], 1.), N), hcat, 1:2) using Turing, MCMCChains model GaussianMixtureModel(x) = begin D, N = size(x) # Draw the pa…

---

## [Distributions.jl](https://discourse.julialang.org/t/distributions-jl/60394)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 2\
**Last updated:** [May 1, 2021, 7:59pm UTC](https://discourse.julialang.org/t/distributions-jl/60394 "2021-05-01T19:59:08Z")

</div>

Is Distributions.jl a built in package? When I try running it I get this: !\[Screenshot from 2021-05-01 13-35-14|690x387\](upload://rvrwCS99k3WHfz0jtaZw8Asf8Ip.png) !\[Screenshot from 2021-05-01 13-35-27|690x387\](upload:…

---

## [Unexpected ERROR: UndefVarError: a not defined](https://discourse.julialang.org/t/unexpected-error-undefvarerror-a-not-defined/60379)

<div class="topic-metadata">

**Author:** [@M0ran](https://discourse.julialang.org/u/M0ran)\
**Replies:** 8\
**Last updated:** [May 1, 2021, 7:40pm UTC](https://discourse.julialang.org/t/unexpected-error-undefvarerror-a-not-defined/60379 "2021-05-01T19:40:52Z")

</div>

Hey, I’m new to Julia and I have to program the game “paper soccer” for school. It’s almost finished, but now I got this “UndefVarError: a not defined” error. Since I’ve always adapted my code step by step, I really don’…

---

## [In BAT.jl I'm unable to find the Log Denstiy Value](https://discourse.julialang.org/t/in-bat-jl-im-unable-to-find-the-log-denstiy-value/60390)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 0\
**Last updated:** [May 1, 2021, 5:53pm UTC](https://discourse.julialang.org/t/in-bat-jl-im-unable-to-find-the-log-denstiy-value/60390 "2021-05-01T17:53:27Z")

</div>

data = vcat( rand(Normal(-1.0, 0.5), 500), rand(Normal( 2.0, 0.5), 1000) ) hist = append!(Histogram(-2:0.1:4), data) function fit\_function(p::NamedTuple{(:a, :mu, :sigma)}, x::Real) p.a\[1\] \* pdf(Normal(p.mu\[…

---

## [Using containers with abstract type parameters](https://discourse.julialang.org/t/using-containers-with-abstract-type-parameters/60264)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 11\
**Last updated:** [May 1, 2021, 4:28pm UTC](https://discourse.julialang.org/t/using-containers-with-abstract-type-parameters/60264 "2021-05-01T16:28:38Z")

</div>

Consider the following code: abstract type GameObject end abstract type Weapon \<: GameObject end struct Sword \<: Weapon name::String damage::Int32 end struct Bow \<:Weapon name::String damage::Int32 end m…

[Previous page](https://discourse.julialang.org/latest.md?page=1403)

[Next page](https://discourse.julialang.org/latest.md?page=1405)
