# General Usage

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

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

**Page:** 959

---

## [Precompile for 0.6 without deprecation warning](https://discourse.julialang.org/t/precompile-for-0-6-without-deprecation-warning/12903)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 3\
**Last updated:** [August 4, 2018, 11:11pm UTC](https://discourse.julialang.org/t/precompile-for-0-6-without-deprecation-warning/12903 "2018-08-04T23:11:57Z")

</div>

Currently there is a deprecation warning thrown for \_\_precompile\_\_(true) functions at the start of packages. This warning makes it difficult to have packages that are compatible with both v0.6 and v0.7 that do not throw…

---

## [Real and complex coupled types as parametric types](https://discourse.julialang.org/t/real-and-complex-coupled-types-as-parametric-types/12739)

<div class="topic-metadata">

**Author:** [@jarl](https://discourse.julialang.org/u/jarl)\
**Replies:** 12\
**Last updated:** [August 4, 2018, 10:32pm UTC](https://discourse.julialang.org/t/real-and-complex-coupled-types-as-parametric-types/12739 "2018-08-04T22:32:19Z")

</div>

I want a function that takes two parameters, one (potentially) complex and one real parameter. They should have the same precision / underlying format. I tried the following but get an error I do not understand: julia\> …

---

## [Views performance in Julia 1.0-DEV?](https://discourse.julialang.org/t/views-performance-in-julia-1-0-dev/12871)

<div class="topic-metadata">

**Author:** [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Replies:** 1\
**Last updated:** [August 4, 2018, 10:15pm UTC](https://discourse.julialang.org/t/views-performance-in-julia-1-0-dev/12871 "2018-08-04T22:15:11Z")

</div>

The following function runs 1.5x slower in Julia latest 1.0-DEV, compared to Julia 0.6. The memory allocation is the same but @code\_llvm shows very mysterious code in 1.0-DEV. Any idea what is going on? using BenchmarkT…

---

## [Proliferation of matrix and vector types -- standard library going off the rails?](https://discourse.julialang.org/t/proliferation-of-matrix-and-vector-types-standard-library-going-off-the-rails/12899)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 2\
**Last updated:** [August 4, 2018, 9:10pm UTC](https://discourse.julialang.org/t/proliferation-of-matrix-and-vector-types-standard-library-going-off-the-rails/12899 "2018-08-04T21:10:06Z")

</div>

I spent most of the morning chasing down a performance regression in my code; it turns out that the following statement y = spzeros(50000,50000)' \* reshape(zeros(2,25000)',50000) requires 16 seconds in 0.7.0-beta2 vers…

---

## [Fatal error in type inference (type bound) in 0.7 RC2](https://discourse.julialang.org/t/fatal-error-in-type-inference-type-bound-in-0-7-rc2/12887)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 1\
**Last updated:** [August 4, 2018, 3:21pm UTC](https://discourse.julialang.org/t/fatal-error-in-type-inference-type-bound-in-0-7-rc2/12887 "2018-08-04T15:21:04Z")

</div>

I am getting the error below since RC2. The code ran fine in 0.7beta if I recall correctly. Any ideas why this happens? It seems related to a type union of sseSplit and mseSplit. here is an MWE DecisionTrees.jl/mwe\_f…

---

## [Updating packages from Julia v0.6 to 0.7](https://discourse.julialang.org/t/updating-packages-from-julia-v0-6-to-0-7/5103)

<div class="topic-metadata">

**Author:** [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Replies:** 10\
**Last updated:** [August 4, 2018, 1:48pm UTC](https://discourse.julialang.org/t/updating-packages-from-julia-v0-6-to-0-7/5103 "2018-08-04T13:48:07Z")

</div>

I’m wondering how to approach the job of moving a package from supporting Julia v0.6 to v0.7. My current thinking is like this: 1 - make a release for Julia v0.6 (:heavy\_check\_mark:) 2 - create a git branch v07changes …

---

## [Splatting symbols from tuple into expression](https://discourse.julialang.org/t/splatting-symbols-from-tuple-into-expression/12888)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 1\
**Last updated:** [August 4, 2018, 10:20am UTC](https://discourse.julialang.org/t/splatting-symbols-from-tuple-into-expression/12888 "2018-08-04T10:20:22Z")

</div>

I’m trying to construct a macro that outputs a for-loop like this one for (i,val) in \[(i,2i) for i = 1:4\] println(i, " ", val) end but where the tuple (i,val) is available inside the macro as a tuple of symbols tha…

---

## [Image transformation](https://discourse.julialang.org/t/image-transformation/12889)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 0\
**Last updated:** [August 4, 2018, 10:19am UTC](https://discourse.julialang.org/t/image-transformation/12889 "2018-08-04T10:19:52Z")

</div>

Hi Guys! I have a small doubt. I am reading this blogpost. In tfm = Translation(125,250) ∘ LinearMap(RotMatrix(pi/6)) ∘ Translation(-125,-250) I am confused if the translation by 125,250 is being carried out first or…

---

## [Appveyor magic changed?](https://discourse.julialang.org/t/appveyor-magic-changed/12883)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 1\
**Last updated:** [August 4, 2018, 8:18am UTC](https://discourse.julialang.org/t/appveyor-magic-changed/12883 "2018-08-04T08:18:10Z")

</div>

I get the following error when testing on Appveyor: C:\\projects\\julia\\bin\\julia -e "import Pkg; Pkg.develop(\\"https://github.com/PetrKryslUCSD/FinEtools.jl.git\\"); Pkg.test(\\"FinEtools\\")" ERROR: https://github.com/Petr…

---

## [Q factor changes size(?) in qr() in 0.7.0-beta2](https://discourse.julialang.org/t/q-factor-changes-size-in-qr-in-0-7-0-beta2/12875)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 2\
**Last updated:** [August 4, 2018, 6:01am UTC](https://discourse.julialang.org/t/q-factor-changes-size-in-qr-in-0-7-0-beta2/12875 "2018-08-04T06:01:40Z")

</div>

In the following example from 0.7.0beta2, the Q factor appears to be 3-by-3, but then somehow it becomes 3-by-2 when I copy it out. Can anyone explain this behavior? It does not seem to be documented. EDIT: I forgot t…

---

## [TimeSeries findwhen function hangs with v0.7-rc2](https://discourse.julialang.org/t/timeseries-findwhen-function-hangs-with-v0-7-rc2/12879)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 0\
**Last updated:** [August 4, 2018, 4:36am UTC](https://discourse.julialang.org/t/timeseries-findwhen-function-hangs-with-v0-7-rc2/12879 "2018-08-04T04:36:04Z")

</div>

Maybe a Julia v0.7 bug…? julia\> dates = collect(Date(1999,1,1):Date(2000,12,31)); julia\> mytime = TimeArray(dates, rand(length(dates),2)) 731x2 TimeArray{Float64,2,Date,Array{Float64,2}} 1999-01-01 to 2000-12-31 │ …

---

## [Descriptors](https://discourse.julialang.org/t/descriptors/12878)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 0\
**Last updated:** [August 4, 2018, 4:13am UTC](https://discourse.julialang.org/t/descriptors/12878 "2018-08-04T04:13:37Z")

</div>

Hi Guys! I am writing some code for matching descriptors using BRIEF. My code till now: grid = Gray.(hcat(imgColorG, imgGray)) offset = CartesianIndex(0, size(imgColorG, 2)) map(m -\> draw!(grid, LineSegment(m\[1\], m\[2\]…

---

## [Sparse transpose](https://discourse.julialang.org/t/sparse-transpose/12869)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 8\
**Last updated:** [August 3, 2018, 10:49pm UTC](https://discourse.julialang.org/t/sparse-transpose/12869 "2018-08-03T22:49:29Z")

</div>

In regard to 0.7.0-beta2, the transpose of a SparseMatrixCSC is no longer a SparseMatrixCSC; instead it is some other object. How do I convert it to SparseMatrixCSC? Below are a couple of obvious things I tried. Both …

---

## [Efficiency of converting from Array{Float64} to Array{Float32}](https://discourse.julialang.org/t/efficiency-of-converting-from-array-float64-to-array-float32/12867)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 4\
**Last updated:** [August 3, 2018, 8:28pm UTC](https://discourse.julialang.org/t/efficiency-of-converting-from-array-float64-to-array-float32/12867 "2018-08-03T20:28:57Z")

</div>

I’m writing some numeric code that interfaces with a C library, and there are some type conversions that I have to do in order for the interface to work right. Profiling this code yielded a result that was surprising (to…

---

## [Best way to append vectors of various types](https://discourse.julialang.org/t/best-way-to-append-vectors-of-various-types/12837)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 9\
**Last updated:** [August 3, 2018, 6:18pm UTC](https://discourse.julialang.org/t/best-way-to-append-vectors-of-various-types/12837 "2018-08-03T18:18:56Z")

</div>

lets say you have a list (in vector form, or a set or something) of N vectors and you want to concatenate all of them. However the vectors might have various lengths and types. An efficient way to do this would be to f…

---

## [LoadError in Macro on 0.7](https://discourse.julialang.org/t/loaderror-in-macro-on-0-7/12862)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 2\
**Last updated:** [August 3, 2018, 5:53pm UTC](https://discourse.julialang.org/t/loaderror-in-macro-on-0-7/12862 "2018-08-03T17:53:40Z")

</div>

I posted this to slack recently but didn’t find a solution. I’m trying to upgrade someone else’s package to 0.7, and I’m getting an error from a macro when I run tests. The issue is, I don’t really know how macros work, …

---

## [Julia is unable to load CSV files from the Kaggle competition](https://discourse.julialang.org/t/julia-is-unable-to-load-csv-files-from-the-kaggle-competition/12830)

<div class="topic-metadata">

**Author:** [@Altaf\_Sultanji](https://discourse.julialang.org/u/Altaf_Sultanji)\
**Replies:** 6\
**Last updated:** [August 3, 2018, 3:47pm UTC](https://discourse.julialang.org/t/julia-is-unable-to-load-csv-files-from-the-kaggle-competition/12830 "2018-08-03T15:47:17Z")

</div>

I am using Julia (v0.6.4) to load csv files. These files can be found at this link: Julia is unable to load them (train.csv and test.csv). I tried to use the CSV package with method CSV.read. While in Python using pan…

---

## [How to output data to a file without changing lines](https://discourse.julialang.org/t/how-to-output-data-to-a-file-without-changing-lines/12858)

<div class="topic-metadata">

**Author:** [@chdlkl](https://discourse.julialang.org/u/chdlkl)\
**Replies:** 2\
**Last updated:** [August 3, 2018, 1:27pm UTC](https://discourse.julialang.org/t/how-to-output-data-to-a-file-without-changing-lines/12858 "2018-08-03T13:27:35Z")

</div>

f = open( “test.txt”, “a” ) writecsv( f, (100,200) ) end

---

## [Homebrew/pango build failure](https://discourse.julialang.org/t/homebrew-pango-build-failure/12840)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 1\
**Last updated:** [August 3, 2018, 11:44am UTC](https://discourse.julialang.org/t/homebrew-pango-build-failure/12840 "2018-08-03T11:44:44Z")

</div>

I’m trying to install Queryverse on my Mac but it failed in the build step for pango in Homebrew. Same problem exists in both v0.6.3 and the latest v0.7-rc2 nightly build. Any idea how I can fix this? Thanks Build lo…

---

## [How are people working around the current PlotlyJS.jl outage?](https://discourse.julialang.org/t/how-are-people-working-around-the-current-plotlyjs-jl-outage/12835)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 1\
**Last updated:** [August 3, 2018, 6:50am UTC](https://discourse.julialang.org/t/how-are-people-working-around-the-current-plotlyjs-jl-outage/12835 "2018-08-03T06:50:07Z")

</div>

Kind of oddly specific, but how are people working around the current PlotlyJS outage? Failure to Precompile: JSString not defined · Issue #198 · JuliaPlots/PlotlyJS.jl · GitHub It seems like pinning to just an old ve…

---

## [Strange influence of the package load order on the timing on 0.7rc2](https://discourse.julialang.org/t/strange-influence-of-the-package-load-order-on-the-timing-on-0-7rc2/12847)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 0\
**Last updated:** [August 3, 2018, 5:24am UTC](https://discourse.julialang.org/t/strange-influence-of-the-package-load-order-on-the-timing-on-0-7rc2/12847 "2018-08-03T05:24:48Z")

</div>

Strange behaviour: | | |\_| | | | (\_| | | Version 0.7.0-rc2.0 (2018-08-02 19:14 UTC) \_/ |\\\_\_'\_|\_|\_|\\\_\_'\_| | |\_\_/ | x86\_64-linux-gnu julia\> @time using CSV 0.827353 seconds (2.88 M allocation…

---

## [Setting up Julia on Ubuntu?](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 11\
**Last updated:** [August 3, 2018, 2:58am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811 "2018-08-03T02:58:07Z")

</div>

I’m trying to put julia v0.6.4 on my Ubuntu server. But I hardly ever use Ubuntu these days. The downloaded binary runs but wont precompile any packages, so I guess I’m missing some deps. Does someone have a simple up-…

---

## [Why do these two functions benchmark the same?](https://discourse.julialang.org/t/why-do-these-two-functions-benchmark-the-same/12831)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 2\
**Last updated:** [August 3, 2018, 2:58am UTC](https://discourse.julialang.org/t/why-do-these-two-functions-benchmark-the-same/12831 "2018-08-03T02:58:01Z")

</div>

I’m running some string comparisons using StringDistances and have written some simple convenience functions that are loosely resembling the extract function in the Python fuzzywuzzy package. Essentially they compare a s…

---

## [Embedding Julia in MATLAB mex: memory leaks ](https://discourse.julialang.org/t/embedding-julia-in-matlab-mex-memory-leaks/12842)

<div class="topic-metadata">

**Author:** [@nicrummel](https://discourse.julialang.org/u/nicrummel)\
**Replies:** 0\
**Last updated:** [August 3, 2018, 1:10am UTC](https://discourse.julialang.org/t/embedding-julia-in-matlab-mex-memory-leaks/12842 "2018-08-03T01:10:42Z")

</div>

I am writing some simple MATLAB mex interfaces that allow me to pass large amounts of data between Julia and MATLAB the two with as little copying as possible. I was hoping to gain some insight into how to debug code tha…

---

## [Conflicting requirements on 0.6](https://discourse.julialang.org/t/conflicting-requirements-on-0-6/12828)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 1\
**Last updated:** [August 2, 2018, 5:05pm UTC](https://discourse.julialang.org/t/conflicting-requirements-on-0-6/12828 "2018-08-02T17:05:01Z")

</div>

I’m trying to create a reproducible environment. On 0.6. So I load my (private) package, then generate a REQUIRE file for all currently loaded packages, that looks like: cat ~/.julia/v0.6/REQUIRE HTTP 0.6.9 0.6.9+ Feath…

---

## [How to append to arrays in a dictionary one by one?](https://discourse.julialang.org/t/how-to-append-to-arrays-in-a-dictionary-one-by-one/12818)

<div class="topic-metadata">

**Author:** [@wei](https://discourse.julialang.org/u/wei)\
**Replies:** 2\
**Last updated:** [August 2, 2018, 12:05pm UTC](https://discourse.julialang.org/t/how-to-append-to-arrays-in-a-dictionary-one-by-one/12818 "2018-08-02T12:05:31Z")

</div>

Hello, I would like to append to arrays in a dict different items for each entry. What I coded simplified is: entries = \[“A”,“B”,“C”\] entryvalues = fill(Float64,size(entries)) dict = Dict(zip(entries, entryvalues)) w…

---

## [Forgotten print in finalizer?](https://discourse.julialang.org/t/forgotten-print-in-finalizer/12821)

<div class="topic-metadata">

**Author:** [@Liso](https://discourse.julialang.org/u/Liso)\
**Replies:** 0\
**Last updated:** [August 2, 2018, 11:58am UTC](https://discourse.julialang.org/t/forgotten-print-in-finalizer/12821 "2018-08-02T11:58:23Z")

</div>

MWE: mutable struct O end; fnc() = (a = O();finalizer(x -\> error("uff! $x"), a);finalize(a)); # I want to suppress all error messages: for i in 1:2 try fnc() catch end end # Output is -\> # 0.7.0-rc1.15 -\> …

---

## [Upgrading to v0.7 Type Error in version\_data!](https://discourse.julialang.org/t/upgrading-to-v0-7-type-error-in-version-data/12816)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 1\
**Last updated:** [August 2, 2018, 11:54am UTC](https://discourse.julialang.org/t/upgrading-to-v0-7-type-error-in-version-data/12816 "2018-08-02T11:54:34Z")

</div>

I would like to update my Juniper package to v0.7 but get the following error atm on travis: The command "if \[\[ -a .git/shallow \]\]; then git fetch --unshallow; fi" exited with 0. 54.58s$ julia --check-bounds=yes -e 'Pkg…

---

## [Type instability if I map over array of functions](https://discourse.julialang.org/t/type-instability-if-i-map-over-array-of-functions/12817)

<div class="topic-metadata">

**Author:** [@zsoerenm](https://discourse.julialang.org/u/zsoerenm)\
**Replies:** 1\
**Last updated:** [August 2, 2018, 10:43am UTC](https://discourse.julialang.org/t/type-instability-if-i-map-over-array-of-functions/12817 "2018-08-02T10:43:54Z")

</div>

Hello, when I map over an array of functions, the ouput is type unstable. Minimal example: struct StructA val::Float64 end struct StructB val::Float64 end function init\_add(struct\_a::StructA) y -\> struct\_a…

---

## [Short-circuit assignment still calling function? // i.e. x |= slowfunc()](https://discourse.julialang.org/t/short-circuit-assignment-still-calling-function-i-e-x-slowfunc/12802)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 9\
**Last updated:** [August 2, 2018, 6:11am UTC](https://discourse.julialang.org/t/short-circuit-assignment-still-calling-function-i-e-x-slowfunc/12802 "2018-08-02T06:11:33Z")

</div>

Let’s say you have a slow function: function slowfunc() sleep(3) true end Why does the following code make 4 calls to it? a = slowfunc() a |= slowfunc() a |= slowfunc() a |= slowfunc()

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

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