# General Usage

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

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

**Page:** 751

---

## [Julian Way of Using Keyword Arguments](https://discourse.julialang.org/t/julian-way-of-using-keyword-arguments/39777)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 6\
**Last updated:** [May 20, 2020, 3:20pm UTC](https://discourse.julialang.org/t/julian-way-of-using-keyword-arguments/39777 "2020-05-20T15:20:29Z")

</div>

I am implementing a model for the units of a simple silica glass, and in doing so have come across some interesting questions on how to use keyword arguments. Essentially, there are two notations for how to represent the…

---

## [Using tables with gtk.jl and glade](https://discourse.julialang.org/t/using-tables-with-gtk-jl-and-glade/39840)

<div class="topic-metadata">

**Author:** [@Carlos\_Werner](https://discourse.julialang.org/u/Carlos_Werner)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 3:08pm UTC](https://discourse.julialang.org/t/using-tables-with-gtk-jl-and-glade/39840 "2020-05-20T15:08:08Z")

</div>

I saw an example of creating tables with Gtk treeview, but i didn’t see anything with glade. Does anyone have an example to show?

---

## [Lorenz System VSSM controller](https://discourse.julialang.org/t/lorenz-system-vssm-controller/39817)

<div class="topic-metadata">

**Author:** [@TheBacha](https://discourse.julialang.org/u/TheBacha)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 9:56am UTC](https://discourse.julialang.org/t/lorenz-system-vssm-controller/39817 "2020-05-20T09:56:27Z")

</div>

Hello guys I am working on a small project “VSSM controller” with Julia programming I only have two questions :slight\_smile: I have exact model parameters the function of time so it can be written in x(t), y(t), z(t)…

---

## [Mapping for within Artifacts.toml already exists](https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 4\
**Last updated:** [May 20, 2020, 2:15pm UTC](https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831 "2020-05-20T14:15:13Z")

</div>

I updated an artifact online and wanted therefore to remove the existing (old) artifact I had locally, so I went and found the folder that contained it (in .julia/artifacts/hash/here) and just deleted it. Now I get this …

---

## [Julia v1.2.0 on Windows Server 2012 R2](https://discourse.julialang.org/t/julia-v1-2-0-on-windows-server-2012-r2/28277)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 8\
**Last updated:** [May 20, 2020, 12:36pm UTC](https://discourse.julialang.org/t/julia-v1-2-0-on-windows-server-2012-r2/28277 "2020-05-20T12:36:14Z")

</div>

I cannot start Julia v1.2.0 on Windows Server 2012 R2. The installation seems successful, but when starting Julia the terminal opens momentarily and then exits immediately. The problem occurs on multiple servers with s…

---

## [@kwdef and parametric types](https://discourse.julialang.org/t/kwdef-and-parametric-types/39825)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 12:20pm UTC](https://discourse.julialang.org/t/kwdef-and-parametric-types/39825 "2020-05-20T12:20:24Z")

</div>

I wonder why the following errors: julia\> Base.@kwdef mutable struct A1{F1} a :: F1 b :: F1 = zero(F1) end julia\> A1(a = 1.0) ERROR: UndefVarError: F1 not defined Stacktrace: \[1\] (::Core.v…

---

## [Variable defined - for loop](https://discourse.julialang.org/t/variable-defined-for-loop/39813)

<div class="topic-metadata">

**Author:** [@haankers](https://discourse.julialang.org/u/haankers)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 11:34am UTC](https://discourse.julialang.org/t/variable-defined-for-loop/39813 "2020-05-20T11:34:50Z")

</div>

I know there have been some questions here before on this same topic but I just wanted to note this undefined variable behaviour as strange. Just to clarify this code runs for case 1 and 2, but errors with an undefined v…

---

## [Julia-client package issue](https://discourse.julialang.org/t/julia-client-package-issue/39816)

<div class="topic-metadata">

**Author:** [@Johncowk](https://discourse.julialang.org/u/Johncowk)\
**Replies:** 2\
**Last updated:** [May 20, 2020, 10:51am UTC](https://discourse.julialang.org/t/julia-client-package-issue/39816 "2020-05-20T10:51:35Z")

</div>

I have a problem in atom, when I try to launch julia by pressing enter, julia exits immediately. I have seen on another post that the julia-client package might responsible for this issue and decided to re-install it. …

---

## [Submodules: access of objects and documentation of modules](https://discourse.julialang.org/t/submodules-access-of-objects-and-documentation-of-modules/39753)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 7:48am UTC](https://discourse.julialang.org/t/submodules-access-of-objects-and-documentation-of-modules/39753 "2020-05-20T07:48:13Z")

</div>

Let’s say I have a package with the following organisation (from @GunnarFarneback on post:2 of topic:21709): P.jl: module P include("C.jl") # shared utilities code include("M1.jl") include("M2.jl") end M1.jl: modu…

---

## [Registering a package that depends on MATLAB.jl](https://discourse.julialang.org/t/registering-a-package-that-depends-on-matlab-jl/39755)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 5\
**Last updated:** [May 20, 2020, 7:30am UTC](https://discourse.julialang.org/t/registering-a-package-that-depends-on-matlab-jl/39755 "2020-05-20T07:30:42Z")

</div>

I’m trying to register a package that depends on MATLAB.jl and I’m getting blocked by an error during CI: ERROR: LoadError: LoadError: InitError: failed process: Process(\`which matlab\`, ProcessExited(1)) \[1\] Which mak…

---

## [Type instability with StaticArrays.jl and "type alias"](https://discourse.julialang.org/t/type-instability-with-staticarrays-jl-and-type-alias/39763)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 6\
**Last updated:** [May 20, 2020, 4:03am UTC](https://discourse.julialang.org/t/type-instability-with-staticarrays-jl-and-type-alias/39763 "2020-05-20T04:03:33Z")

</div>

I see the following type instability in current Julia v1.4 and master (commit cebd4fa959). julia\> using StaticArrays \[ Info: Precompiling StaticArrays \[90137ffa-7385-5640-81b9-e52037218182\] julia\> struct Foo{N} end ju…

---

## [Love Julia, but..... Type hierarchy is frustrating](https://discourse.julialang.org/t/love-julia-but-type-hierarchy-is-frustrating/39651)

<div class="topic-metadata">

**Author:** [@jfchessa](https://discourse.julialang.org/u/jfchessa)\
**Replies:** 21\
**Last updated:** [May 20, 2020, 3:04am UTC](https://discourse.julialang.org/t/love-julia-but-type-hierarchy-is-frustrating/39651 "2020-05-20T03:04:43Z")

</div>

Two things that I have so much frustration with in Julia are importing and all the type and abstract type hierarchy. For example why does the following happen? But you need this to be robust to do multiple dispatch, …

---

## [Passing arrays with unspecified type](https://discourse.julialang.org/t/passing-arrays-with-unspecified-type/39407)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 8\
**Last updated:** [May 20, 2020, 3:04am UTC](https://discourse.julialang.org/t/passing-arrays-with-unspecified-type/39407 "2020-05-20T03:04:36Z")

</div>

This is a question about efficiency. Suppose I have a routine which performs an operation in the same manner on an array irrespective of whether the entries are Int, Float or Complex. The output type will be an array wit…

---

## [\`\`\`@.\`\`\` throws unexpected error](https://discourse.julialang.org/t/throws-unexpected-error/39772)

<div class="topic-metadata">

**Author:** [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Replies:** 5\
**Last updated:** [May 19, 2020, 9:58pm UTC](https://discourse.julialang.org/t/throws-unexpected-error/39772 "2020-05-19T21:58:31Z")

</div>

I get a somewhat odd error with @. MWE: julia\> y = Array{Float64}(undef, 2, 2); @. y =rand(2,2) + ones(2,2) ERROR: MethodError: Cannot \`convert\` an object of type Array{Float64,2} to an object of type Float64 Where is …

---

## [Julia Crashes while Typing](https://discourse.julialang.org/t/julia-crashes-while-typing/39756)

<div class="topic-metadata">

**Author:** [@J\_Bowman](https://discourse.julialang.org/u/J_Bowman)\
**Replies:** 2\
**Last updated:** [May 19, 2020, 6:34pm UTC](https://discourse.julialang.org/t/julia-crashes-while-typing/39756 "2020-05-19T18:34:11Z")

</div>

I am using Julia 1.0.5 and Juno 0.3.0. My code seemingly runs fine, but after running, Julia will crash if I write anything else afterward, giving the following error message: Exception: EXCEPTION\_ACCESS\_VIOLATION at 0x…

---

## [Unused \`where T\` causes a function to become very slow](https://discourse.julialang.org/t/unused-where-t-causes-a-function-to-become-very-slow/39727)

<div class="topic-metadata">

**Author:** [@mabokhamis](https://discourse.julialang.org/u/mabokhamis)\
**Replies:** 12\
**Last updated:** [May 19, 2020, 5:07pm UTC](https://discourse.julialang.org/t/unused-where-t-causes-a-function-to-become-very-slow/39727 "2020-05-19T17:07:41Z")

</div>

We noticed that an unused where T in a function declaration can cause the function to become much slower and to allocate a lot more memory. Consider for example the following two functions which are identical except that…

---

## [Weird broadcasting behaviour](https://discourse.julialang.org/t/weird-broadcasting-behaviour/39762)

<div class="topic-metadata">

**Author:** [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Replies:** 1\
**Last updated:** [May 19, 2020, 3:56pm UTC](https://discourse.julialang.org/t/weird-broadcasting-behaviour/39762 "2020-05-19T15:56:14Z")

</div>

Broadcasting works for matrices up to 10 by 10, then fails: julia\> n=10; A = rand(n,n); B = ones(n,n); julia\> y .= A .+ B; julia\> n=11; A = rand(n,n); B = ones(n,n); julia\> y .= A .+ B; ERROR: DimensionMismatch("ar…

---

## [Efficient representation and operations on symmetric zero-diagonal tensors](https://discourse.julialang.org/t/efficient-representation-and-operations-on-symmetric-zero-diagonal-tensors/39751)

<div class="topic-metadata">

**Author:** [@hessammehr](https://discourse.julialang.org/u/hessammehr)\
**Replies:** 0\
**Last updated:** [May 19, 2020, 1:17pm UTC](https://discourse.julialang.org/t/efficient-representation-and-operations-on-symmetric-zero-diagonal-tensors/39751 "2020-05-19T13:17:56Z")

</div>

I am looking for an efficient way of representing symmetric tensors with all zero diagonals (any combination of two indices, that is). Since these tensors are going to be fairly small, a fair number of entries are going …

---

## [\`x - y\` is not \`x + (-y)\`?](https://discourse.julialang.org/t/x-y-is-not-x-y/39726)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 2\
**Last updated:** [May 19, 2020, 7:29am UTC](https://discourse.julialang.org/t/x-y-is-not-x-y/39726 "2020-05-19T07:29:18Z")

</div>

In some places I have found that in computer algebra, x - y can be defined as x + (-y). E.g. in Cohen’s Computer Algebra and Symbolic Computation: Mathematical Methods (page 51) However this is not a rule for Julia type…

---

## [Generic code over stored/cached value or value computed on-the-fly](https://discourse.julialang.org/t/generic-code-over-stored-cached-value-or-value-computed-on-the-fly/39743)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 0\
**Last updated:** [May 19, 2020, 7:23am UTC](https://discourse.julialang.org/t/generic-code-over-stored-cached-value-or-value-computed-on-the-fly/39743 "2020-05-19T07:23:58Z")

</div>

Sorry in advance for a convoluted question. I struggled to come up with a concise example to illustrate what I’m after. I’m trying to write some code that is generic over whether some values are eagerly computed, or sho…

---

## [Pkg fails to clone with ssh](https://discourse.julialang.org/t/pkg-fails-to-clone-with-ssh/39524)

<div class="topic-metadata">

**Author:** [@ethomag](https://discourse.julialang.org/u/ethomag)\
**Replies:** 13\
**Last updated:** [May 19, 2020, 6:04am UTC](https://discourse.julialang.org/t/pkg-fails-to-clone-with-ssh/39524 "2020-05-19T06:04:46Z")

</div>

Not sure if this is Julia related, but I have run out of options In our company we use gerrit for git access, but I have random problems retrieving packets from within julia package manager (sometimes it works just fine…

---

## [Plot seriestype volume](https://discourse.julialang.org/t/plot-seriestype-volume/26301)

<div class="topic-metadata">

**Author:** [@milesf](https://discourse.julialang.org/u/milesf)\
**Replies:** 4\
**Last updated:** [May 19, 2020, 3:26am UTC](https://discourse.julialang.org/t/plot-seriestype-volume/26301 "2020-05-19T03:26:40Z")

</div>

Is there an example for how to use the seriestype=:volume recipe? Found the recipe listed in the documentation here, but I am clearly using it incorrectly: Overview · Plots I am attempting to render a 3d rectangular bo…

---

## [How to capture standard input from a piped command?](https://discourse.julialang.org/t/how-to-capture-standard-input-from-a-piped-command/39509)

<div class="topic-metadata">

**Author:** [@Marc\_Sevaux](https://discourse.julialang.org/u/Marc_Sevaux)\
**Replies:** 8\
**Last updated:** [May 18, 2020, 10:14pm UTC](https://discourse.julialang.org/t/how-to-capture-standard-input-from-a-piped-command/39509 "2020-05-18T22:14:37Z")

</div>

Apologizes if this has already been answered. I heavily use command line scripts and combination of piped commands to generate list of numbers that I want to “statistically” analyze by piping them to a julia script. To…

---

## [Generate Juputer notebook from docs build?](https://discourse.julialang.org/t/generate-juputer-notebook-from-docs-build/39721)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 1\
**Last updated:** [May 18, 2020, 9:56pm UTC](https://discourse.julialang.org/t/generate-juputer-notebook-from-docs-build/39721 "2020-05-18T21:56:53Z")

</div>

Is it possible to generate Jupyter notebooks from tutorials written for a documentation build? I’d like to have downloadable Jupyter notebooks, which get updated when I update certain tutorial pages in a documentation b…

---

## [Artifacts vs datadeps](https://discourse.julialang.org/t/artifacts-vs-datadeps/32960)

<div class="topic-metadata">

**Author:** [@denizyuret](https://discourse.julialang.org/u/denizyuret)\
**Replies:** 4\
**Last updated:** [May 18, 2020, 8:59pm UTC](https://discourse.julialang.org/t/artifacts-vs-datadeps/32960 "2020-05-18T20:59:37Z")

</div>

I want to update Knet model/data downloading code. Is there an advantage to using DataDeps.jl instead of Artifacts.toml? What is the suggested location for Artifacts.toml – package root directory like Project/Manife…

---

## [NoiseFunction in DifferentialEquations.jl](https://discourse.julialang.org/t/noisefunction-in-differentialequations-jl/39716)

<div class="topic-metadata">

**Author:** [@fernandoduarte](https://discourse.julialang.org/u/fernandoduarte)\
**Replies:** 2\
**Last updated:** [May 18, 2020, 8:50pm UTC](https://discourse.julialang.org/t/noisefunction-in-differentialequations-jl/39716 "2020-05-18T20:50:21Z")

</div>

I am getting the error “NoiseFunction has no field t” when I try to define my own noise process using NoiseFunction in DifferentialEquations.jl following the example in the documentation here. Here is the code using Di…

---

## [Trying to optimize system of SDE's](https://discourse.julialang.org/t/trying-to-optimize-system-of-sdes/39648)

<div class="topic-metadata">

**Author:** [@Ignacio\_Perez\_Ipina](https://discourse.julialang.org/u/Ignacio_Perez_Ipina)\
**Replies:** 6\
**Last updated:** [May 18, 2020, 8:34pm UTC](https://discourse.julialang.org/t/trying-to-optimize-system-of-sdes/39648 "2020-05-18T20:34:41Z")

</div>

Hello! I’ve been introduced to Julia very recently, and I’ve been trying to adapt my already tested system of equations, with additive noise, based on a Takens-Bogdanov bifurcation. I’ve got this far trying to impro…

---

## [Artificial line exists when plot a shape with fill command](https://discourse.julialang.org/t/artificial-line-exists-when-plot-a-shape-with-fill-command/39664)

<div class="topic-metadata">

**Author:** [@Ruizhi\_Yang](https://discourse.julialang.org/u/Ruizhi_Yang)\
**Replies:** 4\
**Last updated:** [May 18, 2020, 5:23pm UTC](https://discourse.julialang.org/t/artificial-line-exists-when-plot-a-shape-with-fill-command/39664 "2020-05-18T17:23:17Z")

</div>

Hello, I was trying to plot some shape with filled area with pyplot backend, for example using Plots pyplot() x = \[1,2,3,2,1\] y = \[1,0,1,2,1\] p = plot(x,y, fill=true) savefig(p,"tmp.eps") It works as expected and sho…

---

## [Saving VegaLite Plots as SVG on Centos 6.1](https://discourse.julialang.org/t/saving-vegalite-plots-as-svg-on-centos-6-1/39460)

<div class="topic-metadata">

**Author:** [@Rudi79](https://discourse.julialang.org/u/Rudi79)\
**Replies:** 15\
**Last updated:** [May 18, 2020, 5:00pm UTC](https://discourse.julialang.org/t/saving-vegalite-plots-as-svg-on-centos-6-1/39460 "2020-05-18T17:00:20Z")

</div>

Hi, I am trying to get VegaLite (v2.1.3) to work on CentOS 6.1. Unfortunately, with no avail. I can produce plots fine, but saving them does not work. using VegaLite p = @vlplot(:line, y = rand(10)); save("test.svg", p…

---

## [Fast in.(x, Ref(y))](https://discourse.julialang.org/t/fast-in-x-ref-y/39701)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 4\
**Last updated:** [May 18, 2020, 3:26pm UTC](https://discourse.julialang.org/t/fast-in-x-ref-y/39701 "2020-05-18T15:26:50Z")

</div>

I often want to filter a large Dataframe by checking whether the values of a column are elements of another large vector. Naively broadcasting in across the first vector is very slow: julia\> n = 10^5; @time in.(rand(1:…

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

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