# Latest

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

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

**Page:** 1322

---

## [How do I know if an unbuffered (0 sized) channel ready to put! (not blocking)?](https://discourse.julialang.org/t/how-do-i-know-if-an-unbuffered-0-sized-channel-ready-to-put-not-blocking/65228)

<div class="topic-metadata">

**Author:** [@zwtechnb](https://discourse.julialang.org/u/zwtechnb)\
**Replies:** 0\
**Last updated:** [July 24, 2021, 10:43am UTC](https://discourse.julialang.org/t/how-do-i-know-if-an-unbuffered-0-sized-channel-ready-to-put-not-blocking/65228 "2021-07-24T10:43:48Z")

</div>

For a buffered channel(n) with n\>0, I can check it full or not with comparing the Channel field: sz\_max with the undocumented function Base.n\_avail(channel). For channel(0), when a take! on it, a put! can be operated on…

---

## [Turing.jl: Sometimes this error is thrown: Cannot \`convert\` an object of type Geometric{Float64} to an object of type Dirac{Float64}](https://discourse.julialang.org/t/turing-jl-sometimes-this-error-is-thrown-cannot-convert-an-object-of-type-geometric-float64-to-an-object-of-type-dirac-float64/65202)

<div class="topic-metadata">

**Author:** [@Hakan\_Kjellerstrand](https://discourse.julialang.org/u/Hakan_Kjellerstrand)\
**Replies:** 4\
**Last updated:** [July 24, 2021, 5:00am UTC](https://discourse.julialang.org/t/turing-jl-sometimes-this-error-is-thrown-cannot-convert-an-object-of-type-geometric-float64-to-an-object-of-type-dirac-float64/65202 "2021-07-24T05:00:51Z")

</div>

Sometimes, but not always, this error is thrown for the model below when using the SMC() sampler: ERROR: LoadError: CTaskException: MethodError: Cannot \`convert\` an object of type Geometric{Float64} to an object of type…

---

## [Why does Julia allocate memory when I already pre-allocated?](https://discourse.julialang.org/t/why-does-julia-allocate-memory-when-i-already-pre-allocated/65223)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 5\
**Last updated:** [July 24, 2021, 9:25am UTC](https://discourse.julialang.org/t/why-does-julia-allocate-memory-when-i-already-pre-allocated/65223 "2021-07-24T09:25:16Z")

</div>

Look at the code here. julia\> results = Vector{Int}(undef, 10^7); julia\> @time for i in 1:10^7 results\[i\] = i end 0.315568 seconds (20.00 M allocations: 305.160 MiB, 5.86% gc time) Why is there mem…

---

## [Alphafold is open now](https://discourse.julialang.org/t/alphafold-is-open-now/64730)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [July 24, 2021, 9:05am UTC](https://discourse.julialang.org/t/alphafold-is-open-now/64730 "2021-07-24T09:05:20Z")

</div>

Hi all :slight\_smile: I remember that someone implemented alphazero to julia. Maybe alphafold is also an interesting topic.

---

## [How to qualify operators like \*, + , etc](https://discourse.julialang.org/t/how-to-qualify-operators-like-etc/65220)

<div class="topic-metadata">

**Author:** [@viraltux](https://discourse.julialang.org/u/viraltux)\
**Replies:** 2\
**Last updated:** [July 24, 2021, 8:11am UTC](https://discourse.julialang.org/t/how-to-qualify-operators-like-etc/65220 "2021-07-24T08:11:43Z")

</div>

This should be an easy one, I am trying to run this code import Measurements as M import MonteCarloMeasurements as MCM using Measurements using MonteCarloMeasurements n = 100 x = rand(n,5) e = rand(n,5)/100 using Benc…

---

## [JuliaCon 2021 Talk and Workshop schedule is live!](https://discourse.julialang.org/t/juliacon-2021-talk-and-workshop-schedule-is-live/64723)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 6\
**Last updated:** [July 24, 2021, 4:15am UTC](https://discourse.julialang.org/t/juliacon-2021-talk-and-workshop-schedule-is-live/64723 "2021-07-24T04:15:24Z")

</div>

Hey all, The JuliaCon organizing committee is happy to share that the Workshop and talk schedule have been released. You can find the workshop schedule here: JuliaCon 2021 Workshops (with the first workshops taking plac…

---

## [IJulia Kernel not starting unless IJulia is installed in the global environment, ie (v1.1)](https://discourse.julialang.org/t/ijulia-kernel-not-starting-unless-ijulia-is-installed-in-the-global-environment-ie-v1-1/21172)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 9\
**Last updated:** [July 24, 2021, 3:10am UTC](https://discourse.julialang.org/t/ijulia-kernel-not-starting-unless-ijulia-is-installed-in-the-global-environment-ie-v1-1/21172 "2021-07-24T03:10:47Z")

</div>

I recently updated my mac to latest Mojave (10.14.3) and it looks like IJulia no longer works (Safari 12.0.3). The executed cell just hangs and never returns. I see lots of JS errors. julia\> versioninfo() Julia Versi…

---

## [Guidelines for writing an issue?](https://discourse.julialang.org/t/guidelines-for-writing-an-issue/65204)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 7\
**Last updated:** [July 24, 2021, 12:19am UTC](https://discourse.julialang.org/t/guidelines-for-writing-an-issue/65204 "2021-07-24T00:19:03Z")

</div>

I would like to open an issue on Github about a minor problem I have encountered in Optim.jl. I have never opened an issue before–are there any general guidelines for what to include in an issue/how to write an issue? Ar…

---

## [Convergence in Optim questions](https://discourse.julialang.org/t/convergence-in-optim-questions/65139)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 3\
**Last updated:** [July 23, 2021, 7:56pm UTC](https://discourse.julialang.org/t/convergence-in-optim-questions/65139 "2021-07-23T19:56:52Z")

</div>

I have a few questions regarding convergence in Optim: When an optimization finishes and prints the convergence report, at the top it says either “success” or “failure”. Does this refer to whether or not the algorithm …

---

## [Julia script.jl arg1 arg2... =\> script.exe arg1, arg2...?](https://discourse.julialang.org/t/julia-script-jl-arg1-arg2-script-exe-arg1-arg2/65193)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 2\
**Last updated:** [July 23, 2021, 7:43pm UTC](https://discourse.julialang.org/t/julia-script-jl-arg1-arg2-script-exe-arg1-arg2/65193 "2021-07-23T19:43:11Z")

</div>

I wonder if the the command-line call julia script.jl arg1 arg2… can be done with a compiled C-code: script.exe arg1 arg2… Would this reduce start-up time/TTFP? Looking at Embedding Julia there is only a small e…

---

## [Stuck in a Loop](https://discourse.julialang.org/t/stuck-in-a-loop/65164)

<div class="topic-metadata">

**Author:** [@tchebycheff](https://discourse.julialang.org/u/tchebycheff)\
**Replies:** 3\
**Last updated:** [July 23, 2021, 6:53pm UTC](https://discourse.julialang.org/t/stuck-in-a-loop/65164 "2021-07-23T18:53:16Z")

</div>

Julia is so easy to code from first principles (the real formula-translation deal) that I never venture out of for loops. Every year JuliaCon yanks me out of my dreary yet comfortable existence and shows me all those hal…

---

## [Newton solution from PowerModels.jl](https://discourse.julialang.org/t/newton-solution-from-powermodels-jl/64356)

<div class="topic-metadata">

**Author:** [@Mariana](https://discourse.julialang.org/u/Mariana)\
**Replies:** 11\
**Last updated:** [July 23, 2021, 6:08pm UTC](https://discourse.julialang.org/t/newton-solution-from-powermodels-jl/64356 "2021-07-23T18:08:00Z")

</div>

Hello. I’m using PowerModels.jl to run some power flow studies and I’m interested in comparing the results obtained from the JuMP solution to the Newton solution. In most cases, those results are the same; however, when…

---

## [Upkeeping Julia Community Outreach Social Channels](https://discourse.julialang.org/t/upkeeping-julia-community-outreach-social-channels/65162)

<div class="topic-metadata">

**Author:** [@ntmt2903](https://discourse.julialang.org/u/ntmt2903)\
**Replies:** 1\
**Last updated:** [July 23, 2021, 5:57pm UTC](https://discourse.julialang.org/t/upkeeping-julia-community-outreach-social-channels/65162 "2021-07-23T17:57:33Z")

</div>

Hi, I noticed Julia’s Facebook link (not JuliaCon link) on this Julia page is no longer accessible. Plus, the Julia Pinterest site is quite dusty. Do they need some pruning?

---

## [Polygon exterior and interiors](https://discourse.julialang.org/t/polygon-exterior-and-interiors/65190)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 1\
**Last updated:** [July 23, 2021, 5:25pm UTC](https://discourse.julialang.org/t/polygon-exterior-and-interiors/65190 "2021-07-23T17:25:17Z")

</div>

Hi, I’m using Julia’s GeometryBasics package, and in particular the Polygon class. I can create a square polygon by p=Polygon(\[ \[0,0\],\[1,0\],\[1,1\],\[0,1\],\[0,0\] \]) where p.exterior is a 4-element LineString object contain…

---

## [Probability distribution with complex object support (e.g. \`Tuple{Integer, Matrix}\`)](https://discourse.julialang.org/t/probability-distribution-with-complex-object-support-e-g-tuple-integer-matrix/64964)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 3\
**Last updated:** [July 23, 2021, 5:12pm UTC](https://discourse.julialang.org/t/probability-distribution-with-complex-object-support-e-g-tuple-integer-matrix/64964 "2021-07-23T17:12:59Z")

</div>

The Distributions.jl package has great support for continuous and discrete distributions over scalars, vectors, and matrices. Is it meant to support in any way probability distributions in which sampling would return a m…

---

## [Accessing Internal variables in a function](https://discourse.julialang.org/t/accessing-internal-variables-in-a-function/65194)

<div class="topic-metadata">

**Author:** [@amit1](https://discourse.julialang.org/u/amit1)\
**Replies:** 2\
**Last updated:** [July 23, 2021, 5:06pm UTC](https://discourse.julialang.org/t/accessing-internal-variables-in-a-function/65194 "2021-07-23T17:06:39Z")

</div>

I came across following snippet in Flux tutorial: function linear(in, out) W = randn(out, in) b = randn(out) x -\> W \* x .+ b end linear1 = linear(5, 3) # we can access linear1.W etc linear1.W Here linear1.W can …

---

## [Finding the module of a callsite in the stacktrace](https://discourse.julialang.org/t/finding-the-module-of-a-callsite-in-the-stacktrace/65191)

<div class="topic-metadata">

**Author:** [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Replies:** 0\
**Last updated:** [July 23, 2021, 4:42pm UTC](https://discourse.julialang.org/t/finding-the-module-of-a-callsite-in-the-stacktrace/65191 "2021-07-23T16:42:58Z")

</div>

I want to get an item returned from stacktrace() such that it is the first StackFrame for which getmodule(x) == m where m is some known module. This works: getmodule(x) = nothing getmodule(x::Base.StackTraces.StackFrame…

---

## [Is it possible to dump segfault stack trace from REPL-only crash?](https://discourse.julialang.org/t/is-it-possible-to-dump-segfault-stack-trace-from-repl-only-crash/65172)

<div class="topic-metadata">

**Author:** [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Replies:** 3\
**Last updated:** [July 23, 2021, 4:41pm UTC](https://discourse.julialang.org/t/is-it-possible-to-dump-segfault-stack-trace-from-repl-only-crash/65172 "2021-07-23T16:41:11Z")

</div>

I ran into this issue https://github.com/julia-vscode/julia-vscode/issues/2299 that can only be reproduced in the REPL (one that’s connected to VS Code). I am trying to obtain a useful dump from the segfault following R…

---

## [Iterators over observations/data](https://discourse.julialang.org/t/iterators-over-observations-data/65158)

<div class="topic-metadata">

**Author:** [@stephancb](https://discourse.julialang.org/u/stephancb)\
**Replies:** 1\
**Last updated:** [July 23, 2021, 3:39pm UTC](https://discourse.julialang.org/t/iterators-over-observations-data/65158 "2021-07-23T15:39:32Z")

</div>

Is there a reason why in StatsBase fit(Histogram, obs::AbstractArray, bins,...) does not accept an iterator over the observations? Possible sources of observations are streams, csv files, databases etc. To just bin them…

---

## [Colours in logs](https://discourse.julialang.org/t/colours-in-logs/65181)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 2\
**Last updated:** [July 23, 2021, 3:11pm UTC](https://discourse.julialang.org/t/colours-in-logs/65181 "2021-07-23T15:11:25Z")

</div>

Is there a way to colour part of a string in e.g. @info? similar to what Crayons or printstyled does. I’d like to do something like: information = "some info" @info "A string with $(highlight(information))" thanks in…

---

## [Elegant way to implement a rotating convolution filter without using \`rot90\` etc](https://discourse.julialang.org/t/elegant-way-to-implement-a-rotating-convolution-filter-without-using-rot90-etc/65180)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 0\
**Last updated:** [July 23, 2021, 1:46pm UTC](https://discourse.julialang.org/t/elegant-way-to-implement-a-rotating-convolution-filter-without-using-rot90-etc/65180 "2021-07-23T13:46:34Z")

</div>

I am looking to implement a simple rotational convolutional filter to be used with Flux.jl see post describing the filter deep learning - Does a rotational convolutional filter exist in neural networks? - Data Science St…

---

## [Makie surface and NaN values](https://discourse.julialang.org/t/makie-surface-and-nan-values/65165)

<div class="topic-metadata">

**Author:** [@vettert](https://discourse.julialang.org/u/vettert)\
**Replies:** 9\
**Last updated:** [July 23, 2021, 1:29pm UTC](https://discourse.julialang.org/t/makie-surface-and-nan-values/65165 "2021-07-23T13:29:22Z")

</div>

I am running in some unexpected behavior with GLMakie, surface plots and matrices that contain NaN as a value. My minimum working example below produces the following plots of three different 4 x 4 matrices with differe…

---

## [Include() works, includet() doesn't in CodeOSS sesson](https://discourse.julialang.org/t/include-works-includet-doesnt-in-codeoss-sesson/65171)

<div class="topic-metadata">

**Author:** [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Replies:** 0\
**Last updated:** [July 23, 2021, 12:50pm UTC](https://discourse.julialang.org/t/include-works-includet-doesnt-in-codeoss-sesson/65171 "2021-07-23T12:50:33Z")

</div>

Hi all — can’t tell if this similar to previously reported issues. In CodeOSS, started fresh, simple @ode\_def operation (see ParameterizedFunctions) fails with includet() call but succeeds with include() call. Here’s a …

---

## [Opinions for exporting common names](https://discourse.julialang.org/t/opinions-for-exporting-common-names/64995)

<div class="topic-metadata">

**Author:** [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Replies:** 29\
**Last updated:** [July 23, 2021, 11:38am UTC](https://discourse.julialang.org/t/opinions-for-exporting-common-names/64995 "2021-07-23T11:38:36Z")

</div>

As title says, what are your favourite ways to deal with functions/types which are central to the functionality of a package but for which the best name carry a high risk of collisions? Concrete examples in my case are f…

---

## [Creating multiple sine wave data](https://discourse.julialang.org/t/creating-multiple-sine-wave-data/65130)

<div class="topic-metadata">

**Author:** [@sekarsum](https://discourse.julialang.org/u/sekarsum)\
**Replies:** 3\
**Last updated:** [July 23, 2021, 11:09am UTC](https://discourse.julialang.org/t/creating-multiple-sine-wave-data/65130 "2021-07-23T11:09:28Z")

</div>

Hi I need some help creating multiple sine wave profiles and storing them in arrays. I just need data to test another function and sine data is the most useful. It would be helpful if I could also randomize the sinewave …

---

## [Type inference: are small Unions ok?](https://discourse.julialang.org/t/type-inference-are-small-unions-ok/65155)

<div class="topic-metadata">

**Author:** [@mzgubic](https://discourse.julialang.org/u/mzgubic)\
**Replies:** 3\
**Last updated:** [July 23, 2021, 10:52am UTC](https://discourse.julialang.org/t/type-inference-are-small-unions-ok/65155 "2021-07-23T10:52:37Z")

</div>

I am trying to understand type inference better. My understanding is very basic: knowing the output types from the input types is good, not knowing is bad. I don’t really understand what causes the slowdown. In any case…

---

## [Symbolics.jl substitute limitations](https://discourse.julialang.org/t/symbolics-jl-substitute-limitations/64953)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 11\
**Last updated:** [July 23, 2021, 10:11am UTC](https://discourse.julialang.org/t/symbolics-jl-substitute-limitations/64953 "2021-07-23T10:11:35Z")

</div>

What are the limitations on the Symbolics.substitute command. I wanted to reduce the complexity of hand-code conversions in a symbolic inverse calculation by substituting the elements from the original calculation back …

---

## [Custom Subject in Rocket.jl (for mouse events from GLFW)](https://discourse.julialang.org/t/custom-subject-in-rocket-jl-for-mouse-events-from-glfw/65133)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 2\
**Last updated:** [July 23, 2021, 9:57am UTC](https://discourse.julialang.org/t/custom-subject-in-rocket-jl-for-mouse-events-from-glfw/65133 "2021-07-23T09:57:35Z")

</div>

Hello I am trying to use the Rocket.jl - reactive programming and I do not understand how to create custom Observable/Subject I have an GLFW function that gives back information when user use scroll and in this case pr…

---

## [Creating CLI tools in Julia](https://discourse.julialang.org/t/creating-cli-tools-in-julia/65012)

<div class="topic-metadata">

**Author:** [@satyabrata\_pal](https://discourse.julialang.org/u/satyabrata_pal)\
**Replies:** 6\
**Last updated:** [July 23, 2021, 8:49am UTC](https://discourse.julialang.org/t/creating-cli-tools-in-julia/65012 "2021-07-23T08:49:35Z")

</div>

Hello everyone. I am trying to build CLI tool for my project. Is there any existing library/package in the Julia ecosystem which I can use.

---

## [\[ANN\] VS Code extension 1.2 released](https://discourse.julialang.org/t/ann-vs-code-extension-1-2-released/62118)

<div class="topic-metadata">

**Author:** [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Replies:** 44\
**Last updated:** [July 23, 2021, 8:49am UTC](https://discourse.julialang.org/t/ann-vs-code-extension-1-2-released/62118 "2021-07-23T08:49:16Z")

</div>

Hey everyone, we just released version 1.2 of the Julia extension for VS Code, which brings a bunch of new features, most importantly a new plot navigator, integration for persistent tmux processes, many notable chang…

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

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