Planning for the Duke SSRI Julia Short Course, March 22, 2017.
Topics to be covered:
Overview: Why Julia? (John)
Goals:
as easy to use as Python, R, or Matlab
within a factor of 2 of FORTRAN or C
General-purpose language (web server, systems, etc.), but focused on technical computing
Under what conditions should I consider switching to Julia?
Julia basics (John/Tyler)
Interactive usage (John)
running the REPL; running Jupyter and IJulia
getting help
? mode
Basic data operations (Tyler)
matrices and vectors
linear algebra
comprehensions
it's okay to use loops
but it's also okay to vectorize (but be careful!)
defining functions (so we can do ... below)
Other data types (John)
tuple
tuples are collections of function arguments
splatting and slurping (...)
dict
introduction (for Matlab people)
type safety (for Python people)
cultural: keys are often symbols
set (time permitting)
Plotting things (John/Tyler)
PyPlot (John)
Winston (Tyler) [Winston is basically like Matlab's plotting syntax ... I'd like to intersperse some plotting with the DataFrames discussion, since this is a natural application. Maybe you can show PyPlot for more pure-math plotting applications, and I can show Winston / Gadfly for data applications?] — Sounds good. I will probably use this as an excuse to show off Python interoperability
Gadfly (Tyler): like ggplot for Julia
Theory: how Julia makes your code fast (John)
Compilers and compilation
stages of compilation
Types and the type system
why types are important
grappling with type difficulties
the type hierarchy
super and subtypes
getting help: which, @which, methodswith, typeof
types vs objects
Multiple dispatch
multiple dispatch vs methods
type annotations: when you do and don't need them
Enhancing your code's performance
@time
garbage collection; memory management
Debugging
Macros & meta-programming
[This might be worth a brief mention, but nothing more]
if code is just another data structure, you can write code that writes code!
Other Topics (Tyler, with input from John on gotchas)
Language similarites / Best coding practices / avoiding "gotchas"
Put everything in functions so as to avoid Julia's default global scoping
adding type info to list comprehensions
Basic syntax comparisons with sister languages (Matlab, Python, R, etc.)
Other "gotchas" might already be discussed above with the compilation details section
请发表评论