From c087955a16da87c0f526ccacbe786b56d96ff321 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 1 Dec 2020 13:21:13 +0100 Subject: [PATCH 1/5] editor ideas using Machine Learning --- editor/editor-ideas.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/editor/editor-ideas.md b/editor/editor-ideas.md index 1015dc581b..09f3c3967b 100644 --- a/editor/editor-ideas.md +++ b/editor/editor-ideas.md @@ -62,6 +62,16 @@ These are potentially inspirational resources for the editor's design. * Excel and Google Sheets * Not sure, maybe something they do well that we (code editors) could learn from + +## Machine Learning Ideas + +* Ability to record all changes to abstract syntax tree with user permission. + * I think it is possible to create powerful automatic error resolution by having a dataset available of ast's with a specific error and the subsequent transformation that fixed the error. + * GPT-3 can generate correct python functions based on a comment describing the functionality, video [here](https://www.youtube.com/watch?v=utuz7wBGjKM). It's possible that training a model using ast's may lead to better results than text based models. + * Users with large private code bases could (re)train a publicly available error recovery model to experience benefits without having to share their code. + * It could be useful to a user who is creating a function to show them the most similar function (type signature, name, comment) in a public+their private database. Say I was using a web framework and I just created a function that has a multipart form as argument, it would be great to have an example instantly available. + + ## General Thoughts/Ideas Thoughts and ideas possibly taken from above inspirations or separate. From 5dbe470933b98cf34a74fbeadfc60e4aaad87142 Mon Sep 17 00:00:00 2001 From: Folkert Date: Tue, 1 Dec 2020 23:07:35 +0100 Subject: [PATCH 2/5] fix typo --- compiler/gen/tests/gen_list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/gen/tests/gen_list.rs b/compiler/gen/tests/gen_list.rs index 1cac2d9e28..3322e1052b 100644 --- a/compiler/gen/tests/gen_list.rs +++ b/compiler/gen/tests/gen_list.rs @@ -565,7 +565,7 @@ mod gen_list { pi : F64 pi = 3.14 - single : List Float + single : List F64 single = [ 0 ] From f46f87834fcd73f051d67e71851d0a784f287da4 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Tue, 1 Dec 2020 20:26:53 -0500 Subject: [PATCH 3/5] set euxo pipefail on zig tests --- compiler/builtins/bitcode/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/builtins/bitcode/run-tests.sh b/compiler/builtins/bitcode/run-tests.sh index 2bdbed2070..75c2819785 100755 --- a/compiler/builtins/bitcode/run-tests.sh +++ b/compiler/builtins/bitcode/run-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -eux +set -euxo pipefail # Test every zig find src/*.zig -type f -exec zig test --library c {} \; From b7b9fe16d9a9f275a702d4695f3e1de12928f42a Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Tue, 1 Dec 2020 20:27:20 -0500 Subject: [PATCH 4/5] Actually exit 1 if zig tests fail --- compiler/builtins/bitcode/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/builtins/bitcode/run-tests.sh b/compiler/builtins/bitcode/run-tests.sh index 75c2819785..4f5d27715e 100755 --- a/compiler/builtins/bitcode/run-tests.sh +++ b/compiler/builtins/bitcode/run-tests.sh @@ -3,4 +3,4 @@ set -euxo pipefail # Test every zig -find src/*.zig -type f -exec zig test --library c {} \; +find src/*.zig -type f -print0 | xargs -n 1 -0 zig test --library c From 1b6acf60bd4ab94fbfd25c20546175ff5c342e2d Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Tue, 1 Dec 2020 20:27:34 -0500 Subject: [PATCH 5/5] Check zig formatting after running tests --- compiler/builtins/bitcode/run-tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/builtins/bitcode/run-tests.sh b/compiler/builtins/bitcode/run-tests.sh index 4f5d27715e..2892ba1f74 100755 --- a/compiler/builtins/bitcode/run-tests.sh +++ b/compiler/builtins/bitcode/run-tests.sh @@ -4,3 +4,6 @@ set -euxo pipefail # Test every zig find src/*.zig -type f -print0 | xargs -n 1 -0 zig test --library c + +# fmt every zig +find src/*.zig -type f -print0 | xargs -n 1 -0 zig fmt --check