ETscript – An experimental interpreter for Salesforce's AMPscript
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!
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
John Legere Listed as CEO of Salesforce
Learning Salesforce with Screencasts
Salesforce Summit Partner
Generate code out of salesforce object for easy integration
Do you hate salesforce?
AI Chatbot for Salesforce
A mock data generator for your Salesforce org.
Debug Salesforce code faster with intelligent browser tools
Easy webhooks for your SalesForce objects
Easy webhooks for your SalesForce objects