# Latest

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

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

**Page:** 505

---

## [Julia learning materials, how to make code work?](https://discourse.julialang.org/t/julia-learning-materials-how-to-make-code-work/109059)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 12\
**Last updated:** [January 21, 2024, 5:13pm UTC](https://discourse.julialang.org/t/julia-learning-materials-how-to-make-code-work/109059 "2024-01-21T17:13:55Z")

</div>

Maybe I’m too picky and pedantic, but when I work thorough learning materials on any programming language and some code doesn’t work due to some breaking changes I feel frustrated or worse. I believe that I’m not the onl…

---

## [Issue with Zygote over ForwardDiff.derivative](https://discourse.julialang.org/t/issue-with-zygote-over-forwarddiff-derivative/70824)

<div class="topic-metadata">

**Author:** [@jlmaccal](https://discourse.julialang.org/u/jlmaccal)\
**Replies:** 10\
**Last updated:** [January 21, 2024, 4:18pm UTC](https://discourse.julialang.org/t/issue-with-zygote-over-forwarddiff-derivative/70824 "2024-01-21T16:18:25Z")

</div>

I’m having some trouble getting Zygote over ForwardDiff.derivative to work. I’m going to refer to this prior post. The following code used to fail with ERROR: setindex! not defined for ForwardDiff.Partials{1,Float64}. T…

---

## [Using println to insert string into table](https://discourse.julialang.org/t/using-println-to-insert-string-into-table/109069)

<div class="topic-metadata">

**Author:** [@keynescoefen](https://discourse.julialang.org/u/keynescoefen)\
**Replies:** 3\
**Last updated:** [January 21, 2024, 3:28pm UTC](https://discourse.julialang.org/t/using-println-to-insert-string-into-table/109069 "2024-01-21T15:28:44Z")

</div>

Hello! Can someone explain to me why the command in the second loop produces an error? My hunch is that somehow quotes “” are missing in the println statement. The MWE is here: results\_all\_models = DataFrame( Model = …

---

## [PrecompileTools and --trace-compile](https://discourse.julialang.org/t/precompiletools-and-trace-compile/109067)

<div class="topic-metadata">

**Author:** [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Replies:** 3\
**Last updated:** [January 21, 2024, 3:26pm UTC](https://discourse.julialang.org/t/precompiletools-and-trace-compile/109067 "2024-01-21T15:26:22Z")

</div>

I have a simple package Test1: module Test1 f1(x) = x + 1 f2(x) = f1(2x) f3(x) = f1(3x) using PrecompileTools @compile\_workload begin f2(1.2) end end # module I load and precompile the package in an environment. I…

---

## [Vectors of vectors : Concatenation](https://discourse.julialang.org/t/vectors-of-vectors-concatenation/109061)

<div class="topic-metadata">

**Author:** [@blociss](https://discourse.julialang.org/u/blociss)\
**Replies:** 6\
**Last updated:** [January 21, 2024, 12:00pm UTC](https://discourse.julialang.org/t/vectors-of-vectors-concatenation/109061 "2024-01-21T12:00:54Z")

</div>

Consider this vector v = \[ (1, \[\[11, 11, 11\], \[12, 12, 12\]\]), (2, \[\[21, 21, 21\], \[22, 22, 22\]\]), (3, \[\[31, 31, 31\], \[32, 32, 32\]\]), (4, \[\[41, 41, 41\], \[42, 42, 42\]\]), \] I want to get from v the followin…

---

## [Looking for a "trick" to express a constraint on binary variables](https://discourse.julialang.org/t/looking-for-a-trick-to-express-a-constraint-on-binary-variables/109049)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 9\
**Last updated:** [January 21, 2024, 11:10am UTC](https://discourse.julialang.org/t/looking-for-a-trick-to-express-a-constraint-on-binary-variables/109049 "2024-01-21T11:10:54Z")

</div>

I would like to know if there is a synthetic form to express the constraint Max(Si)-Min(Si) \<=s, without having to explicitly write all the possible differences (Si-Sj) and impose the constraint on these S1:: x\[1,1,N\]+x…

---

## [Change the focus of Gtk windows](https://discourse.julialang.org/t/change-the-focus-of-gtk-windows/19560)

<div class="topic-metadata">

**Author:** [@Carsten](https://discourse.julialang.org/u/Carsten)\
**Replies:** 9\
**Last updated:** [January 19, 2024, 2:51pm UTC](https://discourse.julialang.org/t/change-the-focus-of-gtk-windows/19560 "2024-01-19T14:51:03Z")

</div>

I have two overlapping Gtk-windows open. How can I change the focus via button clicking to get the hidden Gtk-window on top? Any advice would be very welcome. Carsten

---

## [Running tests on code defined in package extension](https://discourse.julialang.org/t/running-tests-on-code-defined-in-package-extension/99691)

<div class="topic-metadata">

**Author:** [@FredW](https://discourse.julialang.org/u/FredW)\
**Replies:** 8\
**Last updated:** [January 21, 2024, 10:51am UTC](https://discourse.julialang.org/t/running-tests-on-code-defined-in-package-extension/99691 "2024-01-21T10:51:23Z")

</div>

Hello, Is there any way to run unit tests on methods/types defined in a package extension (but not exposed by the main package) ? As an example, say that our package exposes only one function: sample(model, rng ....) …

---

## [\[ANN\] VibrationGEPHelpers](https://discourse.julialang.org/t/ann-vibrationgephelpers/109065)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 0\
**Last updated:** [January 21, 2024, 3:11am UTC](https://discourse.julialang.org/t/ann-vibrationgephelpers/109065 "2024-01-21T03:11:39Z")

</div>

VibrationGEPHelpers.jl is a small package to facilitate the solution of generalized eigenvalue problems of vibration. Arpack.jl, KrylovKit.jl, and SubSIt.jl are wrapped to make a method selection easy. ArnoldiMethod.jl i…

---

## [Docs failing to update. Can someone explain the error message](https://discourse.julialang.org/t/docs-failing-to-update-can-someone-explain-the-error-message/109039)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 2\
**Last updated:** [January 21, 2024, 12:05am UTC](https://discourse.julialang.org/t/docs-failing-to-update-can-someone-explain-the-error-message/109039 "2024-01-21T00:05:23Z")

</div>

I pushed an update to SIAMFANLEquations.jl mainly to make the Project.toml file compatible with v1.11. One thing I also did was take the version number out of index.md. Everything went well except the documenter update …

---

## [\`UnicodePlots\` can't well display on Windows10 command-line interface](https://discourse.julialang.org/t/unicodeplots-cant-well-display-on-windows10-command-line-interface/109019)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 9\
**Last updated:** [January 20, 2024, 11:20pm UTC](https://discourse.julialang.org/t/unicodeplots-cant-well-display-on-windows10-command-line-interface/109019 "2024-01-20T23:20:40Z")

</div>

Write the following code in a Julia script and double click it on Win10: using UnicodePlots: lineplot, scatterplot, barplot lineplot(randn(10)) |\> display scatterplot(randn(10)) |\> display barplot(\[1:10;\], rand(10)) |\> …

---

## [JSON3 indexing nested object by string path](https://discourse.julialang.org/t/json3-indexing-nested-object-by-string-path/109056)

<div class="topic-metadata">

**Author:** [@alexgr](https://discourse.julialang.org/u/alexgr)\
**Replies:** 2\
**Last updated:** [January 20, 2024, 10:07pm UTC](https://discourse.julialang.org/t/json3-indexing-nested-object-by-string-path/109056 "2024-01-20T22:07:14Z")

</div>

Given: using JSON3 json\_string = """ { "name": "rocket1", "observations": \[ { "speed": "100", "acceleration": "1" }, { "speed": "200", "ac…

---

## [Round variables in JuMP](https://discourse.julialang.org/t/round-variables-in-jump/109045)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 3\
**Last updated:** [January 20, 2024, 9:12pm UTC](https://discourse.julialang.org/t/round-variables-in-jump/109045 "2024-01-20T21:12:50Z")

</div>

Dear all, I have a model in JuMP with the following range index: variable(model, x\[i in 1:10, t in 1:10, h in H\[i\], bin) where H=\[ \[1,2\]; \[3,4,5\]; \[5\]; \[6,7\]; \[1,2,3\]; \[1,2,4\]; \[1,2,3\]; \[1,2,6,7\]; \[1,2,4\]; \[1,2\]; \] i…

---

## [Using vs include](https://discourse.julialang.org/t/using-vs-include/109036)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 4\
**Last updated:** [January 20, 2024, 8:02pm UTC](https://discourse.julialang.org/t/using-vs-include/109036 "2024-01-20T20:02:42Z")

</div>

include("./basis.jl") include("./ham.jl") #using basis #using ham This is the header of a julia script. In the same directory, there are two files basis.jl and ham.jl. To include is just to copy and paste the content o…

---

## [Correct usage of shared memory？](https://discourse.julialang.org/t/correct-usage-of-shared-memory/107997)

<div class="topic-metadata">

**Author:** [@FR13ndSDP](https://discourse.julialang.org/u/FR13ndSDP)\
**Replies:** 5\
**Last updated:** [January 20, 2024, 6:28pm UTC](https://discourse.julialang.org/t/correct-usage-of-shared-memory/107997 "2024-01-20T18:28:23Z")

</div>

Hello everyone, I tried to test the performance of shared memory of CUDA.jl with this code: using CUDA, BenchmarkTools, Plots # initialize const N::Int64 = 1024 ϕ = ones(Float64, N, N) ϕ\[1, :\] .= 10.0 function evolve…

---

## [OpenSSL.jl eof() blocks with Keep-Alive Connections](https://discourse.julialang.org/t/openssl-jl-eof-blocks-with-keep-alive-connections/109053)

<div class="topic-metadata">

**Author:** [@TheDude](https://discourse.julialang.org/u/TheDude)\
**Replies:** 0\
**Last updated:** [January 20, 2024, 6:25pm UTC](https://discourse.julialang.org/t/openssl-jl-eof-blocks-with-keep-alive-connections/109053 "2024-01-20T18:25:39Z")

</div>

I am struggling with reading from an sslstream (or even just a socket) with a keep alive connection (that is, ones where an HTTP request I send contains the ‘Connection: Keep-Alive header’). Specifically, it appears tha…

---

## [In which file from the Linear Algebra github page are exp, log and ^ functions for matrix input?](https://discourse.julialang.org/t/in-which-file-from-the-linear-algebra-github-page-are-exp-log-and-functions-for-matrix-input/109052)

<div class="topic-metadata">

**Author:** [@MatheusJanczkowski](https://discourse.julialang.org/u/MatheusJanczkowski)\
**Replies:** 2\
**Last updated:** [January 20, 2024, 6:16pm UTC](https://discourse.julialang.org/t/in-which-file-from-the-linear-algebra-github-page-are-exp-log-and-functions-for-matrix-input/109052 "2024-01-20T18:16:30Z")

</div>

I need to look at the Linear Algebra package implementation of these matrix functions, thus, if anyone could send me the link to the file in github, it would be much appreciated. Thanks in advance!

---

## [Unexpected method additions to a struct instance's Function field](https://discourse.julialang.org/t/unexpected-method-additions-to-a-struct-instances-function-field/109032)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 5\
**Last updated:** [January 20, 2024, 5:25pm UTC](https://discourse.julialang.org/t/unexpected-method-additions-to-a-struct-instances-function-field/109032 "2024-01-20T17:25:13Z")

</div>

The thing I’m demonstrating here is that, the letters and numbers instances have property func that gets respective method definitions, but their supposedly separate method additions get defined for the other instance as…

---

## [CSV vs DelimitedFiles vs Numpy](https://discourse.julialang.org/t/csv-vs-delimitedfiles-vs-numpy/108963)

<div class="topic-metadata">

**Author:** [@Matt\_jl](https://discourse.julialang.org/u/Matt_jl)\
**Replies:** 15\
**Last updated:** [January 20, 2024, 4:38pm UTC](https://discourse.julialang.org/t/csv-vs-delimitedfiles-vs-numpy/108963 "2024-01-20T16:38:34Z")

</div>

I’ve been working on a project where I need to read specific rows and columns from a data file. To determine the most efficient approach, I conducted benchmarks using CSV.jl, DelimitedFiles.jl, and Numpy in Python. The r…

---

## [CSV package works in terminal but not in VSCode](https://discourse.julialang.org/t/csv-package-works-in-terminal-but-not-in-vscode/109042)

<div class="topic-metadata">

**Author:** [@keynescoefen](https://discourse.julialang.org/u/keynescoefen)\
**Replies:** 2\
**Last updated:** [January 20, 2024, 4:25pm UTC](https://discourse.julialang.org/t/csv-package-works-in-terminal-but-not-in-vscode/109042 "2024-01-20T16:25:24Z")

</div>

Hello! The following code produces a \`TaskFailedException nested task error: MethodError: Cannot \`convert\` an object of type Missing to an object of type String\` using CSV,DataFrames formal\_orgs = DataFrame(CSV.File("s…

---

## [New Julia LTS? Are many using the current (Julia 1.6) LTS?](https://discourse.julialang.org/t/new-julia-lts-are-many-using-the-current-julia-1-6-lts/93919)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 104\
**Last updated:** [January 20, 2024, 4:04pm UTC](https://discourse.julialang.org/t/new-julia-lts-are-many-using-the-current-julia-1-6-lts/93919 "2024-01-20T16:04:14Z")

</div>

Julia 1.6 was released on 24 March 2021, but wasn’t declared LTS until Dec 2021 (previous LTS, 1.0, was LTS for just over 3 years). Should we go for 18 month LTS support as node.js? There has never been a promise for ho…

---

## [Changing metric for complex sphere in Manopt.jl](https://discourse.julialang.org/t/changing-metric-for-complex-sphere-in-manopt-jl/109020)

<div class="topic-metadata">

**Author:** [@fph](https://discourse.julialang.org/u/fph)\
**Replies:** 3\
**Last updated:** [January 20, 2024, 11:48am UTC](https://discourse.julialang.org/t/changing-metric-for-complex-sphere-in-manopt-jl/109020 "2024-01-20T11:48:01Z")

</div>

A technical question on Manopt.jl. I have seen that Sphere(n-1, ℂ) gets its Hermitian metric \\langle v, w\\rangle\_p = v^\*w from its canonical embedding in \\mathbb{C}^n. Instead, I would like to use that manifold with the…

---

## [@Printf with DecFP / Dec128](https://discourse.julialang.org/t/printf-with-decfp-dec128/108996)

<div class="topic-metadata">

**Author:** [@JonT](https://discourse.julialang.org/u/JonT)\
**Replies:** 2\
**Last updated:** [January 19, 2024, 10:08pm UTC](https://discourse.julialang.org/t/printf-with-decfp-dec128/108996 "2024-01-19T22:08:42Z")

</div>

I’m seeing two different outputs for Dec128 numbers println() vs @printf: (Julia v1.10.0 with DecFP v1.3.2) using Printf, Quadmath, DecFP C = log2(big(ℯ)) # \\euler \<tab\> to get symbol d = convert(Dec128, C) println("C …

---

## [Formulating objective function, DimensionMismatch](https://discourse.julialang.org/t/formulating-objective-function-dimensionmismatch/109016)

<div class="topic-metadata">

**Author:** [@legio](https://discourse.julialang.org/u/legio)\
**Replies:** 6\
**Last updated:** [January 19, 2024, 10:21pm UTC](https://discourse.julialang.org/t/formulating-objective-function-dimensionmismatch/109016 "2024-01-19T22:21:29Z")

</div>

Hi, I’m very new to Julia, and I am trying to construct a minimization over x for the following objective: where B is a 2x8 matrix, μ is a 2x3 matrix, and x is an 8x3 matrix. I have tried using the following line to …

---

## [\[ANN\] \`ACAFact.jl\`: fast low-rank approximation of matrices with greedy pivoting](https://discourse.julialang.org/t/ann-acafact-jl-fast-low-rank-approximation-of-matrices-with-greedy-pivoting/108317)

<div class="topic-metadata">

**Author:** [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Replies:** 3\
**Last updated:** [January 19, 2024, 10:10pm UTC](https://discourse.julialang.org/t/ann-acafact-jl-fast-low-rank-approximation-of-matrices-with-greedy-pivoting/108317 "2024-01-19T22:10:12Z")

</div>

Hi all— Just a quick announcement that I’ve recently packaged up a reasonably clean implementation of the adaptive cross approximation (ACA), which is a workhorse tool for me for assembling low-rank approximations of ma…

---

## [Adding members to an existing Enum](https://discourse.julialang.org/t/adding-members-to-an-existing-enum/108962)

<div class="topic-metadata">

**Author:** [@egvila](https://discourse.julialang.org/u/egvila)\
**Replies:** 5\
**Last updated:** [January 19, 2024, 7:33pm UTC](https://discourse.julialang.org/t/adding-members-to-an-existing-enum/108962 "2024-01-19T19:33:39Z")

</div>

If there is an existing Enum with some members, e.g., @enum Fruit apple=1 orange=2 How could I later add kiwi=3 to it?

---

## [Quoting when constructing commands problematic?](https://discourse.julialang.org/t/quoting-when-constructing-commands-problematic/109023)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 6\
**Last updated:** [January 19, 2024, 8:41pm UTC](https://discourse.julialang.org/t/quoting-when-constructing-commands-problematic/109023 "2024-01-19T20:41:30Z")

</div>

I think the construction of commands objects on Windows uses improper quoting for directories. See PlotlyJS causes errors, can't figure out how to use PlotlyLight - how to use Plotly from Julia? - #27 by PetrKryslUCSD

---

## [abs(::Int32) slower than abs(::Int)](https://discourse.julialang.org/t/abs-int32-slower-than-abs-int/109011)

<div class="topic-metadata">

**Author:** [@djholiver](https://discourse.julialang.org/u/djholiver)\
**Replies:** 7\
**Last updated:** [January 19, 2024, 8:18pm UTC](https://discourse.julialang.org/t/abs-int32-slower-than-abs-int/109011 "2024-01-19T20:18:30Z")

</div>

Hi, I have a need for a lot of large integer vectors, so have attempted to make use of Int32 rather than Int to minimise the memory footprint. As I need to ensure the values are positive, I call abs(i) on each element d…

---

## [Waking up "YouTube Timestamps" after some sleep time](https://discourse.julialang.org/t/waking-up-youtube-timestamps-after-some-sleep-time/108336)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 6\
**Last updated:** [January 19, 2024, 8:00pm UTC](https://discourse.julialang.org/t/waking-up-youtube-timestamps-after-some-sleep-time/108336 "2024-01-19T20:00:21Z")

</div>

Currently there is 75 open issues about posting new timestamps to Julia YT videos and I want to help to put people work in the to the good use. I review, as a normal user, basically all of them, tweaking timestamps and p…

---

## [Using Vararg for mixed types](https://discourse.julialang.org/t/using-vararg-for-mixed-types/108973)

<div class="topic-metadata">

**Author:** [@Larbino1](https://discourse.julialang.org/u/Larbino1)\
**Replies:** 5\
**Last updated:** [January 19, 2024, 4:17pm UTC](https://discourse.julialang.org/t/using-vararg-for-mixed-types/108973 "2024-01-19T16:17:40Z")

</div>

Recently I have started getting the error message: WARNING: Wrapping Vararg directly in UnionAll is deprecated (wrap the tuple instead). │ You may need to write f(x::Vararg{T}) rather than f(x::Vararg{\<:T}) or f(x::Va…

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

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