# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1385

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

**Page:** 1386

---

## [Plotting bug in VS Code plot pane](https://discourse.julialang.org/t/plotting-bug-in-vs-code-plot-pane/44695)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 6\
**Last updated:** [May 20, 2021, 11:00pm UTC](https://discourse.julialang.org/t/plotting-bug-in-vs-code-plot-pane/44695 "2021-05-20T23:00:04Z")

</div>

I am running on a server without sudo access. When I plot in VS Code (using ctrl-enter), I get the following error: julia\> p = plot(rand(100)) /home/affans/.julia/packages/GR/Atztx/src/../deps/gr/bin/gksqt: error wh…

---

## [Unable to Plot in REPL](https://discourse.julialang.org/t/unable-to-plot-in-repl/13535)

<div class="topic-metadata">

**Author:** [@hjohnston7](https://discourse.julialang.org/u/hjohnston7)\
**Replies:** 13\
**Last updated:** [May 20, 2021, 10:45pm UTC](https://discourse.julialang.org/t/unable-to-plot-in-repl/13535 "2021-05-20T22:45:09Z")

</div>

When I try to plot something in the Julia REPL, I am getting the following error messages. julia\> ENV\[“GRDIR”\] = “” “” julia\> using Pkg julia\> Pkg.build(“GR”) Building GR → “~/.julia/packages/GR/crXzk/deps/build.lo…

---

## [Unable to display plot using the REPL. GKS errors](https://discourse.julialang.org/t/unable-to-display-plot-using-the-repl-gks-errors/12826)

<div class="topic-metadata">

**Author:** [@DomCaron](https://discourse.julialang.org/u/DomCaron)\
**Replies:** 20\
**Last updated:** [May 20, 2021, 9:42pm UTC](https://discourse.julialang.org/t/unable-to-display-plot-using-the-repl-gks-errors/12826 "2021-05-20T21:42:36Z")

</div>

I recently changed my OS to Ubuntu on my laptop and reinstalled Julia. When trying to plot something, I have the following messages: julia\> using Plots julia\> plot(randn(20)) /home/dcaron/.julia/v0.6/GR/src/../deps/gr/…

---

## [Creating a function called \*\*](https://discourse.julialang.org/t/creating-a-function-called/61464)

<div class="topic-metadata">

**Author:** [@pg261](https://discourse.julialang.org/u/pg261)\
**Replies:** 10\
**Last updated:** [May 20, 2021, 9:22pm UTC](https://discourse.julialang.org/t/creating-a-function-called/61464 "2021-05-20T21:22:44Z")

</div>

Hi ! I’m trying to define an operator called \*\*, using something like function \*\*(a,b) return a+b+1 # or whatever end but Julia won’t let me – it’s just warning me that \*\* is not used for exponentiation. But \*\* is …

---

## [Counting automatically the number of arithmetic operations of a function](https://discourse.julialang.org/t/counting-automatically-the-number-of-arithmetic-operations-of-a-function/61538)

<div class="topic-metadata">

**Author:** [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Replies:** 3\
**Last updated:** [May 20, 2021, 9:22pm UTC](https://discourse.julialang.org/t/counting-automatically-the-number-of-arithmetic-operations-of-a-function/61538 "2021-05-20T21:22:30Z")

</div>

Hello, Say I have one function with hundreds of lines of code, with a few internal functions and perhaps with calls to some mathematical functions (sqrt, tan…). I’d like to know how many arithmetic operations (e.g. numb…

---

## [How to execute run(\`ls \*.pdb\`)?](https://discourse.julialang.org/t/how-to-execute-run-ls-pdb/61541)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 10\
**Last updated:** [May 20, 2021, 9:10pm UTC](https://discourse.julialang.org/t/how-to-execute-run-ls-pdb/61541 "2021-05-20T21:10:29Z")

</div>

How to run a command like this: julia\> run(\`ls \*.pdb\`) ERROR: LoadError: parsing command \`ls \*.pdb\`: special characters "#{}()\[\]\<\>|&\*?~;" must be quoted in commands and, since we are here, can that that error message b…

---

## [Plots and Shape?](https://discourse.julialang.org/t/plots-and-shape/61501)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 6\
**Last updated:** [May 20, 2021, 7:30pm UTC](https://discourse.julialang.org/t/plots-and-shape/61501 "2021-05-20T19:30:21Z")

</div>

I found the following code in this discourse (there seems to be a couple of versions of it): import Plots as plt ang = range(0, 2π, length = 60) ellipse(x, y, w, h) = plt.Shape(w\*sin.(ang).+x, h\*cos.(ang).+y) # Retur…

---

## [Imagine Julia running on this](https://discourse.julialang.org/t/imagine-julia-running-on-this/61378)

<div class="topic-metadata">

**Author:** [@mindaslab](https://discourse.julialang.org/u/mindaslab)\
**Replies:** 6\
**Last updated:** [May 20, 2021, 7:00pm UTC](https://discourse.julialang.org/t/imagine-julia-running-on-this/61378 "2021-05-20T19:00:41Z")

</div>

Imagine Julia running on this https://www.allaboutcircuits.com/news/mega-chip-packs-transistors-cores-one-huge-piece-of-silicon/ I hope one day it will. The reason is, as competition increases, this comput…

---

## [Zygote gradient results in slow Tuple getindex calls](https://discourse.julialang.org/t/zygote-gradient-results-in-slow-tuple-getindex-calls/48767)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 6\
**Last updated:** [May 20, 2021, 6:19pm UTC](https://discourse.julialang.org/t/zygote-gradient-results-in-slow-tuple-getindex-calls/48767 "2021-05-20T18:19:13Z")

</div>

Hey, I’m working on an optimization problem and I’m using Zygote to calculate the gradients (code). Initially a lot of the chain rules were implemented manually by code but then I switched so that Zygote can do this st…

---

## [Elaboration on Parametric Methods](https://discourse.julialang.org/t/elaboration-on-parametric-methods/61531)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 6:13pm UTC](https://discourse.julialang.org/t/elaboration-on-parametric-methods/61531 "2021-05-20T18:13:25Z")

</div>

I don’t fully grasp when you would use parametric types or abstract types in methods. Before posting my question, I did attempt to read and try and answer the question for myself. Consider the following code: abstract…

---

## [Rayleigh Test circular stats](https://discourse.julialang.org/t/rayleigh-test-circular-stats/60882)

<div class="topic-metadata">

**Author:** [@katdeane](https://discourse.julialang.org/u/katdeane)\
**Replies:** 5\
**Last updated:** [May 20, 2021, 6:12pm UTC](https://discourse.julialang.org/t/rayleigh-test-circular-stats/60882 "2021-05-20T18:12:30Z")

</div>

Dear Julia peeps, I am trying to relate brain activity to an amplitude modulated tone stimulus. As in, does the peak of brain activity occur in synchrony with the phase of the modulated tone? HypothesisTests.jl has this…

---

## [How do I create a 1,2,3 3x1 Matrix?](https://discourse.julialang.org/t/how-do-i-create-a-1-2-3-3x1-matrix/60855)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 21\
**Last updated:** [May 20, 2021, 5:24pm UTC](https://discourse.julialang.org/t/how-do-i-create-a-1-2-3-3x1-matrix/60855 "2021-05-20T17:24:37Z")

</div>

While introducing Arrays, I want to explain the difference in Julia between a normal column vector and a matrix with a single column… Is there a way to create a one-column matrix like b = collect(\[1 2 3\]') in a simpler w…

---

## [Slicing and merging of CartesianIndices](https://discourse.julialang.org/t/slicing-and-merging-of-cartesianindices/61519)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 4:28pm UTC](https://discourse.julialang.org/t/slicing-and-merging-of-cartesianindices/61519 "2021-05-20T16:28:56Z")

</div>

Hello, Let’s assume I have a two-dimensional array and the list of Cartesian indices which allow me to extract some subset of the array elements: A = zeros((6, 9)) ci = CartesianIndices((2:2:6, 3:3:9)) A\[ci\] Now, ha…

---

## [Pkg.instantiate() takes a very long time on a remote worker](https://discourse.julialang.org/t/pkg-instantiate-takes-a-very-long-time-on-a-remote-worker/61498)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 3:56pm UTC](https://discourse.julialang.org/t/pkg-instantiate-takes-a-very-long-time-on-a-remote-worker/61498 "2021-05-20T15:56:33Z")

</div>

I’m trying to use multiple nodes for a parallel algorithm, but currently Pkg.instantiate() takes far too long, as in 20+ minutes, so long that my 30 minute job timed out. Is there a way to speed this up? Is this normal?

---

## [Looking for the correct way to do a clean julia process shutdown](https://discourse.julialang.org/t/looking-for-the-correct-way-to-do-a-clean-julia-process-shutdown/46691)

<div class="topic-metadata">

**Author:** [@attdona](https://discourse.julialang.org/u/attdona)\
**Replies:** 5\
**Last updated:** [May 20, 2021, 3:42pm UTC](https://discourse.julialang.org/t/looking-for-the-correct-way-to-do-a-clean-julia-process-shutdown/46691 "2021-05-20T15:42:26Z")

</div>

I’m not able to capture correctly the SIGINT signal and invoke a controlled shutdown. It seems that atexit should be the answer, but in my (semplified) minimal example, with FileWatching: using FileWatching function w…

---

## [DataFrame eltypes error without using eltypes](https://discourse.julialang.org/t/dataframe-eltypes-error-without-using-eltypes/61473)

<div class="topic-metadata">

**Author:** [@seulberg1](https://discourse.julialang.org/u/seulberg1)\
**Replies:** 4\
**Last updated:** [May 20, 2021, 3:16pm UTC](https://discourse.julialang.org/t/dataframe-eltypes-error-without-using-eltypes/61473 "2021-05-20T15:16:44Z")

</div>

Hello All I am trying to run Julia code on a Linux cluster that works flawlessly on my personal machine. The MWE that fails for me: using Pkg Pkg.activate("/home/path/JuliaEnv/") #Activate Environment using DataFrames …

---

## [Stipple error in German credit demo](https://discourse.julialang.org/t/stipple-error-in-german-credit-demo/61448)

<div class="topic-metadata">

**Author:** [@bww00](https://discourse.julialang.org/u/bww00)\
**Replies:** 4\
**Last updated:** [May 20, 2021, 3:15pm UTC](https://discourse.julialang.org/t/stipple-error-in-german-credit-demo/61448 "2021-05-20T15:15:12Z")

</div>

I am trying to get the German credit demo for STipple running. Getting error and would appreciate any assistance ERROR: UndefVarError: DataFrame! not defined Active env: DEV ┌ Warning: │ No secret token is…

---

## [How to allow Float64 or ForwardDiff.dual in structs and arrays](https://discourse.julialang.org/t/how-to-allow-float64-or-forwarddiff-dual-in-structs-and-arrays/61521)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 0\
**Last updated:** [May 20, 2021, 2:56pm UTC](https://discourse.julialang.org/t/how-to-allow-float64-or-forwarddiff-dual-in-structs-and-arrays/61521 "2021-05-20T14:56:42Z")

</div>

Hello, I have a module that usually operates on Float64 types, but I also sometimes want to allow dual numbers for some initial optimization. How can I achieve that? For example: Now: const SimFloat = Float64 const V…

---

## [How to use results from SQLite select query in Julia script](https://discourse.julialang.org/t/how-to-use-results-from-sqlite-select-query-in-julia-script/61512)

<div class="topic-metadata">

**Author:** [@ScottRobertson](https://discourse.julialang.org/u/ScottRobertson)\
**Replies:** 3\
**Last updated:** [May 20, 2021, 2:43pm UTC](https://discourse.julialang.org/t/how-to-use-results-from-sqlite-select-query-in-julia-script/61512 "2021-05-20T14:43:09Z")

</div>

SUMMARY: I need a simple collection of select query results such as Python’s sqlite3.connect.cursor.fetchall(). In Python if I do a select query on my place table for IDs and names I get \[(18, “Wichita”), (9, “Topeka”), …

---

## [Creating a custom registry](https://discourse.julialang.org/t/creating-a-custom-registry/28007)

<div class="topic-metadata">

**Author:** [@ggggggggg](https://discourse.julialang.org/u/ggggggggg)\
**Replies:** 17\
**Last updated:** [May 7, 2021, 8:47am UTC](https://discourse.julialang.org/t/creating-a-custom-registry/28007 "2021-05-07T08:47:27Z")

</div>

I’m trying to create a registry. I’m starting with a simple example before I attempt the real thing. My goal here is to make a registry with two packages TestB which depends on TestA which is also in the registry. Then I…

---

## [Getting WebDriver.jl to work - what could cause init\_chrome to throw an error?](https://discourse.julialang.org/t/getting-webdriver-jl-to-work-what-could-cause-init-chrome-to-throw-an-error/61456)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 1\
**Last updated:** [May 20, 2021, 1:10pm UTC](https://discourse.julialang.org/t/getting-webdriver-jl-to-work-what-could-cause-init-chrome-to-throw-an-error/61456 "2021-05-20T13:10:14Z")

</div>

I am following a clip on using Selenium: Selenium I have: Installed the latest version of Python pip install selenium added WebDriver.jl (I use Atom). added PyCall.jl (again, via Atom) installed chromedriver Now, th…

---

## [\`Pair{A,B}\` vs. \`Tuple{A,B}\`](https://discourse.julialang.org/t/pair-a-b-vs-tuple-a-b/942)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 4\
**Last updated:** [May 20, 2021, 1:07pm UTC](https://discourse.julialang.org/t/pair-a-b-vs-tuple-a-b/942 "2021-05-20T13:07:46Z")

</div>

So what’s the difference between Pair{A,B} and Tuple{A,B}? Why do we have both instead of one?

---

## [Functions from different modules with the same name](https://discourse.julialang.org/t/functions-from-different-modules-with-the-same-name/61505)

<div class="topic-metadata">

**Author:** [@pg261](https://discourse.julialang.org/u/pg261)\
**Replies:** 16\
**Last updated:** [May 20, 2021, 1:03pm UTC](https://discourse.julialang.org/t/functions-from-different-modules-with-the-same-name/61505 "2021-05-20T13:03:32Z")

</div>

Hi ! I have a problem which I thought should never happen with Julia. The result is even worse when using Pluto. I use two modules, which have a function with the same name, but taking parameters of different types. I …

---

## [Slow model generation in JUMP](https://discourse.julialang.org/t/slow-model-generation-in-jump/61477)

<div class="topic-metadata">

**Author:** [@Popeye](https://discourse.julialang.org/u/Popeye)\
**Replies:** 13\
**Last updated:** [May 20, 2021, 12:55pm UTC](https://discourse.julialang.org/t/slow-model-generation-in-jump/61477 "2021-05-20T12:55:55Z")

</div>

I need to decide between using JUMP and Python-MIP for a large MILP. Python-MIP has some impressive benchmarks on its website, and provides more features such as lazy constraints and call-backs with CBC solver. But here …

---

## [Optimizing matrix-valued parameters of an ODE](https://discourse.julialang.org/t/optimizing-matrix-valued-parameters-of-an-ode/61161)

<div class="topic-metadata">

**Author:** [@iqopi](https://discourse.julialang.org/u/iqopi)\
**Replies:** 1\
**Last updated:** [May 20, 2021, 11:49am UTC](https://discourse.julialang.org/t/optimizing-matrix-valued-parameters-of-an-ode/61161 "2021-05-20T11:49:50Z")

</div>

Basically, i want to fit the matrix of an ODE of the form \\dot{u}(t) = p\\cdot u(t), \\quad p \\in Mat\_{n\\times n}(\\mathbb{R}), u \\in \\mathbb{R}^n I start by defining the matrxi: using Plots, Flux, Zygote, Flux, DiffEqF…

---

## [ArgumentError in Fox-Rabbit Pursuit Problem with ModelingToolkit.jl](https://discourse.julialang.org/t/argumenterror-in-fox-rabbit-pursuit-problem-with-modelingtoolkit-jl/61222)

<div class="topic-metadata">

**Author:** [@ggarza](https://discourse.julialang.org/u/ggarza)\
**Replies:** 4\
**Last updated:** [May 20, 2021, 11:40am UTC](https://discourse.julialang.org/t/argumenterror-in-fox-rabbit-pursuit-problem-with-modelingtoolkit-jl/61222 "2021-05-20T11:40:39Z")

</div>

I am trying to solve a fox-rabbit pursuit problem with ModelToolkit.jl. The fox’s path satisfies x'(t) = R(t) (r(t) - x(t)) y'(t) = R(t) (s(t) - y(t)) where R(t) = k \\dfrac{\\sqrt{r'(t)^2 + s'(t)^2}}{\\sqrt{(r(t) - x(…

---

## [Why I cann't use Plot although I checked all the ways which are suggested by others](https://discourse.julialang.org/t/why-i-cannt-use-plot-although-i-checked-all-the-ways-which-are-suggested-by-others/61506)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 0\
**Last updated:** [May 20, 2021, 11:04am UTC](https://discourse.julialang.org/t/why-i-cannt-use-plot-although-i-checked-all-the-ways-which-are-suggested-by-others/61506 "2021-05-20T11:04:22Z")

</div>

Hi There. I am a newbie in Julia. I used Atoms as IDE for Julia in one loptop with windows 10 and when I used the code julia\> using Plots julia\> x=1; julia\> y=2; julia\> plot(x,y) it shows the following error: conn…

---

## [Broadcast into variables](https://discourse.julialang.org/t/broadcast-into-variables/61353)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 10:40am UTC](https://discourse.julialang.org/t/broadcast-into-variables/61353 "2021-05-20T10:40:39Z")

</div>

Hello, I am a little bit confused, is this supposed to work some how? When a function returns a tuple, can I somehow add each element of this tuple to a separate variable without temp allocations? Something like this: f…

---

## [Using multiprocessors for faster compilation](https://discourse.julialang.org/t/using-multiprocessors-for-faster-compilation/61504)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 0\
**Last updated:** [May 20, 2021, 10:18am UTC](https://discourse.julialang.org/t/using-multiprocessors-for-faster-compilation/61504 "2021-05-20T10:18:01Z")

</div>

Hi, I haven’t find anything about using multiple processors for compiling code faster during the first run. Is it even possible? Maybe something like MAKEFLAGS=-j4 in C? I have tried to use JULIA\_NUM\_THREADS but I bel…

---

## [Error precompiling MATLAB.jl](https://discourse.julialang.org/t/error-precompiling-matlab-jl/61399)

<div class="topic-metadata">

**Author:** [@PaoloVarraso](https://discourse.julialang.org/u/PaoloVarraso)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 10:09am UTC](https://discourse.julialang.org/t/error-precompiling-matlab-jl/61399 "2021-05-20T10:09:06Z")

</div>

Hi, I am trying to use the MATLAB.jl package on my Mac. The installation seems successful but when I try to use the package I get the following error julia\> using MATLAB \[ Info: Precompiling MATLAB \[10e44e05-a98a-55b3…

[Previous page](https://discourse.julialang.org/latest.md?page=1384)

[Next page](https://discourse.julialang.org/latest.md?page=1386)
