# Latest

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

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

**Page:** 628

---

## [How can I make an in-place swap function?](https://discourse.julialang.org/t/how-can-i-make-an-in-place-swap-function/102489)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 9\
**Last updated:** [August 4, 2023, 8:30pm UTC](https://discourse.julialang.org/t/how-can-i-make-an-in-place-swap-function/102489 "2023-08-04T20:30:58Z")

</div>

Suppose I have two arrays A, B of different sizes. Then A .+ B broadcasts them to a common size (if possible) and sums them. Suppose A here is “larger” (in the sense that all(size(B) .== size(A) .|| size(B) .== 1) is tru…

---

## [Higher-order function works in REPL but not in batch execution](https://discourse.julialang.org/t/higher-order-function-works-in-repl-but-not-in-batch-execution/102473)

<div class="topic-metadata">

**Author:** [@pao](https://discourse.julialang.org/u/pao)\
**Replies:** 5\
**Last updated:** [August 4, 2023, 7:48pm UTC](https://discourse.julialang.org/t/higher-order-function-works-in-repl-but-not-in-batch-execution/102473 "2023-08-04T19:48:56Z")

</div>

Hi guys, I was amazed to discover Julia working also as a true functional language with true Higher-order functions. Now, in writing small excerpts of Julia code to be included in a book sources, I found an inconsiste…

---

## [Apply Matrix Order of Operations on Scalars](https://discourse.julialang.org/t/apply-matrix-order-of-operations-on-scalars/102499)

<div class="topic-metadata">

**Author:** [@TicTac](https://discourse.julialang.org/u/TicTac)\
**Replies:** 1\
**Last updated:** [August 4, 2023, 7:29pm UTC](https://discourse.julialang.org/t/apply-matrix-order-of-operations-on-scalars/102499 "2023-08-04T19:29:02Z")

</div>

Is there a way to make variables defined by Symbolics (Or any symbolic module I suppose) to be treated with the algebraic rules and order of operations for matrices, while still displaying as scalars? I am using Symboli…

---

## [Can I avoid allocations when broadcasting over slices?](https://discourse.julialang.org/t/can-i-avoid-allocations-when-broadcasting-over-slices/102501)

<div class="topic-metadata">

**Author:** [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Replies:** 3\
**Last updated:** [August 4, 2023, 7:22pm UTC](https://discourse.julialang.org/t/can-i-avoid-allocations-when-broadcasting-over-slices/102501 "2023-08-04T19:22:19Z")

</div>

I was a little surprised to find that broadcasting over slices allocates, even when using view. Here’s a MWE. u = randn(10, 100) ids = reshape(1:100, 10, 10) out = similar(u\[ids\]) function foo1!(out, u, ids) @. out…

---

## [Symbolics: simplifying an equation whose RHS is zero](https://discourse.julialang.org/t/symbolics-simplifying-an-equation-whose-rhs-is-zero/102453)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [August 4, 2023, 5:58pm UTC](https://discourse.julialang.org/t/symbolics-simplifying-an-equation-whose-rhs-is-zero/102453 "2023-08-04T17:58:31Z")

</div>

I’m using the Symbolics package. Suppose I’ve got an expression in several real variables, let’s call it expr, and I equate it with zero, e.g. expr ~ false. I’d like some simple automatic simplifications of that equation…

---

## [Best practice for threading nested loops](https://discourse.julialang.org/t/best-practice-for-threading-nested-loops/102492)

<div class="topic-metadata">

**Author:** [@james3](https://discourse.julialang.org/u/james3)\
**Replies:** 1\
**Last updated:** [August 4, 2023, 4:49pm UTC](https://discourse.julialang.org/t/best-practice-for-threading-nested-loops/102492 "2023-08-04T16:49:26Z")

</div>

I was previously using Threads on a nested loop as follows Threads.@threads for (aₓ, bₓ) in collect(Iterators.product(1:N.A, 1:N.B)) ... end This works, but collect(Iterators.product(1:N.A, 1:N.B)) is allocating. I …

---

## [Best practice for not requiring users to load package for package extensions?](https://discourse.julialang.org/t/best-practice-for-not-requiring-users-to-load-package-for-package-extensions/102316)

<div class="topic-metadata">

**Author:** [@M-PERSIC](https://discourse.julialang.org/u/M-PERSIC)\
**Replies:** 3\
**Last updated:** [August 4, 2023, 3:33pm UTC](https://discourse.julialang.org/t/best-practice-for-not-requiring-users-to-load-package-for-package-extensions/102316 "2023-08-04T15:33:07Z")

</div>

I am looking to make loading package extensions transparent to the user of a package, meaning they would not have to manually include the conditional dependency to their environment. For example, if the user calls a func…

---

## [PSA: Inserting a new line in the REPL](https://discourse.julialang.org/t/psa-inserting-a-new-line-in-the-repl/3524)

<div class="topic-metadata">

**Author:** [@joshbode](https://discourse.julialang.org/u/joshbode)\
**Replies:** 15\
**Last updated:** [August 4, 2023, 2:35pm UTC](https://discourse.julialang.org/t/psa-inserting-a-new-line-in-the-repl/3524 "2023-08-04T14:35:45Z")

</div>

This tip may help someone - I’ve found it useful myself :slight\_smile: Ever wanted to insert a new blank line into something you’re working on at the REPL? Just pressing \<Enter\> is going to execute the command! TL;DR …

---

## [Store dataframes in structure and storing multiple database connection in connection pool](https://discourse.julialang.org/t/store-dataframes-in-structure-and-storing-multiple-database-connection-in-connection-pool/102467)

<div class="topic-metadata">

**Author:** [@Sandy45](https://discourse.julialang.org/u/Sandy45)\
**Replies:** 3\
**Last updated:** [August 4, 2023, 2:14pm UTC](https://discourse.julialang.org/t/store-dataframes-in-structure-and-storing-multiple-database-connection-in-connection-pool/102467 "2023-08-04T14:14:19Z")

</div>

Q1 - I am working with multiple dataframes and trying to create structure with dataframes in it so that they can be accessed easily. I’ve created struct like below and when I try to assign the data to it I got an error “…

---

## [Error in precompiling FFMPEG and Cairo and CairoMakie](https://discourse.julialang.org/t/error-in-precompiling-ffmpeg-and-cairo-and-cairomakie/102461)

<div class="topic-metadata">

**Author:** [@arinbasu](https://discourse.julialang.org/u/arinbasu)\
**Replies:** 3\
**Last updated:** [August 4, 2023, 2:10pm UTC](https://discourse.julialang.org/t/error-in-precompiling-ffmpeg-and-cairo-and-cairomakie/102461 "2023-08-04T14:10:49Z")

</div>

Hi All, Using Mac Big Sur (11.7.7; Intel Mac), I failed to precompile FFMPEG, Cairo, and CairoMakie. Julia version 1.9.2 The error message returned Failed to precompile FFMPEG \[c87230d0-a227-11e9-1b43-d7ebe4e7570a\] t…

---

## [Interacting with current and next iterator](https://discourse.julialang.org/t/interacting-with-current-and-next-iterator/102487)

<div class="topic-metadata">

**Author:** [@astro-kevin](https://discourse.julialang.org/u/astro-kevin)\
**Replies:** 2\
**Last updated:** [August 4, 2023, 2:10pm UTC](https://discourse.julialang.org/t/interacting-with-current-and-next-iterator/102487 "2023-08-04T14:10:38Z")

</div>

Say a is an iterator (not a vector or anything that can be indexed). I have function f(x,y) = x+y, and I want to have the function act on successive values of a. Say for our example a is an iterator for all odd numbers …

---

## [Spatial Data Science across Languages, Muenster Sept 18+19](https://discourse.julialang.org/t/spatial-data-science-across-languages-muenster-sept-18-19/102484)

<div class="topic-metadata">

**Author:** [@edzer](https://discourse.julialang.org/u/edzer)\
**Replies:** 1\
**Last updated:** [August 4, 2023, 1:43pm UTC](https://discourse.julialang.org/t/spatial-data-science-across-languages-muenster-sept-18-19/102484 "2023-08-04T13:43:11Z")

</div>

Dear all, We are organising a small workshop on “Spatial Data Science across Languages” on Sept 18+19 in Muenster, Germany. The goal is to bring developers and users from R-Spatial, GeoPython and GeoJulia together to di…

---

## [Why do these two have different types?](https://discourse.julialang.org/t/why-do-these-two-have-different-types/102482)

<div class="topic-metadata">

**Author:** [@dali77](https://discourse.julialang.org/u/dali77)\
**Replies:** 1\
**Last updated:** [August 4, 2023, 1:11pm UTC](https://discourse.julialang.org/t/why-do-these-two-have-different-types/102482 "2023-08-04T13:11:29Z")

</div>

using StructArrays test1 = StructArray{NamedTuple{(:a, :b), NTuple{2, Float32}}}((a=\[0f0,0f0,1f0,1f0,2f0,2f0,2f0\],b=\[0f0,0f0,0f0,0f0,0f0,0f0,0f0\])) 7-element StructArray(::Vector{Float32}, ::Vector{Float32}) with eltype…

---

## [@edit files read only?](https://discourse.julialang.org/t/edit-files-read-only/102469)

<div class="topic-metadata">

**Author:** [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Replies:** 4\
**Last updated:** [August 4, 2023, 1:00pm UTC](https://discourse.julialang.org/t/edit-files-read-only/102469 "2023-08-04T13:00:28Z")

</div>

In th REPL if I add a package, and then use it, is there a way to have @edit let me Revise the file? Without deving the package, it opens up a read only editor for a file in, e.g. .julia/packages/PkgName/hash/src/file.jl …

---

## [Private registry](https://discourse.julialang.org/t/private-registry/68291)

<div class="topic-metadata">

**Author:** [@rvignolo](https://discourse.julialang.org/u/rvignolo)\
**Replies:** 11\
**Last updated:** [August 4, 2023, 11:51am UTC](https://discourse.julialang.org/t/private-registry/68291 "2023-08-04T11:51:59Z")

</div>

Hi, I would like to be able to run CI/CD using GitHub Actions in private packages. Let’s say I have two private packages, PkgA and PkgB, with PkgB depending on PkgA. I would like to be able to set up a private registr…

---

## [Race condition when writing the same value in a parallel loop](https://discourse.julialang.org/t/race-condition-when-writing-the-same-value-in-a-parallel-loop/102463)

<div class="topic-metadata">

**Author:** [@james3](https://discourse.julialang.org/u/james3)\
**Replies:** 4\
**Last updated:** [August 4, 2023, 1:57am UTC](https://discourse.julialang.org/t/race-condition-when-writing-the-same-value-in-a-parallel-loop/102463 "2023-08-04T01:57:36Z")

</div>

I have a parallel loop similar to the following Threads.@threads for (aₓ, bₓ) in collect(Iterators.product(1:N.A, 1:N.B)) abₓ = joinAb(aₓ, bₓ) output1\[abₓ\], V = myfunc1(abₓ) output2\[aₓ, bₓ\] = myfunc2(V, aₓ, bₓ) end …

---

## [Can I "unescape" a variable name within an \`esc(..)\` node?](https://discourse.julialang.org/t/can-i-unescape-a-variable-name-within-an-esc-node/102396)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 6\
**Last updated:** [August 4, 2023, 9:41am UTC](https://discourse.julialang.org/t/can-i-unescape-a-variable-name-within-an-esc-node/102396 "2023-08-04T09:41:48Z")

</div>

Hello, I’m curious whether it is possible to individually pick expressions within an esc()aped node to make them hygienic again. For instance: macro f(...) xp = esc(:(...)) unescape!(xp.args\[2\]) # or something …

---

## [Juliacon2023 Pre-recorded Playlist](https://discourse.julialang.org/t/juliacon2023-pre-recorded-playlist/102476)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 2\
**Last updated:** [August 4, 2023, 9:30am UTC](https://discourse.julialang.org/t/juliacon2023-pre-recorded-playlist/102476 "2023-08-04T09:30:54Z")

</div>

Here is a playlist of pre-recorded videos for JuliaCon 2023:

---

## [Package-Compiler stops compile process because of arguments missing](https://discourse.julialang.org/t/package-compiler-stops-compile-process-because-of-arguments-missing/102472)

<div class="topic-metadata">

**Author:** [@Miroslav-Stimac](https://discourse.julialang.org/u/Miroslav-Stimac)\
**Replies:** 0\
**Last updated:** [August 4, 2023, 7:51am UTC](https://discourse.julialang.org/t/package-compiler-stops-compile-process-because-of-arguments-missing/102472 "2023-08-04T07:51:16Z")

</div>

Hello, I developed a program that requires a few arguments and when the program starts, it checks whether the correct arguments were given and if not, then it raises an exception. For example: # Read the arguments give…

---

## [How to call a macro with ::Second as argument?](https://discourse.julialang.org/t/how-to-call-a-macro-with-second-as-argument/102457)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 4\
**Last updated:** [August 4, 2023, 6:24am UTC](https://discourse.julialang.org/t/how-to-call-a-macro-with-second-as-argument/102457 "2023-08-04T06:24:53Z")

</div>

Hi all :slight\_smile: Just a quick question. How would I call the following macro? macro a(s::Second) ...do stuff end Thanks :slight\_smile:

---

## [Error thrown when attempting Parameter Identifiability](https://discourse.julialang.org/t/error-thrown-when-attempting-parameter-identifiability/102440)

<div class="topic-metadata">

**Author:** [@CurioMath](https://discourse.julialang.org/u/CurioMath)\
**Replies:** 2\
**Last updated:** [August 4, 2023, 5:29am UTC](https://discourse.julialang.org/t/error-thrown-when-attempting-parameter-identifiability/102440 "2023-08-04T05:29:06Z")

</div>

Hi, I’m really excited to dig around the Parameter Identifiability in ODE Models, that I came across in ModelingToolkit.jl as well as in Overview of Julia’s SciML documentation. I have tried the same on my ODE model, bu…

---

## [Iterating structs of different types efficiently](https://discourse.julialang.org/t/iterating-structs-of-different-types-efficiently/102321)

<div class="topic-metadata">

**Author:** [@adrian](https://discourse.julialang.org/u/adrian)\
**Replies:** 15\
**Last updated:** [August 4, 2023, 5:02am UTC](https://discourse.julialang.org/t/iterating-structs-of-different-types-efficiently/102321 "2023-08-04T05:02:21Z")

</div>

I am writing code that will involve solving an ODE that is composed of heterogeneous components. This requires evaluating the right hand side by iterating over those heterogeneous components. For this, I use a struct De…

---

## [Why is the return type of the following inplace broadcast operation not inferred?](https://discourse.julialang.org/t/why-is-the-return-type-of-the-following-inplace-broadcast-operation-not-inferred/102449)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 5\
**Last updated:** [August 3, 2023, 9:52pm UTC](https://discourse.julialang.org/t/why-is-the-return-type-of-the-following-inplace-broadcast-operation-not-inferred/102449 "2023-08-03T21:52:20Z")

</div>

julia\> @descend\_code\_warntype (Y -\> Y .+= Any\[rand(size(Y))\]\[1\])(rand(2)) (::var"#3#4")(Y) @ Main REPL\[4\]:1 ┌ Warning: couldn't retrieve source of (::var"#3#4")(Y) @ Main REPL\[4\]:1 └ @ TypedSyntax ~/.julia/packages/Typed…

---

## [Access to undefined reference: But not always](https://discourse.julialang.org/t/access-to-undefined-reference-but-not-always/102441)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 9\
**Last updated:** [August 3, 2023, 11:19pm UTC](https://discourse.julialang.org/t/access-to-undefined-reference-but-not-always/102441 "2023-08-03T23:19:10Z")

</div>

why in the case of the setindex!() function does the error not arise? That is, I understand why this behavior was established, but I’m curious to understand how, behind the scenes, the two situations are distinguished. …

---

## [Constructing a Switching Function on the Fly](https://discourse.julialang.org/t/constructing-a-switching-function-on-the-fly/102454)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 5\
**Last updated:** [August 3, 2023, 11:00pm UTC](https://discourse.julialang.org/t/constructing-a-switching-function-on-the-fly/102454 "2023-08-03T23:00:25Z")

</div>

In ExpandNestedData, I have a module for composing many nested iterators. It works by boiling down repeat and cycle into some callable structs that do division and modulo functions (respectively) on a provided index to r…

---

## [How to evaluate a complex function between complex bounds](https://discourse.julialang.org/t/how-to-evaluate-a-complex-function-between-complex-bounds/102460)

<div class="topic-metadata">

**Author:** [@AkchurinDA](https://discourse.julialang.org/u/AkchurinDA)\
**Replies:** 2\
**Last updated:** [August 3, 2023, 10:43pm UTC](https://discourse.julialang.org/t/how-to-evaluate-a-complex-function-between-complex-bounds/102460 "2023-08-03T22:43:21Z")

</div>

I’m having trouble evaluating the following expression that contains an integral with a complex function with complex bounds. In this expression, \\phi() is the PDF of a standard normal distribution, \\beta is a number…

---

## [Using a DrWatson project in a new Julia version](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 9\
**Last updated:** [August 3, 2023, 10:25pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459 "2023-08-03T22:25:53Z")

</div>

This is probably not a smart question. But I am not knowledgable about the inner workings of versions of projects and Julia etc. I have a DrWatson project on Julia 1.7, and I am now thinking about upgrading to Julia 1.9…

---

## [How do you label each timeseries on DifferentialEquations.jl plot?](https://discourse.julialang.org/t/how-do-you-label-each-timeseries-on-differentialequations-jl-plot/102456)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 4\
**Last updated:** [August 3, 2023, 8:24pm UTC](https://discourse.julialang.org/t/how-do-you-label-each-timeseries-on-differentialequations-jl-plot/102456 "2023-08-03T20:24:34Z")

</div>

I’ve got the solution to a differential equation, and i want to plot it, and I want each timeseries to have its own label in the legend: p1 = plot(soln; xlim=(0,0.2), ylim=(0,100), title="Organisms vs Time", xlab="Time …

---

## [Julia (and VSCode Language Server) Launching Failure](https://discourse.julialang.org/t/julia-and-vscode-language-server-launching-failure/102363)

<div class="topic-metadata">

**Author:** [@jeffeuxMartin](https://discourse.julialang.org/u/jeffeuxMartin)\
**Replies:** 1\
**Last updated:** [August 2, 2023, 9:19pm UTC](https://discourse.julialang.org/t/julia-and-vscode-language-server-launching-failure/102363 "2023-08-02T21:19:43Z")

</div>

I’ve been trying to install Julia and its VSCode environment on a new Windows computer for a few days, but I can’t launch it. To figure out where the problem may be, I’ve been trying for about 5 days, knowing that: Fir…

---

## [Scrap table from NASA GCN circulars website](https://discourse.julialang.org/t/scrap-table-from-nasa-gcn-circulars-website/101690)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 30\
**Last updated:** [August 3, 2023, 5:15pm UTC](https://discourse.julialang.org/t/scrap-table-from-nasa-gcn-circulars-website/101690 "2023-08-03T17:15:47Z")

</div>

I want scrap table from these websites which have content separated by | so i need some way to parse string from | . if occursin("MASTER", txt) is used to pick only Master satellite website. The code that i have pr…

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

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