# General Usage

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

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

**Page:** 955

---

## [OSX - Julia 1.0 won't start - segmentation fault](https://discourse.julialang.org/t/osx-julia-1-0-wont-start-segmentation-fault/13385)

<div class="topic-metadata">

**Author:** [@pazzo83](https://discourse.julialang.org/u/pazzo83)\
**Replies:** 7\
**Last updated:** [August 13, 2018, 8:20pm UTC](https://discourse.julialang.org/t/osx-julia-1-0-wont-start-segmentation-fault/13385 "2018-08-13T20:20:10Z")

</div>

Trying to start up Julia 1.0 (from the released binaries) on OSX, and it immediately seg faults: signal (11): Segmentation fault: 11 in expression starting at no file:0 jl\_typemap\_entry\_assoc\_exact at /Users/osx/buildb…

---

## [How to explain these two statements?](https://discourse.julialang.org/t/how-to-explain-these-two-statements/13393)

<div class="topic-metadata">

**Author:** [@songtianyi](https://discourse.julialang.org/u/songtianyi)\
**Replies:** 11\
**Last updated:** [August 13, 2018, 6:31pm UTC](https://discourse.julialang.org/t/how-to-explain-these-two-statements/13393 "2018-08-13T18:31:41Z")

</div>

https://docs.julialang.org/en/v0.6.4/manual/arrays/ In Julia, all arguments to functions are passed by reference. https://docs.julialang.org/en/v0.6.4/manual/types/#Mutable-Composite-Types-1 An object with an immut…

---

## [Which package you get depends on your \`add\`-history](https://discourse.julialang.org/t/which-package-you-get-depends-on-your-add-history/13358)

<div class="topic-metadata">

**Author:** [@zweiglimmergneis](https://discourse.julialang.org/u/zweiglimmergneis)\
**Replies:** 3\
**Last updated:** [August 13, 2018, 4:02pm UTC](https://discourse.julialang.org/t/which-package-you-get-depends-on-your-add-history/13358 "2018-08-13T16:02:07Z")

</div>

Warning for other new users of Julia 0.7. (I never had this problem before.) I added some packages then finally DataFrames. I got v0.10.0, which did not compile. I removed all packages (rm and gc). Then I added DataFram…

---

## [Julia v0.7: PyPlot doesn’t work with Atom](https://discourse.julialang.org/t/julia-v0-7-pyplot-doesn-t-work-with-atom/13389)

<div class="topic-metadata">

**Author:** [@Carsten](https://discourse.julialang.org/u/Carsten)\
**Replies:** 0\
**Last updated:** [August 13, 2018, 3:50pm UTC](https://discourse.julialang.org/t/julia-v0-7-pyplot-doesn-t-work-with-atom/13389 "2018-08-13T15:50:51Z")

</div>

Applying PyPlot within Atom stucks in process. I’m using: Julia Version 0.7.0 Commit a4cb80f3ed (2018-08-08 06:46 UTC) Platform Info: OS: Windows (x86\_64-w64-mingw32) CPU: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz …

---

## [Creating a package for psycholgical experiments / tasks / assessment creation](https://discourse.julialang.org/t/creating-a-package-for-psycholgical-experiments-tasks-assessment-creation/13388)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 0\
**Last updated:** [August 13, 2018, 3:50pm UTC](https://discourse.julialang.org/t/creating-a-package-for-psycholgical-experiments-tasks-assessment-creation/13388 "2018-08-13T15:50:40Z")

</div>

I would like to create a module for allowing the easy creation of psychometric tasks. The core features of such package would be: Text & image displaying Response (keyboard & mouse) collecting Possibility of preloadin…

---

## [Why is it not matching NTuple{N,T} when specifying N](https://discourse.julialang.org/t/why-is-it-not-matching-ntuple-n-t-when-specifying-n/13382)

<div class="topic-metadata">

**Author:** [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Replies:** 2\
**Last updated:** [August 13, 2018, 3:03pm UTC](https://discourse.julialang.org/t/why-is-it-not-matching-ntuple-n-t-when-specifying-n/13382 "2018-08-13T15:03:37Z")

</div>

Consider the following code: julia\> f1(x::NTuple{N,T}) where {N, T\<:Number} = "ok" f1 (generic function with 1 method) julia\> f1((1,2,3)) "ok" However, when I specifying N to be an integer as following: julia\> f2(x::…

---

## [Units of Measurement (Quantities) Library](https://discourse.julialang.org/t/units-of-measurement-quantities-library/13379)

<div class="topic-metadata">

**Author:** [@nordlow](https://discourse.julialang.org/u/nordlow)\
**Replies:** 1\
**Last updated:** [August 13, 2018, 2:25pm UTC](https://discourse.julialang.org/t/units-of-measurement-quantities-library/13379 "2018-08-13T14:25:31Z")

</div>

Announcing the release of Julia 1.0 speaks of “Matrices of unit quantities”. What is the preferred library for working with this?

---

## [NLsolve requirement - Julia 0.6.4.1](https://discourse.julialang.org/t/nlsolve-requirement-julia-0-6-4-1/13322)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 10\
**Last updated:** [August 13, 2018, 12:21pm UTC](https://discourse.julialang.org/t/nlsolve-requirement-julia-0-6-4-1/13322 "2018-08-13T12:21:54Z")

</div>

I just downloaded Julia Pro and tried to install NLsolve. Here is the issue is shows: resolve is unable to satisfy package requirements. The problem was detected when trying to find a feasible version for package Opti…

---

## [how to compare objects by memory address forcedly.](https://discourse.julialang.org/t/how-to-compare-objects-by-memory-address-forcedly/13339)

<div class="topic-metadata">

**Author:** [@thautwarm](https://discourse.julialang.org/u/thautwarm)\
**Replies:** 5\
**Last updated:** [August 13, 2018, 12:17pm UTC](https://discourse.julialang.org/t/how-to-compare-objects-by-memory-address-forcedly/13339 "2018-08-13T12:17:51Z")

</div>

Just like is in Python, there’re some use cases requiring comparison by memory address, no matter whether the object is mutable or not. === doesn’t satisfy the demand for it compares immutable data in bit level. It’s e…

---

## [Check something only once on function call](https://discourse.julialang.org/t/check-something-only-once-on-function-call/13360)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 4\
**Last updated:** [August 13, 2018, 12:16pm UTC](https://discourse.julialang.org/t/check-something-only-once-on-function-call/13360 "2018-08-13T12:16:14Z")

</div>

I have a nice function const MUSESCORE = @static Sys.iswindows() ? "MuseScore" : "musescore" function test\_musescore() r = try r = run(\`$(MUSESCORE) -v\`) catch false end if r == false ||…

---

## [Pkg gc behavior: looking across versions?](https://discourse.julialang.org/t/pkg-gc-behavior-looking-across-versions/13335)

<div class="topic-metadata">

**Author:** [@randyzwitch](https://discourse.julialang.org/u/randyzwitch)\
**Replies:** 3\
**Last updated:** [August 13, 2018, 12:14pm UTC](https://discourse.julialang.org/t/pkg-gc-behavior-looking-across-versions/13335 "2018-08-13T12:14:00Z")

</div>

This seems undesirable to me: (v0.7) pkg\> gc Active manifests at: \`/Users/randyzwitch/.julia/environments/v1.0/Manifest.toml\` \`/Users/randyzwitch/.julia/environments/v0.7/Manifest.toml\` Deleted 0 …

---

## [Julia 0.7 and JuMP: ERROR: cosd is not defined for type Variable](https://discourse.julialang.org/t/julia-0-7-and-jump-error-cosd-is-not-defined-for-type-variable/13296)

<div class="topic-metadata">

**Author:** [@Bernard\_GODARD](https://discourse.julialang.org/u/Bernard_GODARD)\
**Replies:** 5\
**Last updated:** [August 13, 2018, 11:50am UTC](https://discourse.julialang.org/t/julia-0-7-and-jump-error-cosd-is-not-defined-for-type-variable/13296 "2018-08-13T11:50:57Z")

</div>

In julia 0.7 julia\> using JuMP julia\> m=Model() WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead. in module JuMP WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead. in modul…

---

## [Adding a patch in pyplot](https://discourse.julialang.org/t/adding-a-patch-in-pyplot/13343)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 2\
**Last updated:** [August 13, 2018, 11:50am UTC](https://discourse.julialang.org/t/adding-a-patch-in-pyplot/13343 "2018-08-13T11:50:23Z")

</div>

I’m translating an example i found on the web. the part I can’t figure out is this plt.gca().add\_patch(circle) there is a top level method in PyPlot, but that won’t work, because add\_patch is clearly a method as plt.g…

---

## [Cannot call @isdefined in another macro](https://discourse.julialang.org/t/cannot-call-isdefined-in-another-macro/13350)

<div class="topic-metadata">

**Author:** [@cnliao](https://discourse.julialang.org/u/cnliao)\
**Replies:** 1\
**Last updated:** [August 13, 2018, 9:34am UTC](https://discourse.julialang.org/t/cannot-call-isdefined-in-another-macro/13350 "2018-08-13T09:34:35Z")

</div>

In 0.6 I have a macro that evaluates an assignment if any of the left-hand-side variables is undefined. In Julia 0.7 I get a depwarn that urge me to change the call of isdefined to @isdefined. But @isdefined only accept …

---

## [New Pkg questions](https://discourse.julialang.org/t/new-pkg-questions/13333)

<div class="topic-metadata">

**Author:** [@eford](https://discourse.julialang.org/u/eford)\
**Replies:** 4\
**Last updated:** [August 13, 2018, 6:44am UTC](https://discourse.julialang.org/t/new-pkg-questions/13333 "2018-08-13T06:44:41Z")

</div>

Thanks for your hard work on Julia to reach this important milestone. I’m trying to update packages, but find the new package manager to be very confusing to someone who hasn’t been following its evolution. Could someo…

---

## [error in read data in JULIA v1.0](https://discourse.julialang.org/t/error-in-read-data-in-julia-v1-0/13308)

<div class="topic-metadata">

**Author:** [@leaoshark](https://discourse.julialang.org/u/leaoshark)\
**Replies:** 10\
**Last updated:** [August 13, 2018, 5:52am UTC](https://discourse.julialang.org/t/error-in-read-data-in-julia-v1-0/13308 "2018-08-13T05:52:56Z")

</div>

in older versions in julia, i used the readlm command to read data in \*.dat Now, in julia v1.0 , the same code, i have this error UndefVarError: readdlm not defined what should i do ? in older version of julia, th…

---

## [IJulia installation issue](https://discourse.julialang.org/t/ijulia-installation-issue/13190)

<div class="topic-metadata">

**Author:** [@Orion\_T](https://discourse.julialang.org/u/Orion_T)\
**Replies:** 4\
**Last updated:** [August 13, 2018, 3:31am UTC](https://discourse.julialang.org/t/ijulia-installation-issue/13190 "2018-08-13T03:31:06Z")

</div>

New user. Problem with building IJulia: Pkg.build(“IJulia”) Building Conda ──→ ~/.julia/packages/Conda/a196m/deps/build.log ┌ Error: Error building Conda: │ ERROR: LoadError: ArgumentError: isdefined: too few argumen…

---

## [Julia is pointing to a wrong line when an error occur](https://discourse.julialang.org/t/julia-is-pointing-to-a-wrong-line-when-an-error-occur/13314)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 1\
**Last updated:** [August 12, 2018, 10:17pm UTC](https://discourse.julialang.org/t/julia-is-pointing-to-a-wrong-line-when-an-error-occur/13314 "2018-08-12T22:17:01Z")

</div>

Hi guys, After updating to Julia v0.7, I am seeing some strange behavior when an error occurs. Julia is saying that the error is occurring in a wrong line. See for example this message: julia\> include("teste.jl") \[ Inf…

---

## [Developing packages under Pkg3](https://discourse.julialang.org/t/developing-packages-under-pkg3/13317)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 1\
**Last updated:** [August 12, 2018, 7:06pm UTC](https://discourse.julialang.org/t/developing-packages-under-pkg3/13317 "2018-08-12T19:06:04Z")

</div>

The generate command in Pkg2 created a git repository for your package but it doesn’t seem to do so in Pkg3. Am I supposed to just manage this myself?

---

## [Julia1.0 on windows: versioninfo not defined](https://discourse.julialang.org/t/julia1-0-on-windows-versioninfo-not-defined/13311)

<div class="topic-metadata">

**Author:** [@galenlynch](https://discourse.julialang.org/u/galenlynch)\
**Replies:** 4\
**Last updated:** [August 12, 2018, 6:23pm UTC](https://discourse.julialang.org/t/julia1-0-on-windows-versioninfo-not-defined/13311 "2018-08-12T18:23:48Z")

</div>

My appveyor builds (eg here)on julia 1.0 are failing because versioninfo is not defined? It builds successfully on linux. Is this a known difference between platforms?

---

## [Is there any way to improve the start time of Juno](https://discourse.julialang.org/t/is-there-any-way-to-improve-the-start-time-of-juno/12554)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 9\
**Last updated:** [August 12, 2018, 6:13pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-improve-the-start-time-of-juno/12554 "2018-08-12T18:13:27Z")

</div>

The time of running the first line of Julia code in Juno is quite long. During the waiting time, it shows “INFO: Loading HttpServer methods…”. Is there any way to make the first run faster. Thanks

---

## [How to change Juno's Julia executable path?](https://discourse.julialang.org/t/how-to-change-junos-julia-executable-path/13216)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [August 12, 2018, 6:09pm UTC](https://discourse.julialang.org/t/how-to-change-junos-julia-executable-path/13216 "2018-08-12T18:09:49Z")

</div>

I installed Julia v0.7 to test out some packages and set Juno’s Julia executable path to v0.7. Some packages were breaking and I needed to run some code so I switched back to v0.6.4 but every time I start Atom, the setti…

---

## [How to get current module/scope in macro](https://discourse.julialang.org/t/how-to-get-current-module-scope-in-macro/13310)

<div class="topic-metadata">

**Author:** [@thautwarm](https://discourse.julialang.org/u/thautwarm)\
**Replies:** 2\
**Last updated:** [August 12, 2018, 4:53pm UTC](https://discourse.julialang.org/t/how-to-get-current-module-scope-in-macro/13310 "2018-08-12T16:53:34Z")

</div>

Hi, community. Could I get the module or scope of the calller of macro in Julia1.0? Just like this: module SomeModule macro f() S = caller\_module.eval(:S) fields = fieldnames(S) # do something with fields …

---

## [How to get current module/scope in macro](https://discourse.julialang.org/t/how-to-get-current-module-scope-in-macro/13309)

<div class="topic-metadata">

**Author:** [@thautwarm](https://discourse.julialang.org/u/thautwarm)\
**Replies:** 1\
**Last updated:** [August 12, 2018, 4:53pm UTC](https://discourse.julialang.org/t/how-to-get-current-module-scope-in-macro/13309 "2018-08-12T16:53:33Z")

</div>

Hi, community. Could I get the module or scope of the calller of macro in Julia 1.0? Just like this: module SomeModule macro f() S = caller\_module.eval(:S) fields = fieldnames(S) # do something with fields…

---

## [Macro to automatically create large number of variables](https://discourse.julialang.org/t/macro-to-automatically-create-large-number-of-variables/13150)

<div class="topic-metadata">

**Author:** [@BenjaminBorn](https://discourse.julialang.org/u/BenjaminBorn)\
**Replies:** 6\
**Last updated:** [August 12, 2018, 4:16pm UTC](https://discourse.julialang.org/t/macro-to-automatically-create-large-number-of-variables/13150 "2018-08-12T16:16:45Z")

</div>

Hello everyone, I have a model where I need to generate a large number of variables of the form r = exp.(Xss\[indexes.rSS\] .+ X\[indexes.r\]) rPrime = exp.(Xss\[indexes.rSS\] .+ XPrime\[indexes.r\]) w …

---

## [Using \<package name\> and Pkg.add and misleading error messages?](https://discourse.julialang.org/t/using-package-name-and-pkg-add-and-misleading-error-messages/13302)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 2\
**Last updated:** [August 12, 2018, 3:40pm UTC](https://discourse.julialang.org/t/using-package-name-and-pkg-add-and-misleading-error-messages/13302 "2018-08-12T15:40:06Z")

</div>

Hi, I already know how to use Julia, I’m just checking out 1.0 for the first time and I’m wondering if I found a bug. I did this: Press Enter to start Julia. Starting Julia… \_ \_ \_ ()\_ | Documentation: htt…

---

## [Help with structures using \`Val\`](https://discourse.julialang.org/t/help-with-structures-using-val/13300)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 1\
**Last updated:** [August 12, 2018, 2:40pm UTC](https://discourse.julialang.org/t/help-with-structures-using-val/13300 "2018-08-12T14:40:30Z")

</div>

Hi guys, Can anyone explain me why this code is not working: struct Design\_Variable{T\<:Union{Type{Val{:MGEO\_Canonical}}, Type{Val{:MGEO\_Var}}}} bits::Int64 min::Float64 max::…

---

## [Syntax I would like: \[for i in x: ...\] in addition to \[... for i in x\]](https://discourse.julialang.org/t/syntax-i-would-like-for-i-in-x-in-addition-to-for-i-in-x/13293)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 0\
**Last updated:** [August 12, 2018, 1:33pm UTC](https://discourse.julialang.org/t/syntax-i-would-like-for-i-in-x-in-addition-to-for-i-in-x/13293 "2018-08-12T13:33:17Z")

</div>

I was thinking of idiomatic things to do in DataFramesMeta i realized how useful array comprehensions are for case if statements. df = @linq df |\> transform(c = \[ @match i begin 1 =\> 1.5 2 =\> 2.5 …

---

## [Cannot Pkg.build Conda](https://discourse.julialang.org/t/cannot-pkg-build-conda/13192)

<div class="topic-metadata">

**Author:** [@GoodNews](https://discourse.julialang.org/u/GoodNews)\
**Replies:** 6\
**Last updated:** [August 12, 2018, 1:01pm UTC](https://discourse.julialang.org/t/cannot-pkg-build-conda/13192 "2018-08-12T13:01:14Z")

</div>

Hello everyone, A few days ago I started programming julia and now I got stuck. My final goal is to plot with Julia, but for this I need Conda - and here comes my problem: When I execute Pkg.build(“Conda”) I get ERRO…

---

## [Error installing PyPlot in juliav1.0 in windows 10 x64](https://discourse.julialang.org/t/error-installing-pyplot-in-juliav1-0-in-windows-10-x64/13246)

<div class="topic-metadata">

**Author:** [@leaoshark](https://discourse.julialang.org/u/leaoshark)\
**Replies:** 5\
**Last updated:** [August 12, 2018, 10:56am UTC](https://discourse.julialang.org/t/error-installing-pyplot-in-juliav1-0-in-windows-10-x64/13246 "2018-08-12T10:56:54Z")

</div>

i install julia, and after add PyPlot then i try to use, and give this : how can i solve it ? julia\> using PyPlot \[ Info: Precompiling PyPlot \[d330b81b-6aea-500a-939a-2ce795aea3ee\] WARNING: could not import Base.mimew…

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

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