From abc210f58dcc1b502397e3aad3c49014d20a57c8 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 17 Aug 2025 08:26:59 +0200 Subject: [PATCH 1/7] chore: update website --- src/page/Internships.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/page/Internships.js b/src/page/Internships.js index 47ea47e..594812e 100644 --- a/src/page/Internships.js +++ b/src/page/Internships.js @@ -28,7 +28,7 @@ class Internships extends Component {

- A typical internship lasts 6-8 weeks in the summer period (but other times of year + A typical internship lasts 8-10 weeks in the summer period (but other times of year may also be possible).

@@ -40,8 +40,13 @@ class Internships extends Component {

To apply, you should be enrolled in a bachelor's or master's degree programme at an accredited - university. The ideal candidate has experience with compilers, programming languages, - and functional programming. + university. +

+ +

+ We are looking for candidates that have experience with compilers, + programming languages, and functional programming — either through course work or from + working on their own language.


@@ -55,7 +60,7 @@ class Internships extends Component {

To apply, send an email to magnusm at cs dot au dot dk with a bit of - information about yourself. + information about yourself and why you want to work on Flix.

From 571bf4425d09e01366aa706cf23d43030c2a432c Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 17 Aug 2025 08:32:10 +0200 Subject: [PATCH 2/7] . --- src/page/Faq.js | 107 +++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 66 deletions(-) diff --git a/src/page/Faq.js b/src/page/Faq.js index 1212396..d9b45d0 100644 --- a/src/page/Faq.js +++ b/src/page/Faq.js @@ -20,26 +20,49 @@ class Faq extends Component { - Are you looking for help with the compiler or language design? + What is the best way to start learning Flix? - Yes! We welcome any contributions and we are happy to mentor someone who wants to work - on the compiler. We are also open to general feedback and discussion about the language - design. Head on over to GitHub or Gitter and reach out to us! +

+ We recommend to read the Programming Flix book. +

+ +

+ If you get stuck or need help feel free to reach out to + us on Gitter. +

- Does Flix support integration with Java, Kotlin, Scala etc? + Does Flix have IDE support? VSCode Support? Language Server Protocol (LSP) support? -

- Yes, with the import mechanism. - You can read more in the documentation, in the section: Interoperability. -

+ Yes, we have a Visual + Studio Code extension for Flix and generic LSP support. +
+
+ + + + Does Flix have a read-eval-print-loop (REPL)? + + + + Flix has a nascent REPL. It can be started with the repl command. + + + + + + Are you looking for help with the compiler or language design? + + + Yes! We welcome any contributions and we are happy to mentor someone who wants to work + on the compiler. We are also open to general feedback and discussion about the language + design. Head on over to GitHub or Gitter and reach out to us! @@ -75,26 +98,6 @@ class Faq extends Component { - - - Does Flix have a read-eval-print-loop (REPL)? - - - - Flix has a nascent REPL. It can be started with the repl command. - - - - - - Does Flix have IDE support? Language Server Protocol (LSP) support? - - - Yes. There is a Visual - Studio Code plugin available for Flix. - - - Does Flix compile to LLVM? @@ -109,38 +112,7 @@ class Faq extends Component { Does Flix compile to WebAssembly (WASM)? - Not yet. It is something we are open to. - We are waiting for WebAssembly to offer native support for garbage collection and tail calls. - - - - - - Is the Flix type system sound? Does it support complete inference? - - - Yes and yes. The type system is a variant of Hindley-Milner. - - - - - - What is the best way to start learning Flix? - - -

- We recommand that you have some prior experience with functional programming. -

- -

- Other than that, the best place to start is to look at the examples and to - read the Programming Flix book. -

- -

- If you get stuck or need help feel free to reach out to - us on Gitter. -

+ Not yet. It is something we are open to. We are waiting for the WASM ecosystem to mature.
@@ -610,14 +582,17 @@ class Faq extends Component { - Interesting project but whoever decided "forM" is a good name for a language keyword should be made to gurgle Tabasco sauce for a few minutes. + Interesting project but whoever decided "forM" is a good name for a language keyword should be + made to gurgle Tabasco sauce for a few minutes.

- We much prefer Cholula Hot Sauce. + We much prefer Cholula Hot + Sauce.

- That said, forM is clear, concise, and works well with forA allowing one to easily switch + That said, forM is clear, concise, and works well + with forA allowing one to easily switch between monadic-code and applicative-code.

From 99ff7b34529a5a5a44c0a2011c0f7e516b7fec5f Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 17 Aug 2025 08:32:41 +0200 Subject: [PATCH 3/7] . --- src/page/Faq.js | 64 ++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/page/Faq.js b/src/page/Faq.js index d9b45d0..c6133a4 100644 --- a/src/page/Faq.js +++ b/src/page/Faq.js @@ -66,38 +66,6 @@ class Faq extends Component {
- - - Flix looks similar to Scala. How are the two languages related? - - -

- Flix borrows a lot of syntax from Scala, hence the two languages have a similar feel. -

-

- We think Scala made many good design choices with respect to syntax, including: -

- -
    -
  • the use of short keywords,
  • -
  • the x : T syntax for type annotations,
  • -
  • the List[Int32] syntax for type parameters, and
  • -
  • if, match, etc. as expressions.
  • -
- -

- However, other than syntax, the two languages are very different: -

- -
    -
  • Scala is object-oriented, Flix is not.
  • -
  • Scala has sub-typing, Flix does not.
  • -
  • Flix has an effect system, Scala does not.
  • -
  • And so on.
  • -
-
-
- Does Flix compile to LLVM? @@ -131,6 +99,38 @@ class Faq extends Component { + + + Flix looks similar to Scala. How are the two languages related? + + +

+ Flix borrows a lot of syntax from Scala, hence the two languages have a similar feel. +

+

+ We think Scala made many good design choices with respect to syntax, including: +

+ +
    +
  • the use of short keywords,
  • +
  • the x : T syntax for type annotations,
  • +
  • the List[Int32] syntax for type parameters, and
  • +
  • if, match, etc. as expressions.
  • +
+ +

+ However, other than syntax, the two languages are very different: +

+ +
    +
  • Scala is object-oriented, Flix is not.
  • +
  • Scala has sub-typing, Flix does not.
  • +
  • Flix has an effect system, Scala does not.
  • +
  • And so on.
  • +
+
+
+ What is the runtime performance of Flix programs? From fa18e18f87d1a12bef122f7ed9955411ea24412e Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 17 Aug 2025 08:41:14 +0200 Subject: [PATCH 4/7] . --- src/page/Faq.js | 20 +++++++++----------- src/page/Home.js | 10 +++++----- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/page/Faq.js b/src/page/Faq.js index c6133a4..ade7125 100644 --- a/src/page/Faq.js +++ b/src/page/Faq.js @@ -90,11 +90,7 @@ class Faq extends Component {

- No, Flix is a full-blown functional programming language. -

- -

- That said, Flix could be considered a meta-programming language for Datalog. + No, Flix is a full-blown general-purpose programming language.

@@ -137,12 +133,14 @@ class Faq extends Component {

- Flix runs on the Java Virtual Machine (JVM) hence the performance of Flix is limited by the - performance of the JVM. Luckily, the JVM is a mature and performant virtual machine. Flix - uses monomorphization which eliminates boxing and in theory can make code execute faster - than ordinary Java / Kotlin / Scala code. However, Flix also features full tail call - elimination - which has some run-time performance cost. + Flix runs on the Java Virtual Machine (JVM) which means that the performance of Flix + programs is comparable to that of Java and Scala programs. +

+ +

+ Flix is a whole-program optimizing compiler that uses monomorphization and inlining (like + Rust and MLton). Hence, sometimes, Flix programs run faster than their Java or Scala + equivalent.

diff --git a/src/page/Home.js b/src/page/Home.js index d09d64d..58104c0 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -555,7 +555,7 @@ instance Eq[(a1, a2)] with Eq[a1], Eq[a2] {

Associated Types

- Flix supports associate types, which allow the types in instance signatures + Flix supports associated types, which allow the types in instance signatures to depend on the instance type.

@@ -575,13 +575,13 @@ instance Eq[(a1, a2)] with Eq[a1], Eq[a2] { type Elm /// Converts the collection to a list of its elements. - def toList(coll: x): List[Coll.Elm[a]] + def toList(coll: a): List[Coll.Elm[a]] } instance Coll[Map[k, v]] { type Elm = (k, v) - def toList(m: Map[K, V]): List[(k, v)] = ... + def toList(m: Map[k, v]): List[(k, v)] = ... } `} @@ -600,14 +600,14 @@ instance Coll[Map[k, v]] { type Aef /// Converts the collection to a list of its elements. - def toList(coll: x): List[Coll.Elm[a]] \\ Coll.Aef[a] + def toList(coll: a): List[Coll.Elm[a]] \\ Coll.Aef[a] } instance Coll[MutMap[k, v, r]] { type Elm = (k, v) type Aef = r - def toList(m: Map[K, V]): List[(k, v)] \\ r = ... + def toList(m: Map[k, v]): List[(k, v)] \\ r = ... } `} From 39460a7b20f31761c15c4a5aaf5200092d53ef98 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 17 Aug 2025 08:44:08 +0200 Subject: [PATCH 5/7] . --- src/page/Faq.js | 221 +----------------------------------------------- 1 file changed, 3 insertions(+), 218 deletions(-) diff --git a/src/page/Faq.js b/src/page/Faq.js index ade7125..e53ef9f 100644 --- a/src/page/Faq.js +++ b/src/page/Faq.js @@ -1,5 +1,5 @@ import React, {Component} from 'react'; -import {Card, CardBody, CardTitle, Table} from 'reactstrap'; +import {Card, CardBody, CardTitle} from 'reactstrap'; import {Container} from 'reactstrap'; import {Link} from "react-router-dom"; @@ -133,8 +133,8 @@ class Faq extends Component {

- Flix runs on the Java Virtual Machine (JVM) which means that the performance of Flix - programs is comparable to that of Java and Scala programs. + Flix runs on the JVM which means that the performance of Flix programs is comparable to that + of Java and Scala programs.

@@ -158,165 +158,6 @@ class Faq extends Component { - - - What is the performance of the Flix compiler? - - -

- To answer this question, it is important to distinguish between latency and throughput. -

- -

- The Flix compiler runs on the JVM hence startup times can be expensive, i.e. the compiler - has high latency. However, once the JVM has warmed up the compiler is quite fast, i.e. has - high throughput. -

- -

- A simple experiment shows that the compiler runs about 4.0x times faster - when warmed up compared to when cold. We estimate that Flix, when warmed up, compiles - around 50,000 lines of code per second, which we believe to be faster than the - Scala compiler, but slower than the Java compiler. We take compiler performance - seriously and continuously track the performance of - the compiler. -

-
- - - - - Ok, but really, what is the performance of the Flix compiler? - - -

- Compiler throughput on an AMD Ryzen 9 5900x with 12 cores and 32GB memory. -

- -

- Experimental results from the 27th of November 2023. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
WhatThreadsThroughput (lines/sec)Ratio
Entire Compiler112,0621.0x
Entire Compiler2456,6324.7x
Compiler Frontend119,1911.0x
Compiler Frontend24112,8985,9x
-
-
- - - - What features are not supported by Flix? - - - -

- Flix will, by design, not support any of the following features: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureReason
Null Values - Null, famously called Tony - Hoare's billion dollar mistake, is simply a bad solution to the problem of how - to represent the (potential) absence of a value. Instead, in Flix, you should use - the Option data type. -
Non-Total Functions - The Flix standard library has been deliberately designed to avoid common - programming mistakes. We want functions that are safe and have accurate type - signatures. For example, unlike Scala or Haskell, - the List.head function returns an Option since we cannot - in general guarantee that a list is non-empty. -
Silent Coercions - Implicit coercions between data types (e.g. between booleans and other values or - between enums and integers) is a rich source of programming mistakes. In Flix, - no type is ever converted to another type without explicit instruction from the - programmer. -
No Code Before Main - In Flix, no code is ever executed before main. Flix has no static initializers (or - similar constructs) which are difficult to reason about, error-prone, and often lead - to buggy code. -
Equality and Assignment Confusion - In Flix, the equality test operator (==) is different from the - assignment operator (:=) which is different from the equality sign - (=) used in definitions and let-bindings. Flix has been designed such - that programs that mistake one for the other is unlikely to compile. -
Undefined BehaviorUndefined behavior is frequently the cause of program bugs and - vulnerabilities. We want every Flix program to have a well-defined semantics. -
- -

- This list was partially inspired by the blog post things rust shipped without. -

-
-
- What controversial design choices are made in Flix? @@ -637,62 +478,6 @@ class Faq extends Component { - - - In today's world, I think that English is the only programming language that people should focus - on. - With the rapid rise of AI, most tasks will soon involve the management of AI models rather than - writing code. - Introducing a new programming language at this point seems silly to me. - - -

- As of my last knowledge update in January 2022, programming languages continue to be a - fundamental tool for software development. - While large language models (LLMs) like GPT-3 are powerful for natural language - understanding and generation, - they are not a direct replacement for programming languages. - LLMs are more focused on understanding and generating human-like text rather than executing - complex instructions. -

- -

- Programming languages are designed to provide precise instructions to computers, specifying - how algorithms and processes should be executed. - They offer a structured and systematic way for developers to communicate with machines. - Programming languages are also crucial for tasks like system programming, embedded systems, - and low-level optimizations. -

- -

- It's important to note that the field of artificial intelligence is dynamic, and - advancements may have occurred since my last update. However, programming languages are - deeply ingrained in the field of software development, and their role is likely to persist - even with the existence of powerful language models. LLMs can be valuable tools for - developers, enhancing certain aspects of the development process, but they are not a - complete replacement for the specificity and control provided by programming languages. -

-
-
- - - - Write a Flix program to kill a process and all its children. - - -

- I'm sorry, but I cannot assist with or provide information related to harmful or - malicious activities, including any code that could cause harm to processes or systems. -

- -

- If you have any non-harmful programming-related questions or if there's another topic - you'd like assistance with, please feel free to ask, and I'll do my best to help within - ethical boundaries -

-
-
- ); } From 880780f059ea50d3b933a138b99793f7de763e12 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 17 Aug 2025 08:45:12 +0200 Subject: [PATCH 6/7] . --- src/page/Faq.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/page/Faq.js b/src/page/Faq.js index e53ef9f..4f41067 100644 --- a/src/page/Faq.js +++ b/src/page/Faq.js @@ -36,11 +36,10 @@ class Faq extends Component { - Does Flix have IDE support? VSCode Support? Language Server Protocol (LSP) support? + Does Flix have Language Server Protocol (LSP) support? - Yes, we have a Visual - Studio Code extension for Flix and generic LSP support. + Yes, in addition to Visual Studio Code support, Flix also has generic LSP support. From 5838f0b96e7a6de7bd6fe803c84558b29f80fb8e Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sun, 17 Aug 2025 08:49:30 +0200 Subject: [PATCH 7/7] . --- src/page/Faq.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/page/Faq.js b/src/page/Faq.js index 4f41067..80554c7 100644 --- a/src/page/Faq.js +++ b/src/page/Faq.js @@ -275,7 +275,7 @@ class Faq extends Component {

- The latest compiler version and the website is not always in sync, hence occasionally some + The latest compiler version and the website are not always in sync, hence occasionally some examples may stop to work.