# General Usage

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

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

**Page:** 277

---

## [Mutiple dispatch on Tuple or "scalar"?](https://discourse.julialang.org/t/mutiple-dispatch-on-tuple-or-scalar/100742)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 4\
**Last updated:** [June 23, 2023, 2:58pm UTC](https://discourse.julialang.org/t/mutiple-dispatch-on-tuple-or-scalar/100742 "2023-06-23T14:58:17Z")

</div>

I want two versions of a function depending on whether the argument is a Tuple{T,T} or just T. I thought the more specific one wins, but in the code at the end of this post, the less specific x::T always wins over x::Tu…

---

## [Hand-editable serialization: JSON, Fortran's namelist, etc](https://discourse.julialang.org/t/hand-editable-serialization-json-fortrans-namelist-etc/100468)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 14\
**Last updated:** [June 23, 2023, 2:48pm UTC](https://discourse.julialang.org/t/hand-editable-serialization-json-fortrans-namelist-etc/100468 "2023-06-23T14:48:17Z")

</div>

I don’t know the issue well enough to be able to come up with an apt title to this thread. My question is, what are the common, hand-editable data formats to initialize variables? Suppose you want to supply various par…

---

## [How to make a named tuple from a dictionary?](https://discourse.julialang.org/t/how-to-make-a-named-tuple-from-a-dictionary/10899)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 40\
**Last updated:** [June 23, 2023, 1:04pm UTC](https://discourse.julialang.org/t/how-to-make-a-named-tuple-from-a-dictionary/10899 "2023-06-23T13:04:37Z")

</div>

Is there a simple way to make a named tuple from a Dict{Symbol, T}?

---

## [Parametrized Helicoid plot becomes a cone + "Arrow=True" is not working for 3-D](https://discourse.julialang.org/t/parametrized-helicoid-plot-becomes-a-cone-arrow-true-is-not-working-for-3-d/100735)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 1\
**Last updated:** [June 23, 2023, 12:36pm UTC](https://discourse.julialang.org/t/parametrized-helicoid-plot-becomes-a-cone-arrow-true-is-not-working-for-3-d/100735 "2023-06-23T12:36:35Z")

</div>

Hi all, I might misunderstood the parametrized conversion to the code from this site: I follow the parametrized helicoid and it becomes a cone: using Plots; gr() function helicoid(r) n = 100 θ = range(…

---

## [Understanding the performance and overhead of a vector of SOA vs a vector of AOS for SIMD and the effect of push!](https://discourse.julialang.org/t/understanding-the-performance-and-overhead-of-a-vector-of-soa-vs-a-vector-of-aos-for-simd-and-the-effect-of-push/100560)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 1\
**Last updated:** [June 23, 2023, 11:13am UTC](https://discourse.julialang.org/t/understanding-the-performance-and-overhead-of-a-vector-of-soa-vs-a-vector-of-aos-for-simd-and-the-effect-of-push/100560 "2023-06-23T11:13:23Z")

</div>

I’ve been working on an interactive simulation tool for Monte Carlo simulations of Ising(-like) Models. Performance is key, and something I’ve been a bit confused by. I made a very simplified version of the program here,…

---

## [Makie - xscale - no method matching defaultlimits](https://discourse.julialang.org/t/makie-xscale-no-method-matching-defaultlimits/96696)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 6\
**Last updated:** [June 23, 2023, 9:10am UTC](https://discourse.julialang.org/t/makie-xscale-no-method-matching-defaultlimits/96696 "2023-06-23T09:10:39Z")

</div>

julia\> scatter(1:1.0:10, rand(10); axis=(; xscale=x-\>2.0\*x)) ERROR: MethodError: no method matching defaultlimits(::var"#118#119") Closest candidates are: defaultlimits(::Tuple{Real, Real}, ::Any) @ Makie ~/.julia/…

---

## [Can't fit dose response curve, could you tell me Why and How](https://discourse.julialang.org/t/cant-fit-dose-response-curve-could-you-tell-me-why-and-how/79996)

<div class="topic-metadata">

**Author:** [@MEEMO](https://discourse.julialang.org/u/MEEMO)\
**Replies:** 2\
**Last updated:** [June 23, 2023, 8:43am UTC](https://discourse.julialang.org/t/cant-fit-dose-response-curve-could-you-tell-me-why-and-how/79996 "2023-06-23T08:43:04Z")

</div>

Hello there ! I just have started programming and Julia these days, and I am trying fitting curve (dose response) by Optim.jl But I can’t obtain better parameters and predictions (the all predictions have same value ev…

---

## [Efficient Hessian assembling within an interior point method](https://discourse.julialang.org/t/efficient-hessian-assembling-within-an-interior-point-method/100731)

<div class="topic-metadata">

**Author:** [@twopii](https://discourse.julialang.org/u/twopii)\
**Replies:** 0\
**Last updated:** [June 23, 2023, 8:33am UTC](https://discourse.julialang.org/t/efficient-hessian-assembling-within-an-interior-point-method/100731 "2023-06-23T08:33:07Z")

</div>

Hi all! I am currently considering an assembling problem. Given is a dense matrix A and a sparse matrix B and the goal is to efficiently compute the matrix H = B^\\top (A \\otimes A) B. If one expresses the matrix B as B…

---

## [Make Makie pan on left-click drag](https://discourse.julialang.org/t/make-makie-pan-on-left-click-drag/100729)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 0\
**Last updated:** [June 23, 2023, 8:07am UTC](https://discourse.julialang.org/t/make-makie-pan-on-left-click-drag/100729 "2023-06-23T08:07:49Z")

</div>

Currently, Makie zooms to the selected rectangle when you left-click drag and pans when you right-click drag. Is there an easy way to make Makie pan on left-click drag?

---

## [How to Plot 3D Catenoid from Catenary with parametric equations](https://discourse.julialang.org/t/how-to-plot-3d-catenoid-from-catenary-with-parametric-equations/100727)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 4\
**Last updated:** [June 23, 2023, 7:19am UTC](https://discourse.julialang.org/t/how-to-plot-3d-catenoid-from-catenary-with-parametric-equations/100727 "2023-06-23T07:19:31Z")

</div>

Hi all, I can use some help here. I want to plot a Catenoid, and find this parametric equations: but the code can’t plot the Catenoid. Must be something wrong with how I interpret the parametric equations using Plot…

---

## [Select default browser to display PlotlyLight.Plot()](https://discourse.julialang.org/t/select-default-browser-to-display-plotlylight-plot/99987)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 7:11am UTC](https://discourse.julialang.org/t/select-default-browser-to-display-plotlylight-plot/99987 "2023-06-07T07:11:42Z")

</div>

One important feature for a plot package the produces interactive HTML-output is for me the feature to select the default browser to display my HTML-figure. Below a code snippet for the package plotlylight-jl: using Plo…

---

## [Plots/GR broken after updating Pluto dependencies](https://discourse.julialang.org/t/plots-gr-broken-after-updating-pluto-dependencies/100546)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 23\
**Last updated:** [June 23, 2023, 5:26am UTC](https://discourse.julialang.org/t/plots-gr-broken-after-updating-pluto-dependencies/100546 "2023-06-23T05:26:00Z")

</div>

I am running Pluto and just installed the most recent Plots.jl which unfortunately failed. I think this should never happen, maybe some missing tests on GR or Plots.jl for interacting with previously installed versions? …

---

## [Shifting the bit in the array](https://discourse.julialang.org/t/shifting-the-bit-in-the-array/100586)

<div class="topic-metadata">

**Author:** [@divon](https://discourse.julialang.org/u/divon)\
**Replies:** 29\
**Last updated:** [June 22, 2023, 10:17pm UTC](https://discourse.julialang.org/t/shifting-the-bit-in-the-array/100586 "2023-06-22T22:17:07Z")

</div>

Hello everyone, I am looking forward to the advice about this problem. In the initial state, I have: G = 1 Z = \[0, 0, 0, 0\] Then, with the increasing value of G, Z will also be updated as follows: G = 2 …

---

## [What's a quick way of generating a string like this?](https://discourse.julialang.org/t/whats-a-quick-way-of-generating-a-string-like-this/100722)

<div class="topic-metadata">

**Author:** [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Replies:** 2\
**Last updated:** [June 23, 2023, 12:32am UTC](https://discourse.julialang.org/t/whats-a-quick-way-of-generating-a-string-like-this/100722 "2023-06-23T00:32:47Z")

</div>

A\_01.jpg A\_02.jpg ... A\_16.jpg Basically how do I let Julia add a zero in front of it, when it is a single digit number? Do I have to write an if loop? Thanks

---

## [Baffling bug counting nonzero elements in a vector](https://discourse.julialang.org/t/baffling-bug-counting-nonzero-elements-in-a-vector/100718)

<div class="topic-metadata">

**Author:** [@ilanggear](https://discourse.julialang.org/u/ilanggear)\
**Replies:** 4\
**Last updated:** [June 22, 2023, 11:33pm UTC](https://discourse.julialang.org/t/baffling-bug-counting-nonzero-elements-in-a-vector/100718 "2023-06-22T23:33:45Z")

</div>

I have been banging my head against the following bug for more than a couple days now, and I’m still baffled. I want to count the number of zero and non-zero elements in a couple vectors as shown below. In the code below…

---

## [How to convert a string to a StepRange](https://discourse.julialang.org/t/how-to-convert-a-string-to-a-steprange/100703)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [June 22, 2023, 2:45pm UTC](https://discourse.julialang.org/t/how-to-convert-a-string-to-a-steprange/100703 "2023-06-22T14:45:57Z")

</div>

From a YAML file I get the string “2.0:0.25:10.0”. How can I convert it to a StepRange? tsr="2.0:0.25:10.0" TSR=eval(tsr) # not working

---

## [Setting default arguments for a function passed to another function](https://discourse.julialang.org/t/setting-default-arguments-for-a-function-passed-to-another-function/100712)

<div class="topic-metadata">

**Author:** [@dlcole3](https://discourse.julialang.org/u/dlcole3)\
**Replies:** 3\
**Last updated:** [June 22, 2023, 8:43pm UTC](https://discourse.julialang.org/t/setting-default-arguments-for-a-function-passed-to-another-function/100712 "2023-06-22T20:43:55Z")

</div>

I am defining a function that takes a keyword argument. I am setting a default function for this keyword argument, but I would like to also pass a default keyword to that second function. I am not sure how to do this. F…

---

## [Specify \[compat\] for \_jll binary (Libtiff\_jll)](https://discourse.julialang.org/t/specify-compat-for-jll-binary-libtiff-jll/100713)

<div class="topic-metadata">

**Author:** [@disberd](https://discourse.julialang.org/u/disberd)\
**Replies:** 1\
**Last updated:** [June 22, 2023, 8:06pm UTC](https://discourse.julialang.org/t/specify-compat-for-jll-binary-libtiff-jll/100713 "2023-06-22T20:06:56Z")

</div>

Hi, I am having problem with the newly released version of Libtiff\_jll which apparently breaks PROJ\_jll. I also filed an issue on Yggdrasil Problems with Libtiff\_jllv4.5 and PROJ\_jll · Issue #6928 · JuliaPackaging/Yggd…

---

## [Standard way to deprecate a keyword argument](https://discourse.julialang.org/t/standard-way-to-deprecate-a-keyword-argument/100534)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 3\
**Last updated:** [June 22, 2023, 7:55pm UTC](https://discourse.julialang.org/t/standard-way-to-deprecate-a-keyword-argument/100534 "2023-06-22T19:55:22Z")

</div>

Is there a simple and standard way to deprecate a keyword argument? From reading through past threads it sounds like you need to do this manually, e.g., Deprecate keyword argument. But surely there’s a nice macro for thi…

---

## [Comprehensions versus pre-allocation](https://discourse.julialang.org/t/comprehensions-versus-pre-allocation/7352)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 16\
**Last updated:** [June 22, 2023, 4:20pm UTC](https://discourse.julialang.org/t/comprehensions-versus-pre-allocation/7352 "2023-06-22T16:20:54Z")

</div>

When it’s possible, I rewrite the calculation of some array from the “first pre-allocation then for-loop” to just a comprehension (albeit fairly complicated sometimes). In my mind comprehensions seem faster because the p…

---

## [How do people use Julia nightly?](https://discourse.julialang.org/t/how-do-people-use-julia-nightly/100685)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 9\
**Last updated:** [June 22, 2023, 2:54pm UTC](https://discourse.julialang.org/t/how-do-people-use-julia-nightly/100685 "2023-06-22T14:54:40Z")

</div>

Hi there, I keep seeing messages about how 1.10 is gonna be even faster and cooler than 1.9, so of course I wanna do like the cool kids and give it a try. As far as I can tell, there are two main ways to download it: …

---

## [Would the new atomic break the generic code?](https://discourse.julialang.org/t/would-the-new-atomic-break-the-generic-code/100627)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 1\
**Last updated:** [June 22, 2023, 1:53pm UTC](https://discourse.julialang.org/t/would-the-new-atomic-break-the-generic-code/100627 "2023-06-22T13:53:22Z")

</div>

This comes from the Julia Atomics Manifesto Strictly, it is not a “breaking” change, because it would work on the old code just fine. However, the problem is with the atomic fields. Let’s say struct A @atomic B::I…

---

## [Error: Tree Hash Mismatch! only on MacOs for all julia versions](https://discourse.julialang.org/t/error-tree-hash-mismatch-only-on-macos-for-all-julia-versions/100695)

<div class="topic-metadata">

**Author:** [@Craig\_Hamel](https://discourse.julialang.org/u/Craig_Hamel)\
**Replies:** 2\
**Last updated:** [June 22, 2023, 12:38pm UTC](https://discourse.julialang.org/t/error-tree-hash-mismatch-only-on-macos-for-all-julia-versions/100695 "2023-06-22T12:38:10Z")

</div>

Hi all, I have a package, Exodus.jl, that I’ve been working on for the past year or so. It is in the General registry and I’m currently experiencing a tree has mismatch for users trying to add the package on mac os only…

---

## [How to Draw the Hyperbolic Parametric Curve on the Left side and Confirm the Animation](https://discourse.julialang.org/t/how-to-draw-the-hyperbolic-parametric-curve-on-the-left-side-and-confirm-the-animation/100677)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [June 22, 2023, 6:47am UTC](https://discourse.julialang.org/t/how-to-draw-the-hyperbolic-parametric-curve-on-the-left-side-and-confirm-the-animation/100677 "2023-06-22T06:47:23Z")

</div>

Hi all, I am plotting a parametric hyperbolic curve, but I cannot draw the curve on the left side with my codes. I see from this : I want to know whether the animation is true, for each radians/degree the location of …

---

## [Avoiding repeated type declaration](https://discourse.julialang.org/t/avoiding-repeated-type-declaration/100679)

<div class="topic-metadata">

**Author:** [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Replies:** 2\
**Last updated:** [June 22, 2023, 2:05am UTC](https://discourse.julialang.org/t/avoiding-repeated-type-declaration/100679 "2023-06-22T02:05:58Z")

</div>

I find myself repeating a somewhat cumbersome type declaration, which seems like something to avoid. How? Here’s a condensed version of my current code, which uses Vector{Union{Missing, IntervalBox{1, Float64}}} twice. …

---

## [Numerical simulation of vortex-induced vibrations in Julia (Computation Fluid Dynamic)](https://discourse.julialang.org/t/numerical-simulation-of-vortex-induced-vibrations-in-julia-computation-fluid-dynamic/100543)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 4\
**Last updated:** [June 21, 2023, 10:21pm UTC](https://discourse.julialang.org/t/numerical-simulation-of-vortex-induced-vibrations-in-julia-computation-fluid-dynamic/100543 "2023-06-21T22:21:31Z")

</div>

Hi all, is there a package in Julia that can help to create numerical simulation for VIV like from this page: Thanks.

---

## [Question: derefing named tuples](https://discourse.julialang.org/t/question-derefing-named-tuples/100671)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 1\
**Last updated:** [June 21, 2023, 9:01pm UTC](https://discourse.julialang.org/t/question-derefing-named-tuples/100671 "2023-06-21T21:01:00Z")

</div>

I need to pass a bunch of vectors (from a typed table) into a function that is called in a hot loop. I had previously avoided the time cost of derefing the columns from the table in the loop. Now, I am putting the neede…

---

## [CSV read in is too slow than other language](https://discourse.julialang.org/t/csv-read-in-is-too-slow-than-other-language/100607)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 13\
**Last updated:** [June 21, 2023, 6:52pm UTC](https://discourse.julialang.org/t/csv-read-in-is-too-slow-than-other-language/100607 "2023-06-21T18:52:26Z")

</div>

Hello, The Julia language claims it is a fast language, but in my practice I’m hard to convincing myself of this, and now I meet terrible problem with the speed of julia again, hope someone here can give me some advi…

---

## [Are there any pentadiagonal system solvers?](https://discourse.julialang.org/t/are-there-any-pentadiagonal-system-solvers/100665)

<div class="topic-metadata">

**Author:** [@Veenty](https://discourse.julialang.org/u/Veenty)\
**Replies:** 0\
**Last updated:** [June 21, 2023, 4:12pm UTC](https://discourse.julialang.org/t/are-there-any-pentadiagonal-system-solvers/100665 "2023-06-21T16:12:58Z")

</div>

I have a pentadiagonal system and I was hoping that there are fast implementations of solvers related to this. I was trying to use BandedMatrices.jl and then do LU decomposition. But in this case it returns only 1 bande…

---

## [Julia kernel won't connect to jupyter](https://discourse.julialang.org/t/julia-kernel-wont-connect-to-jupyter/100625)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 4\
**Last updated:** [June 21, 2023, 3:46pm UTC](https://discourse.julialang.org/t/julia-kernel-wont-connect-to-jupyter/100625 "2023-06-21T15:46:47Z")

</div>

This is another new one. It always used to work. I do NOT use conda or the 4 gigabyte Python it brings in. I use brew install python. I use pip to install extra components needed by jupyter. Until today, it has alway…

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

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