Idea: repository for examples highlighting Julia's strengths


#1

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? 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?


Great news for Dynamics in Julia!
2 identical versions of the code: one allocates the other not, when accessing type-unstable tuple. Why?
#2

I think this is a great idea. Personally I like the idea of a few Literate.jl files in a Github repo that can generate notebooks or source files as desired. That way everything plays nicely with git.


#3

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…


#4

That’s one reason to use Literate :slight_smile:


#5

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.


#6

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


Benchmarking Julia for common scientific programming tasks
#7

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 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!


#8

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


#9

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


#10

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.


#11

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


#12

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.


#13

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.


#14

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