Merge remote-tracking branch 'origin/trunk' into zig-str-concat

This commit is contained in:
Richard Feldman 2020-12-01 21:49:43 -05:00
commit a9d4b38e44
4 changed files with 16 additions and 5 deletions

View file

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
set -eux set -euxo pipefail
# Test every zig # 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
# fmt every zig
find src/*.zig -type f -print0 | xargs -n 1 -0 zig fmt --check

View file

@ -2050,8 +2050,6 @@ pub fn allocate_list<'a, 'ctx, 'env>(
let len_type = env.ptr_int(); let len_type = env.ptr_int();
let elem_bytes = elem_layout.stack_size(env.ptr_bytes) as u64; let elem_bytes = elem_layout.stack_size(env.ptr_bytes) as u64;
let bytes_per_element = len_type.const_int(elem_bytes, false); let bytes_per_element = len_type.const_int(elem_bytes, false);
// dbg!(bytes_per_element, length);
let number_of_data_bytes = builder.build_int_mul(bytes_per_element, length, "data_length"); let number_of_data_bytes = builder.build_int_mul(bytes_per_element, length, "data_length");
let rc1 = match inplace { let rc1 = match inplace {

View file

@ -565,7 +565,7 @@ mod gen_list {
pi : F64 pi : F64
pi = 3.14 pi = 3.14
single : List Float single : List F64
single = single =
[ 0 ] [ 0 ]

View file

@ -62,6 +62,16 @@ These are potentially inspirational resources for the editor's design.
* Excel and Google Sheets * Excel and Google Sheets
* Not sure, maybe something they do well that we (code editors) could learn from * 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 ## General Thoughts/Ideas
Thoughts and ideas possibly taken from above inspirations or separate. Thoughts and ideas possibly taken from above inspirations or separate.