# General Usage

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

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

**Page:** 973

---

## [RParseError: unicode script is not supported in RCall](https://discourse.julialang.org/t/rparseerror-unicode-script-is-not-supported-in-rcall/11453)

<div class="topic-metadata">

**Author:** [@babaq](https://discourse.julialang.org/u/babaq)\
**Replies:** 0\
**Last updated:** [June 5, 2018, 6:58pm UTC](https://discourse.julialang.org/t/rparseerror-unicode-script-is-not-supported-in-rcall/11453 "2018-06-05T18:58:52Z")

</div>

Hi All, I have a package that use RCall and R"script" internally and it worked fine. But when I updated some packages, it starts failing to load the package, showing “RParseError: unicode script is not supported”. I hav…

---

## [Returning arbitrary Julia value from C function](https://discourse.julialang.org/t/returning-arbitrary-julia-value-from-c-function/11429)

<div class="topic-metadata">

**Author:** [@jinliangwei](https://discourse.julialang.org/u/jinliangwei)\
**Replies:** 2\
**Last updated:** [June 5, 2018, 2:39pm UTC](https://discourse.julialang.org/t/returning-arbitrary-julia-value-from-c-function/11429 "2018-06-05T14:39:07Z")

</div>

I have a general question. Suppose I have a C function which creates and returns an arbitrary Julia value (e.g. an Array) as below: jl\_value\_t\* sample\_func() { jl\_value\_t\* value = nullptr; JL\_GC\_PUSH!(&value); // …

---

## [Redefining a call expression inside a macro](https://discourse.julialang.org/t/redefining-a-call-expression-inside-a-macro/11428)

<div class="topic-metadata">

**Author:** [@jandehaan](https://discourse.julialang.org/u/jandehaan)\
**Replies:** 6\
**Last updated:** [June 5, 2018, 2:29pm UTC](https://discourse.julialang.org/t/redefining-a-call-expression-inside-a-macro/11428 "2018-06-05T14:29:19Z")

</div>

Edit: In the category of “never mind…” :blush:, the example below does not accurately replicate the problem. My apologies to those who took time to consider it. Consider macro x(expr) dump(expr) println("-----…

---

## [1 \* X' \* X is not symmetric](https://discourse.julialang.org/t/1-x-x-is-not-symmetric/11444)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 12\
**Last updated:** [June 5, 2018, 2:20pm UTC](https://discourse.julialang.org/t/1-x-x-is-not-symmetric/11444 "2018-06-05T14:20:41Z")

</div>

I find the following snippet unexpected. srand(1); X = rand(1000, 1000) - 0.5; (X' \*X) == (X' \*X)' #true (1 \* X' \*X) == (1 \* X' \*X)' #false Multiplying by 1 changes the symmetry, probably due to floating-point arithmet…

---

## [Why is this snippet of code type instable](https://discourse.julialang.org/t/why-is-this-snippet-of-code-type-instable/11442)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 3\
**Last updated:** [June 5, 2018, 1:26pm UTC](https://discourse.julialang.org/t/why-is-this-snippet-of-code-type-instable/11442 "2018-06-05T13:26:25Z")

</div>

Hello, I have the following very “simple” code f(Λ, inds) where {T,N} = Λ\[inds...\] \*= -1 x = \[1,2,3,4\] @code\_warntype f(x, \[1:2\]) But this seams to be type unstable: Variables: #self# \<optimized out\> Λ::Array{Int…

---

## [Sum and other functions on custom subtype of AbstractArray 1000 slower than on normal Arrays](https://discourse.julialang.org/t/sum-and-other-functions-on-custom-subtype-of-abstractarray-1000-slower-than-on-normal-arrays/11431)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 4\
**Last updated:** [June 5, 2018, 10:21am UTC](https://discourse.julialang.org/t/sum-and-other-functions-on-custom-subtype-of-abstractarray-1000-slower-than-on-normal-arrays/11431 "2018-06-05T10:21:07Z")

</div>

Hello, I define the following custom type which basically is a wrapper but with the size of the array as a type parameter module test using BenchmarkTools struct Lattice{S, T, N} \<: AbstractArray{T, N} lattice::Abstr…

---

## [JuliaRegistries: is it now possible to add packages here?](https://discourse.julialang.org/t/juliaregistries-is-it-now-possible-to-add-packages-here/11355)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 11\
**Last updated:** [June 4, 2018, 11:01pm UTC](https://discourse.julialang.org/t/juliaregistries-is-it-now-possible-to-add-packages-here/11355 "2018-06-04T23:01:01Z")

</div>

Is it possible to add packages to JuliaRegistries? How is that done?

---

## ["Store" the compiled version of algorithms](https://discourse.julialang.org/t/store-the-compiled-version-of-algorithms/11389)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 6\
**Last updated:** [June 4, 2018, 9:12pm UTC](https://discourse.julialang.org/t/store-the-compiled-version-of-algorithms/11389 "2018-06-04T21:12:26Z")

</div>

Hi guys! I have seen that, every time I restarted Julia, the first execution of a function in a package is somewhat slow, and the others are pretty fast. I understand that this is Julia compiling the code. I do not und…

---

## [Which to prefer in simple cases, \`map!\` or \`broadcast!\`](https://discourse.julialang.org/t/which-to-prefer-in-simple-cases-map-or-broadcast/11415)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 3\
**Last updated:** [June 4, 2018, 9:05pm UTC](https://discourse.julialang.org/t/which-to-prefer-in-simple-cases-map-or-broadcast/11415 "2018-06-04T21:05:27Z")

</div>

In a simple case, such as v = collect(1:10) sqrs = similar(v) map!(abs2, sqrs, v) would it be better to use broadcast!? I am using the ! form (instead of a .= assignment) because this expression could be part of a lar…

---

## [Evaluate multi-variable anonymous function for one variable](https://discourse.julialang.org/t/evaluate-multi-variable-anonymous-function-for-one-variable/11397)

<div class="topic-metadata">

**Author:** [@Leblouba\_Moussa](https://discourse.julialang.org/u/Leblouba_Moussa)\
**Replies:** 7\
**Last updated:** [June 4, 2018, 8:03pm UTC](https://discourse.julialang.org/t/evaluate-multi-variable-anonymous-function-for-one-variable/11397 "2018-06-04T20:03:39Z")

</div>

Hi Julians, I have an anonymous function f, of several variables x1, x2,…, xn, say for example: f1 = (x1, x2, x3) = 5x1 + x2^2 + x3^0.25 I would like to create a new function, say g, with g = f(x1,value2, value3), wi…

---

## [How to broadcast a Vector of an Array](https://discourse.julialang.org/t/how-to-broadcast-a-vector-of-an-array/11418)

<div class="topic-metadata">

**Author:** [@shekhar7gpt](https://discourse.julialang.org/u/shekhar7gpt)\
**Replies:** 2\
**Last updated:** [June 4, 2018, 4:48pm UTC](https://discourse.julialang.org/t/how-to-broadcast-a-vector-of-an-array/11418 "2018-06-04T16:48:05Z")

</div>

I try to convert a 2-dimensional array of floats to a 1-dimensional array of Quaternions. I want to use broadcasting for this. The following code fails. How can it be fixed? using Rotations, StaticArrays function Quat…

---

## [Error pre-compiling ODBC for Julia 0.6.3](https://discourse.julialang.org/t/error-pre-compiling-odbc-for-julia-0-6-3/11416)

<div class="topic-metadata">

**Author:** [@acunningham](https://discourse.julialang.org/u/acunningham)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 4:07pm UTC](https://discourse.julialang.org/t/error-pre-compiling-odbc-for-julia-0-6-3/11416 "2018-06-04T16:07:48Z")

</div>

Hi, Upgrading to Julia 0.6.3 and getting the following error when I import ODBC: import ODBC Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thank…

---

## [Julia in Raspberry Pi 3+: Is there any advantage in building from source?](https://discourse.julialang.org/t/julia-in-raspberry-pi-3-is-there-any-advantage-in-building-from-source/11073)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 3\
**Last updated:** [June 4, 2018, 11:05am UTC](https://discourse.julialang.org/t/julia-in-raspberry-pi-3-is-there-any-advantage-in-building-from-source/11073 "2018-06-04T11:05:29Z")

</div>

Hi, I’m trying out Julia on a raspberry pi B3+. My aim is to benchmark the performance of Julia on pi B3 and B3+. I downloaded the generic ARM build available for from the official site. Upon running, I’m getting these …

---

## [Problem with v0.7 & new Pkg](https://discourse.julialang.org/t/problem-with-v0-7-new-pkg/11404)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 1\
**Last updated:** [June 4, 2018, 7:06am UTC](https://discourse.julialang.org/t/problem-with-v0-7-new-pkg/11404 "2018-06-04T07:06:49Z")

</div>

I’m running into the following problem since the new Pkg was merged: The travis script is cloning the latest version of two packages (ModuleInterfaceTools & MurmurHash3), because of needing fixed versions with tags not…

---

## [Full path of a datatype or a function](https://discourse.julialang.org/t/full-path-of-a-datatype-or-a-function/11396)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 2\
**Last updated:** [June 4, 2018, 2:12am UTC](https://discourse.julialang.org/t/full-path-of-a-datatype-or-a-function/11396 "2018-06-04T02:12:38Z")

</div>

Hi, I would like to get the full path of a data type like for Int it would be Base.Int for a user defined datatype named MyDT in module X.Y.Z, it would be X.Y.Z.MyDT is there a function which does that? Thanks

---

## [0.7 Pkg: how to make projects aware of each other](https://discourse.julialang.org/t/0-7-pkg-how-to-make-projects-aware-of-each-other/11372)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 10\
**Last updated:** [June 4, 2018, 12:35am UTC](https://discourse.julialang.org/t/0-7-pkg-how-to-make-projects-aware-of-each-other/11372 "2018-06-04T00:35:28Z")

</div>

Pkg for 0.7-alpha: There is some discussion in the documentation how to add packages using git. The problem is, at the moment this doesn’t work on Windows 10 (some system-level bug). So how do I set up two projects in m…

---

## [Trouble interpolating variables in Markdown strings](https://discourse.julialang.org/t/trouble-interpolating-variables-in-markdown-strings/11378)

<div class="topic-metadata">

**Author:** [@tomlee](https://discourse.julialang.org/u/tomlee)\
**Replies:** 1\
**Last updated:** [June 3, 2018, 2:18am UTC](https://discourse.julialang.org/t/trouble-interpolating-variables-in-markdown-strings/11378 "2018-06-03T02:18:45Z")

</div>

The fact that Markdown strings use $ for both latex inline math and interpolation leads to some unexpected behavior: julia\> a = "z" "z" julia\> md"$a$a" a a julia\> md" $a$a" aa julia\> md"$a $a" "z" z julia\> md…

---

## [Updating an array of immutables -- unnecessary (?) memory allocation](https://discourse.julialang.org/t/updating-an-array-of-immutables-unnecessary-memory-allocation/11370)

<div class="topic-metadata">

**Author:** [@Snir\_Gazit](https://discourse.julialang.org/u/Snir_Gazit)\
**Replies:** 12\
**Last updated:** [June 3, 2018, 7:56pm UTC](https://discourse.julialang.org/t/updating-an-array-of-immutables-unnecessary-memory-allocation/11370 "2018-06-03T19:56:11Z")

</div>

I’m trying to update an array comprising a simple immutable type using the macro @set! from Setfield.j, see the following simple example: using Setfield struct A a::Int64 b::Int64 end a\_array=\[A(2,2) for i in ra…

---

## [Julia 0.7.0-alpha strange package loading](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359)

<div class="topic-metadata">

**Author:** [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Replies:** 11\
**Last updated:** [June 3, 2018, 7:37pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359 "2018-06-03T19:37:26Z")

</div>

On Julia 0.7.0-alpha I am testing DataFrames.jl package on Windows 10. It should be already precompiled (it is not the first time I load it). The strange behavior I get is the following. When I get to this state of REPL: …

---

## [How to convert a column of a dataframe to an array of Float64](https://discourse.julialang.org/t/how-to-convert-a-column-of-a-dataframe-to-an-array-of-float64/11393)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [June 3, 2018, 6:37pm UTC](https://discourse.julialang.org/t/how-to-convert-a-column-of-a-dataframe-to-an-array-of-float64/11393 "2018-06-03T18:37:38Z")

</div>

I have a one dimensional array of the following type: 5001-element Array{Union{Float64, Missings.Missing},1} I want to convert it into a pure Float64 array to be able to process it with the function Statsbase.crosscor …

---

## [Different results for cholesky decomposition between 0.6.2 and 0.6.3](https://discourse.julialang.org/t/different-results-for-cholesky-decomposition-between-0-6-2-and-0-6-3/11340)

<div class="topic-metadata">

**Author:** [@matthieu](https://discourse.julialang.org/u/matthieu)\
**Replies:** 8\
**Last updated:** [June 3, 2018, 5:47pm UTC](https://discourse.julialang.org/t/different-results-for-cholesky-decomposition-between-0-6-2-and-0-6-3/11340 "2018-06-03T17:47:54Z")

</div>

I use the following code to select a set of linearly independent columns from a matrix function give\_independent(X) chol = cholfact!(X'X, :U, Val{true}) ipermute!(diag(chol.factors) .\> 0, chol.piv) end However I…

---

## [Surprising struct equality test](https://discourse.julialang.org/t/surprising-struct-equality-test/4890)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 18\
**Last updated:** [June 3, 2018, 5:04pm UTC](https://discourse.julialang.org/t/surprising-struct-equality-test/4890 "2018-06-03T17:04:09Z")

</div>

By my understanding of structs, they should be compared by value by default. So what is going here?? struct T name::String end T("hello") == T("hello") returns false!

---

## [Method of \`mapreduce\` with multiple arguments](https://discourse.julialang.org/t/method-of-mapreduce-with-multiple-arguments/11388)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 2\
**Last updated:** [June 3, 2018, 3:21pm UTC](https://discourse.julialang.org/t/method-of-mapreduce-with-multiple-arguments/11388 "2018-06-03T15:21:19Z")

</div>

I haven’t been able to find a method for mapreduce accepting several collections as arguments. For map, such methods exist, e.g. julia\> map(+, \[1,2\], \[3,4\]) 2-element Array{Int64,1}: 4 6 I would like to use something…

---

## [Error deserializing type with parallel macro](https://discourse.julialang.org/t/error-deserializing-type-with-parallel-macro/11387)

<div class="topic-metadata">

**Author:** [@acunningham](https://discourse.julialang.org/u/acunningham)\
**Replies:** 0\
**Last updated:** [June 3, 2018, 2:10pm UTC](https://discourse.julialang.org/t/error-deserializing-type-with-parallel-macro/11387 "2018-06-03T14:10:05Z")

</div>

Hi, I’ve got a problem when trying to aggregate using the @parallel macro, looks like an issue deserializing a dictionary datatype: LoadError: On worker 2: TypeError: Array: in parameter, expected Type{T}, got Dict{Ar…

---

## [BigFloat of non int type bessel functions is not working (SpecialFunctions)](https://discourse.julialang.org/t/bigfloat-of-non-int-type-bessel-functions-is-not-working-specialfunctions/11384)

<div class="topic-metadata">

**Author:** [@DavidBerghaus](https://discourse.julialang.org/u/DavidBerghaus)\
**Replies:** 0\
**Last updated:** [June 3, 2018, 9:30am UTC](https://discourse.julialang.org/t/bigfloat-of-non-int-type-bessel-functions-is-not-working-specialfunctions/11384 "2018-06-03T09:30:23Z")

</div>

besselj(1,big(pi)) is working, besselj(1.1,pi) aswell. But when I combine them, so for example besselj(1.1,big(pi)) I am getting errors. Does anyone know a workaround for this?

---

## [0.7 Alpha Pkg problem](https://discourse.julialang.org/t/0-7-alpha-pkg-problem/11380)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [June 3, 2018, 9:21am UTC](https://discourse.julialang.org/t/0-7-alpha-pkg-problem/11380 "2018-06-03T09:21:35Z")

</div>

Whoops. Fresh install of 0.7 Alpha on Windows 10 Sorry to be dense, but where should I file a report on this? I know Pkg3 is the proper solution now, how should I use it please? julia\> Pkg.update() WARNING: Base.Pkg …

---

## [Emojis and Latex characters](https://discourse.julialang.org/t/emojis-and-latex-characters/11382)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 1\
**Last updated:** [June 3, 2018, 7:51am UTC](https://discourse.julialang.org/t/emojis-and-latex-characters/11382 "2018-06-03T07:51:12Z")

</div>

As seen on Twitter Feature request for 0.7 please…

---

## [Help with performance improvements with repeated computations](https://discourse.julialang.org/t/help-with-performance-improvements-with-repeated-computations/11373)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 8\
**Last updated:** [June 2, 2018, 8:56pm UTC](https://discourse.julialang.org/t/help-with-performance-improvements-with-repeated-computations/11373 "2018-06-02T20:56:51Z")

</div>

Guys, I have a question about how “smart” the Julia compiler is. Sorry, maybe this is already answered but I could not find maybe because I do not even know what is the English term that describes what I want to say …

---

## [Mutating immutables through references](https://discourse.julialang.org/t/mutating-immutables-through-references/11154)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 3\
**Last updated:** [June 2, 2018, 7:55pm UTC](https://discourse.julialang.org/t/mutating-immutables-through-references/11154 "2018-06-02T19:55:29Z")

</div>

Modifying immutables is annoying. In many cases, one needs to operate on objects with well-defined heap addresses. My current approach is to simply extract the pointer, and pass it to my mutating function. Say, e.g., I h…

---

## [Memory allocation problem](https://discourse.julialang.org/t/memory-allocation-problem/11352)

<div class="topic-metadata">

**Author:** [@jinliangwei](https://discourse.julialang.org/u/jinliangwei)\
**Replies:** 6\
**Last updated:** [June 2, 2018, 7:43pm UTC](https://discourse.julialang.org/t/memory-allocation-problem/11352 "2018-06-02T19:43:42Z")

</div>

I profiled by my program by tracking user memory allocation. The program seems to incur memory allocation at places I don’t expect. My program is pretty long so I have it updated to Github: https://github.com/jinliangwe…

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

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