Jedi Code Completion with David Halter

The Python Podcast.__init__

Episode | Podcast

Date: Sat, 10 Jun 2017 22:00:00 -0400

<h3>Summary</h3> <p>When you&#8217;re writing python code and your editor offers some suggestions, where does that suggestion come from? The most likely answer is Jedi! This week David Halter explains the history of how the Jedi auto completion library was created, how it works under the hood, and where he plans on taking it.</p> <h3>Preface</h3> <ul> <li>Hello and welcome to Podcast.&#95;&#95;init&#95;&#95;, the podcast about Python and the people who make it great.</li> <li>I would like to thank everyone who supports us on <a href="https://www.pythonpodcast.com/podcastinit?utm_source=rss&amp;utm_medium=rss">Patreon</a>. Your contributions help to make the show sustainable.</li> <li>When you&#8217;re ready to launch your next project you&#8217;ll need somewhere to deploy it. Check out Linode at <a href="https://www.pythonpodcast.com/linode?utm_source=rss&amp;utm_medium=rss">www.podastinit.com/linode?utm_source=rss&amp;utm_medium=rss</a> and get a $20 credit to try out their fast and reliable Linux virtual servers for running your awesome app.</li> <li>Visit the <a href="https://www.pythonpodcast.com?utm_source=rss&amp;utm_medium=rss">site</a> to subscribe to the show, sign up for the newsletter, read the show notes, and get in touch.</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&amp;uo=6&amp;at=&amp;ct=&amp;utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">iTunes</a>, or <a href="https://play.google.com/music/m/I7ogju4xv6adasgqz6545jndgsy?t=Podcastinit_-_Python_and_the_people_who_make_it_great&amp;utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Google Play Music</a>, tell your friends and co-workers, and share it on social media.</li> <li>Your host as usual is Tobias Macey and today I&#8217;m interviewing David Halter about Jedi, an awesome autocompletion and static analysis library for Python</li> </ul> <h3>Interview</h3> <ul> <li>Introductions</li> <li>How did you get introduced to Python?</li> <li>Can you explain what Jedi is and what problem you were trying to solve when you created it? <ul> <li>What is the story behind the name?</li> </ul> </li> <li>While reading through the documentation I noticed that there is alpha support for linting with Jedi. Can you compare the linting approach and capabilities with those found in other tools such as pylint and flake8?</li> <li>What does the internal architecture and design look like?</li> <li>From the research that I did for the show it seems that, rather than use the AST to determine the structure of the code being completed you built your own parser and recursive evaluation of the other methods that you use for determining accurate completion? <ul> <li>What was lacking in existing parsers that led you to build your own?</li> <li>What are some of the difficulties that you have encountered building and maintaining the grammar definitions and higher level API for parsing multiple versions of Python, including the 2 vs 3 split?</li> </ul> </li> <li>What are some of the biggest challenges associated with introspecting user code?</li> <li>What are some of the ways that Jedi can be confounded by a user&#8217;s project?</li> <li>What are some of the most difficult technical hurdles that you have been faced with while building Jedi?</li> <li>What are some unusual or unexpected uses of Jedi that you have seen?</li> <li>What do you have planned for the future of Jedi?</li> </ul> <h3>Keep In Touch</h3> <ul> <li><a href="https://github.com/davidhalter?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">davidhalter</a> on GitHub</li> <li><a href="https://twitter.com/jedidjah_ch?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">@jedidjahch</a> on Twitter</li> </ul> <h3>Picks</h3> <ul> <li>Tobias <ul> <li><a href="https://linux.die.net/man/1/patch?utmsource=rss&amp;utmmedium=rss" rel="noopener" target="blank">Patch utility</a></li> </ul> </li> <li>David <ul> <li><a href="https://www.bearsdenmusic.co.uk/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Bears Den</a></li> <li><a href="https://en.wikipedia.org/wiki/Association_football?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Soccer</a></li> <li><a href="https://en.wikipedia.org/wiki/Singing?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Singing</a></li> <li><a href="https://en.wikipedia.org/wiki/Dance?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Dancing</a></li> <li><a href="http://docopt.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">DocOpt</a></li> <li><a href="https://www.openstack.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">OpenStack</a></li> </ul> </li> </ul> <h3>Links</h3> <ul> <li><a href="https://www.cloudscale.ch/en/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Cloudscale.ch</a></li> <li><a href="http://www.vim.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Vim</a></li> <li><a href="http://valloric.github.io/YouCompleteMe/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Youcompleteme</a></li> <li><a href="https://github.com/Shougo/neocomplete.vim?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Neocomplete</a></li> <li><a href="https://github.com/PyCQA/pyflakes?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">pyflakes</a></li> <li><a href="https://github.com/PyCQA/pycodestyle?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">pycodestyle</a></li> <li><a href="https://www.pylint.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">pylint</a></li> <li><a href="https://en.wikipedia.org/wiki/Compiler-compiler?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Parser Generator</a></li> <li><a href="https://www.tutorialspoint.com/compiler_design/compiler_design_error_recovery.htm?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Parser Error Recovery</a></li> <li><a href="https://github.com/python/cpython/tree/master/Lib/lib2to3?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">lib2to3</a></li> <li><a href="https://docs.python.org/3/reference/grammar.html?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Python grammar file</a></li> <li><a href="https://en.wikipedia.org/wiki/Finite-state_machine?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Finite state automata</a></li> <li><a href="https://en.wikipedia.org/wiki/Type_inference?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Type inference</a></li> <li><a href="https://github.com/google/yapf?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">yapf</a></li> <li><a href="https://docs.python.org/3/library/ast.html?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">AST module</a></li> <li><a href="http://www.mypy-lang.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">MyPy</a></li> <li><a href="https://ipython.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">IPython</a></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&amp;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&amp;utm_medium=rss" rel="noopener" target="_blank">CC BY-SA</a><img alt="" height="0" src="https://analytics.boundlessnotions.com/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fwww.pythonpodcast.com%2Fepisode-113-jedi-code-completion-with-david-halter%2F&amp;action_name=Jedi+Code+Completion+with+David+Halter+-+Episode+113&amp;urlref=https%3A%2F%2Fwww.pythonpodcast.com%2Ffeed%2F&amp;utm_source=rss&amp;utm_medium=rss" style="border: 0; width: 0; height: 0;" width="0" /></p>