# General Usage

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

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

**Page:** 135

---

## [Macro expansion and evaluation when the module with the macro definition is not in scope](https://discourse.julialang.org/t/macro-expansion-and-evaluation-when-the-module-with-the-macro-definition-is-not-in-scope/119170)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 2\
**Last updated:** [September 7, 2024, 4:16pm UTC](https://discourse.julialang.org/t/macro-expansion-and-evaluation-when-the-module-with-the-macro-definition-is-not-in-scope/119170 "2024-09-07T16:16:36Z")

</div>

Let’s say I’m developing a macro @mymacro in a package called CoolStuff. Suppose that this @mymacro 42 expands to this: CoolStuff.foo(42) Now suppose that the user loads @mymacro by doing using CoolStuff: @mymacro in…

---

## [CUDA Toolkit not found with BinaryBuilder](https://discourse.julialang.org/t/cuda-toolkit-not-found-with-binarybuilder/119169)

<div class="topic-metadata">

**Author:** [@Jason\_Meziere](https://discourse.julialang.org/u/Jason_Meziere)\
**Replies:** 0\
**Last updated:** [September 7, 2024, 3:04pm UTC](https://discourse.julialang.org/t/cuda-toolkit-not-found-with-binarybuilder/119169 "2024-09-07T15:04:38Z")

</div>

I am attempting to add CUDA support to the LAMMPS installation in Yggdrasil. However, I have been having trouble getting CUDA implementations to successfully compile. After some investigation, I found that the came comma…

---

## [PackageCompiler create\_library --\> ERROR: LoadError: could not find project at "JuliaTest"](https://discourse.julialang.org/t/packagecompiler-create-library-error-loaderror-could-not-find-project-at-juliatest/119167)

<div class="topic-metadata">

**Author:** [@Julian](https://discourse.julialang.org/u/Julian)\
**Replies:** 1\
**Last updated:** [September 7, 2024, 1:24pm UTC](https://discourse.julialang.org/t/packagecompiler-create-library-error-loaderror-could-not-find-project-at-juliatest/119167 "2024-09-07T13:24:31Z")

</div>

I am new to Julia and I am trying to build a simple DLL using PackageCompiler create\_library. I have a directory JuliaTest which contains the following files: Project.toml Manifest.toml src/JuliaTest.jl Whenever I run…

---

## [About the interpretation "@" by Macro](https://discourse.julialang.org/t/about-the-interpretation-by-macro/119155)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 2\
**Last updated:** [September 7, 2024, 4:21am UTC](https://discourse.julialang.org/t/about-the-interpretation-by-macro/119155 "2024-09-07T04:21:31Z")

</div>

I have a macro defined as follows: macro A(x…) x …(other codes) end When I called “@A code@W”, the input x was interpreted by @A as two elements of \[:code, :W\], how can I prevent “@” from interpretation?

---

## [Julia 1.10.0 not working on window 10](https://discourse.julialang.org/t/julia-1-10-0-not-working-on-window-10/108659)

<div class="topic-metadata">

**Author:** [@kirit\_ved](https://discourse.julialang.org/u/kirit_ved)\
**Replies:** 3\
**Last updated:** [September 7, 2024, 1:55am UTC](https://discourse.julialang.org/t/julia-1-10-0-not-working-on-window-10/108659 "2024-09-07T01:55:51Z")

</div>

i have downloaded julia using msstore but it is not runnung on windo 10 pro. possible solutions

---

## [GLMakie on Raspberry Pi 400](https://discourse.julialang.org/t/glmakie-on-raspberry-pi-400/116401)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 13\
**Last updated:** [September 7, 2024, 1:07am UTC](https://discourse.julialang.org/t/glmakie-on-raspberry-pi-400/116401 "2024-09-07T01:07:47Z")

</div>

I recently installed julia 1.6.7 on a Raspberry Pi 400 computer as that was what was available from julialang.org downloads. When I tried to install GLMakie which is my preferred plotting program, it failed at precomp…

---

## [Error when calling Python (PyCall) from a distributed worker in SLURM](https://discourse.julialang.org/t/error-when-calling-python-pycall-from-a-distributed-worker-in-slurm/103188)

<div class="topic-metadata">

**Author:** [@martinmestre](https://discourse.julialang.org/u/martinmestre)\
**Replies:** 2\
**Last updated:** [September 6, 2024, 11:52pm UTC](https://discourse.julialang.org/t/error-when-calling-python-pycall-from-a-distributed-worker-in-slurm/103188 "2024-09-06T23:52:30Z")

</div>

Hello, my code is as follows. The error comes up only when I call a Python function inside the Julia function named χ²Full. If I set that function to zero, then there is not problem. Besides, my original code does work i…

---

## [Symbolics.jl \`simplify\` behaves in a strange random fashion](https://discourse.julialang.org/t/symbolics-jl-simplify-behaves-in-a-strange-random-fashion/119141)

<div class="topic-metadata">

**Author:** [@AronT](https://discourse.julialang.org/u/AronT)\
**Replies:** 7\
**Last updated:** [September 6, 2024, 11:34pm UTC](https://discourse.julialang.org/t/symbolics-jl-simplify-behaves-in-a-strange-random-fashion/119141 "2024-09-06T23:34:45Z")

</div>

So I was trying to simplify some expression and it didn’t work for me and I couldn’t understand why. Boiling it down to its simplest form, if I use different letters of the alphabet sometimes it works and sometimes it do…

---

## [Different BinaryBuilder Platforms Locally Vs. Github](https://discourse.julialang.org/t/different-binarybuilder-platforms-locally-vs-github/119139)

<div class="topic-metadata">

**Author:** [@Jason\_Meziere](https://discourse.julialang.org/u/Jason_Meziere)\
**Replies:** 1\
**Last updated:** [September 6, 2024, 6:43pm UTC](https://discourse.julialang.org/t/different-binarybuilder-platforms-locally-vs-github/119139 "2024-09-06T18:43:19Z")

</div>

I have an open pull request #9244 in Yggdrasil to add some features to the LAMMPS build there. Previous commits of the pull request did not include the correct build types that I wanted. However, when I changed to the c…

---

## [What are the dangers of eval in macros, to get the values of an enum symbol](https://discourse.julialang.org/t/what-are-the-dangers-of-eval-in-macros-to-get-the-values-of-an-enum-symbol/119078)

<div class="topic-metadata">

**Author:** [@NatMath](https://discourse.julialang.org/u/NatMath)\
**Replies:** 3\
**Last updated:** [September 6, 2024, 6:22pm UTC](https://discourse.julialang.org/t/what-are-the-dangers-of-eval-in-macros-to-get-the-values-of-an-enum-symbol/119078 "2024-09-06T18:22:28Z")

</div>

I’m working on an implementation of the PBRT 4 raytracer in Julia. To avoid having containers of abstract types for primitives, materials, etc, some of the base object types are defined using a tag, instead of subclasses…

---

## [Pkg folders get bigger after each minor version release](https://discourse.julialang.org/t/pkg-folders-get-bigger-after-each-minor-version-release/119133)

<div class="topic-metadata">

**Author:** [@numberMX](https://discourse.julialang.org/u/numberMX)\
**Replies:** 7\
**Last updated:** [September 6, 2024, 5:54pm UTC](https://discourse.julialang.org/t/pkg-folders-get-bigger-after-each-minor-version-release/119133 "2024-09-06T17:54:48Z")

</div>

When there’s a new minor release of Julia, and Pkg does a fresh precompile of all the installed packages, it doesn’t seem to delete the old files. After updating from 1.10.4 to 1.10.5, the .julia/compiled/v1.10 folder we…

---

## [VideoIO.jl doesn't seem to use GPU for video encoding on server with GPU](https://discourse.julialang.org/t/videoio-jl-doesnt-seem-to-use-gpu-for-video-encoding-on-server-with-gpu/119132)

<div class="topic-metadata">

**Author:** [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Replies:** 1\
**Last updated:** [September 6, 2024, 4:53pm UTC](https://discourse.julialang.org/t/videoio-jl-doesnt-seem-to-use-gpu-for-video-encoding-on-server-with-gpu/119132 "2024-09-06T16:53:36Z")

</div>

I’m on Google Colab with L4 GPU. VideoIO.jl seems to run entirely on CPU despite L4 having hardware video decoders. Is there a setting somewhere?

---

## [When to use Tuples instead of Vectors?](https://discourse.julialang.org/t/when-to-use-tuples-instead-of-vectors/119109)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 16\
**Last updated:** [September 6, 2024, 3:42pm UTC](https://discourse.julialang.org/t/when-to-use-tuples-instead-of-vectors/119109 "2024-09-06T15:42:49Z")

</div>

Hello, I’m developing QuantumToolbox.jl for simulating quantum systems in Julia. Everything is based on the QuantumObject constructor, which is currently defined as follows struct QuantumObject{MT\<:AbstractArray,ObjTyp…

---

## [StructuralIdentifiability: parameters defined as a vector](https://discourse.julialang.org/t/structuralidentifiability-parameters-defined-as-a-vector/119131)

<div class="topic-metadata">

**Author:** [@clem.def](https://discourse.julialang.org/u/clem.def)\
**Replies:** 0\
**Last updated:** [September 6, 2024, 3:12pm UTC](https://discourse.julialang.org/t/structuralidentifiability-parameters-defined-as-a-vector/119131 "2024-09-06T15:12:21Z")

</div>

Hello everyone. I am working on a project determining the structural identifiability of a model. I observed that if I defined the parameters with the shape of a vector, such as k\[1:2\], there is a problem saying it canno…

---

## [PRECOMPILATION ERROR-CSVReader](https://discourse.julialang.org/t/precompilation-error-csvreader/119121)

<div class="topic-metadata">

**Author:** [@LAURIE\_ALVEY](https://discourse.julialang.org/u/LAURIE_ALVEY)\
**Replies:** 1\
**Last updated:** [September 6, 2024, 1:30pm UTC](https://discourse.julialang.org/t/precompilation-error-csvreader/119121 "2024-09-06T13:30:37Z")

</div>

precompilation error with CSVReader

---

## [Precompilation error. 'LoadError: UndefVarError: \`@printf\` not defined'](https://discourse.julialang.org/t/precompilation-error-loaderror-undefvarerror-printf-not-defined/107043)

<div class="topic-metadata">

**Author:** [@Purvaash](https://discourse.julialang.org/u/Purvaash)\
**Replies:** 4\
**Last updated:** [September 6, 2024, 12:56pm UTC](https://discourse.julialang.org/t/precompilation-error-loaderror-undefvarerror-printf-not-defined/107043 "2024-09-06T12:56:22Z")

</div>

Hi, I am new to Julia and Julia Discourse. I am facing the following error. I am trying to set up an environment that I found in a Git repository. The steps I followed are: git clone 23tn / 23tn-julia · GitLab Opened …

---

## [Julia code and struct generation](https://discourse.julialang.org/t/julia-code-and-struct-generation/119044)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 12\
**Last updated:** [September 6, 2024, 12:32pm UTC](https://discourse.julialang.org/t/julia-code-and-struct-generation/119044 "2024-09-06T12:32:56Z")

</div>

I would like to generate a bunch of types for each possible file data format. There is a header with a nibble, X, that determines which fields are present. struct A\_X \<: B # X == 0x0 .. 0xF vall:…

---

## [Why operation on return of @views take a long time](https://discourse.julialang.org/t/why-operation-on-return-of-views-take-a-long-time/119088)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 7\
**Last updated:** [September 6, 2024, 12:02pm UTC](https://discourse.julialang.org/t/why-operation-on-return-of-views-take-a-long-time/119088 "2024-09-06T12:02:29Z")

</div>

Hi there, In this scenario, I have a large sparse matrix, and I want to filter out certain rows and columns based on specific conditions, such as: nrow = 10000 ncol = 10000 M = sprand(nrow,ncol,0.0001) rowIdx = rand(Bo…

---

## [BADCERT\_NOT\_TRUSTED error while updating the Registry?](https://discourse.julialang.org/t/badcert-not-trusted-error-while-updating-the-registry/119040)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 27\
**Last updated:** [September 6, 2024, 11:19am UTC](https://discourse.julialang.org/t/badcert-not-trusted-error-while-updating-the-registry/119040 "2024-09-06T11:19:43Z")

</div>

Hello! Can I update the registry in my computer manually? The usual way errors for me. (@v1.11) pkg\> up ┌ Warning: could not download https://pkg.julialang.org/registries │ exception = RequestError: Cert verify faile…

---

## [Warning about https://pkg.julialang.org/registries](https://discourse.julialang.org/t/warning-about-https-pkg-julialang-org-registries/102917)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 3\
**Last updated:** [September 6, 2024, 10:47am UTC](https://discourse.julialang.org/t/warning-about-https-pkg-julialang-org-registries/102917 "2024-09-06T10:47:31Z")

</div>

Would you know what this means and how to fix it? ┌ Warning: could not download https://pkg.julialang.org/registries │ exception = RequestError: Cert verify failed: BADCERT\_NOT\_TRUSTED while requesting https://pkg.jul…

---

## [Package A does not have B in its dependencies error when B is in A's weakdeps](https://discourse.julialang.org/t/package-a-does-not-have-b-in-its-dependencies-error-when-b-is-in-as-weakdeps/113415)

<div class="topic-metadata">

**Author:** [@hdunham](https://discourse.julialang.org/u/hdunham)\
**Replies:** 1\
**Last updated:** [April 24, 2024, 6:42pm UTC](https://discourse.julialang.org/t/package-a-does-not-have-b-in-its-dependencies-error-when-b-is-in-as-weakdeps/113415 "2024-04-24T18:42:28Z")

</div>

I am working on a project that uses packages with extensions (REopt\_API). Since updating from Julia 1.8 to 1.10, when I resolve and precompile my project, I get the following error: ERROR: LoadError: ArgumentError: Pack…

---

## [Spatial join with dataframes](https://discourse.julialang.org/t/spatial-join-with-dataframes/93241)

<div class="topic-metadata">

**Author:** [@jade\_mackay](https://discourse.julialang.org/u/jade_mackay)\
**Replies:** 27\
**Last updated:** [September 6, 2024, 7:54am UTC](https://discourse.julialang.org/t/spatial-join-with-dataframes/93241 "2024-09-06T07:54:11Z")

</div>

Hello, Increasingly I find myself needing to join dataframes on Geographic Information System (GIS) objects and it seems no capability exists to do so in the Julia eco-system. Nor does it seem there is much interest (c…

---

## [Clever design for basis arrays](https://discourse.julialang.org/t/clever-design-for-basis-arrays/119099)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 3\
**Last updated:** [September 6, 2024, 8:02am UTC](https://discourse.julialang.org/t/clever-design-for-basis-arrays/119099 "2024-09-06T08:02:38Z")

</div>

To compute Jacobians and Hessians in DifferentiationInterface.jl, I need to write a function basis(x::AbstractArray, inds) that computes parts of the standard basis in the appropriate vector space. I would like it to ha…

---

## [Http.jl websocket is not connecting after some time - EOFError: read end of file](https://discourse.julialang.org/t/http-jl-websocket-is-not-connecting-after-some-time-eoferror-read-end-of-file/118964)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [September 6, 2024, 7:49am UTC](https://discourse.julialang.org/t/http-jl-websocket-is-not-connecting-after-some-time-eoferror-read-end-of-file/118964 "2024-09-06T07:49:13Z")

</div>

It is really confusing: After letting julia http server run for some time, the websocket won’t connect any longer, giving EOFError: read end of file EOFError: read end of file │ Stacktrace: │ \[1\] (::Base.var"#w…

---

## [PSA: Use modules for dirty work preparing scripts, debugging, etc](https://discourse.julialang.org/t/psa-use-modules-for-dirty-work-preparing-scripts-debugging-etc/119068)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 3\
**Last updated:** [September 6, 2024, 12:01am UTC](https://discourse.julialang.org/t/psa-use-modules-for-dirty-work-preparing-scripts-debugging-etc/119068 "2024-09-06T00:01:55Z")

</div>

Let’s say I’m preparing a script, e.g. to analyze data in a project. The recommended practice is to put as much code as possible in functions, keeping the global scope clean. But while I’m designing those functions (or d…

---

## [Writing parallel worker output to .out file in slurm to track progress](https://discourse.julialang.org/t/writing-parallel-worker-output-to-out-file-in-slurm-to-track-progress/119092)

<div class="topic-metadata">

**Author:** [@pulk\_jain](https://discourse.julialang.org/u/pulk_jain)\
**Replies:** 0\
**Last updated:** [September 5, 2024, 10:21pm UTC](https://discourse.julialang.org/t/writing-parallel-worker-output-to-out-file-in-slurm-to-track-progress/119092 "2024-09-05T22:21:50Z")

</div>

I am solving an ODE with different initial conditions using EnsembleDistributed on a cluster. I’d like to track the progress of the ensemble calculations. To do that, I wrote the following output and reduction functions: …

---

## [Benchmarking array closures](https://discourse.julialang.org/t/benchmarking-array-closures/75689)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 3\
**Last updated:** [September 5, 2024, 6:24pm UTC](https://discourse.julialang.org/t/benchmarking-array-closures/75689 "2024-09-05T18:24:37Z")

</div>

Want to verify that I’ve done this in a way that gives valid results. In the code below dostuff! updates 2 arrays in place. clos! creates a closure that encloses the arrays and accepts arguments for the change factors. …

---

## [Preview of Documenter site for a PR branch](https://discourse.julialang.org/t/preview-of-documenter-site-for-a-pr-branch/119059)

<div class="topic-metadata">

**Author:** [@mike.ingold](https://discourse.julialang.org/u/mike.ingold)\
**Replies:** 2\
**Last updated:** [September 5, 2024, 3:14pm UTC](https://discourse.julialang.org/t/preview-of-documenter-site-for-a-pr-branch/119059 "2024-09-05T15:14:53Z")

</div>

I have a repo on GitHub with Documenter deplored in the standard configuration. When a PR is created, a Documenter action is being run that seems to build the site for that branch, but I can’t figure out how to actually …

---

## [Verifiable computing in julia](https://discourse.julialang.org/t/verifiable-computing-in-julia/119067)

<div class="topic-metadata">

**Author:** [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Replies:** 5\
**Last updated:** [September 5, 2024, 2:26pm UTC](https://discourse.julialang.org/t/verifiable-computing-in-julia/119067 "2024-09-05T14:26:07Z")

</div>

An upcoming field is verifiable computing. The typical topic is that you provide a proof that you have run a program with an input which resulted in a particular output. Even without revealing the input. E.g. f(x::BigIn…

---

## [Accessing elements of a ComponentArray based on a variable](https://discourse.julialang.org/t/accessing-elements-of-a-componentarray-based-on-a-variable/119066)

<div class="topic-metadata">

**Author:** [@julien-arino](https://discourse.julialang.org/u/julien-arino)\
**Replies:** 1\
**Last updated:** [September 5, 2024, 8:48am UTC](https://discourse.julialang.org/t/accessing-elements-of-a-componentarray-based-on-a-variable/119066 "2024-09-05T08:48:36Z")

</div>

Warning: newbie here. Suppose I have something like using ComponentArrays p = ComponentArray() p = ComponentArray(p; thing = 1) tmp = ComponentArray{Int32}() tmp = ComponentArray(tmp; a = 2) tmp = ComponentArray(tmp; b …

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

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