[pypy-commit] extradoc extradoc: Talk

arigo pypy.commits at gmail.com
Mon Oct 3 03:26:20 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: extradoc
Changeset: r5725:7def2adddcfe
Date: 2016-10-03 09:26 +0200
http://bitbucket.org/pypy/extradoc/changeset/7def2adddcfe/

Log:	Talk

diff --git a/talk/pyconza2016/revdb/Makefile b/talk/pyconza2016/revdb/Makefile
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2016/revdb/Makefile
@@ -0,0 +1,18 @@
+# you can find rst2beamer.py here:
+# http://codespeak.net/svn/user/antocuni/bin/rst2beamer.py
+
+# WARNING: to work, it needs this patch for docutils
+# https://sourceforge.net/tracker/?func=detail&atid=422032&aid=1459707&group_id=38414
+
+talk.pdf: talk.rst author.latex stylesheet.latex
+	rst2beamer.py --stylesheet=stylesheet.latex --documentoptions=14pt --theme=Warsaw --input-encoding=utf8 --output-encoding=utf8 talk.rst talk.latex || exit
+	#/home/antocuni/.virtualenvs/rst2beamer/bin/python `which rst2beamer.py` --stylesheet=stylesheet.latex --documentoptions=14pt talk.rst talk.latex || exit
+	sed 's/\\date{}/\\input{author.latex}/' -i talk.latex || exit
+	#sed 's/\\maketitle/\\input{title.latex}/' -i talk.latex || exit
+	pdflatex talk.latex  || exit
+
+view: talk.pdf
+	okular talk.pdf
+
+xpdf: talk.pdf
+	xpdf talk.pdf &
diff --git a/talk/pyconza2016/revdb/author.latex b/talk/pyconza2016/revdb/author.latex
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2016/revdb/author.latex
@@ -0,0 +1,8 @@
+\definecolor{rrblitbackground}{rgb}{0.0, 0.0, 0.0}
+
+\title[RevDB, a reverse debugger]{RevDB, a \colorbox{darkred}{\color{white}Reverse} Debugger}
+\author[Armin Rigo]
+{Armin Rigo}
+
+\institute{PyCon ZA 2016}
+\date{October 2016}
diff --git a/talk/pyconza2016/revdb/demo/demo1.py b/talk/pyconza2016/revdb/demo/demo1.py
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2016/revdb/demo/demo1.py
@@ -0,0 +1,20 @@
+
+class X(object):
+    def __init__(self, value):
+        self.value = value
+
+def make_list():
+    lst = [X(5) for i in range(100)]
+    lst.append(lst[50])
+    return lst
+
+
+lst = make_list()
+
+for x in lst:
+    x.value += 1
+
+for i in range(len(lst)):
+    x = lst[i]
+    x.value += 1
+    assert x.value == 7
diff --git a/talk/pyconza2016/revdb/demo/todo.txt b/talk/pyconza2016/revdb/demo/todo.txt
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2016/revdb/demo/todo.txt
@@ -0,0 +1,41 @@
+
+Ahead
+=====
+
+term-huge
+REVDB=log pypy-revdb demo1.py
+revdb.py --color=light log
+(c, bs, bs, bs, list)
+
+
+Demo1
+=====
+
+p x.value
+p x
+bnext
+bnext
+next
+p x.value
+p $1
+p $1.value
+watch $1.value
+bcontinue
+
+bcontinue
+
+p lst
+watch $2.count($1)
+bcontinue
+
+
+How is it possible??
+====================
+
+vi demo1.py
+python demo1.py
+pypy demo1.py
+REVDB=log ./pypy-revdb demo1.py
+./revdb.py --color=light log
+(c, bs, bs, bs)
+(./revdb.py again)
diff --git a/talk/pyconza2016/revdb/stylesheet.latex b/talk/pyconza2016/revdb/stylesheet.latex
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2016/revdb/stylesheet.latex
@@ -0,0 +1,10 @@
+\usetheme{CambridgeUS}
+\setbeamercovered{transparent}
+\setbeamertemplate{navigation symbols}{}
+
+\definecolor{darkgreen}{rgb}{0, 0.5, 0.0}
+\newcommand{\docutilsrolegreen}[1]{\color{darkgreen}#1\normalcolor}
+\newcommand{\docutilsrolered}[1]{\color{red}#1\normalcolor}
+
+\newcommand{\green}[1]{\color{darkgreen}#1\normalcolor}
+\newcommand{\red}[1]{\color{red}#1\normalcolor}
diff --git a/talk/pyconza2016/revdb/talk.rst b/talk/pyconza2016/revdb/talk.rst
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2016/revdb/talk.rst
@@ -0,0 +1,110 @@
+=========================
+RevDB, a reverse debugger
+=========================
+
+
+Demo
+===========================
+
+.. raw:: latex
+
+    \ 
+
+
+How is that possible??
+======================
+
+* I did not cheat
+
+* It really works for large programs
+
+
+Main features
+=============
+
+* Travel in time: next/bnext, step/bstep, continue/bcontinue,
+  finish/bfinish
+
+* p expression-or-statement
+
+* watch expression, break function/file:line, delete
+
+
+On bigger programs
+==================
+
+* Write down what occurs at which time, because you're going
+  to go back and forth until you are lost
+
+* See ``help`` for all commands
+
+
+Completeness
+============
+
+* Run any Python code that PyPy can also run: OK
+
+* Multithread apps: OK
+
+* CPython C extension modules: OK
+
+
+Completeness
+============
+
+* Long-running programs: NO
+
+* Stackless/greenlet/gevent: NO
+
+* Track multiple processes: NO
+
+* Windows: NO
+
+* Python 3: NO (soon?)
+
+
+Comparison
+==========
+
+* "Reverse debugging" == "Omniscient debugging" == "Historial debugging"
+  == "Backwards debugging"
+
+* for the C language: undodb-gdb, rr
+
+* for Python (but not really the same thing): epdb, pode
+
+
+Why not well-known?
+===================
+
+* It is often a cannon to take down a fly
+
+* Performance issues: unlike gdb and pdb, they slow down normal
+  execution (with some of them, massively)
+
+
+Why not well-known?
+===================
+
+* They tend to crash
+
+* Not all give a full, reliable history: sometimes you need to guess if
+  the debugger is telling you lies
+
+* Often proprietary software with restrictive licenses
+
+
+Sometimes you need the cannon
+=============================
+
+* In a very complex piece of code, you will one day (or had to) hunt for
+  a week for *one* bug
+
+* I made RevDB in two months instead of spending one week tracking down a
+  bug ``:-)``
+
+
+Q & A
+=====
+
+https://bitbucket.org/pypy/revdb/


More information about the pypy-commit mailing list