# General Usage

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

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

**Page:** 311

---

## [How to base64encode a BigInt?](https://discourse.julialang.org/t/how-to-base64encode-a-bigint/96668)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 4\
**Last updated:** [March 28, 2023, 2:13pm UTC](https://discourse.julialang.org/t/how-to-base64encode-a-bigint/96668 "2023-03-28T14:13:08Z")

</div>

I was surprised finding that base64encode does not work for BigInt. Can someone help? julia\> using Base64 julia\> base64encode(BigInt(1234123)) ERROR: MethodError: no method matching write(::Base64EncodePipe, ::BigInt) C…

---

## ["Very optimised" Julia code 50x slower than Python with compiled functions](https://discourse.julialang.org/t/very-optimised-julia-code-50x-slower-than-python-with-compiled-functions/96712)

<div class="topic-metadata">

**Author:** [@StarecZosima](https://discourse.julialang.org/u/StarecZosima)\
**Replies:** 3\
**Last updated:** [March 28, 2023, 2:02pm UTC](https://discourse.julialang.org/t/very-optimised-julia-code-50x-slower-than-python-with-compiled-functions/96712 "2023-03-28T14:02:42Z")

</div>

Hi All, I am doing some Monte Carlo computation using Python (compiling some functions to C++ using the Numba package). I thought I would see how Julia compares. As is good programming practice, I scraped some code fr…

---

## [Relocatability of @\_\_DIR\_\_](https://discourse.julialang.org/t/relocatability-of-dir/96700)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 2\
**Last updated:** [March 28, 2023, 1:49pm UTC](https://discourse.julialang.org/t/relocatability-of-dir/96700 "2023-03-28T13:49:46Z")

</div>

I am using the DIR macro in a function like: function foo() return joinpath(@\_\_DIR\_\_, "myfile.ext") end If function foo() gets precompiled using PackageCompiler.jl into a sysimage, the @\_\_DIR\_\_ is “hardcoded” into …

---

## [Inverting a symmetric matrix is not faster than inverting a random one](https://discourse.julialang.org/t/inverting-a-symmetric-matrix-is-not-faster-than-inverting-a-random-one/96654)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 15\
**Last updated:** [March 27, 2023, 3:25pm UTC](https://discourse.julialang.org/t/inverting-a-symmetric-matrix-is-not-faster-than-inverting-a-random-one/96654 "2023-03-27T15:25:13Z")

</div>

I thought that inverting a symmetric matrix would be faster, since there are optimised algorithms and I also saw that there is a method explicity for Symmetric, but maybe I am overlooking some trivial things, so please h…

---

## [Package load speed: Windows vs Linux](https://discourse.julialang.org/t/package-load-speed-windows-vs-linux/93039)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 24\
**Last updated:** [March 28, 2023, 12:21pm UTC](https://discourse.julialang.org/t/package-load-speed-windows-vs-linux/93039 "2023-03-28T12:21:21Z")

</div>

I have a feeling that Julia package import times are significantly faster on Linux than on Windows. See e.g. this thread where: @giordano’s seven-year-old Linux laptop loads Unitful in 0.44 seconds my two-year-old Win…

---

## [DifferentialEquations Package Kills Performance Everywhere when TruncatedStacktraces is used](https://discourse.julialang.org/t/differentialequations-package-kills-performance-everywhere-when-truncatedstacktraces-is-used/96417)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 41\
**Last updated:** [March 28, 2023, 11:52am UTC](https://discourse.julialang.org/t/differentialequations-package-kills-performance-everywhere-when-truncatedstacktraces-is-used/96417 "2023-03-28T11:52:38Z")

</div>

After loading the DifferentialEquations.jl package in the REPL, Julia seems to start performing very slowly, possibly only when text is output to the REPL, but in a way that makes the REPL extremely frustrating to use. S…

---

## [How can i improve the performance of the code?](https://discourse.julialang.org/t/how-can-i-improve-the-performance-of-the-code/96622)

<div class="topic-metadata">

**Author:** [@manu\_han](https://discourse.julialang.org/u/manu_han)\
**Replies:** 9\
**Last updated:** [March 28, 2023, 10:17am UTC](https://discourse.julialang.org/t/how-can-i-improve-the-performance-of-the-code/96622 "2023-03-28T10:17:51Z")

</div>

I’m a newbie of julia, and I want to improve the performance of the code included massive iteration and calculation. I Even I red the manual, but I have no ability to adapt all of the solutions… Here is simplified cod…

---

## [Questions when installing ReservoirComputing](https://discourse.julialang.org/t/questions-when-installing-reservoircomputing/96229)

<div class="topic-metadata">

**Author:** [@lw\_zuo](https://discourse.julialang.org/u/lw_zuo)\
**Replies:** 4\
**Last updated:** [March 28, 2023, 7:35am UTC](https://discourse.julialang.org/t/questions-when-installing-reservoircomputing/96229 "2023-03-28T07:35:00Z")

</div>

(@v1.7) pkg\> add ReservoirComputing Updating registry at \`C:\\Users\\Seven\\.julia\\registries\\General.toml\` Resolving package versions... No Changes to \`C:\\Users\\Seven\\.julia\\environments\\v1.7\\Project.toml\` No Ch…

---

## [ProfileView and Benchmark Disagree on Timing for Simple Matrix Multiplication](https://discourse.julialang.org/t/profileview-and-benchmark-disagree-on-timing-for-simple-matrix-multiplication/96069)

<div class="topic-metadata">

**Author:** [@andrew-saydjari](https://discourse.julialang.org/u/andrew-saydjari)\
**Replies:** 13\
**Last updated:** [March 28, 2023, 3:28am UTC](https://discourse.julialang.org/t/profileview-and-benchmark-disagree-on-timing-for-simple-matrix-multiplication/96069 "2023-03-28T03:28:00Z")

</div>

I am trying to benchmark and improve the cost for matrix multiplication for a custom type I have implemented. But, in trying to do that, I have become confused about the profile and benchmarking results for a simple matr…

---

## [Preferred way of using dependencies of a module](https://discourse.julialang.org/t/preferred-way-of-using-dependencies-of-a-module/96680)

<div class="topic-metadata">

**Author:** [@touste](https://discourse.julialang.org/u/touste)\
**Replies:** 2\
**Last updated:** [March 27, 2023, 9:38pm UTC](https://discourse.julialang.org/t/preferred-way-of-using-dependencies-of-a-module/96680 "2023-03-27T21:38:35Z")

</div>

I wonder what is the difference between: \] add GLMakie # Note that this installs several dependencies, including GeometryBasics using GLMakie using GLMakie.GeometryBasics \] add GLMakie GeometryBasics using GLMa…

---

## [Parse vector from string](https://discourse.julialang.org/t/parse-vector-from-string/10728)

<div class="topic-metadata">

**Author:** [@cortner](https://discourse.julialang.org/u/cortner)\
**Replies:** 24\
**Last updated:** [March 27, 2023, 9:24pm UTC](https://discourse.julialang.org/t/parse-vector-from-string/10728 "2023-03-27T21:24:00Z")

</div>

I can parse(Int, „123“) but I cannot find a simple way to parse(Vector{Int}, „\[1, 2, 3\]”). Is there a “canned” solution?

---

## [Is there an alternative for JUNO?](https://discourse.julialang.org/t/is-there-an-alternative-for-juno/96672)

<div class="topic-metadata">

**Author:** [@halov](https://discourse.julialang.org/u/halov)\
**Replies:** 4\
**Last updated:** [March 27, 2023, 8:31pm UTC](https://discourse.julialang.org/t/is-there-an-alternative-for-juno/96672 "2023-03-27T20:31:04Z")

</div>

tody i want to download JUNO baesd on atom ide. But atom doesn’t seem to work anymore. so Is there an alternative for JUNO?

---

## [Filtering elements of a generator without collecting](https://discourse.julialang.org/t/filtering-elements-of-a-generator-without-collecting/96664)

<div class="topic-metadata">

**Author:** [@cgois](https://discourse.julialang.org/u/cgois)\
**Replies:** 5\
**Last updated:** [March 27, 2023, 8:21pm UTC](https://discourse.julialang.org/t/filtering-elements-of-a-generator-without-collecting/96664 "2023-03-27T20:21:56Z")

</div>

Hi everyone, I am playing around with iterators and I have the following problem. Lets us say we want to compute using Random weights = shuffle(vcat(1:5, zeros(5))); mats = (randn(10, 10) for \_ in 1:10) # Or any genera…

---

## [Using TaylorSeries.jl for functions with many variables (~1000)](https://discourse.julialang.org/t/using-taylorseries-jl-for-functions-with-many-variables-1000/96643)

<div class="topic-metadata">

**Author:** [@ejmeitz](https://discourse.julialang.org/u/ejmeitz)\
**Replies:** 20\
**Last updated:** [March 27, 2023, 6:02pm UTC](https://discourse.julialang.org/t/using-taylorseries-jl-for-functions-with-many-variables-1000/96643 "2023-03-27T18:02:55Z")

</div>

I have an application where I need all possible 3rd and 4th order derivatives of a function w.r.t. that function’s inputs. TaylorSeries.jl works brilliantly for this in my toy model; however, my actual use case requires …

---

## [Iterating over an Iterator with map, for loop and threads: Memory usage and performance](https://discourse.julialang.org/t/iterating-over-an-iterator-with-map-for-loop-and-threads-memory-usage-and-performance/96561)

<div class="topic-metadata">

**Author:** [@cgois](https://discourse.julialang.org/u/cgois)\
**Replies:** 4\
**Last updated:** [March 27, 2023, 5:18pm UTC](https://discourse.julialang.org/t/iterating-over-an-iterator-with-map-for-loop-and-threads-memory-usage-and-performance/96561 "2023-03-27T17:18:38Z")

</div>

Warning: In this original benchmarks there was a problem with my usage of @btime, as pointed by @mikmoore. See the corrected benchmarks (which already solve question Q1) in a reply below. Hi everyone. I am playing arou…

---

## [Split .txt file into several DataFrames](https://discourse.julialang.org/t/split-txt-file-into-several-dataframes/96526)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 5\
**Last updated:** [March 27, 2023, 4:10pm UTC](https://discourse.julialang.org/t/split-txt-file-into-several-dataframes/96526 "2023-03-27T16:10:02Z")

</div>

Hello :grin:, I would like to load a .txt file and split it inot several DataFrames . The file has the following general structure: #Name: #Id: #Dosename: #RoiName:brain #Roi volume #Unit: Gy 0.000 100.000 0.290 89.0 …

---

## [Language: "tensor" vs "array"](https://discourse.julialang.org/t/language-tensor-vs-array/96590)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 7\
**Last updated:** [March 27, 2023, 3:12pm UTC](https://discourse.julialang.org/t/language-tensor-vs-array/96590 "2023-03-27T15:12:32Z")

</div>

When (in which situations) would you employ the word “tensor” and when instead you would stick to “array” to describe a generic n-dimensional “matrix”, for example to describe your API ?

---

## [Module loading problem](https://discourse.julialang.org/t/module-loading-problem/96601)

<div class="topic-metadata">

**Author:** [@Sokar](https://discourse.julialang.org/u/Sokar)\
**Replies:** 8\
**Last updated:** [March 27, 2023, 11:30am UTC](https://discourse.julialang.org/t/module-loading-problem/96601 "2023-03-27T11:30:18Z")

</div>

Hello there I’m trying to understand how to use modules probably, but I’m finding the way they work and how they are loaded kinda messing. The following example yields would I expect on the first run, but every subseque…

---

## [How to derivative using ForwardDiff](https://discourse.julialang.org/t/how-to-derivative-using-forwarddiff/96269)

<div class="topic-metadata">

**Author:** [@KotaAihara](https://discourse.julialang.org/u/KotaAihara)\
**Replies:** 5\
**Last updated:** [March 27, 2023, 10:18am UTC](https://discourse.julialang.org/t/how-to-derivative-using-forwarddiff/96269 "2023-03-27T10:18:23Z")

</div>

I want any help. I want derivative a quadratic form function using ForwardDiff X,T = 80,52 param = \[σ,μ\] function q(param::AbstractVector{T}) where T σ = param\[1\] V = zeros(T,T) for i in 1:T for j …

---

## [Is there some functionality to spit out LaTeX code for typesetting matrices?](https://discourse.julialang.org/t/is-there-some-functionality-to-spit-out-latex-code-for-typesetting-matrices/22219)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 10\
**Last updated:** [March 27, 2023, 4:48am UTC](https://discourse.julialang.org/t/is-there-some-functionality-to-spit-out-latex-code-for-typesetting-matrices/22219 "2023-03-27T04:48:05Z")

</div>

For instance to typeset 3 x 3 random matrix of floats, I would like to call a function (or a macro) to produce the typesetting code. Is there such a thing?

---

## [Generate mesh from SDF](https://discourse.julialang.org/t/generate-mesh-from-sdf/96618)

<div class="topic-metadata">

**Author:** [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Replies:** 8\
**Last updated:** [March 27, 2023, 3:03am UTC](https://discourse.julialang.org/t/generate-mesh-from-sdf/96618 "2023-03-27T03:03:38Z")

</div>

Suppose I have a simple signed-distance function/field (SDF) defined natively in Julia. Is there an easy way to generate a mesh of this SDF (eg to use within an FEM simulation)? Nothing fancy wrt the type of mesh etc. I…

---

## [Is there a way to run code from @code\_native](https://discourse.julialang.org/t/is-there-a-way-to-run-code-from-code-native/96644)

<div class="topic-metadata">

**Author:** [@Zentrik](https://discourse.julialang.org/u/Zentrik)\
**Replies:** 1\
**Last updated:** [March 27, 2023, 2:47am UTC](https://discourse.julialang.org/t/is-there-a-way-to-run-code-from-code-native/96644 "2023-03-27T02:47:41Z")

</div>

I want to @code\_native a function, make some edits to the assembly and then run it. For example a function I want to edit is using SIMD f(x, y) = any(x \> y) x = Vec{8, Float32}(1) y = Vec{8, Float32}(0) I would like…

---

## [How to start a julia process on a remote machine with multiple threads?](https://discourse.julialang.org/t/how-to-start-a-julia-process-on-a-remote-machine-with-multiple-threads/96628)

<div class="topic-metadata">

**Author:** [@lucasmsoares96](https://discourse.julialang.org/u/lucasmsoares96)\
**Replies:** 3\
**Last updated:** [March 26, 2023, 5:20pm UTC](https://discourse.julialang.org/t/how-to-start-a-julia-process-on-a-remote-machine-with-multiple-threads/96628 "2023-03-26T17:20:05Z")

</div>

When starting a Julia session with the following command julia --machine-file machine-file.txt -p 2, the processes created on the remote machine have only one thread, even with the environment variable JULIA\_NUM\_THREADS …

---

## [View and boolean indexing](https://discourse.julialang.org/t/view-and-boolean-indexing/96609)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 4\
**Last updated:** [March 26, 2023, 5:14pm UTC](https://discourse.julialang.org/t/view-and-boolean-indexing/96609 "2023-03-26T17:14:25Z")

</div>

This old thread brought up an important question about why view(x,boolean\_indices) is slow. One reply said “So the TLDR is: Mixing views and logical indices is currently no good.” It seems to be that we still have this …

---

## [Help writing a timeout macro](https://discourse.julialang.org/t/help-writing-a-timeout-macro/16591)

<div class="topic-metadata">

**Author:** [@lstagner](https://discourse.julialang.org/u/lstagner)\
**Replies:** 12\
**Last updated:** [March 26, 2023, 12:32pm UTC](https://discourse.julialang.org/t/help-writing-a-timeout-macro/16591 "2023-03-26T12:32:16Z")

</div>

I have a function that can either execute quickly or take a very long time. I want to kill the function after a certain amount of time so I can fall back on a more reliable method. I should be able to do this using a mac…

---

## [Short delay for first input action in v1.9.0-rc1](https://discourse.julialang.org/t/short-delay-for-first-input-action-in-v1-9-0-rc1/96600)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 4\
**Last updated:** [March 26, 2023, 11:37am UTC](https://discourse.julialang.org/t/short-delay-for-first-input-action-in-v1-9-0-rc1/96600 "2023-03-26T11:37:21Z")

</div>

Hi all, I am using Julia v1.9.0-rc1 and I noticed that there is a short delay for the first action when start Julia (for example in REPL), delayed about 2 seconds. Is this normal? I install Julia through Juliaup and…

---

## [Using the end keyword as a function argument](https://discourse.julialang.org/t/using-the-end-keyword-as-a-function-argument/96615)

<div class="topic-metadata">

**Author:** [@SantiagoOrtiz](https://discourse.julialang.org/u/SantiagoOrtiz)\
**Replies:** 3\
**Last updated:** [March 26, 2023, 2:13am UTC](https://discourse.julialang.org/t/using-the-end-keyword-as-a-function-argument/96615 "2023-03-26T02:13:22Z")

</div>

Hi, Is there any way to pass the end keyword as an argument in a function or another index (i.e., -1 in python) to point to the last position of an array? a = \[1 2 3 4 5\] function f1(a, n) return a\[n\] end f1(a, e…

---

## [Libcurl error with Julia nightly](https://discourse.julialang.org/t/libcurl-error-with-julia-nightly/96604)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 0\
**Last updated:** [March 25, 2023, 7:19pm UTC](https://discourse.julialang.org/t/libcurl-error-with-julia-nightly/96604 "2023-03-25T19:19:59Z")

</div>

I am finding this error when trying to build docs with Franklin and Julia nightly ERROR: Unsatisfiable requirements detected for package LibCURL\_jll \[deac9b47\]: LibCURL\_jll \[deac9b47\] log: ├─possible versions are: 8.0…

---

## [Best way to Synchronize Threads/Lock variables in a nontrivial computation](https://discourse.julialang.org/t/best-way-to-synchronize-threads-lock-variables-in-a-nontrivial-computation/96157)

<div class="topic-metadata">

**Author:** [@eduardosalaz](https://discourse.julialang.org/u/eduardosalaz)\
**Replies:** 4\
**Last updated:** [March 25, 2023, 7:44am UTC](https://discourse.julialang.org/t/best-way-to-synchronize-threads-lock-variables-in-a-nontrivial-computation/96157 "2023-03-25T07:44:10Z")

</div>

Hi everyone. I have several questions regarding Parallel/Concurrent Programming with Julia. I have an algorithm which in simple terms does the following: function main(iters) bestVal = 1e9 fields = generate\_fields…

---

## [Julia multithreading is running slower than serial, can someone please explain why…?](https://discourse.julialang.org/t/julia-multithreading-is-running-slower-than-serial-can-someone-please-explain-why/96545)

<div class="topic-metadata">

**Author:** [@nethaji8](https://discourse.julialang.org/u/nethaji8)\
**Replies:** 14\
**Last updated:** [March 24, 2023, 10:03pm UTC](https://discourse.julialang.org/t/julia-multithreading-is-running-slower-than-serial-can-someone-please-explain-why/96545 "2023-03-24T22:03:49Z")

</div>

I am trying to parallelize an algorithm which looks like this. I couldn’t express my code right in my previous post The following algorithm takes an element from an odd column and adds it to the adjacent even coloumn. u…

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

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