# ANN: Julia Cheatsheet updated for Julia 1.0

**URL:** https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535
**Category:** Community
**Tags:** cheatsheets
**Created:** [September 27, 2018, 12:48am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535 "2018-09-27T00:48:17Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![nickeubank](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nickeubank/32/3878_2.png) [@nickeubank](https://discourse.julialang.org/u/nickeubank)
#### Post date: [September 27, 2018, 12:48am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/1 "2018-09-27T00:48:17Z")

</div>

We’ve updated the [JuliaDocs Cheatsheet for Julia 1.0](https://juliadocs.github.io/Julia-Cheat-Sheet/)!

Or at least we think we have – if anyone spots problems or changes we missed, please feel free to submit a PR!

---

<div class="post-metadata">

### Author: ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)
#### Post date: [September 27, 2018, 4:46am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/2 "2018-09-27T04:46:04Z")

</div>

@nickeubank: Thanks for this.  
In the parallel computing section you have use @parallel keyword for parallel processing. I understand in julia 1.0 we need to use @distributed instead of @parallel.

---

<div class="post-metadata">

### Author: ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)
#### Post date: [September 27, 2018, 6:13am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/3 "2018-09-27T06:13:58Z")

</div>

I like the visual of the cheat sheet but some commands are out of date. See my PR: [https://github.com/JuliaDocs/Julia-Cheat-Sheet/pull/34](https://github.com/JuliaDocs/Julia-Cheat-Sheet/pull/34)

---

<div class="post-metadata">

### Author: ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)
#### Post date: [September 27, 2018, 7:21am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/4 "2018-09-27T07:21:30Z")

</div>

`linspace` is deprecated to `range`

---

<div class="post-metadata">

### Author: ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)
#### Post date: [September 27, 2018, 7:30am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/5 "2018-09-27T07:30:37Z")

</div>

The more I read, the more problems I see with this.

- _Really_ old commands like `cell` which was deprecated in 0.5 are still on it.
- The amount of deprecated functions.

Stating that is ready for 1.0 isn’t very helpful, because cheat sheets are often used by people coming from other languages to play around and the experience they will have with this is foreseeable bad. And most likely they will dismiss Julia instead of the cheat sheet…

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [September 27, 2018, 7:50am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/6 "2018-09-27T07:50:20Z")

</div>

From a very brief glance:

```julia
replace("Julia", "a", "us")

```

should be

```julia
replace("Julia", "a" => "us")

```

```julia
List supertype	super(TypeName)

```

should be

```julia
supertype(TypeName)

```

Opinion-based:

```julia
a = [1:10;]

```

It’s a general issue that people are always needlessly collecting ranges into arrays, and this example tends to reinforce that by showing it to beginners. I suggest replacing this (and other examples) with e.g. `a = [1, 3, 6]`. In fact, in the Array section there is no example of ordinary vector construction as a comma separated list of elements.

Elementwise operation:

```julia
[1, 2, 3] .+ [1, 2, 3] == [2, 4, 6]
[1, 2, 3] .* [1, 2, 3] == [1, 4, 9]

```

Since the point is to demonstrate elementwise operation, it makes more sense to make the comparison elementwise too:

```julia
[1, 2, 3] .+ [1, 2, 3] .== [2, 4, 6]
[1, 2, 3] .* [1, 2, 3] .== [1, 4, 9]

```

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [September 27, 2018, 7:51am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/7 "2018-09-27T07:51:41Z")

</div>

In general, I think it’s a good (well, actually, necessary) idea to run automated tests on all examples, to make absolutely _certain_ that they succeed.

---

<div class="post-metadata">

### Author: ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)
#### Post date: [September 27, 2018, 7:52am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/8 "2018-09-27T07:52:05Z")

</div>

> [@DNF](#):
>
> ```julia
> replace("Julia", "a", "us")
> 
> ```
> 
> should be
> 
> ```julia
> replace("Julia", "a" => "us")
> 
> ```

Those two at least are fixed in: [Fix Strings and Arrays by laborg · Pull Request #36 · JuliaDocs/Julia-Cheat-Sheet · GitHub](https://github.com/JuliaDocs/Julia-Cheat-Sheet/pull/36)

---

<div class="post-metadata">

### Author: ![nickeubank](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nickeubank/32/3878_2.png) [@nickeubank](https://discourse.julialang.org/u/nickeubank)
#### Post date: [September 27, 2018, 5:32pm UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/9 "2018-09-27T17:32:13Z")

</div>

> [@DNF](#):
>
> In general, I think it’s a good (well, actually, necessary) idea to run automated tests on all examples, to make absolutely _certain_ that they succeed.

A very nice idea. Any suggestions for implementation? I know it’s easy to do in docstrings and such, but not sure how to implement here. As you can see, this is just an HTML doc that’s been passed down for many years from author to author, so don’t have any “infrastructure” backing it.

---

<div class="post-metadata">

### Author: ![nickeubank](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nickeubank/32/3878_2.png) [@nickeubank](https://discourse.julialang.org/u/nickeubank)
#### Post date: [September 27, 2018, 5:36pm UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/10 "2018-09-27T17:36:03Z")

</div>

Well, thanks so much for your help in fixing many of those problems!

Re: being helpful: I haven’t been able to get others particularly invested in updating it, so was just doing my best till now. I think that outside the manual, documentation of the julia ecosystem is really, really bad (a constant gripe from new users on discourse). This is just my attempt to try and improve the situation, and, as noted in the original post, ask for help where I can get it.

In opensource, sometimes you just get the best of what the people willing to put in the time can generate, which is where we are.

---

<div class="post-metadata">

### Author: ![Azamat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/azamat/32/6892_2.png) [@Azamat](https://discourse.julialang.org/u/Azamat)
#### Post date: [October 23, 2018, 6:40pm UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/11 "2018-10-23T18:40:57Z")

</div>

I believe the following code in the cheat sheet:

```nohighlight
abstract type Programmer
    name::AbstractString
    birth_year::UInt16
    fave_language::AbstractString
end

```

is wrong, since Julia does not allow **abstract** types with fields _yet_

---

<div class="post-metadata">

### Author: ![Azamat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/azamat/32/6892_2.png) [@Azamat](https://discourse.julialang.org/u/Azamat)
#### Post date: [October 24, 2018, 12:11am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/12 "2018-10-24T00:11:07Z")

</div>

Also, the following reference, in the cheatsheet

- [Sublime Text IJulia plug-in](https://github.com/quinnj/Sublime-IJulia) (editor)

should be removed, since that project is dead now.

---

<div class="post-metadata">

### Author: ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)
#### Post date: [October 24, 2018, 7:35am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/13 "2018-10-24T07:35:05Z")

</div>

Fixed here: [fix IDEs and subtypes by laborg · Pull Request #73 · JuliaDocs/Julia-Cheat-Sheet · GitHub](https://github.com/JuliaDocs/Julia-Cheat-Sheet/pull/73)

---

<div class="post-metadata">

### Author: ![spinkney](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@spinkney](https://discourse.julialang.org/u/spinkney)
#### Post date: [October 25, 2018, 10:50am UTC](https://discourse.julialang.org/t/ann-julia-cheatsheet-updated-for-julia-1-0/15535/14 "2018-10-25T10:50:54Z")

</div>

As a newcomer to the language one of the issues I had was with understanding the scoping behavior. Maybe add a box for scoping rules?
