SlideShare ist ein Scribd-Unternehmen logo
1 von 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?)

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie Four Python Pains: Speed, Scalability, Type Safety and Adherence to CPython

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
 
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
 
Python For All | Software Professionals, QA & DevOps professionals
Python For All | Software Professionals, QA & DevOps professionalsPython For All | Software Professionals, QA & DevOps professionals
Python For All | Software Professionals, QA & DevOps professionalsNilesh Sutar
 

Ähnlich wie Four Python Pains: Speed, Scalability, Type Safety and Adherence to CPython (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
 
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
 
Research paper on python by Rj
Research paper on python by RjResearch paper on python by Rj
Research paper on python by Rj
 
Python For All | Software Professionals, QA & DevOps professionals
Python For All | Software Professionals, QA & DevOps professionalsPython For All | Software Professionals, QA & DevOps professionals
Python For All | Software Professionals, QA & DevOps professionals
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 

Kürzlich hochgeladen (20)

Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 

Four Python Pains: Speed, Scalability, Type Safety and Adherence to CPython

  • 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?)

Hinweis der Redaktion

  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