# Latest

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

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

**Page:** 1480

---

## [Function with two unitful arguments with the same dimension](https://discourse.julialang.org/t/function-with-two-unitful-arguments-with-the-same-dimension/55978)

<div class="topic-metadata">

**Author:** [@OliverEvans96](https://discourse.julialang.org/u/OliverEvans96)\
**Replies:** 1\
**Last updated:** [February 25, 2021, 3:40am UTC](https://discourse.julialang.org/t/function-with-two-unitful-arguments-with-the-same-dimension/55978 "2021-02-25T03:40:01Z")

</div>

Hello, Using Unitful.jl, you can dispatch on dimensions or specific units. For example, you can write a method that takes any length quantity: using Unitful: m, ft, Length f(x::Length) = println("Got length: $x") Or …

---

## [Fail to precompile MultiJump](https://discourse.julialang.org/t/fail-to-precompile-multijump/25174)

<div class="topic-metadata">

**Author:** [@Kornpong\_Mahitthibur](https://discourse.julialang.org/u/Kornpong_Mahitthibur)\
**Replies:** 11\
**Last updated:** [February 25, 2021, 2:23am UTC](https://discourse.julialang.org/t/fail-to-precompile-multijump/25174 "2021-02-25T02:23:47Z")

</div>

Hi, I tried to precompile MultiJump package on my julia version 1.1.1.1 and JuMP package version v0.19.2 but it fails with the following report. Any idea how to solve this issue? julia\> using MultiJuMP \[ Info: Preco…

---

## [NaN Detector](https://discourse.julialang.org/t/nan-detector/55024)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 10\
**Last updated:** [February 25, 2021, 2:23am UTC](https://discourse.julialang.org/t/nan-detector/55024 "2021-02-25T02:23:39Z")

</div>

I’m trying to find my NaN generator. I think it is due to an uninitialized input variable without proper protection in the code. I know the debugger doesn’t have a nan break and it is very difficult for me to get to th…

---

## ["Learning Bayesian Statistics" podcast episode](https://discourse.julialang.org/t/learning-bayesian-statistics-podcast-episode/37229)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 4\
**Last updated:** [February 25, 2021, 12:54am UTC](https://discourse.julialang.org/t/learning-bayesian-statistics-podcast-episode/37229 "2021-02-25T00:54:05Z")

</div>

I was invited as a guest on this podcast, got to talk a lot about Julia. Episode is #13 Building a Probabilistic Programming Framework in Julia, with Chad Scherrer We talk about Soss, the design and ecosystem of Julia…

---

## [InexactError in learnxiny?](https://discourse.julialang.org/t/inexacterror-in-learnxiny/55967)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 0\
**Last updated:** [February 24, 2021, 10:15pm UTC](https://discourse.julialang.org/t/inexacterror-in-learnxiny/55967 "2021-02-24T22:15:41Z")

</div>

The following issue might surprise newcomers to Julia julia\> y1 = \[1:3;\] 3-element Array{Int64,1}: 1 2 3 julia\> y1\[3\] = y1\[3\] + 5.0 8.0 julia\> y1\[3\] = y1\[3\] + 4.99 ERROR: InexactError: Int64(12.99) Stacktrace: \[1\] I…

---

## [Annotation to elide function call if the return value is unused](https://discourse.julialang.org/t/annotation-to-elide-function-call-if-the-return-value-is-unused/55904)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 5\
**Last updated:** [February 24, 2021, 11:52pm UTC](https://discourse.julialang.org/t/annotation-to-elide-function-call-if-the-return-value-is-unused/55904 "2021-02-24T23:52:26Z")

</div>

Is there some annotation that I can use to give permission to the compiler to elide e.g. x = foo(y) if x is not used? And would it possibly work across function-call boundaries? I’d like to do something like function fo…

---

## [Why specify argument types and return types](https://discourse.julialang.org/t/why-specify-argument-types-and-return-types/55567)

<div class="topic-metadata">

**Author:** [@lancejnelson](https://discourse.julialang.org/u/lancejnelson)\
**Replies:** 38\
**Last updated:** [February 24, 2021, 11:51pm UTC](https://discourse.julialang.org/t/why-specify-argument-types-and-return-types/55567 "2021-02-24T23:51:44Z")

</div>

New Julia user here. Trying to understand the benefit of this: function test(p::Float64,x::Int) :: Float64 \<do something\> end over the more pythonic: function test(p,x) \<do something\> end The same question could…

---

## [POSTDOCTORAL FELLOWSHIP: Computational Methods in Optimization (Brazil)](https://discourse.julialang.org/t/postdoctoral-fellowship-computational-methods-in-optimization-brazil/55935)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 2\
**Last updated:** [February 24, 2021, 11:50pm UTC](https://discourse.julialang.org/t/postdoctoral-fellowship-computational-methods-in-optimization-brazil/55935 "2021-02-24T23:50:16Z")

</div>

POSTDOCTORAL FELLOWSHIP: Computational Methods in Optimization Our Thematic Project announces two-year pos-doctoral fellowship positions to work either at the Institute of Mathematics, Statistics and Scientific Computin…

---

## [CairoMakie and Fontconfig](https://discourse.julialang.org/t/cairomakie-and-fontconfig/55931)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 16\
**Last updated:** [February 24, 2021, 11:49pm UTC](https://discourse.julialang.org/t/cairomakie-and-fontconfig/55931 "2021-02-24T23:49:30Z")

</div>

Hi all. Just wondering if this is a known problem that can be easily fixed, or if it’s a bug. Using Github CI tools, we use Documenter.jl to run and build examples. Recently all of our plotting has moved over to Makie …

---

## [Pass runtime variables to module's \_\_init\_() function](https://discourse.julialang.org/t/pass-runtime-variables-to-modules-init-function/55960)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 5\
**Last updated:** [February 24, 2021, 11:32pm UTC](https://discourse.julialang.org/t/pass-runtime-variables-to-modules-init-function/55960 "2021-02-24T23:32:47Z")

</div>

Julia docs point out that one can define an init() function for a module, which is run when the module is imported. It would be interesting to have a possibility to pass some runtime variables to the init function. The…

---

## [SharedArrays and process affinity](https://discourse.julialang.org/t/sharedarrays-and-process-affinity/55684)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 3\
**Last updated:** [February 24, 2021, 10:50pm UTC](https://discourse.julialang.org/t/sharedarrays-and-process-affinity/55684 "2021-02-24T22:50:57Z")

</div>

I am trying to pin my julia workers to specific CPU cores with ClusterManagers.jl. However, it seems LocalAffinityManager does not work well with SharedArrays. using Distributed, SharedArrays, ClusterManagers addprocs(…

---

## [Package subtopic](https://discourse.julialang.org/t/package-subtopic/55871)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 10\
**Last updated:** [February 24, 2021, 10:31pm UTC](https://discourse.julialang.org/t/package-subtopic/55871 "2021-02-24T22:31:28Z")

</div>

Any reason there isn’t a subtopic under Tooling (or maybe Usage) specifically for package management (Pkg, registry, etc.)?

---

## [Uploading Multi-part files in julia](https://discourse.julialang.org/t/uploading-multi-part-files-in-julia/54200)

<div class="topic-metadata">

**Author:** [@Dsantra92](https://discourse.julialang.org/u/Dsantra92)\
**Replies:** 5\
**Last updated:** [February 24, 2021, 10:25pm UTC](https://discourse.julialang.org/t/uploading-multi-part-files-in-julia/54200 "2021-02-24T22:25:12Z")

</div>

I am trying to upload an image to Slack using their API. I have successfully uploaded some text message using the following function : function send\_message(msg::T, channel\_id::T, token::T) where T\<:AbstractString …

---

## [Bug detected in Arpack](https://discourse.julialang.org/t/bug-detected-in-arpack/55334)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 6\
**Last updated:** [February 24, 2021, 9:23pm UTC](https://discourse.julialang.org/t/bug-detected-in-arpack/55334 "2021-02-24T21:23:40Z")

</div>

I can say with certainty that the Arpack.eigs has a very serious bug. I am running the following simple code to find the 4 smallest eigenvalues and eigenvectors of a 16X16 symmetric matrix. The file xxx.txt is uploaded h…

---

## [Sparse matrix 700x slower than full](https://discourse.julialang.org/t/sparse-matrix-700x-slower-than-full/55887)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 7\
**Last updated:** [February 24, 2021, 9:12pm UTC](https://discourse.julialang.org/t/sparse-matrix-700x-slower-than-full/55887 "2021-02-24T21:12:51Z")

</div>

Hello, I have a big matrix (20000x20000, Float64) which I build in a for loop. The for loop fills that matrix 2 non-consecutive columns at a time (e.g., in step 5 it may fill columns 3 and 5000, from row 1 to 20000). Th…

---

## [Why a symbol starting with a number needs to be between brackets?](https://discourse.julialang.org/t/why-a-symbol-starting-with-a-number-needs-to-be-between-brackets/55901)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 7\
**Last updated:** [February 24, 2021, 7:53pm UTC](https://discourse.julialang.org/t/why-a-symbol-starting-with-a-number-needs-to-be-between-brackets/55901 "2021-02-24T19:53:34Z")

</div>

For example function dayp(interval = :1day) # errors if interval == :1day return 1 elseif interval == :1week return 7 end end One needs to do: function dayp(interval = :(1day)) ... and th…

---

## [\[ANN\] EarlyStopping 0.1.0](https://discourse.julialang.org/t/ann-earlystopping-0-1-0/55761)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 3\
**Last updated:** [February 24, 2021, 7:05pm UTC](https://discourse.julialang.org/t/ann-earlystopping-0-1-0/55761 "2021-02-24T19:05:21Z")

</div>

The EarlyStopper objects defined in EarlyStopping.jl consume a sequence of numbers called losses generated by some external algorithm - generally the training loss or out-of-sample loss of some iterative statistical mode…

---

## [Julia Cuda  Matrix multiplication](https://discourse.julialang.org/t/julia-cuda-matrix-multiplication/21741)

<div class="topic-metadata">

**Author:** [@Noobie76](https://discourse.julialang.org/u/Noobie76)\
**Replies:** 3\
**Last updated:** [February 24, 2021, 6:52pm UTC](https://discourse.julialang.org/t/julia-cuda-matrix-multiplication/21741 "2021-02-24T18:52:38Z")

</div>

Hi, I’m relatively new to Julia and want to implement a numerical method using the CUDA libraries for Julia. I worked myself through the introduction files on GitHub and gained all the basic knowledge to write my own co…

---

## [Julia: from total beginner to power user (youtube channel)](https://discourse.julialang.org/t/julia-from-total-beginner-to-power-user-youtube-channel/55882)

<div class="topic-metadata">

**Author:** [@rvezy](https://discourse.julialang.org/u/rvezy)\
**Replies:** 9\
**Last updated:** [February 24, 2021, 6:22pm UTC](https://discourse.julialang.org/t/julia-from-total-beginner-to-power-user-youtube-channel/55882 "2021-02-24T18:22:34Z")

</div>

Hey, just a little bit of self promotion, I started a YouTube channel to teach Julia to beginner programmers. There’s six videos atm. I felt resources like this were scarce, and I remembered learning programming watching…

---

## [Creation/Definition of global variable for each step of a loop](https://discourse.julialang.org/t/creation-definition-of-global-variable-for-each-step-of-a-loop/55881)

<div class="topic-metadata">

**Author:** [@donkeysaddle](https://discourse.julialang.org/u/donkeysaddle)\
**Replies:** 11\
**Last updated:** [February 24, 2021, 6:14pm UTC](https://discourse.julialang.org/t/creation-definition-of-global-variable-for-each-step-of-a-loop/55881 "2021-02-24T18:14:14Z")

</div>

Is there a way to create/define a new variable for each step inside a loop? Pseudocode: for i in 1:3 xi = i end The result of this loop would be x1 = 1, x2 = 2, and x3 = 3. Thanks, DS

---

## [Failing to show unicode character in julia file](https://discourse.julialang.org/t/failing-to-show-unicode-character-in-julia-file/55938)

<div class="topic-metadata">

**Author:** [@DocDave](https://discourse.julialang.org/u/DocDave)\
**Replies:** 2\
**Last updated:** [February 24, 2021, 5:31pm UTC](https://discourse.julialang.org/t/failing-to-show-unicode-character-in-julia-file/55938 "2021-02-24T17:31:30Z")

</div>

I am attempting to use the interpunct (·) unicode character within some code, which should be obtainable using the \\cdot TeX command. Tab-completing this command within .jl files gives a blank (whitespace) character but …

---

## [How to use a function in a module without specifying the module name](https://discourse.julialang.org/t/how-to-use-a-function-in-a-module-without-specifying-the-module-name/55942)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 1\
**Last updated:** [February 24, 2021, 4:41pm UTC](https://discourse.julialang.org/t/how-to-use-a-function-in-a-module-without-specifying-the-module-name/55942 "2021-02-24T16:41:01Z")

</div>

I have the following folder and module ExampleFolder - SampleModule.jl - main.jl main: import .Example function main() println(Example.greet\_user("Svetlana")) end main() Is there a way I can say println(gr…

---

## [Is there a simple/intuitive way to partition a matrix by arbitrary strides? Like i](https://discourse.julialang.org/t/is-there-a-simple-intuitive-way-to-partition-a-matrix-by-arbitrary-strides-like-i/55863)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 9\
**Last updated:** [February 24, 2021, 3:26pm UTC](https://discourse.julialang.org/t/is-there-a-simple-intuitive-way-to-partition-a-matrix-by-arbitrary-strides-like-i/55863 "2021-02-24T15:26:12Z")

</div>

Is there a simple/intuitive way to partition a matrix by arbitrary strides? Like if I had a 20 x 5 matrix and wanted the output to be a vector/iterable of 10x5, 3x5, 4x5, 3x5 ? Essentially, the “split” part of split-appl…

---

## [How to implement "dependent constants" in a module](https://discourse.julialang.org/t/how-to-implement-dependent-constants-in-a-module/55766)

<div class="topic-metadata">

**Author:** [@triceert](https://discourse.julialang.org/u/triceert)\
**Replies:** 8\
**Last updated:** [February 24, 2021, 3:14pm UTC](https://discourse.julialang.org/t/how-to-implement-dependent-constants-in-a-module/55766 "2021-02-24T15:14:11Z")

</div>

So from what I learned in Julia so far, constants make everything faster. So if I have a script that calculates a value that is dependent on the input of the script but then stays constant throughout the script (e.g. a D…

---

## [Best way to create/assign variables based on strings](https://discourse.julialang.org/t/best-way-to-create-assign-variables-based-on-strings/3001)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 20\
**Last updated:** [February 24, 2021, 3:12pm UTC](https://discourse.julialang.org/t/best-way-to-create-assign-variables-based-on-strings/3001 "2021-02-24T15:12:58Z")

</div>

Hi all Which would be best way to create/assign variables based on strings. Assuming I have this: string = “AA” string = get(“https://get.some.unknown.very.short.string”) would like to do the following AA = 1 n…

---

## [IOError: could not spawn 'cmd' : no such file or directory \<ENOENT\>](https://discourse.julialang.org/t/ioerror-could-not-spawn-cmd-no-such-file-or-directory-enoent/55898)

<div class="topic-metadata">

**Author:** [@abbasn110](https://discourse.julialang.org/u/abbasn110)\
**Replies:** 5\
**Last updated:** [February 24, 2021, 3:05pm UTC](https://discourse.julialang.org/t/ioerror-could-not-spawn-cmd-no-such-file-or-directory-enoent/55898 "2021-02-24T15:05:08Z")

</div>

hi Im kinda new on Julia. While working on REPL, when I want to switch to cmd and type it on Shell I get this error. IOError: could not spawn ‘cmd’ : no such file or directory I also added installation directory to en…

---

## [Array basics](https://discourse.julialang.org/t/array-basics/55919)

<div class="topic-metadata">

**Author:** [@AlexanderChen](https://discourse.julialang.org/u/AlexanderChen)\
**Replies:** 17\
**Last updated:** [February 24, 2021, 2:23pm UTC](https://discourse.julialang.org/t/array-basics/55919 "2021-02-24T14:23:19Z")

</div>

Hi, In Haskell when you declare a function you are expected to say before hand what you expect as input and output for instance \[Integers\] → Integer. How does one do this is Julia. I am no Haskell expert by any strech b…

---

## [On the performance of function calls that depends on a variable](https://discourse.julialang.org/t/on-the-performance-of-function-calls-that-depends-on-a-variable/55573)

<div class="topic-metadata">

**Author:** [@moudbis](https://discourse.julialang.org/u/moudbis)\
**Replies:** 12\
**Last updated:** [February 24, 2021, 2:07pm UTC](https://discourse.julialang.org/t/on-the-performance-of-function-calls-that-depends-on-a-variable/55573 "2021-02-24T14:07:39Z")

</div>

Hello everyone, Sorry, it’s going to be a bit long. I’m trying to reach performance in Julia for function calls that depends on a variable. It means given a line in my code, I can’t tell which function will be run in a…

---

## [Function as argument: name, symbol or string?](https://discourse.julialang.org/t/function-as-argument-name-symbol-or-string/55926)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [February 24, 2021, 1:10pm UTC](https://discourse.julialang.org/t/function-as-argument-name-symbol-or-string/55926 "2021-02-24T13:10:41Z")

</div>

I have a function (a Machine Learning algorithm) where one of the parameters is a function (custom versions of gini, variance or entropy). Do you advice using as parameter the name of the function, the symbol or a text …

---

## [Set major and minor ticks](https://discourse.julialang.org/t/set-major-and-minor-ticks/55930)

<div class="topic-metadata">

**Author:** [@Zaim\_Awang](https://discourse.julialang.org/u/Zaim_Awang)\
**Replies:** 0\
**Last updated:** [February 24, 2021, 12:55pm UTC](https://discourse.julialang.org/t/set-major-and-minor-ticks/55930 "2021-02-24T12:55:01Z")

</div>

I am using plotly and trying to get my dates showing every month but now it is showing every 2 months. I looked at the documentation and tried various attributes as you can see below to no avail. Thanks in advance. u…

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

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