Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introducing Julia

Introducing Julia

... and couple other languages.

Julia is a fast dynamic language for technical computing. http://julialang.org/

Original presentation at Computational Linguistics Lab, Nara Institute of Science and Technology.

Sorami Hisamoto

November 15, 2013
Tweet

More Decks by Sorami Hisamoto

Other Decks in Programming

Transcript

  1. Babel guide
    5 Languages in 13 Weeks
    !
    Sorami Hisamoto
    Computational Linguistics Lab.
    Nara Institute of Science & Technology
    November 15, 2013
    Bruegel - The tower of Babel
    @
    sorami

    View full-size slide

  2. To casually introduce the languages
    I played with this summer.

    View full-size slide

  3. I N S P I R AT I O N S ݩ ωλ

    View full-size slide

  4. Image: www.photo-ac.com/main/detail/44086

    View full-size slide

  5. T O U R D E B A B E L
    Image: www.ashinari.com/2013/09/11-381896.php
    Steven Yegge

    View full-size slide

  6. T O U R D E B A B E L
    Image: www.ashinari.com/2013/09/11-381896.php
    Python

    Ruby

    Java

    Perl

    C++

    Lisp

    C
    Steven Yegge

    View full-size slide

  7. T O U R D E B A B E L
    Image: www.ashinari.com/2013/09/11-381896.php
    Original Essay
    ⽇日本語訳
    Python

    Ruby

    Java

    Perl

    C++

    Lisp

    C
    Steven Yegge

    View full-size slide

  8. Image source

    View full-size slide

  9. “C++ is the dumbest language on earth”
    C++は地上でもっともバカな⾔言語だ。
    Image source

    View full-size slide

  10. “The original brilliant guys and gals here only allowed two languages
    in Amazon's hallowed source repository: C and Lisp”
    初期にいたすばらしい⼈人たちは、Amazonの神聖なるソースリポジトリに
    2種類の⾔言語しか⼊入れることを許さなかった。CとLispだ。
    “C++ is the dumbest language on earth”
    C++は地上でもっともバカな⾔言語だ。
    Image source

    View full-size slide

  11. “The original brilliant guys and gals here only allowed two languages
    in Amazon's hallowed source repository: C and Lisp”
    初期にいたすばらしい⼈人たちは、Amazonの神聖なるソースリポジトリに
    2種類の⾔言語しか⼊入れることを許さなかった。CとLispだ。
    “C++ is the dumbest language on earth”
    C++は地上でもっともバカな⾔言語だ。
    Image source
    “Java is simultaneously the best and the worst thing that has
    happened to computing in the past 10 years.”
    Javaは過去10年においてコンピューティングの世界に起きた最良かつ最悪のことだ。

    View full-size slide

  12. “The original brilliant guys and gals here only allowed two languages
    in Amazon's hallowed source repository: C and Lisp”
    初期にいたすばらしい⼈人たちは、Amazonの神聖なるソースリポジトリに
    2種類の⾔言語しか⼊入れることを許さなかった。CとLispだ。
    “C++ is the dumbest language on earth”
    C++は地上でもっともバカな⾔言語だ。
    “Java is simultaneously the best and the worst thing that has
    happened to computing in the past 10 years.”
    Javaは過去10年においてコンピューティングの世界に起きた最良かつ最悪のことだ。
    “.. Sperm Whale that exploded in the streets of Taiwan over the summer.
    Whale guts everywhere, covering cars, motorcycles, pedestrians.
    That's Perl. It's charming, really.”
    Perlは夏の台湾の通りの上で破裂したマッコウクジラだ。はらわたがそこら中に飛び
    散って、⾞車や⾃自転⾞車や歩⾏行者を覆っている。それがPerlだ。本当にチャーミングだ 。
    Image source

    View full-size slide

  13. # 1 P Y T H O N

    View full-size slide

  14. Image source

    View full-size slide

  15. Productivity
    Community
    Image source

    View full-size slide

  16. Productivity
    Community
    Speed
    Image source

    View full-size slide

  17. # 2 S C A L A

    View full-size slide

  18. Programming Seminars @ NAIST Computational Linguistics Lab.

    View full-size slide

  19. Programming Seminars @ NAIST Computational Linguistics Lab.

    View full-size slide

  20. Good, but …

    View full-size slide

  21. Complex!
    Good, but …

    View full-size slide

  22. www.meetup.com/nyhackr/events/132413222/

    View full-size slide

  23. www.meetup.com/nyhackr/events/132413222/

    View full-size slide

  24. Slide
    Video
    Image: golang.org/doc/gopher/

    View full-size slide

  25. # 4 C L O J U R E

    View full-size slide

  26. Image: en.wikipedia.org/wiki/Rich_Hickey

    View full-size slide

  27. Image: en.wikipedia.org/wiki/Rich_Hickey
    Rich Hickey's Greatest Hits

    View full-size slide

  28. Image: arcweb.archives.gov/arc/action/ExternalIdSearch?id=548253
    logic programming library
    core.logic

    View full-size slide

  29. http://www.lighttable.com/

    View full-size slide

  30. http://getprismatic.com/

    View full-size slide

  31. New language for Technical Computing
    2012~. Started in MIT. Active community.

    View full-size slide

  32. New language for Technical Computing
    2012~. Started in MIT. Active community.
    High-level & Dynamic
    Sophisticated type system. Multiple dispatch.

    View full-size slide

  33. New language for Technical Computing
    2012~. Started in MIT. Active community.
    High-level & Dynamic
    Sophisticated type system. Multiple dispatch.
    High Performance

    JIT Compiler. Comparable to C and Fortran.

    View full-size slide

  34. Why new language?

    View full-size slide

  35. Why new language?
    Two-tier Architectures
    High-level logic in dynamic language e.g. Python
    Heavy lifting in low-level language e.g. C, Fortran

    View full-size slide

  36. Why new language?
    Compromise between convenience & performance.
    Two-tier Architectures
    High-level logic in dynamic language e.g. Python
    Heavy lifting in low-level language e.g. C, Fortran

    View full-size slide

  37. Why new language?
    Compromise between convenience & performance.
    Two-tier Architectures
    We want to do everything in
    one productive language!
    High-level logic in dynamic language e.g. Python
    Heavy lifting in low-level language e.g. C, Fortran

    View full-size slide

  38. Speed up
    existing languages?

    View full-size slide

  39. Speed up
    existing languages?
    Language design under assumption
    it would be implemented as
    an interpreter.

    View full-size slide

  40. Speed up
    existing languages?
    Language design under assumption
    it would be implemented as
    an interpreter.
    Sabotages ability to
    generate efficient code.

    View full-size slide

  41. Table: julialang.org/

    View full-size slide

  42. Graph: github.com/ViralBShah/julia-presentations/raw/master/Fifth-Elephant-2013/Fifth-Elephant-2013.pdf

    View full-size slide

  43. Code: julialang.org/

    View full-size slide

  44. C
    github.com/JuliaLang/julia/blob/master/test/perf/micro/perf.c

    View full-size slide

  45. C Julia
    github.com/JuliaLang/julia/blob/master/test/perf/micro/perf.c julialang.org/

    View full-size slide

  46. M U LT I P L E D I S PAT C H
    code: docs.julialang.org/en/latest/manual/methods/

    View full-size slide

  47. M U LT I P L E D I S PAT C H
    code: docs.julialang.org/en/latest/manual/methods/
    "The Design Impact of Multiple Dispatch"
    Stefan Karpinski @ Strange Loop

    View full-size slide

  48. H O M O I C O N I C I T Y
    C O D E A S D ATA

    View full-size slide

  49. H O M O I C O N I C I T Y
    C O D E A S D ATA
    Macros!

    View full-size slide

  50. docs.julialang.org/en/latest/packages/packagelist/

    View full-size slide

  51. MCMC, Optimisations,
    Linear Models, Text Analysis,
    Time Series, OpenGL,
    DataFrames, Arduino,
    CUDA, Visualisation, etc…
    docs.julialang.org/en/latest/packages/packagelist/

    View full-size slide

  52. IJulia
    Ipython for Julia
    !
    Powerful browser-based
    graphical notebook
    Image: julialang.org/

    View full-size slide

  53. http://forio.com/julia/

    View full-size slide

  54. cpplover.blogspot.jp/2012/04/pythonjulia.html

    View full-size slide

  55. cpplover.blogspot.jp/2012/04/pythonjulia.html
    “I believe Julia and Python is
    a match made in heaven”
    - Dag Sverre Seljebotn (Cython core developer)
    Julia, Python and Cython - julia-dev | Google Groups

    View full-size slide

  56. conference.scipy.org/scipy2013/presentation_detail.php?id=203

    View full-size slide

  57. W H Y P Y T H O N I S T H E L A S T L A N G U A G E
    Y O U ' L L H AV E T O L E A R N
    Jake Vanderplas
    jakevdp.github.io/blog/2012/09/20/why-python-is-the-last/

    View full-size slide

  58. www.mit.edu/~mlubin/juliacomputing.pdf

    View full-size slide

  59. ex.nicovideo.jp/denou/tournament/

    View full-size slide

  60. ex.nicovideo.jp/denou/tournament/

    View full-size slide

  61. ex.nicovideo.jp/denou/tournament/
    Julia adpoted by a team at
    the computer shogi (Japanse chess) tournament.

    View full-size slide

  62. メカ⼥女⼦子将棋 アピール⽂文書☆

    View full-size slide

  63. メカ⼥女⼦子将棋 アピール⽂文書☆
    “Software re-implemented in Julia overwhelmed
    existing one in C/C++, so we decided to use
    the Julia-version for the tournament”

    View full-size slide

  64. julialang.org
    New language for Technical Computing
    2012~. Started in MIT. Active community.
    High-level & Dynamic
    Sophisticated type system. Multiple dispatch.
    High Performance

    JIT Compiler. Comparable to C and Fortran.

    View full-size slide

  65. ‣ Julia: A Fast Dynamic Language for Technical Computing Academic paper
    ‣ An introductory presentation
    ‣ Learn X in Y minutes - where X=julia
    ‣ Videos from the Julia tutorial at MIT
    ‣ Julia tutorial @ DataGotham2013
    ‣ Forio Julia tutorial
    ‣ Project Euler with Julia
    ‣ Linear Models with Julia
    ‣ “Julia: A Fast Dynamic Language for Technical Computing” @ SciPy 2012
    ‣ “Julia and Python: a dynamic duo for scientific computing” @ SciPy 2013
    G E T T I N G S TA R T E D …

    View full-size slide