From 2efd72c13baca4954ff8c3490fca1e8dca7b13cc Mon Sep 17 00:00:00 2001 From: HackMD Date: Fri, 30 Oct 2020 11:09:29 +0000 Subject: [PATCH 1/6] Starting const eval blog post --- posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md diff --git a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md new file mode 100644 index 000000000..e69de29bb From f8c1d62d0302e881c245e56f96f93413343e3d73 Mon Sep 17 00:00:00 2001 From: HackMD Date: Fri, 30 Oct 2020 11:51:34 +0000 Subject: [PATCH 2/6] Write roadmap blog post --- ...00-00-const-eval-roadmap-and-skill-tree.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md index e69de29bb..52b530b5b 100644 --- a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md +++ b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md @@ -0,0 +1,28 @@ +# Const eval roadmap + +Y'all probably noticed that const eval finally got loops, mutable local variables and branches. With those features existing, we were able to make a lot of basic arithmetic functions `const fn `. Things like `checked_div` needs to be able to check that the divisor is not zero and return `None` in that case. These features have been asked for a lot, and while it may not appear so, these were the low hanging fruit. + +So you may now be thinking "If the low hanging fruit took you 5 years" *(yes oli-obk has been working on const eval for that long, and in the end ecstaticmorse implemented const control flow)*, "will we see any of the more fancy features in this new decade?". + +TLDR: Yes, and we now have a system for making things go fast (brrr?) while still making sure we don't accidentally bypass the decision processes. + +Instead of creating more and more [RFCs](https://github.com/rust-lang/rfcs/) or [MCPs](https://github.com/rust-lang/lang-team/) and DDOSing the language team, we made one roadmap that doesn't actually have the details on each feature. The plan is a tree-graph that lists the dependencies between features. The language team then signs off on the roadmap, giving the const-eval team the permission to experiment with unstable features without checking back with the language team. Stabilization of any of the features will still work by having a language team sign off, but that can then be done with the full knowledge about the final product instead of hypotheticals. If new features that are not yet on the plan are desired to get implemented, the roadmap is adjusted and the language team signs off on the roadmap changes. + +This new scheme makes it much easier to keep an overview over how features interact with other features. So without further adue (and hoping that the previous sentence's statement is true), let's introduce the + +[Const. Eval. Skill. Tree.](https://rust-lang.github.io/const-eval/) + +All the nodes are hyperlinks, pointing to the tracking issue for a specific feature. The edges turn bold and pink when you hover over them, making it easy to track which nodes it connects. If you want to see the source that generates this graph, you can find it at [in the const-eval team repository](https://github.com/rust-lang/const-eval/blob/master/src/skill_tree.md). + +Nodes further on the right are higher level features depending on features whose nodes are further left. Arrows point from low level features to high level features. So an Arrow is basically pointing from a feature to the features that are enabled by it. + +Looking at the current state of the roadmap, you can see that there are three major low level features: + +* trait bounds on `const fn` + * is being worked on, and a preliminary subset of it has been implemented. +* mutable references + * is being worked on, basically works, we just need to hammer out some kinks +* unsafe code + * RalfJung is in the process of writing up a document explaining how we can reliably detect most undefined behaviour in const eval code (and the kind of UB we cannot detect). + +So, as you can see, things are moving along nicely and we'll likely be able to give you new const eval features to play on nightly with soon. \ No newline at end of file From 264797f3d520730d08b31150d5f1c37e4fd99a83 Mon Sep 17 00:00:00 2001 From: HackMD Date: Fri, 30 Oct 2020 13:25:23 +0000 Subject: [PATCH 3/6] Add header and fix some grammatical irregularities --- .../0000-00-00-const-eval-roadmap-and-skill-tree.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md index 52b530b5b..0d05f96a9 100644 --- a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md +++ b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md @@ -1,12 +1,17 @@ -# Const eval roadmap +--- +layout: post +title: "Constant evaluation roadmap" +author: Oliver Scherer +team: The Language Team +--- Y'all probably noticed that const eval finally got loops, mutable local variables and branches. With those features existing, we were able to make a lot of basic arithmetic functions `const fn `. Things like `checked_div` needs to be able to check that the divisor is not zero and return `None` in that case. These features have been asked for a lot, and while it may not appear so, these were the low hanging fruit. So you may now be thinking "If the low hanging fruit took you 5 years" *(yes oli-obk has been working on const eval for that long, and in the end ecstaticmorse implemented const control flow)*, "will we see any of the more fancy features in this new decade?". -TLDR: Yes, and we now have a system for making things go fast (brrr?) while still making sure we don't accidentally bypass the decision processes. +TLDR: Yes, and we now have a system for making things go ~~fast~~ brrr while still making sure we don't accidentally bypass the decision processes. -Instead of creating more and more [RFCs](https://github.com/rust-lang/rfcs/) or [MCPs](https://github.com/rust-lang/lang-team/) and DDOSing the language team, we made one roadmap that doesn't actually have the details on each feature. The plan is a tree-graph that lists the dependencies between features. The language team then signs off on the roadmap, giving the const-eval team the permission to experiment with unstable features without checking back with the language team. Stabilization of any of the features will still work by having a language team sign off, but that can then be done with the full knowledge about the final product instead of hypotheticals. If new features that are not yet on the plan are desired to get implemented, the roadmap is adjusted and the language team signs off on the roadmap changes. +Instead of creating more and more [RFCs](https://github.com/rust-lang/rfcs/) or [MCPs](https://github.com/rust-lang/lang-team/) and DDOSing the language team, we made one roadmap that doesn't contain the actual details of each feature. The plan is a tree-graph that lists the dependencies between features. The language team then signs off on the roadmap, giving the const-eval team the permission to experiment with unstable features without checking back with the language team. Stabilization of any of the features will still work by having a language team sign off, but that can then be done with the full knowledge about the final product instead of hypotheticals. If new features that are not yet on the plan are desired to get implemented, the roadmap is adjusted and the language team signs off on the roadmap changes. This new scheme makes it much easier to keep an overview over how features interact with other features. So without further adue (and hoping that the previous sentence's statement is true), let's introduce the From 4c1f33cc5acdb8a103c25fbc4d88b523eae15468 Mon Sep 17 00:00:00 2001 From: HackMD Date: Fri, 30 Oct 2020 13:28:48 +0000 Subject: [PATCH 4/6] Nits and header fixes --- .../0000-00-00-const-eval-roadmap-and-skill-tree.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md index 0d05f96a9..2c90a3d2f 100644 --- a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md +++ b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md @@ -1,8 +1,8 @@ --- layout: post title: "Constant evaluation roadmap" -author: Oliver Scherer -team: The Language Team +author: Oli Scherer +team: the const eval working group --- Y'all probably noticed that const eval finally got loops, mutable local variables and branches. With those features existing, we were able to make a lot of basic arithmetic functions `const fn `. Things like `checked_div` needs to be able to check that the divisor is not zero and return `None` in that case. These features have been asked for a lot, and while it may not appear so, these were the low hanging fruit. @@ -13,11 +13,11 @@ TLDR: Yes, and we now have a system for making things go ~~fast~~ brrr while sti Instead of creating more and more [RFCs](https://github.com/rust-lang/rfcs/) or [MCPs](https://github.com/rust-lang/lang-team/) and DDOSing the language team, we made one roadmap that doesn't contain the actual details of each feature. The plan is a tree-graph that lists the dependencies between features. The language team then signs off on the roadmap, giving the const-eval team the permission to experiment with unstable features without checking back with the language team. Stabilization of any of the features will still work by having a language team sign off, but that can then be done with the full knowledge about the final product instead of hypotheticals. If new features that are not yet on the plan are desired to get implemented, the roadmap is adjusted and the language team signs off on the roadmap changes. -This new scheme makes it much easier to keep an overview over how features interact with other features. So without further adue (and hoping that the previous sentence's statement is true), let's introduce the +This new scheme makes it much easier to keep an overview over how features interact with other features. So without further ado (and hoping that the previous sentence's statement is true), let's introduce the [Const. Eval. Skill. Tree.](https://rust-lang.github.io/const-eval/) -All the nodes are hyperlinks, pointing to the tracking issue for a specific feature. The edges turn bold and pink when you hover over them, making it easy to track which nodes it connects. If you want to see the source that generates this graph, you can find it at [in the const-eval team repository](https://github.com/rust-lang/const-eval/blob/master/src/skill_tree.md). +All the nodes are hyperlinks, pointing to the tracking issue for a specific feature. The edges turn bold and pink when you hover over them, making it easy to track which nodes it connects. If you want to see the source that generates this graph, you can find it [in the const-eval team repository](https://github.com/rust-lang/const-eval/blob/master/src/skill_tree.md). Nodes further on the right are higher level features depending on features whose nodes are further left. Arrows point from low level features to high level features. So an Arrow is basically pointing from a feature to the features that are enabled by it. From 9b33ea1f30b17b2bedc9b819f6c617790d3ccb0d Mon Sep 17 00:00:00 2001 From: HackMD Date: Sun, 1 Nov 2020 16:30:01 +0000 Subject: [PATCH 5/6] Nits and reading flow --- .../0000-00-00-const-eval-roadmap-and-skill-tree.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md index 2c90a3d2f..56fd203a3 100644 --- a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md +++ b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md @@ -5,13 +5,13 @@ author: Oli Scherer team: the const eval working group --- -Y'all probably noticed that const eval finally got loops, mutable local variables and branches. With those features existing, we were able to make a lot of basic arithmetic functions `const fn `. Things like `checked_div` needs to be able to check that the divisor is not zero and return `None` in that case. These features have been asked for a lot, and while it may not appear so, these were the low hanging fruit. +Y'all probably noticed that const eval finally got loops, mutable local variables and branches. With those features stabilized, we were able to make a lot of basic arithmetic functions `const fn` on the stable compiler. These features have been asked for a lot, and while it may not appear so, these were the low hanging fruit. So you may now be thinking "If the low hanging fruit took you 5 years" *(yes oli-obk has been working on const eval for that long, and in the end ecstaticmorse implemented const control flow)*, "will we see any of the more fancy features in this new decade?". TLDR: Yes, and we now have a system for making things go ~~fast~~ brrr while still making sure we don't accidentally bypass the decision processes. -Instead of creating more and more [RFCs](https://github.com/rust-lang/rfcs/) or [MCPs](https://github.com/rust-lang/lang-team/) and DDOSing the language team, we made one roadmap that doesn't contain the actual details of each feature. The plan is a tree-graph that lists the dependencies between features. The language team then signs off on the roadmap, giving the const-eval team the permission to experiment with unstable features without checking back with the language team. Stabilization of any of the features will still work by having a language team sign off, but that can then be done with the full knowledge about the final product instead of hypotheticals. If new features that are not yet on the plan are desired to get implemented, the roadmap is adjusted and the language team signs off on the roadmap changes. +Instead of creating more and more [RFCs](https://github.com/rust-lang/rfcs/) or [MCPs](https://github.com/rust-lang/lang-team/) and DDOSing the language team, we made one roadmap that doesn't contain the actual details of each feature. The plan is a tree that lists the dependencies between features. The language team then signs off on the roadmap, giving the const-eval team the permission to experiment with unstable features without checking back with the language team. Stabilization of any of the features will still work by having a language team sign off, but that can then be done with the full knowledge about the final product instead of hypotheticals. If new features that are not yet on the plan are desired to get implemented, the roadmap is adjusted and the language team signs off on the roadmap changes. This new scheme makes it much easier to keep an overview over how features interact with other features. So without further ado (and hoping that the previous sentence's statement is true), let's introduce the From dbb4de33456b0e693ff13958fcd742f9a96153a8 Mon Sep 17 00:00:00 2001 From: HackMD Date: Wed, 4 Nov 2020 13:54:38 +0000 Subject: [PATCH 6/6] s/basic/checked and saturating/ --- .../inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md index 56fd203a3..f440518fe 100644 --- a/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md +++ b/posts/inside-rust/0000-00-00-const-eval-roadmap-and-skill-tree.md @@ -5,7 +5,7 @@ author: Oli Scherer team: the const eval working group --- -Y'all probably noticed that const eval finally got loops, mutable local variables and branches. With those features stabilized, we were able to make a lot of basic arithmetic functions `const fn` on the stable compiler. These features have been asked for a lot, and while it may not appear so, these were the low hanging fruit. +Y'all probably noticed that const eval finally got loops, mutable local variables and branches. With those features stabilized, we were able to make a lot of checked and saturating arithmetic functions `const fn` on the stable compiler. These features have been asked for a lot, and while it may not appear so, these were the low hanging fruit. So you may now be thinking "If the low hanging fruit took you 5 years" *(yes oli-obk has been working on const eval for that long, and in the end ecstaticmorse implemented const control flow)*, "will we see any of the more fancy features in this new decade?".