# General Usage

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

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

**Page:** 585

---

## [Plotting simple bar charts with Plots.jl with colors conditional on sign of values](https://discourse.julialang.org/t/plotting-simple-bar-charts-with-plots-jl-with-colors-conditional-on-sign-of-values/63379)

<div class="topic-metadata">

**Author:** [@dfa\_julia\_quant](https://discourse.julialang.org/u/dfa_julia_quant)\
**Replies:** 3\
**Last updated:** [June 22, 2021, 7:18pm UTC](https://discourse.julialang.org/t/plotting-simple-bar-charts-with-plots-jl-with-colors-conditional-on-sign-of-values/63379 "2021-06-22T19:18:54Z")

</div>

I would like to create a bar chart that shows negative values of different color from positive values. I created a very simple example using x = 6 discrete time periods and y = 6 financial payoffs (2 of which are negativ…

---

## [Animation using PlotlyBase](https://discourse.julialang.org/t/animation-using-plotlybase/63292)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 7\
**Last updated:** [June 22, 2021, 7:13pm UTC](https://discourse.julialang.org/t/animation-using-plotlybase/63292 "2021-06-22T19:13:16Z")

</div>

Dear PlotlyBase community, Is there a way how to get animation from Animations · Plots using pure PlotlyBase package?

---

## [How to submit distributed memory jobs to cluster?](https://discourse.julialang.org/t/how-to-submit-distributed-memory-jobs-to-cluster/63388)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 0\
**Last updated:** [June 22, 2021, 5:32pm UTC](https://discourse.julialang.org/t/how-to-submit-distributed-memory-jobs-to-cluster/63388 "2021-06-22T17:32:38Z")

</div>

I have a run\_jobs.jl file that supports distributed memory parallelism. How should the beginning of run\_jobs.jl look like if I want to run it on a cluster (univa grid engine) via qsub? I can use ClusterManagers.jl to ru…

---

## [Problem adding packages](https://discourse.julialang.org/t/problem-adding-packages/63374)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 0\
**Last updated:** [June 22, 2021, 2:31pm UTC](https://discourse.julialang.org/t/problem-adding-packages/63374 "2021-06-22T14:31:46Z")

</div>

Hello, I am having this error while installing different packages. I do not understand what the problem actually is. It does not happen with all the packages. It happens with NLopt and when adding Distributions, with an …

---

## [Syntax: invalid operator "--"](https://discourse.julialang.org/t/syntax-invalid-operator/63369)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 2\
**Last updated:** [June 22, 2021, 2:10pm UTC](https://discourse.julialang.org/t/syntax-invalid-operator/63369 "2021-06-22T14:10:12Z")

</div>

Hello, I am trying to use the command “–threads” in Julia but I got the below error. Any idea for let it run? Thanks julia\> --threads 4 ERROR: syntax: invalid operator “–” Stacktrace: \[1\] top-level scope @ none:1

---

## [CuTextureArray for Float64?](https://discourse.julialang.org/t/cutexturearray-for-float64/63346)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 2\
**Last updated:** [June 22, 2021, 1:04pm UTC](https://discourse.julialang.org/t/cutexturearray-for-float64/63346 "2021-06-22T13:04:21Z")

</div>

I am trying to test the GPU interpolation example shown in this blog posting. I get an error when I try to create CuTextureArray from CuArray{Float64}. For example, (@v1.6) pkg\> st CUDA Status \`~/.julia/environm…

---

## [Alert: 5 dependencies skipped during auto compilation due to previous errors!](https://discourse.julialang.org/t/alert-5-dependencies-skipped-during-auto-compilation-due-to-previous-errors/63215)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 9\
**Last updated:** [June 22, 2021, 12:21pm UTC](https://discourse.julialang.org/t/alert-5-dependencies-skipped-during-auto-compilation-due-to-previous-errors/63215 "2021-06-22T12:21:55Z")

</div>

I am getting the following alert when I update the packages: “140 dependencies successfully precompiled in 319 seconds (279 already precompiled, 5 skipped during auto due to previous errors)” I have done what the Pkg p…

---

## [Huge performance difference between inbuilt gcdx() and my function](https://discourse.julialang.org/t/huge-performance-difference-between-inbuilt-gcdx-and-my-function/63350)

<div class="topic-metadata">

**Author:** [@msravi](https://discourse.julialang.org/u/msravi)\
**Replies:** 3\
**Last updated:** [June 22, 2021, 8:09am UTC](https://discourse.julialang.org/t/huge-performance-difference-between-inbuilt-gcdx-and-my-function/63350 "2021-06-22T08:09:12Z")

</div>

Hi All, I had written a Bezout’s identity function (before I knew Julia already had one in the form of gcdx), and although my implementation is very close to the one that comes with Julia, I see that the inbuilt functio…

---

## [How to do SIMD code with wide-register accumulators (@simd vs LoopVectorization.jl vs SIMD.jl)](https://discourse.julialang.org/t/how-to-do-simd-code-with-wide-register-accumulators-simd-vs-loopvectorization-jl-vs-simd-jl/63322)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 11\
**Last updated:** [June 22, 2021, 12:33am UTC](https://discourse.julialang.org/t/how-to-do-simd-code-with-wide-register-accumulators-simd-vs-loopvectorization-jl-vs-simd-jl/63322 "2021-06-22T00:33:37Z")

</div>

I have a loop that would benefit from SIMD operations, but it has one “accumulator” variable that confuses most SIMD tools available. Here is the pseudo code, and below is the actual code with benchmarks. My questions is…

---

## [World Age Errors while using BSON to store solution of a Differential Equation](https://discourse.julialang.org/t/world-age-errors-while-using-bson-to-store-solution-of-a-differential-equation/63305)

<div class="topic-metadata">

**Author:** [@Vivek\_Lohani](https://discourse.julialang.org/u/Vivek_Lohani)\
**Replies:** 2\
**Last updated:** [June 21, 2021, 10:33pm UTC](https://discourse.julialang.org/t/world-age-errors-while-using-bson-to-store-solution-of-a-differential-equation/63305 "2021-06-21T22:33:12Z")

</div>

I use the DifferentialEquations.jl package to solve for the evolution of multiple coupled differential equations by making use of several helper functions. Thereafter, I store the solution using BSON. Then I load the st…

---

## [Can't add distributed workers per ssh: connection timed out](https://discourse.julialang.org/t/cant-add-distributed-workers-per-ssh-connection-timed-out/63328)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 10\
**Last updated:** [June 21, 2021, 9:19pm UTC](https://discourse.julialang.org/t/cant-add-distributed-workers-per-ssh-connection-timed-out/63328 "2021-06-21T21:19:23Z")

</div>

First, let me say that I’m super confused since adding workers per ssh has worked fine for me for many years. Even on the same machine everything was fine a few months back. I’m trying to start a Julia worker on a think…

---

## [Makie.jl Menu items clipped away by figure border](https://discourse.julialang.org/t/makie-jl-menu-items-clipped-away-by-figure-border/63136)

<div class="topic-metadata">

**Author:** [@MNiestroj](https://discourse.julialang.org/u/MNiestroj)\
**Replies:** 2\
**Last updated:** [June 21, 2021, 6:56pm UTC](https://discourse.julialang.org/t/makie-jl-menu-items-clipped-away-by-figure-border/63136 "2021-06-21T18:56:18Z")

</div>

I currently try to use Menus in a Makie figure, which are layouted to the bottom of the figure. This leads to some items not being visible doe to the border of the figure. Is there any option I have missed to either forc…

---

## [\[DifferentialEquations.jl\] Solving Berman's equation](https://discourse.julialang.org/t/differentialequations-jl-solving-bermans-equation/63223)

<div class="topic-metadata">

**Author:** [@bmxam](https://discourse.julialang.org/u/bmxam)\
**Replies:** 10\
**Last updated:** [June 21, 2021, 6:33pm UTC](https://discourse.julialang.org/t/differentialequations-jl-solving-bermans-equation/63223 "2021-06-21T18:33:25Z")

</div>

Hi everyone, I’m trying to solve the axisymetric Berman’s equation (see here) with DifferentialEquations.jl. This is a fourth order BVP : \\left\[ \\left( \\frac{F}{r} \\right) \\left(\\frac{F'}{r} \\right)' - \\left( \\frac{F'…

---

## [Efficiency of push! on a Vector vs push on an SVector](https://discourse.julialang.org/t/efficiency-of-push-on-a-vector-vs-push-on-an-svector/63313)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 5:04pm UTC](https://discourse.julialang.org/t/efficiency-of-push-on-a-vector-vs-push-on-an-svector/63313 "2021-06-21T17:04:35Z")

</div>

Are there cases where it might be more efficient to use push with an SVector than to use push! with a Vector? I have one benchmark below where push! is much more efficient: using StaticArrays using BenchmarkTools func…

---

## [Hyperlinks that Run Functions](https://discourse.julialang.org/t/hyperlinks-that-run-functions/63302)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 0\
**Last updated:** [June 21, 2021, 2:34pm UTC](https://discourse.julialang.org/t/hyperlinks-that-run-functions/63302 "2021-06-21T14:34:47Z")

</div>

Is it possible to do this in Julia: Create Hyperlinks that Run Functions - MATLAB & Simulink I think it would be great when using Base.show() to display my type in the REPL to also include a couple helpful links so one …

---

## [Display more decimals in DataFrame](https://discourse.julialang.org/t/display-more-decimals-in-dataframe/22545)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 9\
**Last updated:** [June 21, 2021, 2:13pm UTC](https://discourse.julialang.org/t/display-more-decimals-in-dataframe/22545 "2021-06-21T14:13:00Z")

</div>

How do I make DataFrame to display more decimals in the REPL? e.g. x = DataFrame(a=\[1.142300004,1.142300051\]) 2×1 DataFrame │ Row │ a │ │ │ Float64 │ ├─────┼─────────┤ │ 1 │ 1.1423 │ │ 2 │ 1.1423 │

---

## [Threads parallelization on different nested loops](https://discourse.julialang.org/t/threads-parallelization-on-different-nested-loops/63295)

<div class="topic-metadata">

**Author:** [@calvar](https://discourse.julialang.org/u/calvar)\
**Replies:** 0\
**Last updated:** [June 21, 2021, 1:40pm UTC](https://discourse.julialang.org/t/threads-parallelization-on-different-nested-loops/63295 "2021-06-21T13:40:55Z")

</div>

Hi, I am learning Julia and I was testing how to parallelize a nested loop with the @threads macro, to compute the product between matrices. This is the code I am trying to parallelize: function dot\_prod!(A, B, C, i, j…

---

## [MLJFlux is a lot slower than the same algorithm written in Flux](https://discourse.julialang.org/t/mljflux-is-a-lot-slower-than-the-same-algorithm-written-in-flux/63253)

<div class="topic-metadata">

**Author:** [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Replies:** 3\
**Last updated:** [June 21, 2021, 12:30pm UTC](https://discourse.julialang.org/t/mljflux-is-a-lot-slower-than-the-same-algorithm-written-in-flux/63253 "2021-06-21T12:30:36Z")

</div>

Disclaimer: I am by no means an expert in Flux, MLJFlux, Julia or even machine learning. I may have done something very stupid without noticing. I have a neural network classifier written in Flux. It works fine, it give…

---

## [Extract Variance components from VarCorr object (Mixed models)](https://discourse.julialang.org/t/extract-variance-components-from-varcorr-object-mixed-models/44528)

<div class="topic-metadata">

**Author:** [@Anthony\_D\_Long](https://discourse.julialang.org/u/Anthony_D_Long)\
**Replies:** 8\
**Last updated:** [June 21, 2021, 11:45am UTC](https://discourse.julialang.org/t/extract-variance-components-from-varcorr-object-mixed-models/44528 "2021-06-21T11:45:47Z")

</div>

I am trying to run random effect models in Julia instead of R, as they are much faster for big data. I am doing it via calls from R (and “JuliaCall”). The models work great but I cannot for the life of me extract the v…

---

## [Using TemporalGPs](https://discourse.julialang.org/t/using-temporalgps/63208)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 9:03am UTC](https://discourse.julialang.org/t/using-temporalgps/63208 "2021-06-21T09:03:48Z")

</div>

@willtebbutt I have this working code using Stheno using Stheno.AbstractGPs using CairoMakie const l1 = 0.4 const s1 = 0.2 f = let gpc = Stheno.GPC() gp = kernel -\> Stheno.wrap(GP(kernel), gpc) f1 = s1 …

---

## [Separate "Dev" packages in Project.toml](https://discourse.julialang.org/t/separate-dev-packages-in-project-toml/63143)

<div class="topic-metadata">

**Author:** [@jbu](https://discourse.julialang.org/u/jbu)\
**Replies:** 8\
**Last updated:** [June 21, 2021, 8:14am UTC](https://discourse.julialang.org/t/separate-dev-packages-in-project-toml/63143 "2021-06-21T08:14:50Z")

</div>

When creating a package, I often use dependencies that are purely for development and have nothing to do with my package’s functionality (e.g. Revise.jl, Debugger.jl, Infiltrator.jl. If I ever wanted to share my package,…

---

## [Is there concept of dev dependencies in Pkg?](https://discourse.julialang.org/t/is-there-concept-of-dev-dependencies-in-pkg/46908)

<div class="topic-metadata">

**Author:** [@andre1sk](https://discourse.julialang.org/u/andre1sk)\
**Replies:** 11\
**Last updated:** [June 21, 2021, 7:27am UTC](https://discourse.julialang.org/t/is-there-concept-of-dev-dependencies-in-pkg/46908 "2021-06-21T07:27:20Z")

</div>

Is there a good write up that explains things in decent detail you could recommend?

---

## [How to choose vec size in SIMD.jl](https://discourse.julialang.org/t/how-to-choose-vec-size-in-simd-jl/63269)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 5\
**Last updated:** [June 21, 2021, 4:32am UTC](https://discourse.julialang.org/t/how-to-choose-vec-size-in-simd-jl/63269 "2021-06-21T04:32:47Z")

</div>

Looking at the SIMD.jl example vadd!(xs, ys, Vec{8,Float64}) there is a specific size 8 being set for the vec size. How do I know whether to use 4 or 8 or more? I assume it is hardware dependent, but probably there is so…

---

## [Understanding major order performance when broadcasting in column vs row operations](https://discourse.julialang.org/t/understanding-major-order-performance-when-broadcasting-in-column-vs-row-operations/63139)

<div class="topic-metadata">

**Author:** [@gzagatti](https://discourse.julialang.org/u/gzagatti)\
**Replies:** 9\
**Last updated:** [June 21, 2021, 3:07am UTC](https://discourse.julialang.org/t/understanding-major-order-performance-when-broadcasting-in-column-vs-row-operations/63139 "2021-06-21T03:07:54Z")

</div>

I understand that Julia stores arrays in column-major order which means that columns are stacked onto one another. Thus, adjacent rows in the same column are adjacent in memory. If that is the case, I am failing to see …

---

## [Generators vs loops vs broadcasting: Calculate PI via Monte Carlo Sampling](https://discourse.julialang.org/t/generators-vs-loops-vs-broadcasting-calculate-pi-via-monte-carlo-sampling/63235)

<div class="topic-metadata">

**Author:** [@JanKap](https://discourse.julialang.org/u/JanKap)\
**Replies:** 7\
**Last updated:** [June 20, 2021, 10:15pm UTC](https://discourse.julialang.org/t/generators-vs-loops-vs-broadcasting-calculate-pi-via-monte-carlo-sampling/63235 "2021-06-20T22:15:41Z")

</div>

Dear all, I’m trying to solve some toy problems in Julia and benchmark them since there often are many different ways to go. I have a strong Matlab background therefore it feels a bit weird to go back to simple loops (an…

---

## [Improving Computational Performance](https://discourse.julialang.org/t/improving-computational-performance/63210)

<div class="topic-metadata">

**Author:** [@nullmap](https://discourse.julialang.org/u/nullmap)\
**Replies:** 6\
**Last updated:** [June 20, 2021, 10:13pm UTC](https://discourse.julialang.org/t/improving-computational-performance/63210 "2021-06-20T22:13:29Z")

</div>

I have three questions and I was curious if someone can provide some clarity on the results I’m seeing with a couple variations of a simple polynomial evaluation computation. I wrote a Horner’s method implementation whi…

---

## [Tutorial: Concurrency patterns for controlled parallelisms](https://discourse.julialang.org/t/tutorial-concurrency-patterns-for-controlled-parallelisms/62651)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 4\
**Last updated:** [June 20, 2021, 8:23pm UTC](https://discourse.julialang.org/t/tutorial-concurrency-patterns-for-controlled-parallelisms/62651 "2021-06-20T20:23:52Z")

</div>

Hi, I just wrote a quick tutorial on a couple of patterns using Channel that are handy for some parallel processing: Concurrency patterns for controlled parallelisms. High-level data parallelism is the best starting po…

---

## [Add parameters in @index block](https://discourse.julialang.org/t/add-parameters-in-index-block/63258)

<div class="topic-metadata">

**Author:** [@Joinijo](https://discourse.julialang.org/u/Joinijo)\
**Replies:** 0\
**Last updated:** [June 20, 2021, 8:08pm UTC](https://discourse.julialang.org/t/add-parameters-in-index-block/63258 "2021-06-20T20:08:17Z")

</div>

Is it possible to add the parameters of a function when displayed from a \`\`\`@index \`\`\` block? I.e. say I have a function f(x) I want f(x) to be displayed instead of simply f, as I am currently getting.

---

## [Clarify behaviour of typeintersect()](https://discourse.julialang.org/t/clarify-behaviour-of-typeintersect/63097)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 0\
**Last updated:** [June 17, 2021, 3:03pm UTC](https://discourse.julialang.org/t/clarify-behaviour-of-typeintersect/63097 "2021-06-17T15:03:00Z")

</div>

The docs say: typeintersect(T, S) Compute a type that contains the intersection of T and S. Usually this will be the smallest such type or one close to it. I interpret this to mean that there may be cases where type…

---

## [What is the recommended way to run N workers asynchronously?](https://discourse.julialang.org/t/what-is-the-recommended-way-to-run-n-workers-asynchronously/63128)

<div class="topic-metadata">

**Author:** [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Replies:** 10\
**Last updated:** [June 20, 2021, 5:59pm UTC](https://discourse.julialang.org/t/what-is-the-recommended-way-to-run-n-workers-asynchronously/63128 "2021-06-20T17:59:31Z")

</div>

Given this code for a worker using HTTP, JSON3, BenchmarkTools function worker(name, n) println("worker-$name") response = HTTP.request("GET", "https://qrng.anu.edu.au/API/jsonI.php?length=$(n)&type=uint16") …

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

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