# General Usage

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

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

**Page:** 73

---

## [Double broadcast](https://discourse.julialang.org/t/double-broadcast/127930)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 4\
**Last updated:** [April 10, 2025, 5:17pm UTC](https://discourse.julialang.org/t/double-broadcast/127930 "2025-04-10T17:17:52Z")

</div>

I frequently find myself wishing to do a double broadcast, e.g.: f = x-\>x+1 (v -\> f.(v)).( \[\[1,2,3\], \[4,5,6\]\]) Is this the most concise way to do it?

---

## [Commercial offers of Julia Computing](https://discourse.julialang.org/t/commercial-offers-of-julia-computing/127914)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [April 10, 2025, 5:12pm UTC](https://discourse.julialang.org/t/commercial-offers-of-julia-computing/127914 "2025-04-10T17:12:08Z")

</div>

I asked Julia Computing for an offer for a license for using the package JuliaSimControl.jl locally (for a small startup company). I came to the conclusion that such a license is not offered. This is a pity. For small c…

---

## [Improve performance in Flux.jl](https://discourse.julialang.org/t/improve-performance-in-flux-jl/127939)

<div class="topic-metadata">

**Author:** [@Wuaphi](https://discourse.julialang.org/u/Wuaphi)\
**Replies:** 0\
**Last updated:** [April 10, 2025, 4:42pm UTC](https://discourse.julialang.org/t/improve-performance-in-flux-jl/127939 "2025-04-10T16:42:33Z")

</div>

I tried to train a LSTM model in Flux.jl, but whatever I do, the gpu usage only reaches about 50%. But I can’t make the batchsize bigger, as the vram is nearly full. I would appreciate any kind of help. module Lstm …

---

## [Dealing with multiple dispatch \`Vararg\`s](https://discourse.julialang.org/t/dealing-with-multiple-dispatch-vararg-s/127935)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 1\
**Last updated:** [April 10, 2025, 3:00pm UTC](https://discourse.julialang.org/t/dealing-with-multiple-dispatch-vararg-s/127935 "2025-04-10T15:00:53Z")

</div>

Say that we have two types: struct A end #= other library =# struct B end #= my library =# Now, let’s assume that in some other library there is a method: foo(x, xs...) = 1 foo(x::A, xs::A...) = 1 I want to over…

---

## [How to register/update my package with some local packages](https://discourse.julialang.org/t/how-to-register-update-my-package-with-some-local-packages/127912)

<div class="topic-metadata">

**Author:** [@chooron](https://discourse.julialang.org/u/chooron)\
**Replies:** 6\
**Last updated:** [April 10, 2025, 2:23pm UTC](https://discourse.julialang.org/t/how-to-register-update-my-package-with-some-local-packages/127912 "2025-04-10T14:23:29Z")

</div>

I’m developing a package (called HydroModels.jl) and when I want to register this package some problems arise The project.toml of the project is as follows: name = "HydroModels" uuid = "7e3cde01-c141-467b-bff6-5350a…

---

## [Hide or collapse text in Pluto](https://discourse.julialang.org/t/hide-or-collapse-text-in-pluto/73814)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 7\
**Last updated:** [April 10, 2025, 1:36pm UTC](https://discourse.julialang.org/t/hide-or-collapse-text-in-pluto/73814 "2025-04-10T13:36:01Z")

</div>

In some cases, it can be useful to hide text (as opposed to markdown) in notebooks when certain details may interrupt the flow of one’s main points. The analog in a static document would be a footnote. Is there a way to …

---

## [Ref{T} vs Base.RefValue{T}](https://discourse.julialang.org/t/ref-t-vs-base-refvalue-t/127886)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 20\
**Last updated:** [April 10, 2025, 1:07pm UTC](https://discourse.julialang.org/t/ref-t-vs-base-refvalue-t/127886 "2025-04-10T13:07:07Z")

</div>

Sometimes I want to make a field in a type mutable, and I do like struct S a::Ref{Float64} end This looks similar to the reference type used in ccall like @ccall f(a::Ref{Int})::Cdouble so I always thought it’s good. …

---

## [Why does forward diff yield totally different gradients compared to my manual perturbation](https://discourse.julialang.org/t/why-does-forward-diff-yield-totally-different-gradients-compared-to-my-manual-perturbation/127918)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 1\
**Last updated:** [April 10, 2025, 12:52pm UTC](https://discourse.julialang.org/t/why-does-forward-diff-yield-totally-different-gradients-compared-to-my-manual-perturbation/127918 "2025-04-10T12:52:29Z")

</div>

Guys, I am trying to use ForwardDiff.jl to calculate the gradients (Jacobians) of the model cost function to parameters (at the values of a “pre-set” local\_optim). I found ForwardDiff.jl yields a totally different Jacobi…

---

## [Start Julia interpreter directly, skipping Juliaup?](https://discourse.julialang.org/t/start-julia-interpreter-directly-skipping-juliaup/127923)

<div class="topic-metadata">

**Author:** [@arjunguha](https://discourse.julialang.org/u/arjunguha)\
**Replies:** 5\
**Last updated:** [April 10, 2025, 12:40pm UTC](https://discourse.julialang.org/t/start-julia-interpreter-directly-skipping-juliaup/127923 "2025-04-10T12:40:51Z")

</div>

I have Julia installed using juliaup. I’ve realized that the julia command forks to the Julia interpreter. Is there a conventional way to go directly to the interpreter? My goal is to launch as fast as possible – I’m ru…

---

## [Customize the HTML export of Pluto notebooks](https://discourse.julialang.org/t/customize-the-html-export-of-pluto-notebooks/127863)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 2\
**Last updated:** [April 10, 2025, 9:51am UTC](https://discourse.julialang.org/t/customize-the-html-export-of-pluto-notebooks/127863 "2025-04-10T09:51:20Z")

</div>

The static-export-template makes it easy to set up a repository of Pluto notebooks that automatically get deployed to GitHub pages. This happens via the export\_directory function of PlutoSliderServer. Is there any way t…

---

## [Printing a parseable representation](https://discourse.julialang.org/t/printing-a-parseable-representation/127913)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 0\
**Last updated:** [April 10, 2025, 9:17am UTC](https://discourse.julialang.org/t/printing-a-parseable-representation/127913 "2025-04-10T09:17:44Z")

</div>

I am trying to find a generic way to print a parseable representation of generic objects. By parseable, I mean an string that can be pasted into the Julia REPL and parsed to equal the original value. My main use for this…

---

## [MKL fails to pre compile: missing libiomp5md.dll](https://discourse.julialang.org/t/mkl-fails-to-pre-compile-missing-libiomp5md-dll/106425)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [April 10, 2025, 8:26am UTC](https://discourse.julialang.org/t/mkl-fails-to-pre-compile-missing-libiomp5md-dll/106425 "2025-04-10T08:26:55Z")

</div>

As it says: libiomp5md.dll is reported missing. This is on a Windows 11 Surface Pro, Julia 1.9.3. Is this problem known, and if so, what is the solution?

---

## [Error: Missing download info for actions/cache@v1](https://discourse.julialang.org/t/error-missing-download-info-for-actions-cache-v1/127896)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 4\
**Last updated:** [April 10, 2025, 8:06am UTC](https://discourse.julialang.org/t/error-missing-download-info-for-actions-cache-v1/127896 "2025-04-10T08:06:45Z")

</div>

I’m dusting off an old package, and found that CI is failing (presumably misconfigured). Can anyone tell me what’s wrong with my config?

---

## [Auto skip precompile workload of all \`dev\`ed packages](https://discourse.julialang.org/t/auto-skip-precompile-workload-of-all-dev-ed-packages/127907)

<div class="topic-metadata">

**Author:** [@hexaeder](https://discourse.julialang.org/u/hexaeder)\
**Replies:** 0\
**Last updated:** [April 10, 2025, 6:48am UTC](https://discourse.julialang.org/t/auto-skip-precompile-workload-of-all-dev-ed-packages/127907 "2025-04-10T06:48:08Z")

</div>

Hello, it seems like Julia never caches the precompilation of deved packages. Is that assumption correct? For packages with larger precompile workloads this can be annoying. I know, that I can use Prefereces.jl to opt-…

---

## [Terminate after warning is thrown - global setting](https://discourse.julialang.org/t/terminate-after-warning-is-thrown-global-setting/80368)

<div class="topic-metadata">

**Author:** [@dnldlg](https://discourse.julialang.org/u/dnldlg)\
**Replies:** 6\
**Last updated:** [April 10, 2025, 4:05am UTC](https://discourse.julialang.org/t/terminate-after-warning-is-thrown-global-setting/80368 "2025-04-10T04:05:58Z")

</div>

I want to ensure that my program runs without doing questionable operations. Thus I would like the program to terminate whenever a warning is thrown; i.e. promote a warning to the level of errors. Is there a way to do t…

---

## [Create a set with custom hash and isequal](https://discourse.julialang.org/t/create-a-set-with-custom-hash-and-isequal/127862)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 7\
**Last updated:** [April 9, 2025, 7:31pm UTC](https://discourse.julialang.org/t/create-a-set-with-custom-hash-and-isequal/127862 "2025-04-09T19:31:09Z")

</div>

Is it possible to create a Set{MyType} that uses a custom hash and isequal functions s.t. it is essentially a set of equivalence classes w.r.t the equivalence relation defined by my hash and isequal? I want to do this wi…

---

## [About reproducibility of Julia program run times](https://discourse.julialang.org/t/about-reproducibility-of-julia-program-run-times/127613)

<div class="topic-metadata">

**Author:** [@uwestoehr](https://discourse.julialang.org/u/uwestoehr)\
**Replies:** 20\
**Last updated:** [April 9, 2025, 4:12pm UTC](https://discourse.julialang.org/t/about-reproducibility-of-julia-program-run-times/127613 "2025-04-09T16:12:57Z")

</div>

I have a general issue with Julia. I know there is no solution but something should be done because as it is collaborative work is hard: The runtime of Julia programs is not stable. I don’t see fluctuations in the range…

---

## [Enzyme cannot deduce type for integral function in reverse mode AD](https://discourse.julialang.org/t/enzyme-cannot-deduce-type-for-integral-function-in-reverse-mode-ad/127822)

<div class="topic-metadata">

**Author:** [@jwalker](https://discourse.julialang.org/u/jwalker)\
**Replies:** 11\
**Last updated:** [April 9, 2025, 4:06pm UTC](https://discourse.julialang.org/t/enzyme-cannot-deduce-type-for-integral-function-in-reverse-mode-ad/127822 "2025-04-09T16:06:04Z")

</div>

Could someone explain why I’m getting the following error from this example? using Enzyme struct Parameters M::Int R::Real end function integrand2(v::Vector, nt::NamedTuple) x = v\[1\] y = v\[2\] θ = n…

---

## [Why isn't "\]" pastable into the julia REPL](https://discourse.julialang.org/t/why-isnt-pastable-into-the-julia-repl/127817)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 12\
**Last updated:** [April 9, 2025, 3:20pm UTC](https://discourse.julialang.org/t/why-isnt-pastable-into-the-julia-repl/127817 "2025-04-09T15:20:54Z")

</div>

Normally, when writing \] in the julia REPL, you go into pkg\>. But when pasting a line starting with \] in the REPL, it just shows as text. Writing \] manually: (@v1.11) pkg\> Pasting \]: julia\> \] Is there a reason for …

---

## [Different Base.show for Pluto and REPL](https://discourse.julialang.org/t/different-base-show-for-pluto-and-repl/93083)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 2\
**Last updated:** [April 9, 2025, 2:49pm UTC](https://discourse.julialang.org/t/different-base-show-for-pluto-and-repl/93083 "2025-04-09T14:49:17Z")

</div>

I want to have different Base.show representations for a struct when I am on REPL and when I am on Pluto by invoking the same code. Is there a more specialized ::MIME I can use for this purpose, other than ::MIME"text/pl…

---

## [Define Python function in Julia file with PythonCall?](https://discourse.julialang.org/t/define-python-function-in-julia-file-with-pythoncall/98593)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 10\
**Last updated:** [April 9, 2025, 1:02pm UTC](https://discourse.julialang.org/t/define-python-function-in-julia-file-with-pythoncall/98593 "2025-04-09T13:02:22Z")

</div>

Context: I have a Pluto notebook for teaching where I need to create a Python function. I want to use PythonCall for better portability, but I miss the py"..." syntax of PyCall which allows you to directly define Python …

---

## [Redefining structure (again).. what' the current situation and what to expect?](https://discourse.julialang.org/t/redefining-structure-again-what-the-current-situation-and-what-to-expect/127859)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [April 8, 2025, 7:35pm UTC](https://discourse.julialang.org/t/redefining-structure-again-what-the-current-situation-and-what-to-expect/127859 "2025-04-08T19:35:12Z")

</div>

Recently there have been a lot of discussions about the possibility and the implementations allowing Struct redefinition (1, 2, 3, …) and some related pull requests/issues have been closed (1,2,…) So, which is the situa…

---

## [Defining extensions](https://discourse.julialang.org/t/defining-extensions/127877)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 6\
**Last updated:** [April 9, 2025, 11:16am UTC](https://discourse.julialang.org/t/defining-extensions/127877 "2025-04-09T11:16:17Z")

</div>

I have a package extension that defines a StructTypes.jl interface for a type I do not own so that I can use JSON3.jl on it. What if another package does the same and both are loaded? What would be the correct way of de…

---

## [Can't get local package to allow inclusion of a new package](https://discourse.julialang.org/t/cant-get-local-package-to-allow-inclusion-of-a-new-package/127872)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 3\
**Last updated:** [April 9, 2025, 5:53am UTC](https://discourse.julialang.org/t/cant-get-local-package-to-allow-inclusion-of-a-new-package/127872 "2025-04-09T05:53:39Z")

</div>

I have a package locally. It is a git repo, but it is not shared to github. It is what S. Karpinski casually but usefully defined as an “application”: a collection of Julia source files to do some self-contained task, i…

---

## [How to embedding julia on Windows with cmake and Clang?](https://discourse.julialang.org/t/how-to-embedding-julia-on-windows-with-cmake-and-clang/127600)

<div class="topic-metadata">

**Author:** [@ysyecust](https://discourse.julialang.org/u/ysyecust)\
**Replies:** 1\
**Last updated:** [April 9, 2025, 3:31am UTC](https://discourse.julialang.org/t/how-to-embedding-julia-on-windows-with-cmake-and-clang/127600 "2025-04-09T03:31:37Z")

</div>

I think I have configured the code correctly, but I keep getting an error when compiling on Windows. I can successful compile on MACOS and Ubuntu22.04 \[cmake\] Not searching for unused variables given on the command line…

---

## [REPL reports (ParseError: unknown unicode character) when I copy-paste code containing unicodes to the terminal in VScode](https://discourse.julialang.org/t/repl-reports-parseerror-unknown-unicode-character-when-i-copy-paste-code-containing-unicodes-to-the-terminal-in-vscode/127803)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 17\
**Last updated:** [April 9, 2025, 2:51am UTC](https://discourse.julialang.org/t/repl-reports-parseerror-unknown-unicode-character-when-i-copy-paste-code-containing-unicodes-to-the-terminal-in-vscode/127803 "2025-04-09T02:51:30Z")

</div>

Continuing the discussion from Issue with using Unicode in symbol names: In my application, it’s sometimes motivated to use variant style of letters. Maybe often the case is they can work properly (copy-paste workflow …

---

## [Why is there no isless(::Int64, ::UnitRange{Int64})?](https://discourse.julialang.org/t/why-is-there-no-isless-int64-unitrange-int64/112648)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 45\
**Last updated:** [April 9, 2025, 1:54am UTC](https://discourse.julialang.org/t/why-is-there-no-isless-int64-unitrange-int64/112648 "2025-04-09T01:54:22Z")

</div>

It seems to me that all of these are unambiguous: 1 \< 4:5 == true 2 ≤ 2:5 == true 3 ≤ 2:5 == true 5 ≤ 2:5 == true 6 ≤ 2:5 == false 6 \> 2:5 == true 4 \> 2:5 == false That is, for any Int, we can derive an unambiguous a…

---

## [Suggestion to maintain project enviroment](https://discourse.julialang.org/t/suggestion-to-maintain-project-enviroment/127865)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 4\
**Last updated:** [April 9, 2025, 1:03am UTC](https://discourse.julialang.org/t/suggestion-to-maintain-project-enviroment/127865 "2025-04-09T01:03:14Z")

</div>

Hi, I am looking forward some suggestions regarding how to maintain the project enviroment in julia. what I suffering is when I activate one of my project envrioment(it works smoothly before), it will raise error about …

---

## [Memory leak when migrating from Julia 1.10.7 to 1.11.2](https://discourse.julialang.org/t/memory-leak-when-migrating-from-julia-1-10-7-to-1-11-2/124153)

<div class="topic-metadata">

**Author:** [@Gattu\_Mytraya](https://discourse.julialang.org/u/Gattu_Mytraya)\
**Replies:** 10\
**Last updated:** [April 8, 2025, 11:55pm UTC](https://discourse.julialang.org/t/memory-leak-when-migrating-from-julia-1-10-7-to-1-11-2/124153 "2025-04-08T23:55:48Z")

</div>

Hi, I’m encountering a memory issue in Julia v1.11.2 with a Monte Carlo simulation. The code spans multiple files which makes it hard for me to post it here. I can say that the code doesn’t allocate new memory after the…

---

## [Multi-processing and Distributed Computing Manual Questions and Suggestions](https://discourse.julialang.org/t/multi-processing-and-distributed-computing-manual-questions-and-suggestions/127869)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 0\
**Last updated:** [April 8, 2025, 9:50pm UTC](https://discourse.julialang.org/t/multi-processing-and-distributed-computing-manual-questions-and-suggestions/127869 "2025-04-08T21:50:06Z")

</div>

I am trying to learn how to do distributed computing in Julia, so I looked at the documentation in the official Julia manual (which I think is the only documentation page, if there’s a more detailed or standalone one I w…

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

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