# General Usage

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

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

**Page:** 86

---

## [Help debugging failing precompilation of DuckDB.jl \[Windows\]](https://discourse.julialang.org/t/help-debugging-failing-precompilation-of-duckdb-jl-windows/122226)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 3\
**Last updated:** [February 19, 2025, 4:30pm UTC](https://discourse.julialang.org/t/help-debugging-failing-precompilation-of-duckdb-jl-windows/122226 "2025-02-19T16:30:19Z")

</div>

When installing DuckDB.jl on windows, precompilation fails: The issue is caused by failing precompilation of the DuckDB\_jll binary. Stacktrace(@v1.11) pkg\> add DuckDB Updating registry at \`C:\\Users\\dennis.bal\\.j…

---

## [Comment request on code structure on a multi-components multi-regional model](https://discourse.julialang.org/t/comment-request-on-code-structure-on-a-multi-components-multi-regional-model/126073)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 0\
**Last updated:** [February 19, 2025, 1:51pm UTC](https://discourse.julialang.org/t/comment-request-on-code-structure-on-a-multi-components-multi-regional-model/126073 "2025-02-19T13:51:10Z")

</div>

I am developing a model that has several components and at the same time several “regions” that specialize the various components. I am keeping all in a single package for easy of development in the early stages, but I …

---

## [Isn't the official style guide a bit a messed up of different things?](https://discourse.julialang.org/t/isnt-the-official-style-guide-a-bit-a-messed-up-of-different-things/126058)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [February 19, 2025, 12:57pm UTC](https://discourse.julialang.org/t/isnt-the-official-style-guide-a-bit-a-messed-up-of-different-things/126058 "2025-02-19T12:57:52Z")

</div>

Am I the only one to think that the Style Guide in the official doc is a bit a mix of two separate things? While similar at the higher level, for “style guide” you may meaning two things that remain separate: First, st…

---

## [Filtering doctests issue](https://discourse.julialang.org/t/filtering-doctests-issue/126070)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 0\
**Last updated:** [February 19, 2025, 12:32pm UTC](https://discourse.julialang.org/t/filtering-doctests-issue/126070 "2025-02-19T12:32:32Z")

</div>

I’m trying to filter in a jldoctest the lines of \[ Info: blocks. I’m trying this, within a docstring of a function: \`\`\`jldoctest ;filter = r"^\\\\s\*\\\\\[ Info:.\*"m =\> "" but that is not filtering. The corresponding regexp…

---

## [Recent issues downloading files (Downloads.download())](https://discourse.julialang.org/t/recent-issues-downloading-files-downloads-download/126040)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 5\
**Last updated:** [February 19, 2025, 12:23pm UTC](https://discourse.julialang.org/t/recent-issues-downloading-files-downloads-download/126040 "2025-02-19T12:23:21Z")

</div>

I started to have issues recently downloading some files with Downloads.download(). The issues are not quite deterministic, but they seem to persist for a while. For example, now, this file: https://files.rcsb.org/view/…

---

## [Flatten dicts of dicts in DataFrame](https://discourse.julialang.org/t/flatten-dicts-of-dicts-in-dataframe/125995)

<div class="topic-metadata">

**Author:** [@stene](https://discourse.julialang.org/u/stene)\
**Replies:** 16\
**Last updated:** [February 19, 2025, 11:15am UTC](https://discourse.julialang.org/t/flatten-dicts-of-dicts-in-dataframe/125995 "2025-02-19T11:15:06Z")

</div>

I have a vector of dicts where some entries contains dicts which I want to process in a DafaFrame. I want to flatten the dicts inside the dicts to make it easier to work with the data. I cannot find the correct command. …

---

## [Heatmap of data not on a grid](https://discourse.julialang.org/t/heatmap-of-data-not-on-a-grid/126022)

<div class="topic-metadata">

**Author:** [@evanderveer](https://discourse.julialang.org/u/evanderveer)\
**Replies:** 6\
**Last updated:** [February 19, 2025, 9:04am UTC](https://discourse.julialang.org/t/heatmap-of-data-not-on-a-grid/126022 "2025-02-19T09:04:38Z")

</div>

I have been trying to make a heatmap of some experimental data using Makie. When the x,y positions of the datapoints are on a grid, this works just fine: using CairoMakie i = 1 for x in 1:5 for y in 1:5 xys…

---

## [Enums to string & string to enum: a simple guide to use enums & strings](https://discourse.julialang.org/t/enums-to-string-string-to-enum-a-simple-guide-to-use-enums-strings/126044)

<div class="topic-metadata">

**Author:** [@0nyr](https://discourse.julialang.org/u/0nyr)\
**Replies:** 0\
**Last updated:** [February 18, 2025, 8:57pm UTC](https://discourse.julialang.org/t/enums-to-string-string-to-enum-a-simple-guide-to-use-enums-strings/126044 "2025-02-18T20:57:50Z")

</div>

Practical guide to Julia Enums ↔ Strings Well, I do this post for the me of the past that spent way to much time on understanding Enums and how to deal with Symbols, Strings and Enums. Coming from Rust, dealing with Juli…

---

## [Parallel computation to speed up for loops](https://discourse.julialang.org/t/parallel-computation-to-speed-up-for-loops/126006)

<div class="topic-metadata">

**Author:** [@AP9](https://discourse.julialang.org/u/AP9)\
**Replies:** 3\
**Last updated:** [February 18, 2025, 7:00pm UTC](https://discourse.julialang.org/t/parallel-computation-to-speed-up-for-loops/126006 "2025-02-18T19:00:02Z")

</div>

I am computing the Lyapunov exponents in 2D for the system below, by doing a for loop over two parameters (ωA, A) and it takes a really long time. using Parameters, ChaosTools, DifferentialEquations, Distributed, Shared…

---

## [Copy on write?](https://discourse.julialang.org/t/copy-on-write/126021)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 2\
**Last updated:** [February 18, 2025, 5:19pm UTC](https://discourse.julialang.org/t/copy-on-write/126021 "2025-02-18T17:19:17Z")

</div>

Hello Julia, I need copy-on-write behaviour to protect fields of the large values I’m handing out to my users from cluttering their memory with useless copies. Is there such thing as a julia Cow{T} akin to rust’s Cow\<T\>…

---

## [Documenter.jl not including any definitions and then complaining that they're missing](https://discourse.julialang.org/t/documenter-jl-not-including-any-definitions-and-then-complaining-that-theyre-missing/124644)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 1\
**Last updated:** [February 18, 2025, 3:34pm UTC](https://discourse.julialang.org/t/documenter-jl-not-including-any-definitions-and-then-complaining-that-theyre-missing/124644 "2025-02-18T15:34:00Z")

</div>

One of my projects, GitHub - MarkNahabedian/Rete.jl: An inplementation of the Rete knowledge based system shell., is failing its documentation build both in its CI GitHub action and locally. This documentetion used to…

---

## [Type-stable reading from a file](https://discourse.julialang.org/t/type-stable-reading-from-a-file/125797)

<div class="topic-metadata">

**Author:** [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)\
**Replies:** 14\
**Last updated:** [February 18, 2025, 2:44pm UTC](https://discourse.julialang.org/t/type-stable-reading-from-a-file/125797 "2025-02-18T14:44:30Z")

</div>

I was analysing some code today and I am unable to read information from a simple file while keeping type stability. I would like to pass the results to functions that have to be very optimized, so I believe this is an i…

---

## [Julia hangs while importing package when monitor is not attached](https://discourse.julialang.org/t/julia-hangs-while-importing-package-when-monitor-is-not-attached/125996)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 3\
**Last updated:** [February 17, 2025, 7:20pm UTC](https://discourse.julialang.org/t/julia-hangs-while-importing-package-when-monitor-is-not-attached/125996 "2025-02-17T19:20:20Z")

</div>

I’m struggling to understand where to even start debugging this one! I have a workstation that I usually only access over the network, so it does not normally have a monitor or keyboard/mouse attached. Some time between …

---

## [Multithreading doesn't improve the performance](https://discourse.julialang.org/t/multithreading-doesnt-improve-the-performance/126020)

<div class="topic-metadata">

**Author:** [@wq-123](https://discourse.julialang.org/u/wq-123)\
**Replies:** 6\
**Last updated:** [February 18, 2025, 10:27am UTC](https://discourse.julialang.org/t/multithreading-doesnt-improve-the-performance/126020 "2025-02-18T10:27:48Z")

</div>

Hello, I’m trying to calculate my for-loop with multithreading. But there’s no increase in computing speed. Here’s the struct of my code. B = \[\[\[zeros(ComplexF64,1,6) for a in 1:3\] for \_ in 1:Nw\] for z in 1:Threads.nthr…

---

## [Average multiple evaluations of the same function](https://discourse.julialang.org/t/average-multiple-evaluations-of-the-same-function/126009)

<div class="topic-metadata">

**Author:** [@ignace](https://discourse.julialang.org/u/ignace)\
**Replies:** 2\
**Last updated:** [February 17, 2025, 9:09pm UTC](https://discourse.julialang.org/t/average-multiple-evaluations-of-the-same-function/126009 "2025-02-17T21:09:41Z")

</div>

Suppose we have a function f(input) that transforms input (a long list of input arguments) into an output (a long tuple), depending on some (hidden) random values. A very minimalist example is the randn function. Is th…

---

## [Configuration file directories](https://discourse.julialang.org/t/configuration-file-directories/125925)

<div class="topic-metadata">

**Author:** [@phma](https://discourse.julialang.org/u/phma)\
**Replies:** 4\
**Last updated:** [February 18, 2025, 5:11am UTC](https://discourse.julialang.org/t/configuration-file-directories/125925 "2025-02-18T05:11:49Z")

</div>

Is there a function that returns the list of directories to look for configuration files in? For example, my home directory is /home/phma/, so it should return \["/etc/","/home/phma/.local/etc/"\] or something like that.

---

## [Does Mmap.sync! from disk to array, array to disk, or both?](https://discourse.julialang.org/t/does-mmap-sync-from-disk-to-array-array-to-disk-or-both/126012)

<div class="topic-metadata">

**Author:** [@ilanggear](https://discourse.julialang.org/u/ilanggear)\
**Replies:** 2\
**Last updated:** [February 17, 2025, 11:37pm UTC](https://discourse.julialang.org/t/does-mmap-sync-from-disk-to-array-array-to-disk-or-both/126012 "2025-02-17T23:37:30Z")

</div>

I’m trying to understand how to use memory mapping. Here’s a bit of code that represents what I’d like to do. I want to write to an array, and have the changes propagated to a file. Is that not how Mmap works? The co…

---

## [How to spawn persistent threads and reuse them?](https://discourse.julialang.org/t/how-to-spawn-persistent-threads-and-reuse-them/126002)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 16\
**Last updated:** [February 17, 2025, 9:50pm UTC](https://discourse.julialang.org/t/how-to-spawn-persistent-threads-and-reuse-them/126002 "2025-02-17T21:50:25Z")

</div>

Let nt=nthreads(). I have a loop for k=1:n compute!(k, ...) end that I wish to parallelize. I did so as for k0=1:nt:n k1 = min(k0+nt-1,n); @threads for k=k0:k1 compute!(k, ...) end compress\_results!(k0…

---

## [HDF5 is broken on Windows?](https://discourse.julialang.org/t/hdf5-is-broken-on-windows/125988)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 2\
**Last updated:** [February 17, 2025, 6:57pm UTC](https://discourse.julialang.org/t/hdf5-is-broken-on-windows/125988 "2025-02-17T18:57:50Z")

</div>

Since yesterday I started to see failures in building GMT in CI (and locally) due to ERROR: LoadError: InitError: could not load library "C:\\Users\\j\\.julia\\artifacts\\a0f65aec92810567654b7ca3b29b0786088806a6\\bin\\libnetcd…

---

## [Resizing ODE integrator of type matrix](https://discourse.julialang.org/t/resizing-ode-integrator-of-type-matrix/126000)

<div class="topic-metadata">

**Author:** [@B4rtel](https://discourse.julialang.org/u/B4rtel)\
**Replies:** 4\
**Last updated:** [February 17, 2025, 5:02pm UTC](https://discourse.julialang.org/t/resizing-ode-integrator-of-type-matrix/126000 "2025-02-17T17:02:42Z")

</div>

I’m trying to resize the integrator in and ODE solved with solve where u is a matrix. I also found a post similar to this (Resizing ODE integrator with matrix or VectorOfArray initial condition) but I want to do it with …

---

## [Can Julia be installed and used on an iPhone?](https://discourse.julialang.org/t/can-julia-be-installed-and-used-on-an-iphone/99813)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 9\
**Last updated:** [February 17, 2025, 10:16am UTC](https://discourse.julialang.org/t/can-julia-be-installed-and-used-on-an-iphone/99813 "2025-02-17T10:16:27Z")

</div>

I just find Julia language interesting, is it possible to carry it with me on the go? :smiley:

---

## [Can not start julia: dependent library libopenlibm.so](https://discourse.julialang.org/t/can-not-start-julia-dependent-library-libopenlibm-so/125973)

<div class="topic-metadata">

**Author:** [@Stephen](https://discourse.julialang.org/u/Stephen)\
**Replies:** 1\
**Last updated:** [February 17, 2025, 3:40am UTC](https://discourse.julialang.org/t/can-not-start-julia-dependent-library-libopenlibm-so/125973 "2025-02-17T03:40:36Z")

</div>

ERROR: Unable to load dependent library /home/rzhli/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/bin/../lib/julia/libopenlibm.so Message:/home/rzhli/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/bin/../lib/julia/libopenlibm…

---

## [Installation of Plots package fails on Ubuntu 18.04](https://discourse.julialang.org/t/installation-of-plots-package-fails-on-ubuntu-18-04/125932)

<div class="topic-metadata">

**Author:** [@fanzhy171](https://discourse.julialang.org/u/fanzhy171)\
**Replies:** 16\
**Last updated:** [February 17, 2025, 2:20am UTC](https://discourse.julialang.org/t/installation-of-plots-package-fails-on-ubuntu-18-04/125932 "2025-02-17T02:20:15Z")

</div>

Hello everyone. I met a problem when install Plots.jl package. The problem is I always failed to precompile a few things. I tried to look it up, but the solution of the past post is not clear enough for me, so I just sta…

---

## [How to easily save Julia data?](https://discourse.julialang.org/t/how-to-easily-save-julia-data/125955)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 5\
**Last updated:** [February 16, 2025, 8:32pm UTC](https://discourse.julialang.org/t/how-to-easily-save-julia-data/125955 "2025-02-16T20:32:24Z")

</div>

Hi guys, I am wondering is there a way like pickle in python to save the output data from Julia calculations? maybe it can support arrays, dict, tuples? for example, if I have a dict of which each key stores a different…

---

## [Reducing app size](https://discourse.julialang.org/t/reducing-app-size/125957)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [February 16, 2025, 1:23pm UTC](https://discourse.julialang.org/t/reducing-app-size/125957 "2025-02-16T13:23:34Z")

</div>

I have a package that I want deploy as application in a docker container. I am trying to reduce the size. Current sizes: 1,7G /tmp/testdepot/ 514M /tmp/test The second item is mainly the compiled system image. I…

---

## [How to constraint the inner type of \`Val\` by an abstract type](https://discourse.julialang.org/t/how-to-constraint-the-inner-type-of-val-by-an-abstract-type/125944)

<div class="topic-metadata">

**Author:** [@zsoerenm](https://discourse.julialang.org/u/zsoerenm)\
**Replies:** 4\
**Last updated:** [February 16, 2025, 4:25am UTC](https://discourse.julialang.org/t/how-to-constraint-the-inner-type-of-val-by-an-abstract-type/125944 "2025-02-16T04:25:20Z")

</div>

How can I constraint the parametric type within Val by an abstract type? Consider the following function using Unitful: Frequency, Hz function foo(q::Val{Q}) where Q \<: Frequency return q end I’d like to Q to be …

---

## [How to create an equation with a symbolic matrix using SymPy.jl?](https://discourse.julialang.org/t/how-to-create-an-equation-with-a-symbolic-matrix-using-sympy-jl/125937)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 2\
**Last updated:** [February 15, 2025, 7:07pm UTC](https://discourse.julialang.org/t/how-to-create-an-equation-with-a-symbolic-matrix-using-sympy-jl/125937 "2025-02-15T19:07:06Z")

</div>

Hello, good morning. How to build an equation using a symbolic matrix with SymPy.jl? Using python, I would just call sympy.Matrix class. In julia, we have Matrix in SymPy package, but it seems not create a symbol, and …

---

## [Why can't I use hcat in a for-loop?](https://discourse.julialang.org/t/why-cant-i-use-hcat-in-a-for-loop/125935)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 9\
**Last updated:** [February 15, 2025, 4:10pm UTC](https://discourse.julialang.org/t/why-cant-i-use-hcat-in-a-for-loop/125935 "2025-02-15T16:10:21Z")

</div>

Hi guys, I am trying to concatenate rows into an empty dataframe using a for-loop like this: sensitivity\_mean\_df = DataFrame() base\_df = DataFrame() for variable in variables if isempty(base\_df) base\_df = D…

---

## [PyCall returning numpy arrays](https://discourse.julialang.org/t/pycall-returning-numpy-arrays/125836)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 19\
**Last updated:** [February 15, 2025, 9:35am UTC](https://discourse.julialang.org/t/pycall-returning-numpy-arrays/125836 "2025-02-15T09:35:54Z")

</div>

I am trying to return a numpy array to Julia without copying. It took me some time to understand that pycall(py"myPythonFunctionReturningaNumPyArray", PyArray, filename) seems to be the only way to prevent the system …

---

## [Trouble using Mmap](https://discourse.julialang.org/t/trouble-using-mmap/125924)

<div class="topic-metadata">

**Author:** [@ilanggear](https://discourse.julialang.org/u/ilanggear)\
**Replies:** 5\
**Last updated:** [February 14, 2025, 11:00pm UTC](https://discourse.julialang.org/t/trouble-using-mmap/125924 "2025-02-14T23:00:07Z")

</div>

Hi, I’m exploring the use of mmap and getting the error below when mmap is called The line is: countIndex = mmap(“tmp”, Matrix{UInt32}, (NUM\_BIGRAMS,30); shared=false) I’ve also tried a file handle as produced by ‘ope…

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

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