# Latest

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

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

**Page:** 764

---

## [Agents.jl Predator-prey dynamic : LoadError: UndefVarError: randomwalk! not defined](https://discourse.julialang.org/t/agents-jl-predator-prey-dynamic-loaderror-undefvarerror-randomwalk-not-defined/95515)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 5\
**Last updated:** [March 5, 2023, 6:27am UTC](https://discourse.julialang.org/t/agents-jl-predator-prey-dynamic-loaderror-undefvarerror-randomwalk-not-defined/95515 "2023-03-05T06:27:29Z")

</div>

Hi all, I am trying the Predator-prey dynamic and it returns: LoadError: UndefVarError: randomwalk! not defined I can run Zombie Outbreak fine. Why there is no randomwalk function defined in the tutorial? I use Julia…

---

## [Differential equation becomes unstable when training mixed neural ODE](https://discourse.julialang.org/t/differential-equation-becomes-unstable-when-training-mixed-neural-ode/61461)

<div class="topic-metadata">

**Author:** [@bkuwahara](https://discourse.julialang.org/u/bkuwahara)\
**Replies:** 7\
**Last updated:** [March 5, 2023, 6:11am UTC](https://discourse.julialang.org/t/differential-equation-becomes-unstable-when-training-mixed-neural-ode/61461 "2023-03-05T06:11:46Z")

</div>

I’m trying to use a neural network to simulate the equation for the predator population in the Lotka-Volterra model: function lotka\_volterra(du,u,p,t) x, y = u α, β = (1.5,1.0) du\[1\] = dx = α\*x - β\*x\*y du\[2\] = N…

---

## [Learning (a)synchronous parallelization on a simple graph problem](https://discourse.julialang.org/t/learning-a-synchronous-parallelization-on-a-simple-graph-problem/92670)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 8\
**Last updated:** [March 5, 2023, 2:09am UTC](https://discourse.julialang.org/t/learning-a-synchronous-parallelization-on-a-simple-graph-problem/92670 "2023-03-05T02:09:58Z")

</div>

I’m starting to learn about concurrent / parallel / distributed computing on a simple graph problem and would really appreciate any help. I am trying to squeeze every drop of performance out of Julia, so comments on how …

---

## [If Julia was static typed, how multiple dispatch would work?](https://discourse.julialang.org/t/if-julia-was-static-typed-how-multiple-dispatch-would-work/95529)

<div class="topic-metadata">

**Author:** [@dylanxyz](https://discourse.julialang.org/u/dylanxyz)\
**Replies:** 3\
**Last updated:** [March 5, 2023, 1:52am UTC](https://discourse.julialang.org/t/if-julia-was-static-typed-how-multiple-dispatch-would-work/95529 "2023-03-05T01:52:03Z")

</div>

If Julia was a static typed language instead of dynamic typed, how would multiple dispatch work? It would be simple function overloading or something different? Instead of compiling the functions that are called during r…

---

## [Building a Patient Level Prediction Package within Julia](https://discourse.julialang.org/t/building-a-patient-level-prediction-package-within-julia/94749)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 12\
**Last updated:** [March 5, 2023, 12:48am UTC](https://discourse.julialang.org/t/building-a-patient-level-prediction-package-within-julia/94749 "2023-03-05T00:48:45Z")

</div>

Hey folks, :wave: I have been considering developing a new package within JuliaHealth that focuses on Patient Level Prediction (PLP). In brief, PLP is the notion of defining a patient population that you are interested …

---

## [Continuous Callback - terminate on second zero crossing?](https://discourse.julialang.org/t/continuous-callback-terminate-on-second-zero-crossing/95561)

<div class="topic-metadata">

**Author:** [@pluie](https://discourse.julialang.org/u/pluie)\
**Replies:** 1\
**Last updated:** [March 5, 2023, 12:31am UTC](https://discourse.julialang.org/t/continuous-callback-terminate-on-second-zero-crossing/95561 "2023-03-05T00:31:26Z")

</div>

How do I set up the condition and affect functions such that ODE solver terminates on second zero crossing? Currently, I have the following setup for terminating on the first zero crossing. function condition(z,t,integ…

---

## [Why not call it a Plot instead of an Axis?](https://discourse.julialang.org/t/why-not-call-it-a-plot-instead-of-an-axis/95557)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 11:10pm UTC](https://discourse.julialang.org/t/why-not-call-it-a-plot-instead-of-an-axis/95557 "2023-03-04T23:10:29Z")

</div>

In Makie, a figure can have multiple plots. But for some reason each plot is called an “Axis” instead of a “Plot”. I normally think of a 2d plot having two axes – I don’t think of the whole plot being one axis. Is this a…

---

## [Why does (sqrt ∘ +)(3,6) work but (√ ∘ +)(3,6) throws an error?](https://discourse.julialang.org/t/why-does-sqrt-3-6-work-but-3-6-throws-an-error/95560)

<div class="topic-metadata">

**Author:** [@Nayunis](https://discourse.julialang.org/u/Nayunis)\
**Replies:** 3\
**Last updated:** [March 4, 2023, 10:55pm UTC](https://discourse.julialang.org/t/why-does-sqrt-3-6-work-but-3-6-throws-an-error/95560 "2023-03-04T22:55:12Z")

</div>

I was just working my way through the Manual and got to the section about the composition operator. I wanted to try the example (sqrt ∘ +)(3,6) in my own jupyter notebook but used (√ ∘ +)(3,6) instead which throws the er…

---

## [\[Zygote\] Derivative of derivative compilation time](https://discourse.julialang.org/t/zygote-derivative-of-derivative-compilation-time/95537)

<div class="topic-metadata">

**Author:** [@mariusd](https://discourse.julialang.org/u/mariusd)\
**Replies:** 4\
**Last updated:** [March 4, 2023, 9:57pm UTC](https://discourse.julialang.org/t/zygote-derivative-of-derivative-compilation-time/95537 "2023-03-04T21:57:53Z")

</div>

In the following code I calculate derivative fx, then derivative of derivative fxy, and then fxyz. The code works and gives the correct result, however the compilation time is huge for the fxyz derivative. Is there a wa…

---

## [Macro Expansion Error in basic @testset](https://discourse.julialang.org/t/macro-expansion-error-in-basic-testset/95555)

<div class="topic-metadata">

**Author:** [@JacobC](https://discourse.julialang.org/u/JacobC)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 9:41pm UTC](https://discourse.julialang.org/t/macro-expansion-error-in-basic-testset/95555 "2023-03-04T21:41:25Z")

</div>

Anytime I get something that evaluates false inside of a testset I get a macro expansion error. The testset runs as expected and gives a summary as expected, but throws the macro expansion error first, and I am a bit uns…

---

## [Is it possible to overload \`:=\`?](https://discourse.julialang.org/t/is-it-possible-to-overload/95547)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 5\
**Last updated:** [March 4, 2023, 9:06pm UTC](https://discourse.julialang.org/t/is-it-possible-to-overload/95547 "2023-03-04T21:06:44Z")

</div>

This was my first attempt to overload the := operator: julia\> (:=)(x, y) = x + y ERROR: syntax: invalid identifier name ":=" This was my second attempt: julia\> var":="(x, y) = x + y := (generic function with 1 method)…

---

## [Autocomplete kwargs in vscode](https://discourse.julialang.org/t/autocomplete-kwargs-in-vscode/88417)

<div class="topic-metadata">

**Author:** [@qwerty](https://discourse.julialang.org/u/qwerty)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 8:53pm UTC](https://discourse.julialang.org/t/autocomplete-kwargs-in-vscode/88417 "2023-03-04T20:53:52Z")

</div>

If I have a function with kwargs like this: my\_f(a, asdfg=4; zxcvbn=5) = println(a, asdfg, zxcvbn) how can i get in vscode the autocomplete of kwargs when i call it? my\_f(3, ?... # no autocomplete

---

## [Calculating displacement vectors between Agents](https://discourse.julialang.org/t/calculating-displacement-vectors-between-agents/95458)

<div class="topic-metadata">

**Author:** [@Niall](https://discourse.julialang.org/u/Niall)\
**Replies:** 3\
**Last updated:** [March 4, 2023, 7:07pm UTC](https://discourse.julialang.org/t/calculating-displacement-vectors-between-agents/95458 "2023-03-04T19:07:15Z")

</div>

Hi. I’m having problems (re-)implementing the Flocking model in Agents. Whenever I run it, flocks tend to bounce off the supposedly periodic boundaries, and when I analyse this more closely, the individual agents ‘stick’…

---

## [CUDA atomic add for ForwardDiff duals?](https://discourse.julialang.org/t/cuda-atomic-add-for-forwarddiff-duals/85968)

<div class="topic-metadata">

**Author:** [@Mark\_Lau](https://discourse.julialang.org/u/Mark_Lau)\
**Replies:** 2\
**Last updated:** [August 19, 2022, 5:59pm UTC](https://discourse.julialang.org/t/cuda-atomic-add-for-forwarddiff-duals/85968 "2022-08-19T17:59:41Z")

</div>

Hi everyone, I’ve been trying to auto differentiate some code that runs on the GPU using ForwardDiff. Some of the kernels perform an atomic addition operation via CUDA.@atomic, but that doesn’t seem to be supported for F…

---

## [Spline fit from DataInterpolations erroring out with ModelingToolkit symbolic derivative](https://discourse.julialang.org/t/spline-fit-from-datainterpolations-erroring-out-with-modelingtoolkit-symbolic-derivative/95417)

<div class="topic-metadata">

**Author:** [@aditya-sengupta](https://discourse.julialang.org/u/aditya-sengupta)\
**Replies:** 4\
**Last updated:** [March 4, 2023, 6:40pm UTC](https://discourse.julialang.org/t/spline-fit-from-datainterpolations-erroring-out-with-modelingtoolkit-symbolic-derivative/95417 "2023-03-04T18:40:38Z")

</div>

I’m trying to take a ModelingToolkit symbolic derivative of a variable whose values I’m getting with a DataInterpolations spline, and it’s unable to evaluate the derivative of a constant so I can’t solve the system. MWE: …

---

## [Pasting into Julia REPL in Windows 10](https://discourse.julialang.org/t/pasting-into-julia-repl-in-windows-10/8515)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 12\
**Last updated:** [March 4, 2023, 3:53pm UTC](https://discourse.julialang.org/t/pasting-into-julia-repl-in-windows-10/8515 "2023-03-04T15:53:06Z")

</div>

Hi all, Is it possible to paste text into the Julia REPL when OS=Windows 10? As of Windows 10, we can paste into the command line using Ctrl+v (can’t believe it took this long?!?), but that doesn’t seem to work for the…

---

## [Is \`reduce\` safe?](https://discourse.julialang.org/t/is-reduce-safe/95525)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 7\
**Last updated:** [March 4, 2023, 3:20pm UTC](https://discourse.julialang.org/t/is-reduce-safe/95525 "2023-03-04T15:20:32Z")

</div>

reduce (without init keyword) is much faster than foldl and foldr: julia\> v = rand(Int, 2^16); w = @view v\[2:2:end\]; julia\> @btime reduce(+, $w); 12.154 μs (0 allocations: 0 bytes) julia\> @btime foldl(+, $w); 190.20…

---

## [Structural\_simplify unexpected ERROR when applied twice in a row](https://discourse.julialang.org/t/structural-simplify-unexpected-error-when-applied-twice-in-a-row/95540)

<div class="topic-metadata">

**Author:** [@halejulia](https://discourse.julialang.org/u/halejulia)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 2:47pm UTC](https://discourse.julialang.org/t/structural-simplify-unexpected-error-when-applied-twice-in-a-row/95540 "2023-03-04T14:47:18Z")

</div>

I mentioned this on slack, but I took me a while to create an MWE, so I’m posting it here again. Here is the MWE: using ModelingToolkit @variables t u(t)\[1:2\] D=Differential(t) eqs = \[u\[1\] ~ 1 D…

---

## [\[ReverseDiff.jl\] How to do nested differentiation?](https://discourse.julialang.org/t/reversediff-jl-how-to-do-nested-differentiation/95542)

<div class="topic-metadata">

**Author:** [@mariusd](https://discourse.julialang.org/u/mariusd)\
**Replies:** 0\
**Last updated:** [March 4, 2023, 2:00pm UTC](https://discourse.julialang.org/t/reversediff-jl-how-to-do-nested-differentiation/95542 "2023-03-04T14:00:12Z")

</div>

See the following example. I do calculate the derivative of f w.r.t. to x, called fx. Then I calculate the derivative of fx w.r.t. to y, called fxy. The function fxyz is computed similarly. The output of fx is correct, …

---

## [Array vs DenseArray?](https://discourse.julialang.org/t/array-vs-densearray/95538)

<div class="topic-metadata">

**Author:** [@DOT](https://discourse.julialang.org/u/DOT)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 1:43pm UTC](https://discourse.julialang.org/t/array-vs-densearray/95538 "2023-03-04T13:43:43Z")

</div>

Hi there! What’s the difference between DenseArray and Array? It looks to me as if there were two different types (i.e., not one an alias of the other?), with no difference in the internal representation… :thinking: W…

---

## [Nested async testsets](https://discourse.julialang.org/t/nested-async-testsets/95367)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 4\
**Last updated:** [March 4, 2023, 1:38pm UTC](https://discourse.julialang.org/t/nested-async-testsets/95367 "2023-03-04T13:38:04Z")

</div>

Documenting this mostly for myself, but may be useful for others as well. Julia currently does not handle nested asynchronous test sets correctly. julia\> @testset verbose=true "foo" begin @sync @async @test…

---

## [Imshow in Makie](https://discourse.julialang.org/t/imshow-in-makie/95460)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 3\
**Last updated:** [March 4, 2023, 1:27pm UTC](https://discourse.julialang.org/t/imshow-in-makie/95460 "2023-03-04T13:27:05Z")

</div>

Is there some convenience function to show an image in Makie? I have to transpose and reverse the y-axis everytime. And I often forget…

---

## [Selectively transform columns from a list of string names? Not sure why this doesn't work](https://discourse.julialang.org/t/selectively-transform-columns-from-a-list-of-string-names-not-sure-why-this-doesnt-work/95504)

<div class="topic-metadata">

**Author:** [@Olaf](https://discourse.julialang.org/u/Olaf)\
**Replies:** 10\
**Last updated:** [March 4, 2023, 10:07am UTC](https://discourse.julialang.org/t/selectively-transform-columns-from-a-list-of-string-names-not-sure-why-this-doesnt-work/95504 "2023-03-04T10:07:42Z")

</div>

Essentially, I have a very large DataFrame df. In that DataFrame there’s a column called “Total Population”. I want to put the data from df into a dataframe df\_per\_capita, which divides every the cells in every column by…

---

## [Language Server crashes and can't download cached packages](https://discourse.julialang.org/t/language-server-crashes-and-cant-download-cached-packages/95536)

<div class="topic-metadata">

**Author:** [@lyinch](https://discourse.julialang.org/u/lyinch)\
**Replies:** 0\
**Last updated:** [March 4, 2023, 9:47am UTC](https://discourse.julialang.org/t/language-server-crashes-and-cant-download-cached-packages/95536 "2023-03-04T09:47:41Z")

</div>

Hey, I’m on an M1 mac 12.1 with vscode 1.76.0, julia version 1.8.5, and vscode julia extension v1.38.2. The language server is constantly crashing without a server trace, but with the following output: Activating proj…

---

## [WGLMakie in Pluto firefox overuse of CPU resources](https://discourse.julialang.org/t/wglmakie-in-pluto-firefox-overuse-of-cpu-resources/95494)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 1\
**Last updated:** [March 4, 2023, 9:09am UTC](https://discourse.julialang.org/t/wglmakie-in-pluto-firefox-overuse-of-cpu-resources/95494 "2023-03-04T09:09:15Z")

</div>

I am using WGLMakie to make some interactive plots in Pluto. After making some, my % CPU resources spike like following: starting with no WGLMakie figure and ca. 30% CPU usage 1 figure ca. 150 % CPU usage 2 figure ca…

---

## [LoadError: ArgumentError](https://discourse.julialang.org/t/loaderror-argumenterror/95531)

<div class="topic-metadata">

**Author:** [@nero](https://discourse.julialang.org/u/nero)\
**Replies:** 1\
**Last updated:** [March 4, 2023, 7:29am UTC](https://discourse.julialang.org/t/loaderror-argumenterror/95531 "2023-03-04T07:29:04Z")

</div>

Greetings I have this command line in a code that works file in linux Function = Function\_F2(“./Folder/File1.csv”,“./Folder/File2.csv”) But when I run it in windows I get the following error; ERROR: LoadError: Argume…

---

## [StochasticDiffEq Tau-Leaping maxiters](https://discourse.julialang.org/t/stochasticdiffeq-tau-leaping-maxiters/95517)

<div class="topic-metadata">

**Author:** [@arnold-c](https://discourse.julialang.org/u/arnold-c)\
**Replies:** 10\
**Last updated:** [March 4, 2023, 5:49am UTC](https://discourse.julialang.org/t/stochasticdiffeq-tau-leaping-maxiters/95517 "2023-03-04T05:49:13Z")

</div>

I’m relatively new to Julia and JumpProcesses.jl, so apologies if this is somewhat basic, but I’m having an issue trying to convert the example SIR model with tau-leaping from density-dependent to frequency dependent i.e…

---

## [Is it worthwhile for a regular Julia user to learn SQL?](https://discourse.julialang.org/t/is-it-worthwhile-for-a-regular-julia-user-to-learn-sql/95387)

<div class="topic-metadata">

**Author:** [@oviedorodolfo](https://discourse.julialang.org/u/oviedorodolfo)\
**Replies:** 4\
**Last updated:** [March 4, 2023, 2:03am UTC](https://discourse.julialang.org/t/is-it-worthwhile-for-a-regular-julia-user-to-learn-sql/95387 "2023-03-04T02:03:56Z")

</div>

Is it worthwhile to learn SQL for someone who will seldom need to access SQL databases? I so, what dialect?

---

## [Automatic difference of complex constitutive law](https://discourse.julialang.org/t/automatic-difference-of-complex-constitutive-law/95519)

<div class="topic-metadata">

**Author:** [@Kim](https://discourse.julialang.org/u/Kim)\
**Replies:** 2\
**Last updated:** [March 4, 2023, 12:40am UTC](https://discourse.julialang.org/t/automatic-difference-of-complex-constitutive-law/95519 "2023-03-04T00:40:05Z")

</div>

Hello, these days I am striving to realize a Jacobin of constitutive law in finite element simulation. I use the SparseDiffTools.jl, which accurately works at the linear elastic stage. However, when the displacements of …

---

## [\[Resolved\] Julia, Cantera, PyCall](https://discourse.julialang.org/t/resolved-julia-cantera-pycall/95510)

<div class="topic-metadata">

**Author:** [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Replies:** 11\
**Last updated:** [March 3, 2023, 9:35pm UTC](https://discourse.julialang.org/t/resolved-julia-cantera-pycall/95510 "2023-03-03T21:35:00Z")

</div>

Hello, This is a bit of a stupid question because I don’t know the Python language. How to convert these instructions to Julia? \>\>\> II = \[i for i,r in enumerate(g.reactions()) ... if 'CO' in r.reactants and 'CO2…

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

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