# Latest

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

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

**Page:** 787

---

## [Error in InfiniteOpt.jl quick start example](https://discourse.julialang.org/t/error-in-infiniteopt-jl-quick-start-example/94275)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 5\
**Last updated:** [February 9, 2023, 7:23pm UTC](https://discourse.julialang.org/t/error-in-infiniteopt-jl-quick-start-example/94275 "2023-02-09T19:23:37Z")

</div>

Hi everyone, I have tried to run a tutorial example in InfiniteOpt.jl. using InfiniteOpt, Distributions, Ipopt # DEFINE THE PROBLEM CONSTANTS μ = 1; σ = 0.2 x0 = \[0, 0\]; v0 = \[0, 0\] p = \[1 4 6 1; 1 3 0 1\]; tw = \[0,…

---

## [How to resize and fill more efficiently?](https://discourse.julialang.org/t/how-to-resize-and-fill-more-efficiently/94081)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 14\
**Last updated:** [February 9, 2023, 7:16pm UTC](https://discourse.julialang.org/t/how-to-resize-and-fill-more-efficiently/94081 "2023-02-09T19:16:37Z")

</div>

Hello! Suppose I have: using StaticArrays S = rand(SVector{3,Float32},10^6) function MyResizeAndFill!(S,N) resize!(S,N) fill!(S,zero(eltype(S))) end @benchmark MyResizeAndFill!($S,$(10^8)) BenchmarkTools.Tri…

---

## [What does \`Base.@ccallable\` do?](https://discourse.julialang.org/t/what-does-base-ccallable-do/71194)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 7:06pm UTC](https://discourse.julialang.org/t/what-does-base-ccallable-do/71194 "2023-02-09T19:06:12Z")

</div>

It’s mentioned in the docs for PackageCompiler (Apps · PackageCompiler) but is not itself documented.

---

## [Improving the speed of large population simulations in DifferentialEquations.jl](https://discourse.julialang.org/t/improving-the-speed-of-large-population-simulations-in-differentialequations-jl/93109)

<div class="topic-metadata">

**Author:** [@freddie090](https://discourse.julialang.org/u/freddie090)\
**Replies:** 10\
**Last updated:** [February 9, 2023, 6:48pm UTC](https://discourse.julialang.org/t/improving-the-speed-of-large-population-simulations-in-differentialequations-jl/93109 "2023-02-09T18:48:23Z")

</div>

Hi, Apologies if this isn’t the correct forum for this style of question, but I think it could be viewed as a performance problem. Sensitive/Resistant Birth Death Simulation I have a birth-death simulation I am runnin…

---

## [In-place inverse permutation](https://discourse.julialang.org/t/in-place-inverse-permutation/94368)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 1\
**Last updated:** [February 9, 2023, 6:16pm UTC](https://discourse.julialang.org/t/in-place-inverse-permutation/94368 "2023-02-09T18:16:46Z")

</div>

Is there a reason that there is not an in-place equivalent of sortperm!, i.e., “invperm!”? One current (v1.8.3) approach would be to call invpermute!(v, sig) for permutation sig, but the docs say that for v with many el…

---

## [Tying a function to an array when I get the value of the array](https://discourse.julialang.org/t/tying-a-function-to-an-array-when-i-get-the-value-of-the-array/94354)

<div class="topic-metadata">

**Author:** [@LolianSh](https://discourse.julialang.org/u/LolianSh)\
**Replies:** 4\
**Last updated:** [February 9, 2023, 6:00pm UTC](https://discourse.julialang.org/t/tying-a-function-to-an-array-when-i-get-the-value-of-the-array/94354 "2023-02-09T18:00:28Z")

</div>

Hi everyone, I have question. Maybe someone has encountered this before and can help me out. I would like to do the following: searchsortedfirst(ntoh.(v), x) Assuming v is a memory mapped vector on disk. Using ntoh.(…

---

## [How to get parent module of a submodule](https://discourse.julialang.org/t/how-to-get-parent-module-of-a-submodule/94364)

<div class="topic-metadata">

**Author:** [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Replies:** 3\
**Last updated:** [February 9, 2023, 5:31pm UTC](https://discourse.julialang.org/t/how-to-get-parent-module-of-a-submodule/94364 "2023-02-09T17:31:55Z")

</div>

Probably it is something simple and obvious, but I can’t find the solution. Does anyone knows how to get parent module of a submodule? By parent module I mean that if we have submodule Foo.Bar, then it’s parent module is…

---

## [How to compare two vectors whose elements are equal but their types are not the same?](https://discourse.julialang.org/t/how-to-compare-two-vectors-whose-elements-are-equal-but-their-types-are-not-the-same/94309)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 5\
**Last updated:** [February 9, 2023, 3:53pm UTC](https://discourse.julialang.org/t/how-to-compare-two-vectors-whose-elements-are-equal-but-their-types-are-not-the-same/94309 "2023-02-09T15:53:30Z")

</div>

Suppose we have two types, A and B, which are just two wrapper types of Vectors: struct A{T} \<: AbstractVector{T} data::Vector{T} end struct B{T} \<: AbstractVector{T} data::Vector{T} end Base.size(x::Union{A,B}) …

---

## [Plot multiple similar CSVs with AoG](https://discourse.julialang.org/t/plot-multiple-similar-csvs-with-aog/94279)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 12\
**Last updated:** [February 9, 2023, 3:23pm UTC](https://discourse.julialang.org/t/plot-multiple-similar-csvs-with-aog/94279 "2023-02-09T15:23:25Z")

</div>

I am loading multiple CSV files and want to plot them on top of each other, but I can’t figure out an easy way to change the line color and style to identify them in a legend. df1 = DataFrame("X Data" =\> 1:3, "Unused Da…

---

## [Macro to inherit fields from one type to another](https://discourse.julialang.org/t/macro-to-inherit-fields-from-one-type-to-another/94346)

<div class="topic-metadata">

**Author:** [@Kamath\_Laxminarayana](https://discourse.julialang.org/u/Kamath_Laxminarayana)\
**Replies:** 10\
**Last updated:** [February 9, 2023, 3:02pm UTC](https://discourse.julialang.org/t/macro-to-inherit-fields-from-one-type-to-another/94346 "2023-02-09T15:02:32Z")

</div>

Hi, I am very new to Julia . Unsurprisingly, I was irritated by the fact that fields are not inherited from a base struct to the other. I clearly know such inheritance is not always desired,. But in some cases, it become…

---

## [Github action recompiling everything everytime](https://discourse.julialang.org/t/github-action-recompiling-everything-everytime/94348)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 0\
**Last updated:** [February 9, 2023, 2:37pm UTC](https://discourse.julialang.org/t/github-action-recompiling-everything-everytime/94348 "2023-02-09T14:37:34Z")

</div>

Hey, i’m trying to run some Julia code on github action. I have a Project.toml and a Manifest.toml in the repo, and my main.jl file starts as: using Pkg Pkg.activate(".") Pkg.instantiate(verbose = true) using AllNeeded…

---

## [Weave.jl with texminted escapes LaTeX code](https://discourse.julialang.org/t/weave-jl-with-texminted-escapes-latex-code/91772)

<div class="topic-metadata">

**Author:** [@B1ochem1st](https://discourse.julialang.org/u/B1ochem1st)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 2:14pm UTC](https://discourse.julialang.org/t/weave-jl-with-texminted-escapes-latex-code/91772 "2023-02-09T14:14:00Z")

</div>

Hello, I am trying to start using Julia + LaTeX. I am familiar with R solution for integrating statistics into document typesetting with Sweave and have stumbled upon Weave.jl. For some reason, however, I am not getting…

---

## [How do I use an arugment to a function that is either a vector or a 1D view](https://discourse.julialang.org/t/how-do-i-use-an-arugment-to-a-function-that-is-either-a-vector-or-a-1d-view/94342)

<div class="topic-metadata">

**Author:** [@Thomas\_Van\_Giel](https://discourse.julialang.org/u/Thomas_Van_Giel)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 12:59pm UTC](https://discourse.julialang.org/t/how-do-i-use-an-arugment-to-a-function-that-is-either-a-vector-or-a-1d-view/94342 "2023-02-09T12:59:10Z")

</div>

I have a simulation which is given by a t x N matrix abundances\_timeseries, where t is the timestep and N the amount of variables. (This can for example be a 10^3 x 5 matrix). I want to check for oscillating behaviour b…

---

## [Improving performance for matrix assembly](https://discourse.julialang.org/t/improving-performance-for-matrix-assembly/94252)

<div class="topic-metadata">

**Author:** [@udax](https://discourse.julialang.org/u/udax)\
**Replies:** 20\
**Last updated:** [February 9, 2023, 12:29pm UTC](https://discourse.julialang.org/t/improving-performance-for-matrix-assembly/94252 "2023-02-09T12:29:34Z")

</div>

I have a working code for a large project in scientific computation. Compared to similar existing codes in C, the julia code is around 10 times slower, which is mostly likely due to me being new to Julia. I’ve tried prof…

---

## [Get SHIFT + ENTER run line on md files in VSCode](https://discourse.julialang.org/t/get-shift-enter-run-line-on-md-files-in-vscode/94328)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 10:08am UTC](https://discourse.julialang.org/t/get-shift-enter-run-line-on-md-files-in-vscode/94328 "2023-02-09T10:08:44Z")

</div>

I am in a project where text (markdown) matters more than code and I would like to work directly on the markdown file, so I can have its preview on the side. But I would also like to run Julia code that I put in blocks,…

---

## [Makie: Equally spaced ticks](https://discourse.julialang.org/t/makie-equally-spaced-ticks/94308)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 9:21am UTC](https://discourse.julialang.org/t/makie-equally-spaced-ticks/94308 "2023-02-09T09:21:11Z")

</div>

I can force the axis to be equally scaled via: ax = Axis(fig\[1, 1\], aspect=DataAspect()) But have not yet figured out, if there is an elegant way to have also equally spaced ticks on both axis. In plotly /PlotlyJS I c…

---

## [Statistical unit tests](https://discourse.julialang.org/t/statistical-unit-tests/94210)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 7\
**Last updated:** [February 9, 2023, 9:14am UTC](https://discourse.julialang.org/t/statistical-unit-tests/94210 "2023-02-09T09:14:40Z")

</div>

Are there macros for statistical unit tests for randomized algorithms? E.g., if I’d like to test the mean value of an algorithm over 100 runs, e.g… So a macro similar to @btime that would run the method many times and su…

---

## [How to plot the orientation of particles?](https://discourse.julialang.org/t/how-to-plot-the-orientation-of-particles/94262)

<div class="topic-metadata">

**Author:** [@Jyoti\_Sharma](https://discourse.julialang.org/u/Jyoti_Sharma)\
**Replies:** 10\
**Last updated:** [February 9, 2023, 8:47am UTC](https://discourse.julialang.org/t/how-to-plot-the-orientation-of-particles/94262 "2023-02-09T08:47:53Z")

</div>

Dear all, I am trying to plot the orientation of 2D Brownian particles. I have the x and y positions and the orientation of each particle. Given this, I have successfully plotted the x and y positions of the particles, …

---

## [Julia Bangkok Meetup](https://discourse.julialang.org/t/julia-bangkok-meetup/94326)

<div class="topic-metadata">

**Author:** [@tencnivel](https://discourse.julialang.org/u/tencnivel)\
**Replies:** 0\
**Last updated:** [February 9, 2023, 8:28am UTC](https://discourse.julialang.org/t/julia-bangkok-meetup/94326 "2023-02-09T08:28:39Z")

</div>

Hello Bangkok Julia enthusiasts! Would you be intetested to have a very informal meetup at Commons (Google Maps) next Wednesday (15th February), at lunch time?

---

## [Prerelease of new testing framework and test run UI in VS Code](https://discourse.julialang.org/t/prerelease-of-new-testing-framework-and-test-run-ui-in-vs-code/86355)

<div class="topic-metadata">

**Author:** [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Replies:** 53\
**Last updated:** [February 9, 2023, 6:24am UTC](https://discourse.julialang.org/t/prerelease-of-new-testing-framework-and-test-run-ui-in-vs-code/86355 "2023-02-09T06:24:23Z")

</div>

I just pushed out a new release of the Julia VS Code extension (1.7.6) to everyone that includes a preview of our new test UI and a general new testing framework for Julia. For a short demo, take a look at our Juliacon …

---

## [What does 1.8 in the following prediction depicts?](https://discourse.julialang.org/t/what-does-1-8-in-the-following-prediction-depicts/94324)

<div class="topic-metadata">

**Author:** [@Nobel\_Chowdary](https://discourse.julialang.org/u/Nobel_Chowdary)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 5:56am UTC](https://discourse.julialang.org/t/what-does-1-8-in-the-following-prediction-depicts/94324 "2023-02-09T05:56:46Z")

</div>

---

## [Kill a (distributed) child process](https://discourse.julialang.org/t/kill-a-distributed-child-process/94322)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 5:13am UTC](https://discourse.julialang.org/t/kill-a-distributed-child-process/94322 "2023-02-09T05:13:02Z")

</div>

Let’s say I’ve spawned a distributed process, and this process has made a particular ccall that, for whatever reason, refuses to die from a standard call to interrupt(). e.g. the following fails: using Distributed addp…

---

## ["ERROR: No backend available (GLMakie, CairoMakie, WGLMakie)!" when calling "abm\_video" in InteractiveDynamics.jl](https://discourse.julialang.org/t/error-no-backend-available-glmakie-cairomakie-wglmakie-when-calling-abm-video-in-interactivedynamics-jl/61626)

<div class="topic-metadata">

**Author:** [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Replies:** 1\
**Last updated:** [February 9, 2023, 4:26am UTC](https://discourse.julialang.org/t/error-no-backend-available-glmakie-cairomakie-wglmakie-when-calling-abm-video-in-interactivedynamics-jl/61626 "2023-02-09T04:26:33Z")

</div>

Hi, I’m a quite new Julia user. I’m currently trying to implement a simple gas model using Agents.jl. To do this, I’ve been following a couple of tutorials from the docs, namely Continouos Covid19 and Flocking. To show t…

---

## [Exceptions differentiated by the length of an array](https://discourse.julialang.org/t/exceptions-differentiated-by-the-length-of-an-array/94306)

<div class="topic-metadata">

**Author:** [@Matilopez06](https://discourse.julialang.org/u/Matilopez06)\
**Replies:** 4\
**Last updated:** [February 9, 2023, 2:39am UTC](https://discourse.julialang.org/t/exceptions-differentiated-by-the-length-of-an-array/94306 "2023-02-09T02:39:15Z")

</div>

Hello everyone, I wanted to ask a question. I am currently getting an array of doubles containing matrix = \[magnitudes ; angles\] where I have different cases (separated by spaces and “;”): case 1: \[X1 X2; angle\_x1 ang…

---

## [Julia for electric utility regulatory intervention in Georgia (US state) for Integrated Resource Planning](https://discourse.julialang.org/t/julia-for-electric-utility-regulatory-intervention-in-georgia-us-state-for-integrated-resource-planning/94022)

<div class="topic-metadata">

**Author:** [@phubbard](https://discourse.julialang.org/u/phubbard)\
**Replies:** 4\
**Last updated:** [February 9, 2023, 1:53am UTC](https://discourse.julialang.org/t/julia-for-electric-utility-regulatory-intervention-in-georgia-us-state-for-integrated-resource-planning/94022 "2023-02-09T01:53:38Z")

</div>

I am seeking a Julia user who could help with the GenX software package. My goal is to work with a savvy user to develop an alternative Integrated Resource Plan (IRP) for an important Investor-Owned-Utility in the US Sou…

---

## [Piecewise-constant fitting](https://discourse.julialang.org/t/piecewise-constant-fitting/94091)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 21\
**Last updated:** [February 9, 2023, 12:40am UTC](https://discourse.julialang.org/t/piecewise-constant-fitting/94091 "2023-02-09T00:40:42Z")

</div>

Is there an example or a Julia package for piecewise-constant fitting of 1D series? See a Matlab example of expected results here. Thanks.

---

## [Plot inside a function?](https://discourse.julialang.org/t/plot-inside-a-function/31297)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 5\
**Last updated:** [February 8, 2023, 11:14pm UTC](https://discourse.julialang.org/t/plot-inside-a-function/31297 "2023-02-08T23:14:13Z")

</div>

function f() Plots.plot(1:20) end function g() Plots.plot(1:20) return 1.0 end in the above, calling f() would produce a plot, however, calling g() does NOT. Why? and how to fix it? thanks.

---

## [WebSocket Heartbeat](https://discourse.julialang.org/t/websocket-heartbeat/54291)

<div class="topic-metadata">

**Author:** [@MasFlam](https://discourse.julialang.org/u/MasFlam)\
**Replies:** 2\
**Last updated:** [February 8, 2023, 10:41pm UTC](https://discourse.julialang.org/t/websocket-heartbeat/54291 "2023-02-08T22:41:05Z")

</div>

The websockets Discord API expects clients to send a “heartbeat” every X milliseconds (it’s around a minute) to keep the connection alive. How can I (using WebSockets.jl or the HTTP.WebSockets module) send a websocket me…

---

## [Hashing Method Cache IDs](https://discourse.julialang.org/t/hashing-method-cache-ids/94239)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 4\
**Last updated:** [February 8, 2023, 9:48pm UTC](https://discourse.julialang.org/t/hashing-method-cache-ids/94239 "2023-02-08T21:48:06Z")

</div>

Disclosure at the top, I’m asking a question here that is out of my depth, but I keep thinking about it and would really appreciate the thoughts of smart folks. A while back, I watched this Strange Loop Talk on Unison, …

---

## [GLMakie: figure does not change](https://discourse.julialang.org/t/glmakie-figure-does-not-change/94277)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 4\
**Last updated:** [February 8, 2023, 8:13pm UTC](https://discourse.julialang.org/t/glmakie-figure-does-not-change/94277 "2023-02-08T20:13:30Z")

</div>

Hi, I do not manage to make my fig interactive, below a simplified version of my initial script. Any idea what is missing? using GLMakie x\_ = 0:0.01:8π obs\_ = \[Observable(0.0) for s in 1:3\] function example\_func(\_x, …

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

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