Team 5 new language design - #15
Conversation
c838e32 to
a2f0f68
Compare
|
Code Review From @cchels @395110n @yw5490
|
cebec61 to
42d74a5
Compare
| ); | ||
|
|
||
| // Define a build configuration for compiling "hello.c" into object files. | ||
| auto build1 = build(list(str("hello.o"), str("hello2.o")), |
There was a problem hiding this comment.
For build1, build2 and build3, these names are generic and do not convey the purpose of the builds. Consider renaming them to reflect the specific target, like buildHelloObjects.
| std::string value_; | ||
| }; | ||
|
|
||
| Token operator"" _l(const char* value, std::size_t len) { |
There was a problem hiding this comment.
For operator"" _l and operator"" _v, while these are clever, the naming might not be immediately clear to someone unfamiliar with the codebase. Consider adding inline comments explaining what these operators do, or using more expressive suffixes than _l and _v.
|
Code Review From @cchels @395110n @yw5490
|
| public: | ||
| ShadowDash_(std::vector<build> builds) : builds(builds), pools({}), default_({}) {} | ||
| ShadowDash_(std::vector<build> builds, std::vector<pool> pools) : builds(builds), pools(pools), default_({}) {} | ||
| ShadowDash_(std::vector<build> builds, std::vector<pool> pools, shadowdash_default default_) : builds(builds), pools(pools), default_({default_}) {} |
There was a problem hiding this comment.
This line is too long, should split this line into two.
kyotov
left a comment
There was a problem hiding this comment.
take a look at https://docs.google.com/document/d/11e8zR3kcm7B-D6brAH_D4OgtYBEf94GZwQIXrnti5hM/edit?tab=t.0 and see if you are missing any of those. then let me know to look again.
this looks "ok" but i get lost in it a bit.
notably design doc / cleaner api could help?
There was a problem hiding this comment.
this new language design is an old version, i.e. very first version of the new language. In this version, we are still doing the graph construction in ninja, and only let shadowdash manifest constructs the build object. So the manifest.h is required by both manifest.cc and ninja, which is the reason I am using symlink here.
The newest language design already moved the entire graph construction into the manifest, so ninja no longer require manifest.h and this symlink could go away
update manifest Add comments and documentation to shadowdash_manifest.h & manifest_example.cc added documentation for shadowdash
42d74a5 to
4558c50
Compare
|
Update: added a document under Honestly, I feel like new language design is something that is not supposed to happen at this stage of development, or at least a carefully, comprehensive new language design that we spent a lot of times on it. The main reason is that, I believe shadowdash would prioritize performance over usability (i.e. user experience), but when designing a new language as a seperate module without integrating into a fully working shadowdash, like what we did here, we are not able to measure the performance, and thus our new language design is basically purely based on usability. This become an issue when we are trying to really integrate the new language into the backend, that our current new language design might be really bad in performance and requires us to re-design the new language to make the compilation/runtime faster. In our newest shadowdash demo, this is exactly what is happening, that our newest new language design that gains most performance benefits is much more different from the original one that is proposed in this PR, as we have integrated tricks like string variable pre-defining, multiple build constructor for different build object combination, manifest file spliting, etc. And I believe our new language design would be even more different as we move forward to apply more tricks to resolve performance issue. This involves very frequently change of new language design and I believe it would be a waste of time to try to fully document each version and design things for usability since many of the stuff might go away very fast as more iterations on new language design happens. The way I believe makes more sense to me for new language design, is that, we first propose a minimal version of new language design that could just work, then we can focus more on optimizing the performance of the compilation and runtime, which might involves significant change of the new language design. After all the performance tricks are consolidated and we got the performance we might want, and we can probably release the version, we can then start working on the usability part of the new language design and try to make the new language design that is maximized in performance more user friendly and well documented for people to use. |
|
Moved to #31 |
This PR addresses the new language design task for Team 5.
Our team’s new language design has already been integrated into our Shadowdash application rather than existing as an independent design, which is therefore restricted by a few practical challenges: