# Reversing a range of \`UInt8\`s yields an empty set

**URL:** <https://discourse.julialang.org/t/reversing-a-range-of-uint8-s-yields-an-empty-set/78434>\
**Category:** General Usage\
**Created:** [March 25, 2022, 1:27am UTC](https://discourse.julialang.org/t/reversing-a-range-of-uint8-s-yields-an-empty-set/78434 "2022-03-25T01:27:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [March 25, 2022, 1:27am UTC](https://discourse.julialang.org/t/reversing-a-range-of-uint8-s-yields-an-empty-set/78434/1 "2022-03-25T01:27:26Z")

</div>

Is this a bug or not? (v1.7.0)

```julia
julia> UInt8(1):UInt8(12) |> collect
12-element Vector{UInt8}:
 0x01
 0x02
 0x03
 0x04
 0x05
 0x06
 0x07
 0x08
 0x09
 0x0a
 0x0b
 0x0c

julia> reverse(UInt8(1):UInt8(12)) |> collect
UInt8[]

```

Edit: Looks like it was.

[https://github.com/JuliaLang/julia/issues/29576](https://github.com/JuliaLang/julia/issues/29576)

I can see that a fixed was merged to master, but how do I figure out which Julia release I need in order to fix this bug? Or do I need nightly?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [March 25, 2022, 1:50am UTC](https://discourse.julialang.org/t/reversing-a-range-of-uint8-s-yields-an-empty-set/78434/2 "2022-03-25T01:50:19Z")

</div>

it’s fixed in 1.8:

> **[Download Julia](https://julialang.org/downloads/#upcoming_release)**
>
> The official website for the Julia Language. Julia is a language that is fast, dynamic, easy to use, and open source. Click here to learn more.

---

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [March 25, 2022, 2:03am UTC](https://discourse.julialang.org/t/reversing-a-range-of-uint8-s-yields-an-empty-set/78434/3 "2022-03-25T02:03:21Z")

</div>

How do you know which release includes the fix?

I see that the fix itself is here on Github:

[https://github.com/JuliaLang/julia/pull/29842/commits/f7e3259121880d91e503f428c122d0f079ba12b9](https://github.com/JuliaLang/julia/pull/29842/commits/f7e3259121880d91e503f428c122d0f079ba12b9)

It says this was merged to master on January 7, 2022.

But if you compare v1.7.0 with v1.8.0-beta2 (the latest release) on Github [here](https://github.com/JuliaLang/julia/compare/v1.7.0...v1.8.0-beta2) the newest addition is from May 2021. So it looks like the fix will _not_ be included in 1.8.0 if I download the beta now, right?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [March 25, 2022, 2:17am UTC](https://discourse.julialang.org/t/reversing-a-range-of-uint8-s-yields-an-empty-set/78434/4 "2022-03-25T02:17:39Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/b/6/b613443d2bbe94668ebace35b19c110443188d30.png)

I see it, you just need to load a billion times towards the bottom of the webpage

---

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [March 25, 2022, 2:24am UTC](https://discourse.julialang.org/t/reversing-a-range-of-uint8-s-yields-an-empty-set/78434/5 "2022-03-25T02:24:52Z")

</div>

Aha, they are in _forward_ chronological order…
