# General Usage

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

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

**Page:** 941

---

## [Segfault in precompilation (Julia v1.0)](https://discourse.julialang.org/t/segfault-in-precompilation-julia-v1-0/14818)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 15\
**Last updated:** [September 14, 2018, 4:00pm UTC](https://discourse.julialang.org/t/segfault-in-precompilation-julia-v1-0/14818 "2018-09-14T16:00:50Z")

</div>

Badly blocked by this one - any clue as to what to do next? Works fine in v0.7. Also using HTTP works. But this doesn’t: julia\> using Genie \[ Info: Precompiling Genie \[c43c736e-a2d1-11e8-161f-af95117fbd1e\] WARNING: coul…

---

## [Post 1.0 shakedown](https://discourse.julialang.org/t/post-1-0-shakedown/14945)

<div class="topic-metadata">

**Author:** [@bramtayl](https://discourse.julialang.org/u/bramtayl)\
**Replies:** 4\
**Last updated:** [September 14, 2018, 3:05pm UTC](https://discourse.julialang.org/t/post-1-0-shakedown/14945 "2018-09-14T15:05:26Z")

</div>

In case anyone was wondering, most of my experimental packages are gone. The ones left are pretty useful, I hope: OnlinePackage: create a new package simply by copying the infrastructure of an old one, then automaticall…

---

## [Scratch environment](https://discourse.julialang.org/t/scratch-environment/14947)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 3\
**Last updated:** [September 14, 2018, 12:43pm UTC](https://discourse.julialang.org/t/scratch-environment/14947 "2018-09-14T12:43:19Z")

</div>

When copy-pasting some code from discourse, I want to be able to using any-package-from-the-universe. One way I imagine might work is to create a scratch-pad environment where I \]add \* all the packages I can. This way, I…

---

## [Computational geometry in Julia](https://discourse.julialang.org/t/computational-geometry-in-julia/14948)

<div class="topic-metadata">

**Author:** [@dawbarton](https://discourse.julialang.org/u/dawbarton)\
**Replies:** 0\
**Last updated:** [September 14, 2018, 11:18am UTC](https://discourse.julialang.org/t/computational-geometry-in-julia/14948 "2018-09-14T11:18:54Z")

</div>

I’ve had a quick look for computational geometry packages in Julia, specifically for calculating geodesic distances on arbitrary (parameterised) surfaces, but not really found anything. Are my Google skills failing or i…

---

## [Why does \`NTuple{N, T}\`'s parameter order is not \`{T, N}\`?](https://discourse.julialang.org/t/why-does-ntuple-n-t-s-parameter-order-is-not-t-n/14935)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 6\
**Last updated:** [September 14, 2018, 8:42am UTC](https://discourse.julialang.org/t/why-does-ntuple-n-t-s-parameter-order-is-not-t-n/14935 "2018-09-14T08:42:35Z")

</div>

Consider AbstractArray{T,N} or Vararg{T,N}, whose orders are both {T, N}. So why do NTuple has a different order?

---

## [How to upgrade my non-registered package to v0.7](https://discourse.julialang.org/t/how-to-upgrade-my-non-registered-package-to-v0-7/14922)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 9\
**Last updated:** [September 14, 2018, 9:30am UTC](https://discourse.julialang.org/t/how-to-upgrade-my-non-registered-package-to-v0-7/14922 "2018-09-14T09:30:21Z")

</div>

hi all really sorry for the 528-th question about Pkg3. It’s not working for me. I want to upgrade this GitHub - floswald/SMM.jl: Simulated Method of Moments for Julia to v0.7. Here is what I have done: first try sta…

---

## [JLD2 load of MersenneTwister does not work](https://discourse.julialang.org/t/jld2-load-of-mersennetwister-does-not-work/14939)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 0\
**Last updated:** [September 14, 2018, 8:19am UTC](https://discourse.julialang.org/t/jld2-load-of-mersennetwister-does-not-work/14939 "2018-09-14T08:19:08Z")

</div>

Hello, I have the following problem: I try to save a random number generator to a jld2 file and load it later. Here is an example: using Random using FileIO using JLD2 rng = Random.MersenneTwister(1) jldopen("test\_r…

---

## [Use cases for type lower bounds](https://discourse.julialang.org/t/use-cases-for-type-lower-bounds/10071)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [September 14, 2018, 8:01am UTC](https://discourse.julialang.org/t/use-cases-for-type-lower-bounds/10071 "2018-09-14T08:01:56Z")

</div>

One can specify lower bounds for UnionAll types in v0.7 with \>:. I was trying to think about examples where I would use this feature, but could not come up with any. Looking at the sources in Base, I found this one, the…

---

## [Optimizable parameters](https://discourse.julialang.org/t/optimizable-parameters/14689)

<div class="topic-metadata">

**Author:** [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Replies:** 8\
**Last updated:** [September 14, 2018, 7:27am UTC](https://discourse.julialang.org/t/optimizable-parameters/14689 "2018-09-14T07:27:53Z")

</div>

TLDR: I want to use Parameters.jl and convert a fraction of its fields to a vector and back. I can convert to the vector, but I don’t know how to convert back - please help Here is my MWE Para type using Parameters @wi…

---

## [Lost with new Pkg3](https://discourse.julialang.org/t/lost-with-new-pkg3/13977)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 14\
**Last updated:** [September 14, 2018, 6:58am UTC](https://discourse.julialang.org/t/lost-with-new-pkg3/13977 "2018-09-14T06:58:52Z")

</div>

Hi, I am totally lost with new Pkg3. I have my own packages in my own directory say ~/OwnPkg. In julia-0.6, LOAD\_PATH contained this directory and everything worked nice. At the moment, I am creating Project.toml in eve…

---

## [Simple and fast bisection](https://discourse.julialang.org/t/simple-and-fast-bisection/14886)

<div class="topic-metadata">

**Author:** [@ric.cioffi](https://discourse.julialang.org/u/ric.cioffi)\
**Replies:** 8\
**Last updated:** [September 13, 2018, 5:54pm UTC](https://discourse.julialang.org/t/simple-and-fast-bisection/14886 "2018-09-13T17:54:52Z")

</div>

Hi, as the title says I’m trying to build a simple and fast bisection algorithm. I know the Roots.jl package already implements it, yet I’m doing it both for pedagogical purposes and because I then plan to expand it with…

---

## [Applying a series of regular expression replacements](https://discourse.julialang.org/t/applying-a-series-of-regular-expression-replacements/14908)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [September 13, 2018, 2:40pm UTC](https://discourse.julialang.org/t/applying-a-series-of-regular-expression-replacements/14908 "2018-09-13T14:40:14Z")

</div>

As described in r - Automation of conversion from .Rnw to .Rmd - Stack Overflow I want to take a R no-web file and apply a series of regular expression replacements to it to create a R markdown file. Suppose that I had …

---

## [Disable depwarn globally?](https://discourse.julialang.org/t/disable-depwarn-globally/14649)

<div class="topic-metadata">

**Author:** [@jminardi](https://discourse.julialang.org/u/jminardi)\
**Replies:** 4\
**Last updated:** [September 13, 2018, 2:18pm UTC](https://discourse.julialang.org/t/disable-depwarn-globally/14649 "2018-09-13T14:18:14Z")

</div>

I have a julia script installed in my /usr/local/bin/ directory that starts with #! /usr/bin/env julia Is there any way for me to disable depreciation warnings in this situation? Simply passing --depwarn=no in the sheba…

---

## [File system paths in Meta.parse end up in error on Windows](https://discourse.julialang.org/t/file-system-paths-in-meta-parse-end-up-in-error-on-windows/14903)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 3\
**Last updated:** [September 13, 2018, 1:51pm UTC](https://discourse.julialang.org/t/file-system-paths-in-meta-parse-end-up-in-error-on-windows/14903 "2018-09-13T13:51:13Z")

</div>

Is this to be expected? How should it be handled? Windows 10: julia\> p = pwd() "C:\\\\Users\\\\adrian\\\\testapp" julia\> Main, Meta.parse("""joinpath("$p", "src")""") ERROR: Base.Meta.ParseError("invalid escape sequence") S…

---

## [Julia kernel on JupyterHub system-wide LDAP](https://discourse.julialang.org/t/julia-kernel-on-jupyterhub-system-wide-ldap/14809)

<div class="topic-metadata">

**Author:** [@New1nd](https://discourse.julialang.org/u/New1nd)\
**Replies:** 6\
**Last updated:** [September 13, 2018, 1:17pm UTC](https://discourse.julialang.org/t/julia-kernel-on-jupyterhub-system-wide-ldap/14809 "2018-09-13T13:17:52Z")

</div>

Hello, OS : Debian 9.5 Julia : Version 1.0 I’m trying to make Julia kernel work on my JupyterHub. I need the kernel to work for multiple users and not only for the local user / root. I configured JupyterHub with an LD…

---

## [Feature or bug? (1:3).\*0](https://discourse.julialang.org/t/feature-or-bug-1-3-0/14905)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 2\
**Last updated:** [September 13, 2018, 12:48pm UTC](https://discourse.julialang.org/t/feature-or-bug-1-3-0/14905 "2018-09-13T12:48:48Z")

</div>

julia\> (1:3)\*0 ERROR: ArgumentError: step cannot be zero Stacktrace: \[1\] steprange\_last( ::Int64, ::Int64, ::Int64 ) at ./range.jl:190 \[2\] \_rangestyle at ./range.jl:180 \[inlined\] \[3\] \_range at ./range.jl:91 \[inlined…

---

## [How to output the name of a tuple?](https://discourse.julialang.org/t/how-to-output-the-name-of-a-tuple/14901)

<div class="topic-metadata">

**Author:** [@LeoK987](https://discourse.julialang.org/u/LeoK987)\
**Replies:** 6\
**Last updated:** [September 13, 2018, 12:34pm UTC](https://discourse.julialang.org/t/how-to-output-the-name-of-a-tuple/14901 "2018-09-13T12:34:08Z")

</div>

julia\> aTuple = (1,2,3,4) (1, 2, 3, 4) julia\> string(aTuple) "(1, 2, 3, 4)" julia\> println(aTuple) (1, 2, 3, 4) How can I just get the name “aTuple”, instead of its content?

---

## [(raw) string literal linebreaks on Windows](https://discourse.julialang.org/t/raw-string-literal-linebreaks-on-windows/14895)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [September 13, 2018, 6:55am UTC](https://discourse.julialang.org/t/raw-string-literal-linebreaks-on-windows/14895 "2018-09-13T06:55:31Z")

</div>

This came up in unit tests: if I have a line break in a string literal, is the result platform-dependent? Eg on Linux, julia\> raw"1 2" "1\\n2" julia\> """ 1 2 """ "1\\n2\\n" but I wonder if thi…

---

## [How to detect forms of tuples](https://discourse.julialang.org/t/how-to-detect-forms-of-tuples/14894)

<div class="topic-metadata">

**Author:** [@LeoK987](https://discourse.julialang.org/u/LeoK987)\
**Replies:** 3\
**Last updated:** [September 13, 2018, 5:57am UTC](https://discourse.julialang.org/t/how-to-detect-forms-of-tuples/14894 "2018-09-13T05:57:59Z")

</div>

How best to detect if a passed-in tuple is (a1, a2) or ((a1, a2), (b1, b2))

---

## [Bug Julia 6.4 with CSV.read](https://discourse.julialang.org/t/bug-julia-6-4-with-csv-read/14823)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.julialang.org/u/clinton)\
**Replies:** 4\
**Last updated:** [September 13, 2018, 4:58am UTC](https://discourse.julialang.org/t/bug-julia-6-4-with-csv-read/14823 "2018-09-13T04:58:43Z")

</div>

Hi, I got the following error calling CSV read. Note that it fails even in a try block. Is there a place I should actually file a bug report? The line it fails on is df = CSV.read(iStream, header=actualCols, dataro…

---

## [Building with Intel MKL on a KNL system](https://discourse.julialang.org/t/building-with-intel-mkl-on-a-knl-system/4904)

<div class="topic-metadata">

**Author:** [@austinbean](https://discourse.julialang.org/u/austinbean)\
**Replies:** 7\
**Last updated:** [September 13, 2018, 2:40am UTC](https://discourse.julialang.org/t/building-with-intel-mkl-on-a-knl-system/4904 "2018-09-13T02:40:17Z")

</div>

I’ve been trying to build 0.6 with Intel MKL on a Knights Landing system. (I posted a question back in October about this too.) I wonder if anyone has done this successfully who might be able to share how they made it …

---

## [LightGraphs vs. SimpleGraphs](https://discourse.julialang.org/t/lightgraphs-vs-simplegraphs/14643)

<div class="topic-metadata">

**Author:** [@mstobb](https://discourse.julialang.org/u/mstobb)\
**Replies:** 10\
**Last updated:** [September 13, 2018, 2:05am UTC](https://discourse.julialang.org/t/lightgraphs-vs-simplegraphs/14643 "2018-09-13T02:05:06Z")

</div>

I wanted to play with some graphs (as in graph theory) and noticed two prominent Julia packages: LightGraphs (and the whole JuliaGraphs ecosystem) and SimpleGraphs. The latter only being available via cloning the github…

---

## [PyPlot error](https://discourse.julialang.org/t/pyplot-error/14889)

<div class="topic-metadata">

**Author:** [@douglaskbell](https://discourse.julialang.org/u/douglaskbell)\
**Replies:** 0\
**Last updated:** [September 12, 2018, 11:50pm UTC](https://discourse.julialang.org/t/pyplot-error/14889 "2018-09-12T23:50:38Z")

</div>

Running plot(1:5) caused an error after doing the following installation steps… Installed Julia 1.0.0 Installed Python( Anaconda | Anaconda Distribution ) Run Anaconda as admin 4.Installed matplotlib ( conda install -…

---

## [How to remove extra allocation when doing point-wise assignment?](https://discourse.julialang.org/t/how-to-remove-extra-allocation-when-doing-point-wise-assignment/14875)

<div class="topic-metadata">

**Author:** [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Replies:** 2\
**Last updated:** [September 12, 2018, 9:41pm UTC](https://discourse.julialang.org/t/how-to-remove-extra-allocation-when-doing-point-wise-assignment/14875 "2018-09-12T21:41:19Z")

</div>

Hello, I found that if exists assignment, the point-wise loop will introduce lots of additional allocation (on Julia 1.0), julia\> function f1(a, b, c) @. t1 = a \* b / c end f1 (generic function with 1 …

---

## [Matrix exponential slower in Julia 0.7 / 1.0?](https://discourse.julialang.org/t/matrix-exponential-slower-in-julia-0-7-1-0/14762)

<div class="topic-metadata">

**Author:** [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Replies:** 7\
**Last updated:** [September 12, 2018, 8:18pm UTC](https://discourse.julialang.org/t/matrix-exponential-slower-in-julia-0-7-1-0/14762 "2018-09-12T20:18:25Z")

</div>

In Julia 0.6.4: julia\> @btime expm(\[1 0; 2 0\]) 3.601 μs (46 allocations: 4.55 KiB) In Julia 0.7 and 1.0: julia\> @btime exp(\[1 0; 2 0\]) 16.710 μs (67 allocations: 4.55 KiB) Any idea what’s causing this? Perhaps th…

---

## [Non-linear root-finding: Works in Matlab, but not in Julia](https://discourse.julialang.org/t/non-linear-root-finding-works-in-matlab-but-not-in-julia/14858)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 10\
**Last updated:** [September 12, 2018, 3:44pm UTC](https://discourse.julialang.org/t/non-linear-root-finding-works-in-matlab-but-not-in-julia/14858 "2018-09-12T15:44:59Z")

</div>

Hey everyone, I have a small numerical problem here. The main idea is that I try to approximate a univariate function, that needs to satisfy some constraint, with a polynomial. I had this already working with an older v…

---

## [How to tell what kwargs are supported by a function](https://discourse.julialang.org/t/how-to-tell-what-kwargs-are-supported-by-a-function/14840)

<div class="topic-metadata">

**Author:** [@bluesmoon](https://discourse.julialang.org/u/bluesmoon)\
**Replies:** 6\
**Last updated:** [September 12, 2018, 2:34pm UTC](https://discourse.julialang.org/t/how-to-tell-what-kwargs-are-supported-by-a-function/14840 "2018-09-12T14:34:52Z")

</div>

Is there any way to tell through code whether a function supports a particular kwarg or not? I have a list of args in a Dict, and I need to filter this Dict to those that are supported by the function being called but sh…

---

## [Alternative to mapslices that does not allocate slices](https://discourse.julialang.org/t/alternative-to-mapslices-that-does-not-allocate-slices/13820)

<div class="topic-metadata">

**Author:** [@piever](https://discourse.julialang.org/u/piever)\
**Replies:** 8\
**Last updated:** [September 12, 2018, 1:28pm UTC](https://discourse.julialang.org/t/alternative-to-mapslices-that-does-not-allocate-slices/13820 "2018-09-12T13:28:09Z")

</div>

I’m trying to understand whether there is a non-allocating equivalent of mapslices. I often end up needing to reduce sliced views, for example: mapslices(sum, m, dims = n) And I would like to figure out a way that does…

---

## [How to clear plots (values are getting overlaid)](https://discourse.julialang.org/t/how-to-clear-plots-values-are-getting-overlaid/14796)

<div class="topic-metadata">

**Author:** [@Nakul\_Tiruviluamala](https://discourse.julialang.org/u/Nakul_Tiruviluamala)\
**Replies:** 2\
**Last updated:** [September 12, 2018, 1:19pm UTC](https://discourse.julialang.org/t/how-to-clear-plots-values-are-getting-overlaid/14796 "2018-09-12T13:19:34Z")

</div>

Hello, I am struggling with the action of clearing a plot in Julia. Every time I modify the contents of the variable that is to be plotted, it gets overlaid instead of redrawn. My solution for this is to restart my IDE …

---

## [Pyplot labels in scientific vs plain format](https://discourse.julialang.org/t/pyplot-labels-in-scientific-vs-plain-format/14847)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 2\
**Last updated:** [September 12, 2018, 12:52pm UTC](https://discourse.julialang.org/t/pyplot-labels-in-scientific-vs-plain-format/14847 "2018-09-12T12:52:42Z")

</div>

Dear all, I’m fighting with pyplot labels in julia. I have to plot in a graph certain quantities that are in value very close to the value 104.6, with small differences in the second, third decimals. The fact is that I …

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

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