# Latest

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

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

**Page:** 1478

---

## [Plot: format dates in x axis](https://discourse.julialang.org/t/plot-format-dates-in-x-axis/56097)

<div class="topic-metadata">

**Author:** [@ZettEff](https://discourse.julialang.org/u/ZettEff)\
**Replies:** 3\
**Last updated:** [February 26, 2021, 5:12pm UTC](https://discourse.julialang.org/t/plot-format-dates-in-x-axis/56097 "2021-02-26T17:12:59Z")

</div>

Hi there, I have a question regarding date formatting when using plot with gr() backend. Two question: Is there a more julian way to format your dates - here: to only show years - then my last line of code? Is th…

---

## [Makie limits in a 3D scene](https://discourse.julialang.org/t/makie-limits-in-a-3d-scene/56099)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 5\
**Last updated:** [February 26, 2021, 5:24pm UTC](https://discourse.julialang.org/t/makie-limits-in-a-3d-scene/56099 "2021-02-26T17:24:50Z")

</div>

Hello, two questions. I found that if I define the following limits for an LScene, let’s say something like surface(-1:0.1:1, -1:0.1:1, 2\*rand(21,21) .-1, limits = FRect((-1,-1,-1), (2,2,2))) I can get limits for x,y,…

---

## [Makie depth order sorting](https://discourse.julialang.org/t/makie-depth-order-sorting/56103)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 2\
**Last updated:** [February 26, 2021, 5:18pm UTC](https://discourse.julialang.org/t/makie-depth-order-sorting/56103 "2021-02-26T17:18:59Z")

</div>

Hello, I’m currently plotting several transparent surfaces in a LScene in order to get the appropriate depth order I need to plot them in a specific order, lets say for two surfaces, one in the back and one in the front…

---

## [Private Julia subsystem for Python, as is done in PyCall.jl for the opposite](https://discourse.julialang.org/t/private-julia-subsystem-for-python-as-is-done-in-pycall-jl-for-the-opposite/56101)

<div class="topic-metadata">

**Author:** [@chkwon](https://discourse.julialang.org/u/chkwon)\
**Replies:** 2\
**Last updated:** [February 26, 2021, 4:52pm UTC](https://discourse.julialang.org/t/private-julia-subsystem-for-python-as-is-done-in-pycall-jl-for-the-opposite/56101 "2021-02-26T16:52:51Z")

</div>

We have pyjulia, which I believe works for an existing Julia installation. Is it also possible to let Python to install a private Julia subsystem, that is independent from any existing or non-existing Julia installation? …

---

## [Hessian inside a Flux loss function](https://discourse.julialang.org/t/hessian-inside-a-flux-loss-function/56043)

<div class="topic-metadata">

**Author:** [@arlk](https://discourse.julialang.org/u/arlk)\
**Replies:** 3\
**Last updated:** [February 26, 2021, 4:21pm UTC](https://discourse.julialang.org/t/hessian-inside-a-flux-loss-function/56043 "2021-02-26T16:21:50Z")

</div>

MWE (or as minimal as I can think to make it): using Flux import ForwardDiff, Zygote g = Dense(2, 1, softplus) loss(m, x) = sum(abs2, Zygote.hessian(x-\>sum(m(x)), x)) gradient(g, rand(2)) do m, x loss(m, x) end Bot…

---

## [Redefining functions in the REPL alleviates large allocations (MWE with IntervalArithmetic.jl)](https://discourse.julialang.org/t/redefining-functions-in-the-repl-alleviates-large-allocations-mwe-with-intervalarithmetic-jl/53515)

<div class="topic-metadata">

**Author:** [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)\
**Replies:** 10\
**Last updated:** [February 26, 2021, 4:13pm UTC](https://discourse.julialang.org/t/redefining-functions-in-the-repl-alleviates-large-allocations-mwe-with-intervalarithmetic-jl/53515 "2021-02-26T16:13:06Z")

</div>

I noticed a lot of memory allocations with IntervalArithmetic.jl on Julia 1.5.3 (it appears to be the same in 1.6) when I used a vector of Interval as an input for a custom function in a module. Interestingly, redefining…

---

## [ANN: Algorithms for Optimization book draft](https://discourse.julialang.org/t/ann-algorithms-for-optimization-book-draft/8221)

<div class="topic-metadata">

**Author:** [@mykelk](https://discourse.julialang.org/u/mykelk)\
**Replies:** 46\
**Last updated:** [February 26, 2021, 4:01pm UTC](https://discourse.julialang.org/t/ann-algorithms-for-optimization-book-draft/8221 "2021-02-26T16:01:15Z")

</div>

As mentioned in my JuliaCon talk, Tim Wheeler and I have produced a draft of a textbook on optimization. It provides Julia code for the various algorithms. The publisher has agreed to allow us to post the draft behind a …

---

## [Error building packages when startup file is used (v1.0)](https://discourse.julialang.org/t/error-building-packages-when-startup-file-is-used-v1-0/14318)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 4\
**Last updated:** [February 26, 2021, 3:31pm UTC](https://discourse.julialang.org/t/error-building-packages-when-startup-file-is-used-v1-0/14318 "2021-02-26T15:31:58Z")

</div>

With v1.0, I find that I get errors building Plots or NLopt when I start julia with a ./.julia/config/startup.jl file that contains using Revise, and/or using OhMyREPL but if I start without the startup file, the packag…

---

## [How to enforce weight matrix to be of a certain form (train a subset) in Flux?](https://discourse.julialang.org/t/how-to-enforce-weight-matrix-to-be-of-a-certain-form-train-a-subset-in-flux/33197)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 5\
**Last updated:** [February 26, 2021, 3:02pm UTC](https://discourse.julialang.org/t/how-to-enforce-weight-matrix-to-be-of-a-certain-form-train-a-subset-in-flux/33197 "2021-02-26T15:02:03Z")

</div>

For example, I want a layer specified by a symmetric or a tridiagonal matrix. Obviously, train! does not know about it, and an error is raised: ArgumentError: cannot set entry (3, 1) off the tridiagonal band to a nonzer…

---

## [Automatic conversion Int64 -\>Float64 for Unions](https://discourse.julialang.org/t/automatic-conversion-int64-float64-for-unions/56071)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [February 26, 2021, 3:00pm UTC](https://discourse.julialang.org/t/automatic-conversion-int64-float64-for-unions/56071 "2021-02-26T15:00:27Z")

</div>

Currently integers to floats “automatic” conversion is successful only if the type is not a Union but it fails otherwise: a = Float64\[1.0,2.0\] a = Float64\[1,2\] # ok a = Union{Float64,String}\[1.0,"a…

---

## [Hi evrybody, I'm trying to overlay a scatter plot with a heatmap using Plots.jl bu](https://discourse.julialang.org/t/hi-evrybody-im-trying-to-overlay-a-scatter-plot-with-a-heatmap-using-plots-jl-bu/56067)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 2\
**Last updated:** [February 26, 2021, 12:41pm UTC](https://discourse.julialang.org/t/hi-evrybody-im-trying-to-overlay-a-scatter-plot-with-a-heatmap-using-plots-jl-bu/56067 "2021-02-26T12:41:09Z")

</div>

Hi evrybody, I’m trying to overlay a scatter plot with a heatmap using Plots.jl but I can’t figure it out how heatmap is oriented (or find much documentation on the plots.jl heatmap function). The heat map seems turned …

---

## [What is the maximum inlining depth in practice?](https://discourse.julialang.org/t/what-is-the-maximum-inlining-depth-in-practice/55929)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 7\
**Last updated:** [February 26, 2021, 12:24pm UTC](https://discourse.julialang.org/t/what-is-the-maximum-inlining-depth-in-practice/55929 "2021-02-26T12:24:54Z")

</div>

Out of professional curiosity: What is the maximum depth for inlining function calls in Julia in practice? My programming intuition says that there must exist a practical limit regarding how deeply nested functions may …

---

## [Dispatch on fields of my struct?](https://discourse.julialang.org/t/dispatch-on-fields-of-my-struct/56054)

<div class="topic-metadata">

**Author:** [@marty0801](https://discourse.julialang.org/u/marty0801)\
**Replies:** 5\
**Last updated:** [February 26, 2021, 12:15pm UTC](https://discourse.julialang.org/t/dispatch-on-fields-of-my-struct/56054 "2021-02-26T12:15:23Z")

</div>

I’ve made a newbie mistake in constructing my types, and hoping for some good advice how to fix. I two types, both containers having identical data layouts as below. I made them distinct because they represent differen…

---

## [Module functions vs built-in functions](https://discourse.julialang.org/t/module-functions-vs-built-in-functions/54740)

<div class="topic-metadata">

**Author:** [@MagGeometer](https://discourse.julialang.org/u/MagGeometer)\
**Replies:** 4\
**Last updated:** [February 26, 2021, 11:59am UTC](https://discourse.julialang.org/t/module-functions-vs-built-in-functions/54740 "2021-02-26T11:59:35Z")

</div>

When you call a method that’s not exported (or even defined!) from a module, Julia matches a function defined outside the module. Is this a bug? Example code: module LogicalOperations export and, or, not function and…

---

## [Cannot use Cuda.jl after turning on from sleep](https://discourse.julialang.org/t/cannot-use-cuda-jl-after-turning-on-from-sleep/56081)

<div class="topic-metadata">

**Author:** [@kadir-gunel](https://discourse.julialang.org/u/kadir-gunel)\
**Replies:** 0\
**Last updated:** [February 26, 2021, 11:59am UTC](https://discourse.julialang.org/t/cannot-use-cuda-jl-after-turning-on-from-sleep/56081 "2021-02-26T11:59:26Z")

</div>

Hello, I have a problem with CUDA.jl package. Every time I turn on my computer from sleep I am not able to use CUDA.jl. Is there any solution without restarting the computer ? I am using fedora Linux by the way. B.R.

---

## [So does Julia compile or interpret?](https://discourse.julialang.org/t/so-does-julia-compile-or-interpret/56073)

<div class="topic-metadata">

**Author:** [@xyz1](https://discourse.julialang.org/u/xyz1)\
**Replies:** 1\
**Last updated:** [February 26, 2021, 10:57am UTC](https://discourse.julialang.org/t/so-does-julia-compile-or-interpret/56073 "2021-02-26T10:57:35Z")

</div>

Hi, I’ve been searching for this but I’m not sure there is a definitive answer written somewhere. I understand it may be an “implementation detail” and that “julia compiles to efficient native code for multiple platforms…

---

## [Extracting information from https://www.tipranks.com/stocks/MSFT/stock-analysis](https://discourse.julialang.org/t/extracting-information-from-https-www-tipranks-com-stocks-msft-stock-analysis/56078)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 0\
**Last updated:** [February 26, 2021, 10:13am UTC](https://discourse.julialang.org/t/extracting-information-from-https-www-tipranks-com-stocks-msft-stock-analysis/56078 "2021-02-26T10:13:09Z")

</div>

In a previous post I made here on discourse link, nilshg was kind enough to help me solve the problem that I had. Unfortunately, I am having difficulty using what I learned from nilshg on the present problem. I am tryi…

---

## [Julia package for running shell commands](https://discourse.julialang.org/t/julia-package-for-running-shell-commands/56074)

<div class="topic-metadata">

**Author:** [@ispandey81](https://discourse.julialang.org/u/ispandey81)\
**Replies:** 1\
**Last updated:** [February 26, 2021, 9:55am UTC](https://discourse.julialang.org/t/julia-package-for-running-shell-commands/56074 "2021-02-26T09:55:12Z")

</div>

Is there a julia package for running shell commands which can take command line arguments?

---

## [Packages for LaTeX templating in julia (and symbolic algebra)](https://discourse.julialang.org/t/packages-for-latex-templating-in-julia-and-symbolic-algebra/55923)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 4\
**Last updated:** [February 26, 2021, 8:26am UTC](https://discourse.julialang.org/t/packages-for-latex-templating-in-julia-and-symbolic-algebra/55923 "2021-02-26T08:26:56Z")

</div>

I want to make some tutorial sheets and fill them with partly randomised questions. I’m thinking of using some kind of template library in julia to replace certain tags in the document with questions (and separately with…

---

## [Contourf with a zebra-like colormap?](https://discourse.julialang.org/t/contourf-with-a-zebra-like-colormap/56069)

<div class="topic-metadata">

**Author:** [@Alexander\_Buck](https://discourse.julialang.org/u/Alexander_Buck)\
**Replies:** 0\
**Last updated:** [February 26, 2021, 8:09am UTC](https://discourse.julialang.org/t/contourf-with-a-zebra-like-colormap/56069 "2021-02-26T08:09:42Z")

</div>

Is there a way to create a colormap for a filled-contour plot such that the fill color alternates between two colors? For example, in the image below, between the 1 and 2 level it would be gray, between the 2 and 3 level…

---

## [Help with PyCall-related segfault](https://discourse.julialang.org/t/help-with-pycall-related-segfault/55998)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 4\
**Last updated:** [February 26, 2021, 7:54am UTC](https://discourse.julialang.org/t/help-with-pycall-related-segfault/55998 "2021-02-26T07:54:03Z")

</div>

I posted this also here but hoping to get more eyes on this. The MWE is simple, run the following with julia --threads=2: using PyCall Threads.@sync begin Threads.@spawn GC.gc(true) Threads.@spawn GC.gc(true) e…

---

## [With Missings, Julia is slower than R](https://discourse.julialang.org/t/with-missings-julia-is-slower-than-r/11838)

<div class="topic-metadata">

**Author:** [@gaspardelanuit](https://discourse.julialang.org/u/gaspardelanuit)\
**Replies:** 30\
**Last updated:** [February 26, 2021, 4:10am UTC](https://discourse.julialang.org/t/with-missings-julia-is-slower-than-r/11838 "2021-02-26T04:10:59Z")

</div>

As shown by the code below, Julia is twice slower than R (!) to sum elements of a Float64 vector with missing values, even with Julia 0.7. In R, missing values are encoded with sentinelle values. In Julia, they are enco…

---

## [Deploy pluto.jl code into the server?](https://discourse.julialang.org/t/deploy-pluto-jl-code-into-the-server/56063)

<div class="topic-metadata">

**Author:** [@Ravinder\_Ram](https://discourse.julialang.org/u/Ravinder_Ram)\
**Replies:** 0\
**Last updated:** [February 26, 2021, 3:15am UTC](https://discourse.julialang.org/t/deploy-pluto-jl-code-into-the-server/56063 "2021-02-26T03:15:17Z")

</div>

if pluto.jl convert julia code into javascritpt, css, html… then how to deploy code in server like in digitalocean, heroku

---

## [Minimum by key function](https://discourse.julialang.org/t/minimum-by-key-function/56056)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [February 25, 2021, 11:50pm UTC](https://discourse.julialang.org/t/minimum-by-key-function/56056 "2021-02-25T23:50:38Z")

</div>

How can I find the minimum value of an array, but evaluating the minimum through a key function? In Python, In \[6\]: min(\[-3, -1, 2\], key=abs) Out\[6\]: -1

---

## [Force package to download (specific) lazy artifacts](https://discourse.julialang.org/t/force-package-to-download-specific-lazy-artifacts/44300)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 1\
**Last updated:** [February 25, 2021, 11:48pm UTC](https://discourse.julialang.org/t/force-package-to-download-specific-lazy-artifacts/44300 "2021-02-25T23:48:38Z")

</div>

I’m building a read-only container for a Julia application. It relies on third-party packages, in particular CUDAjl, that have a bunch of lazy artifacts that are only downloaded based on the system type or CUDA version. …

---

## [Build a formula from a string](https://discourse.julialang.org/t/build-a-formula-from-a-string/55804)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 5\
**Last updated:** [February 25, 2021, 11:20pm UTC](https://discourse.julialang.org/t/build-a-formula-from-a-string/55804 "2021-02-25T23:20:15Z")

</div>

I want to build a StatsModels formula from a string. This is the closest I’ve gotten. text = "y ~ x" StatsModels.terms!(StatsModels.sort\_terms!(StatsModels.parse!(Meta.parse(text)))) # :(($(Expr(:escape, :~)))(Term(:y),…

---

## [What is the latest for using \`Weave.jl\` with Tikz images?](https://discourse.julialang.org/t/what-is-the-latest-for-using-weave-jl-with-tikz-images/56047)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 2\
**Last updated:** [February 25, 2021, 10:58pm UTC](https://discourse.julialang.org/t/what-is-the-latest-for-using-weave-jl-with-tikz-images/56047 "2021-02-25T22:58:54Z")

</div>

I was wondering if it is possible to embed Tikz images into Weave files, for rendering to html or pdf? I have tikz snippets and I was wondering if there is an easy way to migrate these into Weave rendered documents. Now…

---

## [How to create an instance of a mutable composite type with most fields left empty?](https://discourse.julialang.org/t/how-to-create-an-instance-of-a-mutable-composite-type-with-most-fields-left-empty/56021)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 4\
**Last updated:** [February 25, 2021, 10:49pm UTC](https://discourse.julialang.org/t/how-to-create-an-instance-of-a-mutable-composite-type-with-most-fields-left-empty/56021 "2021-02-25T22:49:39Z")

</div>

Let’s say I have a mutable composite type and want to create an instance of it. However, at first, I only want to initialise one of the fields (lets say in the example bellow Cost = 120.5) and leave all the others empty.…

---

## [Extracting information from https://caps.fool.com/Ticker/MSFT.aspx](https://discourse.julialang.org/t/extracting-information-from-https-caps-fool-com-ticker-msft-aspx/56017)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 5\
**Last updated:** [February 25, 2021, 10:37pm UTC](https://discourse.julialang.org/t/extracting-information-from-https-caps-fool-com-ticker-msft-aspx/56017 "2021-02-25T22:37:16Z")

</div>

I am trying to extract information from Caps run by Fool. However, using Gumbo and Cascadia, the html page appears to contain no useful information (and certainly not what I am after in a direct way). How can I get the i…

---

## [How to distinguish between "found" and "not found" in \`findfirst(dict)\`? E.g.:\`\`\`](https://discourse.julialang.org/t/how-to-distinguish-between-found-and-not-found-in-findfirst-dict-e-g/56014)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 25, 2021, 9:29pm UTC](https://discourse.julialang.org/t/how-to-distinguish-between-found-and-not-found-in-findfirst-dict-e-g/56014 "2021-02-25T21:29:27Z")

</div>

How to distinguish between “found” and “not found” in findfirst(dict)? E.g.: d = Dict(nothing =&gt; 1, 2 =&gt; 3) findfirst(==(3), d) # == 2, ok: d\[2\] == 3 findfirst(==(1), d) # == nothing, ok: d\[nothing\] = 1 findfirs…

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

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