# Latest

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

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

**Page:** 1463

---

## [Why is the NTuple{N} constructor not type stable when constructing a Tuple from a Vector?](https://discourse.julialang.org/t/why-is-the-ntuple-n-constructor-not-type-stable-when-constructing-a-tuple-from-a-vector/54185)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 2:28pm UTC](https://discourse.julialang.org/t/why-is-the-ntuple-n-constructor-not-type-stable-when-constructing-a-tuple-from-a-vector/54185 "2021-01-29T14:28:47Z")

</div>

julia\> @code\_warntype NTuple{3}(\[1,2,3\]) Variables #self#::Type{Tuple{T, T, T} where T} itr::Vector{Int64} Body::Tuple{Int64, Int64, Int64, Vararg{Any}} 1 ─ %1 = Base.\_totuple($(Expr(:static\_parameter, 1)), itr)::Tu…

---

## [Julia GC wiping memory despite use of GC.@preserve](https://discourse.julialang.org/t/julia-gc-wiping-memory-despite-use-of-gc-preserve/57025)

<div class="topic-metadata">

**Author:** [@JuliaPerson](https://discourse.julialang.org/u/JuliaPerson)\
**Replies:** 0\
**Last updated:** [March 12, 2021, 2:15pm UTC](https://discourse.julialang.org/t/julia-gc-wiping-memory-despite-use-of-gc-preserve/57025 "2021-03-12T14:15:45Z")

</div>

Hello fellow Julia users, I realize that a small working example would be preferred, but I’m working within a fairly large project, and the behavior I’m seeing is not entirely repeatable. I was hoping to get some pointe…

---

## [Why does increasing the number of identical parallel operations increases each operation time?](https://discourse.julialang.org/t/why-does-increasing-the-number-of-identical-parallel-operations-increases-each-operation-time/57014)

<div class="topic-metadata">

**Author:** [@matthiasbe](https://discourse.julialang.org/u/matthiasbe)\
**Replies:** 6\
**Last updated:** [March 12, 2021, 2:00pm UTC](https://discourse.julialang.org/t/why-does-increasing-the-number-of-identical-parallel-operations-increases-each-operation-time/57014 "2021-03-12T14:00:21Z")

</div>

Hi, I am investigating on the scaling performance of my distributed linear algebra application. For this purpose I made very basic examples of identical operations done in parallel. In the following example, I don’t un…

---

## [How to efficiently exponentiate a complex (symmetric) tridiagonal matrix?](https://discourse.julialang.org/t/how-to-efficiently-exponentiate-a-complex-symmetric-tridiagonal-matrix/56982)

<div class="topic-metadata">

**Author:** [@schneiderfelipe](https://discourse.julialang.org/u/schneiderfelipe)\
**Replies:** 6\
**Last updated:** [March 12, 2021, 1:49pm UTC](https://discourse.julialang.org/t/how-to-efficiently-exponentiate-a-complex-symmetric-tridiagonal-matrix/56982 "2021-03-12T13:49:31Z")

</div>

Hi, I’m trying to efficiently obtain the exponential of a complex symmetric tridiagonal matrix (SymTridiagonal). Unfortunately, exp is neither defined for SymTridiagonal nor Tridiagonal. I believe this is because eigen …

---

## [FYI: the General registry now checks for an OSI-approved software license when registering new packages and new versions](https://discourse.julialang.org/t/fyi-the-general-registry-now-checks-for-an-osi-approved-software-license-when-registering-new-packages-and-new-versions/57018)

<div class="topic-metadata">

**Author:** [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Replies:** 0\
**Last updated:** [March 12, 2021, 12:30pm UTC](https://discourse.julialang.org/t/fyi-the-general-registry-now-checks-for-an-osi-approved-software-license-when-registering-new-packages-and-new-versions/57018 "2021-03-12T12:30:11Z")

</div>

Some of you may have noticed this in the last few days since we turned the check on in https://github.com/JuliaRegistries/General/pull/31535. This announcement is to just make sure everyone knows and is not caught at a b…

---

## [Why does tab completion only work for some letters?](https://discourse.julialang.org/t/why-does-tab-completion-only-work-for-some-letters/56971)

<div class="topic-metadata">

**Author:** [@nickeubank](https://discourse.julialang.org/u/nickeubank)\
**Replies:** 6\
**Last updated:** [March 12, 2021, 12:46pm UTC](https://discourse.julialang.org/t/why-does-tab-completion-only-work-for-some-letters/56971 "2021-03-12T12:46:48Z")

</div>

I’ve noticed only some letters are supported for latex subscripts in variable names. e.g. \\sigma \<tab\> \\\_h \<tab\> renders as σₕ, but \\sigma \<tab\> \\\_f \<tab\> just flashes. Is there a reason for this and/or a workaround? J…

---

## [ERROR: could not open file boot.jl](https://discourse.julialang.org/t/error-could-not-open-file-boot-jl/36277)

<div class="topic-metadata">

**Author:** [@Yousef\_Saber](https://discourse.julialang.org/u/Yousef_Saber)\
**Replies:** 8\
**Last updated:** [March 12, 2021, 12:17pm UTC](https://discourse.julialang.org/t/error-could-not-open-file-boot-jl/36277 "2021-03-12T12:17:59Z")

</div>

Ubuntu: 19.10 Julia: 1.3.1 when I try to generate LLVM bitcode I got this error joseph@joseph-X541UJ:~/Documents/Julia$ julia --output-bc test.jl ERROR: could not open file boot.jl my test.jl file contains print("He…

---

## [Julia VS Code extension version v0.16 released](https://discourse.julialang.org/t/julia-vs-code-extension-version-v0-16-released/41692)

<div class="topic-metadata">

**Author:** [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Replies:** 39\
**Last updated:** [March 12, 2021, 12:02pm UTC](https://discourse.julialang.org/t/julia-vs-code-extension-version-v0-16-released/41692 "2021-03-12T12:02:15Z")

</div>

Julia VS Code extension v0.16 release Welcome to the v0.16 release of the Julia VS Code extension. Inline evaluation Code evaluation has been overhauled for this release. The Julia: Execute \* (e.g. Julia: Execute Code …

---

## [How to call the original function when overriding it](https://discourse.julialang.org/t/how-to-call-the-original-function-when-overriding-it/56865)

<div class="topic-metadata">

**Author:** [@NightMachinary](https://discourse.julialang.org/u/NightMachinary)\
**Replies:** 8\
**Last updated:** [March 12, 2021, 11:22am UTC](https://discourse.julialang.org/t/how-to-call-the-original-function-when-overriding-it/56865 "2021-03-12T11:22:43Z")

</div>

I want to override Unitful.Base.show to make it first simplify the quantity’s unit before showing it. I don’t know how to call the original overriden function though. What I have tried: @defonce origShow = Unitful.Base.…

---

## [Type instability of nested function](https://discourse.julialang.org/t/type-instability-of-nested-function/57007)

<div class="topic-metadata">

**Author:** [@Jae-Mo\_Lihm](https://discourse.julialang.org/u/Jae-Mo_Lihm)\
**Replies:** 5\
**Last updated:** [March 12, 2021, 11:13am UTC](https://discourse.julialang.org/t/type-instability-of-nested-function/57007 "2021-03-12T11:13:31Z")

</div>

I have the following function, and it has a type instability (Core.Box). In the real code, I use f as an argument of another function which calls f multiple times (e.g. bisection to solve f(x)=0). How can I make this f…

---

## [Deepcopy usage](https://discourse.julialang.org/t/deepcopy-usage/57009)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 4\
**Last updated:** [March 12, 2021, 10:59am UTC](https://discourse.julialang.org/t/deepcopy-usage/57009 "2021-03-12T10:59:38Z")

</div>

In this code: module MatrixOp function func!(A, BB) BB\[1\]\[1,1\] += 100 A, BB... end func(A, B...) = func!(copy(A), deepcopy(B)) A = rand(1:10,3,3) b = rand(1:10,3,1) c = rand(1:10,3,1) A2, b2, b3 = func(A,b,b…

---

## [Vocabulary when using NamedTuples and Structs](https://discourse.julialang.org/t/vocabulary-when-using-namedtuples-and-structs/56960)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 3\
**Last updated:** [March 12, 2021, 10:06am UTC](https://discourse.julialang.org/t/vocabulary-when-using-namedtuples-and-structs/56960 "2021-03-12T10:06:46Z")

</div>

This may seem like an odd post, but bare with me here. I’m assuming most, if not all of us here had some experience with OO languages, so it’s normal to hear terms like object, has-a, or is-a. When you use a NamedTupl…

---

## [Kaleido error: with Julia 1.6, the artifact seems to be broken](https://discourse.julialang.org/t/kaleido-error-with-julia-1-6-the-artifact-seems-to-be-broken/54475)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 16\
**Last updated:** [March 12, 2021, 9:08am UTC](https://discourse.julialang.org/t/kaleido-error-with-julia-1-6-the-artifact-seems-to-be-broken/54475 "2021-03-12T09:08:11Z")

</div>

https://github.com/sglyon/PlotlyBase.jl/issues/40 Would anyone have some insight into this problem? It appears to be happening on Linux and Windows. Can you confirm?

---

## [JuMP/CPLEX: how to set heuristic solution using SparseAxisArrays in callback](https://discourse.julialang.org/t/jump-cplex-how-to-set-heuristic-solution-using-sparseaxisarrays-in-callback/56938)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 2\
**Last updated:** [March 12, 2021, 9:04am UTC](https://discourse.julialang.org/t/jump-cplex-how-to-set-heuristic-solution-using-sparseaxisarrays-in-callback/56938 "2021-03-12T09:04:43Z")

</div>

Dear folks, unfortunately I fail to submit a heuristic solution using SparseAxisArrays in a callback. Here is an MWE: using JuMP, CPLEX model = JuMP.direct\_model( CPLEX.Optimizer() ) set\_optimizer\_attribute( model, "C…

---

## [Typemax for T \<: Integer if T can be BigInt?](https://discourse.julialang.org/t/typemax-for-t-integer-if-t-can-be-bigint/57001)

<div class="topic-metadata">

**Author:** [@wherrera](https://discourse.julialang.org/u/wherrera)\
**Replies:** 2\
**Last updated:** [March 12, 2021, 8:00am UTC](https://discourse.julialang.org/t/typemax-for-t-integer-if-t-can-be-bigint/57001 "2021-03-12T08:00:04Z")

</div>

I am trying to keep a function generic with regard to its integer arguments. One of the function portions is if n \> typemax(T) ÷ k break end and since T is Integer and could be BigInt, I would like a suggestion wh…

---

## [Subscript “-1”?How do I do \`g₁\` but with \`-1\` instead of \`1\`? My variable wants t](https://discourse.julialang.org/t/subscript-1-how-do-i-do-g-but-with-1-instead-of-1-my-variable-wants-t/57003)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 12, 2021, 7:51am UTC](https://discourse.julialang.org/t/subscript-1-how-do-i-do-g-but-with-1-instead-of-1-my-variable-wants-t/57003 "2021-03-12T07:51:48Z")

</div>

Subscript “-1”? How do I do g₁ but with -1 instead of 1? My variable wants to know! Ref: https://docs.julialang.org/en/v1/manual/unicode-input/ Ref2: https://www.overleaf.com/learn/latex/subscripts\_and\_superscripts N…

---

## [\[RFC\] The future of Polynomials.jl](https://discourse.julialang.org/t/rfc-the-future-of-polynomials-jl/32790)

<div class="topic-metadata">

**Author:** [@mileslucas](https://discourse.julialang.org/u/mileslucas)\
**Replies:** 1\
**Last updated:** [March 12, 2021, 7:41am UTC](https://discourse.julialang.org/t/rfc-the-future-of-polynomials-jl/32790 "2021-03-12T07:41:31Z")

</div>

Hello all! Recently I spent some time rewriting Polynomials.jl trying to improve its interface and the internal design of the module. My rewrite has manifested in this PR. Rather than pour over the changes/updates here,…

---

## [Parametric type to force common container type](https://discourse.julialang.org/t/parametric-type-to-force-common-container-type/56904)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 9\
**Last updated:** [March 12, 2021, 6:00am UTC](https://discourse.julialang.org/t/parametric-type-to-force-common-container-type/56904 "2021-03-12T06:00:34Z")

</div>

I want to define a type that holds one vector of Float64 and another of ComplexF64, but I want their containers are of the same type. For example, I want them to be Vector{Float64} and Vector{ComplexF64}, or CUDA.CuVect…

---

## [Plotting two different functions](https://discourse.julialang.org/t/plotting-two-different-functions/56991)

<div class="topic-metadata">

**Author:** [@leopdsf](https://discourse.julialang.org/u/leopdsf)\
**Replies:** 3\
**Last updated:** [March 12, 2021, 3:05am UTC](https://discourse.julialang.org/t/plotting-two-different-functions/56991 "2021-03-12T03:05:27Z")

</div>

Hello, there! I’m trying to plot two different functions at the same graph, using Plots.jl, as follows Pkg.add("Plots") using Plots p(s) = s/2 \* exp(-s^2/4) g(s) = exp(-s) plot(p,g) but I receive the error message \>…

---

## [How to improve include() performance in runtests.jl?](https://discourse.julialang.org/t/how-to-improve-include-performance-in-runtests-jl/56987)

<div class="topic-metadata">

**Author:** [@bdoolittle](https://discourse.julialang.org/u/bdoolittle)\
**Replies:** 2\
**Last updated:** [March 12, 2021, 1:39am UTC](https://discourse.julialang.org/t/how-to-improve-include-performance-in-runtests-jl/56987 "2021-03-12T01:39:14Z")

</div>

Hello, Julia users. I’ve recently noticed that when I run the unit tests of my module, a significant amount of time appears to be spent on include statements like include("test/path/to/file.jl") where the included files …

---

## [If I have the following struct:\`\`\`mutable struct FactorF{V, C, T} # variables, card](https://discourse.julialang.org/t/if-i-have-the-following-struct-mutable-struct-factorf-v-c-t-variables-card/56611)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 7\
**Last updated:** [March 12, 2021, 1:25am UTC](https://discourse.julialang.org/t/if-i-have-the-following-struct-mutable-struct-factorf-v-c-t-variables-card/56611 "2021-03-12T01:25:08Z")

</div>

If I have the following struct: mutable struct FactorF{V,C,T} # variables, cardinality, array type vals::T end and I have an instance of Factor where T happens to be Array{Float64,3}, what is the proper way to access…

---

## [Playing around with Union{}, Type{Union{}}, Type{Core.TypeofBottom}, etc](https://discourse.julialang.org/t/playing-around-with-union-type-union-type-core-typeofbottom-etc/56978)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [March 12, 2021, 1:25am UTC](https://discourse.julialang.org/t/playing-around-with-union-type-union-type-core-typeofbottom-etc/56978 "2021-03-12T01:25:04Z")

</div>

Consider this weird Julia session: $ julia \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ \_\_ \_ | Type "?" for help, "\]?" for Pkg help. …

---

## [Discussion on Base.@pure usage](https://discourse.julialang.org/t/discussion-on-base-pure-usage/56491)

<div class="topic-metadata">

**Author:** [@rryi](https://discourse.julialang.org/u/rryi)\
**Replies:** 23\
**Last updated:** [March 12, 2021, 12:10am UTC](https://discourse.julialang.org/t/discussion-on-base-pure-usage/56491 "2021-03-12T00:10:19Z")

</div>

\[edit 21/03/07 discussion in this thread is about correct @pure use, triggered by the @pure annotation in my initial question about NamedTuple type processing “with zero runtime costs”, which follows\] I have a custom Ba…

---

## [Functions of continuous variables](https://discourse.julialang.org/t/functions-of-continuous-variables/56986)

<div class="topic-metadata">

**Author:** [@leopdsf](https://discourse.julialang.org/u/leopdsf)\
**Replies:** 2\
**Last updated:** [March 12, 2021, 12:09am UTC](https://discourse.julialang.org/t/functions-of-continuous-variables/56986 "2021-03-12T00:09:05Z")

</div>

Hello, there! I want to plot a function p(s) \\times s, being s \\in \\mathbb{R}. My code is: Pkg.add("Plots") using Plots p(s) = s/2 \* exp(-s^2/4) plot(s,p(s)) The problem is that when I run it, I got the following er…

---

## [Why is Base.OneTo not exported?](https://discourse.julialang.org/t/why-is-base-oneto-not-exported/56976)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 4\
**Last updated:** [March 11, 2021, 11:37pm UTC](https://discourse.julialang.org/t/why-is-base-oneto-not-exported/56976 "2021-03-11T23:37:24Z")

</div>

It’s quite weird (and somewhat worrying) how I can’t refer to Base.OneTo as just OneTo: $ julia \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |…

---

## [Read a JSON file dumped by python](https://discourse.julialang.org/t/read-a-json-file-dumped-by-python/56968)

<div class="topic-metadata">

**Author:** [@Sebastian\_Mena](https://discourse.julialang.org/u/Sebastian_Mena)\
**Replies:** 9\
**Last updated:** [March 11, 2021, 11:35pm UTC](https://discourse.julialang.org/t/read-a-json-file-dumped-by-python/56968 "2021-03-11T23:35:56Z")

</div>

Hi, I save a pyhton dictionary in a JSON file (.json) and now i would like to import this dictionary in julia. Which is the best option? I save my dictionary in pyhton as follow, a\_file = open('path/dict\_name.json', '…

---

## [What is pkg add doing before it says "Updating registry"?](https://discourse.julialang.org/t/what-is-pkg-add-doing-before-it-says-updating-registry/56983)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [March 11, 2021, 11:33pm UTC](https://discourse.julialang.org/t/what-is-pkg-add-doing-before-it-says-updating-registry/56983 "2021-03-11T23:33:51Z")

</div>

When I \] add SomePackage it waits a few seconds and then says “Updating registry at”… What is it doing during those seconds?

---

## [Sparse vectors with Int128 indices](https://discourse.julialang.org/t/sparse-vectors-with-int128-indices/41833)

<div class="topic-metadata">

**Author:** [@eckofoid](https://discourse.julialang.org/u/eckofoid)\
**Replies:** 11\
**Last updated:** [March 11, 2021, 10:07pm UTC](https://discourse.julialang.org/t/sparse-vectors-with-int128-indices/41833 "2021-03-11T22:07:26Z")

</div>

I need to create a sparse vector with very large indices (Int128 would suffice). Naively using the default constructor, sparsevec, fails catastrophically: julia\> using SparseArrays julia\> c = sparsevec(\[0xffffffffffff…

---

## [Restrict type of value type parameter](https://discourse.julialang.org/t/restrict-type-of-value-type-parameter/12127)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 7\
**Last updated:** [March 11, 2021, 10:06pm UTC](https://discourse.julialang.org/t/restrict-type-of-value-type-parameter/12127 "2021-03-11T22:06:04Z")

</div>

I am declaring a parametric type struct A{L} end, where L should be an integer. For example, in NTuple{N,T}, the N parameter is restricted to be an integer. What is the recommended way to achieve this behavior on my cust…

---

## [Parameterizing matrix in Turing model without mutating arrays](https://discourse.julialang.org/t/parameterizing-matrix-in-turing-model-without-mutating-arrays/56977)

<div class="topic-metadata">

**Author:** [@parb](https://discourse.julialang.org/u/parb)\
**Replies:** 0\
**Last updated:** [March 11, 2021, 9:49pm UTC](https://discourse.julialang.org/t/parameterizing-matrix-in-turing-model-without-mutating-arrays/56977 "2021-03-11T21:49:16Z")

</div>

Hi All. So I’ve got this compartment model which uses a matrix exponential, \\hat y = e^{A\\,t} x\_0, where the elements of the N by N matrix A are flow rates between N compartments, and x\_0 are the initial compartment c…

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

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