# General Usage

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

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

**Page:** 147

---

## [Understanding how to use adaptive solver when dt is in the equations](https://discourse.julialang.org/t/understanding-how-to-use-adaptive-solver-when-dt-is-in-the-equations/117520)

<div class="topic-metadata">

**Author:** [@dbox](https://discourse.julialang.org/u/dbox)\
**Replies:** 2\
**Last updated:** [July 26, 2024, 3:46pm UTC](https://discourse.julialang.org/t/understanding-how-to-use-adaptive-solver-when-dt-is-in-the-equations/117520 "2024-07-26T15:46:50Z")

</div>

Hi, I’m trying to solve a system of equations where some of the terms have explicit dependence on dt. The way round this I am using is passing dt as a parameter: params = Dict(:dt =\> dt) params = NamedTuple(params) b…

---

## [Package Dev Workflow with Multiple Dev Machines?](https://discourse.julialang.org/t/package-dev-workflow-with-multiple-dev-machines/114520)

<div class="topic-metadata">

**Author:** [@zacharyneveu](https://discourse.julialang.org/u/zacharyneveu)\
**Replies:** 1\
**Last updated:** [July 26, 2024, 3:10pm UTC](https://discourse.julialang.org/t/package-dev-workflow-with-multiple-dev-machines/114520 "2024-07-26T15:10:16Z")

</div>

I’m running into issues with what I think is a pretty common workflow and looking for advice on how to manage this workflow. My situation is: I’m working on a Julia project - in this case a Genie app I need to modify o…

---

## [Presentation on heap vs. stack](https://discourse.julialang.org/t/presentation-on-heap-vs-stack/117505)

<div class="topic-metadata">

**Author:** [@roland-KA](https://discourse.julialang.org/u/roland-KA)\
**Replies:** 5\
**Last updated:** [July 26, 2024, 2:59pm UTC](https://discourse.julialang.org/t/presentation-on-heap-vs-stack/117505 "2024-07-26T14:59:53Z")

</div>

I remember having seen a presentation about objects being stored on the heap vs. stack with some interesting insights. But unfortunately I don’t find it any more. Several Julia examples have been presented, using a stru…

---

## [What is the motivation for Julia not dispatching on keyword arguments?](https://discourse.julialang.org/t/what-is-the-motivation-for-julia-not-dispatching-on-keyword-arguments/117447)

<div class="topic-metadata">

**Author:** [@TimHargreaves](https://discourse.julialang.org/u/TimHargreaves)\
**Replies:** 4\
**Last updated:** [July 26, 2024, 1:36pm UTC](https://discourse.julialang.org/t/what-is-the-motivation-for-julia-not-dispatching-on-keyword-arguments/117447 "2024-07-26T13:36:09Z")

</div>

I have come to peace with the fact Julia does not dispatch on keyword arguments, but I’m still unsure as to why this is the case. In this StackOverflow thread, a commenter suggests that keyword arguments do not particip…

---

## [Promoting a broadcasted array](https://discourse.julialang.org/t/promoting-a-broadcasted-array/117498)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 5\
**Last updated:** [July 26, 2024, 11:36am UTC](https://discourse.julialang.org/t/promoting-a-broadcasted-array/117498 "2024-07-26T11:36:03Z")

</div>

Consider: julia\> ifelse.(\[true, false\], \[1,2\], \[3.0,4.5\]) 2-element Vector{Real}: 1 4.5 This isn’t ideal; in this case clearly a concrete eltype would be better. I know I can write it as float.(ifelse.(...)) to solve…

---

## [How to measure the time taken by a part of the code excluding the disk operations](https://discourse.julialang.org/t/how-to-measure-the-time-taken-by-a-part-of-the-code-excluding-the-disk-operations/117469)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 5\
**Last updated:** [July 26, 2024, 9:30am UTC](https://discourse.julialang.org/t/how-to-measure-the-time-taken-by-a-part-of-the-code-excluding-the-disk-operations/117469 "2024-07-26T09:30:33Z")

</div>

I am trying to write a code that deals with repeated deserialization of tensors followed by contracting them and storing the result in another tensor. Here is an example of how the code looks like : I\_vvoo = zeros(F…

---

## [Bad performances when using Multithreading and Distributed with heavy LinearAlgebra calculations](https://discourse.julialang.org/t/bad-performances-when-using-multithreading-and-distributed-with-heavy-linearalgebra-calculations/117258)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 26\
**Last updated:** [July 25, 2024, 10:59pm UTC](https://discourse.julialang.org/t/bad-performances-when-using-multithreading-and-distributed-with-heavy-linearalgebra-calculations/117258 "2024-07-25T22:59:58Z")

</div>

Hello, I have noticed that Julia multithreading and Distributed scale very badly when calculating relatively heavy computations involving BLAS and LAPACK. As an example, here I show you the calculation of the expv funct…

---

## [Dataframes subset w/ nullable logic](https://discourse.julialang.org/t/dataframes-subset-w-nullable-logic/117484)

<div class="topic-metadata">

**Author:** [@mikemartind](https://discourse.julialang.org/u/mikemartind)\
**Replies:** 4\
**Last updated:** [July 25, 2024, 9:07pm UTC](https://discourse.julialang.org/t/dataframes-subset-w-nullable-logic/117484 "2024-07-25T21:07:36Z")

</div>

Working on a subset call that filters on multiple columns in a dataframe, but with variable conditions set by an external dict. So if the dict has a value, it checks for equality in the corresponding column. If the dict …

---

## [Indirect dependency "is required but does not seem to be installed" causing failure](https://discourse.julialang.org/t/indirect-dependency-is-required-but-does-not-seem-to-be-installed-causing-failure/117493)

<div class="topic-metadata">

**Author:** [@moble](https://discourse.julialang.org/u/moble)\
**Replies:** 1\
**Last updated:** [July 25, 2024, 8:34pm UTC](https://discourse.julialang.org/t/indirect-dependency-is-required-but-does-not-seem-to-be-installed-causing-failure/117493 "2024-07-25T20:34:07Z")

</div>

A user of a package of mine is having trouble installing the package on a cluster to which I don’t have access. I’ve been working with him to simplify it and use clean environments. (Originally, this came up because he…

---

## [A question about parsing (Markdown) string literals](https://discourse.julialang.org/t/a-question-about-parsing-markdown-string-literals/117442)

<div class="topic-metadata">

**Author:** [@mitiemannn](https://discourse.julialang.org/u/mitiemannn)\
**Replies:** 3\
**Last updated:** [July 25, 2024, 4:57pm UTC](https://discourse.julialang.org/t/a-question-about-parsing-markdown-string-literals/117442 "2024-07-25T16:57:22Z")

</div>

Hi everyone, I’ve tried to generate a Markdown.MD object from an computed string and observed something odd (MWE): julia\> using Markdown julia\> md"foo\\ bar" foo bar julia\> md"foo\\\\\\nbar" foo\\\\nbar julia\>…

---

## [How long does it take until I can install a new package version?](https://discourse.julialang.org/t/how-long-does-it-take-until-i-can-install-a-new-package-version/117475)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [July 25, 2024, 4:02pm UTC](https://discourse.julialang.org/t/how-long-does-it-take-until-i-can-install-a-new-package-version/117475 "2024-07-25T16:02:12Z")

</div>

I updated this package more than an hour ago: But if I try to install it in an empty project I get an outdated version: using Pkg Pkg.add("KitePodModels") installs version 3.2, not version 3.3 How long can it take u…

---

## [Struggling with Gmsh.jl](https://discourse.julialang.org/t/struggling-with-gmsh-jl/117335)

<div class="topic-metadata">

**Author:** [@panos.asproulis](https://discourse.julialang.org/u/panos.asproulis)\
**Replies:** 4\
**Last updated:** [July 25, 2024, 3:28pm UTC](https://discourse.julialang.org/t/struggling-with-gmsh-jl/117335 "2024-07-25T15:28:39Z")

</div>

I am struggling to use the Gmsh.jl API in order to extract some information from a 3D mesh I loaded to my application. There are two simple things I am trying to do. From the mesh I want to find all the mesh faces as …

---

## [\[Solved\] Solution to differential equation changes with Julia version](https://discourse.julialang.org/t/solved-solution-to-differential-equation-changes-with-julia-version/117466)

<div class="topic-metadata">

**Author:** [@lisapisa](https://discourse.julialang.org/u/lisapisa)\
**Replies:** 7\
**Last updated:** [July 25, 2024, 1:06pm UTC](https://discourse.julialang.org/t/solved-solution-to-differential-equation-changes-with-julia-version/117466 "2024-07-25T13:06:56Z")

</div>

Hey everyone!! I am stuck on trying to replicate some previous results for my thesis right now. For that, I want to generate the solution to a system of differential equations using the OrdinaryDiffEq package. Previou…

---

## [Type Inference of many dynamically created NamedTuples](https://discourse.julialang.org/t/type-inference-of-many-dynamically-created-namedtuples/117464)

<div class="topic-metadata">

**Author:** [@olivierlabayle](https://discourse.julialang.org/u/olivierlabayle)\
**Replies:** 6\
**Last updated:** [July 25, 2024, 12:44pm UTC](https://discourse.julialang.org/t/type-inference-of-many-dynamically-created-namedtuples/117464 "2024-07-25T12:44:18Z")

</div>

Hi, I am facing a compilation bottleneck in my code because I am creating and propagating a large collection of NamedTuples, each with different keys. This seems to cause type inference problems. I have created the fol…

---

## [SELinux and julia](https://discourse.julialang.org/t/selinux-and-julia/117420)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [July 25, 2024, 11:41am UTC](https://discourse.julialang.org/t/selinux-and-julia/117420 "2024-07-25T11:41:39Z")

</div>

Hi there, I am building on top of the julia docker and am running the build inside a kubernetes which has SELinux enabled. I am getting the following error during build \> \[10/18\] RUN \<\<'EOT' (#!/usr/bin/env julia...):…

---

## [Task seems to lock but not unlock mutex](https://discourse.julialang.org/t/task-seems-to-lock-but-not-unlock-mutex/117460)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 2\
**Last updated:** [July 25, 2024, 11:05am UTC](https://discourse.julialang.org/t/task-seems-to-lock-but-not-unlock-mutex/117460 "2024-07-25T11:05:11Z")

</div>

If you run this code using Base.Threads # mylock = ReentrantLock() btask = @async while true # global mylock # lock(mylock) print("B\\n") sleep(4/5) # unlock(mylock) end atask = @async while true …

---

## [How to read a file and initialize tensors with it's values without having it in memory?](https://discourse.julialang.org/t/how-to-read-a-file-and-initialize-tensors-with-its-values-without-having-it-in-memory/117418)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 6\
**Last updated:** [July 25, 2024, 9:58am UTC](https://discourse.julialang.org/t/how-to-read-a-file-and-initialize-tensors-with-its-values-without-having-it-in-memory/117418 "2024-07-25T09:58:06Z")

</div>

I have a simple (but possibly enormous) text file which has five columns, the first one has a floating point value and the other four have integer values , it looks like F p q r s where basically I want to write a tens…

---

## [Split keepempty](https://discourse.julialang.org/t/split-keepempty/117453)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [July 25, 2024, 4:57am UTC](https://discourse.julialang.org/t/split-keepempty/117453 "2024-07-25T04:57:27Z")

</div>

What does keepempty mean in split? Is there a good example? • keepempty: whether empty fields should be kept in the result. Default is false without a dlm argument, true with a dlm argument. julia\> split("hello;ther…

---

## [LoopVec, Tullio losing to Matrix multiplication](https://discourse.julialang.org/t/loopvec-tullio-losing-to-matrix-multiplication/115798)

<div class="topic-metadata">

**Author:** [@ditfurth](https://discourse.julialang.org/u/ditfurth)\
**Replies:** 9\
**Last updated:** [July 25, 2024, 4:51am UTC](https://discourse.julialang.org/t/loopvec-tullio-losing-to-matrix-multiplication/115798 "2024-07-25T04:51:01Z")

</div>

Hi all, I provide a simple mwe below #MWE using BenchmarkTools, Random, Distributions, Base.Threads, Tullio, LoopVectorization Random.seed!(123) s\_ijt = randn(3000,100)\*0.0005 .+ 0.1 gamma\_empty = zeros(size(s\_ijt,1)…

---

## [PackageCompiler.jl how to specify ARGS for create\_app?](https://discourse.julialang.org/t/packagecompiler-jl-how-to-specify-args-for-create-app/117405)

<div class="topic-metadata">

**Author:** [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Replies:** 2\
**Last updated:** [July 25, 2024, 3:52am UTC](https://discourse.julialang.org/t/packagecompiler-jl-how-to-specify-args-for-create-app/117405 "2024-07-25T03:52:04Z")

</div>

Method type signatures generally depend on command ARGS which get passed to entry point eg julia\_main(). Shouldn’t create\_app let us specify a list of example ARGS that it can execute and compile against?

---

## [Reduce allocation in nested for loops](https://discourse.julialang.org/t/reduce-allocation-in-nested-for-loops/117428)

<div class="topic-metadata">

**Author:** [@EthanN](https://discourse.julialang.org/u/EthanN)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 8:46pm UTC](https://discourse.julialang.org/t/reduce-allocation-in-nested-for-loops/117428 "2024-07-24T20:46:29Z")

</div>

I have a function that calculates the expectation and covariance of random variables on a grid with dimensions (nx, ny, nz). The variables y and z are Markovian, with Qy and Qz being their Markov matrices. Functions f an…

---

## [Kronecker.jl - KroneckerSum](https://discourse.julialang.org/t/kronecker-jl-kroneckersum/117440)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 0\
**Last updated:** [July 24, 2024, 7:34pm UTC](https://discourse.julialang.org/t/kronecker-jl-kroneckersum/117440 "2024-07-24T19:34:16Z")

</div>

Hello, Q1. Does the first equation at kroneckersums contain a typo in the second term on the right-hand side (KroneckerSum =\> KroneckerProduct)? Q2. Do (approximate) factorization methods exit for Kronecker sums? Q3. …

---

## [Trim a vector in place](https://discourse.julialang.org/t/trim-a-vector-in-place/117436)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 1\
**Last updated:** [July 24, 2024, 6:15pm UTC](https://discourse.julialang.org/t/trim-a-vector-in-place/117436 "2024-07-24T18:15:13Z")

</div>

I am trying to delete the last n elements from a vector v. Is there a better way? for \_ in 1:n pop!(v) end pop! would not accept a range argument. I try to avoid assuming anything about the indicies after:

---

## [Wrap Julia and my own julia app/package in a conda package](https://discourse.julialang.org/t/wrap-julia-and-my-own-julia-app-package-in-a-conda-package/117426)

<div class="topic-metadata">

**Author:** [@CrisCool](https://discourse.julialang.org/u/CrisCool)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 5:44pm UTC](https://discourse.julialang.org/t/wrap-julia-and-my-own-julia-app-package-in-a-conda-package/117426 "2024-07-24T17:44:18Z")

</div>

Hi there I have developed a Julia app (package) that depends on other Julia packages developed by myself. I need to wrap everything in a conda package, including Julia itself. Any advice on how to do that? thanks

---

## [What are the dangers of a possible proliferation of exception types?](https://discourse.julialang.org/t/what-are-the-dangers-of-a-possible-proliferation-of-exception-types/117310)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 7\
**Last updated:** [July 24, 2024, 4:33pm UTC](https://discourse.julialang.org/t/what-are-the-dangers-of-a-possible-proliferation-of-exception-types/117310 "2024-07-24T16:33:52Z")

</div>

I vaguely remember some advice about the necessity of being conservative with the number of different exception types. I can’t remember the rationale or find any on the Web, so I’m asking here. What’s wrong with having m…

---

## [Fix nesting or disable expansion arrow using Documenter.jl](https://discourse.julialang.org/t/fix-nesting-or-disable-expansion-arrow-using-documenter-jl/117424)

<div class="topic-metadata">

**Author:** [@clizbe](https://discourse.julialang.org/u/clizbe)\
**Replies:** 0\
**Last updated:** [July 24, 2024, 3:40pm UTC](https://discourse.julialang.org/t/fix-nesting-or-disable-expansion-arrow-using-documenter-jl/117424 "2024-07-24T15:40:37Z")

</div>

To avoid docs duplication, we’re using @docs; canonical=false to reference a docstring in the How-To section of our documentation. What bothers us is the collapse arrow, which makes this section look different from the …

---

## [AoG: MethodError: no method matching compute\_axes\_grid(::Layers, ::AlgebraOfGraphics.Scales; axis::Dictionaries.Dictionary{Symbol, Any})](https://discourse.julialang.org/t/aog-methoderror-no-method-matching-compute-axes-grid-layers-algebraofgraphics-scales-axis-dictionaries-dictionary-symbol-any/117415)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 1\
**Last updated:** [July 24, 2024, 2:11pm UTC](https://discourse.julialang.org/t/aog-methoderror-no-method-matching-compute-axes-grid-layers-algebraofgraphics-scales-axis-dictionaries-dictionary-symbol-any/117415 "2024-07-24T14:11:56Z")

</div>

I updated AoG from 0.6 version to 0.7 and all my tests failed with the same error mentioned in a title: ERROR: MethodError: no method matching compute\_axes\_grid(::Layers, ::AlgebraOfGraphics.Scales; axis::Dictionaries.D…

---

## [AoG error: "No aesthetic mapping defined ..."](https://discourse.julialang.org/t/aog-error-no-aesthetic-mapping-defined/117398)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 4\
**Last updated:** [July 24, 2024, 11:37am UTC](https://discourse.julialang.org/t/aog-error-no-aesthetic-mapping-defined/117398 "2024-07-24T11:37:35Z")

</div>

I defined a wrapper function around AoG’s visual(BarPlot) with a fair number of options (subplots, sub-figures, etc). This worked fine until I updated to AoG v0.7.2 and CairoMakie v 0.12.5 Now calling the function yield…

---

## [Mysterious type instability (& performance hit) with simple @threads](https://discourse.julialang.org/t/mysterious-type-instability-performance-hit-with-simple-threads/117404)

<div class="topic-metadata">

**Author:** [@barnett567](https://discourse.julialang.org/u/barnett567)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 5:58am UTC](https://discourse.julialang.org/t/mysterious-type-instability-performance-hit-with-simple-threads/117404 "2024-07-24T05:58:02Z")

</div>

Hello all - I’m really confused about the following large performance hit, I believe due to type instability, in a really simple/standard piece of code. It took a while to boil it down to this MWE. It is triggered when a…

---

## [How to ensure the same global sign convention in row vectors of a matrix (due to many separate eigensolver calls)](https://discourse.julialang.org/t/how-to-ensure-the-same-global-sign-convention-in-row-vectors-of-a-matrix-due-to-many-separate-eigensolver-calls/117406)

<div class="topic-metadata">

**Author:** [@physh](https://discourse.julialang.org/u/physh)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 6:54am UTC](https://discourse.julialang.org/t/how-to-ensure-the-same-global-sign-convention-in-row-vectors-of-a-matrix-due-to-many-separate-eigensolver-calls/117406 "2024-07-24T06:54:36Z")

</div>

Sorry for the title, I struggled to describe my problem concisely. I have a function \\phi(p,Z) which is evaluated on a grid pgrid, Zgrid and available as a matrix phi. My goal is to calculate the second derivative (late…

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

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