SlideShare uma empresa Scribd logo
1 de 32
Four Python Pains
               Stefane Fermigier
Scripting Languages Workshop, IRILL, May 2011
Part1: Some context
Wrong
(on several points)
Python
    (“Scripting Language”)
• Has built-in syntactical support for arbitrarily
  complex data structures (lists, dictionaries)
• Supports significantly complex applications:
  ERP5, Plone, Nuxeo CPS (~320 KLOC),
  OpenERP (~150 KLOC), Komodo (~250
  KLOC)
• Is compiled (to bytecode)
Scala
    (“Sys. Prog. Language”)


• Is interpreted (it as a REPL)
• Is a high-level language - in other words, has a
  high CPU instructions / statement ratio
  (comparable or higher than Python)
Other counterexamples

• Java, pre-generics (Java SE < 5, i.e. at the time
  of Ousterhout’s paper), had really weak
  support for static typing
• Clojure (that many consider in the same
  league as Scala) is not even statically typed
At which expense?
• Execution speed?
• Safety?
• Maintainability?
• What else?
Or maybe Python is a
scripting language after all ?
Uses of Python
• Education
• Small to medium sized sysadmin and
  software engineering project
• Medium to large web frameworks (Zope,
  Django...) and applications (Youtube...)
• Scientific computing (numpy, scipy...)
• Scripting of games, desktop apps, etc.
Recap: 4 pain points

• Speed
• Scalability
• Type-safety
• Adherence to external code bases, and an
  implementation (CPython)
Part 2: Discussion
Speed

• Python (seems to be) slower by 10x than
  Clojure and V8 (JavaScript)
• Both Clojure and JavaScript are dynamically
  typed languages
• TODO: look at Clojure and V8 and see
  how they do it
Scalability
•   CPython multi-threading / multi-core
    performance is constrained by “the GIL” (global
    interpretor lock)

•   It doesn’t have to be there (Jython doesn’t have
    one) but removing it from Python is
    controversial

•   Python has support for some par prog
    constructs (see: http://wiki.python.org/moin/
    ParallelProcessing) but not the fancy new ones
    (a la Scala, Clojure, Go, etc.)
Type Safety
•   Static typic is good to create safer programs,
    and also to ease refactoring (necessary
    condition for agility)

•   Since Python 3, type annotations are possible
    on variables, parameters, etc.

•   Some tools (e.g. Jetbrains’ PyCharm) have
    support for type inference on Python, and
    enable: code completion, errors detections,
    refactoring...
Adherence to CPython
•   There are at least 4 major Python
    implementations: CPython, Jython, IronPython
    and PyPy
•   But only CPython is mainstream
•   Why? Because all the “system programming
    lang” extensions written for CPython cannot
    be used with the others
•   And we’re talking about hundreds of packages
Solution?
•   There are also tools, languages and
    extensions that ease up the task of writing a
    CPython extension: SWIG, ctypes, Pyrex,
    Cython...
•   By encapsulating part of the complexity and
    low-level details of creating a Python
    extension, it could make is both easier, more
    robust and easier to share extensions
    between language implementations
Conclusion
• Python could maybe be made 10x faster by
  applying ideas from Clojure and V8

• Python could be made more scalable by
  removing the GIL (probably needs to
  rewrite the interpreter, though) and adding
  modern parallel programming paradigms
• Python programs could be made more
  robust with the help of static typing analysis
  tools + a little help from the developers
  (i.e. add a few type annotations in their
  programs and libraries)

• Python is a scripting language after all (but
  not only), and could benefit from a way of
  writing extensions that is higher level than
  the common one (but then: how to convert
  the existing code base?)

Mais conteúdo relacionado

Mais procurados

Raspberry using Python Session 1
Raspberry using Python Session 1Raspberry using Python Session 1
Raspberry using Python Session 1Mohamed Abd Ela'al
 
Python 101 For The Net Developer
Python 101 For The Net DeveloperPython 101 For The Net Developer
Python 101 For The Net DeveloperSarah Dutkiewicz
 
An Introduction to Python Programming
An Introduction to Python ProgrammingAn Introduction to Python Programming
An Introduction to Python ProgrammingMorteza Zakeri
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabusSugantha T
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners Sujith Kumar
 
Raspberry using Python Session 3
Raspberry using Python Session 3Raspberry using Python Session 3
Raspberry using Python Session 3Mohamed Abd Ela'al
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming pptismailmrribi
 
Python: the Project, the Language and the Style
Python: the Project, the Language and the StylePython: the Project, the Language and the Style
Python: the Project, the Language and the StyleJuan-Manuel Gimeno
 
Python indroduction
Python indroductionPython indroduction
Python indroductionFEG
 
python training | python course | python online training
python training |  python course |  python online trainingpython training |  python course |  python online training
python training | python course | python online trainingNancy Thomas
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programmingKiran Vadakkath
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersBoey Pak Cheong
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonAgung Wahyudi
 
Debugging (Django) application in PyCharm
Debugging (Django) application in PyCharmDebugging (Django) application in PyCharm
Debugging (Django) application in PyCharmpavelkoci
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonManishJha237
 
Python Programming
Python ProgrammingPython Programming
Python Programmingsameer patil
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonNikhil Kapoor
 

Mais procurados (20)

Raspberry using Python Session 1
Raspberry using Python Session 1Raspberry using Python Session 1
Raspberry using Python Session 1
 
Python 101 For The Net Developer
Python 101 For The Net DeveloperPython 101 For The Net Developer
Python 101 For The Net Developer
 
An Introduction to Python Programming
An Introduction to Python ProgrammingAn Introduction to Python Programming
An Introduction to Python Programming
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabus
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Raspberry using Python Session 3
Raspberry using Python Session 3Raspberry using Python Session 3
Raspberry using Python Session 3
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python: the Project, the Language and the Style
Python: the Project, the Language and the StylePython: the Project, the Language and the Style
Python: the Project, the Language and the Style
 
Python indroduction
Python indroductionPython indroduction
Python indroduction
 
python training | python course | python online training
python training |  python course |  python online trainingpython training |  python course |  python online training
python training | python course | python online training
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for Engineers
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Debugging (Django) application in PyCharm
Debugging (Django) application in PyCharmDebugging (Django) application in PyCharm
Debugging (Django) application in PyCharm
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python Programming
Python ProgrammingPython Programming
Python Programming
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 

Destaque

Nuxeo: an Open Source ECM software vendor
Nuxeo: an Open Source ECM software vendorNuxeo: an Open Source ECM software vendor
Nuxeo: an Open Source ECM software vendorStefane Fermigier
 
Nuxeo JavaOne 2007 presentation (in original format)
Nuxeo JavaOne 2007 presentation (in original format)Nuxeo JavaOne 2007 presentation (in original format)
Nuxeo JavaOne 2007 presentation (in original format)Stefane Fermigier
 
Memories of SLS0001
Memories of SLS0001Memories of SLS0001
Memories of SLS0001sabambmos
 
Nuxeo & Takoma @ Documation 2008
Nuxeo & Takoma @ Documation 2008Nuxeo & Takoma @ Documation 2008
Nuxeo & Takoma @ Documation 2008Stefane Fermigier
 
Les enjeux industriels du Cloud - Jean-Hugues Lauret
Les enjeux industriels du Cloud - Jean-Hugues LauretLes enjeux industriels du Cloud - Jean-Hugues Lauret
Les enjeux industriels du Cloud - Jean-Hugues LauretStefane Fermigier
 
OW2 - OSCi (Open Source Cloudware Initiative)
OW2 - OSCi (Open Source Cloudware Initiative)OW2 - OSCi (Open Source Cloudware Initiative)
OW2 - OSCi (Open Source Cloudware Initiative)Stefane Fermigier
 
What's new in Nuxeo 5.2? - Solutions Linux 2009
What's new in Nuxeo 5.2? - Solutions Linux 2009What's new in Nuxeo 5.2? - Solutions Linux 2009
What's new in Nuxeo 5.2? - Solutions Linux 2009Stefane Fermigier
 
A Quick Tour of JVM Languages
A Quick Tour of JVM LanguagesA Quick Tour of JVM Languages
A Quick Tour of JVM LanguagesStefane Fermigier
 
Jean-Paul Smets - Free Cloud Alliance
Jean-Paul Smets - Free Cloud AllianceJean-Paul Smets - Free Cloud Alliance
Jean-Paul Smets - Free Cloud AllianceStefane Fermigier
 
Nuxeo on the Cloud - Nuxeo World 2011
Nuxeo on the Cloud - Nuxeo World 2011Nuxeo on the Cloud - Nuxeo World 2011
Nuxeo on the Cloud - Nuxeo World 2011Stefane Fermigier
 

Destaque (12)

Nuxeo: an Open Source ECM software vendor
Nuxeo: an Open Source ECM software vendorNuxeo: an Open Source ECM software vendor
Nuxeo: an Open Source ECM software vendor
 
Demo Cup 2012
Demo Cup 2012Demo Cup 2012
Demo Cup 2012
 
Nuxeo JavaOne 2007
Nuxeo JavaOne 2007Nuxeo JavaOne 2007
Nuxeo JavaOne 2007
 
Nuxeo JavaOne 2007 presentation (in original format)
Nuxeo JavaOne 2007 presentation (in original format)Nuxeo JavaOne 2007 presentation (in original format)
Nuxeo JavaOne 2007 presentation (in original format)
 
Memories of SLS0001
Memories of SLS0001Memories of SLS0001
Memories of SLS0001
 
Nuxeo & Takoma @ Documation 2008
Nuxeo & Takoma @ Documation 2008Nuxeo & Takoma @ Documation 2008
Nuxeo & Takoma @ Documation 2008
 
Les enjeux industriels du Cloud - Jean-Hugues Lauret
Les enjeux industriels du Cloud - Jean-Hugues LauretLes enjeux industriels du Cloud - Jean-Hugues Lauret
Les enjeux industriels du Cloud - Jean-Hugues Lauret
 
OW2 - OSCi (Open Source Cloudware Initiative)
OW2 - OSCi (Open Source Cloudware Initiative)OW2 - OSCi (Open Source Cloudware Initiative)
OW2 - OSCi (Open Source Cloudware Initiative)
 
What's new in Nuxeo 5.2? - Solutions Linux 2009
What's new in Nuxeo 5.2? - Solutions Linux 2009What's new in Nuxeo 5.2? - Solutions Linux 2009
What's new in Nuxeo 5.2? - Solutions Linux 2009
 
A Quick Tour of JVM Languages
A Quick Tour of JVM LanguagesA Quick Tour of JVM Languages
A Quick Tour of JVM Languages
 
Jean-Paul Smets - Free Cloud Alliance
Jean-Paul Smets - Free Cloud AllianceJean-Paul Smets - Free Cloud Alliance
Jean-Paul Smets - Free Cloud Alliance
 
Nuxeo on the Cloud - Nuxeo World 2011
Nuxeo on the Cloud - Nuxeo World 2011Nuxeo on the Cloud - Nuxeo World 2011
Nuxeo on the Cloud - Nuxeo World 2011
 

Semelhante a Four Python Pains

Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unitmichaelaaron25322
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming BasicsDhana malar
 
Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.pptRehnawilson1
 
Python.pptx
Python.pptxPython.pptx
Python.pptxabclara
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinalProf. Wim Van Criekinge
 
Python programming ppt.pptx
Python programming ppt.pptxPython programming ppt.pptx
Python programming ppt.pptxnagendrasai12
 
Python programming
Python programmingPython programming
Python programmingMegha V
 
Python Programming
Python ProgrammingPython Programming
Python ProgrammingRenieMathews
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming LanguageLaxman Puri
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonMohammed Rafi
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
PYTHION IN DETAIL INFORMATION EDUCATIONAL
PYTHION IN DETAIL INFORMATION EDUCATIONALPYTHION IN DETAIL INFORMATION EDUCATIONAL
PYTHION IN DETAIL INFORMATION EDUCATIONALauramarketings
 
PYTHON IN DETAIL INFORMATION EDUCATIONAL
PYTHON IN DETAIL INFORMATION EDUCATIONALPYTHON IN DETAIL INFORMATION EDUCATIONAL
PYTHON IN DETAIL INFORMATION EDUCATIONALauramarketings
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET DeveloperSarah Dutkiewicz
 
OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Foundation
 

Semelhante a Four Python Pains (20)

Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
An Introduction to PyPy
An Introduction to PyPyAn Introduction to PyPy
An Introduction to PyPy
 
What is python
What is pythonWhat is python
What is python
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming Basics
 
Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.ppt
 
IPT 2.pptx
IPT 2.pptxIPT 2.pptx
IPT 2.pptx
 
Python.pptx
Python.pptxPython.pptx
Python.pptx
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
 
Python programming ppt.pptx
Python programming ppt.pptxPython programming ppt.pptx
Python programming ppt.pptx
 
PYTHON UNIT 1
PYTHON UNIT 1PYTHON UNIT 1
PYTHON UNIT 1
 
Python programming
Python programmingPython programming
Python programming
 
Python Programming
Python ProgrammingPython Programming
Python Programming
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
PYTHION IN DETAIL INFORMATION EDUCATIONAL
PYTHION IN DETAIL INFORMATION EDUCATIONALPYTHION IN DETAIL INFORMATION EDUCATIONAL
PYTHION IN DETAIL INFORMATION EDUCATIONAL
 
PYTHON IN DETAIL INFORMATION EDUCATIONAL
PYTHON IN DETAIL INFORMATION EDUCATIONALPYTHON IN DETAIL INFORMATION EDUCATIONAL
PYTHON IN DETAIL INFORMATION EDUCATIONAL
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET Developer
 
OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11
 

Mais de Stefane Fermigier

Pitch Abilian - Paris Open Source Summit 2015
Pitch Abilian - Paris Open Source Summit 2015Pitch Abilian - Paris Open Source Summit 2015
Pitch Abilian - Paris Open Source Summit 2015Stefane Fermigier
 
15 ans de politiques publiques du logiciel libre en France
15 ans de politiques publiques du logiciel libre en France15 ans de politiques publiques du logiciel libre en France
15 ans de politiques publiques du logiciel libre en FranceStefane Fermigier
 
Créer une communauté open source: pourquoi ? comment ?
Créer une communauté open source: pourquoi ? comment ?Créer une communauté open source: pourquoi ? comment ?
Créer une communauté open source: pourquoi ? comment ?Stefane Fermigier
 
L'open source professionnel - un business model open source
L'open source professionnel - un business model open sourceL'open source professionnel - un business model open source
L'open source professionnel - un business model open sourceStefane Fermigier
 
Roadmap du GT Logiciel Libre 2013-2020
Roadmap du GT Logiciel Libre 2013-2020Roadmap du GT Logiciel Libre 2013-2020
Roadmap du GT Logiciel Libre 2013-2020Stefane Fermigier
 
Le MOOC powered by Abilian - Plateforme open source de MOOC
Le MOOC powered by Abilian - Plateforme open source de MOOCLe MOOC powered by Abilian - Plateforme open source de MOOC
Le MOOC powered by Abilian - Plateforme open source de MOOCStefane Fermigier
 
Pourquoi le big data open source ?
Pourquoi le big data open source ?Pourquoi le big data open source ?
Pourquoi le big data open source ?Stefane Fermigier
 
Pleniere du GT Logiciel Libre, janvier 2013
Pleniere du GT Logiciel Libre, janvier 2013Pleniere du GT Logiciel Libre, janvier 2013
Pleniere du GT Logiciel Libre, janvier 2013Stefane Fermigier
 
Nuxeo, an open source platform for content-centric business applications
Nuxeo, an open source platform for content-centric business applicationsNuxeo, an open source platform for content-centric business applications
Nuxeo, an open source platform for content-centric business applicationsStefane Fermigier
 
ECM Meets the Semantic Web - Nuxeo World 2011
ECM Meets the Semantic Web - Nuxeo World 2011ECM Meets the Semantic Web - Nuxeo World 2011
ECM Meets the Semantic Web - Nuxeo World 2011Stefane Fermigier
 
GT Logiciel Libre - Convention Systematic 2011
GT Logiciel Libre - Convention Systematic 2011GT Logiciel Libre - Convention Systematic 2011
GT Logiciel Libre - Convention Systematic 2011Stefane Fermigier
 
Challenges du recrutement pour un editeur de logiciel libre
Challenges du recrutement pour un editeur de logiciel libreChallenges du recrutement pour un editeur de logiciel libre
Challenges du recrutement pour un editeur de logiciel libreStefane Fermigier
 
Open World Forum 2011 - Overview
Open World Forum 2011 - OverviewOpen World Forum 2011 - Overview
Open World Forum 2011 - OverviewStefane Fermigier
 

Mais de Stefane Fermigier (20)

Pitch Abilian - Paris Open Source Summit 2015
Pitch Abilian - Paris Open Source Summit 2015Pitch Abilian - Paris Open Source Summit 2015
Pitch Abilian - Paris Open Source Summit 2015
 
15 ans de politiques publiques du logiciel libre en France
15 ans de politiques publiques du logiciel libre en France15 ans de politiques publiques du logiciel libre en France
15 ans de politiques publiques du logiciel libre en France
 
Créer une communauté open source: pourquoi ? comment ?
Créer une communauté open source: pourquoi ? comment ?Créer une communauté open source: pourquoi ? comment ?
Créer une communauté open source: pourquoi ? comment ?
 
L'open source professionnel - un business model open source
L'open source professionnel - un business model open sourceL'open source professionnel - un business model open source
L'open source professionnel - un business model open source
 
Roadmap du GT Logiciel Libre 2013-2020
Roadmap du GT Logiciel Libre 2013-2020Roadmap du GT Logiciel Libre 2013-2020
Roadmap du GT Logiciel Libre 2013-2020
 
Le MOOC powered by Abilian - Plateforme open source de MOOC
Le MOOC powered by Abilian - Plateforme open source de MOOCLe MOOC powered by Abilian - Plateforme open source de MOOC
Le MOOC powered by Abilian - Plateforme open source de MOOC
 
Pitch Abilian mai 2013
Pitch Abilian mai 2013Pitch Abilian mai 2013
Pitch Abilian mai 2013
 
Open Innovation in Action
Open Innovation in ActionOpen Innovation in Action
Open Innovation in Action
 
Pourquoi le big data open source ?
Pourquoi le big data open source ?Pourquoi le big data open source ?
Pourquoi le big data open source ?
 
Save the date OWF 2013
Save the date OWF 2013Save the date OWF 2013
Save the date OWF 2013
 
Ecosystemes logiciel libre
Ecosystemes logiciel libreEcosystemes logiciel libre
Ecosystemes logiciel libre
 
Pleniere du GT Logiciel Libre, janvier 2013
Pleniere du GT Logiciel Libre, janvier 2013Pleniere du GT Logiciel Libre, janvier 2013
Pleniere du GT Logiciel Libre, janvier 2013
 
OWF 2012 Outcome
OWF 2012 OutcomeOWF 2012 Outcome
OWF 2012 Outcome
 
Cours ECM à l'EPITA
Cours ECM à l'EPITACours ECM à l'EPITA
Cours ECM à l'EPITA
 
Nuxeo, an open source platform for content-centric business applications
Nuxeo, an open source platform for content-centric business applicationsNuxeo, an open source platform for content-centric business applications
Nuxeo, an open source platform for content-centric business applications
 
ECM Meets the Semantic Web - Nuxeo World 2011
ECM Meets the Semantic Web - Nuxeo World 2011ECM Meets the Semantic Web - Nuxeo World 2011
ECM Meets the Semantic Web - Nuxeo World 2011
 
Nuxeo at 10
Nuxeo at 10Nuxeo at 10
Nuxeo at 10
 
GT Logiciel Libre - Convention Systematic 2011
GT Logiciel Libre - Convention Systematic 2011GT Logiciel Libre - Convention Systematic 2011
GT Logiciel Libre - Convention Systematic 2011
 
Challenges du recrutement pour un editeur de logiciel libre
Challenges du recrutement pour un editeur de logiciel libreChallenges du recrutement pour un editeur de logiciel libre
Challenges du recrutement pour un editeur de logiciel libre
 
Open World Forum 2011 - Overview
Open World Forum 2011 - OverviewOpen World Forum 2011 - Overview
Open World Forum 2011 - Overview
 

Último

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Four Python Pains

  • 1. Four Python Pains Stefane Fermigier Scripting Languages Workshop, IRILL, May 2011
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 11. Python (“Scripting Language”) • Has built-in syntactical support for arbitrarily complex data structures (lists, dictionaries) • Supports significantly complex applications: ERP5, Plone, Nuxeo CPS (~320 KLOC), OpenERP (~150 KLOC), Komodo (~250 KLOC) • Is compiled (to bytecode)
  • 12. Scala (“Sys. Prog. Language”) • Is interpreted (it as a REPL) • Is a high-level language - in other words, has a high CPU instructions / statement ratio (comparable or higher than Python)
  • 13. Other counterexamples • Java, pre-generics (Java SE < 5, i.e. at the time of Ousterhout’s paper), had really weak support for static typing • Clojure (that many consider in the same league as Scala) is not even statically typed
  • 14.
  • 15.
  • 17. • Execution speed? • Safety? • Maintainability? • What else?
  • 18. Or maybe Python is a scripting language after all ?
  • 19. Uses of Python • Education • Small to medium sized sysadmin and software engineering project • Medium to large web frameworks (Zope, Django...) and applications (Youtube...) • Scientific computing (numpy, scipy...) • Scripting of games, desktop apps, etc.
  • 20. Recap: 4 pain points • Speed • Scalability • Type-safety • Adherence to external code bases, and an implementation (CPython)
  • 22. Speed • Python (seems to be) slower by 10x than Clojure and V8 (JavaScript) • Both Clojure and JavaScript are dynamically typed languages • TODO: look at Clojure and V8 and see how they do it
  • 23.
  • 24. Scalability • CPython multi-threading / multi-core performance is constrained by “the GIL” (global interpretor lock) • It doesn’t have to be there (Jython doesn’t have one) but removing it from Python is controversial • Python has support for some par prog constructs (see: http://wiki.python.org/moin/ ParallelProcessing) but not the fancy new ones (a la Scala, Clojure, Go, etc.)
  • 25.
  • 26. Type Safety • Static typic is good to create safer programs, and also to ease refactoring (necessary condition for agility) • Since Python 3, type annotations are possible on variables, parameters, etc. • Some tools (e.g. Jetbrains’ PyCharm) have support for type inference on Python, and enable: code completion, errors detections, refactoring...
  • 27.
  • 28. Adherence to CPython • There are at least 4 major Python implementations: CPython, Jython, IronPython and PyPy • But only CPython is mainstream • Why? Because all the “system programming lang” extensions written for CPython cannot be used with the others • And we’re talking about hundreds of packages
  • 29. Solution? • There are also tools, languages and extensions that ease up the task of writing a CPython extension: SWIG, ctypes, Pyrex, Cython... • By encapsulating part of the complexity and low-level details of creating a Python extension, it could make is both easier, more robust and easier to share extensions between language implementations
  • 31. • Python could maybe be made 10x faster by applying ideas from Clojure and V8 • Python could be made more scalable by removing the GIL (probably needs to rewrite the interpreter, though) and adding modern parallel programming paradigms
  • 32. • Python programs could be made more robust with the help of static typing analysis tools + a little help from the developers (i.e. add a few type annotations in their programs and libraries) • Python is a scripting language after all (but not only), and could benefit from a way of writing extensions that is higher level than the common one (but then: how to convert the existing code base?)

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n