# General Usage

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

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

**Page:** 958

---

## [V0.7.0-rc, "build" and startup.jl](https://discourse.julialang.org/t/v0-7-0-rc-build-and-startup-jl/13026)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 0\
**Last updated:** [August 8, 2018, 7:38am UTC](https://discourse.julialang.org/t/v0-7-0-rc-build-and-startup-jl/13026 "2018-08-08T07:38:15Z")

</div>

Since v.0.7.0-beta, build GR or build Arpack (and some more packages that I cannot recall) fails whenever my startup.jl contains using Statistics (you can swap that for any other package name, I think). Example of the re…

---

## [Compat.Statistics.mean conflicts with Base.mean in v0.6](https://discourse.julialang.org/t/compat-statistics-mean-conflicts-with-base-mean-in-v0-6/13024)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 0\
**Last updated:** [August 8, 2018, 6:32am UTC](https://discourse.julialang.org/t/compat-statistics-mean-conflicts-with-base-mean-in-v0-6/13024 "2018-08-08T06:32:38Z")

</div>

Is Compat package falling short of the expectation for making code work in both v0.6 and v0.7? Am I supposed to throw in another @static if block and import Statistics for v0.7? $ julia julia\> VERSION v"0.6.3" julia\> …

---

## [Have to add SOME packages by hand](https://discourse.julialang.org/t/have-to-add-some-packages-by-hand/13021)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 0\
**Last updated:** [August 8, 2018, 5:55am UTC](https://discourse.julialang.org/t/have-to-add-some-packages-by-hand/13021 "2018-08-08T05:55:53Z")

</div>

With 1.0 release candidate 1: I cleaned out all the Julia stuff so I started with a clean installation. When I want to run something from my own package, I always have to manually add Arpack and StatsBase at the beginnin…

---

## [Efficient finite difference operators](https://discourse.julialang.org/t/efficient-finite-difference-operators/12439)

<div class="topic-metadata">

**Author:** [@milankl](https://discourse.julialang.org/u/milankl)\
**Replies:** 19\
**Last updated:** [August 8, 2018, 4:17am UTC](https://discourse.julialang.org/t/efficient-finite-difference-operators/12439 "2018-08-08T04:17:50Z")

</div>

Hey there, I have a model that spends most time in functions like this function Gux!(dudx::Matrix{Numtype},u::Matrix{Numtype}) dudx\[1:end-1,:\] = u\[2:end,:\]-u\[1:end-1,:\] dudx\[end,:\] = u\[1,:\]-u\[end,:\]\` end tha…

---

## [PyCall: How can I make a python class with static attributes?](https://discourse.julialang.org/t/pycall-how-can-i-make-a-python-class-with-static-attributes/13007)

<div class="topic-metadata">

**Author:** [@galenlynch](https://discourse.julialang.org/u/galenlynch)\
**Replies:** 2\
**Last updated:** [August 8, 2018, 1:03am UTC](https://discourse.julialang.org/t/pycall-how-can-i-make-a-python-class-with-static-attributes/13007 "2018-08-08T01:03:34Z")

</div>

I want to be able to capture key-press events in a Julia powered PyQtGraph GUI using the amazing PyCall package, but have been unable to because I can’t make python classes with static attributes using the @pydef macro i…

---

## [Is garbage collection thread safe?](https://discourse.julialang.org/t/is-garbage-collection-thread-safe/13006)

<div class="topic-metadata">

**Author:** [@Juser](https://discourse.julialang.org/u/Juser)\
**Replies:** 1\
**Last updated:** [August 7, 2018, 10:20pm UTC](https://discourse.julialang.org/t/is-garbage-collection-thread-safe/13006 "2018-08-07T22:20:20Z")

</div>

Is it safe to use gc() within a Threads.@threads for loop?

---

## [Problems runnig atexit() function code properly - also under julia version 0.7.0-rc3/1.0.0-rc1 - OutOfMemoryError](https://discourse.julialang.org/t/problems-runnig-atexit-function-code-properly-also-under-julia-version-0-7-0-rc3-1-0-0-rc1-outofmemoryerror/12910)

<div class="topic-metadata">

**Author:** [@oniter](https://discourse.julialang.org/u/oniter)\
**Replies:** 3\
**Last updated:** [August 7, 2018, 9:13pm UTC](https://discourse.julialang.org/t/problems-runnig-atexit-function-code-properly-also-under-julia-version-0-7-0-rc3-1-0-0-rc1-outofmemoryerror/12910 "2018-08-07T21:13:34Z")

</div>

I cannot say where the evil comes from but when I like to use the atexit() function, which you can found here in the docs I got these three kinds of error messages: ErrorException(“schedule: Task not runnable”) …

---

## [How to install Plots](https://discourse.julialang.org/t/how-to-install-plots/12977)

<div class="topic-metadata">

**Author:** [@chdlkl](https://discourse.julialang.org/u/chdlkl)\
**Replies:** 3\
**Last updated:** [August 7, 2018, 5:52pm UTC](https://discourse.julialang.org/t/how-to-install-plots/12977 "2018-08-07T17:52:52Z")

</div>

\# I encountered the following problems when installing Plots. What should I do? ERROR: GitError(Code:ENOTFOUND, Class:Repository, Could not find repository from macro expansion at .\\libgit2\\error.jl:99 \[inlined\] Base.Lib…

---

## [Working with @cfunction (and parametric types)](https://discourse.julialang.org/t/working-with-cfunction-and-parametric-types/12915)

<div class="topic-metadata">

**Author:** [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Replies:** 4\
**Last updated:** [August 7, 2018, 4:11pm UTC](https://discourse.julialang.org/t/working-with-cfunction-and-parametric-types/12915 "2018-08-07T16:11:11Z")

</div>

To make a package v0.7 deprecation warning free, i recently moved the cfunction s into the @cfunction syntax and got caught on ERROR: LoadError: could not evaluate cfunction argument type (it might depend on a local var…

---

## [How to specify \`CSV.read\` column types?](https://discourse.julialang.org/t/how-to-specify-csv-read-column-types/12984)

<div class="topic-metadata">

**Author:** [@rickhg12hs](https://discourse.julialang.org/u/rickhg12hs)\
**Replies:** 4\
**Last updated:** [August 7, 2018, 1:47pm UTC](https://discourse.julialang.org/t/how-to-specify-csv-read-column-types/12984 "2018-08-07T13:47:49Z")

</div>

How should column types be specified for CSV.read? This is just some toy data, but I can’t seem to specify the types for it. using CSV iob = IOBuffer("9000,4,473,6473,\[1, 1, 0, 1\] 9001,4,326,6240,\[0, 0, 1, 1\] 9002,4,19…

---

## [Tests do not start after some minutes](https://discourse.julialang.org/t/tests-do-not-start-after-some-minutes/12503)

<div class="topic-metadata">

**Author:** [@wbhart](https://discourse.julialang.org/u/wbhart)\
**Replies:** 2\
**Last updated:** [August 7, 2018, 1:37pm UTC](https://discourse.julialang.org/t/tests-do-not-start-after-some-minutes/12503 "2018-08-07T13:37:34Z")

</div>

I’m trying to run the test suite for the AbstractAlgebra.jl package with 0.7-beta2, but after many minutes, the first test has not started to run. This is probably due to us doing something stupid that is hampering perf…

---

## [Fitting dose response curves](https://discourse.julialang.org/t/fitting-dose-response-curves/12856)

<div class="topic-metadata">

**Author:** [@Moses](https://discourse.julialang.org/u/Moses)\
**Replies:** 35\
**Last updated:** [August 7, 2018, 10:34am UTC](https://discourse.julialang.org/t/fitting-dose-response-curves/12856 "2018-08-07T10:34:29Z")

</div>

Dear community! I have been trying to find a package for fitting sigmoidal dose-response data for the last two days. However, I completely failed. I meanwhile found a way to solve the problem using the nonlinear fittin…

---

## [I am using the plot to encounter the following problems, what should I do?](https://discourse.julialang.org/t/i-am-using-the-plot-to-encounter-the-following-problems-what-should-i-do/12979)

<div class="topic-metadata">

**Author:** [@chdlkl](https://discourse.julialang.org/u/chdlkl)\
**Replies:** 0\
**Last updated:** [August 7, 2018, 9:29am UTC](https://discourse.julialang.org/t/i-am-using-the-plot-to-encounter-the-following-problems-what-should-i-do/12979 "2018-08-07T09:29:10Z")

</div>

I am using the plot to encounter the following problems, what should I do? the problems is fllowing: plot(x,y) ERROR: error compiling \_do\_plot\_show: error compiling \_display: could not load library "libGR.dll" The speci…

---

## [If I have the following data in txt, how can I read the number 100?](https://discourse.julialang.org/t/if-i-have-the-following-data-in-txt-how-can-i-read-the-number-100/12969)

<div class="topic-metadata">

**Author:** [@chdlkl](https://discourse.julialang.org/u/chdlkl)\
**Replies:** 2\
**Last updated:** [August 7, 2018, 7:37am UTC](https://discourse.julialang.org/t/if-i-have-the-following-data-in-txt-how-can-i-read-the-number-100/12969 "2018-08-07T07:37:09Z")

</div>

100 # the number 100

---

## [Size not supported for arrays with axes](https://discourse.julialang.org/t/size-not-supported-for-arrays-with-axes/12930)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 2\
**Last updated:** [August 7, 2018, 4:09am UTC](https://discourse.julialang.org/t/size-not-supported-for-arrays-with-axes/12930 "2018-08-07T04:09:07Z")

</div>

Hi Guys! I have an error: for t in \[delT^i for i in 0:5\] k = 0; if t == 1.0 kptTheta = \[\]; theta = 0; kpts = Keypoints(fastcorners(img1, 12, 0.35)); push!(kptTheta, kpts); …

---

## [Pkg.update() failing in Julia 0.6.4 on Ubuntu 16.04 behind firewall.](https://discourse.julialang.org/t/pkg-update-failing-in-julia-0-6-4-on-ubuntu-16-04-behind-firewall/12957)

<div class="topic-metadata">

**Author:** [@abhatia](https://discourse.julialang.org/u/abhatia)\
**Replies:** 3\
**Last updated:** [August 7, 2018, 1:48am UTC](https://discourse.julialang.org/t/pkg-update-failing-in-julia-0-6-4-on-ubuntu-16-04-behind-firewall/12957 "2018-08-07T01:48:10Z")

</div>

Hello All, I recently downloaded JuliaPro version 0.6.4.1 with MKL support and started the REPL from bash shell. Pkg.update() fails, with error messages as below - INFO: Updating METADATA... ERROR: METADATA cannot be u…

---

## [Usage of package seems to require 'activate' (pkg manager)](https://discourse.julialang.org/t/usage-of-package-seems-to-require-activate-pkg-manager/12882)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 3\
**Last updated:** [August 6, 2018, 11:04pm UTC](https://discourse.julialang.org/t/usage-of-package-seems-to-require-activate-pkg-manager/12882 "2018-08-06T23:04:20Z")

</div>

on RC2 using myPackage failes, because julia seems to be looking for a dependency package in the ‘standard Project.toml’ instead of the Project.toml of the package itself. Thus, I need to first \]activate myPackage prior…

---

## [How to make a Set of real values based on rtol?](https://discourse.julialang.org/t/how-to-make-a-set-of-real-values-based-on-rtol/11769)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 2\
**Last updated:** [August 6, 2018, 9:59pm UTC](https://discourse.julialang.org/t/how-to-make-a-set-of-real-values-based-on-rtol/11769 "2018-08-06T21:59:42Z")

</div>

Lets say you wanted to make a Set of real numbers: Set( \[ 1.0, 1+eps(), 2 \] ) Where for all practical purposes, this should reduce to Set(\[1.0,2.0\]) Is there an existing data structure that allows somethi…

---

## [Way to terminate function that lasts more than 30 seconds?](https://discourse.julialang.org/t/way-to-terminate-function-that-lasts-more-than-30-seconds/12906)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 2\
**Last updated:** [August 5, 2018, 6:46pm UTC](https://discourse.julialang.org/t/way-to-terminate-function-that-lasts-more-than-30-seconds/12906 "2018-08-05T18:46:27Z")

</div>

Let’s say you’re randomly throwing darts at some range of parameter values, i.e. a in linspace(0,1) b from \[15,20,40\] some\_flag = \[true,false\] However the black-box function you put all this into can take orders of ma…

---

## [Struggling with type stability - is SMatrix type stable?](https://discourse.julialang.org/t/struggling-with-type-stability-is-smatrix-type-stable/12951)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 9\
**Last updated:** [August 6, 2018, 7:33pm UTC](https://discourse.julialang.org/t/struggling-with-type-stability-is-smatrix-type-stable/12951 "2018-08-06T19:33:55Z")

</div>

I have a problem where I want to collect an Array of vectors as I perform an iteration. Something like this: function foo(x::Vector{Float64}, size::Int8) tmat = SMatrix{4,4}{Float64}(eye(4)) tmatrices = Array{SMatri…

---

## [Warnings while running tests concerning pre-compilation](https://discourse.julialang.org/t/warnings-while-running-tests-concerning-pre-compilation/12790)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 5\
**Last updated:** [August 6, 2018, 7:06pm UTC](https://discourse.julialang.org/t/warnings-while-running-tests-concerning-pre-compilation/12790 "2018-08-06T19:06:35Z")

</div>

While running tests of my package with the release candidate 1 I got a bunch of these: ┌ Warning: \_\_precompile\_\_() is now the default │ caller = \_\_precompile\_\_() at loading.jl:777 └ @ Base .\\loading.jl:777 Is this so…

---

## [Seemingly permanent performance degradation after fiddling with command-line options](https://discourse.julialang.org/t/seemingly-permanent-performance-degradation-after-fiddling-with-command-line-options/12944)

<div class="topic-metadata">

**Author:** [@nstgc](https://discourse.julialang.org/u/nstgc)\
**Replies:** 0\
**Last updated:** [August 6, 2018, 3:43pm UTC](https://discourse.julialang.org/t/seemingly-permanent-performance-degradation-after-fiddling-with-command-line-options/12944 "2018-08-06T15:43:06Z")

</div>

Yesterday evening I was working on trying to speed up some functions. Most I was tweaking the regex which provided a 13% speed boost. In an attempt to get more out of it I tried running Julia with different options. Name…

---

## [Block Array constructor in 0.7.0-rc2](https://discourse.julialang.org/t/block-array-constructor-in-0-7-0-rc2/12947)

<div class="topic-metadata">

**Author:** [@jacobadenbaum](https://discourse.julialang.org/u/jacobadenbaum)\
**Replies:** 2\
**Last updated:** [August 6, 2018, 6:20pm UTC](https://discourse.julialang.org/t/block-array-constructor-in-0-7-0-rc2/12947 "2018-08-06T18:20:58Z")

</div>

Does anyone know why the following code returns true on julia 0.6.4 but false on 0.7.0-rc2? It looks like the way that array constructors are parsed may have changed, but I can’t find it in the News.md. Does anyone kno…

---

## [Passing STDIN into a script as one might a file](https://discourse.julialang.org/t/passing-stdin-into-a-script-as-one-might-a-file/12921)

<div class="topic-metadata">

**Author:** [@nstgc](https://discourse.julialang.org/u/nstgc)\
**Replies:** 6\
**Last updated:** [August 6, 2018, 2:00pm UTC](https://discourse.julialang.org/t/passing-stdin-into-a-script-as-one-might-a-file/12921 "2018-08-06T14:00:04Z")

</div>

I know that when you run “./script.jl foo bar” String\[“foo”, “bar”\] is passed into the script as a one-dimentional string array. However, this is not what I’m looking for. I’m looking to process a large text file(up to …

---

## [Memory Issues: Serializing and deserializing data](https://discourse.julialang.org/t/memory-issues-serializing-and-deserializing-data/12934)

<div class="topic-metadata">

**Author:** [@aashish01](https://discourse.julialang.org/u/aashish01)\
**Replies:** 2\
**Last updated:** [August 6, 2018, 12:29pm UTC](https://discourse.julialang.org/t/memory-issues-serializing-and-deserializing-data/12934 "2018-08-06T12:29:44Z")

</div>

Using julia v0.6.4 I was trying to convert String to bytes and add it to a buffer. I noticed the following a = “temp” b = Vector{UInt8}(a) b\[1\] += 1 This ends up modifying a. Shouldn’t a call to Vector create new und…

---

## [Different behavior of repl & julia for watching directory when receiving interrupting signal](https://discourse.julialang.org/t/different-behavior-of-repl-julia-for-watching-directory-when-receiving-interrupting-signal/12737)

<div class="topic-metadata">

**Author:** [@oniter](https://discourse.julialang.org/u/oniter)\
**Replies:** 2\
**Last updated:** [August 6, 2018, 8:44am UTC](https://discourse.julialang.org/t/different-behavior-of-repl-julia-for-watching-directory-when-receiving-interrupting-signal/12737 "2018-08-06T08:44:57Z")

</div>

If I observe a directory for changes but send a signal to interrupt the script before any changes happen I got an unhandled error message. This is not the case using the code in the REPL or if there was a change in direc…

---

## [Using Printf](https://discourse.julialang.org/t/using-printf/12919)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [August 5, 2018, 7:44pm UTC](https://discourse.julialang.org/t/using-printf/12919 "2018-08-05T19:44:22Z")

</div>

I am trying to make a package work on 0.6 and 0.7. A warning told me to add “using Printf” Another warning told me to add this to the dependancies, but I don’t know how. I just added Printf as dependency, but a) this …

---

## [Some basic question about the run() command](https://discourse.julialang.org/t/some-basic-question-about-the-run-command/12685)

<div class="topic-metadata">

**Author:** [@oniter](https://discourse.julialang.org/u/oniter)\
**Replies:** 5\
**Last updated:** [August 5, 2018, 4:37pm UTC](https://discourse.julialang.org/t/some-basic-question-about-the-run-command/12685 "2018-08-05T16:37:21Z")

</div>

Questions: Solved! Is it possible to run an external cmd in background? run(\`sleep 10\`) works, but not run(\`sleep 10 \\&\`) In my docu run() is shown as run(command, args…) Run a command object, constructed w…

---

## [Error while installing Juno on Mac](https://discourse.julialang.org/t/error-while-installing-juno-on-mac/12907)

<div class="topic-metadata">

**Author:** [@marcelord12](https://discourse.julialang.org/u/marcelord12)\
**Replies:** 2\
**Last updated:** [August 5, 2018, 11:55am UTC](https://discourse.julialang.org/t/error-while-installing-juno-on-mac/12907 "2018-08-05T11:55:46Z")

</div>

Hi, I was trying to install Juno, and when I opened the REPL with Packages \> Julia \> Open Console pressing Enter to start a Julia session, I got the following error message: Press Enter to start Julia. Starting Juli…

---

## [Different behavior of repl & julia for run() or rather pipeline()](https://discourse.julialang.org/t/different-behavior-of-repl-julia-for-run-or-rather-pipeline/12684)

<div class="topic-metadata">

**Author:** [@oniter](https://discourse.julialang.org/u/oniter)\
**Replies:** 3\
**Last updated:** [August 5, 2018, 9:16am UTC](https://discourse.julialang.org/t/different-behavior-of-repl-julia-for-run-or-rather-pipeline/12684 "2018-08-05T09:16:31Z")

</div>

Why is the result different & is this the correct behavior? The following command readstring(pipeline(\`ps -eo command\`,\`grep blablabla\`,\`wc -l\`)) where blablabla is a name for a process which doesn’t exist at the mo…

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

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