diff --git a/src/page/Faq.js b/src/page/Faq.js index 1212396..80554c7 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"; @@ -20,58 +20,26 @@ 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. +

- - - Does Flix support integration with Java, Kotlin, Scala etc? - -

- Yes, with the import mechanism. - You can read more in the documentation, in the section: Interoperability. + If you get stuck or need help feel free to reach out to + us on Gitter.

- Flix looks similar to Scala. How are the two languages related? + Does Flix have Language Server Protocol (LSP) support? -

- 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: -

- - - -

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

- - + Yes, in addition to Visual Studio Code support, Flix also has generic LSP support.
@@ -87,11 +55,13 @@ class Faq extends Component { - Does Flix have IDE support? Language Server Protocol (LSP) support? + Are you looking for help with the compiler or language design? - Yes. There is a Visual - Studio Code plugin available for 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! @@ -109,53 +79,50 @@ 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. + Not yet. It is something we are open to. We are waiting for the WASM ecosystem to mature. - Is the Flix type system sound? Does it support complete inference? + Is Flix a domain specific language (DSL)? - Yes and yes. The type system is a variant of Hindley-Milner. +

+ No, Flix is a full-blown general-purpose programming language. +

- What is the best way to start learning Flix? + Flix looks similar to Scala. How are the two languages related?

- We recommand that you have some prior experience with functional programming. + Flix borrows a lot of syntax from Scala, hence the two languages have a similar feel.

-

- Other than that, the best place to start is to look at the examples and to - read the Programming Flix book. + We think Scala made many good design choices with respect to syntax, including:

-

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

-
-
+ - - - Is Flix a domain specific language (DSL)? - -

- No, Flix is a full-blown functional programming language. + However, other than syntax, the two languages are very different:

-

- That said, Flix could be considered a meta-programming language for Datalog. -

+
@@ -165,12 +132,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 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.

@@ -188,165 +157,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? @@ -465,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.

@@ -610,14 +420,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.

@@ -664,62 +477,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 -

-
-
- ); } 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 = ... } `} 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.