# General Usage

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

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

**Page:** 481

---

## [Dedicated threads for handling requests to endpoints with HTTP.jl](https://discourse.julialang.org/t/dedicated-threads-for-handling-requests-to-endpoints-with-http-jl/76339)

<div class="topic-metadata">

**Author:** [@thazhemadam](https://discourse.julialang.org/u/thazhemadam)\
**Replies:** 3\
**Last updated:** [February 22, 2022, 7:47pm UTC](https://discourse.julialang.org/t/dedicated-threads-for-handling-requests-to-endpoints-with-http-jl/76339 "2022-02-22T19:47:23Z")

</div>

Say I’m running a HTTP.jl server, that serves two endpoints /one and /two. Requests to /one will start a computation-based task asynchronously and return a Response with a 200 status code. This task can be assumed to ta…

---

## [Help with runtest](https://discourse.julialang.org/t/help-with-runtest/76898)

<div class="topic-metadata">

**Author:** [@vinod](https://discourse.julialang.org/u/vinod)\
**Replies:** 7\
**Last updated:** [February 22, 2022, 7:24pm UTC](https://discourse.julialang.org/t/help-with-runtest/76898 "2022-02-22T19:24:25Z")

</div>

Hi I am new to julia and trying to create package. I am facing trouble with running the test cases and get the following error. Testing Running tests… ERROR: LoadError: ArgumentError: Package Test not found in curre…

---

## [How to check if a pid is currently running?](https://discourse.julialang.org/t/how-to-check-if-a-pid-is-currently-running/76908)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 7\
**Last updated:** [February 22, 2022, 6:27pm UTC](https://discourse.julialang.org/t/how-to-check-if-a-pid-is-currently-running/76908 "2022-02-22T18:27:39Z")

</div>

I want to confirm that a specific program is running. The other program can write its pid to a file, so I can read that. Is there an existing API (not platform specific) in Julia to confirm that a certain pid (or process…

---

## [Where to put a bunch of constants?](https://discourse.julialang.org/t/where-to-put-a-bunch-of-constants/76885)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 3\
**Last updated:** [February 22, 2022, 5:49pm UTC](https://discourse.julialang.org/t/where-to-put-a-bunch-of-constants/76885 "2022-02-22T17:49:07Z")

</div>

Hi everyone. I am developing a set of scripts for geophysics in Julia and at the core of many of my codes I have a bunch of values (maybe they can be consider Julia Constants at some point) but in general they are physi…

---

## [How to wrap a network I/O library? (i.e. how to teach libuv to yield)](https://discourse.julialang.org/t/how-to-wrap-a-network-i-o-library-i-e-how-to-teach-libuv-to-yield/76920)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 0\
**Last updated:** [February 22, 2022, 4:39pm UTC](https://discourse.julialang.org/t/how-to-wrap-a-network-i-o-library-i-e-how-to-teach-libuv-to-yield/76920 "2022-02-22T16:39:41Z")

</div>

from: I can vaguely understand the scheme, but concretely, what should I do, assuming I have these functions wrapped: function \_read!(ptr, fobj, nb, seekloc) @ccall lib.ReadAt(ptr::Ptr{UInt8}, …

---

## [Unitful and Plots, vector return types](https://discourse.julialang.org/t/unitful-and-plots-vector-return-types/76694)

<div class="topic-metadata">

**Author:** [@Asmund\_Hjulstad](https://discourse.julialang.org/u/Asmund_Hjulstad)\
**Replies:** 4\
**Last updated:** [February 22, 2022, 4:23pm UTC](https://discourse.julialang.org/t/unitful-and-plots-vector-return-types/76694 "2022-02-22T16:23:58Z")

</div>

The following behaviour surprised me: I would like to plot with data with units (Using Unitful), but it seems return type declarations causes something to break. Silly example: using Unitful, UnitfulRecipes, Plots fun…

---

## [Layouts of a plot and of the same in a subplot](https://discourse.julialang.org/t/layouts-of-a-plot-and-of-the-same-in-a-subplot/76901)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 2\
**Last updated:** [February 22, 2022, 3:10pm UTC](https://discourse.julialang.org/t/layouts-of-a-plot-and-of-the-same-in-a-subplot/76901 "2022-02-22T15:10:57Z")

</div>

Continuing the discussion from Plot size from subplots sizes ! The discussion was about the layout changes illustrated below. The first plot was good-looking, but the combination in subplots was not. A useful workarou…

---

## [How to group by multiple data types?](https://discourse.julialang.org/t/how-to-group-by-multiple-data-types/76872)

<div class="topic-metadata">

**Author:** [@a.frist](https://discourse.julialang.org/u/a.frist)\
**Replies:** 4\
**Last updated:** [February 22, 2022, 2:45pm UTC](https://discourse.julialang.org/t/how-to-group-by-multiple-data-types/76872 "2022-02-22T14:45:16Z")

</div>

Hello all, I’m a bit new to the Julia programming language and haven’t been able to find an answer that solves my problem. I have the following dataframe: 10×5 DataFrame Row │ DATE TOPIC\_I TOPIC\_J JOINT\_PROB …

---

## [How to create dll file from my julia code via PackageCompiler?](https://discourse.julialang.org/t/how-to-create-dll-file-from-my-julia-code-via-packagecompiler/76702)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 6\
**Last updated:** [February 21, 2022, 7:32pm UTC](https://discourse.julialang.org/t/how-to-create-dll-file-from-my-julia-code-via-packagecompiler/76702 "2022-02-21T19:32:38Z")

</div>

Dear @kristoffer.carlsson I am trying to practice creating a dll file of a simple code called sourceCode.jl defined as below: Base.@ccallable function test()::Cint return(2) end I have created a folder Projectfold…

---

## [Find in an array of custom structs if we have an element with a specific field value or not](https://discourse.julialang.org/t/find-in-an-array-of-custom-structs-if-we-have-an-element-with-a-specific-field-value-or-not/76850)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 4\
**Last updated:** [February 22, 2022, 12:51pm UTC](https://discourse.julialang.org/t/find-in-an-array-of-custom-structs-if-we-have-an-element-with-a-specific-field-value-or-not/76850 "2022-02-22T12:51:29Z")

</div>

Dear All, Is there a neat way to find whether, in an array of custom structs, we have an entry with a specific field value or not (outputs as true or false)? For example, consider the following example. I have a custom…

---

## [Code introspection](https://discourse.julialang.org/t/code-introspection/76734)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 4\
**Last updated:** [February 22, 2022, 9:29am UTC](https://discourse.julialang.org/t/code-introspection/76734 "2022-02-22T09:29:04Z")

</div>

Hi all, I’m working on a Julia terminal application implementing some of python’s awesome rich terminal library. Two of rich’s best features, in my opinion, are inspect which prints out details and methods about a pyth…

---

## [Set different tolerances for each variable when using ODE solvers](https://discourse.julialang.org/t/set-different-tolerances-for-each-variable-when-using-ode-solvers/76861)

<div class="topic-metadata">

**Author:** [@Yinmin\_Liu](https://discourse.julialang.org/u/Yinmin_Liu)\
**Replies:** 2\
**Last updated:** [February 22, 2022, 6:27am UTC](https://discourse.julialang.org/t/set-different-tolerances-for-each-variable-when-using-ode-solvers/76861 "2022-02-22T06:27:33Z")

</div>

I am trying to solve two coupled ODE systems together. In Python ODE solvers (SciPy), I can pass a list of tolerance values for each variable. How can I do the same thing in Julia solvers?

---

## [Getpwnam()?](https://discourse.julialang.org/t/getpwnam/31554)

<div class="topic-metadata">

**Author:** [@mleisher](https://discourse.julialang.org/u/mleisher)\
**Replies:** 13\
**Last updated:** [February 22, 2022, 3:31am UTC](https://discourse.julialang.org/t/getpwnam/31554 "2022-02-22T03:31:46Z")

</div>

Before I try to write one, does a julia version already exist?

---

## [Reading and processing multiple very large Wav files](https://discourse.julialang.org/t/reading-and-processing-multiple-very-large-wav-files/27158)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 10\
**Last updated:** [February 22, 2022, 2:30am UTC](https://discourse.julialang.org/t/reading-and-processing-multiple-very-large-wav-files/27158 "2022-02-22T02:30:33Z")

</div>

New job, new problems! :slight\_smile: I’m currently trying to figure out the best way to read a folder of very large WAV sound files and process them. Reading an entire file causes me to run out of memory. Thankfully, t…

---

## [How to efficiently calculate the Jacobian of the solution of a differential equation with respect to the initial conditions?](https://discourse.julialang.org/t/how-to-efficiently-calculate-the-jacobian-of-the-solution-of-a-differential-equation-with-respect-to-the-initial-conditions/76650)

<div class="topic-metadata">

**Author:** [@marcsgil](https://discourse.julialang.org/u/marcsgil)\
**Replies:** 1\
**Last updated:** [February 21, 2022, 9:44pm UTC](https://discourse.julialang.org/t/how-to-efficiently-calculate-the-jacobian-of-the-solution-of-a-differential-equation-with-respect-to-the-initial-conditions/76650 "2022-02-21T21:44:24Z")

</div>

I need to numerically perform an integral of the form \\int\_{0}^{t\_{max}} F \\left( \\mathbf{u}(t), \\frac{\\partial \\mathbf{u}(t)}{ \\partial \\mathbf{u}(0)} \\right) dt where F is a certain function, \\mathbf{u}(t) is the …

---

## [Reading versions of a package from unpacked registry tarball](https://discourse.julialang.org/t/reading-versions-of-a-package-from-unpacked-registry-tarball/76829)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 2\
**Last updated:** [February 21, 2022, 8:54pm UTC](https://discourse.julialang.org/t/reading-versions-of-a-package-from-unpacked-registry-tarball/76829 "2022-02-21T20:54:03Z")

</div>

With the old-style git clone registry, I could find the latest version of a package by reading the Versions.toml file in the unpacked registry directory structure: function latest\_version(pkgname::AbstractString) pa…

---

## [Using scratch space as a time-limited cache](https://discourse.julialang.org/t/using-scratch-space-as-a-time-limited-cache/76849)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 4\
**Last updated:** [February 21, 2022, 6:38pm UTC](https://discourse.julialang.org/t/using-scratch-space-as-a-time-limited-cache/76849 "2022-02-21T18:38:08Z")

</div>

I have a package (well, several really) which allow you to pull data from online repositories. They make my workflow easier so I tend to not actually store the data, I just repeatedly fetch it. However, this is suboptima…

---

## [Call Matlab inbuilt function from Julia](https://discourse.julialang.org/t/call-matlab-inbuilt-function-from-julia/76845)

<div class="topic-metadata">

**Author:** [@xspeng](https://discourse.julialang.org/u/xspeng)\
**Replies:** 2\
**Last updated:** [February 21, 2022, 3:44pm UTC](https://discourse.julialang.org/t/call-matlab-inbuilt-function-from-julia/76845 "2022-02-21T15:44:08Z")

</div>

Hi, there is a problem when I try to call the bayesopt function (inbuilt function) from Julia, here is a simple example, and it will give an error like follows. Unable to use a value of type table as an index. Error …

---

## [Pkg version list?](https://discourse.julialang.org/t/pkg-version-list/1257)

<div class="topic-metadata">

**Author:** [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Replies:** 9\
**Last updated:** [February 21, 2022, 2:28pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257 "2022-02-21T14:28:01Z")

</div>

Is there a way to get a list of available versions of a package? I’m trying to get ahead on updating my code for Julia 0.6 but a package my code depends on, DataFrames, doesn’t work in 0.6 when I simply use Pkg.add; it …

---

## [Unitful one(T) = 1.0 (without units). What is the alternative?](https://discourse.julialang.org/t/unitful-one-t-1-0-without-units-what-is-the-alternative/71024)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 1\
**Last updated:** [November 5, 2021, 7:19pm UTC](https://discourse.julialang.org/t/unitful-one-t-1-0-without-units-what-is-the-alternative/71024 "2021-11-05T19:19:01Z")

</div>

Basically: julia\> using Unitful julia\> x = 1.0u"nm" 1.0 nm julia\> zero(typeof(x)) 0.0 nm julia\> one(typeof(x)) 1.0 julia\> Why one(typeof(x)) is not 1.0 nm? And which is the alternative to using one for unit propaga…

---

## [Cannot use any package after self-compiled Julia v1.7 distributed](https://discourse.julialang.org/t/cannot-use-any-package-after-self-compiled-julia-v1-7-distributed/76833)

<div class="topic-metadata">

**Author:** [@Jieyi\_Xiong](https://discourse.julialang.org/u/Jieyi_Xiong)\
**Replies:** 13\
**Last updated:** [February 21, 2022, 2:07pm UTC](https://discourse.julialang.org/t/cannot-use-any-package-after-self-compiled-julia-v1-7-distributed/76833 "2022-02-21T14:07:08Z")

</div>

I use two Linux servers. Although the two servers are not exactly identical, I can still compile Julia v1.6.x in one server and copy the usr/ to another server, and Julia works fine in both machines (I do it because Juli…

---

## [CSV doesn't compile Julia 1.7.2](https://discourse.julialang.org/t/csv-doesnt-compile-julia-1-7-2/76826)

<div class="topic-metadata">

**Author:** [@scotttbecker](https://discourse.julialang.org/u/scotttbecker)\
**Replies:** 6\
**Last updated:** [February 21, 2022, 10:31am UTC](https://discourse.julialang.org/t/csv-doesnt-compile-julia-1-7-2/76826 "2022-02-21T10:31:17Z")

</div>

I have tried several different methods of getting CSV to compile. I have followed the complete wipe instructions and I am still encountering the same problem. I have a Dell XPS 17 9710 running Windows 11. The log follows…

---

## [@track things. HOWTO: Is it possible to create global scope variable from local scope (function)](https://discourse.julialang.org/t/track-things-howto-is-it-possible-to-create-global-scope-variable-from-local-scope-function/76814)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 7\
**Last updated:** [February 21, 2022, 7:53am UTC](https://discourse.julialang.org/t/track-things-howto-is-it-possible-to-create-global-scope-variable-from-local-scope-function/76814 "2022-02-21T07:53:45Z")

</div>

Hey Julianners, I want something like this: function fn(m) # very compley function... and "m" would be a complex shit... that is hard to print @track modelsss m\[1\]=4+9 # mimicing a possible case # ex.: using m\[1…

---

## [How to desctructure a namedtuple and declare the variables to be constants using the new destructuring syntax?](https://discourse.julialang.org/t/how-to-desctructure-a-namedtuple-and-declare-the-variables-to-be-constants-using-the-new-destructuring-syntax/76830)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [February 21, 2022, 6:15am UTC](https://discourse.julialang.org/t/how-to-desctructure-a-namedtuple-and-declare-the-variables-to-be-constants-using-the-new-destructuring-syntax/76830 "2022-02-21T06:15:12Z")

</div>

julia\> const nt = (; a = 1) (a = 1,) julia\> const a\_ = nt.a 1 This defines a\_ as a constant. Now julia v1.7 has introduced the new destructuring syntax julia\> (; a) = nt (a = 1,) Is there any way to use this syntax a…

---

## [This post claims that Julia is still 4-5 times slower than cython](https://discourse.julialang.org/t/this-post-claims-that-julia-is-still-4-5-times-slower-than-cython/76735)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 38\
**Last updated:** [February 21, 2022, 1:56am UTC](https://discourse.julialang.org/t/this-post-claims-that-julia-is-still-4-5-times-slower-than-cython/76735 "2022-02-21T01:56:46Z")

</div>

https://jochenschroeder.com/blog/articles/DSP\_with\_Python2/ Just posting here in case anyone’s interested in having a look.

---

## [How is it possible to show "links/alingments" between 2 sets of points using PGFPlotsX.jl?](https://discourse.julialang.org/t/how-is-it-possible-to-show-links-alingments-between-2-sets-of-points-using-pgfplotsx-jl/76776)

<div class="topic-metadata">

**Author:** [@kadir-gunel](https://discourse.julialang.org/u/kadir-gunel)\
**Replies:** 1\
**Last updated:** [February 20, 2022, 11:36am UTC](https://discourse.julialang.org/t/how-is-it-possible-to-show-links-alingments-between-2-sets-of-points-using-pgfplotsx-jl/76776 "2022-02-20T11:36:42Z")

</div>

I am working on point cloud alignment model and want to show the initial alignment vs the final alignment on a 2d dataset. I also want to show the alignment between point pairs just for curiosity. For demonstration purp…

---

## [Is there a good implementation of a BiDict (invertable Dict)](https://discourse.julialang.org/t/is-there-a-good-implementation-of-a-bidict-invertable-dict/76789)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 2\
**Last updated:** [February 20, 2022, 10:33am UTC](https://discourse.julialang.org/t/is-there-a-good-implementation-of-a-bidict-invertable-dict/76789 "2022-02-20T10:33:43Z")

</div>

I need a lookup table that works in both directions for saving and loading a custom file. Therefore I thought a dictionary that also used the values as keys might be handy. Is there a good implementation for this? My …

---

## [Cross join DataFrames](https://discourse.julialang.org/t/cross-join-dataframes/76787)

<div class="topic-metadata">

**Author:** [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Replies:** 1\
**Last updated:** [February 20, 2022, 9:13am UTC](https://discourse.julialang.org/t/cross-join-dataframes/76787 "2022-02-20T09:13:40Z")

</div>

How can I cross join two dataframes A and B? In other words, combine every row in A with every row in B? I prefer not to do tricks like adding temporary columns.

---

## ["Assignment form" function definition following \`for\` keyword](https://discourse.julialang.org/t/assignment-form-function-definition-following-for-keyword/76786)

<div class="topic-metadata">

**Author:** [@Hiroharu\_Sugawara](https://discourse.julialang.org/u/Hiroharu_Sugawara)\
**Replies:** 3\
**Last updated:** [February 20, 2022, 9:07am UTC](https://discourse.julialang.org/t/assignment-form-function-definition-following-for-keyword/76786 "2022-02-20T09:07:44Z")

</div>

Hi folks. I find it weird that the following code works: julia\> begin for f(x)=2 @show f(1) @show typeof(f) end end f(1) = 2 typeof(f) = var"#f#1"{Int64} I su…

---

## [Drawing a surface boundary around scattered points](https://discourse.julialang.org/t/drawing-a-surface-boundary-around-scattered-points/76785)

<div class="topic-metadata">

**Author:** [@gojira](https://discourse.julialang.org/u/gojira)\
**Replies:** 3\
**Last updated:** [February 20, 2022, 7:43am UTC](https://discourse.julialang.org/t/drawing-a-surface-boundary-around-scattered-points/76785 "2022-02-20T07:43:40Z")

</div>

I was wondering if there was a way to collect all of the boundary points to a 3D scatter plot? All of the points are generated randomly. I guess more specifically if I have a structure that has a field with 100 data poin…

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

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