# General Usage

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

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

**Page:** 123

---

## [Positron, new IDE based on VS code](https://discourse.julialang.org/t/positron-new-ide-based-on-vs-code/116389)

<div class="topic-metadata">

**Author:** [@AdaemmerP](https://discourse.julialang.org/u/AdaemmerP)\
**Replies:** 4\
**Last updated:** [October 17, 2024, 11:01am UTC](https://discourse.julialang.org/t/positron-new-ide-based-on-vs-code/116389 "2024-10-17T11:01:02Z")

</div>

Posit has just released a new IDE called Positron (GitHub - posit-dev/positron: Positron, a next-generation data science IDE) based on VS Code. It is specifically tailored for R and Python. Could this be a great opportu…

---

## [LocalRegistry mess: git object xxx could not be found](https://discourse.julialang.org/t/localregistry-mess-git-object-xxx-could-not-be-found/121362)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [October 17, 2024, 8:52am UTC](https://discourse.julialang.org/t/localregistry-mess-git-object-xxx-could-not-be-found/121362 "2024-10-17T08:52:06Z")

</div>

Hi there, I am using a local registry to maintain a couple of forks with extra uuid. Unfortunately I am running into ERROR: MyPackage: git object xxx could not be found despite the xxx tree hash is indeed the last co…

---

## [Documenting identical methods: unexpected change to @doc in 1.11.0](https://discourse.julialang.org/t/documenting-identical-methods-unexpected-change-to-doc-in-1-11-0/121309)

<div class="topic-metadata">

**Author:** [@brainandforce](https://discourse.julialang.org/u/brainandforce)\
**Replies:** 2\
**Last updated:** [October 16, 2024, 9:14pm UTC](https://discourse.julialang.org/t/documenting-identical-methods-unexpected-change-to-doc-in-1-11-0/121309 "2024-10-16T21:14:05Z")

</div>

In CliffordNumbers.jl, Base.reverse implements the reverse operation on a Clifford number or indexing object (BitIndex). For convenience, I’ve also overloaded the adjoint operator '. Because the documentation for adjoin…

---

## [How to get BenchmarkTools times in the same unit?](https://discourse.julialang.org/t/how-to-get-benchmarktools-times-in-the-same-unit/121395)

<div class="topic-metadata">

**Author:** [@Brinkhuis](https://discourse.julialang.org/u/Brinkhuis)\
**Replies:** 3\
**Last updated:** [October 16, 2024, 7:30pm UTC](https://discourse.julialang.org/t/how-to-get-benchmarktools-times-in-the-same-unit/121395 "2024-10-16T19:30:56Z")

</div>

I use BenchmarkTools like this to save and compare performance: using BenchmarkTools b = @benchmark sum(0:2:1\_000\_000) t = sum(b.times)/length(b.times) println(t) The issue is that for some functions it returns times i…

---

## [Parallelized calls to Optim.optimize use the same number of threads as a single threaded call](https://discourse.julialang.org/t/parallelized-calls-to-optim-optimize-use-the-same-number-of-threads-as-a-single-threaded-call/121388)

<div class="topic-metadata">

**Author:** [@adannenberg](https://discourse.julialang.org/u/adannenberg)\
**Replies:** 4\
**Last updated:** [October 16, 2024, 4:56pm UTC](https://discourse.julialang.org/t/parallelized-calls-to-optim-optimize-use-the-same-number-of-threads-as-a-single-threaded-call/121388 "2024-10-16T16:56:18Z")

</div>

To investigate how sample size affects uncertainty in parameter inference, I do something like: Θ\_example = something #Θ is a vector of the parameters I'm trying to infer Θvec = zeros(numSamples, size(Θ\_example)) for …

---

## [What information does extended trace give in nlsolve jl](https://discourse.julialang.org/t/what-information-does-extended-trace-give-in-nlsolve-jl/121391)

<div class="topic-metadata">

**Author:** [@usaer](https://discourse.julialang.org/u/usaer)\
**Replies:** 0\
**Last updated:** [October 16, 2024, 4:40pm UTC](https://discourse.julialang.org/t/what-information-does-extended-trace-give-in-nlsolve-jl/121391 "2024-10-16T16:40:11Z")

</div>

Hi, I am interested in what info does extended trace give in NLsolve.jl. A particular trace reads as Iter f(x) inf-norm Step 2-norm ------ -------------- -------------- 0 1.000000e-01 …

---

## [Incrementing AtomicMemory{SVector}](https://discourse.julialang.org/t/incrementing-atomicmemory-svector/121378)

<div class="topic-metadata">

**Author:** [@tverho](https://discourse.julialang.org/u/tverho)\
**Replies:** 3\
**Last updated:** [October 16, 2024, 2:06pm UTC](https://discourse.julialang.org/t/incrementing-atomicmemory-svector/121378 "2024-10-16T14:06:58Z")

</div>

I’m trying to use the new \`AtomicMemory in 1.11 to increment entries of a vector in an atomic way. However, the following example hangs: using StaticArrays mem = AtomicMemory{SVector{2,Float64}}(undef, 10) # Initialize…

---

## [Jacobian&vectors in Zygote](https://discourse.julialang.org/t/jacobian-vectors-in-zygote/121381)

<div class="topic-metadata">

**Author:** [@blob](https://discourse.julialang.org/u/blob)\
**Replies:** 3\
**Last updated:** [October 16, 2024, 1:44pm UTC](https://discourse.julialang.org/t/jacobian-vectors-in-zygote/121381 "2024-10-16T13:44:33Z")

</div>

I have a function with three inputs and two outputs. The first argument is a vector, the two others are scalars. The function is built from smaller functions. I want to get derivatives of the composite function with resp…

---

## [Mutating a StructArray without allocation](https://discourse.julialang.org/t/mutating-a-structarray-without-allocation/121311)

<div class="topic-metadata">

**Author:** [@prconlin](https://discourse.julialang.org/u/prconlin)\
**Replies:** 5\
**Last updated:** [October 16, 2024, 1:44pm UTC](https://discourse.julialang.org/t/mutating-a-structarray-without-allocation/121311 "2024-10-16T13:44:26Z")

</div>

Hello, I’m trying to use StructArrays.jl as a fast, convenient solution for working with coordinate data. But I’m having difficulty operating on StructArrays in the way I had hoped I could. Here is a MWE of what I’m t…

---

## [How to splice two separate Chain into one](https://discourse.julialang.org/t/how-to-splice-two-separate-chain-into-one/121357)

<div class="topic-metadata">

**Author:** [@Yaozhong\_Liu](https://discourse.julialang.org/u/Yaozhong_Liu)\
**Replies:** 2\
**Last updated:** [October 16, 2024, 5:58am UTC](https://discourse.julialang.org/t/how-to-splice-two-separate-chain-into-one/121357 "2024-10-16T05:58:03Z")

</div>

Hi. I now have two chains. I want to splice them. I know function Parallel(+) can do that. But I don’t expect to get the sum. Instead, I expect to get them end to end. For example, Chain1 has 2 outputs:1,2. Chain2 has…

---

## [Unexpected performance outcome. Does accessing struct members cause allocation?](https://discourse.julialang.org/t/unexpected-performance-outcome-does-accessing-struct-members-cause-allocation/121330)

<div class="topic-metadata">

**Author:** [@curious](https://discourse.julialang.org/u/curious)\
**Replies:** 18\
**Last updated:** [October 16, 2024, 11:57am UTC](https://discourse.julialang.org/t/unexpected-performance-outcome-does-accessing-struct-members-cause-allocation/121330 "2024-10-16T11:57:40Z")

</div>

Hello, I am trying to understand what affects the performance of code in Julia. Please see below for three functions combo\_with\_max\_sum, combo\_with\_max\_sum\_2 and combo\_with\_max\_sum\_3. I would have expected version 2…

---

## [Vector/array and boolean mask using logic operators](https://discourse.julialang.org/t/vector-array-and-boolean-mask-using-logic-operators/121369)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 4\
**Last updated:** [October 16, 2024, 10:33am UTC](https://discourse.julialang.org/t/vector-array-and-boolean-mask-using-logic-operators/121369 "2024-10-16T10:33:58Z")

</div>

Hi, I would like to do the same thing as in Python: import numpy as np arr=np.array(\[1,2,3,4,5,6\]) mask=(arr\<3)|(arr\>=4) which gives as result array(\[ True, True, False, True, True, True\]) I tried stuff in Juli…

---

## [UndefVarError: orientation not defined](https://discourse.julialang.org/t/undefvarerror-orientation-not-defined/121364)

<div class="topic-metadata">

**Author:** [@jay\_Gao](https://discourse.julialang.org/u/jay_Gao)\
**Replies:** 6\
**Last updated:** [October 16, 2024, 9:43am UTC](https://discourse.julialang.org/t/undefvarerror-orientation-not-defined/121364 "2024-10-16T09:43:43Z")

</div>

I am getting this error: UndefVarError: orientation not defined Stacktrace: \[1\] overdub @ .\\In\[31\]:4 \[inlined\] \[2\] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{MeshCat.Animation, Int64}, N…

---

## [Convert string to equation (fast)](https://discourse.julialang.org/t/convert-string-to-equation-fast/121259)

<div class="topic-metadata">

**Author:** [@Daniel\_Reimeir](https://discourse.julialang.org/u/Daniel_Reimeir)\
**Replies:** 12\
**Last updated:** [October 16, 2024, 9:19am UTC](https://discourse.julialang.org/t/convert-string-to-equation-fast/121259 "2024-10-16T09:19:35Z")

</div>

Hi, I’m pretty new to the Julia language and i have a problem with my program. Just a short background, I am a engineering student and my program shall be a Multibody simulation tool. I have already solved the mechanics…

---

## [@time reporting lock conflicts - what are these?](https://discourse.julialang.org/t/time-reporting-lock-conflicts-what-are-these/121300)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 5\
**Last updated:** [October 16, 2024, 7:29am UTC](https://discourse.julialang.org/t/time-reporting-lock-conflicts-what-are-these/121300 "2024-10-16T07:29:22Z")

</div>

When I use @time to time a particular function that reads and write from/to several large files, the output shows (for example): 0.403770 seconds (6.20 k allocations: 233.059 MiB, 8.12% gc time, 4 lock conflicts I’ve n…

---

## [Bounderror during interpolation](https://discourse.julialang.org/t/bounderror-during-interpolation/121340)

<div class="topic-metadata">

**Author:** [@Goodness](https://discourse.julialang.org/u/Goodness)\
**Replies:** 2\
**Last updated:** [October 16, 2024, 5:33am UTC](https://discourse.julialang.org/t/bounderror-during-interpolation/121340 "2024-10-16T05:33:14Z")

</div>

Hello I want to run a simulation that requires iteration and interpolation, but I have been encountering this error, and the simulation will end after some iteration. { “name”: “BoundsError”, “message”: “BoundsError:…

---

## [RemoteChannels and workload queue architecture](https://discourse.julialang.org/t/remotechannels-and-workload-queue-architecture/18056)

<div class="topic-metadata">

**Author:** [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Replies:** 3\
**Last updated:** [October 16, 2024, 4:44am UTC](https://discourse.julialang.org/t/remotechannels-and-workload-queue-architecture/18056 "2024-10-16T04:44:20Z")

</div>

Hi, I need to implement the following architecture: my master worker receives some requests (via HTTP interface) validates the requests, makes some convertations and puts requests into a queue. Request from the queue is …

---

## [PythonCall spends a lot of time showing stuff for JAX](https://discourse.julialang.org/t/pythoncall-spends-a-lot-of-time-showing-stuff-for-jax/121346)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 3\
**Last updated:** [October 15, 2024, 8:59pm UTC](https://discourse.julialang.org/t/pythoncall-spends-a-lot-of-time-showing-stuff-for-jax/121346 "2024-10-15T20:59:43Z")

</div>

Hi everyone, especially @cjdoris! I’m trying to call JAX from Julia and I find that PythonCall.jl has a lot of overhead in a simple conversion case due to… printing? Has anyone run into the same issue? Setup code: usi…

---

## [Using readlines with large text files](https://discourse.julialang.org/t/using-readlines-with-large-text-files/121341)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 3\
**Last updated:** [October 15, 2024, 6:37pm UTC](https://discourse.julialang.org/t/using-readlines-with-large-text-files/121341 "2024-10-15T18:37:37Z")

</div>

I’m trying to read a genome string file into Julia using readlines() and getting some very strange results. The genome file consists of a gunzipped text file with a descriptive first line followed by a large number of st…

---

## [Serializing REPL state for distributed computing](https://discourse.julialang.org/t/serializing-repl-state-for-distributed-computing/121345)

<div class="topic-metadata">

**Author:** [@jgarvin](https://discourse.julialang.org/u/jgarvin)\
**Replies:** 0\
**Last updated:** [October 15, 2024, 6:15pm UTC](https://discourse.julialang.org/t/serializing-repl-state-for-distributed-computing/121345 "2024-10-15T18:15:40Z")

</div>

One of the limitations of using python for distributed computing is how well REPL state can be propagated across a cluster. If you define a bunch of functions in the REPL that call each other that you then want to execut…

---

## [Cryptic error messages, no idea what to do](https://discourse.julialang.org/t/cryptic-error-messages-no-idea-what-to-do/121264)

<div class="topic-metadata">

**Author:** [@tb877](https://discourse.julialang.org/u/tb877)\
**Replies:** 25\
**Last updated:** [October 15, 2024, 5:05pm UTC](https://discourse.julialang.org/t/cryptic-error-messages-no-idea-what-to-do/121264 "2024-10-15T17:05:15Z")

</div>

Hi, I’ve been developing a Julia module to be used on multiple machines. Recently, I noticed the module wouldn’t compile on one of the machines (my macbook, actually). It still runs fine on my HPC cluster. Been a while …

---

## [Proving that copyto! is allocation-free on a view, using AllocCheck](https://discourse.julialang.org/t/proving-that-copyto-is-allocation-free-on-a-view-using-alloccheck/121318)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 7\
**Last updated:** [October 15, 2024, 3:21pm UTC](https://discourse.julialang.org/t/proving-that-copyto-is-allocation-free-on-a-view-using-alloccheck/121318 "2024-10-15T15:21:11Z")

</div>

Hi there, I wanted to add allocation checks to the DifferentiationInterface.jl test suite, but the code for my in-place jacobian! involves copying a vector into a matrix column. Unfortunately, AllocCheck.jl cannot guara…

---

## [How to set the axis padding precisely in Makie.jl?](https://discourse.julialang.org/t/how-to-set-the-axis-padding-precisely-in-makie-jl/121310)

<div class="topic-metadata">

**Author:** [@Lee123](https://discourse.julialang.org/u/Lee123)\
**Replies:** 4\
**Last updated:** [October 15, 2024, 11:43am UTC](https://discourse.julialang.org/t/how-to-set-the-axis-padding-precisely-in-makie-jl/121310 "2024-10-15T11:43:31Z")

</div>

I want to set the padding between axis and figure margin precisely, for example, all padding are 1cm as following I have try to set figure\_padding, halign, valign, but they doesn’t work cm = 28.3465 x = range(-pi,pi…

---

## [Memory allocations when performing operation on Tuple of structs](https://discourse.julialang.org/t/memory-allocations-when-performing-operation-on-tuple-of-structs/121276)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 9\
**Last updated:** [October 15, 2024, 10:18am UTC](https://discourse.julialang.org/t/memory-allocations-when-performing-operation-on-tuple-of-structs/121276 "2024-10-15T10:18:31Z")

</div>

Hello, I’m facing a memory allocation problem on an apparently simple case. I have the following struct struct MyStruct{T1\<:AbstractMatrix, T2} data::T1 other::T2 end where data is a matrix and other is someth…

---

## [ERROR: Unsatisfiable requirements detected for package TrajOptPlots](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-trajoptplots/121321)

<div class="topic-metadata">

**Author:** [@jay\_Gao](https://discourse.julialang.org/u/jay_Gao)\
**Replies:** 0\
**Last updated:** [October 15, 2024, 9:52am UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-trajoptplots/121321 "2024-10-15T09:52:18Z")

</div>

when I add TrajOptPlots , I got an error message: (TrajectoryOptimization-examples) pkg\> add TrajOptPlots Updating registry at \`C:\\Users\\xxx\\.julia\\registries\\General\` Updating git-repo \`https://github.com/Julia…

---

## [Near positive definite (NearPD) of a symmetric matrix in Julia](https://discourse.julialang.org/t/near-positive-definite-nearpd-of-a-symmetric-matrix-in-julia/45793)

<div class="topic-metadata">

**Author:** [@Kokora](https://discourse.julialang.org/u/Kokora)\
**Replies:** 9\
**Last updated:** [October 15, 2024, 7:57am UTC](https://discourse.julialang.org/t/near-positive-definite-nearpd-of-a-symmetric-matrix-in-julia/45793 "2024-10-15T07:57:21Z")

</div>

Hi all, Is there a package in Julia which can be used to find a near positive definite matrix to a symmetric matrix? In R there is a function nearPD that I can use or the function LaplacesDemon::as.positive.definite. T…

---

## [Issues with Rationals in Symbolics.jl](https://discourse.julialang.org/t/issues-with-rationals-in-symbolics-jl/105657)

<div class="topic-metadata">

**Author:** [@bombadil224](https://discourse.julialang.org/u/bombadil224)\
**Replies:** 3\
**Last updated:** [October 14, 2024, 11:55pm UTC](https://discourse.julialang.org/t/issues-with-rationals-in-symbolics-jl/105657 "2024-10-14T23:55:32Z")

</div>

Lately I have been playing with the idea of writing a simple symbolic integrator based on the book by Bronstein “Symbolic Integration 1”, and have been more or less writing it from the ground up. So I have been writing t…

---

## [A wrapper of two functions takes longer time to execute](https://discourse.julialang.org/t/a-wrapper-of-two-functions-takes-longer-time-to-execute/121270)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 4\
**Last updated:** [October 15, 2024, 2:25am UTC](https://discourse.julialang.org/t/a-wrapper-of-two-functions-takes-longer-time-to-execute/121270 "2024-10-15T02:25:42Z")

</div>

I’m debugging a complex program within infiltrator, and this is the log: infil\> @inline function my\_set!(ψ\_sm, ψ, atomic) sm = atomic.sub\_mesh np = sm.np\_local @inbounds @simd for i\_p = …

---

## [Decimals.jl: Maintenance needed](https://discourse.julialang.org/t/decimals-jl-maintenance-needed/121246)

<div class="topic-metadata">

**Author:** [@barucden](https://discourse.julialang.org/u/barucden)\
**Replies:** 1\
**Last updated:** [October 14, 2024, 10:12pm UTC](https://discourse.julialang.org/t/decimals-jl-maintenance-needed/121246 "2024-10-14T22:12:57Z")

</div>

JuliaMath/Decimals.jl could use some maintenance (Should this library be deprecated? · Issue #61 · JuliaMath/Decimals.jl · GitHub and other issues like Decimal not usable as Dict key: no hash method defined · Issue #35 ·…

---

## [How to compare vectors?](https://discourse.julialang.org/t/how-to-compare-vectors/121295)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 10\
**Last updated:** [October 14, 2024, 5:32pm UTC](https://discourse.julialang.org/t/how-to-compare-vectors/121295 "2024-10-14T17:32:05Z")

</div>

What is a good way to check if two vectors are approximately equal? I have this check that fails: using Test a = \[1,2,3\] b = \[1,2,3.0000001\] @test a ≈ b ?

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

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