# General Usage

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

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

**Page:** 934

---

## [Plots font rotation](https://discourse.julialang.org/t/plots-font-rotation/15784)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 1\
**Last updated:** [October 2, 2018, 12:24pm UTC](https://discourse.julialang.org/t/plots-font-rotation/15784 "2018-10-02T12:24:29Z")

</div>

I’m trying to rotate the xtick labels using Plots.jl I have tried fo = font(10, "Courier") fo.rotation = 90 plot(randn(10), xtickfont=fo) # Does nothing plot(randn(10), rotation = 90) # Rotates also ytick labels which…

---

## [Problem with cat()](https://discourse.julialang.org/t/problem-with-cat/15750)

<div class="topic-metadata">

**Author:** [@judober](https://discourse.julialang.org/u/judober)\
**Replies:** 9\
**Last updated:** [October 2, 2018, 12:08pm UTC](https://discourse.julialang.org/t/problem-with-cat/15750 "2018-10-02T12:08:06Z")

</div>

Hello, I’m relatively new to julia, so I’m not sure if the observed behavior is intended or a bug. I want to concatenate a three-dimensional array as in this simple example: julia\> cat(ones(3,1,1000)..., dims=2) 1×300…

---

## [Iterating over cols, vcat, repeat?](https://discourse.julialang.org/t/iterating-over-cols-vcat-repeat/15659)

<div class="topic-metadata">

**Author:** [@qsong](https://discourse.julialang.org/u/qsong)\
**Replies:** 7\
**Last updated:** [October 2, 2018, 8:23am UTC](https://discourse.julialang.org/t/iterating-over-cols-vcat-repeat/15659 "2018-10-02T08:23:38Z")

</div>

I come from R world here for performance. @time shows that (123.55 k allocations: 6.260 MiB) for the below code. It seems more allocations than my expectation. So I was wondering if there be some improvement with the cod…

---

## [Using Package in startup.jl causes build problems](https://discourse.julialang.org/t/using-package-in-startup-jl-causes-build-problems/15721)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 2\
**Last updated:** [October 2, 2018, 8:05am UTC](https://discourse.julialang.org/t/using-package-in-startup-jl-causes-build-problems/15721 "2018-10-02T08:05:39Z")

</div>

I have a bunch of using statements in my startup.jl. It seems this is causing problems when other packages are building. An example below. If I remove using Plots from startup.jlthe problem goes away. I remember having t…

---

## [Using hcat with splatting on arrays of different lengths kills Julia](https://discourse.julialang.org/t/using-hcat-with-splatting-on-arrays-of-different-lengths-kills-julia/15733)

<div class="topic-metadata">

**Author:** [@janfrancu](https://discourse.julialang.org/u/janfrancu)\
**Replies:** 2\
**Last updated:** [October 2, 2018, 7:48am UTC](https://discourse.julialang.org/t/using-hcat-with-splatting-on-arrays-of-different-lengths-kills-julia/15733 "2018-10-02T07:48:19Z")

</div>

In my current project I have this workflow of creating a lot of 1D arrays, hcat-ing into a matrix and then transforming into a sparse representation, as shown bellow (without the sparse call). function getData(n::Int) …

---

## [Location of package wrt test script](https://discourse.julialang.org/t/location-of-package-wrt-test-script/10475)

<div class="topic-metadata">

**Author:** [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Replies:** 5\
**Last updated:** [October 2, 2018, 7:11am UTC](https://discourse.julialang.org/t/location-of-package-wrt-test-script/10475 "2018-10-02T07:11:19Z")

</div>

I want to develop a private package (for a few years before releasing it on github). I was wondering what the best workflow is. I checked workflow, I understand what it says except that it does not mention where the Tmp.…

---

## [Crash using Channels/Conditions with @threads](https://discourse.julialang.org/t/crash-using-channels-conditions-with-threads/15730)

<div class="topic-metadata">

**Author:** [@orenbenkiki](https://discourse.julialang.org/u/orenbenkiki)\
**Replies:** 2\
**Last updated:** [October 2, 2018, 6:43am UTC](https://discourse.julialang.org/t/crash-using-channels-conditions-with-threads/15730 "2018-10-02T06:43:28Z")

</div>

Following up on Recommended way to do work stealing in Julia, I have tried writing a small scheduler myself and uploaded it to Github. The scheduler itself isn’t the point of the project - it is meant to be an internal …

---

## [Lazy generators](https://discourse.julialang.org/t/lazy-generators/15571)

<div class="topic-metadata">

**Author:** [@christianl](https://discourse.julialang.org/u/christianl)\
**Replies:** 5\
**Last updated:** [October 2, 2018, 5:00am UTC](https://discourse.julialang.org/t/lazy-generators/15571 "2018-10-02T05:00:06Z")

</div>

Hello Julia Community, I like to translate a chunked file loader that uses generators to Julia. The idea is to implement it in a most lazy way that triggers the execution and continuation of the costly file-loading only…

---

## [Performance regression in 1.0.1](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 5\
**Last updated:** [October 2, 2018, 3:28am UTC](https://discourse.julialang.org/t/performance-regression-in-1-0-1/15763 "2018-10-02T03:28:43Z")

</div>

One of my programs which took 1mn on 1.0.0 takes 5mn on 1.0.1 I tracked at least part of the problem to the following code snippet: function foo(gens,elts::Vararg{Vector{Int}}) ee=collect(elts) for i in eachindex(g…

---

## [Is there a caching system in Julia?](https://discourse.julialang.org/t/is-there-a-caching-system-in-julia/15729)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 3\
**Last updated:** [October 2, 2018, 3:01am UTC](https://discourse.julialang.org/t/is-there-a-caching-system-in-julia/15729 "2018-10-02T03:01:00Z")

</div>

In Elixir there’s something called ETS which is basically a caching system, I was wondering if there’s something like that in Julia?

---

## [Which autodiff to currently use for a neural network backend?](https://discourse.julialang.org/t/which-autodiff-to-currently-use-for-a-neural-network-backend/15179)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 10\
**Last updated:** [October 1, 2018, 5:08pm UTC](https://discourse.julialang.org/t/which-autodiff-to-currently-use-for-a-neural-network-backend/15179 "2018-10-01T17:08:14Z")

</div>

Dear community, I’ve been trying out some of the different autodiff packages out there. I’ve run some tests and simulations on the type of problem that I’m addressing. Basically neural networks with high dimensional inp…

---

## [What is the fastest data type out of these?](https://discourse.julialang.org/t/what-is-the-fastest-data-type-out-of-these/15727)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 18\
**Last updated:** [October 1, 2018, 4:35pm UTC](https://discourse.julialang.org/t/what-is-the-fastest-data-type-out-of-these/15727 "2018-10-01T16:35:19Z")

</div>

What’s the faster data types out of: Dict Set Is there any data type there that is faster than both? I would really like to know, thank you.

---

## [Iterating over two vectors with vcat is faster than Iterators.flatten and CatViews?](https://discourse.julialang.org/t/iterating-over-two-vectors-with-vcat-is-faster-than-iterators-flatten-and-catviews/15698)

<div class="topic-metadata">

**Author:** [@control13](https://discourse.julialang.org/u/control13)\
**Replies:** 10\
**Last updated:** [October 1, 2018, 4:07pm UTC](https://discourse.julialang.org/t/iterating-over-two-vectors-with-vcat-is-faster-than-iterators-flatten-and-catviews/15698 "2018-10-01T16:07:14Z")

</div>

Hey, I have two independant vectors, which change in size over time, but sometimes I need to iterate over them both. I tried vcat, Iterators.flatten and CatViews and vcat needs the least amount of runtime and memory, qu…

---

## [Dependency constraints in packages](https://discourse.julialang.org/t/dependency-constraints-in-packages/15739)

<div class="topic-metadata">

**Author:** [@saschatimme](https://discourse.julialang.org/u/saschatimme)\
**Replies:** 0\
**Last updated:** [October 1, 2018, 2:34pm UTC](https://discourse.julialang.org/t/dependency-constraints-in-packages/15739 "2018-10-01T14:34:34Z")

</div>

Julia packages traditionally only list minimal versions for dependencies. Mainly for the reason that the old Pkg only knew one global environment which yielded many conflicts. I assumed that with the new Pkg these kinds…

---

## [Are Julia Arrays double pointers?](https://discourse.julialang.org/t/are-julia-arrays-double-pointers/15732)

<div class="topic-metadata">

**Author:** [@jacob](https://discourse.julialang.org/u/jacob)\
**Replies:** 8\
**Last updated:** [October 1, 2018, 2:12pm UTC](https://discourse.julialang.org/t/are-julia-arrays-double-pointers/15732 "2018-10-01T14:12:07Z")

</div>

When you have a immutable struct struct A a::Array{Float64, 1} end b = A(\[1,2,3\]) then you can do A.a\[2\] = 5. Ok, I understand that this is possible as you just mutate the object which A.a is pointing to, you do no…

---

## [Configurable system for biomedical time series processing](https://discourse.julialang.org/t/configurable-system-for-biomedical-time-series-processing/15467)

<div class="topic-metadata">

**Author:** [@sairus7](https://discourse.julialang.org/u/sairus7)\
**Replies:** 5\
**Last updated:** [October 1, 2018, 1:49pm UTC](https://discourse.julialang.org/t/configurable-system-for-biomedical-time-series-processing/15467 "2018-10-01T13:49:07Z")

</div>

I am working on an application that performs analysis of long-term multichannel biomedical signals coming from different sensors. The core of such application is made with: I. Data Array buffers and storage for streami…

---

## [ERROR: Unsatisfiable requirements detected for package CUDNN \[161a31e8\]](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-cudnn-161a31e8/15716)

<div class="topic-metadata">

**Author:** [@lannisite110](https://discourse.julialang.org/u/lannisite110)\
**Replies:** 4\
**Last updated:** [October 1, 2018, 1:33pm UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-cudnn-161a31e8/15716 "2018-10-01T13:33:17Z")

</div>

I’m running a project which need libs CUDNN and CUDArt. When i add them in julia\_1.0, i find a error like the following. i don’t understant what happened to this. And i search it in google, but i get nothing. I need your…

---

## [Whitelist/Blacklist for captured variable](https://discourse.julialang.org/t/whitelist-blacklist-for-captured-variable/15714)

<div class="topic-metadata">

**Author:** [@qsong](https://discourse.julialang.org/u/qsong)\
**Replies:** 3\
**Last updated:** [October 1, 2018, 1:21pm UTC](https://discourse.julialang.org/t/whitelist-blacklist-for-captured-variable/15714 "2018-10-01T13:21:07Z")

</div>

While doing do block, I pay attention to the variables captured by the closure. I tried some example in the manual and the previous discussions (like recent thread ) and found no let needed in some cases. As I don’t know…

---

## [Do for loops capture by reference or by value](https://discourse.julialang.org/t/do-for-loops-capture-by-reference-or-by-value/15708)

<div class="topic-metadata">

**Author:** [@Gregory\_Martinez](https://discourse.julialang.org/u/Gregory_Martinez)\
**Replies:** 9\
**Last updated:** [October 1, 2018, 12:08pm UTC](https://discourse.julialang.org/t/do-for-loops-capture-by-reference-or-by-value/15708 "2018-10-01T12:08:50Z")

</div>

For range for loops in julia, is the element, “elm” in the for loop “for elm in vec ... end” captured by reference or value? In the following test bellow seems in indicate that it is captured by value where I declare a…

---

## [2 identical versions of the code: one allocates the other not, when accessing type-unstable tuple. Why?](https://discourse.julialang.org/t/2-identical-versions-of-the-code-one-allocates-the-other-not-when-accessing-type-unstable-tuple-why/15617)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 3\
**Last updated:** [October 1, 2018, 8:22am UTC](https://discourse.julialang.org/t/2-identical-versions-of-the-code-one-allocates-the-other-not-when-accessing-type-unstable-tuple-why/15617 "2018-10-01T08:22:42Z")

</div>

I am aware that the two versions have to be different somewhere. But where? I Can’t see it. Also, please excuse the “Not Minimal Enough” Minimal Working Example Summary So I am writing a very nice example that highligh…

---

## [Trying to import my package and I'm getting errors](https://discourse.julialang.org/t/trying-to-import-my-package-and-im-getting-errors/15694)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 3\
**Last updated:** [October 1, 2018, 4:42am UTC](https://discourse.julialang.org/t/trying-to-import-my-package-and-im-getting-errors/15694 "2018-10-01T04:42:28Z")

</div>

Hey, so I’m working on a package with a friend and I decided to test the package, I’ve uploaded it to Github and did Pkg.clone("REPO") Then I’ve imported the package and got this error This is how the Project.toml …

---

## [How to import a module and keep it's properties I saved in different file?](https://discourse.julialang.org/t/how-to-import-a-module-and-keep-its-properties-i-saved-in-different-file/15684)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 15\
**Last updated:** [September 30, 2018, 9:17pm UTC](https://discourse.julialang.org/t/how-to-import-a-module-and-keep-its-properties-i-saved-in-different-file/15684 "2018-09-30T21:17:06Z")

</div>

I got 3 files: Request.jl module Request setToken(t) = (global token = t) end Client.jl module Client include("../API/Request.jl") import .Request function init(token::String) # This function is being calle…

---

## [How would I keep module's properties if I set it's properties in other file?](https://discourse.julialang.org/t/how-would-i-keep-modules-properties-if-i-set-its-properties-in-other-file/15703)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 3\
**Last updated:** [September 30, 2018, 8:04pm UTC](https://discourse.julialang.org/t/how-would-i-keep-modules-properties-if-i-set-its-properties-in-other-file/15703 "2018-09-30T20:04:11Z")

</div>

I’m bumping this question since 13 hours past and I didn’t get a reply. I got 3 files: Request.jl module Request setToken = (global token = t) end Client.jl module Client include("../API/Request.jl") import .…

---

## [Last row is broken when iterating an array](https://discourse.julialang.org/t/last-row-is-broken-when-iterating-an-array/15696)

<div class="topic-metadata">

**Author:** [@loleg](https://discourse.julialang.org/u/loleg)\
**Replies:** 4\
**Last updated:** [September 30, 2018, 4:33pm UTC](https://discourse.julialang.org/t/last-row-is-broken-when-iterating-an-array/15696 "2018-09-30T16:33:00Z")

</div>

When trying to load a CSV file and use a custom iterator over its columns, the last row is broken in Julia 1.0. I’ve had to update the iterator approach, but the basic code was working in 0.6. Yes, I did test this with n…

---

## [What is the proper way to construct CartesianIndices from CartesianIndex in Julia 1.0?](https://discourse.julialang.org/t/what-is-the-proper-way-to-construct-cartesianindices-from-cartesianindex-in-julia-1-0/15579)

<div class="topic-metadata">

**Author:** [@jwu](https://discourse.julialang.org/u/jwu)\
**Replies:** 4\
**Last updated:** [September 30, 2018, 2:52pm UTC](https://discourse.julialang.org/t/what-is-the-proper-way-to-construct-cartesianindices-from-cartesianindex-in-julia-1-0/15579 "2018-09-30T14:52:02Z")

</div>

It is recommended to use unit ranges to construct CartesianIndices, but isn’t it better to use CartesianIndex all the way down? Transforming to UnitRange make the code not quite clean. julia\> c1 = CartesianIndex((2,2)) …

---

## [Calling C and Fortran Code](https://discourse.julialang.org/t/calling-c-and-fortran-code/15665)

<div class="topic-metadata">

**Author:** [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Replies:** 7\
**Last updated:** [September 30, 2018, 10:50am UTC](https://discourse.julialang.org/t/calling-c-and-fortran-code/15665 "2018-09-30T10:50:05Z")

</div>

I am reading julia 1.0.0 manual. In chapter 17 page 300, it uses the following command to call Clock function from C but I get an error. I tried install Cxx but of no help. julia\> ccall((:clock, "libc"), Int32, ()) ERRO…

---

## [What is equivalent to class extend in Julia?](https://discourse.julialang.org/t/what-is-equivalent-to-class-extend-in-julia/15667)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 3\
**Last updated:** [September 29, 2018, 3:13pm UTC](https://discourse.julialang.org/t/what-is-equivalent-to-class-extend-in-julia/15667 "2018-09-29T15:13:10Z")

</div>

What’s equivalent to this: (This is javascript): class B extends classA { constructor() { super() // all the functions available in class A will be available for here without the need to write them again } } b…

---

## [How can i change variables of modules from other files or different modules?](https://discourse.julialang.org/t/how-can-i-change-variables-of-modules-from-other-files-or-different-modules/15661)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 12\
**Last updated:** [September 29, 2018, 1:29pm UTC](https://discourse.julialang.org/t/how-can-i-change-variables-of-modules-from-other-files-or-different-modules/15661 "2018-09-29T13:29:38Z")

</div>

Let’s say I got something like this: module a global test = "hi" end # Another file module b import a a.test = "bye" # ErrorException("cannot assign variables in other modules") end Looks like it’s impossible to ch…

---

## [New package tag not showing up in registry](https://discourse.julialang.org/t/new-package-tag-not-showing-up-in-registry/15608)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 3\
**Last updated:** [September 29, 2018, 11:39am UTC](https://discourse.julialang.org/t/new-package-tag-not-showing-up-in-registry/15608 "2018-09-29T11:39:12Z")

</div>

Hi all, I’ve updated a package so it is compatible with Julia v1.0 (the package is DependentBootstrap). I’ve tagged the latest version of the package, and if I navigate to the github webpage, the new tag (v1.0) shows up…

---

## [How can I push data to a Type when the data has more fields than I want](https://discourse.julialang.org/t/how-can-i-push-data-to-a-type-when-the-data-has-more-fields-than-i-want/15657)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 4\
**Last updated:** [September 29, 2018, 10:47am UTC](https://discourse.julialang.org/t/how-can-i-push-data-to-a-type-when-the-data-has-more-fields-than-i-want/15657 "2018-09-29T10:47:46Z")

</div>

I got this code: struct Test rest::String end function returnTest(args...) return Test(args...) end returnTest("This will be the rest string", "excess data", "some more uneeded") # How will it return Test("This wi…

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

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