# Latest

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

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

**Page:** 761

---

## [Significant difference in execution speed between similar functions with nested loops](https://discourse.julialang.org/t/significant-difference-in-execution-speed-between-similar-functions-with-nested-loops/95710)

<div class="topic-metadata">

**Author:** [@aomidro](https://discourse.julialang.org/u/aomidro)\
**Replies:** 4\
**Last updated:** [March 8, 2023, 5:26am UTC](https://discourse.julialang.org/t/significant-difference-in-execution-speed-between-similar-functions-with-nested-loops/95710 "2023-03-08T05:26:28Z")

</div>

I compared the execution speed of two similar functions, f1 and f2, with f1 taking almost 1000 times longer than f2. Both functions include nested loops. Can anyone explain why there is such a significant difference in e…

---

## [Replication of \*Universal Differential Equations for Scientific Machine Learning\* for Lotka Volterra](https://discourse.julialang.org/t/replication-of-universal-differential-equations-for-scientific-machine-learning-for-lotka-volterra/95695)

<div class="topic-metadata">

**Author:** [@Stefano\_Giampiccolo](https://discourse.julialang.org/u/Stefano_Giampiccolo)\
**Replies:** 1\
**Last updated:** [March 8, 2023, 4:16am UTC](https://discourse.julialang.org/t/replication-of-universal-differential-equations-for-scientific-machine-learning-for-lotka-volterra/95695 "2023-03-08T04:16:36Z")

</div>

Hi everyone, I’m trying to replicate the results of Scenario 1 Lotka Volterra from the repository GitHub - ChrisRackauckas/universal\_differential\_equations: Repository for the Universal Differential Equations for Scient…

---

## [Why does julia have slots, rather than go full SSA?](https://discourse.julialang.org/t/why-does-julia-have-slots-rather-than-go-full-ssa/95649)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 7\
**Last updated:** [March 8, 2023, 4:10am UTC](https://discourse.julialang.org/t/why-does-julia-have-slots-rather-than-go-full-ssa/95649 "2023-03-08T04:10:46Z")

</div>

More a question of history. though, it seems like going full SSA would remove some sources of within function type-instability. Since it would be impossible to assign different types to same variable, since you actuall…

---

## [Why it has "\_," in front of some variables](https://discourse.julialang.org/t/why-it-has-in-front-of-some-variables/95685)

<div class="topic-metadata">

**Author:** [@jianqixi](https://discourse.julialang.org/u/jianqixi)\
**Replies:** 11\
**Last updated:** [March 8, 2023, 4:08am UTC](https://discourse.julialang.org/t/why-it-has-in-front-of-some-variables/95685 "2023-03-08T04:08:02Z")

</div>

Hi I am a very beginner of the julia, when taking the online class, I found some examples they use “, vars" in the code. I am wondering what’s the meaning of ",” and why use it? Thanks

---

## [\[ANN\] Package for sinusoidal regressions](https://discourse.julialang.org/t/ann-package-for-sinusoidal-regressions/95703)

<div class="topic-metadata">

**Author:** [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Replies:** 0\
**Last updated:** [March 7, 2023, 11:17pm UTC](https://discourse.julialang.org/t/ann-package-for-sinusoidal-regressions/95703 "2023-03-07T23:17:54Z")

</div>

SinusoidalRegressions.jl is a package that focuses on fitting data to sinusoidal models. Source and docs. It has been submitted to the general registry but it’s on the 3-day waiting period. Main features are: Implement…

---

## [Possible to save compiled GradientTape after compile in ReverseDiff](https://discourse.julialang.org/t/possible-to-save-compiled-gradienttape-after-compile-in-reversediff/95693)

<div class="topic-metadata">

**Author:** [@xxxxx](https://discourse.julialang.org/u/xxxxx)\
**Replies:** 8\
**Last updated:** [March 8, 2023, 12:38am UTC](https://discourse.julialang.org/t/possible-to-save-compiled-gradienttape-after-compile-in-reversediff/95693 "2023-03-08T00:38:25Z")

</div>

Hi, I was wondering if it would be possible to save the compiled GradientTape that is used in ReverseDiff.jl. Using the gradient example from the package, I’d like to save compiled\_f\_tape # some objective function t…

---

## [Is it possible for package precompilation fail quickly if some dependency fails to precompile because of an error?](https://discourse.julialang.org/t/is-it-possible-for-package-precompilation-fail-quickly-if-some-dependency-fails-to-precompile-because-of-an-error/95613)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [March 7, 2023, 10:52pm UTC](https://discourse.julialang.org/t/is-it-possible-for-package-precompilation-fail-quickly-if-some-dependency-fails-to-precompile-because-of-an-error/95613 "2023-03-07T22:52:35Z")

</div>

I often come across scenarios where package A depends on B, and making a change to B causes both B and A to precompile. Now, assume that there’s an error in B, and the precompilation fails for it. The precompilation atte…

---

## [Is it possible to catch a syntax error within the same file or REPL?](https://discourse.julialang.org/t/is-it-possible-to-catch-a-syntax-error-within-the-same-file-or-repl/95701)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 0\
**Last updated:** [March 7, 2023, 10:41pm UTC](https://discourse.julialang.org/t/is-it-possible-to-catch-a-syntax-error-within-the-same-file-or-repl/95701 "2023-03-07T22:41:29Z")

</div>

Given the two files test.jl: f(; kwargs...) = dump(kwargs) try f(a=1, b=2, a=7) catch ex println("Caught exception!") dump(ex) end and testincl.jl: try include("test.jl") catch ex println("Caught exception!") …

---

## [Computed type annotations for struct fields](https://discourse.julialang.org/t/computed-type-annotations-for-struct-fields/95692)

<div class="topic-metadata">

**Author:** [@habemus-papadum](https://discourse.julialang.org/u/habemus-papadum)\
**Replies:** 3\
**Last updated:** [March 7, 2023, 10:36pm UTC](https://discourse.julialang.org/t/computed-type-annotations-for-struct-fields/95692 "2023-03-07T22:36:04Z")

</div>

Is there a way to make this work in Julia: ## function relative(t::Type{Int64}) Float64 end function relative(t::Type{Int32}) Float32 end struct Foo{T} a::relative(T) b::T end x = Foo{Int64}(2.0, 1) This…

---

## [Struggling to train a UDE with DiffEqGPU](https://discourse.julialang.org/t/struggling-to-train-a-ude-with-diffeqgpu/94938)

<div class="topic-metadata">

**Author:** [@JuliaQ123](https://discourse.julialang.org/u/JuliaQ123)\
**Replies:** 9\
**Last updated:** [March 7, 2023, 10:29pm UTC](https://discourse.julialang.org/t/struggling-to-train-a-ude-with-diffeqgpu/94938 "2023-03-07T22:29:59Z")

</div>

Hi, I’ve been trying to train a UDE model on a set of time series in parallel using DiffEqGPU and EnsembleProblem, with different stored u0 and p values. The goal is to compute the losses simultaneously for each batch, …

---

## [Displaysize limit not respected for multi-dimensional arrays](https://discourse.julialang.org/t/displaysize-limit-not-respected-for-multi-dimensional-arrays/95698)

<div class="topic-metadata">

**Author:** [@fredcallaway](https://discourse.julialang.org/u/fredcallaway)\
**Replies:** 0\
**Last updated:** [March 7, 2023, 10:20pm UTC](https://discourse.julialang.org/t/displaysize-limit-not-respected-for-multi-dimensional-arrays/95698 "2023-03-07T22:20:13Z")

</div>

Displaying a multi-dimensional array will often create a huge amount of stdout, clearing scroll back history and causing the session to hang (especially when over ssh). For a matrix, you can limit the size of the display…

---

## [Parsing date column when reading in CSV](https://discourse.julialang.org/t/parsing-date-column-when-reading-in-csv/95641)

<div class="topic-metadata">

**Author:** [@mbah](https://discourse.julialang.org/u/mbah)\
**Replies:** 6\
**Last updated:** [March 7, 2023, 9:52pm UTC](https://discourse.julialang.org/t/parsing-date-column-when-reading-in-csv/95641 "2023-03-07T21:52:40Z")

</div>

Hello all, I have a CSV file with a date column that I am trying to parse when reading it in. I have tried several options but they don’t work. df = DataFrame(CSV.File(joinpath(data\_path, "PJM\_2018.csv"))) 8751×8 Dat…

---

## [How to identify a constraint in JuMp?](https://discourse.julialang.org/t/how-to-identify-a-constraint-in-jump/95434)

<div class="topic-metadata">

**Author:** [@Optimization](https://discourse.julialang.org/u/Optimization)\
**Replies:** 4\
**Last updated:** [March 7, 2023, 9:14pm UTC](https://discourse.julialang.org/t/how-to-identify-a-constraint-in-jump/95434 "2023-03-07T21:14:02Z")

</div>

Hi, I’m writing all constrained with a given name, as follows: @constraint(m, constraint\[j in 1:20\], sum(A\[j,i\]\*x\[i\] for i in 1:30) \<= b\[j\]) after runing the model, it returns Infeasibility row 'c11': 0 = 1. how ca…

---

## [Request for contributions: PDESystemLibrary.jl - A library of systems of symbolic partial differential equations](https://discourse.julialang.org/t/request-for-contributions-pdesystemlibrary-jl-a-library-of-systems-of-symbolic-partial-differential-equations/95639)

<div class="topic-metadata">

**Author:** [@xtalax](https://discourse.julialang.org/u/xtalax)\
**Replies:** 2\
**Last updated:** [March 7, 2023, 8:42pm UTC](https://discourse.julialang.org/t/request-for-contributions-pdesystemlibrary-jl-a-library-of-systems-of-symbolic-partial-differential-equations/95639 "2023-03-07T20:42:46Z")

</div>

Announcing PDESystemLibrary.jl, a library of symbolically defined PDESystems using ModelingToolkit.jl. We have a few (over 400) systems already included as a start, with more being added all the time. We really want to …

---

## [Julia v1.9.0-rc1 is now available](https://discourse.julialang.org/t/julia-v1-9-0-rc1-is-now-available/95691)

<div class="topic-metadata">

**Author:** [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Replies:** 0\
**Last updated:** [March 7, 2023, 8:32pm UTC](https://discourse.julialang.org/t/julia-v1-9-0-rc1-is-now-available/95691 "2023-03-07T20:32:11Z")

</div>

The Julia developers are pleased to announce that v1.9.0-rc1, the first release candidate for the upcoming 1.9 stable series, is now available. Binaries are available for download at https://julialang.org/downloads in t…

---

## [Solver BARON with user-defined function in nonlinear constraint](https://discourse.julialang.org/t/solver-baron-with-user-defined-function-in-nonlinear-constraint/95663)

<div class="topic-metadata">

**Author:** [@naouess](https://discourse.julialang.org/u/naouess)\
**Replies:** 4\
**Last updated:** [March 7, 2023, 7:17pm UTC](https://discourse.julialang.org/t/solver-baron-with-user-defined-function-in-nonlinear-constraint/95663 "2023-03-07T19:17:18Z")

</div>

Hello dear Julia-community, I am having an issue in using BARON for a nonlinear optimization problem. The problem includes nonlinearities in the constraints with a registered user-defined function. I define the function…

---

## [sharedMemory in GPU programming examples](https://discourse.julialang.org/t/sharedmemory-in-gpu-programming-examples/95567)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [March 7, 2023, 6:32pm UTC](https://discourse.julialang.org/t/sharedmemory-in-gpu-programming-examples/95567 "2023-03-07T18:32:49Z")

</div>

Hello! I found this great ressource here: https://jenni-westoby.github.io/Julia\_GPU\_examples/dev/Vector\_dot\_product/ And am going through the motion of understanding this. In the mean while I hope some could provide m…

---

## [UndefVarError on a defined variable](https://discourse.julialang.org/t/undefvarerror-on-a-defined-variable/95686)

<div class="topic-metadata">

**Author:** [@ossan05](https://discourse.julialang.org/u/ossan05)\
**Replies:** 2\
**Last updated:** [March 7, 2023, 6:10pm UTC](https://discourse.julialang.org/t/undefvarerror-on-a-defined-variable/95686 "2023-03-07T18:10:37Z")

</div>

My script in which i have defined a variable (b) as an empty string gives an error saying my variable isn’t defined. c = "abc" b = "" res = \[\] for i in 1:4 for i in 1:4 b \* c\[rand(1:3)\] # this line gives t…

---

## [Issues with LaTeX generated by emacs-jupyter for Symbolics.jl expressions](https://discourse.julialang.org/t/issues-with-latex-generated-by-emacs-jupyter-for-symbolics-jl-expressions/95584)

<div class="topic-metadata">

**Author:** [@a6a3uh](https://discourse.julialang.org/u/a6a3uh)\
**Replies:** 3\
**Last updated:** [March 7, 2023, 5:18pm UTC](https://discourse.julialang.org/t/issues-with-latex-generated-by-emacs-jupyter-for-symbolics-jl-expressions/95584 "2023-03-07T17:18:04Z")

</div>

This might be a really rare combination of techniques. I’m using Emacs with org-mode’s org-babel to write code blocks. And I’m using emacs-jupyter to connect to Jupyter’s Julia kernel. When working with Symbolics.jl it…

---

## [GC time issues when parallelizing tyalorinteg?](https://discourse.julialang.org/t/gc-time-issues-when-parallelizing-tyalorinteg/80481)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 7\
**Last updated:** [March 7, 2023, 5:07pm UTC](https://discourse.julialang.org/t/gc-time-issues-when-parallelizing-tyalorinteg/80481 "2023-03-07T17:07:04Z")

</div>

Hi all, I was messing around with Threads.@thread as I am trying to parallelize a for loop : I want to compute taylorinteg from TaylorIntegration.jl several times, independently, for different initial conditions. To do …

---

## [Running Julia and Juno from behind corporate firewall and proxy - A simple working setup](https://discourse.julialang.org/t/running-julia-and-juno-from-behind-corporate-firewall-and-proxy-a-simple-working-setup/32380)

<div class="topic-metadata">

**Author:** [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Replies:** 5\
**Last updated:** [March 7, 2023, 4:55pm UTC](https://discourse.julialang.org/t/running-julia-and-juno-from-behind-corporate-firewall-and-proxy-a-simple-working-setup/32380 "2023-03-07T16:55:07Z")

</div>

This has been asked a few times and I promised to post my setup. We run Julia on a daily basis from behind a corporate firewall. The proxy server setup uses an automatic configuration script. The script distributes traff…

---

## [Why isn't there a \`!in\` or \`!∈\` function/operator?](https://discourse.julialang.org/t/why-isnt-there-a-in-or-function-operator/95654)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 7\
**Last updated:** [March 7, 2023, 4:51pm UTC](https://discourse.julialang.org/t/why-isnt-there-a-in-or-function-operator/95654 "2023-03-07T16:51:46Z")

</div>

I have encountered the absence of an !∈ or !in operator many times now and my muscle memory insists on telling me that it should exist: if a !in (b, c, d) ... end Why isn’t there an analogous operator/function for th…

---

## [Simultaneous diagonalization of commuting Hermitian matrices](https://discourse.julialang.org/t/simultaneous-diagonalization-of-commuting-hermitian-matrices/95495)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 4\
**Last updated:** [March 7, 2023, 3:50pm UTC](https://discourse.julialang.org/t/simultaneous-diagonalization-of-commuting-hermitian-matrices/95495 "2023-03-07T15:50:25Z")

</div>

I have two Hermitian matrices, one of which is positive definite, and the matrices commute. Is there a standard implementation for the simultaneous diagonalization of such two matrices? To be precise, I have a Hamilton…

---

## [Open XLSX from Zip Archive in Memory](https://discourse.julialang.org/t/open-xlsx-from-zip-archive-in-memory/95664)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 4\
**Last updated:** [March 7, 2023, 3:16pm UTC](https://discourse.julialang.org/t/open-xlsx-from-zip-archive-in-memory/95664 "2023-03-07T15:16:30Z")

</div>

I want to download this url, get the file named “ZIP5\_DEC2022\_FINAL.xlsx”, and read the table in as a DataFrame. But I can’t quite work out how to compose Zipfiles.jl with XLSX.jl. Here is my code currently: using Data…

---

## [How to make Julia functions pure mathematical functions?](https://discourse.julialang.org/t/how-to-make-julia-functions-pure-mathematical-functions/95657)

<div class="topic-metadata">

**Author:** [@PToTheK](https://discourse.julialang.org/u/PToTheK)\
**Replies:** 14\
**Last updated:** [March 7, 2023, 2:05pm UTC](https://discourse.julialang.org/t/how-to-make-julia-functions-pure-mathematical-functions/95657 "2023-03-07T14:05:47Z")

</div>

Hi Julia community, Problem: I would like to define a function which has only access to the arguments passed to that function. The problem is illustrated in the following minimal working example. I would like that the…

---

## [\[ForwardDiff\] how to consider expression as constant](https://discourse.julialang.org/t/forwarddiff-how-to-consider-expression-as-constant/95651)

<div class="topic-metadata">

**Author:** [@mariusd](https://discourse.julialang.org/u/mariusd)\
**Replies:** 5\
**Last updated:** [March 7, 2023, 12:41pm UTC](https://discourse.julialang.org/t/forwarddiff-how-to-consider-expression-as-constant/95651 "2023-03-07T12:41:49Z")

</div>

See the following code. Inside the function f, g(x) is called and I need the result to be used as both a variable and as constant. Now of course I can calculate x20=g(x) outside and provide this as an extra argument to …

---

## [Stacked Plots (lines) Help](https://discourse.julialang.org/t/stacked-plots-lines-help/95576)

<div class="topic-metadata">

**Author:** [@rodolforbcoutinho](https://discourse.julialang.org/u/rodolforbcoutinho)\
**Replies:** 7\
**Last updated:** [March 7, 2023, 12:23pm UTC](https://discourse.julialang.org/t/stacked-plots-lines-help/95576 "2023-03-07T12:23:26Z")

</div>

Hi all! I’m trying to make a stacked plot from the Data Below when I plot using the regular plot function, i got the correct values/positions, but i need then stacked. Using areaplot instead of plot is not working as e…

---

## [How to reflect plot function toward $y=x$ with Plots?](https://discourse.julialang.org/t/how-to-reflect-plot-function-toward-y-x-with-plots/95647)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 4\
**Last updated:** [March 7, 2023, 12:21pm UTC](https://discourse.julialang.org/t/how-to-reflect-plot-function-toward-y-x-with-plots/95647 "2023-03-07T12:21:02Z")

</div>

Hi all, I have the code from previous forum I made, that reflect a graph toward y axis. Now I want to reflect it toward y=x , I can’t just do yreflection = y -\> x it prompts a lot of errors This code works on y axis re…

---

## [SpinControl.jl package is not found in project julia version 1.6](https://discourse.julialang.org/t/spincontrol-jl-package-is-not-found-in-project-julia-version-1-6/95604)

<div class="topic-metadata">

**Author:** [@arpan\_chatterjee](https://discourse.julialang.org/u/arpan_chatterjee)\
**Replies:** 2\
**Last updated:** [March 7, 2023, 11:40am UTC](https://discourse.julialang.org/t/spincontrol-jl-package-is-not-found-in-project-julia-version-1-6/95604 "2023-03-07T11:40:05Z")

</div>

What julia version is required to get the package SpinControl.jl?

---

## [Surprising type instability in apply\_type](https://discourse.julialang.org/t/surprising-type-instability-in-apply-type/95655)

<div class="topic-metadata">

**Author:** [@tverho](https://discourse.julialang.org/u/tverho)\
**Replies:** 2\
**Last updated:** [March 7, 2023, 11:31am UTC](https://discourse.julialang.org/t/surprising-type-instability-in-apply-type/95655 "2023-03-07T11:31:22Z")

</div>

It seems suprising that type inferrence doesn’t work here: f(Tp) = Tp{Int, Int} julia\> f(Tuple) Tuple{Int64, Int64} julia\> @code\_warntype f(Tuple) MethodInstance for f(::Type{Tuple}) from f(Tp) in Main at REPL\[5\]:1 …

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

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