pl

pl

57 bookmarks
Custom sorting
[Haskell'23] The Evolution of Effects
[Haskell'23] The Evolution of Effects
The Evolution of Effects (Keynote) (Video, Haskell 2023) Nicolas Wu (Imperial College London, UK) Abstract: Functional programming has been celebrated for its promise of pure functions, delivering referential transparency and elegant reasoning about programs. However, real-world applications are not pure, and necessitate interaction with the outside world, introducing computational effects such as IO, state, and exceptions. The journey to harmonize these seemingly contradictory paradigms has led to a fascinating evolution of effectful programming in Haskell. The introduction of monads as a practical programming tool was a pivotal discovery, enabling controlled sequencing of effectful computations and addressing the challenge of handling side effects in a pure language. However, it soon became evident that the lack of modularity in composing effects using monads posed a limitation to effectful programming. To overcome this obstacle, monad transformers emerged as a solution, providing a composable manner of building effects on top of one another. More recent advancements have led to algebraic effects as an alternative framework that is easy to extend, particularly as domain-specific languages crafted to work in specific contexts. Nevertheless, these effects are not without quirks and limitations, leading to the development of higher-order effects. These higher-order effects extend the capabilities of algebraic effects, providing greater flexibility for expressing effectful computations, while also shedding light on the connection between the monad approach and the algebraic approach to effects. This talk will survey the historical milestones that have shaped the landscape of effectful programming in Haskell, exploring the transition from monads to monad transformers and the emergence of algebraic and higher-order effects. Article: https://doi.org/10.1145/3609026.3615581 ORCID: https://orcid.org/0000-0002-4161-985X Video Tags: icfpws23haskellmain-key2-p, doi:10.1145/3609026.3615581, orcid:0000-0002-4161-985X Presentation at the Haskell 2023 conference, September 8–9, 2023, https://icfp23.sigplan.org/home/haskellsymp-2023 Sponsored by ACM SIGPLAN, https://www.sigplan.org/
·youtu.be·
[Haskell'23] The Evolution of Effects
Semantic Subtyping in Luau
Semantic Subtyping in Luau
Luau is the first programming language to put the power of semantic subtyping in the hands of millions of creators.
Off-the-shelf semantic subtyping is slightly different from what is implemented in Luau, because it requires models to be set-theoretic, which requires that inhabitants of function types “act like functions.” There are two reasons why we drop this requirement.
Set-theoretic semantic subtyping does not support this normalization, and instead normalizes functions to disjunctive normal form (unions of intersections of functions). We do not do this for ergonomic reasons: overloaded functions are idiomatic in Luau, but DNF is not, and we do not want to present users with such non-idiomatic types.
For these two reasons (which are largely about ergonomics rather than anything technical) we drop the set-theoretic requirement, and use pragmatic semantic subtyping.
Unexpectedly, this is not always true in set-theoretic models, due to uninhabited types. In set-theoretic models, if x has type never then f(x) has type never. We do not want to burden users with the idea that function application has a special corner case, especially since that corner case can only arise in dead code.
The other difference between Luau’s type system and off-the-shelf semantic subtyping is that Luau does not support all negated types.
·luau-lang.org·
Semantic Subtyping in Luau
The Better Parts. Douglas Crockford. JS Fest 2018
The Better Parts. Douglas Crockford. JS Fest 2018

"the bugs that keep you up at night, the type system does not help with those".. and "actually helps to cause those" "you have to circumvent the type system" "you tend to give the type system the value of all of the bugs that it found, but we don't subtract the value of the bugs that it missed" "and we don't consider the value of bugs that it caused" "full accounting of types, they're just not work it"

·youtube.com·
The Better Parts. Douglas Crockford. JS Fest 2018
Semantic Subtyping in Luau - Roblox Blog
Semantic Subtyping in Luau - Roblox Blog
Luau is the first programming language to put the power of semantic subtyping in the hands of millions of creators. Minimizing false positives One of the issues with type error reporting in tools like the Script Analysis widget in Roblox Studio is false positives. These are warnings that are artifacts of the analysis, and don’t correspond […]
·blog.roblox.com·
Semantic Subtyping in Luau - Roblox Blog
What is logical relations?
What is logical relations?
I have long struggled to understand what a logical relation is. This may come as a surprise, since I have used logical relations a bunch in my research, apparently successfully. I am not afraid to admit that despite that success, I didn't really know what...
·williamjbowman.com·
What is logical relations?
Compiling Swift generics, Part I - Development / Compiler - Swift Forums
Compiling Swift generics, Part I - Development / Compiler - Swift Forums
Way back in 2016 I wrote a couple of (now mostly outdated) blog posts talking about how types and declarations are represented in the compiler, and at the time I promised a third installment which would discuss generics. A few of you have asked me about this over the years... Well, I finally got around to starting a write up about how generics work last year, and I think I its finally in good enough shape that I can release the first part of what is going to be a three part series. So here it i...
·forums.swift.org·
Compiling Swift generics, Part I - Development / Compiler - Swift Forums
Elegant and performant recursion in Rust
Elegant and performant recursion in Rust
This is a post about writing elegant and performant recursive algorithms in Rust. It makes heavy use of a pattern from Haskell called recursion schemes, but you don't need to know anything about that; it's just an implementation detail. Instead, as motivation, I have benchmarks showing a 14-34% improvement over the typical boxed pointer representation of recursive data structures in Rust.
·recursion.wtf·
Elegant and performant recursion in Rust
Hyperproperties and why they're hard
Hyperproperties and why they're hard
Computer security as a field is met with a persistent criticism:flashy attacks arehot,boring (hard-fought) defenses arenot. Comparedto security, programming ...
·kmicinski.com·
Hyperproperties and why they're hard
What is realizability?
What is realizability?
I recently decided to confront the fact that I didn't know what "realizability" meant. I see it in programming languages papers from time to time, and could see little rhyme or reason to how it was used. Any time I tried to look it up, I got some nonsense...
·williamjbowman.com·
What is realizability?