# Latest

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

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

**Page:** 1362

---

## [Readall() not defined](https://discourse.julialang.org/t/readall-not-defined/62868)

<div class="topic-metadata">

**Author:** [@Juksu](https://discourse.julialang.org/u/Juksu)\
**Replies:** 2\
**Last updated:** [June 14, 2021, 9:29am UTC](https://discourse.julialang.org/t/readall-not-defined/62868 "2021-06-14T09:29:49Z")

</div>

Julia 1.6.1. I am trying the following to read a string from text file to dictionary: import JSON function json\_read() testdict = Dict() infile = open("C:\\\\temp\\\\jsontest.txt"); instring = readall(f); testdict=JSO…

---

## [An undefined variable error during parallel computing](https://discourse.julialang.org/t/an-undefined-variable-error-during-parallel-computing/62482)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 6\
**Last updated:** [June 14, 2021, 7:49am UTC](https://discourse.julialang.org/t/an-undefined-variable-error-during-parallel-computing/62482 "2021-06-14T07:49:36Z")

</div>

an unexpected error happened while trying to use Distributed for the parallel computing of a module, my apologies if this questions is going to be a little bit long: i already set up the cores and everything for distrib…

---

## [ANN: CUDA.jl 3.3](https://discourse.julialang.org/t/ann-cuda-jl-3-3/62864)

<div class="topic-metadata">

**Author:** [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Replies:** 2\
**Last updated:** [June 14, 2021, 7:10am UTC](https://discourse.julialang.org/t/ann-cuda-jl-3-3/62864 "2021-06-14T07:10:59Z")

</div>

Hi all, I’ve released CUDA.jl 3.3 on Friday, with several exciting new features. There’s a blog post summarizing those features, as well as some from CUDA.jl 3.1 and 3.2 (for which there wasn’t a blog post): CUDA.jl 3.3…

---

## [Julia - what interesting things are you doing?](https://discourse.julialang.org/t/julia-what-interesting-things-are-you-doing/47297)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 88\
**Last updated:** [June 14, 2021, 7:03am UTC](https://discourse.julialang.org/t/julia-what-interesting-things-are-you-doing/47297 "2021-06-14T07:03:38Z")

</div>

the Julia language site has some nice whitepapers on projects which use Julia. However we are seeing more people ask for help here - which is a great thing! I would like to hear what they are using Julia for in their w…

---

## [List comprehension of JuMP variables](https://discourse.julialang.org/t/list-comprehension-of-jump-variables/62848)

<div class="topic-metadata">

**Author:** [@anon94806364](https://discourse.julialang.org/u/anon94806364)\
**Replies:** 8\
**Last updated:** [June 14, 2021, 5:42am UTC](https://discourse.julialang.org/t/list-comprehension-of-jump-variables/62848 "2021-06-14T05:42:03Z")

</div>

Beginner to Julia and want to quickly recapitulate an ILP model I wrote in Python to evaluate speed in JuMP. I’m wondering how list comprehensions work for JuMP objects? In Python, I use list comprehension to make the …

---

## [Stop Julia sidebar from appearing automatically every time I display a plot in VS Code](https://discourse.julialang.org/t/stop-julia-sidebar-from-appearing-automatically-every-time-i-display-a-plot-in-vs-code/62859)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 2\
**Last updated:** [June 14, 2021, 5:34am UTC](https://discourse.julialang.org/t/stop-julia-sidebar-from-appearing-automatically-every-time-i-display-a-plot-in-vs-code/62859 "2021-06-14T05:34:01Z")

</div>

Steps to reproduce: In the VS Code REPL, type using PyPlot plot(\[0,1\],\[0,1\]) display(gcf()) What I expected to happen: A new plot pane opens up to display the plot. What actually happens: The above, but in addition it…

---

## [Asynchronous requests HTTP.jl + LibPQ](https://discourse.julialang.org/t/asynchronous-requests-http-jl-libpq/62736)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 2\
**Last updated:** [June 14, 2021, 5:10am UTC](https://discourse.julialang.org/t/asynchronous-requests-http-jl-libpq/62736 "2021-06-14T05:10:30Z")

</div>

1. HTTP.jl I’m looking for correct solution for asynchronous handling requests by HTTP.jl. Please, do you know how should I implement this behavior? 1 thread request handling: function requestHandler(req::HTTP.Request…

---

## [Why can't I access the variable value after a loop](https://discourse.julialang.org/t/why-cant-i-access-the-variable-value-after-a-loop/62860)

<div class="topic-metadata">

**Author:** [@Paolo\_Jara](https://discourse.julialang.org/u/Paolo_Jara)\
**Replies:** 3\
**Last updated:** [June 14, 2021, 4:50am UTC](https://discourse.julialang.org/t/why-cant-i-access-the-variable-value-after-a-loop/62860 "2021-06-14T04:50:21Z")

</div>

Hi, I use Pluto to run Julia, but I have a problem wanting to get the value of the variable x\_t1 out of the loop. Additional, is there a way to use print() and get the value inside the loop in Pluto? begin function raiz…

---

## [BoundsError: attempt to access 2-element Vector in DDPG algorithm](https://discourse.julialang.org/t/boundserror-attempt-to-access-2-element-vector-in-ddpg-algorithm/62574)

<div class="topic-metadata">

**Author:** [@GK\_197](https://discourse.julialang.org/u/GK_197)\
**Replies:** 1\
**Last updated:** [June 14, 2021, 4:21am UTC](https://discourse.julialang.org/t/boundserror-attempt-to-access-2-element-vector-in-ddpg-algorithm/62574 "2021-06-14T04:21:05Z")

</div>

Hi, I was implementing DDPG algorithm for 1-D vector action space but, during run it shows error as: BoundsError: attempt to access 2-element Vector{Float64} at index \[\] Now, when looked into DDPG policy on Github # …

---

## [Compute frequency or proportions on grouped dataframes](https://discourse.julialang.org/t/compute-frequency-or-proportions-on-grouped-dataframes/62835)

<div class="topic-metadata">

**Author:** [@vjd](https://discourse.julialang.org/u/vjd)\
**Replies:** 10\
**Last updated:** [June 14, 2021, 12:20am UTC](https://discourse.julialang.org/t/compute-frequency-or-proportions-on-grouped-dataframes/62835 "2021-06-14T00:20:53Z")

</div>

I would like to learn all possible ways of summarizing categorical data using the dataframes ecosystem. Preferably, I would like to compute the 1) frequency 2) proportions of each categorical variable after a grouping o…

---

## [Silly question regarding vectorized syntax \[JUMP\]](https://discourse.julialang.org/t/silly-question-regarding-vectorized-syntax-jump/62853)

<div class="topic-metadata">

**Author:** [@Jameli](https://discourse.julialang.org/u/Jameli)\
**Replies:** 2\
**Last updated:** [June 14, 2021, 12:16am UTC](https://discourse.julialang.org/t/silly-question-regarding-vectorized-syntax-jump/62853 "2021-06-14T00:16:08Z")

</div>

Hello everyone! I’m having some trouble with some basic concepts about vectorized syntax. My data were structured this way (just to show that everything is in matrix form): U = \[ ATumor zeros(tr, tr) zeros(tr, g…

---

## [Does JuMP work well with vectorized data?](https://discourse.julialang.org/t/does-jump-work-well-with-vectorized-data/62852)

<div class="topic-metadata">

**Author:** [@Jameli](https://discourse.julialang.org/u/Jameli)\
**Replies:** 1\
**Last updated:** [June 13, 2021, 11:19pm UTC](https://discourse.julialang.org/t/does-jump-work-well-with-vectorized-data/62852 "2021-06-13T23:19:29Z")

</div>

Hello, everyone! Greetings from Brazil! I’ve come from MATLAB in order to gain some speed regarding LP’s problems. And searching about JuMP, I found this topic Memory consumption and time of @constraint · Issue #969 · j…

---

## [How to use differently sized static arrays per project](https://discourse.julialang.org/t/how-to-use-differently-sized-static-arrays-per-project/62834)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 11\
**Last updated:** [June 13, 2021, 10:56pm UTC](https://discourse.julialang.org/t/how-to-use-differently-sized-static-arrays-per-project/62834 "2021-06-13T22:56:09Z")

</div>

Hello, I have a module called Utils (see KiteViewer/Utils.jl at sim · ufechner7/KiteViewer · GitHub). It provides a function se() that returns a struct of simulation settings. These settings are loaded from a YAML fil…

---

## [Gibbs sampling with Gen.jl or best ppl for complicated model](https://discourse.julialang.org/t/gibbs-sampling-with-gen-jl-or-best-ppl-for-complicated-model/62466)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 2\
**Last updated:** [June 13, 2021, 10:50pm UTC](https://discourse.julialang.org/t/gibbs-sampling-with-gen-jl-or-best-ppl-for-complicated-model/62466 "2021-06-13T22:50:59Z")

</div>

I’m trying to implement a model, described here. It requires Langevin MC, spike slab priors and Gibbs steps. of the Julia PPLs, Gen.jl seems like the best fit overall, due to the flexibility of building your own sampling…

---

## [API documentation for gurobi.jl](https://discourse.julialang.org/t/api-documentation-for-gurobi-jl/62825)

<div class="topic-metadata">

**Author:** [@anon94806364](https://discourse.julialang.org/u/anon94806364)\
**Replies:** 4\
**Last updated:** [June 13, 2021, 10:04pm UTC](https://discourse.julialang.org/t/api-documentation-for-gurobi-jl/62825 "2021-06-13T22:04:08Z")

</div>

I’ve been trying to solve an ILP in Python where the primary bottle neck appears to be model construction. Multiple sources cite that model construction is heavily language dependent (whereas the optimization is language…

---

## [Manifold optimization with additional constraints](https://discourse.julialang.org/t/manifold-optimization-with-additional-constraints/62799)

<div class="topic-metadata">

**Author:** [@Jae-Mo\_Lihm](https://discourse.julialang.org/u/Jae-Mo_Lihm)\
**Replies:** 1\
**Last updated:** [June 13, 2021, 9:53pm UTC](https://discourse.julialang.org/t/manifold-optimization-with-additional-constraints/62799 "2021-06-13T21:53:25Z")

</div>

I want to minimize f(x), with two constraints: (1) x is a unitary matrix, and (2) f\_i(x) \>= 0 for i=1, …, N. (In my case, f\_i(x) are quadratic functions, e.g. abs(x\[1, 1\])^2) - 0.5. Because of the unitarity constraint, …

---

## [What's the difference between these two types with implicit and explicit parameters?](https://discourse.julialang.org/t/whats-the-difference-between-these-two-types-with-implicit-and-explicit-parameters/62849)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [June 13, 2021, 9:31pm UTC](https://discourse.julialang.org/t/whats-the-difference-between-these-two-types-with-implicit-and-explicit-parameters/62849 "2021-06-13T21:31:11Z")

</div>

julia\> T1 = Vector{S} where {T\<:Integer, S\<:AbstractUnitRange{T}} Vector{S} where {T\<:Integer, S\<:AbstractUnitRange{T}} (alias for Array{S, 1} where {T\<:Integer, S\<:AbstractUnitRange{T}}) julia\> T2 = Vector{S} where {S\<:…

---

## [ERROR: LoadError: StackOverflowError:](https://discourse.julialang.org/t/error-loaderror-stackoverflowerror/62846)

<div class="topic-metadata">

**Author:** [@Akshay\_gupta](https://discourse.julialang.org/u/Akshay_gupta)\
**Replies:** 2\
**Last updated:** [June 13, 2021, 9:11pm UTC](https://discourse.julialang.org/t/error-loaderror-stackoverflowerror/62846 "2021-06-13T21:11:37Z")

</div>

I am trying to implement this algorithm of python for solving sudoku in Julia, but I am getting ERROR: LoadError: StackOverflowError: Stacktrace: \[1\] eliminate(values::Dict{String, String}, s::String, d::Char) …

---

## [How to tackle 2D reaction-diffusion equation?](https://discourse.julialang.org/t/how-to-tackle-2d-reaction-diffusion-equation/54110)

<div class="topic-metadata">

**Author:** [@gedankenexperiment](https://discourse.julialang.org/u/gedankenexperiment)\
**Replies:** 19\
**Last updated:** [June 13, 2021, 8:16pm UTC](https://discourse.julialang.org/t/how-to-tackle-2d-reaction-diffusion-equation/54110 "2021-06-13T20:16:40Z")

</div>

Can anyone point me in the right direction of how to solve a 2D reaction-diffusion equation of the following kind: p-d\*c=-D \* (d^2/dx^2 + d^2/dy^2) \* c, where p is the production rate, d the degradation rate, c the con…

---

## [Make this Tuple code faster](https://discourse.julialang.org/t/make-this-tuple-code-faster/62824)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 11\
**Last updated:** [June 13, 2021, 6:37pm UTC](https://discourse.julialang.org/t/make-this-tuple-code-faster/62824 "2021-06-13T18:37:51Z")

</div>

I have a Tuple and want to replace its starting segment: function switch\_front(new\_front, t) n = length(t) k = length(new\_front) @assert k \<= n (new\_front..., t\[k+1:n\]...) end using Test @test switch\_fr…

---

## [Best library for visualizing 3d vectors](https://discourse.julialang.org/t/best-library-for-visualizing-3d-vectors/62836)

<div class="topic-metadata">

**Author:** [@peteole](https://discourse.julialang.org/u/peteole)\
**Replies:** 2\
**Last updated:** [June 13, 2021, 5:50pm UTC](https://discourse.julialang.org/t/best-library-for-visualizing-3d-vectors/62836 "2021-06-13T17:50:50Z")

</div>

Hi, I am an engineering student and have a lot of homework which include vector calculations (like computing positions, forces, angular momentums, rotation axis ect). It would be really great if I could make 3d visuali…

---

## [About the throw function](https://discourse.julialang.org/t/about-the-throw-function/62730)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 7\
**Last updated:** [June 13, 2021, 4:48pm UTC](https://discourse.julialang.org/t/about-the-throw-function/62730 "2021-06-13T16:48:35Z")

</div>

My question is, why throw is a function in Julia? Why is it not a keyword just like the case in many other languages?

---

## [Shared Variables In Nested Macros](https://discourse.julialang.org/t/shared-variables-in-nested-macros/62821)

<div class="topic-metadata">

**Author:** [@Acmion](https://discourse.julialang.org/u/Acmion)\
**Replies:** 2\
**Last updated:** [June 13, 2021, 4:31pm UTC](https://discourse.julialang.org/t/shared-variables-in-nested-macros/62821 "2021-06-13T16:31:39Z")

</div>

I’d like to share variables between nested macros in a convenient manner, but this seems to be difficult. I will try to illustrate the situation with some code examples. To create custom properties to Julia types one ca…

---

## [Dot operator, 1. with array-indexing expression on the left-hand side and 2. with Matrix\*Vector-multiplication](https://discourse.julialang.org/t/dot-operator-1-with-array-indexing-expression-on-the-left-hand-side-and-2-with-matrix-vector-multiplication/62743)

<div class="topic-metadata">

**Author:** [@hardy](https://discourse.julialang.org/u/hardy)\
**Replies:** 18\
**Last updated:** [June 13, 2021, 3:52pm UTC](https://discourse.julialang.org/t/dot-operator-1-with-array-indexing-expression-on-the-left-hand-side-and-2-with-matrix-vector-multiplication/62743 "2021-06-13T15:52:56Z")

</div>

Hallo, I would like to understand how the dot operator works. There are two specific problems: at Performance Tips · The Julia Language (headline: Consider using views for slicing) I learned that “…on the left-ha…

---

## [Add legend titles for distinct categories in Plots](https://discourse.julialang.org/t/add-legend-titles-for-distinct-categories-in-plots/62804)

<div class="topic-metadata">

**Author:** [@Dan.phi](https://discourse.julialang.org/u/Dan.phi)\
**Replies:** 4\
**Last updated:** [June 13, 2021, 1:53pm UTC](https://discourse.julialang.org/t/add-legend-titles-for-distinct-categories-in-plots/62804 "2021-06-13T13:53:48Z")

</div>

Is it possible to have legend titles for different categories/classes? Something like in the figure below with continent and pop.

---

## [How to compute gradient with respect to a circuit parameter?](https://discourse.julialang.org/t/how-to-compute-gradient-with-respect-to-a-circuit-parameter/61706)

<div class="topic-metadata">

**Author:** [@rmedinar](https://discourse.julialang.org/u/rmedinar)\
**Replies:** 6\
**Last updated:** [June 13, 2021, 1:21pm UTC](https://discourse.julialang.org/t/how-to-compute-gradient-with-respect-to-a-circuit-parameter/61706 "2021-06-13T13:21:33Z")

</div>

Hi everyone! I’m trying to compute the gradient with respect to a certain circuit parameter and I would like to do it efficiently. I know there exist several efficient methods for this in Yao, i.e., faithful\_grad() and …

---

## [DifferentialEquations.jl discrete delay problem?](https://discourse.julialang.org/t/differentialequations-jl-discrete-delay-problem/62829)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 13\
**Last updated:** [June 13, 2021, 1:16pm UTC](https://discourse.julialang.org/t/differentialequations-jl-discrete-delay-problem/62829 "2021-06-13T13:16:00Z")

</div>

In DifferentialEquations.jl (abbrev.: DiffEq.jl), DDE (delay differential equations) is supported. But what I want is close to delay discrete equation; that is, get an external signal h(t), then the state x(t) = h(t - \\…

---

## [Unicode error with Plots.jl and PGFPlotsX](https://discourse.julialang.org/t/unicode-error-with-plots-jl-and-pgfplotsx/53070)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 1\
**Last updated:** [June 13, 2021, 12:15pm UTC](https://discourse.julialang.org/t/unicode-error-with-plots-jl-and-pgfplotsx/53070 "2021-06-13T12:15:58Z")

</div>

Using Plots with PGFPlotsX backend I get strange substitutions for some characters in the tex file. For example, this code plot( title = "Interpolação polinomial" ) savefig("fig.tex") generates a file f…

---

## [Packages for rational interpolation?](https://discourse.julialang.org/t/packages-for-rational-interpolation/62831)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 1\
**Last updated:** [June 13, 2021, 11:16am UTC](https://discourse.julialang.org/t/packages-for-rational-interpolation/62831 "2021-06-13T11:16:57Z")

</div>

Given the numerous packages and other developments about polynomials and interpolations in the Julia ecosystem (e.g. Polynomials.jl, SpecialPolynomials.jl and Interpolations.jl) , I was wondering if there are some packag…

---

## [Check recursive immutability](https://discourse.julialang.org/t/check-recursive-immutability/62815)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 8\
**Last updated:** [June 13, 2021, 9:52am UTC](https://discourse.julialang.org/t/check-recursive-immutability/62815 "2021-06-13T09:52:21Z")

</div>

struct Foo val::Vector{Int} end How can I check if a type is recursively immutable? I tried function recursively\_immutable(type) !type.mutable && all(recursively\_immutable(ft) for ft in fieldtypes(type)) end b…

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

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