# General Usage

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

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

**Page:** 1036

---

## [Interfacing Julia & Red + error with julia 0.6.rc3](https://discourse.julialang.org/t/interfacing-julia-red-error-with-julia-0-6-rc3/4180)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 11\
**Last updated:** [July 24, 2017, 6:14am UTC](https://discourse.julialang.org/t/interfacing-julia-red-error-with-julia-0-6-rc3/4180 "2017-07-24T06:14:10Z")

</div>

In my quests to a possible GUI toolkits I found Red that has an interesting GUI system though far from conventional. I asked a couple questions in Red gitter and several people started to be interested. Such that one per…

---

## [See code from \`@generated\` function](https://discourse.julialang.org/t/see-code-from-generated-function/5033)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 1\
**Last updated:** [July 24, 2017, 1:17am UTC](https://discourse.julialang.org/t/see-code-from-generated-function/5033 "2017-07-24T01:17:12Z")

</div>

Is there a way to see the generated code from @generated functions? Perhaps @generated\_expand similar to @macroexpand ? I know the documentation says in order to inspect the code, extract the body into another regular …

---

## [Why \`"hello"^true\` is allowed?](https://discourse.julialang.org/t/why-hello-true-is-allowed/4849)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 21\
**Last updated:** [July 23, 2017, 10:42pm UTC](https://discourse.julialang.org/t/why-hello-true-is-allowed/4849 "2017-07-23T22:42:12Z")

</div>

Is there a use case for the method "hello"^true? Why allow exponentiation with a Boolean?

---

## [Diagram with all Julia types?](https://discourse.julialang.org/t/diagram-with-all-julia-types/5018)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 8\
**Last updated:** [July 23, 2017, 1:18am UTC](https://discourse.julialang.org/t/diagram-with-all-julia-types/5018 "2017-07-23T01:18:07Z")

</div>

Hello. Is there any big diagram showing all Julia types together? I’ve found several partial diagrams such as But do you know where can find a diagram with all these (and more) together?

---

## [Specifying fft in standard fft call](https://discourse.julialang.org/t/specifying-fft-in-standard-fft-call/5023)

<div class="topic-metadata">

**Author:** [@standarddeviant](https://discourse.julialang.org/u/standarddeviant)\
**Replies:** 1\
**Last updated:** [July 22, 2017, 8:02pm UTC](https://discourse.julialang.org/t/specifying-fft-in-standard-fft-call/5023 "2017-07-22T20:02:10Z")

</div>

I feel like I’m missing something. I have a length 1024 vector and want to take the FFT of that vector. I would like to take a length 2048 FFT of that vector. Is the proper solution to zero-pad the vector manually, an…

---

## [Using ZeroRPC](https://discourse.julialang.org/t/using-zerorpc/5011)

<div class="topic-metadata">

**Author:** [@wilsontov](https://discourse.julialang.org/u/wilsontov)\
**Replies:** 5\
**Last updated:** [July 22, 2017, 7:39pm UTC](https://discourse.julialang.org/t/using-zerorpc/5011 "2017-07-22T19:39:06Z")

</div>

Has someone of you managed to use ZeroRPC in Julia? I found a library in GitHub, but I have not managed to use it: (

---

## [TensorFlow.jl how to use visualize?](https://discourse.julialang.org/t/tensorflow-jl-how-to-use-visualize/5017)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 4\
**Last updated:** [July 22, 2017, 6:54pm UTC](https://discourse.julialang.org/t/tensorflow-jl-how-to-use-visualize/5017 "2017-07-22T18:54:06Z")

</div>

I watched the juliacon video on TensorFlow.jl and found it quite cool. So I tried to reproduce the examples. In the video the visualize function is used… If I try to do the same thing on my machine I get an error howeve…

---

## [Possible to specify a test set as broken?](https://discourse.julialang.org/t/possible-to-specify-a-test-set-as-broken/5019)

<div class="topic-metadata">

**Author:** [@josefsachs](https://discourse.julialang.org/u/josefsachs)\
**Replies:** 1\
**Last updated:** [July 22, 2017, 6:44pm UTC](https://discourse.julialang.org/t/possible-to-specify-a-test-set-as-broken/5019 "2017-07-22T18:44:15Z")

</div>

I would like to specify a test set as broken, just as I can specify a test as broken with @test\_broken. Is there a way to do that?

---

## [Using \`view\` in 0.6 on a ragged array](https://discourse.julialang.org/t/using-view-in-0-6-on-a-ragged-array/4982)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 12\
**Last updated:** [July 22, 2017, 7:00am UTC](https://discourse.julialang.org/t/using-view-in-0-6-on-a-ragged-array/4982 "2017-07-22T07:00:40Z")

</div>

I have noticed that a particular calculation in the MixedModels package unexpectedly allocates a lot of storage. The method in question is around lines 340 to 350 of modelterms.jl. The calculation involves the columns…

---

## [Sudden errors on new install](https://discourse.julialang.org/t/sudden-errors-on-new-install/5008)

<div class="topic-metadata">

**Author:** [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Replies:** 1\
**Last updated:** [July 22, 2017, 6:19am UTC](https://discourse.julialang.org/t/sudden-errors-on-new-install/5008 "2017-07-22T06:19:09Z")

</div>

All of a sudden I started getting errors in Pkg.install. I wiped my ~/.julia/v0.6 directory and started reinstalling packages. When I got to GraphIO.jl, I hit this (same error as before my wipe): julia\> Pkg.add("GraphIO…

---

## [Strange things with plots, InspectDR](https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 4\
**Last updated:** [July 21, 2017, 9:48pm UTC](https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937 "2017-07-21T21:48:23Z")

</div>

Hi. I’m trying Plots.jl with several fast frameworks such as as GR and InspectDR. When I run this code using Plots inspectdr() plot(1:100,rand(100)) As you can see the Y-axis doesn’t show the numbers properly, in …

---

## [Problem with RCall's @rget](https://discourse.julialang.org/t/problem-with-rcalls-rget/5006)

<div class="topic-metadata">

**Author:** [@ko56](https://discourse.julialang.org/u/ko56)\
**Replies:** 2\
**Last updated:** [July 21, 2017, 8:23pm UTC](https://discourse.julialang.org/t/problem-with-rcalls-rget/5006 "2017-07-21T20:23:42Z")

</div>

I am using RCall (julia 0.6) with R 3.3.3. Specifically, the R package “bnlearn”. There seems to be some problem with importing a particular type of list structure from R: \> using RCall \> R"library(bnlearn)" \> R"data(…

---

## [Problem with let declaration v0.6](https://discourse.julialang.org/t/problem-with-let-declaration-v0-6/4998)

<div class="topic-metadata">

**Author:** [@harven](https://discourse.julialang.org/u/harven)\
**Replies:** 2\
**Last updated:** [July 21, 2017, 6:00pm UTC](https://discourse.julialang.org/t/problem-with-let-declaration-v0-6/4998 "2017-07-21T18:00:30Z")

</div>

I am pretty sure that the following code was working in julia v0.5. It is a simple recursive walk in a tree given by a root and a function children (the array of children of its argument). walk(root, children) = let…

---

## [Exporting already existing names](https://discourse.julialang.org/t/exporting-already-existing-names/4999)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 1\
**Last updated:** [July 21, 2017, 3:39pm UTC](https://discourse.julialang.org/t/exporting-already-existing-names/4999 "2017-07-21T15:39:32Z")

</div>

This is a very simple question, but it is the first time that I am confronting name clashing. Suppose I have a module that defines a custom dataframe type: module GeoStats using DataFrames struct GeoData{DF\<:AbstractD…

---

## [Testing if a symbol is a valid variable name](https://discourse.julialang.org/t/testing-if-a-symbol-is-a-valid-variable-name/4975)

<div class="topic-metadata">

**Author:** [@antoine-soubret](https://discourse.julialang.org/u/antoine-soubret)\
**Replies:** 2\
**Last updated:** [July 21, 2017, 11:00am UTC](https://discourse.julialang.org/t/testing-if-a-symbol-is-a-valid-variable-name/4975 "2017-07-21T11:00:05Z")

</div>

Hi, Is there a function I could use to test if a symbol is an allowed identifier to name a variable as defined in the documentation: https://docs.julialang.org/en/release-0.4/manual/variables/#allowed-variable-names. M…

---

## [Dealing with optional CUDA in package development](https://discourse.julialang.org/t/dealing-with-optional-cuda-in-package-development/4981)

<div class="topic-metadata">

**Author:** [@pearcemc](https://discourse.julialang.org/u/pearcemc)\
**Replies:** 5\
**Last updated:** [July 21, 2017, 10:20am UTC](https://discourse.julialang.org/t/dealing-with-optional-cuda-in-package-development/4981 "2017-07-21T10:20:49Z")

</div>

I’m developing a package with both GPU routines and a CPU fall-back. I have two related queries: How should I best determine if a CUDA device is available? What would be the best way to avoid forcing CUDA dependencies …

---

## [Comprehension not working in @generated function in v0.6](https://discourse.julialang.org/t/comprehension-not-working-in-generated-function-in-v0-6/4986)

<div class="topic-metadata">

**Author:** [@holger](https://discourse.julialang.org/u/holger)\
**Replies:** 3\
**Last updated:** [July 21, 2017, 5:07am UTC](https://discourse.julialang.org/t/comprehension-not-working-in-generated-function-in-v0-6/4986 "2017-07-21T05:07:42Z")

</div>

I upgraded from v0.5 to v0.6 and using a comprehension in a generated function gives the following error: generated function body is not pure. this likely means it contains a closure or comprehension. The following i…

---

## [Return type assertions with type parameters](https://discourse.julialang.org/t/return-type-assertions-with-type-parameters/4984)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 1\
**Last updated:** [July 20, 2017, 8:48pm UTC](https://discourse.julialang.org/t/return-type-assertions-with-type-parameters/4984 "2017-07-20T20:48:13Z")

</div>

Today I noticed that f(x::T)::T where T = x # throws UndefVarError for T function f(x::T)::T where T x end # works Is this a bug?

---

## [How to call SymPy Python function linear\_eq\_to\_matrix](https://discourse.julialang.org/t/how-to-call-sympy-python-function-linear-eq-to-matrix/4960)

<div class="topic-metadata">

**Author:** [@jman87](https://discourse.julialang.org/u/jman87)\
**Replies:** 6\
**Last updated:** [July 20, 2017, 3:51pm UTC](https://discourse.julialang.org/t/how-to-call-sympy-python-function-linear-eq-to-matrix/4960 "2017-07-20T15:51:55Z")

</div>

I’m using SymPy in Julia to solve a system of equations and I would like to be able to call the SymPy function linear\_eq\_to\_matrix as documented on this page: http://docs.sympy.org/latest/modules/solvers/solveset.html I…

---

## [Sharing keyword args between functions](https://discourse.julialang.org/t/sharing-keyword-args-between-functions/4978)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 3\
**Last updated:** [July 20, 2017, 2:49pm UTC](https://discourse.julialang.org/t/sharing-keyword-args-between-functions/4978 "2017-07-20T14:49:18Z")

</div>

This is a style question, I already have a solution, just looking for opinions. Sometimes I find it convenient to specify defaults with keyword arguments for a couple of functions, which are then invoked by some other f…

---

## [Add a column of ints to a DataFrame of strings](https://discourse.julialang.org/t/add-a-column-of-ints-to-a-dataframe-of-strings/4976)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 2\
**Last updated:** [July 20, 2017, 1:19pm UTC](https://discourse.julialang.org/t/add-a-column-of-ints-to-a-dataframe-of-strings/4976 "2017-07-20T13:19:01Z")

</div>

How to add an int column to a DataFrame of strings? d = DataFrames.DataFrame(\[\["hello", "world"\]\], \[:strs\]) d\[:num\] = \[1,2\] gives an error: MethodError: Cannot convert an object of type Int64 to an object of type Str…

---

## [IJulia Password/Token Requirement](https://discourse.julialang.org/t/ijulia-password-token-requirement/4974)

<div class="topic-metadata">

**Author:** [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Replies:** 2\
**Last updated:** [July 20, 2017, 1:02pm UTC](https://discourse.julialang.org/t/ijulia-password-token-requirement/4974 "2017-07-20T13:02:21Z")

</div>

Recently I installed IJulia and discovered that it needed some sort of password or token, neither of which had I created or set. To save anybody else some time here is what I did to set it up. Check to see if you have…

---

## [Calling a struct as a function](https://discourse.julialang.org/t/calling-a-struct-as-a-function/4911)

<div class="topic-metadata">

**Author:** [@Trevor\_Black](https://discourse.julialang.org/u/Trevor_Black)\
**Replies:** 12\
**Last updated:** [July 20, 2017, 12:04pm UTC](https://discourse.julialang.org/t/calling-a-struct-as-a-function/4911 "2017-07-20T12:04:26Z")

</div>

I’m attempting to use Julia as a hardware description language (HDL). The idea is somewhere between Verilog and Matlab, which Electrical Engineers are both readily familiar with. Ideally, I would make the HDL as conven…

---

## [Dict key not found instead of type error?](https://discourse.julialang.org/t/dict-key-not-found-instead-of-type-error/4972)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 1\
**Last updated:** [July 20, 2017, 10:29am UTC](https://discourse.julialang.org/t/dict-key-not-found-instead-of-type-error/4972 "2017-07-20T10:29:07Z")

</div>

julia\> d = Dict(4 =\> "hola", 5 =\> "mundo") Dict{Int64,String} with 2 entries: 4 =\> "hola" 5 =\> "mundo" julia\> d\["wrong key type"\] ERROR: KeyError: key "wrong key type" not found Stacktrace: \[1\] getindex(::Dict{Int6…

---

## [Vscode syntax highlighter does not reload package changes](https://discourse.julialang.org/t/vscode-syntax-highlighter-does-not-reload-package-changes/4969)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 0\
**Last updated:** [July 20, 2017, 8:41am UTC](https://discourse.julialang.org/t/vscode-syntax-highlighter-does-not-reload-package-changes/4969 "2017-07-20T08:41:43Z")

</div>

Please see here: https://github.com/JuliaEditorSupport/julia-vscode/issues/210 If anyone knows a workaround …

---

## [HDF5 fails on Travis CI with Trusty; works with Precise](https://discourse.julialang.org/t/hdf5-fails-on-travis-ci-with-trusty-works-with-precise/4961)

<div class="topic-metadata">

**Author:** [@tuckermcclure](https://discourse.julialang.org/u/tuckermcclure)\
**Replies:** 3\
**Last updated:** [July 20, 2017, 7:10am UTC](https://discourse.julialang.org/t/hdf5-fails-on-travis-ci-with-trusty-works-with-precise/4961 "2017-07-20T07:10:16Z")

</div>

It looks like the HDF5 package is having trouble on Trusty Tahr on Travis CI, but it works with Precise Pangolin. I just started a package that depends on the HDF5.jl. I pushed my branch, enabled Travis CI, and it faile…

---

## [Finding the type used to contruct a parameterized type](https://discourse.julialang.org/t/finding-the-type-used-to-contruct-a-parameterized-type/4967)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 2\
**Last updated:** [July 20, 2017, 7:07am UTC](https://discourse.julialang.org/t/finding-the-type-used-to-contruct-a-parameterized-type/4967 "2017-07-20T07:07:53Z")

</div>

Suppose I have a type definition like type MyType{T} x::Vector{T} end Now say I have a variable of type MyType, but I don’t know what tye is used as T for it. How can I get the dataype T? I can’t do typeof(variab…

---

## [How to determine mutability at compile time](https://discourse.julialang.org/t/how-to-determine-mutability-at-compile-time/4957)

<div class="topic-metadata">

**Author:** [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Replies:** 4\
**Last updated:** [July 20, 2017, 4:35am UTC](https://discourse.julialang.org/t/how-to-determine-mutability-at-compile-time/4957 "2017-07-20T04:35:05Z")

</div>

I’m trying to write a function that will accept an argument that implements the AbstractArray interface. I’m finding that I need to write one implementation for mutable AbstractArrays and another for immutable AbstractA…

---

## [Julia vs Fortran complaint](https://discourse.julialang.org/t/julia-vs-fortran-complaint/4366)

<div class="topic-metadata">

**Author:** [@merl-dev](https://discourse.julialang.org/u/merl-dev)\
**Replies:** 25\
**Last updated:** [July 20, 2017, 3:21am UTC](https://discourse.julialang.org/t/julia-vs-fortran-complaint/4366 "2017-07-20T03:21:59Z")

</div>

A member of NAG made the following comments and I thought it might be of interest if someone more knowledgeable than myself from the Julia community could provide a response (the comments they made were in response to a …

---

## [Weird segmentation fault when ccalling a function](https://discourse.julialang.org/t/weird-segmentation-fault-when-ccalling-a-function/4959)

<div class="topic-metadata">

**Author:** [@giordano](https://discourse.julialang.org/u/giordano)\
**Replies:** 2\
**Last updated:** [July 19, 2017, 11:21pm UTC](https://discourse.julialang.org/t/weird-segmentation-fault-when-ccalling-a-function/4959 "2017-07-19T23:21:46Z")

</div>

An issue reporting a segmentation fault has been recently filed for Cuba.jl. The minimal way to reproduce the crash is the following: using Cuba integrand = (x,f) -\> f\[\] = cos(x\[\]) integral = Vector{Cdouble}(1) erro…

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

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