# Latest

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

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

**Page:** 1315

---

## [MathJax for LaTeX equations](https://discourse.julialang.org/t/mathjax-for-latex-equations/212)

<div class="topic-metadata">

**Author:** [@johansigfrids](https://discourse.julialang.org/u/johansigfrids)\
**Replies:** 13\
**Last updated:** [August 1, 2021, 9:04am UTC](https://discourse.julialang.org/t/mathjax-for-latex-equations/212 "2021-08-01T09:04:25Z")

</div>

Would it be possible to add MathJax to Discourse? It would be nice to be able to write good looking LaTeX equations.

---

## [Multiple plots created in loop](https://discourse.julialang.org/t/multiple-plots-created-in-loop/65588)

<div class="topic-metadata">

**Author:** [@KrOstir](https://discourse.julialang.org/u/KrOstir)\
**Replies:** 5\
**Last updated:** [August 1, 2021, 8:15am UTC](https://discourse.julialang.org/t/multiple-plots-created-in-loop/65588 "2021-08-01T08:15:21Z")

</div>

I would like to create multiple plots in a loop within Pluto. The question is related to Plot inside a loop again\[, but now in Pluto\]. This works as expected in Jupyter, but not in Pluto. using Plots for i in 1:3 …

---

## [Why is this @simd loop faster than a while loop even if it has longer assembly?](https://discourse.julialang.org/t/why-is-this-simd-loop-faster-than-a-while-loop-even-if-it-has-longer-assembly/65585)

<div class="topic-metadata">

**Author:** [@louie4825](https://discourse.julialang.org/u/louie4825)\
**Replies:** 6\
**Last updated:** [August 1, 2021, 7:17am UTC](https://discourse.julialang.org/t/why-is-this-simd-loop-faster-than-a-while-loop-even-if-it-has-longer-assembly/65585 "2021-08-01T07:17:25Z")

</div>

Why does @simd here make the loop run faster even if the while version has shorter generated assembly? (Thiscode is part of a prime sieve implementation.) using BenchmarkTools # Auxillary functions begin const \_uint\_b…

---

## [Moving from LMI toolbox (Matlab) to JuliaOpt](https://discourse.julialang.org/t/moving-from-lmi-toolbox-matlab-to-juliaopt/21001)

<div class="topic-metadata">

**Author:** [@glemieux](https://discourse.julialang.org/u/glemieux)\
**Replies:** 18\
**Last updated:** [July 31, 2021, 5:31pm UTC](https://discourse.julialang.org/t/moving-from-lmi-toolbox-matlab-to-juliaopt/21001 "2021-07-31T17:31:09Z")

</div>

Does anyone have experience in moving from Matlab’s LMI toolbox to the various JuliaOpt packages? I’m taking a non-linear dynamics course (AAE666 at Purdue) and we’ve just been introduced to linear matrix inequalities i…

---

## [A useful article](https://discourse.julialang.org/t/a-useful-article/65605)

<div class="topic-metadata">

**Author:** [@SergeantMike67](https://discourse.julialang.org/u/SergeantMike67)\
**Replies:** 9\
**Last updated:** [August 1, 2021, 1:45am UTC](https://discourse.julialang.org/t/a-useful-article/65605 "2021-08-01T01:45:08Z")

</div>

This is an article that the community as a whole should be reading. TlL:DR version: Abstract, jargon articles get cited less. I would extend this to include documentation and online answers to coding questions. https…

---

## [Importing ZipFile.ReadableFile into DataFrame](https://discourse.julialang.org/t/importing-zipfile-readablefile-into-dataframe/65587)

<div class="topic-metadata">

**Author:** [@banksiaboy](https://discourse.julialang.org/u/banksiaboy)\
**Replies:** 3\
**Last updated:** [July 31, 2021, 10:55pm UTC](https://discourse.julialang.org/t/importing-zipfile-readablefile-into-dataframe/65587 "2021-07-31T22:55:06Z")

</div>

I have used ZipFile to open a downloaded compound zipfile. I want to import several of the contained files into DataFrames. ZipFile.Reader for IOStream(\<file ./GBIF-Datasets/0333654-200613084148143.zip\>) containing 16 f…

---

## [Help: Unexpected error when using a macro in a for loop](https://discourse.julialang.org/t/help-unexpected-error-when-using-a-macro-in-a-for-loop/65555)

<div class="topic-metadata">

**Author:** [@josePereiro](https://discourse.julialang.org/u/josePereiro)\
**Replies:** 8\
**Last updated:** [July 31, 2021, 9:34pm UTC](https://discourse.julialang.org/t/help-unexpected-error-when-using-a-macro-in-a-for-loop/65555 "2021-07-31T21:34:07Z")

</div>

Hi, short history: I define a macro in a module, it works fine, but when I call this macro inside a for it fails. Here a full MWE. ## ---------------------------------------------------------------- # I wants a funct…

---

## [Convert float type array to Int](https://discourse.julialang.org/t/convert-float-type-array-to-int/65597)

<div class="topic-metadata">

**Author:** [@juls](https://discourse.julialang.org/u/juls)\
**Replies:** 6\
**Last updated:** [July 31, 2021, 8:17pm UTC](https://discourse.julialang.org/t/convert-float-type-array-to-int/65597 "2021-07-31T20:17:36Z")

</div>

Hi, I have been trying to convert the array type to Int for a = \[3.0 2.0;2.0 4.0;7.0 8.0\] I tried convert function and used loops but have not received the required output: a = \[3 2;2 4;7 8\] Thanks

---

## [Question ) What is the difference between putting @. and . for every algebraic operator?](https://discourse.julialang.org/t/question-what-is-the-difference-between-putting-and-for-every-algebraic-operator/65603)

<div class="topic-metadata">

**Author:** [@Zerosum](https://discourse.julialang.org/u/Zerosum)\
**Replies:** 6\
**Last updated:** [July 31, 2021, 8:00pm UTC](https://discourse.julialang.org/t/question-what-is-the-difference-between-putting-and-for-every-algebraic-operator/65603 "2021-07-31T20:00:26Z")

</div>

I am not sure if I am using the macro @. well. I thought I can avoid putting . (elementwise calculation) for + , -, / and so on by using the macro. For my project, I used it several times, but sometimes it doesn’t work.…

---

## [Generating dummy variables from a vector of strings (one-hot encoding)](https://discourse.julialang.org/t/generating-dummy-variables-from-a-vector-of-strings-one-hot-encoding/65507)

<div class="topic-metadata">

**Author:** [@rubaiyat](https://discourse.julialang.org/u/rubaiyat)\
**Replies:** 9\
**Last updated:** [July 31, 2021, 4:53pm UTC](https://discourse.julialang.org/t/generating-dummy-variables-from-a-vector-of-strings-one-hot-encoding/65507 "2021-07-31T16:53:58Z")

</div>

Hello everyone, New Julia user here. Suppose I have a vector of strings, and I’d like to generate a dummy variable for each unique value that appears in that string. For instance: data = \["a", "b", "a", "a", "b"\] I…

---

## [Have a try Julia v1.5.1 for arm32bit](https://discourse.julialang.org/t/have-a-try-julia-v1-5-1-for-arm32bit/45558)

<div class="topic-metadata">

**Author:** [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Replies:** 21\
**Last updated:** [July 31, 2021, 3:42pm UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-5-1-for-arm32bit/45558 "2021-07-31T15:42:41Z")

</div>

Similar to Have a try Julia v1.4.2 for arm32bit, have a try Julia v1.5.1 for arm32bit :tada: How to install Bring RPI4(Maybe RPI3, RPI2 is O.K.) from your room and install Raspberry Pi OS lite to your Raspberry Pi. …

---

## [Help building a PID example](https://discourse.julialang.org/t/help-building-a-pid-example/27194)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 11\
**Last updated:** [July 31, 2021, 2:30pm UTC](https://discourse.julialang.org/t/help-building-a-pid-example/27194 "2021-07-31T14:30:59Z")

</div>

Hi guys! I am trying to use Flux.jl to build a PIDNN as shown here: PID Neural Network I started to code using only the proportional part. This, I need an input layer with 2 inputs and 1 output, and one output layer wi…

---

## [Help converting pymc3 switchpoint analysis code to Turing.jl](https://discourse.julialang.org/t/help-converting-pymc3-switchpoint-analysis-code-to-turing-jl/39880)

<div class="topic-metadata">

**Author:** [@3210jr](https://discourse.julialang.org/u/3210jr)\
**Replies:** 4\
**Last updated:** [July 31, 2021, 2:29pm UTC](https://discourse.julialang.org/t/help-converting-pymc3-switchpoint-analysis-code-to-turing-jl/39880 "2021-07-31T14:29:14Z")

</div>

Hey all, I’ve been trying to practice turing.jl and Julia as a whole and its been a great experience so far! I am having some trouble coming from pymc3 background, any help and direction is much appreciated! Given the…

---

## [MKLSparse: how to control thread affinity and the number of threads?](https://discourse.julialang.org/t/mklsparse-how-to-control-thread-affinity-and-the-number-of-threads/65601)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 0\
**Last updated:** [July 31, 2021, 2:14pm UTC](https://discourse.julialang.org/t/mklsparse-how-to-control-thread-affinity-and-the-number-of-threads/65601 "2021-07-31T14:14:17Z")

</div>

As far as I understand, currently the go-to way if you need multithreaded Sparse Matrix operations is to interface with MKL using MKLSparse.jl. Now, imagine I have a machine with several NUMA nodes and want to run multi…

---

## [Comparing Numba and Julia for a complex matrix computation](https://discourse.julialang.org/t/comparing-numba-and-julia-for-a-complex-matrix-computation/63703)

<div class="topic-metadata">

**Author:** [@Ordens\_Ritter](https://discourse.julialang.org/u/Ordens_Ritter)\
**Replies:** 29\
**Last updated:** [July 31, 2021, 1:50pm UTC](https://discourse.julialang.org/t/comparing-numba-and-julia-for-a-complex-matrix-computation/63703 "2021-07-31T13:50:07Z")

</div>

I am think about slowly switching from Python to Julia. My main problem is the experience. Some years experience in writing code with python compared to: only read some books about Julia (as ‘Julia High Performance’ by A…

---

## [Difference between SArray{...} and StaticArray{...}](https://discourse.julialang.org/t/difference-between-sarray-and-staticarray/65528)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 2\
**Last updated:** [July 31, 2021, 1:44pm UTC](https://discourse.julialang.org/t/difference-between-sarray-and-staticarray/65528 "2021-07-31T13:44:20Z")

</div>

I am confused about the type parameters of StaticArrays. In particular, I defined Point2F = Point{2,Float64} for a 2D point , where the latter is from GeometryBasics. Its supertypes are as follows I then defined Vecto…

---

## [Multithreading simultaneously in two functions](https://discourse.julialang.org/t/multithreading-simultaneously-in-two-functions/65579)

<div class="topic-metadata">

**Author:** [@vkv](https://discourse.julialang.org/u/vkv)\
**Replies:** 3\
**Last updated:** [July 31, 2021, 12:30pm UTC](https://discourse.julialang.org/t/multithreading-simultaneously-in-two-functions/65579 "2021-07-31T12:30:46Z")

</div>

Is there a way to do use all 9 threads in the following functions? function f1() Threads.@threads for i in 1:3 println("MCMC") println("$(Threads.threadid())") sleep(3.0) end println(…

---

## [Julia and the satellite Amazonia-1](https://discourse.julialang.org/t/julia-and-the-satellite-amazonia-1/57541)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 29\
**Last updated:** [July 31, 2021, 11:29am UTC](https://discourse.julialang.org/t/julia-and-the-satellite-amazonia-1/57541 "2021-07-31T11:29:50Z")

</div>

Hi guys! Long time, no see! As some of you may know, I am the mission architect and the technical responsible for the attitude and orbit control subsystem (AOCS) of the Brazilian satellite Amazonia-1, launched on Feb 2…

---

## [Solve Linear Matrix Inequality in Julia](https://discourse.julialang.org/t/solve-linear-matrix-inequality-in-julia/65592)

<div class="topic-metadata">

**Author:** [@aiiiob\_bie](https://discourse.julialang.org/u/aiiiob_bie)\
**Replies:** 1\
**Last updated:** [July 31, 2021, 11:29am UTC](https://discourse.julialang.org/t/solve-linear-matrix-inequality-in-julia/65592 "2021-07-31T11:29:04Z")

</div>

Dear Friends I need to solve an LMI as follows As I am a beginner to Julia I do not know how to solve it (build it in Julia context) and which commands are appropriate. here is the problem I need to find P I appr…

---

## [For DTable being built in Dagger.jl? Can I understand the rationale for having it vs just adding distributed arrays to DataFrames.jl?](https://discourse.julialang.org/t/for-dtable-being-built-in-dagger-jl-can-i-understand-the-rationale-for-having-it-vs-just-adding-distributed-arrays-to-dataframes-jl/65595)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 0\
**Last updated:** [July 31, 2021, 11:10am UTC](https://discourse.julialang.org/t/for-dtable-being-built-in-dagger-jl-can-i-understand-the-rationale-for-having-it-vs-just-adding-distributed-arrays-to-dataframes-jl/65595 "2021-07-31T11:10:13Z")

</div>

Would be interested in how the DTable in Dagger.jl works and the design behind it. I imagine it’s something like, it’s harder to overload the methods in DataFrame than to have this work with Dagger’s DAG approach.

---

## [IntervalRootFinding and Legendre polynomials: error](https://discourse.julialang.org/t/intervalrootfinding-and-legendre-polynomials-error/65541)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 1\
**Last updated:** [July 31, 2021, 9:54am UTC](https://discourse.julialang.org/t/intervalrootfinding-and-legendre-polynomials-error/65541 "2021-07-31T09:54:15Z")

</div>

When I try to find the roots of the 26th degree Legendre polynomial with IntervalRootFinding.jl, I get an error I can’t decode. julia\> using IntervalArithmetic julia\> using LegendrePolynomials julia\> using IntervalRoo…

---

## [Is there a function that prints out the body of another function?](https://discourse.julialang.org/t/is-there-a-function-that-prints-out-the-body-of-another-function/65380)

<div class="topic-metadata">

**Author:** [@sg-s](https://discourse.julialang.org/u/sg-s)\
**Replies:** 13\
**Last updated:** [July 31, 2021, 4:53am UTC](https://discourse.julialang.org/t/is-there-a-function-that-prints-out-the-body-of-another-function/65380 "2021-07-31T04:53:00Z")

</div>

Say there is a function foo defined somewhere. Is there a function so that I can: disp(foo) and it prints out the definition of foo? I know about @less, but for whatever reason it doesn’t work in Pluto

---

## [\[ANN\] ShowLint](https://discourse.julialang.org/t/ann-showlint/52140)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 22\
**Last updated:** [July 31, 2021, 4:05am UTC](https://discourse.julialang.org/t/ann-showlint/52140 "2021-07-31T04:05:01Z")

</div>

Hi all, TLDR: I made a Julia linter which shows rewrite suggestions online. At the time of writing it analyses 128 Julia repositories (about 1,012,728 lines of code) and shows the diffs. I was recently watching a video…

---

## [Store Julia version in Manifest?](https://discourse.julialang.org/t/store-julia-version-in-manifest/65575)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 2\
**Last updated:** [July 31, 2021, 2:23am UTC](https://discourse.julialang.org/t/store-julia-version-in-manifest/65575 "2021-07-31T02:23:44Z")

</div>

I wonder whether it would make sense to store the Julia version in the Manifest.toml as well? I’m aware one can put a Julia compat entry in the Project.toml, but my understanding is compat entries kind of serve a differe…

---

## [How can I change the Working Directory of Pluto?](https://discourse.julialang.org/t/how-can-i-change-the-working-directory-of-pluto/65576)

<div class="topic-metadata">

**Author:** [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)\
**Replies:** 1\
**Last updated:** [July 31, 2021, 1:46am UTC](https://discourse.julialang.org/t/how-can-i-change-the-working-directory-of-pluto/65576 "2021-07-31T01:46:21Z")

</div>

I know how to do this with Jupyter, but there is scant info on the Pluto config file or where it is. My C drive is too full and I don’t like cluttering up my home directory, so I use an external drive.

---

## [Symbolic computations with functions having a variable number of arguments](https://discourse.julialang.org/t/symbolic-computations-with-functions-having-a-variable-number-of-arguments/65140)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 19\
**Last updated:** [July 31, 2021, 12:23am UTC](https://discourse.julialang.org/t/symbolic-computations-with-functions-having-a-variable-number-of-arguments/65140 "2021-07-31T00:23:46Z")

</div>

I’m looking for a Julia package that can rewrite symbolic expressions involving functions that don’t have a fixed number of arguments. For example, it should be easy to declare that some function f is multilinear (= line…

---

## [DRY reading binary structured data](https://discourse.julialang.org/t/dry-reading-binary-structured-data/65420)

<div class="topic-metadata">

**Author:** [@hacklint](https://discourse.julialang.org/u/hacklint)\
**Replies:** 8\
**Last updated:** [July 30, 2021, 11:08pm UTC](https://discourse.julialang.org/t/dry-reading-binary-structured-data/65420 "2021-07-30T23:08:10Z")

</div>

Hi, I’m trying to create a Julia reader for a binary block-based file format and run into different issues depending on which approach I try. There are many different types of blocks, but essentially they look something…

---

## [How To Implement Multi-Precision Functions?](https://discourse.julialang.org/t/how-to-implement-multi-precision-functions/65542)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 8\
**Last updated:** [July 30, 2021, 9:48pm UTC](https://discourse.julialang.org/t/how-to-implement-multi-precision-functions/65542 "2021-07-30T21:48:47Z")

</div>

Say you’re writing a mathematical function for which you want to support multiple precisions – Float16, Float32, Float64, and BigFloat (up to 256 bits). What is the best way to program the constants that are needed in t…

---

## [Fast f(x) ∂f∂x and ∂2f∂x2](https://discourse.julialang.org/t/fast-f-x-f-x-and-2f-x2/65569)

<div class="topic-metadata">

**Author:** [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Replies:** 5\
**Last updated:** [July 30, 2021, 9:51pm UTC](https://discourse.julialang.org/t/fast-f-x-f-x-and-2f-x2/65569 "2021-07-30T21:51:55Z")

</div>

Hi, im trying to make a fast evaluation of the value, first and second derivative, in the least amount of forward passes as possible. i’m using at the moment this function: using DiffResults, StaticArrays, ForwardDiff f…

---

## [Fastest way to print many numbers to text file](https://discourse.julialang.org/t/fastest-way-to-print-many-numbers-to-text-file/65537)

<div class="topic-metadata">

**Author:** [@PeterB](https://discourse.julialang.org/u/PeterB)\
**Replies:** 18\
**Last updated:** [July 30, 2021, 9:51pm UTC](https://discourse.julialang.org/t/fastest-way-to-print-many-numbers-to-text-file/65537 "2021-07-30T21:51:41Z")

</div>

EDIT: I found one speedup myself (see my answer below) but still interested in replies… I have a critical loop which looks like this: for j in 1:about\_1000 x = a\_simple\_calculation() @printf(op, " %g", x) # t…

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

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