Armin Rigo - CFFI: calling C from Python
Armin Rigo - CFFI: calling C from Python
[EuroPython 2016]
[20 July 2016]
[Bilbao, Euskadi, Spain]
(https://ep2016.europython.eu//conference/talks/cffi-calling-c-from-python)
In this talk, we will see an intro to CFFI, an alternative to using
the standard C API to extend Python. CFFI works on CPython and on
PyPy. It
is a possible solution to a problem that hits notably PyPy --- the
CPython C API.
The CPython C API was great and contributed to the present-day success
of Python, together with tools built on top of it like Cython and SWIG.
I will argue that it may be time to look beyond it, and present CFFI as
such an example.
-----
I will introduce CFFI, a way to call C libraries from Python.
http://cffi.readthedocs.org/
CFFI was designed in 2012 to get away from Python's C extension modules,
which require hand-written CPython-specific C code. CFFI is arguably
simpler to use: you call C from Python directly, instead of going
through an intermediate layer. It is not tied to CPython's internals,
and works natively on two different Python implementations: CPython and
PyPy. It could be ported to more implementations.
It is also a big success, according to the download statistics. Some
high-visibility projects like Cryptography have switched to it.
Part of the motivation for developing CFFI is that it is a minimal layer
that allows direct access to C from Python, with no fixed intermediate C
API. It shares ideas from Cython, ctypes, and LuaJIT's ffi, but the
non-dependence on any fixed C API is a central point.
It is a possible solution to a problem that hits notably PyPy --- the
CPython C API. The CPython C API was great and, we can argue, it
contributed a lot to
the present-day success of Python, together with tools built on top of
it like Cython and SWIG. However, it may be time to look
beyond it. This talk will thus present CFFI as such an example.
This independence is what lets CFFI work equally well on CPython and
on PyPy (and be very fast on the latter thanks to the JIT compiler).
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Armin Rigo - CFFI: calling C from Python», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.