# Latest

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

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

**Page:** 365

---

## [How to join existing and new parametric types under a common abstract type?](https://discourse.julialang.org/t/how-to-join-existing-and-new-parametric-types-under-a-common-abstract-type/116714)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 9\
**Last updated:** [July 12, 2024, 8:22pm UTC](https://discourse.julialang.org/t/how-to-join-existing-and-new-parametric-types-under-a-common-abstract-type/116714 "2024-07-12T20:22:54Z")

</div>

I do not know how types work internally, so I’d like some advice on how to achieve high performance code. My script already takes into account the general performance tips: my helper functions \_my\_kernel\_function(...) on…

---

## [32-bit TIFs?](https://discourse.julialang.org/t/32-bit-tifs/116931)

<div class="topic-metadata">

**Author:** [@EricChameroy](https://discourse.julialang.org/u/EricChameroy)\
**Replies:** 2\
**Last updated:** [July 12, 2024, 5:47pm UTC](https://discourse.julialang.org/t/32-bit-tifs/116931 "2024-07-12T17:47:49Z")

</div>

Hello, Is it possible to save images as 32-bit TIFs? When attempting to save Float32 matrices using TiffImages.jl, I only get 8-bit TIFs. Thanks!

---

## [Delete all packages installed in an environment](https://discourse.julialang.org/t/delete-all-packages-installed-in-an-environment/116930)

<div class="topic-metadata">

**Author:** [@curious](https://discourse.julialang.org/u/curious)\
**Replies:** 5\
**Last updated:** [July 12, 2024, 3:08pm UTC](https://discourse.julialang.org/t/delete-all-packages-installed-in-an-environment/116930 "2024-07-12T15:08:45Z")

</div>

Suppose to try out a few things I create an environment as described here. I install some packages and test the things I want to. Now I want to delete all the packages that I installed in this environment. Is there a com…

---

## [Julia -\> C function (Create thead) -\> Julia CUDA kernel issue](https://discourse.julialang.org/t/julia-c-function-create-thead-julia-cuda-kernel-issue/116965)

<div class="topic-metadata">

**Author:** [@miniskar](https://discourse.julialang.org/u/miniskar)\
**Replies:** 1\
**Last updated:** [July 12, 2024, 12:26pm UTC](https://discourse.julialang.org/t/julia-c-function-create-thead-julia-cuda-kernel-issue/116965 "2024-07-12T12:26:32Z")

</div>

I am facing a weird problem in our application. We have a julia function calling a C function, which is creating a pthread and calling Julia CUDA kernel. I have created a small example to illustrate and reproduce the pro…

---

## [What kind of JuliaCon 2024 merchandise would you like?](https://discourse.julialang.org/t/what-kind-of-juliacon-2024-merchandise-would-you-like/116368)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 21\
**Last updated:** [July 12, 2024, 11:55am UTC](https://discourse.julialang.org/t/what-kind-of-juliacon-2024-merchandise-would-you-like/116368 "2024-07-12T11:55:26Z")

</div>

We have a limited amount of funds for JuliaCon 2024 merchandise this year. What kind of merchandise would you be interested in buying at JuliaCon 2024? poll

---

## [Errors Encountered While Running Examples from FMIFlux.jl Documentation](https://discourse.julialang.org/t/errors-encountered-while-running-examples-from-fmiflux-jl-documentation/116905)

<div class="topic-metadata">

**Author:** [@CurioMath](https://discourse.julialang.org/u/CurioMath)\
**Replies:** 1\
**Last updated:** [July 12, 2024, 11:36am UTC](https://discourse.julialang.org/t/errors-encountered-while-running-examples-from-fmiflux-jl-documentation/116905 "2024-07-12T11:36:06Z")

</div>

I have been trying to run the examples provided in the documentation of FMIFlux.jl, loading models from FMIZoo.jl. However, I often face errors while executing the following lines of code from the documentation examples. …

---

## [Nan value with parallelization on Trixi.jl Taylor Green Vortex test case](https://discourse.julialang.org/t/nan-value-with-parallelization-on-trixi-jl-taylor-green-vortex-test-case/116765)

<div class="topic-metadata">

**Author:** [@Kelian\_Renoux](https://discourse.julialang.org/u/Kelian_Renoux)\
**Replies:** 4\
**Last updated:** [July 12, 2024, 11:14am UTC](https://discourse.julialang.org/t/nan-value-with-parallelization-on-trixi-jl-taylor-green-vortex-test-case/116765 "2024-07-12T11:14:17Z")

</div>

Hello, I am trying to run the p4est Taylor Green Vortex test case on multiple processors but I am facing really weird instabilities. After the first iteration, all values of density, velocity and pressure are Nan. This i…

---

## [OpenFoam blockMesh output as Trixi input](https://discourse.julialang.org/t/openfoam-blockmesh-output-as-trixi-input/116875)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 3\
**Last updated:** [July 12, 2024, 10:19am UTC](https://discourse.julialang.org/t/openfoam-blockmesh-output-as-trixi-input/116875 "2024-07-12T10:19:06Z")

</div>

What is require for Trixi to read the meshes that blockMesh in OpenFoam generates? Congrats for a wonderful talk at JuliaCon!

---

## [Project-specific startup.jl file](https://discourse.julialang.org/t/project-specific-startup-jl-file/116933)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 10\
**Last updated:** [July 12, 2024, 9:56am UTC](https://discourse.julialang.org/t/project-specific-startup-jl-file/116933 "2024-07-12T09:56:34Z")

</div>

I have many script-style small projects that I frequently need to switch between. Currently, I’m using the following two-step process to “launch” a project: \> julia --project=path/to/project julia\> includet("path/to/pro…

---

## [Creating a 2D computational Domain in trixi](https://discourse.julialang.org/t/creating-a-2d-computational-domain-in-trixi/115399)

<div class="topic-metadata">

**Author:** [@Chowdhury\_MD\_Irtiza](https://discourse.julialang.org/u/Chowdhury_MD_Irtiza)\
**Replies:** 1\
**Last updated:** [July 12, 2024, 9:56am UTC](https://discourse.julialang.org/t/creating-a-2d-computational-domain-in-trixi/115399 "2024-07-12T09:56:32Z")

</div>

I want to create a 2D domain for simulation analysis in Trixi. The domain follows a 2D domain of length 5400 mm and Height of 60 mm, which has 4 obstacles of length L= 12 mm and height H= 18 mm. These obstacles are pla…

---

## [Linsolve vs. PETSc for transient laminar Navier - Stokes](https://discourse.julialang.org/t/linsolve-vs-petsc-for-transient-laminar-navier-stokes/116876)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 1\
**Last updated:** [July 12, 2024, 9:47am UTC](https://discourse.julialang.org/t/linsolve-vs-petsc-for-transient-laminar-navier-stokes/116876 "2024-07-12T09:47:18Z")

</div>

The question that follows was phrased at JuliaCon: given: suppose solving a 2D / 3D transient laminar Navier-Stokes problems (lid-driven cavity, flow part cylinder or airfoil) using Gridap, Trixi or similar how do the …

---

## [Question about environment](https://discourse.julialang.org/t/question-about-environment/116129)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 17\
**Last updated:** [July 12, 2024, 8:31am UTC](https://discourse.julialang.org/t/question-about-environment/116129 "2024-07-12T08:31:12Z")

</div>

Recently，I am subject to a problem like this: I have a package “MyPackage” depending on the “CBLS.jl” which in turn depends on JuMP@v0.21.5, but I also need “MyPackage” to depend on JuMP@v1.22.2. When I upgraded all the…

---

## [Legend with many labels can't fit in output](https://discourse.julialang.org/t/legend-with-many-labels-cant-fit-in-output/116947)

<div class="topic-metadata">

**Author:** [@AtomsForHire](https://discourse.julialang.org/u/AtomsForHire)\
**Replies:** 2\
**Last updated:** [July 12, 2024, 8:09am UTC](https://discourse.julialang.org/t/legend-with-many-labels-cant-fit-in-output/116947 "2024-07-12T08:09:49Z")

</div>

Hello, I have a plot with many lines, and a legend with labels for all those lines. Here is an example output. using CairoMakie set\_theme!(theme\_latexfonts()) update\_theme!( palette=(color=ColorSchemes.glasbey\_cat…

---

## [How to skip precompilation on \`using\`/\`import\` (for any given package)?](https://discourse.julialang.org/t/how-to-skip-precompilation-on-using-import-for-any-given-package/116917)

<div class="topic-metadata">

**Author:** [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Replies:** 1\
**Last updated:** [July 12, 2024, 7:11am UTC](https://discourse.julialang.org/t/how-to-skip-precompilation-on-using-import-for-any-given-package/116917 "2024-07-12T07:11:39Z")

</div>

I have a startup.jl file with using Revise using OhMyREPL redirect\_stderr(devnull) do @eval using AbbreviatedStackTraces end Since AbbreviatedStackTraces.jl doesn’t support precompilation, I silenced the warnings w…

---

## [Missing coverage files for src files](https://discourse.julialang.org/t/missing-coverage-files-for-src-files/116934)

<div class="topic-metadata">

**Author:** [@Louis2099](https://discourse.julialang.org/u/Louis2099)\
**Replies:** 0\
**Last updated:** [July 12, 2024, 3:10am UTC](https://discourse.julialang.org/t/missing-coverage-files-for-src-files/116934 "2024-07-12T03:10:25Z")

</div>

I’m trying to do code coverage analysis for my new package, and I run the runtests.jl in following ways: julia --code-coverage test/runtests.jl this only generated .cov files for the code in test/ but no coverage data …

---

## [Unit tests, debugger, VsCode](https://discourse.julialang.org/t/unit-tests-debugger-vscode/113419)

<div class="topic-metadata">

**Author:** [@feribg](https://discourse.julialang.org/u/feribg)\
**Replies:** 4\
**Last updated:** [July 12, 2024, 1:06am UTC](https://discourse.julialang.org/t/unit-tests-debugger-vscode/113419 "2024-07-12T01:06:02Z")

</div>

What is the recommended workflow for using tests + vscode official Julia extension + debugger. It seems like they just can’t be made to work together. If I run the file runtests.jl using TestItemRunner @run\_package\_tes…

---

## [Passing a format string as a function argument](https://discourse.julialang.org/t/passing-a-format-string-as-a-function-argument/116929)

<div class="topic-metadata">

**Author:** [@brombo](https://discourse.julialang.org/u/brombo)\
**Replies:** 2\
**Last updated:** [July 11, 2024, 11:44pm UTC](https://discourse.julialang.org/t/passing-a-format-string-as-a-function-argument/116929 "2024-07-11T23:44:41Z")

</div>

I am trying to pass a format string as a function argument in the following code - using Printf fmt = "%.0e" function latex\_exp\_note(flt,fmt) s = @sprintf(fmt,flt) b,e = split(s,"e") e = replace(e,"+"=\>"")…

---

## [Roundoff error in variance of array of constant value](https://discourse.julialang.org/t/roundoff-error-in-variance-of-array-of-constant-value/116890)

<div class="topic-metadata">

**Author:** [@jgr](https://discourse.julialang.org/u/jgr)\
**Replies:** 7\
**Last updated:** [July 11, 2024, 10:31pm UTC](https://discourse.julialang.org/t/roundoff-error-in-variance-of-array-of-constant-value/116890 "2024-07-11T22:31:28Z")

</div>

In the code below, var(M) is not 0, I guess the reason might be computation error, but I wonder if anyone knows how to deal with this? Thanks in advance. M = fill(5.421241248937501521, (1,10000)) M = Float64.(M) var(M) …

---

## [How to convert a Dict to a Struct](https://discourse.julialang.org/t/how-to-convert-a-dict-to-a-struct/116916)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [July 11, 2024, 9:21pm UTC](https://discourse.julialang.org/t/how-to-convert-a-dict-to-a-struct/116916 "2024-07-11T21:21:09Z")

</div>

How can I convert a dict to a struct? I have the following code: set\_dict=Dict{String, Any}("log\_level" =\> 1.0, "area" =\> 20.0, "solver" =\> "IDA") mutable struct Settings log\_level::Int64 area::Float64 sol…

---

## [External functions in GPU ODE example](https://discourse.julialang.org/t/external-functions-in-gpu-ode-example/116719)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 7\
**Last updated:** [July 11, 2024, 9:07pm UTC](https://discourse.julialang.org/t/external-functions-in-gpu-ode-example/116719 "2024-07-11T21:07:36Z")

</div>

Hi all, I have tried adapting the DiffEqGPU example to my own example which depends on some external functions. The error is quite dense so if someone could point me in the right direction this would be a big help. Exa…

---

## [Scaled diagonally dominant programming](https://discourse.julialang.org/t/scaled-diagonally-dominant-programming/116853)

<div class="topic-metadata">

**Author:** [@Khashayar-Neshat](https://discourse.julialang.org/u/Khashayar-Neshat)\
**Replies:** 2\
**Last updated:** [July 11, 2024, 8:47pm UTC](https://discourse.julialang.org/t/scaled-diagonally-dominant-programming/116853 "2024-07-11T20:47:52Z")

</div>

In polynomial optimization, one can check the certificate of nonnegativity with sums of squares (SOS) optimization which leads to semidefinite programming. Another more conservative approach is to use SDSOS optimization …

---

## [Is it possilbe to call a .dll compiled via julia itself?](https://discourse.julialang.org/t/is-it-possilbe-to-call-a-dll-compiled-via-julia-itself/116710)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 8\
**Last updated:** [July 11, 2024, 8:32pm UTC](https://discourse.julialang.org/t/is-it-possilbe-to-call-a-dll-compiled-via-julia-itself/116710 "2024-07-11T20:32:14Z")

</div>

For instance, some code files need to be communicated with cooperators, but with critical information concealed. All the files could be compiled as .dll (in windows), so the question is whether it is possible to call a .…

---

## [Plots and LaTeXStrings not recognizing some LaTeX commands](https://discourse.julialang.org/t/plots-and-latexstrings-not-recognizing-some-latex-commands/116922)

<div class="topic-metadata">

**Author:** [@brombo](https://discourse.julialang.org/u/brombo)\
**Replies:** 4\
**Last updated:** [July 11, 2024, 8:19pm UTC](https://discourse.julialang.org/t/plots-and-latexstrings-not-recognizing-some-latex-commands/116922 "2024-07-11T20:19:24Z")

</div>

I am using Julia with Plots and LaTeXStrings to plot data. Here is an example The problem is that when I label the y-axis it works if the label string is - $| H |$ dB which is shown in the plot but if I use the st…

---

## [Passing a dict from Python to Julia](https://discourse.julialang.org/t/passing-a-dict-from-python-to-julia/116914)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [July 11, 2024, 5:38pm UTC](https://discourse.julialang.org/t/passing-a-dict-from-python-to-julia/116914 "2024-07-11T17:38:01Z")

</div>

How can I pass a Python dict to Julia using PythonCall? This is not working: from juliacall import Main as jl, convert as jlconvert setdict = { "log\_level": 1, "area": 20.0, "solver": "IDA" } jlstore = jl.seval…

---

## [Does float16 run natively on a compatible CPU?](https://discourse.julialang.org/t/does-float16-run-natively-on-a-compatible-cpu/116832)

<div class="topic-metadata">

**Author:** [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Replies:** 14\
**Last updated:** [July 11, 2024, 5:35pm UTC](https://discourse.julialang.org/t/does-float16-run-natively-on-a-compatible-cpu/116832 "2024-07-11T17:35:28Z")

</div>

Julia docs says f16 is implemented in software (presumably since most CPUs don’t support it). What about newer Xeons (IS AVX512) that accept f16?

---

## [Increased allocations when using threads](https://discourse.julialang.org/t/increased-allocations-when-using-threads/116902)

<div class="topic-metadata">

**Author:** [@throwaway](https://discourse.julialang.org/u/throwaway)\
**Replies:** 20\
**Last updated:** [July 11, 2024, 4:59pm UTC](https://discourse.julialang.org/t/increased-allocations-when-using-threads/116902 "2024-07-11T16:59:50Z")

</div>

Hello everyone, While playing with Base multithreading I noticed the following odd behaviour (MRE follows): # Single-threaded code always results in exactly one allocation julia\> a = 0.0; @allocations a+=π 1 # Reproduc…

---

## [\[ANN\] RadonKA.jl - A simple (exponential) Radon Transform in Julia](https://discourse.julialang.org/t/ann-radonka-jl-a-simple-exponential-radon-transform-in-julia/107127)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 3\
**Last updated:** [July 11, 2024, 2:27pm UTC](https://discourse.julialang.org/t/ann-radonka-jl-a-simple-exponential-radon-transform-in-julia/107127 "2024-07-11T14:27:54Z")

</div>

Hi! I created a package called RadonKA.jl which provides a parallel Radon and inverse Radon pair. What can it do? Further, it provides an exponential Radon transform which does not only calculate the line integral but …

---

## [Help reducing compilation and inference time](https://discourse.julialang.org/t/help-reducing-compilation-and-inference-time/116630)

<div class="topic-metadata">

**Author:** [@osimonn](https://discourse.julialang.org/u/osimonn)\
**Replies:** 71\
**Last updated:** [July 11, 2024, 1:53pm UTC](https://discourse.julialang.org/t/help-reducing-compilation-and-inference-time/116630 "2024-07-11T13:53:27Z")

</div>

We have a simulator in our company that’s fully written in Julia. The codebase is quite large. We have been suffering from very high latency for some time now. I took the initiative of trying to solve the latency issue b…

---

## [Threaded double loop](https://discourse.julialang.org/t/threaded-double-loop/116144)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 10\
**Last updated:** [July 11, 2024, 1:15pm UTC](https://discourse.julialang.org/t/threaded-double-loop/116144 "2024-07-11T13:15:14Z")

</div>

I am trying to write threaded code for the following calculation: given an opaque object x, and indices i, calculate y\_i = g(x, i), given each y\_i and indices j, calculate {z\_i}\_j = h(x, y\_i, j), reduce all the z…

---

## [Yggdrasil build has a bug on Windows](https://discourse.julialang.org/t/yggdrasil-build-has-a-bug-on-windows/116907)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 0\
**Last updated:** [July 11, 2024, 12:43pm UTC](https://discourse.julialang.org/t/yggdrasil-build-has-a-bug-on-windows/116907 "2024-07-11T12:43:42Z")

</div>

Hi, Maybe not the best place to ask/report this but don’t know a better one. In Yggdrasil the compilation of GMT on Windows is bugged. The simple function returns false when it should true true, and this only happen…

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

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