# General Usage

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

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

**Page:** 107

---

## [We love sorting -- latest news in sorting](https://discourse.julialang.org/t/we-love-sorting-latest-news-in-sorting/100790)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 0\
**Last updated:** [June 24, 2023, 6:44pm UTC](https://discourse.julialang.org/t/we-love-sorting-latest-news-in-sorting/100790 "2023-06-24T18:44:37Z")

</div>

This post was inspired by this news article on Intel releasing version 2.0 of their SIMD sort code: Julia has something similar to this: which was presented at the 2019 JuliaCon. ChipSort, however, isn’t limited t…

---

## [Mesh 3D Creation](https://discourse.julialang.org/t/mesh-3d-creation/123414)

<div class="topic-metadata">

**Author:** [@Kamran\_Ali](https://discourse.julialang.org/u/Kamran_Ali)\
**Replies:** 4\
**Last updated:** [December 3, 2024, 4:33pm UTC](https://discourse.julialang.org/t/mesh-3d-creation/123414 "2024-12-03T16:33:41Z")

</div>

I have created a 3D Quad mesh for my model, created vertices and faces for bottom layer, top layer vertices, now i have to make it 3D, so if i apply the loft command, corner faces are created in the diagonal, issue is t…

---

## [Vector of Vectors / Vector of Tuples](https://discourse.julialang.org/t/vector-of-vectors-vector-of-tuples/123368)

<div class="topic-metadata">

**Author:** [@hssn15](https://discourse.julialang.org/u/hssn15)\
**Replies:** 6\
**Last updated:** [December 3, 2024, 4:27pm UTC](https://discourse.julialang.org/t/vector-of-vectors-vector-of-tuples/123368 "2024-12-03T16:27:49Z")

</div>

I am making a simulator and need to store data in pre-allocated storages. But, I am a bit confused and worried about the performance. I have two ways to create storage element. First way: storage = \[ (x1, y…

---

## [Issue while using PackageCompiler -](https://discourse.julialang.org/t/issue-while-using-packagecompiler/123384)

<div class="topic-metadata">

**Author:** [@Sholai](https://discourse.julialang.org/u/Sholai)\
**Replies:** 2\
**Last updated:** [December 3, 2024, 2:08pm UTC](https://discourse.julialang.org/t/issue-while-using-packagecompiler/123384 "2024-12-03T14:08:04Z")

</div>

Hi Guys, I am trying to use PackageCompiler to create sys image of certain packages, so that the compile time is saved everytime I enter the project. the creation and usage of .so is successful as long as I am using the…

---

## [Embedded julia catch exception](https://discourse.julialang.org/t/embedded-julia-catch-exception/123287)

<div class="topic-metadata">

**Author:** [@Sergey](https://discourse.julialang.org/u/Sergey)\
**Replies:** 1\
**Last updated:** [December 3, 2024, 12:10pm UTC](https://discourse.julialang.org/t/embedded-julia-catch-exception/123287 "2024-12-03T12:10:16Z")

</div>

Hi. Im trying to use julia as user function extension. So i embed it into my qt application. But if there is an error in julia code everything will crash. Is it possible to catch julia exceptions from c++ or i could …

---

## [Benchmark is moving target?](https://discourse.julialang.org/t/benchmark-is-moving-target/123376)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 2\
**Last updated:** [December 3, 2024, 10:06am UTC](https://discourse.julialang.org/t/benchmark-is-moving-target/123376 "2024-12-03T10:06:07Z")

</div>

I am doing Advent of Code again this year (not sure how long I’d stay haha) and tried to optimize a very simple function. Surprisingly, @btime is showing different number of allocations on 2nd run. Also, when I redefined…

---

## [Segmentation fault when using ccall to call a BLAS-like extension function from Intel MKL](https://discourse.julialang.org/t/segmentation-fault-when-using-ccall-to-call-a-blas-like-extension-function-from-intel-mkl/123377)

<div class="topic-metadata">

**Author:** [@NatSpring](https://discourse.julialang.org/u/NatSpring)\
**Replies:** 7\
**Last updated:** [December 3, 2024, 9:27am UTC](https://discourse.julialang.org/t/segmentation-fault-when-using-ccall-to-call-a-blas-like-extension-function-from-intel-mkl/123377 "2024-12-03T09:27:02Z")

</div>

I have written many Julia wrapper-functions that call routines from various parts of the Intel oneAPI library via the library’s .so file with ccall. This typically works without issue for BLAS routines, LAPACK routines a…

---

## [Pluto / PlutoSliderServer on Google Cloud Run](https://discourse.julialang.org/t/pluto-plutosliderserver-on-google-cloud-run/120731)

<div class="topic-metadata">

**Author:** [@JoseKling](https://discourse.julialang.org/u/JoseKling)\
**Replies:** 5\
**Last updated:** [December 3, 2024, 8:57am UTC](https://discourse.julialang.org/t/pluto-plutosliderserver-on-google-cloud-run/120731 "2024-12-03T08:57:23Z")

</div>

Hello all, I am trying to deploy some notebooks to Google Cloud Run. I set up PlutoSliderServer on a Docker container and locally everything works, but I can’t get it to work on Cloud Run. I got the server to start and …

---

## [Splitpath/joinpath for non-native paths?](https://discourse.julialang.org/t/splitpath-joinpath-for-non-native-paths/123336)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 9\
**Last updated:** [December 2, 2024, 11:44pm UTC](https://discourse.julialang.org/t/splitpath-joinpath-for-non-native-paths/123336 "2024-12-02T23:44:40Z")

</div>

This problem highlights a problem in Base.Filesystem. The natural way to do this conversion would be to use something along this line: joinpath( splitpath("a\\\\b\\\\c"; arch=Base.Arch.Windows); arch=Base.Arch.Linux )…

---

## [Using TestItemRunner snippets & modules when troubleshooting](https://discourse.julialang.org/t/using-testitemrunner-snippets-modules-when-troubleshooting/123057)

<div class="topic-metadata">

**Author:** [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Replies:** 2\
**Last updated:** [December 2, 2024, 7:04pm UTC](https://discourse.julialang.org/t/using-testitemrunner-snippets-modules-when-troubleshooting/123057 "2024-12-02T19:04:06Z")

</div>

I’ve been starting to use TestItemRunner’s new @testsnippet and @testmodule mechanisms to help organize testing code, and I’ve found it very helpful. One thing that’s a setback, though, is that if a test fails and I nee…

---

## [Makie to Simulate Turing Machine Tape](https://discourse.julialang.org/t/makie-to-simulate-turing-machine-tape/123183)

<div class="topic-metadata">

**Author:** [@CurryFavor](https://discourse.julialang.org/u/CurryFavor)\
**Replies:** 5\
**Last updated:** [December 2, 2024, 5:43pm UTC](https://discourse.julialang.org/t/makie-to-simulate-turing-machine-tape/123183 "2024-12-02T17:43:26Z")

</div>

Julia Makie supports recording of animated gif, etc. I wish to utilize this feature to create an animation of a Turing machine’s tape. I’d like the tape to appear such as follows (created using HTML) … My attempt…

---

## [To pluralize or not to pluralize the name of a package?](https://discourse.julialang.org/t/to-pluralize-or-not-to-pluralize-the-name-of-a-package/123311)

<div class="topic-metadata">

**Author:** [@David\_Sagan](https://discourse.julialang.org/u/David_Sagan)\
**Replies:** 8\
**Last updated:** [December 2, 2024, 5:32pm UTC](https://discourse.julialang.org/t/to-pluralize-or-not-to-pluralize-the-name-of-a-package/123311 "2024-12-02T17:32:50Z")

</div>

According to the Julia package naming guidelines (5. Creating Packages · Pkg.jl): Packages that provide most of their functionality in association with a new type should have pluralized names. DataFrames provides the…

---

## [Static array multiplied by its adjoint seems to allocate](https://discourse.julialang.org/t/static-array-multiplied-by-its-adjoint-seems-to-allocate/123232)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 12\
**Last updated:** [December 2, 2024, 3:54pm UTC](https://discourse.julialang.org/t/static-array-multiplied-by-its-adjoint-seems-to-allocate/123232 "2024-12-02T15:54:39Z")

</div>

Hi there, I am writing out a likelihood estimation and I have run into some allocation issues when coding up the Hessian. Even though the Hessian function HLL seems to mirror what the gradient function ∇LL is doing. One…

---

## [Workflow for development packages](https://discourse.julialang.org/t/workflow-for-development-packages/123102)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [December 2, 2024, 3:23pm UTC](https://discourse.julialang.org/t/workflow-for-development-packages/123102 "2024-12-02T15:23:21Z")

</div>

There are some packages I mostly use while developing some package. These include, for example, JET.jl & Cthulhu.jl when I am debugging, a bunch of \<: AbstractArray implementations (StaticArrays.jl, etc) when I want to t…

---

## [How to write a kernel to evaluate a function on an arbitrary dimensional grid?](https://discourse.julialang.org/t/how-to-write-a-kernel-to-evaluate-a-function-on-an-arbitrary-dimensional-grid/123359)

<div class="topic-metadata">

**Author:** [@marcsgil](https://discourse.julialang.org/u/marcsgil)\
**Replies:** 0\
**Last updated:** [December 2, 2024, 2:33pm UTC](https://discourse.julialang.org/t/how-to-write-a-kernel-to-evaluate-a-function-on-an-arbitrary-dimensional-grid/123359 "2024-12-02T14:33:38Z")

</div>

Hi, I’m trying to write a kernel (using KernelAbstractions.jl) to evaluate a function f over an arbitrary dimensional Cartesian grid, which is represented by vectors rs.... To give a concrete example, for a 2D grid I can…

---

## [Omniscape model in Julia](https://discourse.julialang.org/t/omniscape-model-in-julia/123330)

<div class="topic-metadata">

**Author:** [@JanZachar](https://discourse.julialang.org/u/JanZachar)\
**Replies:** 6\
**Last updated:** [December 2, 2024, 7:38am UTC](https://discourse.julialang.org/t/omniscape-model-in-julia/123330 "2024-12-02T07:38:23Z")

</div>

When running Omniscape model via Julia I got this error massage: run\_omniscape("D:/15\_Omniscape/tobler\_mean/script/tobler\_mean.ini") ERROR: OutOfMemoryError() Stacktrace: \[1\] GenericMemory @ .\\boot.jl:516 \[inlined…

---

## [Enzyme.jl non-allocating function has allocating gradient](https://discourse.julialang.org/t/enzyme-jl-non-allocating-function-has-allocating-gradient/123212)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 7\
**Last updated:** [December 2, 2024, 6:37am UTC](https://discourse.julialang.org/t/enzyme-jl-non-allocating-function-has-allocating-gradient/123212 "2024-12-02T06:37:19Z")

</div>

Hi, I am taking Enzyme.jl for a spin. using Enzyme,StaticArrays,BenchmarkTools,LinearAlgebra A = SVector(1.,2.,3.) B = SVector(2.,6.,2.) foo(A) = dot(A,B) @btime gradient(Reverse,$foo,$A) and get 107.11…

---

## [StructArray into KeyedArray](https://discourse.julialang.org/t/structarray-into-keyedarray/123305)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 6\
**Last updated:** [December 1, 2024, 7:41pm UTC](https://discourse.julialang.org/t/structarray-into-keyedarray/123305 "2024-12-01T19:41:09Z")

</div>

How do I turn a StructArray into a KeyedArray? ┌───────┬───────┬───────────┬──────────┬──────────┐ │ a │ b │ x │ y │ z │ │ Int64 │ Int64 │ Float64 │ Float64 │ Float64 │ ├───────┼───────…

---

## [NeuralPDE with tuple input](https://discourse.julialang.org/t/neuralpde-with-tuple-input/123078)

<div class="topic-metadata">

**Author:** [@Yang-yang](https://discourse.julialang.org/u/Yang-yang)\
**Replies:** 4\
**Last updated:** [December 1, 2024, 1:20pm UTC](https://discourse.julialang.org/t/neuralpde-with-tuple-input/123078 "2024-12-01T13:20:23Z")

</div>

I want to use the PINN to solve a PDE whose time dependence is mild, but its spatial dependence is complicated. I construct the following neural network, inner = 8 chain = Chain(Parallel(vcat, Chain(NoOpLayer())…

---

## [Catching warning and assign missing values instead?](https://discourse.julialang.org/t/catching-warning-and-assign-missing-values-instead/123252)

<div class="topic-metadata">

**Author:** [@Balinus](https://discourse.julialang.org/u/Balinus)\
**Replies:** 5\
**Last updated:** [December 1, 2024, 1:16pm UTC](https://discourse.julialang.org/t/catching-warning-and-assign-missing-values-instead/123252 "2024-12-01T13:16:17Z")

</div>

Hello, I get the following warning for some of my calculations. ┌ Warning: The maximum likelihood algorithm did not find a solution. Maybe try with different initial values or with another method. The returned values ar…

---

## [Bug: dev two repos, hit tab key, Pkg crashes](https://discourse.julialang.org/t/bug-dev-two-repos-hit-tab-key-pkg-crashes/123324)

<div class="topic-metadata">

**Author:** [@phma](https://discourse.julialang.org/u/phma)\
**Replies:** 1\
**Last updated:** [December 1, 2024, 10:45am UTC](https://discourse.julialang.org/t/bug-dev-two-repos-hit-tab-key-pkg-crashes/123324 "2024-12-01T10:45:13Z")

</div>

I hit \] for Pkg and tried to dev two repos called wormcode and sumsquare, hitting tab after the first few letters of each. (These are not the actual names of the repos and are actually in C++ and Rust respectively. I use…

---

## [Plots Output Goes to Wrong User](https://discourse.julialang.org/t/plots-output-goes-to-wrong-user/122443)

<div class="topic-metadata">

**Author:** [@ejolson](https://discourse.julialang.org/u/ejolson)\
**Replies:** 6\
**Last updated:** [December 1, 2024, 8:19am UTC](https://discourse.julialang.org/t/plots-output-goes-to-wrong-user/122443 "2024-12-01T08:19:35Z")

</div>

Observed Behavior: The GKS QtTerm output window from the Plots package is displaying on a different user’s desktop. It appears the first person to start plotting subsequently gets all the plots from the other users. E…

---

## [HTTP.jl doesn't work](https://discourse.julialang.org/t/http-jl-doesnt-work/123293)

<div class="topic-metadata">

**Author:** [@razlichnosti111](https://discourse.julialang.org/u/razlichnosti111)\
**Replies:** 4\
**Last updated:** [December 1, 2024, 8:13am UTC](https://discourse.julialang.org/t/http-jl-doesnt-work/123293 "2024-12-01T08:13:38Z")

</div>

Hello. The HTTP.jl package does not work for me. I can’t figure out what the problem is. Failed to precompile HTTP \[cd3eb016-35fb-5094-929b-558a96fad6f3\] to “C:\\Users\\Дмитрий\\.julia\\compiled\\v1.11\\HTTP\\jl\_8BA4.tmp”. E…

---

## [\`ReadOnlyMemoryError()\` with AllocCheck's \`@check\_allocs\`](https://discourse.julialang.org/t/readonlymemoryerror-with-allocchecks-check-allocs/123312)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 1\
**Last updated:** [December 1, 2024, 3:03am UTC](https://discourse.julialang.org/t/readonlymemoryerror-with-allocchecks-check-allocs/123312 "2024-12-01T03:03:47Z")

</div>

Wondering if anybody knows why I would get a ReadOnlyMemoryError() below. using AllocCheck struct S \_1::Int64 \_2::Int64 S() = new(1, 2) end @check\_allocs f() = S() f() ERROR: ReadOnlyMemoryError() Stacktrac…

---

## [PackageCompiler.jl cannot create a sysimage with CUDA](https://discourse.julialang.org/t/packagecompiler-jl-cannot-create-a-sysimage-with-cuda/123019)

<div class="topic-metadata">

**Author:** [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Replies:** 3\
**Last updated:** [November 30, 2024, 10:46pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-cannot-create-a-sysimage-with-cuda/123019 "2024-11-30T22:46:03Z")

</div>

The compilation fails during linking BFloat16s.jl with g++. The full text of a minimal working example is available on GitHub Gist, and a truncated version is presented below: julia\> versioninfo() Julia Version 1.11.1 C…

---

## [Using the Morris method of GlobalSensitivity.jl](https://discourse.julialang.org/t/using-the-morris-method-of-globalsensitivity-jl/123273)

<div class="topic-metadata">

**Author:** [@ij05](https://discourse.julialang.org/u/ij05)\
**Replies:** 2\
**Last updated:** [November 30, 2024, 3:00pm UTC](https://discourse.julialang.org/t/using-the-morris-method-of-globalsensitivity-jl/123273 "2024-11-30T15:00:13Z")

</div>

Hello everybody, I am trying to understand how to perform a basic screening test using the Morris method. I am consulting the example from the textbook: “Engineering design via Surrogate Modelling: A practical guide”. T…

---

## [Generate code from Symbolics.jl derivative](https://discourse.julialang.org/t/generate-code-from-symbolics-jl-derivative/123272)

<div class="topic-metadata">

**Author:** [@hatmatrix](https://discourse.julialang.org/u/hatmatrix)\
**Replies:** 7\
**Last updated:** [November 30, 2024, 2:55pm UTC](https://discourse.julialang.org/t/generate-code-from-symbolics-jl-derivative/123272 "2024-11-30T14:55:03Z")

</div>

Following this example here, I am trying to generate Julia or MATLAB code from a derivative. using Symbolics @variables x a b c D = Differential(x) F = a\*x^3 + b\*x^2 + c\*x dFdx = expand\_derivatives(D(F)) Targetin…

---

## [Speed of Nested AD in Enzyme](https://discourse.julialang.org/t/speed-of-nested-ad-in-enzyme/123018)

<div class="topic-metadata">

**Author:** [@turiya](https://discourse.julialang.org/u/turiya)\
**Replies:** 8\
**Last updated:** [November 30, 2024, 11:26am UTC](https://discourse.julialang.org/t/speed-of-nested-ad-in-enzyme/123018 "2024-11-30T11:26:35Z")

</div>

I am trying to implement nested AD in Enzyme for application in PINNs. The following is a MWE. using Enzyme, Lux, Random, ComponentArrays, LinearAlgebra n = 100 x\_batch = randn(2, n) y\_batch = randn(2, n) model = Chain(…

---

## [StructArrays and ModellingToolkit](https://discourse.julialang.org/t/structarrays-and-modellingtoolkit/123253)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 12\
**Last updated:** [November 30, 2024, 8:50am UTC](https://discourse.julialang.org/t/structarrays-and-modellingtoolkit/123253 "2024-11-30T08:50:50Z")

</div>

StructArrays 0.6.18 works fine with the newest version of ModelingToolkit, but StructArrays 0.6.20 works only with a very old version of MTK. I find this counter-intuitive. Any idea why this is the case?

---

## [In what case \`x===y\` and \`objectid(x) == objectid(y)\` are not interchangable?](https://discourse.julialang.org/t/in-what-case-x-y-and-objectid-x-objectid-y-are-not-interchangable/123265)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 3\
**Last updated:** [November 29, 2024, 11:42pm UTC](https://discourse.julialang.org/t/in-what-case-x-y-and-objectid-x-objectid-y-are-not-interchangable/123265 "2024-11-29T23:42:25Z")

</div>

I was reading the official documentation and found the following statement about objectid: If x === y then objectid(x) == objectid(y) , and usually when x !== y , objectid(x) != objectid(y) . It seems that there are …

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

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