# Latest

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

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

**Page:** 1275

---

## [How to search the manual more efficiently](https://discourse.julialang.org/t/how-to-search-the-manual-more-efficiently/19314)

<div class="topic-metadata">

**Author:** [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Replies:** 12\
**Last updated:** [September 6, 2021, 7:48pm UTC](https://discourse.julialang.org/t/how-to-search-the-manual-more-efficiently/19314 "2021-09-06T19:48:46Z")

</div>

I find myself using Julia’s online manual a lot, and thought I’d share this simple trick on how to do that more efficiently if you’re using Chrome as a browser: Enter chrome://settings/ in Chrome’s URL bar. Scroll down…

---

## [Simulating evolutionary birth-death processes with EvoId.jl](https://discourse.julialang.org/t/simulating-evolutionary-birth-death-processes-with-evoid-jl/65867)

<div class="topic-metadata">

**Author:** [@boutor2](https://discourse.julialang.org/u/boutor2)\
**Replies:** 1\
**Last updated:** [September 6, 2021, 7:47pm UTC](https://discourse.julialang.org/t/simulating-evolutionary-birth-death-processes-with-evoid-jl/65867 "2021-09-06T19:47:05Z")

</div>

Hello guys, I am posting here a link to EvoId.jl, a package that I have been developing for my research. EvoId.jl is purposed for numerical experiments in theoretical evolutionary biology, and implements a few algorithm…

---

## [Efficient Way of Installing Packages](https://discourse.julialang.org/t/efficient-way-of-installing-packages/67770)

<div class="topic-metadata">

**Author:** [@mo\_re](https://discourse.julialang.org/u/mo_re)\
**Replies:** 4\
**Last updated:** [September 6, 2021, 7:10pm UTC](https://discourse.julialang.org/t/efficient-way-of-installing-packages/67770 "2021-09-06T19:10:24Z")

</div>

Hey everyone, while learning R I came across a forum post that was very helpful for checking and installing what packages were missing for a user. The R code went like this: packages \<- c("package names"...) # Install…

---

## [Anonymous function in count()](https://discourse.julialang.org/t/anonymous-function-in-count/67761)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 9\
**Last updated:** [September 6, 2021, 7:02pm UTC](https://discourse.julialang.org/t/anonymous-function-in-count/67761 "2021-09-06T19:02:51Z")

</div>

The slowdown of using something like count(z-\>(edges\[1\]\<z\<=edges\[2\]),x) is substantial, and can be avoided by a wrapping another function (see below). Is this the same as 10x slowdown when passing function as argument? …

---

## [Error using kmean clustering](https://discourse.julialang.org/t/error-using-kmean-clustering/64184)

<div class="topic-metadata">

**Author:** [@Nova](https://discourse.julialang.org/u/Nova)\
**Replies:** 6\
**Last updated:** [September 6, 2021, 5:59pm UTC](https://discourse.julialang.org/t/error-using-kmean-clustering/64184 "2021-09-06T17:59:58Z")

</div>

I am getting the following error when I try to use the kmean function: Julia version 1.5.3 All the packages are updated using Clustering using Distances using Statistics X = rand(5, 1000) R = kmeans(X, 20; maxiter=20…

---

## [Interactive Applied-Category-Theory in Julia (organized by Julia-User-Group-Munich meetup)](https://discourse.julialang.org/t/interactive-applied-category-theory-in-julia-organized-by-julia-user-group-munich-meetup/66198)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 3\
**Last updated:** [September 6, 2021, 4:26pm UTC](https://discourse.julialang.org/t/interactive-applied-category-theory-in-julia-organized-by-julia-user-group-munich-meetup/66198 "2021-09-06T16:26:26Z")

</div>

Hi all, I am glad to announce the next Share&Code session of the Julia-User-Group-Munich. Our guest and speaker is Owen Lynch @olynch who will give an introduction to AlgebraicJulia, especially Catlab.jl and Semagrams.…

---

## [@threads for loop to find maximum of function](https://discourse.julialang.org/t/threads-for-loop-to-find-maximum-of-function/53263)

<div class="topic-metadata">

**Author:** [@MFairley](https://discourse.julialang.org/u/MFairley)\
**Replies:** 19\
**Last updated:** [September 6, 2021, 4:14pm UTC](https://discourse.julialang.org/t/threads-for-loop-to-find-maximum-of-function/53263 "2021-09-06T16:14:20Z")

</div>

The following code causes a type instability. Is there a better way to write this code? Perhaps using Threads.Atomic? max\_obj = -Inf64 xs = 0.0 Threads.@threads for i = 1:100 obj, x = f(i) if obj \>= max\_obj …

---

## [CairoMakie wont display plots (running from terminal)](https://discourse.julialang.org/t/cairomakie-wont-display-plots-running-from-terminal/67755)

<div class="topic-metadata">

**Author:** [@RTbecard](https://discourse.julialang.org/u/RTbecard)\
**Replies:** 2\
**Last updated:** [September 6, 2021, 3:41pm UTC](https://discourse.julialang.org/t/cairomakie-wont-display-plots-running-from-terminal/67755 "2021-09-06T15:41:03Z")

</div>

Not sure why… but I can’t get Makie plots to display. I’m running julia 1.6.1 from my terminal on PopOS 21.04. The docs tell me that this is a backend build issue… but when I ran pkg\> test CairoMakie, all tests passed…

---

## [Why 0.2+0.09 = 0.29000000000000004?](https://discourse.julialang.org/t/why-0-2-0-09-0-29000000000000004/67750)

<div class="topic-metadata">

**Author:** [@lliu1871](https://discourse.julialang.org/u/lliu1871)\
**Replies:** 4\
**Last updated:** [September 6, 2021, 2:34pm UTC](https://discourse.julialang.org/t/why-0-2-0-09-0-29000000000000004/67750 "2021-09-06T14:34:41Z")

</div>

I am new to Julia. I typed 0.2+0.09 in Julia and got 0.29000000000000004. could anyone explain it? Thanks.

---

## [Issues reading CSV file with array elements](https://discourse.julialang.org/t/issues-reading-csv-file-with-array-elements/67747)

<div class="topic-metadata">

**Author:** [@Cevheriferd](https://discourse.julialang.org/u/Cevheriferd)\
**Replies:** 4\
**Last updated:** [September 6, 2021, 1:55pm UTC](https://discourse.julialang.org/t/issues-reading-csv-file-with-array-elements/67747 "2021-09-06T13:55:47Z")

</div>

The problem is as follows: I have a dataframe with a column that has Vector{Float64} elements. When I store the dataframe in a CSV file and then retrieve it, the type of the column changed from Vector{Float64} to String…

---

## [Collaborating via Word documents when being used to Git](https://discourse.julialang.org/t/collaborating-via-word-documents-when-being-used-to-git/67702)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 8\
**Last updated:** [September 6, 2021, 1:15pm UTC](https://discourse.julialang.org/t/collaborating-via-word-documents-when-being-used-to-git/67702 "2021-09-06T13:15:43Z")

</div>

Maybe, this is a weird question, but does anyone here have tips on how to collaborate with people who work via Word? I’ve used Git so much now that I simply don’t know anymore how to manage applying changes without bre…

---

## [Assign values to a subarray and it take a long time and large allocation](https://discourse.julialang.org/t/assign-values-to-a-subarray-and-it-take-a-long-time-and-large-allocation/67711)

<div class="topic-metadata">

**Author:** [@disadone](https://discourse.julialang.org/u/disadone)\
**Replies:** 4\
**Last updated:** [September 6, 2021, 1:11pm UTC](https://discourse.julialang.org/t/assign-values-to-a-subarray-and-it-take-a-long-time-and-large-allocation/67711 "2021-09-06T13:11:42Z")

</div>

I have functions such as function max\_(v::Matrix{Float64}) m,idx=findmax(v,dims=2) Dt=vec(getindex.(idx,2)) return m,Dt end function max\_!(Vs::AbstractVector{Float64},Ds::AbstractVector{Float64},v::Matrix{F…

---

## [How to programmatically check if an allocation is possible](https://discourse.julialang.org/t/how-to-programmatically-check-if-an-allocation-is-possible/67697)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 10\
**Last updated:** [September 6, 2021, 12:44pm UTC](https://discourse.julialang.org/t/how-to-programmatically-check-if-an-allocation-is-possible/67697 "2021-09-06T12:44:09Z")

</div>

Hi, I have some code that can do some performance optimizations provided that an allocation of some matrix NxN is possible. If N is too large, I get an out of memory error. In this case I can use an alternative algorithm…

---

## [How to call a custom julia function from c++ (a custom locally created .jl file)](https://discourse.julialang.org/t/how-to-call-a-custom-julia-function-from-c-a-custom-locally-created-jl-file/67708)

<div class="topic-metadata">

**Author:** [@solaris](https://discourse.julialang.org/u/solaris)\
**Replies:** 18\
**Last updated:** [September 6, 2021, 12:35pm UTC](https://discourse.julialang.org/t/how-to-call-a-custom-julia-function-from-c-a-custom-locally-created-jl-file/67708 "2021-09-06T12:35:20Z")

</div>

So I wrote a julia file myself, called function.jl, and I want to load it in C++ and call functions in it. That’s it. I can’t find anything in the documentation about this. The docs cover jl\_eval\_string and jl\_get\_fun…

---

## [Multithreading, preallocation of objects, threadid() and task migration](https://discourse.julialang.org/t/multithreading-preallocation-of-objects-threadid-and-task-migration/67640)

<div class="topic-metadata">

**Author:** [@Bruno\_Amorim](https://discourse.julialang.org/u/Bruno_Amorim)\
**Replies:** 18\
**Last updated:** [September 6, 2021, 10:17am UTC](https://discourse.julialang.org/t/multithreading-preallocation-of-objects-threadid-and-task-migration/67640 "2021-09-06T10:17:51Z")

</div>

Suppose we have a function, do\_stuff!(mat, x), that mutates a previously allocated matrix mat and returns some value. We want to run the function for several values of x using multithreading. In order to avoid data races…

---

## [Trying to understand 3d indexing](https://discourse.julialang.org/t/trying-to-understand-3d-indexing/67525)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 3\
**Last updated:** [September 6, 2021, 9:51am UTC](https://discourse.julialang.org/t/trying-to-understand-3d-indexing/67525 "2021-09-06T09:51:53Z")

</div>

I prepared kernel with thread dimensions 4, 4,1 and iterating over array of dimensionality 16,16,2 and 32 blocks as far as my calculations all should work - all divides without remainder but I get constantly ERROR: Ou…

---

## [Research Fellow in Compilers and Computing Performance Optimisation - UK](https://discourse.julialang.org/t/research-fellow-in-compilers-and-computing-performance-optimisation-uk/67740)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [September 6, 2021, 9:32am UTC](https://discourse.julialang.org/t/research-fellow-in-compilers-and-computing-performance-optimisation-uk/67740 "2021-09-06T09:32:20Z")

</div>

https://www.hipeac.net/jobs/12478/research-fellow-in-compilers-and-computing-performance-optimisation/

---

## [Passing \`val\` to notify on Condition](https://discourse.julialang.org/t/passing-val-to-notify-on-condition/67643)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 2\
**Last updated:** [September 6, 2021, 9:09am UTC](https://discourse.julialang.org/t/passing-val-to-notify-on-condition/67643 "2021-09-06T09:09:54Z")

</div>

The manual (Tasks · The Julia Language) says that notify can pass val to its waiting conditions. How can I obtain val from the woken up conditions?

---

## [Reordering NamedTuples](https://discourse.julialang.org/t/reordering-namedtuples/67600)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 11\
**Last updated:** [September 6, 2021, 8:04am UTC](https://discourse.julialang.org/t/reordering-namedtuples/67600 "2021-09-06T08:04:20Z")

</div>

Dear All, I want to ask, if anyone knows about fast (ideally typed stable) method to reorder named tuples. A MWE would look like (a = 1, b = 2, c = 3) julia\> y = (c = 1, b = 2, a = 1) (c = 1, b = 2, a = 1) julia\> ma…

---

## [Notebook() does not work](https://discourse.julialang.org/t/notebook-does-not-work/67631)

<div class="topic-metadata">

**Author:** [@egor](https://discourse.julialang.org/u/egor)\
**Replies:** 14\
**Last updated:** [September 6, 2021, 7:09am UTC](https://discourse.julialang.org/t/notebook-does-not-work/67631 "2021-09-06T07:09:35Z")

</div>

Hello everyone, I have installed julia (on ubuntu 20.04) and want to run it in notebook. For this I used: Pkg.add("IJulia") using IJulia notebook() But in the end it opens this: \[ Info: running \`/usr/bin/snap notebook…

---

## [New package feeds on Zulip and Slack!](https://discourse.julialang.org/t/new-package-feeds-on-zulip-and-slack/67458)

<div class="topic-metadata">

**Author:** [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Replies:** 1\
**Last updated:** [August 31, 2021, 11:13pm UTC](https://discourse.julialang.org/t/new-package-feeds-on-zulip-and-slack/67458 "2021-08-31T23:13:22Z")

</div>

@dilumaluthge, @logankilpatrick, and I have put together a channel called new-packages-feed on the community Slack and Zulip which automatically posts all new package registrations made to the General registry. Thanks to…

---

## [\_\_init\_\_() doesn't allow access to pycall functions](https://discourse.julialang.org/t/init-doesnt-allow-access-to-pycall-functions/67402)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 2\
**Last updated:** [September 6, 2021, 6:12am UTC](https://discourse.julialang.org/t/init-doesnt-allow-access-to-pycall-functions/67402 "2021-09-06T06:12:21Z")

</div>

I am running a test on the implementation of init() for pycall and I built an example using the scipy.interpolate.Rbf and PyCall documentation. Code: module test\_rbf using PyCall function \_\_init\_\_() py""" imp…

---

## [JuliaMono Italics](https://discourse.julialang.org/t/juliamono-italics/67712)

<div class="topic-metadata">

**Author:** [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Replies:** 4\
**Last updated:** [September 6, 2021, 5:13am UTC](https://discourse.julialang.org/t/juliamono-italics/67712 "2021-09-06T05:13:40Z")

</div>

The latest version of the JuliaMono font (v0.042) has italic versions: Some VSCode themes use italics as part of the highlighting, so the italic version of the current font will be used, if available (otherwise the c…

---

## [How to return the index of element in Array in Integer not CartesianIndex?](https://discourse.julialang.org/t/how-to-return-the-index-of-element-in-array-in-integer-not-cartesianindex/67728)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 2\
**Last updated:** [September 6, 2021, 5:08am UTC](https://discourse.julialang.org/t/how-to-return-the-index-of-element-in-array-in-integer-not-cartesianindex/67728 "2021-09-06T05:08:23Z")

</div>

I have the following array (here is vector), and I want to return the index of “8” element, which should be 4 as integer not CartesianIndex. Any solution? julia\> s=\[5 6 7 8\] 1×4 Matrix{Int64}: 5 6 7 8 julia\> findal…

---

## [Words of Wisdom](https://discourse.julialang.org/t/words-of-wisdom/67404)

<div class="topic-metadata">

**Author:** [@R.T.A.M](https://discourse.julialang.org/u/R.T.A.M)\
**Replies:** 8\
**Last updated:** [September 6, 2021, 5:07am UTC](https://discourse.julialang.org/t/words-of-wisdom/67404 "2021-09-06T05:07:33Z")

</div>

Hi all, My son and his class are soon going to sit final high school specialist maths exams. His teacher wants to put together a sort of encouragement video for them, so I wanted to give them some sage advice, but I’m …

---

## [Improving metropolis-hastings code](https://discourse.julialang.org/t/improving-metropolis-hastings-code/67412)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 21\
**Last updated:** [September 6, 2021, 3:22am UTC](https://discourse.julialang.org/t/improving-metropolis-hastings-code/67412 "2021-09-06T03:22:16Z")

</div>

Recently i’m looking for different ways to make the metropolis-hastings algorithm better specially when it comes to rate of the accepted values and the performance, specially if i’m writing this code manually without any…

---

## [Laplace equation in one dimension](https://discourse.julialang.org/t/laplace-equation-in-one-dimension/67715)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 5\
**Last updated:** [September 6, 2021, 2:25am UTC](https://discourse.julialang.org/t/laplace-equation-in-one-dimension/67715 "2021-09-06T02:25:55Z")

</div>

Please solve the Laplace equation in one dimension on a region bounded between x ∈ \[0, 1\], with the boundary condition Φ(0) = 1, and Φ(1) = 2. Actually line should pass through (0,1) making 45 degree with x,y-axis.

---

## [Getting strange "UndefVarError: xs not defined" in Zygote / Flux](https://discourse.julialang.org/t/getting-strange-undefvarerror-xs-not-defined-in-zygote-flux/67707)

<div class="topic-metadata">

**Author:** [@outlace](https://discourse.julialang.org/u/outlace)\
**Replies:** 3\
**Last updated:** [September 5, 2021, 10:18pm UTC](https://discourse.julialang.org/t/getting-strange-undefvarerror-xs-not-defined-in-zygote-flux/67707 "2021-09-05T22:18:41Z")

</div>

I’ve got a fairly simple custom 2-layer MLP implementation but I get this strange error when trying to get the gradient: LoadError: UndefVarError: xs not defined UndefVarError: xs not defined Here’s my full code using…

---

## [Subsetting boolean columns and multiple assignments](https://discourse.julialang.org/t/subsetting-boolean-columns-and-multiple-assignments/67716)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 5\
**Last updated:** [September 5, 2021, 8:37pm UTC](https://discourse.julialang.org/t/subsetting-boolean-columns-and-multiple-assignments/67716 "2021-09-05T20:37:54Z")

</div>

Hello, I have two related questions both related to the following code: df = DataFrame(a = \[true, true, false\]) subset1 = subset(df, :a) subset2 = subset(df, :a =\> ByRow(!=(true))) I want to be able to do something lik…

---

## [Set system-wide to JuliaFont](https://discourse.julialang.org/t/set-system-wide-to-juliafont/67723)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 0\
**Last updated:** [September 5, 2021, 7:15pm UTC](https://discourse.julialang.org/t/set-system-wide-to-juliafont/67723 "2021-09-05T19:15:02Z")

</div>

How do I set the whole system’s font to JuliaMono? I’m on Debian, i3 window manager, mainly using XTerm, NeoVim, and Ranger. I assume I need to edit my .Xresources file, but I don’t know exactly how…?

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

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