# General Usage

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

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

**Page:** 991

---

## [Broadcasting \`setindex!\` over a tuple of arrays with splatted indices is slow](https://discourse.julialang.org/t/broadcasting-setindex-over-a-tuple-of-arrays-with-splatted-indices-is-slow/9641)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 1\
**Last updated:** [March 11, 2018, 7:02pm UTC](https://discourse.julialang.org/t/broadcasting-setindex-over-a-tuple-of-arrays-with-splatted-indices-is-slow/9641 "2018-03-11T19:02:15Z")

</div>

For demonstration of this problem, create a tuple of two matrices, one with Float64 and the other with Int64 as entries: julia\> VERSION v"0.6.3-pre.0" julia\> mats = (rand(3,3), rand(Int64,3,3)); Also create a tuple of…

---

## [Problem related to CSV.read() and strings](https://discourse.julialang.org/t/problem-related-to-csv-read-and-strings/9595)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 8\
**Last updated:** [March 11, 2018, 11:20am UTC](https://discourse.julialang.org/t/problem-related-to-csv-read-and-strings/9595 "2018-03-11T11:20:47Z")

</div>

I had a possibly related problem in the past. I want to read a large data set through CSV.read(). The data set contains comments from on online forum that I scraped using Python and saved it as JSON. In Python I convert…

---

## [Julia on Solaris/SPARC?](https://discourse.julialang.org/t/julia-on-solaris-sparc/9634)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 1\
**Last updated:** [March 10, 2018, 9:08pm UTC](https://discourse.julialang.org/t/julia-on-solaris-sparc/9634 "2018-03-10T21:08:14Z")

</div>

Is it possible to run Julia on Solaris/SPARC platform?

---

## [GitError when starting the REPL view in Juno](https://discourse.julialang.org/t/giterror-when-starting-the-repl-view-in-juno/9399)

<div class="topic-metadata">

**Author:** [@yha](https://discourse.julialang.org/u/yha)\
**Replies:** 1\
**Last updated:** [March 10, 2018, 8:44pm UTC](https://discourse.julialang.org/t/giterror-when-starting-the-repl-view-in-juno/9399 "2018-03-10T20:44:32Z")

</div>

After some problems with Juno, I tried uninstalling Julia and Juno (including deleting related folders under Users: “.atom” and “AppData/Local/Julia”) and installing from scratch. The first difficulty was that Pkg.updat…

---

## [3 different ways to create an array have different performance](https://discourse.julialang.org/t/3-different-ways-to-create-an-array-have-different-performance/9636)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 1\
**Last updated:** [March 10, 2018, 8:36pm UTC](https://discourse.julialang.org/t/3-different-ways-to-create-an-array-have-different-performance/9636 "2018-03-10T20:36:36Z")

</div>

I am creating an array of size 100 using three different methods. But I don’t understand why the @time results are different between them. Here is the code Main\> @time dpc = \[Int(round(rand(PP\_DD))) for i=1:100\]; 0.0…

---

## [Inference breaks as a result of a simple no-op?](https://discourse.julialang.org/t/inference-breaks-as-a-result-of-a-simple-no-op/9624)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 6\
**Last updated:** [March 10, 2018, 6:50pm UTC](https://discourse.julialang.org/t/inference-breaks-as-a-result-of-a-simple-no-op/9624 "2018-03-10T18:50:00Z")

</div>

I’ve been hunting down some performance problem in some code, and was finding behaviour of the inference engine that make no sense to me whatsoever. I’ve managed to reduce it to the following minimal example: struct Bar…

---

## [Why Does Julia Have Two Different Epoch Starts?](https://discourse.julialang.org/t/why-does-julia-have-two-different-epoch-starts/9622)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 4\
**Last updated:** [March 10, 2018, 5:43pm UTC](https://discourse.julialang.org/t/why-does-julia-have-two-different-epoch-starts/9622 "2018-03-10T17:43:45Z")

</div>

julia\> dt = DateTime(2004, 12, 31, 17, 30, 1) 2004-12-31T17:30:01 julia\> convert( Int, dt ) 63240197401000 julia\> ep1= convert( Int, dt ) 63240197401000 julia\> ep2= Dates.datetime2epochms( dt ) 63271733401000 julia\> …

---

## [Interpolation issues in a backticks expression](https://discourse.julialang.org/t/interpolation-issues-in-a-backticks-expression/9612)

<div class="topic-metadata">

**Author:** [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Replies:** 4\
**Last updated:** [March 10, 2018, 4:02pm UTC](https://discourse.julialang.org/t/interpolation-issues-in-a-backticks-expression/9612 "2018-03-10T16:02:37Z")

</div>

I’m trying to build this command: osascript -e 'tell application "Terminal" to do script "julia -i $path/file.jl"' Where $path is a julia variable, But I can’t manage to get it to work, any idea ? Thanks.

---

## [Atomic write(filename) append?](https://discourse.julialang.org/t/atomic-write-filename-append/9560)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 2\
**Last updated:** [March 7, 2018, 2:38pm UTC](https://discourse.julialang.org/t/atomic-write-filename-append/9560 "2018-03-07T14:38:53Z")

</div>

dear julia wizards—is it possible to procure an atomic write-append that briefly locks an append-output file in order to prevent other processes/threads from interleaving output? the natural way would be safety in writ…

---

## [Strange Variable Behavior](https://discourse.julialang.org/t/strange-variable-behavior/9586)

<div class="topic-metadata">

**Author:** [@DiffusionFlame](https://discourse.julialang.org/u/DiffusionFlame)\
**Replies:** 5\
**Last updated:** [March 9, 2018, 9:25pm UTC](https://discourse.julialang.org/t/strange-variable-behavior/9586 "2018-03-09T21:25:06Z")

</div>

Hello, I am new to Julia. I am using Atom and the uber-juno package (and its associated packages). I have discovered some strange behavior. I have a variable to which I’ve saved a time step, dt=5E-3. In the workspace i…

---

## [Emacs and julia](https://discourse.julialang.org/t/emacs-and-julia/4770)

<div class="topic-metadata">

**Author:** [@harven](https://discourse.julialang.org/u/harven)\
**Replies:** 12\
**Last updated:** [March 9, 2018, 7:19pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770 "2018-03-09T19:19:35Z")

</div>

Hello emacs users, I see that there are at least 4 different ways to use julia from emacs. julia-mode (official one?) ESS julia-repl julia-shell-mode What are their respective strengths and features? Is there any…

---

## [JavaCall first time](https://discourse.julialang.org/t/javacall-first-time/9611)

<div class="topic-metadata">

**Author:** [@bramtayl](https://discourse.julialang.org/u/bramtayl)\
**Replies:** 2\
**Last updated:** [March 9, 2018, 3:58pm UTC](https://discourse.julialang.org/t/javacall-first-time/9611 "2018-03-09T15:58:46Z")

</div>

I’m trying to get JavaCall set up. My java\_home is “C:/Program Files/Java/jre1.8.0\_151”. I tried changing it to “C:/Program Files (x86)/Java/jre1.8.0\_151” to no avail. julia\> JavaCall.init(\["-Xmx4g"\]) Unable to initia…

---

## [Dispatch on Set{Union}](https://discourse.julialang.org/t/dispatch-on-set-union/9604)

<div class="topic-metadata">

**Author:** [@Robert\_Honig](https://discourse.julialang.org/u/Robert_Honig)\
**Replies:** 3\
**Last updated:** [March 9, 2018, 8:14am UTC](https://discourse.julialang.org/t/dispatch-on-set-union/9604 "2018-03-09T08:14:24Z")

</div>

I have a function foo. I want to call setofbar = Set(\[Bar()\]) setofbaz = Set(\[Baz()\]) foo(setofbar) foo(setofbaz) To do so, I declared foo as follows: function foo(obj::Set{Union{Bar, Baz}}) This gives me a “no metho…

---

## [LoadError: On worker 2: Local instance of remote reference not found, occurs at specific function](https://discourse.julialang.org/t/loaderror-on-worker-2-local-instance-of-remote-reference-not-found-occurs-at-specific-function/9594)

<div class="topic-metadata">

**Author:** [@paalon](https://discourse.julialang.org/u/paalon)\
**Replies:** 1\
**Last updated:** [March 9, 2018, 3:41am UTC](https://discourse.julialang.org/t/loaderror-on-worker-2-local-instance-of-remote-reference-not-found-occurs-at-specific-function/9594 "2018-03-09T03:41:23Z")

</div>

Summary Error: ERROR: LoadError: On worker 2: Local instance of remote reference not found occurs only when it uses @parallel and it uses function CompSens.ell1reconstruct which uses JuMP and Clp Detail I encountere…

---

## [Parallel is very slow](https://discourse.julialang.org/t/parallel-is-very-slow/9443)

<div class="topic-metadata">

**Author:** [@Hongliang\_Yang](https://discourse.julialang.org/u/Hongliang_Yang)\
**Replies:** 16\
**Last updated:** [March 9, 2018, 3:15am UTC](https://discourse.julialang.org/t/parallel-is-very-slow/9443 "2018-03-09T03:15:21Z")

</div>

Hi all, Is anyone can tell me why parallel is so slow? @everywhere using DistributedArrays n = parse(Int,ARGS\[1\]) println("One") @time x = \[sin(i) + cos(i) for i = 1:n\]; println("Two") @time y = @DArray \[sin(i) + …

---

## [Overload \`show\` for array of custom types](https://discourse.julialang.org/t/overload-show-for-array-of-custom-types/9589)

<div class="topic-metadata">

**Author:** [@Iagoba\_Apellaniz](https://discourse.julialang.org/u/Iagoba_Apellaniz)\
**Replies:** 1\
**Last updated:** [March 8, 2018, 9:15am UTC](https://discourse.julialang.org/t/overload-show-for-array-of-custom-types/9589 "2018-03-08T09:15:17Z")

</div>

Hello everyone, I’m trying to overload the Base.show method for arrays of custom types. I have an alternative solution that is to wrap the array into a new type, but I find it no sense. Here is the thing julia\> struct …

---

## [Sorting common elements into bins](https://discourse.julialang.org/t/sorting-common-elements-into-bins/9564)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 10\
**Last updated:** [March 8, 2018, 2:08am UTC](https://discourse.julialang.org/t/sorting-common-elements-into-bins/9564 "2018-03-08T02:08:36Z")

</div>

Hi all, I was just wondering if any tools already exist for sorting common elements of vectors or sets into bins? For example, for x = \[1,2,2,1,3,3,3,3,1\], a routine that returns that there are 3 ones, 2 twos, and 4 thr…

---

## [How to make macro that calls expr asyncly?](https://discourse.julialang.org/t/how-to-make-macro-that-calls-expr-asyncly/9559)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 2\
**Last updated:** [March 7, 2018, 10:06pm UTC](https://discourse.julialang.org/t/how-to-make-macro-that-calls-expr-asyncly/9559 "2018-03-07T22:06:53Z")

</div>

let’s say you have a function (in the Main scope): function foo() for cur\_index in 99:-1:0 print("$(cur\_index) bottles of beer on the wall. ") println("$(cur\_index) bottles of beer.") println("Take one dow…

---

## [Base.Pkg is deprecated, but \`using Pkg\` errors out](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 5\
**Last updated:** [March 7, 2018, 7:54pm UTC](https://discourse.julialang.org/t/base-pkg-is-deprecated-but-using-pkg-errors-out/9573 "2018-03-07T19:54:33Z")

</div>

Getting this with Julia v0.7 nightly on MacOS: julia\> Pkg.WARNING: Base.Pkg is deprecated, run \`using Pkg\` instead in module Main julia\> using Pkg ERROR: importing Pkg into Main conflicts with an existing identifier C…

---

## [How to elicit an instalation on a client](https://discourse.julialang.org/t/how-to-elicit-an-instalation-on-a-client/9580)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 0\
**Last updated:** [March 7, 2018, 7:51pm UTC](https://discourse.julialang.org/t/how-to-elicit-an-instalation-on-a-client/9580 "2018-03-07T19:51:30Z")

</div>

I’m using Plots (GR backend) to create some animations. At least on osx, Plots needs cairo and ffmpeg installed for animations to work. While I can “fix” that for the CI by adding this line to the .travis.yml file: - …

---

## [Building Julia Offline](https://discourse.julialang.org/t/building-julia-offline/9252)

<div class="topic-metadata">

**Author:** [@jokalokao](https://discourse.julialang.org/u/jokalokao)\
**Replies:** 11\
**Last updated:** [March 7, 2018, 5:06pm UTC](https://discourse.julialang.org/t/building-julia-offline/9252 "2018-03-07T17:06:32Z")

</div>

So, I’m trying to build Julia 0.6.2 on a machine without access to the internet. I am able to do a make without errors using the julia-full package. The problem starts with make install. How do I run make install witho…

---

## [GroupSlices registration, or alternatives](https://discourse.julialang.org/t/groupslices-registration-or-alternatives/9554)

<div class="topic-metadata">

**Author:** [@improbable22](https://discourse.julialang.org/u/improbable22)\
**Replies:** 2\
**Last updated:** [March 7, 2018, 4:15pm UTC](https://discourse.julialang.org/t/groupslices-registration-or-alternatives/9554 "2018-03-07T16:15:50Z")

</div>

I use GroupSlices.jl , but it would be more convenient if the package were registered. Should I just submit a PR to Metadata for this? Or alternatively, is there another package I should be using? In something I’m writi…

---

## [Modify show for custom type - for tuples](https://discourse.julialang.org/t/modify-show-for-custom-type-for-tuples/9571)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 1\
**Last updated:** [March 7, 2018, 4:13pm UTC](https://discourse.julialang.org/t/modify-show-for-custom-type-for-tuples/9571 "2018-03-07T16:13:38Z")

</div>

I have a function which returns a 2-tuple. One of the elements of the tuple is an ‘instance’ of a custom type. For this type I have overloaded the show function. But when I run the function which returns a tuple, it f…

---

## [ASCIIString not defined](https://discourse.julialang.org/t/asciistring-not-defined/9570)

<div class="topic-metadata">

**Author:** [@Samudra](https://discourse.julialang.org/u/Samudra)\
**Replies:** 3\
**Last updated:** [March 7, 2018, 3:04pm UTC](https://discourse.julialang.org/t/asciistring-not-defined/9570 "2018-03-07T15:04:47Z")

</div>

Does anyone knows why I get this error? k=match(r"#\\s\*(\\w+)\\s\*=\\s\*(.+)", “# K = 4”) convert(ASCIIString,k.captures\[1\]) UndefVarError: ASCIIString not defined Stacktrace: \[1\] include\_string(::String, ::String) at .\\l…

---

## [Evaluation of the error term in Stirling's formula for factorial](https://discourse.julialang.org/t/evaluation-of-the-error-term-in-stirlings-formula-for-factorial/9542)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 4\
**Last updated:** [March 7, 2018, 2:28pm UTC](https://discourse.julialang.org/t/evaluation-of-the-error-term-in-stirlings-formula-for-factorial/9542 "2018-03-07T14:28:17Z")

</div>

Pull request #33 on the StatsFuns package provides a link to Catherine Loader’s note on evaluating the binomial and Poisson probability mass function. One central part to this is evaluating the error in Stirling’s appro…

---

## [Julia - IDE](https://discourse.julialang.org/t/julia-ide/9555)

<div class="topic-metadata">

**Author:** [@Samudra](https://discourse.julialang.org/u/Samudra)\
**Replies:** 3\
**Last updated:** [March 7, 2018, 11:58am UTC](https://discourse.julialang.org/t/julia-ide/9555 "2018-03-07T11:58:25Z")

</div>

Hi, I am looking for a IDE for Julia, I tried atom. any other recommended IDE? thanks,

---

## [Selling prediction ? Is any package for this?](https://discourse.julialang.org/t/selling-prediction-is-any-package-for-this/9530)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 4\
**Last updated:** [March 7, 2018, 9:56am UTC](https://discourse.julialang.org/t/selling-prediction-is-any-package-for-this/9530 "2018-03-07T09:56:34Z")

</div>

Selling prediction ? Is any package for this ? Paul

---

## [Slider Positioning in Interact.jl](https://discourse.julialang.org/t/slider-positioning-in-interact-jl/5001)

<div class="topic-metadata">

**Author:** [@rand5](https://discourse.julialang.org/u/rand5)\
**Replies:** 4\
**Last updated:** [March 6, 2018, 9:08am UTC](https://discourse.julialang.org/t/slider-positioning-in-interact-jl/5001 "2018-03-06T09:08:12Z")

</div>

I am using Interact.jl to modify an image which is then displayed using Plots.jl. Multiple slider bars are required to do the manipulation. My question is, is there a way to arrange the slider bars in a jupyter cell to a…

---

## [Interpolate inner quote](https://discourse.julialang.org/t/interpolate-inner-quote/9563)

<div class="topic-metadata">

**Author:** [@Yaroslav\_Kavenchuk](https://discourse.julialang.org/u/Yaroslav_Kavenchuk)\
**Replies:** 0\
**Last updated:** [March 7, 2018, 8:39am UTC](https://discourse.julialang.org/t/interpolate-inner-quote/9563 "2018-03-07T08:39:13Z")

</div>

Code module Mod1 export @Mac1 macro Mac1(name::Symbol, moreslots::Integer=0) quote struct $name filed1::UInt8 field2::UInt16 $(moreslots \> 0 ? quote field3::UInt32 $name() = new(0,0,0) end…

---

## [Referencing a module on RHS of expression while Metaprogramming](https://discourse.julialang.org/t/referencing-a-module-on-rhs-of-expression-while-metaprogramming/9558)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 2\
**Last updated:** [March 7, 2018, 4:13am UTC](https://discourse.julialang.org/t/referencing-a-module-on-rhs-of-expression-while-metaprogramming/9558 "2018-03-07T04:13:43Z")

</div>

Hi all, So using meta-programming, I can define a new function customsum in a slightly round-about way using interpolation as follows: fn = :sum @eval $(Symbol("custom$(fn)"))(x::Vector{\<:Number}) = Base.sum(x) But no…

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

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