# Latest

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

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

**Page:** 518

---

## [Non-deterministic normalization of Tuples of Unions](https://discourse.julialang.org/t/non-deterministic-normalization-of-tuples-of-unions/108347)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 6\
**Last updated:** [January 4, 2024, 11:57pm UTC](https://discourse.julialang.org/t/non-deterministic-normalization-of-tuples-of-unions/108347 "2024-01-04T23:57:24Z")

</div>

One problem I wanted to point at is: julia\> sumN(n) = Union{\[ Tuple{\[ifelse(i & (1\<\<j) != 0, Int8, UInt8 ) for j=0:n-1\]...} for i = 0:(2^n-1)\]...} sumN (generic function with 1 method) julia\> prodN(n) = NTuple{n, Unio…

---

## [A lagged table-join for finding the last ten rows that meets a criterion, for each row](https://discourse.julialang.org/t/a-lagged-table-join-for-finding-the-last-ten-rows-that-meets-a-criterion-for-each-row/108352)

<div class="topic-metadata">

**Author:** [@Cong](https://discourse.julialang.org/u/Cong)\
**Replies:** 6\
**Last updated:** [January 4, 2024, 10:54pm UTC](https://discourse.julialang.org/t/a-lagged-table-join-for-finding-the-last-ten-rows-that-meets-a-criterion-for-each-row/108352 "2024-01-04T22:54:45Z")

</div>

I have a dataframe like below. I am trying to add 6 columns to it: Out1Bac1, Out1Bac2, Out1Bac3, Out2Bac1, Out2Bac2, Out2Bac3. For each row, find the last row whose abschoice equals the CP1 of the current row, and get t…

---

## [Inline Math Rules / Reference / Cheat Sheet?](https://discourse.julialang.org/t/inline-math-rules-reference-cheat-sheet/108315)

<div class="topic-metadata">

**Author:** [@benslinux](https://discourse.julialang.org/u/benslinux)\
**Replies:** 17\
**Last updated:** [January 4, 2024, 8:48pm UTC](https://discourse.julialang.org/t/inline-math-rules-reference-cheat-sheet/108315 "2024-01-04T20:48:29Z")

</div>

Is there a reference page somewhere in the Julia documentation with the rules for properly writing inline math strings? The string is then able to be converted with Latexify and used with Markdown to graphically render e…

---

## [GISTRtree: Fast spatial queries via STR trees for GeoInterface geometries](https://discourse.julialang.org/t/gistrtree-fast-spatial-queries-via-str-trees-for-geointerface-geometries/108348)

<div class="topic-metadata">

**Author:** [@maxfreu](https://discourse.julialang.org/u/maxfreu)\
**Replies:** 0\
**Last updated:** [January 4, 2024, 3:46pm UTC](https://discourse.julialang.org/t/gistrtree-fast-spatial-queries-via-str-trees-for-geointerface-geometries/108348 "2024-01-04T15:46:12Z")

</div>

Hi! I just wrote a small package to perform spatial queries on an STR (sort tile recursive) tree that should work for all GeoInterface geometries supporting extent: GISTRtree. Currently the implementation is a bit brute-…

---

## [Syntax for documenting enum members](https://discourse.julialang.org/t/syntax-for-documenting-enum-members/108355)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [January 4, 2024, 8:35pm UTC](https://discourse.julialang.org/t/syntax-for-documenting-enum-members/108355 "2024-01-04T20:35:24Z")

</div>

It would be nice to have a syntax for documenting enum members. For instance: @enum Fruit begin "round" APPLE "long" BANANA end which is currently an error. Thoughts?

---

## [Using types as parameters of a function](https://discourse.julialang.org/t/using-types-as-parameters-of-a-function/108342)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 3\
**Last updated:** [January 4, 2024, 8:01pm UTC](https://discourse.julialang.org/t/using-types-as-parameters-of-a-function/108342 "2024-01-04T20:01:33Z")

</div>

We have the following code: abstract type MyType end struct MyType1 \<: MyType end myfun(::MyType1, x, args...) = x How can I call the function ‘myfun’? julia\> myfun(::MyType1, 2) ERROR: syntax: invalid "::" sy…

---

## [Deconstructing UnionAll types](https://discourse.julialang.org/t/deconstructing-unionall-types/108328)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 2\
**Last updated:** [January 4, 2024, 7:41pm UTC](https://discourse.julialang.org/t/deconstructing-unionall-types/108328 "2024-01-04T19:41:37Z")

</div>

The following naive definition is invalid, but you don’t realize it until you try it: julia\> f(::Type{Set{\<:W}} where W) = W f (generic function with 4 methods) Here goes… julia\> f(Set{\<:Integer}) ERROR: UndefVarError…

---

## [Object paths across julia modules](https://discourse.julialang.org/t/object-paths-across-julia-modules/108195)

<div class="topic-metadata">

**Author:** [@thomaskroi1996](https://discourse.julialang.org/u/thomaskroi1996)\
**Replies:** 2\
**Last updated:** [January 4, 2024, 6:49pm UTC](https://discourse.julialang.org/t/object-paths-across-julia-modules/108195 "2024-01-04T18:49:15Z")

</div>

Hey everyone! I am currently developing a package and I have encountered a small problem. Imagine the following situation. I have a module1 and module2, full of functions and a module3 full of objects/structs. This is …

---

## [Line number info missing when Windows DLL gets EXCEPTION\_ACCESS\_VIOLATION](https://discourse.julialang.org/t/line-number-info-missing-when-windows-dll-gets-exception-access-violation/108353)

<div class="topic-metadata">

**Author:** [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Replies:** 2\
**Last updated:** [January 4, 2024, 6:32pm UTC](https://discourse.julialang.org/t/line-number-info-missing-when-windows-dll-gets-exception-access-violation/108353 "2024-01-04T18:32:53Z")

</div>

The DLL was compiled using MSVC toolchain with debug configuration. A .pdb file was generated alongside the .dll file. But it seems line number information is not being made available to Julia’s access violation handler: …

---

## [Using REPL vs using Terminal and .jl file?](https://discourse.julialang.org/t/using-repl-vs-using-terminal-and-jl-file/107653)

<div class="topic-metadata">

**Author:** [@benslinux](https://discourse.julialang.org/u/benslinux)\
**Replies:** 9\
**Last updated:** [January 4, 2024, 5:28pm UTC](https://discourse.julialang.org/t/using-repl-vs-using-terminal-and-jl-file/107653 "2024-01-04T17:28:38Z")

</div>

\# Define the first two Fibonacci numbers a, b = 0, 1 # Print the first two numbers println(a) println(b) # Loop until the current number is greater than 50 while b \<= 50 # Calculate the next Fibonacci number c = a…

---

## [ABM - Scheduler.bytype just for 1 agent function](https://discourse.julialang.org/t/abm-scheduler-bytype-just-for-1-agent-function/107611)

<div class="topic-metadata">

**Author:** [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Replies:** 2\
**Last updated:** [January 4, 2024, 5:25pm UTC](https://discourse.julialang.org/t/abm-scheduler-bytype-just-for-1-agent-function/107611 "2024-01-04T17:25:25Z")

</div>

Dear all, I am running an ABM model with NoSpaceAgent representing sardines populations over time with three lifestages identified by the field type::Symbol and with 2 sexes (sex::Symbol). Adults can spawn in a period …

---

## [ModelingToolkit model with structural\_simplify error: How to initialize variables correctly?](https://discourse.julialang.org/t/modelingtoolkit-model-with-structural-simplify-error-how-to-initialize-variables-correctly/108110)

<div class="topic-metadata">

**Author:** [@juanmvenegas](https://discourse.julialang.org/u/juanmvenegas)\
**Replies:** 5\
**Last updated:** [January 4, 2024, 2:49pm UTC](https://discourse.julialang.org/t/modelingtoolkit-model-with-structural-simplify-error-how-to-initialize-variables-correctly/108110 "2024-01-04T14:49:41Z")

</div>

Hello everybody, I am currently developing a ModelingToolkit.jl model to simulate axial flow in a tubular pipe with a chemical reaction, including axial diffusion. This system is currently an initial value problem, and …

---

## [Error from conversion of missing values to NaNs](https://discourse.julialang.org/t/error-from-conversion-of-missing-values-to-nans/108321)

<div class="topic-metadata">

**Author:** [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Replies:** 12\
**Last updated:** [January 4, 2024, 2:35pm UTC](https://discourse.julialang.org/t/error-from-conversion-of-missing-values-to-nans/108321 "2024-01-04T14:35:35Z")

</div>

A is a value I read out of an NetCDF file (32 bit). Its size is 360x180x30. Here is my code to convert its missing values into NaNs: A\[ismissing.(A)\] .= NaN; Why does the above script work perfectly fine, but every t…

---

## [Embedding Julia: GC race conditions](https://discourse.julialang.org/t/embedding-julia-gc-race-conditions/108346)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 0\
**Last updated:** [January 4, 2024, 2:29pm UTC](https://discourse.julialang.org/t/embedding-julia-gc-race-conditions/108346 "2024-01-04T14:29:27Z")

</div>

I’m trying to understand how GC interaction from C works in case of multiple threads. How are race conditions avoided? The manual says: When writing code that embeds Julia, it is generally safe to use jl\_value\_t\* valu…

---

## [REPL.TerminalMenus RadioMenu pre-selected option distinct from first one](https://discourse.julialang.org/t/repl-terminalmenus-radiomenu-pre-selected-option-distinct-from-first-one/108345)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 1\
**Last updated:** [January 4, 2024, 2:21pm UTC](https://discourse.julialang.org/t/repl-terminalmenus-radiomenu-pre-selected-option-distinct-from-first-one/108345 "2024-01-04T14:21:53Z")

</div>

Hi there, Does the RadioMenu command from the REPL.TerminalMenus module have an argument that allows, for convenience, to have the default pre-selected option different from the first one? I mean something like: orange…

---

## [Dynamically create Struct](https://discourse.julialang.org/t/dynamically-create-struct/108259)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 12\
**Last updated:** [January 4, 2024, 1:53pm UTC](https://discourse.julialang.org/t/dynamically-create-struct/108259 "2024-01-04T13:53:10Z")

</div>

Hello everyone :grin:! I am working on a compartment model for a Markov chain simulation. The parameters of the compartment model (name of each compartment and transition matrix) are defined in an excel file. A Compartm…

---

## [Is it possible to detect garbage collection on a custom struct?](https://discourse.julialang.org/t/is-it-possible-to-detect-garbage-collection-on-a-custom-struct/108338)

<div class="topic-metadata">

**Author:** [@ThummeTo](https://discourse.julialang.org/u/ThummeTo)\
**Replies:** 2\
**Last updated:** [January 4, 2024, 1:02pm UTC](https://discourse.julialang.org/t/is-it-possible-to-detect-garbage-collection-on-a-custom-struct/108338 "2024-01-04T13:02:48Z")

</div>

Hi! I am using an external library (LIB or DLL) to allocate and free memory that is not in the scope of the garbage collector, in the following example externalAlloc and externalFree. For better handling, I packed the m…

---

## [show(\[io::IO = stdout\], x), the keyword argument is not at the end?](https://discourse.julialang.org/t/show-io-io-stdout-x-the-keyword-argument-is-not-at-the-end/108339)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 1\
**Last updated:** [January 4, 2024, 1:04pm UTC](https://discourse.julialang.org/t/show-io-io-stdout-x-the-keyword-argument-is-not-at-the-end/108339 "2024-01-04T13:04:33Z")

</div>

help?\> show search: show showable showerror @show @showtime Cshort Cushort hasmethod searchsorted searchsortedlast searchsortedfirst show(\[io::IO = stdout\], x) Write a text representation of a value x to the output…

---

## [Type stability with type as argument and permutedims](https://discourse.julialang.org/t/type-stability-with-type-as-argument-and-permutedims/108335)

<div class="topic-metadata">

**Author:** [@snowgum](https://discourse.julialang.org/u/snowgum)\
**Replies:** 3\
**Last updated:** [January 4, 2024, 12:08pm UTC](https://discourse.julialang.org/t/type-stability-with-type-as-argument-and-permutedims/108335 "2024-01-04T12:08:48Z")

</div>

I am experiencing poor performance (maybe type unstable?) when having a type as an optional argument to a function, and using permutedims inside. I’m having difficulty understanding why the first function is much slower …

---

## [JuMP: Good first issue](https://discourse.julialang.org/t/jump-good-first-issue/108313)

<div class="topic-metadata">

**Author:** [@Paulnkk](https://discourse.julialang.org/u/Paulnkk)\
**Replies:** 3\
**Last updated:** [January 4, 2024, 12:05pm UTC](https://discourse.julialang.org/t/jump-good-first-issue/108313 "2024-01-04T12:05:05Z")

</div>

Hey, I am new in the jump community and wanted to learn more about it due to various applications for my phd research. I have some developer experience in cvxpy and happy to learn more! Here I wanted to ask if there are …

---

## [Makie: Errorbars for grouped bar graphs](https://discourse.julialang.org/t/makie-errorbars-for-grouped-bar-graphs/62361)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 13\
**Last updated:** [January 4, 2024, 9:21am UTC](https://discourse.julialang.org/t/makie-errorbars-for-grouped-bar-graphs/62361 "2024-01-04T09:21:29Z")

</div>

How can I add errorbars to a grouped bar plot in Makie.jl? One option is to use crossbar, but this generates a bar graph indicating the error range, not the usual line + whisker.

---

## [Redefining == operator doesn't behave expectedly](https://discourse.julialang.org/t/redefining-operator-doesnt-behave-expectedly/108303)

<div class="topic-metadata">

**Author:** [@Joslacrosse](https://discourse.julialang.org/u/Joslacrosse)\
**Replies:** 4\
**Last updated:** [January 4, 2024, 7:18am UTC](https://discourse.julialang.org/t/redefining-operator-doesnt-behave-expectedly/108303 "2024-01-04T07:18:55Z")

</div>

I have a problem with a coding execise from Exercism, i habe been trying to solve it for some hours now I think the problem lies with the connectd == and != as if i tests the statements individually they work out. Does…

---

## [Julia environment falsely detected in a Quarto/Python project](https://discourse.julialang.org/t/julia-environment-falsely-detected-in-a-quarto-python-project/108331)

<div class="topic-metadata">

**Author:** [@EmiliaJarochowska](https://discourse.julialang.org/u/EmiliaJarochowska)\
**Replies:** 0\
**Last updated:** [January 4, 2024, 6:56am UTC](https://discourse.julialang.org/t/julia-environment-falsely-detected-in-a-quarto-python-project/108331 "2024-01-04T06:56:45Z")

</div>

Hello, probably a silly problem: I use Julia in other projects, but in one that has nothing to do with Julia (it’s a poetry & pipenv venv with Quarto files written in Python and some Python scripts to manage that project…

---

## [Global variable issue](https://discourse.julialang.org/t/global-variable-issue/108288)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 28\
**Last updated:** [January 4, 2024, 6:24am UTC](https://discourse.julialang.org/t/global-variable-issue/108288 "2024-01-04T06:24:20Z")

</div>

It is quite strange that with the following code N = 10 M = 10 dim = binomial(N+M-1, M-1) basis=zeros(Int8, M, dim) basis\[1,1\]=N s=1 while basis\[M,s\]\<N s1=M-1 while basis\[s1,s\]==0 s1=s1-1 end …

---

## ['Int' as a reserved word](https://discourse.julialang.org/t/int-as-a-reserved-word/108322)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 3\
**Last updated:** [January 4, 2024, 6:17am UTC](https://discourse.julialang.org/t/int-as-a-reserved-word/108322 "2024-01-04T06:17:28Z")

</div>

My code has such a line Int=sparse(COO1\[1,:\],COO1\[2,:\],COO1\[3,:\],dim,dim) It got an error: ERROR: cannot assign a value to imported variable Core.Int from module Main It seems that ‘Int’ is a reserved word of julia. …

---

## [Calculate Equilibrium points for continuous system DynamicalSystems.jl](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 9\
**Last updated:** [January 4, 2024, 4:50am UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247 "2024-01-04T04:50:49Z")

</div>

I need calculate all equilibrium points for dynamical system Hindmarsh Rose (HR). Code for system: function HR!(du, u, p, t) function sigma(x) return 1.0 / ( 1.0 + exp( -10.0 \* ( x - ( - 0.25 ) ) )…

---

## [The same name for a function and a variable](https://discourse.julialang.org/t/the-same-name-for-a-function-and-a-variable/108325)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 2\
**Last updated:** [January 4, 2024, 3:17am UTC](https://discourse.julialang.org/t/the-same-name-for-a-function-and-a-variable/108325 "2024-01-04T03:17:29Z")

</div>

julia\> function dis(x, y) return dis = sqrt(x^2 + y^2) end dis (generic function with 1 method) julia\> a = dis(1, 2) 2.23606797749979 julia\> dis = dis(1,2) ERROR: invalid redefinition of constant dis Sta…

---

## [Github 2 factor authorization](https://discourse.julialang.org/t/github-2-factor-authorization/108323)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 0\
**Last updated:** [January 4, 2024, 1:40am UTC](https://discourse.julialang.org/t/github-2-factor-authorization/108323 "2024-01-04T01:40:56Z")

</div>

Github is mandating 2 factor authentication. In trying to implement this I made it to the webpage. I have a code in the box for Verify the code from the app and click on Continue and get no further. Any idea of what m…

---

## [Lux Loss Not Decreasing](https://discourse.julialang.org/t/lux-loss-not-decreasing/108277)

<div class="topic-metadata">

**Author:** [@Dale\_James\_Black](https://discourse.julialang.org/u/Dale_James_Black)\
**Replies:** 1\
**Last updated:** [January 4, 2024, 12:18am UTC](https://discourse.julialang.org/t/lux-loss-not-decreasing/108277 "2024-01-04T00:18:42Z")

</div>

I am currently developing a comprehensive tutorial for my lab and the broader Julia community on training a Lux model for image segmentation. This tutorial is contained within a Pluto notebook that encompasses the entire…

---

## [Inline error message doesn't show up in VSCode-Insiders](https://discourse.julialang.org/t/inline-error-message-doesnt-show-up-in-vscode-insiders/62707)

<div class="topic-metadata">

**Author:** [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Replies:** 3\
**Last updated:** [January 3, 2024, 11:28pm UTC](https://discourse.julialang.org/t/inline-error-message-doesnt-show-up-in-vscode-insiders/62707 "2024-01-03T23:28:59Z")

</div>

HI! I recently moved from VSCode to VSCode-Insiders. I am really enjoying working there, but I cannot see the red inline error message when there is something in my code that is not working. For example, while in VSCode …

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

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