# Latest

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

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

**Page:** 1182

---

## [Computational Geometry: Regular Distribution of Points inside of a Polygon](https://discourse.julialang.org/t/computational-geometry-regular-distribution-of-points-inside-of-a-polygon/39523)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 18\
**Last updated:** [December 12, 2021, 1:46pm UTC](https://discourse.julialang.org/t/computational-geometry-regular-distribution-of-points-inside-of-a-polygon/39523 "2021-12-12T13:46:57Z")

</div>

Hello! So I am basically asking since I struggle to figure out if there is an efficient way to do this. Basically I want to be able to take any arbitrary polygon and fill it with particles as shown in this figure: T…

---

## [JLL library: how to use boost\_jll](https://discourse.julialang.org/t/jll-library-how-to-use-boost-jll/65895)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 4\
**Last updated:** [December 12, 2021, 10:35am UTC](https://discourse.julialang.org/t/jll-library-how-to-use-boost-jll/65895 "2021-12-12T10:35:08Z")

</div>

Hi, Is there a simple example on how to use the boost\_jll library? 1/ I would like for example to use boost::sort::block\_indirect\_sort in #include \<boost/sort/sort.hpp\>. There is a C++ example here: 2/ I also tried t…

---

## [How to check if there are at least one true Cartesian index?](https://discourse.julialang.org/t/how-to-check-if-there-are-at-least-one-true-cartesian-index/72961)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 4\
**Last updated:** [December 12, 2021, 8:40am UTC](https://discourse.julialang.org/t/how-to-check-if-there-are-at-least-one-true-cartesian-index/72961 "2021-12-12T08:40:42Z")

</div>

I love Cartesian indices because of its performance. One issue I’m not clear is how to check if there are at least one true Cartesian index. For example, if I have a vector as the below: A = \[1, 2, 3, 4, 5\]; My regula…

---

## [Problem with pyplot](https://discourse.julialang.org/t/problem-with-pyplot/72937)

<div class="topic-metadata">

**Author:** [@Xuekui\_wang](https://discourse.julialang.org/u/Xuekui_wang)\
**Replies:** 2\
**Last updated:** [December 12, 2021, 3:48am UTC](https://discourse.julialang.org/t/problem-with-pyplot/72937 "2021-12-12T03:48:29Z")

</div>

When I use pyplot there are erros: PyError ($(Expr(:escape, :(ccall(#= C:\\Users\\Lenovo.julia\\packages\\PyCall\\3fwVL\\src\\pyfncall.jl:43 =# @pysym(:PyObject\_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) \<cla…

---

## [Extract variables from strings](https://discourse.julialang.org/t/extract-variables-from-strings/72881)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 13\
**Last updated:** [December 12, 2021, 1:59am UTC](https://discourse.julialang.org/t/extract-variables-from-strings/72881 "2021-12-12T01:59:49Z")

</div>

I’d like write a macro to extract variables from strings. So writing @string\_extract "test var\_1 and var\_2" "test $x and $y" would set x = "var\_1" y = "var\_2" So, is there a function to convert "test…

---

## [Pushing to a set of structs](https://discourse.julialang.org/t/pushing-to-a-set-of-structs/72945)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 3\
**Last updated:** [December 12, 2021, 1:29am UTC](https://discourse.julialang.org/t/pushing-to-a-set-of-structs/72945 "2021-12-12T01:29:44Z")

</div>

I define my struct as immutable, but it contains a mutable type. Hence when I try to add two of the “same” elements to a set, it adds it (as it should?) struct Hand cards::Vector{Int} end DAG = Set{Hand}() root = H…

---

## [Possible to get structured assembly code?](https://discourse.julialang.org/t/possible-to-get-structured-assembly-code/53931)

<div class="topic-metadata">

**Author:** [@1m1](https://discourse.julialang.org/u/1m1)\
**Replies:** 10\
**Last updated:** [December 11, 2021, 10:33pm UTC](https://discourse.julialang.org/t/possible-to-get-structured-assembly-code/53931 "2021-12-11T22:33:28Z")

</div>

I have seen code\_native and code\_typed and code\_llvm. These seem to only provide an unstructured text. Though the text itself appears structured and could be parsed to create a structure, this is tedious. Should the in…

---

## [Exotic iteration syntax](https://discourse.julialang.org/t/exotic-iteration-syntax/72948)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 2\
**Last updated:** [December 11, 2021, 10:19pm UTC](https://discourse.julialang.org/t/exotic-iteration-syntax/72948 "2021-12-11T22:19:13Z")

</div>

I’ve never seen this iteration syntax before. It seems that any function application can be used as a variable of iteration, so long as its arguments (but not necessarily the function itself) are defined, and the functio…

---

## [Using command line arguments via launch.json in VS Code](https://discourse.julialang.org/t/using-command-line-arguments-via-launch-json-in-vs-code/72953)

<div class="topic-metadata">

**Author:** [@honj90](https://discourse.julialang.org/u/honj90)\
**Replies:** 0\
**Last updated:** [December 11, 2021, 10:13pm UTC](https://discourse.julialang.org/t/using-command-line-arguments-via-launch-json-in-vs-code/72953 "2021-12-11T22:13:51Z")

</div>

Hello, I have just started using Julia and would like to find an easy way to test a function that relies on command line arguments in VS Code. According to the documentation, I should be able to use the launch.json file…

---

## [Build hangs when building newly installed packages (Windows 11 issue?)](https://discourse.julialang.org/t/build-hangs-when-building-newly-installed-packages-windows-11-issue/72800)

<div class="topic-metadata">

**Author:** [@pchapin](https://discourse.julialang.org/u/pchapin)\
**Replies:** 1\
**Last updated:** [December 11, 2021, 10:05pm UTC](https://discourse.julialang.org/t/build-hangs-when-building-newly-installed-packages-windows-11-issue/72800 "2021-12-11T22:05:23Z")

</div>

I just installed Julia 1.7.0 on my new Windows 11 laptop. I’m attempting to install the PyCall package via the REPL like so: (@v1.7) pkg\> add PyCall Updating registry at \`C:\\Users\\spica\\.julia\\registries\\General.tom…

---

## [MethodError: Cannot \`convert\` an object of type Vector{Float64} to an object of type Float64](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-vector-float64-to-an-object-of-type-float64/66335)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 11\
**Last updated:** [December 11, 2021, 10:00pm UTC](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-vector-float64-to-an-object-of-type-float64/66335 "2021-12-11T22:00:02Z")

</div>

What does this error mean? That an object somewhere in the code is specified as Vector{Float64} and Julia cannot convert it to Float64? I thought it didn’t matter so long as the type was matched (i.e. both Float64).

---

## [Precompilation of developed packages](https://discourse.julialang.org/t/precompilation-of-developed-packages/72785)

<div class="topic-metadata">

**Author:** [@StefanMathis](https://discourse.julialang.org/u/StefanMathis)\
**Replies:** 1\
**Last updated:** [December 11, 2021, 9:59pm UTC](https://discourse.julialang.org/t/precompilation-of-developed-packages/72785 "2021-12-11T21:59:27Z")

</div>

Hello, I have a project in development which is rather large, therefore resulting in long precompilation times when using it for the first time in a fresh Julia REPL session. The project can be separated in multiple ind…

---

## [Why is LLVM missing this constant in a loop?](https://discourse.julialang.org/t/why-is-llvm-missing-this-constant-in-a-loop/72941)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 10\
**Last updated:** [December 11, 2021, 8:16pm UTC](https://discourse.julialang.org/t/why-is-llvm-missing-this-constant-in-a-loop/72941 "2021-12-11T20:16:11Z")

</div>

using BenchmarkTools using LinearAlgebra function f(x,y) z = 0.0 for i in 1:10 xy = x .\* y z += norm(xy) end z end function fopt(x,y) z = 0.0 xy = x .\* y for i in 1:10 …

---

## [Downloadable/offline posts?](https://discourse.julialang.org/t/downloadable-offline-posts/72899)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [December 10, 2021, 4:07pm UTC](https://discourse.julialang.org/t/downloadable-offline-posts/72899 "2021-12-10T16:07:05Z")

</div>

Does Discourse allow to “download”, cache some posts, like the latest-n days? Gonna boarding a flight, that could be usefull… :wink:

---

## [Understanding automatic differentiation (long-form YouTube video)](https://discourse.julialang.org/t/understanding-automatic-differentiation-long-form-youtube-video/72942)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 0\
**Last updated:** [December 11, 2021, 6:09pm UTC](https://discourse.julialang.org/t/understanding-automatic-differentiation-long-form-youtube-video/72942 "2021-12-11T18:09:00Z")

</div>

If you ever wanted to learn about how automatic differentiation (AD) works under the hood, check out my latest video explaining various AD concepts in an accessible way. By the end of this video, you should understand w…

---

## [Undefined variable in loop](https://discourse.julialang.org/t/undefined-variable-in-loop/72936)

<div class="topic-metadata">

**Author:** [@biglari](https://discourse.julialang.org/u/biglari)\
**Replies:** 4\
**Last updated:** [December 11, 2021, 3:57pm UTC](https://discourse.julialang.org/t/undefined-variable-in-loop/72936 "2021-12-11T15:57:46Z")

</div>

d = 0 while ym \<= 1 && d \< dotmax d = d+1 end This part of my program gives this error. What is the reason? LoadError: UndefVarError: d not defined

---

## [Problem with implementing the objective function with minimum and maximum functions simultaneously!](https://discourse.julialang.org/t/problem-with-implementing-the-objective-function-with-minimum-and-maximum-functions-simultaneously/72917)

<div class="topic-metadata">

**Author:** [@Sahar](https://discourse.julialang.org/u/Sahar)\
**Replies:** 2\
**Last updated:** [December 11, 2021, 2:31pm UTC](https://discourse.julialang.org/t/problem-with-implementing-the-objective-function-with-minimum-and-maximum-functions-simultaneously/72917 "2021-12-11T14:31:49Z")

</div>

Hi Good morning! I am working on an optimization problem and it has a user defined objective function. the problem is now working well with a simple cost objective function, but I am not able to change it to the attach…

---

## [Use of Channels (or similar) constructs in parallel processing](https://discourse.julialang.org/t/use-of-channels-or-similar-constructs-in-parallel-processing/18497)

<div class="topic-metadata">

**Author:** [@hesham](https://discourse.julialang.org/u/hesham)\
**Replies:** 4\
**Last updated:** [December 11, 2021, 8:26am UTC](https://discourse.julialang.org/t/use-of-channels-or-similar-constructs-in-parallel-processing/18497 "2021-12-11T08:26:23Z")

</div>

Hi, I have used Julia Channels in real-time processing of data in a pipeline fashion. Each Channel passes data to the next processing step. A simplified example is the code below, one channel for generating random numbe…

---

## [Vector column](https://discourse.julialang.org/t/vector-column/72925)

<div class="topic-metadata">

**Author:** [@biglari](https://discourse.julialang.org/u/biglari)\
**Replies:** 4\
**Last updated:** [December 11, 2021, 8:08am UTC](https://discourse.julialang.org/t/vector-column/72925 "2021-12-11T08:08:39Z")

</div>

Hi, I have a vector that has 100 rows and two columns. I want to select the second column. Julia gives an error with the following command. Can anyone help me? box=\[0,1,0,1\] ninit= 100 pdp = \[LinRange(box\[1\],box\[2\],ni…

---

## [Making a DSL for building a UI component tree?](https://discourse.julialang.org/t/making-a-dsl-for-building-a-ui-component-tree/72914)

<div class="topic-metadata">

**Author:** [@RobertN](https://discourse.julialang.org/u/RobertN)\
**Replies:** 4\
**Last updated:** [December 10, 2021, 11:48pm UTC](https://discourse.julialang.org/t/making-a-dsl-for-building-a-ui-component-tree/72914 "2021-12-10T23:48:38Z")

</div>

I’m new to Julia. I’m experimenting with using it for a native macOS app (wrapping the native AppKit classes). Lately I’ve used both Apple’s SwiftUI and Android’s Jetpack Compose. They have DSLs for UIs that are very sim…

---

## [Wrapper type](https://discourse.julialang.org/t/wrapper-type/72915)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [December 10, 2021, 10:33pm UTC](https://discourse.julialang.org/t/wrapper-type/72915 "2021-12-10T22:33:58Z")

</div>

I want to make a struct Wrapper{T} x::T end that forwards calls f(w) to f(w.x). What are the options?

---

## [Seemingly unnecessary allocation within for loop](https://discourse.julialang.org/t/seemingly-unnecessary-allocation-within-for-loop/72556)

<div class="topic-metadata">

**Author:** [@mjg](https://discourse.julialang.org/u/mjg)\
**Replies:** 15\
**Last updated:** [December 10, 2021, 9:29pm UTC](https://discourse.julialang.org/t/seemingly-unnecessary-allocation-within-for-loop/72556 "2021-12-10T21:29:15Z")

</div>

I’m trying to create a simulation of an elastic string generalized to an arbitrary number of dimensions. To do so I track position and momentum (with an extra array to store the intermediate positions), and use the Euler…

---

## [Multiple dispatch: Value and type methods](https://discourse.julialang.org/t/multiple-dispatch-value-and-type-methods/72901)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 14\
**Last updated:** [December 10, 2021, 9:19pm UTC](https://discourse.julialang.org/t/multiple-dispatch-value-and-type-methods/72901 "2021-12-10T21:19:48Z")

</div>

I’ve found it very handy to sometimes define things like foo(x::T) = foo(T) function foo(::Type{T}) where {T} ... end I’ve heard suggestions that this is bad style, but to me it seems like a useful idiom for cases…

---

## [TSAnalysis: time series analysis and state-space modelling](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 49\
**Last updated:** [December 10, 2021, 9:24pm UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672 "2021-12-10T21:24:52Z")

</div>

Hi all, I am a third-year PhD student in Statistics at the London School of Economics and Political Science. I just released the first version of TSAnalysis (GitHub - fipelle/MessyTimeSeries.jl: A Julia implementation …

---

## [How to use the faster compressed registry on v1.7 after updating?](https://discourse.julialang.org/t/how-to-use-the-faster-compressed-registry-on-v1-7-after-updating/72401)

<div class="topic-metadata">

**Author:** [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Replies:** 6\
**Last updated:** [December 10, 2021, 7:22pm UTC](https://discourse.julialang.org/t/how-to-use-the-faster-compressed-registry-on-v1-7-after-updating/72401 "2021-12-10T19:22:59Z")

</div>

i read somewhere that if you are upgrading, to use the new registry you have to delete the old one, what does that mean?

---

## [Revise not working in notebook in VSCode](https://discourse.julialang.org/t/revise-not-working-in-notebook-in-vscode/65657)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 8\
**Last updated:** [December 10, 2021, 6:33pm UTC](https://discourse.julialang.org/t/revise-not-working-in-notebook-in-vscode/65657 "2021-12-10T18:33:15Z")

</div>

I am using a dev’ed package in a notebook inside VSCode (great new feature!). When the code in the package changes the notebook does not detect the change. using Revise is the first statement in the notebook but that d…

---

## [Is there a call to read task id?](https://discourse.julialang.org/t/is-there-a-call-to-read-task-id/72906)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 1\
**Last updated:** [December 10, 2021, 6:13pm UTC](https://discourse.julialang.org/t/is-there-a-call-to-read-task-id/72906 "2021-12-10T18:13:12Z")

</div>

Dear All, from a toy school demonstration project on IRTools, I have started to work on https://github.com/pevnak/LoggingProfiler.jl, which surrounds every call by a logging its start and its end. I want to create somet…

---

## [Symbolic factorization analysis](https://discourse.julialang.org/t/symbolic-factorization-analysis/39400)

<div class="topic-metadata">

**Author:** [@Mirsad\_Cosovic](https://discourse.julialang.org/u/Mirsad_Cosovic)\
**Replies:** 6\
**Last updated:** [December 10, 2021, 4:28pm UTC](https://discourse.julialang.org/t/symbolic-factorization-analysis/39400 "2021-12-10T16:28:22Z")

</div>

Hi, I need a symbolic factorization of the matrix, similar to symbfact in MATLAB. I have a sparse matrix: A = sparse(\[ 2 0 0 0 0 1 0 2 1 1 1 1 0 1 2 2 1 1 0…

---

## [How to update my Julia from version 1.6 to 1.7 from Jupyter notebook?](https://discourse.julialang.org/t/how-to-update-my-julia-from-version-1-6-to-1-7-from-jupyter-notebook/72893)

<div class="topic-metadata">

**Author:** [@apoorvvyas52](https://discourse.julialang.org/u/apoorvvyas52)\
**Replies:** 2\
**Last updated:** [December 10, 2021, 4:15pm UTC](https://discourse.julialang.org/t/how-to-update-my-julia-from-version-1-6-to-1-7-from-jupyter-notebook/72893 "2021-12-10T16:15:15Z")

</div>

How to update my Julia from version 1.6 to 1.7 from the Jupyter notebook? Do I need to uninstall 1.6 and go to Julia website and download 1.7 or is it possible from the Jupyter notebook environment? Also, Do I need to up…

---

## [Possible performance improvement in matrix multiplication involving a transpose and a complex matrix](https://discourse.julialang.org/t/possible-performance-improvement-in-matrix-multiplication-involving-a-transpose-and-a-complex-matrix/72813)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [December 10, 2021, 3:56pm UTC](https://discourse.julialang.org/t/possible-performance-improvement-in-matrix-multiplication-involving-a-transpose-and-a-complex-matrix/72813 "2021-12-10T15:56:58Z")

</div>

julia\> ZC = rand(1800, 1680); M = rand(ComplexF64, 1800, 1800); julia\> @time ZC' \* M; 9.169792 seconds (3 allocations: 46.143 MiB) julia\> @time permutedims(ZC) \* M; 0.877853 seconds (6 allocations: 115.357 MiB, 1.5…

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

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