When you are a musician, every day is Xmas!
@toprakdeviren this sounds amazing, look forward to it!
@Migueldeicaza It is great fun for me to turn the passes you send my way into goals. I don't write very often so as not to disturb you, but I have a lot to learn from you.
@toprakdeviren oh would love to talk more often! Where do you hang out?
@Migueldeicaza For example, I originally wrote 33 frameworks for MiniSwift in C. But recently, I noticed that the Swift Toolchain actually generates high-quality C code.
So now, I write the libraries in pure Swift and run them through the MiniSwift toolchain's codegen to transpile them into C.
My first question here is: did you experience a similar evolution with Mono?
I know it might seem premature, but I deliberately took this path.
@toprakdeviren swift generates C? How is that possible?
@Migueldeicaza MiniSwift takes Swift code and processes it through standard lexer and parser stages, then generates an IR
After generating the IR, if it is running on the web, it converts it into Wasm opcodes; this is what allows the code to execute immediately as you type it on miniswift.run.
On the native side, the `ir_to_c` component processes all Swift files using a "whole-module" approach and converts them into a single C file.
@toprakdeviren I played earlier today with it, and it was so much fun. The compile time is the slightly annoying part. A great candidate for miniswift
@Migueldeicaza I'm going to compile this for web, Linux, and Windows using miniswift ;-)