# General Usage

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

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

**Page:** 243

---

## [A bug in using varinfo() when there is 3d data in the struct structure!](https://discourse.julialang.org/t/a-bug-in-using-varinfo-when-there-is-3d-data-in-the-struct-structure/104449)

<div class="topic-metadata">

**Author:** [@13299118606](https://discourse.julialang.org/u/13299118606)\
**Replies:** 4\
**Last updated:** [October 3, 2023, 7:40am UTC](https://discourse.julialang.org/t/a-bug-in-using-varinfo-when-there-is-3d-data-in-the-struct-structure/104449 "2023-10-03T07:40:36Z")

</div>

There is a bug in using varinfo when there is three-dimensional data in the struct structure. When there is 3d data inside the structure, it will greatly slow down the corresponding response speed when using varinfo. The…

---

## [Is it possible/advisable to have multiline error message?](https://discourse.julialang.org/t/is-it-possible-advisable-to-have-multiline-error-message/104513)

<div class="topic-metadata">

**Author:** [@David\_Sagan](https://discourse.julialang.org/u/David_Sagan)\
**Replies:** 1\
**Last updated:** [October 2, 2023, 9:44pm UTC](https://discourse.julialang.org/t/is-it-possible-advisable-to-have-multiline-error-message/104513 "2023-10-02T21:44:31Z")

</div>

throw shows a multiline (has \\n characters) string as a single line. Example: julia\> throw("a\\n b") ERROR: "a\\n b" Stacktrace: \[1\] top-level scope @ REPL\[3\]:1 Is it possible to have a multiline error message? Is th…

---

## [PackageCompiler @ccallable for julia function that take String's as arguments](https://discourse.julialang.org/t/packagecompiler-ccallable-for-julia-function-that-take-strings-as-arguments/104507)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 3\
**Last updated:** [October 2, 2023, 7:09pm UTC](https://discourse.julialang.org/t/packagecompiler-ccallable-for-julia-function-that-take-strings-as-arguments/104507 "2023-10-02T19:09:39Z")

</div>

I have a C/C++ based simulation. I want to package Julia Code that loads a custom data-base type object and does some fast lookups and quick calculations so it is accessible to C. So I’m trying to set things up to make…

---

## [Are extension packages importable?](https://discourse.julialang.org/t/are-extension-packages-importable/92527)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 26\
**Last updated:** [October 2, 2023, 5:42pm UTC](https://discourse.julialang.org/t/are-extension-packages-importable/92527 "2023-10-02T17:42:35Z")

</div>

The new extension packages functionality looks great! Code Loading · The Julia Language I get that its intended use is to provide Requires.jl-like functionality, i.e. to run some code when some other package is loaded, …

---

## [Interest in a meta interpolation package?](https://discourse.julialang.org/t/interest-in-a-meta-interpolation-package/104343)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 2\
**Last updated:** [October 2, 2023, 4:19pm UTC](https://discourse.julialang.org/t/interest-in-a-meta-interpolation-package/104343 "2023-10-02T16:19:54Z")

</div>

I am currently the maintainer of Interpolations.jl. There are also many other interpolaton packages with different capabilities: https://juliamath.github.io/Interpolations.jl/stable/other\_packages/ With package extensi…

---

## [Is it wrong to call Julia interpreted?](https://discourse.julialang.org/t/is-it-wrong-to-call-julia-interpreted/104296)

<div class="topic-metadata">

**Author:** [@ninjaaron](https://discourse.julialang.org/u/ninjaaron)\
**Replies:** 104\
**Last updated:** [October 2, 2023, 9:36am UTC](https://discourse.julialang.org/t/is-it-wrong-to-call-julia-interpreted/104296 "2023-10-02T09:36:32Z")

</div>

@sdanisch and I are having it out in a GitHub issue about whether or not it is correct to call Julia an interpreted language. Julia is not an interpreted Language · Issue #7 · ninjaaron/administrative-scripting-with-juli…

---

## [Aliasing two structs and having them be subtypes of an abstract type?](https://discourse.julialang.org/t/aliasing-two-structs-and-having-them-be-subtypes-of-an-abstract-type/104410)

<div class="topic-metadata">

**Author:** [@linkz](https://discourse.julialang.org/u/linkz)\
**Replies:** 10\
**Last updated:** [October 2, 2023, 1:46pm UTC](https://discourse.julialang.org/t/aliasing-two-structs-and-having-them-be-subtypes-of-an-abstract-type/104410 "2023-10-02T13:46:10Z")

</div>

I am wondering if when I have two structs, say mutable struct A{a, b} str\_a::a str\_b::b end mutable struct B{a, b, c} str\_a::a str\_b::b str\_c::c end and I alias const A\_num = A{\<:Number} const B\_num = …

---

## [Combining \`eachindex\` and \`axes\`?](https://discourse.julialang.org/t/combining-eachindex-and-axes/104442)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 2\
**Last updated:** [October 2, 2023, 1:28pm UTC](https://discourse.julialang.org/t/combining-eachindex-and-axes/104442 "2023-10-02T13:28:43Z")

</div>

One of the things I like about eachindex is that you can give it several arrays and it throws a DimensionMismatch if they have different sizes. I wonder if it would make sense to enable the same with axes(A, d), possibl…

---

## [Sympy Computation with dsolve for Logistic Differential Equation](https://discourse.julialang.org/t/sympy-computation-with-dsolve-for-logistic-differential-equation/104338)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 4\
**Last updated:** [October 2, 2023, 11:53am UTC](https://discourse.julialang.org/t/sympy-computation-with-dsolve-for-logistic-differential-equation/104338 "2023-10-02T11:53:31Z")

</div>

I was computing the solution for: y' = ky(L-y) the solution should be: y(t) = C\_{1} e^{0.6t} (2000 - y(t)) the value of C\_{1} should be 2/3. Thus y(t) = \\frac{4000/3}{2/3 + e^{-0.6t}} I believe I have followed th…

---

## [Can I revert mutations if error is raised inside a function?](https://discourse.julialang.org/t/can-i-revert-mutations-if-error-is-raised-inside-a-function/104452)

<div class="topic-metadata">

**Author:** [@bguillen](https://discourse.julialang.org/u/bguillen)\
**Replies:** 7\
**Last updated:** [October 2, 2023, 9:16am UTC](https://discourse.julialang.org/t/can-i-revert-mutations-if-error-is-raised-inside-a-function/104452 "2023-10-02T09:16:51Z")

</div>

I am writing a few functions for fast median calculation (mostly replicating Alexandrescu’s paper on fast deterministic selection). One of the methods includes assertions that certain assumptions are not violated, howev…

---

## [Startup packages no longer avaiabke when updating using Julia up?](https://discourse.julialang.org/t/startup-packages-no-longer-avaiabke-when-updating-using-julia-up/104478)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [October 2, 2023, 5:11am UTC](https://discourse.julialang.org/t/startup-packages-no-longer-avaiabke-when-updating-using-julia-up/104478 "2023-10-02T05:11:23Z")

</div>

I have somewhat recently started using juliaup to keep track of my julia version. I have now updated to the 1.10 beta. Here is the output of juliaup status: Default Channel Version Update …

---

## [Inconsistent results using LoopVectorization @turbo with linear indexing](https://discourse.julialang.org/t/inconsistent-results-using-loopvectorization-turbo-with-linear-indexing/104481)

<div class="topic-metadata">

**Author:** [@james3](https://discourse.julialang.org/u/james3)\
**Replies:** 1\
**Last updated:** [October 2, 2023, 3:08am UTC](https://discourse.julialang.org/t/inconsistent-results-using-loopvectorization-turbo-with-linear-indexing/104481 "2023-10-02T03:08:39Z")

</div>

I am obtaining incorrect results when I combine @turbo with linear indexing of my array. I have a simple example of the issue below. Results are the same except when I combine @turbo with linear indexing. using LoopVect…

---

## [DifferentialEquations.jl change\_t\_via\_interpolation! without save\_everystep for large, expensive ODE](https://discourse.julialang.org/t/differentialequations-jl-change-t-via-interpolation-without-save-everystep-for-large-expensive-ode/104482)

<div class="topic-metadata">

**Author:** [@anicusan](https://discourse.julialang.org/u/anicusan)\
**Replies:** 1\
**Last updated:** [October 2, 2023, 1:14am UTC](https://discourse.julialang.org/t/differentialequations-jl-change-t-via-interpolation-without-save-everystep-for-large-expensive-ode/104482 "2023-10-02T01:14:15Z")

</div>

Hi all, I am writing a domain-specific simulator built on top of DifferentialEquations.jl; I am solving a mathematically simple, but large / expensive system of ODEs (\>10,000), and wish to minimise memory usage by setti…

---

## [Binary reading and matrix allocations: most performant way?](https://discourse.julialang.org/t/binary-reading-and-matrix-allocations-most-performant-way/103929)

<div class="topic-metadata">

**Author:** [@myersm0](https://discourse.julialang.org/u/myersm0)\
**Replies:** 3\
**Last updated:** [October 1, 2023, 8:54pm UTC](https://discourse.julialang.org/t/binary-reading-and-matrix-allocations-most-performant-way/103929 "2023-10-01T20:54:04Z")

</div>

Would anyone be able to offer some insight towards getting faster performance for the below sort of use case? Say I have a struct that holds a Matrix and my primary goal is to fill it with values, possibly transposed, a…

---

## [Plot streaming data in Genie.jl](https://discourse.julialang.org/t/plot-streaming-data-in-genie-jl/104476)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 0\
**Last updated:** [October 1, 2023, 7:15pm UTC](https://discourse.julialang.org/t/plot-streaming-data-in-genie-jl/104476 "2023-10-01T19:15:43Z")

</div>

Hey everyone. After browsing through the documentation, I have been unable to find an example of what I have in mind. So I thought I should ask here. Do anyone know if it is possible to plot a streaming dataset in geni…

---

## [Why is the test button red?](https://discourse.julialang.org/t/why-is-the-test-button-red/104474)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [October 1, 2023, 7:11pm UTC](https://discourse.julialang.org/t/why-is-the-test-button-red/104474 "2023-10-01T19:11:37Z")

</div>

If you look here: GitHub - JuliaGraphics/QML.jl: Build Qt6 QML interfaces for Julia programs. It says “test failing”. But if you click on the button you can see that the tests are not failing. What is going on here?

---

## [How to compare commits with PkgBenchmark](https://discourse.julialang.org/t/how-to-compare-commits-with-pkgbenchmark/104468)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [October 1, 2023, 5:25pm UTC](https://discourse.julialang.org/t/how-to-compare-commits-with-pkgbenchmark/104468 "2023-10-01T17:25:54Z")

</div>

Hi, I would like to compare benchmarks for two commits. I’m trying to follow the documentation, but I receive an error indicating that the input is not a repo. I tried a few different approach, but with the same result.…

---

## [Is it possible to parallelize matrix division](https://discourse.julialang.org/t/is-it-possible-to-parallelize-matrix-division/104398)

<div class="topic-metadata">

**Author:** [@Shashank](https://discourse.julialang.org/u/Shashank)\
**Replies:** 10\
**Last updated:** [October 1, 2023, 2:18pm UTC](https://discourse.julialang.org/t/is-it-possible-to-parallelize-matrix-division/104398 "2023-10-01T14:18:15Z")

</div>

I have a big (~10000x10000) but sparse matrix A and a vector B. I want to solve the system using backslash C = A\\B , and it works, but it is taking too long. Is there a way to parallelize this and utilize multiple core…

---

## [DataframesMeta track row number](https://discourse.julialang.org/t/dataframesmeta-track-row-number/104441)

<div class="topic-metadata">

**Author:** [@vtomar](https://discourse.julialang.org/u/vtomar)\
**Replies:** 2\
**Last updated:** [October 1, 2023, 1:31pm UTC](https://discourse.julialang.org/t/dataframesmeta-track-row-number/104441 "2023-10-01T13:31:42Z")

</div>

When using each row, you can track row number as shown below for (i, row) in enumerate( eachrow( test\_df ) ) # do something with row and i end but how do I track the row number in each iteration when using DataF…

---

## [Build Julia on NixOS](https://discourse.julialang.org/t/build-julia-on-nixos/35129)

<div class="topic-metadata">

**Author:** [@RCHG](https://discourse.julialang.org/u/RCHG)\
**Replies:** 74\
**Last updated:** [October 1, 2023, 1:00pm UTC](https://discourse.julialang.org/t/build-julia-on-nixos/35129 "2023-10-01T13:00:42Z")

</div>

Hello! Here I would like to create a topic about the use of Julia on NixOS, and open the contact with other Julia users under NixOS or those using the Nix package manager. First, just a short introduction about why the …

---

## [Calculate partition columns with multiply /divide](https://discourse.julialang.org/t/calculate-partition-columns-with-multiply-divide/104436)

<div class="topic-metadata">

**Author:** [@edas](https://discourse.julialang.org/u/edas)\
**Replies:** 3\
**Last updated:** [October 1, 2023, 12:31pm UTC](https://discourse.julialang.org/t/calculate-partition-columns-with-multiply-divide/104436 "2023-10-01T12:31:25Z")

</div>

Hi, I want to partition dataframe and then combine to find multiples or divisions of columns in partition. My example such: to calculate area sums (column square), price sums and get price per square. I was unable to…

---

## [REPL nested index completion](https://discourse.julialang.org/t/repl-nested-index-completion/104420)

<div class="topic-metadata">

**Author:** [@mkoculak](https://discourse.julialang.org/u/mkoculak)\
**Replies:** 4\
**Last updated:** [October 1, 2023, 9:49am UTC](https://discourse.julialang.org/t/repl-nested-index-completion/104420 "2023-10-01T09:49:58Z")

</div>

I am working with deeply nested structs, that I would like to navigate like a Dict. Got it working thanks to suggestions from this thread, but it only goes one level deep. This is true even if these are plain nested Dic…

---

## [Different structs with the same properties](https://discourse.julialang.org/t/different-structs-with-the-same-properties/104417)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 3\
**Last updated:** [October 1, 2023, 8:01am UTC](https://discourse.julialang.org/t/different-structs-with-the-same-properties/104417 "2023-10-01T08:01:08Z")

</div>

I have two .jld2 files. I loaded structs from the above files, which have the same properties but they are regarded as different objects as follows: julia\> for prop in \[fieldnames(typeof(a))..., fieldnames(typeof(b))..…

---

## [REPL copy/paste resulting in UndefVarError 'julia' not defined](https://discourse.julialang.org/t/repl-copy-paste-resulting-in-undefvarerror-julia-not-defined/104418)

<div class="topic-metadata">

**Author:** [@rud-lucien](https://discourse.julialang.org/u/rud-lucien)\
**Replies:** 2\
**Last updated:** [September 30, 2023, 1:18pm UTC](https://discourse.julialang.org/t/repl-copy-paste-resulting-in-undefvarerror-julia-not-defined/104418 "2023-09-30T13:18:10Z")

</div>

Copying and pasting julia code from documentation or help mode resulting in UndefVarError ‘julia’ not defined. Specifically I copied this line of code from help mode for the filter function: julia\> map(filter(iseven),…

---

## [Distribute obfuscated code with a REPL](https://discourse.julialang.org/t/distribute-obfuscated-code-with-a-repl/104382)

<div class="topic-metadata">

**Author:** [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)\
**Replies:** 3\
**Last updated:** [September 29, 2023, 10:55pm UTC](https://discourse.julialang.org/t/distribute-obfuscated-code-with-a-repl/104382 "2023-09-29T22:55:33Z")

</div>

I have written a program that is well suited to be run in the REPL. I want to distribute it without making the code available. What are my options? It is OK if it means some REPL functions won’t work. I realize it’s prob…

---

## [Confused by behavior when changing ENV\["PYTHONPATH"\] in new module](https://discourse.julialang.org/t/confused-by-behavior-when-changing-env-pythonpath-in-new-module/104408)

<div class="topic-metadata">

**Author:** [@mgalenb](https://discourse.julialang.org/u/mgalenb)\
**Replies:** 0\
**Last updated:** [September 29, 2023, 6:48pm UTC](https://discourse.julialang.org/t/confused-by-behavior-when-changing-env-pythonpath-in-new-module/104408 "2023-09-29T18:48:01Z")

</div>

I am making a module (which has a local python env installed) and I am trying to add a path to ENV\[“PYTHONPATH”\] and then import a module I am hacking in module Test ENV\["PYTHONPATH"\]=joinpath(dirname(@\_\_FILE\_\_), "pyth…

---

## [Restrictions on isbits type paremeter](https://discourse.julialang.org/t/restrictions-on-isbits-type-paremeter/104369)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 4\
**Last updated:** [September 29, 2023, 6:14pm UTC](https://discourse.julialang.org/t/restrictions-on-isbits-type-paremeter/104369 "2023-09-29T18:14:00Z")

</div>

In functions, you can put restrictions on the types of arguments like so: function f(a::Array{T, 3}) where {T\<:Real} \[ Function Body ...\] end Can you do something similar for type parameters that are not types, but…

---

## [Issues with foreign threads calling back Julia and GC](https://discourse.julialang.org/t/issues-with-foreign-threads-calling-back-julia-and-gc/104384)

<div class="topic-metadata">

**Author:** [@peremato](https://discourse.julialang.org/u/peremato)\
**Replies:** 11\
**Last updated:** [September 29, 2023, 6:06pm UTC](https://discourse.julialang.org/t/issues-with-foreign-threads-calling-back-julia-and-gc/104384 "2023-09-29T18:06:31Z")

</div>

In the Geant4.jl project I am wrapping a large C++ library that supports multi-threading for tracking particles through matter. I have found an almost working solution by disabling the GC, but if the run is very long, …

---

## [Is there any plot package that is "relocatable"?](https://discourse.julialang.org/t/is-there-any-plot-package-that-is-relocatable/38699)

<div class="topic-metadata">

**Author:** [@dact](https://discourse.julialang.org/u/dact)\
**Replies:** 12\
**Last updated:** [September 29, 2023, 3:58pm UTC](https://discourse.julialang.org/t/is-there-any-plot-package-that-is-relocatable/38699 "2023-09-29T15:58:49Z")

</div>

I’m trying to compile a simple app that depends on Plots.jl and the GR backend using PackageCompiler.jl. I get warnings about Plots and GR being not relocatable. If I ignore the warnings, indeed the app doesn’t run in my…

---

## [Faster sum loop when looping through vector multiple times than once](https://discourse.julialang.org/t/faster-sum-loop-when-looping-through-vector-multiple-times-than-once/104388)

<div class="topic-metadata">

**Author:** [@Jad\_Zeitouni](https://discourse.julialang.org/u/Jad_Zeitouni)\
**Replies:** 5\
**Last updated:** [September 29, 2023, 1:47pm UTC](https://discourse.julialang.org/t/faster-sum-loop-when-looping-through-vector-multiple-times-than-once/104388 "2023-09-29T13:47:39Z")

</div>

I was benchmarking different ways of summing a matrix by its second dimension and I got some surprising results (for me) when doing it through a for loop. I had thought that in general the loop would be faster if the in…

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

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