# General Usage

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

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

**Page:** 183

---

## [Tagbot is not triggered](https://discourse.julialang.org/t/tagbot-is-not-triggered/112136)

<div class="topic-metadata">

**Author:** [@charlesll](https://discourse.julialang.org/u/charlesll)\
**Replies:** 7\
**Last updated:** [April 4, 2024, 8:51am UTC](https://discourse.julialang.org/t/tagbot-is-not-triggered/112136 "2024-04-04T08:51:13Z")

</div>

Hi, I am attempting to produce a new version of my package, Spectra, after a few years of silence as it is mostly stable. The repo is visible here: However, the process of publishing new versions changed quite a lot …

---

## [Using numpy array in the function that calculates residuals in DAEProblem (diffeqpy)](https://discourse.julialang.org/t/using-numpy-array-in-the-function-that-calculates-residuals-in-daeproblem-diffeqpy/112450)

<div class="topic-metadata">

**Author:** [@anjali](https://discourse.julialang.org/u/anjali)\
**Replies:** 1\
**Last updated:** [April 4, 2024, 8:32am UTC](https://discourse.julialang.org/t/using-numpy-array-in-the-function-that-calculates-residuals-in-daeproblem-diffeqpy/112450 "2024-04-04T08:32:36Z")

</div>

I am trying to use diffeqpy to use DAESolver from my python code. The following code works: # the residual calculation function def f(du, u, p, t): resid1 = -0.04 \* u\[0\] + 1e4 \* u\[1\] \* u\[2\] - du\[0\] resid2 = +0.…

---

## [Possible to know if a certain method supports a certain keyword?](https://discourse.julialang.org/t/possible-to-know-if-a-certain-method-supports-a-certain-keyword/112498)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [April 4, 2024, 8:22am UTC](https://discourse.julialang.org/t/possible-to-know-if-a-certain-method-supports-a-certain-keyword/112498 "2024-04-04T08:22:18Z")

</div>

Is it possible to know if a certain method supports a certain keyword argument, or one has to use exceptions?

---

## [Using Luxor.Table to visualize Julia 2D matrix results in transposed view](https://discourse.julialang.org/t/using-luxor-table-to-visualize-julia-2d-matrix-results-in-transposed-view/112484)

<div class="topic-metadata">

**Author:** [@Julia2001](https://discourse.julialang.org/u/Julia2001)\
**Replies:** 1\
**Last updated:** [April 4, 2024, 7:34am UTC](https://discourse.julialang.org/t/using-luxor-table-to-visualize-julia-2d-matrix-results-in-transposed-view/112484 "2024-04-04T07:34:55Z")

</div>

Hi, I’m stumbling across the fact that Luxor.Table looks row-major but Julia matrices are column-major. How can I “swap” dimension indices between source matrix read access and Luxor.Table write access? using Luxor wi…

---

## [Names that are not exported from a package can also be imported into another project](https://discourse.julialang.org/t/names-that-are-not-exported-from-a-package-can-also-be-imported-into-another-project/112424)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 19\
**Last updated:** [April 4, 2024, 5:47am UTC](https://discourse.julialang.org/t/names-that-are-not-exported-from-a-package-can-also-be-imported-into-another-project/112424 "2024-04-04T05:47:05Z")

</div>

I’m encountered with a fairly strange circumstance where the names that are not exported from a package can also be imported into another project environment. Detail: There is a package named MyPkg that is just in devel…

---

## [Defining methods without binding variables](https://discourse.julialang.org/t/defining-methods-without-binding-variables/112485)

<div class="topic-metadata">

**Author:** [@awasserman](https://discourse.julialang.org/u/awasserman)\
**Replies:** 2\
**Last updated:** [April 4, 2024, 4:48am UTC](https://discourse.julialang.org/t/defining-methods-without-binding-variables/112485 "2024-04-04T04:48:24Z")

</div>

I’ve seen many examples of Julia code where methods are defined without any variable name bindings. My usage of terminology my be inaccurate here, but for example: eltype(::Type{\<:AbstractArray{T}}) where {T} = T As f…

---

## [Artifacts: Can basic authentication be used?](https://discourse.julialang.org/t/artifacts-can-basic-authentication-be-used/54453)

<div class="topic-metadata">

**Author:** [@Erik\_Engheim](https://discourse.julialang.org/u/Erik_Engheim)\
**Replies:** 4\
**Last updated:** [April 4, 2024, 12:34am UTC](https://discourse.julialang.org/t/artifacts-can-basic-authentication-be-used/54453 "2024-04-04T00:34:40Z")

</div>

I am using the Julia Artifacts system and setting up a Artifacts.toml file where the binaries are for internal private usage. We are using something like JFrog Artifactory, where one typically does Basic authentication u…

---

## [Macros: Mutate input expressions or not?](https://discourse.julialang.org/t/macros-mutate-input-expressions-or-not/112495)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 0\
**Last updated:** [April 3, 2024, 11:45pm UTC](https://discourse.julialang.org/t/macros-mutate-input-expressions-or-not/112495 "2024-04-03T23:45:43Z")

</div>

Is there any advice on whether it’s ok to mutate the input expressions to a macro? Is it better practice to create new Expr objects? What are the pros and cons of mutating or not mutating? Below is a simple example with…

---

## [Approximate string matching for two lists of names in Julia](https://discourse.julialang.org/t/approximate-string-matching-for-two-lists-of-names-in-julia/112448)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 8\
**Last updated:** [April 3, 2024, 10:29pm UTC](https://discourse.julialang.org/t/approximate-string-matching-for-two-lists-of-names-in-julia/112448 "2024-04-03T22:29:23Z")

</div>

I have two lists of names that are approximately similar. So I wanted to figure out the best way to find the matches. For example, some sample data, the lists might look like: list1 = \["Colby, James"; "Arnoldson, Robert…

---

## [How to make a line break and empty line in Literate.jl?](https://discourse.julialang.org/t/how-to-make-a-line-break-and-empty-line-in-literate-jl/112462)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 9\
**Last updated:** [April 3, 2024, 3:50pm UTC](https://discourse.julialang.org/t/how-to-make-a-line-break-and-empty-line-in-literate-jl/112462 "2024-04-03T15:50:51Z")

</div>

How to make a line break and blank line in Literate.jl (separately)? For some reason it differs from the methods used in typical Markdown. Simple question, but it breaks my mind.

---

## [Code compiled with PackageCompiler allocates more](https://discourse.julialang.org/t/code-compiled-with-packagecompiler-allocates-more/112470)

<div class="topic-metadata">

**Author:** [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)\
**Replies:** 0\
**Last updated:** [April 3, 2024, 12:55pm UTC](https://discourse.julialang.org/t/code-compiled-with-packagecompiler-allocates-more/112470 "2024-04-03T12:55:46Z")

</div>

If I compile some code with PackageCompiler and then run julia\> v = \[1,2,3,4\]; julia\> q = view(v,1:2); julia\> @time collect(q); 0.000108 seconds (33 allocations: 1008 bytes) while if I do the same in the standard Jul…

---

## [StaticTools](https://discourse.julialang.org/t/statictools/112456)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 2\
**Last updated:** [April 3, 2024, 12:09pm UTC](https://discourse.julialang.org/t/statictools/112456 "2024-04-03T12:09:06Z")

</div>

Hi, First: I am very much looking forward to StaticCompiler.jl on Windows, I will be putting it to good use! I understand it’s early days, but I wanted to try out StaticTools.jl to get a feel for the “static dialect”. …

---

## [Why can I \`deepcopy(nothing)\` but not \`copy(nothing)\`?](https://discourse.julialang.org/t/why-can-i-deepcopy-nothing-but-not-copy-nothing/112429)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 5\
**Last updated:** [April 3, 2024, 6:11am UTC](https://discourse.julialang.org/t/why-can-i-deepcopy-nothing-but-not-copy-nothing/112429 "2024-04-03T06:11:47Z")

</div>

I know it sounds silly but it is currently blocking an AD package of mine ^^ julia\> deepcopy(nothing) julia\> copy(nothing) ERROR: MethodError: no method matching copy(::Nothing)

---

## [@async macro not recommended?](https://discourse.julialang.org/t/async-macro-not-recommended/112404)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 5\
**Last updated:** [April 3, 2024, 5:57am UTC](https://discourse.julialang.org/t/async-macro-not-recommended/112404 "2024-04-03T05:57:30Z")

</div>

According to the documentation: It is strongly encouraged to favor Threads.@spawn over @async always even when no parallelism is required especially in publicly distributed libraries. This is because a use of @async di…

---

## [How does io redirection work with tasks?](https://discourse.julialang.org/t/how-does-io-redirection-work-with-tasks/112405)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 2\
**Last updated:** [April 2, 2024, 11:56pm UTC](https://discourse.julialang.org/t/how-does-io-redirection-work-with-tasks/112405 "2024-04-02T23:56:28Z")

</div>

I don’t understand this simple MWE: julia\> redirect\_stdio(;stdout = devnull) do @async println("hello") @async redirect\_io(; stdout = devnull) do println("hey") end …

---

## [How to convert bytes to \`BitVector\`?](https://discourse.julialang.org/t/how-to-convert-bytes-to-bitvector/112440)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 1\
**Last updated:** [April 2, 2024, 8:21pm UTC](https://discourse.julialang.org/t/how-to-convert-bytes-to-bitvector/112440 "2024-04-02T20:21:13Z")

</div>

I’m handed some bytes by a file format, and each bit represent a Bool – now, I know a little bit about how our BitVector works, so I have some snippet that’s quite fragile: total\_num\_elements = ... # pad to near…

---

## [Multi-threading packages - preferences, use cases. recommendations?](https://discourse.julialang.org/t/multi-threading-packages-preferences-use-cases-recommendations/112436)

<div class="topic-metadata">

**Author:** [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Replies:** 2\
**Last updated:** [April 2, 2024, 7:19pm UTC](https://discourse.julialang.org/t/multi-threading-packages-preferences-use-cases-recommendations/112436 "2024-04-02T19:19:48Z")

</div>

I have so far not specifically needed to multi-thread any of my code. I have, out of curiosity, tossed the odd @threads in front of one or two for loops to see if it made enough of a difference to bother, but the calcula…

---

## [Quick way to reinterpret this?](https://discourse.julialang.org/t/quick-way-to-reinterpret-this/112432)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [April 2, 2024, 5:56pm UTC](https://discourse.julialang.org/t/quick-way-to-reinterpret-this/112432 "2024-04-02T17:56:36Z")

</div>

Hello! When reading from a .h5 file, where I have saved some position value as SVector{3,Float64} I get this: julia\> data\["Position"\] 3027-element Vector{@NamedTuple{data::@NamedTuple{1::Float64, 2::Float64, 3::Float64…

---

## [Multiple Worker Processes with Different Numbers of Threads](https://discourse.julialang.org/t/multiple-worker-processes-with-different-numbers-of-threads/112428)

<div class="topic-metadata">

**Author:** [@mikel8](https://discourse.julialang.org/u/mikel8)\
**Replies:** 2\
**Last updated:** [April 2, 2024, 5:02pm UTC](https://discourse.julialang.org/t/multiple-worker-processes-with-different-numbers-of-threads/112428 "2024-04-02T17:02:33Z")

</div>

Hi all, I’m trying to write a program which needs to solve three large problems and about 50 small problems in parallel. I’m planning to create workers for each process, but need 8 threads for the large problems and one…

---

## [Saving and updating in-memory HDF5 files?](https://discourse.julialang.org/t/saving-and-updating-in-memory-hdf5-files/112395)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [April 2, 2024, 4:52pm UTC](https://discourse.julialang.org/t/saving-and-updating-in-memory-hdf5-files/112395 "2024-04-02T16:52:46Z")

</div>

Hello! Reading the documentation of HDF5.jl (Home · HDF5.jl) I see how it is possible to have an in-memory hdf5 file. I was wondering if; Can I update a dataset in an hdf in place? Can I save a copy of the current in-…

---

## [How to log with ETW in Julia](https://discourse.julialang.org/t/how-to-log-with-etw-in-julia/112420)

<div class="topic-metadata">

**Author:** [@SunnyUser](https://discourse.julialang.org/u/SunnyUser)\
**Replies:** 1\
**Last updated:** [April 2, 2024, 3:11pm UTC](https://discourse.julialang.org/t/how-to-log-with-etw-in-julia/112420 "2024-04-02T15:11:05Z")

</div>

Hi all :slight\_smile: I need to write some ETW (Event Tracing for Windows) events where the Julia app is the event source (event provider). Is there already a pkg that can do that? Or is there a ccalable lib that I can …

---

## [Turing.jl is not working](https://discourse.julialang.org/t/turing-jl-is-not-working/112410)

<div class="topic-metadata">

**Author:** [@Sourish](https://discourse.julialang.org/u/Sourish)\
**Replies:** 2\
**Last updated:** [April 2, 2024, 1:10pm UTC](https://discourse.julialang.org/t/turing-jl-is-not-working/112410 "2024-04-02T13:10:43Z")

</div>

I worked with Turing.jl and it worked nicely. But currently, it has stopped working. Even for a simple toy example from Turing website like # Import packages. using Turing using StatsPlots # Define a simple Normal mode…

---

## [Dataframe recalculation and plot](https://discourse.julialang.org/t/dataframe-recalculation-and-plot/112412)

<div class="topic-metadata">

**Author:** [@Stephen](https://discourse.julialang.org/u/Stephen)\
**Replies:** 0\
**Last updated:** [April 2, 2024, 11:11am UTC](https://discourse.julialang.org/t/dataframe-recalculation-and-plot/112412 "2024-04-02T11:11:24Z")

</div>

using XLSX, DataFrames, PlotlyJS, Dates, Statistics df = coalesce.(DataFrame(XLSX.readtable("台湾.xlsx","财政税收")), 0.0) # coalesce将missing替换为浮点数0.0 ########### # 各项税收 ########### scatter\_data = GenericTrace{Dict{Symbol,…

---

## [Does norm() allocate?](https://discourse.julialang.org/t/does-norm-allocate/112407)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [April 2, 2024, 9:51am UTC](https://discourse.julialang.org/t/does-norm-allocate/112407 "2024-04-02T09:51:46Z")

</div>

I have the following code: using KiteModels, StaticArrays, LinearAlgebra, BenchmarkTools function test(vec) KiteModels.norm(vec) end vec=MVector{3}(\[1.0,2,3\]) test(vec) bytes=@allocated test(vec) println("Allocate …

---

## [Indexable set data structure](https://discourse.julialang.org/t/indexable-set-data-structure/112287)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 8\
**Last updated:** [April 2, 2024, 9:25am UTC](https://discourse.julialang.org/t/indexable-set-data-structure/112287 "2024-04-02T09:25:12Z")

</div>

I’m looking for a data structure that I’m sure must have already been invented and implemented, but which I can’t find (probably because I don’t know its canonical name). The data structure I have in mind shares some pr…

---

## [Can \`π\` be used as a general variable name?](https://discourse.julialang.org/t/can-be-used-as-a-general-variable-name/112400)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 5\
**Last updated:** [April 2, 2024, 7:02am UTC](https://discourse.julialang.org/t/can-be-used-as-a-general-variable-name/112400 "2024-04-02T07:02:19Z")

</div>

julia\> π = 1 ERROR: cannot assign a value to imported variable MathConstants.π from module Main I know π is the circular constant, but is it always a reserved variable in Julia? Can I borrow it temporarily?

---

## [Lazy vcat of matrices just before multiplication](https://discourse.julialang.org/t/lazy-vcat-of-matrices-just-before-multiplication/112387)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 3\
**Last updated:** [April 2, 2024, 5:16am UTC](https://discourse.julialang.org/t/lazy-vcat-of-matrices-just-before-multiplication/112387 "2024-04-02T05:16:11Z")

</div>

Dear All, I am implementing neural network for hyper-multigraph (this is not a joke, the graph has multiple types of edges of arities higher than 3). This is “fairly” straightforward extension of the Mill.jl framework. …

---

## [Using ForwardDiff.jl with BlockDiagonals.jl](https://discourse.julialang.org/t/using-forwarddiff-jl-with-blockdiagonals-jl/112396)

<div class="topic-metadata">

**Author:** [@Mizu49](https://discourse.julialang.org/u/Mizu49)\
**Replies:** 1\
**Last updated:** [April 2, 2024, 4:58am UTC](https://discourse.julialang.org/t/using-forwarddiff-jl-with-blockdiagonals-jl/112396 "2024-04-02T04:58:17Z")

</div>

I want to calcuate the jacobian for a vector calculated with the following function. function test(A1, A2, x) A = BlockDiagonal(\[A1 \* x, A2\]) return A \* vcat(x, x) end However, when I calculate the jacobi…

---

## [Testing docs locally with Documenter.jl](https://discourse.julialang.org/t/testing-docs-locally-with-documenter-jl/112371)

<div class="topic-metadata">

**Author:** [@garrek](https://discourse.julialang.org/u/garrek)\
**Replies:** 9\
**Last updated:** [April 2, 2024, 4:22am UTC](https://discourse.julialang.org/t/testing-docs-locally-with-documenter-jl/112371 "2024-04-02T04:22:34Z")

</div>

I’m using Documenter.jl to build my docs for a package. I have a new version of my package on a test branch and I want to build the docs locally. I try to dev the local version of the package (on the test branch) but ev…

---

## [Package dependencies](https://discourse.julialang.org/t/package-dependencies/112393)

<div class="topic-metadata">

**Author:** [@lancejnelson](https://discourse.julialang.org/u/lancejnelson)\
**Replies:** 2\
**Last updated:** [April 2, 2024, 2:41am UTC](https://discourse.julialang.org/t/package-dependencies/112393 "2024-04-02T02:41:36Z")

</div>

Currently trying to understand packages and dependencies. I’ve created a package that just holds type definitions, made the git repo and done all of the setup. Now I’m creating a second package that will need access to …

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

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