/
f or Fun and Profit f or Fun and Profit

f or Fun and Profit - PowerPoint Presentation

olivia-moreira
olivia-moreira . @olivia-moreira
Follow
421 views
Uploaded On 2016-07-27

f or Fun and Profit - PPT Presentation

Why Strong Community Incredibly Fast Expressive and Terse Type System Easy to transition from R But first Lets walk through a machine installation Windows Machine Installation httpjulialangorgdownloads ID: 421312

types julia system implementation julia types implementation system type profitable control flow study case fruits org code lines installation language julialang bananas

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "f or Fun and Profit" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

f

or Fun and ProfitSlide2
Slide3

Why

Strong Community

Incredibly Fast

Expressive and Terse Type System

Easy to transition from RSlide4

But first…Let’s walk through a machine installation.Slide5

Windows Machine Installationhttp://julialang.org/downloads/

Slide6
Slide7
Slide8

Ubuntu InstallationSlide9
Slide10

’s

Creators and CommunitySlide11

The Fab FourA grad student with a great ideaAn wisened industry heavy hitter

A mathematics professor

A physical sciences researcherSlide12

Jeff BezansonRecent PhD, MITThesis: “Abstractions in Technical Computing”

Translation

: “Julia, My New Lang”Slide13

Stefan KarpinskiLanguage Co-CreatorIndustry Heavy-Hitter

Work Experience

Akamai

Citrix Online

EtsySlide14

Alan EdelmanProfessor of Applied Mathematics, MITJeff’s thesis advisorSpecializes in “Random Matrix Theory”Julia’s Linear Algebra libraries bear his markSlide15

Viral ShahPhD Computer ScienceCo-inventor of JuliaResearcher in Biological / Physical SciencesSlide16

It’s all open source!(and very active)(and interactive)Slide17
Slide18
Slide19

Next Topic: Language SpeedWe’ll evaluate the claim that “Julia is Fast”Particularly in comparison to RSlide20

Speed Case Study – Conditional ProbabilityYou are a Commodity TraderLet’s say you know that a certain fruit will be profitableGiven that fruit is profitable, what is the probability some other fruit will be profitable?

Example:

“I know Apples will be profitable tomorrow. Historically, Bananas are profitable 90% of the days that Apples are profitable. Therefore, I will also trade Bananas.”Slide21

Input Data

Fruits

Historical DaysSlide22

Input Data

Fruits

Days

March 5

th

, 2012Slide23

Desired Output

Fruits

Fruits

P(

Guava|Bananas

) = 0.325Slide24

Julia Implementation (BLAS)

Julia Implementation (No

BLAS

)

R ImplementationSlide25

Benchmarked ComparisonSlide26

Published Benchmarks: http://julialang.org/http://julialang.org/benchmarks/

Slide27

Next Topic: Type SystemSlide28

Type System Features Comparison

Julia

C++

Java

C#

Python

R

Haskell

Dynamic Typing

X

X

X

X

Static Typing

X

X

X

X

X

Abstract

Types

X

X

X

X

X

X

Parametric

Types

X

X

X

X

X

Covariance / Contravariance

X

X

Multiple Inheritance

X

X

Tuples

X

X

X

X

X

Union Types

X

X

X

Interfaces / Traits / Contracts

X

X

X

X

Totals

6

7

5

6

4

2

6Slide29

How to evaluate a Type System?TersenessCase Study: Generic Binary TreesLanguages Compared: Julia

vs.

C#

Expressiveness

Case Study: SKI

Combinator

Calculus

Languages Compared:

Haskell

vs.

Julia

vs.

C#Slide30

Type System Case Study: TersenessProblem Space: OOPGeneric Binary Trees

Julia

vs.

C#

Criteria: Which can be done in less lines of code?Slide31

C# Implementation

Total:

32 lines of codeSlide32

Julia Implementation

Total:

10 lines of codeSlide33

Type System Case Study 2: ExpressivenessProblem Space: Logic / Computer Science

The SKI

Combinators

are an alternative basis for computation, like the lambda calculus

Julia

vs.

Haskell

Criteria

: Can it even be done?

If you’re interested:Slide34

Julia ImplementationSlide35

Haskell ImplementationSlide36

I’m an R guy.Will I be comfortable with Julia?Slide37

Which one is R?

Slide38

Thank you!kyle.pena@nlplogix.com

https://github.com/kyle-pena-nlp

Slide39

Time Permittinghttps://www.juliabox.org/ Slide40

Language BasicsControl FlowFunctionsTypesParametric Types (Generics)Slide41

Control Flow – If/ElseIfSlide42

Control Flow – For LoopSlide43

Control Flow – While LoopSlide44

Control Flow – Try/CatchSlide45

Composite TypesSlide46

Parametric aka Generic Types

C# Equivalent: