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

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024
  • Keynote talk from Erlang USer Conference 2016 www.erlang-fact...
    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"

  • @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.

  • @madelinesydney92
    @madelinesydney92 5 дней назад

    SPJ is an incredibly gifted speaker. I'm the #1 SPJ fangirl. The crowd oughta be screaming "INLINING!!!" along with him.

  • @_Huperniketes_
    @_Huperniketes_ 7 лет назад +34

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

  • @neilbedwell7763
    @neilbedwell7763 7 лет назад +14

    added Simon Peyton Jones to the list of my heroes

  • @JonathanGonzalez-mx5bp
    @JonathanGonzalez-mx5bp 8 лет назад +18

    SIMON PEYTON JONES!

  • @MrPopinjay
    @MrPopinjay 8 лет назад +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

  • @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.

  • @ratfuk9340
    @ratfuk9340 8 месяцев назад

    Erlang doesn't have null? Why?

  • @shamrockfrost1856
    @shamrockfrost1856 8 лет назад +8

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

  • @wliaputs
    @wliaputs 3 года назад

    He's very enthusiastic and I like it

  • @syedabdul4515
    @syedabdul4515 8 лет назад +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

  • @heteroskedasticity99
    @heteroskedasticity99 8 лет назад +5

    Slides please.

  • @Dus3826
    @Dus3826 4 года назад

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

  • @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.

  • @florianwicher
    @florianwicher 4 года назад +6

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

    • @Yetipfote
      @Yetipfote 3 года назад

      he definitely is not a front-end developer ^^

  • @changshengwu6795
    @changshengwu6795 3 года назад

    How I wish the slides could look bigger

  • @CherishedMe
    @CherishedMe 5 лет назад

    What's a lambda?

    • @Yetipfote
      @Yetipfote 3 года назад

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

  • @AlexRodriguez-gb9ez
    @AlexRodriguez-gb9ez 5 месяцев назад

    Simon Peyton Jones right next to Isaac Newton

  • @zloidooraque0
    @zloidooraque0 7 лет назад

    inlining ftw..
    storm in a glass

  • @bocckoka
    @bocckoka 6 лет назад +1

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

  • @FlameHue
    @FlameHue 8 лет назад +6

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

    • @elleimhoff
      @elleimhoff 8 лет назад +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 8 лет назад +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

  • @cpadude123
    @cpadude123 15 дней назад

    it's wild how one of the smartest guys in programming has some of the worst taste in slide aesthetics.