question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`walt-sugar` package

See original GitHub issue

Feature Request

Overview

walt started as a Javascript-like “assembler” language for WebAssembly, in the way that it would only expose the WebAssembly bytecode as Javascript functions, allowing to program low-level code using a high-level language (sort-of).

Over the time, it has started to get some discussions about sugar syntax and high-level features, like Strings or literal objects. These are nice additions to be able to use, but are abstraction layers that don’t directly map 1-to-1 to WebAssembly bytecodes. Since we are using here a lerna monorepo, I propose to split this sugar syntax and high-level features to a separate package walt-sugar to have both concepts isolated, implementing the high-level sugar using the low-level functions as building blocks. Alternatively, instead of separate the high level sugar, we could move out the low-level to a walt-assembler package that does only the 1-to-1 mapping of WebAssembly bytecode… or maybe both things, being walt-compiler just only a translator 😃

Impact

Medium. Need to create new packages and split code, but later concepts would be isolated and layered and easier to understand what’s WebAssembly core and what not.

Due Date

2018-04-03

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ballercatcommented, Aug 17, 2018

For anyone still following along, a major part of this effort has just been completed. Which is nice. It was an interesting challenge to modularize the compiler(at least the semantics parser for now) by feature. The core semantic parser is now completely split by feature and the compiler retained full feature parity.

All in all, this is/was a very good idea. This type of feature separation should pay off in the long term. Core features plus syntax-sugar(like closures) are all implemented as composable “plugins”. The nice benefit of this approach is that it makes the syntax infinitely extendable, very similar to how JS is extendable through Babel.

For this to be “complete” it’ll take a bunch of refactoring and moving of shared “parser utility” logic, plus ways to test syntax-sugar features in isolation etc. Not to mention the documenting all of the utils which used to be private to the compiler implementation + how to write a plugin.

Oh, and the changes would also require a major version bump to 1.0 (even though still alpha) as it’ll change the public APIs without being backwards compatible. This might be avoidable but unlikely.

Anywyas, good stuff.

2reactions
ballercatcommented, Mar 21, 2018

Yeah, maybe the problem here is to decide how to allow to do that integration…

Yup, the how is the difficult part 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enjoying a little maple taffy this afternoon Featured in our “Full Flat ...
Featured in our “Full Flat Experience” package, you too ... सायद 'WALT SUGAR SHACK' भन्ने पाठ को फोटो हुनसक्छ ...
Read more >
10th Terroir Run - May 2022 RUNNERS REGISTRATION
... a package of PEC Lavender Tea from Pluck Teas, a custom t-shirt, ... maple syrup from Walt's Sugar Shack, Sprauge baked beans, ......
Read more >
Testimonials - Embroidery Uniquely Yours in Picton ON
Wendy and her team are very friendly and helpful too, making them the total package. We recommend them to everyone. ... Walt's Sugar...
Read more >
Kitchen Tool 3PC / Set Spice Storage Tins Bamboo Rack ...
... Tool 3PC / Set Spice Storage Tins Bamboo Rack Ceramic Jars Spoons for Walt Sugar Pepper Mum Gift Enjoy ✓Free Shipping Worldwide!...
Read more >
Walt's Sugar Shack Shindig - Trenton MFRC
Admission and activities are free but you'll want to bring cash for a delicious lunch or dinner! What's on the menu? Lunch -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found