After the above steps are complete then you should be able to start
Emacs and launch an interactive <code>julia</code> session via <code>M-x julia</code>. If
you manage to get that settled then at this point you should be able
to do everything in the <ahref="https://raw.github.com/gjkerns/ob-julia/master/intro-julia.org">Introduction to Julia</a>.
</p>
</div>
</div>
<divid="outline-container-2-3"class="outline-3">
<h3id="sec-2-3">Add-on packages</h3>
<divclass="outline-text-3"id="text-2-3">
<p>
There is a growing list of <ahref="http://docs.julialang.org/en/release-0.1/packages/packagelist/">contibuted packages</a> which add to the base
functionality of <code>julia</code>. For example, several statistics packages
were mentioned a few moths ago in a blog post by <ahref="https://github.com/johnmyleswhite">John Myles White</a>
entitled <ahref="http://www.johnmyleswhite.com/notebook/2012/12/02/the-state-of-statistics-in-julia/">The State of Statistics in Julia</a>. The instructions in the
blog post are (already) a bit out-of-date; the currently recommended
way to install the packages is to launch an interactive <code>julia</code>
Org-mode supports <code>julia</code> graphics by way of the <code>:results graphics</code> header argument. See the section "Examples of Use" for details.
Since beamer is such a special case I have tweaked a minimal <code>julia</code>
beamer presentation in <ahref="https://github.com/gjkerns/ob-julia/blob/master/pdf/ob-julia-beamer.pdf">Sample <code>julia</code> Presentation</a> (the org file is
<ahref="https://github.com/gjkerns/ob-julia/blob/master/ob-julia-beamer.org">here</a>). See there and the Org manual for more information.
</p>
</div>
</div>
</div>
<divid="outline-container-6"class="outline-2">
<h2id="sec-6">Other things to mention</h2>
<divclass="outline-text-2"id="text-6">
<ulclass="org-ul">
<li>You can extract all of the <code>julia</code> source code (also known as
<i>tangling</i> the Org document) with the keystrokes <code>C-c C-v t</code>. This
will generate a <code>julia</code> script (with extension <code>.jl</code>) in the working
directory. Note that this capability is turned off by default. You
can activate it by adding the header argument <code>:tangle yes</code> to those
code blocks you'd like to tangle or doing a buffer-wide header
setting with the line <code>#+PROPERTY: tangle yes</code> near the top of the
org file. See the Org manual for details.
</li>
<li>You may have noticed that those <code>julia</code> code lines with no output
(for instance, lines with semicolons <code>;</code> at the end) generate an
empty line in the <code>#+RESULTS</code> below the code block. Consequently,
the first time you evaluate a <code>julia</code> code block without having
previously initiated a <code>julia</code> session with <code>M-x julia</code> the
<code>#+RESULTS</code> will have an extra mystery empty line. It is no
mystery. The first statement executed by ESS when loading <code>julia</code>
is an <code>include</code> command. That command has no output. If that empty
line bothers you then execute the code block again; the mystery
empty line will disappear.
</li>
<li>Be careful when executing code blocks with <code>:results value</code>. Code
block evaluation in that case works by writing the <code>julia</code> commands
to an external file in the <code>/tmp</code> directory, evaluating the commands
with <code>julia</code>, writing the results to a comma-separated (<code>.csv</code>)
file, then reading the <code>.csv</code> file and converting the result to
<code>elisp</code> for insertion to the org buffer. Not all object types are
supported by <code>julia</code> for writing to <code>.csv</code> files, in particular,
<code>1x1</code> matrices and arrays of ASCII characters are not supported
(yet). If you try to evaluate code blocks in those cases (or any
other case where output to <code>.csv</code> is not supported) then you will
get an error.
</li>
<li>After playing around with <code>julia</code> for a while you will notice that
instead of printing long arrays it will elide them with vertical
dots in the middle of the output which look similar to this \(
\vdots \) in the buffer. It turns out that LaTeX does not like
those three dots because they correspond to a special character, and
the upshot is that your org file will not export to LaTeX
successfully. One way around this is to explicitly declare that
special symbol in the LaTeX header. That is the reason for the
Org Mode support for <a href="http://language-site/">Language</a>
Org Mode support for <a href="http://julialang.org/">Julia</a>
</p>
<p>
<a href="http://language-site/">
<img src="http://language-site/graphic.file"/>
<a href="http://julialang.org/">
<img src="http://julialang.org/images/logo.png"/>
</a>
</p>
</div>
#+end_html
* TODO Template Checklist [0/12] :noexport:
- [] Revise #+TITLE:
- [] Indicate #+AUTHOR:
- [] Add #+EMAIL:
- [ ] Revise banner source block [0/3]
- [] Add link to a useful language web site
- [] Replace "Language" with language name
- [] Find a suitable graphic and use it to link to the language
* DONE Template Checklist [12/12] :noexport:
- [X] Revise #+TITLE:
- [X] Indicate #+AUTHOR:
- [X] Add #+EMAIL:
- [X] Revise banner source block [3/3]
- [X] Add link to a useful language web site
- [X] Replace "Language" with language name
- [X] Find a suitable graphic and use it to link to the language
web site
- [ ] Write an [[Introduction]]
- [ ] Describe [[Requirements%20and%20Setup][Requirements and Setup]]
- [ ] Replace "Language" with language name in [[Org%20Mode%20Features%20for%20Language%20Source%20Code%20Blocks][Org Mode Features for Language Source Code Blocks]]
- [ ] Describe [[Other]] differences from supported languages
- [ ] Provide brief [[Examples%20of%20Use][Examples of Use]]
- [X] Write an [[Introduction]]
- [X] Describe [[Requirements%20and%20Setup][Requirements and Setup]]
- [X] Replace "Language" with language name in [[Org%20Mode%20Features%20for%20Language%20Source%20Code%20Blocks][Org Mode Features for Language Source Code Blocks]]
After the above steps are complete then you should be able to start
Emacs and launch an interactive =julia= session via =M-x julia=. If
you manage to get that settled then at this point you should be able
to do everything in the [[https://raw.github.com/gjkerns/ob-julia/master/intro-julia.org][Introduction to Julia]].
** Add-on packages
There is a growing list of [[http://docs.julialang.org/en/release-0.1/packages/packagelist/][contibuted packages]] which add to the base
functionality of =julia=. For example, several statistics packages
were mentioned a few moths ago in a blog post by [[https://github.com/johnmyleswhite][John Myles White]]
entitled [[http://www.johnmyleswhite.com/notebook/2012/12/02/the-state-of-statistics-in-julia/][The State of Statistics in Julia]]. The instructions in the
blog post are (already) a bit out-of-date; the currently recommended
way to install the packages is to launch an interactive =julia=