# Latest

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

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

**Page:** 1134

---

## [Autocov with FFT](https://discourse.julialang.org/t/autocov-with-fft/4178)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 14\
**Last updated:** [February 3, 2022, 7:36am UTC](https://discourse.julialang.org/t/autocov-with-fft/4178 "2022-02-03T07:36:14Z")

</div>

Is there a package which has an implementation of autocovariances using FFT? With lots of lags, it should be much faster than the simple approach (eg in StatsBase.autocov). If there is none, which appears to be my impre…

---

## [\[ANN\] MonkeyLang.jl v0.2 -- Now with CLI + Mutable variables + While loop](https://discourse.julialang.org/t/ann-monkeylang-jl-v0-2-now-with-cli-mutable-variables-while-loop/75516)

<div class="topic-metadata">

**Author:** [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)\
**Replies:** 8\
**Last updated:** [February 3, 2022, 4:14am UTC](https://discourse.julialang.org/t/ann-monkeylang-jl-v0-2-now-with-cli-mutable-variables-while-loop/75516 "2022-02-03T04:14:13Z")

</div>

In the previous post, I announced my implementation of Writing an Interpreter in GO (plus the Lost Chapter (Macros)) and Writing a Compiler in GO: the MonkeyLang.jl package. Now, I want to announce some advancements I h…

---

## [Why so large memory allocations?](https://discourse.julialang.org/t/why-so-large-memory-allocations/75662)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 6\
**Last updated:** [February 3, 2022, 2:58am UTC](https://discourse.julialang.org/t/why-so-large-memory-allocations/75662 "2022-02-03T02:58:36Z")

</div>

I met a weird problem in the following trivial code: using BenchmarkTools const p=150 dd = randn(p,p) function d2(ψ::Matrix{Float64})::Matrix{Float64} ψr = similar(ψ) ddψ = dd\*ψ @time @inbounds for i in ea…

---

## [Line-search SQP](https://discourse.julialang.org/t/line-search-sqp/75547)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 5\
**Last updated:** [February 3, 2022, 2:32am UTC](https://discourse.julialang.org/t/line-search-sqp/75547 "2022-02-03T02:32:04Z")

</div>

Hi, I am trying to solve a PDE-constrained optimization problem that can be written as: minimize f(x) subject to h(x)=0 As this problem is nonlinear, I try to find a local minimum by starting from…

---

## [Need help avoiding catastrophic cancellation or overflow](https://discourse.julialang.org/t/need-help-avoiding-catastrophic-cancellation-or-overflow/75318)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 15\
**Last updated:** [February 3, 2022, 2:24am UTC](https://discourse.julialang.org/t/need-help-avoiding-catastrophic-cancellation-or-overflow/75318 "2022-02-03T02:24:04Z")

</div>

I am computing integrals of the form \\int\_s^t e^{-a -bx-cx^2}dx. The solution is available in closed form in a number of cases such as (1) c\>0 and (2) c==0 and b!=0. The problem is that the closed form solution for the c…

---

## [RigidBodyDynamics - simulate multi link mechanism](https://discourse.julialang.org/t/rigidbodydynamics-simulate-multi-link-mechanism/75625)

<div class="topic-metadata">

**Author:** [@kobied](https://discourse.julialang.org/u/kobied)\
**Replies:** 1\
**Last updated:** [February 3, 2022, 12:27am UTC](https://discourse.julialang.org/t/rigidbodydynamics-simulate-multi-link-mechanism/75625 "2022-02-03T00:27:04Z")

</div>

Hello, I’m trying to simulate a multi-link mechanism. Based on the “double pendulum” example, I was able to define my mechanism, so far so good, my issue is this: In my dynamic simulation there are times when I need t…

---

## [How to draw a textbox around a text in Makie.jl?](https://discourse.julialang.org/t/how-to-draw-a-textbox-around-a-text-in-makie-jl/75672)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 1\
**Last updated:** [February 2, 2022, 11:57pm UTC](https://discourse.julialang.org/t/how-to-draw-a-textbox-around-a-text-in-makie-jl/75672 "2022-02-02T23:57:01Z")

</div>

In Makie.jl, how can I draw a box around a text? More specifically, I’d like to draw the bounding box of a given text that I’ve plotted using the text! function. In fact, it is even better if I could use the existing Te…

---

## [Number of threads, puzzle](https://discourse.julialang.org/t/number-of-threads-puzzle/74965)

<div class="topic-metadata">

**Author:** [@HANHAOHAN](https://discourse.julialang.org/u/HANHAOHAN)\
**Replies:** 9\
**Last updated:** [February 2, 2022, 10:06pm UTC](https://discourse.julialang.org/t/number-of-threads-puzzle/74965 "2022-02-02T22:06:50Z")

</div>

draft.jl c1 = Channel(100) c2 = Channel(100) c3 = Channel(100) function task\_1() while true wait(c1) take!(c1) end end function task\_2() while true wait(c2) take!(c2) end…

---

## [Fix for win32 threads on high end systems](https://discourse.julialang.org/t/fix-for-win32-threads-on-high-end-systems/75687)

<div class="topic-metadata">

**Author:** [@Chris\_Green](https://discourse.julialang.org/u/Chris_Green)\
**Replies:** 0\
**Last updated:** [February 2, 2022, 9:39pm UTC](https://discourse.julialang.org/t/fix-for-win32-threads-on-high-end-systems/75687 "2022-02-02T21:39:25Z")

</div>

I submitted a patch to LibUV that will fix Julia threading only being able to use 1/2,1/4, or 1/8 of the CPUs on high end windows systems, no matter how many threads you create. Affected systems are any with \>64 HW threa…

---

## [What is the correct procedure to calculate ONLY the execution time of code not its embedded compilation time?](https://discourse.julialang.org/t/what-is-the-correct-procedure-to-calculate-only-the-execution-time-of-code-not-its-embedded-compilation-time/75678)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 4\
**Last updated:** [February 2, 2022, 8:55pm UTC](https://discourse.julialang.org/t/what-is-the-correct-procedure-to-calculate-only-the-execution-time-of-code-not-its-embedded-compilation-time/75678 "2022-02-02T20:55:27Z")

</div>

As far as I know that, using @time calculates the total time (compilation and execution). However, if I only need to calculate the execution time, what is the correct way to do that?

---

## [Packages defining functional data types](https://discourse.julialang.org/t/packages-defining-functional-data-types/73539)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 8:50pm UTC](https://discourse.julialang.org/t/packages-defining-functional-data-types/73539 "2022-02-02T20:50:41Z")

</div>

Any package out there defining a function type with inner product? In functional data analysis we often define the inner product between two functions as \\langle f, g \\rangle = \\int\_a^b f(t)\\bar{g(t)} dt More formally,…

---

## [Generate Tree Struct using EzXML.jl?](https://discourse.julialang.org/t/generate-tree-struct-using-ezxml-jl/73770)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 1\
**Last updated:** [February 2, 2022, 7:04pm UTC](https://discourse.julialang.org/t/generate-tree-struct-using-ezxml-jl/73770 "2022-02-02T19:04:59Z")

</div>

Hello! Is it possible to use EzXML.jl to extract the full tree of an XML file I am generating? For example if I have an XML as such: \<Main\> \<SubTag1\> \<LowerTag1 x="0" y="0" z="0" /\> \</SubTag1\> …

---

## [Interpreting version compatibility error during package installation](https://discourse.julialang.org/t/interpreting-version-compatibility-error-during-package-installation/75258)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [February 2, 2022, 6:50pm UTC](https://discourse.julialang.org/t/interpreting-version-compatibility-error-during-package-installation/75258 "2022-02-02T18:50:42Z")

</div>

I don’t understand the following version compatibility error during installation of ContinuumArrays.jl: (@v1.7) pkg\> add ContinuumArrays Resolving package versions... ERROR: Unsatisfiable requirements detected for pa…

---

## [What is the correct procedure to compare the execution time between sequential code and parallel code?](https://discourse.julialang.org/t/what-is-the-correct-procedure-to-compare-the-execution-time-between-sequential-code-and-parallel-code/68121)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 15\
**Last updated:** [September 17, 2021, 4:39pm UTC](https://discourse.julialang.org/t/what-is-the-correct-procedure-to-compare-the-execution-time-between-sequential-code-and-parallel-code/68121 "2021-09-17T16:39:40Z")

</div>

I am trying to compare between two codes; one with parallel computing (6 threads) and the other with single thread (normal). I put each code between “@time … end”, i.e.,: @time begin ... sequential code ... end #@time …

---

## [Subplot enumeration for papers with Makie.jl](https://discourse.julialang.org/t/subplot-enumeration-for-papers-with-makie-jl/61685)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 3\
**Last updated:** [February 2, 2022, 5:20pm UTC](https://discourse.julialang.org/t/subplot-enumeration-for-papers-with-makie-jl/61685 "2022-02-02T17:20:02Z")

</div>

Hi there, I have a figure like this: made with PyPlot. The contents of the figure do not matter, only the letters that are in the upper right corner of each axis. Such “enumeration” is critical for publication qualit…

---

## [Correct typing of struct field with late initialization](https://discourse.julialang.org/t/correct-typing-of-struct-field-with-late-initialization/75635)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 3:50pm UTC](https://discourse.julialang.org/t/correct-typing-of-struct-field-with-late-initialization/75635 "2022-02-02T15:50:43Z")

</div>

Consider the following mutable struct: Base.@kwdef mutable struct MyStruct data::Union{String, Nothing} = nothing end Is this the most efficient way to represent the fact that data may be “empty”, or does the type …

---

## [Differences between @spawnat, remotecall\_wait, remotecall\_fetch](https://discourse.julialang.org/t/differences-between-spawnat-remotecall-wait-remotecall-fetch/75649)

<div class="topic-metadata">

**Author:** [@shce](https://discourse.julialang.org/u/shce)\
**Replies:** 0\
**Last updated:** [February 2, 2022, 12:46pm UTC](https://discourse.julialang.org/t/differences-between-spawnat-remotecall-wait-remotecall-fetch/75649 "2022-02-02T12:46:53Z")

</div>

Hello! I was wondering what is the difference between @spawn, remotecall\_wait and remotecall\_fetch. For instance, consider the following MWE: using Distributed @everywhere using DistributedArrays @everywhere function …

---

## [Julia v1.7.1 on RPI4: Use JILL](https://discourse.julialang.org/t/julia-v1-7-1-on-rpi4-use-jill/74673)

<div class="topic-metadata">

**Author:** [@dmoored4](https://discourse.julialang.org/u/dmoored4)\
**Replies:** 4\
**Last updated:** [February 2, 2022, 5:04pm UTC](https://discourse.julialang.org/t/julia-v1-7-1-on-rpi4-use-jill/74673 "2022-02-02T17:04:22Z")

</div>

Running Ubuntu 21.10 on RPI4 and I had trouble installing anything except v1.5 via sudo apt install julia so I wanted to highlight how well JILL works. Just scroll down to the Advanced: The Python API section. It’s not t…

---

## [Save yourself some headache and don't put JULIA\_DEPOT\_PATH on your NFS home directory](https://discourse.julialang.org/t/save-yourself-some-headache-and-dont-put-julia-depot-path-on-your-nfs-home-directory/75601)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 1\
**Last updated:** [February 2, 2022, 4:55pm UTC](https://discourse.julialang.org/t/save-yourself-some-headache-and-dont-put-julia-depot-path-on-your-nfs-home-directory/75601 "2022-02-02T16:55:39Z")

</div>

I have my home directory on NFS so that I have one place to back up all my files and can go from one computer to another in my house and get a consistent set of files and etc… But Julia and especially Pkg don’t play nic…

---

## [How to give an one-time assignment to a large parametric matrix?](https://discourse.julialang.org/t/how-to-give-an-one-time-assignment-to-a-large-parametric-matrix/75664)

<div class="topic-metadata">

**Author:** [@GtJeight](https://discourse.julialang.org/u/GtJeight)\
**Replies:** 5\
**Last updated:** [February 2, 2022, 4:24pm UTC](https://discourse.julialang.org/t/how-to-give-an-one-time-assignment-to-a-large-parametric-matrix/75664 "2022-02-02T16:24:03Z")

</div>

One-time assignment means something essentially equal to this: function Mf(t) M=\[t t^2;t^3 t^4\] #assignment, just list all its entries in the bracket end but not this: function Mf(t) M=zeros(2,2) #assign…

---

## [Insert value into sorted array with fixed size](https://discourse.julialang.org/t/insert-value-into-sorted-array-with-fixed-size/75660)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 1\
**Last updated:** [February 2, 2022, 3:45pm UTC](https://discourse.julialang.org/t/insert-value-into-sorted-array-with-fixed-size/75660 "2022-02-02T15:45:03Z")

</div>

I want to insert a value into a sorted array with fixed size, removing the last (greatest) value of the array. A naive solution is this function that combines insert! (or pushfirst!) and pop!: function insertandropgreat…

---

## [How many differential equations can I solve simultaneously? Julia is crashing for more than a few thousand odes](https://discourse.julialang.org/t/how-many-differential-equations-can-i-solve-simultaneously-julia-is-crashing-for-more-than-a-few-thousand-odes/75588)

<div class="topic-metadata">

**Author:** [@Shashank](https://discourse.julialang.org/u/Shashank)\
**Replies:** 17\
**Last updated:** [February 2, 2022, 3:08pm UTC](https://discourse.julialang.org/t/how-many-differential-equations-can-i-solve-simultaneously-julia-is-crashing-for-more-than-a-few-thousand-odes/75588 "2022-02-02T15:08:36Z")

</div>

I was trying to solve a discretized partial differential equation when I realized that Julia is crashing when I try to solve more than a few thousand differential equations. When I try to run the following code, I get a …

---

## [Are eigenvectors of real symmetric or hermitian matrix computed from \`eigen\` all orthogonal](https://discourse.julialang.org/t/are-eigenvectors-of-real-symmetric-or-hermitian-matrix-computed-from-eigen-all-orthogonal/60893)

<div class="topic-metadata">

**Author:** [@ZhiyuanYao](https://discourse.julialang.org/u/ZhiyuanYao)\
**Replies:** 28\
**Last updated:** [February 2, 2022, 3:23pm UTC](https://discourse.julialang.org/t/are-eigenvectors-of-real-symmetric-or-hermitian-matrix-computed-from-eigen-all-orthogonal/60893 "2022-02-02T15:23:41Z")

</div>

In Fortran/C, for a real symmetric or complex Hermitian matrix A, I can call Lapack dsyev /zheev and the resulting eigenvectors are normalized and mutually orthogonal. What method is Julia using for diagonalizing such ma…

---

## [Apparent mismatch of run times during summation](https://discourse.julialang.org/t/apparent-mismatch-of-run-times-during-summation/75527)

<div class="topic-metadata">

**Author:** [@lzxnl](https://discourse.julialang.org/u/lzxnl)\
**Replies:** 5\
**Last updated:** [February 2, 2022, 3:21pm UTC](https://discourse.julialang.org/t/apparent-mismatch-of-run-times-during-summation/75527 "2022-02-02T15:21:52Z")

</div>

Hi guys, Julia newbie here. I have a very simple question that I haven’t been able to get my head around. I ultimately want to sum f(n)\*g(n)\*x\[n-1\] where n ranges from 1 to a predetermined integer, where f is some funct…

---

## [How to create a "Range Slider" in Pluto?](https://discourse.julialang.org/t/how-to-create-a-range-slider-in-pluto/75658)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 1\
**Last updated:** [February 2, 2022, 3:01pm UTC](https://discourse.julialang.org/t/how-to-create-a-range-slider-in-pluto/75658 "2022-02-02T15:01:35Z")

</div>

Hello I would like to use a “Range Slider” in Pluto similar to the picture below. I intend to use it for Dates, but Int would be ok. Would you know how I could do this? Thanks Michel

---

## [DataFrame, aggregate by month of date](https://discourse.julialang.org/t/dataframe-aggregate-by-month-of-date/34428)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 4\
**Last updated:** [February 2, 2022, 1:51pm UTC](https://discourse.julialang.org/t/dataframe-aggregate-by-month-of-date/34428 "2022-02-02T13:51:35Z")

</div>

I am sorry for the easy question. I have DataFrame, one the column is Date and Count:: Int. What is the easiest way to calculate the sum(Count) per month? thank you. P.S. I have done by loop, but I fill there has to …

---

## [Optim.jl optimize 2 variable function with initial boundaries](https://discourse.julialang.org/t/optim-jl-optimize-2-variable-function-with-initial-boundaries/75497)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 6\
**Last updated:** [February 2, 2022, 1:16pm UTC](https://discourse.julialang.org/t/optim-jl-optimize-2-variable-function-with-initial-boundaries/75497 "2022-02-02T13:16:32Z")

</div>

I’m struggling to accomplish a basic task with Optim. Let’s say I defined a function f(a,x,y) = a + x^2 + y^2. I want to minimize this function given initial boundaries: x0 = \[-10, 10\], y0 = \[-10, 10\] and a = 10, as con…

---

## [Multithreaded code on beefy computer runs just as fast as serial code on M1 Mac](https://discourse.julialang.org/t/multithreaded-code-on-beefy-computer-runs-just-as-fast-as-serial-code-on-m1-mac/75210)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 41\
**Last updated:** [February 2, 2022, 1:10pm UTC](https://discourse.julialang.org/t/multithreaded-code-on-beefy-computer-runs-just-as-fast-as-serial-code-on-m1-mac/75210 "2022-02-02T13:10:16Z")

</div>

I have 2 machines: M1 Mac Mini, with horrible thermals and a peak of 3.2 GHz and 8 GB of RAM (absolutely love it though) A beefy linux (Ubuntu 21.10) workstation with 64 GB of DDR5 RAM and a 12th-Gen 4.9 GHz processor …

---

## [Efficiently creating array of dimension 3 from element-wise matrix addition](https://discourse.julialang.org/t/efficiently-creating-array-of-dimension-3-from-element-wise-matrix-addition/75646)

<div class="topic-metadata">

**Author:** [@Eriklw](https://discourse.julialang.org/u/Eriklw)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 12:14pm UTC](https://discourse.julialang.org/t/efficiently-creating-array-of-dimension-3-from-element-wise-matrix-addition/75646 "2022-02-02T12:14:25Z")

</div>

I have to perfrom an operation, in which I create an array with dimension 3 from two matrices in the following way: C\[i,j,k\] = A\[i,j\] + B\[j,k\] I can do this of course with a loop but this seems by far not the best way …

---

## [Smallest magnitude eigenvalues of the generalized eigenvalue equation for a large sparse matrix](https://discourse.julialang.org/t/smallest-magnitude-eigenvalues-of-the-generalized-eigenvalue-equation-for-a-large-sparse-matrix/75485)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 20\
**Last updated:** [February 2, 2022, 12:05pm UTC](https://discourse.julialang.org/t/smallest-magnitude-eigenvalues-of-the-generalized-eigenvalue-equation-for-a-large-sparse-matrix/75485 "2022-02-02T12:05:42Z")

</div>

I have a generalized eigenvalue problem Hx=\\lambda S x to solve, where H is Hermitian and S is positive definite. Both H and S are sparse matrices and their dimensions (size(H, 1)) are on the order of 10^5. Roughly 1% of…

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

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