# General Usage

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

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

**Page:** 1043

---

## [Overloading of show()](https://discourse.julialang.org/t/overloading-of-show/4413)

<div class="topic-metadata">

**Author:** [@hpoit](https://discourse.julialang.org/u/hpoit)\
**Replies:** 2\
**Last updated:** [June 22, 2017, 6:03pm UTC](https://discourse.julialang.org/t/overloading-of-show/4413 "2017-06-22T18:03:43Z")

</div>

Where is overloading of show() here? julia\> struct Polar{T\<:Real} \<: Number r::T Θ::T end julia\> Polar(r::Real,Θ::Real) = Polar(promote(r,Θ)...) Polar https://docs.julialang.org/en/stable/…

---

## [Segfault in \`libgmp.so\` in \`show\`](https://discourse.julialang.org/t/segfault-in-libgmp-so-in-show/4411)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 5\
**Last updated:** [June 22, 2017, 2:25pm UTC](https://discourse.julialang.org/t/segfault-in-libgmp-so-in-show/4411 "2017-06-22T14:25:02Z")

</div>

I’m getting the following segfault. \_ \_ \_ \_(\_)\_ | A fresh approach to technical computing (\_) | (\_) (\_) | Documentation: https://docs.julialang.org \_ \_ \_| |\_ \_\_ \_ | Type "…

---

## [How to scale coordinates in CoordinateTransformations.jl](https://discourse.julialang.org/t/how-to-scale-coordinates-in-coordinatetransformations-jl/4394)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 7\
**Last updated:** [June 22, 2017, 10:06am UTC](https://discourse.julialang.org/t/how-to-scale-coordinates-in-coordinatetransformations-jl/4394 "2017-06-22T10:06:54Z")

</div>

How do I scale coordinates in CoordinateTransformations.jl? They mention UniformScaling, but I don’t understand how I’m supposed to use that in order to differently scale each dimension in my coordinates. Say I have a c…

---

## [Nettle Fail to Build](https://discourse.julialang.org/t/nettle-fail-to-build/4333)

<div class="topic-metadata">

**Author:** [@nguzman](https://discourse.julialang.org/u/nguzman)\
**Replies:** 23\
**Last updated:** [June 20, 2017, 4:52pm UTC](https://discourse.julialang.org/t/nettle-fail-to-build/4333 "2017-06-20T16:52:24Z")

</div>

Hi all, I recently downloaded a 64-bit binary of Julia into a Linux cluster at my school to run some computation heavy simulations. When I ran Pkg.build( ), I received the following errors for Nettle: =================…

---

## [How to set max number of concurrent request with @sync and @async?](https://discourse.julialang.org/t/how-to-set-max-number-of-concurrent-request-with-sync-and-async/4176)

<div class="topic-metadata">

**Author:** [@jwu](https://discourse.julialang.org/u/jwu)\
**Replies:** 3\
**Last updated:** [June 22, 2017, 1:17am UTC](https://discourse.julialang.org/t/how-to-set-max-number-of-concurrent-request-with-sync-and-async/4176 "2017-06-22T01:17:35Z")

</div>

Hi Julians! @sync and @async is a nice combination to perform concurrent IO, such as reading files from the cloud. However, there seems to be a maximum number of concurrent request to the google cloud storage. Is there …

---

## [Issue with arrows not scaling with font size](https://discourse.julialang.org/t/issue-with-arrows-not-scaling-with-font-size/4400)

<div class="topic-metadata">

**Author:** [@ZacCranko](https://discourse.julialang.org/u/ZacCranko)\
**Replies:** 1\
**Last updated:** [June 21, 2017, 9:40pm UTC](https://discourse.julialang.org/t/issue-with-arrows-not-scaling-with-font-size/4400 "2017-06-21T21:40:35Z")

</div>

The show/hide arrows in Juno are experiencing some trouble scaling properly with the surrounding font size. As you can see this is not a problem with large font sizes… …but becomes problematic with small font sizes. …

---

## [How to get the index type of an array \<: AbstractArray?](https://discourse.julialang.org/t/how-to-get-the-index-type-of-an-array-abstractarray/4396)

<div class="topic-metadata">

**Author:** [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Replies:** 4\
**Last updated:** [June 21, 2017, 8:42pm UTC](https://discourse.julialang.org/t/how-to-get-the-index-type-of-an-array-abstractarray/4396 "2017-06-21T20:42:37Z")

</div>

A sparse matrix is parameterized by two types: an integer type for the indexes, and a value type. It is trivial to get the type of the latter (eltype(A)), but I have not found a portable way of getting the index type tha…

---

## [Parsing DateTimes in Julia 0.6](https://discourse.julialang.org/t/parsing-datetimes-in-julia-0-6/4397)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 0\
**Last updated:** [June 21, 2017, 8:45pm UTC](https://discourse.julialang.org/t/parsing-datetimes-in-julia-0-6/4397 "2017-06-21T20:45:55Z")

</div>

Short version: what’s the Julia 0.6 way to parse a DateTime from a String when the String has extra non-date info at the end, e.g. "2017-6-21 other text here"? Since upgrading to Julia 0.6, I’ve run into trouble with pa…

---

## [Cxx.jl, nested includes, error: unknown type name and ERROR: Could not find $class in translation unit](https://discourse.julialang.org/t/cxx-jl-nested-includes-error-unknown-type-name-and-error-could-not-find-class-in-translation-unit/4392)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 2\
**Last updated:** [June 21, 2017, 7:37pm UTC](https://discourse.julialang.org/t/cxx-jl-nested-includes-error-unknown-type-name-and-error-could-not-find-class-in-translation-unit/4392 "2017-06-21T19:37:31Z")

</div>

I am trying to use the C++ library Box2D (forked here simply to have a shared library build): https://github.com/goretkin/Box2D/tree/master/Box2D My issue might just be that I do not know how to include a header which i…

---

## [Addprocs error with all\_to\_all topology](https://discourse.julialang.org/t/addprocs-error-with-all-to-all-topology/4348)

<div class="topic-metadata">

**Author:** [@raminammour](https://discourse.julialang.org/u/raminammour)\
**Replies:** 16\
**Last updated:** [June 21, 2017, 2:38pm UTC](https://discourse.julialang.org/t/addprocs-error-with-all-to-all-topology/4348 "2017-06-21T14:38:51Z")

</div>

Hello, I am experiencing this error and would appreciate any help… This: addprocs(\["r4i6n10.icex.cluster";"r5i0n9.icex.cluster"\],tunnel=true,topology=:master\_slave) works. But with all\_to\_all I get: addprocs(\["r4i6n1…

---

## [Parametrised Functions in 0.6.0](https://discourse.julialang.org/t/parametrised-functions-in-0-6-0/4359)

<div class="topic-metadata">

**Author:** [@joshbode](https://discourse.julialang.org/u/joshbode)\
**Replies:** 3\
**Last updated:** [June 21, 2017, 5:14am UTC](https://discourse.julialang.org/t/parametrised-functions-in-0-6-0/4359 "2017-06-21T05:14:02Z")

</div>

In 0.6.0 (released today!), using the new where syntax I’m able to define a function f as follows: 0.6.0\> abstract type X{T} end 0.6.0\> struct A{T} \<: X{T} end 0.6.0\> struct B{T} \<: X{T} end 0.6.0\> f(::S) where {T, S…

---

## [How to retire a Julia package](https://discourse.julialang.org/t/how-to-retire-a-julia-package/4373)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 2\
**Last updated:** [June 20, 2017, 7:23pm UTC](https://discourse.julialang.org/t/how-to-retire-a-julia-package/4373 "2017-06-20T19:23:32Z")

</div>

How do I retire a Julia package (@tkelman)? This is about EasyPkg - I never really updated it for Julia v0.5, let alone for v0.6 - I don’t see a need for it any longer. It it possible to limit it to v0.4 or so?

---

## [Size( ,k) of one-dimensional array for k \>1](https://discourse.julialang.org/t/size-k-of-one-dimensional-array-for-k-1/4378)

<div class="topic-metadata">

**Author:** [@austinbean](https://discourse.julialang.org/u/austinbean)\
**Replies:** 2\
**Last updated:** [June 20, 2017, 7:10pm UTC](https://discourse.julialang.org/t/size-k-of-one-dimensional-array-for-k-1/4378 "2017-06-20T19:10:29Z")

</div>

v1 = rand(5); size(v1) # returns (5,) size(v1, 1) = 5 # fine size(v1, 2) = 1 # ? size(v1, 3) = 1 # ?? ... size(v1,100) = 1 # ? ... ? I think I would have expected size(v1, k) for k \> 1 to be 0, not 1. Is this intende…

---

## [Macroexpand in a module](https://discourse.julialang.org/t/macroexpand-in-a-module/4376)

<div class="topic-metadata">

**Author:** [@bramtayl](https://discourse.julialang.org/u/bramtayl)\
**Replies:** 1\
**Last updated:** [June 20, 2017, 5:34pm UTC](https://discourse.julialang.org/t/macroexpand-in-a-module/4376 "2017-06-20T17:34:09Z")

</div>

I saw the recent changes to macroexpand in 0.7, where you can specify a module to resolve macro names in. Is there any way to mimic this ability in 0.6 and earlier?

---

## [Is this parallel performance correct?](https://discourse.julialang.org/t/is-this-parallel-performance-correct/4369)

<div class="topic-metadata">

**Author:** [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Replies:** 1\
**Last updated:** [June 20, 2017, 3:07pm UTC](https://discourse.julialang.org/t/is-this-parallel-performance-correct/4369 "2017-06-20T15:07:16Z")

</div>

I saw some strange performance today and I’m wondering what I’m doing wrong here. julia\> using BenchmarkTools julia\> a = \[1:1000000;\]; julia\> @btime map(log, a); 13.449 ms (3 allocations: 7.63 MiB) julia\> addprocs(…

---

## [Link Errors while building master\[17d5c55\]: undefined reference to symbol '\_\_cxa\_free\_exception@@CXXABI\_1.3](https://discourse.julialang.org/t/link-errors-while-building-master-17d5c55-undefined-reference-to-symbol---cxa-free-exception-cxxabi-1-3/4274)

<div class="topic-metadata">

**Author:** [@JonathanAnderson](https://discourse.julialang.org/u/JonathanAnderson)\
**Replies:** 10\
**Last updated:** [June 20, 2017, 2:54pm UTC](https://discourse.julialang.org/t/link-errors-while-building-master-17d5c55-undefined-reference-to-symbol---cxa-free-exception-cxxabi-1-3/4274 "2017-06-20T14:54:51Z")

</div>

I can successfully build 0.6-rc3 but I am unable to finish building the current origin/master \[17d5c55\]. I’ve put a full build log here: https://gist.github.com/JonathanAnderson/ca3b7d81da3f22974f6565b99308cb74 The ove…

---

## [Multiple conditions on a dataframe](https://discourse.julialang.org/t/multiple-conditions-on-a-dataframe/4368)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 2\
**Last updated:** [June 20, 2017, 2:00pm UTC](https://discourse.julialang.org/t/multiple-conditions-on-a-dataframe/4368 "2017-06-20T14:00:41Z")

</div>

In my code, I want to get some entry from my dataframe and apply multiple conditions (here: country-year). My code is: df\[(df\[:year\] .== year) & (df\[:country\] .== country\_name),:crisisJST\]\[1,1\] So I specify a year and…

---

## [Custom type comparison operator #NoobQ](https://discourse.julialang.org/t/custom-type-comparison-operator-noobq/4313)

<div class="topic-metadata">

**Author:** [@Nectarineimp](https://discourse.julialang.org/u/Nectarineimp)\
**Replies:** 6\
**Last updated:** [June 20, 2017, 12:24pm UTC](https://discourse.julialang.org/t/custom-type-comparison-operator-noobq/4313 "2017-06-20T12:24:12Z")

</div>

How do I create custom type comparison operators? In the documentation it talks about making a custom ==() function, but when I try this (simplified example) Base.==(x::mytype, y::mytype) = true; It doesn’t recognize …

---

## [How careful must I be doing setindex! on untracked arrays in ReverseDiff.jl?](https://discourse.julialang.org/t/how-careful-must-i-be-doing-setindex-on-untracked-arrays-in-reversediff-jl/4360)

<div class="topic-metadata">

**Author:** [@mcovalt](https://discourse.julialang.org/u/mcovalt)\
**Replies:** 1\
**Last updated:** [June 20, 2017, 8:38am UTC](https://discourse.julialang.org/t/how-careful-must-i-be-doing-setindex-on-untracked-arrays-in-reversediff-jl/4360 "2017-06-20T08:38:02Z")

</div>

Comparing ReverseDiff.jl to a similar Python package (autograd), I see in their documentation: In-place modification of arrays not being differentiated with respect to (for example, A\[i\] = x or A += B) won’t raise an e…

---

## [Managing errors generated by third party software (VTK) called via PyCall](https://discourse.julialang.org/t/managing-errors-generated-by-third-party-software-vtk-called-via-pycall/4358)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 1\
**Last updated:** [June 20, 2017, 4:15am UTC](https://discourse.julialang.org/t/managing-errors-generated-by-third-party-software-vtk-called-via-pycall/4358 "2017-06-20T04:15:17Z")

</div>

I am trying to properly manage the exceptions created by an external software, VTK. I am calling some of its functions from PyCall as in the following example. using PyCall @pyimport vtk as vtk reader = vtk.vtkXMLUnstru…

---

## [Making \`broadcast\` compile-time inference more accurate](https://discourse.julialang.org/t/making-broadcast-compile-time-inference-more-accurate/4345)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 4\
**Last updated:** [June 20, 2017, 3:12am UTC](https://discourse.julialang.org/t/making-broadcast-compile-time-inference-more-accurate/4345 "2017-06-20T03:12:43Z")

</div>

Working on latest Julia, the following call is correctly inferred to be Vector{Int64}: ww = \[(1,2,3),(4,5,6)\] # this broadcast returns Vector{Int64} broadcast(getindex,ww,1) But, qq = \[(1,'a',1.0),(2,'b',2.0)\] broadca…

---

## [Package management - an intro?](https://discourse.julialang.org/t/package-management-an-intro/4344)

<div class="topic-metadata">

**Author:** [@John\_Hearns](https://discourse.julialang.org/u/John_Hearns)\
**Replies:** 6\
**Last updated:** [June 20, 2017, 3:08am UTC](https://discourse.julialang.org/t/package-management-an-intro/4344 "2017-06-20T03:08:34Z")

</div>

I see that there is a talk by Stefan Karpinski on Pkg3 package management. Python ‘virtualenv’ is mentioned. Would anyone be kind enough to point me towards a gentle intro to Julia package management. My specific inte…

---

## [Segmentation error, Garbage Collection](https://discourse.julialang.org/t/segmentation-error-garbage-collection/4073)

<div class="topic-metadata">

**Author:** [@tastelessjolt](https://discourse.julialang.org/u/tastelessjolt)\
**Replies:** 8\
**Last updated:** [June 20, 2017, 2:53am UTC](https://discourse.julialang.org/t/segmentation-error-garbage-collection/4073 "2017-06-20T02:53:00Z")

</div>

What I’m trying to do is to implement a complete interface to call any function of Julia from Scilab language. I think the problem is in garbage collection. I would like to know whether there are any such problems. And …

---

## [String Arrays](https://discourse.julialang.org/t/string-arrays/4357)

<div class="topic-metadata">

**Author:** [@tastelessjolt](https://discourse.julialang.org/u/tastelessjolt)\
**Replies:** 0\
**Last updated:** [June 20, 2017, 2:50am UTC](https://discourse.julialang.org/t/string-arrays/4357 "2017-06-20T02:50:48Z")

</div>

How do I create string arrays in the C API? I coded up one but that seems to not work. Like can I use jl\_ptr\_to\_array and if I can, then what format should the data pointer be in. This is the code I tried. https://git…

---

## [Sparse Arrays](https://discourse.julialang.org/t/sparse-arrays/4355)

<div class="topic-metadata">

**Author:** [@tastelessjolt](https://discourse.julialang.org/u/tastelessjolt)\
**Replies:** 0\
**Last updated:** [June 20, 2017, 12:15am UTC](https://discourse.julialang.org/t/sparse-arrays/4355 "2017-06-20T00:15:07Z")

</div>

How do I create Sparse Arrays in C API? I couldn’t find a struct for that. Thank you.

---

## [Detecting dynamic dispatch](https://discourse.julialang.org/t/detecting-dynamic-dispatch/4331)

<div class="topic-metadata">

**Author:** [@Nitin\_Arora](https://discourse.julialang.org/u/Nitin_Arora)\
**Replies:** 2\
**Last updated:** [June 19, 2017, 8:13pm UTC](https://discourse.julialang.org/t/detecting-dynamic-dispatch/4331 "2017-06-19T20:13:38Z")

</div>

Is there a way in Julia to detect if dynamic dispatch is happening or not for a given function call? Especially when the function doesnt allocate memory? Thanks.

---

## [How can this done?](https://discourse.julialang.org/t/how-can-this-done/4330)

<div class="topic-metadata">

**Author:** [@DrKrar](https://discourse.julialang.org/u/DrKrar)\
**Replies:** 8\
**Last updated:** [June 19, 2017, 7:53pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330 "2017-06-19T19:53:41Z")

</div>

how can one ask for input from REPL (STDIN), waiting for some time then return any way if there is no input??

---

## [Pmap slowdown in Julia 0.5?](https://discourse.julialang.org/t/pmap-slowdown-in-julia-0-5/4314)

<div class="topic-metadata">

**Author:** [@pearlzli](https://discourse.julialang.org/u/pearlzli)\
**Replies:** 2\
**Last updated:** [June 19, 2017, 1:50pm UTC](https://discourse.julialang.org/t/pmap-slowdown-in-julia-0-5/4314 "2017-06-19T13:50:33Z")

</div>

I’m having an issue where parallel code works as intended in Julia 0.4, but in Julia 0.5 appears to slow down over time. Specifically, we have a function forecast\_one which does computations in blocks. In Julia 0.4, the …

---

## [Atom StackOverFlowError](https://discourse.julialang.org/t/atom-stackoverflowerror/4115)

<div class="topic-metadata">

**Author:** [@kimran](https://discourse.julialang.org/u/kimran)\
**Replies:** 5\
**Last updated:** [June 19, 2017, 10:58am UTC](https://discourse.julialang.org/t/atom-stackoverflowerror/4115 "2017-06-19T10:58:27Z")

</div>

I get the following error in Atom (using julia 0.5.2 and the latest uber-juno and Atom versions), such that I cannot do anything non-basic (anything except arithmetic, almost) in Atom Sorry, the error message is super l…

---

## [REPL error](https://discourse.julialang.org/t/repl-error/4319)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 13\
**Last updated:** [June 18, 2017, 6:04pm UTC](https://discourse.julialang.org/t/repl-error/4319 "2017-06-18T18:04:08Z")

</div>

I get the following reproducible error with showing an object in REPL. The object itself is fine and no error shows up when I suppress the output with ; julia\> c = VTKDataTypes.VTKMultiblockData(\[a,b\]); julia\> c VTKDat…

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

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