# Latest

**URL:** https://discourse.julialang.org/latest.md?page=679

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

**Page:** 680

---

## [Problem with elliptic integrals](https://discourse.julialang.org/t/problem-with-elliptic-integrals/99922)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 1\
**Last updated:** [June 6, 2023, 6:09am UTC](https://discourse.julialang.org/t/problem-with-elliptic-integrals/99922 "2023-06-06T06:09:30Z")

</div>

using Plots using SpecialFunctions # using Elliptic K = ellipk # Computes Complete Elliptic Integral of 1st kind K(m) E = ellipe # Computes Complete Elliptic Integral of 2nd kind E(m) psi0(k) = (K(k) - E(k)) / k @sho…

---

## [Problems using Flux](https://discourse.julialang.org/t/problems-using-flux/99622)

<div class="topic-metadata">

**Author:** [@Jcverni](https://discourse.julialang.org/u/Jcverni)\
**Replies:** 7\
**Last updated:** [June 6, 2023, 2:48am UTC](https://discourse.julialang.org/t/problems-using-flux/99622 "2023-06-06T02:48:33Z")

</div>

Hi, I’m Juan from Argentina. I can’t get the following program to work and I don’t understand what’s wrong, could someone help me or give me a hint. This is the code: using Flux,Plots, Images,MLDatasets using Flux: c…

---

## [DifferentialEquations.jl with a Float32 tspan](https://discourse.julialang.org/t/differentialequations-jl-with-a-float32-tspan/99920)

<div class="topic-metadata">

**Author:** [@tomkimpson](https://discourse.julialang.org/u/tomkimpson)\
**Replies:** 3\
**Last updated:** [June 6, 2023, 2:19am UTC](https://discourse.julialang.org/t/differentialequations-jl-with-a-float32-tspan/99920 "2023-06-06T02:19:49Z")

</div>

Hi, There is a nice blog post here on using DE.jl with different number types. In Julia v1.9 the following MWE errors: using DifferentialEquations function some\_arbitrary\_function!(du,u,p,τ) du = u/100 nothi…

---

## [Code block only for PackageCompiler and not for Revise](https://discourse.julialang.org/t/code-block-only-for-packagecompiler-and-not-for-revise/99870)

<div class="topic-metadata">

**Author:** [@xgdgsc](https://discourse.julialang.org/u/xgdgsc)\
**Replies:** 6\
**Last updated:** [June 6, 2023, 1:10am UTC](https://discourse.julialang.org/t/code-block-only-for-packagecompiler-and-not-for-revise/99870 "2023-06-06T01:10:54Z")

</div>

I’ m searching for ways to workaround can't use revise · Issue #166 · comonicon/Comonicon.jl · GitHub . When developing using Revise, Comonicon and @ccallable functions seem to cause Revise errors that needs restarting R…

---

## [Can we use logistic regression directly in a case control study?](https://discourse.julialang.org/t/can-we-use-logistic-regression-directly-in-a-case-control-study/99046)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 2\
**Last updated:** [June 6, 2023, 12:32am UTC](https://discourse.julialang.org/t/can-we-use-logistic-regression-directly-in-a-case-control-study/99046 "2023-06-06T00:32:33Z")

</div>

Hello. Say I have a very imbalanced dataset, so I decide to do a case-control study. For example, we have 1 million healthy people and 300 people with cancer. I take 300 people from each group and I want to fit a logi…

---

## [Julia for Reactor/Nuclear physics](https://discourse.julialang.org/t/julia-for-reactor-nuclear-physics/99913)

<div class="topic-metadata">

**Author:** [@rvignolo](https://discourse.julialang.org/u/rvignolo)\
**Replies:** 1\
**Last updated:** [June 5, 2023, 9:08pm UTC](https://discourse.julialang.org/t/julia-for-reactor-nuclear-physics/99913 "2023-06-05T21:08:02Z")

</div>

Hi everybody! I have been out of the Julia space for a while, since I have been developing for different purposes than before using Rust instead of Julia. I can see why Julia is amazing and why it is probably the best …

---

## [Symmetry & SOS Optimization Compatibility Issues?](https://discourse.julialang.org/t/symmetry-sos-optimization-compatibility-issues/98057)

<div class="topic-metadata">

**Author:** [@ilovemath](https://discourse.julialang.org/u/ilovemath)\
**Replies:** 6\
**Last updated:** [June 5, 2023, 8:29pm UTC](https://discourse.julialang.org/t/symmetry-sos-optimization-compatibility-issues/98057 "2023-06-05T20:29:12Z")

</div>

Hello all, I am trying to implement rotational symmetry for an SOS problem. In particular, I followed the example problem here: Dihedral symmetry of the Robinson form · SumOfSquares. My goal is to use a cyclic group i…

---

## [How to structure project in julia](https://discourse.julialang.org/t/how-to-structure-project-in-julia/99458)

<div class="topic-metadata">

**Author:** [@MacKa](https://discourse.julialang.org/u/MacKa)\
**Replies:** 48\
**Last updated:** [June 5, 2023, 6:15pm UTC](https://discourse.julialang.org/t/how-to-structure-project-in-julia/99458 "2023-06-05T18:15:24Z")

</div>

I’m new to Julia (2 weeks of exp). I would like to port and extend existing project from C++/python to julia. I’m having big difficulties in structuring my project. The project will contain roughly 50-100 files/modules, …

---

## [Elasticsearch](https://discourse.julialang.org/t/elasticsearch/4277)

<div class="topic-metadata">

**Author:** [@gavelasq](https://discourse.julialang.org/u/gavelasq)\
**Replies:** 2\
**Last updated:** [June 5, 2023, 5:24pm UTC](https://discourse.julialang.org/t/elasticsearch/4277 "2023-06-05T17:24:41Z")

</div>

How can I use Elasticsearch in Julia? Is there a package to use Elasticsearch in Julia? Can I use PyCall to use Python’s Elasticsearch package?

---

## [Using Elasticsearch with Julia](https://discourse.julialang.org/t/using-elasticsearch-with-julia/52165)

<div class="topic-metadata">

**Author:** [@JTintern](https://discourse.julialang.org/u/JTintern)\
**Replies:** 1\
**Last updated:** [June 5, 2023, 5:23pm UTC](https://discourse.julialang.org/t/using-elasticsearch-with-julia/52165 "2023-06-05T17:23:04Z")

</div>

Hi everyone, I am trying to use elasticsearch with Julia ,when I try to connect to my index I get this error : PyError ($(Expr(:escape, :(ccall(#= /home/J1028071/.julia/packages/PyCall/zqDXB/src/pyfncall.jl:43 =# @pysy…

---

## [@code\_native output to file](https://discourse.julialang.org/t/code-native-output-to-file/99900)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 1\
**Last updated:** [June 5, 2023, 4:33pm UTC](https://discourse.julialang.org/t/code-native-output-to-file/99900 "2023-06-05T16:33:58Z")

</div>

Hi, Is there a way to save the output of @code\_native to a txt file? My ouput is very long and I can’t copy it manually to a file because it is more than the terminal buffer. Thank you

---

## [How to share a Julia system image that requires artifacts?](https://discourse.julialang.org/t/how-to-share-a-julia-system-image-that-requires-artifacts/99902)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 0\
**Last updated:** [June 5, 2023, 4:22pm UTC](https://discourse.julialang.org/t/how-to-share-a-julia-system-image-that-requires-artifacts/99902 "2023-06-05T16:22:27Z")

</div>

Hi! I am trying to create a relocatable Julia system image that bundles some private packages for a satellite telemetry system. I follow the tutorial in PackageCompiler.jl but I am having problems with the Artifacts. So…

---

## [Event-based or instrumentation profiler for julia?](https://discourse.julialang.org/t/event-based-or-instrumentation-profiler-for-julia/99895)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 0\
**Last updated:** [June 5, 2023, 2:25pm UTC](https://discourse.julialang.org/t/event-based-or-instrumentation-profiler-for-julia/99895 "2023-06-05T14:25:39Z")

</div>

The built-in Profile is sampling-based, but I want to time a specific code block. I found the TimerOutputs seems useful for this job. Is this the correct way to go? Thanks.

---

## [Does Infiltrator work with Revise?](https://discourse.julialang.org/t/does-infiltrator-work-with-revise/99842)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 1\
**Last updated:** [June 5, 2023, 2:11pm UTC](https://discourse.julialang.org/t/does-infiltrator-work-with-revise/99842 "2023-06-05T14:11:18Z")

</div>

I tried to use @infiltrate in my code as follows: ... println("\\n\\n1 &\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*") println( "Debugging") @infiltrate ... but I got the following: 1 &\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*&\*…

---

## [Problem reading some WAV files using WAV.jl](https://discourse.julialang.org/t/problem-reading-some-wav-files-using-wav-jl/99788)

<div class="topic-metadata">

**Author:** [@CosmicSpittle](https://discourse.julialang.org/u/CosmicSpittle)\
**Replies:** 2\
**Last updated:** [June 5, 2023, 1:44pm UTC](https://discourse.julialang.org/t/problem-reading-some-wav-files-using-wav-jl/99788 "2023-06-05T13:44:04Z")

</div>

I have come across a wav file that I cannot read using WAV.jl (or LibSndFile.jl). I can open it in about any other audio program or library (Matlab, R, Raven, Audacity, …). If I read it into Matlab and write it back o…

---

## [How to read from external command and also get exit status](https://discourse.julialang.org/t/how-to-read-from-external-command-and-also-get-exit-status/99880)

<div class="topic-metadata">

**Author:** [@djvanderlaan](https://discourse.julialang.org/u/djvanderlaan)\
**Replies:** 2\
**Last updated:** [June 5, 2023, 1:33pm UTC](https://discourse.julialang.org/t/how-to-read-from-external-command-and-also-get-exit-status/99880 "2023-06-05T13:33:36Z")

</div>

I would like to run an external command an get its output str = read(\`ls -al\`, String) works for reading the output. However, I have a command that can also give non-zero exit codes on what I consider successful execut…

---

## [Good article on ethical aspects of AI](https://discourse.julialang.org/t/good-article-on-ethical-aspects-of-ai/99579)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 30\
**Last updated:** [June 5, 2023, 1:18pm UTC](https://discourse.julialang.org/t/good-article-on-ethical-aspects-of-ai/99579 "2023-06-05T13:18:02Z")

</div>

Pay attention to the emerging confluence of quantum computing and ML. “Models mere mortals cannot possibly understand” are coming…

---

## [GPU: Scalar indexing in kernel programming](https://discourse.julialang.org/t/gpu-scalar-indexing-in-kernel-programming/99878)

<div class="topic-metadata">

**Author:** [@yuwenchen95](https://discourse.julialang.org/u/yuwenchen95)\
**Replies:** 2\
**Last updated:** [June 5, 2023, 12:36pm UTC](https://discourse.julialang.org/t/gpu-scalar-indexing-in-kernel-programming/99878 "2023-06-05T12:36:12Z")

</div>

Hi all, I have a vector x of dim m\*n and want to parallel an operation over each slice of length m. For example, x\_{1:m} corresponds to a value -log(x\[1\]^2 - sum\_{i=2}^m x\[i\]^2) as shown in the function compute\_barrier!…

---

## [\[Pre-ANN/RFC\] XDG.jl: A cross platform implementation of the XDG Directory Spec](https://discourse.julialang.org/t/pre-ann-rfc-xdg-jl-a-cross-platform-implementation-of-the-xdg-directory-spec/94027)

<div class="topic-metadata">

**Author:** [@tecosaur](https://discourse.julialang.org/u/tecosaur)\
**Replies:** 30\
**Last updated:** [June 5, 2023, 12:35pm UTC](https://discourse.julialang.org/t/pre-ann-rfc-xdg-jl-a-cross-platform-implementation-of-the-xdg-directory-spec/94027 "2023-06-05T12:35:41Z")

</div>

Knowing where to find/place files can be hard. So far in the Julia ecosystem I’ve seen two approaches: Try a basic (sometimes incorrect) approach, as has been done in FreeTypeAbstraction.jl and DataDeps.jl. Just sh…

---

## [How to interrupt (not kill) julia from the REPL (again)?](https://discourse.julialang.org/t/how-to-interrupt-not-kill-julia-from-the-repl-again/99753)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 6\
**Last updated:** [June 5, 2023, 3:59am UTC](https://discourse.julialang.org/t/how-to-interrupt-not-kill-julia-from-the-repl-again/99753 "2023-06-05T03:59:56Z")

</div>

Instead of adding a question to the old thread from 2019 of almost the same title, I create a new Topic. From the old thread, I learned that Ctrl-C doesn’t always work, for example, during I/O. So, my question is, h…

---

## [Copy a function](https://discourse.julialang.org/t/copy-a-function/99884)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 2\
**Last updated:** [June 5, 2023, 11:51am UTC](https://discourse.julialang.org/t/copy-a-function/99884 "2023-06-05T11:51:20Z")

</div>

Let’s say I want to store a function in a struct.To do this, I pass this function to the constructor of the structure. However, if at some point later I redefine the original function, then the function inside the struct…

---

## [Rollsum/cumulative optimisation](https://discourse.julialang.org/t/rollsum-cumulative-optimisation/99718)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 12\
**Last updated:** [June 5, 2023, 11:36am UTC](https://discourse.julialang.org/t/rollsum-cumulative-optimisation/99718 "2023-06-05T11:36:53Z")

</div>

Hi, I was wondering if someone can help me speed up the below function (roll\_sum) in anyway? (Multi-threading, better algorithm,…etc). An easy way would be to remove the copy but I have added it so it is easy to benchm…

---

## [How to serialize data directly to my custom IO?](https://discourse.julialang.org/t/how-to-serialize-data-directly-to-my-custom-io/99754)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [June 5, 2023, 11:03am UTC](https://discourse.julialang.org/t/how-to-serialize-data-directly-to-my-custom-io/99754 "2023-06-05T11:03:24Z")

</div>

Hello, how to serialize data directly to my custom IO without using IOBuffer ? I just copy serialized data bytes from IOBuffer to custom IO object.

---

## [How to create a gif file of plot?](https://discourse.julialang.org/t/how-to-create-a-gif-file-of-plot/99795)

<div class="topic-metadata">

**Author:** [@Moslem\_Uddin](https://discourse.julialang.org/u/Moslem_Uddin)\
**Replies:** 6\
**Last updated:** [June 5, 2023, 10:22am UTC](https://discourse.julialang.org/t/how-to-create-a-gif-file-of-plot/99795 "2023-06-05T10:22:30Z")

</div>

I’m a new user of JULIA. I’m trying to line by line translation of the following MATLAB code t=0; dt =1e-4; tmax=0.5; nmax=round(tmax/dt); for n=1:nmax t=t+dt; if mod(n,100)==0 x = 0:0.1:2\*pi; y = sin(x + (…

---

## [Passing abstract structs to a function](https://discourse.julialang.org/t/passing-abstract-structs-to-a-function/99877)

<div class="topic-metadata">

**Author:** [@Santos\_Michelena](https://discourse.julialang.org/u/Santos_Michelena)\
**Replies:** 2\
**Last updated:** [June 5, 2023, 9:54am UTC](https://discourse.julialang.org/t/passing-abstract-structs-to-a-function/99877 "2023-06-05T09:54:59Z")

</div>

Hello, I’m trying to write a solver library for a very specific machine learning problem and I have a function that errors in runtime and I really don’t understand what exactly is wrong. In particular, the function that…

---

## [Compute fourrier transform in Julia](https://discourse.julialang.org/t/compute-fourrier-transform-in-julia/99664)

<div class="topic-metadata">

**Author:** [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Replies:** 21\
**Last updated:** [June 5, 2023, 9:07am UTC](https://discourse.julialang.org/t/compute-fourrier-transform-in-julia/99664 "2023-06-05T09:07:16Z")

</div>

Given a function evaluated to a grid, how can I compute its fourrier transform nummericially? For example, given the box function function step(x) if abs(x) \< a return 1 else return 0 end end how can I comput…

---

## [How to convert simulated distribution to a coarser distribution](https://discourse.julialang.org/t/how-to-convert-simulated-distribution-to-a-coarser-distribution/99874)

<div class="topic-metadata">

**Author:** [@Zerosum](https://discourse.julialang.org/u/Zerosum)\
**Replies:** 1\
**Last updated:** [June 5, 2023, 8:12am UTC](https://discourse.julialang.org/t/how-to-convert-simulated-distribution-to-a-coarser-distribution/99874 "2023-06-05T08:12:31Z")

</div>

I was wondering if I could get some help on this problem. By simulating 10,000 times a stochastic system that yields a positive number at the end, I collect 10,000 random positive numbers. This is what I call a simulate…

---

## [PlotlyJS: Feature of legendgroup disable the feature to toggle visibility of individual traces](https://discourse.julialang.org/t/plotlyjs-feature-of-legendgroup-disable-the-feature-to-toggle-visibility-of-individual-traces/99875)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 0\
**Last updated:** [June 5, 2023, 8:01am UTC](https://discourse.julialang.org/t/plotlyjs-feature-of-legendgroup-disable-the-feature-to-toggle-visibility-of-individual-traces/99875 "2023-06-05T08:01:52Z")

</div>

If you have to diagrams in one figure you can group the legend according to the related sub-plots by means of the feature legendgroup. Unfortunately, this breaks in my example below the interactive functionality to toggl…

---

## [CUR in LowRankApprox](https://discourse.julialang.org/t/cur-in-lowrankapprox/99867)

<div class="topic-metadata">

**Author:** [@Marcelo\_Ferreira](https://discourse.julialang.org/u/Marcelo_Ferreira)\
**Replies:** 1\
**Last updated:** [June 5, 2023, 7:56am UTC](https://discourse.julialang.org/t/cur-in-lowrankapprox/99867 "2023-06-05T07:56:28Z")

</div>

I installed the LowRankApprox package and I want to use the Cur decomposition. I read part of the documentation on GitHub, but I still don’t understand how to use it. For example, given a matrix A = rand(5,5), and I want…

---

## [Different figure object when using PlotlyJS.make\_subplots()](https://discourse.julialang.org/t/different-figure-object-when-using-plotlyjs-make-subplots/99765)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 0\
**Last updated:** [June 2, 2023, 12:09pm UTC](https://discourse.julialang.org/t/different-figure-object-when-using-plotlyjs-make-subplots/99765 "2023-06-02T12:09:55Z")

</div>

Today it gave me a headache to understand the different behaviour of Plot() and make\_subplots() of the package PlotlyJS. Below an example that shows the difference and might help others: using PlotlyJS # --- function p…

[Previous page](https://discourse.julialang.org/latest.md?page=678)

[Next page](https://discourse.julialang.org/latest.md?page=680)
