# General Usage

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

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

**Page:** 926

---

## [Can't add package Plots](https://discourse.julialang.org/t/cant-add-package-plots/15304)

<div class="topic-metadata">

**Author:** [@j2b2](https://discourse.julialang.org/u/j2b2)\
**Replies:** 3\
**Last updated:** [October 23, 2018, 4:36pm UTC](https://discourse.julialang.org/t/cant-add-package-plots/15304 "2018-10-23T16:36:15Z")

</div>

Here is the whole story :frowning: (v0.7) pkg\> add Plots Resolving package versions... ERROR: Unsatisfiable requirements detected for package StatsBase \[2913bbd2\]: StatsBase \[2913bbd2\] log: ├─possible versions are: \[…

---

## [Revert Package update?](https://discourse.julialang.org/t/revert-package-update/16688)

<div class="topic-metadata">

**Author:** [@AndiMD](https://discourse.julialang.org/u/AndiMD)\
**Replies:** 8\
**Last updated:** [October 23, 2018, 4:32pm UTC](https://discourse.julialang.org/t/revert-package-update/16688 "2018-10-23T16:32:20Z")

</div>

Hi, what is the proper procedure to revert the command \] up It has happened frequently that updates broke my programs. Pinning Package versions does not seem to work either, and its hard to figure out why this is blo…

---

## [How to eradicate old UUID](https://discourse.julialang.org/t/how-to-eradicate-old-uuid/16681)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [October 23, 2018, 1:58pm UTC](https://discourse.julialang.org/t/how-to-eradicate-old-uuid/16681 "2018-10-23T13:58:36Z")

</div>

I changed the UUID of a package I am working on (because I only realized it later that metadata would assign a new one upon registration). A private project package which depends on this keeps showing me the old UUID, d…

---

## [Creating a new Symbol from two strings with a point](https://discourse.julialang.org/t/creating-a-new-symbol-from-two-strings-with-a-point/16631)

<div class="topic-metadata">

**Author:** [@drmartinrohde](https://discourse.julialang.org/u/drmartinrohde)\
**Replies:** 8\
**Last updated:** [October 23, 2018, 1:27pm UTC](https://discourse.julialang.org/t/creating-a-new-symbol-from-two-strings-with-a-point/16631 "2018-10-23T13:27:23Z")

</div>

I am trying create a new symbol that represents a field b in a struct called A, e.g. Symbol(“A.”,“b”) This gives Symbol(“A.b”), but I want :A.b, whereas Symbol(“A”,“b”) gives :Ab It looks like I cannot compose a ne…

---

## [Markdown error in help mode](https://discourse.julialang.org/t/markdown-error-in-help-mode/16655)

<div class="topic-metadata">

**Author:** [@BVPs](https://discourse.julialang.org/u/BVPs)\
**Replies:** 5\
**Last updated:** [October 23, 2018, 12:55pm UTC](https://discourse.julialang.org/t/markdown-error-in-help-mode/16655 "2018-10-23T12:55:50Z")

</div>

When I tried to check the function hypot via the help mode, I got the following Markdown error regardless of using Atom/Juno or REPL via Terminal. Also, this occurs on Mac, Windows, and Linux machines. How can we resolve…

---

## [Help with \`Base.getproperty\` syntax](https://discourse.julialang.org/t/help-with-base-getproperty-syntax/16628)

<div class="topic-metadata">

**Author:** [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Replies:** 7\
**Last updated:** [October 23, 2018, 12:36pm UTC](https://discourse.julialang.org/t/help-with-base-getproperty-syntax/16628 "2018-10-23T12:36:10Z")

</div>

I am trying to add Base.property methods to my own types for the first time and hitting a wall. Here’s a minimal example: module A import Base.getproperty struct S x end Base.getproperty(x::S,…

---

## [Attobot / METADATA.jl -- My package fails / Likely dependency issue](https://discourse.julialang.org/t/attobot-metadata-jl-my-package-fails-likely-dependency-issue/16663)

<div class="topic-metadata">

**Author:** [@danielc](https://discourse.julialang.org/u/danielc)\
**Replies:** 2\
**Last updated:** [October 23, 2018, 3:50am UTC](https://discourse.julialang.org/t/attobot-metadata-jl-my-package-fails-likely-dependency-issue/16663 "2018-10-23T03:50:14Z")

</div>

Hello, I’m developing a package. I just released version 0.3.0 and attobot claims that “Some checks were not successful”. Specifically, continuous-integration/travis-ci/pr — The Travis CI build failed JuliaCIBot — Test…

---

## [How to crash Julia 1.0.1 REPL](https://discourse.julialang.org/t/how-to-crash-julia-1-0-1-repl/16589)

<div class="topic-metadata">

**Author:** [@jandehaan](https://discourse.julialang.org/u/jandehaan)\
**Replies:** 6\
**Last updated:** [October 23, 2018, 2:02am UTC](https://discourse.julialang.org/t/how-to-crash-julia-1-0-1-repl/16589 "2018-10-23T02:02:36Z")

</div>

Base.getproperty(::DataType, s::Symbol) = "crash"

---

## [Using multiple dispatch in packages](https://discourse.julialang.org/t/using-multiple-dispatch-in-packages/16658)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 1\
**Last updated:** [October 23, 2018, 1:32am UTC](https://discourse.julialang.org/t/using-multiple-dispatch-in-packages/16658 "2018-10-23T01:32:41Z")

</div>

I need some clarification on how multiple dispatch (or “inheritance”) is working between packages. Let’s take CSVFiles for example. I can run load("file.csv") and it returns a table. In the source code, we have export l…

---

## [Feature display](https://discourse.julialang.org/t/feature-display/16657)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 2\
**Last updated:** [October 23, 2018, 1:28am UTC](https://discourse.julialang.org/t/feature-display/16657 "2018-10-23T01:28:01Z")

</div>

Hi guys, I have implemented SIFT features in Julia. But my feature point display isn’t very prominent. My result looks like: My display code: function draw\_points(image::AbstractArray, mask; c::Colorant=colorant"yel…

---

## [Project.toml -- How to specify package dependencies](https://discourse.julialang.org/t/project-toml-how-to-specify-package-dependencies/16659)

<div class="topic-metadata">

**Author:** [@danielc](https://discourse.julialang.org/u/danielc)\
**Replies:** 2\
**Last updated:** [October 23, 2018, 12:58am UTC](https://discourse.julialang.org/t/project-toml-how-to-specify-package-dependencies/16659 "2018-10-23T00:58:05Z")

</div>

Hello all, I’m making progress on my first Julia package. Here’s what I have in my Project.toml file: \[compat\] julia = "1.0" Does anyone know how to specify that a package should work on either Julia 0.7 or Julia 1.0 …

---

## [How come integer division 6.0 by 0.2 returning 29 is correct?](https://discourse.julialang.org/t/how-come-integer-division-6-0-by-0-2-returning-29-is-correct/16604)

<div class="topic-metadata">

**Author:** [@xanfus](https://discourse.julialang.org/u/xanfus)\
**Replies:** 19\
**Last updated:** [October 22, 2018, 8:46pm UTC](https://discourse.julialang.org/t/how-come-integer-division-6-0-by-0-2-returning-29-is-correct/16604 "2018-10-22T20:46:39Z")

</div>

“WolframAlpha” returns “30”. There are ways to conduct integer division differently.

---

## [Convolving random variables](https://discourse.julialang.org/t/convolving-random-variables/16647)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 0\
**Last updated:** [October 22, 2018, 8:42pm UTC](https://discourse.julialang.org/t/convolving-random-variables/16647 "2018-10-22T20:42:55Z")

</div>

Hi all - A while back I asked whether there is a package for convolving random variables in Julia (see original post). In the meantime, no package has been created and a few others have looked for similar functionality.…

---

## [Base.product repeat 1:2 5 times](https://discourse.julialang.org/t/base-product-repeat-1-2-5-times/16642)

<div class="topic-metadata">

**Author:** [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Replies:** 4\
**Last updated:** [October 22, 2018, 6:56pm UTC](https://discourse.julialang.org/t/base-product-repeat-1-2-5-times/16642 "2018-10-22T18:56:47Z")

</div>

For the Base.product function, is there a simple way to repeat the input array 1:2 5 times? So for example, instead of having to type Base.product(1:2, 1:2, 1:2, 1:2, 1:2) Be able to type Base.product(repeat(1:2, 5))

---

## [Can't load stdlib package on remote machine](https://discourse.julialang.org/t/cant-load-stdlib-package-on-remote-machine/15084)

<div class="topic-metadata">

**Author:** [@jameshclrk](https://discourse.julialang.org/u/jameshclrk)\
**Replies:** 3\
**Last updated:** [October 22, 2018, 6:52pm UTC](https://discourse.julialang.org/t/cant-load-stdlib-package-on-remote-machine/15084 "2018-10-22T18:52:27Z")

</div>

Hello, I am trying to create a ClusterManager for Julia using blaunch with LSF. To test running Julia on another machine, I am using: blaunch remote.host.name julia test.jl where remote.host.name is the host name of …

---

## [Illegal instruction crash with HDF5](https://discourse.julialang.org/t/illegal-instruction-crash-with-hdf5/16637)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 3\
**Last updated:** [October 22, 2018, 4:45pm UTC](https://discourse.julialang.org/t/illegal-instruction-crash-with-hdf5/16637 "2018-10-22T16:45:02Z")

</div>

Does this work for anyone on Linux? I get an “illegal instruction” crash on opening the file… An issue has been filed, but I wonder if it is just the specifics of my Linux set up, or if it is anything to do with the HDF5…

---

## [macOS Mojave](https://discourse.julialang.org/t/macos-mojave/15176)

<div class="topic-metadata">

**Author:** [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Replies:** 6\
**Last updated:** [October 22, 2018, 3:43pm UTC](https://discourse.julialang.org/t/macos-mojave/15176 "2018-10-22T15:43:08Z")

</div>

Apple are just about to release an update to their OS called Mojave. Has anyone been testing Julia with Mojave? Last year the High Sierra upgrade stopped my Julia system working for about a week (I’m looking at you, Hom…

---

## [Fastest way to multiply a constant sparse matrix to a vector](https://discourse.julialang.org/t/fastest-way-to-multiply-a-constant-sparse-matrix-to-a-vector/16458)

<div class="topic-metadata">

**Author:** [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Replies:** 7\
**Last updated:** [October 22, 2018, 2:44pm UTC](https://discourse.julialang.org/t/fastest-way-to-multiply-a-constant-sparse-matrix-to-a-vector/16458 "2018-10-22T14:44:41Z")

</div>

One answer to this question about multiplying a constant sparse matrix to a static vector made me wonder: Is there a more performant way of multiplying a constant sparse matrix A to a non-static vector x than doing A \* …

---

## [Socket.connect in the Windows binary of Julia V1.0.1](https://discourse.julialang.org/t/socket-connect-in-the-windows-binary-of-julia-v1-0-1/16616)

<div class="topic-metadata">

**Author:** [@jgforbes](https://discourse.julialang.org/u/jgforbes)\
**Replies:** 4\
**Last updated:** [October 22, 2018, 2:39pm UTC](https://discourse.julialang.org/t/socket-connect-in-the-windows-binary-of-julia-v1-0-1/16616 "2018-10-22T14:39:56Z")

</div>

Should this work in the windows binary julia\> using Sockets julia\> ip=“169.254.4.10” “169.254.4.10” julia\> port = 5025 5025 julia\> instr = connect(ip, port) ERROR: IOError: connect: connection timed out (ETIMEDOU…

---

## [Examples of \`getproperty\`, \`setproperty!\`, ... usage](https://discourse.julialang.org/t/examples-of-getproperty-setproperty-usage/15368)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 3\
**Last updated:** [October 22, 2018, 2:25pm UTC](https://discourse.julialang.org/t/examples-of-getproperty-setproperty-usage/15368 "2018-10-22T14:25:09Z")

</div>

Can someone suggest packages to check for examples of the use of getproperty, setproperty!, etc.? I currently have functions named getθ, setθ!, … in the MixedModels package. The θ vector is a property of the model but …

---

## [The difference between JLD and JLD2](https://discourse.julialang.org/t/the-difference-between-jld-and-jld2/16619)

<div class="topic-metadata">

**Author:** [@lannisite110](https://discourse.julialang.org/u/lannisite110)\
**Replies:** 1\
**Last updated:** [October 22, 2018, 8:39am UTC](https://discourse.julialang.org/t/the-difference-between-jld-and-jld2/16619 "2018-10-22T08:39:59Z")

</div>

does any one knows the difference between JLD and JLD2

---

## [How to test whether comparison is defined for a type?](https://discourse.julialang.org/t/how-to-test-whether-comparison-is-defined-for-a-type/16583)

<div class="topic-metadata">

**Author:** [@bobcassels](https://discourse.julialang.org/u/bobcassels)\
**Replies:** 2\
**Last updated:** [October 22, 2018, 2:33am UTC](https://discourse.julialang.org/t/how-to-test-whether-comparison-is-defined-for-a-type/16583 "2018-10-22T02:33:31Z")

</div>

I defined a new type (Mod29 – integers mod 29). struct Mod29 \<: Real value::Int8 function Mod29(value::Integer) new(Int8(mod(value, 29))) end end In another, generic, algorithm, I need to know wheth…

---

## [MethodError: no method matching Array{Float64,1}(::Array{Float64,2})](https://discourse.julialang.org/t/methoderror-no-method-matching-array-float64-1-array-float64-2/16605)

<div class="topic-metadata">

**Author:** [@ryanz](https://discourse.julialang.org/u/ryanz)\
**Replies:** 2\
**Last updated:** [October 21, 2018, 8:25pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-array-float64-1-array-float64-2/16605 "2018-10-21T20:25:31Z")

</div>

Hi, I am using version 1.0.1 and solving a value function iteration problem in parallel. I am attempting to pass “pars” to the “pmap” function. However, I encounter the following error that I have been unable to resolve: …

---

## [Registering a julia-0.7 compatible package](https://discourse.julialang.org/t/registering-a-julia-0-7-compatible-package/14120)

<div class="topic-metadata">

**Author:** [@davidavdav](https://discourse.julialang.org/u/davidavdav)\
**Replies:** 7\
**Last updated:** [October 21, 2018, 6:28pm UTC](https://discourse.julialang.org/t/registering-a-julia-0-7-compatible-package/14120 "2018-10-21T18:28:39Z")

</div>

Hello, Thanks to the work of several others, some of the packages I maintain are now ready for julia-0.7. But I am somewhat confused how to register these with METADATA. The old PkgDev appears not to work in 0.7, and …

---

## [Julia cluster using docker](https://discourse.julialang.org/t/julia-cluster-using-docker/745)

<div class="topic-metadata">

**Author:** [@torce](https://discourse.julialang.org/u/torce)\
**Replies:** 3\
**Last updated:** [October 21, 2018, 1:53pm UTC](https://discourse.julialang.org/t/julia-cluster-using-docker/745 "2018-10-21T13:53:53Z")

</div>

Hi, I have asked this in stackoverflow.com and I was recommended to post it here: I am trying to connect to docker containers using the default SSHManager. These containers only have a running sshd, with public key aut…

---

## [Call for a function to initialize vgg\_model](https://discourse.julialang.org/t/call-for-a-function-to-initialize-vgg-model/16597)

<div class="topic-metadata">

**Author:** [@lannisite110](https://discourse.julialang.org/u/lannisite110)\
**Replies:** 0\
**Last updated:** [October 21, 2018, 12:00pm UTC](https://discourse.julialang.org/t/call-for-a-function-to-initialize-vgg-model/16597 "2018-10-21T12:00:59Z")

</div>

In the following code, i want to using compile function to initialize vgg\_model with vgg-verydeep-16.mat data. And vgg\_model is a model i realized. I want to find a similar function compared with compile. Do you know tha…

---

## [How to tell if a thing is invertible?](https://discourse.julialang.org/t/how-to-tell-if-a-thing-is-invertible/16584)

<div class="topic-metadata">

**Author:** [@bobcassels](https://discourse.julialang.org/u/bobcassels)\
**Replies:** 18\
**Last updated:** [October 21, 2018, 8:54am UTC](https://discourse.julialang.org/t/how-to-tell-if-a-thing-is-invertible/16584 "2018-10-21T08:54:52Z")

</div>

I need an isinvertible function, where isinvertible(x) is true iff inv(x) is defined, and isone(inv(x) \* x). That’s to rule out 0, since inv(0) is defined, but returns Inf. In the Julia LU decomposition, There is a test…

---

## [Multiple assignments using broadcasting - any hacks?](https://discourse.julialang.org/t/multiple-assignments-using-broadcasting-any-hacks/16592)

<div class="topic-metadata">

**Author:** [@Sean\_McBane](https://discourse.julialang.org/u/Sean_McBane)\
**Replies:** 2\
**Last updated:** [October 21, 2018, 8:44am UTC](https://discourse.julialang.org/t/multiple-assignments-using-broadcasting-any-hacks/16592 "2018-10-21T08:44:16Z")

</div>

I would like to do something similar to the following: f(x) = x+1, x+2 a = Vector{Int}(undef, 10) b = similar(a) a, b .= f.(1:10) which of course does not work. For context, I have a trivially parallel operation to pe…

---

## [Understanding UnionAll types](https://discourse.julialang.org/t/understanding-unionall-types/16288)

<div class="topic-metadata">

**Author:** [@mdsalerno](https://discourse.julialang.org/u/mdsalerno)\
**Replies:** 2\
**Last updated:** [October 21, 2018, 6:34am UTC](https://discourse.julialang.org/t/understanding-unionall-types/16288 "2018-10-21T06:34:57Z")

</div>

Reading through the documentation on constructors, I came across this example. struct OurRational{T\<:Integer} \<: Real num::T den::T function OurRational{T}(num::T, den::T) where T\<:Integer # why is this Uni…

---

## [Way to efficiently view lists of lists as a read-only flattened list?](https://discourse.julialang.org/t/way-to-efficiently-view-lists-of-lists-as-a-read-only-flattened-list/14721)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 7\
**Last updated:** [October 20, 2018, 11:30pm UTC](https://discourse.julialang.org/t/way-to-efficiently-view-lists-of-lists-as-a-read-only-flattened-list/14721 "2018-10-20T23:30:22Z")

</div>

Let’s say you have a list of lists that you want to view as a single list: super\_list = \[ \[ 1 , 2 , ... , 1001234 \], \[ 6 , 1 , ... , 3 \], ... \[ 42 \] \] # \_squash is some function that does read-only vcat…

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

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