Closed argoopjmc closed 1 year ago
Great idea, will set up a discord channel to kick things off.
I'm new to writing compilers so it will take me some time to learn things like targeting llvm, etc - but I was planning on starting by writing an AST parser, type checking and borrow checking prior to compilation.
By the time it's done I'll hopefully know enough about llvm to know how to target it, or just go with a less sophisticated approach of code to code compilation to C then use gcc to compile the program.
That sounds like a plan! Let us know when we join and help out.
I've been hearing a lot about MLIR lately - I came across this video, which provides a basic overview of MLIR and LLVM. 🙂
Brainspin: with WASM and WASI growing and maturing, can't we just compile to WebAssembly?
Yeah, I have been wondering about the same thing. 🤔
Basically, WASM + SIMD + threads = FAST
It might be relatively easier to target WASM than LLVM or MLIR?
Although perhaps with SIMD it's now just as hard to generate optimized WASM?
Sorry I keep dropping off on this project - I have been going away studying how I could approach it. I have spent some time learning LLVM IR and I think it's entirely rational to target LLVM from the get go (rather than my previously proposed BS -> C++ transpiler).
A lot of the language syntax makes sense except the way lifetimes are designed and there is nothing on how "unsafe" will be applied syntactically.
That said, it doesn't stop the ability for me to start writing some of the more basic features, like a hello world application.
Once the language compiler starts moving forward, there will be the big task of the standard library and tooling.
Have you decided how you want to build the compiler for BorrowScript? I think at this point, we have a basic specification for the language so some of us interested in the project can start coming up with a test suite of valid and invalid source files for the language, along with discussing and setting up the basic infrastructure for the compiler ( parsing and code generation).
I think it would be a great idea to have a Discord/Slack for this project where people can join, discuss and work together on making this project a reality.