-
Greatly enhanced performance for passing and returning
Tuples (#4042). -
Tuples (ofIntegers,Symbols, orBools) can now be used as type parameters (#5164). -
Default "inner" constructors now accept any arguments. Constructors that look like
MyType(a, b) = new(a, b)can and should be removed (#4026). -
Expanded array type hierarchy, including
StoredArrayfor all container-like arrays, andDenseArrayfor in-memory arrays with standard strided storage (#987, #2345). -
When reloading code, types whose definitions have not changed can be ignored in some cases.
-
Binary
~now parses as a vararg macro call to@~. For examplex~y~z=>@~ x y z(#4882). -
Structure fields can now be accessed by index (#4806).
-
Unicode identifiers are normalized (NFC) so that different encodings of equivalent strings are treated as the same identifier ([#5462]).
-
GitHubmodule for interacting with the GitHub API -
Pkg.submit(pkg[,commit])function to automatically submit a GitHub pull request to the package author. -
New functions
minmaxandextrema(#5275).
-
consume(p)extended toconsume(p, args...), allowing it to optionally passargs...back to the producer (#4775). -
.juliarc.jlis now loaded for both script and REPL execution (#5076). -
The
Sysmodule now includes convenient functions for working with dynamic library handles;Sys.dllistwill list out all paths currently loaded viadlopen, andSys.dlpathwill lookup a path from a handle -
readdlmtreats multiple whitespace characters as a single delimiter by default (when no delimiter is specified). This is useful for reading fixed-width or messy whitespace-delimited data ([#5403]). -
The Airy, Bessel, Hankel, and related functions (
airy*,bessel*,hankel*) now detect errors returned by the underlying AMOS library, throwing anAmosExceptionin that case (#4967). -
methodswithnow returns an array ofMethods ([#5464]) rather than just printing its results. -
errno([code])function to get or set the C library'serrno. -
Collections improvements
-
Arrayassignment (e.g.x[:] = y) ignores singleton dimensions and allows the last dimension of one side to match all trailing dimensions of the other (#4048, #4383). -
Dict(kv)constructor for any iterator on(key,value)pairs. -
Multi-key
Dicts:D[x,y...]is now a synonym forD[(x,y...)]for associationsD(#4870). -
push!andunshift!can push multiple arguments (#4782) -
writedlmandwritecsvnow accept any iterable collection of iterable rows, in addition toAbstractArrayarguments, and thewritedlmdelimiter can be any printable object (e.g. aString) instead of just aChar.
-
-
Numberimprovements-
The
ImaginaryUnittype no longer exists. Instead,imis of typeComplex{Bool}. Making this work required changing the semantics of boolean multiplication to approximately,true * x = xandfalse * x = zero(x), which can itself be considered useful (#5468). -
bigis now vectorized (#4766) -
nextpowandprevpownow return thea^nvalues instead of the exponentn(#4819) -
Overflow detection in
parseint(#4874). -
randnow supports arbitraryRangesarguments (#5059).
-
-
Stringimprovements -
LinAlg(linear algebra) improvements-
Balancing options for eigenvector calculations for general matrices (#5428).
-
Mutating linear algebra functions no longer promote (#5526).
-
condskeelfor Skeel condition numbers (#5726). -
Sparse linear algebra
-
Dense linear algebra for special matrix types
-
Interconversions between the special matrix types
Diagonal,Bidiagonal,SymTridiagonal,Triangular, andTriangular, andMatrixare now allowed for matrices which are representable in both source and destination types. (5e3f074b) -
Allow for addition and subtraction over mixed matrix types, automatically promoting the result to the denser matrix type (a448e080)
-
new algorithms for linear solvers and eigensystems of
Bidiagonalmatrices of generic element types (#5277) -
new algorithms for linear solvers, eigensystems and singular systems of
Diagonalmatrices of generic element types (#5263) -
new algorithms for linear solvers and eigensystems of
Triangularmatrices of generic element types (#5255) -
specialized
invanddetmethods forTridiagonalandSymTridiagonalbased on recurrence relations between principal minors (#5358) -
specialized
transpose,ctranspose,istril,istriumethods forTriangular(#5255) andBidiagonal(#5277) -
new LAPACK wrappers
- condition number estimate
cond(A::Triangular)(#5255)
- condition number estimate
-
-
Dense linear algebra for generic matrix element types
-
-
New function
deleteat!deletes a specified index or indices and returns the updated collection -
prevfloatandnextfloatnow saturate at -Inf and Inf, respectively, and have otherwise been fixed to follow the IEEE-754 standard functionsnextDownandnextUp(#5025). -
The
setenvfunction for external processes now accepts adirkeyword argument for specifying the directory to start the child process in (#4888).
-
Sys.shlib_exthas been renamed toSys.dlext -
denseis deprecated in favor offull(#4759) -
The
Stattype is renamedStatStruct(#4670) -
set_rounding,get_roundingandwith_roundingnow take an additional argument specifying the floating point type to which they apply. The old behaviour and[get/set/with]_bigfloat_roundingfunctions are deprecated (#5007) -
cholpfactandqrpfactare deprecated in favor of keyword arguments incholfact(...,pivot=true)andqrfact(...,pivot=true)(#5330) -
symmetrize!is deprecated in favor ofBase.LinAlg.copytri!([#5427]) -
myindexeshas been renamed tolocalindexes(#5475) -
factorize!is deprecated in favor offactorize. (#5526) -
nnzis removed. Usecountnzornfilledinstead (#5538)
The 0.2 release brings improvements to many areas of Julia. Among the most visible changes are support for 64-bit Windows, keyword arguments to functions, immutable types, a redesigned and polished package manager, a multimedia interface supporting usage of Julia in IPython, a built-in profiler, and major improvements to Julia's linear algebra, I/O, and parallel capabilities. These are accompanied by many other changes adding new features, enhancing the library's consistency, improving performance, increasing test coverage, easing installation, and expanding the documentation. While not part of Julia proper, the package ecosystem has also grown and matured considerably since the 0.1 release. See below for more information about the long list of changes that improve Julia's usability and performance.
-
Immutable types (#13).
-
Triple-quoted string literals (#70).
-
New infix operator
in(e.g.x in S), and corresponding functionin(x,S), replacingcontains(S,x)function (#2703). -
New variable bindings on each for loop and comprehension iteration (#1571). For example, before this change:
julia> map(f->f(), { ()->i for i=1:3 }) 3-element Any Array: 3 3 3and after:
julia> map(f->f(), { ()->i for i=1:3 }) 3-element Any Array: 1 2 3 -
Explicit relative importing (#2375).
-
Methods can be added to functions in other modules using dot syntax, as in
Foo.bar(x) = 0. -
import module: name1, name2, ...(#5214). -
A semicolon is now allowed after an
importorusingstatement (#4130). -
In an interactive session (REPL), you can use
;cmdto runcmdvia an interactive shell. For example:julia> ;ls CONTRIBUTING.md Makefile VERSION deps/ julia@ ui/ DISTRIBUTING.md NEWS.md Windows.inc doc/ src/ usr/ LICENSE.md README.md base/ etc/ test/ Make.inc README.windows.md contrib/ examples/ tmp/
-
Sampling profiler (#2597).
-
Functions for examining stages of the compiler's output:
code_lowered,code_typed,code_llvm, andcode_native. -
Multimedia I/O API (display, writemime, etcetera) (#3932).
-
MPFR-based
BigFloat(#2814), and many newBigFloatoperations. -
New half-precision IEEE floating-point type,
Float16(#3467). -
Support for setting floating-point rounding modes (#3149).
-
methodswithshows all methods with an argument of specific type. -
mapslicesprovides a general way to perform operations on slices of arrays (#2204). -
repeatfunction for constructing Arrays with repeated elements ([#3605]). -
Collections.PriorityQueuetype andCollections.heapfunctions (#2920). -
quadgk1d-integration routine (#3140). -
erfinvanderfcinvfunctions (#2987). -
varm,stdm(#2265). -
digamma,invdigamma,trigammaandpolygammafor calculating derivatives ofgammafunction ([#3233]). -
logdet(#3070). -
Names for C-compatible types:
Cchar,Clong, etc. (#2370). -
cglobalto access global variables (#1815). -
unsafe_pointer_to_objref(#2468) andpointer_from_objref(#2515). -
readandwritefor external processes. -
I/O functions
readbytesandreadbytes!(#3878). -
flush_cstdiofunction (#3949). -
ClusterManager makes it possible to support different types of compute clusters (#3649, #4014).
-
rmprocsfor removing processors from a parallel computing session. The system can also tolerate to some extent processors that die unexpectedly (#3050). -
interruptfor interrupting worker processes (#3819). -
timedwaitdoes a polled wait for an event till a specified timeout. -
Conditiontype withwaitandnotifyfunctions forTasksynchronization. -
versioninfoprovides detailed version information, especially useful when reporting and diagnosing bugs. -
detachfor running child processes in a separate process group. -
setenvfor passing environment variables to child processes. -
ifelseeagerly-evaluated conditional function, especially useful for vectorized conditionals.
-
isequalnow returnsfalsefor numbers of different types. This makes it much easier to define hashing for new numeric types. Uses ofDictwith numeric keys might need to change to account for this increased strictness. -
A redesigned and rewritten
Pkgsystem is much more robust in case of problems. The basic interface to adding and removing package requirements remains the same, but great deal of additional functionality for developing packages in-place was added. See the new packages chapter in the manual for further details. -
Sorting API updates (#3665) – see sorting functions.
-
The
delete!(d::Dict, key)function has been split into separatepop!anddelete!functions (#3439).pop!(d,key)removeskeyfromdand returns the value that was associated with it; it throws an exception ifddoes not containkey.delete!(d,key)removeskeyfromdand succeeds regardless of whetherdcontainedkeyor not, returningditself in either case. -
Linear-algebra factorization routines (
lu,chol, etc.) now returnFactorizationobjects (andlud,chold, etc. are deprecated; #2212). -
A number of improvements to sparse matrix capabilities and sparse linear algebra.
-
More linear algebra fixes and eigensolver hooks for
SymTridiagonal,TridiagonalandBidiagonalmatrix types (#2606, #2608, #2609, #2611, #2678, #2713, #2720, #2725). -
Change
integer_valued,real_valued, and so on toisinteger,isreal, and so on, and semantics of the later are now value-based rather than type-based, unlike MATLAB/Octave (#3071).isboolandiscomplexare eliminated in favor of a generaliseltypefunction. -
Transitive comparison of floats with rationals (#3102).
-
Fast prime generation with
primesand fast primality testing withisprime. -
sumandcumsumnow use pairwise summation for better accuracy (#4039). -
Dot operators (
.+,.*etc.) now broadcast singleton dimensions of array arguments. This behavior can be applied to any function usingbroadcast(f, ...). -
combinations,permutations, andpartitionsnow return iterators instead of a task, andinteger_partitionshas been renamed topartitions(#3989, #4055). -
isreadable/iswritablemethods added for more IO types (#3872). -
Much faster and improved
readdlmandwritedlm(#3350, #3468, #3483). -
Faster
matchall(#3719), and various string and regex improvements. -
Documentation of advanced linear algebra features (#2807).
-
Support optional RTLD flags in
dlopen(#2380). -
pmapnow works with any iterable collection. -
Options in
pmapfor retrying or ignoring failed tasks. -
New
sinpi(x)andcospi(x)functions to compute sine and cosine ofpi*xmore accurately (#4112). -
New implementations of elementary complex functions
sqrt,log,asin,acos,atan,tanh,asinh,acosh,atanhwith correct branch cuts (#2891). -
Improved behavior of
SubArray(#4412, #4284, #4044, #3697, #3790, #3148, #2844, #2644 and various other fixes). -
New convenience functions in graphics API.
-
Improved backtraces on Windows and OS X.
-
Methods of
minandmaxthat do reductions were renamed tominimumandmaximum.min(x)is nowminimum(x), andmin(x,(),dim)is nowminimum(x,dim). (#4235) -
ComplexPairwas renamed toComplexand madeimmutable, andComplex128and so on are now aliases to the newComplextype. -
!was added to the name of many mutating functions, e.g.,pushwas renamedpush!(#907). -
refrenamed togetindex, andassigntosetindex!(#1484). -
writeablerenamed towritable(#3874). -
logbandilogbrenamed toexponent(#2516). -
quote_stringbecame a method ofrepr. -
safe_char,check_ascii, andcheck_utf8replaced byis_valid_char,is_valid_ascii, andis_valid_utf8, respectively. -
each_line,each_match,begins_with,ends_with,parse_float,parse_int, andseek_endreplaced by:eachline,eachmatch, and so on (_was removed) (#1539). -
parse_bin(s)replaced byparseint(s,2);parse_oct(s)replaced byparseint(s,8);parse_hex(s)replaced byparseint(s,16). -
findn_nzsreplaced byfindnz(#1539). -
DivideByZeroErrorreplaced byDivideError. -
addprocs_ssh,addprocs_ssh_tunnel, andaddprocs_localreplaced byaddprocs(with keyword options). -
remote_call,remote_call_fetch, andremote_call_waitreplaced byremotecall,remotecall_fetch, andremotecall_wait. -
hasreplaced byinfor sets and byhaskeyfor dictionaries. -
diagmmanddiagmm!replaced byscaleandscale!(#2916). -
unsafe_refandunsafe_assignreplaced byunsafe_loadandunsafe_store!. -
add_each!anddel_each!replaced byunion!andsetdiff!. -
isdenormalrenamed toissubnormal(#3105). -
exprreplaced by direct call toExprconstructor. -
|,&,$,-, and~for sets replaced byunion,intersect,symdiff,setdiff, andcomplement(#3272). -
squarefunction removed. -
pascalfunction removed. -
addandadd!forSetreplaced bypush!. -
lsfunction deprecated in favor ofreaddiror;lsin the REPL. -
start_timernow expects arguments in units of seconds, not milliseconds. -
Shell redirection operators
|,>, and<eliminated in favor of a new operator|>(#3523). -
amapis deprecated in favor of newmapslicesfunctionality. -
The
Reverseiterator was removed since it did not work in many cases. -
The
gcdfunction now returns a non-negative value regardless of the argument signs, and various other sign problems withinvmod,lcm,gcdx, andpowermodwere fixed ([#4811]).
-
julia-release-*executables renamed tojulia-*, andlibjulia-releaserenamed tolibjulia(#4177). -
Packages will now be installed in
.julia/vX.Y, where X.Y is the current Julia version.
Too numerous to mention.