# Latest

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

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

**Page:** 1884

---

## [Why can't I define a macro within a macro and call it?](https://discourse.julialang.org/t/why-cant-i-define-a-macro-within-a-macro-and-call-it/31025)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 1\
**Last updated:** [November 13, 2019, 2:14am UTC](https://discourse.julialang.org/t/why-cant-i-define-a-macro-within-a-macro-and-call-it/31025 "2019-11-13T02:14:43Z")

</div>

macro mm(T) quote macro kk() :(println("A")) |\> esc end @kk end |\> esc end julia\> @macroexpand @mm Int ERROR: LoadError: Unde…

---

## [Multi-threaded producer - consumer with threads for leading data](https://discourse.julialang.org/t/multi-threaded-producer-consumer-with-threads-for-leading-data/30732)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 16\
**Last updated:** [November 13, 2019, 1:37am UTC](https://discourse.julialang.org/t/multi-threaded-producer-consumer-with-threads-for-leading-data/30732 "2019-11-13T01:37:33Z")

</div>

Dear All, in my training loop of a ML model, I have to iterate over large set of samples which does not fit to the memory. Have anyone tried a producer-consumer model with threads, such that data can be prepared while g…

---

## [DifferentialEquations -- what goes wrong?](https://discourse.julialang.org/t/differentialequations-what-goes-wrong/30960)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 14\
**Last updated:** [November 13, 2019, 12:11am UTC](https://discourse.julialang.org/t/differentialequations-what-goes-wrong/30960 "2019-11-13T00:11:05Z")

</div>

I have solved a PDE successfully in OpenModelica, but I have problems with solving it in Julia. The Julia code seems to work for up to 8 slices (control volumes), but mysteriously collapses for 9 and more slices… I’m co…

---

## [Attach gdb to julia](https://discourse.julialang.org/t/attach-gdb-to-julia/31021)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 1\
**Last updated:** [November 13, 2019, 12:06am UTC](https://discourse.julialang.org/t/attach-gdb-to-julia/31021 "2019-11-13T00:06:16Z")

</div>

I’m trying to attach gdb (v8.3) to a debug build of julia v1.2, and I get Attaching to process 20122 \[New Thread 0x1803 of process 20122\] \[New Thread 0x1903 of process 20122\] \[New Thread 0x1a03 of process 20122\] \[New Th…

---

## [JuMP with Ipopt - Error "The equality constraints contain an invalid number"](https://discourse.julialang.org/t/jump-with-ipopt-error-the-equality-constraints-contain-an-invalid-number/31004)

<div class="topic-metadata">

**Author:** [@StarecZosima](https://discourse.julialang.org/u/StarecZosima)\
**Replies:** 5\
**Last updated:** [November 12, 2019, 11:20pm UTC](https://discourse.julialang.org/t/jump-with-ipopt-error-the-equality-constraints-contain-an-invalid-number/31004 "2019-11-12T23:20:43Z")

</div>

Hi there, I am trying to solve the following system of nonlinear equations using JuMP, Ipopt c = Model(with\_optimizer(Ipopt.Optimizer,max\_cpu\_time=500.0)) @variable(c,x) @variable(c,y) @NLcon…

---

## [Why are for loops slower than broadcast with splatted arguments?](https://discourse.julialang.org/t/why-are-for-loops-slower-than-broadcast-with-splatted-arguments/30801)

<div class="topic-metadata">

**Author:** [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Replies:** 11\
**Last updated:** [November 12, 2019, 9:54pm UTC](https://discourse.julialang.org/t/why-are-for-loops-slower-than-broadcast-with-splatted-arguments/30801 "2019-11-12T21:54:44Z")

</div>

I’m broadcasting functions which return tuples, and have been converting arrays of tuples to tuples of arrays using “unzip”. I used for loops over each individual entry and re-assembled the output as a tuple. using Ben…

---

## [ProgressMeter and Threads.@Threads](https://discourse.julialang.org/t/progressmeter-and-threads-threads/30495)

<div class="topic-metadata">

**Author:** [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Replies:** 6\
**Last updated:** [November 12, 2019, 9:54pm UTC](https://discourse.julialang.org/t/progressmeter-and-threads-threads/30495 "2019-11-12T21:54:33Z")

</div>

Has there been any progress on this? I have tried using it in a manner similar the documentation (but for @threads) and couldn’t get this to work. I am currently using julia-1.2.0. A plain @showprogress 1 "Computing..."…

---

## [Julia HPC / Data Science / Simulation position at Los Alamos National Laboratory](https://discourse.julialang.org/t/julia-hpc-data-science-simulation-position-at-los-alamos-national-laboratory/30719)

<div class="topic-metadata">

**Author:** [@nurban](https://discourse.julialang.org/u/nurban)\
**Replies:** 2\
**Last updated:** [November 12, 2019, 8:03pm UTC](https://discourse.julialang.org/t/julia-hpc-data-science-simulation-position-at-los-alamos-national-laboratory/30719 "2019-11-12T20:03:44Z")

</div>

I would like to advertise an open Julia programming position at Los Alamos National Laboratory, involving high performance computing, numerical simulation, and data science. It’s advertised as a postdoctoral position, b…

---

## [DataFramesMeta Arthimetic](https://discourse.julialang.org/t/dataframesmeta-arthimetic/31011)

<div class="topic-metadata">

**Author:** [@Phillip\_Sutton](https://discourse.julialang.org/u/Phillip_Sutton)\
**Replies:** 3\
**Last updated:** [November 12, 2019, 7:59pm UTC](https://discourse.julialang.org/t/dataframesmeta-arthimetic/31011 "2019-11-12T19:59:48Z")

</div>

How do you add/subtract/muiltply/divide a column in my dataframe by a scalar? @\> begin dat @transform(new\_col=:x ./365) throws an error: MethodError: no method matching /(::Symbol, ::Int64) thoughts? just…

---

## [Plotting graphs, using GraphPlot](https://discourse.julialang.org/t/plotting-graphs-using-graphplot/30973)

<div class="topic-metadata">

**Author:** [@marinarrd](https://discourse.julialang.org/u/marinarrd)\
**Replies:** 3\
**Last updated:** [November 12, 2019, 6:21pm UTC](https://discourse.julialang.org/t/plotting-graphs-using-graphplot/30973 "2019-11-12T18:21:41Z")

</div>

Hello, I would like to draw a graph with node and edge labels. I am stuck as when I call gplot no edges appear in my graph. I attatched an image of my graph as well as what I would like using LightGraphs using GraphPlo…

---

## [Why are there several independent folders inside of the package folder installed?](https://discourse.julialang.org/t/why-are-there-several-independent-folders-inside-of-the-package-folder-installed/31013)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 2\
**Last updated:** [November 12, 2019, 5:17pm UTC](https://discourse.julialang.org/t/why-are-there-several-independent-folders-inside-of-the-package-folder-installed/31013 "2019-11-12T17:17:21Z")

</div>

Hi, following this tutorial, OpenStreetMapX\_tutorial, I’m calculating the route between two given points using OSM data. The following is the code. using OpenStreetMapX md = get\_map\_data("s400.osm", only\_intersections …

---

## [JuliaDiff and MPI](https://discourse.julialang.org/t/juliadiff-and-mpi/30983)

<div class="topic-metadata">

**Author:** [@Kotaro\_Anno](https://discourse.julialang.org/u/Kotaro_Anno)\
**Replies:** 3\
**Last updated:** [November 12, 2019, 4:24pm UTC](https://discourse.julialang.org/t/juliadiff-and-mpi/30983 "2019-11-12T16:24:25Z")

</div>

I’m interested in implementing both of JuliaDiff (automatic differentiation) and MPI. MPI needs domain decomposition, but I’m not sure JuliaDiff can deal with domain decomposition. And I can’t find good documents about…

---

## [Getting all set values of a sparse matrix](https://discourse.julialang.org/t/getting-all-set-values-of-a-sparse-matrix/31007)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 1\
**Last updated:** [November 12, 2019, 4:21pm UTC](https://discourse.julialang.org/t/getting-all-set-values-of-a-sparse-matrix/31007 "2019-11-12T16:21:28Z")

</div>

Using the sparse array example: julia\> using SparseArrays julia\> A = sparse(\[1, 2, 3\], \[1, 2, 3\], \[0, 2, 0\]) 3×3 SparseMatrixCSC{Int64,Int64} with 3 stored entries: \[1, 1\] = 0 \[2, 2\] = 2 \[3, 3\] = 0 How can…

---

## [(binary) solution not satisfying constraint](https://discourse.julialang.org/t/binary-solution-not-satisfying-constraint/30998)

<div class="topic-metadata">

**Author:** [@mposs](https://discourse.julialang.org/u/mposs)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 3:45pm UTC](https://discourse.julialang.org/t/binary-solution-not-satisfying-constraint/30998 "2019-11-12T15:45:58Z")

</div>

Hello I’m solving a small problem with Gurobi, which is given by println(cover)= Min slack\[1\] + slack\[2\] + slack\[7\] + slack\[9\] Subject to y\[135\] + y\[136\] + y\[152\] + y\[158\] + y\[159\] + y\[200\] + y\[474\] + y\[550\] + y\[551\] …

---

## [Problem to install packages](https://discourse.julialang.org/t/problem-to-install-packages/30977)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 3:33pm UTC](https://discourse.julialang.org/t/problem-to-install-packages/30977 "2019-11-12T15:33:34Z")

</div>

Dear all, I just to install Julia in a new computer. When I run Pkg.add("JuMP") a error message appears: Updating registry at \`C:\\Users\\Usuário\\.juliapro\\JuliaPro\_v1.0.4.1\\registries\\JuliaPro\` Updating git-repo \`h…

---

## [Revise seems not triggered in Juno IDE](https://discourse.julialang.org/t/revise-seems-not-triggered-in-juno-ide/30479)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 3:27pm UTC](https://discourse.julialang.org/t/revise-seems-not-triggered-in-juno-ide/30479 "2019-11-12T15:27:17Z")

</div>

The other day I decided to come back to Juno for Julia IDE. I have julia-client 0.11.3, language-julia 0.19.1, uber-juno 0.3.0, all of which are the latest. It is no longer unresponsive or lagging. So far so good. Howe…

---

## [Facing issue in HTTP.jl Proxy support](https://discourse.julialang.org/t/facing-issue-in-http-jl-proxy-support/30995)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 8\
**Last updated:** [November 12, 2019, 3:25pm UTC](https://discourse.julialang.org/t/facing-issue-in-http-jl-proxy-support/30995 "2019-11-12T15:25:02Z")

</div>

First of all, I would like to thank everyone who helped me to overcome the obstacles I faced in learning this beautiful and powerful programming language. :slight\_smile: This time, the issue is regarding proxy in HTTP.g…

---

## [How to build @constraints?](https://discourse.julialang.org/t/how-to-build-constraints/30950)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 6\
**Last updated:** [November 12, 2019, 2:59pm UTC](https://discourse.julialang.org/t/how-to-build-constraints/30950 "2019-11-12T14:59:14Z")

</div>

This is my model, I am working on building a mathematical model and would like to be able to represent the constraint like this: I\[1\] I\[2\] I\[3\] I\[4\] I\[5\] I\[6\] \<=1500 using JuMP, GLPK m = Model(with\_optimizer(GLPK.Optimi…

---

## [No constant expression elimination for e.g. '2^24-1'](https://discourse.julialang.org/t/no-constant-expression-elimination-for-e-g-2-24-1/30964)

<div class="topic-metadata">

**Author:** [@rryi](https://discourse.julialang.org/u/rryi)\
**Replies:** 7\
**Last updated:** [November 12, 2019, 11:26am UTC](https://discourse.julialang.org/t/no-constant-expression-elimination-for-e-g-2-24-1/30964 "2019-11-12T11:26:25Z")

</div>

I found differences in code generation for simple constant expressions: 1\<\<24-1 generates a constant, 2^24-1 generates a quite expensive C function call. Code example below. I did expect Julia to replace both expression…

---

## [Mutate a new variable with row numbers](https://discourse.julialang.org/t/mutate-a-new-variable-with-row-numbers/30985)

<div class="topic-metadata">

**Author:** [@pradeip1](https://discourse.julialang.org/u/pradeip1)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 10:41am UTC](https://discourse.julialang.org/t/mutate-a-new-variable-with-row-numbers/30985 "2019-11-12T10:41:48Z")

</div>

how to add a row number using Queryverse in Julia? for example in R I simply use ID = row\_number()

---

## [Handling network plots with Julia](https://discourse.julialang.org/t/handling-network-plots-with-julia/30949)

<div class="topic-metadata">

**Author:** [@rad1um](https://discourse.julialang.org/u/rad1um)\
**Replies:** 0\
**Last updated:** [November 11, 2019, 12:02pm UTC](https://discourse.julialang.org/t/handling-network-plots-with-julia/30949 "2019-11-11T12:02:27Z")

</div>

Hello everyone, I currently have to plot a lot of networks for my master thesis. Since the common graph tools for networks in julia (e.g. lightgraph, gplot, graphrecipes,…) are far from being as mature as python’s netwo…

---

## [Coordinates transformation from SWEREF 99 to WGS84](https://discourse.julialang.org/t/coordinates-transformation-from-sweref-99-to-wgs84/30943)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 11\
**Last updated:** [November 12, 2019, 9:21am UTC](https://discourse.julialang.org/t/coordinates-transformation-from-sweref-99-to-wgs84/30943 "2019-11-12T09:21:03Z")

</div>

Hi, I have a bunch of coordinate points in SWEREF 99, and I’d like to transfer them into WGS84. I have searched some available libraries from the internet, only to find swift - Converting from coordinate system WGS84 to …

---

## [Performance of Dict](https://discourse.julialang.org/t/performance-of-dict/30993)

<div class="topic-metadata">

**Author:** [@natgeo-wong](https://discourse.julialang.org/u/natgeo-wong)\
**Replies:** 1\
**Last updated:** [November 12, 2019, 9:17am UTC](https://discourse.julialang.org/t/performance-of-dict/30993 "2019-11-12T09:17:32Z")

</div>

Hi! I tend to use the Dict functionality of Julia pretty often to store information (e.g. attributes of various parameters that contain both strings and integers). But I’ve heard that Dict can slow down the performance…

---

## [Julia code generation - from DTD or XML Schema to Julia struct](https://discourse.julialang.org/t/julia-code-generation-from-dtd-or-xml-schema-to-julia-struct/30952)

<div class="topic-metadata">

**Author:** [@scelles](https://discourse.julialang.org/u/scelles)\
**Replies:** 3\
**Last updated:** [November 12, 2019, 8:34am UTC](https://discourse.julialang.org/t/julia-code-generation-from-dtd-or-xml-schema-to-julia-struct/30952 "2019-11-12T08:34:11Z")

</div>

Hello, I have some XML data. Most of these data have a schema to describe them. Those schema is either a Document type definition (DTD) or an XML Schema (xsd)). I wonder if Julia have a similar tool than Java JAXB xj…

---

## [Is there an efficient way to compute the Hessian of a NN?](https://discourse.julialang.org/t/is-there-an-efficient-way-to-compute-the-hessian-of-a-nn/26971)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 11\
**Last updated:** [November 12, 2019, 8:25am UTC](https://discourse.julialang.org/t/is-there-an-efficient-way-to-compute-the-hessian-of-a-nn/26971 "2019-11-12T08:25:43Z")

</div>

Flux.jacobian(::Chain, ::AbstractArray) gives the full jacobian of a neural network. Flux.hessian however throws the error “output is not scalar”. Let m = Chain(Dense(5,3,elu), Dense(3,3)) . What I can do is compute the…

---

## [Predict or parametric bootstrap for a generalized mixed model](https://discourse.julialang.org/t/predict-or-parametric-bootstrap-for-a-generalized-mixed-model/30855)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [November 12, 2019, 7:43am UTC](https://discourse.julialang.org/t/predict-or-parametric-bootstrap-for-a-generalized-mixed-model/30855 "2019-11-12T07:43:43Z")

</div>

I want to fit a generalized mixed model to a dataset where the dependent variable is velocity (continuous positive numbers), the random variable is the subject ID, and the predictor is distance to some point (also a cont…

---

## [Does Knet support nested gradient for conv?](https://discourse.julialang.org/t/does-knet-support-nested-gradient-for-conv/30805)

<div class="topic-metadata">

**Author:** [@zht](https://discourse.julialang.org/u/zht)\
**Replies:** 1\
**Last updated:** [November 12, 2019, 6:30am UTC](https://discourse.julialang.org/t/does-knet-support-nested-gradient-for-conv/30805 "2019-11-12T06:30:15Z")

</div>

I need to take the grad of grad of an NN (this is needed for WGAN with grad penalty regularizations). I just found out that Flux (0.9 release) does not support it: Nested AD not defined for conv Stacktrace: ... I am c…

---

## [Quick question : generated functions and later defined functions](https://discourse.julialang.org/t/quick-question-generated-functions-and-later-defined-functions/30812)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 5\
**Last updated:** [November 12, 2019, 6:08am UTC](https://discourse.julialang.org/t/quick-question-generated-functions-and-later-defined-functions/30812 "2019-11-12T06:08:01Z")

</div>

Hi, Here,Metaprogramming · The Julia Language, it says " generated function cannot call any method that was not defined prior to the definition of the generated function itself." Is there a way to go beyond this? …

---

## [Do Channels work with multithreaded tasks in 1.3?](https://discourse.julialang.org/t/do-channels-work-with-multithreaded-tasks-in-1-3/30931)

<div class="topic-metadata">

**Author:** [@GordStephen](https://discourse.julialang.org/u/GordStephen)\
**Replies:** 1\
**Last updated:** [November 12, 2019, 3:45am UTC](https://discourse.julialang.org/t/do-channels-work-with-multithreaded-tasks-in-1-3/30931 "2019-11-12T03:45:44Z")

</div>

This is perhaps an overly simple question, but I haven’t been able to find a straightfoward answer for it. Now that Julia 1.3 supports spawning parallel tasks across multiple threads, can we do work stealing via those pa…

---

## [How to hack into type generation using UnionAlls?](https://discourse.julialang.org/t/how-to-hack-into-type-generation-using-unionalls/30976)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 3:05am UTC](https://discourse.julialang.org/t/how-to-hack-into-type-generation-using-unionalls/30976 "2019-11-12T03:05:19Z")

</div>

julia\> abstract type Atype{Q} end julia\> Atype{Int} Atype{Int64} However I want Atype{Int} to produce Union{Atype{Int64}, Atype{Number}, Atype{Signed}} So is there way that I can programmatically intervene in the gene…

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

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