# Julia v1.4.0-rc1 is now available

**URL:** <https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715>\
**Category:** Announcements\
**Tags:** release\
**Created:** [January 23, 2020, 10:16pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715 "2020-01-23T22:16:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ararslan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ararslan/32/3825_2.png) [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Post date:** [January 23, 2020, 10:16pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/1 "2020-01-23T22:16:55Z")

</div>

The first release candidate for Julia v1.4.0 is now available. You can get binaries at [Download Julia](https://julialang.org/downloads) for Linux (i686, x86-64, ARMv7, AArch64), macOS, FreeBSD (x86-64), and Windows (32-, 64-bit). Check out the [NEWS file](https://github.com/JuliaLang/julia/blob/v1.4.0-rc1/NEWS.md) to see what will be new in 1.4.0.

As a release candidate, this should **not** be considered production-ready. Rather, it’s intended to give users a chance to try out their code with 1.4.0 prior to a full release. Note that 1.4 on Travis, AppVeyor (with [Appveyor.jl](https://github.com/JuliaCI/Appveyor.jl)), and Cirrus (with [CirrusCI.jl](https://github.com/ararslan/CirrusCI.jl)) now points to 1.4.0-rc1.

Let us know in the [issue tracker](https://github.com/JuliaLang/julia/issues) if you run into any issues. (Note that any bugs you may encounter should be posted there rather than being discussed in this thread for developer visibility.) Assuming no problems arise with this release candidate, we’ll move forward with a full 1.4.0 release soon.

---

<div class="post-metadata">

**Author:** ![jonathan-durbin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonathan-durbin/32/11468_2.png) [@jonathan-durbin](https://discourse.julialang.org/u/jonathan-durbin)\
**Post date:** [January 23, 2020, 11:13pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/2 "2020-01-23T23:13:32Z")

</div>

That `a[begin]` feature is interesting and confusing to me. What’s the motivation for it? How is it different from `a[1]`? I read through issue [#33946](https://github.com/JuliaLang/julia/pull/33946) but couldn’t find a good reason.

---

<div class="post-metadata">

**Author:** ![iamed2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iamed2/32/215082_2.png) [@iamed2](https://discourse.julialang.org/u/iamed2)\
**Post date:** [January 23, 2020, 11:18pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/3 "2020-01-23T23:18:42Z")

</div>

Not every `AbstractArray` begins at `1`. The most trivial example is [GitHub - JuliaArrays/OffsetArrays.jl: Fortran-like arrays with arbitrary, zero or negative starting indices.](https://github.com/JuliaArrays/OffsetArrays.jl) but there are others which may not even be indexed by integers.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [January 24, 2020, 6:40am UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/4 "2020-01-24T06:40:27Z")

</div>

Should then be possible to consider a[:4] (and a[4:]) like in Python instead of throwing an error, or would be breaking existing code?

---

<div class="post-metadata">

**Author:** ![rapus95](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rapus95/32/3773_2.png) [@rapus95](https://discourse.julialang.org/u/rapus95)\
**Post date:** [January 24, 2020, 7:48am UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/5 "2020-01-24T07:48:32Z")

</div>

You mean as shortcut for `a[begin:4]` and `a[4:end]`? While I see that it’s a bit shorter than the (new) 1.4 style, I find it harder to read aswell. And it begins to fail once you want to use variables:

```julia
currentendindex = 5
a[:currentendindex]
#-> Error, here, getindex is not defined for symbol

```

OTOH trying to resemble python hasn’t been the target at any time 😃. And the new syntax with `begin` and `end` just feels very clear & concise IMO.

---

<div class="post-metadata">

**Author:** ![fverdugo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fverdugo/32/9446_2.png) [@fverdugo](https://discourse.julialang.org/u/fverdugo)\
**Post date:** [January 24, 2020, 8:26am UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/6 "2020-01-24T08:26:32Z")

</div>

> [@ararslan](#):
>
> As a release candidate, this should **not** be considered production-ready. Rather, it’s intended to give users a chance to try out their code with 1.4.0 prior to a full release. Note that 1.4 on Travis, AppVeyor (with [Appveyor.jl](https://github.com/JuliaCI/Appveyor.jl)), and Cirrus (with [CirrusCI.jl](https://github.com/ararslan/CirrusCI.jl)) now points to 1.4.0-rc1.

Hi!

I have activated 1.4 in travis, but I get the following error:

```julia
$ curl -A "$CURL_USER_AGENT" -sSf -L --retry 7 'https://julialang-s3.julialang.org/bin/linux/x64/1.4/julia-1.4-latest-linux-x86_64.tar.gz' | tar -C ~/julia -x -z --strip-components=1 -f -
curl: (22) The requested URL returned error: 404 Not Found

```

You can see the full log of my build at:  
[https://travis-ci.com/gridap/Gridap.jl/jobs/279625250?utm\_medium=notification&utm\_source=email](https://travis-ci.com/gridap/Gridap.jl/jobs/279625250?utm_medium=notification&utm_source=email)

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 24, 2020, 9:18am UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/7 "2020-01-24T09:18:54Z")

</div>

Consider the possibility where you would use a variable instead of a literal integer, eg

```julia
i = 3
a[:i]

```

and you will see that it is problematic since `:i` is a symbol.

@jonathan-durbin: note that the introduction of `begin` has been in the works for a long time. If you want to participate in these discussions, it is best to subscribe to notifications from the Julia repository.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [January 24, 2020, 10:01am UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/8 "2020-01-24T10:01:05Z")

</div>

I am being a bit dumb…, a link to the new features/Changelog for 1.4.0-rc1 would be useful.

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [January 24, 2020, 10:07am UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/9 "2020-01-24T10:07:34Z")

</div>

Yes, it’s a bit confusing, it’s already history:  
[https://github.com/JuliaLang/julia/blob/master/HISTORY.md#julia-v14-release-notes](https://github.com/JuliaLang/julia/blob/master/HISTORY.md#julia-v14-release-notes)

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [January 24, 2020, 10:59am UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/10 "2020-01-24T10:59:10Z")

</div>

See also [Julia v1.4 Release Notes · The Julia Language](https://docs.julialang.org/en/v1.4.0-rc1.0/NEWS/)

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [January 24, 2020, 11:07am UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/11 "2020-01-24T11:07:54Z")

</div>

And [`RandomBasedArray`](https://github.com/giordano/RandomBasedArrays.jl)s can start with any number, in fact a different one every time you try to access an element.

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [January 24, 2020, 12:27pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/12 "2020-01-24T12:27:56Z")

</div>

Pre-release binaries are not available under those URLs

---

<div class="post-metadata">

**Author:** ![Jean\_Michel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jean_michel/32/8282_2.png) [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Post date:** [January 24, 2020, 1:12pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/13 "2020-01-24T13:12:47Z")

</div>

I have a somewhat strange problem with 1.4 rc1. Consider the following

```julia
julia> g(S,e,p)=S[1 + map(x->mod(x, e), -p)]
g (generic function with 1 method)

julia> s="g(S,e,p)=S[1 + map(x->mod(x, e), -p)]"
"g(S,e,p)=S[1 + map(x->mod(x, e), -p)]"

julia> print(Meta.parse(s,1)[1])
g(S, e, p) = begin
        #= none:1 =#
        S[1 + map((x->(#= none:1 =#;
                            mod(x, e))), -p)]
    end

```

now copy and paste the output of the last `print` to the REPL

```julia
julia> g(S, e, p) = begin
               #= none:1 =#
               S[1 + map((x->(#= none:1 =#;
                                   mod(x, e))), -p)]
           end
ERROR: syntax: invalid named tuple element "mod(x, e)"
Stacktrace:
 [1] top-level scope at REPL[48]:1

```

This does not happen in 1.3, but what happens is still a bit funny

```julia
julia> print(Meta.parse(s,1)[1])
g(S, e, p) = begin
        #= none:1 =#
        S[1 + map((x->begin
                            #= none:1 =#
                            mod(x, e)
                        end), -p)]
    end
julia> g(S, e, p) = begin
               #= none:1 =#
               S[1 + map((x->begin
                                   #= none:1 =#
                                   mod(x, e)
                               end), -p)]
           end
┌ Warning: Deprecated syntax `"begin" inside indexing expression` at REPL[3]:3.
└ @ REPL[3]:3
g (generic function with 1 method)

```

Anyway, this change has broken my automatic Gap to Julia translator (which works fine in 1.3, despite outputting sometimes the warning above), so I would like to understand what is going on.

Thanks in advance for any help…

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [January 24, 2020, 2:18pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/14 "2020-01-24T14:18:51Z")

</div>

There shouldn’t be a semicolon after the comment `#= none:1 =#`. I’ll see if I can put together a PR to fix this.

---

<div class="post-metadata">

**Author:** ![fverdugo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fverdugo/32/9446_2.png) [@fverdugo](https://discourse.julialang.org/u/fverdugo)\
**Post date:** [January 24, 2020, 2:20pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/15 "2020-01-24T14:20:16Z")

</div>

Thanks for the info!

However, I do not understand what means this sentence in the original mesage:

> Note that 1.4 on Travis, AppVeyor (with [Appveyor.jl](https://github.com/JuliaCI/Appveyor.jl)), and Cirrus (with [CirrusCI.jl](https://github.com/ararslan/CirrusCI.jl)) now points to 1.4.0-rc1.

Is it possible to run 1.4.0-rc1 on Travis? I have tried to replace 1.3 by 1.4 in my .travis.yml file, and it didn’t work.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [January 24, 2020, 3:32pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/16 "2020-01-24T15:32:36Z")

</div>

> [@fverdugo](#):
>
> Is it possible to run 1.4.0-rc1 on Travis? I have tried to replace 1.3 by 1.4 in my .travis.yml file, and it didn’t work.

What doesn’t work?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [January 24, 2020, 3:33pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/17 "2020-01-24T15:33:28Z")

</div>

Did the stream of `rand(Base.OneTo(n))` change? Julia 1.3:

```julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _\ | |
  | | |_| | | | (_| | | Version 1.3.0 (2019-11-26)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using Random; Random.seed!(1); rand(Base.OneTo(6))
1

```

Julia 1.4rc1:

```julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _\ | |
  | | |_| | | | (_| | | Version 1.4.0-rc1.0 (2020-01-23)
 _/ |\ __'_|_|_|\__'_| |  
|__/ |

julia> using Random; Random.seed!(1); rand(Base.OneTo(6))
3

```

In [https://github.com/JuliaLang/julia/blob/v1.4.0-rc1/NEWS.md#random](https://github.com/JuliaLang/julia/blob/v1.4.0-rc1/NEWS.md#random) only `rand(::Tuple)` is mentioned, but as far as I can tell that’s not the same thing (unless `rand(Base.OneTo(n))` is implemented as `rand(::Tuple)` under the hood)

---

<div class="post-metadata">

**Author:** ![rfourquet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rfourquet/32/3610_2.png) [@rfourquet](https://discourse.julialang.org/u/rfourquet)\
**Post date:** [January 24, 2020, 3:55pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/18 "2020-01-24T15:55:39Z")

</div>

> [@giordano](#):
>
> In [https://github.com/JuliaLang/julia/blob/v1.4.0-rc1/NEWS.md#random](https://github.com/JuliaLang/julia/blob/v1.4.0-rc1/NEWS.md#random) only `rand(::Tuple)` is mentioned, but as far as I can tell that’s not the same thing (unless `rand(Base.OneTo(n))` is implemented as `rand(::Tuple)` under the hood)

`rand(::Tuple)` uses `Base.OneTo`, and there was an inefficiency in `rand(::MersenneTwister, ::OneTo)` (which was an oversight), now fixed. I simply forgot to put it in the NEWS.md file, or just thought `Base.OneTo` was not an official API (which apparently it seems to be).

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [January 24, 2020, 4:01pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/19 "2020-01-24T16:01:50Z")

</div>

Well, in `RandomBasedArrays.jl` I’m using `rand(eachindex(p))` ([reference](https://github.com/giordano/RandomBasedArrays.jl/blob/ab92fb6ec3ff871a5a0ebd71dc7af70ccc0fad52/src/RandomBasedArrays.jl#L11)) to get a random index, and tests are failing in 1.4 because of the different stream of numbers.

Maybe `OneBaseTo` is not official API but it’s used by official API.

BTW: is there a good way to test random numbers that doesn’t rely on the stream of random numbers being the same forever?

---

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [January 24, 2020, 5:21pm UTC](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715/20 "2020-01-24T17:21:23Z")

</div>

If your functions take `rng` as an argument, you can [create your own `AbstractRNG` implementation](https://docs.julialang.org/en/v1/stdlib/Random/#Creating-new-generators-1) for testing purposes which just returns numbers in sequence pulled from e.g. `const nums = [5837, 432, ..]`. I think such an implementation would be a worthwhile package–something like `MockRandom`.

[Next page](https://discourse.julialang.org/t/julia-v1-4-0-rc1-is-now-available/33715.md?page=2)
