# Latest

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

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

**Page:** 1691

---

## [Can a BigInt be a type parameter?](https://discourse.julialang.org/t/can-a-bigint-be-a-type-parameter/42997)

<div class="topic-metadata">

**Author:** [@scheinerman](https://discourse.julialang.org/u/scheinerman)\
**Replies:** 13\
**Last updated:** [July 13, 2020, 11:24pm UTC](https://discourse.julialang.org/t/can-a-bigint-be-a-type-parameter/42997 "2020-07-13T23:24:55Z")

</div>

I am able to define a type struct foo{N} where N is an Int, but can I do this with N being a BigInt?

---

## [How to make a dividing line in editor?](https://discourse.julialang.org/t/how-to-make-a-dividing-line-in-editor/43006)

<div class="topic-metadata">

**Author:** [@SteveShelnanMa](https://discourse.julialang.org/u/SteveShelnanMa)\
**Replies:** 3\
**Last updated:** [July 13, 2020, 10:27pm UTC](https://discourse.julialang.org/t/how-to-make-a-dividing-line-in-editor/43006 "2020-07-13T22:27:19Z")

</div>

Hi I was just learning Julia by copying and running others’ codes and for some reason there’s a dividing horizontal line in my editor, which I think is elegant for coding I don’t understand how and why this line app…

---

## [Interpolation into Threads.@spawn macro fails for certain kinds of Structs](https://discourse.julialang.org/t/interpolation-into-threads-spawn-macro-fails-for-certain-kinds-of-structs/42964)

<div class="topic-metadata">

**Author:** [@pyrex41](https://discourse.julialang.org/u/pyrex41)\
**Replies:** 9\
**Last updated:** [July 13, 2020, 10:18pm UTC](https://discourse.julialang.org/t/interpolation-into-threads-spawn-macro-fails-for-certain-kinds-of-structs/42964 "2020-07-13T22:18:53Z")

</div>

According to the docs for Threads.@spawn, you can interpolate an argument via $ and it will spawn the task with a copy of the variable. I have found that when I use a custom struct that use SparseArrays, that this behavi…

---

## [Calculate (I/A)^(2/3) with no allocations with Unitful](https://discourse.julialang.org/t/calculate-i-a-2-3-with-no-allocations-with-unitful/42998)

<div class="topic-metadata">

**Author:** [@ggggggggg](https://discourse.julialang.org/u/ggggggggg)\
**Replies:** 1\
**Last updated:** [July 13, 2020, 10:17pm UTC](https://discourse.julialang.org/t/calculate-i-a-2-3-with-no-allocations-with-unitful/42998 "2020-07-13T22:17:00Z")

</div>

See below. I’m trying to calculate this quantity without allocation. I know that exponentiation and units is tricky since a rational exponent is stored in the type of each unitful quantity, but even when I try to do all …

---

## [Tuple reverse is not type-stable enough](https://discourse.julialang.org/t/tuple-reverse-is-not-type-stable-enough/43005)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 4\
**Last updated:** [July 13, 2020, 9:59pm UTC](https://discourse.julialang.org/t/tuple-reverse-is-not-type-stable-enough/43005 "2020-07-13T21:59:31Z")

</div>

I just start with an MWE: # julia 1.4 # \]add AxisKeys using AxisKeys using Test # "more" type-stable version of reverse reverse\_tuple(x) = ntuple(i -\> x\[length(x) + 1 - i\], length(x)) f1(nt) = NamedDimsArray(zeros(1,1…

---

## [ArrayFire and Flux](https://discourse.julialang.org/t/arrayfire-and-flux/42907)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 13\
**Last updated:** [July 13, 2020, 9:19pm UTC](https://discourse.julialang.org/t/arrayfire-and-flux/42907 "2020-07-13T21:19:21Z")

</div>

In part because of having an AMD GPU, the only package I can get to work with it is ArrayFire.jl. ArrayFire v3.7.0 (OpenCL, 64-bit Linux, build a4485443) \[0\] AMD: Ellesmere, 7999 MB -1- INTEL: AMD Ryzen 7 2700X Eight-Co…

---

## [Check if a combination of values exists across two rows](https://discourse.julialang.org/t/check-if-a-combination-of-values-exists-across-two-rows/43000)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 3\
**Last updated:** [July 13, 2020, 8:23pm UTC](https://discourse.julialang.org/t/check-if-a-combination-of-values-exists-across-two-rows/43000 "2020-07-13T20:23:10Z")

</div>

How can I check if a vector, say A, contains a particular value, and another vector, say B, contains another particular value - in the same row as the value was found in vector A? For example: Target value in A is 9 Ta…

---

## [Let typeof(::Type{T}) where T = Type{T}](https://discourse.julialang.org/t/let-typeof-type-t-where-t-type-t/42938)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 13\
**Last updated:** [July 13, 2020, 6:33pm UTC](https://discourse.julialang.org/t/let-typeof-type-t-where-t-type-t/42938 "2020-07-13T18:33:24Z")

</div>

dispatching on function-like things can be quite tedious, as typeof as of now forgets information. While typeof(::Function) gives the function singleton type, typeof(::Type{T}) where T, i.e. typeof a Type-constructor, w…

---

## [Can Julia solve a nonlinear system of equation which nests a linear programming problem?](https://discourse.julialang.org/t/can-julia-solve-a-nonlinear-system-of-equation-which-nests-a-linear-programming-problem/42925)

<div class="topic-metadata">

**Author:** [@SOtani](https://discourse.julialang.org/u/SOtani)\
**Replies:** 4\
**Last updated:** [July 13, 2020, 6:21pm UTC](https://discourse.julialang.org/t/can-julia-solve-a-nonlinear-system-of-equation-which-nests-a-linear-programming-problem/42925 "2020-07-13T18:21:01Z")

</div>

I am trying to find a “real-valued” solution of a fixed point problem which nests a constrained linear programming problem by using NLsolve.jl and Gurobi.jl. Concretely, the outer problem is a nonlinear system of equatio…

---

## [Plots stopped working: "no method matching get\_color\_palette"](https://discourse.julialang.org/t/plots-stopped-working-no-method-matching-get-color-palette/38433)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [July 13, 2020, 5:47pm UTC](https://discourse.julialang.org/t/plots-stopped-working-no-method-matching-get-color-palette/38433 "2020-07-13T17:47:22Z")

</div>

Plotting have suddenly stopped working. It happened around the time I ran a Pkg.update(). This is a minimal example, and the corresponding error: using Plots plot(x -\> x^2) MethodError: no method matching get\_color\_pa…

---

## [Polynomial optimization: not getting the correct solution with extractatoms](https://discourse.julialang.org/t/polynomial-optimization-not-getting-the-correct-solution-with-extractatoms/42635)

<div class="topic-metadata">

**Author:** [@aliceee](https://discourse.julialang.org/u/aliceee)\
**Replies:** 2\
**Last updated:** [July 13, 2020, 5:40pm UTC](https://discourse.julialang.org/t/polynomial-optimization-not-getting-the-correct-solution-with-extractatoms/42635 "2020-07-13T17:40:14Z")

</div>

Hi, I’m trying to get the optimal solution of a polynomial optimization problem by calculating the dual. # Create symbolic variables (not JuMP decision variables) @polyvar x1 x2 # Create a Sum of Squares JuMP model with…

---

## [ERROR: KeyError: key OpenStreetMapX \[5c67c38e-c187-11e8-2be6-e3a6a3a5610f\] not found](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 39\
**Last updated:** [July 13, 2020, 4:58pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275 "2020-07-13T16:58:15Z")

</div>

I’m using Julia 1.0.3. The following is the code. julia\> using OpenStreetMapX julia\> m=get\_map\_data("output.osm") ERROR: KeyError: key OpenStreetMapX \[5c67c38e-c187-11e8-2be6-e3a6a3a5610f\] not found Stacktrace: \[1\] ge…

---

## [Take numbers form two intervals in concentric circles](https://discourse.julialang.org/t/take-numbers-form-two-intervals-in-concentric-circles/42045)

<div class="topic-metadata">

**Author:** [@mors](https://discourse.julialang.org/u/mors)\
**Replies:** 3\
**Last updated:** [July 13, 2020, 2:51pm UTC](https://discourse.julialang.org/t/take-numbers-form-two-intervals-in-concentric-circles/42045 "2020-07-13T14:51:21Z")

</div>

I am trying to take numbers from two intervals in Julia. The problem is the following, I am trying to create concentric circles and I need to generate vectors of dimension equal to 15 filled with numbers taken from each …

---

## ["julia"' is not recognized as an internal or external command, operable program or batch file](https://discourse.julialang.org/t/julia-is-not-recognized-as-an-internal-or-external-command-operable-program-or-batch-file/42983)

<div class="topic-metadata">

**Author:** [@Kleophas\_Mundjele](https://discourse.julialang.org/u/Kleophas_Mundjele)\
**Replies:** 1\
**Last updated:** [July 13, 2020, 2:44pm UTC](https://discourse.julialang.org/t/julia-is-not-recognized-as-an-internal-or-external-command-operable-program-or-batch-file/42983 "2020-07-13T14:44:24Z")

</div>

Hi I am trying to load atom on julia, but not succeeding. I am getting this Julia could not be started. ‘“julia”’ is not recognized as an internal or external command, operable program or batch file. We tried to laun…

---

## [Truncating the string length in Formatting.jl](https://discourse.julialang.org/t/truncating-the-string-length-in-formatting-jl/42834)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 1\
**Last updated:** [July 13, 2020, 2:23pm UTC](https://discourse.julialang.org/t/truncating-the-string-length-in-formatting-jl/42834 "2020-07-13T14:23:27Z")

</div>

In this snippet: using Formatting s = "123456789" printfmtln("{}--{:6.6s}", s, s) I would like the second occurrence of s to be truncated to 6 characters, but I’m getting: 123456789--123456789 Is there a format defi…

---

## [Unable to install packages](https://discourse.julialang.org/t/unable-to-install-packages/42982)

<div class="topic-metadata">

**Author:** [@Smith](https://discourse.julialang.org/u/Smith)\
**Replies:** 0\
**Last updated:** [July 13, 2020, 2:23pm UTC](https://discourse.julialang.org/t/unable-to-install-packages/42982 "2020-07-13T14:23:26Z")

</div>

Hello, I am unable to install any packages. Please find below the error I get when I try to install Plots package. How can I get around this? Pkg.add("Plots") Updating registry at \`C:\\Users\\.julia\\registries\\General\`…

---

## [Repeated vector vector multiplication to obtain matrix](https://discourse.julialang.org/t/repeated-vector-vector-multiplication-to-obtain-matrix/42980)

<div class="topic-metadata">

**Author:** [@morkip](https://discourse.julialang.org/u/morkip)\
**Replies:** 4\
**Last updated:** [July 13, 2020, 2:09pm UTC](https://discourse.julialang.org/t/repeated-vector-vector-multiplication-to-obtain-matrix/42980 "2020-07-13T14:09:32Z")

</div>

In my application I am running many iterations of a multiplication like this mat = vec1 .\* vec2'. The current implementation is like this dP\_dw = zeros(Float64, (number\_of\_states, settings.n\_vis \* 2, settings.n\_hid)) f…

---

## [Program Structure when muliple routines need to access State](https://discourse.julialang.org/t/program-structure-when-muliple-routines-need-to-access-state/42918)

<div class="topic-metadata">

**Author:** [@pyrex41](https://discourse.julialang.org/u/pyrex41)\
**Replies:** 2\
**Last updated:** [July 13, 2020, 1:24pm UTC](https://discourse.julialang.org/t/program-structure-when-muliple-routines-need-to-access-state/42918 "2020-07-13T13:24:01Z")

</div>

I have a program where I have an input feed (via ZMQ) that constantly updates an Array to maintain current state. I have other processes (either separate Tasks via @async or maybe on other threads via multithreading, sti…

---

## [Evolutionary Programming](https://discourse.julialang.org/t/evolutionary-programming/42822)

<div class="topic-metadata">

**Author:** [@colinclout12](https://discourse.julialang.org/u/colinclout12)\
**Replies:** 9\
**Last updated:** [July 13, 2020, 12:50pm UTC](https://discourse.julialang.org/t/evolutionary-programming/42822 "2020-07-13T12:50:25Z")

</div>

I’m trying to work through Dan Simon’s Evolutionary Optimization Algorithms: Biologically-Inspired and Population-Based Approaches to Computer Intelligence, and would like, to figure out how to turn his sample Genetic Pr…

---

## [Constrained weight matrices in Flux](https://discourse.julialang.org/t/constrained-weight-matrices-in-flux/42974)

<div class="topic-metadata">

**Author:** [@grero](https://discourse.julialang.org/u/grero)\
**Replies:** 1\
**Last updated:** [July 13, 2020, 12:43pm UTC](https://discourse.julialang.org/t/constrained-weight-matrices-in-flux/42974 "2020-07-13T12:43:26Z")

</div>

Is there a way to constrain the weight matrices trained by Flux? I’m interested in using Flux to train neural networks where I’d like to e.g. specify the proportion of negative and positive weights, which would simulate …

---

## [Nonuniform fast Fourier transforms](https://discourse.julialang.org/t/nonuniform-fast-fourier-transforms/4858)

<div class="topic-metadata">

**Author:** [@MikaelSlevinsky](https://discourse.julialang.org/u/MikaelSlevinsky)\
**Replies:** 10\
**Last updated:** [July 13, 2020, 11:10am UTC](https://discourse.julialang.org/t/nonuniform-fast-fourier-transforms/4858 "2020-07-13T11:10:04Z")

</div>

FastTransforms.jl v0.2.2 includes nonuniform fast Fourier transforms thanks to Alex Townsend: nufft1 assumes uniform samples and noninteger frequencies; nufft2 assumes nonuniform samples and integer frequencies; nuf…

---

## [How to duplicate stdout/stderr?](https://discourse.julialang.org/t/how-to-duplicate-stdout-stderr/42970)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 1\
**Last updated:** [July 13, 2020, 8:37am UTC](https://discourse.julialang.org/t/how-to-duplicate-stdout-stderr/42970 "2020-07-13T08:37:57Z")

</div>

I’m looking for a way to duplicate stdout/stderr. I’m aware of I/O and Network · The Julia Language which is great, but unfortunately it captures stdout instead of duplicating it. In python I use: logfile = tempfile.Na…

---

## [Using Dict() to directly define variables](https://discourse.julialang.org/t/using-dict-to-directly-define-variables/42972)

<div class="topic-metadata">

**Author:** [@Emmanuel-R8](https://discourse.julialang.org/u/Emmanuel-R8)\
**Replies:** 0\
**Last updated:** [July 13, 2020, 6:27am UTC](https://discourse.julialang.org/t/using-dict-to-directly-define-variables/42972 "2020-07-13T06:27:25Z")

</div>

Inspired by this article "Time Series Structure Discovery via Probabilistic Program Synthesis, I wanted to use a dictionary to store a tree of random variables and operations. Below model1 works; model2 fails with "VarNa…

---

## [Macro that defines function](https://discourse.julialang.org/t/macro-that-defines-function/42969)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 2\
**Last updated:** [July 13, 2020, 5:48am UTC](https://discourse.julialang.org/t/macro-that-defines-function/42969 "2020-07-13T05:48:53Z")

</div>

This doesn’t work. What’s the reason why I can’t define a function as expanded from a macro? Or did I do something wrong? module C macro makefunc(ex) return quote wat() = $(esc(ex)) e…

---

## [DataVoyager question](https://discourse.julialang.org/t/datavoyager-question/42205)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [July 13, 2020, 5:48am UTC](https://discourse.julialang.org/t/datavoyager-question/42205 "2020-07-13T05:48:41Z")

</div>

I have spent far too long today downloading an Excel format file containing the HPC Top500 data for this month. With DataVoyager I try to load a dataframe which has bene read in from this file

---

## [Why are \`code\_llvm\` and \`code\_native\` not displayed in color?](https://discourse.julialang.org/t/why-are-code-llvm-and-code-native-not-displayed-in-color/42959)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 6\
**Last updated:** [July 13, 2020, 4:50am UTC](https://discourse.julialang.org/t/why-are-code-llvm-and-code-native-not-displayed-in-color/42959 "2020-07-13T04:50:17Z")

</div>

I love code\_native, but I don’t like code\_llvm very much. The reason is that the output of code\_llvm is very hard to read. I want the result like the image below. Are there any options or packages to make the printing c…

---

## [Using Julia on Windows without Administrator privilages](https://discourse.julialang.org/t/using-julia-on-windows-without-administrator-privilages/29497)

<div class="topic-metadata">

**Author:** [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Replies:** 19\
**Last updated:** [July 13, 2020, 4:04am UTC](https://discourse.julialang.org/t/using-julia-on-windows-without-administrator-privilages/29497 "2020-07-13T04:04:56Z")

</div>

For most of my career, I’ve been working in MATLAB, Fortran, and–more recently Python. I’ve been getting to know (and love) Julia with some personal projects on my home computer for the past month or so. This week, I de…

---

## [Poor performance multiplying many (large) matrices multithreaded](https://discourse.julialang.org/t/poor-performance-multiplying-many-large-matrices-multithreaded/42866)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 11\
**Last updated:** [July 13, 2020, 1:30am UTC](https://discourse.julialang.org/t/poor-performance-multiplying-many-large-matrices-multithreaded/42866 "2020-07-13T01:30:12Z")

</div>

I am trying to multiply a bunch of (large and differently sized) matrices, and then do some reduction following each multiply. Basically I tried to do this in a multithreaded loop, where I see good speed gains for small…

---

## [Group Convolution Implementation - Work-around mutating arrays in gradient calcs](https://discourse.julialang.org/t/group-convolution-implementation-work-around-mutating-arrays-in-gradient-calcs/42931)

<div class="topic-metadata">

**Author:** [@CTM](https://discourse.julialang.org/u/CTM)\
**Replies:** 8\
**Last updated:** [July 12, 2020, 10:02pm UTC](https://discourse.julialang.org/t/group-convolution-implementation-work-around-mutating-arrays-in-gradient-calcs/42931 "2020-07-12T22:02:09Z")

</div>

I’m attempting to implement group convolutions which applies group transformations to incoming filters and then apply convolution. To do so, I create a set of transformation indices and then create an array with each of…

---

## [Need Gibbs Seawater (GSW) Equation of State to be ported to Julia](https://discourse.julialang.org/t/need-gibbs-seawater-gsw-equation-of-state-to-be-ported-to-julia/30476)

<div class="topic-metadata">

**Author:** [@truedichotomy](https://discourse.julialang.org/u/truedichotomy)\
**Replies:** 25\
**Last updated:** [July 12, 2020, 9:21pm UTC](https://discourse.julialang.org/t/need-gibbs-seawater-gsw-equation-of-state-to-be-ported-to-julia/30476 "2020-07-12T21:21:55Z")

</div>

The Gibb Seawater Equation of State (GSW) is what oceanographers use to calculate fundamental properties of seawater. Currently there are a couple implementation of the C version of the library in Julia but none of them …

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

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