# Latest

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

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

**Page:** 1622

---

## [Different samples distribution after execution](https://discourse.julialang.org/t/different-samples-distribution-after-execution/47077)

<div class="topic-metadata">

**Author:** [@mcql](https://discourse.julialang.org/u/mcql)\
**Replies:** 5\
**Last updated:** [September 24, 2020, 3:14pm UTC](https://discourse.julialang.org/t/different-samples-distribution-after-execution/47077 "2020-09-24T15:14:57Z")

</div>

Hello, I wrote a this simple Turing model: @model function λ(y) lambda1 ~ Exponential(alpha) lambda2 ~ Exponential(alpha) τ ~ Uniform(1, n\_count\_data) for i in 1:length(y) y\[i\] ~ Poisson(τ \> i ?…

---

## [List comprehension in Zygote](https://discourse.julialang.org/t/list-comprehension-in-zygote/41881)

<div class="topic-metadata">

**Author:** [@rlrs](https://discourse.julialang.org/u/rlrs)\
**Replies:** 8\
**Last updated:** [September 24, 2020, 2:25pm UTC](https://discourse.julialang.org/t/list-comprehension-in-zygote/41881 "2020-09-24T14:25:46Z")

</div>

I’m trying to do something like this, (I hope the snippet is enough although it’s incomplete) prob\_primitives = \[(θ\[i+1\], p) for (i, p) in enumerate(primitives)\] where primitives is a Vector. However, using this code i…

---

## [Errors when updating packages](https://discourse.julialang.org/t/errors-when-updating-packages/47199)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 1\
**Last updated:** [September 24, 2020, 2:22pm UTC](https://discourse.julialang.org/t/errors-when-updating-packages/47199 "2020-09-24T14:22:38Z")

</div>

Even after removing Turing package, I keep receiving this error messages when I try to update after installing Julia 1.5.2 on my MacBook 10.15.6: (@v1.5) pkg\> up Updating registry at \`~/.julia/registries/General\` …

---

## [Community call notes 09/20](https://discourse.julialang.org/t/community-call-notes-09-20/47208)

<div class="topic-metadata">

**Author:** [@McCoy](https://discourse.julialang.org/u/McCoy)\
**Replies:** 1\
**Last updated:** [September 24, 2020, 1:58pm UTC](https://discourse.julialang.org/t/community-call-notes-09-20/47208 "2020-09-24T13:58:59Z")

</div>

Just so we get broad coverage - if you took notes, you might share them here as well (@mohamed82008, @cscherrer, @phg) Also, here are the collected links from the chat: From Alex: From Chad: https://julialang.zulip…

---

## [Recover status of a package from julia](https://discourse.julialang.org/t/recover-status-of-a-package-from-julia/47197)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 6\
**Last updated:** [September 24, 2020, 11:57am UTC](https://discourse.julialang.org/t/recover-status-of-a-package-from-julia/47197 "2020-09-24T11:57:59Z")

</div>

Hi, I would like to recover a string containing the status of a given package (v.2.2.2 in the example) but I am only able to print it out julia\> Pkg.status("CuArrays") Project BTL v0.1.0 Status \`~/Project/BTL.jl/Projec…

---

## [How to test private / non-exported methods of a module?](https://discourse.julialang.org/t/how-to-test-private-non-exported-methods-of-a-module/47201)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [September 24, 2020, 11:09am UTC](https://discourse.julialang.org/t/how-to-test-private-non-exported-methods-of-a-module/47201 "2020-09-24T11:09:42Z")

</div>

When writing a module, I would like to test the methods as I code them up, but how do I test the methods that are not exported?

---

## [Julia 1.5.2 testing period](https://discourse.julialang.org/t/julia-1-5-2-testing-period/46657)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 10\
**Last updated:** [September 18, 2020, 12:44pm UTC](https://discourse.julialang.org/t/julia-1-5-2-testing-period/46657 "2020-09-18T12:44:21Z")

</div>

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

---

## [How to determine if a constraint is actually applied to the model?](https://discourse.julialang.org/t/how-to-determine-if-a-constraint-is-actually-applied-to-the-model/47176)

<div class="topic-metadata">

**Author:** [@sogrbilja](https://discourse.julialang.org/u/sogrbilja)\
**Replies:** 5\
**Last updated:** [September 24, 2020, 10:08am UTC](https://discourse.julialang.org/t/how-to-determine-if-a-constraint-is-actually-applied-to-the-model/47176 "2020-09-24T10:08:38Z")

</div>

I have yet an another question. I have a working costraint: @variable(prmx, PRODAMOUNT\[op\_k in keys(\_ORDER\_PRODUCTs\_ALL), u\_k in keys(UNITS), t in TIME\], Int, lower\_bound = 0) for f\_f\_k in \_FORB…

---

## [Map(my\_fun, Array Array) What wrong?](https://discourse.julialang.org/t/map-my-fun-array-array-what-wrong/47183)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 4\
**Last updated:** [September 24, 2020, 9:15am UTC](https://discourse.julialang.org/t/map-my-fun-array-array-what-wrong/47183 "2020-09-24T09:15:41Z")

</div>

using StringDistances function CLD(a,b) result=fill(0.0,size(b,1)) for p=1:size(a,1) result\[p\]=compare(a\[p,:\]\[\],b\[p,:\]\[\],DamerauLevenshtein()) end return result end A=rand(5,3); B=rand(5,3) julia\> CLD(A\[1,:\],B\[1,:\]) 3-el…

---

## [Flux: Hard to use train! and DataLoader for minibatched NamedTuple dataset with GPU](https://discourse.julialang.org/t/flux-hard-to-use-train-and-dataloader-for-minibatched-namedtuple-dataset-with-gpu/47189)

<div class="topic-metadata">

**Author:** [@paalon](https://discourse.julialang.org/u/paalon)\
**Replies:** 2\
**Last updated:** [September 24, 2020, 8:54am UTC](https://discourse.julialang.org/t/flux-hard-to-use-train-and-dataloader-for-minibatched-namedtuple-dataset-with-gpu/47189 "2020-09-24T08:54:55Z")

</div>

I want to write the following neural networks machine learning code on GPU but I need to write complicated and dirty something within dataloader’s for loop to pass data to train!: # This GPU based program works but very…

---

## [External program with string argument interpolation](https://discourse.julialang.org/t/external-program-with-string-argument-interpolation/47134)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 8\
**Last updated:** [September 24, 2020, 7:40am UTC](https://discourse.julialang.org/t/external-program-with-string-argument-interpolation/47134 "2020-09-24T07:40:48Z")

</div>

Hi, I can’t figure how (after reading https://docs.julialang.org/en/v1/manual/running-external-programs/manual) to run a command with string arguments enclosed with “” Le’s say the shell command I want to invoke is s…

---

## [HDF5: varying size dataset](https://discourse.julialang.org/t/hdf5-varying-size-dataset/47126)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 1\
**Last updated:** [September 24, 2020, 6:35am UTC](https://discourse.julialang.org/t/hdf5-varying-size-dataset/47126 "2020-09-24T06:35:21Z")

</div>

I’m struggle with using HDF5. I’m trying to append data in .h5 file. So, I wanna make a dataset whose prescribed size is unlimited (on the first axis, specifically). For example, receiving data with dims (5,6), then a…

---

## [Package Parameters, mutable struct as function argument](https://discourse.julialang.org/t/package-parameters-mutable-struct-as-function-argument/47175)

<div class="topic-metadata">

**Author:** [@cricci](https://discourse.julialang.org/u/cricci)\
**Replies:** 3\
**Last updated:** [September 24, 2020, 6:21am UTC](https://discourse.julialang.org/t/package-parameters-mutable-struct-as-function-argument/47175 "2020-09-24T06:21:44Z")

</div>

I am using the Parameters package to do some work. One of the parameters is an array and surprisingly the struct gets changed when I give it as an argument to a function that modify the array after unpacking using Param…

---

## [Performance Help on Large Matrix Manipulation](https://discourse.julialang.org/t/performance-help-on-large-matrix-manipulation/47029)

<div class="topic-metadata">

**Author:** [@jleman](https://discourse.julialang.org/u/jleman)\
**Replies:** 16\
**Last updated:** [September 24, 2020, 6:08am UTC](https://discourse.julialang.org/t/performance-help-on-large-matrix-manipulation/47029 "2020-09-24T06:08:35Z")

</div>

I have a large array of matricies and need to apply inverse FFT as shown in the attached diagram. I do this by restructuring the data using getindex . After completing the inverse FFT I then recreating the original matr…

---

## [Listing all the ways to make cross-platform desktop apps](https://discourse.julialang.org/t/listing-all-the-ways-to-make-cross-platform-desktop-apps/47168)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 0\
**Last updated:** [September 24, 2020, 2:21am UTC](https://discourse.julialang.org/t/listing-all-the-ways-to-make-cross-platform-desktop-apps/47168 "2020-09-24T02:21:28Z")

</div>

I was a bit bewildered by all ways one can approach making desktop apps. So I’ve collected all the one I know of. Any additions? Any additional comments? See https://github.com/xiaodaigh/awesome-julia-desktop-app-makers…

---

## [Help! MakieLayout and annotations](https://discourse.julialang.org/t/help-makielayout-and-annotations/47169)

<div class="topic-metadata">

**Author:** [@powerzf](https://discourse.julialang.org/u/powerzf)\
**Replies:** 0\
**Last updated:** [September 24, 2020, 2:45am UTC](https://discourse.julialang.org/t/help-makielayout-and-annotations/47169 "2020-09-24T02:45:50Z")

</div>

It is good " using AbstractPlotting using Makie using MakieLayout scene, layout = layoutscene(resolution = (1800,900)) ax = layout\[1,1\] = LAxis(scene) ax2 = layout\[1,2\] = LAxis(scene) x = \[1,2,3\] y = \[10,11,12\] …

---

## [Fit data into a circle](https://discourse.julialang.org/t/fit-data-into-a-circle/45370)

<div class="topic-metadata">

**Author:** [@DanielS](https://discourse.julialang.org/u/DanielS)\
**Replies:** 25\
**Last updated:** [September 24, 2020, 2:08am UTC](https://discourse.julialang.org/t/fit-data-into-a-circle/45370 "2020-09-24T02:08:27Z")

</div>

Hi, I’m new to Julia. I’ve been looking for a way in Julia to fit my data into a circle. My data is a set of (x, y) coordinates, and I want to fit them into a circle to get the centre and radius etc. I know some librari…

---

## [Comonicon.jl - Fast, Simple and Light weight CLI generator](https://discourse.julialang.org/t/comonicon-jl-fast-simple-and-light-weight-cli-generator/43744)

<div class="topic-metadata">

**Author:** [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Replies:** 5\
**Last updated:** [September 24, 2020, 12:42am UTC](https://discourse.julialang.org/t/comonicon-jl-fast-simple-and-light-weight-cli-generator/43744 "2020-09-24T00:42:48Z")

</div>

I’m pleased to announce a new package GitHub - comonicon/Comonicon.jl: Your best CLI generator in JuliaLang for making CLI (Command Line Interface) in Julia. Comonicon is now on beta, I’ll be happy to see some feedbacks…

---

## [Is there a better way to do this? many calculated columns](https://discourse.julialang.org/t/is-there-a-better-way-to-do-this-many-calculated-columns/47111)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 6\
**Last updated:** [September 24, 2020, 12:40am UTC](https://discourse.julialang.org/t/is-there-a-better-way-to-do-this-many-calculated-columns/47111 "2020-09-24T00:40:27Z")

</div>

Creating a DataFrame with a large number of calculated columns. To make the logic as clear as possible, avoiding the vectorised operators and instead putting all logic within an eachrow loop. new\_DF = DataFrame() for …

---

## [Is there an implementation of the attention mechanism in Flux.jl?](https://discourse.julialang.org/t/is-there-an-implementation-of-the-attention-mechanism-in-flux-jl/26959)

<div class="topic-metadata">

**Author:** [@Azamat](https://discourse.julialang.org/u/Azamat)\
**Replies:** 5\
**Last updated:** [September 23, 2020, 6:49am UTC](https://discourse.julialang.org/t/is-there-an-implementation-of-the-attention-mechanism-in-flux-jl/26959 "2020-09-23T06:49:40Z")

</div>

Specifically, I’m interested in the attention mechanism described in Listen, Attend and Spell work (where it’s referred to as AttentionContext), but more generally any other kind of attention’s implementation would be qu…

---

## [How to implement LSTM base meta relearning by Flux?](https://discourse.julialang.org/t/how-to-implement-lstm-base-meta-relearning-by-flux/47164)

<div class="topic-metadata">

**Author:** [@nuclear718](https://discourse.julialang.org/u/nuclear718)\
**Replies:** 0\
**Last updated:** [September 23, 2020, 11:38pm UTC](https://discourse.julialang.org/t/how-to-implement-lstm-base-meta-relearning-by-flux/47164 "2020-09-23T23:38:32Z")

</div>

In LSTM meta learning approach, we have a base leaner and update base learner’s parameters by another learner (single cell LSTM). The base learner’s parameters is LSTM’s cell state and will input LSTM one by one, the ou…

---

## [Read-all echo TCP server](https://discourse.julialang.org/t/read-all-echo-tcp-server/47107)

<div class="topic-metadata">

**Author:** [@julbinb](https://discourse.julialang.org/u/julbinb)\
**Replies:** 8\
**Last updated:** [September 23, 2020, 10:23pm UTC](https://discourse.julialang.org/t/read-all-echo-tcp-server/47107 "2020-09-23T22:23:50Z")

</div>

I need to write a Julia server that reads the entire message coming from a client, and then sends a reply back. However, it seems that when the message is read, the socket gets closed, so I can’t write the reply. Server…

---

## [How to speed up tasks?](https://discourse.julialang.org/t/how-to-speed-up-tasks/46511)

<div class="topic-metadata">

**Author:** [@bjarthur](https://discourse.julialang.org/u/bjarthur)\
**Replies:** 8\
**Last updated:** [September 23, 2020, 9:58pm UTC](https://discourse.julialang.org/t/how-to-speed-up-tasks/46511 "2020-09-23T21:58:59Z")

</div>

i have a function that i need to call 10s of thousands of times that only takes a few milliseconds to run. there is no I/O. and it doesn’t return anything, so no communication. it is strictly just compute. how do i b…

---

## [EnsembleProblem change tstops for each trajectory](https://discourse.julialang.org/t/ensembleproblem-change-tstops-for-each-trajectory/47066)

<div class="topic-metadata">

**Author:** [@sberit](https://discourse.julialang.org/u/sberit)\
**Replies:** 1\
**Last updated:** [September 23, 2020, 9:30pm UTC](https://discourse.julialang.org/t/ensembleproblem-change-tstops-for-each-trajectory/47066 "2020-09-23T21:30:27Z")

</div>

Hey, I’am trying to use the EnsembleProblem to run an ODE with a big parameter set. Following the problem in the documentation (Event Handling and Callback Functions · DifferentialEquations.jl example 1) I want to follo…

---

## [solve(ODEAdjointProblem(...)) with timespan different from the input solution](https://discourse.julialang.org/t/solve-odeadjointproblem-with-timespan-different-from-the-input-solution/47120)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 2\
**Last updated:** [September 23, 2020, 9:27pm UTC](https://discourse.julialang.org/t/solve-odeadjointproblem-with-timespan-different-from-the-input-solution/47120 "2020-09-23T21:27:17Z")

</div>

I’m currently doing all my ODE adjoint solves with something like fwd\_sol = solve(ODEProblem(f, (0.0, 1.0))) solve(ODEAdjointProblem(fwd\_sol, InterpolatingAdjoint(), (out, x, p, t, i) -\> (out\[:\] = g), \[1.0\])) which is …

---

## [Solution foun by heuristic GLPK](https://discourse.julialang.org/t/solution-foun-by-heuristic-glpk/38772)

<div class="topic-metadata">

**Author:** [@lausilvag](https://discourse.julialang.org/u/lausilvag)\
**Replies:** 9\
**Last updated:** [September 23, 2020, 8:04pm UTC](https://discourse.julialang.org/t/solution-foun-by-heuristic-glpk/38772 "2020-09-23T20:04:30Z")

</div>

Hi guys! I am using GLPK solver for a MIP. The output terminal shows me the next information: GLPK Simplex Optimizer, v4.64 16 rows, 120 columns, 800 non-zeros 1: obj = 4.548322148e+003 inf = 0.000e+000 (0) 9: o…

---

## [Custom priors in Soss](https://discourse.julialang.org/t/custom-priors-in-soss/47076)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 6\
**Last updated:** [September 23, 2020, 8:23pm UTC](https://discourse.julialang.org/t/custom-priors-in-soss/47076 "2020-09-23T20:23:40Z")

</div>

On Slack, Jonatan Werpers asks, How can I use a custom prior with a model? Basically I want to do something like: my\_pdf(θ) = .... m = @model n begin θ ~ my\_pdf x ~ Bernoulli(θ) |\> iid(n) end Generally, you’…

---

## [How to select top 5 results per group in dataframe?](https://discourse.julialang.org/t/how-to-select-top-5-results-per-group-in-dataframe/47149)

<div class="topic-metadata">

**Author:** [@conditionality](https://discourse.julialang.org/u/conditionality)\
**Replies:** 3\
**Last updated:** [September 23, 2020, 7:48pm UTC](https://discourse.julialang.org/t/how-to-select-top-5-results-per-group-in-dataframe/47149 "2020-09-23T19:48:42Z")

</div>

I’m looking for a Julian way of selecting a subset of each group. I have a DataFrame with (among others) two columns, say name and length. I want to group over all names and pick the 5 tallest people within each name. I …

---

## [Maximum number of likes](https://discourse.julialang.org/t/maximum-number-of-likes/46838)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 12\
**Last updated:** [September 23, 2020, 6:39pm UTC](https://discourse.julialang.org/t/maximum-number-of-likes/46838 "2020-09-23T18:39:09Z")

</div>

I am getting messages like this from Discourse: You have reached the maximum number of likes. Please wait X before trying again. where X ranges from 4 hours to 2 minutes. I don’t think I am giving more likes than usu…

---

## [Minimizing a numerical function](https://discourse.julialang.org/t/minimizing-a-numerical-function/47139)

<div class="topic-metadata">

**Author:** [@DShiu](https://discourse.julialang.org/u/DShiu)\
**Replies:** 8\
**Last updated:** [September 23, 2020, 5:30pm UTC](https://discourse.julialang.org/t/minimizing-a-numerical-function/47139 "2020-09-23T17:30:41Z")

</div>

I am using Optim.jl to minimize a function: optimize(δ-\> nls\_obj(δ, theta2, y, c, d, p0, B), 0, LBFGS(), Optim.Options(g\_tol = 1e-2, iterations=100\_000, show\_trace=true, show\_every=50)) Given other input values, functi…

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

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