# Latest

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

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

**Page:** 308

---

## [How does Dualization.jl solve a SOS but not compute it?](https://discourse.julialang.org/t/how-does-dualization-jl-solve-a-sos-but-not-compute-it/119966)

<div class="topic-metadata">

**Author:** [@ashefa](https://discourse.julialang.org/u/ashefa)\
**Replies:** 2\
**Last updated:** [October 4, 2024, 6:24am UTC](https://discourse.julialang.org/t/how-does-dualization-jl-solve-a-sos-but-not-compute-it/119966 "2024-10-04T06:24:43Z")

</div>

Hi, While solving a conic optimization problem, I needed to compute its dual, so I used Dualization.jl. However, it does not support the constraints modeled by SumOfSquares.jl, resulting in the following error: Constra…

---

## [How do I move the cursor up?](https://discourse.julialang.org/t/how-do-i-move-the-cursor-up/120882)

<div class="topic-metadata">

**Author:** [@Paul\_Warburton](https://discourse.julialang.org/u/Paul_Warburton)\
**Replies:** 4\
**Last updated:** [October 4, 2024, 5:44am UTC](https://discourse.julialang.org/t/how-do-i-move-the-cursor-up/120882 "2024-10-04T05:44:43Z")

</div>

I want to print an array on the screen, then wait 1 second and print it again in the exact location (it will have changed) such that I only ever see one copy and the screen does not scroll downwards. I just need a escap…

---

## [Defining @ constraint with IntervalConstraintProgramming](https://discourse.julialang.org/t/defining-constraint-with-intervalconstraintprogramming/120884)

<div class="topic-metadata">

**Author:** [@ij05](https://discourse.julialang.org/u/ij05)\
**Replies:** 0\
**Last updated:** [October 4, 2024, 5:19am UTC](https://discourse.julialang.org/t/defining-constraint-with-intervalconstraintprogramming/120884 "2024-10-04T05:19:23Z")

</div>

I am trying to define a constraint using the IntervalConstraintProgramming.jl package as follows: a=3 C = @constraint x^2 + y^2 - $a \<= 0 Here, I wanted x and y to be treated as variables and a as a constant, defined e…

---

## [Choosing CPU for linear algebra: AMD 9950X or something else?](https://discourse.julialang.org/t/choosing-cpu-for-linear-algebra-amd-9950x-or-something-else/120872)

<div class="topic-metadata">

**Author:** [@Norman](https://discourse.julialang.org/u/Norman)\
**Replies:** 4\
**Last updated:** [October 4, 2024, 2:51am UTC](https://discourse.julialang.org/t/choosing-cpu-for-linear-algebra-amd-9950x-or-something-else/120872 "2024-10-04T02:51:35Z")

</div>

I am considering getting a new computer with at least 64GB RAM for computation that involves doing lots of linear algebra (matrix-matrix multiplications and solving linear systems). For my purposes, I would prefer not de…

---

## [Managing concurrent running shell tasks without a manual counter](https://discourse.julialang.org/t/managing-concurrent-running-shell-tasks-without-a-manual-counter/119712)

<div class="topic-metadata">

**Author:** [@ivoytov](https://discourse.julialang.org/u/ivoytov)\
**Replies:** 5\
**Last updated:** [October 4, 2024, 12:45am UTC](https://discourse.julialang.org/t/managing-concurrent-running-shell-tasks-without-a-manual-counter/119712 "2024-10-04T00:45:27Z")

</div>

I’m doing multi-processing in a “cheat way”, with my long running code encapsulated in a Node Puppeteer script. I’m trying to not overload the server, so have at most 12 jobs running simultaneously. I hacked this way tog…

---

## [Error on PEtab related to SciMLSensitivity package](https://discourse.julialang.org/t/error-on-petab-related-to-scimlsensitivity-package/120871)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 0\
**Last updated:** [October 3, 2024, 9:19pm UTC](https://discourse.julialang.org/t/error-on-petab-related-to-scimlsensitivity-package/120871 "2024-10-03T21:19:59Z")

</div>

Hi, I am running a parameter estimation on PEtab and I get the following error when I use InterpolatingAdjoint(autojacvec = ReverseDiffVJP(true)) or InterpolatingAdjoint(autojacvec = EnzymeVJP())) type FakeIntegrator …

---

## [Makie - can I exclude some plots from automatic axis limit calculation?](https://discourse.julialang.org/t/makie-can-i-exclude-some-plots-from-automatic-axis-limit-calculation/120870)

<div class="topic-metadata">

**Author:** [@nchisholm](https://discourse.julialang.org/u/nchisholm)\
**Replies:** 1\
**Last updated:** [October 3, 2024, 8:56pm UTC](https://discourse.julialang.org/t/makie-can-i-exclude-some-plots-from-automatic-axis-limit-calculation/120870 "2024-10-03T20:56:55Z")

</div>

When plotting multiple plots into an Axis in Makie, is it possible to exclude some of them from being accounted for when automatic axis limit calculation is performed? Something like fig = Figure() ax = Axis(fig\[1,1\]) …

---

## [Windows artifact issue - "access denied" when installing Plots/Makie](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 10\
**Last updated:** [October 3, 2024, 7:18pm UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734 "2024-10-03T19:18:19Z")

</div>

For a few days now I’ve been unable to precompile Plots and CairoMakie on my Windows machine due to “access denied” errors with artifacts. Here’s that I see: Precompiling project... ✗ Cairo\_jll ✗ HarfBuzz\_jll ✗ li…

---

## [Calculating Statistics of an Array with A Mask (Masked Array)](https://discourse.julialang.org/t/calculating-statistics-of-an-array-with-a-mask-masked-array/120868)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 1\
**Last updated:** [October 3, 2024, 7:25pm UTC](https://discourse.julialang.org/t/calculating-statistics-of-an-array-with-a-mask-masked-array/120868 "2024-10-03T19:25:23Z")

</div>

I saw a great thread on performance at Slack. I asked to reproduce it here as I think it will be beneficial for many. The participants were: Alexander Plavin, @danielwe, @jar, @mcabbott . It started with Alexander’s q…

---

## [Is \`put!\` of a \`RemoteChannel\` thread-safe](https://discourse.julialang.org/t/is-put-of-a-remotechannel-thread-safe/120866)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 0\
**Last updated:** [October 3, 2024, 6:18pm UTC](https://discourse.julialang.org/t/is-put-of-a-remotechannel-thread-safe/120866 "2024-10-03T18:18:36Z")

</div>

Hello, I have the following RemoteChannel channel = RemoteChannel(() -\> Channel{Bool}(), 1) Is the put!(channel, true) action thread-safe?

---

## [Correct handling of LOAD\_PATH in Julia script for running with julia - -project= . .](https://discourse.julialang.org/t/correct-handling-of-load-path-in-julia-script-for-running-with-julia-project/120812)

<div class="topic-metadata">

**Author:** [@EvgenijGr](https://discourse.julialang.org/u/EvgenijGr)\
**Replies:** 8\
**Last updated:** [October 3, 2024, 5:21pm UTC](https://discourse.julialang.org/t/correct-handling-of-load-path-in-julia-script-for-running-with-julia-project/120812 "2024-10-03T17:21:29Z")

</div>

Hello, I have the following questions. Below is a MWE script that I want to run with julia --project=myLocalEnv .\\mySimpleScript.jl. What I’ve discovered is that even if the package DataFrames is not installed in myLoca…

---

## [Setting up Julia in WSL (Windows Subsystem for Linux)](https://discourse.julialang.org/t/setting-up-julia-in-wsl-windows-subsystem-for-linux/120858)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 6\
**Last updated:** [October 3, 2024, 4:48pm UTC](https://discourse.julialang.org/t/setting-up-julia-in-wsl-windows-subsystem-for-linux/120858 "2024-10-03T16:48:46Z")

</div>

Hi everyone! Does anyone know of a good step-by-step tutorial explaining how to install Julia under WSL (Windows Subsystem for Linux)? Bonus points if it could also explain how to get VSCode to work with Julia, when als…

---

## [Implementing an equivalent of python's xarray (labeled nd-arrays) in julia](https://discourse.julialang.org/t/implementing-an-equivalent-of-pythons-xarray-labeled-nd-arrays-in-julia/1741)

<div class="topic-metadata">

**Author:** [@nbren12](https://discourse.julialang.org/u/nbren12)\
**Replies:** 15\
**Last updated:** [October 3, 2024, 3:29pm UTC](https://discourse.julialang.org/t/implementing-an-equivalent-of-pythons-xarray-labeled-nd-arrays-in-julia/1741 "2024-10-03T15:29:58Z")

</div>

One of the python packages I use the most is an excellent library called xarray, which is very convenient for handing multi-dimensional data. This package provides a DataArray object which associates a n-d array with nam…

---

## [Same performances between type-stable and type-unstable code](https://discourse.julialang.org/t/same-performances-between-type-stable-and-type-unstable-code/120799)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 13\
**Last updated:** [October 3, 2024, 3:22pm UTC](https://discourse.julialang.org/t/same-performances-between-type-stable-and-type-unstable-code/120799 "2024-10-03T15:22:06Z")

</div>

I’m writing some text explaining the importance of having type-stable code in Julia. I made the simple example of global variables: y = 2.4 function bar(x) res = zero(x) for i in 1:1000 res += y \* x …

---

## [Terminate a task](https://discourse.julialang.org/t/terminate-a-task/120855)

<div class="topic-metadata">

**Author:** [@zoythum](https://discourse.julialang.org/u/zoythum)\
**Replies:** 2\
**Last updated:** [October 3, 2024, 1:03pm UTC](https://discourse.julialang.org/t/terminate-a-task/120855 "2024-10-03T13:03:22Z")

</div>

I am using ZMQ to create a publisher subscriber infrastructure. The main problem I am facing is that the recv function blocks the execution of the code. I would like to spawn a Task that is responsible for receiving a ne…

---

## [How to optimise a linear solve in a hot loop?](https://discourse.julialang.org/t/how-to-optimise-a-linear-solve-in-a-hot-loop/120835)

<div class="topic-metadata">

**Author:** [@marcsgil](https://discourse.julialang.org/u/marcsgil)\
**Replies:** 7\
**Last updated:** [October 3, 2024, 12:55pm UTC](https://discourse.julialang.org/t/how-to-optimise-a-linear-solve-in-a-hot-loop/120835 "2024-10-03T12:55:51Z")

</div>

I have a hot loop that takes the following simplified form: for n in eachindex(result) compute\_A!(A) compute\_b!(b) x = A \\ b result\[n\] = f(x) end Here, A is a tall dense matrix, b is a dense vector, bot…

---

## [Manifest\_usage.toml/pidfile related error](https://discourse.julialang.org/t/manifest-usage-toml-pidfile-related-error/112585)

<div class="topic-metadata">

**Author:** [@Sid1](https://discourse.julialang.org/u/Sid1)\
**Replies:** 1\
**Last updated:** [October 3, 2024, 11:46am UTC](https://discourse.julialang.org/t/manifest-usage-toml-pidfile-related-error/112585 "2024-10-03T11:46:00Z")

</div>

I keep coming across this error (inconsistently) when I run my scripts on a HPC cluster: Activating project at \`/projects\` ERROR: LoadError: On worker 8: IOError: open("/user/.julia/logs/manifest\_usage.toml.pid", 194,…

---

## [Function to obtain the maximum value of each element of an array with a second argument of zero?](https://discourse.julialang.org/t/function-to-obtain-the-maximum-value-of-each-element-of-an-array-with-a-second-argument-of-zero/120852)

<div class="topic-metadata">

**Author:** [@anon91151494](https://discourse.julialang.org/u/anon91151494)\
**Replies:** 1\
**Last updated:** [October 3, 2024, 11:19am UTC](https://discourse.julialang.org/t/function-to-obtain-the-maximum-value-of-each-element-of-an-array-with-a-second-argument-of-zero/120852 "2024-10-03T11:19:44Z")

</div>

Is there a function in Julia which takes an array and a scalar as input and returns an array as output where the values of each element of the array are as follows: out\_i = max(input\_i, v) where v is some arbitrary sca…

---

## [Negative integer exponent](https://discourse.julialang.org/t/negative-integer-exponent/120848)

<div class="topic-metadata">

**Author:** [@Andrea\_Pagnani](https://discourse.julialang.org/u/Andrea_Pagnani)\
**Replies:** 4\
**Last updated:** [October 3, 2024, 10:49am UTC](https://discourse.julialang.org/t/negative-integer-exponent/120848 "2024-10-03T10:49:35Z")

</div>

There is something strange that I do not understand: julia\> 2^-3 0.125 works ok. But the following minor generalization does not. julia\> g() = -3; 2^g() ERROR: DomainError with -3: Cannot raise an integer x to a negat…

---

## [Issue with DynamicPolynomials and BigFloat coefficients?](https://discourse.julialang.org/t/issue-with-dynamicpolynomials-and-bigfloat-coefficients/120814)

<div class="topic-metadata">

**Author:** [@chkat](https://discourse.julialang.org/u/chkat)\
**Replies:** 2\
**Last updated:** [October 3, 2024, 10:05am UTC](https://discourse.julialang.org/t/issue-with-dynamicpolynomials-and-bigfloat-coefficients/120814 "2024-10-03T10:05:56Z")

</div>

I am experiencing an issue with the latest version of DynamicPolynomials (0.6) when I evaluate a polynomial with BigFloat coefficients at another BigFloat. I isolated a simple example that shows that I get different resu…

---

## [Readlines(filepath) and read(filepath,String) read different content](https://discourse.julialang.org/t/readlines-filepath-and-read-filepath-string-read-different-content/120777)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 15\
**Last updated:** [October 3, 2024, 9:52am UTC](https://discourse.julialang.org/t/readlines-filepath-and-read-filepath-string-read-different-content/120777 "2024-10-03T09:52:11Z")

</div>

Hey Julianners, This is fairly strange behavior as the readlines(fila\_path) doesn’t read the last enter from the file. Why is that? file\_path="test/playground/test/src/profile\_startup.jl" lines = readlines(file\_path, k…

---

## [Issue with gridlines when cliping is used in GMT's grdimage](https://discourse.julialang.org/t/issue-with-gridlines-when-cliping-is-used-in-gmts-grdimage/120844)

<div class="topic-metadata">

**Author:** [@k945](https://discourse.julialang.org/u/k945)\
**Replies:** 0\
**Last updated:** [October 3, 2024, 8:50am UTC](https://discourse.julialang.org/t/issue-with-gridlines-when-cliping-is-used-in-gmts-grdimage/120844 "2024-10-03T08:50:20Z")

</div>

How do I mask out the ocean when using GMT? Doing this using grdimage does not appear to be working. Here is the image without clipping applied However when I set cliping in grdimage to :land I get the following …

---

## [CuArray + GLMakie](https://discourse.julialang.org/t/cuarray-glmakie/52461)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 14\
**Last updated:** [October 3, 2024, 8:55am UTC](https://discourse.julialang.org/t/cuarray-glmakie/52461 "2024-10-03T08:55:57Z")

</div>

Hi, I wonder if it would make sense (from the performance point of view) to be able to use GLMakie.jl with CuArrays from CUDA.jl ?

---

## [TIL: loop variables can be an element of an array, dict, etc](https://discourse.julialang.org/t/til-loop-variables-can-be-an-element-of-an-array-dict-etc/120840)

<div class="topic-metadata">

**Author:** [@screw\_dog](https://discourse.julialang.org/u/screw_dog)\
**Replies:** 1\
**Last updated:** [October 3, 2024, 6:46am UTC](https://discourse.julialang.org/t/til-loop-variables-can-be-an-element-of-an-array-dict-etc/120840 "2024-10-03T06:46:46Z")

</div>

Been using Julia for several years and only just realised that you can use elements of an array, dict, etc as a loop variable. Eg julia\> v = zeros(Int, 3); for v\[1\] ∈ 0:3, v\[2\] ∈ v\[1\]:3, v\[3\] ∈ v\[2\]:3 println(v…

---

## [Figuring out Float64 representation for Newbies](https://discourse.julialang.org/t/figuring-out-float64-representation-for-newbies/120836)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 2\
**Last updated:** [October 3, 2024, 3:39am UTC](https://discourse.julialang.org/t/figuring-out-float64-representation-for-newbies/120836 "2024-10-03T03:39:46Z")

</div>

Ever want to know how Float64 numbers are represented in the raw machine bits? I have written a julia code to show it to you. function DescribeFloat64(x::Float64;verbose=false) # Local function convert binary stri…

---

## [How to profile Julia MPI code?](https://discourse.julialang.org/t/how-to-profile-julia-mpi-code/57136)

<div class="topic-metadata">

**Author:** [@PolarizedPoutine](https://discourse.julialang.org/u/PolarizedPoutine)\
**Replies:** 17\
**Last updated:** [October 3, 2024, 12:16am UTC](https://discourse.julialang.org/t/how-to-profile-julia-mpi-code/57136 "2024-10-03T00:16:05Z")

</div>

How do people usually profile Julia MPI code to find bottlenecks and reduce communication overhead? As an MPI noob I thought there would be some profiler tools out (kinda like cuprof and NVIDIA Nsight) there but they se…

---

## [Why is 1.0f-99 not a subnormal number?](https://discourse.julialang.org/t/why-is-1-0f-99-not-a-subnormal-number/120833)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 1\
**Last updated:** [October 2, 2024, 11:48pm UTC](https://discourse.julialang.org/t/why-is-1-0f-99-not-a-subnormal-number/120833 "2024-10-02T23:48:07Z")

</div>

ulia\> issubnormal(1.0f-37) false julia\> issubnormal(1.0f-38) true julia\> issubnormal(1.0f-39) true julia\> issubnormal(1.0f-99) false For Float64 numbers subnormal starts from exponent -308 to -324 and then it stops j…

---

## [Is there a non-allocating version of findall?](https://discourse.julialang.org/t/is-there-a-non-allocating-version-of-findall/120832)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 1\
**Last updated:** [October 2, 2024, 11:47pm UTC](https://discourse.julialang.org/t/is-there-a-non-allocating-version-of-findall/120832 "2024-10-02T23:47:00Z")

</div>

MWEusing StaticArrays, BenchmarkTools # Data vector dat = collect(1:10); # Always five "trues" but at any indices flag = \[trues(3); falses(5); trues(2)\]; # Index with vector of bools @btime ($dat\[$flag\]); @b…

---

## [How does structural\_simplify work?](https://discourse.julialang.org/t/how-does-structural-simplify-work/120810)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 9\
**Last updated:** [October 2, 2024, 9:22pm UTC](https://discourse.julialang.org/t/how-does-structural-simplify-work/120810 "2024-10-02T21:22:20Z")

</div>

The function structural\_simplify() of the package ModelingToolkit can reduce the number of equations of a DAE a lot, often by 80%. But how does this actually work? does the order of the DAE stays the same? does it int…

---

## [Does Julia recognize block, banded, and block-banded matrices?](https://discourse.julialang.org/t/does-julia-recognize-block-banded-and-block-banded-matrices/120821)

<div class="topic-metadata">

**Author:** [@rsenne](https://discourse.julialang.org/u/rsenne)\
**Replies:** 6\
**Last updated:** [October 2, 2024, 6:49pm UTC](https://discourse.julialang.org/t/does-julia-recognize-block-banded-and-block-banded-matrices/120821 "2024-10-02T18:49:24Z")

</div>

For a simple example of why I need this, let’s say I want to compute the entropy of a multivariate Gaussian. One can do this as follows: \\text{Entropy} \\propto -\\frac{1}{2}\*\\log|-H| where -H is the negative Hessian at …

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

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