# Latest

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

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

**Page:** 1600

---

## [MacroTools combinedef problem with master but not 1.5.2](https://discourse.julialang.org/t/macrotools-combinedef-problem-with-master-but-not-1-5-2/48534)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 3\
**Last updated:** [October 18, 2020, 10:15am UTC](https://discourse.julialang.org/t/macrotools-combinedef-problem-with-master-but-not-1-5-2/48534 "2020-10-18T10:15:26Z")

</div>

After recompile of master (Version 1.6.0-DEV.1262 (2020-10-17)) this morning I can no longer get MacroTools to work. It seems to work fine in 1.5.2 but test MacroTools fails with one error. MacroTools: Error During Test…

---

## [Constructor to delay array allocation in mutable struct](https://discourse.julialang.org/t/constructor-to-delay-array-allocation-in-mutable-struct/48574)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 2\
**Last updated:** [October 18, 2020, 6:28am UTC](https://discourse.julialang.org/t/constructor-to-delay-array-allocation-in-mutable-struct/48574 "2020-10-18T06:28:55Z")

</div>

Hi, I wish to define a mutable structure containing - among other things - an array mutable struct MyType values :: Matrix{Float} # stands for arbitrary Array of arbitrary data end I then wish to create a variab…

---

## [No method matching isless(::Array{Float64,2}, ::Array{Float64,2})](https://discourse.julialang.org/t/no-method-matching-isless-array-float64-2-array-float64-2/48086)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 1\
**Last updated:** [October 10, 2020, 3:12am UTC](https://discourse.julialang.org/t/no-method-matching-isless-array-float64-2-array-float64-2/48086 "2020-10-10T03:12:45Z")

</div>

When I call the Optimizer.jl package, the following error occurs: MethodError: no method matching isless(::Array{Float64,2}, ::Array{Float64,2}) Because of the size of my program, I can’t construct an example to repl…

---

## [@\_\_DIR\_\_ doesn't work properly within backtick \`...\` notation](https://discourse.julialang.org/t/dir-doesnt-work-properly-within-backtick-notation/48566)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 1\
**Last updated:** [October 18, 2020, 12:35am UTC](https://discourse.julialang.org/t/dir-doesnt-work-properly-within-backtick-notation/48566 "2020-10-18T00:35:55Z")

</div>

Consider the following script: # this is correct: println(@\_\_DIR\_\_) # but this is not, it's just the cwd: run(\`echo $(@\_\_DIR\_\_)\`) # but this works: foo = @\_\_DIR\_\_ run(\`echo $foo\`) I get /home/samuela/dev/research/ju…

---

## [Quaternion-, and up to, sedenion-valued neural networks: Parallelizing Hamilton product on GPUs/CUDA](https://discourse.julialang.org/t/quaternion-and-up-to-sedenion-valued-neural-networks-parallelizing-hamilton-product-on-gpus-cuda/48442)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 7\
**Last updated:** [October 17, 2020, 11:34pm UTC](https://discourse.julialang.org/t/quaternion-and-up-to-sedenion-valued-neural-networks-parallelizing-hamilton-product-on-gpus-cuda/48442 "2020-10-17T23:34:29Z")

</div>

\[Edit: See my next comment on August 2020 Sedenion-networks, and there and here a bit on Octonion-networks. I changed the title yet again replacing Octonion with Sedenion as to not make it too long.\] The specific fou…

---

## [Assign x values is plots](https://discourse.julialang.org/t/assign-x-values-is-plots/48516)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 10\
**Last updated:** [October 17, 2020, 9:31pm UTC](https://discourse.julialang.org/t/assign-x-values-is-plots/48516 "2020-10-17T21:31:06Z")

</div>

using Roots using Plots J=f(x)=x^2+10sin(x) g(x)=f(x)-1000 find\_zeros(g,0,10000) plot(J) The above works fine, but I want to plot a horizontal line at 1000, and plot J, so that x goes from 0 to 100. I’m not sure from…

---

## [Copyto! in DiffeqGPU EnsembleProblem](https://discourse.julialang.org/t/copyto-in-diffeqgpu-ensembleproblem/48530)

<div class="topic-metadata">

**Author:** [@Vash94](https://discourse.julialang.org/u/Vash94)\
**Replies:** 1\
**Last updated:** [October 17, 2020, 9:05pm UTC](https://discourse.julialang.org/t/copyto-in-diffeqgpu-ensembleproblem/48530 "2020-10-17T21:05:01Z")

</div>

How to copy slices in EnsembleGPUArray? code: function f\_du(du,u,p,t) @inbounds begin copyto!(du,p) end nothing end tspan = (0.0f0,1.0f0) u0 = \[1.0,2.0,3.0\] p0=\[-1.,-2.,-3.\] prob = ODEProblem(f\_du,u0,tspan,p0) …

---

## [Increase value of element in array. Like setindex!, but addition](https://discourse.julialang.org/t/increase-value-of-element-in-array-like-setindex-but-addition/48521)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 3\
**Last updated:** [October 17, 2020, 8:15pm UTC](https://discourse.julialang.org/t/increase-value-of-element-in-array-like-setindex-but-addition/48521 "2020-10-17T20:15:05Z")

</div>

Sometimes I have an array, and want to pass a copy of the array into a function, but updated, e.g. function my\_array\_function(array) do\_something\_else\_function(setindex!(copy(array),0.,1)) end this is basically a s…

---

## [Error creating Pkg.add("Plots") on v1.5.2-1 version](https://discourse.julialang.org/t/error-creating-pkg-add-plots-on-v1-5-2-1-version/48555)

<div class="topic-metadata">

**Author:** [@iandapaz](https://discourse.julialang.org/u/iandapaz)\
**Replies:** 0\
**Last updated:** [October 17, 2020, 7:51pm UTC](https://discourse.julialang.org/t/error-creating-pkg-add-plots-on-v1-5-2-1-version/48555 "2020-10-17T19:51:56Z")

</div>

I’m using Julia’s v1.5.2-1 version and I’m trying to plot a graphic. But when I use the command Pkg.add(“Plots”) a error message appears… Look…: julia\> Pkg.add(“Plots”) Updating registry at C:\\Users\\user\\.julia\\registr…

---

## [GSSAPI / Kerberos in Julia?](https://discourse.julialang.org/t/gssapi-kerberos-in-julia/48548)

<div class="topic-metadata">

**Author:** [@tp2750](https://discourse.julialang.org/u/tp2750)\
**Replies:** 0\
**Last updated:** [October 17, 2020, 4:21pm UTC](https://discourse.julialang.org/t/gssapi-kerberos-in-julia/48548 "2020-10-17T16:21:39Z")

</div>

Are there any GSSAPI packages in Julia? I need to interact with a webservice that authenticates using Kerberos to an Active Directory Domain Controller. Something similar to what Curl does when called with these argume…

---

## [How do I check if variable is defined in the current workspace? (not using the macro)](https://discourse.julialang.org/t/how-do-i-check-if-variable-is-defined-in-the-current-workspace-not-using-the-macro/48545)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [October 17, 2020, 3:35pm UTC](https://discourse.julialang.org/t/how-do-i-check-if-variable-is-defined-in-the-current-workspace-not-using-the-macro/48545 "2020-10-17T15:35:54Z")

</div>

So I can use @isdefined my\_undefined\_variable and it returns false. But is there something similar without using the macro (a function)? There seems to be a function isdefined(), but I don’t know how it works (not as I…

---

## [Web Noob; how hard would it be to integrate julia with HTML?](https://discourse.julialang.org/t/web-noob-how-hard-would-it-be-to-integrate-julia-with-html/48541)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 5\
**Last updated:** [October 17, 2020, 2:34pm UTC](https://discourse.julialang.org/t/web-noob-how-hard-would-it-be-to-integrate-julia-with-html/48541 "2020-10-17T14:34:05Z")

</div>

So I am not a web developer. Sometimes I do web stuff at work, and a little for fun. I was doing some thinking, and a question came to mind. Why can’t Julia be a serverside web language like PHP? Please don’t judge the …

---

## [Flux - Has anyone ever gotten Custom Loss Functions to work with Zygote?](https://discourse.julialang.org/t/flux-has-anyone-ever-gotten-custom-loss-functions-to-work-with-zygote/48464)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 7\
**Last updated:** [October 17, 2020, 1:51pm UTC](https://discourse.julialang.org/t/flux-has-anyone-ever-gotten-custom-loss-functions-to-work-with-zygote/48464 "2020-10-17T13:51:26Z")

</div>

I am trying to train an MLP network with 1 output where the outputs are in various groups (as indicated by a stratification variable). I wish to normalise outputs within groups (as in softmax) before applying the loss f…

---

## [Multithreaded computation significantly slower](https://discourse.julialang.org/t/multithreaded-computation-significantly-slower/47474)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 18\
**Last updated:** [October 17, 2020, 1:06pm UTC](https://discourse.julialang.org/t/multithreaded-computation-significantly-slower/47474 "2020-10-17T13:06:50Z")

</div>

I have a numerical calculation (market clearing in a heterogeneous agent overlapping generations model) which is “embarrassingly parallel” in the sense that I can split it up to 10–30 parts that can run separately (the c…

---

## [Input unicode characters in jupyther notebooks from vscode](https://discourse.julialang.org/t/input-unicode-characters-in-jupyther-notebooks-from-vscode/48537)

<div class="topic-metadata">

**Author:** [@Andrea\_Pagnani](https://discourse.julialang.org/u/Andrea_Pagnani)\
**Replies:** 0\
**Last updated:** [October 17, 2020, 10:18am UTC](https://discourse.julialang.org/t/input-unicode-characters-in-jupyther-notebooks-from-vscode/48537 "2020-10-17T10:18:41Z")

</div>

Dearests, I succeeded in making vscode run jupyther notebooks and also make it understand julia language syntax. (For those interested, I basically installed Python vscode extension + some small tweaks for syntax highl…

---

## [Displaying outputs of @code\_lowered from two methods side by side](https://discourse.julialang.org/t/displaying-outputs-of-code-lowered-from-two-methods-side-by-side/48536)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [October 17, 2020, 9:39am UTC](https://discourse.julialang.org/t/displaying-outputs-of-code-lowered-from-two-methods-side-by-side/48536 "2020-10-17T09:39:45Z")

</div>

I am trying to compare the output of @code\_lowered from two methods of a function. It struck me that displaying them side by side would make it easier to compare them line-by-line. However something like this doesn’t see…

---

## [Tweak axes labels of a 3d plot](https://discourse.julialang.org/t/tweak-axes-labels-of-a-3d-plot/48116)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 12\
**Last updated:** [October 17, 2020, 6:45am UTC](https://discourse.julialang.org/t/tweak-axes-labels-of-a-3d-plot/48116 "2020-10-17T06:45:20Z")

</div>

I notice that when I make a 3d plot using Plots, the x and y axes labels are tilted so that they are parallel to the axes. I would like to make them horizontal. What attributes in Plots.jl control the tilting of the axe…

---

## [Benchmarking a function with side effects](https://discourse.julialang.org/t/benchmarking-a-function-with-side-effects/48531)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 2\
**Last updated:** [October 17, 2020, 4:59am UTC](https://discourse.julialang.org/t/benchmarking-a-function-with-side-effects/48531 "2020-10-17T04:59:52Z")

</div>

I want to compare push!ing an element to an Array with push!!ing an element to a Tuple using BenchmarkTools.jl and BangBang.jl: julia\> using BenchmarkTools, BangBang julia\> a = 1:20 |\> collect; julia\> b = Tuple(a); j…

---

## [I'm confused about methods](https://discourse.julialang.org/t/im-confused-about-methods/48508)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 21\
**Last updated:** [October 16, 2020, 11:05pm UTC](https://discourse.julialang.org/t/im-confused-about-methods/48508 "2020-10-16T23:05:42Z")

</div>

This surprises me (particularly the part where f() evaluates to 1): julia\> begin f(a)=2 f(a,b)=3 f(;a,b)=4 f()=1 end f (generic function with 3 methods) julia\> methods…

---

## [Jump Solving stops jumping weirdly, something recognizable?](https://discourse.julialang.org/t/jump-solving-stops-jumping-weirdly-something-recognizable/48525)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 0\
**Last updated:** [October 16, 2020, 10:37pm UTC](https://discourse.julialang.org/t/jump-solving-stops-jumping-weirdly-something-recognizable/48525 "2020-10-16T22:37:58Z")

</div>

I simulated a JumpProblem, and I simulate it many times (100) using the ensemble functionality. Very rarely (like 1 time out of 100) the solution suddenly stops changing, see this plot of example: (the green line) Th…

---

## [Emacs + org mode packages and tips](https://discourse.julialang.org/t/emacs-org-mode-packages-and-tips/47911)

<div class="topic-metadata">

**Author:** [@timquelch](https://discourse.julialang.org/u/timquelch)\
**Replies:** 3\
**Last updated:** [October 16, 2020, 10:03pm UTC](https://discourse.julialang.org/t/emacs-org-mode-packages-and-tips/47911 "2020-10-16T22:03:52Z")

</div>

What is everyone’s experiences with the different julia packages for Emacs? How have you found the literate programming experience in org mode? julia-repl: Quite a good repl interface. No real complaints ob-julia (es…

---

## [Subplot problems with histograms](https://discourse.julialang.org/t/subplot-problems-with-histograms/48522)

<div class="topic-metadata">

**Author:** [@Dustin\_Hess](https://discourse.julialang.org/u/Dustin_Hess)\
**Replies:** 0\
**Last updated:** [October 16, 2020, 9:46pm UTC](https://discourse.julialang.org/t/subplot-problems-with-histograms/48522 "2020-10-16T21:46:36Z")

</div>

Hi Guys trying out the PoltlyJS package. I wanted to plot the classic iris data set. I was trying to build my own pairplot. However, plotlyJS gives some strange behavior. When I subplot the histogram it no longer overlay…

---

## [On flagging a newcomer as off-topic](https://discourse.julialang.org/t/on-flagging-a-newcomer-as-off-topic/48517)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [October 16, 2020, 8:02pm UTC](https://discourse.julialang.org/t/on-flagging-a-newcomer-as-off-topic/48517 "2020-10-16T20:02:52Z")

</div>

I don’t think that the posts of netlander should be flagged… can be unflagged ?

---

## [A method for detecting and removing coolinear inner points](https://discourse.julialang.org/t/a-method-for-detecting-and-removing-coolinear-inner-points/48492)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 6\
**Last updated:** [October 16, 2020, 7:29pm UTC](https://discourse.julialang.org/t/a-method-for-detecting-and-removing-coolinear-inner-points/48492 "2020-10-16T19:29:40Z")

</div>

Does anyone here know of a “simple” method for detecting collinear points (in this case, 2D coordinates) from n \> 2 points, and deleting the ones that are most “inner”? So from (0, 0) (0, 2) (0, 1) (1, 1) the first thre…

---

## [A newbie can not use CUDA by follow official DOC!](https://discourse.julialang.org/t/a-newbie-can-not-use-cuda-by-follow-official-doc/36010)

<div class="topic-metadata">

**Author:** [@nuclear718](https://discourse.julialang.org/u/nuclear718)\
**Replies:** 33\
**Last updated:** [October 16, 2020, 3:52pm UTC](https://discourse.julialang.org/t/a-newbie-can-not-use-cuda-by-follow-official-doc/36010 "2020-10-16T15:52:13Z")

</div>

New PC, New Julia, New CUDA package and just totally follow ““https://juliagpu.gitlab.io/CUDA.jl/”” but it doesn’t work! using CUDAdrv, CUDAnative, CuArrays get a error: ┌ Info: CUDAnative.jl failed to initialize, GPU…

---

## [NLsolve Intermediate Value Theorem](https://discourse.julialang.org/t/nlsolve-intermediate-value-theorem/48509)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 1\
**Last updated:** [October 16, 2020, 6:58pm UTC](https://discourse.julialang.org/t/nlsolve-intermediate-value-theorem/48509 "2020-10-16T18:58:33Z")

</div>

Does NLsolve use the Intermediate Value Theorem, how do I aproxemetly solve a problem like 1000=(x)^2+10sin(x) I know that f(a)=f(0)=0 and that f(b) can be f(100)=(100)^2+10sin(100)\>=9990 how would I find x such that…

---

## [Using keyword arguments, default arguments, with and without Unitful](https://discourse.julialang.org/t/using-keyword-arguments-default-arguments-with-and-without-unitful/48493)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 3\
**Last updated:** [October 16, 2020, 6:41pm UTC](https://discourse.julialang.org/t/using-keyword-arguments-default-arguments-with-and-without-unitful/48493 "2020-10-16T18:41:46Z")

</div>

Hi, I have a complicated function which has enough arguments that I want to use keyword args, and I want to have some default values, and in the early stages I like to use Unitful to help me catch dimensional errors, but…

---

## [MethodError: no method matching getindex in JuliaPro](https://discourse.julialang.org/t/methoderror-no-method-matching-getindex-in-juliapro/48504)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 1\
**Last updated:** [October 16, 2020, 6:31pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-getindex-in-juliapro/48504 "2020-10-16T18:31:13Z")

</div>

How to get out of this error? MethodError: no method matching getindex (:: ConstraintRef {Model, JuMP.GenericRangeConstraint {JuMP.GenericAffExpr {Float64, Variable}}}, :: Int64, :: Int64)

---

## [How to get html\_select values in Dash.jl](https://discourse.julialang.org/t/how-to-get-html-select-values-in-dash-jl/48506)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 0\
**Last updated:** [October 16, 2020, 6:08pm UTC](https://discourse.julialang.org/t/how-to-get-html-select-values-in-dash-jl/48506 "2020-10-16T18:08:31Z")

</div>

I gave Dash.jl a try and it looks really nice! I have, however, a question: Suppose I have the following code: using Dash, DashHtmlComponents, DashCoreComponents app = dash() app.layout = html\_div() do htm…

---

## [Type instability in recursion](https://discourse.julialang.org/t/type-instability-in-recursion/48283)

<div class="topic-metadata">

**Author:** [@kogad](https://discourse.julialang.org/u/kogad)\
**Replies:** 11\
**Last updated:** [October 16, 2020, 5:59pm UTC](https://discourse.julialang.org/t/type-instability-in-recursion/48283 "2020-10-16T17:59:41Z")

</div>

Hi, I am implementing genetic programming (GP) in julia. GP needs to evaluate mathematical expressions represented by tree structures, and this is the bottleneck in my implementation. The following code can evaluate tre…

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

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