Date: Mon, 29 Jun 2020 20:00:00 -0400
<div class="wp-block-jetpack-markdown"><h3>Summary</h3> <p>Programming languages are a powerful tool and can be used to create all manner of applications, however sometimes their syntax is more cumbersome than necessary. For some industries or subject areas there is already an agreed upon set of concepts that can be used to express your logic. For those cases you can create a Domain Specific Language, or DSL to make it easier to write programs that can express the necessary logic with a custom syntax. In this episode Igor Dejanović shares his work on textX and how you can use it to build your own DSLs with Python. He explains his motivations for creating it, how it compares to other tools in the Python ecosystem for building parsers, and how you can use it to build your own custom languages.</p> <h3>Announcements</h3> <ul> <li>Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.</li> <li>When you’re ready to launch your next app or want to try a project you hear about on the show, you’ll need somewhere to deploy it, so take a look at our friends over at Linode. With the launch of their managed Kubernetes platform it’s easy to get started with the next generation of deployment and scaling, powered by the battle tested Linode platform, including simple pricing, node balancers, 40Gbit networking, dedicated CPU and GPU instances, and worldwide data centers. Go to <a href="https://www.pythonpodcast.com/linode?utm_source=rss&utm_medium=rss">pythonpodcast.com/linode</a> and get a $60 credit to try out a Kubernetes cluster of your own. And don’t forget to thank them for their continued support of this show!</li> <li>You listen to this show to learn and stay up to date with the ways that Python is being used, including the latest in machine learning and data analysis. For more opportunities to stay up to date, gain new skills, and learn from your peers there are a growing number of virtual events that you can attend from the comfort and safety of your home. Go to <a href="https://www.pythonpodcast.com/conferences?utm_source=rss&utm_medium=rss">pythonpodcast.com/conferences</a> to check out the upcoming events being offered by our partners and get registered today!</li> <li>Your host as usual is Tobias Macey and today I’m interviewing Igor Dejanović about textX, a meta-language for building domain specific languges in Python</li> </ul> <h3>Interview</h3> <ul> <li>Introductions</li> <li>How did you get introduced to Python?</li> <li>Can you start by describing what a domain specific language is and some examples of when you might need one?</li> <li>What is textX and what was your motivation for creating it?</li> <li>There are a number of other libraries in the Python ecosystem for building parsers, and for creating DSLs. What are the features of textX that might lead someone to choose it over the other options?</li> <li>What are some of the challenges that face language designers when constructing the syntax of their DSL?</li> <li>Beyond being able to parse and process an arbitrary syntax, there are other concerns for consumers of the definition in terms of tooling. How does textX provide support to those end users?</li> <li>How is textX implemented? <ul> <li>How has the design or goals of textX changed since you first began working on it?</li> </ul> </li> <li>What is the workflow for someone using textX to build their own DSL? <ul> <li>Once they have defined the grammar, how do they distribute the generated interpreter for others to use?</li> </ul> </li> <li>What are some of the common challenges that users of textX face when trying to define their DSL?</li> <li>What are some of the cases where a PEG parser is unable to unambiguously process a defined grammar?</li> <li>What are some of the most interesting/innovative/unexpected ways that you have seen textX used?</li> <li>What have you found to be the most interesting, unexpected, or challenging lessons that you have learned while building and maintaining textX and its associated projects?</li> <li>While preparing for this interview I noticed that you have another parser library in the form of Parglare. How has your experience working with textX informed your designs of that project? <ul> <li>What lessons have you taken back from Parglare into textX?</li> </ul> </li> <li>When is textX the wrong choice, and someone might be better served by another DSL library, different style of parser, or just hand-crafting a simple parser with a regex?</li> <li>What do you have planned for the future of textX?</li> </ul> <h3>Keep In Touch</h3> <ul> <li><a href="http://www.igordejanovic.net/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Website</a></li> <li><a href="https://github.com/igordejanovic?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">igordejanovic</a> on GitHub</li> <li><a href="https://twitter.com/dejanovicigor?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">@dejanovicigor</a> on Twitter</li> </ul> <h3>Picks</h3> <ul> <li>Tobias <ul> <li><a href="https://wemake-python-stylegui.de/en/latest/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">wemake-python-styleguide</a></li> </ul> </li> <li>Igor <ul> <li><a href="https://en.wikipedia.org/wiki/Interactive_fiction?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Interactive Fiction genre</a> <ul> <li><a href="https://github.com/tajmone/awesome-interactive-fiction?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Awesome Interactive Fiction</a></li> <li><a href="https://ifdb.tads.org/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">The Interactive Fiction Database</a></li> <li><a href="https://www.tads.org/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">TADS</a></li> <li><a href="http://inform7.com/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Inform 7</a></li> </ul> </li> </ul> </li> </ul> <h3>Closing Announcements</h3> <ul> <li>Thank you for listening! Don’t forget to check out our other show, the <a href="https://feeds.fireside.fm/pythonpodcast/rss">Data Engineering Podcast</a> for the latest on modern data management.</li> <li>Visit the <a href="https://www.pythonpodcast.com?utm_source=rss&utm_medium=rss">site</a> to subscribe to the show, sign up for the mailing list, and read the show notes.</li> <li>If you’ve learned something or tried out a project from the show then tell us about it! Email <a href="mailto:hosts@podcastinit.com">hosts@podcastinit.com</a>) with your story.</li> <li>To help other people find the show please leave a review on <a href="https://itunes.apple.com/us/podcast/podcast.-init/id981834425?mt=2&uo=6&at=&ct=&utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">iTunes</a> and tell your friends and co-workers</li> <li>Join the community in the new Zulip chat workspace at <a href="https://www.pythonpodcast.com/chat?utm_source=rss&utm_medium=rss">pythonpodcast.com/chat</a></li> </ul> <h3>Links</h3> <ul> <li><a href="http://textx.github.io/textX/stable/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">textX</a></li> <li><a href="http://www.uns.ac.rs/index.php/en/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">U of Novi Sad</a></li> <li><a href="https://en.wikipedia.org/wiki/Serbia?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Serbia</a></li> <li><a href="http://www.igordejanovic.net/courses/jsd.html?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">DSL course</a></li> <li><a href="https://dl.acm.org/doi/abs/10.1145/203241.203251?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Secondary Notation</a></li> <li><a href="https://www.djangoproject.com/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Django</a></li> <li><a href="http://www.eclipse.org/Xtext/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Xtext</a></li> <li><a href="http://www.eclipse.org/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Eclipse</a></li> <li><a href="http://www.dabeaz.com/ply/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">PLY</a></li> <li><a href="https://github.com/dabeaz/sly?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">SLY</a></li> <li><a href="https://github.com/pyparsing/pyparsing?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">PyParsing</a></li> <li><a href="https://github.com/lark-parser/lark?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Lark</a></li> <li><a href="https://en.wikipedia.org/wiki/Parsing_expression_grammar?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">PEG Grammar</a></li> <li><a href="https://en.wikipedia.org/wiki/Language_workbench?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Language Workbench</a></li> <li><a href="https://microsoft.github.io/language-server-protocol/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Language Server Protocol</a></li> <li><a href="https://code.visualstudio.com/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Visual Studio Code</a></li> <li><a href="https://github.com/textX/textX-LS?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">textX-LS</a></li> <li><a href="https://github.com/textX/Arpeggio?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Arpeggio Parser</a></li> <li><a href="https://en.wikipedia.org/wiki/Context-free_grammar?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Context-Free Grammar</a></li> <li><a href="https://github.com/E2Music/pyTabs?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">pyTabs</a></li> <li><a href="https://en.wikipedia.org/wiki/Tablature#Guitar_tablature?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Guitar Tablatures</a></li> <li><a href="https://github.com/igordejanovic/parglare?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Parglare</a></li> <li><a href="https://en.wikipedia.org/wiki/GLR_parser?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">GLR parsing</a></li> <li><a href="https://github.com/textX/textX/wiki/Reference-resolving-expression-language-(RREL)?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">TEP 1</a></li> <li><a href="http://www.evennia.com/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Evennia</a> <ul> <li><a href="https://www.pythonpodcast.com/episode-24-griatch-on-evennia/?utm_source=rss&utm_medium=rss">Podcast Episode</a></li> </ul> </li> </ul> <p>The intro and outro music is from Requiem for a Fish <a href="http://freemusicarchive.org/music/The_Freak_Fandango_Orchestra/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">The Freak Fandango Orchestra</a> / <a href="http://creativecommons.org/licenses/by-sa/3.0/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">CC BY-SA</a></p> </div> <img alt="" height="0" src="https://analytics.boundlessnotions.com/piwik.php?idsite=1&rec=1&url=https%3A%2F%2Fwww.pythonpodcast.com%2Ftextx-domain-specific-language-episode-269%2F&action_name=Build+Your+Own+Domain+Specific+Language+in+Python+With+textX+-+Episode+269&urlref=https%3A%2F%2Fwww.pythonpodcast.com%2Ffeed%2F&utm_source=rss&utm_medium=rss" style="border: 0; width: 0; height: 0;" width="0" />