# General Usage

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

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

**Page:** 91

---

## [Experiments trying to use ArgMacros.jl with juliac](https://discourse.julialang.org/t/experiments-trying-to-use-argmacros-jl-with-juliac/125442)

<div class="topic-metadata">

**Author:** [@BenjaminDoran](https://discourse.julialang.org/u/BenjaminDoran)\
**Replies:** 0\
**Last updated:** [February 1, 2025, 1:42am UTC](https://discourse.julialang.org/t/experiments-trying-to-use-argmacros-jl-with-juliac/125442 "2025-02-01T01:42:21Z")

</div>

So, I was playing around with argument parsing in the context of the experimental juliac compilation and trying to use ArgMacros.jl since I have enjoyed its syntax for making CLI scripts in the past. A couple weeks ago …

---

## [Weird behaviour of GC with multithreaded array-access](https://discourse.julialang.org/t/weird-behaviour-of-gc-with-multithreaded-array-access/125433)

<div class="topic-metadata">

**Author:** [@wilhelm](https://discourse.julialang.org/u/wilhelm)\
**Replies:** 2\
**Last updated:** [January 31, 2025, 6:57pm UTC](https://discourse.julialang.org/t/weird-behaviour-of-gc-with-multithreaded-array-access/125433 "2025-01-31T18:57:31Z")

</div>

Hi! I recently worked with some big arrays and used multithreading to access and fill these arrays, but after the calculation it seemed like the GC did not manage to clear the ram used by the “non-main” thread. MWE: f…

---

## [Notice: a subtle footgun: UnionAll type variable order + method static parameter normalization](https://discourse.julialang.org/t/notice-a-subtle-footgun-unionall-type-variable-order-method-static-parameter-normalization/113779)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 2\
**Last updated:** [January 31, 2025, 10:12am UTC](https://discourse.julialang.org/t/notice-a-subtle-footgun-unionall-type-variable-order-method-static-parameter-normalization/113779 "2025-01-31T10:12:47Z")

</div>

Consider this snippet: id(::Type{T}) where {T} = T some\_type{7,Int} == id(some\_type){7,Int} Naively, it seems like the comparison on the second line should return true for any type some\_type, assuming neither type appl…

---

## [Saving GraphMakie figure](https://discourse.julialang.org/t/saving-graphmakie-figure/125403)

<div class="topic-metadata">

**Author:** [@Hakan\_Kucuk](https://discourse.julialang.org/u/Hakan_Kucuk)\
**Replies:** 2\
**Last updated:** [January 31, 2025, 9:48am UTC](https://discourse.julialang.org/t/saving-graphmakie-figure/125403 "2025-01-31T09:48:18Z")

</div>

I have a question about GraphMakie.jl. I have created a graph using Graphs.jl with Interaction Interface on jupyter notebook and i want to save the figure by protecting interaction. How can i handle that problem?

---

## [Comparing Javascript Temporal with Julia](https://discourse.julialang.org/t/comparing-javascript-temporal-with-julia/125419)

<div class="topic-metadata">

**Author:** [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Replies:** 0\
**Last updated:** [January 31, 2025, 7:37am UTC](https://discourse.julialang.org/t/comparing-javascript-temporal-with-julia/125419 "2025-01-31T07:37:22Z")

</div>

An article about Javascript’s upcoming Temporal API for working with dates and times is trending on Hacker News today. I was curious how it compared with Julia, so I used a small Pluto notebook to test things out and wri…

---

## [What is the interface for the "initial guess" function as 3rd argument of BVProblem?](https://discourse.julialang.org/t/what-is-the-interface-for-the-initial-guess-function-as-3rd-argument-of-bvproblem/125374)

<div class="topic-metadata">

**Author:** [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Replies:** 2\
**Last updated:** [January 31, 2025, 3:06am UTC](https://discourse.julialang.org/t/what-is-the-interface-for-the-initial-guess-function-as-3rd-argument-of-bvproblem/125374 "2025-01-31T03:06:50Z")

</div>

Hello, I’m coding a solver for a set of three coupled highly nonlinear differential equations. This problem offers a huge complex solution space in which any solver is likely to become lost without reasonable “initial …

---

## [Extracting dates and values from a string](https://discourse.julialang.org/t/extracting-dates-and-values-from-a-string/125401)

<div class="topic-metadata">

**Author:** [@jovansam](https://discourse.julialang.org/u/jovansam)\
**Replies:** 9\
**Last updated:** [January 30, 2025, 10:02pm UTC](https://discourse.julialang.org/t/extracting-dates-and-values-from-a-string/125401 "2025-01-30T22:02:50Z")

</div>

I would appreciation any guidance. I have the text below and would like to extract all dates and the associated information within “dataX.push()” to end up with for instance: 2023-01-10, 0.0, 0.0, 0.0, 0.0; 2023-01-11, 0…

---

## [Parallel computing doesn't work in my case?](https://discourse.julialang.org/t/parallel-computing-doesnt-work-in-my-case/125395)

<div class="topic-metadata">

**Author:** [@D\_W](https://discourse.julialang.org/u/D_W)\
**Replies:** 4\
**Last updated:** [January 30, 2025, 6:32pm UTC](https://discourse.julialang.org/t/parallel-computing-doesnt-work-in-my-case/125395 "2025-01-30T18:32:44Z")

</div>

I tried both multi-threading and distributed computing. However, it seems that neither improves the performance; the best way is just to use regular for loop. using BenchmarkTools using Distributed addprocs(2 - nprocs()…

---

## [Latexify functions with specific units Unitful](https://discourse.julialang.org/t/latexify-functions-with-specific-units-unitful/125284)

<div class="topic-metadata">

**Author:** [@eduardovrs](https://discourse.julialang.org/u/eduardovrs)\
**Replies:** 8\
**Last updated:** [January 30, 2025, 5:58pm UTC](https://discourse.julialang.org/t/latexify-functions-with-specific-units-unitful/125284 "2025-01-30T17:58:59Z")

</div>

I am trying to make a Pluto notebook that is easy to compare the functions made in Pluto and the Codes (in this case AISC 360). Also, it should be as easy to use as possible for everyone to use. I want the notebook fuun…

---

## [Unassigned type parameters in \`UnionAll\` of \`Tuple\` do not refer to concrete types in edge cases](https://discourse.julialang.org/t/unassigned-type-parameters-in-unionall-of-tuple-do-not-refer-to-concrete-types-in-edge-cases/125217)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 5\
**Last updated:** [January 30, 2025, 8:14am UTC](https://discourse.julialang.org/t/unassigned-type-parameters-in-unionall-of-tuple-do-not-refer-to-concrete-types-in-edge-cases/125217 "2025-01-30T08:14:13Z")

</div>

Consider a simple example where I define a type alias for (non-empty) Tuple: julia\> const MyTuple1{T, N} = Tuple{T, Vararg{T, N}} Tuple{T, Vararg{T, N}} where {T, N} Even when the type parameter T is not assigned, the U…

---

## [Passing an array of tuples to CxxWrap](https://discourse.julialang.org/t/passing-an-array-of-tuples-to-cxxwrap/125392)

<div class="topic-metadata">

**Author:** [@nabla](https://discourse.julialang.org/u/nabla)\
**Replies:** 0\
**Last updated:** [January 30, 2025, 1:49pm UTC](https://discourse.julialang.org/t/passing-an-array-of-tuples-to-cxxwrap/125392 "2025-01-30T13:49:32Z")

</div>

I’d love to pass an array of tuples to some C++ code; say calling myfunction(\[("a",1),("b",2)\]) At the C++ level, I would write a function mod.method("myfunction", \[\](const jlcxx::ArrayRef\<std::tuple\<std::string,int\>\> …

---

## [Which profile visualizers show type instability](https://discourse.julialang.org/t/which-profile-visualizers-show-type-instability/125376)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [January 30, 2025, 12:38pm UTC](https://discourse.julialang.org/t/which-profile-visualizers-show-type-instability/125376 "2025-01-30T12:38:41Z")

</div>

I cannot get ProfileView.jl to work on Wayland because of a shared library incompatibility. I will file a bug report as soon as I isolate the problem, but in the meantime I am looking for a replacement/alternative. Whic…

---

## [Variable from app.jl into script.js](https://discourse.julialang.org/t/variable-from-app-jl-into-script-js/125387)

<div class="topic-metadata">

**Author:** [@ReLoneR](https://discourse.julialang.org/u/ReLoneR)\
**Replies:** 0\
**Last updated:** [January 30, 2025, 12:02pm UTC](https://discourse.julialang.org/t/variable-from-app-jl-into-script-js/125387 "2025-01-30T12:02:23Z")

</div>

Hi, lets say i have an app.jl that have this variables app.jl : ... @app begin @out firstX = \[1, 2, 3, 4, 5\] @out firstY = \[5, 0, 3, -1, 2\] ... @page("/", "public/index\_ui.jl.html", layout = "public/index\_layou…

---

## ["cache misses, incompatible header" when loading library](https://discourse.julialang.org/t/cache-misses-incompatible-header-when-loading-library/125357)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [January 30, 2025, 10:16am UTC](https://discourse.julialang.org/t/cache-misses-incompatible-header-when-loading-library/125357 "2025-01-30T10:16:00Z")

</div>

On Julia 11.3, I am getting errors with the above message when loading some libraries, eg using Profile, PProf \[ Info: Precompiling PProf \[e4faabce-9ead-11e9-39d9-4379958e3056\] (cache misses: wrong dep version loaded (2…

---

## [Vscode julia language server cannot load on recent nixos](https://discourse.julialang.org/t/vscode-julia-language-server-cannot-load-on-recent-nixos/125352)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [January 30, 2025, 9:27am UTC](https://discourse.julialang.org/t/vscode-julia-language-server-cannot-load-on-recent-nixos/125352 "2025-01-30T09:27:37Z")

</div>

after upgrading my nixos, the juliaup julia process cannot start the vscode language server because of some curl dependency. Is this not managed inside julia? Usually on nixos things only break if the program depends i…

---

## [What is the difference between rand and sample?](https://discourse.julialang.org/t/what-is-the-difference-between-rand-and-sample/52297)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 18\
**Last updated:** [January 29, 2025, 6:14pm UTC](https://discourse.julialang.org/t/what-is-the-difference-between-rand-and-sample/52297 "2025-01-29T18:14:17Z")

</div>

What is the difference between rand(array, n) and sample(array, n)?

---

## [Using invoke() to call more general method](https://discourse.julialang.org/t/using-invoke-to-call-more-general-method/125324)

<div class="topic-metadata">

**Author:** [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Replies:** 4\
**Last updated:** [January 29, 2025, 6:05pm UTC](https://discourse.julialang.org/t/using-invoke-to-call-more-general-method/125324 "2025-01-29T18:05:18Z")

</div>

I have a method for convert() that I use on various subtypes of a ConfigStruct type, to initialize from a dictionary. For a couple of subtypes, I want to define specific behaviors (e.g., catch deprecated keys and map th…

---

## [Macro for linking Julia fcn to @ccall of C fcn, given names and arg types](https://discourse.julialang.org/t/macro-for-linking-julia-fcn-to-ccall-of-c-fcn-given-names-and-arg-types/125326)

<div class="topic-metadata">

**Author:** [@luke-kiernan](https://discourse.julialang.org/u/luke-kiernan)\
**Replies:** 3\
**Last updated:** [January 29, 2025, 5:29pm UTC](https://discourse.julialang.org/t/macro-for-linking-julia-fcn-to-ccall-of-c-fcn-given-names-and-arg-types/125326 "2025-01-29T17:29:02Z")

</div>

I have a bunch of C functions, that I want to write Julia wrappers for. Here’s an example: const LIBSPARSE = "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/"\* "vecLib.framewor…

---

## [Questions about JULIA\_CPU\_TARGET](https://discourse.julialang.org/t/questions-about-julia-cpu-target/125339)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 4\
**Last updated:** [January 29, 2025, 12:29pm UTC](https://discourse.julialang.org/t/questions-about-julia-cpu-target/125339 "2025-01-29T12:29:10Z")

</div>

I want to build a docker container that will run on Amazon EC2 M6a and M7a instances. These have Zen 3 / Zen 4 based AMD Epyc processors. Now the docker container should contain some already precompiled juila packages. …

---

## [Still looking for a way to use units meaningfully with SciML ecosystem](https://discourse.julialang.org/t/still-looking-for-a-way-to-use-units-meaningfully-with-sciml-ecosystem/103678)

<div class="topic-metadata">

**Author:** [@Ickaser](https://discourse.julialang.org/u/Ickaser)\
**Replies:** 17\
**Last updated:** [January 29, 2025, 11:47am UTC](https://discourse.julialang.org/t/still-looking-for-a-way-to-use-units-meaningfully-with-sciml-ecosystem/103678 "2025-01-29T11:47:11Z")

</div>

I’ve spent frustrating hours now working on an optimization problem across what should be a relatively simple set of ODEs. I am working in a field where some very commonly used units are frankly unpleasant (e.g. cm^2\\cd…

---

## [Julia 1.11.3 precompile errors](https://discourse.julialang.org/t/julia-1-11-3-precompile-errors/125253)

<div class="topic-metadata">

**Author:** [@ChrisNabold](https://discourse.julialang.org/u/ChrisNabold)\
**Replies:** 2\
**Last updated:** [January 29, 2025, 11:20am UTC](https://discourse.julialang.org/t/julia-1-11-3-precompile-errors/125253 "2025-01-29T11:20:54Z")

</div>

I tried to upgrade Julia 1-.11.2 to 1.11.3 but the package DifferentialEquations errors when precompiling

---

## [Refreshing a WGLMakie plot in realtime in jupyter notebook](https://discourse.julialang.org/t/refreshing-a-wglmakie-plot-in-realtime-in-jupyter-notebook/125300)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 7\
**Last updated:** [January 29, 2025, 11:09am UTC](https://discourse.julialang.org/t/refreshing-a-wglmakie-plot-in-realtime-in-jupyter-notebook/125300 "2025-01-29T11:09:57Z")

</div>

The concept is just like the above picture (a Mathematica notebook). The use case is monitoring in realtime a field in numerical evolution. Is it possible using WGLMakie in jupyter notebook? Or other alternative sugge…

---

## ["Unsafe" inner constructors of parametric types](https://discourse.julialang.org/t/unsafe-inner-constructors-of-parametric-types/125312)

<div class="topic-metadata">

**Author:** [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Replies:** 2\
**Last updated:** [January 28, 2025, 10:35pm UTC](https://discourse.julialang.org/t/unsafe-inner-constructors-of-parametric-types/125312 "2025-01-28T22:35:11Z")

</div>

I’ve recently learned that you can create functions inside a struct definition other than the inner constructor. One use is to create “unsafe” inner constructors, as discussed here: Bypass inner constructor / call \`new\` …

---

## [MicroMamba is not currently supported on your platform (FreeBSD)](https://discourse.julialang.org/t/micromamba-is-not-currently-supported-on-your-platform-freebsd/124813)

<div class="topic-metadata">

**Author:** [@ko56](https://discourse.julialang.org/u/ko56)\
**Replies:** 2\
**Last updated:** [January 28, 2025, 4:02pm UTC](https://discourse.julialang.org/t/micromamba-is-not-currently-supported-on-your-platform-freebsd/124813 "2025-01-28T16:02:47Z")

</div>

I’m trying to install PythonPlot in Julia v1.11, on FreeBSD 14.2. CondaPkg and MicroMamba are giving me a problem which I don’t know how to resolve. The error report from build PythonPlot follows: julia\> err PkgPrecom…

---

## [REPL does not handle multi line inputs bigger than the screen well on windows](https://discourse.julialang.org/t/repl-does-not-handle-multi-line-inputs-bigger-than-the-screen-well-on-windows/125211)

<div class="topic-metadata">

**Author:** [@cshen](https://discourse.julialang.org/u/cshen)\
**Replies:** 2\
**Last updated:** [January 28, 2025, 3:41pm UTC](https://discourse.julialang.org/t/repl-does-not-handle-multi-line-inputs-bigger-than-the-screen-well-on-windows/125211 "2025-01-28T15:41:52Z")

</div>

EDIT: linked wrong issue… Hello, I’ve encountered this issue again: REPL does not handle well multi-line input bigger than the screen · Issue #24049 · JuliaLang/julia, which is marked as resolved but I still encounter …

---

## [Write access to python numpy arrays encapsulated in a list from julia with PyCall](https://discourse.julialang.org/t/write-access-to-python-numpy-arrays-encapsulated-in-a-list-from-julia-with-pycall/125288)

<div class="topic-metadata">

**Author:** [@mesonepigreco](https://discourse.julialang.org/u/mesonepigreco)\
**Replies:** 2\
**Last updated:** [January 28, 2025, 12:44pm UTC](https://discourse.julialang.org/t/write-access-to-python-numpy-arrays-encapsulated-in-a-list-from-julia-with-pycall/125288 "2025-01-28T12:44:14Z")

</div>

Dear julianers, I am facing an issue trying to use a library I have in Python inside Julia. In particular, I need to modify the elements of a numpy array, which is stored inside a Python list from Julia using PyCall. H…

---

## [Big Float epsilon always the same independant of precision?](https://discourse.julialang.org/t/big-float-epsilon-always-the-same-independant-of-precision/125295)

<div class="topic-metadata">

**Author:** [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Replies:** 0\
**Last updated:** [January 28, 2025, 11:02am UTC](https://discourse.julialang.org/t/big-float-epsilon-always-the-same-independant-of-precision/125295 "2025-01-28T11:02:58Z")

</div>

When I allocate a big float, I can set the precison as a keyword argument, like so: eps(BigFloat(1.0, precision=10)) However I always seem to get the same floating point epsilon for some reason, no matter the precision…

---

## [NonLinearRange](https://discourse.julialang.org/t/nonlinearrange/125221)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 7\
**Last updated:** [January 28, 2025, 8:58am UTC](https://discourse.julialang.org/t/nonlinearrange/125221 "2025-01-28T08:58:54Z")

</div>

I was looking for way to way to allow multi-kernel broadcasting to act also over non-linear ranges. E.g. consider a complex exponential exp.(1im .\* k0 .\* x) with k0=1.35 being a scalar and x=0:255 a linear range. This …

---

## [Packing and unpacking an array of N-bit ints](https://discourse.julialang.org/t/packing-and-unpacking-an-array-of-n-bit-ints/125280)

<div class="topic-metadata">

**Author:** [@lntricate](https://discourse.julialang.org/u/lntricate)\
**Replies:** 5\
**Last updated:** [January 27, 2025, 10:42pm UTC](https://discourse.julialang.org/t/packing-and-unpacking-an-array-of-n-bit-ints/125280 "2025-01-27T22:42:52Z")

</div>

Given an IO, I want to read N bits into each index of an Array{UInt64} and vice-versa: For example, the data \[0b0\_101\_100\_011\_010\_001\_000\_111\_110\_101\_100\_011\_010\_001\_000\_111\_110\_101\_100\_011\_010\_001, 0b00\_010\_001\_000\_111\_…

---

## [\`llvmcall\` error "llvmcall only supports intrinsic calls" for scalar integer intrinsics on Apple M2](https://discourse.julialang.org/t/llvmcall-error-llvmcall-only-supports-intrinsic-calls-for-scalar-integer-intrinsics-on-apple-m2/125278)

<div class="topic-metadata">

**Author:** [@guille](https://discourse.julialang.org/u/guille)\
**Replies:** 2\
**Last updated:** [January 27, 2025, 8:37pm UTC](https://discourse.julialang.org/t/llvmcall-error-llvmcall-only-supports-intrinsic-calls-for-scalar-integer-intrinsics-on-apple-m2/125278 "2025-01-27T20:37:59Z")

</div>

Hello all! I’m encountering a very strange issue using llvmcall on my Apple M2 Mac with Julia 1.11.3. Hoping someone might have some insights or suggestions. Problem: When I try to use llvmcall to call basic LLVM scal…

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

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