# General Usage

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

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

**Page:** 746

---

## [Can't get debugging breakpoint in the right frame](https://discourse.julialang.org/t/cant-get-debugging-breakpoint-in-the-right-frame/40613)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 0\
**Last updated:** [June 2, 2020, 1:56pm UTC](https://discourse.julialang.org/t/cant-get-debugging-breakpoint-in-the-right-frame/40613 "2020-06-02T13:56:48Z")

</div>

I’d like to interactively inspect the value of large struct at a certain point in the execution of my program. I am able to use JuliaInterpreter.jl to set a breakpoint, but it seems to be returning the wrong frame. Thi…

---

## [Performance issues - Comparison with Matlab](https://discourse.julialang.org/t/performance-issues-comparison-with-matlab/40592)

<div class="topic-metadata">

**Author:** [@axsano](https://discourse.julialang.org/u/axsano)\
**Replies:** 6\
**Last updated:** [June 2, 2020, 1:08pm UTC](https://discourse.julialang.org/t/performance-issues-comparison-with-matlab/40592 "2020-06-02T13:08:24Z")

</div>

I have the following example of Chebyshev polynomials differentiation matrix in Julia. function cheb(N) N==0 ? (return D=0.0; x=0.0) : (D=0.0; x=0.0) x = cos.(π\*(0:N)./N) c = \[2; ones(N-1); 2\].\*(-1).^(0:N) …

---

## [Libdl : libifport.so.5: cannot open shared object file: No such file or directory](https://discourse.julialang.org/t/libdl-libifport-so-5-cannot-open-shared-object-file-no-such-file-or-directory/40598)

<div class="topic-metadata">

**Author:** [@Lian\_Yunlong](https://discourse.julialang.org/u/Lian_Yunlong)\
**Replies:** 1\
**Last updated:** [June 2, 2020, 8:07am UTC](https://discourse.julialang.org/t/libdl-libifport-so-5-cannot-open-shared-object-file-no-such-file-or-directory/40598 "2020-06-02T08:07:14Z")

</div>

Hi everyone, I wanted to connect a dynamic library compiled by Intel ifort to Julia. The compilation part was no problem. I ran $ ifort -shared -fPIC tt.f90 -o tt.so and got tt.so. Then I moved it to /usr/lib/. Then …

---

## [Performance issues with constructors for arbitrary types](https://discourse.julialang.org/t/performance-issues-with-constructors-for-arbitrary-types/40590)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 4\
**Last updated:** [June 1, 2020, 11:24pm UTC](https://discourse.julialang.org/t/performance-issues-with-constructors-for-arbitrary-types/40590 "2020-06-01T23:24:11Z")

</div>

Hello all. I’ve been struggling now for a good while with a performance issue that seems it should be quite trivial to resolve, but so far, an elegant solution has eluded me. So, I have an object t::Table{T} which lazi…

---

## [Package update race](https://discourse.julialang.org/t/package-update-race/40584)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 0\
**Last updated:** [June 1, 2020, 9:55pm UTC](https://discourse.julialang.org/t/package-update-race/40584 "2020-06-01T21:55:52Z")

</div>

Time ago I asked something similar to this, but not exactly the same; and I still have some doubts about what is expected to happen when an environment has added two packages with a common dependency, in a situation like…

---

## [Speed of vectorized vs for-loops using Zygote](https://discourse.julialang.org/t/speed-of-vectorized-vs-for-loops-using-zygote/40556)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 20\
**Last updated:** [June 1, 2020, 9:27pm UTC](https://discourse.julialang.org/t/speed-of-vectorized-vs-for-loops-using-zygote/40556 "2020-06-01T21:27:50Z")

</div>

Hey, I’m using Zygote for a minimization problem. Actually, writing down the loss function in for-loops style is a factor of ~2 faster than using a vectorized function. I then need to take the derivative. Zygote fails …

---

## [Queryverse queries lose type information?](https://discourse.julialang.org/t/queryverse-queries-lose-type-information/40572)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 8\
**Last updated:** [June 1, 2020, 9:17pm UTC](https://discourse.julialang.org/t/queryverse-queries-lose-type-information/40572 "2020-06-01T21:17:47Z")

</div>

I’m working on a tutorial and have the following code: dflong2 = DataFrame(dflong |\> @mutate(year = tryparse(Int,String(\_.variable)\[end-3:end\]))) obviously I’m modifying the year column to be the result of trying to p…

---

## [Wrapping a library with enum in struct](https://discourse.julialang.org/t/wrapping-a-library-with-enum-in-struct/40582)

<div class="topic-metadata">

**Author:** [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Replies:** 0\
**Last updated:** [June 1, 2020, 8:47pm UTC](https://discourse.julialang.org/t/wrapping-a-library-with-enum-in-struct/40582 "2020-06-01T20:47:58Z")

</div>

I am trying to make a wrapper using Clang for a c library that has a struct that contains enum in field. Here is a MWE test.h for the struct: typedef struct { float a; enum {ONE, TWO} b; } Test; and Clang script: u…

---

## [Pwm for RPi GPIO](https://discourse.julialang.org/t/pwm-for-rpi-gpio/40568)

<div class="topic-metadata">

**Author:** [@gpapalambrou](https://discourse.julialang.org/u/gpapalambrou)\
**Replies:** 6\
**Last updated:** [June 1, 2020, 7:57pm UTC](https://discourse.julialang.org/t/pwm-for-rpi-gpio/40568 "2020-06-01T19:57:14Z")

</div>

I would appreciate some help on using PWM for RPi GPIOs. My Julia script is as follows: using PiGPIO red\_pin = 17 # GPIO17 = :11 p=Pi() PiGPIO.set\_PWM\_frequency(p, red\_pin, 50) # assume sample rate = 5 microsec. P…

---

## [\`Fraction{Numerator, Denominator}\`: existing package?](https://discourse.julialang.org/t/fraction-numerator-denominator-existing-package/40520)

<div class="topic-metadata">

**Author:** [@tkluck](https://discourse.julialang.org/u/tkluck)\
**Replies:** 2\
**Last updated:** [June 1, 2020, 6:54pm UTC](https://discourse.julialang.org/t/fraction-numerator-denominator-existing-package/40520 "2020-06-01T18:54:39Z")

</div>

Does anyone know of a package that offers a type like Rational but that allows different types for numerator and denominator, and types that are not necessarily \<: Integer?

---

## [What's the proper way to create and initialize a vector of vectors of matrices and vectors?](https://discourse.julialang.org/t/whats-the-proper-way-to-create-and-initialize-a-vector-of-vectors-of-matrices-and-vectors/40515)

<div class="topic-metadata">

**Author:** [@kai](https://discourse.julialang.org/u/kai)\
**Replies:** 8\
**Last updated:** [June 1, 2020, 6:04pm UTC](https://discourse.julialang.org/t/whats-the-proper-way-to-create-and-initialize-a-vector-of-vectors-of-matrices-and-vectors/40515 "2020-06-01T18:04:30Z")

</div>

Hi, I’m trying to create and initialize two objects: x will be a vector of vector of vectors, and y will be a vector of vector of matrices. I tried x =Vector{Vector{Vector{Float64}}}(undef, 5) y =Vector{Vector{Matrix{Fl…

---

## [Come up with an algorithm for play/pauseing a asynchronous process](https://discourse.julialang.org/t/come-up-with-an-algorithm-for-play-pauseing-a-asynchronous-process/40546)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 3\
**Last updated:** [June 1, 2020, 10:52am UTC](https://discourse.julialang.org/t/come-up-with-an-algorithm-for-play-pauseing-a-asynchronous-process/40546 "2020-06-01T10:52:13Z")

</div>

I’m trying (yet again) to build a video player/explorer in Julia. Everything is looking pretty good, but one hurdle is the play/pause functionality. I want to be able to control the play/pause with an observable (which i…

---

## [Improving Performance of For-Loop and Matrix Multiplication for Time Integration Solver](https://discourse.julialang.org/t/improving-performance-of-for-loop-and-matrix-multiplication-for-time-integration-solver/40432)

<div class="topic-metadata">

**Author:** [@PJoynt](https://discourse.julialang.org/u/PJoynt)\
**Replies:** 8\
**Last updated:** [June 1, 2020, 12:19am UTC](https://discourse.julialang.org/t/improving-performance-of-for-loop-and-matrix-multiplication-for-time-integration-solver/40432 "2020-06-01T00:19:55Z")

</div>

I am writing some code that performs a simple time-history integration solver (Newmark method for structural dynamics) and I looking for some suggestions in how I can improve the performance of my code. The below snippet…

---

## [\[documenter\] From Notebook to Markdown with docstrings?](https://discourse.julialang.org/t/documenter-from-notebook-to-markdown-with-docstrings/24657)

<div class="topic-metadata">

**Author:** [@timueh](https://discourse.julialang.org/u/timueh)\
**Replies:** 8\
**Last updated:** [May 31, 2020, 8:39pm UTC](https://discourse.julialang.org/t/documenter-from-notebook-to-markdown-with-docstrings/24657 "2020-05-31T20:39:27Z")

</div>

I am a big fan of documenter.jl! It lets you create beautiful documentations whilst still having full control over its code. Currently, I use the @example syntax extensively, but I would like to docstrings as they provid…

---

## [An confused error for the Marco for Expr to function](https://discourse.julialang.org/t/an-confused-error-for-the-marco-for-expr-to-function/40485)

<div class="topic-metadata">

**Author:** [@gangchern](https://discourse.julialang.org/u/gangchern)\
**Replies:** 4\
**Last updated:** [May 31, 2020, 3:07pm UTC](https://discourse.julialang.org/t/an-confused-error-for-the-marco-for-expr-to-function/40485 "2020-05-31T15:07:55Z")

</div>

I try to use the macro macro expr2fn(fname, expr, args...) fn = quote function $(esc(fname))() $(esc(expr.args\[1\])) end end for arg in args push!(fn.args\[2\].args\[1\].args, …

---

## [Function control flow](https://discourse.julialang.org/t/function-control-flow/39837)

<div class="topic-metadata">

**Author:** [@Joao\_Barata](https://discourse.julialang.org/u/Joao_Barata)\
**Replies:** 22\
**Last updated:** [May 31, 2020, 2:59pm UTC](https://discourse.julialang.org/t/function-control-flow/39837 "2020-05-31T14:59:11Z")

</div>

Hello guys, I am a very recent Julia programmer coming from matlab in search of performance. Right now, I am building an economics model which involves solving different problems for different agents in different circum…

---

## [Julia doesn't start in Atom(juno)](https://discourse.julialang.org/t/julia-doesnt-start-in-atom-juno/14705)

<div class="topic-metadata">

**Author:** [@Giovanna\_Abreu](https://discourse.julialang.org/u/Giovanna_Abreu)\
**Replies:** 11\
**Last updated:** [May 31, 2020, 12:45pm UTC](https://discourse.julialang.org/t/julia-doesnt-start-in-atom-juno/14705 "2020-05-31T12:45:42Z")

</div>

Hello everyone, I was programming in Julia then the Atom stopped work. I installed Julia and Atom with Juno on my machine (Windows 10) and it doesn’t work. I simply cannot start Julia from Juno. REPL shows the followin…

---

## [Evaluate string as variable](https://discourse.julialang.org/t/evaluate-string-as-variable/40504)

<div class="topic-metadata">

**Author:** [@POKIN\_CHAN](https://discourse.julialang.org/u/POKIN_CHAN)\
**Replies:** 2\
**Last updated:** [May 31, 2020, 11:06am UTC](https://discourse.julialang.org/t/evaluate-string-as-variable/40504 "2020-05-31T11:06:45Z")

</div>

In python, a = 3 eval(“a”) equals 3 Any Julia method similar to “eval()”? Thanks.

---

## [Sum over BigInt better performance without generator](https://discourse.julialang.org/t/sum-over-bigint-better-performance-without-generator/40332)

<div class="topic-metadata">

**Author:** [@bernb](https://discourse.julialang.org/u/bernb)\
**Replies:** 3\
**Last updated:** [May 31, 2020, 10:54am UTC](https://discourse.julialang.org/t/sum-over-bigint-better-performance-without-generator/40332 "2020-05-31T10:54:39Z")

</div>

I use the following script: using BenchmarkTools total\_gen(k) = sum(BigInt(2)^(n-1) for n in 1:k) total\_arr(k) = sum(\[BigInt(2)^(n-1) for n in 1:k\]) display(@benchmark total\_gen(10\_000)) display(@benchmark total\_arr(1…

---

## [Passing multiple arguments to a function](https://discourse.julialang.org/t/passing-multiple-arguments-to-a-function/40503)

<div class="topic-metadata">

**Author:** [@POKIN\_CHAN](https://discourse.julialang.org/u/POKIN_CHAN)\
**Replies:** 5\
**Last updated:** [May 31, 2020, 10:41am UTC](https://discourse.julialang.org/t/passing-multiple-arguments-to-a-function/40503 "2020-05-31T10:41:34Z")

</div>

In python, args ={"a":2 ,"c":1,"e":9} def test(a,c,e): print(a,c,e) test(\*\*args) My I know the similar way of passing arguments in Julia? Thanks

---

## [Default values for composite types in Julia](https://discourse.julialang.org/t/default-values-for-composite-types-in-julia/4479)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 8\
**Last updated:** [May 31, 2020, 2:56am UTC](https://discourse.julialang.org/t/default-values-for-composite-types-in-julia/4479 "2020-05-31T02:56:43Z")

</div>

In C++11, one can initialize the fields of a class to avoid boiler plate code. In Julia, I am currently typing every single combination of constructors in order to handle default values, for example: immutable GaussianV…

---

## [Question about the function "getcolumn" from Tables.jl](https://discourse.julialang.org/t/question-about-the-function-getcolumn-from-tables-jl/40489)

<div class="topic-metadata">

**Author:** [@kai](https://discourse.julialang.org/u/kai)\
**Replies:** 2\
**Last updated:** [May 31, 2020, 12:38am UTC](https://discourse.julialang.org/t/question-about-the-function-getcolumn-from-tables-jl/40489 "2020-05-31T00:38:42Z")

</div>

Hi, I’m trying to select a column from a table-like data set (it could be a database, a JuliaDB table and so on). In JuliaDB, this could be done using JuliaDB.select(dat, :var). But I want my package to be able to take …

---

## [Strange behaviour of REPL with EOT signal](https://discourse.julialang.org/t/strange-behaviour-of-repl-with-eot-signal/40483)

<div class="topic-metadata">

**Author:** [@lhp22](https://discourse.julialang.org/u/lhp22)\
**Replies:** 0\
**Last updated:** [May 30, 2020, 8:46pm UTC](https://discourse.julialang.org/t/strange-behaviour-of-repl-with-eot-signal/40483 "2020-05-30T20:46:24Z")

</div>

Hi there ! Here a minimal code : function test() i = 1 while true println("Input expected (n°$i)") readline(stdin) i+=1 end end main() = test() Then I run main() in the julia\> pr…

---

## [Create constructor for type without a default constructor](https://discourse.julialang.org/t/create-constructor-for-type-without-a-default-constructor/40475)

<div class="topic-metadata">

**Author:** [@irhum](https://discourse.julialang.org/u/irhum)\
**Replies:** 3\
**Last updated:** [May 30, 2020, 6:56pm UTC](https://discourse.julialang.org/t/create-constructor-for-type-without-a-default-constructor/40475 "2020-05-30T18:56:02Z")

</div>

Hi there, So suppose a function like function model() a=4 b=2 x -\> a\*x+b end then, mymodel = model() seems to be an instantiation of a n implicitly defined struct, and the type itself can be obtained with t…

---

## [Ntuple aggressive specialisation and boxed values](https://discourse.julialang.org/t/ntuple-aggressive-specialisation-and-boxed-values/40450)

<div class="topic-metadata">

**Author:** [@Ward9250](https://discourse.julialang.org/u/Ward9250)\
**Replies:** 4\
**Last updated:** [May 30, 2020, 5:28pm UTC](https://discourse.julialang.org/t/ntuple-aggressive-specialisation-and-boxed-values/40450 "2020-05-30T17:28:48Z")

</div>

Hi, Further to my questions on the General slack today I decided to do an experiment, pitting an NTuple based kmer type, against the existing BioSequences Mer types which are based on primitive types. Valentin advised …

---

## [TimeSeries Arrays in Julialang](https://discourse.julialang.org/t/timeseries-arrays-in-julialang/40144)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 2\
**Last updated:** [May 30, 2020, 1:33pm UTC](https://discourse.julialang.org/t/timeseries-arrays-in-julialang/40144 "2020-05-30T13:33:04Z")

</div>

I am just starting to develop some time series analysis in Julia, and I was trying to understand which time series array format is the current standard or the most used? I know this is a tough question, but let me try an…

---

## [Debugging diffeqpy code, remake not defined](https://discourse.julialang.org/t/debugging-diffeqpy-code-remake-not-defined/40421)

<div class="topic-metadata">

**Author:** [@Abolfazl\_Ziaeemehr](https://discourse.julialang.org/u/Abolfazl_Ziaeemehr)\
**Replies:** 1\
**Last updated:** [May 30, 2020, 5:10am UTC](https://discourse.julialang.org/t/debugging-diffeqpy-code-remake-not-defined/40421 "2020-05-30T05:10:09Z")

</div>

I am going to solve a system of SDE using diffeqpy and use EnsembleProblem. I don’t know why I am getting remake not defined error. The code run properly without EnsembleProblem. So I guess the problem should be in pr…

---

## [Use @eval within a function](https://discourse.julialang.org/t/use-eval-within-a-function/40451)

<div class="topic-metadata">

**Author:** [@Lucas\_Liu](https://discourse.julialang.org/u/Lucas_Liu)\
**Replies:** 4\
**Last updated:** [May 30, 2020, 2:41am UTC](https://discourse.julialang.org/t/use-eval-within-a-function/40451 "2020-05-30T02:41:58Z")

</div>

I am new to metaprograming in Julia. The case is I have many vectors to initialize in a constructor. I came up with this code function MyStruct(n::Int) vecs = \[:x, :y, :z, :p\] for v in vecs @eval $v = Ve…

---

## [Is the way, how to get array of value from the Dict by array of keys?](https://discourse.julialang.org/t/is-the-way-how-to-get-array-of-value-from-the-dict-by-array-of-keys/40436)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 2\
**Last updated:** [May 30, 2020, 1:34am UTC](https://discourse.julialang.org/t/is-the-way-how-to-get-array-of-value-from-the-dict-by-array-of-keys/40436 "2020-05-30T01:34:26Z")

</div>

Is the way, how to get an array of values from the Dict by array of keys? the same way as DataFrames works. For instance. a=Dict(1=\>"a",2="b",3=\>"c") a\[\[1,2\]\] gets \["a","b"\] thank you in advance.

---

## [Jupyterlab or nteract borks on vegalite plot, bug or something I'm doing wrong?](https://discourse.julialang.org/t/jupyterlab-or-nteract-borks-on-vegalite-plot-bug-or-something-im-doing-wrong/40443)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 0\
**Last updated:** [May 29, 2020, 10:33pm UTC](https://discourse.julialang.org/t/jupyterlab-or-nteract-borks-on-vegalite-plot-bug-or-something-im-doing-wrong/40443 "2020-05-29T22:33:54Z")

</div>

I’m trying out the simplest example I could think of in Jupyterlab and it borked… Is there something that I need to do to get vegalite plots to show up properly? (NOTE: it also borks in nteract) If I do this from the RE…

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

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