# General Usage

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

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

**Page:** 1075

---

## [How to use a package without all its exports?](https://discourse.julialang.org/t/how-to-use-a-package-without-all-its-exports/802)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 2\
**Last updated:** [December 8, 2016, 4:08am UTC](https://discourse.julialang.org/t/how-to-use-a-package-without-all-its-exports/802 "2016-12-08T04:08:10Z")

</div>

Is there any way to do using Foo and have all the exports only accessed via Foo.bar? I am having an issue with two packages defining the same name. When I use both I get a warning about the ambiguity.

---

## [Performance regression](https://discourse.julialang.org/t/performance-regression/787)

<div class="topic-metadata">

**Author:** [@ccc1685](https://discourse.julialang.org/u/ccc1685)\
**Replies:** 3\
**Last updated:** [December 8, 2016, 3:57am UTC](https://discourse.julialang.org/t/performance-regression/787 "2016-12-08T03:57:56Z")

</div>

Hi, I’m new to this so please forgive me if I am violating protocols. I would also like to report a performance regression from 0.4.5 to 0.5.0. I have looked from the discussion forums and I think my problem is related …

---

## [Inconsistent llvm code](https://discourse.julialang.org/t/inconsistent-llvm-code/794)

<div class="topic-metadata">

**Author:** [@augustinyiptong](https://discourse.julialang.org/u/augustinyiptong)\
**Replies:** 6\
**Last updated:** [December 8, 2016, 2:17am UTC](https://discourse.julialang.org/t/inconsistent-llvm-code/794 "2016-12-08T02:17:01Z")

</div>

Hi, i am using julia 0.5.0 If i do: import Distributions @code\_llvm Distributions.quantile(Distributions.Normal(), 0.5) I get: ; Function Attrs: uwtable define double @julia\_quantile\_71921(%Normal\*, double) #0 { top:…

---

## [Raspberry Pi libstdc++ version conflict](https://discourse.julialang.org/t/raspberry-pi-libstdc-version-conflict/791)

<div class="topic-metadata">

**Author:** [@barche](https://discourse.julialang.org/u/barche)\
**Replies:** 3\
**Last updated:** [December 7, 2016, 9:31pm UTC](https://discourse.julialang.org/t/raspberry-pi-libstdc-version-conflict/791 "2016-12-07T21:31:49Z")

</div>

Hi, I wanted to test QML.jl on the Raspberry Pi, but the compiled library fails to load with the following error: ERROR: could not load library "/home/pi/.julia/v0.5/QML/deps/usr/lib/libqmlwrap.so" /home/pi/julia/julia…

---

## [Installing dependencies error: sudo: no tty present and no askpass program specified](https://discourse.julialang.org/t/installing-dependencies-error-sudo-no-tty-present-and-no-askpass-program-specified/778)

<div class="topic-metadata">

**Author:** [@abelsiqueira](https://discourse.julialang.org/u/abelsiqueira)\
**Replies:** 1\
**Last updated:** [December 7, 2016, 3:02pm UTC](https://discourse.julialang.org/t/installing-dependencies-error-sudo-no-tty-present-and-no-askpass-program-specified/778 "2016-12-07T15:02:20Z")

</div>

tl;dr: I can’t call sudo in deps/build.jl. Can’t use BinDeps. This issue (BinDeps.jl#199) is related. What are the directives on installing dependencies? Long version: I’m trying to install the dependencies of my packag…

---

## [Mpirun and julia](https://discourse.julialang.org/t/mpirun-and-julia/760)

<div class="topic-metadata">

**Author:** [@Dmitry](https://discourse.julialang.org/u/Dmitry)\
**Replies:** 3\
**Last updated:** [December 7, 2016, 1:51pm UTC](https://discourse.julialang.org/t/mpirun-and-julia/760 "2016-12-07T13:51:16Z")

</div>

Hi All, I try to start julia v 0.5.1-pre on a compute node with two 12-cores Haswells and 128 GB shared memory. OS is Scientific Linux release 6.8. Th julia is compiled with gnu/5.3.0. If I start julia on more than 15…

---

## [Cholmod In-place Solvers](https://discourse.julialang.org/t/cholmod-in-place-solvers/740)

<div class="topic-metadata">

**Author:** [@cortner](https://discourse.julialang.org/u/cortner)\
**Replies:** 4\
**Last updated:** [December 7, 2016, 10:29am UTC](https://discourse.julialang.org/t/cholmod-in-place-solvers/740 "2016-12-07T10:29:38Z")

</div>

I noticed that Base.SparseArrays.CHOLMOD define (\\), A\_mul\_Bc, A\_mul\_Bt, Ac\_ldiv\_B, Ac\_mul\_B, At\_ldiv\_B, At\_mul\_B but none of the in-place variants. Does the CHOLMOD package not support in-place? It would be nice to h…

---

## [Help with 0.5 slowdown](https://discourse.julialang.org/t/help-with-0-5-slowdown/717)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 25\
**Last updated:** [December 7, 2016, 4:50am UTC](https://discourse.julialang.org/t/help-with-0-5-slowdown/717 "2016-12-07T04:50:15Z")

</div>

I upgraded my code (~5000 lines) from 0.4.6 to to 0.5.0, and it has slowed down by a factor of \>60. You can see below from the output of @time that at least one issue is a substantial increase in memory allocation. I h…

---

## [Pulling a specific merge from github](https://discourse.julialang.org/t/pulling-a-specific-merge-from-github/768)

<div class="topic-metadata">

**Author:** [@CorbinFoucart](https://discourse.julialang.org/u/CorbinFoucart)\
**Replies:** 2\
**Last updated:** [December 6, 2016, 8:50pm UTC](https://discourse.julialang.org/t/pulling-a-specific-merge-from-github/768 "2016-12-06T20:50:13Z")

</div>

I would like to pull the merge to fix a seg-fault I am experiencing with PyJulia, but I am not sure how to do this, since it is Julia/julia, not the pyJulia repository. I do not have sudo access on the cluster which I…

---

## [Metaprogramming: create function for different ops, +, -, \* etc](https://discourse.julialang.org/t/metaprogramming-create-function-for-different-ops-etc/762)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 5\
**Last updated:** [December 6, 2016, 3:22pm UTC](https://discourse.julialang.org/t/metaprogramming-create-function-for-different-ops-etc/762 "2016-12-06T15:22:20Z")

</div>

I would like to understand how to generate functions programmatically. basically how to do this (nevermind if this example is sensible): function -(d1::DataFrame,d2::DataFrame) if !(nrow(d1)==nrow(d2)) erro…

---

## [Julia counterparts to slice and contourslice in Matlab](https://discourse.julialang.org/t/julia-counterparts-to-slice-and-contourslice-in-matlab/686)

<div class="topic-metadata">

**Author:** [@i2000s](https://discourse.julialang.org/u/i2000s)\
**Replies:** 7\
**Last updated:** [December 6, 2016, 2:13pm UTC](https://discourse.julialang.org/t/julia-counterparts-to-slice-and-contourslice-in-matlab/686 "2016-12-06T14:13:31Z")

</div>

For making plots like this: , I think slice and contourslice functions in Matlab/Octave are very helpful. But are there equivalent functions in Julia to do this kind of plots? I know PyPlot or Matplotlib is not very go…

---

## [Concatenating two collections into a new one](https://discourse.julialang.org/t/concatenating-two-collections-into-a-new-one/742)

<div class="topic-metadata">

**Author:** [@Jan\_Dolinsky](https://discourse.julialang.org/u/Jan_Dolinsky)\
**Replies:** 9\
**Last updated:** [December 6, 2016, 12:57pm UTC](https://discourse.julialang.org/t/concatenating-two-collections-into-a-new-one/742 "2016-12-06T12:57:32Z")

</div>

Hi, I am trying to concatenate two collections of which each element is an object of a custom type resulting in a new collection. Is there any function which will do this for me ? E.g. I found union(c1, c2) which roughl…

---

## [Cfunction result garbage collected?](https://discourse.julialang.org/t/cfunction-result-garbage-collected/747)

<div class="topic-metadata">

**Author:** [@barche](https://discourse.julialang.org/u/barche)\
**Replies:** 1\
**Last updated:** [December 5, 2016, 9:22pm UTC](https://discourse.julialang.org/t/cfunction-result-garbage-collected/747 "2016-12-05T21:22:04Z")

</div>

Hi, Is there a risk that the data pointed to by the pointer returned from cfunction will be garbage collected, or can it be stored on the C side without precautions?

---

## [Call Generic Function From Specialization](https://discourse.julialang.org/t/call-generic-function-from-specialization/730)

<div class="topic-metadata">

**Author:** [@friedmud](https://discourse.julialang.org/u/friedmud)\
**Replies:** 3\
**Last updated:** [December 5, 2016, 7:14pm UTC](https://discourse.julialang.org/t/call-generic-function-from-specialization/730 "2016-12-05T19:14:26Z")

</div>

Having a tough time calling a more “generic” form a function from one that is specialized (i.e call a function for a “base” type from a version of the function for a subtype). Consider this: abstract foo type bar \<: f…

---

## [Pass a Julia string to Python as an iterable](https://discourse.julialang.org/t/pass-a-julia-string-to-python-as-an-iterable/724)

<div class="topic-metadata">

**Author:** [@samuelpowell](https://discourse.julialang.org/u/samuelpowell)\
**Replies:** 9\
**Last updated:** [December 5, 2016, 5:25pm UTC](https://discourse.julialang.org/t/pass-a-julia-string-to-python-as-an-iterable/724 "2016-12-05T17:25:54Z")

</div>

Is it possible to pass a Julia String (or alternatively a Vector{UInt8} or IOBuffer wrapping the same) to Python as an iterable object? I have attempted to pass the data directly, and also as part of a Julia generator (…

---

## [Question about scoping inside a function](https://discourse.julialang.org/t/question-about-scoping-inside-a-function/709)

<div class="topic-metadata">

**Author:** [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Replies:** 19\
**Last updated:** [December 5, 2016, 3:15pm UTC](https://discourse.julialang.org/t/question-about-scoping-inside-a-function/709 "2016-12-05T15:15:43Z")

</div>

Below are two functions that are slightly different in the names of the functions defined in them: function f() h(x) = x b(x) = x q(x::Vector{Float32}) = foo(h, b) end function g() h(x) = x b(x) = x…

---

## [Spawn process in new window](https://discourse.julialang.org/t/spawn-process-in-new-window/727)

<div class="topic-metadata">

**Author:** [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Replies:** 1\
**Last updated:** [December 5, 2016, 2:47pm UTC](https://discourse.julialang.org/t/spawn-process-in-new-window/727 "2016-12-05T14:47:16Z")

</div>

I’m trying to launch a new process and have it run in a new window. The process I’m trying to spawn is a console application, and I want a new console window to open, in which that process runs. Ideally the new process w…

---

## [Unexpected Allocations in Julia 0.5](https://discourse.julialang.org/t/unexpected-allocations-in-julia-0-5/723)

<div class="topic-metadata">

**Author:** [@michakraus](https://discourse.julialang.org/u/michakraus)\
**Replies:** 4\
**Last updated:** [December 5, 2016, 2:28am UTC](https://discourse.julialang.org/t/unexpected-allocations-in-julia-0-5/723 "2016-12-05T02:28:41Z")

</div>

I am working on an ODE/DAE solver in Julia (GitHub - JuliaGNI/GeometricIntegrators.jl: Geometric Numerical Integration in Julia), where I encountered a problem with unexpected allocations when calling a function which is…

---

## [How to set DataType within function factory](https://discourse.julialang.org/t/how-to-set-datatype-within-function-factory/668)

<div class="topic-metadata">

**Author:** [@pearcemc](https://discourse.julialang.org/u/pearcemc)\
**Replies:** 10\
**Last updated:** [December 4, 2016, 9:37pm UTC](https://discourse.julialang.org/t/how-to-set-datatype-within-function-factory/668 "2016-12-04T21:37:15Z")

</div>

Hello, I am trying to think about type stability in a function that accepts models from different modules. I thought I might be able to set the DataType accepted by functions produced by a factory dynamically, but it’s n…

---

## [Lazy map/broadcast/filter etc](https://discourse.julialang.org/t/lazy-map-broadcast-filter-etc/719)

<div class="topic-metadata">

**Author:** [@bramtayl](https://discourse.julialang.org/u/bramtayl)\
**Replies:** 0\
**Last updated:** [December 4, 2016, 7:26am UTC](https://discourse.julialang.org/t/lazy-map-broadcast-filter-etc/719 "2016-12-04T07:26:16Z")

</div>

Hi. This is a stupid question but I’m exploring options for a lazy version of broadcast, filter, etc in ChainMap.jl . So for example I have: I = \[1, 2\] J = \[3, 4\] @chain begin @over ~I + ~J @over \_ \> 5 filter en…

---

## [Tk.jl example on OS X](https://discourse.julialang.org/t/tk-jl-example-on-os-x/619)

<div class="topic-metadata">

**Author:** [@PieterjanRobbe](https://discourse.julialang.org/u/PieterjanRobbe)\
**Replies:** 16\
**Last updated:** [December 4, 2016, 9:58am UTC](https://discourse.julialang.org/t/tk-jl-example-on-os-x/619 "2016-12-04T09:58:47Z")

</div>

I’m trying the sketch.jl example from the Tk.jl package: On OS X this gives a drawing canvas that is only updated when I switch windows, i.e., force the drawing to be updated. When I add an explicit Tk.update() after li…

---

## [Nullable vs Union](https://discourse.julialang.org/t/nullable-vs-union/589)

<div class="topic-metadata">

**Author:** [@pint](https://discourse.julialang.org/u/pint)\
**Replies:** 16\
**Last updated:** [December 3, 2016, 9:16pm UTC](https://discourse.julialang.org/t/nullable-vs-union/589 "2016-12-03T21:16:18Z")

</div>

julia has a dedicated type Nullable. however, the language naturally supports types like Union{Void, Int}, where Int could be any type. what is the benefit of having Nullable?

---

## [Strict typing and restricting types in a method's signature](https://discourse.julialang.org/t/strict-typing-and-restricting-types-in-a-methods-signature/645)

<div class="topic-metadata">

**Author:** [@akis](https://discourse.julialang.org/u/akis)\
**Replies:** 25\
**Last updated:** [December 3, 2016, 6:25pm UTC](https://discourse.julialang.org/t/strict-typing-and-restricting-types-in-a-methods-signature/645 "2016-12-03T18:25:06Z")

</div>

Note: The interesting part begins at post #9. Solution in post #23. . . . That is very ill-advised. That is not an advice to the user (it would defeat the usage of {T} in question), but the result of the compiler…

---

## [What is the current best practice for population formula for cov?](https://discourse.julialang.org/t/what-is-the-current-best-practice-for-population-formula-for-cov/658)

<div class="topic-metadata">

**Author:** [@gabrielgellner](https://discourse.julialang.org/u/gabrielgellner)\
**Replies:** 5\
**Last updated:** [December 3, 2016, 2:44pm UTC](https://discourse.julialang.org/t/what-is-the-current-best-practice-for-population-formula-for-cov/658 "2016-12-03T14:44:38Z")

</div>

Going back to some old code that uses cov(mat, corrected=false), and am welcomed with a massive block of warnings to use covm instead … looking at masters source it seems that corrected is no longer a keyword, but a posi…

---

## [Julia call from Python3 running in single core](https://discourse.julialang.org/t/julia-call-from-python3-running-in-single-core/508)

<div class="topic-metadata">

**Author:** [@Harish\_Kumar](https://discourse.julialang.org/u/Harish_Kumar)\
**Replies:** 34\
**Last updated:** [December 2, 2016, 10:33pm UTC](https://discourse.julialang.org/t/julia-call-from-python3-running-in-single-core/508 "2016-12-02T22:33:05Z")

</div>

Hi all, I am calling julia from python3 through pyjulia interface for mixed model. i have 2.8 M records and it is taking 2-3 hours to complete the model. Which is little expensive. So i took the dataset and loaded dire…

---

## [Can i have SharedArrays on several different machines? Hybrid parallel model](https://discourse.julialang.org/t/can-i-have-sharedarrays-on-several-different-machines-hybrid-parallel-model/680)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 3\
**Last updated:** [December 2, 2016, 5:20pm UTC](https://discourse.julialang.org/t/can-i-have-sharedarrays-on-several-different-machines-hybrid-parallel-model/680 "2016-12-02T17:20:25Z")

</div>

Suppose I have the following problem: I need to call a function f many times in an estimation procedure. computing f is very expensive. I usually use 6 workers to compute this in parallel and it takes about 2 minutes. …

---

## [Generic n-dimensional loop without allocations](https://discourse.julialang.org/t/generic-n-dimensional-loop-without-allocations/674)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 15\
**Last updated:** [December 2, 2016, 5:12pm UTC](https://discourse.julialang.org/t/generic-n-dimensional-loop-without-allocations/674 "2016-12-02T17:12:02Z")

</div>

I’m working on some code that should iterate over milti-dimensional space, where the dimension dim is provided as a parameter to the function. The simplest approach I found is to use CartesianRange, like in the following…

---

## [Anonymous functions weird behaviour with Array{Arrays}](https://discourse.julialang.org/t/anonymous-functions-weird-behaviour-with-array-arrays/652)

<div class="topic-metadata">

**Author:** [@nantonel](https://discourse.julialang.org/u/nantonel)\
**Replies:** 8\
**Last updated:** [December 2, 2016, 4:16pm UTC](https://discourse.julialang.org/t/anonymous-functions-weird-behaviour-with-array-arrays/652 "2016-12-02T16:16:28Z")

</div>

I waned to ask you about a weird thing that happens to me when I use anonymous functions with Array{Array}: L = x -\> \[x\[1:4\],reshape(x\[5:8\],2,2)\] #my anonymous functions generates an Array{Array{Float64,N},1} L(randn(8)…

---

## [Pkg.add("QuantileRegression") failed](https://discourse.julialang.org/t/pkg-add-quantileregression-failed/697)

<div class="topic-metadata">

**Author:** [@Hongwei](https://discourse.julialang.org/u/Hongwei)\
**Replies:** 1\
**Last updated:** [December 2, 2016, 4:03pm UTC](https://discourse.julialang.org/t/pkg-add-quantileregression-failed/697 "2016-12-02T16:03:22Z")

</div>

Hi all, This might be a really silly question… I have met an error in install Quantile regression packages https://github.com/vincentarelbundock/QuantileRegression.jl julia\> Pkg.update() INFO: Updating METADATA... INF…

---

## [Build error Pkg.add("CoinOptServices")](https://discourse.julialang.org/t/build-error-pkg-add-coinoptservices/667)

<div class="topic-metadata">

**Author:** [@Matteo\_Cacciola](https://discourse.julialang.org/u/Matteo_Cacciola)\
**Replies:** 2\
**Last updated:** [December 2, 2016, 2:03pm UTC](https://discourse.julialang.org/t/build-error-pkg-add-coinoptservices/667 "2016-12-02T14:03:45Z")

</div>

Hi, i’m a studet of mathmatich from Pisa, i’m using Julia and JuMP for my thesis, i have this error when i try to install ConOptServices on Julia with the funtion Pkg.add(“CoinOptServices”): ============================…

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

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