Reading Documentation

Last updated: January 12, 2023

 Table of contents

Documentation from within Julia

To get documentation on an object in Julia, simply type in the julia REPL:

?<object>
 Example:
?sum
search: sum sum! summary cumsum cumsum! isnumeric VersionNumber issubnormal get_zero_subnormals set_zero_subnormals

  sum(f, itr; [init])

  Sum the results of calling function f on each element of itr.

  The return type is Int for signed integers of less than system word size, and UInt for unsigned integers of less than system word size. For all other arguments, a
  common return type is found to which all arguments are promoted.

  The value returned for empty itr can be specified by init. It must be the additive identity (i.e. zero) as it is unspecified whether init is used for non-empty
  collections.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> sum(abs2, [2; 3; 4])
  29

  Note the important difference between sum(A) and reduce(+, A) for arrays with small integer eltype:

  julia> sum(Int8[100, 28])
  128

  julia> reduce(+, Int8[100, 28])
  -128

Find function from within Julia

To print the list of functions containing a certain expression in their description, you can use:

apropos("<expression>")
 Example:
apropos("truncate")
Base.IOBuffer
Base.truncate
Base.open_flags
Base.IOContext
Base.open
Base.dump
Core.String
Base.Broadcast.newindex
ArgTools
NetworkOptions
LinearAlgebra.eigen
Tar
Base.trunc
Dates.format
Dates.Date
IJulia.watch_stream
IJulia.set_max_stdio

Get version

If you need to find your Julia version, you can use either of:

VERSION          # outputs Julia version only
v"1.7.2"
versioninfo()    # outputs more info, including OS info
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

Online documentation

Julia website
Julia documentation
Online training material
Julia YouTube channel
Julia Wikibook
Blog aggregator for Julia

Getting help

Julia Discourse forum
[julia] tag on Stack Overflow
The Julia Language Slack
Zulip
#julialang hashtag on Twitter Julia subreddit
Julia Gitter channel
#julia IRC channel on Freenode

Comments & questions