From 5d2647cc83c973005c52575629604822079e2720 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Sat, 30 Dec 2023 13:59:45 +0100 Subject: [PATCH] feat: update `Faq.js` (#137) --- src/page/Faq.js | 170 +++++++++++++++++------------------------------ src/page/Home.js | 46 ++++++------- 2 files changed, 82 insertions(+), 134 deletions(-) diff --git a/src/page/Faq.js b/src/page/Faq.js index 56506eb..a8327b4 100644 --- a/src/page/Faq.js +++ b/src/page/Faq.js @@ -37,30 +37,41 @@ class Faq extends Component {

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

- Flix looks quite similar to Scala. How are the two languages related? + 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: - (a) the use of short keywords, - (b) the x : T syntax for type annotations, - (c) the List[Int32] syntax for type parameters, and - (d) if, match, etc. as expressions.

+
    +
  • 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.
  • +
+

- Other than syntax, the two languages are very different: Scala is object-oriented, Flix is - not. - Scala has sub-typing, Flix does not. The Scala type system is unsound and has imperfect - type inference, whereas the Flix type system is both sound and supports type inference. + 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.
  • +
@@ -98,69 +109,37 @@ class Faq extends Component { Does Flix compile to WebAssembly (WASM)? - No, not at the moment. It is something we are open to, but we are waiting for WebAssembly to - gain a garbage collector and tail calls. + Not yet. It is something we are open to. + We are waiting for WebAssembly to offer native support for garbage collection and tail calls. - Why does Flix target the Java Virtual Machine (JVM)? + Is the Flix type system sound? Does it support complete inference? - The Java Virtual Machine has many attractive features not found on other VMs, including: -
    -
  • A state-of-the-art JIT compiler.
  • -
  • Multiple state-of-the-art garbage collectors.
  • -
  • Access to a huge ecosystem of libraries.
  • -
  • A multitude of concurrency primitives including light-weight threads.
  • -
  • Advanced introspection and debugging facilities.
  • -
+ Yes and yes. The type system is a variant of Hindley-Milner.
- Is the Flix type system sound? - - - Yes. It is based on Hindley-Milner. - - - - - - I want to learn Flix! What should I know about before hand? + What is the best way to start learning Flix?

- At the moment, Flix has not yet reached version 1.0. That means you will be an early - adopter, so you should expect for the language to evolve and be prepared for the rare - compiler bug. (The Flix compiler has 9,500 manually written tests and we - take correctness seriously.) + We recommand that you have some prior experience with functional programming.

- To write Flix programs, a solid background in functional programming is useful. That means - prior experience with OCaml, Haskell, Scala, or similar programming languages. -

-
-
- - - - What is the best way to start learning Flix? - - -

- We recommend that you start with a small offering to the Great Dreamer, the Sleeper of - R'lyeh, Cthulhu. And coffee. Lots of coffee. All kidding aside, the best place to start is - to look at the examples and to read the Programming - Flix book. + 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. + If you get stuck or need help feel free to reach out to + us on Gitter.

@@ -198,7 +177,7 @@ class Faq extends Component { - Haskell and OCaml compile to native code thus – by definition – they must be faster than Flix. + Haskell and OCaml compile to native code thus by definition they must be faster than Flix. This is not necessarily true. For example, Java sometimes beats both - - Exceptions - Exceptions have been used to deal with two types of errors that may arise during - execution of a program: predictable errors (e.g. a file does not exist) and program - bugs (e.g. stack overflow). Flix has no exceptions. Instead, all predictable errors - should be encoded as partial functions (e.g. using Option) or as - potentially error returning functions (e.g. using Result). We are still - in the process of deciding how to handle program bugs. - - Null Values @@ -422,30 +391,12 @@ class Faq extends Component { - - - Who works on Flix? Is Flix a hobby project? - - -

- Flix is a research project carried out by faculty and students at Aarhus University and the University - of Waterloo. -

- -

- Flix is partially supported by a grant of 2,500,000 DKK from the Independent - Research Fund of Denmark. -

- - - Where does the "Flix" name come from? - We do not entirely remember, but we believe it came from FIXpoint Language. + We do not remember, but we believe it may have come from FIXpoint Language. @@ -463,9 +414,8 @@ class Faq extends Component { You do not seem to understand parsing / type theory / code generation / computers! - We are happy to learn and to revisit design decisions if we come to a greater understanding - of the problem at hand. If you think we have overlooked something, we would be happy to talk - about it if you post a ticket on GitHub or write to us on Gitter. + We are always happy to learn! We are ready to discuss design choices made in Flix. + Swing by Gitter or on GitHub. @@ -474,9 +424,9 @@ class Faq extends Component { Why does the website require JavaScript? - We built the website using the popular React framework. We use JavaScript for the online code - editor. Using React was easy. Ultimately, we want to spend our time writing compilers, not - writing websites. + We built the website using the popular React framework. + Using React was easy. + Ultimately, we want to spend our time writing compilers, not writing websites. @@ -495,15 +445,16 @@ class Faq extends Component { "This site requires JavaScript"

- People who have criticized the website for using JavaScript: - [1], [1], [2], [3], [4]. + href="https://news.ycombinator.com/item?id=38419695">[4], [5].

- People who have offered to help transition the site to use a static page generator: 0. + People who have offered to help refactor the site to use static html: 0.

@@ -515,12 +466,12 @@ class Faq extends Component {

The latest compiler version and the website is not always in sync, hence occasionally some - examples may stop to work. Feel free to open a bug report if this happens. + examples may stop to work.

Occasionally a mischievous visitor will crash the online editor (or rather the virtual - machine on which the compiler runs). We usually discover and fix this within a few days. + machine on which the compiler runs).

@@ -552,11 +503,7 @@ class Faq extends Component {

- Indeed, we do it all for C#. -

-

- Or, you know, because we honestly believe in functional programming (with room for local - imperative programming!) + Yes, we do it all for C#.

@@ -568,11 +515,19 @@ class Faq extends Component { the best with that. - Yes, we take inspiration from well-designed languages that are pushing on the boundary of - programming language design. - What would be the point of taking ideas from C, Perl, PHP, and Visual Basic? Also, we did not - say that we are taking their - most complex ideas; rather we should take their best ideas. +

+ Yes, we take inspiration from programming languages that are pushing on the boundary of + language design. +

+ +

+ What would be the point of taking ideas from C, Perl, PHP, and Visual Basic? +

+ +

+ Also, who said that we are taking their most complex ideas? Rather we should take + their best ideas. +

@@ -591,7 +546,7 @@ class Faq extends Component { existing programming languages is not enough. - Flix aims to offer a combination of features that are not found in any existing programming + Flix aims to offer a collection of features that are not found in any existing programming language. @@ -649,9 +604,7 @@ class Faq extends Component { of white space. - Yes, because that design choice has no issues with inadvertently causing bugs due to - (i) lexing and parsing ambiguities, (ii) mixing tabs and spaces, (iii) copy-paste of code, and - (iv) all of the above. + Right, because significant whitespace poses no challenges or gotchas whatsoever. @@ -670,9 +623,6 @@ class Faq extends Component { :: xs.
  • The underscore _ denotes a wildcard (or an unused variable).
  • -
  • The expression <- c reads a value from a channel whereas c <- - v writes a value to a channel. -
  • The symbol :- denotes logical implication in Datalog rules.
  • diff --git a/src/page/Home.js b/src/page/Home.js index f1288d3..85e5d5b 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -600,9 +600,9 @@ let r = query p select (c, d) from ReadyDate(c; d) -
    +
    - +

    Complete Feature List

    @@ -652,10 +652,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    +
    -
    - - +

    Standard Library with Batteries Included

    @@ -685,9 +684,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    -
    +
    - +

    Modern Compiler Architecture

    @@ -718,9 +717,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    -
    +
    - +

    Compiler Performance: The Raw Numbers

    @@ -763,9 +762,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    -
    +
    - +

    Visual Studio Code Support

    @@ -892,9 +891,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    -
    +
    - +

    Actively Developed and Maintained

    @@ -942,10 +941,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    +
    -
    - - + @@ -977,9 +975,9 @@ let r = query p select (c, d) from ReadyDate(c; d) -
    +
    - +

    Funding and Grants

    @@ -1004,9 +1002,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    -
    +
    - +

    Sponsors and Funding

    @@ -1035,9 +1033,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    -
    +
    - +

    Collaborators

    @@ -1061,9 +1059,9 @@ let r = query p select (c, d) from ReadyDate(c; d)
    -
    +
    - +

    We kindly thank EJ Technologies for providing