# Latest

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

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

**Page:** 900

---

## [Destructuring NamedTuples with Regular Expressions](https://discourse.julialang.org/t/destructuring-namedtuples-with-regular-expressions/88509)

<div class="topic-metadata">

**Author:** [@alfaromartino](https://discourse.julialang.org/u/alfaromartino)\
**Replies:** 6\
**Last updated:** [October 10, 2022, 8:41pm UTC](https://discourse.julialang.org/t/destructuring-namedtuples-with-regular-expressions/88509 "2022-10-10T20:41:28Z")

</div>

As of Julia 1.7, one can deconstruct NamedTuples. I wanted to know if it’s possible to use regular expressions to do this, rather than specifying the variables to be deconstructured. MWE: x = (; a11=1, a12=2, b1=3) #t…

---

## [Auto-evaluate function/expression in local scope](https://discourse.julialang.org/t/auto-evaluate-function-expression-in-local-scope/88515)

<div class="topic-metadata">

**Author:** [@capri](https://discourse.julialang.org/u/capri)\
**Replies:** 9\
**Last updated:** [October 10, 2022, 8:07pm UTC](https://discourse.julialang.org/t/auto-evaluate-function-expression-in-local-scope/88515 "2022-10-10T20:07:46Z")

</div>

Hi guys, I have a problem which I think should be fairly easy to solve (I guess) but I don’t know how. I’ll try to describe it as on-point as possible. I want to define an array of “formulas” that I want to evaluate a…

---

## [Moving from \`Float64\` to \`Float32\` not improving performance](https://discourse.julialang.org/t/moving-from-float64-to-float32-not-improving-performance/88516)

<div class="topic-metadata">

**Author:** [@JordiBolibar](https://discourse.julialang.org/u/JordiBolibar)\
**Replies:** 25\
**Last updated:** [October 10, 2022, 5:20pm UTC](https://discourse.julialang.org/t/moving-from-float64-to-float32-not-improving-performance/88516 "2022-10-10T17:20:35Z")

</div>

Hi, I’m trying to optimize a script. I first did the usual stuff to avoid memory allocation, but when moving all data structures from Float64 to Float32, which should result in a reduced memory usage, the code has become…

---

## [Want output of dijikstra\_algorithm like A star Algorithm in edges Field instead of int64... or How we can convert integer into edges between nodes?](https://discourse.julialang.org/t/want-output-of-dijikstra-algorithm-like-a-star-algorithm-in-edges-field-instead-of-int64-or-how-we-can-convert-integer-into-edges-between-nodes/88531)

<div class="topic-metadata">

**Author:** [@Kumail\_Haider](https://discourse.julialang.org/u/Kumail_Haider)\
**Replies:** 0\
**Last updated:** [October 10, 2022, 5:15pm UTC](https://discourse.julialang.org/t/want-output-of-dijikstra-algorithm-like-a-star-algorithm-in-edges-field-instead-of-int64-or-how-we-can-convert-integer-into-edges-between-nodes/88531 "2022-10-10T17:15:17Z")

</div>

julia\> using Graphs, GraphPlot julia\> using Symbolics, Statistics, LinearAlgebra julia\> using Plots, LaTeXStrings julia\> g = wheel\_graph(10) {10, 18} undirected simple Int64 graph julia\> ds = dijkstra\_shortest\_paths…

---

## [Tribute to JSON3](https://discourse.julialang.org/t/tribute-to-json3/88507)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 3:55pm UTC](https://discourse.julialang.org/t/tribute-to-json3/88507 "2022-10-10T15:55:31Z")

</div>

I always wanted to try JSON3 but I was afraid to do so, JSON3.Object always scared me away. This weekend, I did it as a pet project, extending one our library to be compatible with JSON3. First of all, it was relatively …

---

## [ERROR: could not load library "C:...\\libsvm.dll"](https://discourse.julialang.org/t/error-could-not-load-library-c-libsvm-dll/32056)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 3\
**Last updated:** [October 10, 2022, 2:32pm UTC](https://discourse.julialang.org/t/error-could-not-load-library-c-libsvm-dll/32056 "2022-10-10T14:32:43Z")

</div>

Hello, i have the following error at execution time when i run the example given in the readme of the LIBSVM.jl package, as soon as i call a function from that package. The thing is, I get this error on one of my machine…

---

## [Converting columns in a DataFrame from String to Date (with a specific format)](https://discourse.julialang.org/t/converting-columns-in-a-dataframe-from-string-to-date-with-a-specific-format/76697)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 14\
**Last updated:** [October 10, 2022, 2:15pm UTC](https://discourse.julialang.org/t/converting-columns-in-a-dataframe-from-string-to-date-with-a-specific-format/76697 "2022-10-10T14:15:32Z")

</div>

I am trying to convert a DataFrame column populated with dates whose type is String and format DD/MM/YYYY to dates with Date type and format YYYYMMDD Tried A\[!,:DATE\] = parse.(Date, A\[!,:DATE\]) But it errors, with: Ar…

---

## [Creating a list of symbols using a comprehension](https://discourse.julialang.org/t/creating-a-list-of-symbols-using-a-comprehension/88524)

<div class="topic-metadata">

**Author:** [@Mitch\_Phillipson](https://discourse.julialang.org/u/Mitch_Phillipson)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 2:04pm UTC](https://discourse.julialang.org/t/creating-a-list-of-symbols-using-a-comprehension/88524 "2022-10-10T14:04:13Z")

</div>

I would like to create a list of symbols. I’m currently using the code \[Symbol(“M$i”) for i = 1:10\] I’m wondering if this is the best way to accomplish this or if there is a shorter method, something like \[:M$i for…

---

## [Why breaking down a function into multiple functions speed up runtime](https://discourse.julialang.org/t/why-breaking-down-a-function-into-multiple-functions-speed-up-runtime/88482)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 7\
**Last updated:** [October 10, 2022, 1:27pm UTC](https://discourse.julialang.org/t/why-breaking-down-a-function-into-multiple-functions-speed-up-runtime/88482 "2022-10-10T13:27:23Z")

</div>

Hi, 1/ Can someone explain why in Julia when I breakdown various part of main function into multiple functions, that main function become faster? 2/ Also the number of allocation is (sometimes massively) reduced, why …

---

## [Questions about filter and broadcast](https://discourse.julialang.org/t/questions-about-filter-and-broadcast/88520)

<div class="topic-metadata">

**Author:** [@zhangchunyong](https://discourse.julialang.org/u/zhangchunyong)\
**Replies:** 1\
**Last updated:** [October 10, 2022, 12:54pm UTC](https://discourse.julialang.org/t/questions-about-filter-and-broadcast/88520 "2022-10-10T12:54:53Z")

</div>

df = DataFrame(x=\[3, 1, 2, 1\], y=\["b", "c", "a", "b"\]) 4×2 DataFrame Row │ x y │ Int64 String ─────┼─────────────── 1 │ 3 b 2 │ 1 c 3 │ 2 a 4 │ 1 b julia\> filter(row-\>row.x==2…

---

## [Turing.jl run not reproducible!](https://discourse.julialang.org/t/turing-jl-run-not-reproducible/88288)

<div class="topic-metadata">

**Author:** [@aelmokadem](https://discourse.julialang.org/u/aelmokadem)\
**Replies:** 17\
**Last updated:** [October 10, 2022, 12:03pm UTC](https://discourse.julialang.org/t/turing-jl-run-not-reproducible/88288 "2022-10-10T12:03:20Z")

</div>

Hi all, I am running a Turing.jl model (an ODE model) and the results I am getting change every time I run the script. I have a seed set at the beginning of the script and there is more than one call to RNG in there but…

---

## [Shorthand syntax for defining functors](https://discourse.julialang.org/t/shorthand-syntax-for-defining-functors/88380)

<div class="topic-metadata">

**Author:** [@dylanxyz](https://discourse.julialang.org/u/dylanxyz)\
**Replies:** 17\
**Last updated:** [October 9, 2022, 4:11am UTC](https://discourse.julialang.org/t/shorthand-syntax-for-defining-functors/88380 "2022-10-09T04:11:21Z")

</div>

Currently, to define a function with a custom type in julia, we use functors: julia\> struct MyType \<: Function end julia\> (::MyType)() = println("Hello world!") julia\> (::MyType)(name) = println("Hello $(name)!") jul…

---

## [Comprehensive list of functions (maths, etc) available in CUDA.jl](https://discourse.julialang.org/t/comprehensive-list-of-functions-maths-etc-available-in-cuda-jl/88459)

<div class="topic-metadata">

**Author:** [@taxodium](https://discourse.julialang.org/u/taxodium)\
**Replies:** 3\
**Last updated:** [October 10, 2022, 11:58am UTC](https://discourse.julialang.org/t/comprehensive-list-of-functions-maths-etc-available-in-cuda-jl/88459 "2022-10-10T11:58:35Z")

</div>

Hi, After a bit of search, I haven’t been able to find a complete list of functions (particularly, maths functions) natively implemented in CUDA.jl. Sure, obvious ones like cos, sin, sqrt, exp are there, but the only an…

---

## [Problems and advices using Julia in Emacs' Org babel](https://discourse.julialang.org/t/problems-and-advices-using-julia-in-emacs-org-babel/88477)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 3\
**Last updated:** [October 10, 2022, 11:21am UTC](https://discourse.julialang.org/t/problems-and-advices-using-julia-in-emacs-org-babel/88477 "2022-10-10T11:21:39Z")

</div>

Hi all! I wanted to embed some Julia code in some notes I’m taking, thus creating a notebook-like document. I am using Emacs with Org-mode, so I went for Org babel. I followed the instructions on Worg, but I still have …

---

## [Outer constructor using a function using the structure](https://discourse.julialang.org/t/outer-constructor-using-a-function-using-the-structure/88260)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 4\
**Last updated:** [October 10, 2022, 10:35am UTC](https://discourse.julialang.org/t/outer-constructor-using-a-function-using-the-structure/88260 "2022-10-10T10:35:59Z")

</div>

I have a problem with a “complex” outer constructor (for me anyway). I have the following structure: struct MQC circuit\_list::Vector{QuantumCircuit} connector\_list::Vector{Connector} wire\_list::Vector{Wire} MQC() =…

---

## [Documentation for bar plots in Plots.jl?](https://discourse.julialang.org/t/documentation-for-bar-plots-in-plots-jl/88514)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 9:48am UTC](https://discourse.julialang.org/t/documentation-for-bar-plots-in-plots-jl/88514 "2022-10-10T09:48:41Z")

</div>

I am trying to figure out how to do a bar plot, but cannot find any more documentation than Bar · Plots which mostly tells me that it exists. I tried Bar plots · GMT but get different results, but maybe GMT and Plots ar…

---

## [Dynamic documents](https://discourse.julialang.org/t/dynamic-documents/88450)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 6\
**Last updated:** [October 10, 2022, 8:13am UTC](https://discourse.julialang.org/t/dynamic-documents/88450 "2022-10-10T08:13:27Z")

</div>

I need to produce printable output where some parts are “interpolated” similar to the strings containing julia variables, but somewhat more generally, to include generated graphs as well as text. Weave.jl seems abandoned…

---

## [C++ code much faster than Julia how can I optimize it?](https://discourse.julialang.org/t/c-code-much-faster-than-julia-how-can-i-optimize-it/87868)

<div class="topic-metadata">

**Author:** [@Adegasel](https://discourse.julialang.org/u/Adegasel)\
**Replies:** 40\
**Last updated:** [October 10, 2022, 6:09am UTC](https://discourse.julialang.org/t/c-code-much-faster-than-julia-how-can-i-optimize-it/87868 "2022-10-10T06:09:39Z")

</div>

I’m trying to adapt this C++ code to Julia (here my translation). However C++ original code is much faster than Julia. How can I optimize it?

---

## [Order of edges in FeaturedGraph](https://discourse.julialang.org/t/order-of-edges-in-featuredgraph/88052)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 4\
**Last updated:** [October 10, 2022, 5:56am UTC](https://discourse.julialang.org/t/order-of-edges-in-featuredgraph/88052 "2022-10-10T05:56:39Z")

</div>

Hi, I am trying to understand FeaturedGraph from GraphSignals.jl. I am puzzled with the documentation, which says that features of edges are stored in matrix, where each column corresponds to a feature of one edge, but …

---

## [Better way to save Lux model and parameters](https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506)

<div class="topic-metadata">

**Author:** [@Molox](https://discourse.julialang.org/u/Molox)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 5:44am UTC](https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506 "2022-10-10T05:44:04Z")

</div>

I was using Flux and BSON to save the model. Now I am switching to Lux now and I know the model, parameters, and states are separated. The parameters are Component Arrays and I am not sure how to save them properly. (…

---

## [ModelingToolkit and State Variables with Optimization](https://discourse.julialang.org/t/modelingtoolkit-and-state-variables-with-optimization/84430)

<div class="topic-metadata">

**Author:** [@mzhenirovskyy](https://discourse.julialang.org/u/mzhenirovskyy)\
**Replies:** 11\
**Last updated:** [October 10, 2022, 3:01am UTC](https://discourse.julialang.org/t/modelingtoolkit-and-state-variables-with-optimization/84430 "2022-10-10T03:01:50Z")

</div>

I have the simple system from the documentation. module Grid1 export get\_model using ModelingToolkit using ModelingToolkitStandardLibrary.Electrical using ModelingToolkitStandardLibrary.Blocks: Constant function get\_…

---

## [Differentiable argmin? Trying VQ-VAE in Flux.jl](https://discourse.julialang.org/t/differentiable-argmin-trying-vq-vae-in-flux-jl/88424)

<div class="topic-metadata">

**Author:** [@afishy](https://discourse.julialang.org/u/afishy)\
**Replies:** 4\
**Last updated:** [October 10, 2022, 2:51am UTC](https://discourse.julialang.org/t/differentiable-argmin-trying-vq-vae-in-flux-jl/88424 "2022-10-10T02:51:08Z")

</div>

I’m trying to follow this VQ-VAE tutorial in Julia, particularly the VectorQuantizer module: # Calculate distances distances = (torch.sum(flat\_input\*\*2, dim=1, keepdim=True) + torch.…

---

## [Blog: Using Julia on the HPC](https://discourse.julialang.org/t/blog-using-julia-on-the-hpc/88039)

<div class="topic-metadata">

**Author:** [@jmair](https://discourse.julialang.org/u/jmair)\
**Replies:** 40\
**Last updated:** [October 10, 2022, 1:38am UTC](https://discourse.julialang.org/t/blog-using-julia-on-the-hpc/88039 "2022-10-10T01:38:44Z")

</div>

Hi all! Recently, I gave a talk at a HPC conference on using Julia to take advantage of the low barrier to entry for high-performance parallel code at every level (threading, multiprocessing, GPU etc). I was asked to wr…

---

## [Avoiding allocations in small subvector ops](https://discourse.julialang.org/t/avoiding-allocations-in-small-subvector-ops/88500)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 1:03am UTC](https://discourse.julialang.org/t/avoiding-allocations-in-small-subvector-ops/88500 "2022-10-10T01:03:07Z")

</div>

In the code below, there is an allocation each time the statement u\[i1:i1+1\].=... is executed. A few years ago, I wrote a quick-and-dirty macro to implement statements like this with a for-loop like the commented-out lo…

---

## [Interoperability with .NET](https://discourse.julialang.org/t/interoperability-with-net/19611)

<div class="topic-metadata">

**Author:** [@rudreshahk](https://discourse.julialang.org/u/rudreshahk)\
**Replies:** 41\
**Last updated:** [October 9, 2022, 9:40pm UTC](https://discourse.julialang.org/t/interoperability-with-net/19611 "2022-10-09T21:40:23Z")

</div>

We have some Dimension Selector built in .NET which i want to invoke from Julia. IS there any Julia to .NET interoperability tools? I have used R.NET for R to .NET connection and Pythonnet for Python to .NET connection.…

---

## [PackageCompiler: does \`precompile\` store machine code?](https://discourse.julialang.org/t/packagecompiler-does-precompile-store-machine-code/88480)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 3\
**Last updated:** [October 9, 2022, 9:40pm UTC](https://discourse.julialang.org/t/packagecompiler-does-precompile-store-machine-code/88480 "2022-10-09T21:40:05Z")

</div>

You can pass Julia code to create\_sysimage using: precompile\_execution\_file / precompile\_statements\_file; and script Do I have it correct that the first option only stores type inference in the sysimage, and not gene…

---

## [\[Makie\] Colorbar positioning woes](https://discourse.julialang.org/t/makie-colorbar-positioning-woes/88465)

<div class="topic-metadata">

**Author:** [@AstroBarker](https://discourse.julialang.org/u/AstroBarker)\
**Replies:** 4\
**Last updated:** [October 9, 2022, 8:06pm UTC](https://discourse.julialang.org/t/makie-colorbar-positioning-woes/88465 "2022-10-09T20:06:13Z")

</div>

Hey folks, I am having trouble setting up a colorbar. The plot is set with aspect = DataAspect() and is quite rectangular. The colorbar then appears very far from the actual plot (see below). How can I remedy this so th…

---

## [Searching of the online documentation of Julia ineffective](https://discourse.julialang.org/t/searching-of-the-online-documentation-of-julia-ineffective/88493)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 4\
**Last updated:** [October 9, 2022, 6:32pm UTC](https://discourse.julialang.org/t/searching-of-the-online-documentation-of-julia-ineffective/88493 "2022-10-09T18:32:05Z")

</div>

Searching the documentation is frustrating. Lots of barely relevant hits. Some things will never be found. Etc. On the other hand, full-text searching of the PDF is a breeze. So, I wonder if it would be possible to em…

---

## [How do frequencies shift after a FFT?](https://discourse.julialang.org/t/how-do-frequencies-shift-after-a-fft/88089)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 11\
**Last updated:** [October 9, 2022, 6:22pm UTC](https://discourse.julialang.org/t/how-do-frequencies-shift-after-a-fft/88089 "2022-10-09T18:22:26Z")

</div>

Hi all! I hope this is the right subcategory to ask in. I’m playing around with the FFTW package to perform some Fourier transforms. I got how to define a signal and transform it, but I can’t get how (and why) can I shi…

---

## [Why does JET.jl has a problem with adding a column to a dataframe?](https://discourse.julialang.org/t/why-does-jet-jl-has-a-problem-with-adding-a-column-to-a-dataframe/88490)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 5:54pm UTC](https://discourse.julialang.org/t/why-does-jet-jl-has-a-problem-with-adding-a-column-to-a-dataframe/88490 "2022-10-09T17:54:56Z")

</div>

I started using JET.jl recently. In most cases it is helpful. However, sometimes I just cannot figure out why it has a problem with my code. An example is below. The function foo is very basic and works fine. Still, JET.…

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

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