# Latest

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

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

**Page:** 455

---

## [Compilation time of Flux models](https://discourse.julialang.org/t/compilation-time-of-flux-models/110895)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 9\
**Last updated:** [March 19, 2024, 4:54pm UTC](https://discourse.julialang.org/t/compilation-time-of-flux-models/110895 "2024-03-19T16:54:11Z")

</div>

Cheers, I am struggling to pinpoint why a certain FCN with less than 1M parameters trains much slower than another one with 30M parameters. Then, I realized that, on every epoch, the train loop showed up around 90% of t…

---

## [Fastest way to fetch an index](https://discourse.julialang.org/t/fastest-way-to-fetch-an-index/111725)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 29\
**Last updated:** [March 19, 2024, 4:32pm UTC](https://discourse.julialang.org/t/fastest-way-to-fetch-an-index/111725 "2024-03-19T16:32:55Z")

</div>

~50% of my compute time ends up fetching the right index to index into a sorted array of floats with another float. At first I used findfirst, but this is the best I got for the moment: fetch(vec,x) = vec\[sum(y -\> y \<=…

---

## [Borrow checker with GC fallback?](https://discourse.julialang.org/t/borrow-checker-with-gc-fallback/111798)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 4\
**Last updated:** [March 19, 2024, 4:12pm UTC](https://discourse.julialang.org/t/borrow-checker-with-gc-fallback/111798 "2024-03-19T16:12:39Z")

</div>

GC incurs some overhead. It’d be nice if we don’t have to GC everything. In some cases, we can detect exactly when the memory needs to be freed at compile time. If so, would it be a good idea? Julia is a language that wa…

---

## [How to plot a curvilinear domain using Plots?](https://discourse.julialang.org/t/how-to-plot-a-curvilinear-domain-using-plots/111804)

<div class="topic-metadata">

**Author:** [@arturofburgos](https://discourse.julialang.org/u/arturofburgos)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 3:39pm UTC](https://discourse.julialang.org/t/how-to-plot-a-curvilinear-domain-using-plots/111804 "2024-03-19T15:39:58Z")

</div>

Hello Everyone, I have been trying to create the same plot here that I created using PyPlot, but now using Plots. Does anyone know how to work around this issue? using PyPlot # ion() # pygui(true) r\_ini = 1.0 r\_end = …

---

## [Interpolating variable to expr to be used in macro](https://discourse.julialang.org/t/interpolating-variable-to-expr-to-be-used-in-macro/111785)

<div class="topic-metadata">

**Author:** [@co1emi11er](https://discourse.julialang.org/u/co1emi11er)\
**Replies:** 9\
**Last updated:** [March 19, 2024, 2:52pm UTC](https://discourse.julialang.org/t/interpolating-variable-to-expr-to-be-used-in-macro/111785 "2024-03-19T14:52:21Z")

</div>

I want to write a macro that calls 2 macros. The second macro depends on the first macro. The first macro returns an expression that I want to pass to the second macro and I am unsure how to do this. See a simplified exa…

---

## [Difference between element-wise allocation and copy()](https://discourse.julialang.org/t/difference-between-element-wise-allocation-and-copy/111803)

<div class="topic-metadata">

**Author:** [@TongTongYee](https://discourse.julialang.org/u/TongTongYee)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 12:28pm UTC](https://discourse.julialang.org/t/difference-between-element-wise-allocation-and-copy/111803 "2024-03-19T12:28:14Z")

</div>

Hi! I was using the elemet-wize allocation ( .= ) as the copy function. But I found that in certain cases, it’s not. I want to know in which case I can use element-wize allocation as the copy function. for example C11…

---

## [Macro to generate structs with different parameterized types](https://discourse.julialang.org/t/macro-to-generate-structs-with-different-parameterized-types/111815)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 0\
**Last updated:** [March 19, 2024, 10:52am UTC](https://discourse.julialang.org/t/macro-to-generate-structs-with-different-parameterized-types/111815 "2024-03-19T10:52:11Z")

</div>

I’m writing a macro to generate structs. I would like to substitute different parameterized types as a structure element. How can I achieve this? Below is the example code that does not work: for (Tp, matTp) in ((:Trans…

---

## [Memory{T} in 1.11](https://discourse.julialang.org/t/memory-t-in-1-11/111811)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 1\
**Last updated:** [March 19, 2024, 10:23am UTC](https://discourse.julialang.org/t/memory-t-in-1-11/111811 "2024-03-19T10:23:02Z")

</div>

Hi, While running my code with the 1.11 alpha 2 version of Julia, it broke due (I think) to a change introduced in Julia 1.11. In the following code: d = IOBuffer("hello") dd = d.data dd is a Vector{UInt8} in julia 1…

---

## [UndefVarError: \`colorbar\` not defined while using Plots.jl](https://discourse.julialang.org/t/undefvarerror-colorbar-not-defined-while-using-plots-jl/111784)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 4\
**Last updated:** [March 19, 2024, 8:31am UTC](https://discourse.julialang.org/t/undefvarerror-colorbar-not-defined-while-using-plots-jl/111784 "2024-03-19T08:31:45Z")

</div>

While using Plots.jl i am getting error UndefVarError: colorbar not defined Please code below :point\_right: begin fig = plot(size=(300, 300)) # figsize=(20, 20) ax = fig\[1\] # Define colormap colormap = :jet #…

---

## [Julia v1.11.0-alpha2 is now available](https://discourse.julialang.org/t/julia-v1-11-0-alpha2-is-now-available/111805)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 0\
**Last updated:** [March 19, 2024, 7:42am UTC](https://discourse.julialang.org/t/julia-v1-11-0-alpha2-is-now-available/111805 "2024-03-19T07:42:02Z")

</div>

The Julia developers are pleased to announce that v1.11.0-alpha2, the second alpha version for the upcoming 1.11 stable series, is now available. Binaries are available via Juliaup and from https://julialang.org/download…

---

## [CUDNNError: CUDNN\_STATUS\_NOT\_SUPPORTED (code 9) with Transformers.jl](https://discourse.julialang.org/t/cudnnerror-cudnn-status-not-supported-code-9-with-transformers-jl/103453)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 5\
**Last updated:** [March 19, 2024, 6:27am UTC](https://discourse.julialang.org/t/cudnnerror-cudnn-status-not-supported-code-9-with-transformers-jl/103453 "2024-03-19T06:27:26Z")

</div>

Hi, I am optimizing prompt for llama2 model with Transformers.jl and I occasionally see this error. CUDNNError: CUDNN\_STATUS\_NOT\_SUPPORTED (code 9) Stacktrace: \[1\] throw\_api\_error @ ~/.julia/packages/cuDNN/YkZhm/…

---

## [How to export all the names of a package that is used in a package in development?](https://discourse.julialang.org/t/how-to-export-all-the-names-of-a-package-that-is-used-in-a-package-in-development/111797)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 5:28am UTC](https://discourse.julialang.org/t/how-to-export-all-the-names-of-a-package-that-is-used-in-a-package-in-development/111797 "2024-03-19T05:28:40Z")

</div>

For example, I am developing a new package called PkgB and PkgA is used in it. I want to export all the names form PkgA to the outside of PkgB so that the users of PkgB can directly invoke the names from PkgA without usi…

---

## [Cranelift: a faster alternative to LLVM](https://discourse.julialang.org/t/cranelift-a-faster-alternative-to-llvm/37575)

<div class="topic-metadata">

**Author:** [@kevin.squire](https://discourse.julialang.org/u/kevin.squire)\
**Replies:** 15\
**Last updated:** [March 19, 2024, 4:47am UTC](https://discourse.julialang.org/t/cranelift-a-faster-alternative-to-llvm/37575 "2024-03-19T04:47:03Z")

</div>

The rust compiler can now build with either LLVM or cranelift. cranelift is not nearly as developed as LLVM (e.g., SIMD is only partially supported), but has the benefit of building quite a bit faster, and from this blo…

---

## [Deep Learning Vscode Windows Faster first execution](https://discourse.julialang.org/t/deep-learning-vscode-windows-faster-first-execution/111748)

<div class="topic-metadata">

**Author:** [@jared\_rl](https://discourse.julialang.org/u/jared_rl)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 2:32am UTC](https://discourse.julialang.org/t/deep-learning-vscode-windows-faster-first-execution/111748 "2024-03-19T02:32:53Z")

</div>

Hello! I have been doing some deep reinforcement learning experiments with reinforcementlearning.jl and flux.jl in VScode windows. I have noticed that the first experiment i run after opening Vscode or after restarting …

---

## [ModelingToolkit stepping through simulation manually](https://discourse.julialang.org/t/modelingtoolkit-stepping-through-simulation-manually/111736)

<div class="topic-metadata">

**Author:** [@rg2](https://discourse.julialang.org/u/rg2)\
**Replies:** 3\
**Last updated:** [March 19, 2024, 2:19am UTC](https://discourse.julialang.org/t/modelingtoolkit-stepping-through-simulation-manually/111736 "2024-03-19T02:19:55Z")

</div>

Hi! I created a system with modelingtoolkit, which I’m now trying to expose to python through PythonCall.jl in order to simulate the system and learn a controller using reinforcement learning. For that to work as I imag…

---

## [MethodError: Cannot \`convert\` an object of type Vector{Float64} to an object of type Float64 in the ODEProblem](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-vector-float64-to-an-object-of-type-float64-in-the-odeproblem/111796)

<div class="topic-metadata">

**Author:** [@Shashank\_Kumar](https://discourse.julialang.org/u/Shashank_Kumar)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 12:29am UTC](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-vector-float64-to-an-object-of-type-float64-in-the-odeproblem/111796 "2024-03-19T00:29:55Z")

</div>

I have been trying to solve this differential equation using ODEProblem whose code is given below, using QuadGK function solve\_eq(a0::Float64) e0 = sqrt(2/(8.85\*10^(-12)\*3\*10^8) \* (0.5 \* 10^(12)/(10^-4))) e\_fiel…

---

## [GTK4 compound widget](https://discourse.julialang.org/t/gtk4-compound-widget/111584)

<div class="topic-metadata">

**Author:** [@yjr](https://discourse.julialang.org/u/yjr)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 11:13pm UTC](https://discourse.julialang.org/t/gtk4-compound-widget/111584 "2024-03-18T23:13:01Z")

</div>

Hello, I’m struggling to make a compound widget using struct under GTK4, does anyone have an example ? Thanks

---

## [Allow for auto-scaling of image in Gtk4](https://discourse.julialang.org/t/allow-for-auto-scaling-of-image-in-gtk4/111624)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 11:04pm UTC](https://discourse.julialang.org/t/allow-for-auto-scaling-of-image-in-gtk4/111624 "2024-03-18T23:04:15Z")

</div>

In the following MWE, we can resize the window and the contained image fills out the space accordingly (while retaining the aspect ratio): using Gtk4, GtkObservables using Colors win = GtkWindow("Example") h = 100 c = …

---

## [How to increment CartesianIndex?](https://discourse.julialang.org/t/how-to-increment-cartesianindex/111794)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 10:39pm UTC](https://discourse.julialang.org/t/how-to-increment-cartesianindex/111794 "2024-03-18T22:39:46Z")

</div>

Hello! I think I am just not finding the right command, but how to increment a CartesianIndex? I have a matrix of size 5x5. Suppose I have a cartesian index of CartesianIndex(3,1) how to increment it to CartesianIndex(4…

---

## [Vector rotation using CoordinateTransformations.jl](https://discourse.julialang.org/t/vector-rotation-using-coordinatetransformations-jl/111792)

<div class="topic-metadata">

**Author:** [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Replies:** 2\
**Last updated:** [March 18, 2024, 10:35pm UTC](https://discourse.julialang.org/t/vector-rotation-using-coordinatetransformations-jl/111792 "2024-03-18T22:35:15Z")

</div>

It looks like vector rotation does not work or I am missing something: using CoordinateTransformations, Rotations, StaticArrays, AngleBetweenVectors julia\> vec = \[1.0,2.0,3.0\] 3-element Vector{Float64}: 1.0 2.0 3.0 …

---

## [Accurate counter of source files: source lines, comments, documentation strings](https://discourse.julialang.org/t/accurate-counter-of-source-files-source-lines-comments-documentation-strings/94035)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 7\
**Last updated:** [March 18, 2024, 9:43pm UTC](https://discourse.julialang.org/t/accurate-counter-of-source-files-source-lines-comments-documentation-strings/94035 "2024-03-18T21:43:28Z")

</div>

not sure if this is the correct category to post, let me know if I should change it Alright, so I am looking for an accurate way to count the lines of code in a Julia .jl file. Ideally I’d like a count of actual source …

---

## [PkgManager.jl for dev package management](https://discourse.julialang.org/t/pkgmanager-jl-for-dev-package-management/111776)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 5\
**Last updated:** [March 18, 2024, 8:51pm UTC](https://discourse.julialang.org/t/pkgmanager-jl-for-dev-package-management/111776 "2024-03-18T20:51:42Z")

</div>

Hey Julianners, I often faced with a problem like this: ERROR: LoadError: ArgumentError: Package BinanceAPI does not have RateLimiter in its dependencies: - You may have a partially installed environment. Try \`Pkg.inst…

---

## [True random numbers](https://discourse.julialang.org/t/true-random-numbers/111593)

<div class="topic-metadata">

**Author:** [@neophytedave](https://discourse.julialang.org/u/neophytedave)\
**Replies:** 13\
**Last updated:** [March 16, 2024, 2:15pm UTC](https://discourse.julialang.org/t/true-random-numbers/111593 "2024-03-16T14:15:36Z")

</div>

I understand that Julia produces PRNs. (Pseudo Random Numbers). The website (www.random.org) advertises itself as producing true random numbers. I can understand that for testing purposes PRNs may be desired, but once …

---

## [PAndQ.jl: A computer algebra system for propositional logic](https://discourse.julialang.org/t/pandq-jl-a-computer-algebra-system-for-propositional-logic/111752)

<div class="topic-metadata">

**Author:** [@jakobjpeters](https://discourse.julialang.org/u/jakobjpeters)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 8:17pm UTC](https://discourse.julialang.org/t/pandq-jl-a-computer-algebra-system-for-propositional-logic/111752 "2024-03-18T20:17:26Z")

</div>

Introduction Hi everyone! I’m excited to introduce PAndQ.jl. It was registered unannounced last year, so I wanted to write an official announcement following the new v0.3.0 release. PAndQ.jl enables you to create, manip…

---

## ['Initial condition incompatible' error w/ DifferentialEquations.jl](https://discourse.julialang.org/t/initial-condition-incompatible-error-w-differentialequations-jl/111146)

<div class="topic-metadata">

**Author:** [@sharmaviven1](https://discourse.julialang.org/u/sharmaviven1)\
**Replies:** 14\
**Last updated:** [March 18, 2024, 7:49pm UTC](https://discourse.julialang.org/t/initial-condition-incompatible-error-w-differentialequations-jl/111146 "2024-03-18T19:49:36Z")

</div>

Hello all, I am trying to solve a stiff ODE using DifferentialEquations.jl and am running into an error that says Initial condition incompatible with functional form. Here is the equation I am trying to solve: Here…

---

## [Weird phase result between two simple sine curves](https://discourse.julialang.org/t/weird-phase-result-between-two-simple-sine-curves/111769)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 12\
**Last updated:** [March 18, 2024, 7:32pm UTC](https://discourse.julialang.org/t/weird-phase-result-between-two-simple-sine-curves/111769 "2024-03-18T19:32:41Z")

</div>

Hi all, I’m trying to get the relative phase between two simple sine series: I’m trying to use FFTW to get their angle from the dominant frequency and calculate the relative phase: function FFT\_phase\_rel(sig1, sig2,…

---

## [Adding nullclines to a streamplot](https://discourse.julialang.org/t/adding-nullclines-to-a-streamplot/111750)

<div class="topic-metadata">

**Author:** [@Thomas\_Petit](https://discourse.julialang.org/u/Thomas_Petit)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 7:18pm UTC](https://discourse.julialang.org/t/adding-nullclines-to-a-streamplot/111750 "2024-03-18T19:18:02Z")

</div>

Hello there, I’m still extremely new to Julia and I’m currently trying to plot both the flow of an autonomous system of linear ODEs + their corresponding nullclines. The flow itself I’m using - using Makie using CairoM…

---

## [Weird Errors in Julia VS Code](https://discourse.julialang.org/t/weird-errors-in-julia-vs-code/111382)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 2\
**Last updated:** [March 18, 2024, 7:01pm UTC](https://discourse.julialang.org/t/weird-errors-in-julia-vs-code/111382 "2024-03-18T19:01:08Z")

</div>

I started today getting weird errors when I tried to run Julia on my laptop. I re-installed Julia but nothing changed. Do you have any clue why this is happening and how I can fix it? └ ── unknown unicode character ‘\\0…

---

## [Hooking up code to run whenever Revise triggers?](https://discourse.julialang.org/t/hooking-up-code-to-run-whenever-revise-triggers/111787)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 1\
**Last updated:** [March 18, 2024, 6:54pm UTC](https://discourse.julialang.org/t/hooking-up-code-to-run-whenever-revise-triggers/111787 "2024-03-18T18:54:27Z")

</div>

I have a number of caches that store various things to make my code run faster. However, when i am interactively developing and debugging my package I often want to clear those caches because they have cached a result c…

---

## [Schema evolution: Structs considered harmful, in at least some cases? Non-semver version numbers as an example](https://discourse.julialang.org/t/schema-evolution-structs-considered-harmful-in-at-least-some-cases-non-semver-version-numbers-as-an-example/111595)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 6\
**Last updated:** [March 18, 2024, 6:24pm UTC](https://discourse.julialang.org/t/schema-evolution-structs-considered-harmful-in-at-least-some-cases-non-semver-version-numbers-as-an-example/111595 "2024-03-18T18:24:26Z")

</div>

I proposed allowing non-semver, as an option, or at least for debate: It got me thinking how would you implement this (and keep “full” compatibility), and I have a dilemma. julia\> v"∞" # rarely used option... not eve…

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

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