News for hackers. Stuff that matters.
Re:Julia 1.5 Highlights by daxfohl on Monday August 03, 2020 @12:56PM (#24040210)
How does rand get faster? I would think rand would be so well explored that all mature languages reuse the same implementation. Is it written in C or assembly, or does it ccall, or is it written in Julia itself?
Re:Julia 1.5 Highlights by igg on Tuesday August 04, 2020 @03:02AM (#24047433)
It is Julia all the way down.

  julia> @which randn(1000)
  randn(dims::Integer...) in Random at ~/Software/Julia/share/julia/stdlib/v1.5/Random/src/normal.jl:210

  julia> @edit randn(1000)
  # Opens the normal.jl file in your editor

  julia> @run randn(1000)
  # Starts the debugger in VSCode

Digging deeper, at least one of the PRs [1] is based on a 2018 paper [2]

[1] https://github.com/JuliaLang/julia/pull/29240 [2] https://arxiv.org/abs/1805.10941

Re:Julia 1.5 Highlights by coliveira on Monday August 03, 2020 @01:07PM (#24040395)
I don't know Julia's implementation, but random number generation is far from being standard across languages. There are several algorithms with their own pros/cons, and as architectures change, so change the requirements on good random number generators.
Re:Julia 1.5 Highlights by hellofunk on Monday August 03, 2020 @01:32PM (#24040743)
> I would think rand would be so well explored

On the contrary, random number generation has no general solution and remains an active area of research in many fields that depend on it.

Re:Julia 1.5 Highlights by pletnes on Monday August 03, 2020 @02:01PM (#24041114)
Also, different use cases put focus on different quality measures - period, correlations between each generated number, performance... there is room for many useful algorithms.