summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2018-05-30 21:27:48 +0200
committerMatěj Cepl <mcepl@cepl.eu>2018-05-30 21:27:48 +0200
commit2e2587717e60d658cc32fd2b108474711b7aa1d2 (patch)
tree880ca549a3fb86ead3ec8016e78e9e350394f41c
parent2a897ebd0c82c22b712ce568f1864b071e8aafce (diff)
downloadPyCon18-m2crypto-2e2587717e60d658cc32fd2b108474711b7aa1d2.tar.gz
Rearrange slides
-rw-r--r--slides.html56
-rw-r--r--slides.odpbin10497 -> 10925 bytes
-rw-r--r--slides.pdfbin36680 -> 38440 bytes
-rw-r--r--slides.rst64
4 files changed, 83 insertions, 37 deletions
diff --git a/slides.html b/slides.html
index 950cc9c..68054f1 100644
--- a/slides.html
+++ b/slides.html
@@ -396,6 +396,8 @@ ul.auto-toc {
<tbody valign="top">
<tr class="field"><th class="field-name">Author:</th><td class="field-body">Matěj Cepl &lt;<a class="reference external" href="mailto:mcepl&#37;&#52;&#48;cepl&#46;eu">mcepl<span>&#64;</span>cepl<span>&#46;</span>eu</a>&gt;</td>
</tr>
+<tr class="field"><th class="field-name">URL:</th><td class="field-body"><a class="reference external" href="https://matej.ceplovi.cz/clanky/PyCon18-m2crypto/slides.html">https://matej.ceplovi.cz/clanky/PyCon18-m2crypto/slides.html</a></td>
+</tr>
</tbody>
</table>
@@ -489,28 +491,11 @@ OpenSSL.</li>
<h1>Strategy</h1>
<ul class="simple">
<li>Type Hints</li>
+<li>Documentation strings</li>
<li>CI</li>
<li>Extension of platform support</li>
</ul>
</div>
-<div class="slide" id="type-hints">
-<h1>Type Hints</h1>
-<ul>
-<li><p class="first"><a class="reference external" href="https://www.python.org/dev/peps/pep-0484/">PEP 484</a> providing <strong>optional</strong> type annotations. Quite
-controversial, but clearly very useful for libraries</p>
-</li>
-<li><p class="first">Native for Python &gt;= 3.5, but supports py2k compatible syntax:</p>
-<pre class="literal-block">
-def sum(x, y):
- # type: (int, int) -&gt; int
- return x + y
-</pre>
-</li>
-<li><p class="first">Especially useful for our situation: marking types helps us to
-analyze what invidivual py2k <tt class="docutils literal">str</tt> actually mean.</p>
-</li>
-</ul>
-</div>
<div class="slide" id="c-api">
<h1>C API</h1>
<ul class="simple">
@@ -541,6 +526,41 @@ py3k API</li>
</li>
</ul>
</div>
+<div class="slide" id="type-hints">
+<h1>Type Hints</h1>
+<ul>
+<li><p class="first"><a class="reference external" href="https://www.python.org/dev/peps/pep-0484/">PEP 484</a> providing <strong>optional</strong> type annotations. Quite
+controversial, but clearly very useful for libraries</p>
+</li>
+<li><p class="first">Native for Python &gt;= 3.5, but supports py2k compatible syntax:</p>
+<pre class="literal-block">
+def sum(x, y):
+ # type: (int, int) -&gt; int
+ return x + y
+</pre>
+</li>
+<li><p class="first">Especially useful for our situation: marking types helps us to
+analyze what invidivual py2k <tt class="docutils literal">str</tt> actually mean.</p>
+</li>
+</ul>
+</div>
+<div class="slide" id="python-porting-shims-again">
+<h1>Python porting (shims again)</h1>
+<p>The same principles apply as with C functions, “shims, not
+<tt class="docutils literal">#ifdef</tt> s”.</p>
+<ul class="simple">
+<li>Plenty of issues are resolved by using <tt class="docutils literal">six</tt> (or
+<tt class="docutils literal">modernize</tt>, <tt class="docutils literal">future</tt>), so use them. If I did it again,
+I would probably use <tt class="docutils literal">future</tt> (and wrote py3k code), but the
+difference is slim.</li>
+<li>Do not hesitate to create your own shims. So I have for
+example, <tt class="docutils literal">bix_to_hex</tt> and <tt class="docutils literal">oct_to_num</tt> or padding functions
+there.</li>
+<li><a class="reference external" href="http://python-future.org/compatible_idioms.html">http://python-future.org/compatible_idioms.html</a></li>
+</ul>
+<p class="handout">Whoever does not understand LISP, is doomed to reinvent it.
+Badly. LISP -&gt; six</p>
+</div>
</div>
</body>
</html>
diff --git a/slides.odp b/slides.odp
index 177b054..ccad96c 100644
--- a/slides.odp
+++ b/slides.odp
Binary files differ
diff --git a/slides.pdf b/slides.pdf
index f196772..2b17632 100644
--- a/slides.pdf
+++ b/slides.pdf
Binary files differ
diff --git a/slides.rst b/slides.rst
index 4777bfe..8a48b9d 100644
--- a/slides.rst
+++ b/slides.rst
@@ -5,6 +5,7 @@ Wounded hero revived
Lessons learned from porting M2Crypto to Py3k
:Author: Matěj Cepl <mcepl@cepl.eu>
+:URL: https://matej.ceplovi.cz/clanky/PyCon18-m2crypto/slides.html
Origins
@@ -149,30 +150,13 @@ Strategy
* Type Hints
+* Documentation strings
+
* CI
* Extension of platform support
-Type Hints
-==========
-
-* `PEP 484`_ providing **optional** type annotations. Quite
- controversial, but clearly very useful for libraries
-
-* Native for Python >= 3.5, but supports py2k compatible syntax::
-
- def sum(x, y):
- # type: (int, int) -> int
- return x + y
-
-* Especially useful for our situation: marking types helps us to
- analyze what invidivual py2k ``str`` actually mean.
-
-.. _`PEP 484`:
- https://www.python.org/dev/peps/pep-0484/
-
-
C API
=====
@@ -205,3 +189,45 @@ C shims of missing functions
- ``PyFile_AsFile()`` I have no idea, why it was removed from
py3k API
+
+
+Type Hints
+==========
+
+* `PEP 484`_ providing **optional** type annotations. Quite
+ controversial, but clearly very useful for libraries
+
+* Native for Python >= 3.5, but supports py2k compatible syntax::
+
+ def sum(x, y):
+ # type: (int, int) -> int
+ return x + y
+
+* Especially useful for our situation: marking types helps us to
+ analyze what invidivual py2k ``str`` actually mean.
+
+.. _`PEP 484`:
+ https://www.python.org/dev/peps/pep-0484/
+
+
+Python porting (shims again)
+============================
+
+The same principles apply as with C functions, “shims, not
+``#ifdef`` s”.
+
+* Plenty of issues are resolved by using ``six`` (or
+ ``modernize``, ``future``), so use them. If I did it again,
+ I would probably use ``future`` (and wrote py3k code), but the
+ difference is slim.
+
+* Do not hesitate to create your own shims. So I have for
+ example, ``bix_to_hex`` and ``oct_to_num`` or padding functions
+ there.
+
+* http://python-future.org/compatible_idioms.html
+
+.. class:: handout
+
+ Whoever does not understand LISP, is doomed to reinvent it.
+ Badly. LISP -> six