# General Usage

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

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

**Page:** 132

---

## [Several questions about time evaluation with @time](https://discourse.julialang.org/t/several-questions-about-time-evaluation-with-time/119455)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 7\
**Last updated:** [September 16, 2024, 3:32pm UTC](https://discourse.julialang.org/t/several-questions-about-time-evaluation-with-time/119455 "2024-09-16T15:32:47Z")

</div>

For example, if we want to evaluate the time cost of the following code snippet: total = 0 for i in 1:100000000 total += i end Standard practice is as follows (right?): First, write it into a function: function m…

---

## [Warning: Module TranscodingStreams with build ID fafbfcfd-709b-c95f-0000-2059ac53b05f is missing from the cache](https://discourse.julialang.org/t/warning-module-transcodingstreams-with-build-id-fafbfcfd-709b-c95f-0000-2059ac53b05f-is-missing-from-the-cache/119459)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [September 17, 2024, 3:25pm UTC](https://discourse.julialang.org/t/warning-module-transcodingstreams-with-build-id-fafbfcfd-709b-c95f-0000-2059ac53b05f-is-missing-from-the-cache/119459 "2024-09-17T15:25:51Z")

</div>

┌ Warning: Module TranscodingStreams with build ID fafbfcfd-709b-c95f-0000-2059ac53b05f is missing from the cache. │ This may mean TranscodingStreams \[3bb67fe8-82b1-5028-8e26-92a6c54297fa\] does not support precompilation…

---

## [Module parameters and run-time efficiency](https://discourse.julialang.org/t/module-parameters-and-run-time-efficiency/119505)

<div class="topic-metadata">

**Author:** [@jhidding](https://discourse.julialang.org/u/jhidding)\
**Replies:** 3\
**Last updated:** [September 17, 2024, 3:17pm UTC](https://discourse.julialang.org/t/module-parameters-and-run-time-efficiency/119505 "2024-09-17T15:17:57Z")

</div>

Hi, I want to perform dispatch based on functions of the same name within a module. There’s two ways to go about it: having a function f(m::Module,...) or defining a trait type and saying f(::Type{Mod{M}}, ...) where M. …

---

## [How to trigger loading an extension module programatically?](https://discourse.julialang.org/t/how-to-trigger-loading-an-extension-module-programatically/119485)

<div class="topic-metadata">

**Author:** [@peremato](https://discourse.julialang.org/u/peremato)\
**Replies:** 4\
**Last updated:** [September 17, 2024, 2:23pm UTC](https://discourse.julialang.org/t/how-to-trigger-loading-an-extension-module-programatically/119485 "2024-09-17T14:23:33Z")

</div>

In the package Geant4 I have a couple of extension modules (G4Vis and G4Hist). To trigger the loading of G4Vis I need to explicitly load a list of weakdeps packages (Makie, Colors, StaticArrays, Rotations, LinearAlgebra,…

---

## [Array of tuples to DataFrame](https://discourse.julialang.org/t/array-of-tuples-to-dataframe/119494)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [September 17, 2024, 12:30pm UTC](https://discourse.julialang.org/t/array-of-tuples-to-dataframe/119494 "2024-09-17T12:30:11Z")

</div>

How can I convert an array of tuples (NOT named tuples) into a DataFrame? Code to create an array of named tuples: parking\_sections = \[\] for i in 1:10 push!(parking\_sections, (i, rand(1)\[1\])) end

---

## [Using JIT32 to solve ODE systems through diffeqpy](https://discourse.julialang.org/t/using-jit32-to-solve-ode-systems-through-diffeqpy/119475)

<div class="topic-metadata">

**Author:** [@Hector\_Yaker](https://discourse.julialang.org/u/Hector_Yaker)\
**Replies:** 1\
**Last updated:** [September 17, 2024, 5:56am UTC](https://discourse.julialang.org/t/using-jit32-to-solve-ode-systems-through-diffeqpy/119475 "2024-09-17T05:56:09Z")

</div>

Hey, I’ve been having a lot of trouble when converting a prob into JIT32 when using as a base a Python ODE System which integrates externally defined functions. I have noticed that it’s related to the fact that Julia con…

---

## [Strings and static compilation](https://discourse.julialang.org/t/strings-and-static-compilation/119474)

<div class="topic-metadata">

**Author:** [@Anthony.Anikos](https://discourse.julialang.org/u/Anthony.Anikos)\
**Replies:** 1\
**Last updated:** [September 16, 2024, 9:15pm UTC](https://discourse.julialang.org/t/strings-and-static-compilation/119474 "2024-09-16T21:15:58Z")

</div>

Hi! Does anyone know how to translate a string variable of type julia\_string‘=’hello’ into a C-like string equivalent to c ‘Hello’ which StaticCompilator accepts and does not swear at incorrect characters… Thanks in…

---

## [How to create a Cstring from a String?](https://discourse.julialang.org/t/how-to-create-a-cstring-from-a-string/98566)

<div class="topic-metadata">

**Author:** [@heyx3](https://discourse.julialang.org/u/heyx3)\
**Replies:** 4\
**Last updated:** [May 9, 2023, 6:57pm UTC](https://discourse.julialang.org/t/how-to-create-a-cstring-from-a-string/98566 "2023-05-09T18:57:59Z")

</div>

I’m trying to implement callback functions for a C library, to get and set the clipboard text. My functions look like this: clipboard\_get(::Ptr{Cvoid})::Cstring = string(clipboard()) const CLIPBOARD\_FN\_GET = @cfunction(…

---

## [Time integration in OrdinaryDiffEq.jl in Julia is slower than calling it from Python](https://discourse.julialang.org/t/time-integration-in-ordinarydiffeq-jl-in-julia-is-slower-than-calling-it-from-python/119123)

<div class="topic-metadata">

**Author:** [@dmitry-kabanov](https://discourse.julialang.org/u/dmitry-kabanov)\
**Replies:** 12\
**Last updated:** [September 16, 2024, 7:17pm UTC](https://discourse.julialang.org/t/time-integration-in-ordinarydiffeq-jl-in-julia-is-slower-than-calling-it-from-python/119123 "2024-09-16T19:17:43Z")

</div>

Hi, I work on the software that allows to call numerical solvers across different languages, which is implemented using libffi (Function Foreign Interface library). I was working recently on the performance study, to s…

---

## [Wrap2pi: what should it do?](https://discourse.julialang.org/t/wrap2pi-what-should-it-do/119441)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 26\
**Last updated:** [September 16, 2024, 3:18pm UTC](https://discourse.julialang.org/t/wrap2pi-what-should-it-do/119441 "2024-09-16T15:18:58Z")

</div>

I wrote the following function: """ wrap2pi(angle) Limit the angle to the range -π .. π . """ function wrap2pi(angle) if angle == pi return pi end num2pi = floor(angle / 2π + 0.5) angle - 2π…

---

## [Nested for loops vs Iterators.product performance](https://discourse.julialang.org/t/nested-for-loops-vs-iterators-product-performance/119417)

<div class="topic-metadata">

**Author:** [@Nichola](https://discourse.julialang.org/u/Nichola)\
**Replies:** 16\
**Last updated:** [September 16, 2024, 1:40pm UTC](https://discourse.julialang.org/t/nested-for-loops-vs-iterators-product-performance/119417 "2024-09-16T13:40:42Z")

</div>

Assume I have some vectors a,b,c… and I want to compute \\sum\_{ijk..} a\_i b\_j c\_k ... For 3 lists, I can do it using nested for loops : function sumprod1(a, b, c) s = 0 for i in 1:length(a) for j in 1:l…

---

## [Embedding Julia : Error on init : Unable to find compatible target in cached code image. Target 0 (goldmont): Rejecting this target due to use of runtime-disabled features](https://discourse.julialang.org/t/embedding-julia-error-on-init-unable-to-find-compatible-target-in-cached-code-image-target-0-goldmont-rejecting-this-target-due-to-use-of-runtime-disabled-features/119457)

<div class="topic-metadata">

**Author:** [@Luc\_W](https://discourse.julialang.org/u/Luc_W)\
**Replies:** 4\
**Last updated:** [September 16, 2024, 10:37am UTC](https://discourse.julialang.org/t/embedding-julia-error-on-init-unable-to-find-compatible-target-in-cached-code-image-target-0-goldmont-rejecting-this-target-due-to-use-of-runtime-disabled-features/119457 "2024-09-16T10:37:23Z")

</div>

On Windows 11 with Visual Studio 2022 I can embed Julia (version is 1.10.2) and that works fine. When I test the code inside a sandbox or on a different new computer, the initialisation fails and the error I get is : Un…

---

## [How to obtain x instead of f(x) from maximum/minimum(f, itr)](https://discourse.julialang.org/t/how-to-obtain-x-instead-of-f-x-from-maximum-minimum-f-itr/119456)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 11\
**Last updated:** [September 16, 2024, 9:10am UTC](https://discourse.julialang.org/t/how-to-obtain-x-instead-of-f-x-from-maximum-minimum-f-itr/119456 "2024-09-16T09:10:10Z")

</div>

maximum(f, itr) returns f(x). Is there a function that instead returns x, something like sort(itr; by=f)\[end\]? I also need the init keyword, which findmax does not have (a similar issue is open for argmax: \`argmin\`/\`arg…

---

## [Using Symbolic simplification in DataFramesMeta macros](https://discourse.julialang.org/t/using-symbolic-simplification-in-dataframesmeta-macros/119446)

<div class="topic-metadata">

**Author:** [@s-baumann](https://discourse.julialang.org/u/s-baumann)\
**Replies:** 8\
**Last updated:** [September 15, 2024, 11:28pm UTC](https://discourse.julialang.org/t/using-symbolic-simplification-in-dataframesmeta-macros/119446 "2024-09-15T23:28:30Z")

</div>

In DataFramesMeta it is possible to evaluate algebraic combinations and calculations involving the column names of a DataFrame. Is it possible (in DataFramesMeta or another package that can be placed inside as part of i…

---

## [How to specify 1.11-rc as test target on GitHub?](https://discourse.julialang.org/t/how-to-specify-1-11-rc-as-test-target-on-github/119437)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [September 15, 2024, 10:59pm UTC](https://discourse.julialang.org/t/how-to-specify-1-11-rc-as-test-target-on-github/119437 "2024-09-15T22:59:22Z")

</div>

The title says it all…

---

## [Request for advice on workflow in distributed team of scientists](https://discourse.julialang.org/t/request-for-advice-on-workflow-in-distributed-team-of-scientists/119425)

<div class="topic-metadata">

**Author:** [@Davide98888](https://discourse.julialang.org/u/Davide98888)\
**Replies:** 13\
**Last updated:** [September 15, 2024, 8:45pm UTC](https://discourse.julialang.org/t/request-for-advice-on-workflow-in-distributed-team-of-scientists/119425 "2024-09-15T20:45:25Z")

</div>

Hello I am sorry for the stupid question. I work in a group of scientists in many places. All our work is organised in dropbox, using mac, linux and windows. We do science, code is a necessity, and minimise complexity. …

---

## [How to use convexhull in Meshes.jl?](https://discourse.julialang.org/t/how-to-use-convexhull-in-meshes-jl/119440)

<div class="topic-metadata">

**Author:** [@p\_f](https://discourse.julialang.org/u/p_f)\
**Replies:** 4\
**Last updated:** [September 15, 2024, 7:58pm UTC](https://discourse.julialang.org/t/how-to-use-convexhull-in-meshes-jl/119440 "2024-09-15T19:58:22Z")

</div>

I found the convexhull function in Meshes.jl: convexhull doc The docs description “Convex hull of object.” I have a vector of 2d points: julia\> points 1000-element Vector{Vector{Float64}}: \[0.5090075873973284, 0.793…

---

## [Symbolics 'solve' command undefined](https://discourse.julialang.org/t/symbolics-solve-command-undefined/118766)

<div class="topic-metadata">

**Author:** [@Paul\_Warburton](https://discourse.julialang.org/u/Paul_Warburton)\
**Replies:** 26\
**Last updated:** [September 15, 2024, 6:56pm UTC](https://discourse.julialang.org/t/symbolics-solve-command-undefined/118766 "2024-09-15T18:56:08Z")

</div>

I have copied code from the Symbolics package as shown, but I get the ‘solve’ function is undefined. I must be doing something wrong but I do not see what mistake i am m aking. Any help would be appreciated. Thank you …

---

## [Revise Not Working with DrWatson Use Case](https://discourse.julialang.org/t/revise-not-working-with-drwatson-use-case/119360)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 1\
**Last updated:** [September 15, 2024, 1:02pm UTC](https://discourse.julialang.org/t/revise-not-working-with-drwatson-use-case/119360 "2024-09-15T13:02:56Z")

</div>

Hello, I am having an issue with Revise. I’ll lay out some context and hopefully that will help illustrate the problem. Let’s say I have a package I am developing called MyPackage. Since I am developing it and frequent…

---

## [How to increase the stack size of Julia threads?](https://discourse.julialang.org/t/how-to-increase-the-stack-size-of-julia-threads/70359)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 2\
**Last updated:** [September 15, 2024, 12:15pm UTC](https://discourse.julialang.org/t/how-to-increase-the-stack-size-of-julia-threads/70359 "2024-09-15T12:15:28Z")

</div>

I’m doing multiple recursive computations (Welzl’s algorithm) in parallel using Threads.@threads, producing a stack overflow. This is on latest Linux and Julia 1.7.0-rc2. How do increase the size of a thread’s stack? (…

---

## [Information about the two methods of \`internalnorm\`](https://discourse.julialang.org/t/information-about-the-two-methods-of-internalnorm/119383)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 5\
**Last updated:** [September 15, 2024, 8:27am UTC](https://discourse.julialang.org/t/information-about-the-two-methods-of-internalnorm/119383 "2024-09-15T08:27:13Z")

</div>

Hi, I am using DifferentialEquations.jl and want to implement my own internalnorm function with specific weights for the purpose of timestep adaptation. I would appreciate some extra information about how the function is…

---

## [How to adapt the timestep based on a subset of states](https://discourse.julialang.org/t/how-to-adapt-the-timestep-based-on-a-subset-of-states/119363)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 5\
**Last updated:** [September 15, 2024, 7:53am UTC](https://discourse.julialang.org/t/how-to-adapt-the-timestep-based-on-a-subset-of-states/119363 "2024-09-15T07:53:47Z")

</div>

Hi, I am using DifferentialEquations.jl with ComponentArrays.jl to not only integrate the state of my system but also some additional variables (by-products) which I later need to interpolate at arbitrary times (using “f…

---

## [Performance of loop over multi-dimensional array limited by getindex](https://discourse.julialang.org/t/performance-of-loop-over-multi-dimensional-array-limited-by-getindex/119421)

<div class="topic-metadata">

**Author:** [@jpmoliveira](https://discourse.julialang.org/u/jpmoliveira)\
**Replies:** 6\
**Last updated:** [September 15, 2024, 6:46am UTC](https://discourse.julialang.org/t/performance-of-loop-over-multi-dimensional-array-limited-by-getindex/119421 "2024-09-15T06:46:10Z")

</div>

Hey everyone, I am trying to write a decently fast solver for the electric potential along a mesh given a charge distribution using a Gauss-Seidel method with SOR. Essentially, I have two 3d arrays within a struct and …

---

## [ERROR: failed to clone from GitHub](https://discourse.julialang.org/t/error-failed-to-clone-from-github/119403)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [September 15, 2024, 4:17am UTC](https://discourse.julialang.org/t/error-failed-to-clone-from-github/119403 "2024-09-15T04:17:56Z")

</div>

I suddenly can’t add packages from github, for example: (jl\_WqeLMM) pkg\> add https://github.com/JuliaPolyhedra/Polyhedra.jl#master Cloning git-repo \`https://github.com/JuliaPolyhedra/Polyhedra.jl\` ERROR: failed to …

---

## [Installing Julia 1.10.5 on a 2011 Mac Pro 2.3 GHz Intel Core i5](https://discourse.julialang.org/t/installing-julia-1-10-5-on-a-2011-mac-pro-2-3-ghz-intel-core-i5/119404)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 7\
**Last updated:** [September 14, 2024, 5:54pm UTC](https://discourse.julialang.org/t/installing-julia-1-10-5-on-a-2011-mac-pro-2-3-ghz-intel-core-i5/119404 "2024-09-14T17:54:46Z")

</div>

Hi, I have a student who has a 2011 Mac Pro with a 2.3 GHz Intel Core i5 processor. She installed Julia v 1.10.5, but it failed when she tried to run it. She tried the installation using the two alternatives: manually an…

---

## [Go To Definition (F12) does not work for functions in an included file](https://discourse.julialang.org/t/go-to-definition-f12-does-not-work-for-functions-in-an-included-file/76293)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 4\
**Last updated:** [September 14, 2024, 10:24am UTC](https://discourse.julialang.org/t/go-to-definition-f12-does-not-work-for-functions-in-an-included-file/76293 "2024-09-14T10:24:19Z")

</div>

When I highlight the name of a function foo that was defined in a file myfile.jl that was included in my code like this: # Contents of myfile.jl some code include(myfile.jl) some more code x = foo(y) still more code wh…

---

## [How to manage interactions between two separate package extensions](https://discourse.julialang.org/t/how-to-manage-interactions-between-two-separate-package-extensions/119269)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 18\
**Last updated:** [September 14, 2024, 10:23am UTC](https://discourse.julialang.org/t/how-to-manage-interactions-between-two-separate-package-extensions/119269 "2024-09-14T10:23:33Z")

</div>

I am preparing a new package to handle periodic matrices, which has two package extensions, say PackageExt1 and PackageExt2, which additionally define and manipulate two new (periodic) matrix types PM1 and PM2, respectiv…

---

## [Fill SVector with uniformly sampled Float32 values](https://discourse.julialang.org/t/fill-svector-with-uniformly-sampled-float32-values/119386)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 5\
**Last updated:** [September 14, 2024, 6:57am UTC](https://discourse.julialang.org/t/fill-svector-with-uniformly-sampled-float32-values/119386 "2024-09-14T06:57:33Z")

</div>

There are quite a few topics on this, eg: Performance of generating uniform Float32 numbers Given the current default behavior hasn’t been fixed, I tried a few things. As a baseline, these all return Float64: Edit: Ba…

---

## [Flux.data ? why is data undefined?](https://discourse.julialang.org/t/flux-data-why-is-data-undefined/103219)

<div class="topic-metadata">

**Author:** [@Ananya\_Hazarika](https://discourse.julialang.org/u/Ananya_Hazarika)\
**Replies:** 1\
**Last updated:** [September 14, 2024, 5:16am UTC](https://discourse.julialang.org/t/flux-data-why-is-data-undefined/103219 "2024-09-14T05:16:21Z")

</div>

in this: data = Iterators.repeated((), 100) opt = ADAM(0.1) cb = function () #callback function to observe training display(loss\_rd\_dde()) using remake to re-create our prob with current parameters p display(plot(so…

---

## [Why does definite integration in SymbolicNumericIntegration.jl produce different outputs in these cases?](https://discourse.julialang.org/t/why-does-definite-integration-in-symbolicnumericintegration-jl-produce-different-outputs-in-these-cases/119349)

<div class="topic-metadata">

**Author:** [@GregVernon](https://discourse.julialang.org/u/GregVernon)\
**Replies:** 1\
**Last updated:** [September 14, 2024, 4:48am UTC](https://discourse.julialang.org/t/why-does-definite-integration-in-symbolicnumericintegration-jl-produce-different-outputs-in-these-cases/119349 "2024-09-14T04:48:34Z")

</div>

Why does the SymbolicNumericIntegration.integrate function not seem to respect the detailed=false argument when using .( execution? Also, when then operating on a matrix, it seems to return the indefinite integral rathe…

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

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