# General Usage

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

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

**Page:** 90

---

## [Running code in repl whenever file is saved](https://discourse.julialang.org/t/running-code-in-repl-whenever-file-is-saved/125523)

<div class="topic-metadata">

**Author:** [@aris](https://discourse.julialang.org/u/aris)\
**Replies:** 9\
**Last updated:** [February 4, 2025, 2:39pm UTC](https://discourse.julialang.org/t/running-code-in-repl-whenever-file-is-saved/125523 "2025-02-04T14:39:08Z")

</div>

Hello everyone. I’m aware or Revise.jl 's capabilities when it comes to editing code and having the changes immediately reflected in the repl. I was wondering whether there would be a straightforward way to actually ru…

---

## [FFTW scales pretty well (some @btime benchmarks)](https://discourse.julialang.org/t/fftw-scales-pretty-well-some-btime-benchmarks/28341)

<div class="topic-metadata">

**Author:** [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Replies:** 1\
**Last updated:** [February 4, 2025, 2:30pm UTC](https://discourse.julialang.org/t/fftw-scales-pretty-well-some-btime-benchmarks/28341 "2025-02-04T14:30:43Z")

</div>

I was misled into thinking that FFTW scales poorly in parallel after reading this discourse thread, so I wanted to post some numbers for someone trying to do fast FFTs in the future. My use case requires repeatedly perfo…

---

## [Parametric constructors](https://discourse.julialang.org/t/parametric-constructors/125526)

<div class="topic-metadata">

**Author:** [@azoviktor](https://discourse.julialang.org/u/azoviktor)\
**Replies:** 3\
**Last updated:** [February 4, 2025, 11:23am UTC](https://discourse.julialang.org/t/parametric-constructors/125526 "2025-02-04T11:23:19Z")

</div>

I have a parametric type struct MyStruct{T \<: Real, S} x::T y::S end and I have an outer constructor like MyStruct{S}(x, y) where {S} = MyStruct{typeof(x), S}(x, y) If I run julia\> MyStruct{Float32}(2.0, 3.0…

---

## [PyCall deprecation warning - getindex o.x vs o\[x\] where x is a julia variable](https://discourse.julialang.org/t/pycall-deprecation-warning-getindex-o-x-vs-o-x-where-x-is-a-julia-variable/125495)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 4\
**Last updated:** [February 4, 2025, 10:53am UTC](https://discourse.julialang.org/t/pycall-deprecation-warning-getindex-o-x-vs-o-x-where-x-is-a-julia-variable/125495 "2025-02-04T10:53:49Z")

</div>

All I get the following deprecation warning Warning: \`getindex(o::PyObject, s::AbstractString)\` is deprecated in favor of dot overloading (\`getproperty\`) so elements should now be accessed as e.g. \`o."s"\` instead of \`…

---

## [PerThread / Threads.threadid() desired API](https://discourse.julialang.org/t/perthread-threads-threadid-desired-api/125494)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 1\
**Last updated:** [February 3, 2025, 11:46pm UTC](https://discourse.julialang.org/t/perthread-threads-threadid-desired-api/125494 "2025-02-03T23:46:47Z")

</div>

After looking at https://github.com/JuliaLang/julia/pull/55793 and the Threads.threadid() mess, it looks to me like PerThread / PerTask don’t really cut the cake. PerTask was possible before, but has the disadvantage th…

---

## [BVProblem with solver RadauIIa5: Two incompatible array sizes to boundary condition function](https://discourse.julialang.org/t/bvproblem-with-solver-radauiia5-two-incompatible-array-sizes-to-boundary-condition-function/125509)

<div class="topic-metadata">

**Author:** [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Replies:** 1\
**Last updated:** [February 4, 2025, 8:19am UTC](https://discourse.julialang.org/t/bvproblem-with-solver-radauiia5-two-incompatible-array-sizes-to-boundary-condition-function/125509 "2025-02-04T08:19:43Z")

</div>

When I run the simple MWE posted below containing BVProblem which specifies solver RadauIIa5 (notice the lower-case “a5”!) , it throws an error complaining that the two arrays provided by the solver to my boundary-condit…

---

## [BVProblem with solver RadauIIa5: a very simple MWE yields all-zero results (?)](https://discourse.julialang.org/t/bvproblem-with-solver-radauiia5-a-very-simple-mwe-yields-all-zero-results/125510)

<div class="topic-metadata">

**Author:** [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Replies:** 3\
**Last updated:** [February 4, 2025, 7:16am UTC](https://discourse.julialang.org/t/bvproblem-with-solver-radauiia5-a-very-simple-mwe-yields-all-zero-results/125510 "2025-02-04T07:16:20Z")

</div>

When I run the very simple MWE posted below containing BVProblem which specifies solver RadauIIa5, it runs with a return code “Unstable”, and produces unexpected all-zero results. In view of the simplicity of this probl…

---

## [Pen-Down in Agents.jl](https://discourse.julialang.org/t/pen-down-in-agents-jl/125516)

<div class="topic-metadata">

**Author:** [@NebulaComplex](https://discourse.julialang.org/u/NebulaComplex)\
**Replies:** 1\
**Last updated:** [February 4, 2025, 6:59am UTC](https://discourse.julialang.org/t/pen-down-in-agents-jl/125516 "2025-02-04T06:59:00Z")

</div>

In NetLogo you can easily get a turtle to draw it’s path in continuous space with the pen-down command, how can I do this in Agents.jl - specifically in an interactive GUI? This code successfully adds a button to toggle …

---

## [Why the plotCurve3D didn't show up while the code finished running?](https://discourse.julialang.org/t/why-the-plotcurve3d-didnt-show-up-while-the-code-finished-running/125476)

<div class="topic-metadata">

**Author:** [@LarkyJulia](https://discourse.julialang.org/u/LarkyJulia)\
**Replies:** 4\
**Last updated:** [February 4, 2025, 3:06am UTC](https://discourse.julialang.org/t/why-the-plotcurve3d-didnt-show-up-while-the-code-finished-running/125476 "2025-02-04T03:06:39Z")

</div>

The following code ran and successfully showed “OK2”, but the graph didn’t show up. Why? using Plots using NURBS using PlotlyJS using StaticArrays P0 = SVector(0.0 , 1.0, 0.0) P1 = SVector(0.25, 1.0, 0.0) P2 = SVector(…

---

## [ODE solver for BVProblem never calls the provided function for boundary conditions](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447)

<div class="topic-metadata">

**Author:** [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Replies:** 46\
**Last updated:** [February 4, 2025, 12:12am UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447 "2025-02-04T00:12:39Z")

</div>

My experience with BVProblem is becoming kaftaesque. I hope I’m just missing something. My previous discourse 125374 on another aspect of the problem did not produce a solution. So I investigated further, simplifying …

---

## [Zig Like Interfaces for Julia](https://discourse.julialang.org/t/zig-like-interfaces-for-julia/125085)

<div class="topic-metadata">

**Author:** [@cshen](https://discourse.julialang.org/u/cshen)\
**Replies:** 3\
**Last updated:** [February 3, 2025, 10:26pm UTC](https://discourse.julialang.org/t/zig-like-interfaces-for-julia/125085 "2025-02-03T22:26:24Z")

</div>

I’ve recently come across how Zig handles interfaces. The gist is that Zig doesn’t have syntax sugar for interfaces and instead opts for manually managing the vtable. I got curious and started playing with the idea, and…

---

## [VSCode extension julia terminal not loading/adding \`LocalRegistry\` and private registries](https://discourse.julialang.org/t/vscode-extension-julia-terminal-not-loading-adding-localregistry-and-private-registries/125482)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 3\
**Last updated:** [February 3, 2025, 6:29pm UTC](https://discourse.julialang.org/t/vscode-extension-julia-terminal-not-loading-adding-localregistry-and-private-registries/125482 "2025-02-03T18:29:42Z")

</div>

I had to rebuild my computer OS recently. I run ubuntu 22.04 LTS. I reinstalled julia and vscode, but for some reason I am having trouble with julia registries. So I use LocalRegistry for tracking development registries…

---

## [I get errors when using module](https://discourse.julialang.org/t/i-get-errors-when-using-module/125351)

<div class="topic-metadata">

**Author:** [@Fahim](https://discourse.julialang.org/u/Fahim)\
**Replies:** 3\
**Last updated:** [February 3, 2025, 4:24pm UTC](https://discourse.julialang.org/t/i-get-errors-when-using-module/125351 "2025-02-03T16:24:14Z")

</div>

Dear Julia friends, First of all, I apologize for my poor English skills. I have a problem developing a module that uses Embeddings.jl: module Portal include("./t.jl") export get\_embedding end # module Portal using Em…

---

## [Multi-thread speed in very large vectors](https://discourse.julialang.org/t/multi-thread-speed-in-very-large-vectors/125342)

<div class="topic-metadata">

**Author:** [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Replies:** 11\
**Last updated:** [February 3, 2025, 3:02pm UTC](https://discourse.julialang.org/t/multi-thread-speed-in-very-large-vectors/125342 "2025-02-03T15:02:26Z")

</div>

Hi, I am trying to get my toes wet on some multi-threading code using the great OhMyThreads package. But there is a behavior that I don’t understand. I can exemplify it using the sum function. The most natural implementa…

---

## [Change of behavior with \`hasmethod(eval(Meta.parse()))\`](https://discourse.julialang.org/t/change-of-behavior-with-hasmethod-eval-meta-parse/125500)

<div class="topic-metadata">

**Author:** [@christophe.berthod](https://discourse.julialang.org/u/christophe.berthod)\
**Replies:** 3\
**Last updated:** [February 3, 2025, 2:05pm UTC](https://discourse.julialang.org/t/change-of-behavior-with-hasmethod-eval-meta-parse/125500 "2025-02-03T14:05:16Z")

</div>

One of my codes broke due to a change of behavior of hasmethod(eval(Meta.parse())) around version 1.10.4. Prior to version 1.10.4 (e.g. 1.9.3) julia\> hasmethod(eval(Meta.parse("x-\>x")), (Real, )) true julia\> f(s) = ha…

---

## [ModelingToolkit connector error with Arrays](https://discourse.julialang.org/t/modelingtoolkit-connector-error-with-arrays/123565)

<div class="topic-metadata">

**Author:** [@fracpl](https://discourse.julialang.org/u/fracpl)\
**Replies:** 9\
**Last updated:** [February 3, 2025, 11:22am UTC](https://discourse.julialang.org/t/modelingtoolkit-connector-error-with-arrays/123565 "2025-02-03T11:22:08Z")

</div>

Hi, I am trying to implement from scratch some 3D multibody dynamics with ModelingToolkit.jl. When I define my connector (Frame) using arrays: using ModelingToolkit using LinearAlgebra using ModelingToolkit: t\_nounits a…

---

## [Tests fail on CI, pass locally](https://discourse.julialang.org/t/tests-fail-on-ci-pass-locally/125140)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 14\
**Last updated:** [January 31, 2025, 3:32pm UTC](https://discourse.julialang.org/t/tests-fail-on-ci-pass-locally/125140 "2025-01-31T15:32:22Z")

</div>

The tests for the following pull requests pass locally, but fail on Github when using Julia 1.11 : Kcu steering · ufechner7/KiteModels.jl@5cd060d · GitHub Any idea how to debug that? The problem is that when running th…

---

## [Help with CUDA and Flux. DeviceMemory issue](https://discourse.julialang.org/t/help-with-cuda-and-flux-devicememory-issue/125481)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 2\
**Last updated:** [February 2, 2025, 11:17pm UTC](https://discourse.julialang.org/t/help-with-cuda-and-flux-devicememory-issue/125481 "2025-02-02T23:17:44Z")

</div>

Hello, good evening. Im having an issue trying to run the Flux get started example. Always got ArgumentError: Illegal conversion of a CUDA.DeviceMemory to a Ptr{Float32} It brokes in line 17: out1 = model(nois…

---

## [Most recent binary artifact (GMT\_jll) is not being updated, nor installed on fresh installs of GMT.jl](https://discourse.julialang.org/t/most-recent-binary-artifact-gmt-jll-is-not-being-updated-nor-installed-on-fresh-installs-of-gmt-jl/125473)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 6\
**Last updated:** [February 2, 2025, 9:34pm UTC](https://discourse.julialang.org/t/most-recent-binary-artifact-gmt-jll-is-not-being-updated-nor-installed-on-fresh-installs-of-gmt-jl/125473 "2025-02-02T21:34:43Z")

</div>

Hi, Don’t know what is happening but the new builds of the GMT\_jll artifact are not being installed. The artifact, 6.5.3+1, was created fine (GitHub - JuliaBinaryWrappers/GMT\_jll.jl at GMT-v6.5.3+1) but what keeps being…

---

## [UndefVarError when using @turbo on nested for loop whose inner loop depends on value in outer loop](https://discourse.julialang.org/t/undefvarerror-when-using-turbo-on-nested-for-loop-whose-inner-loop-depends-on-value-in-outer-loop/125477)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 2\
**Last updated:** [February 2, 2025, 8:57pm UTC](https://discourse.julialang.org/t/undefvarerror-when-using-turbo-on-nested-for-loop-whose-inner-loop-depends-on-value-in-outer-loop/125477 "2025-02-02T20:57:54Z")

</div>

I am trying to optimize some for-loops in a package I am working on, so I decided to check out LoopVectorization. I ran into some errors, and constructed the following MWE: using LoopVectorization function f(jmax,kmax)…

---

## [What is the best way to get a running matrix-product over a large 3D array](https://discourse.julialang.org/t/what-is-the-best-way-to-get-a-running-matrix-product-over-a-large-3d-array/125452)

<div class="topic-metadata">

**Author:** [@SanAlphaTau](https://discourse.julialang.org/u/SanAlphaTau)\
**Replies:** 9\
**Last updated:** [February 2, 2025, 4:44pm UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-get-a-running-matrix-product-over-a-large-3d-array/125452 "2025-02-02T16:44:16Z")

</div>

Heya, I am doing some markov process simulations which output NxN matrices these are stored (currently) in a 3D array X\[N, N, M) where M can be very large (1E6 or more). My code currently uses a reduce statement reduce…

---

## [If in === ∈, why does .∈ work but .in fails with a ParseError?](https://discourse.julialang.org/t/if-in-why-does-work-but-in-fails-with-a-parseerror/125464)

<div class="topic-metadata">

**Author:** [@Matheus](https://discourse.julialang.org/u/Matheus)\
**Replies:** 5\
**Last updated:** [February 2, 2025, 1:02pm UTC](https://discourse.julialang.org/t/if-in-why-does-work-but-in-fails-with-a-parseerror/125464 "2025-02-02T13:02:59Z")

</div>

Hello everyone, I’m trying to understand the following behavior regarding in and ∈ (I guess they’re called operators?). While they are functionally identical (in === ∈ returns true), they behave differently when used wi…

---

## [Nullspace in exact arithmetics](https://discourse.julialang.org/t/nullspace-in-exact-arithmetics/125471)

<div class="topic-metadata">

**Author:** [@azoviktor](https://discourse.julialang.org/u/azoviktor)\
**Replies:** 4\
**Last updated:** [February 2, 2025, 1:03pm UTC](https://discourse.julialang.org/t/nullspace-in-exact-arithmetics/125471 "2025-02-02T13:03:19Z")

</div>

Is there a generic Julia implementation of a nullspace in exact arithmetics? I.e., I am interested in nullspace(A::AbstractMatrix{T}), where T is any field number datatype. The return type of the method would be again Ab…

---

## [Unclear allocation behaviour with built-in sum()](https://discourse.julialang.org/t/unclear-allocation-behaviour-with-built-in-sum/125304)

<div class="topic-metadata">

**Author:** [@Deceneu](https://discourse.julialang.org/u/Deceneu)\
**Replies:** 4\
**Last updated:** [February 2, 2025, 1:04am UTC](https://discourse.julialang.org/t/unclear-allocation-behaviour-with-built-in-sum/125304 "2025-02-02T01:04:34Z")

</div>

Hello, Introduction I’ve been trying to process some data and I’ve encountered crippling allocation when using the built-in sum(). I have some mid-level understanding of how to increase performance in Julia, but regardi…

---

## [Can I manage the memory by myself?](https://discourse.julialang.org/t/can-i-manage-the-memory-by-myself/97250)

<div class="topic-metadata">

**Author:** [@zhijie\_sun](https://discourse.julialang.org/u/zhijie_sun)\
**Replies:** 16\
**Last updated:** [February 1, 2025, 7:03pm UTC](https://discourse.julialang.org/t/can-i-manage-the-memory-by-myself/97250 "2025-02-01T19:03:19Z")

</div>

I have a code, the GC live and RSS memory increased quickly when running, while I don’t need such big memory to do basic computation. I need to allocate lots of small dict for intermidiate computing before, and the memor…

---

## [Segmentation Fault using packages](https://discourse.julialang.org/t/segmentation-fault-using-packages/125458)

<div class="topic-metadata">

**Author:** [@kurt](https://discourse.julialang.org/u/kurt)\
**Replies:** 2\
**Last updated:** [February 1, 2025, 7:45pm UTC](https://discourse.julialang.org/t/segmentation-fault-using-packages/125458 "2025-02-01T19:45:03Z")

</div>

Help! Every time i try using Julia’s package help in the REPL, i.e. “\]”, i get a segmentation error, and julia quits. Here is the output from versioninfo(): Julia Version 1.11.3 Commit d63adeda50d (2025-01-21 19:42 UTC…

---

## [How to use size type as lower precision in Static Arrays?](https://discourse.julialang.org/t/how-to-use-size-type-as-lower-precision-in-static-arrays/125457)

<div class="topic-metadata">

**Author:** [@mj2984](https://discourse.julialang.org/u/mj2984)\
**Replies:** 1\
**Last updated:** [February 1, 2025, 2:24pm UTC](https://discourse.julialang.org/t/how-to-use-size-type-as-lower-precision-in-static-arrays/125457 "2025-02-01T14:24:52Z")

</div>

Currently Static Arrays throws an error if the size type is anything other than Int64. Considering the size of Arrays is much smaller, is it possible to support other types such as UInt8, Int8, etc?

---

## [Only Abstract Types in Method Signatures](https://discourse.julialang.org/t/only-abstract-types-in-method-signatures/125435)

<div class="topic-metadata">

**Author:** [@PatrickHaecker](https://discourse.julialang.org/u/PatrickHaecker)\
**Replies:** 6\
**Last updated:** [February 1, 2025, 11:23am UTC](https://discourse.julialang.org/t/only-abstract-types-in-method-signatures/125435 "2025-02-01T11:23:30Z")

</div>

Reading @JonasWickman’s comment that views generally use abstract types for their method definition made me think. If the method has at least one type in its signature this type needs to have an abstract parent and if An…

---

## [Literate.jl, Documenter.jl, GLMakie.jl and GitHub](https://discourse.julialang.org/t/literate-jl-documenter-jl-glmakie-jl-and-github/125386)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 15\
**Last updated:** [January 31, 2025, 12:51pm UTC](https://discourse.julialang.org/t/literate-jl-documenter-jl-glmakie-jl-and-github/125386 "2025-01-31T12:51:39Z")

</div>

Hi To create the doc of Muscade.jl, I use Literate.jl to run an example, which generates graphics (GLMakie.jl) and \*.md files, that Documenter.jl compiles into \*.html. This all works fine on my computer, but the docume…

---

## [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 …

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

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