# General Usage

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

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

**Page:** 965

---

## [Help: I get this error whenever I try to run my code](https://discourse.julialang.org/t/help-i-get-this-error-whenever-i-try-to-run-my-code/12318)

<div class="topic-metadata">

**Author:** [@Mike\_Nerouppos](https://discourse.julialang.org/u/Mike_Nerouppos)\
**Replies:** 1\
**Last updated:** [July 11, 2018, 6:04pm UTC](https://discourse.julialang.org/t/help-i-get-this-error-whenever-i-try-to-run-my-code/12318 "2018-07-11T18:04:17Z")

</div>

ERROR: LoadError: LoadError: During the resolution of the non-linear system, the evaluation of the following equation(s) resulted in a non-finite number: \[1\] Stacktrace: \[1\] check\_isfinite(::Array{Float64,1}) at /home/…

---

## [How to get a Juno gui and multiple tabs in the plot planes?](https://discourse.julialang.org/t/how-to-get-a-juno-gui-and-multiple-tabs-in-the-plot-planes/8859)

<div class="topic-metadata">

**Author:** [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Replies:** 2\
**Last updated:** [July 11, 2018, 3:17pm UTC](https://discourse.julialang.org/t/how-to-get-a-juno-gui-and-multiple-tabs-in-the-plot-planes/8859 "2018-07-11T15:17:39Z")

</div>

I am trying to test out PlotlyJS.jl as a good default tutorial library. One general issue is that I am having trouble getting multiple plots when coding in Atom/Juno. This comes down to two issues: How to do I get mu…

---

## [Poor performance on cluster multithreading](https://discourse.julialang.org/t/poor-performance-on-cluster-multithreading/12248)

<div class="topic-metadata">

**Author:** [@DavidBerghaus](https://discourse.julialang.org/u/DavidBerghaus)\
**Replies:** 40\
**Last updated:** [July 11, 2018, 2:18pm UTC](https://discourse.julialang.org/t/poor-performance-on-cluster-multithreading/12248 "2018-07-11T14:18:36Z")

</div>

I am currently running Julia on a computing cluster with 56 threads. To test the multithreading capacity, I am generating random numbers: function test() tic() Threads.@threads for i=1:100000 rand(1000000) end toc…

---

## [Line break and indentation with where](https://discourse.julialang.org/t/line-break-and-indentation-with-where/12314)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 3\
**Last updated:** [July 11, 2018, 11:17am UTC](https://discourse.julialang.org/t/line-break-and-indentation-with-where/12314 "2018-07-11T11:17:38Z")

</div>

I find that I am writing long function signatures with where, and wondering about the proper formatting and style. Suppose one wants to put a linebreak in function LongConstructorName(value::T, gradient::S) where {T \<: …

---

## [Accessing derivative using HermiteInterpolation with DifferentialEquations.jl](https://discourse.julialang.org/t/accessing-derivative-using-hermiteinterpolation-with-differentialequations-jl/12296)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 2\
**Last updated:** [July 11, 2018, 8:19am UTC](https://discourse.julialang.org/t/accessing-derivative-using-hermiteinterpolation-with-differentialequations-jl/12296 "2018-07-11T08:19:27Z")

</div>

I have a solution to a DAE via DifferentialEquations.jl, which uses Hermite interpolation as can be seen here: julia\> sol retcode: Success Interpolation: 3rd order Hermite ... (the example in the tutorial page linked a…

---

## [Why does \`code\_native\` output 32-bit assembly in 64-bit Julia?](https://discourse.julialang.org/t/why-does-code-native-output-32-bit-assembly-in-64-bit-julia/12260)

<div class="topic-metadata">

**Author:** [@lcmylin](https://discourse.julialang.org/u/lcmylin)\
**Replies:** 9\
**Last updated:** [July 10, 2018, 11:25pm UTC](https://discourse.julialang.org/t/why-does-code-native-output-32-bit-assembly-in-64-bit-julia/12260 "2018-07-10T23:25:28Z")

</div>

I’m running Julia 0.6.3 (downloaded from the website) on macOS 10.13.5. In the REPL, I can use code\_llvm to see how Julia lowers the + operator for integers: julia\> code\_llvm(+, (Int, Int)) define i64 @"jlsys\_+\_60775"(…

---

## [Future.randjump and accumulate?](https://discourse.julialang.org/t/future-randjump-and-accumulate/12298)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 5\
**Last updated:** [July 10, 2018, 9:09pm UTC](https://discourse.julialang.org/t/future-randjump-and-accumulate/12298 "2018-07-10T21:09:36Z")

</div>

I am getting the following warning with nightly: Warning: \`randjump(rng, steps::Integer, len::Integer\` is deprecated; use \`Future.randjump\` and \`accumulate\` instead The only Future I could find is Distributed.Future, …

---

## [Unexpected behavior of @eval on v0.7?](https://discourse.julialang.org/t/unexpected-behavior-of-eval-on-v0-7/10609)

<div class="topic-metadata">

**Author:** [@tlnagy](https://discourse.julialang.org/u/tlnagy)\
**Replies:** 2\
**Last updated:** [July 10, 2018, 8:17pm UTC](https://discourse.julialang.org/t/unexpected-behavior-of-eval-on-v0-7/10609 "2018-07-10T20:17:34Z")

</div>

I’m working on https://github.com/GiovineItalia/Compose.jl/pull/282 and I ran into a change in how eval behaves on v0.6 to v0.7 and AFAIK the change isn’t documented. on v0.6 julia\> ex = Expr(:import, Symbol("Fontconfi…

---

## [Praise due - base library filesystem methods](https://discourse.julialang.org/t/praise-due-base-library-filesystem-methods/12287)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 3\
**Last updated:** [July 10, 2018, 5:56pm UTC](https://discourse.julialang.org/t/praise-due-base-library-filesystem-methods/12287 "2018-07-10T17:56:24Z")

</div>

Praise due to the developers. I was looking for the equivalent to Python os.path in Julia, and it is of course all there https://docs.julialang.org/en/latest/base/file/#Filesystem-1 Really clearly explained, and all ve…

---

## [Does LsqFit have constraint interval?](https://discourse.julialang.org/t/does-lsqfit-have-constraint-interval/12300)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 2\
**Last updated:** [July 10, 2018, 5:48pm UTC](https://discourse.julialang.org/t/does-lsqfit-have-constraint-interval/12300 "2018-07-10T17:48:21Z")

</div>

Hello everyone I would like to know if I could specify a range for parameters when I perform a non-linear fit ? For example, how to run something similar to curve\_fit(model, x, y, p, ?) in such way that parameter p\[…

---

## [Vector filtering performance and... gc?](https://discourse.julialang.org/t/vector-filtering-performance-and-gc/12295)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 0\
**Last updated:** [July 10, 2018, 1:54pm UTC](https://discourse.julialang.org/t/vector-filtering-performance-and-gc/12295 "2018-07-10T13:54:40Z")

</div>

I have vecs::Vector{Vector{Float32}} (really, the columns of a dataframe), each of which has length of 300000. I’m interested in the performance of v\[t\], where t is a BitVector. I’m finding that performance is strangely …

---

## [\`Pkg.resolve()\` fails when upgrading to v0.7](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 15\
**Last updated:** [July 10, 2018, 1:26pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272 "2018-07-10T13:26:08Z")

</div>

Not to bloat the Upgradathon thread any further, I am asking in a new thread. Irrelevant point: I can’t seem to add or find “upgradathon” or “v0.7” tags, it would be nice to have something like that at least temporarily. …

---

## [Issue with plotting](https://discourse.julialang.org/t/issue-with-plotting/12281)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 6\
**Last updated:** [July 10, 2018, 11:06am UTC](https://discourse.julialang.org/t/issue-with-plotting/12281 "2018-07-10T11:06:29Z")

</div>

I am trying to plot some values. So I imported plotlyjs: using Plots plotlyjs() I am getting: INFO: Precompiling module PlotlyJS. ERROR: LoadError: HttpParser not properly installed. Please run Pkg.build(“HttpPars…

---

## [How often are Julia nightly builds updated?](https://discourse.julialang.org/t/how-often-are-julia-nightly-builds-updated/12215)

<div class="topic-metadata">

**Author:** [@m-j-w](https://discourse.julialang.org/u/m-j-w)\
**Replies:** 2\
**Last updated:** [July 10, 2018, 6:34am UTC](https://discourse.julialang.org/t/how-often-are-julia-nightly-builds-updated/12215 "2018-07-10T06:34:08Z")

</div>

Current Windows 64bit Julia nightly builds are four days old. How often are nightly builds updated? In particular the Windows nightly builds? I’m eagerly waiting for a bugfix to become available.

---

## [Pkg3 and testing](https://discourse.julialang.org/t/pkg3-and-testing/11970)

<div class="topic-metadata">

**Author:** [@krcools](https://discourse.julialang.org/u/krcools)\
**Replies:** 9\
**Last updated:** [July 9, 2018, 4:29pm UTC](https://discourse.julialang.org/t/pkg3-and-testing/11970 "2018-07-09T16:29:42Z")

</div>

I have checked out a registered package for development: (v0.7) pkg\>develop CompScienceMeshes I have created a new branch and made some modifications in .julia/dev/ComScienceMeshes. Next, I tried to run the unit tests: …

---

## [Slowdown of Distributions.jl on 0.7?](https://discourse.julialang.org/t/slowdown-of-distributions-jl-on-0-7/12243)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 7\
**Last updated:** [July 9, 2018, 2:30pm UTC](https://discourse.julialang.org/t/slowdown-of-distributions-jl-on-0-7/12243 "2018-07-09T14:30:52Z")

</div>

I’m seeing a big slowdown in some code that uses Distributions.jl on 0.7 (built from master this morning), compared to 0.6.3. A MWE is using Distributions function main() a = zeros(100) y = rand(30) for i …

---

## [Help translating Cython to Julia](https://discourse.julialang.org/t/help-translating-cython-to-julia/12262)

<div class="topic-metadata">

**Author:** [@randyzwitch](https://discourse.julialang.org/u/randyzwitch)\
**Replies:** 2\
**Last updated:** [July 9, 2018, 12:37pm UTC](https://discourse.julialang.org/t/help-translating-cython-to-julia/12262 "2018-07-09T12:37:21Z")

</div>

(Sorry for all the different venues for this, I’ve had this conversation piecewise with many of you already) I’m trying to write the equivalent julia code for the following Cython code: https://github.com/mapd/pymapd/b…

---

## [Issue with using IterativeSolvers, LinearMaps and CuArrays](https://discourse.julialang.org/t/issue-with-using-iterativesolvers-linearmaps-and-cuarrays/12232)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 6\
**Last updated:** [July 9, 2018, 8:29am UTC](https://discourse.julialang.org/t/issue-with-using-iterativesolvers-linearmaps-and-cuarrays/12232 "2018-07-09T08:29:38Z")

</div>

Dear all, I am trying to solve big linear systems with iterative methods on the GPU using IterativeSolvers.jl and CuArrays.jl. But I can’t get it to work. My problem is very related to this one and I put my error on thi…

---

## [Histogram in Julia](https://discourse.julialang.org/t/histogram-in-julia/12265)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 2\
**Last updated:** [July 9, 2018, 4:10am UTC](https://discourse.julialang.org/t/histogram-in-julia/12265 "2018-07-09T04:10:16Z")

</div>

I did: edges, counts = imhist(imgG,8); plot(edges, counts, label="line") ; scatter!(edges, counts, label="points"); xlabel!("Intensities"); ylabel!("Counts"); title!("Hist"); imgG is a grayscale image. I am getting a…

---

## [\`Expr\` dump output](https://discourse.julialang.org/t/expr-dump-output/12256)

<div class="topic-metadata">

**Author:** [@Tison](https://discourse.julialang.org/u/Tison)\
**Replies:** 4\
**Last updated:** [July 9, 2018, 2:14am UTC](https://discourse.julialang.org/t/expr-dump-output/12256 "2018-07-09T02:14:29Z")

</div>

julia\> dump(Expr(:call, :+, 1, 1)) Expr head: Symbol call args: Array{Any}((3,)) 1: Symbol + 2: Int64 1 3: Int64 1 typ: Any why here is “typ” instead of “type”?

---

## [Error updating packages in 0.7](https://discourse.julialang.org/t/error-updating-packages-in-0-7/12172)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 3\
**Last updated:** [July 9, 2018, 12:24am UTC](https://discourse.julialang.org/t/error-updating-packages-in-0-7/12172 "2018-07-09T00:24:09Z")

</div>

Sometimes when updating packages in 0.7 I get an error like: ERROR: MethodError: no method matching get(::Nothing, ::String, ::Dict{Any,Any}) Closest candidates are: get(::Base.EnvDict, ::AbstractString, ::Any) at env…

---

## [Getting data directly from a website](https://discourse.julialang.org/t/getting-data-directly-from-a-website/12241)

<div class="topic-metadata">

**Author:** [@mvcavalcanti](https://discourse.julialang.org/u/mvcavalcanti)\
**Replies:** 9\
**Last updated:** [July 9, 2018, 12:09am UTC](https://discourse.julialang.org/t/getting-data-directly-from-a-website/12241 "2018-07-09T00:09:04Z")

</div>

Hi. I’m working on a script in which I do some analysis about energy prices. The first step to process these values is to get them. They are available on a public web site, through a table of five columns with historical…

---

## [NamedTuples in Type Constructors](https://discourse.julialang.org/t/namedtuples-in-type-constructors/12251)

<div class="topic-metadata">

**Author:** [@MLackner](https://discourse.julialang.org/u/MLackner)\
**Replies:** 1\
**Last updated:** [July 8, 2018, 4:16pm UTC](https://discourse.julialang.org/t/namedtuples-in-type-constructors/12251 "2018-07-08T16:16:03Z")

</div>

Hey! I’m trying to do some type constructing with NamedTuple fields in 0.7beta. Here’s my problem: julia\> struct MyStruct x::NamedTuple{(:a,:b), Tuple{Real,Real}} end julia\> MyStruct(x::NamedTuple{(:b,), Tuple{Real,}}…

---

## [optimising for loop performance](https://discourse.julialang.org/t/optimising-for-loop-performance/12230)

<div class="topic-metadata">

**Author:** [@learnjulia](https://discourse.julialang.org/u/learnjulia)\
**Replies:** 14\
**Last updated:** [July 8, 2018, 3:24am UTC](https://discourse.julialang.org/t/optimising-for-loop-performance/12230 "2018-07-08T03:24:42Z")

</div>

The following code (molecular dynamics simulation) was ported more or less directly from Fortran, but being new to Julia programming the performance isn’t as good. I followed the performance tips as much as I could, but …

---

## [How to change date format and keep the type of variable?](https://discourse.julialang.org/t/how-to-change-date-format-and-keep-the-type-of-variable/12194)

<div class="topic-metadata">

**Author:** [@mvcavalcanti](https://discourse.julialang.org/u/mvcavalcanti)\
**Replies:** 6\
**Last updated:** [July 8, 2018, 2:31am UTC](https://discourse.julialang.org/t/how-to-change-date-format-and-keep-the-type-of-variable/12194 "2018-07-08T02:31:43Z")

</div>

Hi. I have an array of dates that I want to use on a xaxis of a plot. These dates I need to present as an abbreviated month/ abbreviated year way (For example: “Jan-18”, “Feb-18”, and so on). The problem shows up when I…

---

## [Optimising function with const instead of struct?](https://discourse.julialang.org/t/optimising-function-with-const-instead-of-struct/12233)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 9\
**Last updated:** [July 7, 2018, 10:44am UTC](https://discourse.julialang.org/t/optimising-function-with-const-instead-of-struct/12233 "2018-07-07T10:44:12Z")

</div>

Hi, I have a function that I used for modelling purposes (kinda using an ODE). Hence, I defined a mutable struct to encapsulate all parameters. I thought the compiler would optimised out the values of the const inside t…

---

## [Convert parametric-type on the run](https://discourse.julialang.org/t/convert-parametric-type-on-the-run/12237)

<div class="topic-metadata">

**Author:** [@Lian\_Yunlong](https://discourse.julialang.org/u/Lian_Yunlong)\
**Replies:** 1\
**Last updated:** [July 7, 2018, 8:57pm UTC](https://discourse.julialang.org/t/convert-parametric-type-on-the-run/12237 "2018-07-07T20:57:45Z")

</div>

Hi everyone, I have the following definition of types: mutable struct TYPEA{L,Tv\<:Number} K::Array{Tv,8} end TYPEA1{Tv} = TYPEA{:A1,Tv} TYPEA2{Tv} = TYPEA{:A2,Tv} and I define a variable a = TYPEA1{ComplexF64}(ra…

---

## [Passing DataFrame via ZMQ](https://discourse.julialang.org/t/passing-dataframe-via-zmq/12223)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 3\
**Last updated:** [July 7, 2018, 5:51pm UTC](https://discourse.julialang.org/t/passing-dataframe-via-zmq/12223 "2018-07-07T17:51:24Z")

</div>

I want to pass a DataFrame via ZMQ. What would be the most effective way to do that? I was thinking about serializing with JSON but not sure how to deserialize at the other end without assuming the internal structure o…

---

## [How to refactor isdefined(OtherModule, :field) to @isdefined? (v0.7)](https://discourse.julialang.org/t/how-to-refactor-isdefined-othermodule-field-to-isdefined-v0-7/11509)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 15\
**Last updated:** [July 7, 2018, 12:45pm UTC](https://discourse.julialang.org/t/how-to-refactor-isdefined-othermodule-field-to-isdefined-v0-7/11509 "2018-07-07T12:45:41Z")

</div>

"I must be missing something obvious"™️ spoiler alert, but basically, like the title says, I can’t figure out how to refactor instances of isdefined(OtherModule, :field) to the new @isdefined. The documentation does not …

---

## [Make it simpler to contribute to packages (Pkg 3)](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 5\
**Last updated:** [July 7, 2018, 10:53am UTC](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195 "2018-07-07T10:53:17Z")

</div>

I stumbled over the following situation: I develop an app – so I’m in the app’s folder/environment (I used pkg\> init to set it up; wondering if I should use pkg\> generate since the documentation does not say… but it se…

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

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