# Latest

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

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

**Page:** 1376

---

## [What is an idiomatic Julia code for file I/O with exceptions handled?](https://discourse.julialang.org/t/what-is-an-idiomatic-julia-code-for-file-i-o-with-exceptions-handled/3361)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 9\
**Last updated:** [May 31, 2021, 9:51am UTC](https://discourse.julialang.org/t/what-is-an-idiomatic-julia-code-for-file-i-o-with-exceptions-handled/3361 "2021-05-31T09:51:52Z")

</div>

What is an idiomatic Julia code for tryOpen function below, which tests if 2 files can be opened and handles all exceptions? I’m looking for code replacing the comments or totally different code structure, if needed. fu…

---

## [How to create a node graph editor?](https://discourse.julialang.org/t/how-to-create-a-node-graph-editor/62122)

<div class="topic-metadata">

**Author:** [@JosePereiraUA](https://discourse.julialang.org/u/JosePereiraUA)\
**Replies:** 0\
**Last updated:** [May 31, 2021, 9:47am UTC](https://discourse.julialang.org/t/how-to-create-a-node-graph-editor/62122 "2021-05-31T09:47:46Z")

</div>

Hi, I’m looking for a package (or set of packages) that allow me to create a node graph editor, something like this: So far, the closest package I found was the ClmGui.jl package, a wrapper around Dear ImGui. This C+…

---

## [Sub-sample array until a target number of unique elements is left](https://discourse.julialang.org/t/sub-sample-array-until-a-target-number-of-unique-elements-is-left/61981)

<div class="topic-metadata">

**Author:** [@mlanghinrichs](https://discourse.julialang.org/u/mlanghinrichs)\
**Replies:** 18\
**Last updated:** [May 31, 2021, 9:47am UTC](https://discourse.julialang.org/t/sub-sample-array-until-a-target-number-of-unique-elements-is-left/61981 "2021-05-31T09:47:31Z")

</div>

Hey! I’m in need of a fast method that uniformly subsamples the elements of a given array until only a specified number of unique elements is left. For example input array=\[4,1,2,2,4\] and target\_unique\_el=2, then the (r…

---

## [How to use pmap with DrWatson](https://discourse.julialang.org/t/how-to-use-pmap-with-drwatson/61976)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 11\
**Last updated:** [May 31, 2021, 9:29am UTC](https://discourse.julialang.org/t/how-to-use-pmap-with-drwatson/61976 "2021-05-31T09:29:15Z")

</div>

I am using the great package DrWatson and I am trying to work with pmap. My project is also a package, and I am trying to use @everywhere to let the workers know about the function I am trying to run. The problem is th…

---

## [What's wrong with my code that it's figure is not matched with simulation](https://discourse.julialang.org/t/whats-wrong-with-my-code-that-its-figure-is-not-matched-with-simulation/62104)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 2\
**Last updated:** [May 31, 2021, 9:33am UTC](https://discourse.julialang.org/t/whats-wrong-with-my-code-that-its-figure-is-not-matched-with-simulation/62104 "2021-05-31T09:33:34Z")

</div>

Dear friends. I am a newbie and I asked many questions to simulate a full-bridge rectifier through ACME.jl and the circuit is as follows: and the current is as follows my code using ACME.jl package in julia as fo…

---

## [Updating extremly slow today](https://discourse.julialang.org/t/updating-extremly-slow-today/62112)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [May 31, 2021, 8:51am UTC](https://discourse.julialang.org/t/updating-extremly-slow-today/62112 "2021-05-31T08:51:03Z")

</div>

Updating my packages is extremely slow today. My internet connection is fine, no proxy. I am on Linux. Any idea how to debug this? It would be nice if the package manager could print some more debug information, for exa…

---

## [Overcoming "BoundsError: attempt to access 0-element Vector{HTMLNode} at index \[1\]" during a webscrape](https://discourse.julialang.org/t/overcoming-boundserror-attempt-to-access-0-element-vector-htmlnode-at-index-1-during-a-webscrape/62102)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 3\
**Last updated:** [May 31, 2021, 8:22am UTC](https://discourse.julialang.org/t/overcoming-boundserror-attempt-to-access-0-element-vector-htmlnode-at-index-1-during-a-webscrape/62102 "2021-05-31T08:22:27Z")

</div>

In the process of scraping data from a website, I use the following line of code: a = eachmatch(Selector(".rank\_view"), h.root)\[1\] However, occasionally, the line throws the following error: BoundsError: attempt to ac…

---

## [ERROR: LoadError: PyError ($(Expr(:escape, :(ccall(#=](https://discourse.julialang.org/t/error-loaderror-pyerror-expr-escape-ccall/61866)

<div class="topic-metadata">

**Author:** [@Redmusk888](https://discourse.julialang.org/u/Redmusk888)\
**Replies:** 2\
**Last updated:** [May 31, 2021, 6:36am UTC](https://discourse.julialang.org/t/error-loaderror-pyerror-expr-escape-ccall/61866 "2021-05-31T06:36:21Z")

</div>

i was trying to learn how make some plots with .xlxs files ,and i getting the following Error for PyCall and am on JuliaPro\_v1.5.4-1 here is the video i learn form https://youtu.be/W5x9ocr2Wo8 and here is the error； …

---

## [Multiple nested module inclusion](https://discourse.julialang.org/t/multiple-nested-module-inclusion/62089)

<div class="topic-metadata">

**Author:** [@kalcool](https://discourse.julialang.org/u/kalcool)\
**Replies:** 5\
**Last updated:** [May 31, 2021, 6:35am UTC](https://discourse.julialang.org/t/multiple-nested-module-inclusion/62089 "2021-05-31T06:35:03Z")

</div>

Hi there, I am trying to build linked structures, which refer to each other, or to nothing/null, as you would do with pointers in C. In order to do this I am using abstract types and parametric structs in order to break…

---

## [Nteract not opening Julia Academy notebooks?](https://discourse.julialang.org/t/nteract-not-opening-julia-academy-notebooks/62031)

<div class="topic-metadata">

**Author:** [@prospector](https://discourse.julialang.org/u/prospector)\
**Replies:** 6\
**Last updated:** [May 31, 2021, 6:29am UTC](https://discourse.julialang.org/t/nteract-not-opening-julia-academy-notebooks/62031 "2021-05-31T06:29:27Z")

</div>

I’m just getting started with Julia and am trying to go through some of the notebooks associated with the Julia Academy courses. I have nteract installed and working, and I’ve downloaded a few of the starter notebooks f…

---

## [How to plot a function returns multiple values?](https://discourse.julialang.org/t/how-to-plot-a-function-returns-multiple-values/62086)

<div class="topic-metadata">

**Author:** [@y-iizawa](https://discourse.julialang.org/u/y-iizawa)\
**Replies:** 7\
**Last updated:** [May 31, 2021, 6:16am UTC](https://discourse.julialang.org/t/how-to-plot-a-function-returns-multiple-values/62086 "2021-05-31T06:16:41Z")

</div>

Now I have a function: function f(x) return sin(x),cos(x),tan(x) end that reruns multiple values, sin(x),cos(x),tan(x). I want to plot each value: xs = range(-π,π,length = 10) plot(xs,f.(xs)\[1\]) plot(xs,f.(xs)\[2\]…

---

## [BatchNorm: only track\_stats=true supported on gpu](https://discourse.julialang.org/t/batchnorm-only-track-stats-true-supported-on-gpu/62091)

<div class="topic-metadata">

**Author:** [@ymtoo](https://discourse.julialang.org/u/ymtoo)\
**Replies:** 3\
**Last updated:** [May 31, 2021, 5:17am UTC](https://discourse.julialang.org/t/batchnorm-only-track-stats-true-supported-on-gpu/62091 "2021-05-31T05:17:30Z")

</div>

Not able to use BatchNorm with track\_stats=false on GPU. julia\> using Flux julia\> model = Chain(Dense(10,5),BatchNorm(5,relu; track\_stats=false)) Chain(Dense(10, 5), BatchNorm(5, relu)) julia\> modelgpu = gpu(model) Ch…

---

## [How to plot a graph with labels for vertices?](https://discourse.julialang.org/t/how-to-plot-a-graph-with-labels-for-vertices/62106)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 2\
**Last updated:** [May 31, 2021, 4:33am UTC](https://discourse.julialang.org/t/how-to-plot-a-graph-with-labels-for-vertices/62106 "2021-05-31T04:33:00Z")

</div>

I am trying to do use LightGraphs.jl to plot some graphs which is ok but I want t label the vertices and edges too. I have used MetaGraphs to add metadata to each edge but I can’t seem to find a way to plot the graph wi…

---

## [IDE for Julia](https://discourse.julialang.org/t/ide-for-julia/61931)

<div class="topic-metadata">

**Author:** [@AndreaPi](https://discourse.julialang.org/u/AndreaPi)\
**Replies:** 19\
**Last updated:** [May 31, 2021, 4:25am UTC](https://discourse.julialang.org/t/ide-for-julia/61931 "2021-05-31T04:25:08Z")

</div>

Hi, I’m a complete Julia beginner. I just downloaded Julia 1.6.1 and I’d like to move my first steps with the language. My first task will be integrating the heat equation in a simple 2D domain (I’ll write a separate qu…

---

## [Formatting xticks in plotlyJS](https://discourse.julialang.org/t/formatting-xticks-in-plotlyjs/62065)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 7\
**Last updated:** [May 30, 2021, 9:50pm UTC](https://discourse.julialang.org/t/formatting-xticks-in-plotlyjs/62065 "2021-05-30T21:50:40Z")

</div>

Hi. I have a long time series comprising 238 quarterly observations (1960.Q1-2019.Q2)). I want to produce a simple time series plot using PlotlyJS.jl to benefit from interactivity. However, I have a problem with the x-ax…

---

## [What am I doing wrong in this array comprehension?](https://discourse.julialang.org/t/what-am-i-doing-wrong-in-this-array-comprehension/62016)

<div class="topic-metadata">

**Author:** [@stephenjfox](https://discourse.julialang.org/u/stephenjfox)\
**Replies:** 5\
**Last updated:** [May 30, 2021, 9:06pm UTC](https://discourse.julialang.org/t/what-am-i-doing-wrong-in-this-array-comprehension/62016 "2021-05-30T21:06:37Z")

</div>

In the midst of writing some ring arithmetic code, I found my Julia session producing very strange results for an element-wise modulo operation. v = collect(1:20) \[(i, n) for i=1:20, n=(v .^2 .% 17) if i == n\] # produce…

---

## [I have problem with sampling Frequency when I use ACME.jl](https://discourse.julialang.org/t/i-have-problem-with-sampling-frequency-when-i-use-acme-jl/62082)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 7\
**Last updated:** [May 30, 2021, 8:12pm UTC](https://discourse.julialang.org/t/i-have-problem-with-sampling-frequency-when-i-use-acme-jl/62082 "2021-05-30T20:12:04Z")

</div>

Dear friends, I am simulating a simple electrical circuit in EMTP-RV software which is used in electrical engineering as follows: and the voltage waveform of resistor is as follows: now I just used ACME.jl packag…

---

## [How to find token for Pluto running on a remote server?](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056)

<div class="topic-metadata">

**Author:** [@yingqiuz](https://discourse.julialang.org/u/yingqiuz)\
**Replies:** 5\
**Last updated:** [May 30, 2021, 7:19pm UTC](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056 "2021-05-30T19:19:30Z")

</div>

Hi I am trying to run Pluto.run(port=1235) on a remote server. And the output showed Go to http://localhost:1235/?secret=gMCHSxJl in your browser to start writing ~ have fun! After I built the tunnel and tried to conn…

---

## [String as a variable name](https://discourse.julialang.org/t/string-as-a-variable-name/2195)

<div class="topic-metadata">

**Author:** [@Aaron1488](https://discourse.julialang.org/u/Aaron1488)\
**Replies:** 27\
**Last updated:** [May 30, 2021, 6:46pm UTC](https://discourse.julialang.org/t/string-as-a-variable-name/2195 "2021-05-30T18:46:02Z")

</div>

How can I convert a string to variable name an assign some value to this variable? In R I use assign() function for this, but I was not able to find its equivalent in Julia.

---

## [Understanding Our Contributors - NumFOCUS survey - We Value your Input](https://discourse.julialang.org/t/understanding-our-contributors-numfocus-survey-we-value-your-input/61831)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 3\
**Last updated:** [May 30, 2021, 5:53pm UTC](https://discourse.julialang.org/t/understanding-our-contributors-numfocus-survey-we-value-your-input/61831 "2021-05-30T17:53:17Z")

</div>

Hey folks! The Julia Language Project is participating in a research project being conducted by NumFOCUS, our fiscal sponsorship organization. The research is looking into understanding the diversity, inclusion and barr…

---

## [Flux: reproducibility of GPU experiments](https://discourse.julialang.org/t/flux-reproducibility-of-gpu-experiments/62092)

<div class="topic-metadata">

**Author:** [@Rasmus\_Hoier](https://discourse.julialang.org/u/Rasmus_Hoier)\
**Replies:** 1\
**Last updated:** [May 30, 2021, 5:41pm UTC](https://discourse.julialang.org/t/flux-reproducibility-of-gpu-experiments/62092 "2021-05-30T17:41:00Z")

</div>

When I run the Flux model-zoo’s conv\_mnist.jl example there is an argument “seed” which should assure reproducibility (when larger than 0 ). This seems to only work when performing experiments on CPU, whereas GPU experim…

---

## [How do method definitions work inside functions?](https://discourse.julialang.org/t/how-do-method-definitions-work-inside-functions/62055)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 2\
**Last updated:** [May 30, 2021, 4:07pm UTC](https://discourse.julialang.org/t/how-do-method-definitions-work-inside-functions/62055 "2021-05-30T16:07:46Z")

</div>

I’m trying to understand how method definitions work inside functions. (Is this mentioned anywhere in the documentation?) From this post I learned that all method definitions for a given local function f are combined to …

---

## [I have the problem with frequency sampling](https://discourse.julialang.org/t/i-have-the-problem-with-frequency-sampling/62090)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 0\
**Last updated:** [May 30, 2021, 1:37pm UTC](https://discourse.julialang.org/t/i-have-the-problem-with-frequency-sampling/62090 "2021-05-30T13:37:09Z")

</div>

Dear friends, I simulated a full-bridge rectifier in EMTP-RV and the layout as well as current waveforms passing through diode 1 are as follows: while when I wrote the code by using ACME.jl package in julia as f…

---

## [Plots.jl series with only errorbars?](https://discourse.julialang.org/t/plots-jl-series-with-only-errorbars/62053)

<div class="topic-metadata">

**Author:** [@pdubya](https://discourse.julialang.org/u/pdubya)\
**Replies:** 2\
**Last updated:** [May 30, 2021, 1:06pm UTC](https://discourse.julialang.org/t/plots-jl-series-with-only-errorbars/62053 "2021-05-30T13:06:57Z")

</div>

Is it possible to make a plot with only error bars using Plots.jl? Alternatively, is it possible to style the errorbars independent of the associate :path or :scatter series? basically want x = collect(1:5); y = 5\*x; …

---

## [Makie.jl keyboard events](https://discourse.julialang.org/t/makie-jl-keyboard-events/62083)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [May 30, 2021, 11:51am UTC](https://discourse.julialang.org/t/makie-jl-keyboard-events/62083 "2021-05-30T11:51:09Z")

</div>

Hello, I would like to react on keyboard events in a GLMakie based app, but the way suggested in the documentation does not work: on(events(fig).keyboardbutton) do event if event.action in (Keyboard.press, Keyboard…

---

## [Julia fn clearer than C++/Fortran (examples sought)](https://discourse.julialang.org/t/julia-fn-clearer-than-c-fortran-examples-sought/50739)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 38\
**Last updated:** [May 30, 2021, 11:20am UTC](https://discourse.julialang.org/t/julia-fn-clearer-than-c-fortran-examples-sought/50739 "2021-05-30T11:20:47Z")

</div>

As part of an explanation of Julia’s import in facilitating & speeding the process of bringing someone on into an ongoing larger project and getting them up to speed, I am looking for examples of the same function writt…

---

## [Obtaining a numeric value for "number of users" or downloads for grant applications and stuff](https://discourse.julialang.org/t/obtaining-a-numeric-value-for-number-of-users-or-downloads-for-grant-applications-and-stuff/62078)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 1\
**Last updated:** [May 30, 2021, 10:17am UTC](https://discourse.julialang.org/t/obtaining-a-numeric-value-for-number-of-users-or-downloads-for-grant-applications-and-stuff/62078 "2021-05-30T10:17:25Z")

</div>

Hello there, Let’s say I have developed some packages which I can collect in a vector of UUIDS: packages = \[ "634d3b9d-ee7a-5ddf-bec9-22491ea816e1", "61744808-ddfa-5f27-97ff-6e42cc95d634", \] What I’d like to d…

---

## [Default constructor does not show up from methodswith](https://discourse.julialang.org/t/default-constructor-does-not-show-up-from-methodswith/62064)

<div class="topic-metadata">

**Author:** [@endremborza](https://discourse.julialang.org/u/endremborza)\
**Replies:** 2\
**Last updated:** [May 30, 2021, 10:17am UTC](https://discourse.julialang.org/t/default-constructor-does-not-show-up-from-methodswith/62064 "2021-05-30T10:17:50Z")

</div>

can’t really describe it in more detail than what is in the title, here is an example: struct A end struct B a::A end println("finds constructor with A param:") B |\> methods |\> println println("does not findconstr…

---

## [Installing juno in atom](https://discourse.julialang.org/t/installing-juno-in-atom/62032)

<div class="topic-metadata">

**Author:** [@Deepa](https://discourse.julialang.org/u/Deepa)\
**Replies:** 2\
**Last updated:** [May 30, 2021, 9:08am UTC](https://discourse.julialang.org/t/installing-juno-in-atom/62032 "2021-05-30T09:08:13Z")

</div>

Hi All, Kindly excuse me if this is not the right place to post this question I am trying to install juno in atom and I am facing the following error /lib64/libstdc++.so.6: version \`CXXABI\_1.3.9' not found (required b…

---

## [Help with Bayesian Latent Variable Model](https://discourse.julialang.org/t/help-with-bayesian-latent-variable-model/61651)

<div class="topic-metadata">

**Author:** [@michielver](https://discourse.julialang.org/u/michielver)\
**Replies:** 2\
**Last updated:** [May 30, 2021, 8:37am UTC](https://discourse.julialang.org/t/help-with-bayesian-latent-variable-model/61651 "2021-05-30T08:37:14Z")

</div>

Hi everyone, I am currently running into some issues with a Latent Variable Model I am trying to set up. I already simplified the model a few times, because I first want to get the simplest idea working and then build u…

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

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