Many people say that #Rust is very hard to #prototype with or to #refactor. This couldn't be further from the truth! It is the exact opposite!
Let me share with you one of the most profound experiences I had with #RustLang on a casual sunday - a thread 🧵
I'm currently rewriting my #transpiler from #nom to #chumsky and until now everything has turned out great so far, until I've hit the following road block:
Implementing parsers by using #parser functions that have indirect #recursion.
Today's #ReleaseSunday features a major update for the https://thi.ng/meta-css toolchain, a data-driven codegen for creating custom modular CSS frameworks, incl. transpiler, bundler, dev/watch mode...
The new version supports callable parametric templates, which not only help to reduce the overall API surface (i.e. the total number of rules) of a generated CSS framework, but also enable advanced operations like those shown in the attached images (e.g. declarations of CSS color variables (in rgb, hsl, lch, or oklch modes) and pure CSS color per-color-channel adjustments...).
Also new, is added support for documentation metadata for all generative CSS class & template specs (incl. template params). Parts of the readme are generated from these embedded docs and the next version will include a new CLI command to generate Markdown files from/for these CSS docs...
The readme for this package is already pretty detailed by now and should cover most important patterns and usage (incl. the new template features). Take a look (also the examples linked from the readme)!
Currently in the process of rewriting my #transpiler from #nom v4.2 to #chumsky v1.0.0-alpha.6 🤓
It is a lot of fun so far, but I have to say these type signatures are wild!😄
I'm still struggling with it far more than I'd like, but I guess it is just a matter of time until intuition kicks in and it will become more and more natural.
Exciting project ahead!🙂
I'm even able to parse string literals with escape sequences - something I haven't even achieved with nom!
The feeling when you bang your head against the wall for 3 hours and then just try something, but don't really believe in it and suddenly all your unit tests pass! 🎉 :awesome:
This is the beauty of #TestDrivenDevelopment - you can just try and guess until it works.😄 It's such a funny experience!
I've built a #transpiler in #Rust, compiled it to #WASM and integrated it into a #Vue app! :awesome:
It's called selecuery.✨
It can transpile X++ select statements into query expressions. If you think "X++" is a typo and you don't have any idea of what I'm talking about, don't worry.😄
Have a look at the video below.
This project is dear to my heart! ❤️ I've started it 2019 for learning #RustLang.
I think, I've been transpiled during this project as well.🤪