# Latest

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

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

**Page:** 240

---

## [Blacklisting a type from being captured in functions](https://discourse.julialang.org/t/blacklisting-a-type-from-being-captured-in-functions/124684)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 12\
**Last updated:** [January 12, 2025, 3:42pm UTC](https://discourse.julialang.org/t/blacklisting-a-type-from-being-captured-in-functions/124684 "2025-01-12T15:42:25Z")

</div>

In support of BorrowChecker.jl I am trying to figure out if there’s a way I can throw an error if an instance of a particular type gets captured in a function. For example, if I have a type struct NoCapture{T} x::T…

---

## [Using Multivariate Posterior Samples as Prior in Julia’s Turing for MCMC](https://discourse.julialang.org/t/using-multivariate-posterior-samples-as-prior-in-julia-s-turing-for-mcmc/124698)

<div class="topic-metadata">

**Author:** [@hinata235](https://discourse.julialang.org/u/hinata235)\
**Replies:** 0\
**Last updated:** [January 12, 2025, 2:59pm UTC](https://discourse.julialang.org/t/using-multivariate-posterior-samples-as-prior-in-julia-s-turing-for-mcmc/124698 "2025-01-12T14:59:11Z")

</div>

Question: I would like to use posterior distribution samples obtained via MCMC for multivariate parameters of a certain model as the prior distribution when running MCMC on another dataset. Currently, for the univariat…

---

## [How to Use a Distribution Estimated via Kernel Density Estimation (KDE) as a Prior in Turing.jl](https://discourse.julialang.org/t/how-to-use-a-distribution-estimated-via-kernel-density-estimation-kde-as-a-prior-in-turing-jl/124504)

<div class="topic-metadata">

**Author:** [@hinata235](https://discourse.julialang.org/u/hinata235)\
**Replies:** 4\
**Last updated:** [January 12, 2025, 2:02pm UTC](https://discourse.julialang.org/t/how-to-use-a-distribution-estimated-via-kernel-density-estimation-kde-as-a-prior-in-turing-jl/124504 "2025-01-12T14:02:49Z")

</div>

Background and Goal I have a set of discrete samples (e.g., from some existing dataset or posterior). I estimated a continuous distribution from these samples using a kernel density estimation (KDE) approach (such as vi…

---

## [How to save a figure with a button in GLMakie?](https://discourse.julialang.org/t/how-to-save-a-figure-with-a-button-in-glmakie/124679)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [January 12, 2025, 9:25am UTC](https://discourse.julialang.org/t/how-to-save-a-figure-with-a-button-in-glmakie/124679 "2025-01-12T09:25:57Z")

</div>

I have a figure made with GLMakie, I can add button, but I don’t know how to link an action – namely saving the figure – to the button. I have this example: using GLMakie xs = range(0, 10, length = 30) ys = 0.5 .\* sin…

---

## [JLD and package extensions](https://discourse.julialang.org/t/jld-and-package-extensions/124656)

<div class="topic-metadata">

**Author:** [@GHTaarn](https://discourse.julialang.org/u/GHTaarn)\
**Replies:** 2\
**Last updated:** [January 12, 2025, 8:05am UTC](https://discourse.julialang.org/t/jld-and-package-extensions/124656 "2025-01-12T08:05:46Z")

</div>

I would like to make a package extension that loads if JLD.jl is loaded. I got the code below to work in the REPL, but when I make Abc the main package and JLDExt the extension (and remove the dots in front of the packag…

---

## [In-place broadcasting for a specific function](https://discourse.julialang.org/t/in-place-broadcasting-for-a-specific-function/124680)

<div class="topic-metadata">

**Author:** [@arnaud-ma](https://discourse.julialang.org/u/arnaud-ma)\
**Replies:** 8\
**Last updated:** [January 12, 2025, 3:40am UTC](https://discourse.julialang.org/t/in-place-broadcasting-for-a-specific-function/124680 "2025-01-12T03:40:03Z")

</div>

My code is as follows: function get\_foo(x, y, args...) # specific algorithm that modifies x and y... return x + y end function gen\_foo!(A::AbstractMatrix, args...) # is equivalent to: for coord in Carte…

---

## [Why are concatenated String15's promoted to String31?](https://discourse.julialang.org/t/why-are-concatenated-string15s-promoted-to-string31/124686)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 2\
**Last updated:** [January 12, 2025, 12:27am UTC](https://discourse.julialang.org/t/why-are-concatenated-string15s-promoted-to-string31/124686 "2025-01-12T00:27:11Z")

</div>

I found this bug (I guess it is mine) when trying to @reset an element of an SVector{String15} after updating Accessors from 0.1.38 to 0.1.39, but not sure why it used to work. MWE: julia\> using InlineStrings julia\> x…

---

## [Unexpected struct size on aarch64 (macOS M)](https://discourse.julialang.org/t/unexpected-struct-size-on-aarch64-macos-m/124608)

<div class="topic-metadata">

**Author:** [@Cees\_de\_Groot](https://discourse.julialang.org/u/Cees_de_Groot)\
**Replies:** 4\
**Last updated:** [January 11, 2025, 11:06pm UTC](https://discourse.julialang.org/t/unexpected-struct-size-on-aarch64-macos-m/124608 "2025-01-11T23:06:40Z")

</div>

(see also Startup issue on recent macOS on M3 · Issue #29 · felipenoris/Oracle.jl · GitHub) We’d like to use Oracle.jl for a project and the initial port went fine, until someone wanted to run things on their macbook. T…

---

## [Joining on a DataFrame on an argument and column](https://discourse.julialang.org/t/joining-on-a-dataframe-on-an-argument-and-column/124613)

<div class="topic-metadata">

**Author:** [@Snowy](https://discourse.julialang.org/u/Snowy)\
**Replies:** 3\
**Last updated:** [January 11, 2025, 9:33pm UTC](https://discourse.julialang.org/t/joining-on-a-dataframe-on-an-argument-and-column/124613 "2025-01-11T21:33:07Z")

</div>

Hello, Is it possible to join DataFrames on an argument and a column header? E.g.: New\_DF = innerjoin(DF1,DF2, on = ID =\> :Store\_ID) where “ID” is an argument of a function and “:Store\_ID” is a specific column within …

---

## [How to add button to GLMakie plot?](https://discourse.julialang.org/t/how-to-add-button-to-glmakie-plot/124649)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [January 11, 2025, 5:02pm UTC](https://discourse.julialang.org/t/how-to-add-button-to-glmakie-plot/124649 "2025-01-11T17:02:28Z")

</div>

I would like to add a button to a plot made with GLMakie; it looks straightforward but I get an error: julia\> using GLMakie julia\> xs = range(0, 10, length = 30) 0.0:0.3448275862068966:10.0 julia\> ys = 0.5 .\* sin.(xs)…

---

## [SQL and Macros](https://discourse.julialang.org/t/sql-and-macros/124673)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 1\
**Last updated:** [January 11, 2025, 3:59pm UTC](https://discourse.julialang.org/t/sql-and-macros/124673 "2025-01-11T15:59:21Z")

</div>

I have the following script that runs fine: using DuckDB using DBInterface using DataFrames # Global connection variable for reuse const duckdb\_connection = Ref{Union{DuckDB.DB, Nothing}}(nothing) # Function to manage…

---

## [Determine whether a project has been instantiated](https://discourse.julialang.org/t/determine-whether-a-project-has-been-instantiated/124652)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 6\
**Last updated:** [January 11, 2025, 3:22pm UTC](https://discourse.julialang.org/t/determine-whether-a-project-has-been-instantiated/124652 "2025-01-11T15:22:55Z")

</div>

Is it possible to determine whether a given folder containing a Julia project has been instantiated? The folder is unrelated to the julia process where I want to do this, i.e., I’m not trying to figure out whether the cu…

---

## [Truncated power series in ApproxFun.jl](https://discourse.julialang.org/t/truncated-power-series-in-approxfun-jl/124593)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 10\
**Last updated:** [January 11, 2025, 1:09pm UTC](https://discourse.julialang.org/t/truncated-power-series-in-approxfun-jl/124593 "2025-01-11T13:09:04Z")

</div>

I gave ApproxFun.jl another look. As far as I can see, polynomials of truncated power series in ApproxFun.jl (requires for e.g. the Duffing equation) are poorly documented. Do I overlook something?

---

## [Unexpected broadcasting behaviour (?)](https://discourse.julialang.org/t/unexpected-broadcasting-behaviour/124670)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 2\
**Last updated:** [January 11, 2025, 12:36pm UTC](https://discourse.julialang.org/t/unexpected-broadcasting-behaviour/124670 "2025-01-11T12:36:57Z")

</div>

Hi I was wondering if the MWE below yields the expected behaviour. Why is the result not symmetric? I would have expected symmetric resulting arrays sizes from this. Cheers! let b = ones(3, 4) a = ones(1, 2…

---

## [Product of probability distribution and nonrandom function](https://discourse.julialang.org/t/product-of-probability-distribution-and-nonrandom-function/124622)

<div class="topic-metadata">

**Author:** [@rand5](https://discourse.julialang.org/u/rand5)\
**Replies:** 0\
**Last updated:** [January 10, 2025, 4:49am UTC](https://discourse.julialang.org/t/product-of-probability-distribution-and-nonrandom-function/124622 "2025-01-10T04:49:40Z")

</div>

I have a probability distribution, e.g. Y = Normal() and would like to scale the distribution (updating its pdf, cdf, etc.) by a nonrandom function, say f(x) = cdf(Normal(1,2),x). Is there a way to do this and have the …

---

## [Kelly Criterion (Part 1)](https://discourse.julialang.org/t/kelly-criterion-part-1/124661)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 1\
**Last updated:** [January 11, 2025, 8:44am UTC](https://discourse.julialang.org/t/kelly-criterion-part-1/124661 "2025-01-11T08:44:07Z")

</div>

Kelly Criterion (House of the Rising Sum) https://en.wikipedia.org/wiki/Kelly\_criterion There is a criterion in Mathematics They call the Rising Sum And it's been the ruin of many a poor investors Dear God, I know I was…

---

## [Weird problem. Two runs of the same code and the second run takes forever and gobbles up memory](https://discourse.julialang.org/t/weird-problem-two-runs-of-the-same-code-and-the-second-run-takes-forever-and-gobbles-up-memory/124654)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 4\
**Last updated:** [January 11, 2025, 7:07am UTC](https://discourse.julialang.org/t/weird-problem-two-runs-of-the-same-code-and-the-second-run-takes-forever-and-gobbles-up-memory/124654 "2025-01-11T07:07:58Z")

</div>

I’m facing a weird problem and I have no clue where to start looking. I’m running some economic simulations and since I made the agent creation type safe (eliminated the warning that the types of the agent were not defi…

---

## [MadNLPGPU with cuDSS and other linear solvers](https://discourse.julialang.org/t/madnlpgpu-with-cudss-and-other-linear-solvers/124558)

<div class="topic-metadata">

**Author:** [@gangway](https://discourse.julialang.org/u/gangway)\
**Replies:** 4\
**Last updated:** [January 9, 2025, 11:55pm UTC](https://discourse.julialang.org/t/madnlpgpu-with-cudss-and-other-linear-solvers/124558 "2025-01-09T23:55:12Z")

</div>

Trying to solve nonlinear JuMP models with MadNLP.Optimizer(linear\_solver=CUDSSSolver). I have added MadNLP, MadNLPGPU, CUDSS, and CUDSS\_jll. While activating project, I keep getting warning for circular dependencies. …

---

## [Memory Errors at Julia-C interface and Safe Pointer Usage](https://discourse.julialang.org/t/memory-errors-at-julia-c-interface-and-safe-pointer-usage/124484)

<div class="topic-metadata">

**Author:** [@luke-kiernan](https://discourse.julialang.org/u/luke-kiernan)\
**Replies:** 13\
**Last updated:** [January 10, 2025, 11:27pm UTC](https://discourse.julialang.org/t/memory-errors-at-julia-c-interface-and-safe-pointer-usage/124484 "2025-01-10T23:27:09Z")

</div>

I have a snippet of code that runs just fine in C, but when I try to make the same code work in Julia, I get memory errors: either Illegal instruction or Segmentation fault. It’s a part of a larger project, creating a Ju…

---

## [Reverse dependencies of a package?](https://discourse.julialang.org/t/reverse-dependencies-of-a-package/9774)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 11\
**Last updated:** [January 10, 2025, 11:31pm UTC](https://discourse.julialang.org/t/reverse-dependencies-of-a-package/9774 "2025-01-10T23:31:49Z")

</div>

Are there existing tools for evaluating the reverse dependencies of a package? That is, for determining the packages that depend directly or indirectly on a particular package? It occurred to me that, if not, this migh…

---

## [Modifying time in sol after solve() function using DifferentialEquations.jl](https://discourse.julialang.org/t/modifying-time-in-sol-after-solve-function-using-differentialequations-jl/124647)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 4\
**Last updated:** [January 10, 2025, 10:24pm UTC](https://discourse.julialang.org/t/modifying-time-in-sol-after-solve-function-using-differentialequations-jl/124647 "2025-01-10T22:24:49Z")

</div>

Hi, I was wondering, using DifferentialEquations.jl (and co), if there is an easy way to modify the t in sol object after it is output and to synchronise it with the interpolation? I have tried to simply modify it with…

---

## [Package compatibility and environment issues with respect to new version](https://discourse.julialang.org/t/package-compatibility-and-environment-issues-with-respect-to-new-version/124580)

<div class="topic-metadata">

**Author:** [@Vegetasan](https://discourse.julialang.org/u/Vegetasan)\
**Replies:** 4\
**Last updated:** [January 10, 2025, 7:48pm UTC](https://discourse.julialang.org/t/package-compatibility-and-environment-issues-with-respect-to-new-version/124580 "2025-01-10T19:48:11Z")

</div>

Hello all, I have been using Julia (v1.9.3) in JupyterLab through the Anaconda distribution, and all my projects and files were functioning correctly in the global environment. However, after updating to Julia v1.11.2, …

---

## [Variable start values from Dict](https://discourse.julialang.org/t/variable-start-values-from-dict/124650)

<div class="topic-metadata">

**Author:** [@maxminn](https://discourse.julialang.org/u/maxminn)\
**Replies:** 2\
**Last updated:** [January 10, 2025, 7:31pm UTC](https://discourse.julialang.org/t/variable-start-values-from-dict/124650 "2025-01-10T19:31:07Z")

</div>

I want to initialize a variable that is indexed by sets of strings to a dictionary with keys that are tuples of those same sets A = \["cat","dog"\] R = \["E" , "W"\] X0 = Dict( ("cat","E") =\> 1.1, ("cat","W") =\> 1.2…

---

## [Package for Rust-like borrow checker in Julia?](https://discourse.julialang.org/t/package-for-rust-like-borrow-checker-in-julia/124442)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 87\
**Last updated:** [January 10, 2025, 7:20pm UTC](https://discourse.julialang.org/t/package-for-rust-like-borrow-checker-in-julia/124442 "2025-01-10T19:20:16Z")

</div>

My least favorite bugs are usually caused by: Thread races Aliased memory While Rust doesn’t fill the same niche as Julia with respect to scientific computing, I really like the safety guarantees around ownership and …

---

## [Introducing Rust alongside C in Julia's source tree?](https://discourse.julialang.org/t/introducing-rust-alongside-c-in-julias-source-tree/124559)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 18\
**Last updated:** [January 10, 2025, 6:53pm UTC](https://discourse.julialang.org/t/introducing-rust-alongside-c-in-julias-source-tree/124559 "2025-01-10T18:53:41Z")

</div>

Just curious if anyone has ever raised the question of introducing Rust inside the Julia source tree, alongside C? I know that the Linux kernel has recently started this in their C source to improve memory safety: Rust f…

---

## [Generate re-usable fast function from Symbolics](https://discourse.julialang.org/t/generate-re-usable-fast-function-from-symbolics/124616)

<div class="topic-metadata">

**Author:** [@MechRob](https://discourse.julialang.org/u/MechRob)\
**Replies:** 5\
**Last updated:** [January 10, 2025, 6:43pm UTC](https://discourse.julialang.org/t/generate-re-usable-fast-function-from-symbolics/124616 "2025-01-10T18:43:01Z")

</div>

I am trying to generate a function that gets multi-input (both symbolic and numeric), and multi-output that each of them have different sizes. Then I want to generate a function using build\_function, with expression = Va…

---

## [Automatically insert variable name or symbol in Title and Colorbar](https://discourse.julialang.org/t/automatically-insert-variable-name-or-symbol-in-title-and-colorbar/124624)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 17\
**Last updated:** [January 10, 2025, 5:38pm UTC](https://discourse.julialang.org/t/automatically-insert-variable-name-or-symbol-in-title-and-colorbar/124624 "2025-01-10T17:38:33Z")

</div>

I have many different variable names or symbols for different data. I will insert one of those variable at a time in my safe\_log( ) function. I expect cbar.label and ax.title to accept that variable name automatically r…

---

## [Policy function algorithm becomes much slower when I increase the upper bound of the grid](https://discourse.julialang.org/t/policy-function-algorithm-becomes-much-slower-when-i-increase-the-upper-bound-of-the-grid/124536)

<div class="topic-metadata">

**Author:** [@SGHoekstra](https://discourse.julialang.org/u/SGHoekstra)\
**Replies:** 4\
**Last updated:** [January 10, 2025, 5:03pm UTC](https://discourse.julialang.org/t/policy-function-algorithm-becomes-much-slower-when-i-increase-the-upper-bound-of-the-grid/124536 "2025-01-10T17:03:58Z")

</div>

Dear all, I am facing a performance issue that I find hard to understand so I am hoping I can gain some insights here. I have written code to solve an economic problem using fixed point iteration or also known as policy…

---

## [Memory Allocation in \`@time\` but not in \`AllocCheck.check\_allocs\`](https://discourse.julialang.org/t/memory-allocation-in-time-but-not-in-alloccheck-check-allocs/124638)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [January 10, 2025, 3:28pm UTC](https://discourse.julialang.org/t/memory-allocation-in-time-but-not-in-alloccheck-check-allocs/124638 "2025-01-10T15:28:43Z")

</div>

Hi there, I am wondering what this is about: In @time I see an allocation of 16 Bytes. When using AllocCheck.check\_allocs, everything is clean. Here a code example: using Statistics using LinearAlgebra using StaticAr…

---

## [Specify analytic exponential and pseudoinverse of linear part of a SplitODEProblem](https://discourse.julialang.org/t/specify-analytic-exponential-and-pseudoinverse-of-linear-part-of-a-splitodeproblem/124596)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 1\
**Last updated:** [January 10, 2025, 3:14pm UTC](https://discourse.julialang.org/t/specify-analytic-exponential-and-pseudoinverse-of-linear-part-of-a-splitodeproblem/124596 "2025-01-10T15:14:54Z")

</div>

I have a system of ODE of the form du/dt = A(t)\*u + f(u) The linear part corresponds to fast dynamics, in comparison to the slow dynamics of the non-linear part. A(t) is actually so simple, that I can provide an analy…

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

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