# Idea: repository for examples highlighting Julia's strengths

**URL:** <https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841>\
**Category:** Teaching & Outreach\
**Created:** [August 21, 2018, 4:57pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841 "2018-08-21T16:57:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Gibson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_gibson/32/5321_2.png) [@John\_Gibson](https://discourse.julialang.org/u/John_Gibson)\
**Post date:** [August 21, 2018, 4:57pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/1 "2018-08-21T16:57:27Z")

</div>

I think it would be good to start a repository of small examples that highlight Julia’s strengths, which could be pulled for use in outreach talks or browsed online.

For example, in my [Why Julia?](https://github.com/johnfgibson/whyjulia) talk I use an example from @andreasnoack of linear algebra over a Galois field. It illustrates how to define a new numeric type, in about twenty lines of code using metaprogramming, and then how Julia’s standard linear algebra libraries “just work” when applied to matrices over that type.

I never would have cooked up this example myself, but it’s just terrific for showing how easy extensibility is in Julia. It would be really cool to have a collection of such examples highlighting different strengths.

What’s the right technology for this? A github repository of Julia notebooks, each a single annotated example? A list of links to things posted elsewhere?

---

<div class="post-metadata">

**Author:** ![dawbarton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dawbarton/32/215461_2.png) [@dawbarton](https://discourse.julialang.org/u/dawbarton)\
**Post date:** [August 21, 2018, 10:41pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/2 "2018-08-21T22:41:52Z")

</div>

I think this is a great idea. Personally I like the idea of a few [Literate.jl](https://github.com/fredrikekre/Literate.jl) files in a Github repo that can generate notebooks or source files as desired. That way everything plays nicely with git.

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [August 24, 2018, 8:04am UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/3 "2018-08-24T08:04:49Z")

</div>

This is great! I don’t see why one should use Literate instead of a notebook directly though… The added complexity does not really offer something to new users which are totally clueless about what Literate.jl does.

In my eyes the best approach is a big README with a linked table of contents, then giving a small paragraph for each subsequent notebook present in the folder `notebooks`. Then, fill this folder up with Jupyters each showing a concrete and self-contained example!

I would very much like to contribute to this, but at the moment Jupyter doesn’t run on Windows with julia 1.0, so I’ll be late to the party…

---

<div class="post-metadata">

**Author:** ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)\
**Post date:** [August 24, 2018, 9:21am UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/4 "2018-08-24T09:21:24Z")

</div>

> [@Datseris](#):
>
> I would very much like to contribute to this, but at the moment Jupyter doesn’t run on Windows with julia 1.0, so I’ll be late to the party…

That’s one reason to use Literate 🙂

---

<div class="post-metadata">

**Author:** ![dawbarton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dawbarton/32/215461_2.png) [@dawbarton](https://discourse.julialang.org/u/dawbarton)\
**Post date:** [August 24, 2018, 9:21am UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/5 "2018-08-24T09:21:38Z")

</div>

I’d say that a plain `.jl` file, e.g., Literate, is best simply because of the issue you mentioned. I can open a `.jl` with any text editor and see what is going on.

That said, I’d probably have a folder of pre-generated notebooks available for new users.

---

<div class="post-metadata">

**Author:** ![floswald](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/floswald/32/195_2.png) [@floswald](https://discourse.julialang.org/u/floswald)\
**Post date:** [August 24, 2018, 12:46pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/6 "2018-08-24T12:46:43Z")

</div>

Great idea. Literate.jl is better than notebooks because it’s easier to version control I would say.

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [August 24, 2018, 1:19pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/7 "2018-08-24T13:19:59Z")

</div>

I forfeit. I have to admit you are all right and I was wrong. Literate seems like the way to go!

Now, I’ve recently seen this thread: [Benchmarking Julia for common scientific programming tasks](https://discourse.julialang.org/t/benchmarking-julia-for-common-scientific-programming-tasks/13763) and I think when someone creates the repository discussed here, then this thread should be also linked in the read me!

P.s.: When the repository is up n running, please tag me and I will contribute!

---

<div class="post-metadata">

**Author:** ![floswald](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/floswald/32/195_2.png) [@floswald](https://discourse.julialang.org/u/floswald)\
**Post date:** [August 24, 2018, 1:22pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/8 "2018-08-24T13:22:22Z")

</div>

Great! I think you have a claim to the right of creating this repo. 🙂  
Ownership can later be transferred to some Julia org.

---

<div class="post-metadata">

**Author:** ![John\_Gibson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_gibson/32/5321_2.png) [@John\_Gibson](https://discourse.julialang.org/u/John_Gibson)\
**Post date:** [August 24, 2018, 7:04pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/9 "2018-08-24T19:04:07Z")

</div>

Ok, I will set something up and put together a first example using Literate.jl!

---

<div class="post-metadata">

**Author:** ![John\_Gibson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_gibson/32/5321_2.png) [@John\_Gibson](https://discourse.julialang.org/u/John_Gibson)\
**Post date:** [August 24, 2018, 7:24pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/10 "2018-08-24T19:24:52Z")

</div>

[https://github.com/johnfgibson/julia-examples](https://github.com/johnfgibson/julia-examples)

Empty at the moment…I’ll find a good first simple example and experiment with Literate.jl…PRs welcome…maybe you can beat me to example #1.

---

<div class="post-metadata">

**Author:** ![abcsds](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abcsds/32/178_2.png) [@abcsds](https://discourse.julialang.org/u/abcsds)\
**Post date:** [August 27, 2018, 12:28pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/11 "2018-08-27T12:28:39Z")

</div>

A good place to start looking might be the rosseta code: [http://www.rosettacode.org/wiki/Category:Julia](http://www.rosettacode.org/wiki/Category:Julia)

---

<div class="post-metadata">

**Author:** ![KZiemian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kziemian/32/9020_2.png) [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Post date:** [September 16, 2018, 2:26pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/12 "2018-09-16T14:26:04Z")

</div>

> [@John\_Gibson](#):
>
> I never would have cooked up this example myself, but it’s just terrific for showing how easy extensibility is in Julia.

By cooked up you mean, that you don’t need it or you don’t find these example yourself? I am sorry, I sometimes lost in English subtleties.

---

<div class="post-metadata">

**Author:** ![John\_Gibson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_gibson/32/5321_2.png) [@John\_Gibson](https://discourse.julialang.org/u/John_Gibson)\
**Post date:** [September 16, 2018, 4:12pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/13 "2018-09-16T16:12:31Z")

</div>

I mean I never would have conceived of this example and implemented it.

Thanks for asking! Sometimes these English idioms slip in and I’m not even aware of it.

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [October 16, 2018, 1:48pm UTC](https://discourse.julialang.org/t/idea-repository-for-examples-highlighting-julias-strengths/13841/14 "2018-10-16T13:48:59Z")

</div>

Here is the first contribution to the repository: [https://github.com/johnfgibson/julia-examples/pull/1](https://github.com/johnfgibson/julia-examples/pull/1)
