[pypy-svn] r44811 - pypy/extradoc/talk/ep2007/rpython
antocuni at codespeak.net
antocuni at codespeak.net
Fri Jul 6 22:03:01 CEST 2007
Author: antocuni
Date: Fri Jul 6 22:02:59 2007
New Revision: 44811
Modified:
pypy/extradoc/talk/ep2007/rpython/rpython.txt
Log:
some edits and some new slides
Modified: pypy/extradoc/talk/ep2007/rpython/rpython.txt
==============================================================================
--- pypy/extradoc/talk/ep2007/rpython/rpython.txt (original)
+++ pypy/extradoc/talk/ep2007/rpython/rpython.txt Fri Jul 6 22:02:59 2007
@@ -1,16 +1,21 @@
=======================================================
-RPython: need for speed aka C and C# considered harmful
+RPython: Need for speed
=======================================================
-:Authors: Antonio Cuni (DISI), Maciej Fijalkowski (merlinux GmbH)
+aka: C and C# considered harmful
+================================
+
+:Authors: Antonio Cuni (DISI - University of Genoa), Maciej Fijalkowski (merlinux GmbH)
:Place: Europython 2007
:Date: 10 July 2007
Why invent new language?
------------------------
-* Grown as a side effect of the pypy project
+XXX antocuni: I think this slide makes more sense after the next
+
+* Grown as a side effect of the PyPy project
* Python is too slow for some purposes
@@ -21,55 +26,72 @@
What is RPython?
----------------
-* Python (every RPython program has the same meaning
- when run on top of CPython)
+* RPython programs run unmodified on top of CPython
* Restricted subset
* Constructed from live objects - initialization
is done in Python
-* XXX more?
+* Python is the meta-programming language for RPython
+
Restricted, what do you mean?
-----------------------------
-* Full type inference - you cannot mix incompatible types
+* Static type system
-* Polymorphic collections (ie list of ints)
+* Full type inference - you cannot mix incompatible types
-* No dynamic stuff: switch class, add/remove methods, etc.
+* Polymorphic collections (i.e. list of ints)
* Java-like object model
+* No dynamic stuff: switch class, add/remove methods, etc.
+
* No support for special methods (only __init__ and __del__ works)
-* No frames and such stuff
+* No introspection
Example of use case
-------------------
* Write code
-* test/debug on top of CPython
+* Test/debug on top of CPython
-* compile
+* Compile
-* graph viewer
+* Graph viewer
Type inference
--------------
XXXX should we really mention that?
+::
+
+ def foo():
+ return bar(1, 2) + bar(3, 4.5)
+
+ def bar(a, b):
+ return a+1
+
+* a: Signed U Siged --> Signed
+
+* b: Signed U Float --> Float
+
+* result of bar: Signed + 1 --> Signed
+
+
Modules restrictions
--------------------
-* few modules work
+* Few modules work
-* they have different, more static API (ie open())
+* They have different, more static API (ie open())
-* all modules might be used when initializing
+* All modules might be used when initializing
Few more words about file API
-----------------------------
@@ -94,10 +116,21 @@
* no more pros...
-Writing standalone C programs
------------------------------
+Writing standalone C/.NET/JVM programs
+--------------------------------------
+
+::
-XXX explain writing targets
+ def target(*args):
+ return entry_point, None
+
+ def entry_point(argv):
+ print 'Hello World!'
+ return 0
+
+* see also translator/goal/targetnopstandalone.py
+
+* ./translate.py [--backend={c|cli|jvm}] targetXXX.py
Writing CPython extensions
---------------------------
@@ -131,6 +164,8 @@
* Live demo
+* http://codespeak.net/pypy/dist/pypy/doc/carbonpython.html
+
The JVM backend
---------------
@@ -141,6 +176,7 @@
* Not as mature as gencli
+* Only executables at the moment
The JS backend
@@ -148,3 +184,16 @@
XXX fijal, feel free to fill in
+
+Conclusions
+-----------
+
+* RPython has lot of rough edges
+
+* ...but it might be useful in some contexts
+
+* More convenient than C/C++/C#/Java
+
+* Much faster than CPython/IronPython/Jython
+
+* Stay tuned
More information about the Pypy-commit
mailing list