# Latest

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

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

**Page:** 1403

---

## [Digilent analog discovery interface](https://discourse.julialang.org/t/digilent-analog-discovery-interface/60528)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 2\
**Last updated:** [May 4, 2021, 4:55pm UTC](https://discourse.julialang.org/t/digilent-analog-discovery-interface/60528 "2021-05-04T16:55:55Z")

</div>

Studying engineering, and we have access to a diligent analog discovery 2 board USB Oscilloscope and Logic Analyzer - Digilent Analog Discovery 2 (digilentinc.com) It is very capable, and has free software “Waveforms” i…

---

## [Flux custom model - feedback of the output layer to the input layer](https://discourse.julialang.org/t/flux-custom-model-feedback-of-the-output-layer-to-the-input-layer/38599)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 10\
**Last updated:** [May 4, 2021, 4:52pm UTC](https://discourse.julialang.org/t/flux-custom-model-feedback-of-the-output-layer-to-the-input-layer/38599 "2021-05-04T16:52:14Z")

</div>

Hi, I´m trying to feedback the output of the output layer of a fully feedfoward neural network to the input layer of the network ? I would like to create a similiar structure like in the illustration. Detailed expl…

---

## [Is there a way to avoid allocations when calling a Flux model? Especially on a GPU](https://discourse.julialang.org/t/is-there-a-way-to-avoid-allocations-when-calling-a-flux-model-especially-on-a-gpu/60279)

<div class="topic-metadata">

**Author:** [@jmair](https://discourse.julialang.org/u/jmair)\
**Replies:** 5\
**Last updated:** [May 4, 2021, 4:47pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-avoid-allocations-when-calling-a-flux-model-especially-on-a-gpu/60279 "2021-05-04T16:47:18Z")

</div>

When using Flux, especially with CUDA, each inference call uses a lot of allocations, particularly on a GPU, below is an example: julia\> using Flux, CUDA; julia\> model\_cpu = Flux.Chain(Flux.Dense(2, 8), Flux.Dense(8,8)…

---

## [How to tell if \`stdin\` buffer is not empty](https://discourse.julialang.org/t/how-to-tell-if-stdin-buffer-is-not-empty/60514)

<div class="topic-metadata">

**Author:** [@jakewilliami](https://discourse.julialang.org/u/jakewilliami)\
**Replies:** 3\
**Last updated:** [May 4, 2021, 4:42pm UTC](https://discourse.julialang.org/t/how-to-tell-if-stdin-buffer-is-not-empty/60514 "2021-05-04T16:42:44Z")

</div>

I thought that bytesavailable would solve this issue (based on this), but I will demonstrate that it doesn’t work. Say I have the following script: println(bytesavailable(stdin)) Now I check how many bytes there are i…

---

## [Do type annotations help Julia determine which method to call?](https://discourse.julialang.org/t/do-type-annotations-help-julia-determine-which-method-to-call/60476)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 4\
**Last updated:** [May 4, 2021, 3:59pm UTC](https://discourse.julialang.org/t/do-type-annotations-help-julia-determine-which-method-to-call/60476 "2021-05-04T15:59:23Z")

</div>

Consider the following methods: function do\_work(first::Number, second::Number) println("Calling function where the parameters are numbers.") end function do\_work(first::Number,second::AbstractFloat) println("C…

---

## [How to save @time output in a file or variable?](https://discourse.julialang.org/t/how-to-save-time-output-in-a-file-or-variable/11218)

<div class="topic-metadata">

**Author:** [@alirezamecheng](https://discourse.julialang.org/u/alirezamecheng)\
**Replies:** 6\
**Last updated:** [April 13, 2021, 3:47pm UTC](https://discourse.julialang.org/t/how-to-save-time-output-in-a-file-or-variable/11218 "2021-04-13T15:47:30Z")

</div>

Hello, please consider this code: for N = \[10 20 30\] for C = \[0.1 0.2\] @time my\_function(N,C); end end The my\_function is a defined function. My question is How I can save @time output in a file so that after runni…

---

## [\[Julia usage\] Passing "complex" arguments to a function with default values](https://discourse.julialang.org/t/julia-usage-passing-complex-arguments-to-a-function-with-default-values/60506)

<div class="topic-metadata">

**Author:** [@erwanlecarpentier](https://discourse.julialang.org/u/erwanlecarpentier)\
**Replies:** 5\
**Last updated:** [May 4, 2021, 2:51pm UTC](https://discourse.julialang.org/t/julia-usage-passing-complex-arguments-to-a-function-with-default-values/60506 "2021-05-04T14:51:17Z")

</div>

Hi! This is a quite general question on the correct way to pass arguments with default values in Julia. I am concerned about the facts that 1) my function’s signature could get quite unreadable if I have many arguments …

---

## [Managing and updating Julia versions (using Docker?) on Ubuntu - VS Code or Juno?](https://discourse.julialang.org/t/managing-and-updating-julia-versions-using-docker-on-ubuntu-vs-code-or-juno/60518)

<div class="topic-metadata">

**Author:** [@ignace](https://discourse.julialang.org/u/ignace)\
**Replies:** 1\
**Last updated:** [May 4, 2021, 1:34pm UTC](https://discourse.julialang.org/t/managing-and-updating-julia-versions-using-docker-on-ubuntu-vs-code-or-juno/60518 "2021-05-04T13:34:22Z")

</div>

Hello! What are good (well-established) ways to install and use Julia on an Ubuntu system, allowing for the possibility to have multiple working versions of Julia from which one can choose (for instance v1.5.4 on Monday…

---

## [What is a good way to delete lines in Makie?](https://discourse.julialang.org/t/what-is-a-good-way-to-delete-lines-in-makie/60478)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [May 4, 2021, 1:19pm UTC](https://discourse.julialang.org/t/what-is-a-good-way-to-delete-lines-in-makie/60478 "2021-05-04T13:19:38Z")

</div>

I have a diagram in a layout that is changing depending on user input. This means I need to delete the line and change the axis label again and again. What is the best way to do that? This is my current approach, but it…

---

## [Find the location of the function I'm calling?](https://discourse.julialang.org/t/find-the-location-of-the-function-im-calling/55856)

<div class="topic-metadata">

**Author:** [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Replies:** 3\
**Last updated:** [May 4, 2021, 1:05pm UTC](https://discourse.julialang.org/t/find-the-location-of-the-function-im-calling/55856 "2021-05-04T13:05:23Z")

</div>

How can I figure out where the calling function is located? I want an include to be relative to the function itself.

---

## [Days without updating the package registries](https://discourse.julialang.org/t/days-without-updating-the-package-registries/60510)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 5\
**Last updated:** [May 4, 2021, 12:48pm UTC](https://discourse.julialang.org/t/days-without-updating-the-package-registries/60510 "2021-05-04T12:48:58Z")

</div>

More than three days without updating the package registries. What to do? (@v1.5) pkg\> up No Changes to \`C:\\Users\\Hermesr\\.julia\\environments\\v1.5\\Project.toml\` No Changes to \`C:\\Users\\Hermesr\\.julia\\environments\\v1.5\\…

---

## [Continuous view of CuArray using CartesianIndices does not return native CuArray](https://discourse.julialang.org/t/continuous-view-of-cuarray-using-cartesianindices-does-not-return-native-cuarray/60428)

<div class="topic-metadata">

**Author:** [@jpdoane](https://discourse.julialang.org/u/jpdoane)\
**Replies:** 2\
**Last updated:** [May 4, 2021, 12:44pm UTC](https://discourse.julialang.org/t/continuous-view-of-cuarray-using-cartesianindices-does-not-return-native-cuarray/60428 "2021-05-04T12:44:14Z")

</div>

views of CuArrays generally return a native CuArray object if the underlying data is contiguous. However, the does not seem to be the case if views are formed using CartesianIndices. example: sz = (8,4,2,2) x = CUDA.ra…

---

## [Yet another way to curry underscore to create anonymous fn](https://discourse.julialang.org/t/yet-another-way-to-curry-underscore-to-create-anonymous-fn/60080)

<div class="topic-metadata">

**Author:** [@qsong](https://discourse.julialang.org/u/qsong)\
**Replies:** 15\
**Last updated:** [May 4, 2021, 12:30pm UTC](https://discourse.julialang.org/t/yet-another-way-to-curry-underscore-to-create-anonymous-fn/60080 "2021-05-04T12:30:09Z")

</div>

This is a long story and ideas/PRs have been proposed (eg. #24990), but it seems still unclear when and if such a syntax will be implemented. Combining command literals with few functions from Underscores.jl and I got a …

---

## [Zygote errors on simple operations with Complex CUDA Arrays](https://discourse.julialang.org/t/zygote-errors-on-simple-operations-with-complex-cuda-arrays/60515)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 0\
**Last updated:** [May 4, 2021, 12:23pm UTC](https://discourse.julialang.org/t/zygote-errors-on-simple-operations-with-complex-cuda-arrays/60515 "2021-05-04T12:23:42Z")

</div>

Hey, I recently raised an issue on GitHub for Zygote because I fail to get Zygote differentiating code where I apply a simple function on a complex CUDA array. I’m using CUDA 3.1.0, Julia 1.6.1 and Zygote 0.6.10. It…

---

## [What’s the outlook on \`meshscatter\` supporting an array of markers?](https://discourse.julialang.org/t/what-s-the-outlook-on-meshscatter-supporting-an-array-of-markers/60505)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 2\
**Last updated:** [May 4, 2021, 11:55am UTC](https://discourse.julialang.org/t/what-s-the-outlook-on-meshscatter-supporting-an-array-of-markers/60505 "2021-05-04T11:55:16Z")

</div>

The question is mostly if the underlying engine in GLMakie allows this and it is just not exposed or if there are other reasons why this is not available.

---

## [Peeling functions calling functions](https://discourse.julialang.org/t/peeling-functions-calling-functions/60452)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 19\
**Last updated:** [May 4, 2021, 11:39am UTC](https://discourse.julialang.org/t/peeling-functions-calling-functions/60452 "2021-05-04T11:39:08Z")

</div>

I wonder, if there is a way in Julia to “peel away” an outer function calling an inner function julia\> f(x)=sqrt(abs2(x)) The task would be to generate a function g(x)=abs2(x) by only having access to f and knowing tha…

---

## [Can WGLMakie display a 2D plot in Jupyter Notebook?](https://discourse.julialang.org/t/can-wglmakie-display-a-2d-plot-in-jupyter-notebook/60458)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 1\
**Last updated:** [May 4, 2021, 9:34am UTC](https://discourse.julialang.org/t/can-wglmakie-display-a-2d-plot-in-jupyter-notebook/60458 "2021-05-04T09:34:28Z")

</div>

From docs it’s not clear whether a 2D plot, generated by WGLMakie, can be displayed in IJulia or not. If it is possible I’d be very grateful for an explicit example. Thanks!

---

## [Global, non-convex, smooth and differentiable optimisation?](https://discourse.julialang.org/t/global-non-convex-smooth-and-differentiable-optimisation/60460)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 18\
**Last updated:** [May 4, 2021, 8:14am UTC](https://discourse.julialang.org/t/global-non-convex-smooth-and-differentiable-optimisation/60460 "2021-05-04T08:14:26Z")

</div>

I do have a loss function that : Is expressed as \\lVert \\mathbf y - \\mathbf A'\\mathbf p(\\mathbf x)\\rVert\_2^2, where \\mathbf y is a simple vector, \\mathbf A is a simple matrix (lower-triangular), and p\_1,...,p\_m are nas…

---

## [Read an existing txt file](https://discourse.julialang.org/t/read-an-existing-txt-file/60473)

<div class="topic-metadata">

**Author:** [@rahmani-hossein](https://discourse.julialang.org/u/rahmani-hossein)\
**Replies:** 2\
**Last updated:** [May 4, 2021, 8:03am UTC](https://discourse.julialang.org/t/read-an-existing-txt-file/60473 "2021-05-04T08:03:36Z")

</div>

I faced something strange when I create a file and writing sth(by hand) in it I can read it with readdlm and there isn’t any problem .but when I want to read an existed txt file on my desktop it says to me there isn’t an…

---

## [In what order are \`\_\_init\_\_\` functions called?](https://discourse.julialang.org/t/in-what-order-are-init-functions-called/60492)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 1\
**Last updated:** [May 4, 2021, 7:52am UTC](https://discourse.julialang.org/t/in-what-order-are-init-functions-called/60492 "2021-05-04T07:52:05Z")

</div>

If a module C contains using A using B I know that C.\_\_init\_\_ is called last. But is there any promise about the order of A.\_\_init\_\_ and B.\_\_init\_\_?

---

## [Is parallel Arrow data querying possible?](https://discourse.julialang.org/t/is-parallel-arrow-data-querying-possible/60462)

<div class="topic-metadata">

**Author:** [@Sami](https://discourse.julialang.org/u/Sami)\
**Replies:** 4\
**Last updated:** [May 4, 2021, 7:30am UTC](https://discourse.julialang.org/t/is-parallel-arrow-data-querying-possible/60462 "2021-05-04T07:30:32Z")

</div>

I have 16 cores on my machine and queries seem to utilize only one of them. I would like to be 16 times faster with my queries - so is it possible to run parallel queries on Arrow data (read in with Arrow.jl)?? For exam…

---

## [Organization of multiple modules in same package](https://discourse.julialang.org/t/organization-of-multiple-modules-in-same-package/17287)

<div class="topic-metadata">

**Author:** [@Orbots](https://discourse.julialang.org/u/Orbots)\
**Replies:** 18\
**Last updated:** [May 4, 2021, 6:01am UTC](https://discourse.julialang.org/t/organization-of-multiple-modules-in-same-package/17287 "2021-05-04T06:01:48Z")

</div>

I’m developing a package which defines a number of types. Some types are helpers and some are specific implementations (parametric or abstract) of other types from this package. I’ve been poking around popular packages…

---

## [Broadcasting over a struct with two arrays](https://discourse.julialang.org/t/broadcasting-over-a-struct-with-two-arrays/26136)

<div class="topic-metadata">

**Author:** [@mateuszbaran](https://discourse.julialang.org/u/mateuszbaran)\
**Replies:** 7\
**Last updated:** [May 4, 2021, 5:50am UTC](https://discourse.julialang.org/t/broadcasting-over-a-struct-with-two-arrays/26136 "2021-05-04T05:50:55Z")

</div>

Hi! I have a type that looks like struct A{X1\<:AbstractArray, X2\<:AbstractArray} x1::X1 x2::X2 end a = A(\[1, 2\], \[1 2; 3 4\]) b = A(\[1, 4\], \[-1 2; -3 4\]) and I’d like to extend broadcasting such that, for examp…

---

## [Result of mean() is different for CuArray vs. regular Int64 array](https://discourse.julialang.org/t/result-of-mean-is-different-for-cuarray-vs-regular-int64-array/60497)

<div class="topic-metadata">

**Author:** [@drjoke](https://discourse.julialang.org/u/drjoke)\
**Replies:** 1\
**Last updated:** [May 4, 2021, 5:35am UTC](https://discourse.julialang.org/t/result-of-mean-is-different-for-cuarray-vs-regular-int64-array/60497 "2021-05-04T05:35:21Z")

</div>

mean() is returning different results for CuArray vs regular Int64 array. using CUDA using Statistics INT = rand(Int64, 100000000) CUDA\_INT = CuArray(INT) I get 7.086957573875891e14 for mean(INT) and -2.814992433201059…

---

## [2-D potential well](https://discourse.julialang.org/t/2-d-potential-well/60495)

<div class="topic-metadata">

**Author:** [@james1](https://discourse.julialang.org/u/james1)\
**Replies:** 0\
**Last updated:** [May 4, 2021, 2:44am UTC](https://discourse.julialang.org/t/2-d-potential-well/60495 "2021-05-04T02:44:23Z")

</div>

Ask for a big guy A programming language that can use Julia’s QuantumOptics package to solve single-particle and multi-particle problems in a 2-D potential well

---

## [JuMP - defining problem by composing functions/expressions and mapping over collection](https://discourse.julialang.org/t/jump-defining-problem-by-composing-functions-expressions-and-mapping-over-collection/52568)

<div class="topic-metadata">

**Author:** [@NickRedwood](https://discourse.julialang.org/u/NickRedwood)\
**Replies:** 13\
**Last updated:** [May 4, 2021, 5:01am UTC](https://discourse.julialang.org/t/jump-defining-problem-by-composing-functions-expressions-and-mapping-over-collection/52568 "2021-05-04T05:01:15Z")

</div>

Hi, I’m new to both Julia and JuMP. Experience in C#, Scala and I like functional programming. Would love some help to get in to Julia optimisation. How do I compose functions or expressions in JuMP? I can make a trivia…

---

## [Julia HTTP.jl performance vs python requests](https://discourse.julialang.org/t/julia-http-jl-performance-vs-python-requests/60490)

<div class="topic-metadata">

**Author:** [@serhii](https://discourse.julialang.org/u/serhii)\
**Replies:** 1\
**Last updated:** [May 4, 2021, 3:35am UTC](https://discourse.julialang.org/t/julia-http-jl-performance-vs-python-requests/60490 "2021-05-04T03:35:29Z")

</div>

Hello, I am currently trying to port some of my python code to Julia. And after some benchmarking, I’ve noticed that Julia’s HTTP.jl performance is somewhat worse than python’s requests (370ms vs 240ms). This is probab…

---

## [Multithreading @threads inside @spawn](https://discourse.julialang.org/t/multithreading-threads-inside-spawn/60491)

<div class="topic-metadata">

**Author:** [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Replies:** 2\
**Last updated:** [May 4, 2021, 2:57am UTC](https://discourse.julialang.org/t/multithreading-threads-inside-spawn/60491 "2021-05-04T02:57:46Z")

</div>

Are threads inside a spawn supposed to find empty threads to use? For example, my function uses @threads to perform 3 10 second sleeps in 10 seconds total. If I then try to spawn 3 of these function calls, ideally I woul…

---

## [Faster gp fitting on million observations?](https://discourse.julialang.org/t/faster-gp-fitting-on-million-observations/59519)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 15\
**Last updated:** [May 4, 2021, 1:51am UTC](https://discourse.julialang.org/t/faster-gp-fitting-on-million-observations/59519 "2021-05-04T01:51:57Z")

</div>

I have a million-observation regression problem with one outcome and several predictors, including a time variable. I would like to fit the over-time variation with a Gaussian process. I tried using AbstractGPs with Dyna…

---

## [Am I creating distributions wrong in Turing?](https://discourse.julialang.org/t/am-i-creating-distributions-wrong-in-turing/60142)

<div class="topic-metadata">

**Author:** [@pthompson234](https://discourse.julialang.org/u/pthompson234)\
**Replies:** 11\
**Last updated:** [May 4, 2021, 1:21am UTC](https://discourse.julialang.org/t/am-i-creating-distributions-wrong-in-turing/60142 "2021-05-04T01:21:24Z")

</div>

Hello, I’m using Turing and having some issues. To reproduce this, I’ll provide about as simple of an example as I can generate. Let’s take the basic example from the docs (Probabilistic Programming in Thirty Seconds) an…

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

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