Simon Peyton Jones - Linear Haskell: practical linearity in a higher-order polymorphic language
Channel:Curry On! · Length:1:03:33 · Published:2018-07-23 · Views:18856
Summary
Simon Peyton Jones presents linear types for Haskell, showing how practical linearity can fit into a higher-order polymorphic language. The talk covers motivations such as resource handling and relates the ideas to Rust.
Why HN recommends it
HN recommends it as a clear introduction to linear types in GHC from the language's lead designer.
Simon Peyton Jones has a great talk on YouTube [3] — HN, 2020
Programming language design · Functional programming
Subtitles (excerpt)
All right. Now we have to do this sloppy sloppy business. And uh I'm a bit echoey, aren't I? Can you um And with a bit of luck with a bit of luck No, yes. Almost. Almost. So, now I have to do a um Think if I do duplicate, that sometimes works. Good? Oh, that's not good. Now, you're just getting this kind of game. All right, let's try again. This As I As As ever, this worked perfectly well before the screens went down. Okay, good. Um All right, are we good to go? Can you hear? Can you hear Is it too loud or you you uh No, it's okay. It's okay, thumbs up. Excellent. All right. Start the stopwatch. We have We have 50 minutes to learn about linear types. So, I don't know about you, I find linear types extremely confusing. Um they're sort of uh attractive, alluring, something like an Escher diagram. You look at them and you think that's extremely cool and then you find you they sort of uh arrive back where you first began. So, uh look at this. So, if you search for linear types in uh you know, Google Scholar, you get 750 results, you know, and with Phil um prominently at the top for uh uh some reason. If you search for linear logic you get 3,700 results. So, this is an area dense with related work.
On Hacker News
SPJ usually makes great introductions about new things being introduced to GHC. Here's one about linear types: [VIDEO] > How do people that don't have PhDs bridge the gap in their knowledge from what's commonly taught/used (OOP and it's design patterns) to thinking in terms of monads/monoids/functors/etc. In my own experience, you just practice, and munch new knowledge bits by bits. The crucial p… — pyrale, 2020-09
Session Types, AFAIU are a specific implementation of a linear logic in some type system and I am not all too familiar with them in practice. However, I would like to think I am well versed in Linear Logic and Substructural Type Theory. I think the works by Wadler are a good place to start, in particular is a sort of review paper, based in intuitionistic logic (which he also covers in said paper)… — throwaway17_17, 2020-03
Something to keep in mind - linear types are on their way[1], with exactly this usecase in mind. Simon Peyton Jones gave an excellent presentation on the topic[2], briefly discussing exceptions, as well as giving a mention to ResourceT and the phantom type solution in the article (described as channel-passing). [1] [LINK] [2] [VIDEO] — T-R, 2018-10
My understanding is that the current implementation is only groundwork for possible future performance benefits, since there are no changes to the runtime system or garbage collector, and that their current intended use is mostly for allowing library authors to encode safe session/resource handling in the type system. So, new libraries can make it a type error to fail to properly close a connecti… — T-R, 2020-09
Simon Peyton Jones initial intuition [0] was that Rust would be full of soundness holes due to not starting with a full formalization. Derek Dryer, Ralf Jung and others in the RustBelt project [1] did amazing work in formalizing Rust's safety guarantees, showing that Peyton Jones' guess was not accurate. There is nothing wrong about having bugs, of course, but the reaction to the bug in this thre… — mauricioc, 2019-11
Related videos
- Halide Talk · Andrew Adams · 25:51
- Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich · Confreaks · 53:21
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019 · GOTO Conferences · 42:02
- "Simple Made Easy" - Rich Hickey (2011) · Strange Loop Conference · 1:01:38
- "Making Impossible States Impossible" by Richard Feldman · elm-conf · 25:06
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- The Value of Values with Rich Hickey · InfoQ · 31:43
- Why Isn't Functional Programming the Norm? – Richard Feldman · Metosin · 46:09
- Maybe Not - Rich Hickey · ClojureTV · 1:03:28
- Solving Problems the Clojure Way - Rafal Dittwald · Clojure/north · 1:02:26
- Lecture 1A: Overview and Introduction to Lisp · MIT OpenCourseWare · 1:12:55
- Conway's Game Of Life in APL · Dyalog · 7:47
- Lecture 1A | MIT 6.001 Structure and Interpretation, 1986 · MIT OpenCourseWare · 1:12:55
- Crockford on JavaScript - Volume 1: The Early Years · YUI Library · 1:42:08
- Growing a Language, by Guy Steele · Bill Pugh · 53:31