# General Usage

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

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

**Page:** 142

---

## [Split path to its parts](https://discourse.julialang.org/t/split-path-to-its-parts/15427)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 9\
**Last updated:** [August 14, 2024, 5:10pm UTC](https://discourse.julialang.org/t/split-path-to-its-parts/15427 "2024-08-14T17:10:27Z")

</div>

I want to split a path into all its directory names. On Linux I would achieve this with split and a the path separator of /: julia\> split("/home/me/some/thing", '/') 5-element Array{SubString{String},1}: ""…

---

## [Remove a field from a \`NamedTuple\`](https://discourse.julialang.org/t/remove-a-field-from-a-namedtuple/34664)

<div class="topic-metadata">

**Author:** [@ssfrr](https://discourse.julialang.org/u/ssfrr)\
**Replies:** 10\
**Last updated:** [August 14, 2024, 2:31pm UTC](https://discourse.julialang.org/t/remove-a-field-from-a-namedtuple/34664 "2024-08-14T14:31:06Z")

</div>

Is there an easy way in base Julia to create a NamedTuple with all the fields except some particular ones? Currently I have the following, but I’m wondering if I’m missing something obvious. I’m calling it delete as it s…

---

## [Convolution (conv) with same size output](https://discourse.julialang.org/t/convolution-conv-with-same-size-output/38260)

<div class="topic-metadata">

**Author:** [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Replies:** 20\
**Last updated:** [August 14, 2024, 1:33pm UTC](https://discourse.julialang.org/t/convolution-conv-with-same-size-output/38260 "2024-08-14T13:33:58Z")

</div>

Is there a way of using conv(a, b) to produce an output of the same size (as vector a) output? (Like the MATLAB option conv(a, b, 'same')) I was advised by @staticfloat to pad vector to the length size(a) .+ size(b) .- …

---

## [How to call functions/use symbols from a static library archive using FFI](https://discourse.julialang.org/t/how-to-call-functions-use-symbols-from-a-static-library-archive-using-ffi/118136)

<div class="topic-metadata">

**Author:** [@sivakon](https://discourse.julialang.org/u/sivakon)\
**Replies:** 1\
**Last updated:** [August 14, 2024, 1:25pm UTC](https://discourse.julialang.org/t/how-to-call-functions-use-symbols-from-a-static-library-archive-using-ffi/118136 "2024-08-14T13:25:27Z")

</div>

Currently the docs only show shared library, how can I use ccall to import symbols from an archive .a?

---

## [How to reuse julia compiled cache across machines?](https://discourse.julialang.org/t/how-to-reuse-julia-compiled-cache-across-machines/117149)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 8\
**Last updated:** [August 14, 2024, 10:54am UTC](https://discourse.julialang.org/t/how-to-reuse-julia-compiled-cache-across-machines/117149 "2024-08-14T10:54:55Z")

</div>

Hello, I’d like to cache the julia package compilation in an external volume which can be read and written to by multiple clients (using a respective kubernetes volume) . My question is whether it is enough to bring t…

---

## [Compat entries for weakdeps on Julia \<1.9](https://discourse.julialang.org/t/compat-entries-for-weakdeps-on-julia-1-9/118172)

<div class="topic-metadata">

**Author:** [@penelopeysm](https://discourse.julialang.org/u/penelopeysm)\
**Replies:** 2\
**Last updated:** [August 14, 2024, 1:22pm UTC](https://discourse.julialang.org/t/compat-entries-for-weakdeps-on-julia-1-9/118172 "2024-08-14T13:22:39Z")

</div>

Hello, I’m running into some trouble trying to get compatible versions of packages on old versions of Julia. This situation could, in principle, arise with any package that uses extensions. However, to use a specific ex…

---

## [How to define a vector of Function?](https://discourse.julialang.org/t/how-to-define-a-vector-of-function/118176)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 11\
**Last updated:** [August 14, 2024, 12:01pm UTC](https://discourse.julialang.org/t/how-to-define-a-vector-of-function/118176 "2024-08-14T12:01:11Z")

</div>

I’m trying to define a Vector{Function} like this: funvec = Vector{Function}(undef, 3); for i in 1:3 fun(theta) = (println(i); cos(theta\[1\] ^ 3) + 5 \* (theta\[2\] ^ 2) + 10sin(theta\[3\]) ) funvec\[i\] = fun end howe…

---

## [How to run a final function when either program fails or user crtl + c?](https://discourse.julialang.org/t/how-to-run-a-final-function-when-either-program-fails-or-user-crtl-c/118174)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [August 14, 2024, 11:22am UTC](https://discourse.julialang.org/t/how-to-run-a-final-function-when-either-program-fails-or-user-crtl-c/118174 "2024-08-14T11:22:06Z")

</div>

Hello! I was wondering if there was some way to run a final function when either the program fails due to for example division by zero or when an user chooses to terminate a program? The first bit, running something wh…

---

## [Wrapper type of static array, how to expose iterator](https://discourse.julialang.org/t/wrapper-type-of-static-array-how-to-expose-iterator/118124)

<div class="topic-metadata">

**Author:** [@NatMath](https://discourse.julialang.org/u/NatMath)\
**Replies:** 4\
**Last updated:** [August 14, 2024, 8:20am UTC](https://discourse.julialang.org/t/wrapper-type-of-static-array-how-to-expose-iterator/118124 "2024-08-14T08:20:18Z")

</div>

I’m working on a raytracer where I need a Point type, which is just a wrapper over StaticArray that has different properties when transformed than a vector. My current implementation is as follows: struct Point{N, T\<:Nu…

---

## [Seeking Insights: Approaches for Implementing Real-Time AI Analytics in Julia](https://discourse.julialang.org/t/seeking-insights-approaches-for-implementing-real-time-ai-analytics-in-julia/118163)

<div class="topic-metadata">

**Author:** [@adelenoble](https://discourse.julialang.org/u/adelenoble)\
**Replies:** 0\
**Last updated:** [August 14, 2024, 7:18am UTC](https://discourse.julialang.org/t/seeking-insights-approaches-for-implementing-real-time-ai-analytics-in-julia/118163 "2024-08-14T07:18:11Z")

</div>

Hello community, I am exploring the implementation of real-time AI analytic using the Julia programming language and would love to gather insights from those with experience in this area. Specifically, I am interested …

---

## [Makie text word\_wrap\_width unit](https://discourse.julialang.org/t/makie-text-word-wrap-width-unit/118144)

<div class="topic-metadata">

**Author:** [@NicoD](https://discourse.julialang.org/u/NicoD)\
**Replies:** 1\
**Last updated:** [August 13, 2024, 8:46pm UTC](https://discourse.julialang.org/t/makie-text-word-wrap-width-unit/118144 "2024-08-13T20:46:54Z")

</div>

Hi, in Makie the text plot has a word\_wrap\_width argument used to wrap if its width goes over a certain limit. It works fine but there is no indication on the unit of this value. It seems to be related to pixels and wi…

---

## [\[Turing.jl\] Understanding running times in Turing.jl? Beyond @time](https://discourse.julialang.org/t/turing-jl-understanding-running-times-in-turing-jl-beyond-time/118154)

<div class="topic-metadata">

**Author:** [@FJRubio](https://discourse.julialang.org/u/FJRubio)\
**Replies:** 1\
**Last updated:** [August 13, 2024, 6:29pm UTC](https://discourse.julialang.org/t/turing-jl-understanding-running-times-in-turing-jl-beyond-time/118154 "2024-08-13T18:29:16Z")

</div>

This is a general question about understanding running times in sample() from Turing.jl when I know how long it takes to evaluate a custom log-likelihood function. I have a custom log-likelihood function, my\_loglik(), f…

---

## [How to install the newest version of a package?](https://discourse.julialang.org/t/how-to-install-the-newest-version-of-a-package/118110)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 23\
**Last updated:** [August 13, 2024, 12:58pm UTC](https://discourse.julialang.org/t/how-to-install-the-newest-version-of-a-package/118110 "2024-08-13T12:58:11Z")

</div>

How can I install the latest version of a package? If I have for example KiteModels v0.6.3 installed before (in a different project) and then do: mkdir test cd test julia --project="." and try to install KiteModels wi…

---

## [Fastest way to perform A \* B \* A’](https://discourse.julialang.org/t/fastest-way-to-perform-a-b-a/117386)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 9\
**Last updated:** [August 13, 2024, 12:30pm UTC](https://discourse.julialang.org/t/fastest-way-to-perform-a-b-a/117386 "2024-08-13T12:30:08Z")

</div>

Given two dense square matrices with ComplexF64 elements of size approximately 100000X100000, A and B, what is the fastest way to perform R=ABA’, where A’=conj(tr(A)) is the Hermitian conjugate of A?. If it helps: (1) …

---

## [Documenter for API documentation](https://discourse.julialang.org/t/documenter-for-api-documentation/118132)

<div class="topic-metadata">

**Author:** [@Yannik](https://discourse.julialang.org/u/Yannik)\
**Replies:** 0\
**Last updated:** [August 13, 2024, 11:38am UTC](https://discourse.julialang.org/t/documenter-for-api-documentation/118132 "2024-08-13T11:38:39Z")

</div>

Hello I am looking for a tool to document an extensive API that is implemented in Julia. The package has its own documentation but additionally we would like to create a documentation for the API and the API requests sin…

---

## [Fts extension in DuckDB doesn't work](https://discourse.julialang.org/t/fts-extension-in-duckdb-doesnt-work/118125)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 4\
**Last updated:** [August 13, 2024, 11:28am UTC](https://discourse.julialang.org/t/fts-extension-in-duckdb-doesnt-work/118125 "2024-08-13T11:28:40Z")

</div>

The fts extension in DuckDB is finally installed on my windows machine after much appreciated help. The first thing I need to do to use this extension is create an fts index. Following the docs for this extension, I tr…

---

## [Is it possible to use Revise.jl to reload webserver on file save?](https://discourse.julialang.org/t/is-it-possible-to-use-revise-jl-to-reload-webserver-on-file-save/94866)

<div class="topic-metadata">

**Author:** [@zeroexcuses](https://discourse.julialang.org/u/zeroexcuses)\
**Replies:** 19\
**Last updated:** [August 13, 2024, 9:36am UTC](https://discourse.julialang.org/t/is-it-possible-to-use-revise-jl-to-reload-webserver-on-file-save/94866 "2024-08-13T09:36:15Z")

</div>

In Compile time: we can't find any impls for this multi dispatch fn? - #7 by zeroexcuses , I described a shell script which uses inotify to restart a webserver every time www/server.jl is modified. I was informed the “c…

---

## [Error starting Distributed in Linux and Julia 1.10.x](https://discourse.julialang.org/t/error-starting-distributed-in-linux-and-julia-1-10-x/115807)

<div class="topic-metadata">

**Author:** [@snowgum](https://discourse.julialang.org/u/snowgum)\
**Replies:** 7\
**Last updated:** [August 13, 2024, 8:09am UTC](https://discourse.julialang.org/t/error-starting-distributed-in-linux-and-julia-1-10-x/115807 "2024-08-13T08:09:23Z")

</div>

I am unable to use Distributed in Julia 1.10.x on a linux machine. Works fine on macOS ARM, so I am not sure if this is general enough to open an issue. It also works as expected using Julia 1.9.4 on the same machine. H…

---

## [Vector{NamedTuple} vs Vector{@NamedTuple}?](https://discourse.julialang.org/t/vector-namedtuple-vs-vector-namedtuple/118111)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 4\
**Last updated:** [August 13, 2024, 5:45am UTC](https://discourse.julialang.org/t/vector-namedtuple-vs-vector-namedtuple/118111 "2024-08-13T05:45:12Z")

</div>

How can I open my function method to work on all NamedTuples collected into a Vector? I don’t understand why this isn’t working. function multicall(f::Function, user\_inputs::Vector{NamedTuple}; kwargs...) out = \[\] …

---

## [Setindex for TSFrame from TSFrames.jl](https://discourse.julialang.org/t/setindex-for-tsframe-from-tsframes-jl/117948)

<div class="topic-metadata">

**Author:** [@EOhneberg](https://discourse.julialang.org/u/EOhneberg)\
**Replies:** 4\
**Last updated:** [August 13, 2024, 4:19am UTC](https://discourse.julialang.org/t/setindex-for-tsframe-from-tsframes-jl/117948 "2024-08-13T04:19:54Z")

</div>

Hi everyone, This is my first question so please let me know if I am doing something wrong. I used the TSFrames.jl package and ran into the following issue. I have a TSFrame of stock prices: tsf = DataFrame(timestamp…

---

## [The idea behind this generated function](https://discourse.julialang.org/t/the-idea-behind-this-generated-function/118095)

<div class="topic-metadata">

**Author:** [@mohamed.d180](https://discourse.julialang.org/u/mohamed.d180)\
**Replies:** 5\
**Last updated:** [August 12, 2024, 5:47pm UTC](https://discourse.julialang.org/t/the-idea-behind-this-generated-function/118095 "2024-08-12T17:47:51Z")

</div>

Inspecting the source code of ForwardDiff.jl) , we can found this function @generated function single\_seed(::Type{NTuple{N,V}}, ::Val{i}) where {N,V,i} ex = Expr(:tuple, \[ifelse(i === j, :(one(V)), :(zero(V))…

---

## [Find all files named "findthis.csv" in nested subfolders of "rootfolder"](https://discourse.julialang.org/t/find-all-files-named-findthis-csv-in-nested-subfolders-of-rootfolder/118096)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 8\
**Last updated:** [August 12, 2024, 5:40pm UTC](https://discourse.julialang.org/t/find-all-files-named-findthis-csv-in-nested-subfolders-of-rootfolder/118096 "2024-08-12T17:40:47Z")

</div>

I am trying to do what the title says and collect the file paths into a vector but having trouble. I would use find rootfolder -name findthis.csv in bash. readdir can only read one level deep, so I am trying to find a so…

---

## [Problem with first order BVProblem](https://discourse.julialang.org/t/problem-with-first-order-bvproblem/118073)

<div class="topic-metadata">

**Author:** [@Sh\_166](https://discourse.julialang.org/u/Sh_166)\
**Replies:** 3\
**Last updated:** [August 12, 2024, 2:20pm UTC](https://discourse.julialang.org/t/problem-with-first-order-bvproblem/118073 "2024-08-12T14:20:17Z")

</div>

I want to solve the following differential equation: \\frac{dv}{d\\xi} = 2 (\\frac{v}{\\xi}) \\frac{1-v^{2}}{1-v \\xi} \\frac{1}{(\\mu/c)^{2}-1} I have a boundary condition at the endpoint, v(\\xi\_{d}) = \\frac{\\xi\_{d}-c}{1-…

---

## [Julia is really powerful with LLMs](https://discourse.julialang.org/t/julia-is-really-powerful-with-llms/118091)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 0\
**Last updated:** [August 12, 2024, 12:28pm UTC](https://discourse.julialang.org/t/julia-is-really-powerful-with-llms/118091 "2024-08-12T12:28:51Z")

</div>

From the time I started to work with Sonnet 3.5. I feel like in Julia programming language the LLM is just was too skilled. I could even believe that due to the descriptive force of the julia and pythonish simplicity in…

---

## [Plot smile face](https://discourse.julialang.org/t/plot-smile-face/118089)

<div class="topic-metadata">

**Author:** [@khaledharizb](https://discourse.julialang.org/u/khaledharizb)\
**Replies:** 4\
**Last updated:** [August 12, 2024, 11:55am UTC](https://discourse.julialang.org/t/plot-smile-face/118089 "2024-08-12T11:55:41Z")

</div>

I tried to plot a smile face with julia, the code I’ve used as follows function face() t = range(0, 2pi, 200) r1=0.2; r2=0.5; R=1; y=\[0, 0\]' .+ hcat(R\*cos.(t),R\*sin.(t)) # big circle y1=\[-0.3, 0.3\]' .+ hcat(r1\*cos.(t),r…

---

## [Ray Tracing in a week-end - Julia vs SIMD-optimized C++](https://discourse.julialang.org/t/ray-tracing-in-a-week-end-julia-vs-simd-optimized-c/72958)

<div class="topic-metadata">

**Author:** [@claforte](https://discourse.julialang.org/u/claforte)\
**Replies:** 81\
**Last updated:** [August 9, 2024, 6:36pm UTC](https://discourse.julialang.org/t/ray-tracing-in-a-week-end-julia-vs-simd-optimized-c/72958 "2024-08-09T18:36:10Z")

</div>

Hi folks, As an exercise to learn how to optimize Julia code for performance, I adapted from C++ to Julia a popular raytracing “book” (Ray Tracing In One Weekend by Peter Shirley) into a Pluto.jl notebook. Hopefully thi…

---

## [TIFF image cannot be loaded, returned MethodError: no method matching size](https://discourse.julialang.org/t/tiff-image-cannot-be-loaded-returned-methoderror-no-method-matching-size/118024)

<div class="topic-metadata">

**Author:** [@jenkints](https://discourse.julialang.org/u/jenkints)\
**Replies:** 16\
**Last updated:** [August 12, 2024, 9:32am UTC](https://discourse.julialang.org/t/tiff-image-cannot-be-loaded-returned-methoderror-no-method-matching-size/118024 "2024-08-12T09:32:17Z")

</div>

Good day everyone, Thank you in advance for reading this. I am a Python user but I have to run a pipeline that was built using Julia. It’s here: github \[dot\] com \[slash\] kharchenkolab \[slash\] Baysor . I ran into an err…

---

## [Communicating across worker processes](https://discourse.julialang.org/t/communicating-across-worker-processes/118017)

<div class="topic-metadata">

**Author:** [@ndehngwa](https://discourse.julialang.org/u/ndehngwa)\
**Replies:** 2\
**Last updated:** [August 12, 2024, 5:30am UTC](https://discourse.julialang.org/t/communicating-across-worker-processes/118017 "2024-08-12T05:30:45Z")

</div>

Hello. I just got into julia and i could use some help. I am trying to create an application that listens for instructions form the command line and sends them to a worker process. The worker process performs some compu…

---

## [Catching or preventing sizeof ExceptionError when DataType doesn't have a specific size](https://discourse.julialang.org/t/catching-or-preventing-sizeof-exceptionerror-when-datatype-doesnt-have-a-specific-size/117983)

<div class="topic-metadata">

**Author:** [@zapiano](https://discourse.julialang.org/u/zapiano)\
**Replies:** 1\
**Last updated:** [August 12, 2024, 4:07am UTC](https://discourse.julialang.org/t/catching-or-preventing-sizeof-exceptionerror-when-datatype-doesnt-have-a-specific-size/117983 "2024-08-12T04:07:44Z")

</div>

When calling sizeof(T::DataType) with abstract types, an error is thrown (as mentioned here Essentials · The Julia Language). But calling it with String also throws an error. I have proposed a fix to a YAXArrays package…

---

## [Help diagnosing slow compilation](https://discourse.julialang.org/t/help-diagnosing-slow-compilation/117938)

<div class="topic-metadata">

**Author:** [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Replies:** 4\
**Last updated:** [August 12, 2024, 3:36am UTC](https://discourse.julialang.org/t/help-diagnosing-slow-compilation/117938 "2024-08-12T03:36:03Z")

</div>

I have a function that runs very fast but is slow to compile. I have tried using SnoopCompile functions @snoop\_inference and @snoop\_llvm, but they don’t seem to show where the large latency is residing. I’m new to comp…

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

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