-
Notifications
You must be signed in to change notification settings - Fork 120
DMP'25 Week 11-12 blog update by final report by Justin Charles #436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| --- | ||
| title: "DMP’25 Week 11–12 Update by Justin Charles" | ||
| excerpt: "Parsing the tree: building the AST pipeline to connect Masonry’s brick towers with the Program execution layer" | ||
| category: "DEVELOPER NEWS" | ||
| date: "2025-09-31" | ||
| slug: "2025-09-31-dmp-25-justin212407-week11-12" | ||
| author: "@/constants/MarkdownFiles/authors/justin-charles.md" | ||
| tags: "dmp25,sugarlabs,week11,week12,ast,justin212407" | ||
| image: "assets/Images/c4gt_DMP.webp" | ||
| --- | ||
|
|
||
| <!-- markdownlint-disable --> | ||
|
|
||
| # Week 11–12 Progress Report by Justin Charles | ||
|
|
||
| **Project:** Music Blocks 4 Masonry | ||
| **Mentors:** [Anindya Kundu](https://github.com/meganindya/), [Sumit Srivastava](https://github.com/sum2it) | ||
| **Assisting Mentors:** [Devin Ulibari](https://github.com/pikurasa/), [Walter Bender](https://github.com/walterbender) | ||
| **Reporting Period:** 2025-09-18 – 2025-09-31 | ||
|
||
|
|
||
| --- | ||
|
|
||
| ## Parsing the Tree: Connecting Masonry and the Program | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I recommend adding a few sentences adding some context, not just bullets. Tell us what this is about and why it's important.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done .... ptal |
||
| ### B1. Hardcoded Tower for Bootstrapping | ||
| - Built large sample towers (30–40 bricks) directly in the workspace. | ||
| - Covered **sequences, compounds (loops/conditionals with sockets), expressions, and mixed music/movement/system bricks** to stress-test the parser. | ||
|
|
||
| ### B2. BrickTree with Stable IDs | ||
| - Every brick receives a unique, stable `BrickId` generated once. | ||
| - Types and props aligned with the shared registry, ensuring IDs in Masonry match AST node IDs in the Program. | ||
|
|
||
| ### B3. Shared Registry / Config | ||
| - Created a **single source of truth** for all brick types. | ||
| - Defined form (simple/compound/expression), AST kind, sockets, and prop mappings. | ||
| - Guaranteed Masonry ↔ Program semantics don’t drift. | ||
|
|
||
| --- | ||
|
|
||
| ## Challenges & Solutions | ||
|
|
||
| - **Challenge:** Keeping IDs consistent between Masonry and Program | ||
| **Solution:** Stable ID generation and registry enforcement ensured 1:1 mapping | ||
|
|
||
| - **Challenge:** Handling nested compounds and socketed children | ||
| **Solution:** Recursive parsing with explicit socket assignments | ||
|
|
||
| --- | ||
|
|
||
| ## Key Learnings | ||
|
|
||
| - Stable IDs are the backbone of reliable AST ↔ Program integration | ||
| - A shared registry prevents semantic drift between UI and execution | ||
| - Validating early gives far better developer/user feedback | ||
|
|
||
| --- | ||
|
|
||
| ## Next Steps | ||
|
|
||
| - Validate the tree before running. | ||
| - Translate tree to AST deterministically | ||
| - Register the plug ins needed by the towers | ||
|
|
||
| --- | ||
|
|
||
| ## Resources | ||
|
|
||
| - [musicblocks-v4 Repository](https://github.com/sugarlabs/musicblocks-v4) | ||
| - [Documentation for AST compilation](https://docs.google.com/document/d/1C0t4iSze2eDEv6lWbloK3MnvJgAa6HvmXmk2sQ0lCZs/edit?tab=t.r7v91obun4vn#heading=h.gywsry3tia37) | ||
|
|
||
| --- | ||
|
|
||
| ## Acknowledgments | ||
|
|
||
| Thanks to my mentors for their guidance through this milestone: bridging Masonry’s visual towers with actual program execution. | ||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this dated in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i might have messed up that part before with the month ... fixed it