# Latest

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

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

**Page:** 1568

---

## [In operator for set of sets](https://discourse.julialang.org/t/in-operator-for-set-of-sets/50474)

<div class="topic-metadata">

**Author:** [@bsuwal](https://discourse.julialang.org/u/bsuwal)\
**Replies:** 5\
**Last updated:** [November 20, 2020, 11:40am UTC](https://discourse.julialang.org/t/in-operator-for-set-of-sets/50474 "2020-11-20T11:40:53Z")

</div>

Can I get some help with explaining this behaviour? At first it seems that you can find the existence of a set within a set of sets, but after I make a modification to the set I cannot do so?

---

## [Pycall, Exception Handling of Python errors with Julia's \`try-catch\`](https://discourse.julialang.org/t/pycall-exception-handling-of-python-errors-with-julias-try-catch/50405)

<div class="topic-metadata">

**Author:** [@4aHxKzD](https://discourse.julialang.org/u/4aHxKzD)\
**Replies:** 3\
**Last updated:** [November 20, 2020, 10:55am UTC](https://discourse.julialang.org/t/pycall-exception-handling-of-python-errors-with-julias-try-catch/50405 "2020-11-20T10:55:04Z")

</div>

Assuming I have the following python code: import module as m try: # do something except (m.SomeError, ValueError) as err: # do other stuff And that I want to write it in Julia using PyCall, starting with: us…

---

## [Having local packages in a monorepo depend on one another](https://discourse.julialang.org/t/having-local-packages-in-a-monorepo-depend-on-one-another/50454)

<div class="topic-metadata">

**Author:** [@Tim\_Wheeler](https://discourse.julialang.org/u/Tim_Wheeler)\
**Replies:** 10\
**Last updated:** [November 20, 2020, 8:17am UTC](https://discourse.julialang.org/t/having-local-packages-in-a-monorepo-depend-on-one-another/50454 "2020-11-20T08:17:05Z")

</div>

We’re using a monorepo to maintain our julia packages, with a directory structure along the lines of: julia PackageOne PackageTwo PackageThree I can add these packages to my top-level Project by running Pk…

---

## [Confused about metaprogramming: macros](https://discourse.julialang.org/t/confused-about-metaprogramming-macros/50480)

<div class="topic-metadata">

**Author:** [@hsvdg](https://discourse.julialang.org/u/hsvdg)\
**Replies:** 3\
**Last updated:** [November 20, 2020, 7:59am UTC](https://discourse.julialang.org/t/confused-about-metaprogramming-macros/50480 "2020-11-20T07:59:18Z")

</div>

I have started to use Metaprogramming now. While my code is running, I noticed that there are some things that I do not understand. My understanding is that at the simplest level macros return an expression which is then…

---

## [Can I get the type of an inner function without calling the outer function?](https://discourse.julialang.org/t/can-i-get-the-type-of-an-inner-function-without-calling-the-outer-function/50417)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 6\
**Last updated:** [November 20, 2020, 6:26am UTC](https://discourse.julialang.org/t/can-i-get-the-type-of-an-inner-function-without-calling-the-outer-function/50417 "2020-11-20T06:26:19Z")

</div>

In the code below, bar is an inner function. I’d like to get its type from outside the outer function foo, but without calling foo. Is that possible? function foo() bar() = 1 end T = typeof(foo()) # var"#bar#8" # …

---

## [Julia's assignment behavior differs from Fortran?](https://discourse.julialang.org/t/julias-assignment-behavior-differs-from-fortran/50389)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 47\
**Last updated:** [November 20, 2020, 6:14am UTC](https://discourse.julialang.org/t/julias-assignment-behavior-differs-from-fortran/50389 "2020-11-20T06:14:55Z")

</div>

When I was first starting I was horrified by this, when trying to literally translate Fortran to Julia: julia\> function f() local x = Vector{Float64}(undef,3) local y = Vector{Float64}(undef,3) …

---

## [How do I implement recursive interpolation ($) for string macros?](https://discourse.julialang.org/t/how-do-i-implement-recursive-interpolation-for-string-macros/50444)

<div class="topic-metadata">

**Author:** [@cce](https://discourse.julialang.org/u/cce)\
**Replies:** 4\
**Last updated:** [November 20, 2020, 2:57am UTC](https://discourse.julialang.org/t/how-do-i-implement-recursive-interpolation-for-string-macros/50444 "2020-11-20T02:57:49Z")

</div>

Could Meta.parse grow an option to re-use $ interpolation semantics within a string macro? I’m trying to replicate functionality of Mike Bostock’s Hyper Text Literal only ported to Julia (HypertextLiteral.jl). Specific…

---

## [\[ANN\] VS Code extension 1.0.10 released](https://discourse.julialang.org/t/ann-vs-code-extension-1-0-10-released/50320)

<div class="topic-metadata">

**Author:** [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Replies:** 8\
**Last updated:** [November 20, 2020, 1:20am UTC](https://discourse.julialang.org/t/ann-vs-code-extension-1-0-10-released/50320 "2020-11-20T01:20:00Z")

</div>

Hey everyone, we’ve released v1.0.10 of the VSCode extension for Julia! There are a bunch of fixes, improvements and new features – most notably the fact that you can now interrupt your code – (also see our changelog fo…

---

## [How to generate a random number in CUDA kernel function](https://discourse.julialang.org/t/how-to-generate-a-random-number-in-cuda-kernel-function/50364)

<div class="topic-metadata">

**Author:** [@HaoxuanGuo](https://discourse.julialang.org/u/HaoxuanGuo)\
**Replies:** 4\
**Last updated:** [November 20, 2020, 1:11am UTC](https://discourse.julialang.org/t/how-to-generate-a-random-number-in-cuda-kernel-function/50364 "2020-11-20T01:11:56Z")

</div>

All the rand like function in CUDA.jl will get a CuArray. But memory allocation is not allowed in a kernel function. Thus, a CuArray can not be generated. So, are there any method to get a pure random number instead of a…

---

## [NVIDIA Tensor Cores not useful for double-precision simulations?](https://discourse.julialang.org/t/nvidia-tensor-cores-not-useful-for-double-precision-simulations/50245)

<div class="topic-metadata">

**Author:** [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Replies:** 12\
**Last updated:** [November 19, 2020, 10:47pm UTC](https://discourse.julialang.org/t/nvidia-tensor-cores-not-useful-for-double-precision-simulations/50245 "2020-11-19T22:47:28Z")

</div>

I am using CUDA.jl to speed up double-precision simulations with large matrix computations and FFT (e.g. Split Step Fourier Method). I heard about Tensor Cores on NVIDIA GPUs and have the following questions: Tensor …

---

## [Overnight a ERROR: StackOverflowError: in unchanged code](https://discourse.julialang.org/t/overnight-a-error-stackoverflowerror-in-unchanged-code/50449)

<div class="topic-metadata">

**Author:** [@GerhardTotschnig](https://discourse.julialang.org/u/GerhardTotschnig)\
**Replies:** 3\
**Last updated:** [November 19, 2020, 9:22pm UTC](https://discourse.julialang.org/t/overnight-a-error-stackoverflowerror-in-unchanged-code/50449 "2020-11-19T21:22:43Z")

</div>

Up to yesterday I had no problem with the code: https://github.com/GerhardTotschnig/Seasonal I think the code is unchanged. And the code still works on other computers. Starting from the REPL julia\>include("SeasUL.jl…

---

## [Redundant and non-redundant constraints](https://discourse.julialang.org/t/redundant-and-non-redundant-constraints/50314)

<div class="topic-metadata">

**Author:** [@kat\_mt](https://discourse.julialang.org/u/kat_mt)\
**Replies:** 5\
**Last updated:** [November 19, 2020, 9:20pm UTC](https://discourse.julialang.org/t/redundant-and-non-redundant-constraints/50314 "2020-11-19T21:20:14Z")

</div>

Hello! I need to solve a LP model with CPLEX and find which of constraints are non redundant. After solving, it gives me the following message: Tried aggregator 1 time. LP Presolve eliminated 22 rows and 0 columns. R…

---

## [Defining a function inside if...else..end NOT as expected?](https://discourse.julialang.org/t/defining-a-function-inside-if-else-end-not-as-expected/13815)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 43\
**Last updated:** [November 19, 2020, 7:43pm UTC](https://discourse.julialang.org/t/defining-a-function-inside-if-else-end-not-as-expected/13815 "2020-11-19T19:43:03Z")

</div>

hello, I have difficulties in defining a closure within a if-else-end block. I expect closure(1) would give a function that prints 1, while closure(2) would give a function that prints “not 1”. But the results are very…

---

## [This code do not works anymore after julia 1.5.3 update](https://discourse.julialang.org/t/this-code-do-not-works-anymore-after-julia-1-5-3-update/50452)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 13\
**Last updated:** [November 19, 2020, 7:12pm UTC](https://discourse.julialang.org/t/this-code-do-not-works-anymore-after-julia-1-5-3-update/50452 "2020-11-19T19:12:24Z")

</div>

Hello, good day. I updated my environment to julia 1.5.3 and a lot of project I had stoped work. This code do not works anymore. Someone knows why it stoped work? setosa\_df = iris\[iris\[:species\] .== "setosa", :\] ERR…

---

## [Chapel vs Julia (and compared to Python/Numba, and C+OpenMP)](https://discourse.julialang.org/t/chapel-vs-julia-and-compared-to-python-numba-and-c-openmp/50446)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 3\
**Last updated:** [November 19, 2020, 7:12pm UTC](https://discourse.julialang.org/t/chapel-vs-julia-and-compared-to-python-numba-and-c-openmp/50446 "2020-11-19T19:12:04Z")

</div>

First, are Julia’s threads still “experimental”? The paper claiming it, published in September, seems to have been been first out in June, so that may explain it. More importantly, are Julia’s threads “not yet mature eno…

---

## [Help debugging an error with Zygote](https://discourse.julialang.org/t/help-debugging-an-error-with-zygote/50411)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 1\
**Last updated:** [November 19, 2020, 5:37pm UTC](https://discourse.julialang.org/t/help-debugging-an-error-with-zygote/50411 "2020-11-19T17:37:54Z")

</div>

Hoping someone who understands autodiff better than I do can help me figure out what’s going on here. I’ve got a function that calls ldl from LDLFactorizations.jl, and then does further calculations on a field of the LD…

---

## [Copy folder structure and make new folder?](https://discourse.julialang.org/t/copy-folder-structure-and-make-new-folder/50433)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 1\
**Last updated:** [November 19, 2020, 5:27pm UTC](https://discourse.julialang.org/t/copy-folder-structure-and-make-new-folder/50433 "2020-11-19T17:27:01Z")

</div>

Hello! Suppose I have a folder structure on my harddrive as: Main Folder -- 01\_FirstFolder --\> 1stSubFolder --\> 2ndSubFolder --\> 3rdSubFolder -- 02\_SecondFolder --\> 1stSubFolder --\> 2ndSubFolder --\> 3rdSubF…

---

## [Forced recompilation](https://discourse.julialang.org/t/forced-recompilation/27367)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 7\
**Last updated:** [November 19, 2020, 5:07pm UTC](https://discourse.julialang.org/t/forced-recompilation/27367 "2020-11-19T17:07:18Z")

</div>

Is it possible to force Julia to recompile cached code? Background: I need to upload packages with unregistered dependencies to a remote machine. If I develop these packages locally, Manifest.toml points to a directory…

---

## [\`cat\` allocates too much memory](https://discourse.julialang.org/t/cat-allocates-too-much-memory/50443)

<div class="topic-metadata">

**Author:** [@ArthurW](https://discourse.julialang.org/u/ArthurW)\
**Replies:** 11\
**Last updated:** [November 19, 2020, 4:50pm UTC](https://discourse.julialang.org/t/cat-allocates-too-much-memory/50443 "2020-11-19T16:50:54Z")

</div>

Hi. I’m new to Julia language. I’m trying to convert a big vector of small arrays into a tensor, but cat() is drawing too much resources. julia\> A = \[rand(Int, (28,28)) for \_ ∈ 1:10000\]; julia\> @time cat(A..., dims=3)…

---

## [Unexpected speed difference for differently chained functions](https://discourse.julialang.org/t/unexpected-speed-difference-for-differently-chained-functions/50427)

<div class="topic-metadata">

**Author:** [@Phypix](https://discourse.julialang.org/u/Phypix)\
**Replies:** 3\
**Last updated:** [November 19, 2020, 4:23pm UTC](https://discourse.julialang.org/t/unexpected-speed-difference-for-differently-chained-functions/50427 "2020-11-19T16:23:23Z")

</div>

I want to chain several to be applied element-wise on an array. I have first used the default approach with f(A) = @. f1(f2(A)). However I noticed, that by defining the captures c1 = x -\> f1.(x) and c2 = x -\> f2.(x) and…

---

## [SDE with diagonal noise](https://discourse.julialang.org/t/sde-with-diagonal-noise/50420)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 4\
**Last updated:** [November 19, 2020, 1:31pm UTC](https://discourse.julialang.org/t/sde-with-diagonal-noise/50420 "2020-11-19T13:31:53Z")

</div>

I am trying to solve the following SDE: du=f(u,p,t)dt+\\sigma dW, where f(u,p,t) can be written as following: function f(du,u,p,t) #calculate the derivative of the vector at time j p=0.0 for i=1:Nx if i==2 …

---

## [Svdvals is inefficient for tall matrices](https://discourse.julialang.org/t/svdvals-is-inefficient-for-tall-matrices/50330)

<div class="topic-metadata">

**Author:** [@JeffFessler](https://discourse.julialang.org/u/JeffFessler)\
**Replies:** 2\
**Last updated:** [November 19, 2020, 2:46pm UTC](https://discourse.julialang.org/t/svdvals-is-inefficient-for-tall-matrices/50330 "2020-11-19T14:46:08Z")

</div>

For a tall matrix X, calling svdvals(X) directly is noticeably slower than calling it on svdvals(X'X) despite the overhead of the extra matrix-matrix multiply: using BenchmarkTools: @btime using LinearAlgebra: svdvals X…

---

## [Generate singular value sequentialy](https://discourse.julialang.org/t/generate-singular-value-sequentialy/50434)

<div class="topic-metadata">

**Author:** [@Geoffrey](https://discourse.julialang.org/u/Geoffrey)\
**Replies:** 2\
**Last updated:** [November 19, 2020, 2:13pm UTC](https://discourse.julialang.org/t/generate-singular-value-sequentialy/50434 "2020-11-19T14:13:25Z")

</div>

Hi, I’m wondering if there is a way of generating singular value sequentialy. I’m aware of the truncated svd utilities from TSVD.jl and LowRankApprox.jl but to my knowledge they didn’t provide a way to generate singular…

---

## [General advice for how to maximize code performance](https://discourse.julialang.org/t/general-advice-for-how-to-maximize-code-performance/50439)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 1\
**Last updated:** [November 19, 2020, 2:06pm UTC](https://discourse.julialang.org/t/general-advice-for-how-to-maximize-code-performance/50439 "2020-11-19T14:06:25Z")

</div>

I thought I’d ask for what tips you more advanced Julia users have for how to maximize code performance in general. I realize that without a specific use-case some ways may be missed, but I thought I’d check whether yous…

---

## [Zygote is very slow for log barrier function](https://discourse.julialang.org/t/zygote-is-very-slow-for-log-barrier-function/50423)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 3\
**Last updated:** [November 19, 2020, 1:59pm UTC](https://discourse.julialang.org/t/zygote-is-very-slow-for-log-barrier-function/50423 "2020-11-19T13:59:26Z")

</div>

I’m trying to implement log barrier function for my gradient descent code: It have an easy derivative (sum of elementwise log → elementwise reciprocal) Here is the script for testing: using Zygote using BenchmarkTo…

---

## [Flux differentiation error](https://discourse.julialang.org/t/flux-differentiation-error/49811)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 19\
**Last updated:** [November 19, 2020, 1:20pm UTC](https://discourse.julialang.org/t/flux-differentiation-error/49811 "2020-11-19T13:20:51Z")

</div>

Dear All, I am working on a solution of simple differential equation y(x) - y’(x) = 0 using neural network. I am using a two-layer softplus network for parameterization of y(x). To get y’(x), I am using simple Flux.gra…

---

## [ERROR: LoadError: InitError: could not load library](https://discourse.julialang.org/t/error-loaderror-initerror-could-not-load-library/50429)

<div class="topic-metadata">

**Author:** [@sz1992](https://discourse.julialang.org/u/sz1992)\
**Replies:** 1\
**Last updated:** [November 19, 2020, 1:09pm UTC](https://discourse.julialang.org/t/error-loaderror-initerror-could-not-load-library/50429 "2020-11-19T13:09:35Z")

</div>

Hi, Julia 1.5.3 installed on Alpine Linux (3.12), musl libc used. I have an issue with precompiling EzXML.jl package that uses artifacts: ERROR: LoadError: InitError: could not load library "/root/.julia/artifacts/374…

---

## [Package(s) for n-body simulations?](https://discourse.julialang.org/t/package-s-for-n-body-simulations/50294)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 4\
**Last updated:** [November 19, 2020, 12:20pm UTC](https://discourse.julialang.org/t/package-s-for-n-body-simulations/50294 "2020-11-19T12:20:33Z")

</div>

What do we currently have in the ecosystem for n-body simulations (with electric-field-like interaction, point-like particles, no collisions)?

---

## [Select multiple columns from pandas dataframe](https://discourse.julialang.org/t/select-multiple-columns-from-pandas-dataframe/50243)

<div class="topic-metadata">

**Author:** [@nadaa](https://discourse.julialang.org/u/nadaa)\
**Replies:** 15\
**Last updated:** [November 19, 2020, 11:30am UTC](https://discourse.julialang.org/t/select-multiple-columns-from-pandas-dataframe/50243 "2020-11-19T11:30:56Z")

</div>

Hi, I imported pandas and read CSV, I can print the data. I want to select the first 3 columns, it is working in Python as df.iloc\[:,:3\] but didn’t work in Julia. I also tried df\[\[“col1”,“col2”,“col3”\]\]. Any suggestion…

---

## [Debugger stops without hitting a breakpoint](https://discourse.julialang.org/t/debugger-stops-without-hitting-a-breakpoint/50378)

<div class="topic-metadata">

**Author:** [@acycliq](https://discourse.julialang.org/u/acycliq)\
**Replies:** 3\
**Last updated:** [November 19, 2020, 11:13am UTC](https://discourse.julialang.org/t/debugger-stops-without-hitting-a-breakpoint/50378 "2020-11-19T11:13:09Z")

</div>

The debugger in VSCode stops despite the fact that there is no breakpoint to stop at. Any idea how to fix this please? See screenshot below (from logging.jl)

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

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