# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=629

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

**Page:** 630

---

## [How do i give a type signature to julia's help mode? \`?(::String, ::String)\` gives](https://discourse.julialang.org/t/how-do-i-give-a-type-signature-to-julias-help-mode-string-string-gives/57047)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 2\
**Last updated:** [March 12, 2021, 11:41pm UTC](https://discourse.julialang.org/t/how-do-i-give-a-type-signature-to-julias-help-mode-string-string-gives/57047 "2021-03-12T23:41:29Z")

</div>

how do i give a type signature to julia’s help mode? ?(::String, ::String) gives something like \* or ::Intand get back every function where ::Int shows up as an argument. For stuff like Any it would be absurd, i think i…

---

## [Julia's DifferentialEquations package fails when using fortran-wrapped right-hand-side](https://discourse.julialang.org/t/julias-differentialequations-package-fails-when-using-fortran-wrapped-right-hand-side/56995)

<div class="topic-metadata">

**Author:** [@Nicholaswogan](https://discourse.julialang.org/u/Nicholaswogan)\
**Replies:** 8\
**Last updated:** [March 12, 2021, 8:28pm UTC](https://discourse.julialang.org/t/julias-differentialequations-package-fails-when-using-fortran-wrapped-right-hand-side/56995 "2021-03-12T20:28:28Z")

</div>

I’m trying to solve a system of ordinary differential equations with Julia’s DifferentialEquations method. The right-hand-side of my ODEs is wrapped Fortran 90. Here is my Julia code: using DifferentialEquations functio…

---

## [Implications of --compile=min and --optimize=0, for dummies](https://discourse.julialang.org/t/implications-of-compile-min-and-optimize-0-for-dummies/56894)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 22\
**Last updated:** [March 12, 2021, 4:40pm UTC](https://discourse.julialang.org/t/implications-of-compile-min-and-optimize-0-for-dummies/56894 "2021-03-12T16:40:42Z")

</div>

I’m starting to build some command line interfaces for some projects, and trying to figure out the best practices. In Fredrik Ekre’s juliacon talk, he recommends one option is to use --compile=min --optimize=0, but I’m t…

---

## [When I am developing a package or entering in dev environment using\`dev package\_n](https://discourse.julialang.org/t/when-i-am-developing-a-package-or-entering-in-dev-environment-using-dev-package-n/57019)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 12, 2021, 4:09pm UTC](https://discourse.julialang.org/t/when-i-am-developing-a-package-or-entering-in-dev-environment-using-dev-package-n/57019 "2021-03-12T16:09:49Z")

</div>

When I am developing a package or entering in dev environment using dev package\_name I am getting the following error: ERROR: The following package names could not be resolved: \* package\_name (not found in project, m…

---

## [Indexible structures like Matlab?](https://discourse.julialang.org/t/indexible-structures-like-matlab/56923)

<div class="topic-metadata">

**Author:** [@bionicinnovations1](https://discourse.julialang.org/u/bionicinnovations1)\
**Replies:** 12\
**Last updated:** [March 12, 2021, 4:08pm UTC](https://discourse.julialang.org/t/indexible-structures-like-matlab/56923 "2021-03-12T16:08:46Z")

</div>

I am trying to generate bunch of matrices or vectors, but the number I need varies. In Matlab, I could do something like this: for k = 1:5 X(k).A = rand(2,2) X(k).B = rand(1,1) X(k).C = rand(2,3) end which would gene…

---

## [Assigning a null value to a variable](https://discourse.julialang.org/t/assigning-a-null-value-to-a-variable/56988)

<div class="topic-metadata">

**Author:** [@Peter-Jolly](https://discourse.julialang.org/u/Peter-Jolly)\
**Replies:** 13\
**Last updated:** [March 12, 2021, 3:44pm UTC](https://discourse.julialang.org/t/assigning-a-null-value-to-a-variable/56988 "2021-03-12T15:44:09Z")

</div>

Hi, I am trying to write a variable x to a matrix, that is output ultimately as a CSV file. Sometimes x will have a numerical value and other time no value (a null in my old language VBA). The question is how to assign…

---

## [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 …

---

## [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…

---

## [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.…

---

## [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?

---

## [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…

---

## [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…

---

## [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…

---

## [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…

---

## [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?

---

## [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…

---

## [How can I interpolate inside single quotes inside a command?](https://discourse.julialang.org/t/how-can-i-interpolate-inside-single-quotes-inside-a-command/56515)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 3\
**Last updated:** [March 11, 2021, 9:00pm UTC](https://discourse.julialang.org/t/how-can-i-interpolate-inside-single-quotes-inside-a-command/56515 "2021-03-11T21:00:49Z")

</div>

How can I interpolate inside single quotes inside a command? h = "hey" \`echo $h\` # this works \`echo '$h'\` # this does not Note that the original poster on Slack cannot see your response here on Discourse. Consider tran…

---

## [Testing one loop with two operations or a two loops](https://discourse.julialang.org/t/testing-one-loop-with-two-operations-or-a-two-loops/56959)

<div class="topic-metadata">

**Author:** [@swishmas](https://discourse.julialang.org/u/swishmas)\
**Replies:** 3\
**Last updated:** [March 11, 2021, 6:23pm UTC](https://discourse.julialang.org/t/testing-one-loop-with-two-operations-or-a-two-loops/56959 "2021-03-11T18:23:40Z")

</div>

I was poking around a few discussion forums about what the best coding practice is. I have a few operations that I put into one loop, similar to using BenchmarkTools function single(A::Array{Int64,1}) @simd for i = 1…

---

## [Abstract repeated code in a method without overhead](https://discourse.julialang.org/t/abstract-repeated-code-in-a-method-without-overhead/56953)

<div class="topic-metadata">

**Author:** [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Replies:** 2\
**Last updated:** [March 11, 2021, 6:17pm UTC](https://discourse.julialang.org/t/abstract-repeated-code-in-a-method-without-overhead/56953 "2021-03-11T18:17:06Z")

</div>

When writing a method I used some child (internal?) functions to avoid copy/pasting code that was used repeatedly. The methods are not that complicated so I figured the compiler would just inline them and there would be…

---

## [Question on HTTP.jl](https://discourse.julialang.org/t/question-on-http-jl/56924)

<div class="topic-metadata">

**Author:** [@sampope](https://discourse.julialang.org/u/sampope)\
**Replies:** 2\
**Last updated:** [March 11, 2021, 6:11pm UTC](https://discourse.julialang.org/t/question-on-http-jl/56924 "2021-03-11T18:11:57Z")

</div>

Hi, I’m trying to do a lookup on IP addresses using HTTP.jl \[cd3eb016\] HTTP v0.9.5, I purposely put in invalid addresses to see how it responds, and not sure how to access this error: The request is: ipaddr = "10.10.10…

---

## [Difference between toml files for 1.5 and 1.6](https://discourse.julialang.org/t/difference-between-toml-files-for-1-5-and-1-6/56920)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 8\
**Last updated:** [March 11, 2021, 5:02pm UTC](https://discourse.julialang.org/t/difference-between-toml-files-for-1-5-and-1-6/56920 "2021-03-11T17:02:21Z")

</div>

has been driving me nuts for a while now. For instance, on mybinder. Is the end of the divergence nigh?

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=628)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=630)
