# General Usage

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

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

**Page:** 379

---

## [Using Artifacts for test data](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783)

<div class="topic-metadata">

**Author:** [@NicholasWMRitchie](https://discourse.julialang.org/u/NicholasWMRitchie)\
**Replies:** 4\
**Last updated:** [October 25, 2022, 10:28am UTC](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783 "2022-10-25T10:28:38Z")

</div>

Before 1.5, I’d used Artifacts quite successfully to make a large data set (10’s of MB) available for testing. I don’t want to include the test data in the main package because many users will never use it. The Artifac…

---

## [Where is load-time spent (with skipped precompilation)](https://discourse.julialang.org/t/where-is-load-time-spent-with-skipped-precompilation/89201)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 1\
**Last updated:** [October 25, 2022, 12:30am UTC](https://discourse.julialang.org/t/where-is-load-time-spent-with-skipped-precompilation/89201 "2022-10-25T00:30:03Z")

</div>

In a new Julia session, I import a custom package of mine: @time @time\_imports using VoltoMapSim which gives \[ Info: Precompiling VoltoMapSim \[f713100b-c48c-421a-b480-5fcb4c589a9e\] \[ Info: Skipping precompilation sinc…

---

## [Output format](https://discourse.julialang.org/t/output-format/89200)

<div class="topic-metadata">

**Author:** [@jrocha](https://discourse.julialang.org/u/jrocha)\
**Replies:** 2\
**Last updated:** [October 25, 2022, 10:29am UTC](https://discourse.julialang.org/t/output-format/89200 "2022-10-25T10:29:59Z")

</div>

|0 | 0.5 | | -0.375 | | 0.5 | Hi, I wonder how can i format the output of columns and also the numbers aligned by the decimal comma. Below some of my output. Thanks in advance. Cheers, |1 | 0.25 | | 0.265625 | | 0.…

---

## [Need Help implementing Large Tensor Factorization in Julia](https://discourse.julialang.org/t/need-help-implementing-large-tensor-factorization-in-julia/89236)

<div class="topic-metadata">

**Author:** [@mj2984](https://discourse.julialang.org/u/mj2984)\
**Replies:** 3\
**Last updated:** [October 25, 2022, 9:32am UTC](https://discourse.julialang.org/t/need-help-implementing-large-tensor-factorization-in-julia/89236 "2022-10-25T09:32:57Z")

</div>

I am looking to implement this paper in Julia : Complex Embeddings for Simple Link Prediction (arxiv.org). I initially tried to set up a Tensor of the size of entity and relations I have and it was too large to fit into …

---

## [Difference between ShortStrings.jl and InlineStrings.jl](https://discourse.julialang.org/t/difference-between-shortstrings-jl-and-inlinestrings-jl/89127)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 2\
**Last updated:** [October 25, 2022, 5:18am UTC](https://discourse.julialang.org/t/difference-between-shortstrings-jl-and-inlinestrings-jl/89127 "2022-10-25T05:18:24Z")

</div>

They look similar. What is the difference - when do I want each?

---

## [Distributing parallel tasks/workers over multiple nodes using SLURM](https://discourse.julialang.org/t/distributing-parallel-tasks-workers-over-multiple-nodes-using-slurm/60574)

<div class="topic-metadata">

**Author:** [@schmuelinsky](https://discourse.julialang.org/u/schmuelinsky)\
**Replies:** 10\
**Last updated:** [October 25, 2022, 3:41am UTC](https://discourse.julialang.org/t/distributing-parallel-tasks-workers-over-multiple-nodes-using-slurm/60574 "2022-10-25T03:41:45Z")

</div>

I’m trying to compute a series of Monte Carlo (MC) integrations on an HPC using SLURM. Since the MC samples are all independent, my approach is to distribute them as parallel tasks using pmap(). Each MC sample is quite …

---

## [Huge CPU load when using GLM](https://discourse.julialang.org/t/huge-cpu-load-when-using-glm/89209)

<div class="topic-metadata">

**Author:** [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Replies:** 14\
**Last updated:** [October 25, 2022, 2:52am UTC](https://discourse.julialang.org/t/huge-cpu-load-when-using-glm/89209 "2022-10-25T02:52:29Z")

</div>

Hello all I’m using GLM to calculate coefficients for logistic regression. I don’t recall this being an issue when I first developed this script, but recently, I’ve noticed that this script is generating a huge load on…

---

## [Please help: Poor performance, what am I missing?](https://discourse.julialang.org/t/please-help-poor-performance-what-am-i-missing/89221)

<div class="topic-metadata">

**Author:** [@jocklawrie](https://discourse.julialang.org/u/jocklawrie)\
**Replies:** 6\
**Last updated:** [October 25, 2022, 2:01am UTC](https://discourse.julialang.org/t/please-help-poor-performance-what-am-i-missing/89221 "2022-10-25T02:01:26Z")

</div>

Hello clever people, I’m having trouble dissecting a performance problem. MWE below. The computation in the 3rd benchmark is the composition of the computations in the first 2 benchmarks. I expect the 3rd benchmark to …

---

## [Q: array of vectors?](https://discourse.julialang.org/t/q-array-of-vectors/89169)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 11\
**Last updated:** [October 25, 2022, 1:53am UTC](https://discourse.julialang.org/t/q-array-of-vectors/89169 "2022-10-25T01:53:46Z")

</div>

Hello, What is the optimum representation to use to store vectors over a discrete field. For example, the discrete field being the 2D pixels of an image or the 3D voxels of an image volume? I’ll use the 2D pixel field…

---

## [Max function in differential equation](https://discourse.julialang.org/t/max-function-in-differential-equation/89176)

<div class="topic-metadata">

**Author:** [@Ge0rges](https://discourse.julialang.org/u/Ge0rges)\
**Replies:** 3\
**Last updated:** [October 24, 2022, 10:01pm UTC](https://discourse.julialang.org/t/max-function-in-differential-equation/89176 "2022-10-24T22:01:45Z")

</div>

Hello all, I have a set of differential equations I’m trying to solve. One of them includes a max() function. I am wondering if that is the reason why I am sometimes unable to solve this equation. Can the solver “integr…

---

## [How to convert from bool to float](https://discourse.julialang.org/t/how-to-convert-from-bool-to-float/89216)

<div class="topic-metadata">

**Author:** [@Xavier\_Gonzalez](https://discourse.julialang.org/u/Xavier_Gonzalez)\
**Replies:** 2\
**Last updated:** [October 24, 2022, 10:40pm UTC](https://discourse.julialang.org/t/how-to-convert-from-bool-to-float/89216 "2022-10-24T22:40:58Z")

</div>

I would like to take a matrix that is currently made of bools and turn it into floats. If I is this matrix of bools, I’ve been trying commands like convert(Int8, I) and getting errors like ERROR: MethodError: Cannot \`c…

---

## [Available fonts for plotting inside Plotly/PlotlyJS](https://discourse.julialang.org/t/available-fonts-for-plotting-inside-plotly-plotlyjs/89074)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 2\
**Last updated:** [October 24, 2022, 9:33am UTC](https://discourse.julialang.org/t/available-fonts-for-plotting-inside-plotly-plotlyjs/89074 "2022-10-24T09:33:22Z")

</div>

Is there a way to figure out which fonts are available that can be used for PlotlyJS-plots?

---

## [Constrain type to variable sized union](https://discourse.julialang.org/t/constrain-type-to-variable-sized-union/89206)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 2\
**Last updated:** [October 24, 2022, 9:07pm UTC](https://discourse.julialang.org/t/constrain-type-to-variable-sized-union/89206 "2022-10-24T21:07:39Z")

</div>

I want to constrain a type parameter to be a variable sized union whose elements are concrete types of another parametric type. For example: struct Foo{T} ... end struct Bar{T \<: Union{Vararg{Foo}}} a::T end T…

---

## [2022 Julia User & Developer Survey - draft questionnaire available for comment](https://discourse.julialang.org/t/2022-julia-user-developer-survey-draft-questionnaire-available-for-comment/81168)

<div class="topic-metadata">

**Author:** [@ahclaster](https://discourse.julialang.org/u/ahclaster)\
**Replies:** 9\
**Last updated:** [October 24, 2022, 8:55pm UTC](https://discourse.julialang.org/t/2022-julia-user-developer-survey-draft-questionnaire-available-for-comment/81168 "2022-10-24T20:55:35Z")

</div>

The fourth annual Julia User & Developer Survey is being developed now, and we want your input. Please do NOT complete the survey at this time. This link is being shared with you to collect feedback about the questionna…

---

## [Union Splitting Guarantees](https://discourse.julialang.org/t/union-splitting-guarantees/89210)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 2\
**Last updated:** [October 24, 2022, 8:54pm UTC](https://discourse.julialang.org/t/union-splitting-guarantees/89210 "2022-10-24T20:54:19Z")

</div>

I have some low level questions about union splitting 1.) If even one type in the union is abstract will union splitting not kick in? Or will there be branches created for at least the concrete types in the union. For e…

---

## [Constrain type to be concrete subtype](https://discourse.julialang.org/t/constrain-type-to-be-concrete-subtype/89207)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 3\
**Last updated:** [October 24, 2022, 8:50pm UTC](https://discourse.julialang.org/t/constrain-type-to-be-concrete-subtype/89207 "2022-10-24T20:50:12Z")

</div>

Suppose I have the following struct: struct Foo{T \<: Real} a::T end I am still able to construct a Foo as: Foo{Real}(20). Is there a way to demand that the type parameter be a concrete type such as Int64, Float64, …

---

## [Parametric type with value of custom type as type parameter](https://discourse.julialang.org/t/parametric-type-with-value-of-custom-type-as-type-parameter/89202)

<div class="topic-metadata">

**Author:** [@GoodDayToYouAll](https://discourse.julialang.org/u/GoodDayToYouAll)\
**Replies:** 4\
**Last updated:** [October 24, 2022, 8:42pm UTC](https://discourse.julialang.org/t/parametric-type-with-value-of-custom-type-as-type-parameter/89202 "2022-10-24T20:42:22Z")

</div>

Hi everyone, as the title suggests, I want to create a parametric type with the value of a custom type as type parameter. So for example struct MyType x::Int end struct MyParametricType{T} x MyParametricType(a) = new{…

---

## [AoG use cases, suggestions](https://discourse.julialang.org/t/aog-use-cases-suggestions/89203)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 0\
**Last updated:** [October 24, 2022, 6:34pm UTC](https://discourse.julialang.org/t/aog-use-cases-suggestions/89203 "2022-10-24T18:34:04Z")

</div>

Hello everyone, I would like to include some new examples in BeautifulMakie using AlgebraOfGraphics. Hence, some suggestions of common use cases will be good to have. Things that might catch the interest of people comin…

---

## [Add missing row or column to frequency table](https://discourse.julialang.org/t/add-missing-row-or-column-to-frequency-table/61794)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 8\
**Last updated:** [October 24, 2022, 5:59pm UTC](https://discourse.julialang.org/t/add-missing-row-or-column-to-frequency-table/61794 "2022-10-24T17:59:47Z")

</div>

Hi all, In my simulation, the results are summarized as a 2X2 frequency table. For example: using DataFrames, FreqTables df1 = DataFrame( a = \[:yes,:yes,:no,:no\], b = \[:yes,:no,:yes,:no\] ) t1 = freqtable(df1, …

---

## [\] dev with private Github repository](https://discourse.julialang.org/t/dev-with-private-github-repository/89188)

<div class="topic-metadata">

**Author:** [@FemtoTrader](https://discourse.julialang.org/u/FemtoTrader)\
**Replies:** 3\
**Last updated:** [October 24, 2022, 10:13am UTC](https://discourse.julialang.org/t/dev-with-private-github-repository/89188 "2022-10-24T10:13:38Z")

</div>

Hello, I did \] dev https://femtotrader@github.com/femtotrader/MyPrivateRepository.jl but it raises ERROR: ArgumentError: invalid base 10 digit 'g' in "github" is there a method to make a private repository a package…

---

## [Use function on type parameter to decide struct field type at compile time](https://discourse.julialang.org/t/use-function-on-type-parameter-to-decide-struct-field-type-at-compile-time/89172)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 3\
**Last updated:** [October 24, 2022, 4:47am UTC](https://discourse.julialang.org/t/use-function-on-type-parameter-to-decide-struct-field-type-at-compile-time/89172 "2022-10-24T04:47:07Z")

</div>

This code does not work, but I want to do something like the following (the general idea should be clear): map\_type(::Type{String}) = Int64 map\_type(::Type{Int64}) = String struct Foo{T} a::map\_type(T) end Basical…

---

## [Why size(vector, 2) return 1?](https://discourse.julialang.org/t/why-size-vector-2-return-1/89166)

<div class="topic-metadata">

**Author:** [@eliascarv](https://discourse.julialang.org/u/eliascarv)\
**Replies:** 2\
**Last updated:** [October 23, 2022, 11:31pm UTC](https://discourse.julialang.org/t/why-size-vector-2-return-1/89166 "2022-10-23T23:31:59Z")

</div>

I was wondering if there is a reason for this design decision. Code example: julia\> v = \[1, 2, 3\] 3-element Vector{Int64}: 1 2 3 julia\> size(v, 1) 3 julia\> size(v, 2) 1

---

## [Building a PC optimized for "time to first plot"](https://discourse.julialang.org/t/building-a-pc-optimized-for-time-to-first-plot/88801)

<div class="topic-metadata">

**Author:** [@pepijndevos](https://discourse.julialang.org/u/pepijndevos)\
**Replies:** 86\
**Last updated:** [October 23, 2022, 11:18pm UTC](https://discourse.julialang.org/t/building-a-pc-optimized-for-time-to-first-plot/88801 "2022-10-23T23:18:25Z")

</div>

It would really improve my experience with Julia if loading a bunch of big package ecosystems wouldn’t cause a considerable delay while a bunch of stuff gets recompiled. Revise.jl is great but sometimes doesn’t work when…

---

## [Are functions that operate only on types computed at compile time](https://discourse.julialang.org/t/are-functions-that-operate-only-on-types-computed-at-compile-time/89161)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 2\
**Last updated:** [October 23, 2022, 9:30pm UTC](https://discourse.julialang.org/t/are-functions-that-operate-only-on-types-computed-at-compile-time/89161 "2022-10-23T21:30:19Z")

</div>

Suppose I have the following function get\_first\_type(::Type{T}) where T \<: Tuple = begin fieldtypes(T)\[1\] end If another function calls this function with one of its input type parameters, will this function be co…

---

## [Guide for embedding Julia with packages?](https://discourse.julialang.org/t/guide-for-embedding-julia-with-packages/89154)

<div class="topic-metadata">

**Author:** [@rongcuid](https://discourse.julialang.org/u/rongcuid)\
**Replies:** 1\
**Last updated:** [October 23, 2022, 7:42pm UTC](https://discourse.julialang.org/t/guide-for-embedding-julia-with-packages/89154 "2022-10-23T19:42:59Z")

</div>

I am aware of this 2017 question: Embedding Julia and Packages. However, it doesn’t really have an answer. I am looking for a way to embed Julia into a C/C++ program, and the Julia script may use a variety of packages.…

---

## [How to remove RegexMatch() in output](https://discourse.julialang.org/t/how-to-remove-regexmatch-in-output/89158)

<div class="topic-metadata">

**Author:** [@Chintu\_sharma](https://discourse.julialang.org/u/Chintu_sharma)\
**Replies:** 1\
**Last updated:** [October 23, 2022, 6:11pm UTC](https://discourse.julialang.org/t/how-to-remove-regexmatch-in-output/89158 "2022-10-23T18:11:19Z")

</div>

filefull="main.cpp" extension\_pattern=r"\[^.\]+$" println(match(extension\_pattern,filefull)) # answer is RegexMatch("cpp") #but i need only output word "cpp"

---

## [How to access reactive variables in Stipple?](https://discourse.julialang.org/t/how-to-access-reactive-variables-in-stipple/89148)

<div class="topic-metadata">

**Author:** [@monty](https://discourse.julialang.org/u/monty)\
**Replies:** 0\
**Last updated:** [October 23, 2022, 3:35pm UTC](https://discourse.julialang.org/t/how-to-access-reactive-variables-in-stipple/89148 "2022-10-23T15:35:22Z")

</div>

I need to have a reactive vector checks that can change length during the execution time. See below. How can make it work? Note that push!(model.checks\[\], false) successfully increases its length. However, the length(m…

---

## [What is Julia Package that is able to compute General Solution with Method of Integrating Factors?](https://discourse.julialang.org/t/what-is-julia-package-that-is-able-to-compute-general-solution-with-method-of-integrating-factors/89139)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 1\
**Last updated:** [October 23, 2022, 1:15pm UTC](https://discourse.julialang.org/t/what-is-julia-package-that-is-able-to-compute-general-solution-with-method-of-integrating-factors/89139 "2022-10-23T13:15:56Z")

</div>

Hi all, I want to solve this initial value problem 2y' + ty = 2 y(0)=1 the answer from the book for the general solution is y = e^{-t^{2}/4} \\int^{t} e^{s^{2}/4} \\ ds + ce^{-t^{2}/4} Edit: I want the answer in anal…

---

## [Reliability of Enzyme.jl](https://discourse.julialang.org/t/reliability-of-enzyme-jl/89060)

<div class="topic-metadata">

**Author:** [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Replies:** 11\
**Last updated:** [October 23, 2022, 9:10am UTC](https://discourse.julialang.org/t/reliability-of-enzyme-jl/89060 "2022-10-23T09:10:41Z")

</div>

I read in this post that Enzyme.jl can be a very promising autodiff option for certain cases. However in the same link, it is also mentioned that: Enzyme … doesn’t have general support for higher level Julia functiona…

---

## [Arrays with non-uniform dimensions](https://discourse.julialang.org/t/arrays-with-non-uniform-dimensions/88725)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 8\
**Last updated:** [October 22, 2022, 9:35pm UTC](https://discourse.julialang.org/t/arrays-with-non-uniform-dimensions/88725 "2022-10-22T21:35:56Z")

</div>

I’m looking for a data-structure that essentially works as an array-of-arrays, where each “row” can have a different number of “columns”. The point of that is being able to easily perform map or broadcast, etc, as if it …

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

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