# Latest

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

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

**Page:** 558

---

## [Error writing down a JSON file with JSON.jl](https://discourse.julialang.org/t/error-writing-down-a-json-file-with-json-jl/106028)

<div class="topic-metadata">

**Author:** [@PatrickeTownsend](https://discourse.julialang.org/u/PatrickeTownsend)\
**Replies:** 1\
**Last updated:** [November 10, 2023, 12:33pm UTC](https://discourse.julialang.org/t/error-writing-down-a-json-file-with-json-jl/106028 "2023-11-10T12:33:52Z")

</div>

Hello, I’m trying to export some data to a JSON format, the file is succesfully created with this function: function writeJSON() r = rand(3,3) N=3 data = \[Dict("x"=\> r\[i,1\],"y"=\> r\[i,2\],"z"=\>r\[i,3\]) for i=1…

---

## [Hide/Remove/Replace widgets from Makie.jl reactive plots](https://discourse.julialang.org/t/hide-remove-replace-widgets-from-makie-jl-reactive-plots/106029)

<div class="topic-metadata">

**Author:** [@eliascarv](https://discourse.julialang.org/u/eliascarv)\
**Replies:** 0\
**Last updated:** [November 10, 2023, 11:36am UTC](https://discourse.julialang.org/t/hide-remove-replace-widgets-from-makie-jl-reactive-plots/106029 "2023-11-10T11:36:52Z")

</div>

Hello everyone, I have a question about Makie. Just for context, I have a reactive plot that has a Makie.Colorbar, but when the Colorbar limits are equal it breaks. So my question is: Can I hide/remove the Colorbar or…

---

## [Why does \`mul!(u, A, v)\` allocate when \`A\` is sparse and \`u, v\` are views?](https://discourse.julialang.org/t/why-does-mul-u-a-v-allocate-when-a-is-sparse-and-u-v-are-views/105995)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 9\
**Last updated:** [November 10, 2023, 12:04pm UTC](https://discourse.julialang.org/t/why-does-mul-u-a-v-allocate-when-a-is-sparse-and-u-v-are-views/105995 "2023-11-10T12:04:42Z")

</div>

I’m wondering if there is a way to avoid allocations in the following scenario: julia\> using BenchmarkTools, LinearAlgebra, SparseArrays julia\> A = sprand(2, 3, 0.5); julia\> u, v = rand(2), rand(3); julia\> @btime mul…

---

## [Multiplication and no method matching error](https://discourse.julialang.org/t/multiplication-and-no-method-matching-error/105494)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 2\
**Last updated:** [November 10, 2023, 5:02am UTC](https://discourse.julialang.org/t/multiplication-and-no-method-matching-error/105494 "2023-11-10T05:02:45Z")

</div>

Hi, I am using gridap to develop this matrix but it gives me error. could you please help me find the issue. I2 = SymTensorValue{2,Float64}(1.0 ,0.0 ,1.0) I4 = I2⊗I2 I4\_sym = one(SymFourthOrderTensorValue{2,Float64}) P\_…

---

## [Reduce memory allocated in array view and in place sum](https://discourse.julialang.org/t/reduce-memory-allocated-in-array-view-and-in-place-sum/105974)

<div class="topic-metadata">

**Author:** [@ian](https://discourse.julialang.org/u/ian)\
**Replies:** 12\
**Last updated:** [November 10, 2023, 3:01am UTC](https://discourse.julialang.org/t/reduce-memory-allocated-in-array-view-and-in-place-sum/105974 "2023-11-10T03:01:18Z")

</div>

Hi all. New Julia user here. I want to significantly increase performance/reduce the amount of memory allocated in a function similar to the MWE below. Basically I need to access the elements of an array (sliced using a …

---

## [Adding custom color scales to plots](https://discourse.julialang.org/t/adding-custom-color-scales-to-plots/106004)

<div class="topic-metadata">

**Author:** [@jreaso](https://discourse.julialang.org/u/jreaso)\
**Replies:** 1\
**Last updated:** [November 10, 2023, 12:54am UTC](https://discourse.julialang.org/t/adding-custom-color-scales-to-plots/106004 "2023-11-10T00:54:33Z")

</div>

I have a line plot simply constructed from a vector x and a vector y, I have then computed a colors vector which corresponds to each x value. I want to add a color scale of sorts below my plot (or on the plot but below t…

---

## [\`outer\` keyword to automatically \`local\` a variable?](https://discourse.julialang.org/t/outer-keyword-to-automatically-local-a-variable/105964)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 19\
**Last updated:** [November 10, 2023, 12:52am UTC](https://discourse.julialang.org/t/outer-keyword-to-automatically-local-a-variable/105964 "2023-11-10T00:52:39Z")

</div>

When using the outer keyword, as desribed in Scope of Variables · The Julia Language : julia\> function f() i = 0 for outer i = 1:3 # empty end return i e…

---

## [How to turn off lightbulb pop-up in vscode](https://discourse.julialang.org/t/how-to-turn-off-lightbulb-pop-up-in-vscode/106017)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 10:21pm UTC](https://discourse.julialang.org/t/how-to-turn-off-lightbulb-pop-up-in-vscode/106017 "2023-11-09T22:21:49Z")

</div>

I am trying to read through an ipynb (never used before), but every cell has a lightbulb covering the content. What is an SPDX license identifier? Why is it prompting me for this in every cell? How can I turn off these…

---

## [Objective function value mysteriously negative with StochasticPrograms.jl](https://discourse.julialang.org/t/objective-function-value-mysteriously-negative-with-stochasticprograms-jl/106016)

<div class="topic-metadata">

**Author:** [@matt\_w](https://discourse.julialang.org/u/matt_w)\
**Replies:** 3\
**Last updated:** [November 9, 2023, 10:10pm UTC](https://discourse.julialang.org/t/objective-function-value-mysteriously-negative-with-stochasticprograms-jl/106016 "2023-11-09T22:10:28Z")

</div>

I am trying out Julia to model a stochastic network interdiction problem with the code below, where the objective of the first stage is to minimize the expected value of the second stage. However, I’ve encountered two (p…

---

## [Direct interface to Polars Rust library](https://discourse.julialang.org/t/direct-interface-to-polars-rust-library/99283)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 13\
**Last updated:** [November 9, 2023, 9:42pm UTC](https://discourse.julialang.org/t/direct-interface-to-polars-rust-library/99283 "2023-11-09T21:42:42Z")

</div>

There has been recent discussion about some benchmarking by the DuckDB folks with good results for DuckDB (“Well they would say that, wouldn’t they?” M. Rice-Davies) and Polars. Especially now that Polars supports readi…

---

## [Type Inference Issues in IterativeSolvers with LinearMaps](https://discourse.julialang.org/t/type-inference-issues-in-iterativesolvers-with-linearmaps/106007)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 8:07pm UTC](https://discourse.julialang.org/t/type-inference-issues-in-iterativesolvers-with-linearmaps/106007 "2023-11-09T20:07:53Z")

</div>

I was trying to improve the performance of a program I use that makes heavy use of implicit time stepping, which results in me solving linear systems of equations ‘Ax=b’. Because of things that have to do with my specifi…

---

## [How to make numbers/texts appear as one single text object in Makie?](https://discourse.julialang.org/t/how-to-make-numbers-texts-appear-as-one-single-text-object-in-makie/105977)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 3\
**Last updated:** [November 9, 2023, 7:13pm UTC](https://discourse.julialang.org/t/how-to-make-numbers-texts-appear-as-one-single-text-object-in-makie/105977 "2023-11-09T19:13:57Z")

</div>

When I generate vector graphics using CairoMakie, very often in the output figure (in .pdf) the axis numbers, labels and text (using text!() or Label()) consists of numbers and words which are ‘disconnected’ when I inspe…

---

## [Gradient of neural network parameters used inside of SMC simulation](https://discourse.julialang.org/t/gradient-of-neural-network-parameters-used-inside-of-smc-simulation/105967)

<div class="topic-metadata">

**Author:** [@YSanchezAraujo](https://discourse.julialang.org/u/YSanchezAraujo)\
**Replies:** 4\
**Last updated:** [November 9, 2023, 6:58pm UTC](https://discourse.julialang.org/t/gradient-of-neural-network-parameters-used-inside-of-smc-simulation/105967 "2023-11-09T18:58:28Z")

</div>

I’m working on implementing variational sequential monte carlo as per this paper A simplified version of the set of functions I’m using are: using Optimisers, Flux, ForwardDiff, Distributions, ...; # samples pa…

---

## [Mutable ProtoStruct beats Base Mutable Struct in microbenchmark...and then it is much slower in real program](https://discourse.julialang.org/t/mutable-protostruct-beats-base-mutable-struct-in-microbenchmark-and-then-it-is-much-slower-in-real-program/105982)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 9\
**Last updated:** [November 9, 2023, 5:21pm UTC](https://discourse.julialang.org/t/mutable-protostruct-beats-base-mutable-struct-in-microbenchmark-and-then-it-is-much-slower-in-real-program/105982 "2023-11-09T17:21:12Z")

</div>

I developed a bit the ProtoStructs.jl package recently and I managed to improve the performance of the implementation, but there is something I don’t understand why is happening: microbenchmarks seems to lie with julia\>…

---

## [Cuda kernel program](https://discourse.julialang.org/t/cuda-kernel-program/106002)

<div class="topic-metadata">

**Author:** [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)\
**Replies:** 1\
**Last updated:** [November 9, 2023, 5:05pm UTC](https://discourse.julialang.org/t/cuda-kernel-program/106002 "2023-11-09T17:05:32Z")

</div>

Am installing CuArrays package on online juliahub, But am getting the following error. This is the specification am using: Node Type: V100 GPU, 8 vCPUs, 61GB Memory; and the error is: Unsatisfiable requirements detect…

---

## [Multi-threaded worker processes](https://discourse.julialang.org/t/multi-threaded-worker-processes/33034)

<div class="topic-metadata">

**Author:** [@orenbenkiki](https://discourse.julialang.org/u/orenbenkiki)\
**Replies:** 14\
**Last updated:** [November 9, 2023, 3:57pm UTC](https://discourse.julialang.org/t/multi-threaded-worker-processes/33034 "2023-11-09T15:57:08Z")

</div>

My use case is running a rather large application on a cluster of multi-core machines. Using @threads is extremely convenient as one gets shared memory of “all things” (of course one needs to be careful). However, being …

---

## [How to queue a sequence of codes?](https://discourse.julialang.org/t/how-to-queue-a-sequence-of-codes/105990)

<div class="topic-metadata">

**Author:** [@soldin](https://discourse.julialang.org/u/soldin)\
**Replies:** 4\
**Last updated:** [November 9, 2023, 2:28pm UTC](https://discourse.julialang.org/t/how-to-queue-a-sequence-of-codes/105990 "2023-11-09T14:28:37Z")

</div>

Hi, I have a sequence of programs to run one after another. Could anyone plz let me know how to queue them?

---

## [Mice for julia](https://discourse.julialang.org/t/mice-for-julia/60355)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 10\
**Last updated:** [November 9, 2023, 2:07pm UTC](https://discourse.julialang.org/t/mice-for-julia/60355 "2023-11-09T14:07:02Z")

</div>

is there a Julia version of this R package Multivariate Imputation by Chained Equations • mice or another package that is usable for Chained imputation in Julia?

---

## [Call functions with the same names from different files](https://discourse.julialang.org/t/call-functions-with-the-same-names-from-different-files/105987)

<div class="topic-metadata">

**Author:** [@dgsob](https://discourse.julialang.org/u/dgsob)\
**Replies:** 4\
**Last updated:** [November 9, 2023, 12:47pm UTC](https://discourse.julialang.org/t/call-functions-with-the-same-names-from-different-files/105987 "2023-11-09T12:47:29Z")

</div>

Hi, I have a file where I include files: include("./path/File1.jl") include("./path/File2.jl") and then I want to call functions from these files, and since they have the same name, i wanted to use the file’s names as…

---

## [ModelingToolkit external base excitation](https://discourse.julialang.org/t/modelingtoolkit-external-base-excitation/105983)

<div class="topic-metadata">

**Author:** [@Daniel\_Lewis](https://discourse.julialang.org/u/Daniel_Lewis)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 11:48am UTC](https://discourse.julialang.org/t/modelingtoolkit-external-base-excitation/105983 "2023-11-09T11:48:57Z")

</div>

hello I’m trying to simulate a TMD system using ModelingToolkit. This is the code i’m runing: using ModelingToolkit using DifferentialEquations using LinearAlgebra using Symbolics: scalarize @variables t D = Differen…

---

## [Revise not working in WSL2?](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981)

<div class="topic-metadata">

**Author:** [@chris101112](https://discourse.julialang.org/u/chris101112)\
**Replies:** 5\
**Last updated:** [November 9, 2023, 10:24am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981 "2023-11-09T10:24:59Z")

</div>

I have created a simple test project with the following structure: . ├── Manifest.toml ├── Project.toml ├── main.jl └── src └── TestRevise.jl TestRevise.jl: module TestRevise export greet greet() = print("Hello …

---

## [How to use Pkg.dependencies() instead of Pkg.installed()](https://discourse.julialang.org/t/how-to-use-pkg-dependencies-instead-of-pkg-installed/36416)

<div class="topic-metadata">

**Author:** [@AtsushiSakai](https://discourse.julialang.org/u/AtsushiSakai)\
**Replies:** 21\
**Last updated:** [November 9, 2023, 8:35am UTC](https://discourse.julialang.org/t/how-to-use-pkg-dependencies-instead-of-pkg-installed/36416 "2023-11-09T08:35:54Z")

</div>

From Julia v1.4, Pkg.installed() shows deprecation message. Using Pkg.dependencies() is recommended instead of Pkg.installed() in this issue: https://github.com/JuliaLang/Pkg.jl/issues/1724 However, Pkg.dependencies r…

---

## [How to check if a package is installed from startup.jl?](https://discourse.julialang.org/t/how-to-check-if-a-package-is-installed-from-startup-jl/55706)

<div class="topic-metadata">

**Author:** [@benibilme](https://discourse.julialang.org/u/benibilme)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 8:20am UTC](https://discourse.julialang.org/t/how-to-check-if-a-package-is-installed-from-startup-jl/55706 "2023-11-09T08:20:08Z")

</div>

There are several old posts about this issue but according to me this issue has not been fully addressed. I would like query if a package is installed, if not, install it and selectively make some additional calls to t…

---

## [Precompilation of MKL failed; no evidence left behind](https://discourse.julialang.org/t/precompilation-of-mkl-failed-no-evidence-left-behind/105958)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 1\
**Last updated:** [November 9, 2023, 2:06am UTC](https://discourse.julialang.org/t/precompilation-of-mkl-failed-no-evidence-left-behind/105958 "2023-11-09T02:06:39Z")

</div>

MKL precompilation fails. There is no evidence left behind to debug the issue. How is this sort of thing debugged?

---

## [Tricks to compile away step in calculation?](https://discourse.julialang.org/t/tricks-to-compile-away-step-in-calculation/105760)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 20\
**Last updated:** [November 9, 2023, 12:02am UTC](https://discourse.julialang.org/t/tricks-to-compile-away-step-in-calculation/105760 "2023-11-09T00:02:02Z")

</div>

Is there a way to compile away a step in a calculation internal to some function called in a closure but without manually decomposing the function into its constituent calculations within the closure? Below I provide a …

---

## [Reduce image size and filter?](https://discourse.julialang.org/t/reduce-image-size-and-filter/105926)

<div class="topic-metadata">

**Author:** [@rmfritz](https://discourse.julialang.org/u/rmfritz)\
**Replies:** 3\
**Last updated:** [November 8, 2023, 9:52pm UTC](https://discourse.julialang.org/t/reduce-image-size-and-filter/105926 "2023-11-08T21:52:39Z")

</div>

I’m working with a physically-based rendering image (HDR, units of radiance or irradiance in an RGB model) and I would like to create an unsharp mask from it, reducing the size and applying a box filter. I am not seeing …

---

## [Emulate GPU on CPU with CUDA.jl](https://discourse.julialang.org/t/emulate-gpu-on-cpu-with-cuda-jl/105961)

<div class="topic-metadata">

**Author:** [@A112s](https://discourse.julialang.org/u/A112s)\
**Replies:** 2\
**Last updated:** [November 8, 2023, 7:56pm UTC](https://discourse.julialang.org/t/emulate-gpu-on-cpu-with-cuda-jl/105961 "2023-11-08T19:56:40Z")

</div>

Pretty much as in the title. I am almost sure I heard about such option in one of the lectures on CUDA.jl, however I can’t find a way to achieve it. I want to run my unit tests in github actions, but having to use actua…

---

## [Modifying Julia code using macros to substitute variables](https://discourse.julialang.org/t/modifying-julia-code-using-macros-to-substitute-variables/105921)

<div class="topic-metadata">

**Author:** [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)\
**Replies:** 5\
**Last updated:** [November 8, 2023, 4:27am UTC](https://discourse.julialang.org/t/modifying-julia-code-using-macros-to-substitute-variables/105921 "2023-11-08T04:27:42Z")

</div>

I’m trying to create a Julia macro to substitute specific variables in a Julia program with new ones. I have a working example, but I’m facing a challenge when I need to reassign variables within nested functions. Here’…

---

## [Plotting nonlinear ODEs in Julia](https://discourse.julialang.org/t/plotting-nonlinear-odes-in-julia/105918)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 2\
**Last updated:** [November 8, 2023, 7:27pm UTC](https://discourse.julialang.org/t/plotting-nonlinear-odes-in-julia/105918 "2023-11-08T19:27:37Z")

</div>

Hey folks. I am writing some instructional materials in a set of Pluto notebooks. The topic is nonlinear ODEs, so there are some plots from the Strogatz textbook that I want to emulate. I was wondering if anyone can tell…

---

## [Setting the display order of entries in (unordered) Dict](https://discourse.julialang.org/t/setting-the-display-order-of-entries-in-unordered-dict/105954)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [November 8, 2023, 6:46pm UTC](https://discourse.julialang.org/t/setting-the-display-order-of-entries-in-unordered-dict/105954 "2023-11-08T18:46:48Z")

</div>

Is there a way to designate what order the pairs of a Julai dictionary are displayed in (without using OrderedDict)? Elaboration: StructuralIdentifiability.jl takes a model, and assesses the identifiability of each para…

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

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