# Latest

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

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

**Page:** 1830

---

## [Structs in Modules](https://discourse.julialang.org/t/structs-in-modules/34317)

<div class="topic-metadata">

**Author:** [@squirrel](https://discourse.julialang.org/u/squirrel)\
**Replies:** 4\
**Last updated:** [February 7, 2020, 7:53pm UTC](https://discourse.julialang.org/t/structs-in-modules/34317 "2020-02-07T19:53:13Z")

</div>

So I have two modules that I wrote, SparseRowEchelon.jl and SparseBasis.jl. SparseRowEchelon includes a struct that is also used in SparseBasis, and this causes a problem when my main file tries to call a function in Sp…

---

## [Kernel Polynomial Method](https://discourse.julialang.org/t/kernel-polynomial-method/34240)

<div class="topic-metadata">

**Author:** [@mgaffar](https://discourse.julialang.org/u/mgaffar)\
**Replies:** 3\
**Last updated:** [February 7, 2020, 6:56pm UTC](https://discourse.julialang.org/t/kernel-polynomial-method/34240 "2020-02-07T18:56:57Z")

</div>

Is there any packages that already implement KPM?

---

## [Are SharedArrays bypassing cache?](https://discourse.julialang.org/t/are-sharedarrays-bypassing-cache/34269)

<div class="topic-metadata">

**Author:** [@j-fu](https://discourse.julialang.org/u/j-fu)\
**Replies:** 4\
**Last updated:** [February 7, 2020, 6:51pm UTC](https://discourse.julialang.org/t/are-sharedarrays-bypassing-cache/34269 "2020-02-07T18:51:58Z")

</div>

Hi, I am testing parallel computations based on multithreading/multiprocessing. Aimed at iterative solvers for PDEs I am interested in large loops. An interesting benchmark in this respect is the “Schönauer vector triad…

---

## [How to properly store a compile-time integer constant with a struct?](https://discourse.julialang.org/t/how-to-properly-store-a-compile-time-integer-constant-with-a-struct/34293)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 9\
**Last updated:** [February 7, 2020, 6:19pm UTC](https://discourse.julialang.org/t/how-to-properly-store-a-compile-time-integer-constant-with-a-struct/34293 "2020-02-07T18:19:30Z")

</div>

I am developing a tree-like data structure for a numerical simulation package, based on a composite type named Tree. To keep things general, I keep the implementation dimension-agnostic, so it should work with 1D, 2D, an…

---

## [How would I pass in a boolean condition to index a Julia Dataframe](https://discourse.julialang.org/t/how-would-i-pass-in-a-boolean-condition-to-index-a-julia-dataframe/34306)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 2\
**Last updated:** [February 7, 2020, 4:52pm UTC](https://discourse.julialang.org/t/how-would-i-pass-in-a-boolean-condition-to-index-a-julia-dataframe/34306 "2020-02-07T16:52:58Z")

</div>

Hi how’s it going? Say I set a variable X = Symbol(“column1”).==“Yes” How would I pass that variable in to index just like I would if I passed the actual statement in: data\[data\[Symbol("column1)\].==“Yes”, :\]

---

## [Problem using Overrides.toml](https://discourse.julialang.org/t/problem-using-overrides-toml/34296)

<div class="topic-metadata">

**Author:** [@barche](https://discourse.julialang.org/u/barche)\
**Replies:** 3\
**Last updated:** [February 7, 2020, 4:10pm UTC](https://discourse.julialang.org/t/problem-using-overrides-toml/34296 "2020-02-07T16:10:47Z")

</div>

Hi all, I’m trying to follow the instructions at 8. Artifacts · Pkg.jl to override the libcxxwrap-julia binaries (so I can use my local development version), using the following Overrides.toml file: \[3eaa8342-bff7-56a5…

---

## [Usage of isdefined() function](https://discourse.julialang.org/t/usage-of-isdefined-function/34304)

<div class="topic-metadata">

**Author:** [@spaceLem](https://discourse.julialang.org/u/spaceLem)\
**Replies:** 2\
**Last updated:** [February 7, 2020, 3:18pm UTC](https://discourse.julialang.org/t/usage-of-isdefined-function/34304 "2020-02-07T15:18:33Z")

</div>

I recently returned to some code I wrote last year, where I used the isdefined() function. The old syntax was: julia\> x = 1 julia\> isdefined(:x) true julia\> isdefined(:y) false But since then isdefined() has changed an…

---

## [ANN: Nanosoldier package evaluation -- with badges!](https://discourse.julialang.org/t/ann-nanosoldier-package-evaluation-with-badges/33339)

<div class="topic-metadata">

**Author:** [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Replies:** 6\
**Last updated:** [February 7, 2020, 2:56pm UTC](https://discourse.julialang.org/t/ann-nanosoldier-package-evaluation-with-badges/33339 "2020-02-07T14:56:28Z")

</div>

Hi all, We’ve been working on improving the new package evaluator (aptly named NewPkgEval.jl) as a tool for testing all registered Julia packages against changes to Julia itself. This functionality has been integrated i…

---

## [How can I train a simple model to understand the relation of math addition? \[Flux\]](https://discourse.julialang.org/t/how-can-i-train-a-simple-model-to-understand-the-relation-of-math-addition-flux/34294)

<div class="topic-metadata">

**Author:** [@TheOnlyArtz](https://discourse.julialang.org/u/TheOnlyArtz)\
**Replies:** 5\
**Last updated:** [February 7, 2020, 2:07pm UTC](https://discourse.julialang.org/t/how-can-i-train-a-simple-model-to-understand-the-relation-of-math-addition-flux/34294 "2020-02-07T14:07:27Z")

</div>

So as the title suggests, I want to get started with Flux and I can’t really understand that much from the docs, I want to train a simple model which will take 2 numbers in the input layer and output a single number (the…

---

## [Suggestion: forcing Travis CI to render verbose build output](https://discourse.julialang.org/t/suggestion-forcing-travis-ci-to-render-verbose-build-output/14716)

<div class="topic-metadata">

**Author:** [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Replies:** 2\
**Last updated:** [February 7, 2020, 1:14pm UTC](https://discourse.julialang.org/t/suggestion-forcing-travis-ci-to-render-verbose-build-output/14716 "2020-02-07T13:14:27Z")

</div>

Pkg3 currently directs all output from the Pkg.build() process to a log file. That’s generally nice, as it keeps the terminal from filling up with tens of thousands of lines of autotools output, but it’s a hassle on Trav…

---

## [C interface for void\*\*](https://discourse.julialang.org/t/c-interface-for-void/34221)

<div class="topic-metadata">

**Author:** [@RGerzaguet](https://discourse.julialang.org/u/RGerzaguet)\
**Replies:** 6\
**Last updated:** [February 7, 2020, 12:43pm UTC](https://discourse.julialang.org/t/c-interface-for-void/34221 "2020-02-07T12:43:13Z")

</div>

Hello Guys, A quite simple question on the C API and use with Julia I want to interface Julia functions with an existing C library cLib. This library has a function(let’s call it cfunction) that creates a buffer and fi…

---

## [On solving sets of linear equations in Fortran vs Julia](https://discourse.julialang.org/t/on-solving-sets-of-linear-equations-in-fortran-vs-julia/33729)

<div class="topic-metadata">

**Author:** [@razvangheorghe](https://discourse.julialang.org/u/razvangheorghe)\
**Replies:** 14\
**Last updated:** [February 7, 2020, 12:23pm UTC](https://discourse.julialang.org/t/on-solving-sets-of-linear-equations-in-fortran-vs-julia/33729 "2020-02-07T12:23:27Z")

</div>

Hi, I’d like to translate a Fortran 90 program to Julia and then continue with my development in Julia. The bottleneck right now seem to be the solving of around 100 systems of linear equations where the matrix (~400x400…

---

## [Ampersand Operator not consistent with help?](https://discourse.julialang.org/t/ampersand-operator-not-consistent-with-help/34266)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 15\
**Last updated:** [February 7, 2020, 10:13am UTC](https://discourse.julialang.org/t/ampersand-operator-not-consistent-with-help/34266 "2020-02-07T10:13:07Z")

</div>

help?\> & search: & &(x, y) But if I try it, it doesn’t work: julia\> &((1==2),(1==1)) ERROR: syntax: invalid syntax &(Core.tuple(==(1, 2), ==(1, 1))) Stacktrace: \[1\] top-level scope at none:0 julia\> &(true,true) …

---

## [Best way to query the values of a struct with array of symbols](https://discourse.julialang.org/t/best-way-to-query-the-values-of-a-struct-with-array-of-symbols/34259)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 10\
**Last updated:** [February 7, 2020, 9:35am UTC](https://discourse.julialang.org/t/best-way-to-query-the-values-of-a-struct-with-array-of-symbols/34259 "2020-02-07T09:35:10Z")

</div>

I have an struct with some fields. Based on the types provided by the user at construction, I want the struct to remember certain fields of interest. I achieved this this way mutable struct Foo{T} a::T b::T …

---

## [How to stop \`show\` from printing a type's fully qualified name?](https://discourse.julialang.org/t/how-to-stop-show-from-printing-a-types-fully-qualified-name/34274)

<div class="topic-metadata">

**Author:** [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Replies:** 3\
**Last updated:** [February 7, 2020, 9:09am UTC](https://discourse.julialang.org/t/how-to-stop-show-from-printing-a-types-fully-qualified-name/34274 "2020-02-07T09:09:15Z")

</div>

Say I have a type, X, and I overload its show(). When the type name comes up in other contexts, such as in an array, it still prints the fully qualified name: julia\> module M struct X x …

---

## [How do retrieve all vectors as from an array of vectors](https://discourse.julialang.org/t/how-do-retrieve-all-vectors-as-from-an-array-of-vectors/34288)

<div class="topic-metadata">

**Author:** [@PyDataBlog](https://discourse.julialang.org/u/PyDataBlog)\
**Replies:** 2\
**Last updated:** [February 7, 2020, 9:06am UTC](https://discourse.julialang.org/t/how-do-retrieve-all-vectors-as-from-an-array-of-vectors/34288 "2020-02-07T09:06:38Z")

</div>

Hello everyone. Basically, I have an array of vectors like this: a = \[ \[5, 3, 2\], \[5, 3, 5\], \[8, 4, 6\] \] which looks like this: 3-element Array{Array{Int64,1},1}: \[5, 3, 2\] \[5, 3, 5\] \[8, 4, 6\] I want to retriev…

---

## [Markdown output in jupyter noteboks](https://discourse.julialang.org/t/markdown-output-in-jupyter-noteboks/34238)

<div class="topic-metadata">

**Author:** [@HenrikM](https://discourse.julialang.org/u/HenrikM)\
**Replies:** 4\
**Last updated:** [February 7, 2020, 7:44am UTC](https://discourse.julialang.org/t/markdown-output-in-jupyter-noteboks/34238 "2020-02-07T07:44:48Z")

</div>

In Python it seems to be easy to output markdown in a jupyter notebook, see SO: Is it possible to show print output as LaTeX in jupyter notebook? SO: How to programmatically generate markdown output in Jupyter notebook…

---

## [How to obtain the frequency/phase/power of a signal and then produce a waveform of arbitrary length from those parameters?](https://discourse.julialang.org/t/how-to-obtain-the-frequency-phase-power-of-a-signal-and-then-produce-a-waveform-of-arbitrary-length-from-those-parameters/33896)

<div class="topic-metadata">

**Author:** [@mantzaris](https://discourse.julialang.org/u/mantzaris)\
**Replies:** 6\
**Last updated:** [February 7, 2020, 6:34am UTC](https://discourse.julialang.org/t/how-to-obtain-the-frequency-phase-power-of-a-signal-and-then-produce-a-waveform-of-arbitrary-length-from-those-parameters/33896 "2020-02-07T06:34:59Z")

</div>

I have a waveform signal X1 in the time domain that is long enough for all of the frequency components to have completed multiple periods, and want to derive the frequency, phase and amplitude/power components. With tho…

---

## [@code\_warntype does not produce a helpful output when called with keyword arguments](https://discourse.julialang.org/t/code-warntype-does-not-produce-a-helpful-output-when-called-with-keyword-arguments/34279)

<div class="topic-metadata">

**Author:** [@tomohiro\_soejima](https://discourse.julialang.org/u/tomohiro_soejima)\
**Replies:** 3\
**Last updated:** [February 7, 2020, 5:58am UTC](https://discourse.julialang.org/t/code-warntype-does-not-produce-a-helpful-output-when-called-with-keyword-arguments/34279 "2020-02-07T05:58:21Z")

</div>

Hello, I noticed @code\_warntype does not produce a helpful output when the function in question has keyword arguments. Is there a way to call @code\_warntype, such that we get more information? Here is a minimal example…

---

## [Gen install](https://discourse.julialang.org/t/gen-install/26459)

<div class="topic-metadata">

**Author:** [@kadir.nar](https://discourse.julialang.org/u/kadir.nar)\
**Replies:** 10\
**Last updated:** [February 7, 2020, 4:21am UTC](https://discourse.julialang.org/t/gen-install/26459 "2020-02-07T04:21:16Z")

</div>

“pkg\> add GitHub - probcomp/Gen.jl: A general-purpose probabilistic programming system with programmable inference” “ERROR: syntax: extra token “https” after end of expression.” Can you help me? Thanks.

---

## [Unable to install ThinkJulia](https://discourse.julialang.org/t/unable-to-install-thinkjulia/34278)

<div class="topic-metadata">

**Author:** [@mindaslab](https://discourse.julialang.org/u/mindaslab)\
**Replies:** 1\
**Last updated:** [February 7, 2020, 1:08am UTC](https://discourse.julialang.org/t/unable-to-install-thinkjulia/34278 "2020-02-07T01:08:31Z")

</div>

Hello All, OS: Ubuntu 19.10 Julia Version: 1.3.1 I am trying to learn Julia from this book Think Julia: How to Think Like a Computer Scientist. As part of the course I need to install a package called ThinkJulia. Whil…

---

## [\[ANN\] ElectronDisplay.jl v1.0.0 released](https://discourse.julialang.org/t/ann-electrondisplay-jl-v1-0-0-released/34234)

<div class="topic-metadata">

**Author:** [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Replies:** 3\
**Last updated:** [February 7, 2020, 12:58am UTC](https://discourse.julialang.org/t/ann-electrondisplay-jl-v1-0-0-released/34234 "2020-02-07T00:58:01Z")

</div>

We just released ElectronDisplay.jl v1.0.0, see the anouncement on the www.queryverse.org blog. The major new feature is an entirely new UI that is inspired by the PowerPoint model of having a list of thumbnail views on…

---

## [Improving cache behavior with ldg()](https://discourse.julialang.org/t/improving-cache-behavior-with-ldg/33628)

<div class="topic-metadata">

**Author:** [@Michael\_Benton](https://discourse.julialang.org/u/Michael_Benton)\
**Replies:** 6\
**Last updated:** [February 6, 2020, 11:56pm UTC](https://discourse.julialang.org/t/improving-cache-behavior-with-ldg/33628 "2020-02-06T23:56:02Z")

</div>

What exactly is meant by https://juliagpu.github.io/CUDAnative.jl/stable/lib/device/array.html that ldg “loads the value through the read-only texture cache for improved cache behavior” ? The following is a memory band…

---

## [How would I sort user transactions by date, and only keep the N most recent entries](https://discourse.julialang.org/t/how-would-i-sort-user-transactions-by-date-and-only-keep-the-n-most-recent-entries/34261)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 8\
**Last updated:** [February 6, 2020, 11:20pm UTC](https://discourse.julialang.org/t/how-would-i-sort-user-transactions-by-date-and-only-keep-the-n-most-recent-entries/34261 "2020-02-06T23:20:37Z")

</div>

Hi how’s it going? I have a dataframe where I have unique user entries and the date as one of the features. I know how to sort by date, but I’m having difficulty extracting say the last 5 entries per user. In Pandas the…

---

## [Travis CI configuration breaking changes](https://discourse.julialang.org/t/travis-ci-configuration-breaking-changes/34268)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 4\
**Last updated:** [February 6, 2020, 7:58pm UTC](https://discourse.julialang.org/t/travis-ci-configuration-breaking-changes/34268 "2020-02-06T19:58:23Z")

</div>

It seems that the Travis CI configuration had breaking changes recently This change broke my Documenter build, since matrix and jobs are now the same alias. To fix this, the matrix and jobs section in .travis.yml nee…

---

## [Style question: ternary operator or short circuit operator or if-end](https://discourse.julialang.org/t/style-question-ternary-operator-or-short-circuit-operator-or-if-end/34224)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 17\
**Last updated:** [February 6, 2020, 7:17pm UTC](https://discourse.julialang.org/t/style-question-ternary-operator-or-short-circuit-operator-or-if-end/34224 "2020-02-06T19:17:54Z")

</div>

I often find myself wishing the following syntax worked: if a \< 0 then a = 0 (get the condition, and statement that follows, on a single line. No need for end or ;) This works fine: if a \< 0; a = 0; end, but feels jus…

---

## [How to access other field variables?](https://discourse.julialang.org/t/how-to-access-other-field-variables/34254)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 5\
**Last updated:** [February 6, 2020, 6:43pm UTC](https://discourse.julialang.org/t/how-to-access-other-field-variables/34254 "2020-02-06T18:43:24Z")

</div>

I have a composite type which as a field of type Function, how could this function access other fields of struct? struct Adder adds::Vector{Float64} f::Function Adder(v::AbstractVector{Float64}) = new(v, …

---

## [Sparse matrix slicing](https://discourse.julialang.org/t/sparse-matrix-slicing/34263)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 1\
**Last updated:** [February 6, 2020, 5:59pm UTC](https://discourse.julialang.org/t/sparse-matrix-slicing/34263 "2020-02-06T17:59:12Z")

</div>

I have a doubt regarding slicing sparse matrices. For a n x m sparse matrix (for example A = sparse(\[1; 2; 3\], 1:3, 1.0, 18, 3)), when slicing the first row A\[1,:\] the result is a sparse vector, but instead of a row vect…

---

## [Distributions does not play nicely with PackageCompilerX](https://discourse.julialang.org/t/distributions-does-not-play-nicely-with-packagecompilerx/34255)

<div class="topic-metadata">

**Author:** [@PGS62](https://discourse.julialang.org/u/PGS62)\
**Replies:** 2\
**Last updated:** [February 6, 2020, 5:17pm UTC](https://discourse.julialang.org/t/distributions-does-not-play-nicely-with-packagecompilerx/34255 "2020-02-06T17:17:34Z")

</div>

Using PackageCompilerX, I wish to create an app from a package that uses functions in Distributions. Unfortunately, create\_app fails as shown below. I’m not using much functionality from Distributions so I should be abl…

---

## [1.3.1 pdf manual with wrong date](https://discourse.julialang.org/t/1-3-1-pdf-manual-with-wrong-date/34256)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 1\
**Last updated:** [February 6, 2020, 4:08pm UTC](https://discourse.julialang.org/t/1-3-1-pdf-manual-with-wrong-date/34256 "2020-02-06T16:08:51Z")

</div>

It says August 4, 2019. Also, it seems like it is about 1.3 release, not 1.3.1

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

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