# General Usage

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

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

**Page:** 549

---

## [Lyapunov spectrum for a user-defined dynamical system](https://discourse.julialang.org/t/lyapunov-spectrum-for-a-user-defined-dynamical-system/34208)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 2\
**Last updated:** [September 10, 2021, 9:54am UTC](https://discourse.julialang.org/t/lyapunov-spectrum-for-a-user-defined-dynamical-system/34208 "2021-09-10T09:54:25Z")

</div>

Hello, I have seen the nice documentation here about calculating the Lyapunov spectrum for a dynamical system defined in DynamicalSystems.jl . I have a dynamical system (which is a discretized PDE) which I time-integr…

---

## [Avoiding memory allocation for solves with multiple right-hand sides](https://discourse.julialang.org/t/avoiding-memory-allocation-for-solves-with-multiple-right-hand-sides/67879)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 7\
**Last updated:** [September 10, 2021, 8:57am UTC](https://discourse.julialang.org/t/avoiding-memory-allocation-for-solves-with-multiple-right-hand-sides/67879 "2021-09-10T08:57:39Z")

</div>

Hi everyone, I am new to Julia and I try to understand why a solve using the backslash operator allocates memory although the RHS vector is allocated, the solution vector is allocated and the factorisation is precompute…

---

## [Plotting errors when building documentation using Plots.jl and Documenter.jl](https://discourse.julialang.org/t/plotting-errors-when-building-documentation-using-plots-jl-and-documenter-jl/67849)

<div class="topic-metadata">

**Author:** [@zengfung](https://discourse.julialang.org/u/zengfung)\
**Replies:** 7\
**Last updated:** [September 10, 2021, 5:57am UTC](https://discourse.julialang.org/t/plotting-errors-when-building-documentation-using-plots-jl-and-documenter-jl/67849 "2021-09-10T05:57:11Z")

</div>

Hi all, I’m attempting to add plots into my package documentation using Plots.jl and Documenter.jl. However, creating a simple plot such as the following produces an error as below. Code in markdown file: using Plots …

---

## [Creating a custom log message categorie](https://discourse.julialang.org/t/creating-a-custom-log-message-categorie/29295)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 20\
**Last updated:** [September 10, 2021, 4:54am UTC](https://discourse.julialang.org/t/creating-a-custom-log-message-categorie/29295 "2021-09-10T04:54:27Z")

</div>

Hello, I am using the default Logger of Julia, and in the documentation it is mentioned that you can create custom log messages. I could not find out how, though. This works: using Logging logger = ConsoleLogger(stdo…

---

## [Problems defining rrule for Flux layer](https://discourse.julialang.org/t/problems-defining-rrule-for-flux-layer/67952)

<div class="topic-metadata">

**Author:** [@aross](https://discourse.julialang.org/u/aross)\
**Replies:** 1\
**Last updated:** [September 10, 2021, 4:06am UTC](https://discourse.julialang.org/t/problems-defining-rrule-for-flux-layer/67952 "2021-09-10T04:06:13Z")

</div>

Hello, I am having trouble implementing the rrule for a Flux layer. I want to call Chain() with other Flux defined layers and then @train to update the parameters. The layer I’m defining is different, but I post a simpl…

---

## [Julia on mobile: Ways to call Swift and/or Kotlin/Java on Android?](https://discourse.julialang.org/t/julia-on-mobile-ways-to-call-swift-and-or-kotlin-java-on-android/47534)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [September 30, 2020, 11:52am UTC](https://discourse.julialang.org/t/julia-on-mobile-ways-to-call-swift-and-or-kotlin-java-on-android/47534 "2020-09-30T11:52:39Z")

</div>

First, I do view any non-JVM/Kotlin/Java apps to be non-native to Android, but might be mistaken about how inferior it is. People do a lot of JavaScript apps, I’m told. There’s also Kivy for Python Android apps, so Julia…

---

## [Is it necessary to install all the packages listed in REQUIRE or Project.toml of a package?](https://discourse.julialang.org/t/is-it-necessary-to-install-all-the-packages-listed-in-require-or-project-toml-of-a-package/44165)

<div class="topic-metadata">

**Author:** [@Ken\_Lin](https://discourse.julialang.org/u/Ken_Lin)\
**Replies:** 8\
**Last updated:** [September 9, 2021, 6:44pm UTC](https://discourse.julialang.org/t/is-it-necessary-to-install-all-the-packages-listed-in-require-or-project-toml-of-a-package/44165 "2021-09-09T18:44:54Z")

</div>

Hello, In general, in Julia, if I add a package A through a URL from github, do I have to also install all the packages listed in the REQUIRE (or maybe Project.toml) of A, in order to use A normally? It seems that for…

---

## [Performance of garbage collection](https://discourse.julialang.org/t/performance-of-garbage-collection/37698)

<div class="topic-metadata">

**Author:** [@karelh](https://discourse.julialang.org/u/karelh)\
**Replies:** 5\
**Last updated:** [September 9, 2021, 6:41pm UTC](https://discourse.julialang.org/t/performance-of-garbage-collection/37698 "2021-09-09T18:41:34Z")

</div>

I am trying to optimize the performance of training a neural network model (using Flux.jl and Mill.jl packages). I figured out that significant time is being spent on garbage collection (when @timing individual parts of …

---

## [Trigger listeners when modifying element Observable{Matrix}](https://discourse.julialang.org/t/trigger-listeners-when-modifying-element-observable-matrix/67937)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 2\
**Last updated:** [September 9, 2021, 2:15pm UTC](https://discourse.julialang.org/t/trigger-listeners-when-modifying-element-observable-matrix/67937 "2021-09-09T14:15:04Z")

</div>

If I create an Observable{Matrix} : X = Observable(rand(3, 3)) and that I have some listeners on X a = @lift sum($X) 5.7.... Is there any way for this listener to be triggered when I only modify values of X: X\[\]\[1, …

---

## [Memory allocation in dot product](https://discourse.julialang.org/t/memory-allocation-in-dot-product/67901)

<div class="topic-metadata">

**Author:** [@Frisus95](https://discourse.julialang.org/u/Frisus95)\
**Replies:** 11\
**Last updated:** [September 9, 2021, 1:54pm UTC](https://discourse.julialang.org/t/memory-allocation-in-dot-product/67901 "2021-09-09T13:54:12Z")

</div>

Hello everyone. Is it possible to perform a dot product between multidimensional arrays without allocating memory? For example: function funza(A) return dot(A,A) end A = rand(5,5,5,5,5); @btime funza(A) …

---

## [Struct field as view of another field](https://discourse.julialang.org/t/struct-field-as-view-of-another-field/67920)

<div class="topic-metadata">

**Author:** [@danielward27](https://discourse.julialang.org/u/danielward27)\
**Replies:** 5\
**Last updated:** [September 9, 2021, 12:42pm UTC](https://discourse.julialang.org/t/struct-field-as-view-of-another-field/67920 "2021-09-09T12:42:28Z")

</div>

Hello, Is it is possible to have a struct field that is a view of another field? A minimum working example is: Base.@kwdef struct TestStruct a::Vector{Float64} b::Vector{Float64} = @view a\[1:2\] end t = TestStr…

---

## [Convert a Current Installation of Julia to Use \`BlasInt = \`Int32\`](https://discourse.julialang.org/t/convert-a-current-installation-of-julia-to-use-blasint-int32/67915)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 0\
**Last updated:** [September 9, 2021, 7:58am UTC](https://discourse.julialang.org/t/convert-a-current-installation-of-julia-to-use-blasint-int32/67915 "2021-09-09T07:58:51Z")

</div>

Looking at my Julia installation (Using JuliaWin version Juliawin v1.6.2-0 on 2021-07-22) I can see that LinearAlgebra.BlasInt = Int64. This means that any index to array takes 64 Bit. I was wondering, can I make it In…

---

## [Shapefile recipes for Plots.jl?](https://discourse.julialang.org/t/shapefile-recipes-for-plots-jl/22089)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 0\
**Last updated:** [March 20, 2019, 3:48am UTC](https://discourse.julialang.org/t/shapefile-recipes-for-plots-jl/22089 "2019-03-20T03:48:22Z")

</div>

Running plot(shp) on a shapefile after loading Shapefile.jl GeoInterface.jl doesn’t find a recipe for Shapefile.Handle. It seems like recipes existed in the past, but I can’t find them anywhere.

---

## [Nesting subplots in plot recipes](https://discourse.julialang.org/t/nesting-subplots-in-plot-recipes/26559)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 0\
**Last updated:** [July 19, 2019, 6:41pm UTC](https://discourse.julialang.org/t/nesting-subplots-in-plot-recipes/26559 "2019-07-19T18:41:22Z")

</div>

Is there a way to “automatically” nest layouts? using RecipesBase @recipe function f(pt::MyPlotType, arr::Array{\<:MyDataType}) layout := GridLayout(size(arr)...) for data in arr @series begin …

---

## [@chain at element level?](https://discourse.julialang.org/t/chain-at-element-level/67906)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 0\
**Last updated:** [September 9, 2021, 4:19am UTC](https://discourse.julialang.org/t/chain-at-element-level/67906 "2021-09-09T04:19:29Z")

</div>

Does @chain have (or can it be given) the equivalent of Pipe’s dot pipe .|\> I know you can use transform with ByRow, or vectorise a function within a chain block, but it would be very nice to just drop to element l…

---

## [@where ByRow?](https://discourse.julialang.org/t/where-byrow/67905)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 0\
**Last updated:** [September 9, 2021, 3:28am UTC](https://discourse.julialang.org/t/where-byrow/67905 "2021-09-09T03:28:44Z")

</div>

Does @where have the equivalent of transform’s ByRow function? So you don’t have to vectorise the conditional statement e.g. @where\_ByRow( :col1 \< 10 & :col2 \< 20 ) instead of @where( :col1 .\< 10 .& :col…

---

## [Markdown Preview using Weave.jl](https://discourse.julialang.org/t/markdown-preview-using-weave-jl/50601)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 5\
**Last updated:** [September 9, 2021, 1:35am UTC](https://discourse.julialang.org/t/markdown-preview-using-weave-jl/50601 "2021-09-09T01:35:08Z")

</div>

Is there a way to use weave.jl to show a preview of a Markdown in pdf or HTML, before it’s converted? I thought I saw a picture like this using atom, in the documentation.

---

## [Calling C++ function having std::vectors as input and output parameters from Julia](https://discourse.julialang.org/t/calling-c-function-having-std-vectors-as-input-and-output-parameters-from-julia/9224)

<div class="topic-metadata">

**Author:** [@pdlotko](https://discourse.julialang.org/u/pdlotko)\
**Replies:** 12\
**Last updated:** [September 9, 2021, 12:20am UTC](https://discourse.julialang.org/t/calling-c-function-having-std-vectors-as-input-and-output-parameters-from-julia/9224 "2021-09-09T00:20:08Z")

</div>

Dear All I am new to Julia and and I am trying to access my C++ code from Julia. I have asked this question already at Stack Overflow, but were not able to find an answer there. I am trying to call a C++ function from …

---

## [Pmap and svdvals from documentation speed](https://discourse.julialang.org/t/pmap-and-svdvals-from-documentation-speed/67898)

<div class="topic-metadata">

**Author:** [@Pulpo](https://discourse.julialang.org/u/Pulpo)\
**Replies:** 6\
**Last updated:** [September 8, 2021, 11:09pm UTC](https://discourse.julialang.org/t/pmap-and-svdvals-from-documentation-speed/67898 "2021-09-08T23:09:46Z")

</div>

I am wondering why the following example of pmap isn’t getting any speedup: using Distributed using BenchmarkTools @everywhere using LinearAlgebra addprocs(length(Sys.cpu\_info())); M = Matrix{Float64}\[rand(1000,100…

---

## [LoadError: AssertionError: isdir(path) - GameZero.jl](https://discourse.julialang.org/t/loaderror-assertionerror-isdir-path-gamezero-jl/67899)

<div class="topic-metadata">

**Author:** [@Nivea\_Freitas](https://discourse.julialang.org/u/Nivea_Freitas)\
**Replies:** 2\
**Last updated:** [September 8, 2021, 11:00pm UTC](https://discourse.julialang.org/t/loaderror-assertionerror-isdir-path-gamezero-jl/67899 "2021-09-08T23:00:07Z")

</div>

Hi, I’m new in Julia and I started studying GameZero.jl package a little while ago. I’m having trouble creating an actor because when I run the rungame(“FileName.jl”) it gives an error message: “LoadError: AssertionError…

---

## [Correct way of using MKL.jl on Julia Version 1.7.0](https://discourse.julialang.org/t/correct-way-of-using-mkl-jl-on-julia-version-1-7-0/67780)

<div class="topic-metadata">

**Author:** [@j\_u](https://discourse.julialang.org/u/j_u)\
**Replies:** 4\
**Last updated:** [September 8, 2021, 10:26pm UTC](https://discourse.julialang.org/t/correct-way-of-using-mkl-jl-on-julia-version-1-7-0/67780 "2021-09-08T22:26:53Z")

</div>

What is the correct way of using MKL.jl on Julia Version 1.7.0-beta3.0 (2021-07-07) wrt the number of distributed processes and multithreading? I do reinforcement learning (AlphaZero.jl) training on Intel(R) Xeon(R) Gol…

---

## [Can I expect ForwardDiff to give the same performance in this case?](https://discourse.julialang.org/t/can-i-expect-forwarddiff-to-give-the-same-performance-in-this-case/67894)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 5\
**Last updated:** [September 8, 2021, 8:33pm UTC](https://discourse.julialang.org/t/can-i-expect-forwarddiff-to-give-the-same-performance-in-this-case/67894 "2021-09-08T20:33:10Z")

</div>

Hello! I just learned about Automatic Differentiation and of course need to give it a go using Julia :slight\_smile: I have a function defined as: Wendland(q) = aD\*(1-q/2)^4 \* (2\*q+1) Where aD in my case is 696. And …

---

## [Version 1.7 much faster than 1.6 in a script that calls wrapped external libraries](https://discourse.julialang.org/t/version-1-7-much-faster-than-1-6-in-a-script-that-calls-wrapped-external-libraries/64872)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 17\
**Last updated:** [September 8, 2021, 7:15pm UTC](https://discourse.julialang.org/t/version-1-7-much-faster-than-1-6-in-a-script-that-calls-wrapped-external-libraries/64872 "2021-09-08T19:15:10Z")

</div>

Hi, This is not really a question but an amazing fact that I wanted to share. The code below is the main part of a script where all heavy work is done by external libraries (GMT, GDAl & PROJ). However, version 1.7beta …

---

## [Distributed and threading](https://discourse.julialang.org/t/distributed-and-threading/67886)

<div class="topic-metadata">

**Author:** [@Beh123](https://discourse.julialang.org/u/Beh123)\
**Replies:** 0\
**Last updated:** [September 8, 2021, 6:25pm UTC](https://discourse.julialang.org/t/distributed-and-threading/67886 "2021-09-08T18:25:08Z")

</div>

Hi everyone. I want to recieve data from the udp network. I have a function( thread) that do it . I have another thread for processing data. I need use @distribution for improving speed up. Can we use @dostribution an…

---

## [How to hide an inner output in the REPL?](https://discourse.julialang.org/t/how-to-hide-an-inner-output-in-the-repl/67782)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 3\
**Last updated:** [September 7, 2021, 1:37am UTC](https://discourse.julialang.org/t/how-to-hide-an-inner-output-in-the-repl/67782 "2021-09-07T01:37:09Z")

</div>

I have a code (simplified as in the below code) put in a file. When I run it, an output of the “W” matrix is automatically displayed in the REPL after the execution of the code, although all the assignment are ended by “…

---

## [Is there things like intent(in), intent(out) in Julia?](https://discourse.julialang.org/t/is-there-things-like-intent-in-intent-out-in-julia/66249)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 6\
**Last updated:** [September 8, 2021, 4:00pm UTC](https://discourse.julialang.org/t/is-there-things-like-intent-in-intent-out-in-julia/66249 "2021-09-08T16:00:03Z")

</div>

In Fortran, we can specify intent(in), intent(out) for the arguments of function/subroutine, and this can help preventing bug, and possible help the compiler to do optimization. I learned from kargl in Fortran discourse…

---

## [Float.(randn(dims)) or randn(Float32, dims)](https://discourse.julialang.org/t/float-randn-dims-or-randn-float32-dims/67863)

<div class="topic-metadata">

**Author:** [@albheim](https://discourse.julialang.org/u/albheim)\
**Replies:** 6\
**Last updated:** [September 8, 2021, 2:14pm UTC](https://discourse.julialang.org/t/float-randn-dims-or-randn-float32-dims/67863 "2021-09-08T14:14:31Z")

</div>

Found a behaviour of randn that I didn’t really understand. Since there exists a version where you can select the type I assume that that would be more efficient than generating and then converting, but it seems that thi…

---

## [Using Julia in a containerized Nextflow pipeline](https://discourse.julialang.org/t/using-julia-in-a-containerized-nextflow-pipeline/67871)

<div class="topic-metadata">

**Author:** [@MillironX](https://discourse.julialang.org/u/MillironX)\
**Replies:** 0\
**Last updated:** [September 8, 2021, 12:33pm UTC](https://discourse.julialang.org/t/using-julia-in-a-containerized-nextflow-pipeline/67871 "2021-09-08T12:33:35Z")

</div>

I’m using Julia scripts inside of a container-based Nextflow pipeline. Basically, the pipeline script will pull a fresh Julia Singularity image, add the bin directory associated with the pipeline directory to PATH, and t…

---

## [How to indicate a specific path to julia libdl find\_library()?](https://discourse.julialang.org/t/how-to-indicate-a-specific-path-to-julia-libdl-find-library/67794)

<div class="topic-metadata">

**Author:** [@Julie96](https://discourse.julialang.org/u/Julie96)\
**Replies:** 6\
**Last updated:** [September 8, 2021, 9:20am UTC](https://discourse.julialang.org/t/how-to-indicate-a-specific-path-to-julia-libdl-find-library/67794 "2021-09-08T09:20:24Z")

</div>

copy paste of this thread : I’m trying to indicate a specific path to find\_library(). Based on the doc, find\_library() Searches for the first library in names in the paths in the locations list, DL\_LOAD\_PATH, or syste…

---

## [Distributed workers automatically load code on "using"](https://discourse.julialang.org/t/distributed-workers-automatically-load-code-on-using/67809)

<div class="topic-metadata">

**Author:** [@albheim](https://discourse.julialang.org/u/albheim)\
**Replies:** 2\
**Last updated:** [September 8, 2021, 7:23am UTC](https://discourse.julialang.org/t/distributed-workers-automatically-load-code-on-using/67809 "2021-09-08T07:23:22Z")

</div>

So in the docs for distributed we have: Finally, if DummyModule.jl is not a standalone file but a package, then using DummyModule will load DummyModule.jl on all processes, but only bring it into scope on the process w…

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

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