# Latest

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

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

**Page:** 1806

---

## [Creating a type graph from a function body with macros](https://discourse.julialang.org/t/creating-a-type-graph-from-a-function-body-with-macros/35735)

<div class="topic-metadata">

**Author:** [@darsnack](https://discourse.julialang.org/u/darsnack)\
**Replies:** 2\
**Last updated:** [March 9, 2020, 2:23pm UTC](https://discourse.julialang.org/t/creating-a-type-graph-from-a-function-body-with-macros/35735 "2020-03-09T14:23:57Z")

</div>

I have a package I am working on where users will write code that looks like (using the package’s @circuit macro): @circuit Foo begin parameters : \[ a =\> 0.5, b =\> 10 \] circuit : (dut::Foo)(…

---

## [Julia-emacs 0.4 released](https://discourse.julialang.org/t/julia-emacs-0-4-released/35747)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [March 9, 2020, 1:15pm UTC](https://discourse.julialang.org/t/julia-emacs-0-4-released/35747 "2020-03-09T13:15:05Z")

</div>

We have released version 0.4 of julia-emacs. This is the first release that requires Emacs 24.3, which simplifies code maintenance a lot. The new release should trickle through MELPA Stable soon. Changes include: in…

---

## ["Import guard" in julia](https://discourse.julialang.org/t/import-guard-in-julia/1505)

<div class="topic-metadata">

**Author:** [@kdmurray91](https://discourse.julialang.org/u/kdmurray91)\
**Replies:** 6\
**Last updated:** [March 9, 2020, 1:11pm UTC](https://discourse.julialang.org/t/import-guard-in-julia/1505 "2020-03-09T13:11:53Z")

</div>

Hi all, Apologies if I’m lacking google skills, but I’m unable to find a Julian equivalent of the following common python pattern: if \_\_name\_\_ == "\_\_main\_\_": run\_my\_main\_func() This construct prevents code being e…

---

## [Changing the shape of the initial value problem in DiffentialEquations.jl and possible performance issues](https://discourse.julialang.org/t/changing-the-shape-of-the-initial-value-problem-in-diffentialequations-jl-and-possible-performance-issues/35739)

<div class="topic-metadata">

**Author:** [@Noobie76](https://discourse.julialang.org/u/Noobie76)\
**Replies:** 3\
**Last updated:** [March 9, 2020, 12:45pm UTC](https://discourse.julialang.org/t/changing-the-shape-of-the-initial-value-problem-in-diffentialequations-jl-and-possible-performance-issues/35739 "2020-03-09T12:45:33Z")

</div>

Dear Community I’m not very familiar with the numerical handling of ODEs in Julia. Maybe I should begin with my goal, what I want to achieve in order to simplify the feedback loop. I try to implement a variational solv…

---

## [Pushing a function to its performance limit](https://discourse.julialang.org/t/pushing-a-function-to-its-performance-limit/35647)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 16\
**Last updated:** [March 9, 2020, 12:20pm UTC](https://discourse.julialang.org/t/pushing-a-function-to-its-performance-limit/35647 "2020-03-09T12:20:40Z")

</div>

Hi! I am trying to push this code to be as efficient as possible. If I could achieve any performance gain it would be great because I am calling this function thousands of time. The problem is essentially a problem of b…

---

## [DifferentialEquations sanity check](https://discourse.julialang.org/t/differentialequations-sanity-check/35517)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 6\
**Last updated:** [March 9, 2020, 11:34am UTC](https://discourse.julialang.org/t/differentialequations-sanity-check/35517 "2020-03-09T11:34:15Z")

</div>

Hello, I have been using DifferentialEquations to try and model microbial interactions. In the first approach, I give some absolute concentrations of bacteria and phages (viruses of bacteria) and I get this figure: bac…

---

## [RESTful web services](https://discourse.julialang.org/t/restful-web-services/10046)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 18\
**Last updated:** [March 9, 2020, 10:38am UTC](https://discourse.julialang.org/t/restful-web-services/10046 "2020-03-09T10:38:58Z")

</div>

What package(s) may I use to build RESTful web services? Is there any tutorial around?

---

## [What is the best way to factorize/decompose a covariance matrix?](https://discourse.julialang.org/t/what-is-the-best-way-to-factorize-decompose-a-covariance-matrix/35316)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 21\
**Last updated:** [March 9, 2020, 2:08am UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-factorize-decompose-a-covariance-matrix/35316 "2020-03-09T02:08:58Z")

</div>

I need to draw from a certain multivariate normal distribution. To do so, I draw from standard normal distribution, then transform them to draws from multivariate normal distribution. Because the covariance matrix is onl…

---

## [Get an error when keep certain variables only on the main process](https://discourse.julialang.org/t/get-an-error-when-keep-certain-variables-only-on-the-main-process/35738)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 0\
**Last updated:** [March 8, 2020, 11:58pm UTC](https://discourse.julialang.org/t/get-an-error-when-keep-certain-variables-only-on-the-main-process/35738 "2020-03-08T23:58:08Z")

</div>

I am trying to learn parallel computing in Julia. I want to send something to every processes, but keep other things only at the main process. I had the following weird error. My sample code is (for simplicity): using …

---

## [How convert docx and odt into pure text?](https://discourse.julialang.org/t/how-convert-docx-and-odt-into-pure-text/35734)

<div class="topic-metadata">

**Author:** [@Darione](https://discourse.julialang.org/u/Darione)\
**Replies:** 2\
**Last updated:** [March 8, 2020, 11:05pm UTC](https://discourse.julialang.org/t/how-convert-docx-and-odt-into-pure-text/35734 "2020-03-08T23:05:15Z")

</div>

Hi, how can i convert a .docx (or .odt) file into pure text, in Julia? Many thanks

---

## [WYSIWYG Plot Editor](https://discourse.julialang.org/t/wysiwyg-plot-editor/30562)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 7\
**Last updated:** [March 8, 2020, 10:14pm UTC](https://discourse.julialang.org/t/wysiwyg-plot-editor/30562 "2020-03-08T22:14:07Z")

</div>

So, I had an idea. Not really my idea, but someone elses from like the 90’s or something. Would there be an interest in a WYSIWYG style plot editor as an extension to Juno/Atom? Or maybe in it’s own little pop out windo…

---

## [Extending Base functions for a tree](https://discourse.julialang.org/t/extending-base-functions-for-a-tree/35722)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 7\
**Last updated:** [March 8, 2020, 6:21pm UTC](https://discourse.julialang.org/t/extending-base-functions-for-a-tree/35722 "2020-03-08T18:21:50Z")

</div>

As I recall, Base.length is used to return types with a single dimension Base.size is used to return types with more than one dimension I have build a tree type and I want to return the total number of nodes in the …

---

## [Include, using, export](https://discourse.julialang.org/t/include-using-export/35706)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 4\
**Last updated:** [March 8, 2020, 1:51pm UTC](https://discourse.julialang.org/t/include-using-export/35706 "2020-03-08T13:51:42Z")

</div>

Hi, I wish to put experimental code in another file, call “TestFile”, and this file contains a function “TestFunction”. In my Main file called “main.jl”, I wish to access the function “TestFunction”. How do I do it? I t…

---

## [Cool idea: define a function conditionally. Even more powerful than traits](https://discourse.julialang.org/t/cool-idea-define-a-function-conditionally-even-more-powerful-than-traits/35701)

<div class="topic-metadata">

**Author:** [@bramtayl](https://discourse.julialang.org/u/bramtayl)\
**Replies:** 30\
**Last updated:** [March 8, 2020, 5:18pm UTC](https://discourse.julialang.org/t/cool-idea-define-a-function-conditionally-even-more-powerful-than-traits/35701 "2020-03-08T17:18:01Z")

</div>

I cooked up a little macro that allows you to define a function conditionally. This condition can be totally arbitrary, the sky’s the limit. The only requirement is that the condition must return True or False. Unless I’…

---

## [Why am i getting an array instead of a number](https://discourse.julialang.org/t/why-am-i-getting-an-array-instead-of-a-number/35711)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 4\
**Last updated:** [March 8, 2020, 1:31pm UTC](https://discourse.julialang.org/t/why-am-i-getting-an-array-instead-of-a-number/35711 "2020-03-08T13:31:59Z")

</div>

I have this function that i want to to get a probability from which means that i should get a number but instead of that i’m getting an array with the identical elements. function prob(na) #na must be a Vecto…

---

## [Need help with 'Accelerating optimization via machine learning with surrogate models'](https://discourse.julialang.org/t/need-help-with-accelerating-optimization-via-machine-learning-with-surrogate-models/35717)

<div class="topic-metadata">

**Author:** [@viralnatani](https://discourse.julialang.org/u/viralnatani)\
**Replies:** 2\
**Last updated:** [March 8, 2020, 12:41pm UTC](https://discourse.julialang.org/t/need-help-with-accelerating-optimization-via-machine-learning-with-surrogate-models/35717 "2020-03-08T12:41:30Z")

</div>

Hello everyone! I am a student and willing to participate in Google Summer Of Code 2020. I am interested in working on project “Accelerating optimization via machine learning with surrogate models”. But I am unable to fi…

---

## [\[ANN\] MultiplesOfPi.jl](https://discourse.julialang.org/t/ann-multiplesofpi-jl/35690)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 6\
**Last updated:** [March 8, 2020, 10:25am UTC](https://discourse.julialang.org/t/ann-multiplesofpi-jl/35690 "2020-03-08T10:25:36Z")

</div>

Hi everyone! This is a small package to solve a specific problem: to avoid floating-point errors while using multiples of pi in arithmetic or trigonometric functions. The package exports the constant Pi that is numerica…

---

## [Pkg system broken because of LibGit2](https://discourse.julialang.org/t/pkg-system-broken-because-of-libgit2/35710)

<div class="topic-metadata">

**Author:** [@innerlee](https://discourse.julialang.org/u/innerlee)\
**Replies:** 4\
**Last updated:** [March 8, 2020, 6:46am UTC](https://discourse.julialang.org/t/pkg-system-broken-because-of-libgit2/35710 "2020-03-08T06:46:12Z")

</div>

either $ julia \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ \_\_ \_ | Type "?" for help, "\]?" for Pkg help. | | | | | | |/ \_\` | | | |…

---

## [Discrete heatmap in Plots.jl](https://discourse.julialang.org/t/discrete-heatmap-in-plots-jl/35708)

<div class="topic-metadata">

**Author:** [@c1991](https://discourse.julialang.org/u/c1991)\
**Replies:** 1\
**Last updated:** [March 8, 2020, 6:12am UTC](https://discourse.julialang.org/t/discrete-heatmap-in-plots-jl/35708 "2020-03-08T06:12:34Z")

</div>

The following code gives me exactly what I need except that I do not want a continuous colorbar. How do I get a discrete color bar (i.e. 1 = “red”, 2 = “blue”, and 3 = “green”, etc.)? timePeriods = 12 nodes = 15 ys =…

---

## [Visualizing a 3D volume in Makie: Lighting, smoothness](https://discourse.julialang.org/t/visualizing-a-3d-volume-in-makie-lighting-smoothness/35263)

<div class="topic-metadata">

**Author:** [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Replies:** 7\
**Last updated:** [March 8, 2020, 3:38am UTC](https://discourse.julialang.org/t/visualizing-a-3d-volume-in-makie-lighting-smoothness/35263 "2020-03-08T03:38:43Z")

</div>

In plotting discrete 3D arrays using Makie, how can one modify the lighting and smoothness properties? Here is an example of a thick, extruded cross geometry constructed as a binary 3D array. (Figure on left) The lighti…

---

## [REPL and mainloop](https://discourse.julialang.org/t/repl-and-mainloop/35699)

<div class="topic-metadata">

**Author:** [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Replies:** 0\
**Last updated:** [March 7, 2020, 9:20pm UTC](https://discourse.julialang.org/t/repl-and-mainloop/35699 "2020-03-07T21:20:34Z")

</div>

I have been thinking a little bit about the issue that Gtk makes the REPL sluggish on windows and from my perspective this points at a little bit more general problem: How should one integrate an external mainloop with t…

---

## [\[ANN\] DefaultArrays](https://discourse.julialang.org/t/ann-defaultarrays/35679)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 4\
**Last updated:** [March 7, 2020, 8:26pm UTC](https://discourse.julialang.org/t/ann-defaultarrays/35679 "2020-03-07T20:26:08Z")

</div>

Hey everyone, this package implements an array type which supports a default value, it might be useful for storing very sparse information in a space efficient manner, the internal design uses “Dict” for storage Insta…

---

## [Keyword versus positional arguments](https://discourse.julialang.org/t/keyword-versus-positional-arguments/35538)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 2\
**Last updated:** [March 7, 2020, 8:13pm UTC](https://discourse.julialang.org/t/keyword-versus-positional-arguments/35538 "2020-03-07T20:13:32Z")

</div>

Reviewing @avik Sengupta’s book «Julia High Performance» 2nd edition, it says that performance of functions with positional arguments is better than those with keyword (named) arguments, giving the following example: us…

---

## [How to take the value after typing one character in redline (Char?) Without ENTER](https://discourse.julialang.org/t/how-to-take-the-value-after-typing-one-character-in-redline-char-without-enter/35691)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 2\
**Last updated:** [March 7, 2020, 7:29pm UTC](https://discourse.julialang.org/t/how-to-take-the-value-after-typing-one-character-in-redline-char-without-enter/35691 "2020-03-07T19:29:53Z")

</div>

Is there a way for the variable var to take the value after typing one character in redline (Char?) without pressing Enter? Something like var = readline (:: Char?) (I am doing a quick one-touch input interface) Paul

---

## [Changes to codebase not reflecting](https://discourse.julialang.org/t/changes-to-codebase-not-reflecting/35653)

<div class="topic-metadata">

**Author:** [@monsij98](https://discourse.julialang.org/u/monsij98)\
**Replies:** 5\
**Last updated:** [March 7, 2020, 5:13pm UTC](https://discourse.julialang.org/t/changes-to-codebase-not-reflecting/35653 "2020-03-07T17:13:05Z")

</div>

I want to make some changes to REPL.jl present at Julia-1.3.1\\share\\julia\\stdlib\\v1.3\\REPL\\src (local installation). However the changes aren’t being reflected when I actually run it. Do I need to run an intermediate bui…

---

## [Why would closure break type inference?](https://discourse.julialang.org/t/why-would-closure-break-type-inference/35681)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 12\
**Last updated:** [March 7, 2020, 2:33pm UTC](https://discourse.julialang.org/t/why-would-closure-break-type-inference/35681 "2020-03-07T14:33:58Z")

</div>

function my\_mean(A::AbstractArray) isempty(A) && return sum(A)/0 n = length(A) x1 = first(A) / n \_prom(x::T, y::S) where {T,S} = begin R = promote\_type(T, S) return convert(R, x) end ret…

---

## [Strange behaviour using hcat with arrays obtained from arraysplit](https://discourse.julialang.org/t/strange-behaviour-using-hcat-with-arrays-obtained-from-arraysplit/35685)

<div class="topic-metadata">

**Author:** [@ceysa75](https://discourse.julialang.org/u/ceysa75)\
**Replies:** 4\
**Last updated:** [March 7, 2020, 2:03pm UTC](https://discourse.julialang.org/t/strange-behaviour-using-hcat-with-arrays-obtained-from-arraysplit/35685 "2020-03-07T14:03:24Z")

</div>

Hi all, I experience a strange behaviour using hcat with arrays obtained from arraysplit (DSP package). My issue is explained in the code snippet below: using DSP a = 1:10 q = arraysplit(a,5,3) A = hcat(q\[1\],q\[2\]) # …

---

## [I want to bin numerical values into manually set percentile values, how can I do this?](https://discourse.julialang.org/t/i-want-to-bin-numerical-values-into-manually-set-percentile-values-how-can-i-do-this/35651)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 2\
**Last updated:** [March 7, 2020, 1:07pm UTC](https://discourse.julialang.org/t/i-want-to-bin-numerical-values-into-manually-set-percentile-values-how-can-i-do-this/35651 "2020-03-07T13:07:16Z")

</div>

Hi how’s it going? I have a numerical column that I’d like to bin into these percentile bin edges: percentiles = \[.05,.35,.8,.95\] In Python it’s as easy as pd.qcut. I was wondering what the simplest way would be for m…

---

## [Combining distributed computing / multithreading](https://discourse.julialang.org/t/combining-distributed-computing-multithreading/24320)

<div class="topic-metadata">

**Author:** [@moudbis](https://discourse.julialang.org/u/moudbis)\
**Replies:** 7\
**Last updated:** [March 7, 2020, 10:42am UTC](https://discourse.julialang.org/t/combining-distributed-computing-multithreading/24320 "2020-03-07T10:42:06Z")

</div>

Hello everyone, I’m trying to use multithreading in Julia 1.0 over an HPC cluster. This HPC cluster own differents nodes (separate CPU units) and each node has several cores. I want to run Julia parallel code over thi…

---

## [Sparse with default value "Inf"](https://discourse.julialang.org/t/sparse-with-default-value-inf/35110)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 27\
**Last updated:** [February 29, 2020, 2:39pm UTC](https://discourse.julialang.org/t/sparse-with-default-value-inf/35110 "2020-02-29T14:39:44Z")

</div>

Hi guys i’m working on a problem which requires solving many linear assignment problems (LAP) and i wonder if it’s possible to declare a sparse matrix object in Julia which defaults to “Inf” rather than 0, as this would …

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

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