# General Usage

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

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

**Page:** 155

---

## [Databricks and Julia](https://discourse.julialang.org/t/databricks-and-julia/83617)

<div class="topic-metadata">

**Author:** [@AlexanderChen](https://discourse.julialang.org/u/AlexanderChen)\
**Replies:** 2\
**Last updated:** [June 29, 2024, 9:34am UTC](https://discourse.julialang.org/t/databricks-and-julia/83617 "2024-06-29T09:34:59Z")

</div>

hi, for my job we are exploring the datalakehouse possibilities in DataBricks. Also we probably need to write new code (currently in PL/SQL) into a language that is accepted in the databricks envirroment. Question: I …

---

## [Multhreading & GPU memory management](https://discourse.julialang.org/t/multhreading-gpu-memory-management/116297)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 11\
**Last updated:** [June 29, 2024, 7:01am UTC](https://discourse.julialang.org/t/multhreading-gpu-memory-management/116297 "2024-06-29T07:01:48Z")

</div>

I want to perform inference of a Lux model in multithreading. In each thread, I will use X = X |\> dev to move data to GPU and perform inference in GPU. However, it seems when number of threads increase, the GPU memory co…

---

## [I cannot import \`global variable::Type\`](https://discourse.julialang.org/t/i-cannot-import-global-variable-type/112468)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 13\
**Last updated:** [June 29, 2024, 6:40am UTC](https://discourse.julialang.org/t/i-cannot-import-global-variable-type/112468 "2024-06-29T06:40:28Z")

</div>

Hi there, I am using submodules and am surprised that I cannot import a globally defined config value which is not yet initialized. While julia has a special syntax for such undefined globals global variable::Type I …

---

## [Declaring variables inside a for loop using Threads.@threads has a significant impact on performance](https://discourse.julialang.org/t/declaring-variables-inside-a-for-loop-using-threads-threads-has-a-significant-impact-on-performance/116336)

<div class="topic-metadata">

**Author:** [@Sangjin\_Park](https://discourse.julialang.org/u/Sangjin_Park)\
**Replies:** 5\
**Last updated:** [June 28, 2024, 10:18pm UTC](https://discourse.julialang.org/t/declaring-variables-inside-a-for-loop-using-threads-threads-has-a-significant-impact-on-performance/116336 "2024-06-28T22:18:12Z")

</div>

Hello. This is my first time asking a question, so I apologize if it’s not in any kind of form. I’m also new to programming and Julia. As the title says, I often code by indexing array data and declaring it as a new var…

---

## [How to accurately plot 3D graph with very high peak in Julia?](https://discourse.julialang.org/t/how-to-accurately-plot-3d-graph-with-very-high-peak-in-julia/116317)

<div class="topic-metadata">

**Author:** [@Vinh](https://discourse.julialang.org/u/Vinh)\
**Replies:** 4\
**Last updated:** [June 28, 2024, 9:59pm UTC](https://discourse.julialang.org/t/how-to-accurately-plot-3d-graph-with-very-high-peak-in-julia/116317 "2024-06-28T21:59:08Z")

</div>

As the title says, I’m plotting a graph with very high peaks, but the output is really weird at (x,y)=(0.5,0.5) with no peaks at around 5\*10^11. I’m not really sure why that is. using GLMakie f(x, y) = y^2 / ((x - 0.5)^…

---

## [A plea for help with open62541 (OPC UA) binaries](https://discourse.julialang.org/t/a-plea-for-help-with-open62541-opc-ua-binaries/114702)

<div class="topic-metadata">

**Author:** [@vettert](https://discourse.julialang.org/u/vettert)\
**Replies:** 1\
**Last updated:** [June 28, 2024, 6:31pm UTC](https://discourse.julialang.org/t/a-plea-for-help-with-open62541-opc-ua-binaries/114702 "2024-06-28T18:31:47Z")

</div>

Dear Julia community, I am working on a Julia wrapper for the open62541 C library (open62541.org); hoping to bring a working OPC UA ( OPC Unified Architecture - Wikipedia) package to the Julia community and made some go…

---

## [What would be an equivalent julia code](https://discourse.julialang.org/t/what-would-be-an-equivalent-julia-code/116341)

<div class="topic-metadata">

**Author:** [@VinodV](https://discourse.julialang.org/u/VinodV)\
**Replies:** 10\
**Last updated:** [June 28, 2024, 6:17pm UTC](https://discourse.julialang.org/t/what-would-be-an-equivalent-julia-code/116341 "2024-06-28T18:17:48Z")

</div>

I have a piece of code in python def average\_by(lst, fn = lambda x: x): return sum(map(fn, lst), 0.0) / len(lst) average\_by(\[{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }\], lambda x: x\['n'\]) # 5.0 What would be the…

---

## [Modeling Toolkit, linearize nonlinear ODE system without input and simplification](https://discourse.julialang.org/t/modeling-toolkit-linearize-nonlinear-ode-system-without-input-and-simplification/98036)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 13\
**Last updated:** [June 28, 2024, 3:41pm UTC](https://discourse.julialang.org/t/modeling-toolkit-linearize-nonlinear-ode-system-without-input-and-simplification/98036 "2024-06-28T15:41:19Z")

</div>

I have a nonlinear ode system that has a complex structure, modeled with ModelingToolkit. This system shows a damped oscillatory response and is defined as @named ode = ODESystem(eqs, t, \<variables\>, \<parameters\>, tspan…

---

## [Using Tensorial.jl to deal with Tensors with high symmetries](https://discourse.julialang.org/t/using-tensorial-jl-to-deal-with-tensors-with-high-symmetries/116360)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 1\
**Last updated:** [June 28, 2024, 3:32pm UTC](https://discourse.julialang.org/t/using-tensorial-jl-to-deal-with-tensors-with-high-symmetries/116360 "2024-06-28T15:32:35Z")

</div>

I am writing code that deals with contractions of large tensors which possess high symmetry. As an example, I have a tensor g whose certain entries are read from a data file. The remaining entries are entered using the …

---

## [Slow performance when solving SDE for a large number of functions in a loop](https://discourse.julialang.org/t/slow-performance-when-solving-sde-for-a-large-number-of-functions-in-a-loop/116337)

<div class="topic-metadata">

**Author:** [@DavidBerghaus](https://discourse.julialang.org/u/DavidBerghaus)\
**Replies:** 3\
**Last updated:** [June 28, 2024, 2:56pm UTC](https://discourse.julialang.org/t/slow-performance-when-solving-sde-for-a-large-number-of-functions-in-a-loop/116337 "2024-06-28T14:56:03Z")

</div>

I have the following use case: I have a large dataset of 1 million drift and diffusion functions (stored as strings of the symbolic expressions) for which I want to solve the corresponding SDEs. This is my current appr…

---

## [Julia seems an order of magnitude slower than Python when printing to the terminal, because of issue with "sleep"](https://discourse.julialang.org/t/julia-seems-an-order-of-magnitude-slower-than-python-when-printing-to-the-terminal-because-of-issue-with-sleep/78151)

<div class="topic-metadata">

**Author:** [@kdheepak](https://discourse.julialang.org/u/kdheepak)\
**Replies:** 67\
**Last updated:** [June 28, 2024, 1:55pm UTC](https://discourse.julialang.org/t/julia-seems-an-order-of-magnitude-slower-than-python-when-printing-to-the-terminal-because-of-issue-with-sleep/78151 "2024-06-28T13:55:28Z")

</div>

Hi all, I’m running into couple of issues and a bottleneck when printing characters to the screen in Julia. This is because I was trying to add some new features to TerminalUserInterfaces.jl: https://github.com/kdheepak…

---

## [Mix 3d and 2d coordinates in Makie](https://discourse.julialang.org/t/mix-3d-and-2d-coordinates-in-makie/116350)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 1\
**Last updated:** [June 28, 2024, 11:54am UTC](https://discourse.julialang.org/t/mix-3d-and-2d-coordinates-in-makie/116350 "2024-06-28T11:54:44Z")

</div>

Is it possible to mix 2d and 3d coordinates in Makie? fig = Figure() axis = Axis3(fig\[1, 1\]) scatter!(axis, 0, 0, 0) # i want this one to be fixed in 2d text!(axis, 0, 0, text = "look here") # draw a line from the label…

---

## [Getting started with Metal.jl](https://discourse.julialang.org/t/getting-started-with-metal-jl/116309)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 1\
**Last updated:** [June 28, 2024, 10:48am UTC](https://discourse.julialang.org/t/getting-started-with-metal-jl/116309 "2024-06-28T10:48:11Z")

</div>

Hi everyone. So, I have never worked with GPU, I have a M1 Mac and I am trying to get some codes of mine to run faster. I have a code that I know very well and I thought it might be a good exercise to translate it to Me…

---

## [Interactive web app with Bonito and WGLMakie](https://discourse.julialang.org/t/interactive-web-app-with-bonito-and-wglmakie/116348)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 0\
**Last updated:** [June 28, 2024, 10:12am UTC](https://discourse.julialang.org/t/interactive-web-app-with-bonito-and-wglmakie/116348 "2024-06-28T10:12:45Z")

</div>

I am trying to build an interactive app with WGLMakie und Bonito and just cannot figure it out. I got as far as the following code that works sometimes: using Bonito using WGLMakie app = App() do slider = Bonito.Sl…

---

## [How to use "run()" to open a file?](https://discourse.julialang.org/t/how-to-use-run-to-open-a-file/116331)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 3\
**Last updated:** [June 28, 2024, 7:30am UTC](https://discourse.julialang.org/t/how-to-use-run-to-open-a-file/116331 "2024-06-28T07:30:33Z")

</div>

I have a figure, say, saved at the path of “D:/1.svg” and want it to be opened via the “msedge.exe” browser in windows 11. The execution of “run(start D:/1.svg)” throws error like this However, I can directly open th…

---

## [Sample new unseen points using AlgebraOfGraphics.density()](https://discourse.julialang.org/t/sample-new-unseen-points-using-algebraofgraphics-density/116334)

<div class="topic-metadata">

**Author:** [@Bonjour-Lemonde](https://discourse.julialang.org/u/Bonjour-Lemonde)\
**Replies:** 0\
**Last updated:** [June 28, 2024, 6:28am UTC](https://discourse.julialang.org/t/sample-new-unseen-points-using-algebraofgraphics-density/116334 "2024-06-28T06:28:11Z")

</div>

Hi all, I want to know how to generate new data points according to the density function using AlgebraOfGraphics.density(). As the following code shows, I used AlgebraOfGraphics.density() to fit datasets and visualized …

---

## [Package for Lagrange interpolation on finite fields](https://discourse.julialang.org/t/package-for-lagrange-interpolation-on-finite-fields/116288)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 7\
**Last updated:** [June 28, 2024, 2:42am UTC](https://discourse.julialang.org/t/package-for-lagrange-interpolation-on-finite-fields/116288 "2024-06-28T02:42:50Z")

</div>

A common point among some Discourse topics on Lagrange interpolation is the non-recommendation due to the Runge’s phenomenon (Edit: or numerical stability). However, that is a problem on real numbers, not on finite fiel…

---

## [Parallel accumulation over large dictionary](https://discourse.julialang.org/t/parallel-accumulation-over-large-dictionary/116316)

<div class="topic-metadata">

**Author:** [@OHL](https://discourse.julialang.org/u/OHL)\
**Replies:** 2\
**Last updated:** [June 27, 2024, 7:32pm UTC](https://discourse.julialang.org/t/parallel-accumulation-over-large-dictionary/116316 "2024-06-27T19:32:43Z")

</div>

I have a large Dict D and a function f that takes as input a pair of dictionary entries and outputs a float. I would like to compute f for all pairs in D and sum the results. f is also symmetric, f(a,b) = f(b,a), so I on…

---

## [Chi2 (chisq) fit non-convergence using Optimization.jl](https://discourse.julialang.org/t/chi2-chisq-fit-non-convergence-using-optimization-jl/116313)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 1\
**Last updated:** [June 27, 2024, 5:16pm UTC](https://discourse.julialang.org/t/chi2-chisq-fit-non-convergence-using-optimization-jl/116313 "2024-06-27T17:16:26Z")

</div>

using CairoMakie, FHist using Optimization, OptimizationOptimJL, OptimizationMultistartOptimization hist\_mjj12\_rosa = Hist1D(; binedges=0:2:1000, bincounts=\[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0…

---

## [Reexport.@reexport from submodule does not work: how to diagnose?](https://discourse.julialang.org/t/reexport-reexport-from-submodule-does-not-work-how-to-diagnose/116285)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [June 27, 2024, 4:10pm UTC](https://discourse.julialang.org/t/reexport-reexport-from-submodule-does-not-work-how-to-diagnose/116285 "2024-06-27T16:10:39Z")

</div>

I have been using Reexport.@reexport in many of my packages and have never had an issue. At the moment, however, it is not working in one package, even though I think it is used in the same way as in my other packages. …

---

## [Need help to adjust axis limit of live plot with makie](https://discourse.julialang.org/t/need-help-to-adjust-axis-limit-of-live-plot-with-makie/41638)

<div class="topic-metadata">

**Author:** [@Fringe](https://discourse.julialang.org/u/Fringe)\
**Replies:** 2\
**Last updated:** [June 27, 2024, 2:24pm UTC](https://discourse.julialang.org/t/need-help-to-adjust-axis-limit-of-live-plot-with-makie/41638 "2024-06-27T14:24:49Z")

</div>

currently, the way i live plot with Julia is i write new data to a file, and anytime that file update i update my plot. probably not the best but it works for me anyhow i want to adjust the range of my plot but the probl…

---

## [Create SVector with one non-zero value](https://discourse.julialang.org/t/create-svector-with-one-non-zero-value/116295)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 11\
**Last updated:** [June 27, 2024, 2:03pm UTC](https://discourse.julialang.org/t/create-svector-with-one-non-zero-value/116295 "2024-06-27T14:03:16Z")

</div>

I am trying to define a function fc(i) returning a fixed size SVector with zeros everywhere, and a 1 at position i. Is it possible to do this with no allocations, and type stability? My first two tries either were type u…

---

## [How can \`sleep(0.001)\` error?](https://discourse.julialang.org/t/how-can-sleep-0-001-error/113394)

<div class="topic-metadata">

**Author:** [@SunnyUser](https://discourse.julialang.org/u/SunnyUser)\
**Replies:** 14\
**Last updated:** [June 27, 2024, 1:58pm UTC](https://discourse.julialang.org/t/how-can-sleep-0-001-error/113394 "2024-06-27T13:58:29Z")

</div>

Hi all :slight\_smile: How can sleep(0.001) error? ┌ Error: │ EOFError: read end of file │ Stacktrace: │ \[1\] wait │ @ .\\asyncevent.jl:159 \[inlined\] │ \[2\] sleep │ @ .\\asyncevent.jl:265 \[inlined\] This happend on …

---

## [Is it possible to pipe into \`julia\` command without it exiting immediately after](https://discourse.julialang.org/t/is-it-possible-to-pipe-into-julia-command-without-it-exiting-immediately-after/116302)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 3\
**Last updated:** [June 27, 2024, 1:11pm UTC](https://discourse.julialang.org/t/is-it-possible-to-pipe-into-julia-command-without-it-exiting-immediately-after/116302 "2024-06-27T13:11:39Z")

</div>

hi there, I am wondering whether there is a flag which prevents julia from closing like echo 'println("my initial command which I would like to show up")' | julia should ideally result in something like julia\> printl…

---

## [Draw rectangle on GLMakie fig](https://discourse.julialang.org/t/draw-rectangle-on-glmakie-fig/116226)

<div class="topic-metadata">

**Author:** [@sajjad\_khan](https://discourse.julialang.org/u/sajjad_khan)\
**Replies:** 2\
**Last updated:** [June 27, 2024, 8:29am UTC](https://discourse.julialang.org/t/draw-rectangle-on-glmakie-fig/116226 "2024-06-27T08:29:27Z")

</div>

Hi, I want to interactively draw rectangle on the GLMakie figure using mouse’s left button (by pressing and dragging the mouse). However, GLMakie only zooms in when I press and drag the mouse. How can I draw rectangle, t…

---

## [Voice Coding](https://discourse.julialang.org/t/voice-coding/80513)

<div class="topic-metadata">

**Author:** [@chelseas](https://discourse.julialang.org/u/chelseas)\
**Replies:** 3\
**Last updated:** [June 27, 2024, 4:49am UTC](https://discourse.julialang.org/t/voice-coding/80513 "2024-06-27T04:49:23Z")

</div>

is there a language specific module for julia for this software https://dictation-toolbox.github.io/dictation-toolbox.org/voicecoding.html I have started using talon for writing but I’d like to use talon for coding t…

---

## [Managing \`julia\` versions using \`pixi\`](https://discourse.julialang.org/t/managing-julia-versions-using-pixi/116165)

<div class="topic-metadata">

**Author:** [@kdheepak](https://discourse.julialang.org/u/kdheepak)\
**Replies:** 15\
**Last updated:** [June 27, 2024, 2:10am UTC](https://discourse.julialang.org/t/managing-julia-versions-using-pixi/116165 "2024-06-27T02:10:45Z")

</div>

A https://prefix.dev core developer (github.com/wolfv) added a julia-forge channel on julia-forge - prefix.dev | prefix.dev. This should make it easier to manage per project Julia versions without juliaup. Here’s a scre…

---

## [JuliaSimCompiler + symbolic arrays?](https://discourse.julialang.org/t/juliasimcompiler-symbolic-arrays/116161)

<div class="topic-metadata">

**Author:** [@ctessum](https://discourse.julialang.org/u/ctessum)\
**Replies:** 2\
**Last updated:** [June 27, 2024, 12:53am UTC](https://discourse.julialang.org/t/juliasimcompiler-symbolic-arrays/116161 "2024-06-27T00:53:27Z")

</div>

Hello! Is JuliaSimCompiler currently meant to work with arrays? I would like to create a symbolic model that does the same thing a bunch of different times (eventually with different data inputs). I am aware of Ensemble…

---

## [Markdown rendering in ArgParse.jl](https://discourse.julialang.org/t/markdown-rendering-in-argparse-jl/115871)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 2\
**Last updated:** [June 26, 2024, 9:13pm UTC](https://discourse.julialang.org/t/markdown-rendering-in-argparse-jl/115871 "2024-06-26T21:13:16Z")

</div>

Julia lets you include some Markdown syntax in docstrings, and renders it with nice colors in the terminal, e.g. in interactive help: Is it possible to achieve the same with ArgParse.jl? If you type Markdown into the…

---

## [Pretty printing \`AxisArray\` based type alias](https://discourse.julialang.org/t/pretty-printing-axisarray-based-type-alias/116271)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 0\
**Last updated:** [June 26, 2024, 4:50pm UTC](https://discourse.julialang.org/t/pretty-printing-axisarray-based-type-alias/116271 "2024-06-26T16:50:15Z")

</div>

Hi all, I’m currently using AxisArrays to store array-like data, while giving some sense to the dimension names and with type parameters so that my type remains generic enough. This is super practical, but whenever I pri…

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

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