# General Usage

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

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

**Page:** 577

---

## [New Documenter failure on deployed docs](https://discourse.julialang.org/t/new-documenter-failure-on-deployed-docs/64437)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 1\
**Last updated:** [July 12, 2021, 4:23pm UTC](https://discourse.julialang.org/t/new-documenter-failure-on-deployed-docs/64437 "2021-07-12T16:23:44Z")

</div>

After pushing a small change and tagging a new version of PSSFSS, Documenter is failing to run properly on the deployed documentation, though it works flawlessly on my local machine. When I look at the log file at https…

---

## [Using a AbstractUnitRange inside a struct](https://discourse.julialang.org/t/using-a-abstractunitrange-inside-a-struct/64463)

<div class="topic-metadata">

**Author:** [@Josa9321](https://discourse.julialang.org/u/Josa9321)\
**Replies:** 10\
**Last updated:** [July 12, 2021, 3:24pm UTC](https://discourse.julialang.org/t/using-a-abstractunitrange-inside-a-struct/64463 "2021-07-12T15:24:41Z")

</div>

I want to use this struct: struct Instance\_RH{P \<: AbstractFloat, Q \<: AbstractUnitRange} cost::Array{P, 2} time\_by\_quantity::Array{P, 2} penalty\_by\_multitask::Array{P, 1} maximum\_budget::P I::Q …

---

## [Packageswith function/](https://discourse.julialang.org/t/packageswith-function/64485)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 2\
**Last updated:** [July 12, 2021, 2:22pm UTC](https://discourse.julialang.org/t/packageswith-function/64485 "2021-07-12T14:22:57Z")

</div>

Is there a way to know which registered packages depend on a specific one? e.g. \] packageswith Luxor So I can see if some additional functionality is implemented in another package that uses Luxor.

---

## [VSCode - Displaying custom structs](https://discourse.julialang.org/t/vscode-displaying-custom-structs/64500)

<div class="topic-metadata">

**Author:** [@mrVeng](https://discourse.julialang.org/u/mrVeng)\
**Replies:** 1\
**Last updated:** [July 12, 2021, 2:07pm UTC](https://discourse.julialang.org/t/vscode-displaying-custom-structs/64500 "2021-07-12T14:07:36Z")

</div>

Hi there! I normally use Atom, but come back to VSCode from time to time to check out the progress of the VSCode team - Thank you for your time and work! I was wondering if there is a method to display a custom struct …

---

## [Struct field name validate](https://discourse.julialang.org/t/struct-field-name-validate/64499)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [July 12, 2021, 12:35pm UTC](https://discourse.julialang.org/t/struct-field-name-validate/64499 "2021-07-12T12:35:57Z")

</div>

Hellow! I am looking for a reliable method to validate structure field names. Structure code is generated based on user input. I think about eval(), but… x = :else exp = :($x = "Oops!"; print($x)) eval(exp) # -\> Oops…

---

## [Expression bug?](https://discourse.julialang.org/t/expression-bug/64495)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 0\
**Last updated:** [July 12, 2021, 10:06am UTC](https://discourse.julialang.org/t/expression-bug/64495 "2021-07-12T10:06:45Z")

</div>

Hellow! I use Julia 1.6.1 x = :foo; :(struct Bar $x::Any end) # -\> struct Bar $ x::Any end # Bug? :(struct Bar $x::Any end) # -\> struct Bar foo::Any end # This is ok

---

## [Implementing singletons for configuration variables](https://discourse.julialang.org/t/implementing-singletons-for-configuration-variables/62177)

<div class="topic-metadata">

**Author:** [@sapo](https://discourse.julialang.org/u/sapo)\
**Replies:** 7\
**Last updated:** [July 12, 2021, 8:39am UTC](https://discourse.julialang.org/t/implementing-singletons-for-configuration-variables/62177 "2021-07-12T08:39:39Z")

</div>

Hello, I am used to having an object containing configuration variables for my project. For instance, in Java, I use static singletons to ensure those configuration variables are instantiated only once for the whole li…

---

## [Revise and const values changed during a session?](https://discourse.julialang.org/t/revise-and-const-values-changed-during-a-session/64372)

<div class="topic-metadata">

**Author:** [@sapo](https://discourse.julialang.org/u/sapo)\
**Replies:** 2\
**Last updated:** [July 12, 2021, 8:38am UTC](https://discourse.julialang.org/t/revise-and-const-values-changed-during-a-session/64372 "2021-07-12T08:38:03Z")

</div>

Until now, I was used to having a file containing a module with some parameters, usually set with const keyword. This is very similar to a singleton - the design pattern, not the Julian singleton - and guarantees that an…

---

## [What's the strategy for marking a broken test that you expect to throw when it's not broken?](https://discourse.julialang.org/t/whats-the-strategy-for-marking-a-broken-test-that-you-expect-to-throw-when-its-not-broken/64385)

<div class="topic-metadata">

**Author:** [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Replies:** 4\
**Last updated:** [July 12, 2021, 1:47am UTC](https://discourse.julialang.org/t/whats-the-strategy-for-marking-a-broken-test-that-you-expect-to-throw-when-its-not-broken/64385 "2021-07-12T01:47:13Z")

</div>

I have a function that should be throwing an exception, but currently it’s not. I want to indicate that the not-throwing behavior is broken. I tried this, but it doesn’t work, because the @test\_throws records its failur…

---

## [What is meaning of M1, rpath?](https://discourse.julialang.org/t/what-is-meaning-of-m1-rpath/64452)

<div class="topic-metadata">

**Author:** [@Ravinder\_Ram](https://discourse.julialang.org/u/Ravinder_Ram)\
**Replies:** 4\
**Last updated:** [July 11, 2021, 5:08pm UTC](https://discourse.julialang.org/t/what-is-meaning-of-m1-rpath/64452 "2021-07-11T17:08:35Z")

</div>

---

## [Support \`@threads\` for a lazy object](https://discourse.julialang.org/t/support-threads-for-a-lazy-object/64458)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 0\
**Last updated:** [July 11, 2021, 11:39am UTC](https://discourse.julialang.org/t/support-threads-for-a-lazy-object/64458 "2021-07-11T11:39:01Z")

</div>

Say I have a big LazyArray with size 10^5 and the underlying structure is that every 5000 entries are in a “chunk” and one has to read and decompress a chunk together. I have implemented getindex() for LazyArray and it …

---

## [Increase performance in string comparison with sub-dataframes or sub-arrays](https://discourse.julialang.org/t/increase-performance-in-string-comparison-with-sub-dataframes-or-sub-arrays/64392)

<div class="topic-metadata">

**Author:** [@bojusemo](https://discourse.julialang.org/u/bojusemo)\
**Replies:** 5\
**Last updated:** [July 11, 2021, 10:30am UTC](https://discourse.julialang.org/t/increase-performance-in-string-comparison-with-sub-dataframes-or-sub-arrays/64392 "2021-07-11T10:30:14Z")

</div>

Hello, I am new at programming and hope you guys can give me a hand, please. I have three plain text files with columns called ID\_# File a Header Header Header Header Header ID\_1 ID\_5 ID\_6 ID\_7 ID\_8 File b ID\_…

---

## [Unable to install or update package](https://discourse.julialang.org/t/unable-to-install-or-update-package/64153)

<div class="topic-metadata">

**Author:** [@RolfSand](https://discourse.julialang.org/u/RolfSand)\
**Replies:** 10\
**Last updated:** [July 11, 2021, 6:40am UTC](https://discourse.julialang.org/t/unable-to-install-or-update-package/64153 "2021-07-11T06:40:02Z")

</div>

I receive the following error: ERROR: expected package IJulia \[7073ff75\] to be registered

---

## [How do use Hyperopt.jl's Bayesian Hyperparameter Optimization feature?](https://discourse.julialang.org/t/how-do-use-hyperopt-jls-bayesian-hyperparameter-optimization-feature/64447)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 3\
**Last updated:** [July 11, 2021, 6:19am UTC](https://discourse.julialang.org/t/how-do-use-hyperopt-jls-bayesian-hyperparameter-optimization-feature/64447 "2021-07-11T06:19:21Z")

</div>

The package says it has Bayesian Optimization but I can’t find much info on how to use it. Does it go by some other name?

---

## [Why is this @vlplot blank?](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 5\
**Last updated:** [July 11, 2021, 5:40am UTC](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369 "2021-07-11T05:40:34Z")

</div>

I use this command: DataFramesMeta.@select(@where(dftrans, .! ismissing.(:PreScore) .& .! ismissing.(:Group)), :Group,PreScore = Float64.(:PreScore)) |\> @vlplot(mark={:area, fillOpacity=.5},x={"PreScore:q",scale={domain…

---

## [String interpolation in markdown admonition in Pluto](https://discourse.julialang.org/t/string-interpolation-in-markdown-admonition-in-pluto/63795)

<div class="topic-metadata">

**Author:** [@dpkwhan](https://discourse.julialang.org/u/dpkwhan)\
**Replies:** 2\
**Last updated:** [July 11, 2021, 2:41am UTC](https://discourse.julialang.org/t/string-interpolation-in-markdown-admonition-in-pluto/63795 "2021-07-11T02:41:43Z")

</div>

In Pluto, the following code snippet fails to properly interpolate the values. How to fix it? begin todo\_index = 3 md""" !!! todo "Todo $(todo\_index)" This is todo #$(todo\_index) """ end

---

## [Debugging some wrapped Fortran code](https://discourse.julialang.org/t/debugging-some-wrapped-fortran-code/46610)

<div class="topic-metadata">

**Author:** [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Replies:** 7\
**Last updated:** [July 11, 2021, 12:15am UTC](https://discourse.julialang.org/t/debugging-some-wrapped-fortran-code/46610 "2021-07-11T00:15:56Z")

</div>

I’ve created a Julia package that provides a wrapper around a Fortran subroutine. I’d like to build my Fortran shared library with debug information and use gdb to set a break point in the Fortran code. Is that possible …

---

## [Please help understand the syntax](https://discourse.julialang.org/t/please-help-understand-the-syntax/64423)

<div class="topic-metadata">

**Author:** [@dpkwhan](https://discourse.julialang.org/u/dpkwhan)\
**Replies:** 5\
**Last updated:** [July 10, 2021, 11:13pm UTC](https://discourse.julialang.org/t/please-help-understand-the-syntax/64423 "2021-07-10T23:13:12Z")

</div>

In the source code for summarysize.jl Line 63: (ss::SummarySize)(@nospecialize obj) = \_summarysize(ss, obj) Line 88 and 89: (::SummarySize)(obj::Symbol) = 0 (::SummarySize)(obj::SummarySize) = 0 Can someone help exp…

---

## [Is there a unitful benchmark tool?](https://discourse.julialang.org/t/is-there-a-unitful-benchmark-tool/64436)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [July 10, 2021, 7:35pm UTC](https://discourse.julialang.org/t/is-there-a-unitful-benchmark-tool/64436 "2021-07-10T19:35:11Z")

</div>

It would be nice to have units on all my benchmarks. Does something like that exist? https://painterqubits.github.io/Unitful.jl/stable/

---

## [Fastest way of contracting arrays](https://discourse.julialang.org/t/fastest-way-of-contracting-arrays/64415)

<div class="topic-metadata">

**Author:** [@Frisus95](https://discourse.julialang.org/u/Frisus95)\
**Replies:** 8\
**Last updated:** [July 10, 2021, 5:44pm UTC](https://discourse.julialang.org/t/fastest-way-of-contracting-arrays/64415 "2021-07-10T17:44:43Z")

</div>

Good afternoon everyone! I have the following piece of code, which essentially contracts some multidimensional arrays along specific dimensions (this is a no-sense example, which has the only purpose of illustrating cle…

---

## [Get access to 7×0 view](https://discourse.julialang.org/t/get-access-to-7x0-view/64419)

<div class="topic-metadata">

**Author:** [@mhex](https://discourse.julialang.org/u/mhex)\
**Replies:** 1\
**Last updated:** [July 10, 2021, 2:04pm UTC](https://discourse.julialang.org/t/get-access-to-7x0-view/64419 "2021-07-10T14:04:52Z")

</div>

Hi, could anyone show me how to get the values of this 7x0 view, please: debug\> x 7×0 view(::Matrix{Float32}, :, 1:0) with eltype Float32 I have already tried debug\> x\[:\] Float32\[\] debug\> x\[:,:\] 7×0 Matrix{Float32} …

---

## [ModernGL basics: compile shader](https://discourse.julialang.org/t/moderngl-basics-compile-shader/64393)

<div class="topic-metadata">

**Author:** [@L\_Adam](https://discourse.julialang.org/u/L_Adam)\
**Replies:** 5\
**Last updated:** [July 10, 2021, 3:17am UTC](https://discourse.julialang.org/t/moderngl-basics-compile-shader/64393 "2021-07-10T03:17:07Z")

</div>

I’m getting confused by ModernGL API. It would due to i’m new to using ccall and pointer in julia i’m new to opengl i try some code found in this repo, specifically the simplest part: triangle const vert\_source = """…

---

## [Exporting Excel data to an already existing .xlsx file](https://discourse.julialang.org/t/exporting-excel-data-to-an-already-existing-xlsx-file/19790)

<div class="topic-metadata">

**Author:** [@ale](https://discourse.julialang.org/u/ale)\
**Replies:** 9\
**Last updated:** [July 10, 2021, 2:21am UTC](https://discourse.julialang.org/t/exporting-excel-data-to-an-already-existing-xlsx-file/19790 "2021-07-10T02:21:08Z")

</div>

Hi, I am trying to export different arrays to different sheets of an already existing Excel file. The format of this file is .xlsx. Since I need to have several sheets in the same file, I can’t use “CSV”. Secondly, it…

---

## [How to merge 2 dataframes (DataFrames.jl)](https://discourse.julialang.org/t/how-to-merge-2-dataframes-dataframes-jl/64321)

<div class="topic-metadata">

**Author:** [@Based](https://discourse.julialang.org/u/Based)\
**Replies:** 5\
**Last updated:** [July 9, 2021, 10:03pm UTC](https://discourse.julialang.org/t/how-to-merge-2-dataframes-dataframes-jl/64321 "2021-07-09T22:03:06Z")

</div>

I have 2 dataframes. Each contains independent datapoints in different rows with different IDs. They share most of the same columns, except for one. I want to combine them into one data frame. I feel like there should be…

---

## [How do I reload a module under development in Julia 1.6?](https://discourse.julialang.org/t/how-do-i-reload-a-module-under-development-in-julia-1-6/64377)

<div class="topic-metadata">

**Author:** [@orome](https://discourse.julialang.org/u/orome)\
**Replies:** 3\
**Last updated:** [July 9, 2021, 8:41pm UTC](https://discourse.julialang.org/t/how-do-i-reload-a-module-under-development-in-julia-1-6/64377 "2021-07-09T20:41:15Z")

</div>

I know this question has been asked and answered before, but none of the many answers work for me as described. What is the procedure for reloading a module that I’m working on in Julia (1.6)? For example, I have modu…

---

## [PlotlyJS’s parallel coordinates plot](https://discourse.julialang.org/t/plotlyjs-s-parallel-coordinates-plot/64371)

<div class="topic-metadata">

**Author:** [@saraflgarcia](https://discourse.julialang.org/u/saraflgarcia)\
**Replies:** 0\
**Last updated:** [July 9, 2021, 6:05pm UTC](https://discourse.julialang.org/t/plotlyjs-s-parallel-coordinates-plot/64371 "2021-07-09T18:05:39Z")

</div>

Hi there, I’m using Julia with PlotlyJS’s parallel coordinates plot. Is there any way to use string values? Plot(PlotlyJS.parcoords(dimensions=\[attr(range =\[1,5\], label = "A", values = \[4,2\]), attr(label =…

---

## [Testing a Package: Warning about test dependency](https://discourse.julialang.org/t/testing-a-package-warning-about-test-dependency/64363)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 1\
**Last updated:** [July 9, 2021, 5:05pm UTC](https://discourse.julialang.org/t/testing-a-package-warning-about-test-dependency/64363 "2021-07-09T17:05:35Z")

</div>

Hi, I am working on a package (GitHub - v-i-s-h/Runner.jl: Provides \`@runit\` macro for running scripts with commandline arguments from REPL) and also wrote some test cases. When I tried to test it through pkg \> test, I…

---

## [Replace non ascii char](https://discourse.julialang.org/t/replace-non-ascii-char/64358)

<div class="topic-metadata">

**Author:** [@agatheLG](https://discourse.julialang.org/u/agatheLG)\
**Replies:** 2\
**Last updated:** [July 9, 2021, 4:44pm UTC](https://discourse.julialang.org/t/replace-non-ascii-char/64358 "2021-07-09T16:44:59Z")

</div>

Hi, I am switching a lot between format from dataframe to csv file to sql and of course I have an error about invalid character (Base.InvalidCharError{Char}(‘\\x8e’) when I try to load my data into SQL. I can indeed see…

---

## [LoopVectorization almost doubles execution time?](https://discourse.julialang.org/t/loopvectorization-almost-doubles-execution-time/64333)

<div class="topic-metadata">

**Author:** [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Replies:** 6\
**Last updated:** [July 9, 2021, 4:28pm UTC](https://discourse.julialang.org/t/loopvectorization-almost-doubles-execution-time/64333 "2021-07-09T16:28:58Z")

</div>

Hi everyone, I am testing LoopVectorization in my program and since it did not produce any change in speed, I boiled it down to an exemplary function. Here I found something which puzzled me because although the functio…

---

## [Simple question about Array and Subarrays](https://discourse.julialang.org/t/simple-question-about-array-and-subarrays/64346)

<div class="topic-metadata">

**Author:** [@RCHG](https://discourse.julialang.org/u/RCHG)\
**Replies:** 5\
**Last updated:** [July 9, 2021, 4:00pm UTC](https://discourse.julialang.org/t/simple-question-about-array-and-subarrays/64346 "2021-07-09T16:00:05Z")

</div>

Let’s say that for a given dimension d, we need to constrain the matrix to an specific value (or index). In other words, we need the subarray in which that dimension has an specific value (or index). How I can do someth…

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

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