# General Usage

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

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

**Page:** 23

---

## [Steady state solution in ModelingToolkit fails with SSRootFind due to current\_time](https://discourse.julialang.org/t/steady-state-solution-in-modelingtoolkit-fails-with-ssrootfind-due-to-current-time/135070)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 2\
**Last updated:** [January 15, 2026, 10:43am UTC](https://discourse.julialang.org/t/steady-state-solution-in-modelingtoolkit-fails-with-ssrootfind-due-to-current-time/135070 "2026-01-15T10:43:15Z")

</div>

While playing with a small example to test different functionalities of MTK it seems that SSRootFind fails to solve for the steady state, contrarily to DynamicSS, on a current\_time call. Here is a MWE to reproduce usin…

---

## [Optimizing the parameters of a MTK model with automatic differetiation](https://discourse.julialang.org/t/optimizing-the-parameters-of-a-mtk-model-with-automatic-differetiation/135063)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 2\
**Last updated:** [January 15, 2026, 10:18am UTC](https://discourse.julialang.org/t/optimizing-the-parameters-of-a-mtk-model-with-automatic-differetiation/135063 "2026-01-15T10:18:10Z")

</div>

I’m trying to optimize some parameters of a MTK model to reach some steady-state solution objective, using the recommendations in Frequently Asked Questions · ModelingToolkit.jl. This works fine with finite differences c…

---

## [CUDA Warning about freeing DeviceMemory](https://discourse.julialang.org/t/cuda-warning-about-freeing-devicememory/135042)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 1\
**Last updated:** [January 15, 2026, 7:37am UTC](https://discourse.julialang.org/t/cuda-warning-about-freeing-devicememory/135042 "2026-01-15T07:37:09Z")

</div>

I’m using Flux.jl for machine learning. When I run training, I got this error (seems to be generated from compiled code in Zygote) ERROR: LoadError: CUDA error: an illegal memory access was encountered (code 700, ERROR\_…

---

## [Clarifications on JULIA\_CPU\_TARGET](https://discourse.julialang.org/t/clarifications-on-julia-cpu-target/134807)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 3:59pm UTC](https://discourse.julialang.org/t/clarifications-on-julia-cpu-target/134807 "2026-01-14T15:59:05Z")

</div>

I’m looking into adjusting JULIA\_CPU\_TARGET for a container deployed on AWS, and think I’m close to understanding it. These threads have helped: Understanding JULIA\_CPU\_TARGET Questions about JULIA\_CPU\_TARGET Arm64 ju…

---

## [Writing a static value-keyed container with dynamic lookup when inlining isn't possible](https://discourse.julialang.org/t/writing-a-static-value-keyed-container-with-dynamic-lookup-when-inlining-isnt-possible/135057)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 0\
**Last updated:** [January 14, 2026, 3:32pm UTC](https://discourse.julialang.org/t/writing-a-static-value-keyed-container-with-dynamic-lookup-when-inlining-isnt-possible/135057 "2026-01-14T15:32:18Z")

</div>

Hi all, I’m experimenting with a container that is conceptually similar to a NamedTuple, except that the “keys” are arbitrary isbits values, not Symbols. struct ValueNamedTuple{Vals,K} vals::Vals …

---

## [Another mystery in IJulia](https://discourse.julialang.org/t/another-mystery-in-ijulia/135017)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 3\
**Last updated:** [January 14, 2026, 8:50am UTC](https://discourse.julialang.org/t/another-mystery-in-ijulia/135017 "2026-01-14T08:50:31Z")

</div>

What does this mean? This occurs in a jupyter notebook when I try to use a local package added to my packages with Pkg.develop(). I do using mypkg and the result is: SYSTEM: caught exception of type :MethodError whil…

---

## [Julia vs code extension reports opening package not part of my current envirionment](https://discourse.julialang.org/t/julia-vs-code-extension-reports-opening-package-not-part-of-my-current-envirionment/135016)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 2\
**Last updated:** [January 13, 2026, 9:34pm UTC](https://discourse.julialang.org/t/julia-vs-code-extension-reports-opening-package-not-part-of-my-current-envirionment/135016 "2026-01-13T21:34:37Z")

</div>

When a VS Code is opened with a project in the file explorer and a workbook is opened in a tab that comes from a different directory than the current project the extension reports You opened a Julia package that is not p…

---

## [How to retrieve the time of events in a modeling toolkit solution?](https://discourse.julialang.org/t/how-to-retrieve-the-time-of-events-in-a-modeling-toolkit-solution/135009)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 6\
**Last updated:** [January 13, 2026, 8:17pm UTC](https://discourse.julialang.org/t/how-to-retrieve-the-time-of-events-in-a-modeling-toolkit-solution/135009 "2026-01-13T20:17:28Z")

</div>

I have a MTK system with a @continuous\_events block. Is there a way to retrieve when these events are triggered somewhere in the solution ? I could not find anything about this in Event Handling and Callback Functions · …

---

## [Isosurface in Makie](https://discourse.julialang.org/t/isosurface-in-makie/70034)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 4\
**Last updated:** [January 13, 2026, 7:39pm UTC](https://discourse.julialang.org/t/isosurface-in-makie/70034 "2026-01-13T19:39:39Z")

</div>

Hi everyone. I have a set of 3D data that i need to plot with some isosurface: X,Y,Z,DATA. I am trying to do some fancy isosurface plot with vertical slices of the data and some isosurface on top (from perspective). I…

---

## [Julia segmentation core dump error](https://discourse.julialang.org/t/julia-segmentation-core-dump-error/125599)

<div class="topic-metadata">

**Author:** [@Sachin\_thorat](https://discourse.julialang.org/u/Sachin_thorat)\
**Replies:** 24\
**Last updated:** [January 13, 2026, 7:27pm UTC](https://discourse.julialang.org/t/julia-segmentation-core-dump-error/125599 "2026-01-13T19:27:32Z")

</div>

I have tried multiple re-installs for julia. But found no luck. The julia exits with a warning “core dumped” after I try to install packages. Same results occurred with installed julia using curl and while using the tar …

---

## [Why does GridSpace zero/ negative coordinates yields an Error but still adds the agents to the model](https://discourse.julialang.org/t/why-does-gridspace-zero-negative-coordinates-yields-an-error-but-still-adds-the-agents-to-the-model/135020)

<div class="topic-metadata">

**Author:** [@Farouk](https://discourse.julialang.org/u/Farouk)\
**Replies:** 3\
**Last updated:** [January 13, 2026, 11:25am UTC](https://discourse.julialang.org/t/why-does-gridspace-zero-negative-coordinates-yields-an-error-but-still-adds-the-agents-to-the-model/135020 "2026-01-13T11:25:18Z")

</div>

Hello guys, I have a question regarding Agents.jl GridSpace does it allow coordinates that are negative or zero like (0,0) or (-5,-1). In the test I’ve done (See code below) when I put a zero coordinates it returns an …

---

## [Strange performance issue with using parsed commandline parameters in calculation](https://discourse.julialang.org/t/strange-performance-issue-with-using-parsed-commandline-parameters-in-calculation/135010)

<div class="topic-metadata">

**Author:** [@Michael\_Wang](https://discourse.julialang.org/u/Michael_Wang)\
**Replies:** 6\
**Last updated:** [January 12, 2026, 10:29pm UTC](https://discourse.julialang.org/t/strange-performance-issue-with-using-parsed-commandline-parameters-in-calculation/135010 "2026-01-12T22:29:10Z")

</div>

Hi. I am running into a strange performance issue when using parameters obtained from ArgParse.jl (also noted this in Performance issue when using parsed\_args in computation. · Issue #139 · carlobaldassi/ArgParse.jl · G…

---

## [Julia weird behavior with array passing between Julia and Python](https://discourse.julialang.org/t/julia-weird-behavior-with-array-passing-between-julia-and-python/135005)

<div class="topic-metadata">

**Author:** [@dmitry-kabanov](https://discourse.julialang.org/u/dmitry-kabanov)\
**Replies:** 4\
**Last updated:** [January 12, 2026, 7:43pm UTC](https://discourse.julialang.org/t/julia-weird-behavior-with-array-passing-between-julia-and-python/135005 "2026-01-12T19:43:40Z")

</div>

Hi, I work on a project where users can use numerical solvers in a cross-language manner. In this project, arrays are passed as pointers to the actual data and re-wrapped in different languages according to their shap…

---

## [Issue: Passing \`scenekw\` Arguments in Makie Recipes](https://discourse.julialang.org/t/issue-passing-scenekw-arguments-in-makie-recipes/131945)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 4\
**Last updated:** [January 12, 2026, 7:13pm UTC](https://discourse.julialang.org/t/issue-passing-scenekw-arguments-in-makie-recipes/131945 "2026-01-12T19:13:45Z")

</div>

I am unable to pass scenekw arguments through a Makie recipe such that the LScene is constructed correctly. Regardless of what I try, the result is always a perspective view with axes. My understanding is that Makie re…

---

## [Adding a sensor breaks MTK model](https://discourse.julialang.org/t/adding-a-sensor-breaks-mtk-model/134964)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 5\
**Last updated:** [January 12, 2026, 4:59pm UTC](https://discourse.julialang.org/t/adding-a-sensor-breaks-mtk-model/134964 "2026-01-12T16:59:37Z")

</div>

For some reason, adding a ForceSensor from ModelingToolkitStandardLibrary breaks the following model. using ModelingToolkit import ModelingToolkit: connect, t\_nounits as t, D\_nounits as D using ModelingToolkitStandardLi…

---

## [Cartesian Indices Sequence on the GPU](https://discourse.julialang.org/t/cartesian-indices-sequence-on-the-gpu/134998)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 0\
**Last updated:** [January 12, 2026, 8:24am UTC](https://discourse.julialang.org/t/cartesian-indices-sequence-on-the-gpu/134998 "2026-01-12T08:24:05Z")

</div>

I have an array of integers i, e.g. \[3,1,2\], and I want to map them to Cartesian indices \[(1, 3), (2, 1), (3, 2)\]. On the CPU, the easy way of creating this array is CartesianIndex.(enumerate(i)). However this does not …

---

## [Using @assert in another macro](https://discourse.julialang.org/t/using-assert-in-another-macro/134990)

<div class="topic-metadata">

**Author:** [@densmojd](https://discourse.julialang.org/u/densmojd)\
**Replies:** 2\
**Last updated:** [January 11, 2026, 7:19pm UTC](https://discourse.julialang.org/t/using-assert-in-another-macro/134990 "2026-01-11T19:19:19Z")

</div>

I’m attempting to use @assert in the definition of another macro, and I cannot get the message associated with the AssertionError to be formed correctly. Here’s an MWE: macro my\_assert(arg) return :(@assert $(esc(a…

---

## [Reflections on Developer Experience After Building a Large Julia Codebase](https://discourse.julialang.org/t/reflections-on-developer-experience-after-building-a-large-julia-codebase/134732)

<div class="topic-metadata">

**Author:** [@cuihantao](https://discourse.julialang.org/u/cuihantao)\
**Replies:** 33\
**Last updated:** [January 11, 2026, 6:24pm UTC](https://discourse.julialang.org/t/reflections-on-developer-experience-after-building-a-large-julia-codebase/134732 "2026-01-11T18:24:18Z")

</div>

I want to share my experience developing a Julia codebase for an project on high-performance simulation. It is from the experience of porting a ~80k line Python research code to Julia. Strictly speaking, it is not a “por…

---

## [Using Interpolations.jl on CuVector](https://discourse.julialang.org/t/using-interpolations-jl-on-cuvector/60409)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 6\
**Last updated:** [January 11, 2026, 11:29am UTC](https://discourse.julialang.org/t/using-interpolations-jl-on-cuvector/60409 "2026-01-11T11:29:58Z")

</div>

I am feeding a CuVector to an interpolator created with Interpolations.jl and wanting to get the output as a CuVector, but I am not sure how to achieve this. Here is what I did. I create an interpolator using sampling …

---

## [Question about what About.jl tells me](https://discourse.julialang.org/t/question-about-what-about-jl-tells-me/134966)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 9\
**Last updated:** [January 10, 2026, 4:45am UTC](https://discourse.julialang.org/t/question-about-what-about-jl-tells-me/134966 "2026-01-10T04:45:11Z")

</div>

I need a bit of advice on interpreting the results of About.jl. I’m doing some work trying to make marginal gains in the memory demands of XLSX.jl and am currently focusing on the way Excel’s sharedStrings are handled. C…

---

## [Test item runner doesn't work in vscode](https://discourse.julialang.org/t/test-item-runner-doesnt-work-in-vscode/134970)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 1\
**Last updated:** [January 10, 2026, 3:41am UTC](https://discourse.julialang.org/t/test-item-runner-doesnt-work-in-vscode/134970 "2026-01-10T03:41:43Z")

</div>

I recently switched one of my projects to use the new Workspace organization with the main project and test as separate projects in the workspace. Now I get an error when I try to run the tests using the test item runner…

---

## [Converting SymbolicNeuralNetwork to numeric function](https://discourse.julialang.org/t/converting-symbolicneuralnetwork-to-numeric-function/134939)

<div class="topic-metadata">

**Author:** [@oudeis](https://discourse.julialang.org/u/oudeis)\
**Replies:** 2\
**Last updated:** [January 9, 2026, 10:33pm UTC](https://discourse.julialang.org/t/converting-symbolicneuralnetwork-to-numeric-function/134939 "2026-01-09T22:33:40Z")

</div>

Hi all, I have a symbolic neural network, parameterised by theta=theta\_vals which I wish to evaluate at some point x. I construct the neural network as: using Lux, ModelingToolkit, ModelingToolkitNeuralNets nn\_arch = …

---

## [Toml sources path is OS dependant](https://discourse.julialang.org/t/toml-sources-path-is-os-dependant/134920)

<div class="topic-metadata">

**Author:** [@KSepetanc](https://discourse.julialang.org/u/KSepetanc)\
**Replies:** 3\
**Last updated:** [January 9, 2026, 8:37pm UTC](https://discourse.julialang.org/t/toml-sources-path-is-os-dependant/134920 "2026-01-09T20:37:41Z")

</div>

I had sources path defined in Project.toml as follows: \[sources\] App = {path = "../App.jl"} Once environment is activated and instantiated on Windows, the path auto-converts to “\\\\” version. This is fine for Windows, b…

---

## [Help to use \`JuliaC\` on Centos7](https://discourse.julialang.org/t/help-to-use-juliac-on-centos7/134961)

<div class="topic-metadata">

**Author:** [@bmxam](https://discourse.julialang.org/u/bmxam)\
**Replies:** 4\
**Last updated:** [January 9, 2026, 7:57pm UTC](https://discourse.julialang.org/t/help-to-use-juliac-on-centos7/134961 "2026-01-09T19:57:39Z")

</div>

Hi everyone, I’m trying to compile a julia script (just a simple helloworld, like in the JuliaC repo) using JuliaC on a Centos7 machine. I know Centos7 is EOL, but this is a constraint for an old HPC cluster. As far as…

---

## [Combining MTK standard library StateSpace with other Blocks](https://discourse.julialang.org/t/combining-mtk-standard-library-statespace-with-other-blocks/127322)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 5\
**Last updated:** [January 9, 2026, 2:42pm UTC](https://discourse.julialang.org/t/combining-mtk-standard-library-statespace-with-other-blocks/127322 "2026-01-09T14:42:18Z")

</div>

I’m currently trying to integrate a linear state-space model inside a ModelingToolkit model. For this purpose I used the ODESystem specialization provided by ControlSystemsMTK, which itself uses the StateSpace block pr…

---

## [Is it possible to apply rules on Differentials in Symbolics.jl?](https://discourse.julialang.org/t/is-it-possible-to-apply-rules-on-differentials-in-symbolics-jl/134936)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 3\
**Last updated:** [January 9, 2026, 10:01am UTC](https://discourse.julialang.org/t/is-it-possible-to-apply-rules-on-differentials-in-symbolics-jl/134936 "2026-01-09T10:01:08Z")

</div>

I’m trying to apply the chain rule to effectively do a change of variables but I can’t figure out a rule that works. Here is an example that I think should work. @variables a b c(a,b) r = @rule Differential(a)(~x) =\> D…

---

## [Julia Markdown doesn't have strikethroughs](https://discourse.julialang.org/t/julia-markdown-doesnt-have-strikethroughs/74644)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 4\
**Last updated:** [January 8, 2026, 11:40pm UTC](https://discourse.julialang.org/t/julia-markdown-doesnt-have-strikethroughs/74644 "2026-01-08T23:40:38Z")

</div>

Julia Markdown doesn’t do strikethroughs with the~~ ~~ notation, like Markdown, and this is a problem for showing simplification. What GitHub do I report this on?

---

## [Producing Strings with split()](https://discourse.julialang.org/t/producing-strings-with-split/134954)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 4\
**Last updated:** [January 8, 2026, 5:29pm UTC](https://discourse.julialang.org/t/producing-strings-with-split/134954 "2026-01-08T17:29:34Z")

</div>

Hi, I would like to avoid getting SubStrings. While the first split can be “fixed”, it “fails” at the second split and I don’t get why. julia\> txt = "a b c-aa bb cc-aaa bbb ccc" "a b c-aa bb cc-aaa bbb ccc" julia\> li…

---

## [How to make a macro for optional struct fields and function parameters?](https://discourse.julialang.org/t/how-to-make-a-macro-for-optional-struct-fields-and-function-parameters/134935)

<div class="topic-metadata">

**Author:** [@hadrien.theveneau](https://discourse.julialang.org/u/hadrien.theveneau)\
**Replies:** 6\
**Last updated:** [January 8, 2026, 11:59am UTC](https://discourse.julialang.org/t/how-to-make-a-macro-for-optional-struct-fields-and-function-parameters/134935 "2026-01-08T11:59:04Z")

</div>

Dear all, Would it be a simple way to code this: struct MyStruct a::Int IF OPTION THEN b::Int END IF new MyStruct( a\_val::Int, IF OPTION THEN b::Int END IF ) end I…

---

## [Run program with string input and output](https://discourse.julialang.org/t/run-program-with-string-input-and-output/134942)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 3\
**Last updated:** [January 8, 2026, 8:45am UTC](https://discourse.julialang.org/t/run-program-with-string-input-and-output/134942 "2026-01-08T08:45:53Z")

</div>

How do I run a program with a string on its stdin and get its output as a string? This works but it’s a little verbose. julia\> let s = "hello" io = IOBuffer() run(\`cat\`, IOBuffer(s), io) …

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

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