From 343c23d586b42078ef374a19b12a4286bb94d0fc Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 12:49:30 +0100 Subject: [PATCH 1/9] feat: update `Home.js` --- src/page/Home.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/page/Home.js b/src/page/Home.js index f893977..997aeda 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -1182,19 +1182,19 @@ let r = query p select (c, d) from ReadyDate(c; d) - + - + - + - + From c7bc3a69a6515e94766d84b2eaea151b1f4aa2d4 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 12:57:48 +0100 Subject: [PATCH 2/9] feat: update `Home.js` --- src/page/Home.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/page/Home.js b/src/page/Home.js index 997aeda..8b78b7d 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -923,11 +923,11 @@ let r = query p select (c, d) from ReadyDate(c; d) - + - +
3,800+4,900+ Merged Pull Requests (PRs)
2,500+3,100+ Resolved Issues (Tickets)
60+70+ Contributors
244,000+272,000+ Lines in Compiler Codebase
Throughput (entire compiler):41,700 lines/sec52,800 lines/sec
Throughput (frontend only):93,000 lines/sec95,500 lines/sec
From 348c82ceeb05fe8f5b0b81e391da0b84d5b6cec0 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 13:06:40 +0100 Subject: [PATCH 3/9] feat: update `Home.js` --- src/page/Home.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/page/Home.js b/src/page/Home.js index 8b78b7d..a0d9f89 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -337,6 +337,60 @@ def map(f: a -> b \\ ef, l: LazyList[a]): LazyList[b] \\ ef = + + + + +

Algebraic Effects

+ +

+ Flix supports algebraic effects, i.e. user-defined effects and handlers. + In particular, Flix supports multi-shot resumptions. +

+ +

+ Effect-oriented programming, with algebraic effects, allow programmers to + write pure functions modulo effects. Effect handlers enable program reasoning, + modularity, and testability. +

+ +

+ For example, the program expresses a greeting function that is pure + modulo the current time of the day. In main we call the function + and handle the HourOfDay effect by getting the real-world time + from Java's LocalDateTime. +

+
+
+
+ + + + {`import java.time.LocalDateTime + +eff HourOfDay { + def getCurrentHour(): Int32 +} + +def greeting(): String \\ {HourOfDay} = + let h = HourOfDay.getCurrentHour(); + if (h <= 12) "Good morning" + else if (h <= 18) "Good afternoon" + else "Good evening" + +def main(): Unit \\ IO = + run { + println(greeting()) + } with HourOfDay { + def getCurrentHour(_, resume) = + let dt = LocalDateTime.now(); + resume(dt.getHour()) + } +`} + + +
+ From 64827266898007eaed57b96f0df3609106dd041c Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 13:56:42 +0100 Subject: [PATCH 4/9] feat: update `Home.js` --- src/App.css | 1 - src/page/Home.js | 63 +++++++++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/src/App.css b/src/App.css index 8043582..e592428 100644 --- a/src/App.css +++ b/src/App.css @@ -39,7 +39,6 @@ p:last-child { .motto { font-size: 1.35rem; - color: #17a2b8; } .editor-output h5 { diff --git a/src/page/Home.js b/src/page/Home.js index a0d9f89..1d0451a 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -47,48 +47,57 @@ class Home extends Component { -

The Flix Programming Language

+

Flix —

-

Next-generation reliable, safe, concise, and functional-first programming - language.

+

+ A powerful effect-oriented programming language +

- Flix is a principled functional, imperative, and logic programming language - developed at Aarhus University, at the University of Waterloo, and by a community of Aarhus University and by a community of open source contributors.

-

Why Flix?

+

Why Effect-Oriented? And Why Flix?

- Flix aims to offer a unique combination of - features that no other programming language offers, including: algebraic - data types and pattern matching (like Haskell, OCaml), extensible records (like Elm), traits (type classes) (like Haskell, Rust), higher-kinded types (like Haskell), typematch (like Scala), type inference (like Haskell, OCaml), structured channel and process-based concurrency (like - Go), and compilation to JVM bytecode (like Scala). + Why Effects? Effects are the next big thing for + statically-typed programming languages. Effects — like types — enable + programmers to structure and understand their programs. Specifically, effects enable + modularity, improved program reasoning, new compiler optimizations, and user-defined + effects and handlers allow programmers to implement their own control structures.

- Flix also supports several unique features, - including: a polymorphic effect system, region-based local mutation, purity reflection, and first-class Datalog constraints. + Why Flix? We claim that of all the upcoming + effect-oriented programming languages, Flix offers the most complete language implementation, the most extensive standard library, the most detailed documentation, and the best tool support. +

+ +

+ Moreover, Flix builds on proven programming language technology, including: algebraic data types and pattern matching, extensible records, traits, higher-kinded types, associated types and effects, structured channel and process-based concurrency, + and more. +

+ +

+ Flix comes with excellent and extensive Visual Studio Code support.

- +
From 708e5d7962209c499ca38f247e864a2f54dbe653 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 14:01:26 +0100 Subject: [PATCH 5/9] feat: update `Home.js` --- src/page/Home.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/page/Home.js b/src/page/Home.js index 1d0451a..fb35276 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -60,12 +60,12 @@ class Home extends Component { href="https://github.com/flix/flix/graphs/contributors">open source contributors.

-

Why Effect-Oriented? And Why Flix?

+

Why effect-oriented? And why Flix?

- Why Effects? Effects are the next big thing for + Why Effects? Effects are the next big step for statically-typed programming languages. Effects — like types — enable - programmers to structure and understand their programs. Specifically, effects enable + programmers to better structure and understand their programs. Specifically, effects enable modularity, improved program reasoning, new compiler optimizations, and user-defined effects and handlers allow programmers to implement their own control structures.

@@ -86,7 +86,7 @@ class Home extends Component { className="font-weight-bold">traits, higher-kinded types, associated types and effects, structured channel and process-based concurrency, + className="font-weight-bold">structured concurrency, and more.

From 4b2d0c93a1a3db110725d3423aa2846eba4c08aa Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 14:08:57 +0100 Subject: [PATCH 6/9] feat: update `Home.js` --- src/page/Home.js | 108 +++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/src/page/Home.js b/src/page/Home.js index fb35276..c0740f6 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -238,6 +238,60 @@ def map(f: a -> b \\ ef, l: List[a]): List[b] \\ ef =
+ + + + +

Algebraic Effects

+ +

+ Flix supports algebraic effects, i.e. user-defined effects and handlers. + In particular, Flix supports multi-shot resumptions. +

+ +

+ Effect-oriented programming, with algebraic effects, allow programmers to + write pure functions modulo effects. Effect handlers enable program reasoning, + modularity, and testability. +

+ +

+ For example, the program expresses a greeting function that is pure + modulo the current time of the day. In main we call the function + and handle the HourOfDay effect by getting the real-world time + from Java's LocalDateTime. +

+
+
+
+ + + + {`import java.time.LocalDateTime + +eff HourOfDay { + def getCurrentHour(): Int32 +} + +def greeting(): String \\ {HourOfDay} = + let h = HourOfDay.getCurrentHour(); + if (h <= 12) "Good morning" + else if (h <= 18) "Good afternoon" + else "Good evening" + +def main(): Unit \\ IO = + run { + println(greeting()) + } with HourOfDay { + def getCurrentHour(_, resume) = + let dt = LocalDateTime.now(); + resume(dt.getHour()) + } +`} + + +
+ @@ -346,60 +400,6 @@ def map(f: a -> b \\ ef, l: LazyList[a]): LazyList[b] \\ ef = - - - - -

Algebraic Effects

- -

- Flix supports algebraic effects, i.e. user-defined effects and handlers. - In particular, Flix supports multi-shot resumptions. -

- -

- Effect-oriented programming, with algebraic effects, allow programmers to - write pure functions modulo effects. Effect handlers enable program reasoning, - modularity, and testability. -

- -

- For example, the program expresses a greeting function that is pure - modulo the current time of the day. In main we call the function - and handle the HourOfDay effect by getting the real-world time - from Java's LocalDateTime. -

-
-
-
- - - - {`import java.time.LocalDateTime - -eff HourOfDay { - def getCurrentHour(): Int32 -} - -def greeting(): String \\ {HourOfDay} = - let h = HourOfDay.getCurrentHour(); - if (h <= 12) "Good morning" - else if (h <= 18) "Good afternoon" - else "Good evening" - -def main(): Unit \\ IO = - run { - println(greeting()) - } with HourOfDay { - def getCurrentHour(_, resume) = - let dt = LocalDateTime.now(); - resume(dt.getHour()) - } -`} - - -
- From aca4d8935214db6fd64ba7b4bcad150c4d23c90c Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 19:54:17 +0100 Subject: [PATCH 7/9] feat: update `Home.js` --- src/page/Home.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/page/Home.js b/src/page/Home.js index c0740f6..352b604 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -63,10 +63,9 @@ class Home extends Component {

Why effect-oriented? And why Flix?

- Why Effects? Effects are the next big step for - statically-typed programming languages. Effects — like types — enable - programmers to better structure and understand their programs. Specifically, effects enable - modularity, improved program reasoning, new compiler optimizations, and user-defined + Why Effects? Effect systems represent the next major + evolution in statically typed programming languages. By explicitly modeling side effects, + effect-oriented programming enforces modularity and helps program reasoning. User-defined effects and handlers allow programmers to implement their own control structures.

@@ -89,12 +88,6 @@ class Home extends Component { className="font-weight-bold">structured concurrency, and more.

- -

- Flix comes with excellent and extensive Visual Studio Code support. -

- From a770e09448e5506435b6a8892ef8b57aa021698f Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 20:02:22 +0100 Subject: [PATCH 8/9] feat: update `Home.js` --- src/page/Home.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/page/Home.js b/src/page/Home.js index 352b604..50c45d1 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -249,10 +249,10 @@ def map(f: a -> b \\ ef, l: List[a]): List[b] \\ ef =

- For example, the program expresses a greeting function that is pure - modulo the current time of the day. In main we call the function - and handle the HourOfDay effect by getting the real-world time - from Java's LocalDateTime. + For example, the program on the right expresses a greeting function + that is pure modulo the current time of the day. In main we call + the function and handle the HourOfDay effect by getting the + real-world time from Java's LocalDateTime.

From 0324c4b0a4e44fa5b6b03de16ea9de2716288491 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 24 Nov 2024 20:10:39 +0100 Subject: [PATCH 9/9] feat: update `Home.js` --- src/page/Home.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/page/Home.js b/src/page/Home.js index 50c45d1..65f248d 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -858,26 +858,22 @@ let r = query p select (c, d) from ReadyDate(c; d)
  • first-class functions
  • extensible records
  • parametric polymorphism
  • -
  • traits (type classes)
  • +
  • traits (i.e. type classes)
  • higher-kinded types
  • -
  • light-weight polymorphic effects
  • -
  • type aliases
  • -
  • Hindley-Milner type inference
  • +
  • associated types and effects
    • +
    • effect polymorphism + subeffecting
    • +
    • purity reflection
    • CSP-style concurrency
    • buffered & unbuffered channels
    • first-class datalog constraints
    • -
    • polymorphic datalog predicates
    • -
    • constraints with lattice semantics
    • -
    • stratified negation
    • -
    • interoperability with Java
    • +
    • seamless interoperability with Java
    • unboxed primitives
    • keyword-based syntax
    • -
    • redundancy checks
    @@ -888,11 +884,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
  • expressions holes
  • compilation to JVM bytecode
  • full tail call elimination
  • -
  • core standard library
  • +
  • resilient compiler architecture
  • parallel compiler architecture
  • human friendly errors
  • -
  • interactive mode
  • -
  • Visual Studio Code support