# General Usage

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

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

**Page:** 136

---

## [Why is Julia's performance more sensitive to memory allocations than Numpy's?](https://discourse.julialang.org/t/why-is-julias-performance-more-sensitive-to-memory-allocations-than-numpys/119013)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 19\
**Last updated:** [September 5, 2024, 7:49am UTC](https://discourse.julialang.org/t/why-is-julias-performance-more-sensitive-to-memory-allocations-than-numpys/119013 "2024-09-05T07:49:15Z")

</div>

This is a general, “deepening my understanding”-type question and it isn’t about a particular piece of code. If you read the performance section of this forum, a common pattern is for people to write code that does som…

---

## [\`read(stdin, Char)\` in REPL vs script](https://discourse.julialang.org/t/read-stdin-char-in-repl-vs-script/119014)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 4\
**Last updated:** [September 5, 2024, 2:26am UTC](https://discourse.julialang.org/t/read-stdin-char-in-repl-vs-script/119014 "2024-09-05T02:26:21Z")

</div>

I have a .jl file with one line script: i = read(stdin, Char) If I run it, and type ab in the REPL (without pressing the return key), I get: a'b': ASCII/Unicode U+0062 (category Ll: Letter, lowercase) julia\> i 'b': A…

---

## [Parse string representation of a vector into floats](https://discourse.julialang.org/t/parse-string-representation-of-a-vector-into-floats/119025)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 17\
**Last updated:** [September 5, 2024, 1:04am UTC](https://discourse.julialang.org/t/parse-string-representation-of-a-vector-into-floats/119025 "2024-09-05T01:04:30Z")

</div>

How can I parse the following string: "Float32\[0.0, 8.455541, 16.61883, 24.443338, 31.901924, 38.97408, 45.642822, 46.02448, 47.268967, 47.10146, 47.10146\]" as vector of Float32 values?

---

## [Using notebooks or Julia markdown with Documenter.jl](https://discourse.julialang.org/t/using-notebooks-or-julia-markdown-with-documenter-jl/119024)

<div class="topic-metadata">

**Author:** [@msw](https://discourse.julialang.org/u/msw)\
**Replies:** 4\
**Last updated:** [September 4, 2024, 6:30pm UTC](https://discourse.julialang.org/t/using-notebooks-or-julia-markdown-with-documenter-jl/119024 "2024-09-04T18:30:05Z")

</div>

I would like to use notebooks or Julia markdown (jmd) with Documenter.jl similarly to mkdocs-jupyter, but I cannot find any tutorials or examples on how to do so. My first idea was to use Weave.jl to generate markdown f…

---

## [Name conflicts when communicating between workers using @fetchfrom](https://discourse.julialang.org/t/name-conflicts-when-communicating-between-workers-using-fetchfrom/119048)

<div class="topic-metadata">

**Author:** [@frkalbayrock](https://discourse.julialang.org/u/frkalbayrock)\
**Replies:** 0\
**Last updated:** [September 4, 2024, 4:52pm UTC](https://discourse.julialang.org/t/name-conflicts-when-communicating-between-workers-using-fetchfrom/119048 "2024-09-04T16:52:25Z")

</div>

Hi all, I’ve encountered an issue with using the @fetchfrom macro to communicate data between different workers in a parallel computing setup in Julia. I am working on a problem where I need to manage a localized arrays…

---

## [Fitting gaussian to spectral data has unexpected results](https://discourse.julialang.org/t/fitting-gaussian-to-spectral-data-has-unexpected-results/118961)

<div class="topic-metadata">

**Author:** [@Amnesian](https://discourse.julialang.org/u/Amnesian)\
**Replies:** 3\
**Last updated:** [September 4, 2024, 11:58am UTC](https://discourse.julialang.org/t/fitting-gaussian-to-spectral-data-has-unexpected-results/118961 "2024-09-04T11:58:54Z")

</div>

My data Trying to fit a gaussian (not Normal, because it has arbitrary amplitude) on a peak in my data produces very bad parameter values. Expected should be close to my initial guesses, but it outputs \[14936.1701885188…

---

## [MethodError for same type after includes / modules](https://discourse.julialang.org/t/methoderror-for-same-type-after-includes-modules/118771)

<div class="topic-metadata">

**Author:** [@lcm](https://discourse.julialang.org/u/lcm)\
**Replies:** 10\
**Last updated:** [September 4, 2024, 8:17am UTC](https://discourse.julialang.org/t/methoderror-for-same-type-after-includes-modules/118771 "2024-09-04T08:17:09Z")

</div>

If you define a type / struct in one file (here typetest\_types.jl): module Types struct TestType end end and then use it in a separate file in different modules, both including typetest\_types.jl, then one module can no…

---

## [Working with Symbolics.jl... how to extract terms from a sum etc?](https://discourse.julialang.org/t/working-with-symbolics-jl-how-to-extract-terms-from-a-sum-etc/95886)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 3\
**Last updated:** [September 4, 2024, 7:40am UTC](https://discourse.julialang.org/t/working-with-symbolics-jl-how-to-extract-terms-from-a-sum-etc/95886 "2024-09-04T07:40:43Z")

</div>

I have a simple example I’m trying to construct in which I define an expression in h that has a variable f, substitute f for a linear function of h and then expand that to get a polynomial in h. So far, so good… Now what…

---

## [VS Code julia environment dosen't match REPL environment](https://discourse.julialang.org/t/vs-code-julia-environment-dosent-match-repl-environment/86517)

<div class="topic-metadata">

**Author:** [@cstook](https://discourse.julialang.org/u/cstook)\
**Replies:** 7\
**Last updated:** [September 4, 2024, 7:22am UTC](https://discourse.julialang.org/t/vs-code-julia-environment-dosent-match-repl-environment/86517 "2024-09-04T07:22:11Z")

</div>

Should the environment activated in the REPL match the Julia env in the VS Code status bar?

---

## [Multiple Methods](https://discourse.julialang.org/t/multiple-methods/119006)

<div class="topic-metadata">

**Author:** [@Mirsad\_Cosovic](https://discourse.julialang.org/u/Mirsad_Cosovic)\
**Replies:** 10\
**Last updated:** [September 4, 2024, 2:05am UTC](https://discourse.julialang.org/t/multiple-methods/119006 "2024-09-04T02:05:27Z")

</div>

Hello, I have multiple methods with the same name but different argument types. When I add a fourth method with a distinct argument type, I observe a significant increase in memory allocations during the first run. I un…

---

## [Build PyCall with error in installing miniconda](https://discourse.julialang.org/t/build-pycall-with-error-in-installing-miniconda/118790)

<div class="topic-metadata">

**Author:** [@lvyuemeng](https://discourse.julialang.org/u/lvyuemeng)\
**Replies:** 21\
**Last updated:** [September 3, 2024, 9:23pm UTC](https://discourse.julialang.org/t/build-pycall-with-error-in-installing-miniconda/118790 "2024-09-03T21:23:29Z")

</div>

When I built PyCall, I found that miniforge can’t be installed on the path with non-ascii chararcters which is my username. So I manually installed the miniforge and set the env. But in this case, julia can’t manage pyth…

---

## [Map! for Zygote.Buffer](https://discourse.julialang.org/t/map-for-zygote-buffer/119007)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 0\
**Last updated:** [September 3, 2024, 8:19pm UTC](https://discourse.julialang.org/t/map-for-zygote-buffer/119007 "2024-09-03T20:19:16Z")

</div>

map!(f,y,x) wants y::AbstractArray which means it doesn’t work on Zygote.Buffer. I want to use map! and I’m wondering if that constraint can be removed to solve the problem. using Zygote julia\> let xs = rand(5), ys = Z…

---

## [Is this normal things about MvNormal?](https://discourse.julialang.org/t/is-this-normal-things-about-mvnormal/118999)

<div class="topic-metadata">

**Author:** [@JULIAAAAA](https://discourse.julialang.org/u/JULIAAAAA)\
**Replies:** 5\
**Last updated:** [September 3, 2024, 4:01pm UTC](https://discourse.julialang.org/t/is-this-normal-things-about-mvnormal/118999 "2024-09-03T16:01:00Z")

</div>

Hello, I’m beginner of Julia. When I draw samples from Multivariate Normal, it uses multicores of my computers. Especially, when N \> 63, they uses 8 cores. If this things are normal things, and If I don’t wan’t to use…

---

## [Set up pipe between existing Julia processes](https://discourse.julialang.org/t/set-up-pipe-between-existing-julia-processes/118960)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 6\
**Last updated:** [September 3, 2024, 2:43pm UTC](https://discourse.julialang.org/t/set-up-pipe-between-existing-julia-processes/118960 "2024-09-03T14:43:31Z")

</div>

Is there a way to set up a pipe between two Julia process that are already running, assuming that the two already have another method of communication to execute code (example: worker process on the same machine started …

---

## [Simplifying Symbolics.jl expression](https://discourse.julialang.org/t/simplifying-symbolics-jl-expression/118935)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 2\
**Last updated:** [September 3, 2024, 2:12pm UTC](https://discourse.julialang.org/t/simplifying-symbolics-jl-expression/118935 "2024-09-03T14:12:28Z")

</div>

I’m adding to the list of posts about simplifying a Symbolics.jl expression, but I wanted to check if I did something wrong or if it is an internal limitation. I want to check if two (lengthy) expressions are identical, …

---

## [Change depth of sidebar in Documenter](https://discourse.julialang.org/t/change-depth-of-sidebar-in-documenter/5317)

<div class="topic-metadata">

**Author:** [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)\
**Replies:** 4\
**Last updated:** [September 3, 2024, 1:44pm UTC](https://discourse.julialang.org/t/change-depth-of-sidebar-in-documenter/5317 "2024-09-03T13:44:49Z")

</div>

The sidebar of documenter has depth equal to 2 (that’s the default) and I want to set the depth of that menu to 3. How can I do that? Best regards

---

## [Julia-based Makefile replacement for research workflows](https://discourse.julialang.org/t/julia-based-makefile-replacement-for-research-workflows/74368)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 7\
**Last updated:** [September 3, 2024, 1:17pm UTC](https://discourse.julialang.org/t/julia-based-makefile-replacement-for-research-workflows/74368 "2024-09-03T13:17:45Z")

</div>

I’m playing around with DrWatson to organize research workflows. It feels like it would be nice to also have a Makefile in a project repository that defines which scripts produce which output file. The idea would be to s…

---

## [How go back one release with juliaup](https://discourse.julialang.org/t/how-go-back-one-release-with-juliaup/118984)

<div class="topic-metadata">

**Author:** [@pao](https://discourse.julialang.org/u/pao)\
**Replies:** 3\
**Last updated:** [September 3, 2024, 11:30am UTC](https://discourse.julialang.org/t/how-go-back-one-release-with-juliaup/118984 "2024-09-03T11:30:08Z")

</div>

Hi, guys, I have installed my latest Julia releases with juliaup. Below is my status. How go back to the previous release (1.10.4+0.x64.apple.darwin14 ) ? I suppose just one commend is sufficient … but I was unable …

---

## [Precompilation warning - in which package should it be fixed?](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 9\
**Last updated:** [September 3, 2024, 10:36am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520 "2024-09-03T10:36:47Z")

</div>

If I run the following script: #!/bin/bash -eu rm -rf /tmp/testdepot mkdir /tmp/testdepot rm -rf /tmp/test mkdir /tmp/test cd /tmp/test export JULIA\_DEPOT\_PATH=/tmp/testdepot julia --project="." -e "using Pkg; Pkg.add(…

---

## [CUDA and estimation of parameters of a Differential Equation](https://discourse.julialang.org/t/cuda-and-estimation-of-parameters-of-a-differential-equation/118941)

<div class="topic-metadata">

**Author:** [@Marta\_Pardo\_Araujo](https://discourse.julialang.org/u/Marta_Pardo_Araujo)\
**Replies:** 1\
**Last updated:** [September 3, 2024, 9:29am UTC](https://discourse.julialang.org/t/cuda-and-estimation-of-parameters-of-a-differential-equation/118941 "2024-09-03T09:29:58Z")

</div>

I am trying to estimate three parameters of a ODE system with 368 equations couple. Since it is a big system I have decided to use CUDA as recommeded by other colleagues to speed up the process. Because the ODE is writte…

---

## [Retrieve unevaluated symbol inside \`@eval\`](https://discourse.julialang.org/t/retrieve-unevaluated-symbol-inside-eval/118978)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 1\
**Last updated:** [September 3, 2024, 9:23am UTC](https://discourse.julialang.org/t/retrieve-unevaluated-symbol-inside-eval/118978 "2024-09-03T09:23:56Z")

</div>

In one of my packages I use @eval to define a list of functions in a loop based on symbols. I would also like to use the symbol without evaluating it, but I can’t figure out how. Maybe it’s an XY problem? julia\> for s i…

---

## [Testing Julia 1.10.5: Circular dependency detected warning](https://discourse.julialang.org/t/testing-julia-1-10-5-circular-dependency-detected-warning/118723)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 16\
**Last updated:** [September 3, 2024, 8:59am UTC](https://discourse.julialang.org/t/testing-julia-1-10-5-circular-dependency-detected-warning/118723 "2024-09-03T08:59:48Z")

</div>

Just installed Julia 1.10.5, and I am getting new warnings: ┌ Warning: Circular dependency detected. Precompilation will be skipped for: │ CSV \[336ed68f-0bac-5ca0-87d4-7b16caf5d00b\] │ FilePathsBaseTestExt \[36f6b4e4-…

---

## [Loading arbitrary user code in a package (including imports)](https://discourse.julialang.org/t/loading-arbitrary-user-code-in-a-package-including-imports/118917)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 8\
**Last updated:** [September 3, 2024, 4:56am UTC](https://discourse.julialang.org/t/loading-arbitrary-user-code-in-a-package-including-imports/118917 "2024-09-03T04:56:50Z")

</div>

I don’t really see a way how this is possible, but just to make sure that I’m not missing anything – I have a package with the following function, which takes a user-supplied .jl file and includes it in an ad-hoc module: …

---

## [Assigning result of @load to a variable](https://discourse.julialang.org/t/assigning-result-of-load-to-a-variable/118827)

<div class="topic-metadata">

**Author:** [@julien-arino](https://discourse.julialang.org/u/julien-arino)\
**Replies:** 5\
**Last updated:** [September 2, 2024, 11:22pm UTC](https://discourse.julialang.org/t/assigning-result-of-load-to-a-variable/118827 "2024-09-02T23:22:50Z")

</div>

Sorry, I am quite new to julia… From looking around, this may be linked to serialization, but I am not sure. In R, I would do (sorry to the R purists, I am one of these “=” \<=\> “\<-” people): a = 2 saveRDS(a, "example.Rd…

---

## [Literate scripts within Documenter cause LiveServer loop](https://discourse.julialang.org/t/literate-scripts-within-documenter-cause-liveserver-loop/63319)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [September 2, 2024, 11:18pm UTC](https://discourse.julialang.org/t/literate-scripts-within-documenter-cause-liveserver-loop/63319 "2024-09-02T23:18:34Z")

</div>

I’m trying to use Literate.markdown to generate pages for Documenter. The repo is here. I’m using the make.jl code below. using Documenter using Literate for file ∈ \["Chapter 1: Dynamics.jl"\] Literate.markdown( …

---

## [Understanding data movement with Distributed.jl](https://discourse.julialang.org/t/understanding-data-movement-with-distributed-jl/100680)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 1\
**Last updated:** [September 2, 2024, 11:00pm UTC](https://discourse.julialang.org/t/understanding-data-movement-with-distributed-jl/100680 "2024-09-02T23:00:02Z")

</div>

As outlined in the manual, Multi-processing and Distributed Computing · The Julia Language, Distributed.jl performs “implicit” data movement operations between the different processes. Unfortunately, that page doesn’t re…

---

## [LaTeX in HTML string in Pluto](https://discourse.julialang.org/t/latex-in-html-string-in-pluto/64571)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 1\
**Last updated:** [September 2, 2024, 5:36pm UTC](https://discourse.julialang.org/t/latex-in-html-string-in-pluto/64571 "2024-09-02T17:36:18Z")

</div>

I’ve been trying to run a snippet from a notebook that was built with an older version of Pluto in the latest release and my LaTeX isn’t rendering. Here’s the code cell: html""" \<table class="no-border"\> \<tbody\> \<tr\> \<t…

---

## [Reading files embedded in a Zip-file](https://discourse.julialang.org/t/reading-files-embedded-in-a-zip-file/10675)

<div class="topic-metadata">

**Author:** [@johann.spies](https://discourse.julialang.org/u/johann.spies)\
**Replies:** 10\
**Last updated:** [September 2, 2024, 3:46pm UTC](https://discourse.julialang.org/t/reading-files-embedded-in-a-zip-file/10675 "2024-09-02T15:46:47Z")

</div>

I am exploring InfoZIP. Variable “fn” contains the filename. julia\> d = open\_zip(fn) julia\> d.keys 6-element Array{AbstractString,1}: "WR\_2004\_20180215203106\_CORE\_0001.xml.gz" "WR\_2004\_20180215203106\_CORE\_0002.xml.g…

---

## [Extending broadcast to vector-like struct](https://discourse.julialang.org/t/extending-broadcast-to-vector-like-struct/118905)

<div class="topic-metadata">

**Author:** [@Goncalo\_Pena](https://discourse.julialang.org/u/Goncalo_Pena)\
**Replies:** 8\
**Last updated:** [September 2, 2024, 2:29pm UTC](https://discourse.julialang.org/t/extending-broadcast-to-vector-like-struct/118905 "2024-09-02T14:29:04Z")

</div>

Hi, I’m trying to implement a vector-like struct and I would like for it to behave wrt broadcasting, just as a regular vector. My struct is something like: struct NewVector values::Vector{Float64} text::String…

---

## [Type stable specializations of \`getproperty\` without code duplication?](https://discourse.julialang.org/t/type-stable-specializations-of-getproperty-without-code-duplication/92404)

<div class="topic-metadata">

**Author:** [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Replies:** 20\
**Last updated:** [September 2, 2024, 2:12pm UTC](https://discourse.julialang.org/t/type-stable-specializations-of-getproperty-without-code-duplication/92404 "2024-09-02T14:12:56Z")

</div>

I have a parametric type that I’m trying to specialize getproperty for. There are some properties which I’d like to always access independently of the type parameter, and there are some that only apply to specific type p…

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

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