Header Ads

Show HN: ETscript – An experimental interpreter for Salesforce's AMPscript https://ift.tt/8n4UbvE

Show HN: ETscript – An experimental interpreter for Salesforce's AMPscript I wanted to take a break from JavaScript and learn a lower-level language. I've always been into musical instruments, so I thought I'd be knee-deep in C++ and building VST plugins by now. But for whatever reason, I ended up going through Robert Nystrom's excellent book, Crafting Interpreters instead. Things started out fine, but I had trouble staying focused since I was just copy-pasting code from the book. Forcing myself to type everything out made things worse. To give myself a challenge, I switched things up by using languages not used by the book. For the tree-walking interpreter, I used Python instead of Java; for the bytecode interpreter, it was Rust instead of C. Doing that made a difference. I didn't stop there, though. Instead of implementing clox (the main subject in the book's second half), I implemented a subset of AMPscript — a DSL I had used back when I worked at ExactTarget/Salesforce. Its domain is primarily email message personalization. Does this interpreter, that doesn't have a domain to operate in, have any use in the real world? No, not really (and it's still missing a garbage collector). But I think anyone curious enough to try it out will at least be able to get a feel for writing AMPscript (since Salesforce doesn't offer trial accounts for their Marketing Cloud product). Also, I'm really bad at bringing hobby projects to any type of conclusion. So as a final challenge, I decided my first "Show HN" would be that for this project. Feedback appreciated! https://ift.tt/BSgNJyG July 20, 2023 at 06:15PM

No comments

Powered by Blogger.