# General Usage

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

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

**Page:** 164

---

## [Submit a bug report while trying to use DifferentialEquations.jl](https://discourse.julialang.org/t/submit-a-bug-report-while-trying-to-use-differentialequations-jl/115032)

<div class="topic-metadata">

**Author:** [@Jose\_Job\_Flores\_Godo](https://discourse.julialang.org/u/Jose_Job_Flores_Godo)\
**Replies:** 1\
**Last updated:** [May 31, 2024, 8:01pm UTC](https://discourse.julialang.org/t/submit-a-bug-report-while-trying-to-use-differentialequations-jl/115032 "2024-05-31T20:01:36Z")

</div>

Hello: I am newish to Julia and I am trying to use DifferentialEquations.jl. The following code: function difu\_eje!(du,u,p,t) y₁,y₂ = u a₁,a₂,b₁,b₂ = p du\[1\] = -a₁\*y₁ + b₁\*(1-y₁)\*y₂ du\[2\] = -a₂\*y₂ + b₂\*…

---

## [Fast Multi-Threaded Array Editing without data races?](https://discourse.julialang.org/t/fast-multi-threaded-array-editing-without-data-races/114863)

<div class="topic-metadata">

**Author:** [@cneverett](https://discourse.julialang.org/u/cneverett)\
**Replies:** 42\
**Last updated:** [May 31, 2024, 3:03pm UTC](https://discourse.julialang.org/t/fast-multi-threaded-array-editing-without-data-races/114863 "2024-05-31T15:03:09Z")

</div>

Hi, I am fairly new to multi-threading in Juila and am having trouble finding the best procedure to avoid data races in an a section of code I am writing. The code uses a monte carlo method to generate values that are t…

---

## [Discontiguous Lexical Scope for Multiply Dispatched Functions](https://discourse.julialang.org/t/discontiguous-lexical-scope-for-multiply-dispatched-functions/114972)

<div class="topic-metadata">

**Author:** [@blabatt](https://discourse.julialang.org/u/blabatt)\
**Replies:** 9\
**Last updated:** [May 31, 2024, 3:31pm UTC](https://discourse.julialang.org/t/discontiguous-lexical-scope-for-multiply-dispatched-functions/114972 "2024-05-31T15:31:51Z")

</div>

I would like to create a closure that binds free variables with respect to a discontiguous “lexical environment” that encapsulates both the disparate method implementations and collective reference to a multiply-dispatch…

---

## [Faster Precompiles with Monorepo?](https://discourse.julialang.org/t/faster-precompiles-with-monorepo/114986)

<div class="topic-metadata">

**Author:** [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Replies:** 3\
**Last updated:** [May 31, 2024, 2:03pm UTC](https://discourse.julialang.org/t/faster-precompiles-with-monorepo/114986 "2024-05-31T14:03:40Z")

</div>

At work we have a monorepo with all our Julia code in a place like ~/company/src/, and making any change to the codebase triggers precompilation again whenever I start a new notebook or REPL: julia\> using MyModule Preco…

---

## [Extending functions from implicit dependencies](https://discourse.julialang.org/t/extending-functions-from-implicit-dependencies/115002)

<div class="topic-metadata">

**Author:** [@lkdvos](https://discourse.julialang.org/u/lkdvos)\
**Replies:** 3\
**Last updated:** [May 31, 2024, 11:12am UTC](https://discourse.julialang.org/t/extending-functions-from-implicit-dependencies/115002 "2024-05-31T11:12:31Z")

</div>

I am looking for a best-practice for the following case: Say I am the writer of a package Foo.jl, which wants to use the functionality of Bar.jl. I thus add Bar as a dependency to Foo, and start using it. Now Bar suppo…

---

## [@kwdef constructor not available outside of module](https://discourse.julialang.org/t/kwdef-constructor-not-available-outside-of-module/114675)

<div class="topic-metadata">

**Author:** [@veddox](https://discourse.julialang.org/u/veddox)\
**Replies:** 4\
**Last updated:** [May 31, 2024, 8:59am UTC](https://discourse.julialang.org/t/kwdef-constructor-not-available-outside-of-module/114675 "2024-05-31T08:59:00Z")

</div>

Hi everyone, working on an ecological model, I have a macro @species that creates a new struct using @kwdef. In most use cases, this works just fine. However, if I use this macro outside of the module in which it was de…

---

## [Performance optimizations with runtime dispatch](https://discourse.julialang.org/t/performance-optimizations-with-runtime-dispatch/110653)

<div class="topic-metadata">

**Author:** [@aramend](https://discourse.julialang.org/u/aramend)\
**Replies:** 14\
**Last updated:** [May 30, 2024, 8:01pm UTC](https://discourse.julialang.org/t/performance-optimizations-with-runtime-dispatch/110653 "2024-05-30T20:01:06Z")

</div>

I’m working on types that efficiently wrap polish notation and allow for fast evaluation of mathematical expressions. If I run @profview on the following script, I see that most of the time inside fpass! is spent decidin…

---

## [Documenter.jl build "resource busy or locked" workaround](https://discourse.julialang.org/t/documenter-jl-build-resource-busy-or-locked-workaround/114965)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 1\
**Last updated:** [May 30, 2024, 8:22pm UTC](https://discourse.julialang.org/t/documenter-jl-build-resource-busy-or-locked-workaround/114965 "2024-05-30T20:22:40Z")

</div>

After building docs from Documenter.jl for my project in Windows, for some reason there are always two processes cmd.exe and gksqt.exe that remain alive with locks on one of the subdirectories in docs/build/. As a result…

---

## [Plot recipe that performs multiple plot calls](https://discourse.julialang.org/t/plot-recipe-that-performs-multiple-plot-calls/114944)

<div class="topic-metadata">

**Author:** [@kirklong](https://discourse.julialang.org/u/kirklong)\
**Replies:** 1\
**Last updated:** [May 30, 2024, 5:44pm UTC](https://discourse.julialang.org/t/plot-recipe-that-performs-multiple-plot-calls/114944 "2024-05-30T17:44:38Z")

</div>

I am trying to define a recipe for a custom type. I have gotten a basic thing to work using the @userplot macro and following some examples, but I want to extend this to allow the recipe to do what would be multiple plot…

---

## [Slow numerical integration of scalar function](https://discourse.julialang.org/t/slow-numerical-integration-of-scalar-function/114976)

<div class="topic-metadata">

**Author:** [@golanor](https://discourse.julialang.org/u/golanor)\
**Replies:** 1\
**Last updated:** [May 30, 2024, 5:16pm UTC](https://discourse.julialang.org/t/slow-numerical-integration-of-scalar-function/114976 "2024-05-30T17:16:24Z")

</div>

Hi, I’m trying to compute a set of integrals, and the integration takes a lot of time and allocates a lot. Is there a way to speed it up? MWE: using Integrals, BenchmarkTools const ω1, ω2 = 33.807, 37.822; const Ω1, …

---

## [Help wrapping Symbolics.jl for RCall](https://discourse.julialang.org/t/help-wrapping-symbolics-jl-for-rcall/114935)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 1\
**Last updated:** [May 30, 2024, 4:59pm UTC](https://discourse.julialang.org/t/help-wrapping-symbolics-jl-for-rcall/114935 "2024-05-30T16:59:20Z")

</div>

I have a problem that fails due to Num (from Symbolics.jl) not being automatically wrapped by RCall.jl. Here’s a minimal example that throws the error: using Symbolics using RCall @variables x @rput x ERROR: MethodErr…

---

## [Base.return\_types and \`Test.@inferred\` conditionally failing unlike \`@code\_warntype\`](https://discourse.julialang.org/t/base-return-types-and-test-inferred-conditionally-failing-unlike-code-warntype/114902)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 6\
**Last updated:** [May 30, 2024, 6:28am UTC](https://discourse.julialang.org/t/base-return-types-and-test-inferred-conditionally-failing-unlike-code-warntype/114902 "2024-05-30T06:28:57Z")

</div>

Experimenting with world age and ran into a weird thing. This is the session that makes sense: julia\> function evalbad(i) ex = :(globali() = $i) eval(ex) # evaluates new global method at runtime …

---

## [How to write generic simulations with KernelAbstractions](https://discourse.julialang.org/t/how-to-write-generic-simulations-with-kernelabstractions/114963)

<div class="topic-metadata">

**Author:** [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Replies:** 0\
**Last updated:** [May 30, 2024, 11:09am UTC](https://discourse.julialang.org/t/how-to-write-generic-simulations-with-kernelabstractions/114963 "2024-05-30T11:09:30Z")

</div>

I’m working on a project that should work with CUDA.jl and Metal.jl at the same time. Basically some simulation scripts, so, the user is me or collaborators running code (not somebody installing a package I make). With …

---

## [Resolving name conflicts between my package and other, commonly used packages it does not depend on](https://discourse.julialang.org/t/resolving-name-conflicts-between-my-package-and-other-commonly-used-packages-it-does-not-depend-on/114937)

<div class="topic-metadata">

**Author:** [@brainandforce](https://discourse.julialang.org/u/brainandforce)\
**Replies:** 5\
**Last updated:** [May 30, 2024, 6:09am UTC](https://discourse.julialang.org/t/resolving-name-conflicts-between-my-package-and-other-commonly-used-packages-it-does-not-depend-on/114937 "2024-05-30T06:09:53Z")

</div>

My package, CliffordNumbers.jl, defines two functions: CliffordNumbers.similar\_type(::Type{C}, ::Type{T}, ::Val{Q}) where {C\<:AbstractCliffordNumber,T\<:Union{Real,Complex},Q} constructs a type similar to C but with typ…

---

## [Any "bridge" between Documenter.jl and YAML.jl in order to document a YAML file?](https://discourse.julialang.org/t/any-bridge-between-documenter-jl-and-yaml-jl-in-order-to-document-a-yaml-file/114909)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [May 30, 2024, 12:30am UTC](https://discourse.julialang.org/t/any-bridge-between-documenter-jl-and-yaml-jl-in-order-to-document-a-yaml-file/114909 "2024-05-30T00:30:37Z")

</div>

Ok, I have chosen YAML for the settings of my model. Is there a way I can format the comments in YAML in a certain way in order to document the settings, parse these special comments and let them end up in a make\_doc Do…

---

## [Help converting a Pytorch tensor to Julia CuArray](https://discourse.julialang.org/t/help-converting-a-pytorch-tensor-to-julia-cuarray/106492)

<div class="topic-metadata">

**Author:** [@Dale\_James\_Black](https://discourse.julialang.org/u/Dale_James_Black)\
**Replies:** 14\
**Last updated:** [May 29, 2024, 6:09pm UTC](https://discourse.julialang.org/t/help-converting-a-pytorch-tensor-to-julia-cuarray/106492 "2024-05-29T18:09:50Z")

</div>

I am trying to use PythonCall/juliacall to convert a PyTorch tensor to a Julia CuArray directly from the pointer (I want to avoid unnecessary copying if possible). Does anyone know what I am doing wrong, as it seems the …

---

## [Julia \<-\> Python object conversions for relatively complex objects using juliacall](https://discourse.julialang.org/t/julia-python-object-conversions-for-relatively-complex-objects-using-juliacall/114928)

<div class="topic-metadata">

**Author:** [@Eumenes](https://discourse.julialang.org/u/Eumenes)\
**Replies:** 0\
**Last updated:** [May 29, 2024, 4:29pm UTC](https://discourse.julialang.org/t/julia-python-object-conversions-for-relatively-complex-objects-using-juliacall/114928 "2024-05-29T16:29:11Z")

</div>

Hello everyone, This is a pretty long question and it’s pretty complicated (at least to me it is) so I will highly appreciate all answers. I am currently writing a python wrapper around the Extremes.jl package. That pa…

---

## [Updating QML display from long running process](https://discourse.julialang.org/t/updating-qml-display-from-long-running-process/114832)

<div class="topic-metadata">

**Author:** [@PeterCourcoux](https://discourse.julialang.org/u/PeterCourcoux)\
**Replies:** 4\
**Last updated:** [May 29, 2024, 2:32pm UTC](https://discourse.julialang.org/t/updating-qml-display-from-long-running-process/114832 "2024-05-29T14:32:39Z")

</div>

I’m new to Julia QML and this list so I hope this all makes sense and that this is an appropriate place to post my question. I have a long running Julia process which periodically pushes a notification to a JuliaItemMod…

---

## [Is dispatch on another type's parameter (::NotMyType{MyType}) piracy?](https://discourse.julialang.org/t/is-dispatch-on-another-types-parameter-notmytype-mytype-piracy/110797)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 32\
**Last updated:** [May 29, 2024, 2:29pm UTC](https://discourse.julialang.org/t/is-dispatch-on-another-types-parameter-notmytype-mytype-piracy/110797 "2024-05-29T14:29:36Z")

</div>

Actually, does this follow? Assuming we write a definition for S as opposed to aliasing a Union for example, typeof(S) would be DataType or UnionAll, which along with the parametric Type are definitely owned by Base. …

---

## [How to Build and Use a Parallel Function with Symbolics.build\_function in Julia](https://discourse.julialang.org/t/how-to-build-and-use-a-parallel-function-with-symbolics-build-function-in-julia/114895)

<div class="topic-metadata">

**Author:** [@Maysam\_Gholampour](https://discourse.julialang.org/u/Maysam_Gholampour)\
**Replies:** 1\
**Last updated:** [May 29, 2024, 7:03am UTC](https://discourse.julialang.org/t/how-to-build-and-use-a-parallel-function-with-symbolics-build-function-in-julia/114895 "2024-05-29T07:03:45Z")

</div>

Dear all, I have built a function in the same fashion as described in the Getting Started section of the Symbolics.jl documentation (Getting Started with Symbolics.jl · Symbolics.jl). The only thing I changed was adding…

---

## [Problem of world age in application](https://discourse.julialang.org/t/problem-of-world-age-in-application/114803)

<div class="topic-metadata">

**Author:** [@Abdou](https://discourse.julialang.org/u/Abdou)\
**Replies:** 5\
**Last updated:** [May 29, 2024, 5:04am UTC](https://discourse.julialang.org/t/problem-of-world-age-in-application/114803 "2024-05-29T05:04:10Z")

</div>

in graphic application that use Gtk4 and Gadfly I have a function that create functions by Meta parsing and evaluating the text of GtkEntry widget. these functions are well accepted in plot function and from the REPL b…

---

## [How to recursively update the values of a nested dictionary?](https://discourse.julialang.org/t/how-to-recursively-update-the-values-of-a-nested-dictionary/114855)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [May 29, 2024, 4:51am UTC](https://discourse.julialang.org/t/how-to-recursively-update-the-values-of-a-nested-dictionary/114855 "2024-05-29T04:51:10Z")

</div>

Let’s say I have a nested dictionary like : a\_nested\_dict = Dict("a"=\>1,"b"=\>Dict("c"=\>2,"d"=\>\[Dict("e"=\>2),Dict("f"=\>3)\]),"g"=\>\[1,"h"\]) How do I override individual values, using a function like: function override\_ne…

---

## [Most efficient implementation of covariance matrix](https://discourse.julialang.org/t/most-efficient-implementation-of-covariance-matrix/114797)

<div class="topic-metadata">

**Author:** [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Replies:** 12\
**Last updated:** [May 28, 2024, 10:26pm UTC](https://discourse.julialang.org/t/most-efficient-implementation-of-covariance-matrix/114797 "2024-05-28T22:26:57Z")

</div>

Hi everyone, I was computing some rather large covariance matrices and noticed that that implementation in Statistics is not multithreaded. TLDR, I want the following to be as fast as possible (ideally, for even larger …

---

## [Changing a "constant" type and triggering recompilation](https://discourse.julialang.org/t/changing-a-constant-type-and-triggering-recompilation/114844)

<div class="topic-metadata">

**Author:** [@RGonTheNoble](https://discourse.julialang.org/u/RGonTheNoble)\
**Replies:** 5\
**Last updated:** [May 28, 2024, 9:59pm UTC](https://discourse.julialang.org/t/changing-a-constant-type-and-triggering-recompilation/114844 "2024-05-28T21:59:25Z")

</div>

I’m writing a calculation engine that is going to run as a service. This is for an industrial system, where data sources (tags) have units. Because many of these units have offsests (Fahrenheit, PSI-gauge) I can’t use Dy…

---

## [Split not allowing optional parameters](https://discourse.julialang.org/t/split-not-allowing-optional-parameters/114877)

<div class="topic-metadata">

**Author:** [@Shaneful](https://discourse.julialang.org/u/Shaneful)\
**Replies:** 3\
**Last updated:** [May 28, 2024, 9:47pm UTC](https://discourse.julialang.org/t/split-not-allowing-optional-parameters/114877 "2024-05-28T21:47:26Z")

</div>

As shown in image (hopefully), split isn’t accepting the third and fourth arguments. Have tinkered around with it for a bit, wondering what’s up and why it won’t work. I’d like to let it delete empty strings (“”). Tha…

---

## [ERROR in Julia - EXCEPTION\_ACCESS\_VIOLATION](https://discourse.julialang.org/t/error-in-julia-exception-access-violation/114870)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 3\
**Last updated:** [May 28, 2024, 8:43pm UTC](https://discourse.julialang.org/t/error-in-julia-exception-access-violation/114870 "2024-05-28T20:43:36Z")

</div>

I am getting the following error even after reinstalling Julia: Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPTION\_ACCES…

---

## [How to compile an Array of Numbers and Strings with StaticCompiler?](https://discourse.julialang.org/t/how-to-compile-an-array-of-numbers-and-strings-with-staticcompiler/113797)

<div class="topic-metadata">

**Author:** [@Thomas008](https://discourse.julialang.org/u/Thomas008)\
**Replies:** 4\
**Last updated:** [May 28, 2024, 6:25pm UTC](https://discourse.julialang.org/t/how-to-compile-an-array-of-numbers-and-strings-with-staticcompiler/113797 "2024-05-28T18:25:06Z")

</div>

I want to represent Ints, Floats, and Strings in an Array or a Matrix, and compile it with help of StaticCompiler. How can I do this? Since a MallocMatrix on Ints works (but not on an union), one could encode Floats an…

---

## [Accessing R6 member functions using RCall?](https://discourse.julialang.org/t/accessing-r6-member-functions-using-rcall/114861)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 0\
**Last updated:** [May 28, 2024, 6:05pm UTC](https://discourse.julialang.org/t/accessing-r6-member-functions-using-rcall/114861 "2024-05-28T18:05:58Z")

</div>

I’m trying to interface with an R package using RCall, which uses R6 classes. At the moment, I wrap the member functions with vanilla R code. Is there a nicer way I can access the functions (foo$bar()) directly? Here is …

---

## [Create an indexed line from a vector](https://discourse.julialang.org/t/create-an-indexed-line-from-a-vector/114783)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 6\
**Last updated:** [May 28, 2024, 5:43pm UTC](https://discourse.julialang.org/t/create-an-indexed-line-from-a-vector/114783 "2024-05-28T17:43:11Z")

</div>

Hi, I would like to take a vector like: julia\> vector 5-element Vector{Float64}: 90.51 51.79 84.81 66.11 56.68 and output "0" "1:90.51" "2:51.79" "3:84.81" "4:66.11" "5:56.68" that will be written into a …

---

## [Using Literate.jl in reverse: convert Jupyter to script](https://discourse.julialang.org/t/using-literate-jl-in-reverse-convert-jupyter-to-script/114851)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 3\
**Last updated:** [May 28, 2024, 5:54pm UTC](https://discourse.julialang.org/t/using-literate-jl-in-reverse-convert-jupyter-to-script/114851 "2024-05-28T17:54:37Z")

</div>

I thought that this existed, but when checking current Literate.jl docs, I didn’t find any function to go from a Jupyter notebook to Julia script that would generate said notebook. Have I missed something or is this not…

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

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