# General Usage

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

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

**Page:** 837

---

## [Does it possible to use XLSX.openxlsx() in parallel threads?](https://discourse.julialang.org/t/does-it-possible-to-use-xlsx-openxlsx-in-parallel-threads/28191)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 0\
**Last updated:** [August 30, 2019, 12:22am UTC](https://discourse.julialang.org/t/does-it-possible-to-use-xlsx-openxlsx-in-parallel-threads/28191 "2019-08-30T00:22:57Z")

</div>

Does it possible to use XLSX.openxlsx in parallel threads? Does somebody do it before?

---

## [Package for generating random field](https://discourse.julialang.org/t/package-for-generating-random-field/28180)

<div class="topic-metadata">

**Author:** [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Replies:** 0\
**Last updated:** [August 29, 2019, 8:41pm UTC](https://discourse.julialang.org/t/package-for-generating-random-field/28180 "2019-08-29T20:41:40Z")

</div>

I see one option GaussianRandomFields.jl but seems it’s abandoned for quite a long time. Is there any other alternative for this task and more than just Gaussian, like von Karman or Generalized Whittle–Matérn or so. Tha…

---

## [Understanding distributed memory garbage collection](https://discourse.julialang.org/t/understanding-distributed-memory-garbage-collection/8726)

<div class="topic-metadata">

**Author:** [@Pbellive](https://discourse.julialang.org/u/Pbellive)\
**Replies:** 5\
**Last updated:** [August 29, 2019, 5:35pm UTC](https://discourse.julialang.org/t/understanding-distributed-memory-garbage-collection/8726 "2019-08-29T17:35:45Z")

</div>

Hello, In running some large scale parallel computations a colleague of mine has run into problems with memory leakage. To be more specific, the amount of memory used by the offending program gradually increases over th…

---

## [Syntax error when using @ode\_def inside a function](https://discourse.julialang.org/t/syntax-error-when-using-ode-def-inside-a-function/28171)

<div class="topic-metadata">

**Author:** [@Geometh](https://discourse.julialang.org/u/Geometh)\
**Replies:** 1\
**Last updated:** [August 29, 2019, 4:07pm UTC](https://discourse.julialang.org/t/syntax-error-when-using-ode-def-inside-a-function/28171 "2019-08-29T16:07:03Z")

</div>

Hi there, I wanted to use the @ode\_def macro from the ParametrizedFunctions package inside some custom function. However, I get a syntax error saying: syntax: "struct" expression not at top level. Here is a minimum wo…

---

## [Make an existing type a child of an abstract type](https://discourse.julialang.org/t/make-an-existing-type-a-child-of-an-abstract-type/28162)

<div class="topic-metadata">

**Author:** [@zsoerenm](https://discourse.julialang.org/u/zsoerenm)\
**Replies:** 3\
**Last updated:** [August 29, 2019, 2:26pm UTC](https://discourse.julialang.org/t/make-an-existing-type-a-child-of-an-abstract-type/28162 "2019-08-29T14:26:25Z")

</div>

Is it possible to make an existing type a child of an abstract type? Something like this? using StaticArrays abstract type Abstract3DVector end struct type SVector{3} \<: Abstract3DVector end Unfortunately it does not …

---

## [REPL unresponsive after 'using' package](https://discourse.julialang.org/t/repl-unresponsive-after-using-package/28160)

<div class="topic-metadata">

**Author:** [@daniel](https://discourse.julialang.org/u/daniel)\
**Replies:** 1\
**Last updated:** [August 29, 2019, 11:42am UTC](https://discourse.julialang.org/t/repl-unresponsive-after-using-package/28160 "2019-08-29T11:42:03Z")

</div>

I’ve got an interesting problem with one of my dev’ed packages after upgrading to julia 1.2 (compiled from source). In the REPL, after using MyPackage I now always get a Recompile stale cache file, and after the second…

---

## [REQUIRE file still needed?](https://discourse.julialang.org/t/require-file-still-needed/28157)

<div class="topic-metadata">

**Author:** [@janlisse](https://discourse.julialang.org/u/janlisse)\
**Replies:** 3\
**Last updated:** [August 29, 2019, 10:26am UTC](https://discourse.julialang.org/t/require-file-still-needed/28157 "2019-08-29T10:26:30Z")

</div>

Hi, since https://github.com/JuliaLang/Pkg.jl/issues/849 is closed now, is a REQUIRE file still needed when i want to publish my package to the Julia registry? If it is obsolete by now can I safely remove it for an alre…

---

## [AutomaticDocstrings does not generate output](https://discourse.julialang.org/t/automaticdocstrings-does-not-generate-output/28158)

<div class="topic-metadata">

**Author:** [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Replies:** 3\
**Last updated:** [August 29, 2019, 9:49am UTC](https://discourse.julialang.org/t/automaticdocstrings-does-not-generate-output/28158 "2019-08-29T09:49:07Z")

</div>

Hello, I’m trying to use the AutomaticDocstring package, but I cannot make it work. When I evaluate to following the example from the docs in Juno: using AutomaticDocstrings @autodoc function f(x::A, b=5; c=LinRange(…

---

## [Is there a way to teach Zygote to derive Diagonal \* Vector more efficiently?](https://discourse.julialang.org/t/is-there-a-way-to-teach-zygote-to-derive-diagonal-vector-more-efficiently/28145)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 4\
**Last updated:** [August 29, 2019, 6:07am UTC](https://discourse.julialang.org/t/is-there-a-way-to-teach-zygote-to-derive-diagonal-vector-more-efficiently/28145 "2019-08-29T06:07:35Z")

</div>

I’m still getting my head around reverse-mode diff, but is there a way to teach Zygote to do the derivative of Diagonal \* Vector without allocating N^2 memory? using LinearAlgebra, BenchmarkTools, Zygote v = rand(4096)…

---

## [Very strange, can not create a data frame with the following simple example](https://discourse.julialang.org/t/very-strange-can-not-create-a-data-frame-with-the-following-simple-example/28147)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 1\
**Last updated:** [August 29, 2019, 5:45am UTC](https://discourse.julialang.org/t/very-strange-can-not-create-a-data-frame-with-the-following-simple-example/28147 "2019-08-29T05:45:43Z")

</div>

I have the following simple code to create a data frame. function writeAmbsFile(fin::String, ambs::Vector{Amb}) df = DataFrame( (index = a.index, stationIndex = a.stationIndex, intClass = a.intClass, class=…

---

## [Convert AbstractVector to Vector](https://discourse.julialang.org/t/convert-abstractvector-to-vector/28098)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 6\
**Last updated:** [August 29, 2019, 5:43am UTC](https://discourse.julialang.org/t/convert-abstractvector-to-vector/28098 "2019-08-29T05:43:02Z")

</div>

What is a generic, idiomatic and performant method to convert an AbstractVector (which may have non-standard indexing) to a Vector? I want to treat the AbstractVector as list of items to be “loaded” into a regular Vect…

---

## [Passing a function as an argument via closure](https://discourse.julialang.org/t/passing-a-function-as-an-argument-via-closure/28017)

<div class="topic-metadata">

**Author:** [@cpross90](https://discourse.julialang.org/u/cpross90)\
**Replies:** 9\
**Last updated:** [August 28, 2019, 5:09pm UTC](https://discourse.julialang.org/t/passing-a-function-as-an-argument-via-closure/28017 "2019-08-28T17:09:57Z")

</div>

I am creating some numerical methods, and I am running into some issues with closures. Here’s an example of what I’m doing: Function to drive myPkg: function main() #allocate temporaries function linear() …

---

## [(Compiler) Performance of Dict](https://discourse.julialang.org/t/compiler-performance-of-dict/27986)

<div class="topic-metadata">

**Author:** [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Replies:** 23\
**Last updated:** [August 28, 2019, 2:19pm UTC](https://discourse.julialang.org/t/compiler-performance-of-dict/27986 "2019-08-28T14:19:16Z")

</div>

In Roadmap for a faster time-to-first-plot?, it was suggested by @ChrisRackauckas to circumvent the usage of Dicts since they slow down compile time performance. I would love to get suggestions how to actually do this. I…

---

## [Want to change DEPOT\_PATH](https://discourse.julialang.org/t/want-to-change-depot-path/28105)

<div class="topic-metadata">

**Author:** [@imrankhan\_juliaLang](https://discourse.julialang.org/u/imrankhan_juliaLang)\
**Replies:** 2\
**Last updated:** [August 28, 2019, 1:48pm UTC](https://discourse.julialang.org/t/want-to-change-depot-path/28105 "2019-08-28T13:48:35Z")

</div>

Help i need to change and update DEPOT\_PATH. when i change DEPOT\_PATH by using DEPOT\_PATH\[1\] = “” after re open it reset

---

## [How to optimize simple matrix equation solving](https://discourse.julialang.org/t/how-to-optimize-simple-matrix-equation-solving/23035)

<div class="topic-metadata">

**Author:** [@Johncowk](https://discourse.julialang.org/u/Johncowk)\
**Replies:** 16\
**Last updated:** [August 28, 2019, 1:00pm UTC](https://discourse.julialang.org/t/how-to-optimize-simple-matrix-equation-solving/23035 "2019-08-28T13:00:40Z")

</div>

Hello ! I implemented a method which aims at detecting change-point in categorical time-serie, which gives correct results but is way too slow (slower than the python version already available, which is itself already s…

---

## [Installed Julia Pro reverts to "generic" Atom](https://discourse.julialang.org/t/installed-julia-pro-reverts-to-generic-atom/8936)

<div class="topic-metadata">

**Author:** [@fjhickernell](https://discourse.julialang.org/u/fjhickernell)\
**Replies:** 14\
**Last updated:** [August 28, 2019, 12:34pm UTC](https://discourse.julialang.org/t/installed-julia-pro-reverts-to-generic-atom/8936 "2019-08-28T12:34:02Z")

</div>

After downloading and installing Julia Pro on my Mac, I open it, change the themes, edit my Julia function, and quit. When I re-open Julia Pro, it has turned into some generic Atom with no Julia menu. Re-installing Jul…

---

## [SingularException(2) error while doing complex matrix inversion](https://discourse.julialang.org/t/singularexception-2-error-while-doing-complex-matrix-inversion/28095)

<div class="topic-metadata">

**Author:** [@mamuniut09](https://discourse.julialang.org/u/mamuniut09)\
**Replies:** 2\
**Last updated:** [August 28, 2019, 11:13am UTC](https://discourse.julialang.org/t/singularexception-2-error-while-doing-complex-matrix-inversion/28095 "2019-08-28T11:13:25Z")

</div>

I wanted to have the inverse of a complex matrix, but it shows SingularException (2) error. For example: a=\[1.0+2.0im 1.0+2.0im; 3.0+4.0im 3.0+4.0im\]; inv(a) It gives the error SingularException(2) I was wondering i…

---

## [Concrete types for Dicts in container](https://discourse.julialang.org/t/concrete-types-for-dicts-in-container/28043)

<div class="topic-metadata">

**Author:** [@mrVeng](https://discourse.julialang.org/u/mrVeng)\
**Replies:** 3\
**Last updated:** [August 28, 2019, 9:46am UTC](https://discourse.julialang.org/t/concrete-types-for-dicts-in-container/28043 "2019-08-28T09:46:42Z")

</div>

Hi everyone! I am trying to construct a container that holds vectors of different probabilities (but they are all either multi- or univariate). This container is used to store prior distributions of parameter I use in a…

---

## [Reducing Allocation](https://discourse.julialang.org/t/reducing-allocation/28078)

<div class="topic-metadata">

**Author:** [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Replies:** 4\
**Last updated:** [August 28, 2019, 8:40am UTC](https://discourse.julialang.org/t/reducing-allocation/28078 "2019-08-28T08:40:14Z")

</div>

Out of curiosity, is it possible to make the function zero allocation? The output excludes compile time. using StatsPlots,Random, BenchmarkTools # using TimerOutputs Random.seed!(123) function createPath(S, r, sigma, T,…

---

## [Surface AST to surface AST lowering/desugaring?](https://discourse.julialang.org/t/surface-ast-to-surface-ast-lowering-desugaring/28067)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 7\
**Last updated:** [August 28, 2019, 8:35am UTC](https://discourse.julialang.org/t/surface-ast-to-surface-ast-lowering-desugaring/28067 "2019-08-28T08:35:55Z")

</div>

Is there any function/package to do surface AST to surface AST lowering? I’m aware of Meta.lower but it does not produce a surface AST that can be used as an output of a macro. The only relevant thing I know is @c42f’s…

---

## [Shell escaping](https://discourse.julialang.org/t/shell-escaping/28087)

<div class="topic-metadata">

**Author:** [@phlavenk](https://discourse.julialang.org/u/phlavenk)\
**Replies:** 1\
**Last updated:** [August 28, 2019, 8:35am UTC](https://discourse.julialang.org/t/shell-escaping/28087 "2019-08-28T08:35:13Z")

</div>

How to run a command with \* without getting warning about command misuse? run(\`attrib -r $projectworkdir\\\\\*.\* /s\`) #clearing readonly attribs ┌ Warning: special characters "#{}()\[\]\<\>|&\*?~;" should now be quoted in comma…

---

## [Spiraling outwards iterator](https://discourse.julialang.org/t/spiraling-outwards-iterator/27938)

<div class="topic-metadata">

**Author:** [@rapus95](https://discourse.julialang.org/u/rapus95)\
**Replies:** 3\
**Last updated:** [August 28, 2019, 2:50am UTC](https://discourse.julialang.org/t/spiraling-outwards-iterator/27938 "2019-08-28T02:50:08Z")

</div>

Hey, I was looking for an iterator that spirals outward a given point. By that I stumbled over a Rosetta Code Challenge seeing that it is outdated (old iterator protocol) and that it goes inward clockwise. Thus it didn’…

---

## [Julia / Python 2 / Python 3 interoperability](https://discourse.julialang.org/t/julia-python-2-python-3-interoperability/27541)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 9\
**Last updated:** [August 28, 2019, 1:11am UTC](https://discourse.julialang.org/t/julia-python-2-python-3-interoperability/27541 "2019-08-28T01:11:51Z")

</div>

I’m in the scenario that I need to call Python 2 legacy code from Julia, but I also do all my plotting from PyPlot/matplotlib and hence want to use a modern Python 3 matplotlib, and I want to do this all from a single Ju…

---

## [Help with julia script](https://discourse.julialang.org/t/help-with-julia-script/28052)

<div class="topic-metadata">

**Author:** [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Replies:** 4\
**Last updated:** [August 28, 2019, 12:57am UTC](https://discourse.julialang.org/t/help-with-julia-script/28052 "2019-08-28T00:57:24Z")

</div>

Hello, I’m having a strange issue on one of my julia scripts. It clearly completes to the end, but doesn’t exit the script. The last two lines of the script are the following. println("all complete") exit() I can se…

---

## [Where do you put your "main" function in your projects?](https://discourse.julialang.org/t/where-do-you-put-your-main-function-in-your-projects/28026)

<div class="topic-metadata">

**Author:** [@tviti](https://discourse.julialang.org/u/tviti)\
**Replies:** 5\
**Last updated:** [August 27, 2019, 9:21pm UTC](https://discourse.julialang.org/t/where-do-you-put-your-main-function-in-your-projects/28026 "2019-08-27T21:21:46Z")

</div>

I’ve been working on a side project to convert an old fortran program to Julia (mostly as an escape from working on my thesis, and an excuse to learn Julia) and recently have started experimenting with encapsulating the …

---

## [Unexported functions](https://discourse.julialang.org/t/unexported-functions/28061)

<div class="topic-metadata">

**Author:** [@mrkaspa](https://discourse.julialang.org/u/mrkaspa)\
**Replies:** 6\
**Last updated:** [August 27, 2019, 8:51pm UTC](https://discourse.julialang.org/t/unexported-functions/28061 "2019-08-27T20:51:46Z")

</div>

Why if I have a module like this: module Demo suma(a) = a + 1 end I can access it through Demo.suma(123), if it has not been exported, should not be exported first to be accessed?

---

## [JuliaDiffEq Vern9() solver taking too long](https://discourse.julialang.org/t/juliadiffeq-vern9-solver-taking-too-long/27970)

<div class="topic-metadata">

**Author:** [@Prince\_Mahajan](https://discourse.julialang.org/u/Prince_Mahajan)\
**Replies:** 18\
**Last updated:** [August 27, 2019, 6:57pm UTC](https://discourse.julialang.org/t/juliadiffeq-vern9-solver-taking-too-long/27970 "2019-08-27T18:57:02Z")

</div>

I wrote a simple julia script to benchmark Verner9 solver from JuliaDiffEq against my fortran code and I am seeing the former is taking too long compared to the latter. Since I am very new to Julia, i thought someone her…

---

## [Remove box around plot](https://discourse.julialang.org/t/remove-box-around-plot/4039)

<div class="topic-metadata">

**Author:** [@Holy\_Monk](https://discourse.julialang.org/u/Holy_Monk)\
**Replies:** 1\
**Last updated:** [August 27, 2019, 2:18pm UTC](https://discourse.julialang.org/t/remove-box-around-plot/4039 "2019-08-27T14:18:00Z")

</div>

I’m making a plot where I plot some y data (say yy) to some x data (say xx). I would like to remove everything surrounding my plot (labels, ticks etc.) and save the output as an svg file. For this I use: draw(SVG(“Benfo…

---

## [Codegen woes](https://discourse.julialang.org/t/codegen-woes/27098)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 30\
**Last updated:** [August 27, 2019, 2:16pm UTC](https://discourse.julialang.org/t/codegen-woes/27098 "2019-08-27T14:16:16Z")

</div>

Hello all, There’s an expressiveness problem I’ve been fighting with for quite a while now. I had thought (and hoped, really) I might just be missing something obvious. But from discussions at JuliaCon, it seems at leas…

---

## [How to interpolate in nested quotes?](https://discourse.julialang.org/t/how-to-interpolate-in-nested-quotes/27964)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 2\
**Last updated:** [August 27, 2019, 2:22am UTC](https://discourse.julialang.org/t/how-to-interpolate-in-nested-quotes/27964 "2019-08-27T02:22:17Z")

</div>

Suppose that I have a variable v and I want to interpolate it into a nested quote expression. I tried double interpolation but it does not work properly… This is what I want: julia\> :( :( x = 1 ) ) |\> dump Expr head…

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

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