# Latest

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

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

**Page:** 1443

---

## [Sort and dims=1 for vector input](https://discourse.julialang.org/t/sort-and-dims-1-for-vector-input/58212)

<div class="topic-metadata">

**Author:** [@ovt](https://discourse.julialang.org/u/ovt)\
**Replies:** 8\
**Last updated:** [March 30, 2021, 10:38am UTC](https://discourse.julialang.org/t/sort-and-dims-1-for-vector-input/58212 "2021-03-30T10:38:08Z")

</div>

Hi, I don’t understand why a function like sort doesn’t accept dims=1 for a vector input. Let’s take b=rand(3) for instance. sort(b) works, but sort(b,dims=1) gives an error. It means that, in a case where size(b,2) is …

---

## [Run code non-interactively with a Julia server](https://discourse.julialang.org/t/run-code-non-interactively-with-a-julia-server/58208)

<div class="topic-metadata">

**Author:** [@Chen](https://discourse.julialang.org/u/Chen)\
**Replies:** 2\
**Last updated:** [March 30, 2021, 9:37am UTC](https://discourse.julialang.org/t/run-code-non-interactively-with-a-julia-server/58208 "2021-03-30T09:37:48Z")

</div>

I read from Getting Started · The Julia Language that I can run a Julia script non-interactively: $ julia script.jl arg1 arg2... However, for certain scripts it will take time because Julia will need to compile it firs…

---

## [Equally dividing a circular area](https://discourse.julialang.org/t/equally-dividing-a-circular-area/58151)

<div class="topic-metadata">

**Author:** [@JuliusAurelius](https://discourse.julialang.org/u/JuliusAurelius)\
**Replies:** 6\
**Last updated:** [March 30, 2021, 9:05am UTC](https://discourse.julialang.org/t/equally-dividing-a-circular-area/58151 "2021-03-30T09:05:32Z")

</div>

Hi, I am working on a project where I need to divide a unit circle into roughly equal areas. Ideally I’d have a function location, area = divideCircleArea(nAreas); where nAreas is the number of areas (typically about …

---

## [CoolProp installation in Julia 1.6.0](https://discourse.julialang.org/t/coolprop-installation-in-julia-1-6-0/58205)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 1\
**Last updated:** [March 30, 2021, 8:52am UTC](https://discourse.julialang.org/t/coolprop-installation-in-julia-1-6-0/58205 "2021-03-30T08:52:38Z")

</div>

I managed to install in julia 1.5.4 CoolProp.jl: (@v1.5) pkg\> add C:\\Users\\hermesr\\Documents\\GitHub\\CoolProp.jl Cloning git-repo \`C:\\Users\\hermesr\\Documents\\GitHub\\CoolProp.jl\` Updating git-repo \`C:\\Users\\hermesr…

---

## [Julia 1.6.0 add Package OhMyREPL](https://discourse.julialang.org/t/julia-1-6-0-add-package-ohmyrepl/58148)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 22\
**Last updated:** [March 30, 2021, 8:33am UTC](https://discourse.julialang.org/t/julia-1-6-0-add-package-ohmyrepl/58148 "2021-03-30T08:33:49Z")

</div>

Have the following problem when wanting to add the OhMyREPL package. Julia 1.6.0 does not see the packages installed in the previous version !!! julia\> Pkg.add("OhMyREPL") Updating registry at \`C:\\Users\\hermesr\\.ju…

---

## [Why is plotting with GR faster when using GR\_jll and \`@ccall\` directly](https://discourse.julialang.org/t/why-is-plotting-with-gr-faster-when-using-gr-jll-and-ccall-directly/58199)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 9\
**Last updated:** [March 30, 2021, 6:57am UTC](https://discourse.julialang.org/t/why-is-plotting-with-gr-faster-when-using-gr-jll-and-ccall-directly/58199 "2021-03-30T06:57:01Z")

</div>

Why is plotting with GR faster when using GR\_jll and @ccall directly? @jheinen using GR\_jll \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ \_\_ \_ | Type "?"…

---

## [VS Code semicolon at the end of commented line](https://discourse.julialang.org/t/vs-code-semicolon-at-the-end-of-commented-line/58195)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 3\
**Last updated:** [March 30, 2021, 5:50am UTC](https://discourse.julialang.org/t/vs-code-semicolon-at-the-end-of-commented-line/58195 "2021-03-30T05:50:54Z")

</div>

Minor thing but nevertheless surprising at first sight: is the following a bug in Julia VS Code extension or a feature? # VS Code 1.54.3 Win10; Julia extension 1.1.38 b = 1 # CTRL + ENTER shows value in terminal # …

---

## [Best strategy to update old package versions](https://discourse.julialang.org/t/best-strategy-to-update-old-package-versions/58191)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 2\
**Last updated:** [March 30, 2021, 5:43am UTC](https://discourse.julialang.org/t/best-strategy-to-update-old-package-versions/58191 "2021-03-30T05:43:19Z")

</div>

I have installed several packages, some of them are now old or very old versions. What is the best strategy to update those versions? How can I know what are the packages that are an obstacle for other packages to be up…

---

## [How to test a function in Julia](https://discourse.julialang.org/t/how-to-test-a-function-in-julia/58196)

<div class="topic-metadata">

**Author:** [@oo92](https://discourse.julialang.org/u/oo92)\
**Replies:** 6\
**Last updated:** [March 30, 2021, 12:29am UTC](https://discourse.julialang.org/t/how-to-test-a-function-in-julia/58196 "2021-03-30T00:29:27Z")

</div>

Hi. I have familiarity with unit testing in Python but I couldn’t really figure out how to do it in Julia when it comes to functions. function year\_created(p, language::String) loc = findfirst(p\[:,2\] .== language) re…

---

## [Symbolics.jl, few reflections of beta user](https://discourse.julialang.org/t/symbolics-jl-few-reflections-of-beta-user/58140)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 2\
**Last updated:** [March 29, 2021, 10:23am UTC](https://discourse.julialang.org/t/symbolics-jl-few-reflections-of-beta-user/58140 "2021-03-29T10:23:51Z")

</div>

Part of the March I spend learning basics of Symbolics.jl package and throwing questions and commits with one line changed (I now know, you shouldn’t do that) on JuliaSymbolics team. I want to share few reflections about…

---

## [Printing an array without element type](https://discourse.julialang.org/t/printing-an-array-without-element-type/6731)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [March 29, 2021, 10:20pm UTC](https://discourse.julialang.org/t/printing-an-array-without-element-type/6731 "2021-03-29T22:20:15Z")

</div>

For example, when I print an array of complex numbers, the result shows the element type as “Complex{Float64}”: julia\> c = rand(Complex128,3); println("c = $c") c = Complex{Float64}\[0.77556+0.100567im, 0.482976+0.657349…

---

## [Parsing Nested JSON into DataFrame using JSONTable](https://discourse.julialang.org/t/parsing-nested-json-into-dataframe-using-jsontable/58127)

<div class="topic-metadata">

**Author:** [@clibassi](https://discourse.julialang.org/u/clibassi)\
**Replies:** 1\
**Last updated:** [March 29, 2021, 10:00pm UTC](https://discourse.julialang.org/t/parsing-nested-json-into-dataframe-using-jsontable/58127 "2021-03-29T22:00:31Z")

</div>

I’m trying to parse academic publication data from Open Academic Graph, which stores the data in JSON format, but am running into an issue with parsing the below sample JSON they provide on the website because it is nest…

---

## [Error installing artifact dependency](https://discourse.julialang.org/t/error-installing-artifact-dependency/57961)

<div class="topic-metadata">

**Author:** [@bencherian](https://discourse.julialang.org/u/bencherian)\
**Replies:** 3\
**Last updated:** [March 29, 2021, 9:52pm UTC](https://discourse.julialang.org/t/error-installing-artifact-dependency/57961 "2021-03-29T21:52:01Z")

</div>

I just installed Julia 1.6.0 and was installing a basic set of packages when I got the error below when trying to install Plots.jl (@v1.6) pkg\> add Plots Resolving package versions... Downloaded artifact: XML2 Do…

---

## [Speed Up For Loop for Bounds Checking](https://discourse.julialang.org/t/speed-up-for-loop-for-bounds-checking/58188)

<div class="topic-metadata">

**Author:** [@PJoynt](https://discourse.julialang.org/u/PJoynt)\
**Replies:** 5\
**Last updated:** [March 29, 2021, 9:14pm UTC](https://discourse.julialang.org/t/speed-up-for-loop-for-bounds-checking/58188 "2021-03-29T21:14:31Z")

</div>

Hi, I was wondering if I could get some feedback on how I can increase the performance of this section of code, I am relatively new to Julia and I am not to sure if there is a better way to do this: x = \[-88.58, -86.31,…

---

## [Mux - Api reference docs](https://discourse.julialang.org/t/mux-api-reference-docs/58190)

<div class="topic-metadata">

**Author:** [@djholiver](https://discourse.julialang.org/u/djholiver)\
**Replies:** 0\
**Last updated:** [March 29, 2021, 9:02pm UTC](https://discourse.julialang.org/t/mux-api-reference-docs/58190 "2021-03-29T21:02:36Z")

</div>

Hi, I’m trying to make use of Mux.jl, but have so far been unable to find the API reference. The Readme does give a few hints on getting started, but before I start reviewing the code, I thought I’d ask the community. R…

---

## [PSA: Reasoning about scope rules and multithreading](https://discourse.julialang.org/t/psa-reasoning-about-scope-rules-and-multithreading/56967)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 3\
**Last updated:** [March 29, 2021, 8:58pm UTC](https://discourse.julialang.org/t/psa-reasoning-about-scope-rules-and-multithreading/56967 "2021-03-29T20:58:57Z")

</div>

Perhaps this has been discussed before and I missed it, but during my first experimentation with multithreading, I suddenly realized that Julia’s scoping rules in loops, which a number of people find confusing (including…

---

## [How to draw a line with an arrow in Plot.jl?](https://discourse.julialang.org/t/how-to-draw-a-line-with-an-arrow-in-plot-jl/55974)

<div class="topic-metadata">

**Author:** [@ishihama](https://discourse.julialang.org/u/ishihama)\
**Replies:** 11\
**Last updated:** [March 29, 2021, 8:29pm UTC](https://discourse.julialang.org/t/how-to-draw-a-line-with-an-arrow-in-plot-jl/55974 "2021-03-29T20:29:53Z")

</div>

I wonder how to draw a line with an arrow in Plot.jl. The backend I use is GR, but any backend is OK to me. In the case of GnuPlot, it looks like set arrow 1 from 0,9 to 0,-9. Note, I do not mean I want to extend arrows …

---

## [Hide/Show all code with one click of an 'eye' toggle?](https://discourse.julialang.org/t/hide-show-all-code-with-one-click-of-an-eye-toggle/58187)

<div class="topic-metadata">

**Author:** [@Eggy](https://discourse.julialang.org/u/Eggy)\
**Replies:** 0\
**Last updated:** [March 29, 2021, 7:57pm UTC](https://discourse.julialang.org/t/hide-show-all-code-with-one-click-of-an-eye-toggle/58187 "2021-03-29T19:57:53Z")

</div>

Is there a way to select all the ‘eye’ toggles to show/hide all code with one click? I usually have to go through each cell and unhide code after printing a report without code. It’s time consuming to show/hide them on…

---

## [Are the scope rules applied correctly by Julia?](https://discourse.julialang.org/t/are-the-scope-rules-applied-correctly-by-julia/58175)

<div class="topic-metadata">

**Author:** [@marllos](https://discourse.julialang.org/u/marllos)\
**Replies:** 17\
**Last updated:** [March 29, 2021, 7:38pm UTC](https://discourse.julialang.org/t/are-the-scope-rules-applied-correctly-by-julia/58175 "2021-03-29T19:38:24Z")

</div>

Hello guys! In test1, array A has a local scope, shouldn’t it be global? In test2, array A has a global scope (OK). That seems wrong to me. Both scopes must be global. The difference in the two situations is very subtle!…

---

## [Error running finalizers](https://discourse.julialang.org/t/error-running-finalizers/39247)

<div class="topic-metadata">

**Author:** [@samuel\_okon](https://discourse.julialang.org/u/samuel_okon)\
**Replies:** 2\
**Last updated:** [March 29, 2021, 7:14pm UTC](https://discourse.julialang.org/t/error-running-finalizers/39247 "2021-03-29T19:14:54Z")

</div>

I sometimes get this error when running multi-threaded code (Basically nested @spawn calls) error in running finalizer: ErrorException("concurrency violation detected") . Does anyone know what could cause this?. The funn…

---

## [Ccall for LTO libraries with LLVM backend](https://discourse.julialang.org/t/ccall-for-lto-libraries-with-llvm-backend/58186)

<div class="topic-metadata">

**Author:** [@Artoria2e5](https://discourse.julialang.org/u/Artoria2e5)\
**Replies:** 0\
**Last updated:** [March 29, 2021, 7:10pm UTC](https://discourse.julialang.org/t/ccall-for-lto-libraries-with-llvm-backend/58186 "2021-03-29T19:10:30Z")

</div>

A lot of LLVM languages like Rust support cross-language optimization at link time, allowing e.g. C code to be inlined and further optimized to LLVM’s wish. Since Julia also heavily uses LLVM (albeit in a more… just-in-t…

---

## [Using same x- and y-axis scales in Makie plots](https://discourse.julialang.org/t/using-same-x-and-y-axis-scales-in-makie-plots/58173)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [March 29, 2021, 7:02pm UTC](https://discourse.julialang.org/t/using-same-x-and-y-axis-scales-in-makie-plots/58173 "2021-03-29T19:02:12Z")

</div>

What is the simplest way to use the same scales in the x- and y-axis of the plots generated by Makie? For example, when visualizing a 5×3 array with heatmap() as using GLMakie heatmap(rand(5,3)) I want the individual …

---

## [Confusion between Char and String](https://discourse.julialang.org/t/confusion-between-char-and-string/58179)

<div class="topic-metadata">

**Author:** [@Wei\_Yang](https://discourse.julialang.org/u/Wei_Yang)\
**Replies:** 2\
**Last updated:** [March 29, 2021, 5:57pm UTC](https://discourse.julialang.org/t/confusion-between-char-and-string/58179 "2021-03-29T17:57:02Z")

</div>

In the picture below, everything is suppose to be strings, but an error “Cannot convert Char to String” occurred. Maybe this is a bug, or just me not doing it correctly, not sure.

---

## [Showing images from CIFAR-10 with Plots.jl](https://discourse.julialang.org/t/showing-images-from-cifar-10-with-plots-jl/58143)

<div class="topic-metadata">

**Author:** [@vphpin](https://discourse.julialang.org/u/vphpin)\
**Replies:** 2\
**Last updated:** [March 29, 2021, 1:58pm UTC](https://discourse.julialang.org/t/showing-images-from-cifar-10-with-plots-jl/58143 "2021-03-29T13:58:03Z")

</div>

I wish to show an image from CIFAR-10 loaded from the matlab files available here: CIFAR-10 and CIFAR-100 datasets I had hoped to show the first image with the following code, but have not been able to make it work. us…

---

## [Crazy allocations using CartesianIndices](https://discourse.julialang.org/t/crazy-allocations-using-cartesianindices/42262)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 14\
**Last updated:** [March 29, 2021, 12:44pm UTC](https://discourse.julialang.org/t/crazy-allocations-using-cartesianindices/42262 "2021-03-29T12:44:33Z")

</div>

I have been switching over a 2D flux computation method to use CartesianIndices so it will work for arrays of any dimension, ala Multidimensional algorithms and iteration Unfortunately, I’ve been running into a bunch of…

---

## [Docstring errors when building documentation](https://discourse.julialang.org/t/docstring-errors-when-building-documentation/57547)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [March 29, 2021, 11:40am UTC](https://discourse.julialang.org/t/docstring-errors-when-building-documentation/57547 "2021-03-29T11:40:59Z")

</div>

I’m trying to build documentation for a submodule in a public package. For some reason, I keep getting unable to get the binding for a bunch of functions in the ThreeBody submodule. The docstrings are provided in code, a…

---

## [Error in vscode in Windows when trying to use any package](https://discourse.julialang.org/t/error-in-vscode-in-windows-when-trying-to-use-any-package/58159)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 9\
**Last updated:** [March 29, 2021, 11:26am UTC](https://discourse.julialang.org/t/error-in-vscode-in-windows-when-trying-to-use-any-package/58159 "2021-03-29T11:26:16Z")

</div>

I can’t understand this new error after updating to Julia v1.6. When I try in the REPL inside vscode a command like using Agents or even using Plots I receive the following message. This does not happen in vscode on my M…

---

## [Sqrt(abs(x)) is even faster than sqrt!](https://discourse.julialang.org/t/sqrt-abs-x-is-even-faster-than-sqrt/58154)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 11\
**Last updated:** [March 29, 2021, 11:26am UTC](https://discourse.julialang.org/t/sqrt-abs-x-is-even-faster-than-sqrt/58154 "2021-03-29T11:26:09Z")

</div>

I accidentally found that computing both sqrt and abs is even faster than sqrt alone. julia\> using BenchmarkTools julia\> sqrt\_abs(x) = sqrt(abs(x)); julia\> const N = 1000; julia\> const positive\_x = randn(N) .^ 2 .+ 1…

---

## [Can I use \\parallel or \\perp in variables' names](https://discourse.julialang.org/t/can-i-use-parallel-or-perp-in-variables-names/58120)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 8\
**Last updated:** [March 29, 2021, 11:20am UTC](https://discourse.julialang.org/t/can-i-use-parallel-or-perp-in-variables-names/58120 "2021-03-29T11:20:40Z")

</div>

Some unicode symbols cannot be used in variables’ names. For example, julia\> C∥ = 1 ERROR: syntax: unexpected "=" Stacktrace: \[1\] top-level scope at none:1 julia\> C⟂ = 2 ERROR: syntax: unexpected "=" Stacktrace: \[1\]…

---

## [Makie - Weird error with Observables](https://discourse.julialang.org/t/makie-weird-error-with-observables/57960)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 11\
**Last updated:** [March 29, 2021, 11:17am UTC](https://discourse.julialang.org/t/makie-weird-error-with-observables/57960 "2021-03-29T11:17:03Z")

</div>

Intro Hello!! I am having trouble creating a complete Makie scene that does what I want, because it errors: ERROR: MethodError: no method matching gl\_convert(::String) I’ll explain what I want first, and then the piec…

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

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