# Latest

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

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

**Page:** 1355

---

## [Optimization on a manifold](https://discourse.julialang.org/t/optimization-on-a-manifold/59850)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 33\
**Last updated:** [June 21, 2021, 2:03pm UTC](https://discourse.julialang.org/t/optimization-on-a-manifold/59850 "2021-06-21T14:03:18Z")

</div>

This is both a conceptual question, and a practical one of what packages I could use to solve this. Problem statement I am trying to solve the following problem. Let a \\in \\mathbb{R}^M be a vector of parameters, and p \\…

---

## [\[ANN-RFC\] TopoChains.jl v0.1 - flexibly define multi-input multi-output models](https://discourse.julialang.org/t/ann-rfc-topochains-jl-v0-1-flexibly-define-multi-input-multi-output-models/62759)

<div class="topic-metadata">

**Author:** [@irhum](https://discourse.julialang.org/u/irhum)\
**Replies:** 3\
**Last updated:** [June 21, 2021, 1:57pm UTC](https://discourse.julialang.org/t/ann-rfc-topochains-jl-v0-1-flexibly-define-multi-input-multi-output-models/62759 "2021-06-21T13:57:39Z")

</div>

Pleased to announce TopoChains.jl to the community. TopoChains.jl extends on the flexibility of Flux’s Chain by introducing TopoChain, which allows you to explicitly declare the structure of the compositions of functions…

---

## [Threads parallelization on different nested loops](https://discourse.julialang.org/t/threads-parallelization-on-different-nested-loops/63295)

<div class="topic-metadata">

**Author:** [@calvar](https://discourse.julialang.org/u/calvar)\
**Replies:** 0\
**Last updated:** [June 21, 2021, 1:40pm UTC](https://discourse.julialang.org/t/threads-parallelization-on-different-nested-loops/63295 "2021-06-21T13:40:55Z")

</div>

Hi, I am learning Julia and I was testing how to parallelize a nested loop with the @threads macro, to compute the product between matrices. This is the code I am trying to parallelize: function dot\_prod!(A, B, C, i, j…

---

## [MLJFlux is a lot slower than the same algorithm written in Flux](https://discourse.julialang.org/t/mljflux-is-a-lot-slower-than-the-same-algorithm-written-in-flux/63253)

<div class="topic-metadata">

**Author:** [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Replies:** 3\
**Last updated:** [June 21, 2021, 12:30pm UTC](https://discourse.julialang.org/t/mljflux-is-a-lot-slower-than-the-same-algorithm-written-in-flux/63253 "2021-06-21T12:30:36Z")

</div>

Disclaimer: I am by no means an expert in Flux, MLJFlux, Julia or even machine learning. I may have done something very stupid without noticing. I have a neural network classifier written in Flux. It works fine, it give…

---

## [Generating an ngram document term matrix with TextAnalysis.jl](https://discourse.julialang.org/t/generating-an-ngram-document-term-matrix-with-textanalysis-jl/55571)

<div class="topic-metadata">

**Author:** [@PeterTolochko](https://discourse.julialang.org/u/PeterTolochko)\
**Replies:** 2\
**Last updated:** [June 21, 2021, 12:49pm UTC](https://discourse.julialang.org/t/generating-an-ngram-document-term-matrix-with-textanalysis-jl/55571 "2021-06-21T12:49:06Z")

</div>

Hello, I’m currently trying to use TextAnalysis.jl for the first time, and I can’t figure out this problem. I can tokenize a string like so: using TextAnalysis test = "Hello, I like apples and oranges. I like ice-cream…

---

## [How can I convert base64 decoded string to dataframe?](https://discourse.julialang.org/t/how-can-i-convert-base64-decoded-string-to-dataframe/63291)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 2\
**Last updated:** [June 21, 2021, 12:45pm UTC](https://discourse.julialang.org/t/how-can-i-convert-base64-decoded-string-to-dataframe/63291 "2021-06-21T12:45:00Z")

</div>

Hi, I have a base64 decode string as below: "x1,x2,x3\\n0.24618513599536662,0.23036110161948198,0.9708518314384857\\n0.4445749933364773,0.15059006972987765,0.5374581217858532\\n0.6655769723982281,0.5742142837354622,0.5040…

---

## [Extract Variance components from VarCorr object (Mixed models)](https://discourse.julialang.org/t/extract-variance-components-from-varcorr-object-mixed-models/44528)

<div class="topic-metadata">

**Author:** [@Anthony\_D\_Long](https://discourse.julialang.org/u/Anthony_D_Long)\
**Replies:** 8\
**Last updated:** [June 21, 2021, 11:45am UTC](https://discourse.julialang.org/t/extract-variance-components-from-varcorr-object-mixed-models/44528 "2021-06-21T11:45:47Z")

</div>

I am trying to run random effect models in Julia instead of R, as they are much faster for big data. I am doing it via calls from R (and “JuliaCall”). The models work great but I cannot for the life of me extract the v…

---

## [The ultimate guide to distributed computing](https://discourse.julialang.org/t/the-ultimate-guide-to-distributed-computing/41867)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 44\
**Last updated:** [June 21, 2021, 11:02am UTC](https://discourse.julialang.org/t/the-ultimate-guide-to-distributed-computing/41867 "2021-06-21T11:02:41Z")

</div>

HOWTO: Distributed computing In this thread I would like to put together relevant information for people interested in distributing simple function calls on multiple cluster nodes. Although the task is simple, there are …

---

## [Simultaneous development of private packages?](https://discourse.julialang.org/t/simultaneous-development-of-private-packages/63289)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 1\
**Last updated:** [June 19, 2021, 8:05am UTC](https://discourse.julialang.org/t/simultaneous-development-of-private-packages/63289 "2021-06-19T08:05:08Z")

</div>

I have a related question as OP. Suppose I am developing packages A, B, and C simutaneously with other people. C depends on A and B, while B depends on A. A, B, and C are all private Github repos during their developmen…

---

## [Using TemporalGPs](https://discourse.julialang.org/t/using-temporalgps/63208)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 9:03am UTC](https://discourse.julialang.org/t/using-temporalgps/63208 "2021-06-21T09:03:48Z")

</div>

@willtebbutt I have this working code using Stheno using Stheno.AbstractGPs using CairoMakie const l1 = 0.4 const s1 = 0.2 f = let gpc = Stheno.GPC() gp = kernel -\> Stheno.wrap(GP(kernel), gpc) f1 = s1 …

---

## [Why are loops not slow in Julia?](https://discourse.julialang.org/t/why-are-loops-not-slow-in-julia/63205)

<div class="topic-metadata">

**Author:** [@eilbuga](https://discourse.julialang.org/u/eilbuga)\
**Replies:** 9\
**Last updated:** [June 21, 2021, 8:28am UTC](https://discourse.julialang.org/t/why-are-loops-not-slow-in-julia/63205 "2021-06-21T08:28:56Z")

</div>

Hi, I have been following tutorials to make the switch from Python&Matlab to Julia. And one reminder that pops up all the time is to use loops in Julia since they are really fast. I was wondering why exactly this is the …

---

## [Separate "Dev" packages in Project.toml](https://discourse.julialang.org/t/separate-dev-packages-in-project-toml/63143)

<div class="topic-metadata">

**Author:** [@jbu](https://discourse.julialang.org/u/jbu)\
**Replies:** 8\
**Last updated:** [June 21, 2021, 8:14am UTC](https://discourse.julialang.org/t/separate-dev-packages-in-project-toml/63143 "2021-06-21T08:14:50Z")

</div>

When creating a package, I often use dependencies that are purely for development and have nothing to do with my package’s functionality (e.g. Revise.jl, Debugger.jl, Infiltrator.jl. If I ever wanted to share my package,…

---

## [Is there concept of dev dependencies in Pkg?](https://discourse.julialang.org/t/is-there-concept-of-dev-dependencies-in-pkg/46908)

<div class="topic-metadata">

**Author:** [@andre1sk](https://discourse.julialang.org/u/andre1sk)\
**Replies:** 11\
**Last updated:** [June 21, 2021, 7:27am UTC](https://discourse.julialang.org/t/is-there-concept-of-dev-dependencies-in-pkg/46908 "2021-06-21T07:27:20Z")

</div>

Is there a good write up that explains things in decent detail you could recommend?

---

## [How to understand GP extrapolation shape](https://discourse.julialang.org/t/how-to-understand-gp-extrapolation-shape/62765)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [June 21, 2021, 7:15am UTC](https://discourse.julialang.org/t/how-to-understand-gp-extrapolation-shape/62765 "2021-06-21T07:15:38Z")

</div>

using CairoMakie using KernelFunctions using AbstractGPs n = 30 x\_train = rand(n) .+ 1 y\_train = log.(x\_train) f = GP(Matern52Kernel()) fx = f(x\_train, 0.1) p\_fx = posterior(fx, y\_train) fig = Figure() Axis(fig\[1…

---

## [SMC with HMC Kernel](https://discourse.julialang.org/t/smc-with-hmc-kernel/62238)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 3\
**Last updated:** [June 21, 2021, 7:06am UTC](https://discourse.julialang.org/t/smc-with-hmc-kernel/62238 "2021-06-21T07:06:53Z")

</div>

Is it possible to use an HMC or NUTS kernel with Turing’s SMC methods, e.g. as described here and implemented in TensorFlow Probability (which allows for using arbitrary kernels)?

---

## [How to choose vec size in SIMD.jl](https://discourse.julialang.org/t/how-to-choose-vec-size-in-simd-jl/63269)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 5\
**Last updated:** [June 21, 2021, 4:32am UTC](https://discourse.julialang.org/t/how-to-choose-vec-size-in-simd-jl/63269 "2021-06-21T04:32:47Z")

</div>

Looking at the SIMD.jl example vadd!(xs, ys, Vec{8,Float64}) there is a specific size 8 being set for the vec size. How do I know whether to use 4 or 8 or more? I assume it is hardware dependent, but probably there is so…

---

## [Understanding major order performance when broadcasting in column vs row operations](https://discourse.julialang.org/t/understanding-major-order-performance-when-broadcasting-in-column-vs-row-operations/63139)

<div class="topic-metadata">

**Author:** [@gzagatti](https://discourse.julialang.org/u/gzagatti)\
**Replies:** 9\
**Last updated:** [June 21, 2021, 3:07am UTC](https://discourse.julialang.org/t/understanding-major-order-performance-when-broadcasting-in-column-vs-row-operations/63139 "2021-06-21T03:07:54Z")

</div>

I understand that Julia stores arrays in column-major order which means that columns are stacked onto one another. Thus, adjacent rows in the same column are adjacent in memory. If that is the case, I am failing to see …

---

## [Generators vs loops vs broadcasting: Calculate PI via Monte Carlo Sampling](https://discourse.julialang.org/t/generators-vs-loops-vs-broadcasting-calculate-pi-via-monte-carlo-sampling/63235)

<div class="topic-metadata">

**Author:** [@JanKap](https://discourse.julialang.org/u/JanKap)\
**Replies:** 7\
**Last updated:** [June 20, 2021, 10:15pm UTC](https://discourse.julialang.org/t/generators-vs-loops-vs-broadcasting-calculate-pi-via-monte-carlo-sampling/63235 "2021-06-20T22:15:41Z")

</div>

Dear all, I’m trying to solve some toy problems in Julia and benchmark them since there often are many different ways to go. I have a strong Matlab background therefore it feels a bit weird to go back to simple loops (an…

---

## [Improving Computational Performance](https://discourse.julialang.org/t/improving-computational-performance/63210)

<div class="topic-metadata">

**Author:** [@nullmap](https://discourse.julialang.org/u/nullmap)\
**Replies:** 6\
**Last updated:** [June 20, 2021, 10:13pm UTC](https://discourse.julialang.org/t/improving-computational-performance/63210 "2021-06-20T22:13:29Z")

</div>

I have three questions and I was curious if someone can provide some clarity on the results I’m seeing with a couple variations of a simple polynomial evaluation computation. I wrote a Horner’s method implementation whi…

---

## [Geodesy: how to calculate the straight line distance between two locations, which is represented by longitude and latitude?](https://discourse.julialang.org/t/geodesy-how-to-calculate-the-straight-line-distance-between-two-locations-which-is-represented-by-longitude-and-latitude/19984)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 29\
**Last updated:** [June 20, 2021, 10:00pm UTC](https://discourse.julialang.org/t/geodesy-how-to-calculate-the-straight-line-distance-between-two-locations-which-is-represented-by-longitude-and-latitude/19984 "2021-06-20T22:00:16Z")

</div>

Is the following the correct way to calculate the straight line distance between two points / locations by longitude and latitude? julia\> using Geodesy INFO: Precompiling module Geodesy. julia\> x\_lla = LLA(-27.468937, …

---

## [Tutorial: Concurrency patterns for controlled parallelisms](https://discourse.julialang.org/t/tutorial-concurrency-patterns-for-controlled-parallelisms/62651)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 4\
**Last updated:** [June 20, 2021, 8:23pm UTC](https://discourse.julialang.org/t/tutorial-concurrency-patterns-for-controlled-parallelisms/62651 "2021-06-20T20:23:52Z")

</div>

Hi, I just wrote a quick tutorial on a couple of patterns using Channel that are handy for some parallel processing: Concurrency patterns for controlled parallelisms. High-level data parallelism is the best starting po…

---

## [\[ANN\] HypertextLiteral.jl - generate tagged content with interpolation](https://discourse.julialang.org/t/ann-hypertextliteral-jl-generate-tagged-content-with-interpolation/51933)

<div class="topic-metadata">

**Author:** [@cce](https://discourse.julialang.org/u/cce)\
**Replies:** 4\
**Last updated:** [June 20, 2021, 8:23pm UTC](https://discourse.julialang.org/t/ann-hypertextliteral-jl-generate-tagged-content-with-interpolation/51933 "2021-06-20T20:23:36Z")

</div>

With the assistance of many in the Pluto.jl community, I’ve created a performant implementation of @mbostock’s hypertext literal for server-side Julia applications. This package lets you use familiar string interpolat…

---

## [Add parameters in @index block](https://discourse.julialang.org/t/add-parameters-in-index-block/63258)

<div class="topic-metadata">

**Author:** [@Joinijo](https://discourse.julialang.org/u/Joinijo)\
**Replies:** 0\
**Last updated:** [June 20, 2021, 8:08pm UTC](https://discourse.julialang.org/t/add-parameters-in-index-block/63258 "2021-06-20T20:08:17Z")

</div>

Is it possible to add the parameters of a function when displayed from a \`\`\`@index \`\`\` block? I.e. say I have a function f(x) I want f(x) to be displayed instead of simply f, as I am currently getting.

---

## [Modeling sum of k-smallest eigenvalues of a symmetric matrix in JuMP](https://discourse.julialang.org/t/modeling-sum-of-k-smallest-eigenvalues-of-a-symmetric-matrix-in-jump/63245)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 2\
**Last updated:** [June 20, 2021, 7:59pm UTC](https://discourse.julialang.org/t/modeling-sum-of-k-smallest-eigenvalues-of-a-symmetric-matrix-in-jump/63245 "2021-06-20T19:59:15Z")

</div>

Dear All, I am trying to model the following convex constraint in JuMP: \\sum\_{i=1}^{k} \\lambda\_i(X) \\geq c, where X \\in \\mathbf{S}^n (a symmetric matrix), c is a constant, and \\lambda\_1(X) \\leq \\lambda\_2(X) \\leq \\ldot…

---

## [Pwd() cd() and I/O text for open files from pc](https://discourse.julialang.org/t/pwd-cd-and-i-o-text-for-open-files-from-pc/63204)

<div class="topic-metadata">

**Author:** [@12345\_12345](https://discourse.julialang.org/u/12345_12345)\
**Replies:** 18\
**Last updated:** [June 20, 2021, 6:38pm UTC](https://discourse.julialang.org/t/pwd-cd-and-i-o-text-for-open-files-from-pc/63204 "2021-06-20T18:38:59Z")

</div>

Where I’m wrong? (I’m following on YT Julia for nervous beginners) but now I’ returning in my steps because I met same problem in I/O text files where julia answer me: “no such file or directory” after order fh = open(“…

---

## [Clarify behaviour of typeintersect()](https://discourse.julialang.org/t/clarify-behaviour-of-typeintersect/63097)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 0\
**Last updated:** [June 17, 2021, 3:03pm UTC](https://discourse.julialang.org/t/clarify-behaviour-of-typeintersect/63097 "2021-06-17T15:03:00Z")

</div>

The docs say: typeintersect(T, S) Compute a type that contains the intersection of T and S. Usually this will be the smallest such type or one close to it. I interpret this to mean that there may be cases where type…

---

## [Suggestion: Fortran-like Keyword to Assert Function is Pure](https://discourse.julialang.org/t/suggestion-fortran-like-keyword-to-assert-function-is-pure/63047)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 62\
**Last updated:** [June 20, 2021, 6:04pm UTC](https://discourse.julialang.org/t/suggestion-fortran-like-keyword-to-assert-function-is-pure/63047 "2021-06-20T18:04:08Z")

</div>

I don’t know if this is possible or how much work it would be, but I’d like it if there was some kind of keyword like pure function f() that throws an error if the function being compiled is not pure. I’ve definitely fac…

---

## [What is the recommended way to run N workers asynchronously?](https://discourse.julialang.org/t/what-is-the-recommended-way-to-run-n-workers-asynchronously/63128)

<div class="topic-metadata">

**Author:** [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Replies:** 10\
**Last updated:** [June 20, 2021, 5:59pm UTC](https://discourse.julialang.org/t/what-is-the-recommended-way-to-run-n-workers-asynchronously/63128 "2021-06-20T17:59:31Z")

</div>

Given this code for a worker using HTTP, JSON3, BenchmarkTools function worker(name, n) println("worker-$name") response = HTTP.request("GET", "https://qrng.anu.edu.au/API/jsonI.php?length=$(n)&type=uint16") …

---

## [Running platforms?](https://discourse.julialang.org/t/running-platforms/63247)

<div class="topic-metadata">

**Author:** [@skypuppy](https://discourse.julialang.org/u/skypuppy)\
**Replies:** 1\
**Last updated:** [June 20, 2021, 5:38pm UTC](https://discourse.julialang.org/t/running-platforms/63247 "2021-06-20T17:38:25Z")

</div>

Can Julia run on these platforms? Raspberry Pi (RPi?) Beaglebone Black (BBB?) Jetson Nano/TX2//all Jetsons? Thanks. I read somewhere that an ARM port is out there…

---

## [Memoization and function calls](https://discourse.julialang.org/t/memoization-and-function-calls/63218)

<div class="topic-metadata">

**Author:** [@Alex\_Tantos](https://discourse.julialang.org/u/Alex_Tantos)\
**Replies:** 4\
**Last updated:** [June 20, 2021, 3:44pm UTC](https://discourse.julialang.org/t/memoization-and-function-calls/63218 "2021-06-20T15:44:12Z")

</div>

Hi there. This is a newbie question. I need to call the following function, lexicalgravitypair(), within a for loop, such as the one below the function definition of lexicalgravitypair(), that depends on the output of …

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

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