# General Usage

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

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

**Page:** 93

---

## [Endless "Authentication failed" loop when updating packages](https://discourse.julialang.org/t/endless-authentication-failed-loop-when-updating-packages/125079)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 3\
**Last updated:** [January 23, 2025, 2:20pm UTC](https://discourse.julialang.org/t/endless-authentication-failed-loop-when-updating-packages/125079 "2025-01-23T14:20:55Z")

</div>

I’m getting stuck in an endless :Authentication failed" loop when I try to update my packages. I first got warnings that the authorisation for the toll v2 files could not be done and started looking for answers to that.…

---

## [DifferentialEquations failing to precompile](https://discourse.julialang.org/t/differentialequations-failing-to-precompile/125097)

<div class="topic-metadata">

**Author:** [@koppa](https://discourse.julialang.org/u/koppa)\
**Replies:** 7\
**Last updated:** [January 23, 2025, 10:45am UTC](https://discourse.julialang.org/t/differentialequations-failing-to-precompile/125097 "2025-01-23T10:45:29Z")

</div>

Hi, i recently installed Julia 1.11.2 from scratch in Ubuntu 24, and my first Pkg to install was DifferentialEquations. At the end there were only two dependencies precompiling: BoundaryValueDiffEqFIRK and BoundaryValueD…

---

## [Possible bug in Surrogates.jl RTEA](https://discourse.julialang.org/t/possible-bug-in-surrogates-jl-rtea/124524)

<div class="topic-metadata">

**Author:** [@ij05](https://discourse.julialang.org/u/ij05)\
**Replies:** 7\
**Last updated:** [January 23, 2025, 3:59am UTC](https://discourse.julialang.org/t/possible-bug-in-surrogates-jl-rtea/124524 "2025-01-23T03:59:35Z")

</div>

Hi, This is regarding a discrepancy that I have noticed while using the Surrogates.jl RTEA optimizer. I am not sure if this is the right medium to discuss regarding the same. Please let me know. I was going through the…

---

## [Preserve data behind nested pointers in ccall with array of structs of pointers](https://discourse.julialang.org/t/preserve-data-behind-nested-pointers-in-ccall-with-array-of-structs-of-pointers/124607)

<div class="topic-metadata">

**Author:** [@cshen](https://discourse.julialang.org/u/cshen)\
**Replies:** 3\
**Last updated:** [January 22, 2025, 11:18pm UTC](https://discourse.julialang.org/t/preserve-data-behind-nested-pointers-in-ccall-with-array-of-structs-of-pointers/124607 "2025-01-22T23:18:53Z")

</div>

Hello, I’m doing some FFI gymnastics but I am a bit lost in the woods. Here is a mock up of my situation: struct TAG\_DEF # this structure was automatically generated by Clang.jl name::Ptr{Cuchar} # string dims…

---

## [Error building FFTW on Windows](https://discourse.julialang.org/t/error-building-fftw-on-windows/125025)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [January 22, 2025, 8:46pm UTC](https://discourse.julialang.org/t/error-building-fftw-on-windows/125025 "2025-01-22T20:46:20Z")

</div>

Any idea: ERROR: LoadError: Unable to open libLLVM! ... in expression starting at C:\\Users\\runneradmin\\.julia\\packages\\FFTW\\oepdx\\deps\\build\_fftw.jl:1 in expression starting at C:\\Users\\runneradmin\\.julia\\packages\\FFT…

---

## [How to get rid of allocations in this simple filtered generator example?](https://discourse.julialang.org/t/how-to-get-rid-of-allocations-in-this-simple-filtered-generator-example/124847)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 3\
**Last updated:** [January 22, 2025, 6:45pm UTC](https://discourse.julialang.org/t/how-to-get-rid-of-allocations-in-this-simple-filtered-generator-example/124847 "2025-01-22T18:45:43Z")

</div>

Here’s a MWE of the allocating code (Julia 1.11.2): function foo() arr = \[Ref(i) for i=1:100\] iter = (i for i in arr if rand()\>0) @time begin elem, state = iterate(iter) while true …

---

## [Calculating "triple" dot products](https://discourse.julialang.org/t/calculating-triple-dot-products/124840)

<div class="topic-metadata">

**Author:** [@kevinli1993](https://discourse.julialang.org/u/kevinli1993)\
**Replies:** 14\
**Last updated:** [January 22, 2025, 3:29pm UTC](https://discourse.julialang.org/t/calculating-triple-dot-products/124840 "2025-01-22T15:29:49Z")

</div>

I have Float64 arrays x, y, z and want to compute sum(x\[i\] \* y\[i\] \* z\[i\]) over all indices i. I’m curious what is the fastest way to calculate this? Some ideas: a plain for loop Einsum.jl OMEinsum.jl LinearAlgebra.do…

---

## [Unsatisfiable requirements](https://discourse.julialang.org/t/unsatisfiable-requirements/125040)

<div class="topic-metadata">

**Author:** [@evmi](https://discourse.julialang.org/u/evmi)\
**Replies:** 3\
**Last updated:** [January 22, 2025, 11:45am UTC](https://discourse.julialang.org/t/unsatisfiable-requirements/125040 "2025-01-22T11:45:55Z")

</div>

I tried to add ApproxBayes to Julia@v1.11 and received an ERROR: Unsatisfiable requirements detected for package StatsBase \[2913bbd2\] message. I retrograded StatsBase to a version within the compatibility window 0.24.0 -…

---

## [Benchmarking function compile time](https://discourse.julialang.org/t/benchmarking-function-compile-time/125013)

<div class="topic-metadata">

**Author:** [@AntonReinhard](https://discourse.julialang.org/u/AntonReinhard)\
**Replies:** 10\
**Last updated:** [January 22, 2025, 10:33am UTC](https://discourse.julialang.org/t/benchmarking-function-compile-time/125013 "2025-01-22T10:33:11Z")

</div>

I have some code that generates functions at runtime that vary greatly in size (10 to 100k lines of code). I’d like to benchmark the compilation of these functions. Is there any intended way to do this? Something like a …

---

## [CUDA app by PackageCompiler hangs at runtime on Ubuntu / Debian](https://discourse.julialang.org/t/cuda-app-by-packagecompiler-hangs-at-runtime-on-ubuntu-debian/124995)

<div class="topic-metadata">

**Author:** [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Replies:** 3\
**Last updated:** [January 22, 2025, 12:49am UTC](https://discourse.julialang.org/t/cuda-app-by-packagecompiler-hangs-at-runtime-on-ubuntu-debian/124995 "2025-01-22T00:49:08Z")

</div>

Dummy app made by PackageCompiler with CUDA@5.6.1 (latest) as sole dep hangs at runtime on Ubuntu 24 and Debian 12. Works on Windows. module Dummy function julia\_main()::Cint return 0 end end name = "Dummy" uuid = …

---

## [Replicating power law distribution](https://discourse.julialang.org/t/replicating-power-law-distribution/125021)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 4\
**Last updated:** [January 21, 2025, 10:24pm UTC](https://discourse.julialang.org/t/replicating-power-law-distribution/125021 "2025-01-21T22:24:08Z")

</div>

Hi, I am trying to generate a power law degree distribution using barabasi\_albert from Graphs.jl. I am having trouble replicating the figure 4 on page 7 of this resource. Please forgive me in advance if I am doing somet…

---

## [Package for Mixed Discrete Continuous Joint Distributions](https://discourse.julialang.org/t/package-for-mixed-discrete-continuous-joint-distributions/125048)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 0\
**Last updated:** [January 21, 2025, 9:47pm UTC](https://discourse.julialang.org/t/package-for-mixed-discrete-continuous-joint-distributions/125048 "2025-01-21T21:47:01Z")

</div>

I’m looking for a package that implements tools for working with mixed multivariate discrete continuous joint distributions. A simple wikipedia definition of this can be found at https://en.wikipedia.org/wiki/Joint\_proba…

---

## [Abysmal performance when reading block of data from disk with Julia](https://discourse.julialang.org/t/abysmal-performance-when-reading-block-of-data-from-disk-with-julia/124988)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 15\
**Last updated:** [January 21, 2025, 4:13pm UTC](https://discourse.julialang.org/t/abysmal-performance-when-reading-block-of-data-from-disk-with-julia/124988 "2025-01-21T16:13:49Z")

</div>

See the code below. const count = 10000 function create() v = rand(Int64, count) open("data.bin", "w") do ofile write(ofile, v) end end function test() open("data.bin") do ifile v = Vec…

---

## [Use Makie + LibGEOS](https://discourse.julialang.org/t/use-makie-libgeos/88420)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 3\
**Last updated:** [January 21, 2025, 2:51pm UTC](https://discourse.julialang.org/t/use-makie-libgeos/88420 "2025-01-21T14:51:14Z")

</div>

There is GeoInterfaceRecipes which allows to use LibGEOS along with Plots.jl. Is there a similar package for combining LibGEOS with Makie?

---

## [Exporting a julia library on iOS and Android](https://discourse.julialang.org/t/exporting-a-julia-library-on-ios-and-android/124975)

<div class="topic-metadata">

**Author:** [@Alfespo97](https://discourse.julialang.org/u/Alfespo97)\
**Replies:** 4\
**Last updated:** [January 21, 2025, 2:36pm UTC](https://discourse.julialang.org/t/exporting-a-julia-library-on-ios-and-android/124975 "2025-01-21T14:36:26Z")

</div>

Hi everyone, i’ve been using Julia for 2/3 months and i’ve created an optimization function with Ipopt to solve a non-linear problem. Now i want to export this function to a library to make it execute on smartphone with …

---

## [Isolating a test case from JET.@report\_opt](https://discourse.julialang.org/t/isolating-a-test-case-from-jet-report-opt/125018)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 0\
**Last updated:** [January 21, 2025, 1:38pm UTC](https://discourse.julialang.org/t/isolating-a-test-case-from-jet-report-opt/125018 "2025-01-21T13:38:35Z")

</div>

I am trying to find a type instability using JET.jl. The top-level code is inferred, but JET.@report\_opt reports a couple of instabilities that do not appear to affect the final type, yet cause allocations and runtime di…

---

## [Package or environment: What to recommend to new users?](https://discourse.julialang.org/t/package-or-environment-what-to-recommend-to-new-users/125017)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 0\
**Last updated:** [January 21, 2025, 1:14pm UTC](https://discourse.julialang.org/t/package-or-environment-what-to-recommend-to-new-users/125017 "2025-01-21T13:14:06Z")

</div>

I once put this question in the announcement post of PackageMaker.jl, but didn’t get much feedback on this point. May I try another attempt, now in a separate topic? The reason: In the (coming) documentation for the Pa…

---

## [Too large space to save figure](https://discourse.julialang.org/t/too-large-space-to-save-figure/125007)

<div class="topic-metadata">

**Author:** [@khaledharizb](https://discourse.julialang.org/u/khaledharizb)\
**Replies:** 0\
**Last updated:** [January 21, 2025, 10:04am UTC](https://discourse.julialang.org/t/too-large-space-to-save-figure/125007 "2025-01-21T10:04:36Z")

</div>

I would like to save a picture using the following code, however too large space appears. using Plots I1=2/3;I2=1;I3=2; plot(legend=false,grid=false,axis=false,aspect\_ratio=:equal,size=(700,700),camera=(-50,32),widen=tr…

---

## [External API calls during module \_\_init\_\_. Terrible idea or fine?](https://discourse.julialang.org/t/external-api-calls-during-module-init-terrible-idea-or-fine/124998)

<div class="topic-metadata">

**Author:** [@Amval](https://discourse.julialang.org/u/Amval)\
**Replies:** 2\
**Last updated:** [January 21, 2025, 8:58am UTC](https://discourse.julialang.org/t/external-api-calls-during-module-init-terrible-idea-or-fine/124998 "2025-01-21T08:58:56Z")

</div>

Hello everyone, I have the following module: module SideEffects function \_\_init\_\_() # load\_or\_fetch! does an API call to a service to retrieve a list # OR deserialises an object, if the call has already been done gl…

---

## [Julia package versioning is a real nightmare to me. What am I doing wrong?](https://discourse.julialang.org/t/julia-package-versioning-is-a-real-nightmare-to-me-what-am-i-doing-wrong/124982)

<div class="topic-metadata">

**Author:** [@tb877](https://discourse.julialang.org/u/tb877)\
**Replies:** 17\
**Last updated:** [January 21, 2025, 4:26am UTC](https://discourse.julialang.org/t/julia-package-versioning-is-a-real-nightmare-to-me-what-am-i-doing-wrong/124982 "2025-01-21T04:26:26Z")

</div>

Background: I’m developing some code on my macbook in the Julia release channel (1.11.2) and also using my university’s HPC which runs Julia 1.10.2. I’m running all the time into this kind of problem during development.…

---

## [Binaries made by PackageCompiler.jl hangs while maxing out RAM](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557)

<div class="topic-metadata">

**Author:** [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Replies:** 12\
**Last updated:** [January 21, 2025, 3:32am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557 "2025-01-21T03:32:16Z")

</div>

Linux binaries (WSL Ubuntu) made by PackageCompiler.jl hangs (\>1hr) while maxing out RAM. Windows binaries work though. How to debug?

---

## [Redefine Struct when working with REPL](https://discourse.julialang.org/t/redefine-struct-when-working-with-repl/25942)

<div class="topic-metadata">

**Author:** [@LudiWin](https://discourse.julialang.org/u/LudiWin)\
**Replies:** 10\
**Last updated:** [January 21, 2025, 2:03am UTC](https://discourse.julialang.org/t/redefine-struct-when-working-with-repl/25942 "2025-01-21T02:03:06Z")

</div>

Hi, I would like to use structs to bundle values in a way similar to pure OOP. So I would create a struct to encapsulate the relevant attributes. Down below is an example: struct Lion maneColor::String roar::…

---

## [Why does Julia threads in the following way?](https://discourse.julialang.org/t/why-does-julia-threads-in-the-following-way/124953)

<div class="topic-metadata">

**Author:** [@ttx002000](https://discourse.julialang.org/u/ttx002000)\
**Replies:** 6\
**Last updated:** [January 20, 2025, 7:29pm UTC](https://discourse.julialang.org/t/why-does-julia-threads-in-the-following-way/124953 "2025-01-20T19:29:20Z")

</div>

Here is a working example. There are two functions, the Coulomb\_matrix() function just takes in a vector of Float numbers, and gives out a matrix of float numbers. The test() is having strange behaviour. Here is the full…

---

## [Cant add or create new column for my data csv](https://discourse.julialang.org/t/cant-add-or-create-new-column-for-my-data-csv/124923)

<div class="topic-metadata">

**Author:** [@522Hendriadi\_DN](https://discourse.julialang.org/u/522Hendriadi_DN)\
**Replies:** 1\
**Last updated:** [January 20, 2025, 5:12pm UTC](https://discourse.julialang.org/t/cant-add-or-create-new-column-for-my-data-csv/124923 "2025-01-20T17:12:56Z")

</div>

hello everyone, im newbie in julia. i need help for my problem. I just to try using PyCall in my code. this is my code: using Pandas using Dates @pyimport re py""" import pandas as pd df = pd.read\_csv(" my path tweets.…

---

## [Is there anything like Python's import or Rust's mod/use in Julia?](https://discourse.julialang.org/t/is-there-anything-like-pythons-import-or-rusts-mod-use-in-julia/124960)

<div class="topic-metadata">

**Author:** [@Tehtiam](https://discourse.julialang.org/u/Tehtiam)\
**Replies:** 5\
**Last updated:** [January 20, 2025, 5:10pm UTC](https://discourse.julialang.org/t/is-there-anything-like-pythons-import-or-rusts-mod-use-in-julia/124960 "2025-01-20T17:10:29Z")

</div>

Hello, everyone. I am asking a question on Julia’s code loading mechanism. In Python, import some\_module can be used for both importing some package in site packages and loading a module file in the same directory. Howe…

---

## [Create\_library method not exporting the ccallable function](https://discourse.julialang.org/t/create-library-method-not-exporting-the-ccallable-function/124950)

<div class="topic-metadata">

**Author:** [@Sandy45](https://discourse.julialang.org/u/Sandy45)\
**Replies:** 0\
**Last updated:** [January 20, 2025, 6:29am UTC](https://discourse.julialang.org/t/create-library-method-not-exporting-the-ccallable-function/124950 "2025-01-20T06:29:36Z")

</div>

I am trying to precompile my module using create\_library method and try to call the functions exported in dll files from my julia app but create\_library isn’t exporting ccallable functions that has been created in my mod…

---

## [Simple, understandable iterator](https://discourse.julialang.org/t/simple-understandable-iterator/124937)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 0\
**Last updated:** [January 20, 2025, 1:24am UTC](https://discourse.julialang.org/t/simple-understandable-iterator/124937 "2025-01-20T01:24:44Z")

</div>

It’s been noted that a lot of Julia code has more unnecessary allocation and construction of containers than, say, Rust code. I think this is due in large part to Julia’s dual role as a programming language and an applic…

---

## [3D rigid body energy level - from Matlab to Julia](https://discourse.julialang.org/t/3d-rigid-body-energy-level-from-matlab-to-julia/124880)

<div class="topic-metadata">

**Author:** [@khaledharizb](https://discourse.julialang.org/u/khaledharizb)\
**Replies:** 3\
**Last updated:** [January 20, 2025, 9:14am UTC](https://discourse.julialang.org/t/3d-rigid-body-energy-level-from-matlab-to-julia/124880 "2025-01-20T09:14:12Z")

</div>

I would like to plot the energy level of the 3D rigid body, with Matlab found the following code clear all figure for H=\[.01:0.05:0.46 .5 .54:0.05:1.5\] I1=2;I2=1;I3=2/3; y1=\[-1:.0001:0\]; y2=sqrt(((2\*H-1/I3)-(1/I1-1/I3)…

---

## [How can different versions of julia in juliaup share a same \`startup.jl\` file?](https://discourse.julialang.org/t/how-can-different-versions-of-julia-in-juliaup-share-a-same-startup-jl-file/124948)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [January 20, 2025, 8:30am UTC](https://discourse.julialang.org/t/how-can-different-versions-of-julia-in-juliaup-share-a-same-startup-jl-file/124948 "2025-01-20T08:30:05Z")

</div>

How can different versions of julia in juliaup share a same startup.jl file? For example, I have installed julia v1.11.2 and v1.10.7 in juliaup and they both appears in the JULIAUP\_DEPOT\_PATH, but the startup.jl files a…

---

## [CPU threads stress test problem](https://discourse.julialang.org/t/cpu-threads-stress-test-problem/124849)

<div class="topic-metadata">

**Author:** [@Mohamad\_Badiez](https://discourse.julialang.org/u/Mohamad_Badiez)\
**Replies:** 3\
**Last updated:** [January 20, 2025, 7:54am UTC](https://discourse.julialang.org/t/cpu-threads-stress-test-problem/124849 "2025-01-20T07:54:56Z")

</div>

Hi everybody, I want to test my CPU threads in full load. I wrote this code: https://github.com/mbzadegan/Fortran\_Julia\_HPC/blob/main/cpu\_stress\_test.jl When I run it with the -t auto option, my CPU threads get a ful…

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

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