# General Usage

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

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

**Page:** 65

---

## [About checking a package/library \`Manifest.toml\` into control version (again)](https://discourse.julialang.org/t/about-checking-a-package-library-manifest-toml-into-control-version-again/127490)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 22\
**Last updated:** [May 13, 2025, 12:26pm UTC](https://discourse.julialang.org/t/about-checking-a-package-library-manifest-toml-into-control-version-again/127490 "2025-05-13T12:26:17Z")

</div>

Hello @Julia, From what I understand here and there (but really anywhere), there is almost dogmatic community consensus that Manifest.toml files may be checked into version control for end applications, but certainly no…

---

## [Sparse arrays allocation versus speed](https://discourse.julialang.org/t/sparse-arrays-allocation-versus-speed/128726)

<div class="topic-metadata">

**Author:** [@Boris](https://discourse.julialang.org/u/Boris)\
**Replies:** 9\
**Last updated:** [May 13, 2025, 5:18am UTC](https://discourse.julialang.org/t/sparse-arrays-allocation-versus-speed/128726 "2025-05-13T05:18:56Z")

</div>

Hi! I have a question about allocations and speed trade-off when using Sparse Arrays. TLDR question: Sparse matrix multiplication for my case is fast, but allocates a lot of memory. Using dense matrices my code is slowe…

---

## [Can views function on diag?](https://discourse.julialang.org/t/can-views-function-on-diag/128943)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 3\
**Last updated:** [May 13, 2025, 3:54am UTC](https://discourse.julialang.org/t/can-views-function-on-diag/128943 "2025-05-13T03:54:18Z")

</div>

Diagonal vector is a central vector that can be sliced from a Matrix, can it be viewed? julia\> using LinearAlgebra julia\> A = rand(-9:9, 2, 2) 2×2 Matrix{Int64}: -1 6 6 -9 julia\> @views d = diag(A) 2-element Vec…

---

## [Documenter.jl: HTMLWriter: rendering HTML pages loops forever](https://discourse.julialang.org/t/documenter-jl-htmlwriter-rendering-html-pages-loops-forever/128910)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 4\
**Last updated:** [May 13, 2025, 2:39am UTC](https://discourse.julialang.org/t/documenter-jl-htmlwriter-rendering-html-pages-loops-forever/128910 "2025-05-13T02:39:26Z")

</div>

Hello everybody, I am updating a package after a long time and the documentation does not build anymore. Specifically, invoking the building process with makedocs, it gets to the final step, the REPL print HTMLWriter:…

---

## [Is it possible to know if a function has captured local variables?](https://discourse.julialang.org/t/is-it-possible-to-know-if-a-function-has-captured-local-variables/128934)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 11\
**Last updated:** [May 13, 2025, 1:40am UTC](https://discourse.julialang.org/t/is-it-possible-to-know-if-a-function-has-captured-local-variables/128934 "2025-05-13T01:40:57Z")

</div>

julia\> a = fill(1) 0-dimensional Array{Int64, 0}: 1 julia\> function foo(b) a\[\] + b end foo (generic function with 1 method) julia\> foo(1) 2 julia\> a\[\] = 2 2 julia\> foo(1) 3 julia\> some\_detector(foo…

---

## [Behaviors of \`deepcopy\` for a function constructed with different ways of referencing a global variable](https://discourse.julialang.org/t/behaviors-of-deepcopy-for-a-function-constructed-with-different-ways-of-referencing-a-global-variable/128939)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 2\
**Last updated:** [May 13, 2025, 1:30am UTC](https://discourse.julialang.org/t/behaviors-of-deepcopy-for-a-function-constructed-with-different-ways-of-referencing-a-global-variable/128939 "2025-05-13T01:30:07Z")

</div>

This discovery stemmed from the reply in another post, but since it’s less relevant to the initial post, I thought I would make a new post dedicated to it. julia\> box = fill(1) 0-dimensional Array{Int64, 0}: 1 julia\> f…

---

## [Hessian is not jacobian-compose-gradient in Symbolics.jl](https://discourse.julialang.org/t/hessian-is-not-jacobian-compose-gradient-in-symbolics-jl/128921)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 4\
**Last updated:** [May 13, 2025, 12:03am UTC](https://discourse.julialang.org/t/hessian-is-not-jacobian-compose-gradient-in-symbolics-jl/128921 "2025-05-13T00:03:12Z")

</div>

I wonder why is (the title). My results is like this. Did I use its API correctly? julia\> using Symbolics julia\> @variables p\[1:10\] 1-element Vector{Symbolics.Arr{Num, 1}}: p\[1:10\] julia\> f = bobj(e, p) # some scala…

---

## [Julia with vscode stopped working (executablePath setting issue)](https://discourse.julialang.org/t/julia-with-vscode-stopped-working-executablepath-setting-issue/128931)

<div class="topic-metadata">

**Author:** [@angelajiang](https://discourse.julialang.org/u/angelajiang)\
**Replies:** 1\
**Last updated:** [May 12, 2025, 8:03pm UTC](https://discourse.julialang.org/t/julia-with-vscode-stopped-working-executablepath-setting-issue/128931 "2025-05-12T20:03:54Z")

</div>

Hi all, I have been using julia with VScode. It was working fine previously, but about a week ago I could no longer get julia to run with VScode. The first error message I got was “Could not start the Julia language s…

---

## [Composite type fields names from C code](https://discourse.julialang.org/t/composite-type-fields-names-from-c-code/128919)

<div class="topic-metadata">

**Author:** [@alexkolzov](https://discourse.julialang.org/u/alexkolzov)\
**Replies:** 2\
**Last updated:** [May 12, 2025, 11:12am UTC](https://discourse.julialang.org/t/composite-type-fields-names-from-c-code/128919 "2025-05-12T11:12:04Z")

</div>

Hello everyone! I am trying to get the name of composite type fields in version 1.11. A long time ago I did it like this: int nfields = jl\_datatype\_nfields(jtype); fields.resize(nfields); for (int i = 0; i \< nfields; …

---

## [Documenter.jl: How to avoid repetitions of shared docstrings?](https://discourse.julialang.org/t/documenter-jl-how-to-avoid-repetitions-of-shared-docstrings/128885)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 11\
**Last updated:** [May 11, 2025, 8:30pm UTC](https://discourse.julialang.org/t/documenter-jl-how-to-avoid-repetitions-of-shared-docstrings/128885 "2025-05-11T20:30:35Z")

</div>

Suppose I have two functions that share a common docstring: f() = 1 g() = 2 "docstring for \`f\` and \`g\`" f, g I only want to the docstring to appear once in the documentation, not twice. However, if I only write \`\`\`@d…

---

## [When the yvector is not uniform at each time point, there are problems when drawing the heatmap](https://discourse.julialang.org/t/when-the-yvector-is-not-uniform-at-each-time-point-there-are-problems-when-drawing-the-heatmap/128904)

<div class="topic-metadata">

**Author:** [@dk-zen](https://discourse.julialang.org/u/dk-zen)\
**Replies:** 3\
**Last updated:** [May 11, 2025, 3:08pm UTC](https://discourse.julialang.org/t/when-the-yvector-is-not-uniform-at-each-time-point-there-are-problems-when-drawing-the-heatmap/128904 "2025-05-11T15:08:00Z")

</div>

I used Makie to create a heatmap graph. The drawn graph has a lot of blank points. I think it might be caused by the fact that the altitude vector is different at each time point. Does anyone know how to deal with this? …

---

## [GLMakie Camera Controls vs Scene Controls](https://discourse.julialang.org/t/glmakie-camera-controls-vs-scene-controls/127754)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 1\
**Last updated:** [May 11, 2025, 6:44am UTC](https://discourse.julialang.org/t/glmakie-camera-controls-vs-scene-controls/127754 "2025-05-11T06:44:18Z")

</div>

I am trying to do a very simple thing - Create a Scene in GLMakie and then control it’s camera. using GLMakie: Scene, scatter!, Circle, display, text! s1 = Scene() scatter!(s1, (0, 0), marker = Circle, markersize = 200…

---

## [Revise and OhMyREPL don't precompile when starting julia in VSCode terminal](https://discourse.julialang.org/t/revise-and-ohmyrepl-dont-precompile-when-starting-julia-in-vscode-terminal/128637)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 3\
**Last updated:** [May 10, 2025, 11:33pm UTC](https://discourse.julialang.org/t/revise-and-ohmyrepl-dont-precompile-when-starting-julia-in-vscode-terminal/128637 "2025-05-10T23:33:20Z")

</div>

I load Revise and OhMyREPL in my startup.jl file. When I start julia from a terminal this works fine. But just in the last couple of weeks when I start the Julia terminal in VSCode I get this error \[ Info: Precompiling …

---

## [NixOS + Julia](https://discourse.julialang.org/t/nixos-julia/128896)

<div class="topic-metadata">

**Author:** [@rsenne](https://discourse.julialang.org/u/rsenne)\
**Replies:** 2\
**Last updated:** [May 10, 2025, 6:26pm UTC](https://discourse.julialang.org/t/nixos-julia/128896 "2025-05-10T18:26:56Z")

</div>

Does anyone have a good modern setup for NixOS + Julia? recently switched my linux distro over from pop\_os! and overall I like the declarative philosophy, and for 90% of things i can get it to “just work,” but Julia is a…

---

## [Why do we need the \`T\` in Symmetric{T, S}?](https://discourse.julialang.org/t/why-do-we-need-the-t-in-symmetric-t-s/128858)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 16\
**Last updated:** [May 10, 2025, 12:59am UTC](https://discourse.julialang.org/t/why-do-we-need-the-t-in-symmetric-t-s/128858 "2025-05-10T00:59:48Z")

</div>

I am a bit curious about the question in the title. Since it is unanswered in the docstring, I list its definition as a reference. # Symmetric and Hermitian matrices struct Symmetric{T,S\<:AbstractMatrix{\<:T}} \<: Abstrac…

---

## [Wrong Package Used in Documenter](https://discourse.julialang.org/t/wrong-package-used-in-documenter/128629)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 11\
**Last updated:** [May 9, 2025, 7:59am UTC](https://discourse.julialang.org/t/wrong-package-used-in-documenter/128629 "2025-05-09T07:59:14Z")

</div>

I was trying in vain to get a documention for TiledViews.jl up and running. The issue is that the CI seems to install the last release version, rather than using the local Development Version, which is why the Documente…

---

## [Retaining the property of Symmetric?](https://discourse.julialang.org/t/retaining-the-property-of-symmetric/127437)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 7\
**Last updated:** [May 9, 2025, 7:20am UTC](https://discourse.julialang.org/t/retaining-the-property-of-symmetric/127437 "2025-05-09T07:20:29Z")

</div>

It doesn’t keep the Symmetric property import JuMP, Gurobi, LinearAlgebra model = JuMP.Model(Gurobi.Optimizer) JuMP.@variable(model, X\[1:2, 1:2\] \>= 0, Symmetric) JuMP.optimize!(model) Xt = JuMP.value.(X) # ⚠️ Can this b…

---

## [OpenSSL version mismatch (3.0 vs 3.5) -\> Problems with Documenter.jl + Git running in the official Julia Docker image](https://discourse.julialang.org/t/openssl-version-mismatch-3-0-vs-3-5-problems-with-documenter-jl-git-running-in-the-official-julia-docker-image/128745)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 7\
**Last updated:** [May 9, 2025, 6:31am UTC](https://discourse.julialang.org/t/openssl-version-mismatch-3-0-vs-3-5-problems-with-documenter-jl-git-running-in-the-official-julia-docker-image/128745 "2025-05-09T06:31:33Z")

</div>

Our CI jobs which deploy the docs via Documenter.jl using the official Julia Docker image (e.g julia:1.11) started to fail a couple of days ago and I noticed that the problem is a version conflict between the system’s Op…

---

## [An example for cross-platform standalone GUI application](https://discourse.julialang.org/t/an-example-for-cross-platform-standalone-gui-application/128822)

<div class="topic-metadata">

**Author:** [@uwestoehr](https://discourse.julialang.org/u/uwestoehr)\
**Replies:** 3\
**Last updated:** [May 9, 2025, 2:07am UTC](https://discourse.julialang.org/t/an-example-for-cross-platform-standalone-gui-application/128822 "2025-05-09T02:07:10Z")

</div>

As I promised in the thread about the instruction how to create standalone applications with a GUI, here is as example a complete GUI program that was created using PackageCompiler + Lazarus. (I selected Lazarus as UI b…

---

## [Error showing value of type SparseMatrixCSC](https://discourse.julialang.org/t/error-showing-value-of-type-sparsematrixcsc/128857)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 2\
**Last updated:** [May 9, 2025, 1:56am UTC](https://discourse.julialang.org/t/error-showing-value-of-type-sparsematrixcsc/128857 "2025-05-09T01:56:06Z")

</div>

It appears that there is a valid SparseMatrixCSC, but cannot be shown. julia\> using SparseArrays julia\> A = \[rand(-9:9, 2) for i in 1:2, j in 1:2\] 2×2 Matrix{Vector{Int64}}: \[-6, -1\] \[-7, -6\] \[5, 5\] \[0, -1\] juli…

---

## [Writing an .edf File using EDF.jl](https://discourse.julialang.org/t/writing-an-edf-file-using-edf-jl/128666)

<div class="topic-metadata">

**Author:** [@vh94](https://discourse.julialang.org/u/vh94)\
**Replies:** 6\
**Last updated:** [May 8, 2025, 11:31pm UTC](https://discourse.julialang.org/t/writing-an-edf-file-using-edf-jl/128666 "2025-05-08T23:31:09Z")

</div>

Hi, I am trying to create a .edf file using the EDF.jl package , but i run into issues during File creation; I get a Method Error in calling EDF.File ERROR: MethodError: no method matching EDF.File(::IOStream, ::EDF.Fil…

---

## [Factor polynomial](https://discourse.julialang.org/t/factor-polynomial/110926)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 5\
**Last updated:** [May 8, 2025, 1:43pm UTC](https://discourse.julialang.org/t/factor-polynomial/110926 "2025-05-08T13:43:32Z")

</div>

I want to factor(x^5 + x + 1) into (x^3 - x^2 + 1)(x^2 + x + 1). Wolfram can do it, is there a Julia package that can? AbstractAlgebra.jl has a function called factor but I can’t figure out how to use it. Polynomials.j…

---

## [Disable default rng](https://discourse.julialang.org/t/disable-default-rng/128790)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 10\
**Last updated:** [May 8, 2025, 11:26am UTC](https://discourse.julialang.org/t/disable-default-rng/128790 "2025-05-08T11:26:22Z")

</div>

In a test suite I want to make sure that the default RNG is never called (clarification: even indirectly, somewhere within a package), ie that all calls to rand & friends have an explicit rng as their first argument. Th…

---

## [How do you manage and test API calls workflows?](https://discourse.julialang.org/t/how-do-you-manage-and-test-api-calls-workflows/128747)

<div class="topic-metadata">

**Author:** [@ShadowSyntax](https://discourse.julialang.org/u/ShadowSyntax)\
**Replies:** 3\
**Last updated:** [May 8, 2025, 4:48am UTC](https://discourse.julialang.org/t/how-do-you-manage-and-test-api-calls-workflows/128747 "2025-05-08T04:48:51Z")

</div>

I’m building a pipeline where Julia pulls in and sends out data via HTTP. Curious how others test their API logic — inside Julia or with external tools? Looking for fast and flexible solutions.

---

## [Using docker2exe with Julia](https://discourse.julialang.org/t/using-docker2exe-with-julia/128795)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 1\
**Last updated:** [May 8, 2025, 3:48am UTC](https://discourse.julialang.org/t/using-docker2exe-with-julia/128795 "2025-05-08T03:48:38Z")

</div>

Hi, just out of curiosity. This would work with Julia too? For example, to ship educational standalone Pluto notebooks (many, not just one) with all packages precompiled and installed? Of course the size might be GBs…

---

## [Step by step instruction and example how to create standalone applications for Windows with a \[G\]UI](https://discourse.julialang.org/t/step-by-step-instruction-and-example-how-to-create-standalone-applications-for-windows-with-a-g-ui/128274)

<div class="topic-metadata">

**Author:** [@uwestoehr](https://discourse.julialang.org/u/uwestoehr)\
**Replies:** 17\
**Last updated:** [May 8, 2025, 12:58am UTC](https://discourse.julialang.org/t/step-by-step-instruction-and-example-how-to-create-standalone-applications-for-windows-with-a-g-ui/128274 "2025-05-08T00:58:20Z")

</div>

After many hours of troubles, discussions and problems, gave this issue a final try and here is my solution. I created a complete repository called “Juliastic” that provides these features: step by step instructions h…

---

## [Better way to do \`\`\`getindex.\`\`\`](https://discourse.julialang.org/t/better-way-to-do-getindex/128814)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 7\
**Last updated:** [May 7, 2025, 9:51pm UTC](https://discourse.julialang.org/t/better-way-to-do-getindex/128814 "2025-05-07T21:51:17Z")

</div>

I often have a need to index a list of lists at a single index and use, e.g.: getindex.( list\_of\_lists, 1 ) I would love to instead write list\_of\_lists.\[1\] but this seems to be invalid syntax. Is there some other way o…

---

## [Is there a way to enforce (or encourage) strict rules like ladder programming in Julia?](https://discourse.julialang.org/t/is-there-a-way-to-enforce-or-encourage-strict-rules-like-ladder-programming-in-julia/128782)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 9\
**Last updated:** [May 7, 2025, 9:37pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-enforce-or-encourage-strict-rules-like-ladder-programming-in-julia/128782 "2025-05-07T21:37:47Z")

</div>

I recently took a course on PLC programming and it taught me a lot about how to make a robust program. I’m now using Julia to control some semi-dangerous equipment (a laser) and I’m running into issues that wouldn’t gen…

---

## [Dot product](https://discourse.julialang.org/t/dot-product/128704)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 18\
**Last updated:** [May 7, 2025, 5:55pm UTC](https://discourse.julialang.org/t/dot-product/128704 "2025-05-07T17:55:53Z")

</div>

Hi, this is probably dumb, but I want to know if there is some standard way of doing the dot product. I know that a'b will give a correct answer, though I do not know if there is some standard when extending it to matr…

---

## [Get an equal element of a set/get an equal key of a dictionary](https://discourse.julialang.org/t/get-an-equal-element-of-a-set-get-an-equal-key-of-a-dictionary/128779)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 4\
**Last updated:** [May 7, 2025, 3:52pm UTC](https://discourse.julialang.org/t/get-an-equal-element-of-a-set-get-an-equal-key-of-a-dictionary/128779 "2025-05-07T15:52:26Z")

</div>

Suppose I have x and s::AbstractSet and I know x ∈ s. How to get the element of s, say e, such that x == e? I could iterate through all elements like this, but surely there should be a simpler and more efficient solution…

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

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