# General Usage

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

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

**Page:** 1025

---

## [Select the same method from different modules](https://discourse.julialang.org/t/select-the-same-method-from-different-modules/6112)

<div class="topic-metadata">

**Author:** [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Replies:** 3\
**Last updated:** [September 27, 2017, 2:20pm UTC](https://discourse.julialang.org/t/select-the-same-method-from-different-modules/6112 "2017-09-27T14:20:03Z")

</div>

Reposting this from the #helpdesk channel on Slack I am playing with a way of controlling which module a module should import some function from. Here’s an MWE: module Mod1 foo() = "success" export foo end module Mod2…

---

## [Is there a way to print a GLM.jl output table into a latex file in Julia?](https://discourse.julialang.org/t/is-there-a-way-to-print-a-glm-jl-output-table-into-a-latex-file-in-julia/6105)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 1\
**Last updated:** [September 27, 2017, 1:44pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-print-a-glm-jl-output-table-into-a-latex-file-in-julia/6105 "2017-09-27T13:44:22Z")

</div>

Question is in the headline. I remember that was possible in both R and STATA. What is the best way to get your results into your paper?

---

## [Typed and Untyped Comprehensions](https://discourse.julialang.org/t/typed-and-untyped-comprehensions/6108)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 5\
**Last updated:** [September 27, 2017, 9:52am UTC](https://discourse.julialang.org/t/typed-and-untyped-comprehensions/6108 "2017-09-27T09:52:47Z")

</div>

Hi everyone, What are typed and untyped comprehensions and what are syntax forms of those? Thanks in advance.

---

## [Rmath issues](https://discourse.julialang.org/t/rmath-issues/5984)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 2\
**Last updated:** [September 26, 2017, 9:43pm UTC](https://discourse.julialang.org/t/rmath-issues/5984 "2017-09-26T21:43:14Z")

</div>

I’m attempting to use julia 0.6 in my home directory, and when I try to install Rmath (for Gadfly, amongst other packages), I get the following error: INFO: Directory /home/gsimpson/.julia/v0.6/Rmath/deps/usr/lib alread…

---

## [Interpolating an empty string inside backticks](https://discourse.julialang.org/t/interpolating-an-empty-string-inside-backticks/2428)

<div class="topic-metadata">

**Author:** [@mbeltagy](https://discourse.julialang.org/u/mbeltagy)\
**Replies:** 2\
**Last updated:** [March 3, 2017, 8:19pm UTC](https://discourse.julialang.org/t/interpolating-an-empty-string-inside-backticks/2428 "2017-03-03T20:19:04Z")

</div>

Today I was a surprised by by this be this behavior a="-la" p=\`ls $a\` results in p equal ls -la which is expected. However, a="" p=\`ls $a\` results in p equal ls ''. The two single quote marks are a bit strange here.…

---

## [Calling SDL2 Functions in Julia](https://discourse.julialang.org/t/calling-sdl2-functions-in-julia/6075)

<div class="topic-metadata">

**Author:** [@LeftyGuitar](https://discourse.julialang.org/u/LeftyGuitar)\
**Replies:** 6\
**Last updated:** [September 26, 2017, 7:07pm UTC](https://discourse.julialang.org/t/calling-sdl2-functions-in-julia/6075 "2017-09-26T19:07:53Z")

</div>

I am trying to call some SDL2 functions from the SDL2.dll in Julia, but I keep getting unable to load error. I’m not sure what I’m doing wrong. I followed the help files in the calling C and Fortran help files. #flags c…

---

## [Multi-threading status?](https://discourse.julialang.org/t/multi-threading-status/6058)

<div class="topic-metadata">

**Author:** [@111](https://discourse.julialang.org/u/111)\
**Replies:** 1\
**Last updated:** [September 26, 2017, 3:39pm UTC](https://discourse.julialang.org/t/multi-threading-status/6058 "2017-09-26T15:39:07Z")

</div>

Since v0.5, julia natively support multi-threading. According to the docs, this is a experimental feature and might be changed some day. My questions are, what are the goals of multi-threading in julia? What it aim to b…

---

## [Interdependent libraries in BinDeps](https://discourse.julialang.org/t/interdependent-libraries-in-bindeps/6086)

<div class="topic-metadata">

**Author:** [@tbo](https://discourse.julialang.org/u/tbo)\
**Replies:** 0\
**Last updated:** [September 26, 2017, 1:11pm UTC](https://discourse.julialang.org/t/interdependent-libraries-in-bindeps/6086 "2017-09-26T13:11:11Z")

</div>

I am writing a wrapper for a library foo, which contains symbols from another helper library bar, but does not contain shared object dependencies to bar. My goal is to build and install both foo and bar within a single p…

---

## [Function erroring inside \`@testset\` but not outside](https://discourse.julialang.org/t/function-erroring-inside-testset-but-not-outside/6064)

<div class="topic-metadata">

**Author:** [@giordano](https://discourse.julialang.org/u/giordano)\
**Replies:** 3\
**Last updated:** [September 26, 2017, 12:36pm UTC](https://discourse.julialang.org/t/function-erroring-inside-testset-but-not-outside/6064 "2017-09-26T12:36:59Z")

</div>

On Julia master, this works: julia\> begin ptr = cfunction(x -\> x\*x, Cdouble, Tuple{Cdouble}) g(x) = ccall(ptr, Cdouble, (Cdouble,), x) g(3.0) end 9.0 but if this is wrapped in a @…

---

## [Conversion isna.(DataArray) to BitArray](https://discourse.julialang.org/t/conversion-isna-dataarray-to-bitarray/6078)

<div class="topic-metadata">

**Author:** [@abieler](https://discourse.julialang.org/u/abieler)\
**Replies:** 2\
**Last updated:** [September 26, 2017, 9:57am UTC](https://discourse.julialang.org/t/conversion-isna-dataarray-to-bitarray/6078 "2017-09-26T09:57:08Z")

</div>

Can someone explain the difference between the two examples below: (Julia v0.6 and DataFrames 0.10.1) flt = isna.(mydataframe\[:var\]) # -\> BitArray{1} inv\_flt = .!(flt) # -\> BitArray{1} # howev…

---

## [Any way to write a 2d array literal with single column, 0.6.0?](https://discourse.julialang.org/t/any-way-to-write-a-2d-array-literal-with-single-column-0-6-0/6069)

<div class="topic-metadata">

**Author:** [@Kurt\_Franke](https://discourse.julialang.org/u/Kurt_Franke)\
**Replies:** 3\
**Last updated:** [September 25, 2017, 7:53pm UTC](https://discourse.julialang.org/t/any-way-to-write-a-2d-array-literal-with-single-column-0-6-0/6069 "2017-09-25T19:53:46Z")

</div>

Hi, I am just looking at 0.6.0 and am having trouble with some old code. I have many places where I pass a literal, single column, 2d array. It seems that \[ a ; b \], \[ \[a\]; \[b\] \], vcat(\[3\],\[5\]) all produce 1D arrays. (…

---

## [Limited amount of fields in mutable struct with macros](https://discourse.julialang.org/t/limited-amount-of-fields-in-mutable-struct-with-macros/6061)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 8\
**Last updated:** [September 25, 2017, 3:50pm UTC](https://discourse.julialang.org/t/limited-amount-of-fields-in-mutable-struct-with-macros/6061 "2017-09-25T15:50:24Z")

</div>

Hello, First thanks for this community to be so active, it’s the first out of many problems I could not find a solution to! I am trying to create mutable structs with a rather large amount of fields ( ~30 ). These stru…

---

## [Working with ASCII strings](https://discourse.julialang.org/t/working-with-ascii-strings/6059)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [September 25, 2017, 1:22pm UTC](https://discourse.julialang.org/t/working-with-ascii-strings/6059 "2017-09-25T13:22:16Z")

</div>

I am processing very large files (~500GB), parsing integers, dates, and similar. I found that writing custom functions for this (along the lines of, eg, tryparsenext\_base10) really speeds up my code (2–20x). I found tha…

---

## [Ways of using constructor of a parametric type](https://discourse.julialang.org/t/ways-of-using-constructor-of-a-parametric-type/5944)

<div class="topic-metadata">

**Author:** [@julbinb](https://discourse.julialang.org/u/julbinb)\
**Replies:** 2\
**Last updated:** [September 25, 2017, 1:08pm UTC](https://discourse.julialang.org/t/ways-of-using-constructor-of-a-parametric-type/5944 "2017-09-25T13:08:57Z")

</div>

I noticed a strange behavior when using constructors of parametric types. If a constructor does not have constraints on type parameters, then both type inference and providing explicit type argument work: struct Foo{T}…

---

## [JLD , How to remove object from "file.jld"?](https://discourse.julialang.org/t/jld-how-to-remove-object-from-file-jld/6056)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 1\
**Last updated:** [September 25, 2017, 7:40am UTC](https://discourse.julialang.org/t/jld-how-to-remove-object-from-file-jld/6056 "2017-09-25T07:40:37Z")

</div>

How to remove object"A" from “file.jld” ? julia\> file=jldopen(“file.jld”,“r+”) Julia data file version 0.1.1: file.jld julia\> names(file) 0-element Array{String,1} julia\> write(file,“A”,A) julia\> write(file,“B”,B) …

---

## [How to optymaly to save strings in JLD ? What wrong?](https://discourse.julialang.org/t/how-to-optymaly-to-save-strings-in-jld-what-wrong/6051)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 7\
**Last updated:** [September 24, 2017, 6:50pm UTC](https://discourse.julialang.org/t/how-to-optymaly-to-save-strings-in-jld-what-wrong/6051 "2017-09-24T18:50:38Z")

</div>

i have long vecotr od srings, dane\[:,5\] 12245198 -element Array{Any,1}: “aa” “ac” “…” “ab” “aa” saved by writecsv(“file.txt”,string.(dane\[:,5\])) is only ±33 000 KB but saved by \`file = jldopen(“file.jld”,“w”) …

---

## [Add logo in documentation using Documenter](https://discourse.julialang.org/t/add-logo-in-documentation-using-documenter/6033)

<div class="topic-metadata">

**Author:** [@maxtremblay](https://discourse.julialang.org/u/maxtremblay)\
**Replies:** 4\
**Last updated:** [September 24, 2017, 9:10am UTC](https://discourse.julialang.org/t/add-logo-in-documentation-using-documenter/6033 "2017-09-24T09:10:31Z")

</div>

Hello, I searched through the documentation of Documenter.jl and I can’t find an easy (or any way in fact) to add my logo in the top corner of the documentation. Right now, my doc look like this But I want to put a…

---

## [Way to symbolically integrate function fit with table data?](https://discourse.julialang.org/t/way-to-symbolically-integrate-function-fit-with-table-data/4752)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 5\
**Last updated:** [September 24, 2017, 2:57am UTC](https://discourse.julialang.org/t/way-to-symbolically-integrate-function-fit-with-table-data/4752 "2017-09-24T02:57:17Z")

</div>

Is there a way to symbolically integrate a function fit with table data? …and not have it take more than O(seconds) // note: already using SymPy.jl, so can’t change that

---

## [MXNet.jl question](https://discourse.julialang.org/t/mxnet-jl-question/6036)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 2\
**Last updated:** [September 23, 2017, 2:19pm UTC](https://discourse.julialang.org/t/mxnet-jl-question/6036 "2017-09-23T14:19:14Z")

</div>

On the MXNet.jl page https://github.com/dmlc/MXNet.jl there appears the example code mlp = @mx.chain mx.Variable(:data) =\> mx.FullyConnected(name=:fc1, num\_hidden=128) =\> mx.Activation(name=:relu1, act\_t…

---

## [How to find first small letter?](https://discourse.julialang.org/t/how-to-find-first-small-letter/6049)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 2\
**Last updated:** [September 23, 2017, 11:53am UTC](https://discourse.julialang.org/t/how-to-find-first-small-letter/6049 "2017-09-23T11:53:31Z")

</div>

How to find first small letter ? In this D065\_1kt19 string ‘k’ . Length of first part is flexible. Paul

---

## [WeakKeyDict contains finalized elements?](https://discourse.julialang.org/t/weakkeydict-contains-finalized-elements/5868)

<div class="topic-metadata">

**Author:** [@thofma](https://discourse.julialang.org/u/thofma)\
**Replies:** 7\
**Last updated:** [September 23, 2017, 11:18am UTC](https://discourse.julialang.org/t/weakkeydict-contains-finalized-elements/5868 "2017-09-23T11:18:55Z")

</div>

I don’t know if this is intended, but it seems that WeakKeyDicts can contain objects, for which finalizers have been run: C = WeakKeyDict() mutable struct T a::BigInt f::Bool function T(a::BigInt) z = new(…

---

## [Spase by dense matrix product](https://discourse.julialang.org/t/spase-by-dense-matrix-product/6047)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 0\
**Last updated:** [September 23, 2017, 6:18am UTC](https://discourse.julialang.org/t/spase-by-dense-matrix-product/6047 "2017-09-23T06:18:30Z")

</div>

Can I ask if someone knows about sparse blas for Julia? I am particularly looking for multiplication of sparse and dense matrix? I have tried MKLSparse and https://github.com/dcjones/RecursiveSparseBlocks.jl. I am not su…

---

## [++ operator?](https://discourse.julialang.org/t/operator/6041)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [September 23, 2017, 4:17am UTC](https://discourse.julialang.org/t/operator/6041 "2017-09-23T04:17:14Z")

</div>

The documentation for master mentions an operator ++. I can see that it is parsed, but what does it do? I am aware of #11868, but other infix operators are also parsed (and left undefined), so I don’t see why ++ is ment…

---

## [Dict with Float64 and Int keys of the same value?](https://discourse.julialang.org/t/dict-with-float64-and-int-keys-of-the-same-value/6044)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 4\
**Last updated:** [September 23, 2017, 12:10am UTC](https://discourse.julialang.org/t/dict-with-float64-and-int-keys-of-the-same-value/6044 "2017-09-23T00:10:23Z")

</div>

d = Dict() d\[1.0\] = "hello" d\[1\] = "goodbye" print(d) # ==\> # Dict{Any,Any} with 1 entry: # 1 =\> "goodbye So 1.0 and 1 are treated as the same key. Although this behavior makes sense in some contexts, I wonder if the…

---

## [Catching ERROR (unhandled task failure): EOFError: read end of file](https://discourse.julialang.org/t/catching-error-unhandled-task-failure-eoferror-read-end-of-file/5089)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 2\
**Last updated:** [September 22, 2017, 11:41pm UTC](https://discourse.julialang.org/t/catching-error-unhandled-task-failure-eoferror-read-end-of-file/5089 "2017-09-22T23:41:56Z")

</div>

Hello, i am asynchronously reading data in several processes and then after being loaded and preprocessed, I copy them to the master process. Unfortunately I sometimes get ERROR (unhandled task failure): EOFError: rea…

---

## [Compile-time constants](https://discourse.julialang.org/t/compile-time-constants/6039)

<div class="topic-metadata">

**Author:** [@foobar\_lv](https://discourse.julialang.org/u/foobar_lv)\
**Replies:** 6\
**Last updated:** [September 22, 2017, 11:09pm UTC](https://discourse.julialang.org/t/compile-time-constants/6039 "2017-09-22T23:09:25Z")

</div>

How does one get actual constants in julia? “actual constant” meaning behavior like #define. As far as I understood, “const” means “constant type”, not “constant value”, i.e. you can dereference or modify constants. This…

---

## [Module name, type name collision](https://discourse.julialang.org/t/module-name-type-name-collision/3012)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 8\
**Last updated:** [September 22, 2017, 8:36pm UTC](https://discourse.julialang.org/t/module-name-type-name-collision/3012 "2017-09-22T20:36:55Z")

</div>

module A type A … end end will give an error that A is being redefined. I was just curious as to why. I expect it’s because it’s difficult to disambiguate in some situations. Just curious and I couldn’t find any …

---

## [Union of types in arguments of function](https://discourse.julialang.org/t/union-of-types-in-arguments-of-function/6022)

<div class="topic-metadata">

**Author:** [@plapplop](https://discourse.julialang.org/u/plapplop)\
**Replies:** 8\
**Last updated:** [September 22, 2017, 8:30pm UTC](https://discourse.julialang.org/t/union-of-types-in-arguments-of-function/6022 "2017-09-22T20:30:53Z")

</div>

I had a code working in Julia 0.5 that was designed a bit specially for historical reasons: function f{P,Q}(x::Union{P,Q}) return x end type P a::Int end type Q b::Float64 end p = P(1) q = Q(2.0) f(p) f(q) I want this …

---

## [Cairo build fails on 0.6.0 (Windows)](https://discourse.julialang.org/t/cairo-build-fails-on-0-6-0-windows/5440)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 8\
**Last updated:** [September 22, 2017, 6:23pm UTC](https://discourse.julialang.org/t/cairo-build-fails-on-0-6-0-windows/5440 "2017-09-22T18:23:26Z")

</div>

I am running Julia 0.6.0 under Windows 10. After Pkg.update() I am getting an error when I try to use Gadfly. I traced the problem to Cairo: julia\> Pkg.build("Cairo") INFO: Building WinRPM WARNING: Compat.KERNEL is dep…

---

## [Usable shell on Windows (yay!)](https://discourse.julialang.org/t/usable-shell-on-windows-yay/5988)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 9\
**Last updated:** [September 22, 2017, 12:41pm UTC](https://discourse.julialang.org/t/usable-shell-on-windows-yay/5988 "2017-09-22T12:41:04Z")

</div>

You might know about it already, but in case you don’t: the git bash is very usable with Julia. (The default on Windows is for Julia to run in a normal Windows terminal, which means the shell commands don’t work as ex…

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

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