# General Usage

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

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

**Page:** 144

---

## [Get Literate.jl to ignore docstrings](https://discourse.julialang.org/t/get-literate-jl-to-ignore-docstrings/117951)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 4\
**Last updated:** [August 8, 2024, 12:41pm UTC](https://discourse.julialang.org/t/get-literate-jl-to-ignore-docstrings/117951 "2024-08-08T12:41:03Z")

</div>

How do I get Literate.jl to ignore docstrings? I have a \*.jl file defining functions. The functions have docstrings """ z = foo(x,y) Great functionality, easy to use. """ (parsed by Documenter.jl to generate the “r…

---

## [Unitful error in \`geojoin\`](https://discourse.julialang.org/t/unitful-error-in-geojoin/117894)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 12\
**Last updated:** [August 8, 2024, 11:13am UTC](https://discourse.julialang.org/t/unitful-error-in-geojoin/117894 "2024-08-08T11:13:28Z")

</div>

Following on from here… geo = GeoIO.load("os\_bng\_grids.gpkg"), layer=4) # Read the grid gpkg file abdf = CSV.read("addresses.csv", DataFrame) # Read the address file subset!(abdf, \[:X\_COORDINATE, :Y\_COORDINA…

---

## [Run Julia from Julia](https://discourse.julialang.org/t/run-julia-from-julia/117945)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [August 8, 2024, 8:37am UTC](https://discourse.julialang.org/t/run-julia-from-julia/117945 "2024-08-08T08:37:17Z")

</div>

It would be comfortable if users could use a few of my packages like this: mkdir demo cd demo julia --project="." using Pkg pkg"add MyPackage" using MyPackage install() compile() Then restart Julia, and then the freshl…

---

## [Why need to pay more time when access the array at first time?](https://discourse.julialang.org/t/why-need-to-pay-more-time-when-access-the-array-at-first-time/117845)

<div class="topic-metadata">

**Author:** [@zhijie\_sun](https://discourse.julialang.org/u/zhijie_sun)\
**Replies:** 9\
**Last updated:** [August 8, 2024, 4:34am UTC](https://discourse.julialang.org/t/why-need-to-pay-more-time-when-access-the-array-at-first-time/117845 "2024-08-08T04:34:55Z")

</div>

I run the code below, and find we need more times when manipulate the array at the first time. I want to know why, and can we avoid it? function test() a = Vector{ComplexF64}(undef, 2^25) @time fill!(a, 0.0+0.0im) @t…

---

## [Getter functions with constant output](https://discourse.julialang.org/t/getter-functions-with-constant-output/117853)

<div class="topic-metadata">

**Author:** [@jimclay75051](https://discourse.julialang.org/u/jimclay75051)\
**Replies:** 5\
**Last updated:** [August 8, 2024, 1:31am UTC](https://discourse.julialang.org/t/getter-functions-with-constant-output/117853 "2024-08-08T01:31:19Z")

</div>

I am reading “Julia as a Second Language” by Erik Engheim. It seems to be a very good book and I do recogmend it. However, it is not perfect. For those who have the book, my question refers to chapter eight, page 143, L…

---

## [Recursive use of DifferentialEquations.jl solutions](https://discourse.julialang.org/t/recursive-use-of-differentialequations-jl-solutions/117596)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 4\
**Last updated:** [August 8, 2024, 12:57am UTC](https://discourse.julialang.org/t/recursive-use-of-differentialequations-jl-solutions/117596 "2024-08-08T00:57:37Z")

</div>

Hi, I am currently in the process of implementing a two pass trajectory optimization algorithm where the solution (sol) of one IVP problem produced in the first pass is a parameter (part of p) in the IVP problem of the s…

---

## [Space in html output in pluto notebook](https://discourse.julialang.org/t/space-in-html-output-in-pluto-notebook/82338)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 1\
**Last updated:** [August 7, 2024, 5:42pm UTC](https://discourse.julialang.org/t/space-in-html-output-in-pluto-notebook/82338 "2024-08-07T17:42:10Z")

</div>

I am able to create whitespace when using the string macro for markdown. However, Markdown.parse acts differently, and does not include the whitespace. But I have to use Markdown.parse to assemble strings to a table,…

---

## [Run IJulia notebook in REPL?](https://discourse.julialang.org/t/run-ijulia-notebook-in-repl/117923)

<div class="topic-metadata">

**Author:** [@depasquale](https://discourse.julialang.org/u/depasquale)\
**Replies:** 1\
**Last updated:** [August 7, 2024, 4:24pm UTC](https://discourse.julialang.org/t/run-ijulia-notebook-in-repl/117923 "2024-08-07T16:24:48Z")

</div>

I have some IJulia notebooks I’d like to run from the julia REPL. (I know this isn’t standard usage). Is there a way to do this? Thanks.

---

## [Is this type-piracy, and is the resulting crash expected?](https://discourse.julialang.org/t/is-this-type-piracy-and-is-the-resulting-crash-expected/117914)

<div class="topic-metadata">

**Author:** [@cmarcotte](https://discourse.julialang.org/u/cmarcotte)\
**Replies:** 2\
**Last updated:** [August 7, 2024, 3:03pm UTC](https://discourse.julialang.org/t/is-this-type-piracy-and-is-the-resulting-crash-expected/117914 "2024-08-07T15:03:05Z")

</div>

Hello, In a temp session, if I import Base.∈ and extend it with ∈(A,Interval) = (minimum(Interval) \<= A \<= maximum(Interval)) attempting to tab-complete the line -1.0 \\in causes the session to crash (versioninfo() and…

---

## [How to run external programs without GC allocations?](https://discourse.julialang.org/t/how-to-run-external-programs-without-gc-allocations/117918)

<div class="topic-metadata">

**Author:** [@Thomas008](https://discourse.julialang.org/u/Thomas008)\
**Replies:** 1\
**Last updated:** [August 7, 2024, 2:23pm UTC](https://discourse.julialang.org/t/how-to-run-external-programs-without-gc-allocations/117918 "2024-08-07T14:23:59Z")

</div>

I’d like to run an external program in a code, that can be compiled with StaticCompiler. There are e.g. Base.run(cmd /c dir) (I work in Windows) and Shell.run("dir"). However these commands need GC allocations. So they …

---

## [Spending a lot of time in \`materialize\` called by \`findall\`](https://discourse.julialang.org/t/spending-a-lot-of-time-in-materialize-called-by-findall/117859)

<div class="topic-metadata">

**Author:** [@Oblomov](https://discourse.julialang.org/u/Oblomov)\
**Replies:** 14\
**Last updated:** [August 7, 2024, 6:01am UTC](https://discourse.julialang.org/t/spending-a-lot-of-time-in-materialize-called-by-findall/117859 "2024-08-07T06:01:08Z")

</div>

Hello all, I’m new to Julia and as an exercise I’ve ported a medium-complex Python code to Julia. Even without particular optimizations, the Julia code is 4 to 5 times faster than Python (nice!), but I’ve decided to try…

---

## [Expensive Code Generation for Functions for Reuse](https://discourse.julialang.org/t/expensive-code-generation-for-functions-for-reuse/117899)

<div class="topic-metadata">

**Author:** [@Ian\_L](https://discourse.julialang.org/u/Ian_L)\
**Replies:** 3\
**Last updated:** [August 6, 2024, 10:37pm UTC](https://discourse.julialang.org/t/expensive-code-generation-for-functions-for-reuse/117899 "2024-08-06T22:37:08Z")

</div>

Hello. I’m looking for some guidance on a design decision to make. I have an algorithm which makes use of 10 to 20 specialized function that are called repeatedly, however, none of the functions are known until the neces…

---

## [@nloops with lower triangular indices](https://discourse.julialang.org/t/nloops-with-lower-triangular-indices/117903)

<div class="topic-metadata">

**Author:** [@fastwave](https://discourse.julialang.org/u/fastwave)\
**Replies:** 4\
**Last updated:** [August 6, 2024, 6:54pm UTC](https://discourse.julialang.org/t/nloops-with-lower-triangular-indices/117903 "2024-08-06T18:54:16Z")

</div>

I am trying to create N nested loops that create indices, up to and including the previous index. I am clearly bad at Symbols and macros and struggling to make up the index expression that @nloops. My attempt here clearl…

---

## [Multithreaded broadcast on a grouped DimensionalData array](https://discourse.julialang.org/t/multithreaded-broadcast-on-a-grouped-dimensionaldata-array/117607)

<div class="topic-metadata">

**Author:** [@aasdelat](https://discourse.julialang.org/u/aasdelat)\
**Replies:** 33\
**Last updated:** [August 6, 2024, 4:04pm UTC](https://discourse.julialang.org/t/multithreaded-broadcast-on-a-grouped-dimensionaldata-array/117607 "2024-08-06T16:04:30Z")

</div>

Hello: I am using the Rasters.jl package to read and work with data on a spatial and a time dimension (two dimensions). So it is a Raster with two dimensions. I have gropued the raster by means of the groupby() functio…

---

## [Read and use .gpkg file](https://discourse.julialang.org/t/read-and-use-gpkg-file/117847)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 6\
**Last updated:** [August 6, 2024, 1:07pm UTC](https://discourse.julialang.org/t/read-and-use-gpkg-file/117847 "2024-08-06T13:07:30Z")

</div>

Hi, Here’s my latest challenge: I’m looking to get the 5km tiles out of this file: os\_bng\_grids.7z. I extracted the content, a 200MB gpgk file of the same name as the 7z file, and can load this effortlessly using GeoI…

---

## [Vscode + Julia, slow](https://discourse.julialang.org/t/vscode-julia-slow/117867)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 2\
**Last updated:** [August 6, 2024, 12:03pm UTC](https://discourse.julialang.org/t/vscode-julia-slow/117867 "2024-08-06T12:03:36Z")

</div>

Hi, anyone using vscode 1.92.0 + Julia 1.10.4? Recently, I found that code suggestions are very slow (3 sec lagging), and execution of code line just finished written has to wait seconds to act. My extensions installed a…

---

## [Foldable section with Documenter?](https://discourse.julialang.org/t/foldable-section-with-documenter/117879)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [August 6, 2024, 10:52am UTC](https://discourse.julialang.org/t/foldable-section-with-documenter/117879 "2024-08-06T10:52:53Z")

</div>

I would like to have foldable sections in my documentation. If I use a markdown file on GitHub it works: quickstart.md But after this file is processed with Documenter it does not work any more: Quickstart · KiteModel…

---

## [Memory allocation during assignment and modification of Float64 variables](https://discourse.julialang.org/t/memory-allocation-during-assignment-and-modification-of-float64-variables/117856)

<div class="topic-metadata">

**Author:** [@Adam\_Mendl](https://discourse.julialang.org/u/Adam_Mendl)\
**Replies:** 3\
**Last updated:** [August 6, 2024, 9:47am UTC](https://discourse.julialang.org/t/memory-allocation-during-assignment-and-modification-of-float64-variables/117856 "2024-08-06T09:47:04Z")

</div>

Hello, I have come across really puzzling (at least for me) output of julia --track-allocation=user. After playing with my code and outputs of benchmarking tools, I have ended up with the following snippet of \*.mem file,…

---

## [Compiler optimizations around DataFrames](https://discourse.julialang.org/t/compiler-optimizations-around-dataframes/117864)

<div class="topic-metadata">

**Author:** [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Replies:** 1\
**Last updated:** [August 6, 2024, 8:48am UTC](https://discourse.julialang.org/t/compiler-optimizations-around-dataframes/117864 "2024-08-06T08:48:52Z")

</div>

I understand that to get type stable code using DataFrames.jl, you need to use Tables.columntable to convert the DF into NamedTuple. I was working on a Pluto notebook that tried to show the memory allocation behavior, bu…

---

## [How to dispatch on an SVector?](https://discourse.julialang.org/t/how-to-dispatch-on-an-svector/117855)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [August 5, 2024, 7:37pm UTC](https://discourse.julialang.org/t/how-to-dispatch-on-an-svector/117855 "2024-08-05T19:37:12Z")

</div>

How can I dispatch on an SVector? Not working: function plot2d(pos::Union{Vector, SVector}, reltime=0.0; kwargs...) plot2d\_\_(pos, reltime; kwargs...) end

---

## [Upload new package to github](https://discourse.julialang.org/t/upload-new-package-to-github/56783)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 24\
**Last updated:** [August 5, 2024, 11:26am UTC](https://discourse.julialang.org/t/upload-new-package-to-github/56783 "2024-08-05T11:26:57Z")

</div>

I created a new package locally using PkgTemplates. It looks like this: ufechner@TUD277255:~/repos/Rubi$ tree -L 1 . ├── deps ├── doc ├── input ├── LICENSE ├── Manifest.toml ├── Project.toml ├── README.md ├── src └── t…

---

## [Integer (\`Int64\`) factorization: Julia code is extremely slow](https://discourse.julialang.org/t/integer-int64-factorization-julia-code-is-extremely-slow/117819)

<div class="topic-metadata">

**Author:** [@xinwu](https://discourse.julialang.org/u/xinwu)\
**Replies:** 7\
**Last updated:** [August 5, 2024, 11:24am UTC](https://discourse.julialang.org/t/integer-int64-factorization-julia-code-is-extremely-slow/117819 "2024-08-05T11:24:37Z")

</div>

Hi, are there any mistakes in my Julia code for integer (Int64) factorization? C++ code finishes instantly. Julia code seems to run forever. Here are the codes. Thank you for your hints! #include \<iostream\> #include \<…

---

## [Cannot convince StanSample to change num\_samples](https://discourse.julialang.org/t/cannot-convince-stansample-to-change-num-samples/117814)

<div class="topic-metadata">

**Author:** [@dimsinel](https://discourse.julialang.org/u/dimsinel)\
**Replies:** 0\
**Last updated:** [August 4, 2024, 4:32pm UTC](https://discourse.julialang.org/t/cannot-convince-stansample-to-change-num-samples/117814 "2024-08-04T16:32:21Z")

</div>

This is a simple model: art\_model = " data { int\<lower = 0, upper = 100\> Y; } parameters { real\<lower = 0, upper = 1\> pi; } model { Y ~ binomial(100, pi); pi ~ beta(4, 6); } """ sample\_art\_mod…

---

## [How to use local version of test dependency?](https://discourse.julialang.org/t/how-to-use-local-version-of-test-dependency/117833)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 0\
**Last updated:** [August 5, 2024, 8:42am UTC](https://discourse.julialang.org/t/how-to-use-local-version-of-test-dependency/117833 "2024-08-05T08:42:30Z")

</div>

I have a monorepo with two packages side by side: DifferentiationInterface.jl (DI) and DifferentiationInterfaceTest.jl (DIT). The tests of DI require DIT, and when I run CI, I want to be sure to always install the local …

---

## [Tests with coverage in VSCode](https://discourse.julialang.org/t/tests-with-coverage-in-vscode/117787)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 8\
**Last updated:** [August 5, 2024, 6:19am UTC](https://discourse.julialang.org/t/tests-with-coverage-in-vscode/117787 "2024-08-05T06:19:01Z")

</div>

I recently noticed for the first time this icon in the Julia extension for testing in VSCode: The hover tool tip says “run tests with coverage”. I ran it and got a message saying this feature only works in Julia v 1.…

---

## [Macro to turn on/off parallelisation](https://discourse.julialang.org/t/macro-to-turn-on-off-parallelisation/117808)

<div class="topic-metadata">

**Author:** [@jibe](https://discourse.julialang.org/u/jibe)\
**Replies:** 15\
**Last updated:** [August 5, 2024, 4:50am UTC](https://discourse.julialang.org/t/macro-to-turn-on-off-parallelisation/117808 "2024-08-05T04:50:32Z")

</div>

I want to define a macro, @parallel, to turn on/off parallelisation in for loops, depending on a command-line argument. Here, parallelisation is embarassing and uses Threads.@threads. Why would I want to do this? Becaus…

---

## [Repeated contractions - Vector-of-StaticArrays vs HybridArrays.jl, discrepancy in performance between Float64 vs Float32](https://discourse.julialang.org/t/repeated-contractions-vector-of-staticarrays-vs-hybridarrays-jl-discrepancy-in-performance-between-float64-vs-float32/117794)

<div class="topic-metadata">

**Author:** [@jl\_enthusiast](https://discourse.julialang.org/u/jl_enthusiast)\
**Replies:** 9\
**Last updated:** [August 4, 2024, 11:50pm UTC](https://discourse.julialang.org/t/repeated-contractions-vector-of-staticarrays-vs-hybridarrays-jl-discrepancy-in-performance-between-float64-vs-float32/117794 "2024-08-04T23:50:55Z")

</div>

Hi, I am doing some pre-emptive benchmarking for a larger project. As part of it, I am checking the most optimal way to store N pre-computed 3x3 matrices which we use to contract N 3-length vectors with. I represent the…

---

## [Problem making two custom number types work together](https://discourse.julialang.org/t/problem-making-two-custom-number-types-work-together/117735)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 6\
**Last updated:** [August 4, 2024, 7:28pm UTC](https://discourse.julialang.org/t/problem-making-two-custom-number-types-work-together/117735 "2024-08-04T19:28:29Z")

</div>

I’ve defined a type of symbolic number, FastDifferentiation.Node, struct Node \<: Real ... end that causes this error when used with Quaternions.jl: julia\> using FastDifferentiation,Quaternions julia\> @variables x…

---

## [How to use SciMLOperators.jl with autograd in DifferentialEquations.jl](https://discourse.julialang.org/t/how-to-use-scimloperators-jl-with-autograd-in-differentialequations-jl/117731)

<div class="topic-metadata">

**Author:** [@ctessum](https://discourse.julialang.org/u/ctessum)\
**Replies:** 2\
**Last updated:** [August 4, 2024, 1:47pm UTC](https://discourse.julialang.org/t/how-to-use-scimloperators-jl-with-autograd-in-differentialequations-jl/117731 "2024-08-04T13:47:36Z")

</div>

Hello, I have a system that is implemented as a FunctionOperator from SciMLOperators.jl, that I would like to integrate as a differential equation. For example: using SciMLOperators, DifferentialEquations op = Functio…

---

## [Probable data race condition causing problems when trying to parallelize a loop used to populate an array](https://discourse.julialang.org/t/probable-data-race-condition-causing-problems-when-trying-to-parallelize-a-loop-used-to-populate-an-array/117733)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 14\
**Last updated:** [August 4, 2024, 9:35am UTC](https://discourse.julialang.org/t/probable-data-race-condition-causing-problems-when-trying-to-parallelize-a-loop-used-to-populate-an-array/117733 "2024-08-04T09:35:58Z")

</div>

I am trying to parallelize a part of my code where different values of an array x are populated asynchronously. The serial function of my full code is as follows using Distributed using MKL using DelimitedFiles using Li…

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

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