# General Usage

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

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

**Page:** 634

---

## [Is there a way of doing essentially a vcat of tuples in a way that still allows th](https://discourse.julialang.org/t/is-there-a-way-of-doing-essentially-a-vcat-of-tuples-in-a-way-that-still-allows-th/56493)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 4, 2021, 8:02pm UTC](https://discourse.julialang.org/t/is-there-a-way-of-doing-essentially-a-vcat-of-tuples-in-a-way-that-still-allows-th/56493 "2021-03-04T20:02:51Z")

</div>

Is there a way of doing essentially a vcat of tuples in a way that still allows the type of each element of the resultant tuple to be inferred at compile time? My first instinct would be to do something like supertuple…

---

## [Format color scale ticks in contourf (Plots.jl)](https://discourse.julialang.org/t/format-color-scale-ticks-in-contourf-plots-jl/56494)

<div class="topic-metadata">

**Author:** [@churli](https://discourse.julialang.org/u/churli)\
**Replies:** 0\
**Last updated:** [March 4, 2021, 6:36pm UTC](https://discourse.julialang.org/t/format-color-scale-ticks-in-contourf-plots-jl/56494 "2021-03-04T18:36:07Z")

</div>

In Plots.jl it is possible to specify a formatter axis attribute to customize the ticks format. I.e. to show the ticks in scientific notation, one can pass formatter=:scientific. It is also possible to format one singl…

---

## [Is there a way to hide warnings produced by a specific module/dependency? Specific](https://discourse.julialang.org/t/is-there-a-way-to-hide-warnings-produced-by-a-specific-module-dependency-specific/56486)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 4, 2021, 5:45pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-hide-warnings-produced-by-a-specific-module-dependency-specific/56486 "2021-03-04T17:45:18Z")

</div>

Is there a way to hide warnings produced by a specific module/dependency? Specifically I’m using AdvancedHMC and produces a warning every time a sample is rejected. Note that the original poster on Slack cannot see your…

---

## [Use private registry in GitLab CI job](https://discourse.julialang.org/t/use-private-registry-in-gitlab-ci-job/36179)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 20\
**Last updated:** [March 4, 2021, 5:32pm UTC](https://discourse.julialang.org/t/use-private-registry-in-gitlab-ci-job/36179 "2021-03-04T17:32:13Z")

</div>

I have setup a GitLab CI Job to test a package I wrote - it works. Now I want to test a second package that depends on the first - private - package. I have made a private regsitry that I can use to add the package on …

---

## [Julia throws additional LoadError during exception handling](https://discourse.julialang.org/t/julia-throws-additional-loaderror-during-exception-handling/56446)

<div class="topic-metadata">

**Author:** [@jonasjonker](https://discourse.julialang.org/u/jonasjonker)\
**Replies:** 6\
**Last updated:** [March 4, 2021, 3:42pm UTC](https://discourse.julialang.org/t/julia-throws-additional-loaderror-during-exception-handling/56446 "2021-03-04T15:42:49Z")

</div>

I’m not really sure if this is the right place for this question, so please let me know where I should be if this is not the right place. I’m new to Julia, and I am writing some scripts that I’d like to use from the Lin…

---

## [Too many levels of nested for loops](https://discourse.julialang.org/t/too-many-levels-of-nested-for-loops/56335)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 3\
**Last updated:** [March 4, 2021, 3:14pm UTC](https://discourse.julialang.org/t/too-many-levels-of-nested-for-loops/56335 "2021-03-04T15:14:04Z")

</div>

Is there a more pretty way to rewrite the code below, without performance penalties? sum = 0 for i1 in 1:4 for i2 in 1:4 for i3 in 1:4 for i4 in 1:4 sum += some\_function(i1, i2, i…

---

## [Colorbar doesn't reflect ColorGradient scale as specified in cgrad(..., scale = )](https://discourse.julialang.org/t/colorbar-doesnt-reflect-colorgradient-scale-as-specified-in-cgrad-scale/56431)

<div class="topic-metadata">

**Author:** [@Ivan](https://discourse.julialang.org/u/Ivan)\
**Replies:** 0\
**Last updated:** [March 3, 2021, 6:23pm UTC](https://discourse.julialang.org/t/colorbar-doesnt-reflect-colorgradient-scale-as-specified-in-cgrad-scale/56431 "2021-03-03T18:23:21Z")

</div>

I have built the following composite plot: # Data x = rand(\[1, 2, 3, 4, 5\], 50) y = rand(50) z = rand(50) # Vector with labels to show on hover hovector = \[\] for i in 1:length(x) label = "$(x\[i\]), $(y\[i\]), $(z\[i\])"…

---

## [Squashed markers in Makie/Makielayout](https://discourse.julialang.org/t/squashed-markers-in-makie-makielayout/34886)

<div class="topic-metadata">

**Author:** [@neuralian](https://discourse.julialang.org/u/neuralian)\
**Replies:** 8\
**Last updated:** [March 4, 2021, 1:31pm UTC](https://discourse.julialang.org/t/squashed-markers-in-makie-makielayout/34886 "2021-03-04T13:31:03Z")

</div>

How do you maintain the aspect ratio (shape) of markers in sub-plots using Makie/MakieLayout? e.g. using MakieLayout using Makie scene = Scene(resolution = (1200, 900), camera=campixel!) layout = GridLayout( scene…

---

## [Smoothing Discontinuities in 3D Plots](https://discourse.julialang.org/t/smoothing-discontinuities-in-3d-plots/56437)

<div class="topic-metadata">

**Author:** [@tross](https://discourse.julialang.org/u/tross)\
**Replies:** 3\
**Last updated:** [March 4, 2021, 9:01am UTC](https://discourse.julialang.org/t/smoothing-discontinuities-in-3d-plots/56437 "2021-03-04T09:01:40Z")

</div>

Hi there, I have a fairly simple problem. I am trying to do a 3D plot of a function that has discontinuities, but I can’t figure out how to get the boundary of the discontinuity to look smooth instead of spikey. Here is…

---

## [Why does wrapping an array in a composite type degrade performance?](https://discourse.julialang.org/t/why-does-wrapping-an-array-in-a-composite-type-degrade-performance/56197)

<div class="topic-metadata">

**Author:** [@mroavi](https://discourse.julialang.org/u/mroavi)\
**Replies:** 3\
**Last updated:** [March 4, 2021, 9:49am UTC](https://discourse.julialang.org/t/why-does-wrapping-an-array-in-a-composite-type-degrade-performance/56197 "2021-03-04T09:49:55Z")

</div>

The code below performs 2 broadcast multiplications between 2 3D-arrays. The result of the latter is wrapped in a composite type. Does anybody know why the former is faster and allocates less memory? Is it a benchmarking…

---

## [Method matching an array with elements of a composite type with parametric types](https://discourse.julialang.org/t/method-matching-an-array-with-elements-of-a-composite-type-with-parametric-types/56271)

<div class="topic-metadata">

**Author:** [@mroavi](https://discourse.julialang.org/u/mroavi)\
**Replies:** 8\
**Last updated:** [March 4, 2021, 9:32am UTC](https://discourse.julialang.org/t/method-matching-an-array-with-elements-of-a-composite-type-with-parametric-types/56271 "2021-03-04T09:32:29Z")

</div>

Here is my composite type: mutable struct Factor{T, N} vars::NTuple{N,Int64} vals::Array{T,N} end How can I define a method that matches arrays with elements of this type and that can access the parametric type T? …

---

## [Interprete Profile results](https://discourse.julialang.org/t/interprete-profile-results/55902)

<div class="topic-metadata">

**Author:** [@Lian\_Yunlong](https://discourse.julialang.org/u/Lian_Yunlong)\
**Replies:** 6\
**Last updated:** [March 4, 2021, 8:52am UTC](https://discourse.julialang.org/t/interprete-profile-results/55902 "2021-03-04T08:52:52Z")

</div>

Dear Julia experts, I have profiled my code and get the following results. The major worker in the code is a recursive function. Does this result show that something is wrong with that ? Perhaps I should specify the inp…

---

## [Install a range of versions for a range of packages](https://discourse.julialang.org/t/install-a-range-of-versions-for-a-range-of-packages/56272)

<div class="topic-metadata">

**Author:** [@josePereiro](https://discourse.julialang.org/u/josePereiro)\
**Replies:** 1\
**Last updated:** [March 4, 2021, 3:51am UTC](https://discourse.julialang.org/t/install-a-range-of-versions-for-a-range-of-packages/56272 "2021-03-04T03:51:36Z")

</div>

Hi, I’m having access to a remote machine, but I’ll have a one time internet chance… How can I install/download a significant set of versions of a set of packages, so I can work for a while offline? Instantiate a few M…

---

## [@less broken?](https://discourse.julialang.org/t/less-broken/55799)

<div class="topic-metadata">

**Author:** [@nstgc](https://discourse.julialang.org/u/nstgc)\
**Replies:** 20\
**Last updated:** [March 4, 2021, 2:10am UTC](https://discourse.julialang.org/t/less-broken/55799 "2021-03-04T02:10:28Z")

</div>

@less write(stdout,'a') is resulting in the following error ERROR: could not find source file for function Stacktrace: \[1\] less(::Nothing, ::Int32) at /build/julia/src/julia-1.5.3/usr/share/julia/stdlib/v1.5/Interact…

---

## [Embedding Issue with 1.6.0-rc1 and UseShellExecute = false](https://discourse.julialang.org/t/embedding-issue-with-1-6-0-rc1-and-useshellexecute-false/56440)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 11:19pm UTC](https://discourse.julialang.org/t/embedding-issue-with-1-6-0-rc1-and-useshellexecute-false/56440 "2021-03-03T23:19:30Z")

</div>

I’m attempting to embedded Julia in a c# application. This application is launched from another c# app using the .NET System.Diagnostics.Process class which can be used to start another exe process. I have set the Redi…

---

## [Parametric Field Names](https://discourse.julialang.org/t/parametric-field-names/56428)

<div class="topic-metadata">

**Author:** [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Replies:** 16\
**Last updated:** [March 3, 2021, 10:56pm UTC](https://discourse.julialang.org/t/parametric-field-names/56428 "2021-03-03T22:56:32Z")

</div>

Consider Following Situation: I want to model an object with struct in Julia. I want this object fields be mutable. The goal is that when we change one of the fields, the rest of the fields will change automatically. T…

---

## [What is the best way to convert a set to an Array?](https://discourse.julialang.org/t/what-is-the-best-way-to-convert-a-set-to-an-array/56419)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 7:55pm UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-convert-a-set-to-an-array/56419 "2021-03-03T19:55:38Z")

</div>

What is the best way to convert a set to an Array? Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster her…

---

## [Python vs. Julia ODE Solver](https://discourse.julialang.org/t/python-vs-julia-ode-solver/56123)

<div class="topic-metadata">

**Author:** [@qtoloza](https://discourse.julialang.org/u/qtoloza)\
**Replies:** 30\
**Last updated:** [March 3, 2021, 5:59pm UTC](https://discourse.julialang.org/t/python-vs-julia-ode-solver/56123 "2021-03-03T17:59:45Z")

</div>

Hello! Brand new to Julia. I have a very stiff system of ODEs that I’m trying to optimize for large N. I’ve achieved reasonable performance in Python using SciPy+Numba, but I wanted to see if Julia would be superior. So …

---

## [Find where a package comes from](https://discourse.julialang.org/t/find-where-a-package-comes-from/56402)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 6\
**Last updated:** [March 3, 2021, 4:16pm UTC](https://discourse.julialang.org/t/find-where-a-package-comes-from/56402 "2021-03-03T16:16:27Z")

</div>

pkg\> status shows that I have the Symbolics package added to my project. I wanted to check if it’s the old one (https://github.com/MasonProtter/Symbolics.jl) or the new one (https://github.com/JuliaSymbolics/Symbolics.j…

---

## [TableIO.jl - CopyIn - progress of uploading](https://discourse.julialang.org/t/tableio-jl-copyin-progress-of-uploading/56409)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 2:41pm UTC](https://discourse.julialang.org/t/tableio-jl-copyin-progress-of-uploading/56409 "2021-03-03T14:41:12Z")

</div>

@lungben I like CopyIn. It is powerful and elegant solution. Is it possible to get progress of uploading data with function CopyIn ? I’m trying to get information how much percentage is uploaded. How can I handle percen…

---

## [Metaprogramming in Pluto notebook](https://discourse.julialang.org/t/metaprogramming-in-pluto-notebook/56400)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 11:56am UTC](https://discourse.julialang.org/t/metaprogramming-in-pluto-notebook/56400 "2021-03-03T11:56:03Z")

</div>

I currently have some pretty repeditive code to create 50 textfields in a pluto notebook. I do however feel like the same could be acomplished with some smart metaprogramming. However, my naive fumbling around with metap…

---

## [Is there a way to specify a range for slicing that is bounded only on one side?I](https://discourse.julialang.org/t/is-there-a-way-to-specify-a-range-for-slicing-that-is-bounded-only-on-one-side-i/56392)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 10:39am UTC](https://discourse.julialang.org/t/is-there-a-way-to-specify-a-range-for-slicing-that-is-bounded-only-on-one-side-i/56392 "2021-03-03T10:39:00Z")

</div>

Is there a way to specify a range for slicing that is bounded only on one side? I can do i = 1:10; a\[i\] for bounded on both sides and I can do i = Colon(); a\[i\] for using the whole array. Is there a simple way to do s…

---

## [Symmetric matrix operations not faster](https://discourse.julialang.org/t/symmetric-matrix-operations-not-faster/56250)

<div class="topic-metadata">

**Author:** [@Xijiang\_Yu](https://discourse.julialang.org/u/Xijiang_Yu)\
**Replies:** 6\
**Last updated:** [March 3, 2021, 9:32am UTC](https://discourse.julialang.org/t/symmetric-matrix-operations-not-faster/56250 "2021-03-03T09:32:33Z")

</div>

I was expecting that if a matrix is defined symmetric, some operations, e.g., solving, should be faster. But using the example in the manual: using LinearAlgebra, BenchmarkTools B = \[1.5 2 -4; 2 -1 -3; -4 -3 5\] sB = Sym…

---

## [Bad performance of eachline() on STDIN](https://discourse.julialang.org/t/bad-performance-of-eachline-on-stdin/55701)

<div class="topic-metadata">

**Author:** [@tferic](https://discourse.julialang.org/u/tferic)\
**Replies:** 35\
**Last updated:** [March 3, 2021, 8:51am UTC](https://discourse.julialang.org/t/bad-performance-of-eachline-on-stdin/55701 "2021-03-03T08:51:18Z")

</div>

Hi I am trying to use Julia for general purpose programming. I am trying to use Julia to create a faster version of a Perl script, which is supposed to create a report on a large logfile, piped into STDIN. The logfile …

---

## [Threads, @spawn on Mac - inconsistent behavior](https://discourse.julialang.org/t/threads-spawn-on-mac-inconsistent-behavior/56376)

<div class="topic-metadata">

**Author:** [@marsmen](https://discourse.julialang.org/u/marsmen)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 7:54am UTC](https://discourse.julialang.org/t/threads-spawn-on-mac-inconsistent-behavior/56376 "2021-03-03T07:54:17Z")

</div>

I’ve a school project to conduct FFTs with Julia. I need to show that running a 1D FFT on an image is faster when running in parallel on the processor’s cores then when running a single instance. I think the reality is, …

---

## [Fourier transform of a sine wave, width of the spectral peak](https://discourse.julialang.org/t/fourier-transform-of-a-sine-wave-width-of-the-spectral-peak/56342)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 2, 2021, 11:00pm UTC](https://discourse.julialang.org/t/fourier-transform-of-a-sine-wave-width-of-the-spectral-peak/56342 "2021-03-02T23:00:04Z")

</div>

Hello all! I was wondering, if I’ve got the Fourier transform of a sine wave, how would I calculate the width of that Fourier transform in Julia? Is there a package that does that written in Julia? An example from SciPy …

---

## [Map vs Loops & Array Comprehensions in Julia 1.0](https://discourse.julialang.org/t/map-vs-loops-array-comprehensions-in-julia-1-0/16137)

<div class="topic-metadata">

**Author:** [@mdsalerno](https://discourse.julialang.org/u/mdsalerno)\
**Replies:** 10\
**Last updated:** [March 3, 2021, 7:41am UTC](https://discourse.julialang.org/t/map-vs-loops-array-comprehensions-in-julia-1-0/16137 "2021-03-03T07:41:49Z")

</div>

I’ve seen some older threads on this topic, but is it still the case that loops and array comprehensions are significantly faster than map() in Julia 1.0? If so, can someone provide intuition into why this is the case. …

---

## [Best current option for C++ interop?](https://discourse.julialang.org/t/best-current-option-for-c-interop/56186)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 3\
**Last updated:** [March 3, 2021, 7:10am UTC](https://discourse.julialang.org/t/best-current-option-for-c-interop/56186 "2021-03-03T07:10:02Z")

</div>

Cxx.jl does not support Julia 1.5. What’s the best option calling using C++ libraries? Should I use (plain) C as the bridge?

---

## [Never done metaprogramming and now I am thinking I have the perfect use case for i](https://discourse.julialang.org/t/never-done-metaprogramming-and-now-i-am-thinking-i-have-the-perfect-use-case-for-i/56367)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 12:24am UTC](https://discourse.julialang.org/t/never-done-metaprogramming-and-now-i-am-thinking-i-have-the-perfect-use-case-for-i/56367 "2021-03-03T00:24:02Z")

</div>

Never done metaprogramming and now I am thinking I have the perfect use case for it. I have code that looks like the following and it’s quite tedious: if params.scr\_start &gt; 0 cbset = CallbackSet(cb\_scree…

---

## [CachingPool-like object that caches objects instead of closures?](https://discourse.julialang.org/t/cachingpool-like-object-that-caches-objects-instead-of-closures/56371)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 0\
**Last updated:** [March 2, 2021, 10:50pm UTC](https://discourse.julialang.org/t/cachingpool-like-object-that-caches-objects-instead-of-closures/56371 "2021-03-02T22:50:06Z")

</div>

From what I can tell, CachingPool caches things at the level of the closure, so if you have multiple closures using the same “big” object, it gets sent twice. E.g. function foo(pool) dat = BigObject(...) pmap(wo…

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

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