# Latest

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

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

**Page:** 407

---

## [Differentiating through optimization problem](https://discourse.julialang.org/t/differentiating-through-optimization-problem/114435)

<div class="topic-metadata">

**Author:** [@ij05](https://discourse.julialang.org/u/ij05)\
**Replies:** 17\
**Last updated:** [May 20, 2024, 1:29pm UTC](https://discourse.julialang.org/t/differentiating-through-optimization-problem/114435 "2024-05-20T13:29:34Z")

</div>

Hello all, I am very new to Julia, and I intend to migrate from Matlab to Julia. I was very intrigued with automatic differentiation, and worked out a few problems by hand, to understand the concepts behind reverse mode…

---

## [Claim (false): Julia isn't multiple dispatch but overloading](https://discourse.julialang.org/t/claim-false-julia-isnt-multiple-dispatch-but-overloading/42370)

<div class="topic-metadata">

**Author:** [@dataSurfer](https://discourse.julialang.org/u/dataSurfer)\
**Replies:** 133\
**Last updated:** [May 20, 2024, 1:27pm UTC](https://discourse.julialang.org/t/claim-false-julia-isnt-multiple-dispatch-but-overloading/42370 "2024-05-20T13:27:02Z")

</div>

I heard a rumour that Julia’s multiple dispatch is “fake news”, in reality it’s overloading because you compile the function before it is run and all you are doing in Julia is just a series of compile and run actions. Is…

---

## [Unexpected precompilation in Binder based on Docker image](https://discourse.julialang.org/t/unexpected-precompilation-in-binder-based-on-docker-image/114473)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 4\
**Last updated:** [May 20, 2024, 1:17pm UTC](https://discourse.julialang.org/t/unexpected-precompilation-in-binder-based-on-docker-image/114473 "2024-05-20T13:17:15Z")

</div>

I’ve set up a Dockerfile that sets up a Julia (and Python) environment for a tutorial that should run on https://mybinder.org. The reason I’m using a Dockerfile instead of relying on Binder to set up everything based on …

---

## [Homotopy Continuation fails to find all solutions](https://discourse.julialang.org/t/homotopy-continuation-fails-to-find-all-solutions/114451)

<div class="topic-metadata">

**Author:** [@jrawson](https://discourse.julialang.org/u/jrawson)\
**Replies:** 2\
**Last updated:** [May 20, 2024, 1:12pm UTC](https://discourse.julialang.org/t/homotopy-continuation-fails-to-find-all-solutions/114451 "2024-05-20T13:12:10Z")

</div>

Hello, Apologies if this is in the wrong place. I am attempting to solve certain polynomial systems in Julia, using Homotopy Continuation. I know these have a certain number of solutions (364), however Homotopy Continua…

---

## [Agents.jl - @multiagent : MethodError: Cannot \`convert\` an object of type People to an object of type Family](https://discourse.julialang.org/t/agents-jl-multiagent-methoderror-cannot-convert-an-object-of-type-people-to-an-object-of-type-family/114466)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 5\
**Last updated:** [May 20, 2024, 12:51pm UTC](https://discourse.julialang.org/t/agents-jl-multiagent-methoderror-cannot-convert-an-object-of-type-people-to-an-object-of-type-family/114466 "2024-05-20T12:51:05Z")

</div>

I am a little clueless on how to use @multiagent macro in Agents.jl. For the problem I am trying to solve there are multiple agents and I am trying to add each as subagent but I get the error : MethodError: Cannot conver…

---

## [Is there a \`CartesianIndex\` using \`Int32\`?](https://discourse.julialang.org/t/is-there-a-cartesianindex-using-int32/114468)

<div class="topic-metadata">

**Author:** [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Replies:** 8\
**Last updated:** [May 20, 2024, 12:18pm UTC](https://discourse.julialang.org/t/is-there-a-cartesianindex-using-int32/114468 "2024-05-20T12:18:15Z")

</div>

The definition in Julia base/multidimensional.jl is restricted to Int64 struct CartesianIndex{N} \<: AbstractCartesianIndex{N} I::NTuple{N,Int} CartesianIndex{N}(index::NTuple{N,Integer}) where {N} = new(in…

---

## [Julia GC, heap fragmentation, out of memory, push!/append!](https://discourse.julialang.org/t/julia-gc-heap-fragmentation-out-of-memory-push-append/85224)

<div class="topic-metadata">

**Author:** [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)\
**Replies:** 30\
**Last updated:** [May 20, 2024, 7:53am UTC](https://discourse.julialang.org/t/julia-gc-heap-fragmentation-out-of-memory-push-append/85224 "2024-05-20T07:53:44Z")

</div>

I saw the juliacon22 video from Christine Flood about Julia GC. I’m glad to see that the GC is finally getting some attention and not just the compiler. It’s long overdue. Let’s just address the elephant in the room: Th…

---

## [How to let the user specify the variable name?](https://discourse.julialang.org/t/how-to-let-the-user-specify-the-variable-name/114467)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 7\
**Last updated:** [May 20, 2024, 7:19am UTC](https://discourse.julialang.org/t/how-to-let-the-user-specify-the-variable-name/114467 "2024-05-20T07:19:18Z")

</div>

For example, I want the user to specify the variable name of the JuMP mode. How to do? using JuMP function fun(var::Symbol) model = Model() @variable(model, var\[1:3\]) end Thanks.

---

## [Tuple Restructuring Syntax](https://discourse.julialang.org/t/tuple-restructuring-syntax/114461)

<div class="topic-metadata">

**Author:** [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Replies:** 6\
**Last updated:** [May 20, 2024, 3:56am UTC](https://discourse.julialang.org/t/tuple-restructuring-syntax/114461 "2024-05-20T03:56:57Z")

</div>

Can someone help me understand why the latter works but the former does not? map((x, y) -\> x \* y, zip(xs, ys)) # MethodError map(((x, y),) -\> x \* y, zip(xs, ys)) # works To me the first is akin to the form I usually u…

---

## [\`KeyError\` when using \`pmap\`](https://discourse.julialang.org/t/keyerror-when-using-pmap/114464)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 3\
**Last updated:** [May 20, 2024, 3:42am UTC](https://discourse.julialang.org/t/keyerror-when-using-pmap/114464 "2024-05-20T03:42:19Z")

</div>

I’m trying to use pmap form Distributed.jl for parallel computing in the runtests.jl file of a package (MyPkg) that is in development. The code is like: # runtests.jl using Distributed: @everywhere, addprocs, pmap usin…

---

## [Loading a csv-like file with a multi-line header](https://discourse.julialang.org/t/loading-a-csv-like-file-with-a-multi-line-header/113806)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 11\
**Last updated:** [May 20, 2024, 12:02am UTC](https://discourse.julialang.org/t/loading-a-csv-like-file-with-a-multi-line-header/113806 "2024-05-20T00:02:14Z")

</div>

Hi, I would like to load a IAGA-2002 file like http://www.bcmt.fr/DATABANK/VARIATION/ppt/sec/2024/03/ppt20240301vsec.sec Format IAGA-2002 | Source of Data IP…

---

## [How to define a macro via Package Extension?](https://discourse.julialang.org/t/how-to-define-a-macro-via-package-extension/114218)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 9\
**Last updated:** [May 19, 2024, 7:49pm UTC](https://discourse.julialang.org/t/how-to-define-a-macro-via-package-extension/114218 "2024-05-19T19:49:29Z")

</div>

I thought that you’d define functions my extending the original package’s functions like MyPackage.myfunc(::SpecialExtensionType) = ... The same however does not work for macros macro MyPackage.mymacro() end throws er…

---

## [Increasing the solution speed of sparse linear system](https://discourse.julialang.org/t/increasing-the-solution-speed-of-sparse-linear-system/114173)

<div class="topic-metadata">

**Author:** [@aqw](https://discourse.julialang.org/u/aqw)\
**Replies:** 14\
**Last updated:** [May 19, 2024, 7:42pm UTC](https://discourse.julialang.org/t/increasing-the-solution-speed-of-sparse-linear-system/114173 "2024-05-19T19:42:17Z")

</div>

Hello, Does Julia have any package for sparse linear solvers for LU decomposed sparse matrices that are multi-threaded? I want to improve the solution speed of a big system which I have to solve ~500-700 times. us…

---

## [Suggestion: JuliaCon 2024 essay contest](https://discourse.julialang.org/t/suggestion-juliacon-2024-essay-contest/114142)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 1\
**Last updated:** [May 13, 2024, 1:09pm UTC](https://discourse.julialang.org/t/suggestion-juliacon-2024-essay-contest/114142 "2024-05-13T13:09:20Z")

</div>

Some six months ago, on some thread (by now forgotten) I raised the proposal of having a JuliaCon essay contest. The goal behind this is to allow people to express ideas without the noise of other ideas crowding them out…

---

## [Vale's generational references memory management and Higher RAII vs Julia and other languages](https://discourse.julialang.org/t/vales-generational-references-memory-management-and-higher-raii-vs-julia-and-other-languages/114457)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [May 19, 2024, 5:27pm UTC](https://discourse.julialang.org/t/vales-generational-references-memory-management-and-higher-raii-vs-julia-and-other-languages/114457 "2024-05-19T17:27:14Z")

</div>

Vale is a very interesting language, and what can Julia learn from it? Julia could (should?) add a. Higher RAII (i.e. linear structs), i.e. new syntax and semantics (I think hope in a non-breaking way), and b. its gener…

---

## [Enzyme.jl Assertion Error in geom\_generator Function](https://discourse.julialang.org/t/enzyme-jl-assertion-error-in-geom-generator-function/114436)

<div class="topic-metadata">

**Author:** [@Arijit\_Bhattacharya](https://discourse.julialang.org/u/Arijit_Bhattacharya)\
**Replies:** 6\
**Last updated:** [May 19, 2024, 5:07pm UTC](https://discourse.julialang.org/t/enzyme-jl-assertion-error-in-geom-generator-function/114436 "2024-05-19T17:07:31Z")

</div>

Hi everyone, I’m encountering an issue with my implementation using Enzyme.jl in Julia. The error message I’m receiving is: julia: /buildworker/worker/package\_linux64/build/src/llvm-late-gc-lowering.cpp:870: std::vecto…

---

## [What are you excited the most about Juliacon 2024?](https://discourse.julialang.org/t/what-are-you-excited-the-most-about-juliacon-2024/114365)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 2\
**Last updated:** [May 19, 2024, 5:02pm UTC](https://discourse.julialang.org/t/what-are-you-excited-the-most-about-juliacon-2024/114365 "2024-05-19T17:02:01Z")

</div>

Juliacon 2024 is coming! What are you excited about? For me, I’m excited about the state of Julia keynote and the specific change about the memory.

---

## [Mismatch error when using the ODESystem and ODEProblem to convert DAE system to ODE system](https://discourse.julialang.org/t/mismatch-error-when-using-the-odesystem-and-odeproblem-to-convert-dae-system-to-ode-system/114438)

<div class="topic-metadata">

**Author:** [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)\
**Replies:** 3\
**Last updated:** [May 19, 2024, 4:54pm UTC](https://discourse.julialang.org/t/mismatch-error-when-using-the-odesystem-and-odeproblem-to-convert-dae-system-to-ode-system/114438 "2024-05-19T16:54:58Z")

</div>

I have used the ODESystem and ODEProblem to convert the DAE system into ODE system in Julia. It works well for the systems with 10 and 54 equations, but when I tried for the larger system with 88 or 198 equations it has …

---

## [Creating Symbolics Piecewise Function Printout](https://discourse.julialang.org/t/creating-symbolics-piecewise-function-printout/114445)

<div class="topic-metadata">

**Author:** [@wirazulka](https://discourse.julialang.org/u/wirazulka)\
**Replies:** 1\
**Last updated:** [May 19, 2024, 4:10pm UTC](https://discourse.julialang.org/t/creating-symbolics-piecewise-function-printout/114445 "2024-05-19T16:10:36Z")

</div>

Hi I want to make a print out of symbolic mathematical expression like below : Already trying using symbolics.jl but I cant find the correct syntax for piecewise equation.

---

## [Error from OrdinaryDiffEq.jl example](https://discourse.julialang.org/t/error-from-ordinarydiffeq-jl-example/114414)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 3\
**Last updated:** [May 19, 2024, 4:05pm UTC](https://discourse.julialang.org/t/error-from-ordinarydiffeq-jl-example/114414 "2024-05-19T16:05:59Z")

</div>

The given example in “Classical Physics Models · DifferentialEquations.jl” # Simple Harmonic Oscillator Problem using OrdinaryDiffEq, Plots #Parameters ω = 1 #Initial Conditions x₀ = \[0.0\] dx₀ = \[π / 2\] tspan = (0.0, …

---

## [Combining Lux.jl with IPNewton() for Optimization](https://discourse.julialang.org/t/combining-lux-jl-with-ipnewton-for-optimization/114391)

<div class="topic-metadata">

**Author:** [@paul188](https://discourse.julialang.org/u/paul188)\
**Replies:** 2\
**Last updated:** [May 19, 2024, 2:52pm UTC](https://discourse.julialang.org/t/combining-lux-jl-with-ipnewton-for-optimization/114391 "2024-05-19T14:52:14Z")

</div>

I have some specific bounds on my Neural Network weights and biases, that cannot be expressed as simple parameter inequlality constraints. That’s why I would like to try something like IPNewton for the Optimization, even…

---

## [DataFrame transformation is so slow, what am I doing wrong?](https://discourse.julialang.org/t/dataframe-transformation-is-so-slow-what-am-i-doing-wrong/114430)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 17\
**Last updated:** [May 19, 2024, 2:41pm UTC](https://discourse.julialang.org/t/dataframe-transformation-is-so-slow-what-am-i-doing-wrong/114430 "2024-05-19T14:41:29Z")

</div>

I want to do a transformation which may depends on a large number of columns. The MWE & benchmark codes: using DataFrames df = DataFrame(rand(10, 50), :auto) cols = propertynames(df) # due to the design of my actual c…

---

## [Proper way to deal with \`Vector{Any}\` when defining a function](https://discourse.julialang.org/t/proper-way-to-deal-with-vector-any-when-defining-a-function/114422)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 12\
**Last updated:** [May 19, 2024, 10:37am UTC](https://discourse.julialang.org/t/proper-way-to-deal-with-vector-any-when-defining-a-function/114422 "2024-05-19T10:37:54Z")

</div>

function catstr(arr::Vector{String}) return reduce(\*, arr) end # Method-1: OK arr = \["hello", "world"\] catstr(arr) # Method-2: Not OK arr = \[\] push!(arr, "hello") push!(arr, "world") catstr(arr) Whose fault? Is th…

---

## [SortedDict with mutable values - why does this allocate?](https://discourse.julialang.org/t/sorteddict-with-mutable-values-why-does-this-allocate/114378)

<div class="topic-metadata">

**Author:** [@freeman](https://discourse.julialang.org/u/freeman)\
**Replies:** 11\
**Last updated:** [May 19, 2024, 9:21am UTC](https://discourse.julialang.org/t/sorteddict-with-mutable-values-why-does-this-allocate/114378 "2024-05-19T09:21:35Z")

</div>

I’m surprised that one of these allocates and the other doesn’t. I’m pretty sure that this isn’t specific to the package and that instead my surprise comes form me not understand Julia well enough. I wonder if someone he…

---

## [Is there a way to read a large bunch of objects of different bitstypes on multiple workers, without copying them?](https://discourse.julialang.org/t/is-there-a-way-to-read-a-large-bunch-of-objects-of-different-bitstypes-on-multiple-workers-without-copying-them/114450)

<div class="topic-metadata">

**Author:** [@Zaph](https://discourse.julialang.org/u/Zaph)\
**Replies:** 0\
**Last updated:** [May 19, 2024, 7:30am UTC](https://discourse.julialang.org/t/is-there-a-way-to-read-a-large-bunch-of-objects-of-different-bitstypes-on-multiple-workers-without-copying-them/114450 "2024-05-19T07:30:37Z")

</div>

For my code I am using a long multydimensional list of anonymous functions, which I calculated in a previous session and loaded as a constant into the current session. I then run a pmap operation (over another list), in …

---

## [How to convert a thread-parallelized code into a core-parallelized code?](https://discourse.julialang.org/t/how-to-convert-a-thread-parallelized-code-into-a-core-parallelized-code/114406)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 3\
**Last updated:** [May 19, 2024, 7:06am UTC](https://discourse.julialang.org/t/how-to-convert-a-thread-parallelized-code-into-a-core-parallelized-code/114406 "2024-05-19T07:06:44Z")

</div>

This post can be thought as a successor to an old series of posts that I had made where the motive was to improve the performance and eventually parallelize a code that consisted primarily of matrix operations, the end g…

---

## [How to extract zip file content in Jupyter Notebook](https://discourse.julialang.org/t/how-to-extract-zip-file-content-in-jupyter-notebook/114443)

<div class="topic-metadata">

**Author:** [@ShrutiD](https://discourse.julialang.org/u/ShrutiD)\
**Replies:** 1\
**Last updated:** [May 19, 2024, 6:47am UTC](https://discourse.julialang.org/t/how-to-extract-zip-file-content-in-jupyter-notebook/114443 "2024-05-19T06:47:49Z")

</div>

I’m trying to use the MNSIT dataset to train a network and needed to use the images that are in a .zip file in the same directory. I tried to use ZipFile and FilePathsBase to extract the content from the .zip folder. How…

---

## [The LanguageServer.jl and the Julia VS Code extension need better care](https://discourse.julialang.org/t/the-languageserver-jl-and-the-julia-vs-code-extension-need-better-care/114434)

<div class="topic-metadata">

**Author:** [@j-adel](https://discourse.julialang.org/u/j-adel)\
**Replies:** 6\
**Last updated:** [May 18, 2024, 10:15pm UTC](https://discourse.julialang.org/t/the-languageserver-jl-and-the-julia-vs-code-extension-need-better-care/114434 "2024-05-18T22:15:16Z")

</div>

My experience with working on Julia code in VS Code (the supposed best coding environment for Julia) has been very hit-or-miss and there are very few signs of progress in the last year. A while ago, I encountered an iss…

---

## [Expected Vector{Number}, got a value of type Vector{Int64}](https://discourse.julialang.org/t/expected-vector-number-got-a-value-of-type-vector-int64/114439)

<div class="topic-metadata">

**Author:** [@Amnesian](https://discourse.julialang.org/u/Amnesian)\
**Replies:** 5\
**Last updated:** [May 18, 2024, 8:48pm UTC](https://discourse.julialang.org/t/expected-vector-number-got-a-value-of-type-vector-int64/114439 "2024-05-18T20:48:44Z")

</div>

So I have this function, but it is giving me a very strange error. function runCommands(;programName::String="simulation", dt::Number=0.01, T::Number=2, temps::Vector{Number}, N::Integer, sizeArr::Vector{Integer}) c…

---

## [Transparent background with Luxor.jl](https://discourse.julialang.org/t/transparent-background-with-luxor-jl/114437)

<div class="topic-metadata">

**Author:** [@fatteneder](https://discourse.julialang.org/u/fatteneder)\
**Replies:** 2\
**Last updated:** [May 18, 2024, 5:26pm UTC](https://discourse.julialang.org/t/transparent-background-with-luxor-jl/114437 "2024-05-18T17:26:05Z")

</div>

Hi. Does somebody know how I can generate a .png file with a transparent background? The docs here say that it should suffice to put background(0,0,0,0). Using the MWE from Simple examples · Luxor using Luxor @png be…

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

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