# Latest

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

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

**Page:** 1435

---

## [How to get the directory of an indirect dependency](https://discourse.julialang.org/t/how-to-get-the-directory-of-an-indirect-dependency/58708)

<div class="topic-metadata">

**Author:** [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Replies:** 3\
**Last updated:** [April 7, 2021, 12:49am UTC](https://discourse.julialang.org/t/how-to-get-the-directory-of-an-indirect-dependency/58708 "2021-04-07T00:49:55Z")

</div>

I’m trying to write a script that analyzes all of the dependencies of a Julia project, including the indirect dependencies. I see how I can use pathof to get the path to the direct dependencies, but how can I do this for…

---

## [Imputing Discrete Data](https://discourse.julialang.org/t/imputing-discrete-data/58662)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 14\
**Last updated:** [April 7, 2021, 12:02am UTC](https://discourse.julialang.org/t/imputing-discrete-data/58662 "2021-04-07T00:02:48Z")

</div>

I’m trying to use NUTS in Turing.jl to estimate some parameters, but have some missing data which follows a binomial distribution. Since I know NUTS can’t impute discrete variables so I’m trying to use Gibbs with PG to s…

---

## [How newcomers interested in Machine Learning should start with Julia?](https://discourse.julialang.org/t/how-newcomers-interested-in-machine-learning-should-start-with-julia/58578)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 7\
**Last updated:** [April 6, 2021, 11:11pm UTC](https://discourse.julialang.org/t/how-newcomers-interested-in-machine-learning-should-start-with-julia/58578 "2021-04-06T23:11:02Z")

</div>

I’m not interested Machine Learning as such, just not my kind of thing. At the same time interest around me in ML is enormous (no surprise here) and one of the most often questions that newcomers to Julia or just people …

---

## [Vega and the Iris Dataset](https://discourse.julialang.org/t/vega-and-the-iris-dataset/58470)

<div class="topic-metadata">

**Author:** [@kumarbalachandran](https://discourse.julialang.org/u/kumarbalachandran)\
**Replies:** 11\
**Last updated:** [April 6, 2021, 10:46pm UTC](https://discourse.julialang.org/t/vega-and-the-iris-dataset/58470 "2021-04-06T22:46:38Z")

</div>

I am trying to execute the following script on Julia 1.6.0 #select packages using VegaDatasets using DataVoyager using VegaLite # load dataset data = dataset("iris") #display data vscodedisplay(data) v=Voyager() and I…

---

## [Type stability and assignments of functions](https://discourse.julialang.org/t/type-stability-and-assignments-of-functions/58719)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 2\
**Last updated:** [April 6, 2021, 10:23pm UTC](https://discourse.julialang.org/t/type-stability-and-assignments-of-functions/58719 "2021-04-06T22:23:41Z")

</div>

I’m trying to understand how assigning a function to another variable affects type stability. Consider the following example: f(x) = x # any function g = f ff(x) = f(x) gg(x) = g(x) Then @code\_warntype f(1) # g…

---

## [Softmax and large numbers](https://discourse.julialang.org/t/softmax-and-large-numbers/58674)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 7\
**Last updated:** [April 6, 2021, 9:32pm UTC](https://discourse.julialang.org/t/softmax-and-large-numbers/58674 "2021-04-06T21:32:41Z")

</div>

I need to apply a softmax layer to values that are potentially large and I am getting NaN values. Playing around a bit more I found the following: julia\> using CUDA, Flux julia\> softmax(gpu(Float32\[1, 2, 3, Inf\])) 4-el…

---

## [REPL in Atom UI bug](https://discourse.julialang.org/t/repl-in-atom-ui-bug/58718)

<div class="topic-metadata">

**Author:** [@vaishnavtv](https://discourse.julialang.org/u/vaishnavtv)\
**Replies:** 0\
**Last updated:** [April 6, 2021, 9:30pm UTC](https://discourse.julialang.org/t/repl-in-atom-ui-bug/58718 "2021-04-06T21:30:46Z")

</div>

Hi, I have been facing an issue with the REPL in my Atom interface. I cannot see anything besides the cursor in the REPL, and I am not sure why. Cannot see input, output, or even the julia prompt. I have not been abl…

---

## [Insert!, cross-module struct mutation and symbol reference](https://discourse.julialang.org/t/insert-cross-module-struct-mutation-and-symbol-reference/58707)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 3\
**Last updated:** [April 6, 2021, 9:21pm UTC](https://discourse.julialang.org/t/insert-cross-module-struct-mutation-and-symbol-reference/58707 "2021-04-06T21:21:09Z")

</div>

Barkground: The lecture notes for an open courseware class I’m working through uses an interactive Pluto notebook. I wanted to add an empty cell to my local copy of this notebook to work on one of the programming exrci…

---

## [Powermodels.jl SDP relaxation](https://discourse.julialang.org/t/powermodels-jl-sdp-relaxation/57165)

<div class="topic-metadata">

**Author:** [@aaldik](https://discourse.julialang.org/u/aaldik)\
**Replies:** 9\
**Last updated:** [April 6, 2021, 7:29pm UTC](https://discourse.julialang.org/t/powermodels-jl-sdp-relaxation/57165 "2021-04-06T19:29:17Z")

</div>

Dears I have a question regrading the Powermodels.jl package. Does it support the SDP relaxation? I have seen that it was mentioned in the documentation that it is supported (SDPWRMPowerModel). However, it didn’t work e…

---

## [Using Gurobi with PowerModels](https://discourse.julialang.org/t/using-gurobi-with-powermodels/58688)

<div class="topic-metadata">

**Author:** [@aaldik](https://discourse.julialang.org/u/aaldik)\
**Replies:** 1\
**Last updated:** [April 6, 2021, 7:28pm UTC](https://discourse.julialang.org/t/using-gurobi-with-powermodels/58688 "2021-04-06T19:28:35Z")

</div>

Dears How to use Gurobi to solve optimization problems for PowerModels? Regards

---

## [Faster way to "save" and "load" structs](https://discourse.julialang.org/t/faster-way-to-save-and-load-structs/58704)

<div class="topic-metadata">

**Author:** [@RXGottlieb](https://discourse.julialang.org/u/RXGottlieb)\
**Replies:** 4\
**Last updated:** [April 6, 2021, 6:43pm UTC](https://discourse.julialang.org/t/faster-way-to-save-and-load-structs/58704 "2021-04-06T18:43:46Z")

</div>

I’m working on a project in which I need to repeatedly remember the status of my process, make a small change, and then re-load the original status from before the change was made. Think something like a Monte Carlo tree…

---

## [Computing L1 norm between vectors: julian way](https://discourse.julialang.org/t/computing-l1-norm-between-vectors-julian-way/58680)

<div class="topic-metadata">

**Author:** [@ismedina](https://discourse.julialang.org/u/ismedina)\
**Replies:** 14\
**Last updated:** [April 6, 2021, 6:34pm UTC](https://discourse.julialang.org/t/computing-l1-norm-between-vectors-julian-way/58680 "2021-04-06T18:34:43Z")

</div>

I need to code a function that computes the L1 distance between the two vectors. It doesn’t need to be super precise — it serves as the estimate for some error as part of the stopping criterion of an algorithm—, but it n…

---

## [Type unstability with container generation in JuMP](https://discourse.julialang.org/t/type-unstability-with-container-generation-in-jump/58433)

<div class="topic-metadata">

**Author:** [@etienne\_dg](https://discourse.julialang.org/u/etienne_dg)\
**Replies:** 4\
**Last updated:** [April 6, 2021, 5:55pm UTC](https://discourse.julialang.org/t/type-unstability-with-container-generation-in-jump/58433 "2021-04-06T17:55:24Z")

</div>

Hi, julia\> model = Model(Gurobi.Optimizer) julia\> @variable(model, a\[x in 1:10; x \< 5\], Bin) JuMP.Containers.SparseAxisArray{VariableRef, 1, Tuple{Int64}} with 4 entries: julia\> @variable(model, b\[x in 1:10; x \> 15\], …

---

## [LocalCoverage.jl -\> Function and Branch Coverage](https://discourse.julialang.org/t/localcoverage-jl-function-and-branch-coverage/58012)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 4\
**Last updated:** [April 6, 2021, 4:44pm UTC](https://discourse.julialang.org/t/localcoverage-jl-function-and-branch-coverage/58012 "2021-04-06T16:44:51Z")

</div>

How to generate Function and Branch coverage? It is generating line coverage by default.

---

## [Stochastic simulation error](https://discourse.julialang.org/t/stochastic-simulation-error/58692)

<div class="topic-metadata">

**Author:** [@jailton](https://discourse.julialang.org/u/jailton)\
**Replies:** 1\
**Last updated:** [April 6, 2021, 4:32pm UTC](https://discourse.julialang.org/t/stochastic-simulation-error/58692 "2021-04-06T16:32:47Z")

</div>

Hello, I am newbie in Julia, trying to run a MCMC algorithm, but I getting some complaints about the parameters of the gamma distribution (which are supposed to be \> 0), but they are, so I don’t understand this complain…

---

## [Threads maxing out all cores, but no performance increase](https://discourse.julialang.org/t/threads-maxing-out-all-cores-but-no-performance-increase/58590)

<div class="topic-metadata">

**Author:** [@seulberg1](https://discourse.julialang.org/u/seulberg1)\
**Replies:** 16\
**Last updated:** [April 6, 2021, 3:06pm UTC](https://discourse.julialang.org/t/threads-maxing-out-all-cores-but-no-performance-increase/58590 "2021-04-06T15:06:41Z")

</div>

Hello All I started using Julia, because of its speed in an application, where the workload in pseudo-code looks like I added below (no MWE, but hopefully this is diagnostic enough - otherwise I will create a MWE, but i…

---

## [Julia 1.6 returns Matrix in case of zeros(m,n), ones(m,n)](https://discourse.julialang.org/t/julia-1-6-returns-matrix-in-case-of-zeros-m-n-ones-m-n/58686)

<div class="topic-metadata">

**Author:** [@praveenc](https://discourse.julialang.org/u/praveenc)\
**Replies:** 3\
**Last updated:** [April 6, 2021, 3:01pm UTC](https://discourse.julialang.org/t/julia-1-6-returns-matrix-in-case-of-zeros-m-n-ones-m-n/58686 "2021-04-06T15:01:43Z")

</div>

Before it used to return an Array. I wonder what is the reason for this change ? Do we have to do something in our existing codes to account for this change ?

---

## [How to read lines from a file with a reusable buffer?](https://discourse.julialang.org/t/how-to-read-lines-from-a-file-with-a-reusable-buffer/58620)

<div class="topic-metadata">

**Author:** [@sstadick](https://discourse.julialang.org/u/sstadick)\
**Replies:** 3\
**Last updated:** [April 6, 2021, 2:19pm UTC](https://discourse.julialang.org/t/how-to-read-lines-from-a-file-with-a-reusable-buffer/58620 "2021-04-06T14:19:20Z")

</div>

What I want to do: line\_buffer = UInt8\[\] buffered\_io\_stream = open("file.txt") while readuntil!(line\_buffer, buffered\_io\_stream, '\\n') != 0 # do thing with line\_buffer # clear line\_buffer end Is there a pack…

---

## [The most general way to estimate the optimal arguments for @cuda macro](https://discourse.julialang.org/t/the-most-general-way-to-estimate-the-optimal-arguments-for-cuda-macro/39342)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 6\
**Last updated:** [April 6, 2021, 2:12pm UTC](https://discourse.julialang.org/t/the-most-general-way-to-estimate-the-optimal-arguments-for-cuda-macro/39342 "2021-04-06T14:12:17Z")

</div>

How one can choose the optimal arguments (threads, blocks, etc.) to launch CUDA kernels using @cuda macro? In the following example I consider a simple kernel which does vector addition of two matrices: using CuArrays u…

---

## [Fast computation of Grammian of matrix](https://discourse.julialang.org/t/fast-computation-of-grammian-of-matrix/56244)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 11\
**Last updated:** [April 6, 2021, 1:16pm UTC](https://discourse.julialang.org/t/fast-computation-of-grammian-of-matrix/56244 "2021-04-06T13:16:09Z")

</div>

For some model indentification problems, I have to compute the grammian of data matrices i.e. compute A = X'\*X where X is a complex rectangular matrix. Is there a fast implementation of this specific operation in julia …

---

## [Detecting missing in DataFrame columns](https://discourse.julialang.org/t/detecting-missing-in-dataframe-columns/14853)

<div class="topic-metadata">

**Author:** [@tnederlof](https://discourse.julialang.org/u/tnederlof)\
**Replies:** 6\
**Last updated:** [April 6, 2021, 1:14pm UTC](https://discourse.julialang.org/t/detecting-missing-in-dataframe-columns/14853 "2021-04-06T13:14:03Z")

</div>

I am still trying to get used to some of the syntax so I apologize in advance if this is a simple answer. I have a couple of columns in a DataFrame, some of which have a missing value and some columns do not. I am lookin…

---

## [Accelerate Non-linear function evaluation](https://discourse.julialang.org/t/accelerate-non-linear-function-evaluation/42105)

<div class="topic-metadata">

**Author:** [@bdc](https://discourse.julialang.org/u/bdc)\
**Replies:** 17\
**Last updated:** [April 6, 2021, 12:48pm UTC](https://discourse.julialang.org/t/accelerate-non-linear-function-evaluation/42105 "2021-04-06T12:48:33Z")

</div>

Hi, I’m working on an application with maximum entropy networks. To determine some parameters, a system of non-linear equation F(x)=0 needs to be solved. For a network of n nodes, each node i has an associated equation…

---

## [Multiple inheritance carry-over members](https://discourse.julialang.org/t/multiple-inheritance-carry-over-members/58355)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 13\
**Last updated:** [April 6, 2021, 7:21am UTC](https://discourse.julialang.org/t/multiple-inheritance-carry-over-members/58355 "2021-04-06T07:21:31Z")

</div>

Inheritance vs. mulitple dispatch in julia is maybe one of the hard things to grasp. I am still struggling with it and therefore the question. Does julia have a concept of carrying over data members to derived classes? I…

---

## [First element of iteration satisfying a predicate](https://discourse.julialang.org/t/first-element-of-iteration-satisfying-a-predicate/58617)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [April 6, 2021, 12:08pm UTC](https://discourse.julialang.org/t/first-element-of-iteration-satisfying-a-predicate/58617 "2021-04-06T12:08:39Z")

</div>

I often find that I want to use something like findfirst on iterables that have no (or inefficient) random access, something like function satisfies\_first(predicate, itr) for i in itr predicate(i) && return …

---

## [Stale compile cache moving to Julia 1.6.0?](https://discourse.julialang.org/t/stale-compile-cache-moving-to-julia-1-6-0/58678)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 2\
**Last updated:** [April 6, 2021, 12:09pm UTC](https://discourse.julialang.org/t/stale-compile-cache-moving-to-julia-1-6-0/58678 "2021-04-06T12:09:23Z")

</div>

Hi, I am moving my code to Julia 1.6.0 (from 1.4.x), and in doing so am encountering a problem for which I am not able to create an MWE: I have a module SaidModule, which exports some short names like export R11 const…

---

## [Folder picker](https://discourse.julialang.org/t/folder-picker/58679)

<div class="topic-metadata">

**Author:** [@saraflgarcia](https://discourse.julialang.org/u/saraflgarcia)\
**Replies:** 0\
**Last updated:** [April 6, 2021, 11:44am UTC](https://discourse.julialang.org/t/folder-picker/58679 "2021-04-06T11:44:11Z")

</div>

Hi everyone, I’m using the Interact package. How can I make a widget to pick a folder (like the filepicker but for folders)? Thank you so much, Sara

---

## [BLAS thread count vs Julia thread count](https://discourse.julialang.org/t/blas-thread-count-vs-julia-thread-count/57197)

<div class="topic-metadata">

**Author:** [@Manuel\_Bergmann](https://discourse.julialang.org/u/Manuel_Bergmann)\
**Replies:** 21\
**Last updated:** [April 6, 2021, 11:02am UTC](https://discourse.julialang.org/t/blas-thread-count-vs-julia-thread-count/57197 "2021-04-06T11:02:11Z")

</div>

Hey, just found that thread now. Is there a reason why BLAS.set\_num\_threads(n) defaults to 8 threads and also ignores Julia’s --threads option? I found that issue while investigating that matrix multiplication benchmark:…

---

## [Making a PD Controller Component in ModelingToolkit.jl](https://discourse.julialang.org/t/making-a-pd-controller-component-in-modelingtoolkit-jl/58509)

<div class="topic-metadata">

**Author:** [@Dhruva2](https://discourse.julialang.org/u/Dhruva2)\
**Replies:** 28\
**Last updated:** [April 6, 2021, 10:10am UTC](https://discourse.julialang.org/t/making-a-pd-controller-component-in-modelingtoolkit-jl/58509 "2021-04-06T10:10:32Z")

</div>

If I were to make a PD controller component, I’d probably do something like this: using ModelingToolkit function PD\_controller(Pgain, Dgain, num\_inputs; name=:pd) @parameters t D = Differential(t) @variables…

---

## [Can multiple tasks on different threads write from the same Channel without a lock?](https://discourse.julialang.org/t/can-multiple-tasks-on-different-threads-write-from-the-same-channel-without-a-lock/58661)

<div class="topic-metadata">

**Author:** [@smabie](https://discourse.julialang.org/u/smabie)\
**Replies:** 2\
**Last updated:** [April 6, 2021, 6:33am UTC](https://discourse.julialang.org/t/can-multiple-tasks-on-different-threads-write-from-the-same-channel-without-a-lock/58661 "2021-04-06T06:33:08Z")

</div>

Pretty much the title says it all: I want to have multiple producers that all write to the same channel. I will then have one consumer that reads the data from this channel. Do the producers need to acquire a lock before…

---

## [Economy-sized QR decomposition](https://discourse.julialang.org/t/economy-sized-qr-decomposition/57608)

<div class="topic-metadata">

**Author:** [@qrebjock](https://discourse.julialang.org/u/qrebjock)\
**Replies:** 10\
**Last updated:** [April 6, 2021, 6:34am UTC](https://discourse.julialang.org/t/economy-sized-qr-decomposition/57608 "2021-04-06T06:34:59Z")

</div>

Hello, It seems like the function qr doesn’t take keywords argument to return an economy-sized factorization. In this thread qr(A; full=false) no longer available? · Issue #27397 · JuliaLang/julia · GitHub they say tha…

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

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