# Latest

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

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

**Page:** 1499

---

## [CUDA kernel: how to pass an array of functions](https://discourse.julialang.org/t/cuda-kernel-how-to-pass-an-array-of-functions/54784)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 7\
**Last updated:** [February 8, 2021, 3:42pm UTC](https://discourse.julialang.org/t/cuda-kernel-how-to-pass-an-array-of-functions/54784 "2021-02-08T15:42:13Z")

</div>

I am working on genetic programming, where I need to pick a function from a set of functions fs by an integer index in each node of the tree. An example demonstrating the difficulty I encountered is given below. using C…

---

## [Connect to Redshift with SearchLightPostgreSQL](https://discourse.julialang.org/t/connect-to-redshift-with-searchlightpostgresql/53646)

<div class="topic-metadata">

**Author:** [@franco](https://discourse.julialang.org/u/franco)\
**Replies:** 5\
**Last updated:** [February 8, 2021, 3:41pm UTC](https://discourse.julialang.org/t/connect-to-redshift-with-searchlightpostgresql/53646 "2021-02-08T15:41:32Z")

</div>

Following the tutorial Working with Genie Apps - Accessing databases with SearchLight models I’m trying to use SearchLightPostgreSQL to connect to a Redshift database. I noticed it lists LibPQ as one of the dependencies…

---

## [Importing modules after having included them in the Main module](https://discourse.julialang.org/t/importing-modules-after-having-included-them-in-the-main-module/54836)

<div class="topic-metadata">

**Author:** [@Valery](https://discourse.julialang.org/u/Valery)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 3:11pm UTC](https://discourse.julialang.org/t/importing-modules-after-having-included-them-in-the-main-module/54836 "2021-02-08T15:11:23Z")

</div>

Hi all, I want to import some modules containing variables and functions for my project. Down below is a simplified version of my Main module (forward / in Linux). Why does such an error occur ? module Main include("M…

---

## [About garbage collection](https://discourse.julialang.org/t/about-garbage-collection/54845)

<div class="topic-metadata">

**Author:** [@ReneganRonin](https://discourse.julialang.org/u/ReneganRonin)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 3:11pm UTC](https://discourse.julialang.org/t/about-garbage-collection/54845 "2021-02-08T15:11:03Z")

</div>

How does garbage collection work in julia? Does it affect high performance scientific computing? As someone with no computer science background, and also new to programming, should i worry about it in the future? Also…

---

## [How to detect the last iteration in a loop](https://discourse.julialang.org/t/how-to-detect-the-last-iteration-in-a-loop/54833)

<div class="topic-metadata">

**Author:** [@Laco\_Kovac](https://discourse.julialang.org/u/Laco_Kovac)\
**Replies:** 9\
**Last updated:** [February 8, 2021, 2:30pm UTC](https://discourse.julialang.org/t/how-to-detect-the-last-iteration-in-a-loop/54833 "2021-02-08T14:30:30Z")

</div>

How do I detect the last iteration in a loop, e.g. generation INSERT INTO statement for several records: sql = "INSERT INTO table VALUES " for oneRecord in records # guaranteed that records is not empty sql \*= "($va…

---

## [Package recommendations for the task of modeling a multivariate nonlinear stiff system with a black box modeling method](https://discourse.julialang.org/t/package-recommendations-for-the-task-of-modeling-a-multivariate-nonlinear-stiff-system-with-a-black-box-modeling-method/40978)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 2:25pm UTC](https://discourse.julialang.org/t/package-recommendations-for-the-task-of-modeling-a-multivariate-nonlinear-stiff-system-with-a-black-box-modeling-method/40978 "2021-02-08T14:25:37Z")

</div>

Hi, I´m looking for a black box method, which can deal with nonlinear multivariate stiff systems. With stiff I mean a system, which has quite fast but also quite slow time constants. Are there any recommendations which J…

---

## [Announcing ProbabilityBoundsAnalysis.jl: rigorous arithmetic with probabilities](https://discourse.julialang.org/t/announcing-probabilityboundsanalysis-jl-rigorous-arithmetic-with-probabilities/54533)

<div class="topic-metadata">

**Author:** [@AnderGray](https://discourse.julialang.org/u/AnderGray)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 4:37pm UTC](https://discourse.julialang.org/t/announcing-probabilityboundsanalysis-jl-rigorous-arithmetic-with-probabilities/54533 "2021-02-03T16:37:43Z")

</div>

Hi all! I’ve had ProbabilityBoundsAnalysis.jl live and as a registered package for a while, but thought I’d make a short post here. ProbabilityBoundsAnalysis.jl (PBA.jl) allows you to perform rigorous arithmetic operat…

---

## [Collection union/intersection/etc](https://discourse.julialang.org/t/collection-union-intersection-etc/54804)

<div class="topic-metadata">

**Author:** [@fph](https://discourse.julialang.org/u/fph)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 2:18pm UTC](https://discourse.julialang.org/t/collection-union-intersection-etc/54804 "2021-02-08T14:18:04Z")

</div>

Some common binary operations come with a separate method that reduces a collection with it; for instance sum is the reduction form of + or prod is the reduction form of \*. Is there a reduction form for intersect and uni…

---

## [Hashing of different types with same contents](https://discourse.julialang.org/t/hashing-of-different-types-with-same-contents/54839)

<div class="topic-metadata">

**Author:** [@jagot](https://discourse.julialang.org/u/jagot)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 1:23pm UTC](https://discourse.julialang.org/t/hashing-of-different-types-with-same-contents/54839 "2021-02-08T13:23:47Z")

</div>

Say I have two types with hash implementations defined like this struct A{T} t::T end Base.hash(a::A, h::UInt) = hash(a.t, h) struct B{T} t::T end Base.hash(b::B, h::UInt) = hash(b.t, h) I will get their hashes to…

---

## [Optimizing CUDA.jl performance for small array operations](https://discourse.julialang.org/t/optimizing-cuda-jl-performance-for-small-array-operations/54808)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 5\
**Last updated:** [February 8, 2021, 1:02pm UTC](https://discourse.julialang.org/t/optimizing-cuda-jl-performance-for-small-array-operations/54808 "2021-02-08T13:02:58Z")

</div>

Hi, I’m trying to get better GPU performance with CUDA.jl for small array operations. So, I’ve started to port SymbolicRegression.jl to the GPU using CUDA.jl. It seems I’ve gotten the main evaluation part of the code t…

---

## [Gaussian Processes with missing data](https://discourse.julialang.org/t/gaussian-processes-with-missing-data/53987)

<div class="topic-metadata">

**Author:** [@michielver](https://discourse.julialang.org/u/michielver)\
**Replies:** 11\
**Last updated:** [February 8, 2021, 12:38pm UTC](https://discourse.julialang.org/t/gaussian-processes-with-missing-data/53987 "2021-02-08T12:38:10Z")

</div>

Hi everyone, My data (and data generating process) is probably quite peculiar, but nevertheless me (and my supervisor) are convinced it should be possible to model using probabilistic programming, and we believe Gaussia…

---

## [Index type of sparse matrix](https://discourse.julialang.org/t/index-type-of-sparse-matrix/54828)

<div class="topic-metadata">

**Author:** [@rammelmueller](https://discourse.julialang.org/u/rammelmueller)\
**Replies:** 7\
**Last updated:** [February 8, 2021, 12:37pm UTC](https://discourse.julialang.org/t/index-type-of-sparse-matrix/54828 "2021-02-08T12:37:10Z")

</div>

I’m using Arpack.jl to get the lowest few eigenvalues of relatively large N x N matrices. To achive this, I’m first cal sparse(row, col, data) to get the matrix to the appropriate form. Although the matrices I’m working …

---

## [Julia v1.6: \`using\` is faster but first call is slower](https://discourse.julialang.org/t/julia-v1-6-using-is-faster-but-first-call-is-slower/54838)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 12:30pm UTC](https://discourse.julialang.org/t/julia-v1-6-using-is-faster-but-first-call-is-slower/54838 "2021-02-08T12:30:22Z")

</div>

Thanks a lot to all contributors to reduce latency in the new release candidate of Julia v1.6 - great work! I recognized that using can be significantly faster in Julia v1.6, but the first function call becomes signific…

---

## [Vlines ymin, ymax](https://discourse.julialang.org/t/vlines-ymin-ymax/54671)

<div class="topic-metadata">

**Author:** [@ZettEff](https://discourse.julialang.org/u/ZettEff)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 12:28pm UTC](https://discourse.julialang.org/t/vlines-ymin-ymax/54671 "2021-02-08T12:28:50Z")

</div>

Hi, I am using Plots with gr() backend and want to plot the errors of a linear regression model, i.e. indicate with vertical lines the difference between y and yhat. Essentially, I am looking for something similar to p…

---

## [Error in smoothed\_aggregation](https://discourse.julialang.org/t/error-in-smoothed-aggregation/54754)

<div class="topic-metadata">

**Author:** [@mancolric](https://discourse.julialang.org/u/mancolric)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 8:53am UTC](https://discourse.julialang.org/t/error-in-smoothed-aggregation/54754 "2021-02-08T08:53:12Z")

</div>

Hello, I have recently installed julia 1.5.3 and AlgebraicMultigrid package. I have previously deleted earlier versions of julia (included hidden files), so the installation is clean. When I execute ml = Al…

---

## [Setting the x and y axis of a heatmap plot recipe](https://discourse.julialang.org/t/setting-the-x-and-y-axis-of-a-heatmap-plot-recipe/54821)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 6:43am UTC](https://discourse.julialang.org/t/setting-the-x-and-y-axis-of-a-heatmap-plot-recipe/54821 "2021-02-08T06:43:15Z")

</div>

I am trying to create a recipe to plot a custom type like this: struct Sim{TT\<:Real, F} box::Box{TT} ψ::Array{Complex{TT}, 2} # other stuff end where struct Box{TT\<:Real} t::Array{TT, 1} x::Array{T…

---

## [How to create pointer / reference to structure](https://discourse.julialang.org/t/how-to-create-pointer-reference-to-structure/54824)

<div class="topic-metadata">

**Author:** [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)\
**Replies:** 8\
**Last updated:** [February 8, 2021, 6:35am UTC](https://discourse.julialang.org/t/how-to-create-pointer-reference-to-structure/54824 "2021-02-08T06:35:56Z")

</div>

I am trying to create a symbol table in Julia. While i can get create an empty structure pointer in c just by typing struct xyz \*p but i can’t find any equivalent to it in julia. also how do i parse a structure as func…

---

## [Slack link not working :(](https://discourse.julialang.org/t/slack-link-not-working/54810)

<div class="topic-metadata">

**Author:** [@Rakshita\_Varadarajan](https://discourse.julialang.org/u/Rakshita_Varadarajan)\
**Replies:** 7\
**Last updated:** [February 8, 2021, 4:01am UTC](https://discourse.julialang.org/t/slack-link-not-working/54810 "2021-02-08T04:01:20Z")

</div>

I tried using the slack link, but it says invite has expired. Any other way to join in?

---

## [Saving StructArray with Arrow.jl fails](https://discourse.julialang.org/t/saving-structarray-with-arrow-jl-fails/54812)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 2:45am UTC](https://discourse.julialang.org/t/saving-structarray-with-arrow-jl-fails/54812 "2021-02-08T02:45:54Z")

</div>

I am trying to save my flight data with Arrow.jl. The code looks like this: using Rotations, StaticArrays, StructArrays, Arrow const MyFloat = Float32 const SEGMENTS = 7 # number of tether segments …

---

## [Is autodifferentiation possible in this situation?](https://discourse.julialang.org/t/is-autodifferentiation-possible-in-this-situation/54807)

<div class="topic-metadata">

**Author:** [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Replies:** 20\
**Last updated:** [February 8, 2021, 1:52am UTC](https://discourse.julialang.org/t/is-autodifferentiation-possible-in-this-situation/54807 "2021-02-08T01:52:40Z")

</div>

Dear all, I am here to ask the help of the community. I am a Physicist, working in the domain of Astrophysics/Cosmology. About a month ago I discovered Julia and I started translating my Python code in this new language…

---

## [Draw surface with contours plot underneath](https://discourse.julialang.org/t/draw-surface-with-contours-plot-underneath/54813)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 1:43am UTC](https://discourse.julialang.org/t/draw-surface-with-contours-plot-underneath/54813 "2021-02-08T01:43:29Z")

</div>

Hello, there is a way to draw a surface and the contours plot underneath, like the figure below? Below I present my code to adapt. using Plots plotly() plot(size=(600,600)) my\_cg = cgrad(\[:blue,:red,:orange,:yellow\]…

---

## [Plotting an HSV array and also saving the image as a jpeg file](https://discourse.julialang.org/t/plotting-an-hsv-array-and-also-saving-the-image-as-a-jpeg-file/54770)

<div class="topic-metadata">

**Author:** [@nelsonah](https://discourse.julialang.org/u/nelsonah)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 12:31am UTC](https://discourse.julialang.org/t/plotting-an-hsv-array-and-also-saving-the-image-as-a-jpeg-file/54770 "2021-02-08T00:31:35Z")

</div>

The following code, with a small array, generates an HSV array. I have been unable to find out how to display the image represented by the array. Later I want to save the images as a jpeg file and then use FFMPEG to ma…

---

## [\[ANN\] FoldsThreads.jl: A zoo of pluggable thread-based data-parallel execution mechanisms](https://discourse.julialang.org/t/ann-foldsthreads-jl-a-zoo-of-pluggable-thread-based-data-parallel-execution-mechanisms/54662)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 9\
**Last updated:** [February 7, 2021, 10:32pm UTC](https://discourse.julialang.org/t/ann-foldsthreads-jl-a-zoo-of-pluggable-thread-based-data-parallel-execution-mechanisms/54662 "2021-02-07T22:32:12Z")

</div>

Data parallelism is a very useful approach to parallelism because we can describe what to compute rather than how to compute. It’s especially nice for parallel computing since specifying how to compute often leads to sub…

---

## [Julia 1.5 installation on MacOS](https://discourse.julialang.org/t/julia-1-5-installation-on-macos/54706)

<div class="topic-metadata">

**Author:** [@rverdier](https://discourse.julialang.org/u/rverdier)\
**Replies:** 5\
**Last updated:** [February 7, 2021, 9:40pm UTC](https://discourse.julialang.org/t/julia-1-5-installation-on-macos/54706 "2021-02-07T21:40:36Z")

</div>

The download instructions in julialang.org say to install using a furnished .dmg file, but I don’t see it. Where is it?

---

## [Is there an easy way to change the eltype of ranges?](https://discourse.julialang.org/t/is-there-an-easy-way-to-change-the-eltype-of-ranges/54791)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 6\
**Last updated:** [February 7, 2021, 6:17pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-change-the-eltype-of-ranges/54791 "2021-02-07T18:17:57Z")

</div>

For example: julia\> r = 2.0:3.0 2.0:1.0:3.0 julia\> eltype(r) Float64 julia\> Float32.(r) 2-element Array{Float32,1}: 2.0 3.0 This creates a Vector from the range. Is there a way to obtain another range (I don’t care…

---

## [@polyvar does not allow two-dimensional variables](https://discourse.julialang.org/t/polyvar-does-not-allow-two-dimensional-variables/52395)

<div class="topic-metadata">

**Author:** [@aliceee](https://discourse.julialang.org/u/aliceee)\
**Replies:** 4\
**Last updated:** [February 7, 2021, 6:15pm UTC](https://discourse.julialang.org/t/polyvar-does-not-allow-two-dimensional-variables/52395 "2021-02-07T18:15:42Z")

</div>

I want define a polyvar with size 2\*3. Several weeks ago, the following code works using TypedPolynomials @polyvar B\[1:2,1:3\] But now I get this error: Unsupported syntax. Expected x\[a:b\] for literal integers a and b…

---

## [Developer Position at Play Magnus (Computer Chess)](https://discourse.julialang.org/t/developer-position-at-play-magnus-computer-chess/52938)

<div class="topic-metadata">

**Author:** [@Tord](https://discourse.julialang.org/u/Tord)\
**Replies:** 5\
**Last updated:** [February 7, 2021, 4:47pm UTC](https://discourse.julialang.org/t/developer-position-at-play-magnus-computer-chess/52938 "2021-02-07T16:47:20Z")

</div>

We’re looking to hire a few new full-time developers at Play Magnus, the software company of reigning World Chess Champion Magnus Carlsen. Play Magnus is a small company using a wide variety of technology, so it is an a…

---

## [Using views causes significant slowdown in simple PDE](https://discourse.julialang.org/t/using-views-causes-significant-slowdown-in-simple-pde/54803)

<div class="topic-metadata">

**Author:** [@bgroenks](https://discourse.julialang.org/u/bgroenks)\
**Replies:** 2\
**Last updated:** [February 7, 2021, 4:39pm UTC](https://discourse.julialang.org/t/using-views-causes-significant-slowdown-in-simple-pde/54803 "2021-02-07T16:39:32Z")

</div>

I have stumbled upon a frustrating performance issue with either DifferentialEquations.jl or the Julia compiler (or maybe my code?). The motivating use-case is the application of the 1-dimensional heat equation (and poss…

---

## [Parallel precompilation in Julia v1.6: Dependencies include test dependencies?](https://discourse.julialang.org/t/parallel-precompilation-in-julia-v1-6-dependencies-include-test-dependencies/54776)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 4\
**Last updated:** [February 7, 2021, 4:14pm UTC](https://discourse.julialang.org/t/parallel-precompilation-in-julia-v1-6-dependencies-include-test-dependencies/54776 "2021-02-07T16:14:13Z")

</div>

I really like parallel precompilation of projects in Julia v1.6 . That’s really nice work from everybody involved :+1: I would like to know a bit more about the dependencies used to determine whether two packages can be…

---

## [Method call error: composite type](https://discourse.julialang.org/t/method-call-error-composite-type/54733)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 2\
**Last updated:** [February 7, 2021, 4:08pm UTC](https://discourse.julialang.org/t/method-call-error-composite-type/54733 "2021-02-07T16:08:34Z")

</div>

I have the following code, abstract type A end struct A1 \<: A end struct A2 \<: A b1::Float64 b2::Int64 end function f(x, fonzi) if fonzi == A1() return 2 \* x elseif fonzi == A2() # \<- …

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

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