# General Usage

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

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

**Page:** 124

---

## [Julia Installation on RISC-V (Build Failing at 79%)](https://discourse.julialang.org/t/julia-installation-on-risc-v-build-failing-at-79/121047)

<div class="topic-metadata">

**Author:** [@karthick-govindaraj](https://discourse.julialang.org/u/karthick-govindaraj)\
**Replies:** 17\
**Last updated:** [October 14, 2024, 1:53pm UTC](https://discourse.julialang.org/t/julia-installation-on-risc-v-build-failing-at-79/121047 "2024-10-14T13:53:31Z")

</div>

I’m trying to build Julia from source for the RISC-V architecture by following the guide provided here: julia/doc/src/devdocs/build/riscv.md at master · alexfanqi/julia · GitHub. I’m running the script located in my RIS…

---

## [How to create Dense with initialed weights in vector](https://discourse.julialang.org/t/how-to-create-dense-with-initialed-weights-in-vector/121290)

<div class="topic-metadata">

**Author:** [@Yaozhong\_Liu](https://discourse.julialang.org/u/Yaozhong_Liu)\
**Replies:** 0\
**Last updated:** [October 14, 2024, 1:04pm UTC](https://discourse.julialang.org/t/how-to-create-dense-with-initialed-weights-in-vector/121290 "2024-10-14T13:04:19Z")

</div>

Hi I want to initialize a Dense with weights initialized. I don’t expect to use initializers in Flux package. I already have had a Float64 vector before and want to use it as weights. But I met error Blockquote us…

---

## [Install/update packages from startup.jl](https://discourse.julialang.org/t/install-update-packages-from-startup-jl/121288)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [October 14, 2024, 12:50pm UTC](https://discourse.julialang.org/t/install-update-packages-from-startup-jl/121288 "2024-10-14T12:50:43Z")

</div>

I am wondering if there is a robust solution to making sure that some packages are installed when startup.jl runs, periodically updating some (probably the same) packages. Eg one of these packages is Revise.jl, …

---

## [How do you make standalone programs in Julia?](https://discourse.julialang.org/t/how-do-you-make-standalone-programs-in-julia/105218)

<div class="topic-metadata">

**Author:** [@fxgn](https://discourse.julialang.org/u/fxgn)\
**Replies:** 21\
**Last updated:** [October 14, 2024, 8:16am UTC](https://discourse.julialang.org/t/how-do-you-make-standalone-programs-in-julia/105218 "2024-10-14T08:16:29Z")

</div>

I’m not talking about standalone executables and PackageCompiler, but rather about actual Julia code. It seems like all official documentation and unofficial tooling (eg. Revise) are focused on writing functions inside o…

---

## [Eliminate blank lines in doc output](https://discourse.julialang.org/t/eliminate-blank-lines-in-doc-output/119719)

<div class="topic-metadata">

**Author:** [@David\_Sagan](https://discourse.julialang.org/u/David_Sagan)\
**Replies:** 4\
**Last updated:** [October 14, 2024, 1:28am UTC](https://discourse.julialang.org/t/eliminate-blank-lines-in-doc-output/119719 "2024-10-14T01:28:07Z")

</div>

OK I know this is a relatively minor thing but it does irritate me. When I define documentation that has a list, there is a blank line between list items. This can take up a bit of space especially for long lists. Exampl…

---

## [Accumulate with init](https://discourse.julialang.org/t/accumulate-with-init/121266)

<div class="topic-metadata">

**Author:** [@bertschi](https://discourse.julialang.org/u/bertschi)\
**Replies:** 1\
**Last updated:** [October 13, 2024, 11:04pm UTC](https://discourse.julialang.org/t/accumulate-with-init/121266 "2024-10-13T23:04:41Z")

</div>

Just noticed that accumulate does not include its init value in the output vector. What is the reason for that choice? Including init would be handy for cases like: v = rand(10) accumulate(+, diff(v); init = v\[1\]) It …

---

## [Performance issue with Vectors vs. 1 Column Matrices](https://discourse.julialang.org/t/performance-issue-with-vectors-vs-1-column-matrices/121240)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 8\
**Last updated:** [October 13, 2024, 7:36pm UTC](https://discourse.julialang.org/t/performance-issue-with-vectors-vs-1-column-matrices/121240 "2024-10-13T19:36:38Z")

</div>

Buried inside a for loop of mine, I have a function which, morally, looks like: function f!(a,b) @. a = b; a end It gets used inside the for loop like: # construct vector x of length nx # construct vector y of len…

---

## [How do I convert a Float64 number to Int64?](https://discourse.julialang.org/t/how-do-i-convert-a-float64-number-to-int64/121244)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 7\
**Last updated:** [October 13, 2024, 7:19pm UTC](https://discourse.julialang.org/t/how-do-i-convert-a-float64-number-to-int64/121244 "2024-10-13T19:19:13Z")

</div>

Hello, Is it possible to convert a Float64 number directly to Int64? julia\> number=6.5 6.5 julia\> typeof(num) Float64 julia\> Int(number) ERROR: InexactError: Int64(6.5) Stacktrace: \[1\] Int64(x::Float64) @ Base ./…

---

## [Shared and stacked environments](https://discourse.julialang.org/t/shared-and-stacked-environments/119874)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 3\
**Last updated:** [October 13, 2024, 6:58pm UTC](https://discourse.julialang.org/t/shared-and-stacked-environments/119874 "2024-10-13T18:58:55Z")

</div>

A common case, you are working on your package, and need some additional packaged during the development only (for plotting, benchmarking, debugging etc.). You put them into your default environment, and soon the Manifes…

---

## [Type alias interferes with construction](https://discourse.julialang.org/t/type-alias-interferes-with-construction/121247)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 5\
**Last updated:** [October 13, 2024, 3:59pm UTC](https://discourse.julialang.org/t/type-alias-interferes-with-construction/121247 "2024-10-13T15:59:30Z")

</div>

Why does construction using the type alias for Hyperplane result in an error? using FastClosures, GLMakie, Random, Distributions, Parameters, Rotations, StaticArrays, LinearAlgebra, CoordinateTransformations, Makie, Mes…

---

## [Print command in Julia](https://discourse.julialang.org/t/print-command-in-julia/121213)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 9\
**Last updated:** [October 13, 2024, 5:50am UTC](https://discourse.julialang.org/t/print-command-in-julia/121213 "2024-10-13T05:50:38Z")

</div>

Hello, Should there be a " " sign in Julia to print variables and strings? In C/C++ language, " " sign is not needed to print the contents of a variable. Thank you.

---

## [How can this weird \`@profview\` vs \`@time\` result be explained?](https://discourse.julialang.org/t/how-can-this-weird-profview-vs-time-result-be-explained/121234)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 2\
**Last updated:** [October 13, 2024, 5:18am UTC](https://discourse.julialang.org/t/how-can-this-weird-profview-vs-time-result-be-explained/121234 "2024-10-13T05:18:39Z")

</div>

I’m trying to profile record in Makie to see where there might be optimization potential. So I was just calling @profview on a simple record invocation with a throwaway plot, like this: julia\> using GLMakie julia\> @pro…

---

## [Startup.jl error with OhMyREPL.jl as of v1.11](https://discourse.julialang.org/t/startup-jl-error-with-ohmyrepl-jl-as-of-v1-11/121241)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 2\
**Last updated:** [October 13, 2024, 4:15am UTC](https://discourse.julialang.org/t/startup-jl-error-with-ohmyrepl-jl-as-of-v1-11/121241 "2024-10-13T04:15:15Z")

</div>

As of v1.11, when using the recommended script to automatically start OhMyREPL.jl with Julia # ~/.julia/config/startup.jl atreplinit() do repl try @eval using OhMyREPL catch e @warn "error while …

---

## [Exponential smoothing for non-constant time steps](https://discourse.julialang.org/t/exponential-smoothing-for-non-constant-time-steps/121236)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 3\
**Last updated:** [October 12, 2024, 10:48pm UTC](https://discourse.julialang.org/t/exponential-smoothing-for-non-constant-time-steps/121236 "2024-10-12T22:48:01Z")

</div>

I played around with moving averages, but for an iterative algorithm and low memory requirements (storing a lot of values), exponential smoothing seems the way to go. To calculate the smoothed value over time I came up …

---

## [Remove package from general registry](https://discourse.julialang.org/t/remove-package-from-general-registry/71668)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 7\
**Last updated:** [October 12, 2024, 10:43pm UTC](https://discourse.julialang.org/t/remove-package-from-general-registry/71668 "2024-10-12T22:43:14Z")

</div>

How does one remove a package from the general registry? As in, un-register it so that it can no longer be added with using Pkg: Pkg.add(PackageName).

---

## [Optimize Apache Arrow data streaming over HTTP](https://discourse.julialang.org/t/optimize-apache-arrow-data-streaming-over-http/113692)

<div class="topic-metadata">

**Author:** [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Replies:** 29\
**Last updated:** [October 12, 2024, 6:56pm UTC](https://discourse.julialang.org/t/optimize-apache-arrow-data-streaming-over-http/113692 "2024-10-12T18:56:55Z")

</div>

Following a request on the Arrow.jl project, I started implementing a simple Julia example here. With the exeption of an upstream issue on macOS, it seems to work. However, the implementation seems to be less performant …

---

## [Bouncing Ball Example](https://discourse.julialang.org/t/bouncing-ball-example/121148)

<div class="topic-metadata">

**Author:** [@Muhammad\_Arsal](https://discourse.julialang.org/u/Muhammad_Arsal)\
**Replies:** 10\
**Last updated:** [October 12, 2024, 6:03pm UTC](https://discourse.julialang.org/t/bouncing-ball-example/121148 "2024-10-12T18:03:09Z")

</div>

has anyone tried bouncing ball example form the predefined examples? It does not run well enough for me. Any help???

---

## [Pre-allocating array efficiency](https://discourse.julialang.org/t/pre-allocating-array-efficiency/121207)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 5\
**Last updated:** [October 12, 2024, 4:52pm UTC](https://discourse.julialang.org/t/pre-allocating-array-efficiency/121207 "2024-10-12T16:52:22Z")

</div>

Hi there, my understanding was, in vague terms, that pre-allocating an array by specifying size and then populating the elements of that array was more efficient than defining an array without doing so. To test this I j…

---

## [Error by \`append(a::Vector{T}, b::Vector{T})::Vector{T} where T = vcat(a, b)\`](https://discourse.julialang.org/t/error-by-append-a-vector-t-b-vector-t-vector-t-where-t-vcat-a-b/121226)

<div class="topic-metadata">

**Author:** [@paalon](https://discourse.julialang.org/u/paalon)\
**Replies:** 1\
**Last updated:** [October 12, 2024, 3:52pm UTC](https://discourse.julialang.org/t/error-by-append-a-vector-t-b-vector-t-vector-t-where-t-vcat-a-b/121226 "2024-10-12T15:52:01Z")

</div>

The following shorter function definition gives the error but the longer definition doesn’t: julia\> append(a::Vector{T}, b::Vector{T})::Vector{T} where T = vcat(a, b) ERROR: UndefVarError: \`T\` not defined in \`Main\` Sugg…

---

## [Julia VS Code debugger crash](https://discourse.julialang.org/t/julia-vs-code-debugger-crash/120867)

<div class="topic-metadata">

**Author:** [@l8l](https://discourse.julialang.org/u/l8l)\
**Replies:** 13\
**Last updated:** [October 12, 2024, 10:16am UTC](https://discourse.julialang.org/t/julia-vs-code-debugger-crash/120867 "2024-10-12T10:16:42Z")

</div>

I am trying to debug code in the julia vscode debugger. Usually all goes well but when setting a breakpoint inside a function, that is called by an imported library, the debugger crashes when trying to display the variab…

---

## [~TidierData.jl~ - Apply Transform to Many Columns](https://discourse.julialang.org/t/tidierdata-jl-apply-transform-to-many-columns/120726)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 4\
**Last updated:** [October 12, 2024, 4:12am UTC](https://discourse.julialang.org/t/tidierdata-jl-apply-transform-to-many-columns/120726 "2024-10-12T04:12:29Z")

</div>

I have a dataset with a bunch of columns with string data that have the format “(1.0, 2.0)”. All of these columns end with the postfix “CI”. I’d like to apply a function that splits the numbers into the low and high valu…

---

## [Nice way to iterate through a triangular matrix](https://discourse.julialang.org/t/nice-way-to-iterate-through-a-triangular-matrix/101667)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 10\
**Last updated:** [October 12, 2024, 5:32am UTC](https://discourse.julialang.org/t/nice-way-to-iterate-through-a-triangular-matrix/101667 "2024-10-12T05:32:38Z")

</div>

I often need to loop through the upper/lower triangular section of a matrix and usually end up doing something like: A = reshape(1:25,5,5) for j in axes(A,2) for i in axes(A,1) if i\>j @show A\[i,…

---

## [\[ANN\] ECLGraphColor: graph coloring in parallel](https://discourse.julialang.org/t/ann-eclgraphcolor-graph-coloring-in-parallel/114077)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [October 12, 2024, 12:11am UTC](https://discourse.julialang.org/t/ann-eclgraphcolor-graph-coloring-in-parallel/114077 "2024-10-12T00:11:06Z")

</div>

A sophisticated algorithm implemented in an OpenMP library is wrapped in a thin layer. I use it for finite element mesh coloring.

---

## [Unable to reinstall release channel with Juliaup](https://discourse.julialang.org/t/unable-to-reinstall-release-channel-with-juliaup/121210)

<div class="topic-metadata">

**Author:** [@ElMissas](https://discourse.julialang.org/u/ElMissas)\
**Replies:** 1\
**Last updated:** [October 11, 2024, 11:47pm UTC](https://discourse.julialang.org/t/unable-to-reinstall-release-channel-with-juliaup/121210 "2024-10-11T23:47:14Z")

</div>

I was using Julia 1.10 in the release channel, and I updated it to 1.11. However, this version was giving me some problems with precompiling packages, so I wanted to downgrade to 1.10. I used juliaup add 1.10 to add the…

---

## [Julia seminar: sign up online](https://discourse.julialang.org/t/julia-seminar-sign-up-online/121171)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [October 11, 2024, 2:50pm UTC](https://discourse.julialang.org/t/julia-seminar-sign-up-online/121171 "2024-10-11T14:50:48Z")

</div>

ACES: Introduction to Julia | ACCESS Support (access-ci.org) Self-explanatory, I think.

---

## [\`Base.Docs.doc\` failing with 1.11.0](https://discourse.julialang.org/t/base-docs-doc-failing-with-1-11-0/121187)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 3\
**Last updated:** [October 11, 2024, 2:09pm UTC](https://discourse.julialang.org/t/base-docs-doc-failing-with-1-11-0/121187 "2024-10-11T14:09:02Z")

</div>

We are using the following function to modify docstrings of some of our types to “dynamically” add information: function \_finalize\_docstring(datatype::Type) binding = Base.Docs.aliasof(datatype, typeof(datatype)) …

---

## [Startup.jl errors in 1.11.0](https://discourse.julialang.org/t/startup-jl-errors-in-1-11-0/121193)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 1\
**Last updated:** [October 11, 2024, 12:43pm UTC](https://discourse.julialang.org/t/startup-jl-errors-in-1-11-0/121193 "2024-10-11T12:43:13Z")

</div>

My startup.jl file errors in Julia 1.11.0 and not in 1.10. atreplinit() do repl @eval begin using Revise using OhMyREPL using BenchmarkTools using Infiltrator end end with the message jakez@raspberrypi:~/dat…

---

## [PythonCall.jl with CondaPkg.jl in MPI scenario](https://discourse.julialang.org/t/pythoncall-jl-with-condapkg-jl-in-mpi-scenario/121191)

<div class="topic-metadata">

**Author:** [@J-C-Q](https://discourse.julialang.org/u/J-C-Q)\
**Replies:** 2\
**Last updated:** [October 11, 2024, 12:37pm UTC](https://discourse.julialang.org/t/pythoncall-jl-with-condapkg-jl-in-mpi-scenario/121191 "2024-10-11T12:37:31Z")

</div>

Hi everyone, I’m working on a julia package that has PythonCall.jl and CondaPkg.jl in its dependencies. Now, I want to do some calculations using my package on a cluster with MPI.jl. The problem is (this is my understa…

---

## [How to display Float64 with more digits](https://discourse.julialang.org/t/how-to-display-float64-with-more-digits/5628)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 16\
**Last updated:** [October 11, 2024, 11:36am UTC](https://discourse.julialang.org/t/how-to-display-float64-with-more-digits/5628 "2024-10-11T11:36:20Z")

</div>

I can’t find any reasonable solution to this seemingly simple issue. I want to make arrays of Float64 print with all their digits in the REPL. What method do I need to redefine for the array below to be printed with as m…

---

## [Vectorise summation over index in nested for loop](https://discourse.julialang.org/t/vectorise-summation-over-index-in-nested-for-loop/121158)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 7\
**Last updated:** [October 10, 2024, 11:33pm UTC](https://discourse.julialang.org/t/vectorise-summation-over-index-in-nested-for-loop/121158 "2024-10-10T23:33:32Z")

</div>

Given a function using LinearAlgebra function test(arr1, arr2, arr3, g) return 1 ./ (arr1 .+ arr2 .+ arr3 .+ im\*g) end N1 = 100000; arr1 = range(0,10,N1); N2 = 5000; arr2 = range(0,10,N2); N3 = 5000; arr3 = range…

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

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