# Latest

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

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

**Page:** 1344

---

## [Is there a maximum(f, op, itrs...) in Julia?](https://discourse.julialang.org/t/is-there-a-maximum-f-op-itrs-in-julia/63868)

<div class="topic-metadata">

**Author:** [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Replies:** 14\
**Last updated:** [July 2, 2021, 7:36am UTC](https://discourse.julialang.org/t/is-there-a-maximum-f-op-itrs-in-julia/63868 "2021-07-02T07:36:18Z")

</div>

Sometimes I see the following pattern in code. How can I write this in a more-efficient/elegant way? Without writing explicit loops, of course. a = rand(5,5); b = rand(5,5); delta = maximum(abs, i-j for (i,j) in zip(a,b…

---

## [Help needed with CUDA](https://discourse.julialang.org/t/help-needed-with-cuda/63923)

<div class="topic-metadata">

**Author:** [@Fabrice\_Rosay](https://discourse.julialang.org/u/Fabrice_Rosay)\
**Replies:** 2\
**Last updated:** [July 2, 2021, 6:31am UTC](https://discourse.julialang.org/t/help-needed-with-cuda/63923 "2021-07-02T06:31:39Z")

</div>

“Oups I did it again”, but I don’t really know what. Suddenly CUDA won’t compile anymore. I got a warning message: WARNING: both ExprTools and LLVM export “parameters”; uses of it in module CUDA must be qualified and …

---

## [Using intermediate results in conditional Gibbs in Turing](https://discourse.julialang.org/t/using-intermediate-results-in-conditional-gibbs-in-turing/58203)

<div class="topic-metadata">

**Author:** [@jbmuir](https://discourse.julialang.org/u/jbmuir)\
**Replies:** 2\
**Last updated:** [July 2, 2021, 5:12am UTC](https://discourse.julialang.org/t/using-intermediate-results-in-conditional-gibbs-in-turing/58203 "2021-07-02T05:12:08Z")

</div>

I have a problem with an expensive intermediate computation that I have to use both within the normal model definition, and in a conditional Gibbs update - is there some way that I can reuse the computation directly in t…

---

## [Diagnose to\_vertices(::Vector{Float64})](https://discourse.julialang.org/t/diagnose-to-vertices-vector-float64/63636)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [July 2, 2021, 4:48am UTC](https://discourse.julialang.org/t/diagnose-to-vertices-vector-float64/63636 "2021-07-02T04:48:59Z")

</div>

I don’t really know what’s going on here, are there any tips for diagnosing it? (I don’t have a reproducible example so I won’t be surprised if there’s nothing to say …) julia\> draw(layers) ERROR: MethodError: no metho…

---

## [How to run a @example block and get the result inside a docstring?](https://discourse.julialang.org/t/how-to-run-a-example-block-and-get-the-result-inside-a-docstring/63922)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 2\
**Last updated:** [July 2, 2021, 3:54am UTC](https://discourse.julialang.org/t/how-to-run-a-example-block-and-get-the-result-inside-a-docstring/63922 "2021-07-02T03:54:35Z")

</div>

Currently, I am using DocStringExtensions and the abbreviations, e.g. $SIGNATURES, are helping me a lot by generating information inside the docstrings. I was expecting something similar with Documenter and the @example …

---

## [Best way to host a julia webapp?](https://discourse.julialang.org/t/best-way-to-host-a-julia-webapp/55719)

<div class="topic-metadata">

**Author:** [@Jojo\_Dad](https://discourse.julialang.org/u/Jojo_Dad)\
**Replies:** 3\
**Last updated:** [July 1, 2021, 10:00pm UTC](https://discourse.julialang.org/t/best-way-to-host-a-julia-webapp/55719 "2021-07-01T22:00:35Z")

</div>

I want to host a Julia webapp. But I would like to avoid having to use my own server on the Web. Are there commercial Website hosting services for Julia-based applications?

---

## [Dash.jl send\_file or send\_data\_frame](https://discourse.julialang.org/t/dash-jl-send-file-or-send-data-frame/63499)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 1\
**Last updated:** [July 1, 2021, 9:58pm UTC](https://discourse.julialang.org/t/dash-jl-send-file-or-send-data-frame/63499 "2021-07-01T21:58:56Z")

</div>

I am working with Dash and want to provide a link to download a file (e.g. a CSV). I can see that dash supports the following, but I could not find any of these functions in DashCoreComponents for Julia. Am I missing a…

---

## [Could the Profile.print() tree view sort in the other order?](https://discourse.julialang.org/t/could-the-profile-print-tree-view-sort-in-the-other-order/63881)

<div class="topic-metadata">

**Author:** [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Replies:** 1\
**Last updated:** [July 1, 2021, 10:59am UTC](https://discourse.julialang.org/t/could-the-profile-print-tree-view-sort-in-the-other-order/63881 "2021-07-01T10:59:43Z")

</div>

Hi, I’m aware there are other ways of viewing profile output, but Profile.print() is pretty handy in a pinch. It would be even handier if the tree was sorted by count. The docs say that sortedby “Controls the order in…

---

## [Unable to fit my ML model](https://discourse.julialang.org/t/unable-to-fit-my-ml-model/63909)

<div class="topic-metadata">

**Author:** [@Maria\_Brown](https://discourse.julialang.org/u/Maria_Brown)\
**Replies:** 6\
**Last updated:** [July 1, 2021, 8:21pm UTC](https://discourse.julialang.org/t/unable-to-fit-my-ml-model/63909 "2021-07-01T20:21:27Z")

</div>

Good day. Please I have some issues with applying ML algorithmes in Julia. I am trying to apply Logistic reg algo on a Diabetes dataset. I believe i have to make sure the prédictif variables are in a table and thé targe…

---

## [Incompatible changes in Pkg?](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 17\
**Last updated:** [July 1, 2021, 8:13pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326 "2021-07-01T20:13:44Z")

</div>

I am getting some new errors. With 1.5.3. Current folder: C:\\Users\\PetrKrysl\\Documents\\work\\FinEtoolsTestAll.jl\\tests\\FinEtools.jl …

---

## [Constrained parameter in Turing](https://discourse.julialang.org/t/constrained-parameter-in-turing/63869)

<div class="topic-metadata">

**Author:** [@Farlein](https://discourse.julialang.org/u/Farlein)\
**Replies:** 8\
**Last updated:** [July 1, 2021, 7:38pm UTC](https://discourse.julialang.org/t/constrained-parameter-in-turing/63869 "2021-07-01T19:38:23Z")

</div>

Hi there, I get “ERROR: ArgumentError: Bernoulli: the condition zero(p) \<= p \<= one(p) is not satisfied.” from the code below, when using Turing to fit parameters with a constrain, α\_1 + β\_1 \* t \<=0. From the error, I t…

---

## [Accessing variables in Main within a Module using RCall](https://discourse.julialang.org/t/accessing-variables-in-main-within-a-module-using-rcall/63813)

<div class="topic-metadata">

**Author:** [@viraltux](https://discourse.julialang.org/u/viraltux)\
**Replies:** 4\
**Last updated:** [July 1, 2021, 5:30pm UTC](https://discourse.julialang.org/t/accessing-variables-in-main-within-a-module-using-rcall/63813 "2021-07-01T17:30:40Z")

</div>

I would like to access variables declared in Main from within a module but they’re not in scope and I wonder how this can be achieved. using RCall x = 1 f(var::String) = eval(Meta.parse("@rput ("\*var\*")")) module M1 …

---

## [Julia package for the use of visualizers in machine learning](https://discourse.julialang.org/t/julia-package-for-the-use-of-visualizers-in-machine-learning/63904)

<div class="topic-metadata">

**Author:** [@CompulsoryCoffee](https://discourse.julialang.org/u/CompulsoryCoffee)\
**Replies:** 0\
**Last updated:** [July 1, 2021, 4:46pm UTC](https://discourse.julialang.org/t/julia-package-for-the-use-of-visualizers-in-machine-learning/63904 "2021-07-01T16:46:06Z")

</div>

Hi, I am wondering if there is a Package like Yellowbricks in Julia for feature analysis as part of the machine learning workflow? https://www.scikit-yb.org/en/latest/api/features/pcoords.html#parallel-coordinates T…

---

## [Event handling in jump problems](https://discourse.julialang.org/t/event-handling-in-jump-problems/63882)

<div class="topic-metadata">

**Author:** [@skleinbo](https://discourse.julialang.org/u/skleinbo)\
**Replies:** 3\
**Last updated:** [July 1, 2021, 4:40pm UTC](https://discourse.julialang.org/t/event-handling-in-jump-problems/63882 "2021-07-01T16:40:26Z")

</div>

Consider for the sake of a minimal example the following pure jump problem. rn2 = @reaction\_network begin a, 0 --\> X end a prob2\_jump = JumpProblem(rn2, DiscreteProblem(rn2, \[0\], (0.0, 10.0), \[1.0\]), Direct()) I w…

---

## [Julia 1.6.2 testing period](https://discourse.julialang.org/t/julia-1-6-2-testing-period/63903)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 0\
**Last updated:** [July 1, 2021, 4:37pm UTC](https://discourse.julialang.org/t/julia-1-6-2-testing-period/63903 "2021-07-01T16:37:22Z")

</div>

The release-1.6 branch on the Julia repository now contains the set of commits we’re planning to tag as v1.6.2, the second patch release in the 1.6 series. The list of commits included since v1.6.1 is available here. As …

---

## [Is it good practice to have a variable binding change type in Julia programming?](https://discourse.julialang.org/t/is-it-good-practice-to-have-a-variable-binding-change-type-in-julia-programming/63896)

<div class="topic-metadata">

**Author:** [@Thomas](https://discourse.julialang.org/u/Thomas)\
**Replies:** 6\
**Last updated:** [July 1, 2021, 3:06pm UTC](https://discourse.julialang.org/t/is-it-good-practice-to-have-a-variable-binding-change-type-in-julia-programming/63896 "2021-07-01T15:06:13Z")

</div>

Is the following good practice and why? x = \[rand(3,3) for i in 1:10\] x = sum(x) The first assignment binds x to Array{Matrix} and the second to Matrix. The type of the object x is bind to changes in the code. Code is …

---

## [\[ANN\] Ghost.jl - the code tracer](https://discourse.julialang.org/t/ann-ghost-jl-the-code-tracer/63403)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 4\
**Last updated:** [July 1, 2021, 2:59pm UTC](https://discourse.julialang.org/t/ann-ghost-jl-the-code-tracer/63403 "2021-07-01T14:59:40Z")

</div>

Ghost.jl lets you recursively trace a function execution and record all primitive operations onto a linearized tape. using Ghost inc(x) = x + 1 mul(x, y) = x \* y inc\_double(x) = mul(inc(x), inc(x)) val, tape = trace(i…

---

## [Type stability / tuple lengths](https://discourse.julialang.org/t/type-stability-tuple-lengths/63867)

<div class="topic-metadata">

**Author:** [@nchisholm](https://discourse.julialang.org/u/nchisholm)\
**Replies:** 2\
**Last updated:** [July 1, 2021, 2:46pm UTC](https://discourse.julialang.org/t/type-stability-tuple-lengths/63867 "2021-07-01T14:46:41Z")

</div>

Consider the following function that, given a tuple t, computes partial products of the elements specified by a second tuple parts as follows function partialprods(t::NTuple{N,Int}, parts::NTuple{M,Int}) where {N,M} …

---

## [Feedback on how to make this bit of code more Julian](https://discourse.julialang.org/t/feedback-on-how-to-make-this-bit-of-code-more-julian/63888)

<div class="topic-metadata">

**Author:** [@Roland\_Guichard](https://discourse.julialang.org/u/Roland_Guichard)\
**Replies:** 9\
**Last updated:** [July 1, 2021, 2:46pm UTC](https://discourse.julialang.org/t/feedback-on-how-to-make-this-bit-of-code-more-julian/63888 "2021-07-01T14:46:06Z")

</div>

Hello there, I am relatively new to Julia but I have developed this piece of code (I haven’t posted the full code yet) that is working as intended. However, I’d really appreciate feedbacks on how to improve it and make …

---

## [Data Preparation for TGS Salt Identification](https://discourse.julialang.org/t/data-preparation-for-tgs-salt-identification/63893)

<div class="topic-metadata">

**Author:** [@Paritosh\_Kr](https://discourse.julialang.org/u/Paritosh_Kr)\
**Replies:** 0\
**Last updated:** [July 1, 2021, 2:19pm UTC](https://discourse.julialang.org/t/data-preparation-for-tgs-salt-identification/63893 "2021-07-01T14:19:22Z")

</div>

I am writing a Unet in Flux.jl for TGS Salt identification challenge . The data is organised as follows:- data/train/images - contains (101x101x3) training images data/train/masks - contains (101x101x1) training mask…

---

## [Which keyword could I plot color on triangle mesh using mesh3d in Plots with plotlyjs backend?](https://discourse.julialang.org/t/which-keyword-could-i-plot-color-on-triangle-mesh-using-mesh3d-in-plots-with-plotlyjs-backend/63887)

<div class="topic-metadata">

**Author:** [@deltaeecs](https://discourse.julialang.org/u/deltaeecs)\
**Replies:** 0\
**Last updated:** [July 1, 2021, 1:07pm UTC](https://discourse.julialang.org/t/which-keyword-could-i-plot-color-on-triangle-mesh-using-mesh3d-in-plots-with-plotlyjs-backend/63887 "2021-07-01T13:07:48Z")

</div>

In PlotlyJS package, intensity is used to set the color on triangles or vertexes in mesh3d function. Is there any way to do the same thing in Plots with plotlyjs backend?

---

## [Suggestions for reproducible tutorials](https://discourse.julialang.org/t/suggestions-for-reproducible-tutorials/63870)

<div class="topic-metadata">

**Author:** [@lamorton](https://discourse.julialang.org/u/lamorton)\
**Replies:** 3\
**Last updated:** [July 1, 2021, 1:00pm UTC](https://discourse.julialang.org/t/suggestions-for-reproducible-tutorials/63870 "2021-07-01T13:00:58Z")

</div>

From jbay808 on HackerNews: When I was first starting, I almost gave up on Python because the print “Hello world” script that I copy-pasted from an online tutorial failed to run. The hardest part (for me) of getting s…

---

## [Why can't I use \`{}\` in a default function definition? Seems like a bug](https://discourse.julialang.org/t/why-cant-i-use-in-a-default-function-definition-seems-like-a-bug/63092)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 12\
**Last updated:** [July 1, 2021, 12:55pm UTC](https://discourse.julialang.org/t/why-cant-i-use-in-a-default-function-definition-seems-like-a-bug/63092 "2021-07-01T12:55:37Z")

</div>

Hi all :slight\_smile: julia\> f(g = function(::Dict) end) = g f (generic function with 2 methods) julia\> f(g = function(::Dict{}) end) = g ERROR: syntax: expected "(" in function definition Stacktrace: \[1\] top-level sc…

---

## [Speed of Julia vs. Fortran and other languages](https://discourse.julialang.org/t/speed-of-julia-vs-fortran-and-other-languages/63850)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://discourse.julialang.org/u/Beliavsky)\
**Replies:** 6\
**Last updated:** [July 1, 2021, 12:54pm UTC](https://discourse.julialang.org/t/speed-of-julia-vs-fortran-and-other-languages/63850 "2021-07-01T12:54:37Z")

</div>

The Benchmarks category of Fortran code on GitHub lists many benchmarks where Julia is considered, listed below. I will not make any generalizations about the results. Assessment of Programming Languages for Computation…

---

## [Why is this raytracer slow?](https://discourse.julialang.org/t/why-is-this-raytracer-slow/59176)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 29\
**Last updated:** [May 5, 2021, 3:11pm UTC](https://discourse.julialang.org/t/why-is-this-raytracer-slow/59176 "2021-05-05T15:11:17Z")

</div>

I bumped into this repo. https://github.com/edin/raytracer It compares implementations in different languages. I’m surprised that julia is more than 5 times slower than C. The code seems idiomatic. Does anyone have s…

---

## [Adding @sync or (vcat) to @distributed produces error](https://discourse.julialang.org/t/adding-sync-or-vcat-to-distributed-produces-error/63787)

<div class="topic-metadata">

**Author:** [@bojeryd91](https://discourse.julialang.org/u/bojeryd91)\
**Replies:** 1\
**Last updated:** [July 1, 2021, 11:36am UTC](https://discourse.julialang.org/t/adding-sync-or-vcat-to-distributed-produces-error/63787 "2021-07-01T11:36:39Z")

</div>

I am preparing my code to run it on a cluster using SLURM and exploiting multiple cores using the Distributed package. It’s a bit involved and I haven’t been able to reproduce the error in an MWE. The point is to run a …

---

## [Is there a readymade Array Type that stores data as Run-length-encoding of delta?](https://discourse.julialang.org/t/is-there-a-readymade-array-type-that-stores-data-as-run-length-encoding-of-delta/63793)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 9\
**Last updated:** [July 1, 2021, 7:34am UTC](https://discourse.julialang.org/t/is-there-a-readymade-array-type-that-stores-data-as-run-length-encoding-of-delta/63793 "2021-07-01T07:34:12Z")

</div>

I wonder in Julia, is there a ready-made array type that stores data internally as run-length-encoded deltas? E.g. This is literally a question from a colleague working in Python. I am not sharing any secrets as it’s j…

---

## [Great Makie examples](https://discourse.julialang.org/t/great-makie-examples/63820)

<div class="topic-metadata">

**Author:** [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Replies:** 1\
**Last updated:** [June 30, 2021, 2:26pm UTC](https://discourse.julialang.org/t/great-makie-examples/63820 "2021-06-30T14:26:44Z")

</div>

I’d love to show off some outstanding Makie examples at JuliaCon - and in general work towards collecting examples to show off Makies capabilities and get an overview of what people are up to. Code would be great for fu…

---

## [How to make a user-defined objective function with mulitple vector variable and parameter arguments?](https://discourse.julialang.org/t/how-to-make-a-user-defined-objective-function-with-mulitple-vector-variable-and-parameter-arguments/63849)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 6\
**Last updated:** [July 1, 2021, 2:18am UTC](https://discourse.julialang.org/t/how-to-make-a-user-defined-objective-function-with-mulitple-vector-variable-and-parameter-arguments/63849 "2021-07-01T02:18:35Z")

</div>

I would like to optimize a set of 3 variable vectors to minimize the total variance in a dataset. I think my problem is in passing variable and parameter vectors into my user-defined objective. I found this question on …

---

## [Difference between tic() toc(), @time or @elapse in Julia?](https://discourse.julialang.org/t/difference-between-tic-toc-time-or-elapse-in-julia/1177)

<div class="topic-metadata">

**Author:** [@may811204](https://discourse.julialang.org/u/may811204)\
**Replies:** 6\
**Last updated:** [July 1, 2021, 12:07am UTC](https://discourse.julialang.org/t/difference-between-tic-toc-time-or-elapse-in-julia/1177 "2021-07-01T00:07:28Z")

</div>

Hi, I am new to Julia and I am wondering what’s the difference between tic() toc(),@time, @elapse when measuring elapsed time in Julia. I tried the codes below: And here’s the output: It showed that tic() toc() an…

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

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