# Latest

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

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

**Page:** 1679

---

## [Why use gensym in this particular example](https://discourse.julialang.org/t/why-use-gensym-in-this-particular-example/43733)

<div class="topic-metadata">

**Author:** [@nstgc](https://discourse.julialang.org/u/nstgc)\
**Replies:** 9\
**Last updated:** [July 27, 2020, 3:15pm UTC](https://discourse.julialang.org/t/why-use-gensym-in-this-particular-example/43733 "2020-07-27T15:15:03Z")

</div>

I came across the following macro and don’t quite understand why gensym used. I’m sorry about the poor choice in title, but it was the best I could think of. Also, if this is not the sort of question that should be asked…

---

## [DifferentialEquations and a phase angle variable](https://discourse.julialang.org/t/differentialequations-and-a-phase-angle-variable/43449)

<div class="topic-metadata">

**Author:** [@akhuettel](https://discourse.julialang.org/u/akhuettel)\
**Replies:** 7\
**Last updated:** [July 27, 2020, 2:07pm UTC](https://discourse.julialang.org/t/differentialequations-and-a-phase-angle-variable/43449 "2020-07-27T14:07:39Z")

</div>

Is there a way to use the solver from DifferentialEquations with a phase variable (where only the value within \[0, 2pi\] matters)? The equation system generates a continuously increasing phi, so unless special precaution…

---

## [Understanding the limitations of generated functions](https://discourse.julialang.org/t/understanding-the-limitations-of-generated-functions/43660)

<div class="topic-metadata">

**Author:** [@tisztamo](https://discourse.julialang.org/u/tisztamo)\
**Replies:** 17\
**Last updated:** [July 27, 2020, 12:26pm UTC](https://discourse.julialang.org/t/understanding-the-limitations-of-generated-functions/43660 "2020-07-27T12:26:23Z")

</div>

The docs says: Generated functions must not mutate or observe any non-constant global state (including, for example, IO, locks, non-local dictionaries, or using hasmethod ). This means they can only read global c…

---

## [Which JuMP.jl solver for this problem?](https://discourse.julialang.org/t/which-jump-jl-solver-for-this-problem/43350)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 19\
**Last updated:** [July 27, 2020, 12:04pm UTC](https://discourse.julialang.org/t/which-jump-jl-solver-for-this-problem/43350 "2020-07-27T12:04:53Z")

</div>

I’ve been struggling for a couple of days now to coerce JuMP to solve a particular problem. The goal is fairly simple and I’ll describe a simplified version of my real problem here, along with the code: Given the latitu…

---

## [Need help understanding how to run a for loop in parallel](https://discourse.julialang.org/t/need-help-understanding-how-to-run-a-for-loop-in-parallel/43739)

<div class="topic-metadata">

**Author:** [@iamanoob](https://discourse.julialang.org/u/iamanoob)\
**Replies:** 2\
**Last updated:** [July 27, 2020, 11:54am UTC](https://discourse.julialang.org/t/need-help-understanding-how-to-run-a-for-loop-in-parallel/43739 "2020-07-27T11:54:15Z")

</div>

Hello, I am writing a huge program and given the amount of time required to perform the whole thing, i would like to use some parallel computation, however, i don’t understand how to implement it. let’s say i have this…

---

## [Using XY in module Main conflicts with an existing identifier - proper way of loading modules in REPL?](https://discourse.julialang.org/t/using-xy-in-module-main-conflicts-with-an-existing-identifier-proper-way-of-loading-modules-in-repl/43729)

<div class="topic-metadata">

**Author:** [@SEnergy](https://discourse.julialang.org/u/SEnergy)\
**Replies:** 7\
**Last updated:** [July 27, 2020, 11:48am UTC](https://discourse.julialang.org/t/using-xy-in-module-main-conflicts-with-an-existing-identifier-proper-way-of-loading-modules-in-repl/43729 "2020-07-27T11:48:44Z")

</div>

I’ve been learning Julia primarily by writing some Evolutionary Algo code, I started ~1 year ago, when I wrote my first, very simple, very primitive EA lib which I decided to re-write after a year (haven’t touched Julia …

---

## [How to configure a colormap using PyPlot](https://discourse.julialang.org/t/how-to-configure-a-colormap-using-pyplot/43746)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 3\
**Last updated:** [July 27, 2020, 11:36am UTC](https://discourse.julialang.org/t/how-to-configure-a-colormap-using-pyplot/43746 "2020-07-27T11:36:21Z")

</div>

I am trying to set the default colormap using PyPlot, but the colors are still the default colors. Here’s a MWE using PyPlot PyPlot.matplotlib.rc("image",cmap="gray") fig, ax = subplots() x = 1:0.1:10 y = exp.(x/π)…

---

## [JuliaCon Feedback day 1 workshops](https://discourse.julialang.org/t/juliacon-feedback-day-1-workshops/43625)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 3\
**Last updated:** [July 27, 2020, 7:38am UTC](https://discourse.julialang.org/t/juliacon-feedback-day-1-workshops/43625 "2020-07-27T07:38:27Z")

</div>

Hey all, Just wanted to get some feedback from day one of the workshops. If you have any thoughts or things that can be improved as the conference goes on, feel free to drop a thread below. (Please keep comments constru…

---

## [Is there a way to find nunique and nmissing values for an integer column?](https://discourse.julialang.org/t/is-there-a-way-to-find-nunique-and-nmissing-values-for-an-integer-column/43721)

<div class="topic-metadata">

**Author:** [@Mrinalini\_madhusudan](https://discourse.julialang.org/u/Mrinalini_madhusudan)\
**Replies:** 3\
**Last updated:** [July 27, 2020, 7:20am UTC](https://discourse.julialang.org/t/is-there-a-way-to-find-nunique-and-nmissing-values-for-an-integer-column/43721 "2020-07-27T07:20:17Z")

</div>

I understand computing metrics like nmissing and nunique in describe() is avoided to save the performance issue. But is there any other way that these metrics can be computed?

---

## [Automerge/decision — New package: ERROR: LoadError: UndefVarError: include not defined](https://discourse.julialang.org/t/automerge-decision-new-package-error-loaderror-undefvarerror-include-not-defined/43730)

<div class="topic-metadata">

**Author:** [@Clark\_Cruz](https://discourse.julialang.org/u/Clark_Cruz)\
**Replies:** 1\
**Last updated:** [July 27, 2020, 5:17am UTC](https://discourse.julialang.org/t/automerge-decision-new-package-error-loaderror-undefvarerror-include-not-defined/43730 "2020-07-27T05:17:07Z")

</div>

hi I am creating my first Julia package. I am registering it using JuliaHub The automerge/decision — New package, Failed with the error below. include is part of the Julia language. Thus, I do not understand the reas…

---

## [Parsing selection syntax](https://discourse.julialang.org/t/parsing-selection-syntax/43632)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 12\
**Last updated:** [July 27, 2020, 1:05am UTC](https://discourse.julialang.org/t/parsing-selection-syntax/43632 "2020-07-27T01:05:07Z")

</div>

My question is not exclusively about Julia, but Julia is one language in which I see a possible solution. What I want is to implement a natural syntax to select items from a list (actually atoms from a molecular system)…

---

## [Functions in a loop over string array usually returns nothing](https://discourse.julialang.org/t/functions-in-a-loop-over-string-array-usually-returns-nothing/43689)

<div class="topic-metadata">

**Author:** [@nstgc](https://discourse.julialang.org/u/nstgc)\
**Replies:** 3\
**Last updated:** [July 26, 2020, 12:38pm UTC](https://discourse.julialang.org/t/functions-in-a-loop-over-string-array-usually-returns-nothing/43689 "2020-07-26T12:38:21Z")

</div>

I’m not sure the best way to summarize this (hence the bad title), but I have a list of directions (a string array) and I want to do something with them. First I make a function to generate the list function list\_dirs()…

---

## [Reviewing old issues](https://discourse.julialang.org/t/reviewing-old-issues/43709)

<div class="topic-metadata">

**Author:** [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Replies:** 5\
**Last updated:** [July 26, 2020, 9:49pm UTC](https://discourse.julialang.org/t/reviewing-old-issues/43709 "2020-07-26T21:49:41Z")

</div>

There are almost 3k issues open in Julia’s GitHub repository: https://github.com/JuliaLang/julia/issues Taking a glance at those, it got me wondering. Has there been a sustained effort to review old issues and close th…

---

## [Juniper...Solver gets only local optimum point](https://discourse.julialang.org/t/juniper-solver-gets-only-local-optimum-point/43676)

<div class="topic-metadata">

**Author:** [@mayar](https://discourse.julialang.org/u/mayar)\
**Replies:** 10\
**Last updated:** [July 26, 2020, 8:53pm UTC](https://discourse.julialang.org/t/juniper-solver-gets-only-local-optimum-point/43676 "2020-07-26T20:53:35Z")

</div>

Hello there, Congratulations on the amazing conference of 2020 at first…Let me tell you my problem briefly I have a non convex NLP (OPF or Optimal Power Flow) and I want to try different solvers on this problem. I deci…

---

## [Question mark provides help when launching from REPL but not from ATOM notebook](https://discourse.julialang.org/t/question-mark-provides-help-when-launching-from-repl-but-not-from-atom-notebook/43509)

<div class="topic-metadata">

**Author:** [@Nike\_Gap](https://discourse.julialang.org/u/Nike_Gap)\
**Replies:** 2\
**Last updated:** [July 26, 2020, 7:39pm UTC](https://discourse.julialang.org/t/question-mark-provides-help-when-launching-from-repl-but-not-from-atom-notebook/43509 "2020-07-26T19:39:22Z")

</div>

The question mark provides help when launching from REPL. Example: help?\> ? search: Welcome to Julia 1.4.2. The full manual is available at… The question mark does NOT provide help when launching from ATOM notebook. …

---

## [Package versions, how to make it less confusing?](https://discourse.julialang.org/t/package-versions-how-to-make-it-less-confusing/43714)

<div class="topic-metadata">

**Author:** [@joaquimg](https://discourse.julialang.org/u/joaquimg)\
**Replies:** 2\
**Last updated:** [July 26, 2020, 7:04pm UTC](https://discourse.julialang.org/t/package-versions-how-to-make-it-less-confusing/43714 "2020-07-26T19:04:25Z")

</div>

I have been answering some discourse posts where newcomers have some trouble managing package versions. They add a package and it does not do whatever the readme states. A possible change in Pkg, could be: Once you ad…

---

## [Manual port forwarding to use REPL](https://discourse.julialang.org/t/manual-port-forwarding-to-use-repl/43711)

<div class="topic-metadata">

**Author:** [@SambitMishra98](https://discourse.julialang.org/u/SambitMishra98)\
**Replies:** 10\
**Last updated:** [July 26, 2020, 5:09pm UTC](https://discourse.julialang.org/t/manual-port-forwarding-to-use-repl/43711 "2020-07-26T17:09:48Z")

</div>

I am presently trying to use Atom editor to connect to a remote desktop server. I used the instructions from the link https://docs.junolab.org/latest/man/remote/. I was successfully able to use ftp-remote-edit to remotel…

---

## [Adding a new function to the PowerModelsAnnex](https://discourse.julialang.org/t/adding-a-new-function-to-the-powermodelsannex/43634)

<div class="topic-metadata">

**Author:** [@Rasoul](https://discourse.julialang.org/u/Rasoul)\
**Replies:** 5\
**Last updated:** [July 26, 2020, 4:37pm UTC](https://discourse.julialang.org/t/adding-a-new-function-to-the-powermodelsannex/43634 "2020-07-26T16:37:50Z")

</div>

Hi all, I have written a function, i.e, sdp\_opf, to solve the OPF problem via SDP relaxation which exports the build\_sdp\_opf. However, when I want to run my code via build\_sdp\_opf(case,model) I get the following error…

---

## [Why do I get Infeasible Solution (JuMP with Optimizer Ipopt)](https://discourse.julialang.org/t/why-do-i-get-infeasible-solution-jump-with-optimizer-ipopt/43141)

<div class="topic-metadata">

**Author:** [@mayar](https://discourse.julialang.org/u/mayar)\
**Replies:** 31\
**Last updated:** [July 26, 2020, 4:36pm UTC](https://discourse.julialang.org/t/why-do-i-get-infeasible-solution-jump-with-optimizer-ipopt/43141 "2020-07-26T16:36:41Z")

</div>

hello, I have developed a code that optimizes a power system and then I find that JuMP return infeasible solution My constraints are non linear and my objective is non linear too Am I utilizing the wrong solver or wh…

---

## [When should a function accept a symbol as an argument?](https://discourse.julialang.org/t/when-should-a-function-accept-a-symbol-as-an-argument/43510)

<div class="topic-metadata">

**Author:** [@clarkfitzg](https://discourse.julialang.org/u/clarkfitzg)\
**Replies:** 40\
**Last updated:** [July 26, 2020, 4:17pm UTC](https://discourse.julialang.org/t/when-should-a-function-accept-a-symbol-as-an-argument/43510 "2020-07-26T16:17:01Z")

</div>

I stumbled across two situations where functions accept symbols as arguments, and wonder why they are designed that way. What advantages are there to using symbols? When should I write functions that accept symbols inste…

---

## [Turing fitting a Weibull model](https://discourse.julialang.org/t/turing-fitting-a-weibull-model/43693)

<div class="topic-metadata">

**Author:** [@ekidando20](https://discourse.julialang.org/u/ekidando20)\
**Replies:** 7\
**Last updated:** [July 26, 2020, 2:52pm UTC](https://discourse.julialang.org/t/turing-fitting-a-weibull-model/43693 "2020-07-26T14:52:06Z")

</div>

I am trying to fit a Weibull distribution in Turing. Sometimes when I rerun the model I get the following error. Any suggestions to avoid above error? I am also getting a similar error when I fit a regression model (…

---

## [JuMP development sprints](https://discourse.julialang.org/t/jump-development-sprints/42433)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 5\
**Last updated:** [July 26, 2020, 2:42pm UTC](https://discourse.julialang.org/t/jump-development-sprints/42433 "2020-07-26T14:42:59Z")

</div>

Edit: Please read this Google doc, which has all the information. Dear all, Ever wanted to contribute to JuMP but not known where to start? Now’s your chance! Over the next few months, we will be holding a series of …

---

## [StackOverflowError vs ulimit -s](https://discourse.julialang.org/t/stackoverflowerror-vs-ulimit-s/43395)

<div class="topic-metadata">

**Author:** [@recri](https://discourse.julialang.org/u/recri)\
**Replies:** 8\
**Last updated:** [July 26, 2020, 12:08pm UTC](https://discourse.julialang.org/t/stackoverflowerror-vs-ulimit-s/43395 "2020-07-26T12:08:23Z")

</div>

I am computing a recursive function which overflows the stack for some argument values. Somewhere I heard that julia on linux uses the system stack size as set by ulimit -s. So why do these two computations, one with u…

---

## [Printing from a task](https://discourse.julialang.org/t/printing-from-a-task/43698)

<div class="topic-metadata">

**Author:** [@pbayer](https://discourse.julialang.org/u/pbayer)\
**Replies:** 1\
**Last updated:** [July 26, 2020, 9:57am UTC](https://discourse.julialang.org/t/printing-from-a-task/43698 "2020-07-26T09:57:38Z")

</div>

In testing my package I have problems to print from an asynchronous task to the REPL. Here is a MWE: struct Msg a b end function tpr(ch::Channel) while true msg = take!(ch) if msg isa Msg …

---

## [Gradient through categorical distribution slow and has many allocations](https://discourse.julialang.org/t/gradient-through-categorical-distribution-slow-and-has-many-allocations/43690)

<div class="topic-metadata">

**Author:** [@scottjordan](https://discourse.julialang.org/u/scottjordan)\
**Replies:** 0\
**Last updated:** [July 26, 2020, 1:21am UTC](https://discourse.julialang.org/t/gradient-through-categorical-distribution-slow-and-has-many-allocations/43690 "2020-07-26T01:21:18Z")

</div>

I am trying have performant gradients computations for a function the defines a conditional distribution over a discrete space. More specifically, I want the gradient of the following function: import Flux import Zygote…

---

## [Vector of Contiguous Booleans to Vector of Unit Ranges](https://discourse.julialang.org/t/vector-of-contiguous-booleans-to-vector-of-unit-ranges/43674)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 14\
**Last updated:** [July 25, 2020, 10:36pm UTC](https://discourse.julialang.org/t/vector-of-contiguous-booleans-to-vector-of-unit-ranges/43674 "2020-07-25T22:36:33Z")

</div>

So consider the following vector: \[true true, false, true, true , false\] we would want the code to return \[1:2,3:3,4:5,6:6\] or: \[true true, true, true, true, false\] → \[1:5, 6:6\] Basically its a groupby or chunk operati…

---

## [Updating Makie subscene mouse click limits when zooming and panning](https://discourse.julialang.org/t/updating-makie-subscene-mouse-click-limits-when-zooming-and-panning/43680)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 0\
**Last updated:** [July 25, 2020, 9:38pm UTC](https://discourse.julialang.org/t/updating-makie-subscene-mouse-click-limits-when-zooming-and-panning/43680 "2020-07-25T21:38:37Z")

</div>

This example: using Makie, Random scene = Scene(resolution = (1200, 1500)) scene1 = Scene(scene, IRect(0, 0, 1200, 900)) image = rand(1:4, 640, 480) imagenode = Node(image) image!(scene1, imagenode, scale\_plot = false…

---

## [Slower code after migrating from MathProgBase](https://discourse.julialang.org/t/slower-code-after-migrating-from-mathprogbase/43650)

<div class="topic-metadata">

**Author:** [@josePereiro](https://discourse.julialang.org/u/josePereiro)\
**Replies:** 10\
**Last updated:** [July 25, 2020, 8:04pm UTC](https://discourse.julialang.org/t/slower-code-after-migrating-from-mathprogbase/43650 "2020-07-25T20:04:27Z")

</div>

Hi, after updating some packages I got this error: \`ClpSolver\` is no longer supported. If you are using JuMP, upgrade to the latest version and use \`Clp.Optimizer\` instead. If you are using MathProgBase (e.g., via \`lin…

---

## [Indexing an array with rounded array of floating point indexes](https://discourse.julialang.org/t/indexing-an-array-with-rounded-array-of-floating-point-indexes/43639)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 5\
**Last updated:** [July 25, 2020, 5:46pm UTC](https://discourse.julialang.org/t/indexing-an-array-with-rounded-array-of-floating-point-indexes/43639 "2020-07-25T17:46:48Z")

</div>

I have: a = rand(Int32, 10, 10) i = Float32\[8.47, 8.47\] and I want access an element e of a using rounded values in i as 2D index. Is there a more concise way of doing it than: j = Int.(round.(i)) e = a\[j\[1\], j\[2\]\]

---

## [Question on composite types](https://discourse.julialang.org/t/question-on-composite-types/43661)

<div class="topic-metadata">

**Author:** [@janrpeters](https://discourse.julialang.org/u/janrpeters)\
**Replies:** 4\
**Last updated:** [July 25, 2020, 5:45pm UTC](https://discourse.julialang.org/t/question-on-composite-types/43661 "2020-07-25T17:45:59Z")

</div>

Is there a method that returns Float64 if given the composite type Point{Float64} ? is

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

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