# General Usage

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

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

**Page:** 880

---

## [Determine what "Type" to run, from a parameter file](https://discourse.julialang.org/t/determine-what-type-to-run-from-a-parameter-file/22671)

<div class="topic-metadata">

**Author:** [@Eric\_Chen](https://discourse.julialang.org/u/Eric_Chen)\
**Replies:** 4\
**Last updated:** [April 3, 2019, 12:25pm UTC](https://discourse.julialang.org/t/determine-what-type-to-run-from-a-parameter-file/22671 "2019-04-03T12:25:52Z")

</div>

I have a Text file that user specify an Ordered List of “operations” to perform. e.g. the text file contains operation name seperated by lines: Diff Zscore Variance In my code, I define those operations struct Diff \<:…

---

## [Adding logs to Base while debugging user code](https://discourse.julialang.org/t/adding-logs-to-base-while-debugging-user-code/22689)

<div class="topic-metadata">

**Author:** [@ksamtsak](https://discourse.julialang.org/u/ksamtsak)\
**Replies:** 1\
**Last updated:** [April 3, 2019, 12:23pm UTC](https://discourse.julialang.org/t/adding-logs-to-base-while-debugging-user-code/22689 "2019-04-03T12:23:24Z")

</div>

While debugging my code, I’d like to be able to examine what is going on in Base functions that are called by my code, by adding logging statements. However, changing code in ${INSTALL\_DIR}/share/julia/base and restartin…

---

## [Is it possible to add new variable bindings while debugging?](https://discourse.julialang.org/t/is-it-possible-to-add-new-variable-bindings-while-debugging/22686)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 2\
**Last updated:** [April 3, 2019, 11:24am UTC](https://discourse.julialang.org/t/is-it-possible-to-add-new-variable-bindings-while-debugging/22686 "2019-04-03T11:24:42Z")

</div>

Hi, the new debugging tools are just awesome. Thanks to all who have contributed to them!! Particularly, I am using the debugger in Juno and it works like a charm; I love it. One nice feature is that you cannot only in…

---

## [Help to debug PyCall plotting problem](https://discourse.julialang.org/t/help-to-debug-pycall-plotting-problem/22683)

<div class="topic-metadata">

**Author:** [@angelv](https://discourse.julialang.org/u/angelv)\
**Replies:** 2\
**Last updated:** [April 3, 2019, 10:38am UTC](https://discourse.julialang.org/t/help-to-debug-pycall-plotting-problem/22683 "2019-04-03T10:38:43Z")

</div>

Hi, first time using PyCall and I’m having problems generating plots with the Python package that I’m trying to use, but I’m not sure how to debug it. The Python package I want to use is called ChiantiPy (GitHub - chia…

---

## [Any benchmark of Julia v1.0 vs older versions](https://discourse.julialang.org/t/any-benchmark-of-julia-v1-0-vs-older-versions/13330)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 66\
**Last updated:** [April 3, 2019, 10:37am UTC](https://discourse.julialang.org/t/any-benchmark-of-julia-v1-0-vs-older-versions/13330 "2019-04-03T10:37:19Z")

</div>

Hello. Where can I find a comparison of the speed of Julia v1.0 vs other versions such as v0.7, v0.6, v0.5 or against other languages?

---

## [How many async tasks are still alive](https://discourse.julialang.org/t/how-many-async-tasks-are-still-alive/22668)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 10\
**Last updated:** [April 3, 2019, 7:29am UTC](https://discourse.julialang.org/t/how-many-async-tasks-are-still-alive/22668 "2019-04-03T07:29:02Z")

</div>

Is there a way to know at any one time in a session how many async threads (if any) are still running and (ideally) be able to recover the corresponding tasks as a variable we can use in a schedule(task, ...)? I’m aware…

---

## [Problem in auto-generated documentation with Documenter.jl](https://discourse.julialang.org/t/problem-in-auto-generated-documentation-with-documenter-jl/22676)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 2\
**Last updated:** [April 3, 2019, 7:20am UTC](https://discourse.julialang.org/t/problem-in-auto-generated-documentation-with-documenter-jl/22676 "2019-04-03T07:20:32Z")

</div>

I’m updating my package DiscretePredictors.jl to julia 1.0 from julia 0.6.4. I fixed all deprecations and is using Documenter.jl for generating documentation. When the documentation is generated, I found that some func…

---

## [\[Julia 1.0.2\] indexing into UnitRange buggy? (1:4)\[6:4\] == 6:5](https://discourse.julialang.org/t/julia-1-0-2-indexing-into-unitrange-buggy-1-4-6-4-6-5/22661)

<div class="topic-metadata">

**Author:** [@rapus95](https://discourse.julialang.org/u/rapus95)\
**Replies:** 3\
**Last updated:** [April 3, 2019, 5:04am UTC](https://discourse.julialang.org/t/julia-1-0-2-indexing-into-unitrange-buggy-1-4-6-4-6-5/22661 "2019-04-03T05:04:48Z")

</div>

I was trying to index using a UnitRange like list\[2:end\] then was curious what gonna be happen when my List only has length 1. Thus I began testing with a UnitRange as list which led me to the following strange behaviour…

---

## [JuliaDB won't show data!](https://discourse.julialang.org/t/juliadb-wont-show-data/22664)

<div class="topic-metadata">

**Author:** [@alphasig329](https://discourse.julialang.org/u/alphasig329)\
**Replies:** 2\
**Last updated:** [April 3, 2019, 12:28am UTC](https://discourse.julialang.org/t/juliadb-wont-show-data/22664 "2019-04-03T00:28:21Z")

</div>

I am trying to adapt some code from R to Julia and I am interested in utilizing JuliaDB. I have successfully loaded my data and have create some features. However I am trying to look at the head of the data, but I contin…

---

## [Simplest way to parallelize a while loop](https://discourse.julialang.org/t/simplest-way-to-parallelize-a-while-loop/22600)

<div class="topic-metadata">

**Author:** [@Adrien](https://discourse.julialang.org/u/Adrien)\
**Replies:** 2\
**Last updated:** [April 2, 2019, 7:09pm UTC](https://discourse.julialang.org/t/simplest-way-to-parallelize-a-while-loop/22600 "2019-04-02T19:09:24Z")

</div>

I’m wondering what’s the easiest way to multi-thread a code of the following form: L=\[someStuff\] while !isempty(L) current=pop!(L) #do some computations involving current if someConditionDependingOnThoseComp…

---

## [Checking out old versions of a package for development](https://discourse.julialang.org/t/checking-out-old-versions-of-a-package-for-development/22649)

<div class="topic-metadata">

**Author:** [@coroa](https://discourse.julialang.org/u/coroa)\
**Replies:** 0\
**Last updated:** [April 2, 2019, 6:11pm UTC](https://discourse.julialang.org/t/checking-out-old-versions-of-a-package-for-development/22649 "2019-04-02T18:11:27Z")

</div>

I started fixing some functionality in JuMP.jl today, which is currently transitioning between two stable versions 0.18.5 and 0.19. Some packages like PowerModels.jl are still stuck on the old 0.18 release. I expected \]…

---

## [Equalities comparison in local scopes](https://discourse.julialang.org/t/equalities-comparison-in-local-scopes/22634)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 2\
**Last updated:** [April 2, 2019, 3:51pm UTC](https://discourse.julialang.org/t/equalities-comparison-in-local-scopes/22634 "2019-04-02T15:51:46Z")

</div>

Not sure the title captures it adequately, but something that came out of a recent Slack discussion: a = "a" @show a === "a" # true for \_ in 1:1 @show a === "a" # false @show a .=== "a" # true end Is this inten…

---

## [Running into a deprecation while assigning variables and constraints in JuMP (v0.18.5) on Julia (0.7.0)](https://discourse.julialang.org/t/running-into-a-deprecation-while-assigning-variables-and-constraints-in-jump-v0-18-5-on-julia-0-7-0/22635)

<div class="topic-metadata">

**Author:** [@Lonewolf92](https://discourse.julialang.org/u/Lonewolf92)\
**Replies:** 4\
**Last updated:** [April 2, 2019, 2:26pm UTC](https://discourse.julialang.org/t/running-into-a-deprecation-while-assigning-variables-and-constraints-in-jump-v0-18-5-on-julia-0-7-0/22635 "2019-04-02T14:26:48Z")

</div>

A deprecation warning is thrown when i add my variables or constraints for my optimization problem. The warning is : ┌ Warning: Deprecated syntax implicit assignment to global variable #20###368\`\`. │ Use global #20###3…

---

## [Crash with circular reference](https://discourse.julialang.org/t/crash-with-circular-reference/22631)

<div class="topic-metadata">

**Author:** [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Replies:** 3\
**Last updated:** [April 2, 2019, 1:35pm UTC](https://discourse.julialang.org/t/crash-with-circular-reference/22631 "2019-04-02T13:35:09Z")

</div>

I occasionally (randomly) get a crash that output an error like: Allocations: 135799378 (Pool: 135777856; Big: 21522); GC: 288 \<?#0x11b44c4c0::\<circular reference @-1\>\> 0x1268b5000: Queued root: 0x115864430 :: 0x10a7648…

---

## [Custom array to simulate multidimensional indexing for SparseMatrixCSC: which functions to extend?](https://discourse.julialang.org/t/custom-array-to-simulate-multidimensional-indexing-for-sparsematrixcsc-which-functions-to-extend/22633)

<div class="topic-metadata">

**Author:** [@ksamtsak](https://discourse.julialang.org/u/ksamtsak)\
**Replies:** 5\
**Last updated:** [April 2, 2019, 12:37pm UTC](https://discourse.julialang.org/t/custom-array-to-simulate-multidimensional-indexing-for-sparsematrixcsc-which-functions-to-extend/22633 "2019-04-02T12:37:50Z")

</div>

I am building a custom array type to emulate indexing in a special-case multidimensional sparse tensor. My type is backed by a SparseMatrixCSC and exposes a Nsum-dimensional interface, where the dimensions are in 2 grou…

---

## [Matrix Design in Julia 1.1.0](https://discourse.julialang.org/t/matrix-design-in-julia-1-1-0/22613)

<div class="topic-metadata">

**Author:** [@Aquaman](https://discourse.julialang.org/u/Aquaman)\
**Replies:** 10\
**Last updated:** [April 2, 2019, 10:09am UTC](https://discourse.julialang.org/t/matrix-design-in-julia-1-1-0/22613 "2019-04-02T10:09:58Z")

</div>

Dear All, I want to know that how can we get such a matrix in Julia: i.e. MM1=zeros(Float64,2,2,2) . .. many lines of code . .. . .. if (a \> 10000) MM1\[3,:,:\]=rand(Float64,2,2) end in a large loop, the size of ma…

---

## [A way to get the current method?](https://discourse.julialang.org/t/a-way-to-get-the-current-method/22619)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 3\
**Last updated:** [April 2, 2019, 12:40am UTC](https://discourse.julialang.org/t/a-way-to-get-the-current-method/22619 "2019-04-02T00:40:01Z")

</div>

For reflection purposes, I’m curious if there’s a way to get the current method? Something like: function f(x) get\_current\_method() # would return the f(x) Method end function f(x,y) get\_current\_method() # wou…

---

## [Help with parametric definition (Unitful.jl)](https://discourse.julialang.org/t/help-with-parametric-definition-unitful-jl/22610)

<div class="topic-metadata">

**Author:** [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Replies:** 3\
**Last updated:** [April 1, 2019, 9:01pm UTC](https://discourse.julialang.org/t/help-with-parametric-definition-unitful-jl/22610 "2019-04-01T21:01:58Z")

</div>

I need some help with the definition of a function, using the unitful package. i know that the units have the dimensions inside the type, and i need to access that information. uniful.jl provides the function dimension…

---

## [Clear the variables](https://discourse.julialang.org/t/clear-the-variables/22608)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 1\
**Last updated:** [April 1, 2019, 6:49pm UTC](https://discourse.julialang.org/t/clear-the-variables/22608 "2019-04-01T18:49:27Z")

</div>

Hello Julia’s users, There is a command in Julia similar to “clear” in Matlab? Sometimes, I need to clear the variables of my computer when I am programming. Thanks a lot.

---

## [Why are vectorized operations faster in julia?](https://discourse.julialang.org/t/why-are-vectorized-operations-faster-in-julia/22603)

<div class="topic-metadata">

**Author:** [@sagartewari01](https://discourse.julialang.org/u/sagartewari01)\
**Replies:** 3\
**Last updated:** [April 1, 2019, 6:37pm UTC](https://discourse.julialang.org/t/why-are-vectorized-operations-faster-in-julia/22603 "2019-04-01T18:37:05Z")

</div>

In case of numpy, vectorization offloads heavy computation to the code in compiled libraries, improving speed. Julia by default compiles down to machine code, why then is this implementation of reduce operation faster th…

---

## [Idiomatic Julia for common inner constructor across multiple types](https://discourse.julialang.org/t/idiomatic-julia-for-common-inner-constructor-across-multiple-types/21423)

<div class="topic-metadata">

**Author:** [@kdheepak](https://discourse.julialang.org/u/kdheepak)\
**Replies:** 8\
**Last updated:** [April 1, 2019, 6:01pm UTC](https://discourse.julialang.org/t/idiomatic-julia-for-common-inner-constructor-across-multiple-types/21423 "2019-04-01T18:01:14Z")

</div>

Hi all. I have a large number of types that I need to implement in Julia that correspond to some C/CPP created memory. I’m able to use ccall to allocate the memory and the way this library is set up is that ccall then re…

---

## [Julia 1.1.0 kernel dies automatically](https://discourse.julialang.org/t/julia-1-1-0-kernel-dies-automatically/22604)

<div class="topic-metadata">

**Author:** [@Schlator\_Borgenson](https://discourse.julialang.org/u/Schlator_Borgenson)\
**Replies:** 0\
**Last updated:** [April 1, 2019, 4:20pm UTC](https://discourse.julialang.org/t/julia-1-1-0-kernel-dies-automatically/22604 "2019-04-01T16:20:08Z")

</div>

Unable to start a new Julia session because the kernel dies automatically. I have upgraded Julia 1.0.2 to Julia 1.1.0 and installed this newer kernel on Jupyter notebook using conda. I’m handicapped in a way as I don…

---

## [Running MPI jobs using MPI.jl Julia 1.1.0](https://discourse.julialang.org/t/running-mpi-jobs-using-mpi-jl-julia-1-1-0/22597)

<div class="topic-metadata">

**Author:** [@Aquaman](https://discourse.julialang.org/u/Aquaman)\
**Replies:** 7\
**Last updated:** [April 1, 2019, 3:50pm UTC](https://discourse.julialang.org/t/running-mpi-jobs-using-mpi-jl-julia-1-1-0/22597 "2019-04-01T15:50:19Z")

</div>

Hi, who knows that can we use MPI.jl for Julia 1.1.0 (no error, no bug) Best!

---

## [Plotting with Makie safe frames](https://discourse.julialang.org/t/plotting-with-makie-safe-frames/22450)

<div class="topic-metadata">

**Author:** [@Noobie76](https://discourse.julialang.org/u/Noobie76)\
**Replies:** 3\
**Last updated:** [April 1, 2019, 3:41pm UTC](https://discourse.julialang.org/t/plotting-with-makie-safe-frames/22450 "2019-04-01T15:41:32Z")

</div>

Hi there, I’m new in the world of Julia. At the moment I’m working on a little project developing a solver on my GPU. To plot my results I’m using Makie.jl since I’m working on the GPU anyway. So far I used the Makie.…

---

## [Can't push a function into a function array](https://discourse.julialang.org/t/cant-push-a-function-into-a-function-array/22588)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 11\
**Last updated:** [April 1, 2019, 11:51am UTC](https://discourse.julialang.org/t/cant-push-a-function-into-a-function-array/22588 "2019-04-01T11:51:22Z")

</div>

I am new to Julia. I am trying to initialize an array of functions, and add a function to it. This is my code: arr = Array{Function, 1} push!(arr, sin) And this is the error I’m getting MethodError: no method matchin…

---

## [Computational Speed](https://discourse.julialang.org/t/computational-speed/22572)

<div class="topic-metadata">

**Author:** [@Aquaman](https://discourse.julialang.org/u/Aquaman)\
**Replies:** 20\
**Last updated:** [April 1, 2019, 12:23pm UTC](https://discourse.julialang.org/t/computational-speed/22572 "2019-04-01T12:23:29Z")

</div>

Dear All, I have tested a simple benchmark: In Juno 1.1.0, windows using CPUTime CPUtic() MM=rand(Float64,10000,10000) mmm=inv(MM) CPUtoc() elapsed CPU time: 285.61 seconds However, in Matlab tic() MM=rand(10000…

---

## [Keyword function error inverts position of arguments?](https://discourse.julialang.org/t/keyword-function-error-inverts-position-of-arguments/22571)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 10\
**Last updated:** [April 1, 2019, 12:10pm UTC](https://discourse.julialang.org/t/keyword-function-error-inverts-position-of-arguments/22571 "2019-04-01T12:10:27Z")

</div>

I just spend a lot of time figuring out why this function here function solve(ncgm::NeoclassicalGrowth, vp::ValueCoeffs{T}; tol::Float64 = 1e-06, maxiter::Int = 5000, dampen::Float64 = 1, nskipprint::Int…

---

## [OpenBLAS: Julia slower than R](https://discourse.julialang.org/t/openblas-julia-slower-than-r/21594)

<div class="topic-metadata">

**Author:** [@pedro.rafae](https://discourse.julialang.org/u/pedro.rafae)\
**Replies:** 41\
**Last updated:** [March 26, 2019, 12:04pm UTC](https://discourse.julialang.org/t/openblas-julia-slower-than-r/21594 "2019-03-26T12:04:57Z")

</div>

Dear, I am not a programmer for Julia and so most likely my doubt is due to the little knowledge I have of Julia. On a computer, I tried to produce similar codes from the Julia and R languages and got a lower performanc…

---

## [Best package for simple drawings?](https://discourse.julialang.org/t/best-package-for-simple-drawings/22575)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 4\
**Last updated:** [April 1, 2019, 4:41am UTC](https://discourse.julialang.org/t/best-package-for-simple-drawings/22575 "2019-04-01T04:41:00Z")

</div>

I need to do a very simple drawing, with nothing more than lines and filled rectangles. My go-to for that sort of thing is generally cairo, but I was thinking that GR might be a good option too since it has a low level …

---

## [help modeling a problem](https://discourse.julialang.org/t/help-modeling-a-problem/22584)

<div class="topic-metadata">

**Author:** [@Matias\_Duran](https://discourse.julialang.org/u/Matias_Duran)\
**Replies:** 1\
**Last updated:** [April 1, 2019, 2:51am UTC](https://discourse.julialang.org/t/help-modeling-a-problem/22584 "2019-04-01T02:51:04Z")

</div>

Hello! im new using Julia and i was trying to modeling this: Julia \> import Pkg; Pkg.add(“JuMP”) Julia \> using JuMP Julia \> m = Model() Julia \> @variable(m, x1) Julia \> @variable(m, x2) Julia \> @variable(m, x3) Julia \> …

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

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