# General Usage

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

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

**Page:** 122

---

## [How can I allocate a buffer contains different types of data (for MPI communication, for example)?](https://discourse.julialang.org/t/how-can-i-allocate-a-buffer-contains-different-types-of-data-for-mpi-communication-for-example/121478)

<div class="topic-metadata">

**Author:** [@Blumenkranz](https://discourse.julialang.org/u/Blumenkranz)\
**Replies:** 10\
**Last updated:** [October 20, 2024, 8:12am UTC](https://discourse.julialang.org/t/how-can-i-allocate-a-buffer-contains-different-types-of-data-for-mpi-communication-for-example/121478 "2024-10-20T08:12:23Z")

</div>

I need to communicate data of Vector{Int8} and Vector{Float64} using MPI.jl. How can I achieve this with a single communication?

---

## [Adding a parameter to macro call](https://discourse.julialang.org/t/adding-a-parameter-to-macro-call/121489)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 1\
**Last updated:** [October 20, 2024, 6:17am UTC](https://discourse.julialang.org/t/adding-a-parameter-to-macro-call/121489 "2024-10-20T06:17:17Z")

</div>

In my package ShareAdd.jl a macro is defined in the form(s) @usingany Pkg1 @usingany Pkg1, Pkg2, Pkg3 Now, I’d like to add an optional flag to first update the corresponding packages before import. What is the (best) w…

---

## [GLMakie precompilation fails ( julia 1.10.2; WSL2)](https://discourse.julialang.org/t/glmakie-precompilation-fails-julia-1-10-2-wsl2/118981)

<div class="topic-metadata">

**Author:** [@lgmendes](https://discourse.julialang.org/u/lgmendes)\
**Replies:** 8\
**Last updated:** [October 20, 2024, 3:18am UTC](https://discourse.julialang.org/t/glmakie-precompilation-fails-julia-1-10-2-wsl2/118981 "2024-10-20T03:18:12Z")

</div>

Hi, The precompilation of GLMakie is failing: show(err) 1-element ExceptionStack: The following 1 direct dependency failed to precompile: GLMakie \[e9467ef8-e4e7-5192-8a1a-b1aee30e663a\] Failed to precompile GLMakie …

---

## [Perspectives from 2024 GSoC Mentor Summit!](https://discourse.julialang.org/t/perspectives-from-2024-gsoc-mentor-summit/121488)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 0\
**Last updated:** [October 19, 2024, 6:15pm UTC](https://discourse.julialang.org/t/perspectives-from-2024-gsoc-mentor-summit/121488 "2024-10-19T18:15:54Z")

</div>

Hi folks! :wave: Your friendly Julia GSoC Co-Admin here! Wanted to share my own update about this year’s GSoC Mentor Summit. This year, @avik, @mortenpi, and I went to Google HQ in Mountain View to meet other GSoC proje…

---

## [How use eval to define macros that involve function definitions](https://discourse.julialang.org/t/how-use-eval-to-define-macros-that-involve-function-definitions/93773)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 3\
**Last updated:** [October 19, 2024, 6:12pm UTC](https://discourse.julialang.org/t/how-use-eval-to-define-macros-that-involve-function-definitions/93773 "2024-10-19T18:12:58Z")

</div>

I want to define a bunch of macros that define function methods in a private module. module MyModule function f() end function g() end end using Main.MyModule struct T i end macro f(T, expr) esc(:(MyModule.…

---

## [\`ifelse\` query](https://discourse.julialang.org/t/ifelse-query/121466)

<div class="topic-metadata">

**Author:** [@Sushrut\_Deshpande](https://discourse.julialang.org/u/Sushrut_Deshpande)\
**Replies:** 9\
**Last updated:** [October 19, 2024, 2:26pm UTC](https://discourse.julialang.org/t/ifelse-query/121466 "2024-10-19T14:26:20Z")

</div>

Hello, I have the following code function test(x,y) ifelse(x\>y,return x, throw(error("err"))) end For me the function is always returning error. This does not make sense to me as for test(2,1) it should return 2. …

---

## [StyledStrings and maintainability of reproducible project environments](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471)

<div class="topic-metadata">

**Author:** [@jwortmann](https://discourse.julialang.org/u/jwortmann)\
**Replies:** 7\
**Last updated:** [October 19, 2024, 8:01am UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471 "2024-10-19T08:01:47Z")

</div>

I have a Julia project environment at LSP-julia/server at main · sublimelsp/LSP-julia · GitHub with a single dependency (LanguageServer.jl) that I update more or less regularly. After updating to Julia 1.11 I noticed tha…

---

## [The manual's section on variable scope sucks](https://discourse.julialang.org/t/the-manuals-section-on-variable-scope-sucks/119522)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 46\
**Last updated:** [October 19, 2024, 6:35am UTC](https://discourse.julialang.org/t/the-manuals-section-on-variable-scope-sucks/119522 "2024-10-19T06:35:14Z")

</div>

I know it’s not for the lack of trying, but the manual’s section on scope is unclear if not outright wrong. Issue 1 The manual says: If you assign to an existing local, it always \[emphasis not mine\] updates that exis…

---

## [Embedding julia: jl\_atexit\_hook always segfaults](https://discourse.julialang.org/t/embedding-julia-jl-atexit-hook-always-segfaults/108722)

<div class="topic-metadata">

**Author:** [@xapkohheh](https://discourse.julialang.org/u/xapkohheh)\
**Replies:** 10\
**Last updated:** [October 19, 2024, 12:32am UTC](https://discourse.julialang.org/t/embedding-julia-jl-atexit-hook-always-segfaults/108722 "2024-10-19T00:32:12Z")

</div>

Hello there! I’ve been trying to embed julia into a digital content creation software named Houdini (I’ve asked questions about this about two years ago, finally got back at it :slight\_smile: ) So everything seems to w…

---

## [Using \`download\` during dep build (Julia v1.11)](https://discourse.julialang.org/t/using-download-during-dep-build-julia-v1-11/121393)

<div class="topic-metadata">

**Author:** [@felipenoris](https://discourse.julialang.org/u/felipenoris)\
**Replies:** 6\
**Last updated:** [October 18, 2024, 8:28pm UTC](https://discourse.julialang.org/t/using-download-during-dep-build-julia-v1-11/121393 "2024-10-18T20:28:58Z")

</div>

Hi! The build script from package Oracle uses download function defined in the stdlib (Oracle.jl/deps/build.jl at cad6bc5bde0f1bd65cff493ca2113d7fe3f2d9e2 · felipenoris/Oracle.jl · GitHub). When migrating to Julia v1.11…

---

## [Macro to reorder conditional nested loop](https://discourse.julialang.org/t/macro-to-reorder-conditional-nested-loop/93588)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [October 18, 2024, 5:31pm UTC](https://discourse.julialang.org/t/macro-to-reorder-conditional-nested-loop/93588 "2024-10-18T17:31:33Z")

</div>

I have a loop of the form for j=1:n for k = max(1,j-d\_u):min(j-u-1,m) f(j, k) end end and it turns out that computing the limits on k in each iteration is adding a lot of overhead. Turns ou…

---

## [Using trained neural networks inside GPU computations](https://discourse.julialang.org/t/using-trained-neural-networks-inside-gpu-computations/121463)

<div class="topic-metadata">

**Author:** [@tduretz](https://discourse.julialang.org/u/tduretz)\
**Replies:** 0\
**Last updated:** [October 18, 2024, 4:31pm UTC](https://discourse.julialang.org/t/using-trained-neural-networks-inside-gpu-computations/121463 "2024-10-18T16:31:01Z")

</div>

Hi all, We run simulations which rely on iterative solvers on GPU using tools like ParallelStencil or Chmy. Part of computations involve the evaluation of heavy non-linear functions that can be shortcut by (1) training…

---

## [StackOverflowError in AltroTutorials.jl](https://discourse.julialang.org/t/stackoverflowerror-in-altrotutorials-jl/121448)

<div class="topic-metadata">

**Author:** [@jay\_Gao](https://discourse.julialang.org/u/jay_Gao)\
**Replies:** 2\
**Last updated:** [October 18, 2024, 11:23am UTC](https://discourse.julialang.org/t/stackoverflowerror-in-altrotutorials-jl/121448 "2024-10-18T11:23:43Z")

</div>

When I set up a model, I am getting： StackOverflowError: Stacktrace: \[1\] SizedMatrix{6, 3, Float64, 2, Matrix{Float64}}(a::SparseArrays.SparseMatrixCSC{Float64, Int64}) (repeats 79984 times) @ StaticArrays C:\\Use…

---

## [How can I implement the TRIAD algorithm in Julia](https://discourse.julialang.org/t/how-can-i-implement-the-triad-algorithm-in-julia/121151)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 32\
**Last updated:** [October 11, 2024, 3:02pm UTC](https://discourse.julialang.org/t/how-can-i-implement-the-triad-algorithm-in-julia/121151 "2024-10-11T15:02:25Z")

</div>

I try to calculate the rotation matrix that needs to applied on one reference frame to match a second reference frame. I have the following code: # test calculation of the orientation using LinearAlgebra, Rotations, Sta…

---

## [Fails to start the version v1.11.0](https://discourse.julialang.org/t/fails-to-start-the-version-v1-11-0/121074)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 1\
**Last updated:** [October 18, 2024, 2:29am UTC](https://discourse.julialang.org/t/fails-to-start-the-version-v1-11-0/121074 "2024-10-18T02:29:03Z")

</div>

I just upgraded to the latest version v1.11.0, and failed to start the Julia.exe. Errors prompt like this: How can I fix this?

---

## [Unexpected result from setprecision](https://discourse.julialang.org/t/unexpected-result-from-setprecision/89336)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 3\
**Last updated:** [October 18, 2024, 1:55am UTC](https://discourse.julialang.org/t/unexpected-result-from-setprecision/89336 "2024-10-18T01:55:09Z")

</div>

I expected the following to return 512, rather than 256. Could someone please explain why this is happening? julia\> setprecision(512) do thisbig = big"1.0" @show precision(thisbig) end prec…

---

## [Struggling with Julia and large datasets](https://discourse.julialang.org/t/struggling-with-julia-and-large-datasets/56916)

<div class="topic-metadata">

**Author:** [@sampope](https://discourse.julialang.org/u/sampope)\
**Replies:** 67\
**Last updated:** [October 17, 2024, 11:42pm UTC](https://discourse.julialang.org/t/struggling-with-julia-and-large-datasets/56916 "2024-10-17T23:42:00Z")

</div>

TLDR: Skip to the 3rd paragraph for the questions. backstory I’m working with a decent sized dataset, around 100 billion log lines from sensor data, updating at 258 million lines per day at nanosecond resolution. Origin…

---

## [Error in REPL when entering package mode in Julia 1.11](https://discourse.julialang.org/t/error-in-repl-when-entering-package-mode-in-julia-1-11/121097)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 10\
**Last updated:** [October 17, 2024, 8:49pm UTC](https://discourse.julialang.org/t/error-in-repl-when-entering-package-mode-in-julia-1-11/121097 "2024-10-17T20:49:53Z")

</div>

I installed the new Julia version 1.11 using juliaup on my linux machine. I start julia without any flags. My startup.jl script is empty. If enter package mode and attempt to install a package to my empty registry, usi…

---

## [PackageCompiler app with proprietary modules, non "registered"](https://discourse.julialang.org/t/packagecompiler-app-with-proprietary-modules-non-registered/77285)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 0\
**Last updated:** [March 2, 2022, 9:44am UTC](https://discourse.julialang.org/t/packagecompiler-app-with-proprietary-modules-non-registered/77285 "2022-03-02T09:44:03Z")

</div>

I’m trying to use PackageCompiler with a microservice based on HTTP.jl. My project also depends on proprietary modules that are not FOSS projects in GitHub. Everything works fine if I run the code. PackageCompiler.create…

---

## [Creating an Electron App](https://discourse.julialang.org/t/creating-an-electron-app/93166)

<div class="topic-metadata">

**Author:** [@sschmidhuber](https://discourse.julialang.org/u/sschmidhuber)\
**Replies:** 0\
**Last updated:** [January 18, 2023, 3:55pm UTC](https://discourse.julialang.org/t/creating-an-electron-app/93166 "2023-01-18T15:55:54Z")

</div>

Hello, I’m using Julia a bit out of it’s major domain, I wrote a small tool for processing PDFs with a small GUI. I’m using Electron for the GUI part and all in all it works quite well (if I ignore cold start delay). H…

---

## [PackageCompiler app failure with Flux on AArch64/no GPU](https://discourse.julialang.org/t/packagecompiler-app-failure-with-flux-on-aarch64-no-gpu/99618)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 0\
**Last updated:** [May 30, 2023, 5:14pm UTC](https://discourse.julialang.org/t/packagecompiler-app-failure-with-flux-on-aarch64-no-gpu/99618 "2023-05-30T17:14:12Z")

</div>

Cheers, I am working on an app that should run on an AArch64 multi-core device, no GPU. To become familiar with PackageCompiler, I have initially compiled a simple println(“Hello Word!”). As the function belongs to core…

---

## [Segmentation fault with CUDA](https://discourse.julialang.org/t/segmentation-fault-with-cuda/103664)

<div class="topic-metadata">

**Author:** [@PatriceLebrun](https://discourse.julialang.org/u/PatriceLebrun)\
**Replies:** 0\
**Last updated:** [September 8, 2023, 12:38pm UTC](https://discourse.julialang.org/t/segmentation-fault-with-cuda/103664 "2023-09-08T12:38:28Z")

</div>

Hi, I saw an old issue about it when we use PackageCompiler with CUDA Just to start with PackageCompiler I use only CUDA versioninfo() and ndevices() functions I have no issue at all to create library but I got a seg…

---

## [PackageCompiler App not working other than host computer](https://discourse.julialang.org/t/packagecompiler-app-not-working-other-than-host-computer/117726)

<div class="topic-metadata">

**Author:** [@fasihullahsaleem](https://discourse.julialang.org/u/fasihullahsaleem)\
**Replies:** 0\
**Last updated:** [August 1, 2024, 12:00pm UTC](https://discourse.julialang.org/t/packagecompiler-app-not-working-other-than-host-computer/117726 "2024-08-01T12:00:46Z")

</div>

Hi, I just join this group and new to the Julia Language. I am trying to create the app that I can send to any other computer, and it should be able to run. But the App I created is only working or my PC. The app is succ…

---

## [CSV ZipFile read example broken in Julia 1.11.0](https://discourse.julialang.org/t/csv-zipfile-read-example-broken-in-julia-1-11-0/121204)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 10\
**Last updated:** [October 17, 2024, 7:50pm UTC](https://discourse.julialang.org/t/csv-zipfile-read-example-broken-in-julia-1-11-0/121204 "2024-10-17T19:50:21Z")

</div>

I am using 1.11.0 on a Windows machine with (jl\_FpGwGs) pkg\> st Status \`C:\\Users\\jakez\\AppData\\Local\\Temp\\jl\_FpGwGs\\Project.toml\` \[336ed68f\] CSV v0.10.14 \[a93c6f00\] DataFrames v1.7.0 \[a5390f91\] ZipFile v0.10.1 In…

---

## [I can't instantiate \`GNSSReceiver.jl\` due to a weird CUDA compatibility issue?](https://discourse.julialang.org/t/i-cant-instantiate-gnssreceiver-jl-due-to-a-weird-cuda-compatibility-issue/121426)

<div class="topic-metadata">

**Author:** [@AJahraus](https://discourse.julialang.org/u/AJahraus)\
**Replies:** 0\
**Last updated:** [October 17, 2024, 3:54pm UTC](https://discourse.julialang.org/t/i-cant-instantiate-gnssreceiver-jl-due-to-a-weird-cuda-compatibility-issue/121426 "2024-10-17T15:54:26Z")

</div>

As outlined in this issue here, I can’t instantiate the GNSSReceiver package due to a strange error, claiming Unsatisfiable requirements detected for package CUDA \[052768df\] I’m not sure what’s causing this, because as …

---

## [Version 1.11.1 -- Argument issue](https://discourse.julialang.org/t/version-1-11-1-argument-issue/121408)

<div class="topic-metadata">

**Author:** [@Jose\_Ghislain\_Quenum](https://discourse.julialang.org/u/Jose_Ghislain_Quenum)\
**Replies:** 2\
**Last updated:** [October 17, 2024, 3:14pm UTC](https://discourse.julialang.org/t/version-1-11-1-argument-issue/121408 "2024-10-17T15:14:24Z")

</div>

The new version of Julia (1.11.1) does not seem to solve the argument problem. If you launch Julia with arguments (e.g., -p auto -t auto), any command in package mode just freezes.

---

## [Editor Pulsar](https://discourse.julialang.org/t/editor-pulsar/121368)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 7\
**Last updated:** [October 17, 2024, 3:05pm UTC](https://discourse.julialang.org/t/editor-pulsar/121368 "2024-10-17T15:05:49Z")

</div>

Are there any successful experiences with the successor of the Atom-Editor called Pulsar? My first attempt was not very convincing … Highlighting works :slight\_smile: , execution not :frowning:

---

## [Why does rounding behave so weird?](https://discourse.julialang.org/t/why-does-rounding-behave-so-weird/121422)

<div class="topic-metadata">

**Author:** [@SunnyUser](https://discourse.julialang.org/u/SunnyUser)\
**Replies:** 4\
**Last updated:** [October 17, 2024, 1:29pm UTC](https://discourse.julialang.org/t/why-does-rounding-behave-so-weird/121422 "2024-10-17T13:29:07Z")

</div>

What Julia does: julia\> hcat(5.5:-1:0.5, round.(5.5:-1:0.5)) 6×2 Matrix{Float64}: 5.5 6.0 4.5 4.0 3.5 4.0 2.5 2.0 1.5 2.0 0.5 0.0 What I expect: 6×2 Matrix{Float64}: 5.5 6.0 4.5 5.0 3.5 4.0 2.5 3.0…

---

## [Print string on specific character position](https://discourse.julialang.org/t/print-string-on-specific-character-position/121402)

<div class="topic-metadata">

**Author:** [@danrib07](https://discourse.julialang.org/u/danrib07)\
**Replies:** 4\
**Last updated:** [October 17, 2024, 1:13pm UTC](https://discourse.julialang.org/t/print-string-on-specific-character-position/121402 "2024-10-17T13:13:17Z")

</div>

Hi everyone, I’m trying to format some diagnostics for a Julia project I’m working on, and I was wondering if there’s a way to format strings such that the output is printed on a specific character position? For example,…

---

## [Checking divisibility efficiently](https://discourse.julialang.org/t/checking-divisibility-efficiently/121418)

<div class="topic-metadata">

**Author:** [@barucden](https://discourse.julialang.org/u/barucden)\
**Replies:** 6\
**Last updated:** [October 17, 2024, 12:47pm UTC](https://discourse.julialang.org/t/checking-divisibility-efficiently/121418 "2024-10-17T12:47:04Z")

</div>

Is there a function in Base like isdivisible(m::Integer, n::Integer) that returns true if m is divisible by n? A straightforward implementation would be isdivisible(m, n) = iszero(m % n) Modulo works just fine for Ints…

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

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