# Latest

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

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

**Page:** 726

---

## [Is there a way to return from a function from within a thread?](https://discourse.julialang.org/t/is-there-a-way-to-return-from-a-function-from-within-a-thread/35656)

<div class="topic-metadata">

**Author:** [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Replies:** 13\
**Last updated:** [April 16, 2023, 11:52am UTC](https://discourse.julialang.org/t/is-there-a-way-to-return-from-a-function-from-within-a-thread/35656 "2023-04-16T11:52:04Z")

</div>

I have a function that does a @threads loop. There is a condition that gets evaluated inside the loop. If the condition returns false, there’s no point in continuing any of the work; I’d like to just return false: funct…

---

## [Coupled PINN](https://discourse.julialang.org/t/coupled-pinn/95521)

<div class="topic-metadata">

**Author:** [@Reza\_AO](https://discourse.julialang.org/u/Reza_AO)\
**Replies:** 32\
**Last updated:** [April 16, 2023, 6:56am UTC](https://discourse.julialang.org/t/coupled-pinn/95521 "2023-04-16T06:56:33Z")

</div>

Hi. I wanted to solve two different heat diffusion equations(coupled) and solve them. For this I need 2 seperate domains for equations and I want to solve them in parallel in 2 independent Neural Networks. How can I solv…

---

## [toeplitz matrix](https://discourse.julialang.org/t/toeplitz-matrix/22457)

<div class="topic-metadata">

**Author:** [@areida](https://discourse.julialang.org/u/areida)\
**Replies:** 20\
**Last updated:** [April 16, 2023, 3:53am UTC](https://discourse.julialang.org/t/toeplitz-matrix/22457 "2023-04-16T03:53:51Z")

</div>

Hello, I’m trying to write Toeplitz matrix function. I have something like this function toeplitz(x::Array) n = length(x) A = zeros(T, n, n) for i in 1:n A\[i,:\] = x\[1:n - i + 1\] end end and I g…

---

## [Using proxychains with Julia?](https://discourse.julialang.org/t/using-proxychains-with-julia/97535)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 0\
**Last updated:** [April 16, 2023, 3:46am UTC](https://discourse.julialang.org/t/using-proxychains-with-julia/97535 "2023-04-16T03:46:39Z")

</div>

I need to access some servers via a socks proxy. I’m able to do this with python by calling $ proxychains python but trying the same with julia causes it to hang at startup. Any idea what’s going on? Not sure if it’…

---

## [Reading and writing HDF5 compound-typed array datasets](https://discourse.julialang.org/t/reading-and-writing-hdf5-compound-typed-array-datasets/97516)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 3\
**Last updated:** [April 16, 2023, 2:33am UTC](https://discourse.julialang.org/t/reading-and-writing-hdf5-compound-typed-array-datasets/97516 "2023-04-16T02:33:46Z")

</div>

I wanted to write vectors of LabelledArrays to HDF5 files, preserving the labels, and be able to read these back and reconstruct the original data. My data is pretty much entirely numeric. I’ve found it hard to find any…

---

## [Why is type promotion asymmetric in \`append!\`? \`append!(\[1.1\],\[1\])\` vs \`append!(\[1\],\[1.1\])\`](https://discourse.julialang.org/t/why-is-type-promotion-asymmetric-in-append-append-1-1-1-vs-append-1-1-1/97531)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 2\
**Last updated:** [April 16, 2023, 2:01am UTC](https://discourse.julialang.org/t/why-is-type-promotion-asymmetric-in-append-append-1-1-1-vs-append-1-1-1/97531 "2023-04-16T02:01:00Z")

</div>

Why is this is fine: julia\> append!(\[1.1\],\[1\]) 2-element Vector{Float64}: 1.1 1.0 but this not? julia\> append!(\[1\],\[1.1\]) ERROR: InexactError: Int64(1.1) I find this strange when this is fine: julia\> vcat(\[1\], 1.1…

---

## [What package allowed setting the learning rate for a minimization problem?](https://discourse.julialang.org/t/what-package-allowed-setting-the-learning-rate-for-a-minimization-problem/97523)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 6\
**Last updated:** [April 16, 2023, 12:50am UTC](https://discourse.julialang.org/t/what-package-allowed-setting-the-learning-rate-for-a-minimization-problem/97523 "2023-04-16T00:50:05Z")

</div>

What package allowed setting the learning rate for a minimization problem? Thank you P.S. it looks like Opitm.jl isn’t allowed.

---

## [Julia 1.9 vs. 1.8 performance for comprehension and splatting?](https://discourse.julialang.org/t/julia-1-9-vs-1-8-performance-for-comprehension-and-splatting/97521)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 0\
**Last updated:** [April 15, 2023, 8:00pm UTC](https://discourse.julialang.org/t/julia-1-9-vs-1-8-performance-for-comprehension-and-splatting/97521 "2023-04-15T20:00:04Z")

</div>

Julia 1.9 seems to be slower than 1.8 for some comprehension and splatting code. Here’s a minimal working example. I’ve written functions for doubling the values of a dictionary, including a “normal” version involving a …

---

## [Coding Challenges websites for Julia](https://discourse.julialang.org/t/coding-challenges-websites-for-julia/41038)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 22\
**Last updated:** [April 15, 2023, 6:30pm UTC](https://discourse.julialang.org/t/coding-challenges-websites-for-julia/41038 "2023-04-15T18:30:42Z")

</div>

I love solving programming challenges, but many programming sites don’t support Julia and I’ve been emailing them to ask for support Julia for a while. These are some websites I found to be good for Julia With correctne…

---

## [April 15 Online Talk: Decentralized Programming for True Decentralized Systems | Introduction to Julia by a Quant](https://discourse.julialang.org/t/april-15-online-talk-decentralized-programming-for-true-decentralized-systems-introduction-to-julia-by-a-quant/97387)

<div class="topic-metadata">

**Author:** [@martinyxie](https://discourse.julialang.org/u/martinyxie)\
**Replies:** 2\
**Last updated:** [April 15, 2023, 5:08pm UTC](https://discourse.julialang.org/t/april-15-online-talk-decentralized-programming-for-true-decentralized-systems-introduction-to-julia-by-a-quant/97387 "2023-04-15T17:08:13Z")

</div>

Hey guys, I will give a live talk on “Decentralized Programming for True Decentralized Systems | Introduction to Julia by a Quant”. This will be an extended version of the talk I gave a month ago at PyData Dubai. Free to…

---

## [Flattening nested operators in \`Expr\`](https://discourse.julialang.org/t/flattening-nested-operators-in-expr/96468)

<div class="topic-metadata">

**Author:** [@moble](https://discourse.julialang.org/u/moble)\
**Replies:** 6\
**Last updated:** [April 15, 2023, 2:12pm UTC](https://discourse.julialang.org/t/flattening-nested-operators-in-expr/96468 "2023-04-15T14:12:22Z")

</div>

I have an Expr that comes to me looking like this: :((+)((+)(1,2),3)) except that my actual Exprs have 100s of terms, each of which is a complicated expression (which may involve products with further sums that I don’t…

---

## [Variable number of command line arguments with ArgParse.jl](https://discourse.julialang.org/t/variable-number-of-command-line-arguments-with-argparse-jl/97493)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 2\
**Last updated:** [April 15, 2023, 2:11pm UTC](https://discourse.julialang.org/t/variable-number-of-command-line-arguments-with-argparse-jl/97493 "2023-04-15T14:11:07Z")

</div>

With ArgParse.jl, how can I parse key word arguments like --myoption 1 while ignoring all positional arguments, when the number of position argument is not fixed, i.e. “vararg”?

---

## [Docstrings do not appear in the project documentation](https://discourse.julialang.org/t/docstrings-do-not-appear-in-the-project-documentation/97429)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 18\
**Last updated:** [April 15, 2023, 1:54pm UTC](https://discourse.julialang.org/t/docstrings-do-not-appear-in-the-project-documentation/97429 "2023-04-15T13:54:05Z")

</div>

Hi! I have just pushed a new Julia project (GitHub - mmverstraete/JMtk15: Julia wrapper functions to the C functions of the MISR Toolkit (Mtk) Version 1.5.) on GitHub. It is currently incomplete (work in progress), but …

---

## [How to replace all values in an array with missing values?](https://discourse.julialang.org/t/how-to-replace-all-values-in-an-array-with-missing-values/75467)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 43\
**Last updated:** [April 15, 2023, 12:24pm UTC](https://discourse.julialang.org/t/how-to-replace-all-values-in-an-array-with-missing-values/75467 "2023-04-15T12:24:26Z")

</div>

I have an array A with the size of 360 x 180 x 100. The current missing value indicator is NaN. My goal is to replace all NaN values with missing values. Below is my code: A\[isnan.(A)\] .= missing; Unfortunately, I got…

---

## [\[Linux\] .jl files are identified as "plain text documents"](https://discourse.julialang.org/t/linux-jl-files-are-identified-as-plain-text-documents/87698)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 9\
**Last updated:** [April 15, 2023, 10:56am UTC](https://discourse.julialang.org/t/linux-jl-files-are-identified-as-plain-text-documents/87698 "2023-04-15T10:56:24Z")

</div>

On windows, I chose to open .jl files in VSCode and .txt files in notepad. I have installed linux, and now when i change the default program for .jl files, it also changes for .txt files, as both are identified as “plai…

---

## [Why is a staggering 30% of the CPU profile not accounted for?](https://discourse.julialang.org/t/why-is-a-staggering-30-of-the-cpu-profile-not-accounted-for/97478)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 2\
**Last updated:** [April 15, 2023, 10:23am UTC](https://discourse.julialang.org/t/why-is-a-staggering-30-of-the-cpu-profile-not-accounted-for/97478 "2023-04-15T10:23:42Z")

</div>

How come that 30% (on the right-hand side) of the CPU performance profile here is not accounted for? This is in the preview version of the (VS) Code Julia extension, with Julia 1.9.0-rc2, on Linux. This seems reprod…

---

## [Functions with static table-like inputs and outputs](https://discourse.julialang.org/t/functions-with-static-table-like-inputs-and-outputs/97471)

<div class="topic-metadata">

**Author:** [@sairus7](https://discourse.julialang.org/u/sairus7)\
**Replies:** 5\
**Last updated:** [April 15, 2023, 10:09am UTC](https://discourse.julialang.org/t/functions-with-static-table-like-inputs-and-outputs/97471 "2023-04-15T10:09:13Z")

</div>

I often have to write functions that recalculate some arrays of structures (sorted by one of the fields) into other arrays of structures. I often had to do conversions from one array of structures into another to fit arg…

---

## [Split country column into a column with city and a column with country](https://discourse.julialang.org/t/split-country-column-into-a-column-with-city-and-a-column-with-country/96586)

<div class="topic-metadata">

**Author:** [@akshdfyehd](https://discourse.julialang.org/u/akshdfyehd)\
**Replies:** 5\
**Last updated:** [March 28, 2023, 10:57am UTC](https://discourse.julialang.org/t/split-country-column-into-a-column-with-city-and-a-column-with-country/96586 "2023-03-28T10:57:19Z")

</div>

Hi, i have got a travel dataset and I need to split the destination column into two columns, one column is city and another column is country name, for example, “Sydney, Australia” will be split into sydney in city colum…

---

## [Video created by VideoIO.jl doesn't display properly on Android WhatsApp](https://discourse.julialang.org/t/video-created-by-videoio-jl-doesnt-display-properly-on-android-whatsapp/97492)

<div class="topic-metadata">

**Author:** [@marcsgil](https://discourse.julialang.org/u/marcsgil)\
**Replies:** 1\
**Last updated:** [April 15, 2023, 5:54am UTC](https://discourse.julialang.org/t/video-created-by-videoio-jl-doesnt-display-properly-on-android-whatsapp/97492 "2023-04-15T05:54:00Z")

</div>

Hello! I’m trying to share some videos I generated using VideoIO.jl on WhatsApp. Although the videos work well on WhatsApp Web and WhatsApp iOS, I’m encountering some strange issues when I try to play them on my Android…

---

## [UndefVarError: solver not defined](https://discourse.julialang.org/t/undefvarerror-solver-not-defined/97497)

<div class="topic-metadata">

**Author:** [@Meilame\_Tayebjee](https://discourse.julialang.org/u/Meilame_Tayebjee)\
**Replies:** 3\
**Last updated:** [April 15, 2023, 3:56am UTC](https://discourse.julialang.org/t/undefvarerror-solver-not-defined/97497 "2023-04-15T03:56:30Z")

</div>

Hi, I am trying to run that small code that comes from Introduction to Julia using JuMP, Clp m = Model() @variable(m, x \>=0) @variable(m, y \>=0) @objective(m, Min, 10x + 26y) @constraint(m, const1, 11x + 3y \>= 21) @con…

---

## [Scalling both primal and dual feasibility tolerance according to the size of the problem](https://discourse.julialang.org/t/scalling-both-primal-and-dual-feasibility-tolerance-according-to-the-size-of-the-problem/97455)

<div class="topic-metadata">

**Author:** [@ErwanMeunier](https://discourse.julialang.org/u/ErwanMeunier)\
**Replies:** 2\
**Last updated:** [April 15, 2023, 12:44am UTC](https://discourse.julialang.org/t/scalling-both-primal-and-dual-feasibility-tolerance-according-to-the-size-of-the-problem/97455 "2023-04-15T00:44:17Z")

</div>

Hi, I have JuMP (MILP) models usually solved by HiGHS. Since some of my models were pretty constrained and had a lot of variables, some numerical issues arose and made some problems infeasible. I hence had to cross swor…

---

## [Construct and intermittently call a single Julia instance with JuliaCall](https://discourse.julialang.org/t/construct-and-intermittently-call-a-single-julia-instance-with-juliacall/96541)

<div class="topic-metadata">

**Author:** [@kydonian](https://discourse.julialang.org/u/kydonian)\
**Replies:** 4\
**Last updated:** [April 14, 2023, 9:00pm UTC](https://discourse.julialang.org/t/construct-and-intermittently-call-a-single-julia-instance-with-juliacall/96541 "2023-04-14T21:00:19Z")

</div>

I’m trying to incorporate JuliaCall in my application. Larger context: Julia is the backend to a python service endpoint (i.e. somebody sends an optimization problem to a server written in python via gRPC, server call…

---

## [A new solver for robustified non-linear least squares problems, with non-Euclidean variables](https://discourse.julialang.org/t/a-new-solver-for-robustified-non-linear-least-squares-problems-with-non-euclidean-variables/96085)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 6\
**Last updated:** [April 14, 2023, 10:30pm UTC](https://discourse.julialang.org/t/a-new-solver-for-robustified-non-linear-least-squares-problems-with-non-euclidean-variables/96085 "2023-04-14T22:30:19Z")

</div>

I have written a new solver for robustified non-linear least squares problems, with non-Euclidean variables. It can compute auto-differentiated Jacobians when necessary. I have called the package NLLSsolver. Please feel …

---

## [Plotting in VS Code pane](https://discourse.julialang.org/t/plotting-in-vs-code-pane/97483)

<div class="topic-metadata">

**Author:** [@JustCurious](https://discourse.julialang.org/u/JustCurious)\
**Replies:** 5\
**Last updated:** [April 14, 2023, 9:56pm UTC](https://discourse.julialang.org/t/plotting-in-vs-code-pane/97483 "2023-04-14T21:56:43Z")

</div>

Creating a drawing using dimensions results in expected plotting behavior in the VS code plot pane: using Luxor, Dates dt=now() d=Drawing(400, 400, "useDimensions\_" \* Dates.format(dt, dateformat"yyyymmdd\\THHMMSS") \* ".p…

---

## [Importing symbols from submodule](https://discourse.julialang.org/t/importing-symbols-from-submodule/97488)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 2\
**Last updated:** [April 14, 2023, 7:39pm UTC](https://discourse.julialang.org/t/importing-symbols-from-submodule/97488 "2023-04-14T19:39:25Z")

</div>

I’d like to import symbols from a submodule without fully qualifying the module. Like this import TestPackage.InnerMod import InnerMod: inner\_a # or import InnerMod.a But that gives me ArgumentError: Package InnerMod n…

---

## [Embedding Julia in Scala](https://discourse.julialang.org/t/embedding-julia-in-scala/97347)

<div class="topic-metadata">

**Author:** [@Simon\_Parten](https://discourse.julialang.org/u/Simon_Parten)\
**Replies:** 10\
**Last updated:** [April 14, 2023, 7:24pm UTC](https://discourse.julialang.org/t/embedding-julia-in-scala/97347 "2023-04-14T19:24:32Z")

</div>

Hi, I’m setting out to conduct a POC which calls Julia from Scala, via Julia’s C interface. https://github.com/Quafadas/slincTest/blob/master/slinc.scala#L30 I’ve checked that I can call functions from the std C libra…

---

## [Best way to alternate RNG in inner functions?](https://discourse.julialang.org/t/best-way-to-alternate-rng-in-inner-functions/97487)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 2\
**Last updated:** [April 14, 2023, 7:14pm UTC](https://discourse.julialang.org/t/best-way-to-alternate-rng-in-inner-functions/97487 "2023-04-14T19:14:51Z")

</div>

Given a code in which rand is called in a inner function, as in this simplified example: module Test import Random export outer RNG = Random.Xoshiro() function inner(x) x += rand(RNG) end function outer(x) …

---

## [Subset sum problem with SymbolicRegressions.jl](https://discourse.julialang.org/t/subset-sum-problem-with-symbolicregressions-jl/97479)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 7\
**Last updated:** [April 14, 2023, 5:56pm UTC](https://discourse.julialang.org/t/subset-sum-problem-with-symbolicregressions-jl/97479 "2023-04-14T17:56:56Z")

</div>

Trying to solve Digits: A Daily Math Puzzle - The New York Times with Julia and it’s clearly a NP-complete problem because it’s harder than the Subset sum problem which is known to be NP-complete. The current attempt is…

---

## [Is it the correct way to check for specializations?](https://discourse.julialang.org/t/is-it-the-correct-way-to-check-for-specializations/93490)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 4\
**Last updated:** [April 14, 2023, 5:49pm UTC](https://discourse.julialang.org/t/is-it-the-correct-way-to-check-for-specializations/93490 "2023-04-14T17:49:29Z")

</div>

Following the last paragraph at docs, I want to check if julia is generating specialized version for some of my code. Testing against some built-in functions, first define function get\_sp(wfx) for mi in wfx.speciali…

---

## [Type instability with CuVector inside struct](https://discourse.julialang.org/t/type-instability-with-cuvector-inside-struct/97476)

<div class="topic-metadata">

**Author:** [@bjarthur](https://discourse.julialang.org/u/bjarthur)\
**Replies:** 2\
**Last updated:** [April 14, 2023, 5:45pm UTC](https://discourse.julialang.org/t/type-instability-with-cuvector-inside-struct/97476 "2023-04-14T17:45:38Z")

</div>

this is a very simple problem, so i fear i’m making a dumb mistake. apologies if so. but i can’t figure out why the function foo below is type unstable when input with a struct that has a CuVector in it, whereas if it’…

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

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