# General Usage

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

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

**Page:** 153

---

## [JET: are union incurred runtime dispatches really happening?](https://discourse.julialang.org/t/jet-are-union-incurred-runtime-dispatches-really-happening/116635)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 10\
**Last updated:** [July 5, 2024, 11:01am UTC](https://discourse.julialang.org/t/jet-are-union-incurred-runtime-dispatches-really-happening/116635 "2024-07-05T11:01:46Z")

</div>

I tend to think that the compiler is pretty smart and staff like union-splitting are handled gracefully under the hood. However, I was currently using JET.@code\_opt and I saw some dynamic dispatch where I thought there …

---

## [Project Environment and Package Issues](https://discourse.julialang.org/t/project-environment-and-package-issues/116641)

<div class="topic-metadata">

**Author:** [@c-allergic](https://discourse.julialang.org/u/c-allergic)\
**Replies:** 3\
**Last updated:** [July 5, 2024, 2:54pm UTC](https://discourse.julialang.org/t/project-environment-and-package-issues/116641 "2024-07-05T14:54:03Z")

</div>

I just pull an undergoing project on GitHub and its name is “ProblemReductions.jl”. I tried to run the example given in the directory “example/landscape”. There are Project.toml which clearifies the package that is usefu…

---

## [PackageCompiler: could not load symbol "\_\_bid32\_from\_string"](https://discourse.julialang.org/t/packagecompiler-could-not-load-symbol-bid32-from-string/116646)

<div class="topic-metadata">

**Author:** [@jehrensb](https://discourse.julialang.org/u/jehrensb)\
**Replies:** 1\
**Last updated:** [July 5, 2024, 2:08pm UTC](https://discourse.julialang.org/t/packagecompiler-could-not-load-symbol-bid32-from-string/116646 "2024-07-05T14:08:45Z")

</div>

I’m trying to compile an application with PackageCompiler.create\_app. While compiling the nonincremental system image, there’s an error: ⡆ \[01m:14s\] PackageCompiler: compiling nonincremental system imagecould not load …

---

## [Compat bound violations with stacked environements](https://discourse.julialang.org/t/compat-bound-violations-with-stacked-environements/116492)

<div class="topic-metadata">

**Author:** [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Replies:** 1\
**Last updated:** [July 5, 2024, 12:33pm UTC](https://discourse.julialang.org/t/compat-bound-violations-with-stacked-environements/116492 "2024-07-05T12:33:47Z")

</div>

Every once in a while I run into annoying issues with invalidated pre-compilation (requiring re-generating these caching every-time I load Julia for the same project). This always turns out to be an issue with my base en…

---

## [Can the developer encrypt their source code?](https://discourse.julialang.org/t/can-the-developer-encrypt-their-source-code/116639)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [July 5, 2024, 9:20am UTC](https://discourse.julialang.org/t/can-the-developer-encrypt-their-source-code/116639 "2024-07-05T09:20:11Z")

</div>

Is it possible in Julia for the developer to encrypt a package (registered or unregistered) in order that the source code is not open to the user but can be used by the user?

---

## [Get indices of points in convex hull](https://discourse.julialang.org/t/get-indices-of-points-in-convex-hull/116320)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 2\
**Last updated:** [July 4, 2024, 3:14pm UTC](https://discourse.julialang.org/t/get-indices-of-points-in-convex-hull/116320 "2024-07-04T15:14:04Z")

</div>

LazySets.jl contains the function convex\_hull. to get the points that form the convex hull of a set of points. julia\> x = rand(10); y = rand(10); julia\> t = map(x, y) do xi, yi \[xi, yi\] end; julia\> h…

---

## [Volume of a Convex Hull](https://discourse.julialang.org/t/volume-of-a-convex-hull/116629)

<div class="topic-metadata">

**Author:** [@Marta\_Pardo\_Araujo](https://discourse.julialang.org/u/Marta_Pardo_Araujo)\
**Replies:** 2\
**Last updated:** [July 4, 2024, 3:07pm UTC](https://discourse.julialang.org/t/volume-of-a-convex-hull/116629 "2024-07-04T15:07:00Z")

</div>

It is possible to compute the volume of a convex hull in julia? For example from a matrix of n rows and m columns?

---

## [Is it possible to use @example in docstrings?](https://discourse.julialang.org/t/is-it-possible-to-use-example-in-docstrings/100383)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 8\
**Last updated:** [July 4, 2024, 2:33pm UTC](https://discourse.julialang.org/t/is-it-possible-to-use-example-in-docstrings/100383 "2024-07-04T14:33:57Z")

</div>

I would like to use the @example in my docstrings so that it is displayed in the api section of the documentation. The code is displayed in the documentation, but not the output. Is there a way to make it work?

---

## [Themes : Setting Default Properties: How do they work in Makie?](https://discourse.julialang.org/t/themes-setting-default-properties-how-do-they-work-in-makie/116626)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 0\
**Last updated:** [July 4, 2024, 12:21pm UTC](https://discourse.julialang.org/t/themes-setting-default-properties-how-do-they-work-in-makie/116626 "2024-07-04T12:21:52Z")

</div>

I’ve just begun diving deeper into Makie. How do themes work? What attributes need you to call a parent Struct and what attributes can you call without a struct? I can’t set a default Scene camera for instance. I can s…

---

## [Update an external Observable in Makie recipe](https://discourse.julialang.org/t/update-an-external-observable-in-makie-recipe/116617)

<div class="topic-metadata">

**Author:** [@NicoD](https://discourse.julialang.org/u/NicoD)\
**Replies:** 2\
**Last updated:** [July 4, 2024, 12:17pm UTC](https://discourse.julialang.org/t/update-an-external-observable-in-makie-recipe/116617 "2024-07-04T12:17:35Z")

</div>

In Julia, an observable can be passed as argument to a function, and when the function updates its value, the changes are visible from outside the function (the observable declared outside is updated). Simple working ex…

---

## [Join() on iterator containing missing returns string containing "missing"](https://discourse.julialang.org/t/join-on-iterator-containing-missing-returns-string-containing-missing/116623)

<div class="topic-metadata">

**Author:** [@flxho](https://discourse.julialang.org/u/flxho)\
**Replies:** 1\
**Last updated:** [July 4, 2024, 12:07pm UTC](https://discourse.julialang.org/t/join-on-iterator-containing-missing-returns-string-containing-missing/116623 "2024-07-04T12:07:49Z")

</div>

When executing join(\[missing\]), the result is the String "missing". Is this intended behavior? I would have expected missing as a result. Is this by intention?

---

## [Can calling finalize lead to a double free?](https://discourse.julialang.org/t/can-calling-finalize-lead-to-a-double-free/116612)

<div class="topic-metadata">

**Author:** [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Replies:** 4\
**Last updated:** [July 4, 2024, 10:44am UTC](https://discourse.julialang.org/t/can-calling-finalize-lead-to-a-double-free/116612 "2024-07-04T10:44:55Z")

</div>

Are finalizers guaranteed to only run at most one time? Is there any way for a finalizer to somehow get called twice, for example, if finalize is called in multiple other finalizers, or manually called in different threa…

---

## [All Types Except One](https://discourse.julialang.org/t/all-types-except-one/116611)

<div class="topic-metadata">

**Author:** [@alfaromartino](https://discourse.julialang.org/u/alfaromartino)\
**Replies:** 6\
**Last updated:** [July 4, 2024, 10:18am UTC](https://discourse.julialang.org/t/all-types-except-one/116611 "2024-07-04T10:18:39Z")

</div>

Is there any way to simply that I want a type that includes everything but one? I’d expect a syntax like Union{Number \\ Bool, String} I saw the answer below, but it seems that the function doesn’t exist anymore

---

## [How can I improve the computational performance of my code (ODEProblem solving)?](https://discourse.julialang.org/t/how-can-i-improve-the-computational-performance-of-my-code-odeproblem-solving/114425)

<div class="topic-metadata">

**Author:** [@chooron](https://discourse.julialang.org/u/chooron)\
**Replies:** 8\
**Last updated:** [July 4, 2024, 9:33am UTC](https://discourse.julialang.org/t/how-can-i-improve-the-computational-performance-of-my-code-odeproblem-solving/114425 "2024-07-04T09:33:20Z")

</div>

I am currently building a library that can flexibly solve and optimize a variety of hydrological models (including some equations), which typically belongs to the ODEProblem. However, to ensure the flexibility of the lib…

---

## [Readers–writer lock using DataFrame](https://discourse.julialang.org/t/readers-writer-lock-using-dataframe/116550)

<div class="topic-metadata">

**Author:** [@JesperMartinsson](https://discourse.julialang.org/u/JesperMartinsson)\
**Replies:** 6\
**Last updated:** [July 4, 2024, 4:49am UTC](https://discourse.julialang.org/t/readers-writer-lock-using-dataframe/116550 "2024-07-04T04:49:51Z")

</div>

Hi, I have an application where one async task updates a DataFrame with new data every minute, while multiple tasks read the DataFrame at random times. I need to make this thread-safe, possibly by using a lock, to preve…

---

## [Assign solution set to a matrix](https://discourse.julialang.org/t/assign-solution-set-to-a-matrix/116600)

<div class="topic-metadata">

**Author:** [@Iverson\_Wang](https://discourse.julialang.org/u/Iverson_Wang)\
**Replies:** 0\
**Last updated:** [July 3, 2024, 5:13pm UTC](https://discourse.julialang.org/t/assign-solution-set-to-a-matrix/116600 "2024-07-03T17:13:57Z")

</div>

Here is the set of equations that I get the solutions: using HomotopyContinuation @var a2 a3 b2 b3 s3=1 + a2^3 + a3^3 s2t= 3(a2^2)\*b2 + 3(a3^2)\*b3 st2= 3a2\*(b2^2) + 3a3\*(b3^2) t3=1 + b2^3 + b3^3 f=System(\[s3,s2t,s…

---

## [Bad performance from parametric struct dispatch](https://discourse.julialang.org/t/bad-performance-from-parametric-struct-dispatch/116594)

<div class="topic-metadata">

**Author:** [@quantumtwist](https://discourse.julialang.org/u/quantumtwist)\
**Replies:** 9\
**Last updated:** [July 3, 2024, 4:03pm UTC](https://discourse.julialang.org/t/bad-performance-from-parametric-struct-dispatch/116594 "2024-07-03T16:03:30Z")

</div>

While trying to optimize the hot loop of my code, I ran into a very strange performance footgun that is reducing the speed of a simple function by at least ~100ns, which is a 10x performance hit for my use case. Questio…

---

## [Rrule (or frule) with kwargs](https://discourse.julialang.org/t/rrule-or-frule-with-kwargs/114150)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 9\
**Last updated:** [July 3, 2024, 3:05pm UTC](https://discourse.julialang.org/t/rrule-or-frule-with-kwargs/114150 "2024-07-03T15:05:34Z")

</div>

How does one define an rrule for a function, where the argument you want the derivative for is a key word argument (kwargs) ? Here is some previous discussion but this is a while ago and the whole structure seems to h…

---

## [Comparing mutable structs with identical field values in Julia](https://discourse.julialang.org/t/comparing-mutable-structs-with-identical-field-values-in-julia/116586)

<div class="topic-metadata">

**Author:** [@baiango](https://discourse.julialang.org/u/baiango)\
**Replies:** 5\
**Last updated:** [July 3, 2024, 3:03pm UTC](https://discourse.julialang.org/t/comparing-mutable-structs-with-identical-field-values-in-julia/116586 "2024-07-03T15:03:26Z")

</div>

Description I am working on a project that involves comparing mutable structs with identical field values in Julia. However, I am encountering unexpected results when using the == and === operators, as they return false …

---

## [Is there a simpler way to plot less points?](https://discourse.julialang.org/t/is-there-a-simpler-way-to-plot-less-points/75786)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 12\
**Last updated:** [July 3, 2024, 1:29pm UTC](https://discourse.julialang.org/t/is-there-a-simpler-way-to-plot-less-points/75786 "2024-07-03T13:29:25Z")

</div>

I have a solution for PDE with a lot of points. Is there any keyword in Plots.jl that can directly easily plot fewer points? If not, maybe we can manage to add one?

---

## [Time Calculation for Recurring Function Calls](https://discourse.julialang.org/t/time-calculation-for-recurring-function-calls/116578)

<div class="topic-metadata">

**Author:** [@usaer](https://discourse.julialang.org/u/usaer)\
**Replies:** 6\
**Last updated:** [July 3, 2024, 1:04pm UTC](https://discourse.julialang.org/t/time-calculation-for-recurring-function-calls/116578 "2024-07-03T13:04:26Z")

</div>

Hi all, I have a function xyz which I call at different positions inside my main function. Is there any way that I could get the cummulative sum of computational time for all the function xyz calls?

---

## [Arm64 julia/docker on AWS EC2: cpu target recommendations](https://discourse.julialang.org/t/arm64-julia-docker-on-aws-ec2-cpu-target-recommendations/115776)

<div class="topic-metadata">

**Author:** [@Graham\_Gill](https://discourse.julialang.org/u/Graham_Gill)\
**Replies:** 7\
**Last updated:** [July 3, 2024, 12:13pm UTC](https://discourse.julialang.org/t/arm64-julia-docker-on-aws-ec2-cpu-target-recommendations/115776 "2024-07-03T12:13:55Z")

</div>

I’m just looking for some addtional info here from people who have more experience. Can anyone recommend JULIA\_CPU\_TARGET settings for running Julia inside a Linux docker image on arm64 Amazon EC2? Can anyone provide s…

---

## [Convert Markdown.MD to string in Julia](https://discourse.julialang.org/t/convert-markdown-md-to-string-in-julia/116559)

<div class="topic-metadata">

**Author:** [@anastasia21112](https://discourse.julialang.org/u/anastasia21112)\
**Replies:** 1\
**Last updated:** [July 3, 2024, 10:34am UTC](https://discourse.julialang.org/t/convert-markdown-md-to-string-in-julia/116559 "2024-07-03T10:34:47Z")

</div>

I’m trying to parse a Markdown.MD table object into a string in Julia so that I can gather the list of things that are in the table and use them as strings later on in the code. I was wondering if there was any command t…

---

## [Running CI for Julia 1.6 on Github MacOS runners seems to fail?](https://discourse.julialang.org/t/running-ci-for-julia-1-6-on-github-macos-runners-seems-to-fail/116577)

<div class="topic-metadata">

**Author:** [@vettert](https://discourse.julialang.org/u/vettert)\
**Replies:** 3\
**Last updated:** [July 3, 2024, 10:03am UTC](https://discourse.julialang.org/t/running-ci-for-julia-1-6-on-github-macos-runners-seems-to-fail/116577 "2024-07-03T10:03:54Z")

</div>

I am trying to get tests for a package to pass on Julia 1.6 and different OS. Here is my CI file: Open62541.jl/.github/workflows/CI.yml at main · martinkosch/Open62541.jl Things are going fine, except for MacOS X, whic…

---

## [Slow code to compute b=A\*x](https://discourse.julialang.org/t/slow-code-to-compute-b-a-x/116562)

<div class="topic-metadata">

**Author:** [@ww1g11](https://discourse.julialang.org/u/ww1g11)\
**Replies:** 7\
**Last updated:** [July 3, 2024, 7:55am UTC](https://discourse.julialang.org/t/slow-code-to-compute-b-a-x/116562 "2024-07-03T07:55:35Z")

</div>

Hi all, I wrote a very simple code to compute b=A\*x and found that it is slow, please see the following codes to compare sum1, sum2 and sum3: using TimerOutputs const timer = TimerOutput() function test(N=20000) A…

---

## [Experiments with Julia Stack Sizes and Enzyme](https://discourse.julialang.org/t/experiments-with-julia-stack-sizes-and-enzyme/116511)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 1\
**Last updated:** [July 3, 2024, 12:48am UTC](https://discourse.julialang.org/t/experiments-with-julia-stack-sizes-and-enzyme/116511 "2024-07-03T00:48:40Z")

</div>

I’ve been trying to get Enzyme.jl working as an AD backend for SymbolicRegression.jl for a couple of years now, and recently got a working demonstration with a hack to increase the stack size: Extremely long compilation …

---

## [Disable Rectangle Zoom Makie](https://discourse.julialang.org/t/disable-rectangle-zoom-makie/116537)

<div class="topic-metadata">

**Author:** [@Ian\_L](https://discourse.julialang.org/u/Ian_L)\
**Replies:** 2\
**Last updated:** [July 2, 2024, 6:15pm UTC](https://discourse.julialang.org/t/disable-rectangle-zoom-makie/116537 "2024-07-02T18:15:49Z")

</div>

Hi, I am making an interactive plot in (W)GLMakie, and am wondering how to disable the default Axis interactivity. I have disabled zoom and panning, but I’m having trouble disabling rectangle zoom. What I have: using GL…

---

## [Overflow with Iterators.product](https://discourse.julialang.org/t/overflow-with-iterators-product/116532)

<div class="topic-metadata">

**Author:** [@minjaep](https://discourse.julialang.org/u/minjaep)\
**Replies:** 7\
**Last updated:** [July 2, 2024, 6:01pm UTC](https://discourse.julialang.org/t/overflow-with-iterators-product/116532 "2024-07-02T18:01:38Z")

</div>

I need to deal with values assigned to a d-dimensional cube, where the dimension d varies. Say L is the side length of a cube. To access a d-dimensional array with L^d entries I used the following. idx = Iterators.produ…

---

## [Problems with AD inference on wrapper function](https://discourse.julialang.org/t/problems-with-ad-inference-on-wrapper-function/116454)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 7\
**Last updated:** [July 2, 2024, 2:59pm UTC](https://discourse.julialang.org/t/problems-with-ad-inference-on-wrapper-function/116454 "2024-07-02T14:59:31Z")

</div>

I’m trying to fix inference issues within a Zygote gradient for DynamicExpressions.jl – with the goal of using fast AD in SymbolicRegression.jl. Right now Zygote.gradient is inferring Any as a return value and I can’t fi…

---

## [Why there is no documentation for \`merge\`](https://discourse.julialang.org/t/why-there-is-no-documentation-for-merge/116509)

<div class="topic-metadata">

**Author:** [@VinodV](https://discourse.julialang.org/u/VinodV)\
**Replies:** 4\
**Last updated:** [July 2, 2024, 12:09pm UTC](https://discourse.julialang.org/t/why-there-is-no-documentation-for-merge/116509 "2024-07-02T12:09:51Z")

</div>

merge is a useful function. Why there is no documentation found for it in the julia command line. Documentation is here : Collections and Data Structures · The Julia Language julia\> a Dict{I…

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

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