# Latest

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

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

**Page:** 1313

---

## [Two small design improvements](https://discourse.julialang.org/t/two-small-design-improvements/62674)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 2\
**Last updated:** [August 2, 2021, 6:29pm UTC](https://discourse.julialang.org/t/two-small-design-improvements/62674 "2021-08-02T18:29:30Z")

</div>

Could the “Solution” button be farther apart from the other options? I have found myself quite a few times inadvertendly clicking on “Solution” when trying to do something else. And worse, sometimes on OPs which are …

---

## [When using bits as type parameters they are regarded a subtype of Any](https://discourse.julialang.org/t/when-using-bits-as-type-parameters-they-are-regarded-a-subtype-of-any/65724)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 3\
**Last updated:** [August 3, 2021, 9:33am UTC](https://discourse.julialang.org/t/when-using-bits-as-type-parameters-they-are-regarded-a-subtype-of-any/65724 "2021-08-03T09:33:05Z")

</div>

Hi all, using julia 1.6.1 there is currently an inconsistency when using bits (i.e. anything which is a bit-type) as type-parameters and when comparing bits directly with types. julia\> f(::Type{Tuple{T1}}) where T1 \<: …

---

## [Matrix multiplied by inverse matrix does not reproduce identity matrix](https://discourse.julialang.org/t/matrix-multiplied-by-inverse-matrix-does-not-reproduce-identity-matrix/65706)

<div class="topic-metadata">

**Author:** [@mengxiaoliu](https://discourse.julialang.org/u/mengxiaoliu)\
**Replies:** 4\
**Last updated:** [August 3, 2021, 9:12am UTC](https://discourse.julialang.org/t/matrix-multiplied-by-inverse-matrix-does-not-reproduce-identity-matrix/65706 "2021-08-03T09:12:47Z")

</div>

Hello, I found that multiplying a matrix by its inverse does not yield an identity matrix. Please see below a MWE: matrix = \[5.93419 4.8067; 4.8067 5.93419\] invmatrix = inv(matrix) matrix\*invmatrix The last line gener…

---

## [How to append multiple key-value pairs to an existing Dict](https://discourse.julialang.org/t/how-to-append-multiple-key-value-pairs-to-an-existing-dict/65676)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 11\
**Last updated:** [August 3, 2021, 9:00am UTC](https://discourse.julialang.org/t/how-to-append-multiple-key-value-pairs-to-an-existing-dict/65676 "2021-08-03T09:00:57Z")

</div>

We can create a Dict from an iteratable of key-value pairs, e.g., julia\> x = \['A', 'B', 'C'\]; y = \[1, 2, 3\]; julia\> d = Dict(x .=\> y) Dict{Char, Int64} with 3 entries: 'C' =\> 3 'A' =\> 1 'B' =\> 2 Now supposing I …

---

## [What are braces used for in Julia](https://discourse.julialang.org/t/what-are-braces-used-for-in-julia/65649)

<div class="topic-metadata">

**Author:** [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)\
**Replies:** 2\
**Last updated:** [August 3, 2021, 8:55am UTC](https://discourse.julialang.org/t/what-are-braces-used-for-in-julia/65649 "2021-08-03T08:55:37Z")

</div>

I see braces used in various ways in Julia but I’m not quite sure what they are for. Here is one instance but I’ve also seen them seem to be for types. And kind of hard to find in the documentation. Dict{String, Vector{…

---

## [Question ) Mathematical equivalence, but different results of fixed point?](https://discourse.julialang.org/t/question-mathematical-equivalence-but-different-results-of-fixed-point/65628)

<div class="topic-metadata">

**Author:** [@Zerosum](https://discourse.julialang.org/u/Zerosum)\
**Replies:** 1\
**Last updated:** [August 3, 2021, 8:53am UTC](https://discourse.julialang.org/t/question-mathematical-equivalence-but-different-results-of-fixed-point/65628 "2021-08-03T08:53:36Z")

</div>

I am working on my own project, and I proved the following recursive equation has a unique fixed point (due to the Banach Fixed Point Theorem). Here is the equation with simplified notations. I couldn’t find any option…

---

## [Go to definition in VSCode not working for packages](https://discourse.julialang.org/t/go-to-definition-in-vscode-not-working-for-packages/65708)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [August 3, 2021, 8:47am UTC](https://discourse.julialang.org/t/go-to-definition-in-vscode-not-working-for-packages/65708 "2021-08-03T08:47:54Z")

</div>

Sometime in the last few days, the “go to definition” function in VSCode stopped working for packages. It works for base functions and functions and variables defined in the Main module. Is there a solution to this probl…

---

## [Best practice: put all using in the main \[package\].jl?](https://discourse.julialang.org/t/best-practice-put-all-using-in-the-main-package-jl/65716)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 3\
**Last updated:** [August 3, 2021, 8:38am UTC](https://discourse.julialang.org/t/best-practice-put-all-using-in-the-main-package-jl/65716 "2021-08-03T08:38:08Z")

</div>

I am developing a package named EOS.jl. The main file EOS.jl mainly includes other source files. I am wondering what is the best practice for the using of other registered packages. Should I put all using at the beginni…

---

## [How to define a Fortran type equivalent object in Julia](https://discourse.julialang.org/t/how-to-define-a-fortran-type-equivalent-object-in-julia/65721)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 2\
**Last updated:** [August 3, 2021, 7:47am UTC](https://discourse.julialang.org/t/how-to-define-a-fortran-type-equivalent-object-in-julia/65721 "2021-08-03T07:47:07Z")

</div>

I have a fortran type I defined as mean\_covar like below, type :: mean\_covar real(kind=r8), allocatable :: mu(:,:) real(kind=r8), allocatable :: sigma(:,:) real(kind=r8) :: w end type So that I can set some…

---

## [Can you use Gamezero for creating a reinforcement learning enviroment?](https://discourse.julialang.org/t/can-you-use-gamezero-for-creating-a-reinforcement-learning-enviroment/65727)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 0\
**Last updated:** [August 3, 2021, 7:24am UTC](https://discourse.julialang.org/t/can-you-use-gamezero-for-creating-a-reinforcement-learning-enviroment/65727 "2021-08-03T07:24:27Z")

</div>

Hello, I know that there is ReinforcementLearning.jl package. But let’s say that I want to create a new enviroment for an agent. Can I do that with gamezero, reinforcement learning or some simulation package.

---

## [Simplify JSON while deserializing into struct with StructTypes.jl](https://discourse.julialang.org/t/simplify-json-while-deserializing-into-struct-with-structtypes-jl/65484)

<div class="topic-metadata">

**Author:** [@Jakob](https://discourse.julialang.org/u/Jakob)\
**Replies:** 9\
**Last updated:** [August 3, 2021, 6:58am UTC](https://discourse.julialang.org/t/simplify-json-while-deserializing-into-struct-with-structtypes-jl/65484 "2021-08-03T06:58:29Z")

</div>

Hi everyone, I have a relatively complex and nested JSON object (representing a patent application) which I would like to deserialize into a struct. However, I would like to “de-nest” the structure somewhat and between…

---

## [Python to Julia transpiler](https://discourse.julialang.org/t/python-to-julia-transpiler/21473)

<div class="topic-metadata">

**Author:** [@kiwi0fruit](https://discourse.julialang.org/u/kiwi0fruit)\
**Replies:** 13\
**Last updated:** [August 3, 2021, 5:35am UTC](https://discourse.julialang.org/t/python-to-julia-transpiler/21473 "2021-08-03T05:35:32Z")

</div>

https://github.com/JuliaLang/Juleps/issues/55

---

## [JSON3 and Tuples](https://discourse.julialang.org/t/json3-and-tuples/65699)

<div class="topic-metadata">

**Author:** [@Jonm](https://discourse.julialang.org/u/Jonm)\
**Replies:** 6\
**Last updated:** [August 3, 2021, 5:13am UTC](https://discourse.julialang.org/t/json3-and-tuples/65699 "2021-08-03T05:13:00Z")

</div>

I am having difficulty using JSON3 and a dictionary with Tuple keys. The first example works as expected the second does not. I have tried to use StructTypes to fix this, but I am missing something. dString=Dict("p1"=\>1…

---

## [Open Julia in iTerm2 by default, instead of Terminal](https://discourse.julialang.org/t/open-julia-in-iterm2-by-default-instead-of-terminal/8643)

<div class="topic-metadata">

**Author:** [@sidrocks123](https://discourse.julialang.org/u/sidrocks123)\
**Replies:** 7\
**Last updated:** [August 3, 2021, 4:58am UTC](https://discourse.julialang.org/t/open-julia-in-iterm2-by-default-instead-of-terminal/8643 "2021-08-03T04:58:53Z")

</div>

I installed Julia on macOS High Sierra (10.13.3) with brew cask install julia, and it opens in Apple Terminal by default. I am completely new to AppleScript, so I don’t know how to change the default behavior of Julia s…

---

## [Avro.jl : Problems appending and reading one record at a time](https://discourse.julialang.org/t/avro-jl-problems-appending-and-reading-one-record-at-a-time/65604)

<div class="topic-metadata">

**Author:** [@Jonm](https://discourse.julialang.org/u/Jonm)\
**Replies:** 5\
**Last updated:** [August 3, 2021, 12:34am UTC](https://discourse.julialang.org/t/avro-jl-problems-appending-and-reading-one-record-at-a-time/65604 "2021-08-03T00:34:00Z")

</div>

I want to serial write a sequence of Dict{String,Int64} objects to disc in Avro ad they are generated. Hence I need to beable to close and then append to the file. Hence Avro (if I understand) seems like a good choice. …

---

## [Why does Julia say randstring() doesn't exist?](https://discourse.julialang.org/t/why-does-julia-say-randstring-doesnt-exist/65704)

<div class="topic-metadata">

**Author:** [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)\
**Replies:** 5\
**Last updated:** [August 3, 2021, 12:31am UTC](https://discourse.julialang.org/t/why-does-julia-say-randstring-doesnt-exist/65704 "2021-08-03T00:31:27Z")

</div>

I was looking at string functions in the Julia documentation window in Atom and it mentioned randstring(). So I tried it and Julia says it doesn’t exist. In fact a lot or string functions it mentioned don’t seem to be th…

---

## [Roadmap for a faster time-to-first-plot?](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956)

<div class="topic-metadata">

**Author:** [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Replies:** 250\
**Last updated:** [August 3, 2021, 12:07am UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956 "2021-08-03T00:07:07Z")

</div>

Having unintentionally “thrown shade” and performed a “kvetchfest” in another thread, let me first apologise. I’m very happy with the improvements made in Julia, especially the interpreter and debugger, and am very much …

---

## [Problems with plotting in VSCode](https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616)

<div class="topic-metadata">

**Author:** [@yenson-lau](https://discourse.julialang.org/u/yenson-lau)\
**Replies:** 4\
**Last updated:** [August 2, 2021, 11:39pm UTC](https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616 "2021-08-02T23:39:45Z")

</div>

Here is the minimal working example to reproduce the issues. All I am trying to do here is create two plots with two lines each. Firstly, the linter produces warnings for the plot() calls even though the code works ju…

---

## [How do I identify who is a moderator](https://discourse.julialang.org/t/how-do-i-identify-who-is-a-moderator/65701)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 2\
**Last updated:** [August 2, 2021, 11:20pm UTC](https://discourse.julialang.org/t/how-do-i-identify-who-is-a-moderator/65701 "2021-08-02T23:20:40Z")

</div>

Is there a list of moderators somewhere? Do their names show up in a different color or something?

---

## [Populating matrix with elements - improve performance](https://discourse.julialang.org/t/populating-matrix-with-elements-improve-performance/65697)

<div class="topic-metadata">

**Author:** [@stst](https://discourse.julialang.org/u/stst)\
**Replies:** 3\
**Last updated:** [August 2, 2021, 10:27pm UTC](https://discourse.julialang.org/t/populating-matrix-with-elements-improve-performance/65697 "2021-08-02T22:27:58Z")

</div>

Does anybody have suggestions on how to speed up the following MWE? using BenchmarkTools function kernel0(t,r) # MWE K = Array{Float64}(undef,length(t),length(r)) for (it,t\_) in enumerate(t) if t\_ == 0.…

---

## [How to make Zygote avoid differentiating with respect to some fields in struct](https://discourse.julialang.org/t/how-to-make-zygote-avoid-differentiating-with-respect-to-some-fields-in-struct/65520)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 6\
**Last updated:** [August 2, 2021, 8:08pm UTC](https://discourse.julialang.org/t/how-to-make-zygote-avoid-differentiating-with-respect-to-some-fields-in-struct/65520 "2021-08-02T20:08:51Z")

</div>

Hello everyone, I have been always used ForwardDiff for my automatic differentiation needs, but recently I thought I should try out Zygote instead. My main motivation for doing so is the ability of Zygote to work with c…

---

## [Julia: Gradation Plotting](https://discourse.julialang.org/t/julia-gradation-plotting/65683)

<div class="topic-metadata">

**Author:** [@yqqwe123](https://discourse.julialang.org/u/yqqwe123)\
**Replies:** 7\
**Last updated:** [August 2, 2021, 5:39pm UTC](https://discourse.julialang.org/t/julia-gradation-plotting/65683 "2021-08-02T17:39:11Z")

</div>

I try to plot (ReE,ImE) graph, here E = Re\[E\] + iIm\[E\] are the complex eigenvalues of a matrix H. However, in this code, the plotting is colored by some default color. I want to plot each (ReE,ImE) by coloring with blu…

---

## [16 GB large .julia/registries/General folder](https://discourse.julialang.org/t/16-gb-large-julia-registries-general-folder/65682)

<div class="topic-metadata">

**Author:** [@albheim](https://discourse.julialang.org/u/albheim)\
**Replies:** 4\
**Last updated:** [August 2, 2021, 5:09pm UTC](https://discourse.julialang.org/t/16-gb-large-julia-registries-general-folder/65682 "2021-08-02T17:09:08Z")

</div>

I have had julia installed for maybe two years now, and realised the .julia folder has grown quite big, around 25 GB. I didn’t think too much about it since I have a lot of packages installed and I also run some python a…

---

## [Change Gtk Button color](https://discourse.julialang.org/t/change-gtk-button-color/62433)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [August 1, 2021, 8:17pm UTC](https://discourse.julialang.org/t/change-gtk-button-color/62433 "2021-08-01T20:17:45Z")

</div>

Hi all, I would like to change the color of a button in Gtk based on an event and change the color or darken the button when it is selected. Right now I am stuck simply trying to change the color. My approach is based …

---

## [Introductory session about MLJ](https://discourse.julialang.org/t/introductory-session-about-mlj/64946)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 3\
**Last updated:** [August 2, 2021, 4:20pm UTC](https://discourse.julialang.org/t/introductory-session-about-mlj/64946 "2021-08-02T16:20:23Z")

</div>

Hi all, as part of Julia User Group Munich, I am going to give a 101 introduction into Machine Learning with Julia using MLJ. We are going to use Jupyter + Binder, so everyone gets its own environment where she/he can …

---

## [Help with parallelizing indirect inference estimation](https://discourse.julialang.org/t/help-with-parallelizing-indirect-inference-estimation/64487)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 17\
**Last updated:** [August 2, 2021, 3:32pm UTC](https://discourse.julialang.org/t/help-with-parallelizing-indirect-inference-estimation/64487 "2021-08-02T15:32:56Z")

</div>

I’m trying my hand at estimation via indirect inference, and created this script to experiment. I am wondering what is the best way to parallelize the computation. I think the critical functions are simulate and the line…

---

## [Dispatching by values is very slow - Feature or Problem?](https://discourse.julialang.org/t/dispatching-by-values-is-very-slow-feature-or-problem/65586)

<div class="topic-metadata">

**Author:** [@viraltux](https://discourse.julialang.org/u/viraltux)\
**Replies:** 30\
**Last updated:** [August 2, 2021, 3:13pm UTC](https://discourse.julialang.org/t/dispatching-by-values-is-very-slow-feature-or-problem/65586 "2021-08-02T15:13:05Z")

</div>

After learning in Faster default Base.sort! for Julia about Sorting Networks I thought that we surely must have a package in Julia for that, and surely we do: SortingNetworks.jl The problem is this: using SortingNetwo…

---

## [Initializing a Dict, is there a more Julia way to do it?](https://discourse.julialang.org/t/initializing-a-dict-is-there-a-more-julia-way-to-do-it/65681)

<div class="topic-metadata">

**Author:** [@saxasmu](https://discourse.julialang.org/u/saxasmu)\
**Replies:** 11\
**Last updated:** [August 2, 2021, 2:54pm UTC](https://discourse.julialang.org/t/initializing-a-dict-is-there-a-more-julia-way-to-do-it/65681 "2021-08-02T14:54:56Z")

</div>

I want to create a dict with as keys Integers in the range 1:lines and as value an empty Vector of Int. Coming from Python I found this the shortest way to initialize this Dict: d::Dict{Int, Vector{Int}} = Dict(\[(k, \[\]…

---

## [How to assign colors to bar plots in StatsPlots / Plots](https://discourse.julialang.org/t/how-to-assign-colors-to-bar-plots-in-statsplots-plots/60060)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 6\
**Last updated:** [August 2, 2021, 2:52pm UTC](https://discourse.julialang.org/t/how-to-assign-colors-to-bar-plots-in-statsplots-plots/60060 "2021-08-02T14:52:22Z")

</div>

Hi all, How do I assign colors to individual bars with StatsPlots. The following used to work with color. However something changed with Plots and now it does not work. using DataFrames, StatsPlots df = DataFrame(a = \[…

---

## [Does Roots.jl provide an API to obtain the trace of a root finding algorithm?](https://discourse.julialang.org/t/does-roots-jl-provide-an-api-to-obtain-the-trace-of-a-root-finding-algorithm/65654)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 5\
**Last updated:** [August 2, 2021, 1:08pm UTC](https://discourse.julialang.org/t/does-roots-jl-provide-an-api-to-obtain-the-trace-of-a-root-finding-algorithm/65654 "2021-08-02T13:08:21Z")

</div>

I only find that it can print out such information by the kwargs verbose=true. But how can I obtain this just like the Optim.jl which store all information in the returned value? I want to count the number of evaluations…

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

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