GET /api/v2/video/1037
HTTP 200 OK Vary: Accept Content-Type: text/html; charset=utf-8 Allow: GET, PUT, PATCH, HEAD, OPTIONS
{ "category": "EuroPython 2011", "language": "English", "slug": "pypy-hands-on", "speakers": [ "Antonio Cuni", "Armin Rigo" ], "tags": [ "cd", "cpython", "extensions", "hg", "jit", "optimize", "pypy", "setup.py", "tutorial" ], "id": 1037, "state": 1, "title": "PyPy hands-on", "summary": "[EuroPython 2011] Antonio Cuni,Armin Rigo - 21 June 2011 in \"Training Pizza\nMargherita\"\n\n", "description": "The session is divided into two parts, of roughly 2 hours each. People who are\ninterested only in the first part, can leave the session after it. However,\nthe first part is a prerequisite for the second one, thus people are not\nadvised to join in the middle of the session.\n\nThe session is meant to be highly interactive. People are invited to bring\ntheir own laptop and try things by themselves.\n\n## Part 1: Run your application under PyPy\n\nThis tutorial is targeted to Python users who want to run their favorite\nPython application under PyPy, and exploit the most of it. The following\ntopics will be covered:\n\n \n - how to fix/avoid CPython implementation details (e.g., refcounting)\n \n - general overview of how the PyPy JIT works\n \n - how to optimize your program for the PyPy JIT\n \n - how to view and interpret the traces produced by the JIT\n \n - how to tweak the parameters of the JIT and the GC\n \n - how to use existing CPython C extensions on PyPy, and fix them if necessary\n \n\n## Part 2: Write your own interpreter with PyPy\n\nPyPy is not only a Python interpreter, but also a toolchain to implement\ndynamic languages. This tutorial is targeted to people who want to implement\ntheir own programming languages, or who simply want to know more about how the\nPyPy JIT works internally.\n\nThe students will be given the source code for a toy language implemented in\nRPython. They will learn:\n\n \n - how to translate it to C using the PyPy translation toolchain\n \n - what are the \"hints\" needed by the JIT generator, and how to place them\n \n\nThen, they will be challenged to add the proper hints to the toy interpreter,\nto get the best result with the JIT.\n\n**THINGS TO DO BEFORE THE TRAINING**\n\nYou are encouraged to bring your laptop to the training session.\n\nMake sure that the following prerequisites are met:\n\n * Install PyPy 1.5:\n\n * [http://pypy.org/download.html](http://pypy.org/download.html)\n\n * [http://doc.pypy.org/en/latest/getting-started.html#installing-pypy](http://doc.pypy.org/en/latest/getting-started.html#installing-pypy)\n\n * Make sure that `setuptools` or `distribute` are installed (look at the URL above for instructions)\n\n * Clone the pypy repository, and update to the 1.5 version::\n\n$ hg clone [http://bitbucket.org/pypy/pypy](http://bitbucket.org/pypy/pypy)\n\n$ cd pypy\n\n$ hg up -r release-1.5\n\n * Clone the jitviewer repository and install it on pypy::\n\n$ hg clone\n[http://bitbucket.org/pypy/jitviewer](http://bitbucket.org/pypy/jitviewer)\n\n$ cd jitviewer\n\n$ /path/to/pypy-1.5/bin/pypy setup.py develop\n\nIf you intend to follow also the second part (\"Write your own interpreter with\nPyPy\"), you need to make sure you have a working [developing\nenvironment](http://doc.pypy.org/en/latest/getting-started-python.html\n#translating-the-pypy-python-interpreter)\n\n", "quality_notes": "", "copyright_text": "Standard YouTube License", "embed": "<object width=\"640\" height=\"390\"><param name=\"movie\" value=\"http://youtube.com/v/qcqEAE4QoeA?version=3&amp;hl=en_US\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://youtube.com/v/qcqEAE4QoeA?version=3&amp;hl=en_US\" type=\"application/x-shockwave-flash\" width=\"640\" height=\"390\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed></object>", "thumbnail_url": "http://i.ytimg.com/vi/qcqEAE4QoeA/hqdefault.jpg", "duration": null, "video_ogv_length": null, "video_ogv_url": null, "video_ogv_download_only": false, "video_mp4_length": null, "video_mp4_url": null, "video_mp4_download_only": false, "video_webm_length": null, "video_webm_url": null, "video_webm_download_only": false, "video_flv_length": null, "video_flv_url": null, "video_flv_download_only": false, "source_url": "http://www.youtube.com/watch?v=qcqEAE4QoeA", "whiteboard": "", "recorded": "2011-07-21", "added": "2012-08-30T21:02:13", "updated": "2014-04-08T20:28:27.750" }