Into the Core - Squeezing Haskell into Nine Constructors by Simon Peyton Jones

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ย. 2016
  • Keynote talk from Erlang USer Conference 2016 www.erlang-factory.com/euc2016/
    Erlang and Haskell are childhood friends who grew up together. Throughout the years, they have learnt a lot from each other. And just because they have become adults does not mean the learning stops.
    GHC translates all of Haskell into a tiny but super-expressive intermediate language called Core, does a lot of optimisations on Core, and then generates executable code. Core is statically typed, making GHC one of the very few production compilers that is statically typed all the way through to code generation. It pulls off this trick by drawing directly on System F, a mathematical calculus from type theory. Functional programming is amazing: serious theory leads directly to beautiful implementations.
    In this talk I’ll take you on a journey into Core and its design choices. I’ll sketch Core’s type system, and the optimisations that GHC implements in Core, including let-floating, strictness analysis, specialisation, inlining, and the case-of-case transformation.
    Haskell and Erlang are both functional languages, albeit with significant differences (strict vs lazy, untyped vs typed). I hope that the talk may lead to dialogue about how these similarities and differences show up in a compiler.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 39

  • @Yetipfote
    @Yetipfote 3 ปีที่แล้ว +10

    14:48 "I just wanted to build a sweaty compiler."
    - Simon Peyton Jones, 2016

  • @Yetipfote
    @Yetipfote 3 ปีที่แล้ว +23

    "Immutability changes everything"
    me, an intellectual with a sense of humor: *exhales audibly through my nose*

    • @Ryan-xq3kl
      @Ryan-xq3kl 2 ปีที่แล้ว +3

      translation for regular people: "not being able to change anything changes everything"

  • @neilbedwell7763
    @neilbedwell7763 7 ปีที่แล้ว +14

    added Simon Peyton Jones to the list of my heroes

  • @JonathanGonzalez-mx5bp
    @JonathanGonzalez-mx5bp 7 ปีที่แล้ว +18

    SIMON PEYTON JONES!

  • @_Huperniketes_
    @_Huperniketes_ 7 ปีที่แล้ว +34

    Whoever had the bright idea to zoom the camera out at 56:24…your camera direction is not appreciated.

  • @ietsization
    @ietsization 2 ปีที่แล้ว +1

    I watched this video last year, after just completing a master level course about functional programming. I should've been as ready as I ever would be to understand this and I didn't. Yet, exactly one year later it suddenly all clicks! Feeling very satisfied.

  • @madgenvideos7589
    @madgenvideos7589 7 ปีที่แล้ว +6

    8:08 it's like he's about to say "BUT IT AIN'T RAGHT"

  • @arhyth
    @arhyth 6 ปีที่แล้ว

    this makes a lot of sense and i see this too in Elixir where much of the language desugars to a very minimal API surface. it’s one of the things that make elixir a joy to program in.

  • @MrPopinjay
    @MrPopinjay 7 ปีที่แล้ว +35

    Is there a version where we can see the slides more clearly?

    • @Rozenkrantzz
      @Rozenkrantzz 7 ปีที่แล้ว +4

      On the website linked in the description, if you click on Simon's picture, you can find a PDF of the slides

    • @charliebevis7719
      @charliebevis7719 7 ปีที่แล้ว +14

      They are here: www.erlang-factory.com/static/upload/media/1488806820775921euc2016intothecoresimonpeytonjones.pdf

  • @wliaputs
    @wliaputs 3 ปีที่แล้ว

    He's very enthusiastic and I like it

  • @heteroskedasticity99
    @heteroskedasticity99 7 ปีที่แล้ว +5

    Slides please.

  • @Dus3826
    @Dus3826 4 ปีที่แล้ว

    Enthusiastic presentation, thank you ! Otherwise I think it would have become boring for me :)

  • @shamrockfrost1856
    @shamrockfrost1856 7 ปีที่แล้ว +8

    I was actually thinking of making a (toy) language that targets core!

  • @jirehjirehjireh
    @jirehjirehjireh 2 ปีที่แล้ว +1

    Simon Peyton Jones is the cutest pointy headed academic hahaha

  • @mc4ndr3
    @mc4ndr3 7 ปีที่แล้ว +2

    Link to slides? They're a bit zoomed out in this recording

    • @ErlangSolutions
      @ErlangSolutions  7 ปีที่แล้ว +4

      Hi Andrew, great question! You can find the slides here: www.erlang-factory.com/euc2016/simon-peyton-jones

  • @syedabdul4515
    @syedabdul4515 7 ปีที่แล้ว +11

    Not able to see the slides

    • @Rozenkrantzz
      @Rozenkrantzz 7 ปีที่แล้ว +1

      On the website linked in the description, if you click on Simon's picture, you can find a PDF of the slides

    • @charliebevis7719
      @charliebevis7719 7 ปีที่แล้ว

      www.erlang-factory.com/static/upload/media/1488806820775921euc2016intothecoresimonpeytonjones.pdf

  • @ratfuk9340
    @ratfuk9340 5 หลายเดือนก่อน

    Erlang doesn't have null? Why?

  • @changshengwu6795
    @changshengwu6795 3 ปีที่แล้ว

    How I wish the slides could look bigger

  • @zloidooraque0
    @zloidooraque0 7 ปีที่แล้ว

    inlining ftw..
    storm in a glass

  • @glialcell6455
    @glialcell6455 7 ปีที่แล้ว +1

    Wait isn't LLVM also a statically typed IR?

    • @hannessteffenhagen61
      @hannessteffenhagen61 5 ปีที่แล้ว +4

      It is, although it is far less useful in LLVM IR because there most things are statements, for which it is much easier to do transformations that are wrong but type correct than in Core where most things are expressions.

  • @CherishedMe
    @CherishedMe 5 ปีที่แล้ว

    What's a lambda?

    • @Yetipfote
      @Yetipfote 3 ปีที่แล้ว

      a function.
      ps: that's not the whole story but sufficient for a start.

  • @florianwicher
    @florianwicher 4 ปีที่แล้ว +5

    He *always* uses Comic Sans for his presentations. What a troll 😄

    • @Yetipfote
      @Yetipfote 3 ปีที่แล้ว

      he definitely is not a front-end developer ^^

  • @AlexRodriguez-gb9ez
    @AlexRodriguez-gb9ez 2 หลายเดือนก่อน

    Simon Peyton Jones right next to Isaac Newton

  • @bocckoka
    @bocckoka 6 ปีที่แล้ว +1

    I just use this to not kill myself when writing MATLAB instead of heroin.

  • @FlameHue
    @FlameHue 7 ปีที่แล้ว +6

    How the fuck do I do manual zoom to see the slides if I'm watching this on TH-cam. Get it right already, it's 2016, and you people are programmers.

    • @elleimhoff
      @elleimhoff 7 ปีที่แล้ว +1

      I use the Accessibility > Zoom in OSX for videos like this and for CodeMesh talks. Unfortunately, the resolution is too low on this video to work at the end.

    • @AndrewConsroe
      @AndrewConsroe 7 ปีที่แล้ว +2

      Not sure if the example is identical at the end, but this paper covers it in sections 4.2 & 4.3
      www.microsoft.com/en-us/research/wp-content/uploads/2016/04/sequent-calculus-icfp16.pdf

    • @charliebevis7719
      @charliebevis7719 7 ปีที่แล้ว +2

      slides here: www.erlang-factory.com/static/upload/media/1488806820775921euc2016intothecoresimonpeytonjones.pdf