# Latest

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

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

**Page:** 1516

---

## [Get shortest/longest string in array](https://discourse.julialang.org/t/get-shortest-longest-string-in-array/53739)

<div class="topic-metadata">

**Author:** [@ferrolho](https://discourse.julialang.org/u/ferrolho)\
**Replies:** 24\
**Last updated:** [January 22, 2021, 1:44pm UTC](https://discourse.julialang.org/t/get-shortest-longest-string-in-array/53739 "2021-01-22T13:44:12Z")

</div>

What is the best way to retrieve the shortest or longest string in an array? If there are multiple candidates having the same minimum/maximum length, it’s okay to return just the first one. This can be solved with the s…

---

## [Reverse multidimensional array](https://discourse.julialang.org/t/reverse-multidimensional-array/53777)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 6\
**Last updated:** [January 22, 2021, 1:32pm UTC](https://discourse.julialang.org/t/reverse-multidimensional-array/53777 "2021-01-22T13:32:33Z")

</div>

Hey, recently I wanted to reverse a multidimensional array. I didn’t find a built-in solution but only this post on StackOverflow. I was wondering what’s a proper implementation. I came up with the following. reverse\_2 …

---

## [Displaying rack diagrams in Pluto - or in general really](https://discourse.julialang.org/t/displaying-rack-diagrams-in-pluto-or-in-general-really/53775)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 12:21pm UTC](https://discourse.julialang.org/t/displaying-rack-diagrams-in-pluto-or-in-general-really/53775 "2021-01-22T12:21:30Z")

</div>

If I have some data which I want to be displayed as rectangular boxes which contain a name, what is a good way of doing this? Specifically these are rack diagrams - which are normally displayed in Visio or indeed Excel …

---

## [How to use @layout in plots?](https://discourse.julialang.org/t/how-to-use-layout-in-plots/53722)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 3\
**Last updated:** [January 22, 2021, 12:12pm UTC](https://discourse.julialang.org/t/how-to-use-layout-in-plots/53722 "2021-01-22T12:12:40Z")

</div>

Hello, I am trying to create layouts for subplots, which are not pure grids. However, I find very little instructions on this. What I have found is a small section in the docs (Layouts · Plots which also contains a brok…

---

## [Error building GLMakie no \`/etc/drirc\`](https://discourse.julialang.org/t/error-building-glmakie-no-etc-drirc/53778)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 0\
**Last updated:** [January 22, 2021, 11:36am UTC](https://discourse.julialang.org/t/error-building-glmakie-no-etc-drirc/53778 "2021-01-22T11:36:16Z")

</div>

I am trying to build GLMakie.jl on Manjaro an a Renoir notebook and am getting the following error if I run LIBGL\_DEBUG=verbose julia. Without the debug it just fails without any hint. (@v1.5) pkg\> build GLMakie Buil…

---

## [Check a Future object for remote errors](https://discourse.julialang.org/t/check-a-future-object-for-remote-errors/53768)

<div class="topic-metadata">

**Author:** [@matthiasbe](https://discourse.julialang.org/u/matthiasbe)\
**Replies:** 1\
**Last updated:** [January 22, 2021, 8:51am UTC](https://discourse.julialang.org/t/check-a-future-object-for-remote-errors/53768 "2021-01-22T08:51:23Z")

</div>

Is it possible to check a Future object for any remote error without actually retrieving the remotely computed data ? Sometimes the data is very large and using a fetch() result in undesired large data mouvement. Consid…

---

## [Plotting functions directly in Makie](https://discourse.julialang.org/t/plotting-functions-directly-in-makie/53612)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 8:36am UTC](https://discourse.julialang.org/t/plotting-functions-directly-in-makie/53612 "2021-01-22T08:36:33Z")

</div>

A syntax from Plots.jl that I love is plot(x-\>x^2), and plot(cos), where I can add a second and third argument to specify a range of x-values. This is really an example of delicious syntax - straight to the point. I say…

---

## [MLJ: selecting rows and columns for training in evaluate! for kernel regression](https://discourse.julialang.org/t/mlj-selecting-rows-and-columns-for-training-in-evaluate-for-kernel-regression/52832)

<div class="topic-metadata">

**Author:** [@Pere](https://discourse.julialang.org/u/Pere)\
**Replies:** 8\
**Last updated:** [January 22, 2021, 8:33am UTC](https://discourse.julialang.org/t/mlj-selecting-rows-and-columns-for-training-in-evaluate-for-kernel-regression/52832 "2021-01-22T08:33:19Z")

</div>

Hi everyone. This is my first post here, I’ve asked this on stackoverflow but have had no luck. Perhaps someone can point me in the right direction. I want to implement a kernel ridge regression that also works within M…

---

## [Create random numbers into a same array](https://discourse.julialang.org/t/create-random-numbers-into-a-same-array/53766)

<div class="topic-metadata">

**Author:** [@Xijiang\_Yu](https://discourse.julialang.org/u/Xijiang_Yu)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 8:33am UTC](https://discourse.julialang.org/t/create-random-numbers-into-a-same-array/53766 "2021-01-22T08:33:06Z")

</div>

Is there any way to create random numbers into a same array? I am simulating using rand(n) ~1M times, i.e. to determine snp allele to drop into the next generation. This causes a lot of allocations. Or is there some bet…

---

## [HPC cluster SSH security issue? (password vs passwordless ssh keypair)](https://discourse.julialang.org/t/hpc-cluster-ssh-security-issue-password-vs-passwordless-ssh-keypair/53664)

<div class="topic-metadata">

**Author:** [@henrikjaerleblad](https://discourse.julialang.org/u/henrikjaerleblad)\
**Replies:** 7\
**Last updated:** [January 22, 2021, 7:21am UTC](https://discourse.julialang.org/t/hpc-cluster-ssh-security-issue-password-vs-passwordless-ssh-keypair/53664 "2021-01-22T07:21:16Z")

</div>

Hello, Previously, I used to be able to run multi-core jobs on my university’s HPC SLURM cluster like this: #!/bin/bash #SBATCH --mail-type=ALL #SBATCH --mail-user=mymail@mailymail.country #SBATCH --export=ALL #SBA…

---

## [Move github repository of a registered julia package](https://discourse.julialang.org/t/move-github-repository-of-a-registered-julia-package/3495)

<div class="topic-metadata">

**Author:** [@bastikr](https://discourse.julialang.org/u/bastikr)\
**Replies:** 7\
**Last updated:** [January 22, 2021, 6:29am UTC](https://discourse.julialang.org/t/move-github-repository-of-a-registered-julia-package/3495 "2021-01-22T06:29:48Z")

</div>

I would like to move a registered package from my github account to a github organization. Can I just submit a pull request where I change the url file in METADATA.jl accordingly or are there additional steps that have t…

---

## [Problems with prompt variable](https://discourse.julialang.org/t/problems-with-prompt-variable/53757)

<div class="topic-metadata">

**Author:** [@emmanuelncb](https://discourse.julialang.org/u/emmanuelncb)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 4:51am UTC](https://discourse.julialang.org/t/problems-with-prompt-variable/53757 "2021-01-22T04:51:09Z")

</div>

Hi, i am studing julia lang and i want customize my prompt, but, the code stay some spaces after mark instead one space only and all times that i press one key the first line of prompt be duplicate. How can i fix this? v…

---

## [I cannot get close to full speed up in parallel](https://discourse.julialang.org/t/i-cannot-get-close-to-full-speed-up-in-parallel/53751)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 4\
**Last updated:** [January 22, 2021, 3:37am UTC](https://discourse.julialang.org/t/i-cannot-get-close-to-full-speed-up-in-parallel/53751 "2021-01-22T03:37:29Z")

</div>

I have a code that is embarrassingly parallel, but I cannot get full its speed up. The dummy code is here: function points\_on\_sphere\_surface(num\_pts=100, R=2) indices = 1:num\_pts .+ 0.5 ϕ = acos.(1 .- 2\*indic…

---

## [ModelingToolkit.jl: ERROR: LoadError: UndefVarError: Sym not defined](https://discourse.julialang.org/t/modelingtoolkit-jl-error-loaderror-undefvarerror-sym-not-defined/53569)

<div class="topic-metadata">

**Author:** [@grheadrick](https://discourse.julialang.org/u/grheadrick)\
**Replies:** 4\
**Last updated:** [January 22, 2021, 2:33am UTC](https://discourse.julialang.org/t/modelingtoolkit-jl-error-loaderror-undefvarerror-sym-not-defined/53569 "2021-01-22T02:33:24Z")

</div>

I’m just getting started with SciML and am looking at ModelingToolkit.jl. The macros work: @variables x y But in docs there is a macro free usage . The above code should also be equivalent to: x = Num(Sym{Float64}(:x)…

---

## [Dynamically schedule work onto pmap worker pool?](https://discourse.julialang.org/t/dynamically-schedule-work-onto-pmap-worker-pool/53701)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 6\
**Last updated:** [January 22, 2021, 1:13am UTC](https://discourse.julialang.org/t/dynamically-schedule-work-onto-pmap-worker-pool/53701 "2021-01-22T01:13:24Z")

</div>

I’ve got N chunks of equally long-running work I want to compute across \<N processes, but one chunk is very different code / results than the others. So code-wise, I’d like to schedule that chunk alone, then pmap over th…

---

## [How to make this AFT regression stable?](https://discourse.julialang.org/t/how-to-make-this-aft-regression-stable/53685)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 5\
**Last updated:** [January 22, 2021, 1:01am UTC](https://discourse.julialang.org/t/how-to-make-this-aft-regression-stable/53685 "2021-01-22T01:01:00Z")

</div>

I have adapted this excellent post by @aaowens to fit a right-censored AFT regression model, but for some reason the likelihood is not compatible with forwarddiff. using Distributions,Optim function AFT(pvec,data) f…

---

## [Dot abruptly ends Julia session](https://discourse.julialang.org/t/dot-abruptly-ends-julia-session/53748)

<div class="topic-metadata">

**Author:** [@jhat](https://discourse.julialang.org/u/jhat)\
**Replies:** 4\
**Last updated:** [January 22, 2021, 12:38am UTC](https://discourse.julialang.org/t/dot-abruptly-ends-julia-session/53748 "2021-01-22T00:38:33Z")

</div>

I’m new to Julia. The following code abruptly ends my Julia 1.5.3 session (Julia has exited.) at ii = 14 when I’m working in Windows 10, but it runs to completion when converting to ComplexF32. When I run it on a Mac the…

---

## [Help with increasing performance of specific function](https://discourse.julialang.org/t/help-with-increasing-performance-of-specific-function/53737)

<div class="topic-metadata">

**Author:** [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Replies:** 8\
**Last updated:** [January 21, 2021, 10:44pm UTC](https://discourse.julialang.org/t/help-with-increasing-performance-of-specific-function/53737 "2021-01-21T22:44:39Z")

</div>

Hello, I’m trying to translate in Julia the doubleCenter function from this article. The function takes a matrix as an argument, and doubly centers it, meaning that it subtracts to each element the mean of its row and t…

---

## [Shorthand for dispatch types](https://discourse.julialang.org/t/shorthand-for-dispatch-types/53631)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 5\
**Last updated:** [January 21, 2021, 10:24pm UTC](https://discourse.julialang.org/t/shorthand-for-dispatch-types/53631 "2021-01-21T22:24:22Z")

</div>

What do you think of providing a shorthand for creating types that are defined just for dispatching to relevant methods. For example (https://bkamins.github.io/julialang/2020/11/27/abt.html): abstract type ABRule end st…

---

## [Creating Column Matrix with Array Literals](https://discourse.julialang.org/t/creating-column-matrix-with-array-literals/53742)

<div class="topic-metadata">

**Author:** [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Replies:** 4\
**Last updated:** [January 21, 2021, 8:46pm UTC](https://discourse.julialang.org/t/creating-column-matrix-with-array-literals/53742 "2021-01-21T20:46:35Z")

</div>

Hi, How we can create a column matrix (i.e. nx1) with array literals? I am aware of other ways for achieving this such as using initializer functions such as “zeros” and “ones”. but how we can do this with array literals…

---

## [How to open, run and see results form .jl file](https://discourse.julialang.org/t/how-to-open-run-and-see-results-form-jl-file/53727)

<div class="topic-metadata">

**Author:** [@Slawomir\_Kwiecien](https://discourse.julialang.org/u/Slawomir_Kwiecien)\
**Replies:** 2\
**Last updated:** [January 21, 2021, 8:23pm UTC](https://discourse.julialang.org/t/how-to-open-run-and-see-results-form-jl-file/53727 "2021-01-21T20:23:45Z")

</div>

I have installed Julia and Pluto. Now I’d like to open .jl files, run those files and see results. Files are from \[https://github.com/vinhphunguyen/MPM-Julia\] (https://www.researchgate.net/deref/https%3A%2F%2Fgithub.com%…

---

## [Only the explicit Euler method successfully solves my ODE](https://discourse.julialang.org/t/only-the-explicit-euler-method-successfully-solves-my-ode/53704)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 8\
**Last updated:** [January 21, 2021, 8:17pm UTC](https://discourse.julialang.org/t/only-the-explicit-euler-method-successfully-solves-my-ode/53704 "2021-01-21T20:17:00Z")

</div>

I realize this is not a very good question due to the nature of the problem, but I have to try since I’ve spent hours debugging this. I am interested in solving a set of ODEs that can be written as follows: using Ellipt…

---

## [CSV, white spaces and data type. Force Float on empty fields](https://discourse.julialang.org/t/csv-white-spaces-and-data-type-force-float-on-empty-fields/53702)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 23\
**Last updated:** [January 21, 2021, 7:48pm UTC](https://discourse.julialang.org/t/csv-white-spaces-and-data-type-force-float-on-empty-fields/53702 "2021-01-21T19:48:06Z")

</div>

Hi, I have a csv file where either the column names or the column themselves have spaces like # date , lat , lon , smajax , sminax , strike, q , 1904-04-04 10:02:34.56 , 41.802 , 23.108 , …

---

## [Internship at Hydro-Québec](https://discourse.julialang.org/t/internship-at-hydro-quebec/53731)

<div class="topic-metadata">

**Author:** [@Balinus](https://discourse.julialang.org/u/Balinus)\
**Replies:** 0\
**Last updated:** [January 21, 2021, 4:03pm UTC](https://discourse.julialang.org/t/internship-at-hydro-quebec/53731 "2021-01-21T16:03:43Z")

</div>

Hello, here’s an internship at Hydro-Québec. The 4-months internship involves possible work with Julia (the candidate can chose) and the domain of atmospheric sciences, weather predictions and data. Note that the work …

---

## [Iteration/getindex performance of AbstractArray wrapper-types](https://discourse.julialang.org/t/iteration-getindex-performance-of-abstractarray-wrapper-types/53729)

<div class="topic-metadata">

**Author:** [@tchr](https://discourse.julialang.org/u/tchr)\
**Replies:** 2\
**Last updated:** [January 21, 2021, 7:07pm UTC](https://discourse.julialang.org/t/iteration-getindex-performance-of-abstractarray-wrapper-types/53729 "2021-01-21T19:07:03Z")

</div>

I hit what I think is a surprising performance-snag for custom array-wrapper types that subtype AbstractArray. The issue is best illustrated by example: suppose I define a thin wrapper over a vector, like so: import Ba…

---

## [How to handle missing values in conditions](https://discourse.julialang.org/t/how-to-handle-missing-values-in-conditions/53736)

<div class="topic-metadata">

**Author:** [@max\_schwarzer](https://discourse.julialang.org/u/max_schwarzer)\
**Replies:** 3\
**Last updated:** [January 21, 2021, 6:32pm UTC](https://discourse.julialang.org/t/how-to-handle-missing-values-in-conditions/53736 "2021-01-21T18:32:40Z")

</div>

I have a dataframe with zeros and missing values and I would like to create an indicator array that assigns a one if the value is zero and a zero otherwise. I would like missing values to be included in this otherwise st…

---

## [Non-orthogonality in SVD solver!](https://discourse.julialang.org/t/non-orthogonality-in-svd-solver/53733)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 0\
**Last updated:** [January 21, 2021, 4:39pm UTC](https://discourse.julialang.org/t/non-orthogonality-in-svd-solver/53733 "2021-01-21T16:39:51Z")

</div>

Hi, I am using KrylovKit to compute the SVD of a sparse, asymmetric NXN matrix. The creation of the matrix comes from some previous complicated normalization steps. The SVD is supposed to decompose K as K = U\\Lambda V^\*,…

---

## [How does the module system actually work?](https://discourse.julialang.org/t/how-does-the-module-system-actually-work/53548)

<div class="topic-metadata">

**Author:** [@alice](https://discourse.julialang.org/u/alice)\
**Replies:** 20\
**Last updated:** [January 21, 2021, 4:25pm UTC](https://discourse.julialang.org/t/how-does-the-module-system-actually-work/53548 "2021-01-21T16:25:49Z")

</div>

Currently all of my files in my project look something like this: module ConstraintSetMod using ..DatasetMod export ConstraintSet, ... struct ConstraintSet ... fields ... end ... functions ... end And I have a f…

---

## [Syntactical sugar for \`getfield\`](https://discourse.julialang.org/t/syntactical-sugar-for-getfield/52075)

<div class="topic-metadata">

**Author:** [@gcalderone](https://discourse.julialang.org/u/gcalderone)\
**Replies:** 18\
**Last updated:** [January 21, 2021, 4:19pm UTC](https://discourse.julialang.org/t/syntactical-sugar-for-getfield/52075 "2021-01-21T16:19:07Z")

</div>

Each time I implement a new getproperty method for a structure I found myself filling the code with lengthy (and sometimes nested) calls to getfield. So far the best looking solution I came up with is: ⋄ = getfield …

---

## [Extending \`getproperty\`](https://discourse.julialang.org/t/extending-getproperty/53728)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 2\
**Last updated:** [January 21, 2021, 3:38pm UTC](https://discourse.julialang.org/t/extending-getproperty/53728 "2021-01-21T15:38:37Z")

</div>

So I want to extend getproperty (and likewise setproperty!) for a custom type, a bit like what LinearAlgebra.LU does. I see that this is usually done with an if/else chain; however, this is not very Julian in style, and …

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

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