User Tools

Site Tools


This book is copyrighted, but free.

The author (Ivo Welch) grants permission to use individual snippets freely in other code or in postings (preferably with attribution). But please do not copy chapters wholesale.

Julia 1.0 Cookbook

  1. Preface — about this cookbook, about Julia, about Julia computing, other recommended reading, license

Part 1: Julia Core

  • WARNING Part 1 is approaching first-draft status. Many of the chapters below are nearly done. The number of CHECKMARK indicates the progress. These checkmarks are updated irregularly.

Julia consists of a core computer language and packages. Some packages come with Julia. Others including very important basic packages need to be installed (which is easy). Packages can add essential functionality (e.g., DataFrames as dataset storage), programming tools (e.g., BenchmarkTools or Parallel Programming support), and/or entire applications (e.g., statistical analysis or plotting). Julia is not a lightweight language, with few principal features to remember—like C or lisp. It is a beast with many heads and appendages, tremendously powerful, but also easy to get lost in—similar to R (with CRAN), python (with PyPI), and perl (with CPAN) in this respect.

  1. Introduction
    1. Installation also REPL (Interactive) and Batch Use. CHECKMARK CHECKMARK CHECKCROSS 6
    2. Packages, installing, removing, using. CHECKMARK CHECKMARK CHECKMARK 1
    3. Inquiring about object types and structures, methods and functions, naming conventions, etc. CHECKMARK CHECKMARK CHECKMARK 2
  2. Control Flow
  3. Scalars
  4. Strings
    1. Basics: concatenations, substrings, conversions, padding, capitalization, characterizations, parsing, escaping, etc. CHECKMARK CHECKMARK CHECKMARK 1
    2. Regular Expressions: finding and matching complex patterns. CHECKMARK CHECKMARK CHECKMARK
  5. Arrays and Tuples
  6. Associative Arrays (Key-Value)
    1. Dictionaries (and Pairs): (=maps=hashes), could be viewed as run-time structs. CHECKMARK CHECKMARK CHECKMARK 1
    2. Structures: could be viewed as compile-time dictionaries. CHECKMARK CHECKMARK CHECKMARK
  7. Files and Operating System
    1. Operating and File System: command-line args, OS detection, globbing, recursive directory traversals, etc. CHECKMARK CHECKMARK CHECKCROSS 2
    2. File Input/Output: opening, reading, writing, and closing files. CHECKMARK CHECKMARK CHECKCROSS 2
    3. External Programs: running and capturing content from other programs. CHECKMARK CHECKCROSS CHECKCROSS 8
  8. DataFrames
    1. Introduction: building and accessing dataframes CHECKMARK CHECKMARK CHECKMARK 1
    2. Missing and NaN: in the context of data frames CHECKMARK CHECKMARK CHECKMARK
    3. Complex Operations: sorts, joins, by-group operations, wide-narrow conversions CHECKMARK CHECKMARK CHECKMARK
  9. File Formats
    1. File I/O Formats: e.g., CSV, JSON, Base64, GZip, SQL, etc. CHECKMARK CHECKMARK CHECKCROSS 2
  10. Programming and Functions
    1. Other Function Aspects — Types of Functions. Passing by Sharing. Documentation. Static Variables. Macros. etc. CHECKMARK CHECKMARK CHECKCROSS 5
    2. Parallel Processing: Basics and Embarrassingly Parallel Processing CHECKMARK CHECKCROSS CHECKCROSS 10
    3. Programming Tools: Debugging, Profiling, Benchmarking, Unit-Testing, Writing Packages. CHECKMARK CHECKCROSS CHECKCROSS 9

DataFrames and much of Julia's file and system I/O are not part of the core Julia language, but these capabilities are so central to Julia that this book discuss them in the core section.

Part 2: (More) Julia Tools, Packages, Applications, and Notes

WARNING Part 2 is far from done. I have just started in mid-September 2018 to update to Julia 1.0.

The next set of topics are primarily (but not exclusively) extended tools, packages, and applications rather than core language topics.

  1. Plotting: Introduction to Plots.jl CHECKMARK CHECKMARK
    1. Plot Attributes illustrates relevant attributes. CHECKMARK CHECKMARK CHECKCROSS
    2. 2D Plot Gallery illustrates sample 2D plots. CHECKMARK CHECKMARK CHECKCROSS
    3. 3D Plot Gallery illustrates sample 3D plots. CHECKMARK CHECKCROSS

  2. Mathematical Search Algorithms
    1. FIXME: JuMP Primarily for constrained Linear and Quadratic Problems. CHECKCROSS

  3. Statistics
    1. Univariate Statistics: tabulating, classifying, summary statistics, quantiles, CHECKMARK CHECKMARK CHECKCROSS 2
    2. Bivariate Statistics: primarily LOESS. CHECKMARK CHECKMARK CHECKMARK
    3. Multivariate Least-Squares Regressions: QR, SVD, GLM, and AS75, with benchmarks. CHECKMARK CHECKMARK CHECKMARK
    4. FIXME Univariate Time Series: Box-Jenkins, ARCH, GARCH, ARFIMA CHECKCROSS Package Timeseries is not yet ported to 1.0.0
  4. Finance Support CHECKCROSS
    1. FIXME: Prominent Free Finance Data Sources (Edgar, Fred, French, Intrinio, Etc.) CHECKCROSS
    2. FIXME: Equities (Fama-Macbeth, Event Studies, Pfio Optimization, Factor-Analysis, Fama-French 92, etc.) CHECKCROSS
    3. FIXME: Derivatives (Fixed Income, Options). CHECKCROSS

  5. Other Julia Topics CHECKCROSS
    1. FIXME: JuliaDB: file-based statistical analysis on large disk-based data sets. CHECKCROSS
    2. FIXME Translation Notes from R, Matlab, python, perl. CHECKCROSS


FIXME For the cookbook itself, write meta code:

  • Files can be translated into multimarkdown or git-formatted-markdown with the following changes:
    • we need style files for looks
    • tables need to have their '^' header parsed and mapped into a second line '—-:' type divider.
    • checkmarks, checkcrosses, etc. need to be check, times <i class=“fas fa-times”></i>
    • create a TOC
    • add julia block formatters and view / paste switchers
  • write a julia style highlighter/formatter:
    • flag long lines
    • spaces in parenthenses should try to suggest nesting f(..g(.h(x).)..). Similiarly x=. .
    • try to target comment locations towards col72, ending around col100, always use ##.
  • improve color in links here. not clear enough.
  • LaTeX mapper
  • Jupyter mapper
  • Copy code button
  • Make all const actually const
start.txt · Last modified: 2018/11/16 15:28 (external edit)