SlideShare a Scribd company logo
1 of 70
Download to read offline
Programming languages:
history, relativity and design
labs Jiahao Chen
Alan Edelman Andreas Noack Xianyi Zhang Jarrett Revels
Oscar BlumbergDavid Sanders
The
Julia Lab
at MIT
Simon Danisch
Jiahao Chen
Weijian Zhang
U. Manchester
Jake Bolewski
USAP
Shashi GowdaAmit Murthy Tanmay Mohapatra
Collaborators
Joey Huchette
Isaac Virshup
Steven Johnson
MIT Mathematics
Yee Sian Ng Miles Lubin Iain Dunning
Jon Malmaud Simon Kornblith
Yichao Yu
Harvard
Jeremy Kepner
Lincoln Labs
Stavros
Papadopoulos
Intel Labs
Nikos
Patsopoulos
Brigham Woman’s
Hospital
Pete Szolovits
CSAIL
Alex Townsend
MIT Mathematics
Jack Poulson
Google
Mike Innes
Mike Innes
Julia Computing
Summer of
Code alums
Keno Fischer
Julia Computing
Jameson Nash
Julia Computing
Simon Danisch
Julia Lab
Shashi Gowda
Julia Lab
Leah Hanson
Stripe
John Myles White
Facebook
Jarrett Revels
Julia Lab
2013
2014
2015
Jacob Quinn
Domo
Kenta Sato
U. Tokyo
Rohit Varkey Thankachan
Nat’l Inst. Tech. Karnataka
Simon Danish
Julia Lab
David Gold
U. Washington
Keno FischerJameson NashStefan KarpinskiJeff Bezanson Viral B. Shah
Alums at
445 contributors to Julia
726 package authors
as of 2016-03-15
https://github.com/jiahao/ijulia-notebooks
The world of
808 packages, 726 authors
445 contributors to julia repo
6,841 stargazers
549 watchers
My life story
b. 1981
My life story
b. 1981
My life story
b. 1981
UIUC

2002 BS chemistry
excitonic structure in

photosynthetic proteins
My life story
b. 1981
UIUC

2002 BS chemistry
excitonic structure in

photosynthetic proteins
2002-4
optical power limiting
energetic materials
My life story
b. 1981
2008 MS appl. math.

2009 PhD chem. phys.
charge transfer models

for molecular dynamics
UIUC

2002 BS chemistry
excitonic structure in

photosynthetic proteins
2002-4
optical power limiting
energetic materials
My life story
b. 1981
2008 MS appl. math.

2009 PhD chem. phys.
charge transfer models

for molecular dynamics
UIUC

2002 BS chemistry
excitonic structure in

photosynthetic proteins
2009-13 postdoc comp. chem.
random matrices

and models for

organic semiconductors
2002-4
optical power limiting
energetic materials
My life story
b. 1981
3D-RISM

solvent model
2013
Ritsumeikan
2008 MS appl. math.

2009 PhD chem. phys.
charge transfer models

for molecular dynamics
UIUC

2002 BS chemistry
excitonic structure in

photosynthetic proteins
2009-13 postdoc comp. chem.
random matrices

and models for

organic semiconductors
2002-4
optical power limiting
energetic materials
My life story
b. 1981
3D-RISM

solvent model
2013
Ritsumeikan
2008 MS appl. math.

2009 PhD chem. phys.
charge transfer models

for molecular dynamics
UIUC

2002 BS chemistry
excitonic structure in

photosynthetic proteins
2009-13 postdoc comp. chem.
random matrices

and models for

organic semiconductors
2013-now Julia
2002-4
optical power limiting
energetic materials
My life story
b. 1981
Us today
3D-RISM

solvent model
2013
Ritsumeikan
2008 MS appl. math.

2009 PhD chem. phys.
charge transfer models

for molecular dynamics
UIUC

2002 BS chemistry
excitonic structure in

photosynthetic proteins
2009-13 postdoc comp. chem.
random matrices

and models for

organic semiconductors
2013-now Julia
2002-4
optical power limiting
energetic materials
My life story
b. 1981
Us today
3D-RISM

solvent model
2013
Ritsumeikan
2008 MS appl. math.

2009 PhD chem. phys.
charge transfer models

for molecular dynamics
UIUC

2002 BS chemistry
excitonic structure in

photosynthetic proteins
2009-13 postdoc comp. chem.
random matrices

and models for

organic semiconductors
2013-now Julia
2002-4
optical power limiting
energetic materials
My life story
Python, Fortran, C, C++

Julia
BASIC, Logo,

Pascal, C, C++
Us today
Fortran

C, C++

Python

Cython

Julia
MATLAB, Python,

C, C++, Fortran
LabVIEW, VBA,

MATLAB/Octave
My life story
Python, Fortran, C, C++

Julia
BASIC, Logo,

Pascal, C, C++
Us today
Fortran

C, C++

Python

Cython

Julia
MATLAB, Python,

C, C++, Fortran
LabVIEW, VBA,

MATLAB/Octave
My life story
Python, FORTRAN, C, C++

Julia
BASIC, Logo,

Pascal, C, C++
Us today
Fortran

C, C++

Python

Cython

Julia
MATLAB, Python,

C, C++, Fortran
LabVIEW, VBA,

MATLAB/Octave
The two language problem
prototype in slow scripting language
deploy in fast systems language

(Ousterhout’s dichotomy)
The world of computing (1948)
1943-4: Colossus Mk I

1944-5: Mk II

Turing, Flowers, et al.

Bletchley Park
1946-55: ENIAC

first electronic, Turing-complete computer

Mauchley & Eckert, U. Penn., 1946
Zuse, Berlin

1936-43 Z1: first computer implementation of floating-point arithmetic

1941-3 - Z3: first programmable automatic computer
1942-2: First electronic (vacuum tube)

computer to solve Ax=b (29x29)

Atanasoff and Berry

Iowa State
1946-7: Williams(-Killburn) tube RAM invented

1948: Manchester “Baby”; 1949: Mk I

first electronic computer program; first modern computers with RAM

1949-61: EDVAC

Aberdeen, MD
1949-58: EDSAC

Cambridge, UK
1948: a world with 4 electrified computers
“I think there is a world market for maybe five computers.”

- Watson, IBM, 1943 (apocryphal)
1944-51: Aitken, Harvard Mk I

separation of code and data

1945: Hopper, first bug
1948-52: IBM SSEC, Eckert, NYC
The world of computing (1948)
1947: Transistor invented

Bardeen, Shockley et al., Bell Labs
1948: Information theory

Shannon, Bell Labs

1949: —- & Weaver, UIUC 1954-7: Fortran, Backus et al., IBM
1943-4: Colossus Mk I

1944-5: Mk II

Turing, Flowers, et al.

Bletchley Park
1946-55: ENIAC

first electronic, Turing-complete computer

Mauchley & Eckert, U. Penn., 1946
Zuse, Berlin

1936: idea of stored (computer) program invented

1936-43 Z1: first computer implementation of floating-point arithmetic

1941-3 - Z3: first programmable automatic computer

1943: Plankalkül (first designed programming language)
1942-2: First electronic (vacuum tube)

computer to solve Ax=b (29x29)

Atanasoff and Berry

Iowa State
1946-7: Williams(-Killburn) tube RAM invented

1948: Manchester “Baby”; 1949: Mk I

first electronic computer program; first modern computers with RAM

1952: Glennie’s AUTOCODE; 1955: Brooker’s Autocode (first compiled languages)
1949-61: EDVAC

Aberdeen, MD
1949-58: EDSAC

Cambridge, UK
1950: Lanczos iteration

1952: Conjugate gradients

NBS, DC
Rutishauser, Zürich

1951: automatic (high-level) programming invented

1952: for loop invented

1958: ALGOL (with others)
1951: Arnoldi iteration

UAC, E Hartford CT
1948: a world with 4 electrified computers
no programming languages, no compilers
(but with RAM, stored programs,

floating point and numerical linear algebra!)
1944-51: Aitken, Harvard Mk I

separation of code and data

1945: Hopper, first bug
1948: Wiener’s

Cybernetics, MIT
1948-52: IBM SSEC, Eckert, NYC
The world of computing (1955)
1948: Information theory

Shannon, Bell Labs

1949: —- & Weaver, UIUC
1946-55: ENIAC

first electronic, Turing-complete computer

Mauchley & Eckert, U. Penn., 1946
1952: Glennie’s AUTOCODE; 1955: Brooker’s Autocode (first compiled languages)
1949-61: EDVAC

Aberdeen, MD
1949-58: EDSAC

Cambridge, UK

1961: EDSAC 2 Autocode
1950: Lanczos iteration

1952: Conjugate gradients

NBS, DC
Rutishauser, Zürich

1951: automatic (high-level) programming invented

1952: for loop invented

1958: IAL/ALGOL (with others)
1951: Arnoldi iteration

UAC, E Hartford CT
1952-5: the genesis of high level programming languages
and compilers
1948-52: IBM SSEC, Eckert, NYC
1946-55: ENIAC

first electronic, Turing-complete computer

Mauchley & Eckert, U. Penn., 1946
1952: Harvard Mk IV

fully electronic
1948-52: IBM SSEC, Eckert, NYC
1951: MIT Whirlwind

1952-4: Laning & Zierler’s GEORGE

first high level compiled language
1951: Ferranti Mk I

1954+: Ferranti Mercury + Autocode
1947: Transistor invented

Bardeen, Shockley et al., Bell Labs
1954-7: Fortran, Backus et al., IBM
What does it mean to say something?
linguistic relativity
or, the Sapir-Whorf hypothesis
linguistic relativity
or, the Sapir-Whorf hypothesis
language
determines or contrains
cognition
doi:10.1016/0010-0277(76)90001-9
E. Sapir, The Status of Linguistics as a Science, 

Language, Vol. 5, No. 4 (Dec., 1929), pp. 207-214
E. Sapir, The Status of Linguistics as a Science, 

Language, Vol. 5, No. 4 (Dec., 1929), pp. 207-214
B. L. Whorf, “Science and linguistics”, in Language, Thought and Reality: Selected Writings of
Benjamin Lee Whorf, J. B. Carroll, ed., MIT Press & John Wiley, NY, 1956,
https://archive.org/stream/languagethoughtr00whor#page/206/mode/2up
B. L. Whorf, “Language, Mind and Reality”, in Language, Thought and Reality: Selected Writings of
Benjamin Lee Whorf, J. B. Carroll, ed., MIT Press & John Wiley, NY, 1956,
https://archive.org/stream/languagethoughtr00whor#page/264/mode/2up
To paraphrase Sapir and Whorf,
Language shapes the formation of naïve, deep-rooted,
unconscious cultural habits that resist opposition
To what extent is it true also of programming languages?
Task: I am looking at an Uber driver’s ratings record.
Find the average rating each user has given to the driver.
User ID Rating
381 5
1291 4
3992 4
193942 4
9493 5
381 5
3992 5
381 3
3992 5
193942 4
> library(dplyr);
> userid = c(381, 1291, 3992, 193942, 9493, 381,
3992, 381, 3992, 193942)
> rating = c(5, 4, 4, 4, 5, 5, 5, 3, 5, 4)
> mycar = data.frame(rating, userid)
> summarize(group_by(mycar, userid),
avgrating=mean(rating))
# A tibble: 5 x 2
userid avgrating
<dbl> <dbl>
1 381 4.333333
2 1291 4.000000
3 3992 4.666667
4 9493 5.000000
5 193942 4.000000
An R solution
>> userids = [381 1291 3992 193942 9493 381 3992 381
3992 193942];
>> ratings = [5 4 4 4 5 5 5 3 5 4];
>> accumarray(userids',ratings',[],@mean,[],true)
ans =
(381,1) 4.3333
(1291,1) 4.0000
(3992,1) 4.6667
(9493,1) 5.0000
(193942,1) 4.0000
A MATLAB solution
u←381 1291 3992 193942 9493 381 3992 381 3992
193942
r←5 4 4 4 5 5 5 3 5 4
v←(∪u)∘.=u
(v+.×r)÷+/v
4.333333333 4 4.666666667 4 5
∪u
381 1291 3992 193942 9493
An APL solution
u←381 1291 3992 193942 9493 381 3992 381 3992
193942
r←5 4 4 4 5 5 5 3 5 4
v←(∪u)∘.=u
(v+.×r)÷+/v
4.333333333 4 4.666666667 4 5
∪u
381 1291 3992 193942 9493
∪ is nonstandard
defined as
∇y←∪
y←((⍳⍨x)=⍳⍴x)/x
∇
not sorted… need ⍋
An APL solution
R+dplyr MATLAB APL
main solution summarize accumarray ∘.=, +.×
constructor
higher order
function
generalized matrix
products
abstraction data frame matrix array
an idiomatic
variable name userid userids u
#include <stdio.h>
int main(void)
{
int userids[10] = {381, 1291, 3992, 193942, 9494, 381,
3992, 381, 3992, 193942};
int ratings[10] = {5,4,4,4,5,5,5,3,5,4};
int nuniq = 0;
int useridsuniq[10];
int counts[10];
float avgratings[10];
int isunique;
int i, j;
for(i=0; i<10; i++)
{
/*Have we seen this userid?*/
isunique = 1;
for(j=0; j<nuniq; j++)
{
if(userids[i] == useridsuniq[j])
{
isunique = 0;
/*Update accumulators*/
counts[j]++;
avgratings[j] += ratings[i];
}
}
A C solution
/* New entry*/
if(isunique)
{
useridsuniq[nuniq] = userids[i];
counts[nuniq] = 1;
avgratings[nuniq++] = ratings[i];
}
}
/* Now divide through */
for(j=0; j<nuniq; j++)
avgratings[j] /= counts[j];
/* Now print*/
for(j=0; j<nuniq; j++)
printf("%dt%fn", useridsuniq[j],
avgratings[j]);
return 0;
}
#include <stdio.h>
int main(void)
{
int userids[10] = {381, 1291, 3992, 193942, 9494, 381,
3992, 381, 3992, 193942};
int ratings[10] = {5,4,4,4,5,5,5,3,5,4};
int nuniq = 0;
int useridsuniq[10];
int counts[10];
float avgratings[10];
int isunique;
int i, j;
for(i=0; i<10; i++)
{
/*Have we seen this userid?*/
isunique = 1;
for(j=0; j<nuniq; j++)
{
if(userids[i] == useridsuniq[j])
{
isunique = 0;
/*Update accumulators*/
counts[j]++;
avgratings[j] += ratings[i];
}
}
/* New entry*/
if(isunique)
{
useridsuniq[nuniq] = userids[i];
counts[nuniq] = 1;
avgratings[nuniq++] = ratings[i];
}
}
/* Now divide through */
for(j=0; j<nuniq; j++)
avgratings[j] /= counts[j];
/* Now print*/
for(j=0; j<nuniq; j++)
printf("%dt%fn", useridsuniq[j],
avgratings[j]);
return 0;
}
boilerplate code
manual memory
management
small standard library
A C solution
Another Julia solution
userids=[381, 1291, 3992, 193942, 9494, 381, 3992, 381, 3992, 193942];
ratings=[5,4,4,4,5,5,5,3,5,4];
counts = [];
uuserids=[];
uratings=[];
for i=1:length(userids)
j = findfirst(uuserids, userids[i])
if j==0 #not found
push!(uuserids, userids[i])
push!(uratings, ratings[i])
push!(counts, 1)
else #already seen
uratings[j] += ratings[i]
counts[j] += 1
end
end
[uuserids uratings./counts]
5x2 Array{Any,2}:
381 4.33333
1291 4.0
3992 4.66667
193942 4.0
9494 5.0
Another Julia solution
userids=[381, 1291, 3992, 193942, 9494, 381, 3992, 381, 3992, 193942];
ratings=[5,4,4,4,5,5,5,3,5,4];
counts = [];
uuserids=[];
uratings=[];
for i=1:length(userids)
j = findfirst(uuserids, userids[i])
if j==0 #not found
push!(uuserids, userids[i])
push!(uratings, ratings[i])
push!(counts, 1)
else #already seen
uratings[j] += ratings[i]
counts[j] += 1
end
end
[uuserids uratings./counts]
5x2 Array{Any,2}:
381 4.33333
1291 4.0
3992 4.66667
193942 4.0
9494 5.0
fast loops
vectorized operations
mix and match what you want
other solutions: DataFrames, functional…
What does code mean?
The semantics of a programming language describe:
What types of data are allowed
How expressions are evaluated
How to organize code into

subunits
How to decide what to do
…
What does code mean?
The semantics of a programming language describe:
What types of data are allowed
How expressions are evaluated
How to organize code into

subunits
How to decide what to do
…
if/switch/case

for/while loops

method dispatch
floating point

integers - machine vs arbitrary size

user-defined objects
left to right

pass by value vs. pass by reference

lazy vs eager evaluation

scope of variables
procedures/subroutines/functions

objects/classes
What does code mean?
The semantics of a programming language describe:
What types of data are allowed
How expressions are evaluated
How to organize code into

subunits
How to decide what to do
…
What does code mean?
The semantics of a programming language describe:
What types of data are allowed
How expressions are evaluated
How to organize code into

subunits
How to decide what to do
…
if/switch/case

for/while loops

method dispatch
floating point

integers - machine vs arbitrary size

user-defined objects
left to right

pass by value vs. pass by reference

lazy vs eager evaluation

scope of variables
procedures/subroutines/functions

objects/classes
multiple dispatch (multimethods)
Julia’s way to express the polymorphic nature
of mathematics
A*B multiplication of integers
multiplication of complex numbers
multiplication of matrices
concatenation of strings
Object-oriented programming with classes
What can I do with/to a thing?
Object-oriented programming with classes
What can I do with/to a thing?
Object-oriented programming with classes
What can I do with/to a thing?
top up
pay fare
lose
buy
Object-oriented programming with classes
What can I do with/to a thing?
top up
pay fare
lose
buy
top up
pay fare
lose
buy
Object-oriented programming with classes
What can I do with/to a thing?
top up
pay fare
lose
buy
top up
pay fare
lose
buy
Object-oriented programming with classes
What can I do with/to a thing?
top up
pay fare
lose
buy
top up
pay fare
lose
buy
pay fare
lose
buy
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
top up
pay fare
lose
buy
top up
pay fare
lose
buy
pay fare
lose
buy
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
top up
pay fare
lose
buy
top up
pay fare
lose
buy
pay fare
lose
buy
class-based OO
classes are more
fundamental
than methods
Object-oriented programming with multi-methods
What can I do with/to a thing?
top up
pay fare
lose
buy
generic
function
objectsmethods
Object-oriented programming with multi-methods
What can I do with/to a thing?
top up
pay fare
lose
buy
generic
function
objectsmethods
multimethods
relationships between
objects and functions
Multi-methods with type hierarchy
top up
pay fare
lose
buy
generic
function
objectsmethods
rechargeable
subway
pass
single-use
subway
ticket
is a subtype of
subway
ticket
abstract object
generic
function
objectsmethods
rechargeable
subway
pass
single-use
subway
ticket
is a subtype of
subway
ticket
top up
pay fare
lose
buy
abstract object
Multi-methods with type hierarchy
generic
function
objectsmethods
rechargeable
subway
pass
single-use
subway
ticket
is a subtype of
subway
ticket
top up
pay fare
lose
buy
abstract object
Multi-methods with type hierarchy
A*B multiplication of integers
multiplication of complex numbers
multiplication of matrices
concatenation of strings
which meaning you want depends on context

(types of A and B)
A*B
if A is a number and
B is a number
compute …
else if A is a number and
B is a matrix
compute …
else if A is a matrix and
B is a matrix
compute …
else…
* generic function
Number*Number
Number*Matrix
Matrix*Matrix
run time conditional
branches
generic functions with
multiple dispatch
classes
Number
Matrix
Number*Number
Number*Matrix
Matrix*Matrix
Matrix*Number
class
class
other methods…
A*B
if A is a number and
B is a number
compute …
else if A is a number and
B is a matrix
compute …
else if A is a matrix and
B is a matrix
compute …
else if A is a spinor and
B is a spinor
… (+ 4 new cases)
end
* generic function
Number*Number
Number*Matrix
Matrix*Matrix
run time conditional
branches
classes
Number
Matrix
Number*Number
Number*Matrix
Matrix*Matrix
Matrix*Number
class
class
Spinor class
Spinor*Number
Spinor*Matrix
Spinor*Spinor
Number*Spinor
Matrix*Spinor
Spinor*Number
Spinor*Matrix
Spinor*Spinor
Number*Spinor
Matrix*Spinor
other methods…
julia> methods(*)
# 138 methods for generic function "*":
*(x::Bool, y::Bool) at bool.jl:38
*{T<:Unsigned}(x::Bool, y::T<:Unsigned) at bool.jl:53
*(x::Bool, z::Complex{Bool}) at complex.jl:122
*(x::Bool, z::Complex{T<:Real}) at complex.jl:129
*{T<:Number}(x::Bool, y::T<:Number) at bool.jl:49
*(x::Float32, y::Float32) at float.jl:211
*(x::Float64, y::Float64) at float.jl:212
*(z::Complex{T<:Real}, w::Complex{T<:Real}) at complex.jl:113
*(z::Complex{Bool}, x::Bool) at complex.jl:123
*(z::Complex{T<:Real}, x::Bool) at complex.jl:130
*(x::Real, z::Complex{Bool}) at complex.jl:140
*(z::Complex{Bool}, x::Real) at complex.jl:141
*(x::Real, z::Complex{T<:Real}) at complex.jl:152
*(z::Complex{T<:Real}, x::Real) at complex.jl:153
*(x::Rational{T<:Integer}, y::Rational{T<:Integer}) at rational.jl:186
*(a::Float16, b::Float16) at float16.jl:136
*{N}(a::Integer, index::CartesianIndex{N}) at multidimensional.jl:50
*(x::BigInt, y::BigInt) at gmp.jl:256
*(a::BigInt, b::BigInt, c::BigInt) at gmp.jl:279
*(a::BigInt, b::BigInt, c::BigInt, d::BigInt) at gmp.jl:285
*(a::BigInt, b::BigInt, c::BigInt, d::BigInt, e::BigInt) at gmp.jl:292
*(x::BigInt, c::Union{UInt16,UInt32,UInt64,UInt8}) at gmp.jl:326
*(c::Union{UInt16,UInt32,UInt64,UInt8}, x::BigInt) at gmp.jl:330
*(x::BigInt, c::Union{Int16,Int32,Int64,Int8}) at gmp.jl:332
*(c::Union{Int16,Int32,Int64,Int8}, x::BigInt) at gmp.jl:336
*(x::BigFloat, y::BigFloat) at mpfr.jl:208
*(x::BigFloat, c::Union{UInt16,UInt32,UInt64,UInt8}) at mpfr.jl:215
*(c::Union{UInt16,UInt32,UInt64,UInt8}, x::BigFloat) at mpfr.jl:219
*(x::BigFloat, c::Union{Int16,Int32,Int64,Int8}) at mpfr.jl:223
*(c::Union{Int16,Int32,Int64,Int8}, x::BigFloat) at mpfr.jl:227
*(x::BigFloat, c::Union{Float16,Float32,Float64}) at mpfr.jl:231
*(c::Union{Float16,Float32,Float64}, x::BigFloat) at mpfr.jl:235
*(x::BigFloat, c::BigInt) at mpfr.jl:239
*(c::BigInt, x::BigFloat) at mpfr.jl:243
*(a::BigFloat, b::BigFloat, c::BigFloat) at mpfr.jl:379
*(a::BigFloat, b::BigFloat, c::BigFloat, d::BigFloat) at mpfr.jl:385
*(a::BigFloat, b::BigFloat, c::BigFloat, d::BigFloat, e::BigFloat) at mpfr.jl:392
*{T<:Number}(x::T<:Number, D::Diagonal{T}) at linalg/diagonal.jl:89
*(x::Irrational{sym}, y::Irrational{sym}) at irrationals.jl:72
*(y::Real, x::Base.Dates.Period) at dates/periods.jl:74
*(x::Number) at operators.jl:74
*(y::Number, x::Bool) at bool.jl:55
*(x::Int8, y::Int8) at int.jl:19
*(x::UInt8, y::UInt8) at int.jl:19
*(x::Int16, y::Int16) at int.jl:19
*(x::UInt16, y::UInt16) at int.jl:19
*(x::Int32, y::Int32) at int.jl:19
*(x::UInt32, y::UInt32) at int.jl:19
*(x::Int64, y::Int64) at int.jl:19
*(x::UInt64, y::UInt64) at int.jl:19
*(x::Int128, y::Int128) at int.jl:456
*(x::UInt128, y::UInt128) at int.jl:457
*{T<:Number}(x::T<:Number, y::T<:Number) at promotion.jl:212
*(x::Number, y::Number) at promotion.jl:168
*{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},S}(A::Union{DenseArray{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},2},SubArray{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, x::Union{DenseArray{S,1},SubArray{S,
1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/matmul.jl:82
*(A::SymTridiagonal{T}, B::Number) at linalg/tridiag.jl:86
*(A::Tridiagonal{T}, B::Number) at linalg/tridiag.jl:406
*(A::UpperTriangular{T,S<:AbstractArray{T,2}}, x::Number) at linalg/triangular.jl:454
*(A::Base.LinAlg.UnitUpperTriangular{T,S<:AbstractArray{T,2}}, x::Number) at linalg/triangular.jl:457*(A::LowerTriangular{T,S<:AbstractArray{T,2}}, x::Number) at linalg/triangular.jl:454
*(A::Base.LinAlg.UnitLowerTriangular{T,S<:AbstractArray{T,2}}, x::Number) at linalg/triangular.jl:457
*(A::Tridiagonal{T}, B::UpperTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:969
*(A::Tridiagonal{T}, B::Base.LinAlg.UnitUpperTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:969
*(A::Tridiagonal{T}, B::LowerTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:969
*(A::Tridiagonal{T}, B::Base.LinAlg.UnitLowerTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:969
*(A::Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}}, B::Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:975
*{TA,TB}(A::Base.LinAlg.AbstractTriangular{TA,S<:AbstractArray{T,2}}, B::Union{DenseArray{TB,1},DenseArray{TB,2},SubArray{TB,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD},SubArray{TB,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/triangular.jl:989
*{TA,TB}(A::Union{DenseArray{TA,1},DenseArray{TA,2},SubArray{TA,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD},SubArray{TA,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, B::Base.LinAlg.AbstractTriangular{TB,S<:AbstractArray{T,2}}) at linalg/triangular.jl:1016
*{TA,Tb}(A::Union{Base.LinAlg.QRCompactWYQ{TA,M<:AbstractArray{T,2}},Base.LinAlg.QRPackedQ{TA,S<:AbstractArray{T,2}}}, b::Union{DenseArray{Tb,1},SubArray{Tb,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/qr.jl:166
*{TA,TB}(A::Union{Base.LinAlg.QRCompactWYQ{TA,M<:AbstractArray{T,2}},Base.LinAlg.QRPackedQ{TA,S<:AbstractArray{T,2}}}, B::Union{DenseArray{TB,2},SubArray{TB,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/qr.jl:178
*{TA,TQ,N}(A::Union{DenseArray{TA,N},SubArray{TA,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, Q::Union{Base.LinAlg.QRCompactWYQ{TQ,M<:AbstractArray{T,2}},Base.LinAlg.QRPackedQ{TQ,S<:AbstractArray{T,2}}}) at linalg/qr.jl:253
*(A::Union{Hermitian{T,S},Symmetric{T,S}}, B::Union{Hermitian{T,S},Symmetric{T,S}}) at linalg/symmetric.jl:117
*(A::Union{DenseArray{T,2},SubArray{T,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, B::Union{Hermitian{T,S},Symmetric{T,S}}) at linalg/symmetric.jl:118
*{T<:Number}(D::Diagonal{T}, x::T<:Number) at linalg/diagonal.jl:90
*(Da::Diagonal{T}, Db::Diagonal{T}) at linalg/diagonal.jl:92
*(D::Diagonal{T}, V::Array{T,1}) at linalg/diagonal.jl:93
*(A::Array{T,2}, D::Diagonal{T}) at linalg/diagonal.jl:94
*(D::Diagonal{T}, A::Array{T,2}) at linalg/diagonal.jl:95
*(A::Bidiagonal{T}, B::Number) at linalg/bidiag.jl:192
*(A::Union{Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}},Bidiagonal{T},Diagonal{T},SymTridiagonal{T},Tridiagonal{T}}, B::Union{Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}},Bidiagonal{T},Diagonal{T},SymTridiagonal{T},Tridiagonal{T}}) at linalg/bidiag.jl:198
*{T}(A::Bidiagonal{T}, B::AbstractArray{T,1}) at linalg/bidiag.jl:202
*(B::BitArray{2}, J::UniformScaling{T<:Number}) at linalg/uniformscaling.jl:122
*{T,S}(s::Base.LinAlg.SVDOperator{T,S}, v::Array{T,1}) at linalg/arnoldi.jl:261
*(S::SparseMatrixCSC{Tv,Ti<:Integer}, J::UniformScaling{T<:Number}) at sparse/linalg.jl:23
*{Tv,Ti}(A::SparseMatrixCSC{Tv,Ti}, B::SparseMatrixCSC{Tv,Ti}) at sparse/linalg.jl:108
*{TvA,TiA,TvB,TiB}(A::SparseMatrixCSC{TvA,TiA}, B::SparseMatrixCSC{TvB,TiB}) at sparse/linalg.jl:29
*{TX,TvA,TiA}(X::Union{DenseArray{TX,2},SubArray{TX,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, A::SparseMatrixCSC{TvA,TiA}) at sparse/linalg.jl:94
*(A::Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Complex{Float64},Float64}}, B::Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Complex{Float64},Float64}}) at sparse/cholmod.jl:1157
*(A::Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Complex{Float64},Float64}}, B::Base.SparseMatrix.CHOLMOD.Dense{T<:Union{Complex{Float64},Float64}}) at sparse/cholmod.jl:1158
*(A::Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Complex{Float64},Float64}}, B::Union{Array{T,1},Array{T,2}}) at sparse/cholmod.jl:1159
*{Ti}(A::Symmetric{Float64,SparseMatrixCSC{Float64,Ti}}, B::SparseMatrixCSC{Float64,Ti}) at sparse/cholmod.jl:1418
*{Ti}(A::Hermitian{Complex{Float64},SparseMatrixCSC{Complex{Float64},Ti}}, B::SparseMatrixCSC{Complex{Float64},Ti}) at sparse/cholmod.jl:1419
*{T<:Number}(x::AbstractArray{T<:Number,2}) at abstractarraymath.jl:50
*(B::Number, A::SymTridiagonal{T}) at linalg/tridiag.jl:87
*(B::Number, A::Tridiagonal{T}) at linalg/tridiag.jl:407
*(x::Number, A::UpperTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:464
*(x::Number, A::Base.LinAlg.UnitUpperTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:467
*(x::Number, A::LowerTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:464
*(x::Number, A::Base.LinAlg.UnitLowerTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:467
*(B::Number, A::Bidiagonal{T}) at linalg/bidiag.jl:193
*(A::Number, B::AbstractArray{T,N}) at abstractarraymath.jl:54
*(A::AbstractArray{T,N}, B::Number) at abstractarraymath.jl:55
*(s1::AbstractString, ss::AbstractString...) at strings/basic.jl:50
*(this::Base.Grisu.Float, other::Base.Grisu.Float) at grisu/float.jl:138
*(index::CartesianIndex{N}, a::Integer) at multidimensional.jl:54
*{T,S}(A::AbstractArray{T,2}, B::Union{DenseArray{S,2},SubArray{S,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/matmul.jl:131
*{T,S}(A::AbstractArray{T,2}, x::AbstractArray{S,1}) at linalg/matmul.jl:86
*(A::AbstractArray{T,1}, B::AbstractArray{T,2}) at linalg/matmul.jl:89
*(J1::UniformScaling{T<:Number}, J2::UniformScaling{T<:Number}) at linalg/uniformscaling.jl:121
*(J::UniformScaling{T<:Number}, B::BitArray{2}) at linalg/uniformscaling.jl:123
*(A::AbstractArray{T,2}, J::UniformScaling{T<:Number}) at linalg/uniformscaling.jl:124
*{Tv,Ti}(J::UniformScaling{T<:Number}, S::SparseMatrixCSC{Tv,Ti}) at sparse/linalg.jl:24
*(J::UniformScaling{T<:Number}, A::Union{AbstractArray{T,1},AbstractArray{T,2}}) at linalg/uniformscaling.jl:125
*(x::Number, J::UniformScaling{T<:Number}) at linalg/uniformscaling.jl:127
*(J::UniformScaling{T<:Number}, x::Number) at linalg/uniformscaling.jl:128
*{T,S}(R::Base.LinAlg.AbstractRotation{T}, A::Union{AbstractArray{S,1},AbstractArray{S,2}}) at linalg/givens.jl:9
*{T}(G1::Base.LinAlg.Givens{T}, G2::Base.LinAlg.Givens{T}) at linalg/givens.jl:307
*(p::Base.DFT.ScaledPlan{T,P,N}, x::AbstractArray{T,N}) at dft.jl:262
*{T,K,N}(p::Base.DFT.FFTW.cFFTWPlan{T,K,false,N}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:621
*{T,K}(p::Base.DFT.FFTW.cFFTWPlan{T,K,true,N}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:628
*{N}(p::Base.DFT.FFTW.rFFTWPlan{Float32,-1,false,N}, x::Union{DenseArray{Float32,N},SubArray{Float32,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:698
*{N}(p::Base.DFT.FFTW.rFFTWPlan{Complex{Float32},1,false,N}, x::Union{DenseArray{Complex{Float32},N},SubArray{Complex{Float32},N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:705
*{N}(p::Base.DFT.FFTW.rFFTWPlan{Float64,-1,false,N}, x::Union{DenseArray{Float64,N},SubArray{Float64,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:698
*{N}(p::Base.DFT.FFTW.rFFTWPlan{Complex{Float64},1,false,N}, x::Union{DenseArray{Complex{Float64},N},SubArray{Complex{Float64},N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:705
*{T,K,N}(p::Base.DFT.FFTW.r2rFFTWPlan{T,K,false,N}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:866
*{T,K}(p::Base.DFT.FFTW.r2rFFTWPlan{T,K,true,N}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:873
*{T}(p::Base.DFT.FFTW.DCTPlan{T,5,false}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/dct.jl:188
*{T}(p::Base.DFT.FFTW.DCTPlan{T,4,false}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/dct.jl:191
*{T,K}(p::Base.DFT.FFTW.DCTPlan{T,K,true}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/dct.jl:194
*{T}(p::Base.DFT.Plan{T}, x::AbstractArray{T,N}) at dft.jl:221
*(α::Number, p::Base.DFT.Plan{T}) at dft.jl:264
*(p::Base.DFT.Plan{T}, α::Number) at dft.jl:265
*(I::UniformScaling{T<:Number}, p::Base.DFT.ScaledPlan{T,P,N}) at dft.jl:266
*(p::Base.DFT.ScaledPlan{T,P,N}, I::UniformScaling{T<:Number}) at dft.jl:267
*(I::UniformScaling{T<:Number}, p::Base.DFT.Plan{T}) at dft.jl:268
*(p::Base.DFT.Plan{T}, I::UniformScaling{T<:Number}) at dft.jl:269
*{P<:Base.Dates.Period}(x::P<:Base.Dates.Period, y::Real) at dates/periods.jl:73
*(a, b, c, xs...) at operators.jl:103
The secret to Julia’s speed and
composability
You can define many methods for a generic function (new ways to do
the same thing).
If the compiler can figure out exactly which method you need to use
when you invoke a function, then it generates optimized code.
some FAQs
Why is it called “Julia”?
It is a nice name.
Is Julia a compiled or interpreted
language?
Both - in a way.
a dynamic language, but
JIT compiled
lex/parse
read program
compile
generate machine
code
execute
run machine code
lex/parse
read program
interpret
run program
static language
dynamic language
Is Julia a compiled or interpreted
language?
Is Julia a compiled or interpreted
language?
lex/parse
read program
compile
generate machine
code
execute
run machine code
lex/parse
read program
interpret
run program
static language
dynamic language
JIT compile
generate machine
code
execute
run machine code
“But MATLAB has a JIT!”
��������
����� ������
������
�������� ������
������
����� ������ �
�
����������
������������������
�
�
��
��
��
��
���������������������������������������
Textbook fully pivoted LU algorithm
MATLAB R2014b, Octave 3.6.1, Python 3.5, R 3.0.0
MATLAB’s JIT made code slower…
Why not just make MATLAB/R/
Python/… faster?
Others have tried, with limited success.
These languages have features that are very hard for
compilers to understand.
Ongoing work!
Some references in an enormous literature on JIT compilers:
Jan Vitek, Making R run fast, Greater Boston useR Group talk, 2016-02-16
—, Can R learn from Julia? userR! 2016
Bolz, C. F., Cuni, A., Fijalkowski, M., and Rigo, A. (2009). Tracing the meta-level: PyPy’s tracing JIT
compiler, doi:10.1145/1565824.1565827
Joisha, P. G., & Banerjee, P. (2006). An algebraic array shape inference system for MATLAB, doi:
10.1145/1152649.1152651

More Related Content

Viewers also liked

A brief introduction to Hartree-Fock and TDDFT
A brief introduction to Hartree-Fock and TDDFTA brief introduction to Hartree-Fock and TDDFT
A brief introduction to Hartree-Fock and TDDFTJiahao Chen
 
Excitation Energy Transfer In Photosynthetic Membranes
Excitation Energy Transfer In Photosynthetic MembranesExcitation Energy Transfer In Photosynthetic Membranes
Excitation Energy Transfer In Photosynthetic MembranesJiahao Chen
 
Resolving the dissociation catastrophe in fluctuating-charge models
Resolving the dissociation catastrophe in fluctuating-charge modelsResolving the dissociation catastrophe in fluctuating-charge models
Resolving the dissociation catastrophe in fluctuating-charge modelsJiahao Chen
 
Group meeting 3/11 - sticky electrons
Group meeting 3/11 - sticky electronsGroup meeting 3/11 - sticky electrons
Group meeting 3/11 - sticky electronsJiahao Chen
 
Julia: compiler and community
Julia: compiler and communityJulia: compiler and community
Julia: compiler and communityJiahao Chen
 
What's next in Julia
What's next in JuliaWhat's next in Julia
What's next in JuliaJiahao Chen
 
Theory and application of fluctuating-charge models
Theory and application of fluctuating-charge modelsTheory and application of fluctuating-charge models
Theory and application of fluctuating-charge modelsJiahao Chen
 
Python as number crunching code glue
Python as number crunching code gluePython as number crunching code glue
Python as number crunching code glueJiahao Chen
 

Viewers also liked (8)

A brief introduction to Hartree-Fock and TDDFT
A brief introduction to Hartree-Fock and TDDFTA brief introduction to Hartree-Fock and TDDFT
A brief introduction to Hartree-Fock and TDDFT
 
Excitation Energy Transfer In Photosynthetic Membranes
Excitation Energy Transfer In Photosynthetic MembranesExcitation Energy Transfer In Photosynthetic Membranes
Excitation Energy Transfer In Photosynthetic Membranes
 
Resolving the dissociation catastrophe in fluctuating-charge models
Resolving the dissociation catastrophe in fluctuating-charge modelsResolving the dissociation catastrophe in fluctuating-charge models
Resolving the dissociation catastrophe in fluctuating-charge models
 
Group meeting 3/11 - sticky electrons
Group meeting 3/11 - sticky electronsGroup meeting 3/11 - sticky electrons
Group meeting 3/11 - sticky electrons
 
Julia: compiler and community
Julia: compiler and communityJulia: compiler and community
Julia: compiler and community
 
What's next in Julia
What's next in JuliaWhat's next in Julia
What's next in Julia
 
Theory and application of fluctuating-charge models
Theory and application of fluctuating-charge modelsTheory and application of fluctuating-charge models
Theory and application of fluctuating-charge models
 
Python as number crunching code glue
Python as number crunching code gluePython as number crunching code glue
Python as number crunching code glue
 

Similar to Here are the average ratings for each user in Python:```pythonuser_ids = 381, 1291, 3992, 193942, 9493, 381, 3992, 381, 3992, 193942ratings = 5, 4, 4, 4, 5, 5, 5, 3, 5, 4from collections import defaultdictuser_averages = defaultdict(list)for user, rating in zip(user_ids, ratings): user_averagesuser.append(rating)for user, ratings in user_averages.items(): print(user, sum(ratings)/len(ratings))```This prints:381

Integrating iPads and Tablet Computers into Library Services Part 2
Integrating iPads and Tablet Computers into Library Services Part 2Integrating iPads and Tablet Computers into Library Services Part 2
Integrating iPads and Tablet Computers into Library Services Part 2ALATechSource
 
Varsamis Prove It Lesson Plan FINAL
Varsamis Prove It  Lesson Plan FINALVarsamis Prove It  Lesson Plan FINAL
Varsamis Prove It Lesson Plan FINALDorina Varsamis
 
History of F#, and the ML family of languages.
History of F#, and the ML family of languages. History of F#, and the ML family of languages.
History of F#, and the ML family of languages. Rachel Reese
 
Towards Linked Ontologies and Data on the Semantic Web
Towards Linked Ontologies and Data on the Semantic WebTowards Linked Ontologies and Data on the Semantic Web
Towards Linked Ontologies and Data on the Semantic WebJie Bao
 
Humanities in the Digital World
Humanities in the Digital WorldHumanities in the Digital World
Humanities in the Digital WorldDavid De Roure
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingIla Group
 
Tom Stead Presentation-ISTE
Tom Stead Presentation-ISTETom Stead Presentation-ISTE
Tom Stead Presentation-ISTEWIRED staff
 
ExperimentalHumanities-TheCaseStudyOfLovelaceAndBabbage-20180621
ExperimentalHumanities-TheCaseStudyOfLovelaceAndBabbage-20180621ExperimentalHumanities-TheCaseStudyOfLovelaceAndBabbage-20180621
ExperimentalHumanities-TheCaseStudyOfLovelaceAndBabbage-20180621Pip Willcox
 
I want to know more about compuerized text analysis
I want to know more about   compuerized text analysisI want to know more about   compuerized text analysis
I want to know more about compuerized text analysisLuke Czarnecki
 
Steps Towards a History of Ethnomethodology in HCI
Steps Towards a History of Ethnomethodology in HCI Steps Towards a History of Ethnomethodology in HCI
Steps Towards a History of Ethnomethodology in HCI butest
 
Semantic Wiki Based Collaborative Scientific Modeling Infrastructure
Semantic Wiki Based  Collaborative Scientific Modeling Infrastructure Semantic Wiki Based  Collaborative Scientific Modeling Infrastructure
Semantic Wiki Based Collaborative Scientific Modeling Infrastructure Jie Bao
 
Yuri A. Ivanov
Yuri A. IvanovYuri A. Ivanov
Yuri A. Ivanovbutest
 
Podcasting intro for Rhodes
Podcasting intro for RhodesPodcasting intro for Rhodes
Podcasting intro for RhodesBryan Alexander
 
Anthem Ayn Rand Essay. Book quot;Anthemquot; by Ayn Rand Review Free Essay S...
Anthem Ayn Rand Essay.  Book quot;Anthemquot; by Ayn Rand Review Free Essay S...Anthem Ayn Rand Essay.  Book quot;Anthemquot; by Ayn Rand Review Free Essay S...
Anthem Ayn Rand Essay. Book quot;Anthemquot; by Ayn Rand Review Free Essay S...Heidi Marshall
 
Wisconsin readingpresentation
Wisconsin readingpresentationWisconsin readingpresentation
Wisconsin readingpresentationRichard Beach
 
Digital Scholarship Intersection
Digital Scholarship IntersectionDigital Scholarship Intersection
Digital Scholarship IntersectionDavid De Roure
 
Stuart russell and peter norvig artificial intelligence - a modern approach...
Stuart russell and peter norvig   artificial intelligence - a modern approach...Stuart russell and peter norvig   artificial intelligence - a modern approach...
Stuart russell and peter norvig artificial intelligence - a modern approach...Lê Anh Đạt
 

Similar to Here are the average ratings for each user in Python:```pythonuser_ids = 381, 1291, 3992, 193942, 9493, 381, 3992, 381, 3992, 193942ratings = 5, 4, 4, 4, 5, 5, 5, 3, 5, 4from collections import defaultdictuser_averages = defaultdict(list)for user, rating in zip(user_ids, ratings): user_averagesuser.append(rating)for user, ratings in user_averages.items(): print(user, sum(ratings)/len(ratings))```This prints:381 (20)

Integrating iPads and Tablet Computers into Library Services Part 2
Integrating iPads and Tablet Computers into Library Services Part 2Integrating iPads and Tablet Computers into Library Services Part 2
Integrating iPads and Tablet Computers into Library Services Part 2
 
Varsamis Prove It Lesson Plan FINAL
Varsamis Prove It  Lesson Plan FINALVarsamis Prove It  Lesson Plan FINAL
Varsamis Prove It Lesson Plan FINAL
 
History of F#, and the ML family of languages.
History of F#, and the ML family of languages. History of F#, and the ML family of languages.
History of F#, and the ML family of languages.
 
Towards Linked Ontologies and Data on the Semantic Web
Towards Linked Ontologies and Data on the Semantic WebTowards Linked Ontologies and Data on the Semantic Web
Towards Linked Ontologies and Data on the Semantic Web
 
Humanities in the Digital World
Humanities in the Digital WorldHumanities in the Digital World
Humanities in the Digital World
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Podcasting
PodcastingPodcasting
Podcasting
 
Robotics
RoboticsRobotics
Robotics
 
Tom Stead Presentation-ISTE
Tom Stead Presentation-ISTETom Stead Presentation-ISTE
Tom Stead Presentation-ISTE
 
ExperimentalHumanities-TheCaseStudyOfLovelaceAndBabbage-20180621
ExperimentalHumanities-TheCaseStudyOfLovelaceAndBabbage-20180621ExperimentalHumanities-TheCaseStudyOfLovelaceAndBabbage-20180621
ExperimentalHumanities-TheCaseStudyOfLovelaceAndBabbage-20180621
 
I want to know more about compuerized text analysis
I want to know more about   compuerized text analysisI want to know more about   compuerized text analysis
I want to know more about compuerized text analysis
 
Steps Towards a History of Ethnomethodology in HCI
Steps Towards a History of Ethnomethodology in HCI Steps Towards a History of Ethnomethodology in HCI
Steps Towards a History of Ethnomethodology in HCI
 
Semantic Wiki Based Collaborative Scientific Modeling Infrastructure
Semantic Wiki Based  Collaborative Scientific Modeling Infrastructure Semantic Wiki Based  Collaborative Scientific Modeling Infrastructure
Semantic Wiki Based Collaborative Scientific Modeling Infrastructure
 
Yuri A. Ivanov
Yuri A. IvanovYuri A. Ivanov
Yuri A. Ivanov
 
Podcasting intro for Rhodes
Podcasting intro for RhodesPodcasting intro for Rhodes
Podcasting intro for Rhodes
 
History of Women in Tech
History of Women in TechHistory of Women in Tech
History of Women in Tech
 
Anthem Ayn Rand Essay. Book quot;Anthemquot; by Ayn Rand Review Free Essay S...
Anthem Ayn Rand Essay.  Book quot;Anthemquot; by Ayn Rand Review Free Essay S...Anthem Ayn Rand Essay.  Book quot;Anthemquot; by Ayn Rand Review Free Essay S...
Anthem Ayn Rand Essay. Book quot;Anthemquot; by Ayn Rand Review Free Essay S...
 
Wisconsin readingpresentation
Wisconsin readingpresentationWisconsin readingpresentation
Wisconsin readingpresentation
 
Digital Scholarship Intersection
Digital Scholarship IntersectionDigital Scholarship Intersection
Digital Scholarship Intersection
 
Stuart russell and peter norvig artificial intelligence - a modern approach...
Stuart russell and peter norvig   artificial intelligence - a modern approach...Stuart russell and peter norvig   artificial intelligence - a modern approach...
Stuart russell and peter norvig artificial intelligence - a modern approach...
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Here are the average ratings for each user in Python:```pythonuser_ids = 381, 1291, 3992, 193942, 9493, 381, 3992, 381, 3992, 193942ratings = 5, 4, 4, 4, 5, 5, 5, 3, 5, 4from collections import defaultdictuser_averages = defaultdict(list)for user, rating in zip(user_ids, ratings): user_averagesuser.append(rating)for user, ratings in user_averages.items(): print(user, sum(ratings)/len(ratings))```This prints:381

  • 1. Programming languages: history, relativity and design labs Jiahao Chen
  • 2. Alan Edelman Andreas Noack Xianyi Zhang Jarrett Revels Oscar BlumbergDavid Sanders The Julia Lab at MIT Simon Danisch Jiahao Chen Weijian Zhang U. Manchester Jake Bolewski USAP Shashi GowdaAmit Murthy Tanmay Mohapatra Collaborators Joey Huchette Isaac Virshup Steven Johnson MIT Mathematics Yee Sian Ng Miles Lubin Iain Dunning Jon Malmaud Simon Kornblith Yichao Yu Harvard Jeremy Kepner Lincoln Labs Stavros Papadopoulos Intel Labs Nikos Patsopoulos Brigham Woman’s Hospital Pete Szolovits CSAIL Alex Townsend MIT Mathematics Jack Poulson Google Mike Innes
  • 3. Mike Innes Julia Computing Summer of Code alums Keno Fischer Julia Computing Jameson Nash Julia Computing Simon Danisch Julia Lab Shashi Gowda Julia Lab Leah Hanson Stripe John Myles White Facebook Jarrett Revels Julia Lab 2013 2014 2015 Jacob Quinn Domo Kenta Sato U. Tokyo Rohit Varkey Thankachan Nat’l Inst. Tech. Karnataka Simon Danish Julia Lab David Gold U. Washington Keno FischerJameson NashStefan KarpinskiJeff Bezanson Viral B. Shah Alums at
  • 4. 445 contributors to Julia 726 package authors as of 2016-03-15
  • 5. https://github.com/jiahao/ijulia-notebooks The world of 808 packages, 726 authors 445 contributors to julia repo 6,841 stargazers 549 watchers
  • 8. My life story b. 1981 UIUC
 2002 BS chemistry excitonic structure in
 photosynthetic proteins
  • 9. My life story b. 1981 UIUC
 2002 BS chemistry excitonic structure in
 photosynthetic proteins 2002-4 optical power limiting energetic materials
  • 10. My life story b. 1981 2008 MS appl. math.
 2009 PhD chem. phys. charge transfer models
 for molecular dynamics UIUC
 2002 BS chemistry excitonic structure in
 photosynthetic proteins 2002-4 optical power limiting energetic materials
  • 11. My life story b. 1981 2008 MS appl. math.
 2009 PhD chem. phys. charge transfer models
 for molecular dynamics UIUC
 2002 BS chemistry excitonic structure in
 photosynthetic proteins 2009-13 postdoc comp. chem. random matrices
 and models for
 organic semiconductors 2002-4 optical power limiting energetic materials
  • 12. My life story b. 1981 3D-RISM
 solvent model 2013 Ritsumeikan 2008 MS appl. math.
 2009 PhD chem. phys. charge transfer models
 for molecular dynamics UIUC
 2002 BS chemistry excitonic structure in
 photosynthetic proteins 2009-13 postdoc comp. chem. random matrices
 and models for
 organic semiconductors 2002-4 optical power limiting energetic materials
  • 13. My life story b. 1981 3D-RISM
 solvent model 2013 Ritsumeikan 2008 MS appl. math.
 2009 PhD chem. phys. charge transfer models
 for molecular dynamics UIUC
 2002 BS chemistry excitonic structure in
 photosynthetic proteins 2009-13 postdoc comp. chem. random matrices
 and models for
 organic semiconductors 2013-now Julia 2002-4 optical power limiting energetic materials
  • 14. My life story b. 1981 Us today 3D-RISM
 solvent model 2013 Ritsumeikan 2008 MS appl. math.
 2009 PhD chem. phys. charge transfer models
 for molecular dynamics UIUC
 2002 BS chemistry excitonic structure in
 photosynthetic proteins 2009-13 postdoc comp. chem. random matrices
 and models for
 organic semiconductors 2013-now Julia 2002-4 optical power limiting energetic materials
  • 15. My life story b. 1981 Us today 3D-RISM
 solvent model 2013 Ritsumeikan 2008 MS appl. math.
 2009 PhD chem. phys. charge transfer models
 for molecular dynamics UIUC
 2002 BS chemistry excitonic structure in
 photosynthetic proteins 2009-13 postdoc comp. chem. random matrices
 and models for
 organic semiconductors 2013-now Julia 2002-4 optical power limiting energetic materials
  • 16. My life story Python, Fortran, C, C++
 Julia BASIC, Logo,
 Pascal, C, C++ Us today Fortran
 C, C++
 Python
 Cython
 Julia MATLAB, Python,
 C, C++, Fortran LabVIEW, VBA,
 MATLAB/Octave
  • 17. My life story Python, Fortran, C, C++
 Julia BASIC, Logo,
 Pascal, C, C++ Us today Fortran
 C, C++
 Python
 Cython
 Julia MATLAB, Python,
 C, C++, Fortran LabVIEW, VBA,
 MATLAB/Octave
  • 18. My life story Python, FORTRAN, C, C++
 Julia BASIC, Logo,
 Pascal, C, C++ Us today Fortran
 C, C++
 Python
 Cython
 Julia MATLAB, Python,
 C, C++, Fortran LabVIEW, VBA,
 MATLAB/Octave The two language problem prototype in slow scripting language deploy in fast systems language
 (Ousterhout’s dichotomy)
  • 19. The world of computing (1948) 1943-4: Colossus Mk I
 1944-5: Mk II
 Turing, Flowers, et al.
 Bletchley Park 1946-55: ENIAC
 first electronic, Turing-complete computer
 Mauchley & Eckert, U. Penn., 1946 Zuse, Berlin
 1936-43 Z1: first computer implementation of floating-point arithmetic
 1941-3 - Z3: first programmable automatic computer 1942-2: First electronic (vacuum tube)
 computer to solve Ax=b (29x29)
 Atanasoff and Berry
 Iowa State 1946-7: Williams(-Killburn) tube RAM invented
 1948: Manchester “Baby”; 1949: Mk I
 first electronic computer program; first modern computers with RAM
 1949-61: EDVAC
 Aberdeen, MD 1949-58: EDSAC
 Cambridge, UK 1948: a world with 4 electrified computers “I think there is a world market for maybe five computers.”
 - Watson, IBM, 1943 (apocryphal) 1944-51: Aitken, Harvard Mk I
 separation of code and data
 1945: Hopper, first bug 1948-52: IBM SSEC, Eckert, NYC
  • 20. The world of computing (1948) 1947: Transistor invented
 Bardeen, Shockley et al., Bell Labs 1948: Information theory
 Shannon, Bell Labs
 1949: —- & Weaver, UIUC 1954-7: Fortran, Backus et al., IBM 1943-4: Colossus Mk I
 1944-5: Mk II
 Turing, Flowers, et al.
 Bletchley Park 1946-55: ENIAC
 first electronic, Turing-complete computer
 Mauchley & Eckert, U. Penn., 1946 Zuse, Berlin
 1936: idea of stored (computer) program invented
 1936-43 Z1: first computer implementation of floating-point arithmetic
 1941-3 - Z3: first programmable automatic computer
 1943: Plankalkül (first designed programming language) 1942-2: First electronic (vacuum tube)
 computer to solve Ax=b (29x29)
 Atanasoff and Berry
 Iowa State 1946-7: Williams(-Killburn) tube RAM invented
 1948: Manchester “Baby”; 1949: Mk I
 first electronic computer program; first modern computers with RAM
 1952: Glennie’s AUTOCODE; 1955: Brooker’s Autocode (first compiled languages) 1949-61: EDVAC
 Aberdeen, MD 1949-58: EDSAC
 Cambridge, UK 1950: Lanczos iteration
 1952: Conjugate gradients
 NBS, DC Rutishauser, Zürich
 1951: automatic (high-level) programming invented
 1952: for loop invented
 1958: ALGOL (with others) 1951: Arnoldi iteration
 UAC, E Hartford CT 1948: a world with 4 electrified computers no programming languages, no compilers (but with RAM, stored programs,
 floating point and numerical linear algebra!) 1944-51: Aitken, Harvard Mk I
 separation of code and data
 1945: Hopper, first bug 1948: Wiener’s
 Cybernetics, MIT 1948-52: IBM SSEC, Eckert, NYC
  • 21. The world of computing (1955) 1948: Information theory
 Shannon, Bell Labs
 1949: —- & Weaver, UIUC 1946-55: ENIAC
 first electronic, Turing-complete computer
 Mauchley & Eckert, U. Penn., 1946 1952: Glennie’s AUTOCODE; 1955: Brooker’s Autocode (first compiled languages) 1949-61: EDVAC
 Aberdeen, MD 1949-58: EDSAC
 Cambridge, UK
 1961: EDSAC 2 Autocode 1950: Lanczos iteration
 1952: Conjugate gradients
 NBS, DC Rutishauser, Zürich
 1951: automatic (high-level) programming invented
 1952: for loop invented
 1958: IAL/ALGOL (with others) 1951: Arnoldi iteration
 UAC, E Hartford CT 1952-5: the genesis of high level programming languages and compilers 1948-52: IBM SSEC, Eckert, NYC 1946-55: ENIAC
 first electronic, Turing-complete computer
 Mauchley & Eckert, U. Penn., 1946 1952: Harvard Mk IV
 fully electronic 1948-52: IBM SSEC, Eckert, NYC 1951: MIT Whirlwind
 1952-4: Laning & Zierler’s GEORGE
 first high level compiled language 1951: Ferranti Mk I
 1954+: Ferranti Mercury + Autocode 1947: Transistor invented
 Bardeen, Shockley et al., Bell Labs 1954-7: Fortran, Backus et al., IBM
  • 22. What does it mean to say something?
  • 23. linguistic relativity or, the Sapir-Whorf hypothesis
  • 24. linguistic relativity or, the Sapir-Whorf hypothesis language determines or contrains cognition doi:10.1016/0010-0277(76)90001-9
  • 25. E. Sapir, The Status of Linguistics as a Science, 
 Language, Vol. 5, No. 4 (Dec., 1929), pp. 207-214
  • 26. E. Sapir, The Status of Linguistics as a Science, 
 Language, Vol. 5, No. 4 (Dec., 1929), pp. 207-214
  • 27. B. L. Whorf, “Science and linguistics”, in Language, Thought and Reality: Selected Writings of Benjamin Lee Whorf, J. B. Carroll, ed., MIT Press & John Wiley, NY, 1956, https://archive.org/stream/languagethoughtr00whor#page/206/mode/2up
  • 28. B. L. Whorf, “Language, Mind and Reality”, in Language, Thought and Reality: Selected Writings of Benjamin Lee Whorf, J. B. Carroll, ed., MIT Press & John Wiley, NY, 1956, https://archive.org/stream/languagethoughtr00whor#page/264/mode/2up
  • 29. To paraphrase Sapir and Whorf, Language shapes the formation of naïve, deep-rooted, unconscious cultural habits that resist opposition To what extent is it true also of programming languages?
  • 30. Task: I am looking at an Uber driver’s ratings record. Find the average rating each user has given to the driver. User ID Rating 381 5 1291 4 3992 4 193942 4 9493 5 381 5 3992 5 381 3 3992 5 193942 4
  • 31. > library(dplyr); > userid = c(381, 1291, 3992, 193942, 9493, 381, 3992, 381, 3992, 193942) > rating = c(5, 4, 4, 4, 5, 5, 5, 3, 5, 4) > mycar = data.frame(rating, userid) > summarize(group_by(mycar, userid), avgrating=mean(rating)) # A tibble: 5 x 2 userid avgrating <dbl> <dbl> 1 381 4.333333 2 1291 4.000000 3 3992 4.666667 4 9493 5.000000 5 193942 4.000000 An R solution
  • 32. >> userids = [381 1291 3992 193942 9493 381 3992 381 3992 193942]; >> ratings = [5 4 4 4 5 5 5 3 5 4]; >> accumarray(userids',ratings',[],@mean,[],true) ans = (381,1) 4.3333 (1291,1) 4.0000 (3992,1) 4.6667 (9493,1) 5.0000 (193942,1) 4.0000 A MATLAB solution
  • 33. u←381 1291 3992 193942 9493 381 3992 381 3992 193942 r←5 4 4 4 5 5 5 3 5 4 v←(∪u)∘.=u (v+.×r)÷+/v 4.333333333 4 4.666666667 4 5 ∪u 381 1291 3992 193942 9493 An APL solution
  • 34. u←381 1291 3992 193942 9493 381 3992 381 3992 193942 r←5 4 4 4 5 5 5 3 5 4 v←(∪u)∘.=u (v+.×r)÷+/v 4.333333333 4 4.666666667 4 5 ∪u 381 1291 3992 193942 9493 ∪ is nonstandard defined as ∇y←∪ y←((⍳⍨x)=⍳⍴x)/x ∇ not sorted… need ⍋ An APL solution
  • 35. R+dplyr MATLAB APL main solution summarize accumarray ∘.=, +.× constructor higher order function generalized matrix products abstraction data frame matrix array an idiomatic variable name userid userids u
  • 36. #include <stdio.h> int main(void) { int userids[10] = {381, 1291, 3992, 193942, 9494, 381, 3992, 381, 3992, 193942}; int ratings[10] = {5,4,4,4,5,5,5,3,5,4}; int nuniq = 0; int useridsuniq[10]; int counts[10]; float avgratings[10]; int isunique; int i, j; for(i=0; i<10; i++) { /*Have we seen this userid?*/ isunique = 1; for(j=0; j<nuniq; j++) { if(userids[i] == useridsuniq[j]) { isunique = 0; /*Update accumulators*/ counts[j]++; avgratings[j] += ratings[i]; } } A C solution /* New entry*/ if(isunique) { useridsuniq[nuniq] = userids[i]; counts[nuniq] = 1; avgratings[nuniq++] = ratings[i]; } } /* Now divide through */ for(j=0; j<nuniq; j++) avgratings[j] /= counts[j]; /* Now print*/ for(j=0; j<nuniq; j++) printf("%dt%fn", useridsuniq[j], avgratings[j]); return 0; }
  • 37. #include <stdio.h> int main(void) { int userids[10] = {381, 1291, 3992, 193942, 9494, 381, 3992, 381, 3992, 193942}; int ratings[10] = {5,4,4,4,5,5,5,3,5,4}; int nuniq = 0; int useridsuniq[10]; int counts[10]; float avgratings[10]; int isunique; int i, j; for(i=0; i<10; i++) { /*Have we seen this userid?*/ isunique = 1; for(j=0; j<nuniq; j++) { if(userids[i] == useridsuniq[j]) { isunique = 0; /*Update accumulators*/ counts[j]++; avgratings[j] += ratings[i]; } } /* New entry*/ if(isunique) { useridsuniq[nuniq] = userids[i]; counts[nuniq] = 1; avgratings[nuniq++] = ratings[i]; } } /* Now divide through */ for(j=0; j<nuniq; j++) avgratings[j] /= counts[j]; /* Now print*/ for(j=0; j<nuniq; j++) printf("%dt%fn", useridsuniq[j], avgratings[j]); return 0; } boilerplate code manual memory management small standard library A C solution
  • 38. Another Julia solution userids=[381, 1291, 3992, 193942, 9494, 381, 3992, 381, 3992, 193942]; ratings=[5,4,4,4,5,5,5,3,5,4]; counts = []; uuserids=[]; uratings=[]; for i=1:length(userids) j = findfirst(uuserids, userids[i]) if j==0 #not found push!(uuserids, userids[i]) push!(uratings, ratings[i]) push!(counts, 1) else #already seen uratings[j] += ratings[i] counts[j] += 1 end end [uuserids uratings./counts] 5x2 Array{Any,2}: 381 4.33333 1291 4.0 3992 4.66667 193942 4.0 9494 5.0
  • 39. Another Julia solution userids=[381, 1291, 3992, 193942, 9494, 381, 3992, 381, 3992, 193942]; ratings=[5,4,4,4,5,5,5,3,5,4]; counts = []; uuserids=[]; uratings=[]; for i=1:length(userids) j = findfirst(uuserids, userids[i]) if j==0 #not found push!(uuserids, userids[i]) push!(uratings, ratings[i]) push!(counts, 1) else #already seen uratings[j] += ratings[i] counts[j] += 1 end end [uuserids uratings./counts] 5x2 Array{Any,2}: 381 4.33333 1291 4.0 3992 4.66667 193942 4.0 9494 5.0 fast loops vectorized operations mix and match what you want other solutions: DataFrames, functional…
  • 40. What does code mean? The semantics of a programming language describe: What types of data are allowed How expressions are evaluated How to organize code into
 subunits How to decide what to do …
  • 41. What does code mean? The semantics of a programming language describe: What types of data are allowed How expressions are evaluated How to organize code into
 subunits How to decide what to do … if/switch/case
 for/while loops
 method dispatch floating point
 integers - machine vs arbitrary size
 user-defined objects left to right
 pass by value vs. pass by reference
 lazy vs eager evaluation
 scope of variables procedures/subroutines/functions
 objects/classes
  • 42. What does code mean? The semantics of a programming language describe: What types of data are allowed How expressions are evaluated How to organize code into
 subunits How to decide what to do …
  • 43. What does code mean? The semantics of a programming language describe: What types of data are allowed How expressions are evaluated How to organize code into
 subunits How to decide what to do … if/switch/case
 for/while loops
 method dispatch floating point
 integers - machine vs arbitrary size
 user-defined objects left to right
 pass by value vs. pass by reference
 lazy vs eager evaluation
 scope of variables procedures/subroutines/functions
 objects/classes
  • 44. multiple dispatch (multimethods) Julia’s way to express the polymorphic nature of mathematics A*B multiplication of integers multiplication of complex numbers multiplication of matrices concatenation of strings
  • 45. Object-oriented programming with classes What can I do with/to a thing?
  • 46. Object-oriented programming with classes What can I do with/to a thing?
  • 47. Object-oriented programming with classes What can I do with/to a thing? top up pay fare lose buy
  • 48. Object-oriented programming with classes What can I do with/to a thing? top up pay fare lose buy top up pay fare lose buy
  • 49. Object-oriented programming with classes What can I do with/to a thing? top up pay fare lose buy top up pay fare lose buy
  • 50. Object-oriented programming with classes What can I do with/to a thing? top up pay fare lose buy top up pay fare lose buy pay fare lose buy
  • 51. methods objects Object-oriented programming with classes What can I do with/to a thing? top up pay fare lose buy top up pay fare lose buy pay fare lose buy
  • 52. methods objects Object-oriented programming with classes What can I do with/to a thing? top up pay fare lose buy top up pay fare lose buy pay fare lose buy class-based OO classes are more fundamental than methods
  • 53. Object-oriented programming with multi-methods What can I do with/to a thing? top up pay fare lose buy generic function objectsmethods
  • 54. Object-oriented programming with multi-methods What can I do with/to a thing? top up pay fare lose buy generic function objectsmethods multimethods relationships between objects and functions
  • 55. Multi-methods with type hierarchy top up pay fare lose buy generic function objectsmethods rechargeable subway pass single-use subway ticket is a subtype of subway ticket abstract object
  • 56. generic function objectsmethods rechargeable subway pass single-use subway ticket is a subtype of subway ticket top up pay fare lose buy abstract object Multi-methods with type hierarchy
  • 57. generic function objectsmethods rechargeable subway pass single-use subway ticket is a subtype of subway ticket top up pay fare lose buy abstract object Multi-methods with type hierarchy
  • 58. A*B multiplication of integers multiplication of complex numbers multiplication of matrices concatenation of strings which meaning you want depends on context
 (types of A and B)
  • 59. A*B if A is a number and B is a number compute … else if A is a number and B is a matrix compute … else if A is a matrix and B is a matrix compute … else… * generic function Number*Number Number*Matrix Matrix*Matrix run time conditional branches generic functions with multiple dispatch classes Number Matrix Number*Number Number*Matrix Matrix*Matrix Matrix*Number class class other methods…
  • 60. A*B if A is a number and B is a number compute … else if A is a number and B is a matrix compute … else if A is a matrix and B is a matrix compute … else if A is a spinor and B is a spinor … (+ 4 new cases) end * generic function Number*Number Number*Matrix Matrix*Matrix run time conditional branches classes Number Matrix Number*Number Number*Matrix Matrix*Matrix Matrix*Number class class Spinor class Spinor*Number Spinor*Matrix Spinor*Spinor Number*Spinor Matrix*Spinor Spinor*Number Spinor*Matrix Spinor*Spinor Number*Spinor Matrix*Spinor other methods…
  • 61. julia> methods(*) # 138 methods for generic function "*": *(x::Bool, y::Bool) at bool.jl:38 *{T<:Unsigned}(x::Bool, y::T<:Unsigned) at bool.jl:53 *(x::Bool, z::Complex{Bool}) at complex.jl:122 *(x::Bool, z::Complex{T<:Real}) at complex.jl:129 *{T<:Number}(x::Bool, y::T<:Number) at bool.jl:49 *(x::Float32, y::Float32) at float.jl:211 *(x::Float64, y::Float64) at float.jl:212 *(z::Complex{T<:Real}, w::Complex{T<:Real}) at complex.jl:113 *(z::Complex{Bool}, x::Bool) at complex.jl:123 *(z::Complex{T<:Real}, x::Bool) at complex.jl:130 *(x::Real, z::Complex{Bool}) at complex.jl:140 *(z::Complex{Bool}, x::Real) at complex.jl:141 *(x::Real, z::Complex{T<:Real}) at complex.jl:152 *(z::Complex{T<:Real}, x::Real) at complex.jl:153 *(x::Rational{T<:Integer}, y::Rational{T<:Integer}) at rational.jl:186 *(a::Float16, b::Float16) at float16.jl:136 *{N}(a::Integer, index::CartesianIndex{N}) at multidimensional.jl:50 *(x::BigInt, y::BigInt) at gmp.jl:256 *(a::BigInt, b::BigInt, c::BigInt) at gmp.jl:279 *(a::BigInt, b::BigInt, c::BigInt, d::BigInt) at gmp.jl:285 *(a::BigInt, b::BigInt, c::BigInt, d::BigInt, e::BigInt) at gmp.jl:292 *(x::BigInt, c::Union{UInt16,UInt32,UInt64,UInt8}) at gmp.jl:326 *(c::Union{UInt16,UInt32,UInt64,UInt8}, x::BigInt) at gmp.jl:330 *(x::BigInt, c::Union{Int16,Int32,Int64,Int8}) at gmp.jl:332 *(c::Union{Int16,Int32,Int64,Int8}, x::BigInt) at gmp.jl:336 *(x::BigFloat, y::BigFloat) at mpfr.jl:208 *(x::BigFloat, c::Union{UInt16,UInt32,UInt64,UInt8}) at mpfr.jl:215 *(c::Union{UInt16,UInt32,UInt64,UInt8}, x::BigFloat) at mpfr.jl:219 *(x::BigFloat, c::Union{Int16,Int32,Int64,Int8}) at mpfr.jl:223 *(c::Union{Int16,Int32,Int64,Int8}, x::BigFloat) at mpfr.jl:227 *(x::BigFloat, c::Union{Float16,Float32,Float64}) at mpfr.jl:231 *(c::Union{Float16,Float32,Float64}, x::BigFloat) at mpfr.jl:235 *(x::BigFloat, c::BigInt) at mpfr.jl:239 *(c::BigInt, x::BigFloat) at mpfr.jl:243 *(a::BigFloat, b::BigFloat, c::BigFloat) at mpfr.jl:379 *(a::BigFloat, b::BigFloat, c::BigFloat, d::BigFloat) at mpfr.jl:385 *(a::BigFloat, b::BigFloat, c::BigFloat, d::BigFloat, e::BigFloat) at mpfr.jl:392 *{T<:Number}(x::T<:Number, D::Diagonal{T}) at linalg/diagonal.jl:89 *(x::Irrational{sym}, y::Irrational{sym}) at irrationals.jl:72 *(y::Real, x::Base.Dates.Period) at dates/periods.jl:74 *(x::Number) at operators.jl:74 *(y::Number, x::Bool) at bool.jl:55 *(x::Int8, y::Int8) at int.jl:19 *(x::UInt8, y::UInt8) at int.jl:19 *(x::Int16, y::Int16) at int.jl:19 *(x::UInt16, y::UInt16) at int.jl:19 *(x::Int32, y::Int32) at int.jl:19 *(x::UInt32, y::UInt32) at int.jl:19 *(x::Int64, y::Int64) at int.jl:19 *(x::UInt64, y::UInt64) at int.jl:19 *(x::Int128, y::Int128) at int.jl:456 *(x::UInt128, y::UInt128) at int.jl:457 *{T<:Number}(x::T<:Number, y::T<:Number) at promotion.jl:212 *(x::Number, y::Number) at promotion.jl:168 *{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},S}(A::Union{DenseArray{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},2},SubArray{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, x::Union{DenseArray{S,1},SubArray{S, 1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/matmul.jl:82 *(A::SymTridiagonal{T}, B::Number) at linalg/tridiag.jl:86 *(A::Tridiagonal{T}, B::Number) at linalg/tridiag.jl:406 *(A::UpperTriangular{T,S<:AbstractArray{T,2}}, x::Number) at linalg/triangular.jl:454 *(A::Base.LinAlg.UnitUpperTriangular{T,S<:AbstractArray{T,2}}, x::Number) at linalg/triangular.jl:457*(A::LowerTriangular{T,S<:AbstractArray{T,2}}, x::Number) at linalg/triangular.jl:454 *(A::Base.LinAlg.UnitLowerTriangular{T,S<:AbstractArray{T,2}}, x::Number) at linalg/triangular.jl:457 *(A::Tridiagonal{T}, B::UpperTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:969 *(A::Tridiagonal{T}, B::Base.LinAlg.UnitUpperTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:969 *(A::Tridiagonal{T}, B::LowerTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:969 *(A::Tridiagonal{T}, B::Base.LinAlg.UnitLowerTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:969 *(A::Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}}, B::Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:975 *{TA,TB}(A::Base.LinAlg.AbstractTriangular{TA,S<:AbstractArray{T,2}}, B::Union{DenseArray{TB,1},DenseArray{TB,2},SubArray{TB,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD},SubArray{TB,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/triangular.jl:989 *{TA,TB}(A::Union{DenseArray{TA,1},DenseArray{TA,2},SubArray{TA,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD},SubArray{TA,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, B::Base.LinAlg.AbstractTriangular{TB,S<:AbstractArray{T,2}}) at linalg/triangular.jl:1016 *{TA,Tb}(A::Union{Base.LinAlg.QRCompactWYQ{TA,M<:AbstractArray{T,2}},Base.LinAlg.QRPackedQ{TA,S<:AbstractArray{T,2}}}, b::Union{DenseArray{Tb,1},SubArray{Tb,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/qr.jl:166 *{TA,TB}(A::Union{Base.LinAlg.QRCompactWYQ{TA,M<:AbstractArray{T,2}},Base.LinAlg.QRPackedQ{TA,S<:AbstractArray{T,2}}}, B::Union{DenseArray{TB,2},SubArray{TB,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/qr.jl:178 *{TA,TQ,N}(A::Union{DenseArray{TA,N},SubArray{TA,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, Q::Union{Base.LinAlg.QRCompactWYQ{TQ,M<:AbstractArray{T,2}},Base.LinAlg.QRPackedQ{TQ,S<:AbstractArray{T,2}}}) at linalg/qr.jl:253 *(A::Union{Hermitian{T,S},Symmetric{T,S}}, B::Union{Hermitian{T,S},Symmetric{T,S}}) at linalg/symmetric.jl:117 *(A::Union{DenseArray{T,2},SubArray{T,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, B::Union{Hermitian{T,S},Symmetric{T,S}}) at linalg/symmetric.jl:118 *{T<:Number}(D::Diagonal{T}, x::T<:Number) at linalg/diagonal.jl:90 *(Da::Diagonal{T}, Db::Diagonal{T}) at linalg/diagonal.jl:92 *(D::Diagonal{T}, V::Array{T,1}) at linalg/diagonal.jl:93 *(A::Array{T,2}, D::Diagonal{T}) at linalg/diagonal.jl:94 *(D::Diagonal{T}, A::Array{T,2}) at linalg/diagonal.jl:95 *(A::Bidiagonal{T}, B::Number) at linalg/bidiag.jl:192 *(A::Union{Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}},Bidiagonal{T},Diagonal{T},SymTridiagonal{T},Tridiagonal{T}}, B::Union{Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}},Bidiagonal{T},Diagonal{T},SymTridiagonal{T},Tridiagonal{T}}) at linalg/bidiag.jl:198 *{T}(A::Bidiagonal{T}, B::AbstractArray{T,1}) at linalg/bidiag.jl:202 *(B::BitArray{2}, J::UniformScaling{T<:Number}) at linalg/uniformscaling.jl:122 *{T,S}(s::Base.LinAlg.SVDOperator{T,S}, v::Array{T,1}) at linalg/arnoldi.jl:261 *(S::SparseMatrixCSC{Tv,Ti<:Integer}, J::UniformScaling{T<:Number}) at sparse/linalg.jl:23 *{Tv,Ti}(A::SparseMatrixCSC{Tv,Ti}, B::SparseMatrixCSC{Tv,Ti}) at sparse/linalg.jl:108 *{TvA,TiA,TvB,TiB}(A::SparseMatrixCSC{TvA,TiA}, B::SparseMatrixCSC{TvB,TiB}) at sparse/linalg.jl:29 *{TX,TvA,TiA}(X::Union{DenseArray{TX,2},SubArray{TX,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, A::SparseMatrixCSC{TvA,TiA}) at sparse/linalg.jl:94 *(A::Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Complex{Float64},Float64}}, B::Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Complex{Float64},Float64}}) at sparse/cholmod.jl:1157 *(A::Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Complex{Float64},Float64}}, B::Base.SparseMatrix.CHOLMOD.Dense{T<:Union{Complex{Float64},Float64}}) at sparse/cholmod.jl:1158 *(A::Base.SparseMatrix.CHOLMOD.Sparse{Tv<:Union{Complex{Float64},Float64}}, B::Union{Array{T,1},Array{T,2}}) at sparse/cholmod.jl:1159 *{Ti}(A::Symmetric{Float64,SparseMatrixCSC{Float64,Ti}}, B::SparseMatrixCSC{Float64,Ti}) at sparse/cholmod.jl:1418 *{Ti}(A::Hermitian{Complex{Float64},SparseMatrixCSC{Complex{Float64},Ti}}, B::SparseMatrixCSC{Complex{Float64},Ti}) at sparse/cholmod.jl:1419 *{T<:Number}(x::AbstractArray{T<:Number,2}) at abstractarraymath.jl:50 *(B::Number, A::SymTridiagonal{T}) at linalg/tridiag.jl:87 *(B::Number, A::Tridiagonal{T}) at linalg/tridiag.jl:407 *(x::Number, A::UpperTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:464 *(x::Number, A::Base.LinAlg.UnitUpperTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:467 *(x::Number, A::LowerTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:464 *(x::Number, A::Base.LinAlg.UnitLowerTriangular{T,S<:AbstractArray{T,2}}) at linalg/triangular.jl:467 *(B::Number, A::Bidiagonal{T}) at linalg/bidiag.jl:193 *(A::Number, B::AbstractArray{T,N}) at abstractarraymath.jl:54 *(A::AbstractArray{T,N}, B::Number) at abstractarraymath.jl:55 *(s1::AbstractString, ss::AbstractString...) at strings/basic.jl:50 *(this::Base.Grisu.Float, other::Base.Grisu.Float) at grisu/float.jl:138 *(index::CartesianIndex{N}, a::Integer) at multidimensional.jl:54 *{T,S}(A::AbstractArray{T,2}, B::Union{DenseArray{S,2},SubArray{S,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/matmul.jl:131 *{T,S}(A::AbstractArray{T,2}, x::AbstractArray{S,1}) at linalg/matmul.jl:86 *(A::AbstractArray{T,1}, B::AbstractArray{T,2}) at linalg/matmul.jl:89 *(J1::UniformScaling{T<:Number}, J2::UniformScaling{T<:Number}) at linalg/uniformscaling.jl:121 *(J::UniformScaling{T<:Number}, B::BitArray{2}) at linalg/uniformscaling.jl:123 *(A::AbstractArray{T,2}, J::UniformScaling{T<:Number}) at linalg/uniformscaling.jl:124 *{Tv,Ti}(J::UniformScaling{T<:Number}, S::SparseMatrixCSC{Tv,Ti}) at sparse/linalg.jl:24 *(J::UniformScaling{T<:Number}, A::Union{AbstractArray{T,1},AbstractArray{T,2}}) at linalg/uniformscaling.jl:125 *(x::Number, J::UniformScaling{T<:Number}) at linalg/uniformscaling.jl:127 *(J::UniformScaling{T<:Number}, x::Number) at linalg/uniformscaling.jl:128 *{T,S}(R::Base.LinAlg.AbstractRotation{T}, A::Union{AbstractArray{S,1},AbstractArray{S,2}}) at linalg/givens.jl:9 *{T}(G1::Base.LinAlg.Givens{T}, G2::Base.LinAlg.Givens{T}) at linalg/givens.jl:307 *(p::Base.DFT.ScaledPlan{T,P,N}, x::AbstractArray{T,N}) at dft.jl:262 *{T,K,N}(p::Base.DFT.FFTW.cFFTWPlan{T,K,false,N}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:621 *{T,K}(p::Base.DFT.FFTW.cFFTWPlan{T,K,true,N}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:628 *{N}(p::Base.DFT.FFTW.rFFTWPlan{Float32,-1,false,N}, x::Union{DenseArray{Float32,N},SubArray{Float32,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:698 *{N}(p::Base.DFT.FFTW.rFFTWPlan{Complex{Float32},1,false,N}, x::Union{DenseArray{Complex{Float32},N},SubArray{Complex{Float32},N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:705 *{N}(p::Base.DFT.FFTW.rFFTWPlan{Float64,-1,false,N}, x::Union{DenseArray{Float64,N},SubArray{Float64,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:698 *{N}(p::Base.DFT.FFTW.rFFTWPlan{Complex{Float64},1,false,N}, x::Union{DenseArray{Complex{Float64},N},SubArray{Complex{Float64},N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:705 *{T,K,N}(p::Base.DFT.FFTW.r2rFFTWPlan{T,K,false,N}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:866 *{T,K}(p::Base.DFT.FFTW.r2rFFTWPlan{T,K,true,N}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/FFTW.jl:873 *{T}(p::Base.DFT.FFTW.DCTPlan{T,5,false}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/dct.jl:188 *{T}(p::Base.DFT.FFTW.DCTPlan{T,4,false}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/dct.jl:191 *{T,K}(p::Base.DFT.FFTW.DCTPlan{T,K,true}, x::Union{DenseArray{T,N},SubArray{T,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at fft/dct.jl:194 *{T}(p::Base.DFT.Plan{T}, x::AbstractArray{T,N}) at dft.jl:221 *(α::Number, p::Base.DFT.Plan{T}) at dft.jl:264 *(p::Base.DFT.Plan{T}, α::Number) at dft.jl:265 *(I::UniformScaling{T<:Number}, p::Base.DFT.ScaledPlan{T,P,N}) at dft.jl:266 *(p::Base.DFT.ScaledPlan{T,P,N}, I::UniformScaling{T<:Number}) at dft.jl:267 *(I::UniformScaling{T<:Number}, p::Base.DFT.Plan{T}) at dft.jl:268 *(p::Base.DFT.Plan{T}, I::UniformScaling{T<:Number}) at dft.jl:269 *{P<:Base.Dates.Period}(x::P<:Base.Dates.Period, y::Real) at dates/periods.jl:73 *(a, b, c, xs...) at operators.jl:103
  • 62. The secret to Julia’s speed and composability You can define many methods for a generic function (new ways to do the same thing). If the compiler can figure out exactly which method you need to use when you invoke a function, then it generates optimized code.
  • 64. Why is it called “Julia”? It is a nice name.
  • 65. Is Julia a compiled or interpreted language? Both - in a way. a dynamic language, but JIT compiled
  • 66. lex/parse read program compile generate machine code execute run machine code lex/parse read program interpret run program static language dynamic language Is Julia a compiled or interpreted language?
  • 67. Is Julia a compiled or interpreted language? lex/parse read program compile generate machine code execute run machine code lex/parse read program interpret run program static language dynamic language JIT compile generate machine code execute run machine code
  • 68. “But MATLAB has a JIT!”
  • 69. �������� ����� ������ ������ �������� ������ ������ ����� ������ � � ���������� ������������������ � � �� �� �� �� ��������������������������������������� Textbook fully pivoted LU algorithm MATLAB R2014b, Octave 3.6.1, Python 3.5, R 3.0.0 MATLAB’s JIT made code slower…
  • 70. Why not just make MATLAB/R/ Python/… faster? Others have tried, with limited success. These languages have features that are very hard for compilers to understand. Ongoing work! Some references in an enormous literature on JIT compilers: Jan Vitek, Making R run fast, Greater Boston useR Group talk, 2016-02-16 —, Can R learn from Julia? userR! 2016 Bolz, C. F., Cuni, A., Fijalkowski, M., and Rigo, A. (2009). Tracing the meta-level: PyPy’s tracing JIT compiler, doi:10.1145/1565824.1565827 Joisha, P. G., & Banerjee, P. (2006). An algebraic array shape inference system for MATLAB, doi: 10.1145/1152649.1152651