# General Usage

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

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

**Page:** 964

---

## [Performance of mutable static arrays and compilation cost](https://discourse.julialang.org/t/performance-of-mutable-static-arrays-and-compilation-cost/12423)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 15\
**Last updated:** [July 17, 2018, 9:22am UTC](https://discourse.julialang.org/t/performance-of-mutable-static-arrays-and-compilation-cost/12423 "2018-07-17T09:22:31Z")

</div>

Here is an example. Regular matrices and static arrays are used in identical loops. The static arrays are orders of magnitude slower. The code using static arrays also allocates. Any idea what’s going on? The code: mod…

---

## [PGFPlotsX: Options from string in grouplot](https://discourse.julialang.org/t/pgfplotsx-options-from-string-in-grouplot/12426)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 5\
**Last updated:** [July 17, 2018, 7:54am UTC](https://discourse.julialang.org/t/pgfplotsx-options-from-string-in-grouplot/12426 "2018-07-17T07:54:27Z")

</div>

Hello, I am creating a fairly complicated groupplot with a shared legend. Since each subplot has its own combination of axis labels, I created options and then I would like to put the into groupplot as an options, like …

---

## [After renaming a package. what should happen to release numbers](https://discourse.julialang.org/t/after-renaming-a-package-what-should-happen-to-release-numbers/12422)

<div class="topic-metadata">

**Author:** [@tpoisot](https://discourse.julialang.org/u/tpoisot)\
**Replies:** 1\
**Last updated:** [July 17, 2018, 2:23am UTC](https://discourse.julialang.org/t/after-renaming-a-package-what-should-happen-to-release-numbers/12422 "2018-07-17T02:23:59Z")

</div>

Here is my situation: I just renamed a package, and the new version will be 0.7 only (there is a 0.6 version under the former name). Is there a standard re. the release numbers? Is the new package supposed to start at 1…

---

## [Concerns about splatting](https://discourse.julialang.org/t/concerns-about-splatting/6664)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 9\
**Last updated:** [October 25, 2017, 8:19pm UTC](https://discourse.julialang.org/t/concerns-about-splatting/6664 "2017-10-25T20:19:50Z")

</div>

I’m trying to write some code which involves arrays of arbitrary rank and as it’s extremely difficult to avoid splatting (especially with the way many functions in Base are currently written) I’m getting concerned about …

---

## [@inbounds: is the compiler now so smart that this is no longer necessary?](https://discourse.julialang.org/t/inbounds-is-the-compiler-now-so-smart-that-this-is-no-longer-necessary/12357)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 33\
**Last updated:** [July 16, 2018, 2:49pm UTC](https://discourse.julialang.org/t/inbounds-is-the-compiler-now-so-smart-that-this-is-no-longer-necessary/12357 "2018-07-16T14:49:55Z")

</div>

In tests of FinEtools, the code with ALL @inbounds removed is faster than with.

---

## [V 0.6.4 -- problem with Plots](https://discourse.julialang.org/t/v-0-6-4-problem-with-plots/12374)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 4\
**Last updated:** [July 16, 2018, 1:16pm UTC](https://discourse.julialang.org/t/v-0-6-4-problem-with-plots/12374 "2018-07-16T13:16:37Z")

</div>

I just installed Julia v. 0.6.4, and get errors with Plots… julia\> using Plots INFO: Precompiling module Plots. WARNING: Module Compat with uuid 2991492794994 is missing from the cache. This may mean module Compat does …

---

## [Choose between StaticArrays and regular arrays in a type stable way](https://discourse.julialang.org/t/choose-between-staticarrays-and-regular-arrays-in-a-type-stable-way/12407)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [July 16, 2018, 8:45am UTC](https://discourse.julialang.org/t/choose-between-staticarrays-and-regular-arrays-in-a-type-stable-way/12407 "2018-07-16T08:45:58Z")

</div>

For the StaticArrays aficionados here: is it possible to choose dynamically in a type stable way whether an operation is carried out with static arrays or with regular arrays?

---

## [Calling C function expecting char\*\[\]](https://discourse.julialang.org/t/calling-c-function-expecting-char/12363)

<div class="topic-metadata">

**Author:** [@Bernard\_GODARD](https://discourse.julialang.org/u/Bernard_GODARD)\
**Replies:** 6\
**Last updated:** [July 15, 2018, 7:47pm UTC](https://discourse.julialang.org/t/calling-c-function-expecting-char/12363 "2018-07-15T19:47:10Z")

</div>

I am trying to call the following function from a C library: int calceph\_getconstantvs(t\_calcephbin\* eph, const char\* name, t\_calcephcharvalue \*arrayvalue, int nvalue); where: typedef char t\_calcephcharvalue\[CALCEPH\_M…

---

## [Accessing package REPL mode in Jupyter (Julia 0.7)](https://discourse.julialang.org/t/accessing-package-repl-mode-in-jupyter-julia-0-7/12395)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 3\
**Last updated:** [July 15, 2018, 7:05pm UTC](https://discourse.julialang.org/t/accessing-package-repl-mode-in-jupyter-julia-0-7/12395 "2018-07-15T19:05:26Z")

</div>

Is there an equivalent to hitting \] when using Julia 0.7 in Jupyter? In 0.6 it was possible to e.g. Pkg.add("PackageName") in Jupyter – is something equivalent still possible with Julia 0.7?

---

## [$a as argument to function](https://discourse.julialang.org/t/a-as-argument-to-function/12386)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 3\
**Last updated:** [July 15, 2018, 2:50pm UTC](https://discourse.julialang.org/t/a-as-argument-to-function/12386 "2018-07-15T14:50:59Z")

</div>

Hi folks, just a (probably) stupid question here. In another thread I’ve seen that people is testing functions operating on arrays, such that when the function is called, the array name is preceded by the $-symbol func…

---

## [Tests success on local but fails in Travis CI](https://discourse.julialang.org/t/tests-success-on-local-but-fails-in-travis-ci/12382)

<div class="topic-metadata">

**Author:** [@mrtkp9993](https://discourse.julialang.org/u/mrtkp9993)\
**Replies:** 4\
**Last updated:** [July 15, 2018, 7:03am UTC](https://discourse.julialang.org/t/tests-success-on-local-but-fails-in-travis-ci/12382 "2018-07-15T07:03:00Z")

</div>

Hi All! The question is in title. I had this error on travis: Error During Test Test threw an exception of type MethodError Expression: countBases(readStringFromFile(joinpath(@\_\_DIR\_\_(), "data", "rosalind\_dna.txt")…

---

## [Best way to convert packed bits to vector](https://discourse.julialang.org/t/best-way-to-convert-packed-bits-to-vector/12333)

<div class="topic-metadata">

**Author:** [@ronubi](https://discourse.julialang.org/u/ronubi)\
**Replies:** 1\
**Last updated:** [July 14, 2018, 10:32pm UTC](https://discourse.julialang.org/t/best-way-to-convert-packed-bits-to-vector/12333 "2018-07-14T22:32:10Z")

</div>

I need to expand a bit sequence packed in UInt32 words, into a vector that is eventually complex floating point (with the sequence elements represented by \\pm 1 in the real part). Currently I’m doing something like the …

---

## [How does RCall transfer data between R and Julia?](https://discourse.julialang.org/t/how-does-rcall-transfer-data-between-r-and-julia/12378)

<div class="topic-metadata">

**Author:** [@matthieu](https://discourse.julialang.org/u/matthieu)\
**Replies:** 3\
**Last updated:** [July 14, 2018, 7:56pm UTC](https://discourse.julialang.org/t/how-does-rcall-transfer-data-between-r-and-julia/12378 "2018-07-14T19:56:37Z")

</div>

How does RCall transfer data from R to Julia? I am wondering because @rget takes a lot of time to transfer a dataframe from R to Julia (approx 2GB). Is it supposed to be instantaneous or is it supposed to be as slow as s…

---

## [Compat with stdlib deprecations, e.g. mul!, cholesky, mean, var](https://discourse.julialang.org/t/compat-with-stdlib-deprecations-e-g-mul-cholesky-mean-var/12375)

<div class="topic-metadata">

**Author:** [@alee](https://discourse.julialang.org/u/alee)\
**Replies:** 2\
**Last updated:** [July 14, 2018, 2:20pm UTC](https://discourse.julialang.org/t/compat-with-stdlib-deprecations-e-g-mul-cholesky-mean-var/12375 "2018-07-14T14:20:37Z")

</div>

Apologies in advance if this has been addressed somewhere, but I couldn’t find anything. Using the Compat.jl package has made preparing code for 0.7/1.0 while maintaining 0.6 functionality seamless, for almost all depre…

---

## [Stricter date parsing](https://discourse.julialang.org/t/stricter-date-parsing/12334)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 21\
**Last updated:** [July 14, 2018, 9:32am UTC](https://discourse.julialang.org/t/stricter-date-parsing/12334 "2018-07-14T09:32:03Z")

</div>

I don’t know if this is intended or not, but date parsing is somewhat too permissive: julia\> VERSION v"0.7.0-beta.275" julia\> using Dates julia\> tryparse(Date, "19800101", dateformat"yyyy-mm-dd") 19800101-01-01 Is th…

---

## [How to programmatically determine the type of a Tuple minus its first parameter?](https://discourse.julialang.org/t/how-to-programmatically-determine-the-type-of-a-tuple-minus-its-first-parameter/12359)

<div class="topic-metadata">

**Author:** [@galenlynch](https://discourse.julialang.org/u/galenlynch)\
**Replies:** 6\
**Last updated:** [July 14, 2018, 5:56am UTC](https://discourse.julialang.org/t/how-to-programmatically-determine-the-type-of-a-tuple-minus-its-first-parameter/12359 "2018-07-14T05:56:59Z")

</div>

When working with tuples, you can ‘pop’ the first entry via dispatch as follows: tuplepop(t::Tuple{\<:Any, Vararg}) = t\[2:end\] tuplepop(t::Tuple{}) = t But how can I determine the type of the result ahead of time? This…

---

## [Cfunctions with local types on v0.7](https://discourse.julialang.org/t/cfunctions-with-local-types-on-v0-7/12343)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 10\
**Last updated:** [July 13, 2018, 9:41pm UTC](https://discourse.julialang.org/t/cfunctions-with-local-types-on-v0-7/12343 "2018-07-13T21:41:14Z")

</div>

I am trying to get cfunction to work with local functions and types https://github.com/JuliaDiffEq/Sundials.jl/commit/54e7e18788fed1b10c2bb69fcc375f45f0de0177 I think I am having some GC segfaults because of this. @rde…

---

## [How do I create a function from an expression](https://discourse.julialang.org/t/how-do-i-create-a-function-from-an-expression/12349)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 23\
**Last updated:** [July 13, 2018, 9:16pm UTC](https://discourse.julialang.org/t/how-do-i-create-a-function-from-an-expression/12349 "2018-07-13T21:16:36Z")

</div>

Suppose I have expr = :(sin(x)+cos(x)) How can I get a function looking like x-\>sin(x)+cos(x) I have tried to write such a macro macro expr2fn(expr, arg) return :($arg -\> $(expr)) end but it does not work juli…

---

## [Multiple dispatch design with different algorithms and default values](https://discourse.julialang.org/t/multiple-dispatch-design-with-different-algorithms-and-default-values/12358)

<div class="topic-metadata">

**Author:** [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Replies:** 6\
**Last updated:** [July 13, 2018, 8:29pm UTC](https://discourse.julialang.org/t/multiple-dispatch-design-with-different-algorithms-and-default-values/12358 "2018-07-13T20:29:16Z")

</div>

We are designing a generic interface for a library to take expectations of distributions , and would love some help trying to get the dispatch design correct. The basic idea is that there are a set of different algorith…

---

## [Is rand guaranteed to give the same sequence of random numbers in every machine (with the same seed)?](https://discourse.julialang.org/t/is-rand-guaranteed-to-give-the-same-sequence-of-random-numbers-in-every-machine-with-the-same-seed/12344)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 3\
**Last updated:** [July 13, 2018, 5:42pm UTC](https://discourse.julialang.org/t/is-rand-guaranteed-to-give-the-same-sequence-of-random-numbers-in-every-machine-with-the-same-seed/12344 "2018-07-13T17:42:42Z")

</div>

Suppose I seed the random number generator srand(1), and then generate many pseudo-random numbers via rand. Is there a guarantee that I will always obtain the same sequence of pseudo-random numbers in different machines? …

---

## [Generate functions inside a function from string](https://discourse.julialang.org/t/generate-functions-inside-a-function-from-string/12331)

<div class="topic-metadata">

**Author:** [@wuhuagumu](https://discourse.julialang.org/u/wuhuagumu)\
**Replies:** 35\
**Last updated:** [July 13, 2018, 4:48pm UTC](https://discourse.julialang.org/t/generate-functions-inside-a-function-from-string/12331 "2018-07-13T16:48:59Z")

</div>

Hi, I noticed that the function generated by eval is always a global function, making the code silly if I would like to generate some function defined in string. Are there any other ways to do something like this while …

---

## [Default sin / cos functions do not scale on multithreading](https://discourse.julialang.org/t/default-sin-cos-functions-do-not-scale-on-multithreading/12313)

<div class="topic-metadata">

**Author:** [@DavidBerghaus](https://discourse.julialang.org/u/DavidBerghaus)\
**Replies:** 19\
**Last updated:** [July 13, 2018, 11:16am UTC](https://discourse.julialang.org/t/default-sin-cos-functions-do-not-scale-on-multithreading/12313 "2018-07-13T11:16:54Z")

</div>

I previously created a post where I described issues of my algorithm running on multi threading. I think I finally found the issue: I am using the default sin / cos functions and this post: https://github.com/JuliaLan…

---

## [Has \`undef\` lost its undefedness?](https://discourse.julialang.org/t/has-undef-lost-its-undefedness/12335)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 4\
**Last updated:** [July 12, 2018, 8:42pm UTC](https://discourse.julialang.org/t/has-undef-lost-its-undefedness/12335 "2018-07-12T20:42:54Z")

</div>

I had thought that current practice is to initialize arrays to undef and to test if values has been assigned with isassigned. On julia\> versioninfo() Julia Version 0.7.0-beta.276 Commit 70bd2c2116\* (2018-07-12 12:55 UTC…

---

## [Jupyter kernel for Julia 0.6.4 remains 0.6.2](https://discourse.julialang.org/t/jupyter-kernel-for-julia-0-6-4-remains-0-6-2/12338)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 2\
**Last updated:** [July 12, 2018, 7:35pm UTC](https://discourse.julialang.org/t/jupyter-kernel-for-julia-0-6-4-remains-0-6-2/12338 "2018-07-12T19:35:49Z")

</div>

After installing Julia 0.6.4 and doing Pkg.add("IJulia") Jupyter notebook (and Jupyter Lab) shows the same old kernel 0.6.2.

---

## [Performance of OffsetArrays](https://discourse.julialang.org/t/performance-of-offsetarrays/5769)

<div class="topic-metadata">

**Author:** [@raminammour](https://discourse.julialang.org/u/raminammour)\
**Replies:** 9\
**Last updated:** [July 12, 2018, 6:47pm UTC](https://discourse.julialang.org/t/performance-of-offsetarrays/5769 "2018-07-12T18:47:38Z")

</div>

Hello, I tried to use OffsetArrays.jl in my own (finite difference) codes and experienced a sizable slowdown.Here is a code that resembles my use cases. function lap2(x,y) n1,n2=size(x) for i2=2:n2-1 for …

---

## ["unintern" symbol](https://discourse.julialang.org/t/unintern-symbol/12316)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 19\
**Last updated:** [July 12, 2018, 2:07pm UTC](https://discourse.julialang.org/t/unintern-symbol/12316 "2018-07-12T14:07:21Z")

</div>

This is a common error for interactive development: julia\> struct MyType a end julia\> isapprox(a::MyType, b::MyType) = abs(a.a-a.b) ≤ 10 # FORGOT TO IMPORT isapprox (generic function with 1 method) julia\> import Base.…

---

## [Parsing XML as IO-stream](https://discourse.julialang.org/t/parsing-xml-as-io-stream/12293)

<div class="topic-metadata">

**Author:** [@johann.spies](https://discourse.julialang.org/u/johann.spies)\
**Replies:** 6\
**Last updated:** [July 12, 2018, 8:46am UTC](https://discourse.julialang.org/t/parsing-xml-as-io-stream/12293 "2018-07-12T08:46:32Z")

</div>

I have a lot of XML-files (gzipped - about 1.5Gb in size) containing approximately 400000 elements ( \<REC\>\</REC\> ) in which I am interested. The structure of the file: \<records\> \<REC\> ... \</REC\> etc. \</records\> I…

---

## [CI for GPU in Julia](https://discourse.julialang.org/t/ci-for-gpu-in-julia/12324)

<div class="topic-metadata">

**Author:** [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Replies:** 1\
**Last updated:** [July 12, 2018, 8:21am UTC](https://discourse.julialang.org/t/ci-for-gpu-in-julia/12324 "2018-07-12T08:21:28Z")

</div>

I am looking for CI for GPUs for Julia. I’m trying to add GPU support via CuArrays.jl, etc. But I do not have a CI for testing and it seems that this one is usable, but I have to join the group first? . Does anyone kn…

---

## [ZMQ.jl, Receiving message Blocked, ZMQ.recv()](https://discourse.julialang.org/t/zmq-jl-receiving-message-blocked-zmq-recv/10672)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 2\
**Last updated:** [July 12, 2018, 2:46am UTC](https://discourse.julialang.org/t/zmq-jl-receiving-message-blocked-zmq-recv/10672 "2018-07-12T02:46:07Z")

</div>

I try to receive message using the PUB-SUB pattern of ZMQ.jl. However, the function, ZMQ.recv(), is waiting for the message from PUB side and blocked there. Is there any way to receive the message without blocking? The…

---

## [DataStreams interface](https://discourse.julialang.org/t/datastreams-interface/12319)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 3\
**Last updated:** [July 11, 2018, 9:02pm UTC](https://discourse.julialang.org/t/datastreams-interface/12319 "2018-07-11T21:02:35Z")

</div>

For DataStreams Source’s and Sink’s, do all the methods listed in the documentation (linked below) need to be implemented? For instance, for a source that is sequential, reset! is often meaningless. http://juliadata.gi…

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

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