# Latest

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

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

**Page:** 166

---

## [Remove the soft scope altogether and make it global](https://discourse.julialang.org/t/remove-the-soft-scope-altogether-and-make-it-global/33333)

<div class="topic-metadata">

**Author:** [@Wenjie](https://discourse.julialang.org/u/Wenjie)\
**Replies:** 49\
**Last updated:** [May 17, 2025, 5:03am UTC](https://discourse.julialang.org/t/remove-the-soft-scope-altogether-and-make-it-global/33333 "2025-05-17T05:03:15Z")

</div>

I see that the Julia community are currently debating on the new scope rules in v1.0, in an attempt to return to the deprecated soft/hard local scopes in v0.6. In my opinion, neither solution is ideal. Here, let me give …

---

## [Scope in functions](https://discourse.julialang.org/t/scope-in-functions/22096)

<div class="topic-metadata">

**Author:** [@alee](https://discourse.julialang.org/u/alee)\
**Replies:** 13\
**Last updated:** [May 17, 2025, 4:28am UTC](https://discourse.julialang.org/t/scope-in-functions/22096 "2025-05-17T04:28:40Z")

</div>

One of my collaborators found the following behaviour confusing. function foo() function bar() x = 3 return x end x = 1 bar() return x end foo() which outputs 3 (and not 1). This behaviour is differe…

---

## [Global scope confusion again](https://discourse.julialang.org/t/global-scope-confusion-again/20044)

<div class="topic-metadata">

**Author:** [@Paul](https://discourse.julialang.org/u/Paul)\
**Replies:** 52\
**Last updated:** [May 17, 2025, 4:13am UTC](https://discourse.julialang.org/t/global-scope-confusion-again/20044 "2025-05-17T04:13:28Z")

</div>

This code runs in JuliaBox (0.6.4), but running the code in JuliaPro on OSX Mojave the same code (cut and pasted) returns an error message (undefined variable a). I have the same problem both on my MacMini and my MacBook…

---

## [Why does runtime dispatch allocate when the return type is inferred?](https://discourse.julialang.org/t/why-does-runtime-dispatch-allocate-when-the-return-type-is-inferred/129061)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 5\
**Last updated:** [May 17, 2025, 2:00am UTC](https://discourse.julialang.org/t/why-does-runtime-dispatch-allocate-when-the-return-type-is-inferred/129061 "2025-05-17T02:00:25Z")

</div>

The usual explanation for why runtime dispatches allocate is that falling back to inferring ::Any for the return type requires boxing the instance at runtime. Thing is, there seems to be a workaround. If the compiler kno…

---

## [Animated simulation in GLMakie, launched from interface](https://discourse.julialang.org/t/animated-simulation-in-glmakie-launched-from-interface/129077)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 2\
**Last updated:** [May 17, 2025, 12:48am UTC](https://discourse.julialang.org/t/animated-simulation-in-glmakie-launched-from-interface/129077 "2025-05-17T00:48:30Z")

</div>

I’m developing an educational tool where the student will follow a chemical reaction. The tool starts with this interface: When the student clicks Run, a cool animations (should) start, particles start bouncing and r…

---

## [Gurobi12 reports obj\_value \< obj\_bound in a Min-Program?](https://discourse.julialang.org/t/gurobi12-reports-obj-value-obj-bound-in-a-min-program/126849)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 17\
**Last updated:** [May 11, 2025, 3:00pm UTC](https://discourse.julialang.org/t/gurobi12-reports-obj-value-obj-bound-in-a-min-program/126849 "2025-05-11T15:00:58Z")

</div>

See the comments at the bottom of this code. import JuMP, Gurobi CR = JuMP.Model(() -\> Gurobi.Optimizer()) JuMP.@variable(CR, x\[1:3\]) JuMP.set\_lower\_bound(x\[1\], exp(1)); JuMP.set\_upper\_bound(x\[1\], exp(2)) JuMP.set\_lower…

---

## [Universal Differential Equations while also estimating non NN parameters](https://discourse.julialang.org/t/universal-differential-equations-while-also-estimating-non-nn-parameters/129075)

<div class="topic-metadata">

**Author:** [@donkeysaddle](https://discourse.julialang.org/u/donkeysaddle)\
**Replies:** 1\
**Last updated:** [May 16, 2025, 8:18pm UTC](https://discourse.julialang.org/t/universal-differential-equations-while-also-estimating-non-nn-parameters/129075 "2025-05-16T20:18:34Z")

</div>

I have been using the the tutorial on Automatically Discover Missing Physics by Embedding Machine Learning into Differential Equations as a textbook to build my ODEs with embedded NN’s (It’s awesome). I also want to opti…

---

## [Issue with Optimization.LBFGS](https://discourse.julialang.org/t/issue-with-optimization-lbfgs/129076)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 1\
**Last updated:** [May 16, 2025, 8:14pm UTC](https://discourse.julialang.org/t/issue-with-optimization-lbfgs/129076 "2025-05-16T20:14:50Z")

</div>

Hi there, Disclaimer: I can not share the actual data or objective function so this might be a long shot but maybe the error itself has enough information. I am trying to optimize a function g with non-linear constrain…

---

## [Struggling with LibSndFile.jl, WAV.jl outputs slightly non-standard 24bit PCM files](https://discourse.julialang.org/t/struggling-with-libsndfile-jl-wav-jl-outputs-slightly-non-standard-24bit-pcm-files/129044)

<div class="topic-metadata">

**Author:** [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)\
**Replies:** 11\
**Last updated:** [May 16, 2025, 4:50pm UTC](https://discourse.julialang.org/t/struggling-with-libsndfile-jl-wav-jl-outputs-slightly-non-standard-24bit-pcm-files/129044 "2025-05-16T16:50:14Z")

</div>

I’m struggling with loading a wav file using LibSndFile.jl julia\> using FileIO: load, save, loadstreaming, savestreaming julia\> import LibSndFile julia\> x = load("JolieHollandSacha.wav") (\[0.0 0.0; 0.0 0.0; … ; 0.0 0.…

---

## [How to embed expert knowledge /constraints in ML training?](https://discourse.julialang.org/t/how-to-embed-expert-knowledge-constraints-in-ml-training/129025)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 11\
**Last updated:** [May 16, 2025, 2:34pm UTC](https://discourse.julialang.org/t/how-to-embed-expert-knowledge-constraints-in-ml-training/129025 "2025-05-16T14:34:00Z")

</div>

I want to train a model to predict the timber volume growth in a forest as a function of pedological/site variables and climatic data. So, I have something like this: ip\_point X Y vol vol\_growth sand\_pc soil\_depth p…

---

## [How to circumvent Intel's AMD discrimination in MKL from v1.7 onwards?](https://discourse.julialang.org/t/how-to-circumvent-intels-amd-discrimination-in-mkl-from-v1-7-onwards/105075)

<div class="topic-metadata">

**Author:** [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Replies:** 2\
**Last updated:** [May 16, 2025, 3:55pm UTC](https://discourse.julialang.org/t/how-to-circumvent-intels-amd-discrimination-in-mkl-from-v1-7-onwards/105075 "2025-05-16T15:55:32Z")

</div>

Hi everyone, I’ve been ending up having to compute a lot of large dense non-hermitian eigenproblems on an HPC cluster that uses AMD EPYC Milan CPUs. I thought I could use Intel MKL, since it usually does a better job fo…

---

## [Linear interpolation given a triangulation in arbitrary dimensions](https://discourse.julialang.org/t/linear-interpolation-given-a-triangulation-in-arbitrary-dimensions/128998)

<div class="topic-metadata">

**Author:** [@Pablo\_Marchant](https://discourse.julialang.org/u/Pablo_Marchant)\
**Replies:** 9\
**Last updated:** [May 16, 2025, 2:15pm UTC](https://discourse.julialang.org/t/linear-interpolation-given-a-triangulation-in-arbitrary-dimensions/128998 "2025-05-16T14:15:05Z")

</div>

Hi all, I’m in need of the equivalent of LinearNDInterpolator in scipy for julia, in order to do interpolation of irregularly sampled points (not on a grid). There are existing packages such as NaturalNeighbours.jl, but…

---

## [New on Forem: “Julia expertise needed at the University of Glasgow"](https://discourse.julialang.org/t/new-on-forem-julia-expertise-needed-at-the-university-of-glasgow/129064)

<div class="topic-metadata">

**Author:** [@oheil](https://discourse.julialang.org/u/oheil)\
**Replies:** 0\
**Last updated:** [May 16, 2025, 1:27pm UTC](https://discourse.julialang.org/t/new-on-forem-julia-expertise-needed-at-the-university-of-glasgow/129064 "2025-05-16T13:27:25Z")

</div>

Eric Silverman needs Julia expertise at the University of Glasgow: Hopefully you are the one!

---

## [What is the advantage of "foreach(v) do.." over "for i in v..."?](https://discourse.julialang.org/t/what-is-the-advantage-of-foreach-v-do-over-for-i-in-v/129007)

<div class="topic-metadata">

**Author:** [@Leon\_Niceday](https://discourse.julialang.org/u/Leon_Niceday)\
**Replies:** 12\
**Last updated:** [May 16, 2025, 1:15pm UTC](https://discourse.julialang.org/t/what-is-the-advantage-of-foreach-v-do-over-for-i-in-v/129007 "2025-05-16T13:15:57Z")

</div>

This julia\> let t = 0 for x in v t += x end t end vs julia\> let t = 0 foreach(v) do x t += x end t end It …

---

## [Why is there no Regex Delim option in CSV.jl?](https://discourse.julialang.org/t/why-is-there-no-regex-delim-option-in-csv-jl/129062)

<div class="topic-metadata">

**Author:** [@consumere](https://discourse.julialang.org/u/consumere)\
**Replies:** 1\
**Last updated:** [May 16, 2025, 12:48pm UTC](https://discourse.julialang.org/t/why-is-there-no-regex-delim-option-in-csv-jl/129062 "2025-05-16T12:48:36Z")

</div>

I regularly ask myself why this is not implemented. CSV.read(filepath, DataFrame; delim="\\s+") i know that this works. CSV.read(filepath, DataFrame; delim=" ",stripwhitespace=true,ignorerepeated=true) and yes, it is …

---

## [How to get type stability across methods?](https://discourse.julialang.org/t/how-to-get-type-stability-across-methods/129046)

<div class="topic-metadata">

**Author:** [@akriegman](https://discourse.julialang.org/u/akriegman)\
**Replies:** 9\
**Last updated:** [May 16, 2025, 6:17am UTC](https://discourse.julialang.org/t/how-to-get-type-stability-across-methods/129046 "2025-05-16T06:17:11Z")

</div>

I have a program where I want to dynamically choose a function from a list and have the result be type stable. All the methods involved do return the same type, but it appears that past a certain number of methods the ty…

---

## [How to rotate mesh using observables in Makie?](https://discourse.julialang.org/t/how-to-rotate-mesh-using-observables-in-makie/129047)

<div class="topic-metadata">

**Author:** [@jmo](https://discourse.julialang.org/u/jmo)\
**Replies:** 3\
**Last updated:** [May 16, 2025, 12:03pm UTC](https://discourse.julialang.org/t/how-to-rotate-mesh-using-observables-in-makie/129047 "2025-05-16T12:03:59Z")

</div>

My aim is to rotate/translate a few objects (STL) in 3D visualizing a running simulation. And Makie seems to be the way to do it. I started simple with just trying to rotate a cube using an observable updated every 100 …

---

## [How to Minimize Operator/Spectral Norm of a Density Matrix with JuMP + Hypatia](https://discourse.julialang.org/t/how-to-minimize-operator-spectral-norm-of-a-density-matrix-with-jump-hypatia/129006)

<div class="topic-metadata">

**Author:** [@Menixm](https://discourse.julialang.org/u/Menixm)\
**Replies:** 7\
**Last updated:** [May 16, 2025, 11:57am UTC](https://discourse.julialang.org/t/how-to-minimize-operator-spectral-norm-of-a-density-matrix-with-jump-hypatia/129006 "2025-05-16T11:57:05Z")

</div>

I am coming from MATLAB/Python but Julia is becoming more attractive, especially for higher precision. Currently I am just trying out some toy problems to familiarize myself with Julia, JuMP, and associated solvers. I a…

---

## [How to keep additional info from time evolution in OrdinaryDiffEq.jl?](https://discourse.julialang.org/t/how-to-keep-additional-info-from-time-evolution-in-ordinarydiffeq-jl/129060)

<div class="topic-metadata">

**Author:** [@svretina](https://discourse.julialang.org/u/svretina)\
**Replies:** 1\
**Last updated:** [May 16, 2025, 10:21am UTC](https://discourse.julialang.org/t/how-to-keep-additional-info-from-time-evolution-in-ordinarydiffeq-jl/129060 "2025-05-16T10:21:37Z")

</div>

I am evolving a statevector U and in my rhs function I return the dU vector. How can I keep the dU values to access after the time evolution? for example you have positiona and velocity in your statevector U = \[x,v\] t…

---

## [Having a component whose equations refer another component](https://discourse.julialang.org/t/having-a-component-whose-equations-refer-another-component/128952)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 2\
**Last updated:** [May 16, 2025, 8:41am UTC](https://discourse.julialang.org/t/having-a-component-whose-equations-refer-another-component/128952 "2025-05-16T08:41:33Z")

</div>

I have two components in ModelingToolkit.jl, and I want to have an equation across components, such as comp1.x ~ comp2.y. But I’d like that equation to only be there when Comp2() is used (I have an alternative GooeyComp2…

---

## [Fx: a (micro)blogging server with Git backups and syntax highlighting](https://discourse.julialang.org/t/fx-a-micro-blogging-server-with-git-backups-and-syntax-highlighting/129059)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 0\
**Last updated:** [May 16, 2025, 8:57am UTC](https://discourse.julialang.org/t/fx-a-micro-blogging-server-with-git-backups-and-syntax-highlighting/129059 "2025-05-16T08:57:09Z")

</div>

For about 4 years, I have always been running my own blog via Franklin.jl. It has been great. Franklin is a very good piece of software if you ask me, so I have no complaints about that. My only issue was that I noticed …

---

## [New on Forem: "Convex hull of a Cartesian product"](https://discourse.julialang.org/t/new-on-forem-convex-hull-of-a-cartesian-product/129057)

<div class="topic-metadata">

**Author:** [@oheil](https://discourse.julialang.org/u/oheil)\
**Replies:** 1\
**Last updated:** [May 16, 2025, 8:06am UTC](https://discourse.julialang.org/t/new-on-forem-convex-hull-of-a-cartesian-product/129057 "2025-05-16T08:06:06Z")

</div>

@WalterMadelim proofs a proposition on convex hull for us on forem: You may find it interesting.

---

## [JuliaCon Local Paris - extended deadline, keynotes, tickets and more](https://discourse.julialang.org/t/juliacon-local-paris-extended-deadline-keynotes-tickets-and-more/129056)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 0\
**Last updated:** [May 16, 2025, 5:56am UTC](https://discourse.julialang.org/t/juliacon-local-paris-extended-deadline-keynotes-tickets-and-more/129056 "2025-05-16T05:56:18Z")

</div>

Hi everyone, We have some news to share about JuliaCon Local Paris 2025 :france:, and we hope you’ll be as excited as we are! Call for Proposals :scroll: In light of the surge of enthusiasm observed in recent days, we …

---

## [Online talk – The Design of Turing.jl](https://discourse.julialang.org/t/online-talk-the-design-of-turing-jl/128928)

<div class="topic-metadata">

**Author:** [@simonsteiger](https://discourse.julialang.org/u/simonsteiger)\
**Replies:** 3\
**Last updated:** [May 16, 2025, 5:53am UTC](https://discourse.julialang.org/t/online-talk-the-design-of-turing-jl/128928 "2025-05-16T05:53:09Z")

</div>

Hi again, We’re happy to announce that there’ll be yet another online talk on Turing.jl as part of Karolinska Institutet’s Learn Bayes Methods Week this Thursday, May 15, 13:00-14:00 Stockholm time! @penelopeysm will t…

---

## [Makie Draw on Colorbar](https://discourse.julialang.org/t/makie-draw-on-colorbar/128982)

<div class="topic-metadata">

**Author:** [@andrew-saydjari](https://discourse.julialang.org/u/andrew-saydjari)\
**Replies:** 6\
**Last updated:** [May 15, 2025, 10:15pm UTC](https://discourse.julialang.org/t/makie-draw-on-colorbar/128982 "2025-05-15T22:15:44Z")

</div>

I have been struggling to find the syntax for drawing a line on a color bar using CairoMakie. I just want to be able to get the colorbar axis and do something like hlines!(cbar.axis. 5, color=“red”).

---

## [Unbound type parameters detected in Union{Missing,T}](https://discourse.julialang.org/t/unbound-type-parameters-detected-in-union-missing-t/129042)

<div class="topic-metadata">

**Author:** [@FerreolS](https://discourse.julialang.org/u/FerreolS)\
**Replies:** 9\
**Last updated:** [May 15, 2025, 8:12pm UTC](https://discourse.julialang.org/t/unbound-type-parameters-detected-in-union-missing-t/129042 "2025-05-15T20:12:47Z")

</div>

Hi, Aqua.jl complains about Unbound type parameters detected in the following MWE: julia\> module mymod function foo(x::AbstractArray{\<:Union{T,Missing}}) where {T\<:Real} m = .!ismissing.(x) .&&…

---

## [Precompiling error with DifferentialEquations](https://discourse.julialang.org/t/precompiling-error-with-differentialequations/127848)

<div class="topic-metadata">

**Author:** [@a\_will](https://discourse.julialang.org/u/a_will)\
**Replies:** 19\
**Last updated:** [May 15, 2025, 6:15pm UTC](https://discourse.julialang.org/t/precompiling-error-with-differentialequations/127848 "2025-05-15T18:15:19Z")

</div>

Hello, I am very new to Julia and I’ve been struggling with a problem since DifferentialEquations got updated. My code was working but now several dependencies that I need will not precompile, and my code won’t execute …

---

## [Datatypes SIMD by default? (as in Mojo)](https://discourse.julialang.org/t/datatypes-simd-by-default-as-in-mojo/128777)

<div class="topic-metadata">

**Author:** [@alexandergunnarson](https://discourse.julialang.org/u/alexandergunnarson)\
**Replies:** 14\
**Last updated:** [May 15, 2025, 4:40pm UTC](https://discourse.julialang.org/t/datatypes-simd-by-default-as-in-mojo/128777 "2025-05-15T16:40:22Z")

</div>

Hello all! Super excited to use Julia. It won out in a lengthy evaluation of mine against Rust, “modern” C++ (\>= C++23), modern Java (\>= Java 24), Mojo, etc. as the basis of my startup’s backend. Thank you to all who hav…

---

## [Multi Dimension Interpolation with Unitful](https://discourse.julialang.org/t/multi-dimension-interpolation-with-unitful/129043)

<div class="topic-metadata">

**Author:** [@luke-pikaart](https://discourse.julialang.org/u/luke-pikaart)\
**Replies:** 2\
**Last updated:** [May 15, 2025, 4:35pm UTC](https://discourse.julialang.org/t/multi-dimension-interpolation-with-unitful/129043 "2025-05-15T16:35:48Z")

</div>

I am trying to interpolate f : \\mathbb{R\_{units}} \\to \\mathbb{R\_{units}}^3 where there are unitful units on both the grid and the data. I found this example that showed me how to get f : \\mathbb{R} \\to \\mathbb{R}^3 in…

---

## [Does DuckDB not allow multiple connections?](https://discourse.julialang.org/t/does-duckdb-not-allow-multiple-connections/128856)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 3\
**Last updated:** [May 15, 2025, 3:27pm UTC](https://discourse.julialang.org/t/does-duckdb-not-allow-multiple-connections/128856 "2025-05-15T15:27:05Z")

</div>

Hi all. Just curious if I am able to do something like the following MWE. I want to have 2 connections to a relational DB, one of which I can use for R/W and one which is read-only. The read only one I’d like to use FunS…

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

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