This document discusses combining Rust and Python to create a new "hip" programming language. It proposes two approaches: 1) Building Rust extensions for Python to improve performance of Python code. Rust could replace C and provide memory safety and better performance for Python extensions. 2) Building a Python interpreter using Rust (RustPython), which provides benefits like memory safety and borrowing rules from Rust. However, a Rust-based Python interpreter still has a long way to go before matching the performance and capabilities of CPython. In the end, the document acknowledges both Rust and Python have limitations and neither can fully "replace" the other.
my talk from highload++ 2013 -- talking about scaling compiled applications but from the point of view of scaling up from supporting 1 platform to supporting MANY platforms.
in other words: given an application that supports ubuntu 10.04, what sort of systems, tips, and tricks are needed to help scale support to other ubuntus, redhats, centos, windows, etc.
How to write a well-behaved Python command line applicationgjcross
Tutorial #1 from PyCon AU 2012
Python is a fantastic scripting language. It is easy to hack up quick scripts for all sorts of problems - without a lot more effort, that hack can become a robust, easily maintained command line application that your users love.
This tutorial covers how to write useful, well-behaved command line applications that are a joy to use:
* Easily process command line options
* Write a script that can be used interactively or as a filter
* Display help to the user
* Gracefully handle and report errors, to the user and the shell
* Trap and process signals in a robust manner
* Create an easily configured application
* Use a range of the Python standard library modules for easier command line scripting
* Test your application
* Set up the supporting files that any well-behaved application should have, eg. a man page
* How to package your application for other people to use
This tutorial will assume a very basic knowledge of Python and some familiarity with the command line environment of your choice.
Even though Python allows many ways to easily debug and profile your code, it is not uncommon to see people overusing simple print statements for this. The presentation will provide an overview of the most common basic debugging techniques that every Python programmer should know. Additionally, for debugging speed or memory problems, couple profilers are presented. Outline:
Basic techniques (print statements, logging)
Debuggers (pdb, winpdb/rpdb2)
Profiling (cProfile, guppy, ...)
my talk from highload++ 2013 -- talking about scaling compiled applications but from the point of view of scaling up from supporting 1 platform to supporting MANY platforms.
in other words: given an application that supports ubuntu 10.04, what sort of systems, tips, and tricks are needed to help scale support to other ubuntus, redhats, centos, windows, etc.
How to write a well-behaved Python command line applicationgjcross
Tutorial #1 from PyCon AU 2012
Python is a fantastic scripting language. It is easy to hack up quick scripts for all sorts of problems - without a lot more effort, that hack can become a robust, easily maintained command line application that your users love.
This tutorial covers how to write useful, well-behaved command line applications that are a joy to use:
* Easily process command line options
* Write a script that can be used interactively or as a filter
* Display help to the user
* Gracefully handle and report errors, to the user and the shell
* Trap and process signals in a robust manner
* Create an easily configured application
* Use a range of the Python standard library modules for easier command line scripting
* Test your application
* Set up the supporting files that any well-behaved application should have, eg. a man page
* How to package your application for other people to use
This tutorial will assume a very basic knowledge of Python and some familiarity with the command line environment of your choice.
Even though Python allows many ways to easily debug and profile your code, it is not uncommon to see people overusing simple print statements for this. The presentation will provide an overview of the most common basic debugging techniques that every Python programmer should know. Additionally, for debugging speed or memory problems, couple profilers are presented. Outline:
Basic techniques (print statements, logging)
Debuggers (pdb, winpdb/rpdb2)
Profiling (cProfile, guppy, ...)
A Recovering Java Developer Learns to GoMatt Stine
As presented at OSCON 2014.
The Go programming language has emerged as a favorite tool of DevOps and cloud practitioners alike. In many ways, Go is more famous for what it doesn’t include than what it does, and co-author Rob Pike has said that Go represents a “less is more” approach to language design.
The Cloud Foundry engineering teams have steadily increased their use of Go for building components, starting with the Router, and progressing through Loggregator, the CLI, and more recently the Health Manager. As a “recovering-Java-developer-turned-DevOps-junkie” focused on helping our customers and community succeed with Cloud Foundry, it became very clear to me that I needed to add Go to my knowledge portfolio.
This talk will introduce Go and its distinctives to Java developers looking to add Go to their toolkits. We’ll cover Go vs. Java in terms of:
* type systems
* modularity
* programming idioms
* object-oriented constructs
* concurrency
Why use JavaScript in Hardware? GoTo Conf - Berlin TechnicalMachine
A majority of this presentation was live demos of hardware in action (how to blink lights, send HTTP requests to an Express server, attach sensors, and an integration demo) but it also quickly goes over some reasons why you should consider using JavaScript to prototype hardware.
Culerity - Headless full stack testing for JavaScriptThilo Utke
This is a presentation i gave at the Java Script User group (twitter.com/berlinjs). It is about testing your entire web application including javascript without opening a browser for that.
A basic Introduction to Rust. Rust is a modern system programming language which offering different approach than other existing new modern system programming languages to deal with: memory safety without GC, abstraction without overhead, and concurrency without data races.
When working with big data or complex algorithms, we often look to parallelize our code to optimize runtime. By taking advantage of a GPUs 1000+ cores, a data scientist can quickly scale out solutions inexpensively and sometime more quickly than using traditional CPU cluster computing. In this webinar, we will present ways to incorporate GPU computing to complete computationally intensive tasks in both Python and R.
See the full presentation here: 👉 https://vimeo.com/153290051
Learn more about the Domino data science platform: https://www.dominodatalab.com
Typically, Python software engineers don’t necessarily care about how the language handles memory. However, sometimes it’s very useful to understand what’s going on under the hood. In this talk, I’ll give you a brief overview of how Python manages memory and some useful tips and tricks that you may not already know.
A Recovering Java Developer Learns to GoMatt Stine
As presented at OSCON 2014.
The Go programming language has emerged as a favorite tool of DevOps and cloud practitioners alike. In many ways, Go is more famous for what it doesn’t include than what it does, and co-author Rob Pike has said that Go represents a “less is more” approach to language design.
The Cloud Foundry engineering teams have steadily increased their use of Go for building components, starting with the Router, and progressing through Loggregator, the CLI, and more recently the Health Manager. As a “recovering-Java-developer-turned-DevOps-junkie” focused on helping our customers and community succeed with Cloud Foundry, it became very clear to me that I needed to add Go to my knowledge portfolio.
This talk will introduce Go and its distinctives to Java developers looking to add Go to their toolkits. We’ll cover Go vs. Java in terms of:
* type systems
* modularity
* programming idioms
* object-oriented constructs
* concurrency
Why use JavaScript in Hardware? GoTo Conf - Berlin TechnicalMachine
A majority of this presentation was live demos of hardware in action (how to blink lights, send HTTP requests to an Express server, attach sensors, and an integration demo) but it also quickly goes over some reasons why you should consider using JavaScript to prototype hardware.
Culerity - Headless full stack testing for JavaScriptThilo Utke
This is a presentation i gave at the Java Script User group (twitter.com/berlinjs). It is about testing your entire web application including javascript without opening a browser for that.
A basic Introduction to Rust. Rust is a modern system programming language which offering different approach than other existing new modern system programming languages to deal with: memory safety without GC, abstraction without overhead, and concurrency without data races.
When working with big data or complex algorithms, we often look to parallelize our code to optimize runtime. By taking advantage of a GPUs 1000+ cores, a data scientist can quickly scale out solutions inexpensively and sometime more quickly than using traditional CPU cluster computing. In this webinar, we will present ways to incorporate GPU computing to complete computationally intensive tasks in both Python and R.
See the full presentation here: 👉 https://vimeo.com/153290051
Learn more about the Domino data science platform: https://www.dominodatalab.com
Typically, Python software engineers don’t necessarily care about how the language handles memory. However, sometimes it’s very useful to understand what’s going on under the hood. In this talk, I’ll give you a brief overview of how Python manages memory and some useful tips and tricks that you may not already know.
Python is a versatile programming language used almost in all application development. OO Features coupled with excellent library support makes Python a preferred language for Web Development, IoT Application Development, Data Science and Machine Learning. In this module, we will focus on getting hands-on development and debugging experience of Python, starting with basics. Further will get a deeper understanding of advanced aspects like OO programming, File handling, Package creation, Exception handling. Eventually, you will be able to develop a multitasking application in IoT Gateways.
Talk at PyCon2022 over building binary packages for Python. Covers an overview and an in-depth look into pybind11 for binding, scikit-build for creating the build, and build & cibuildwheel for making the binaries that can be distributed on PyPI.
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...Tsundere Chen
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime -Part 2
This is the slide for PyCon TW 2017 Day 3 PyPy's approach to construct domain-specific language runtime's Slide, and this is part 2, Part 1 is jserv's work, refer to his slide
Python is a great programming language. It is a complete tutorial of using this programming language.
This slides is split into two parts, and it is the first part. Another part is at: http://www.slideshare.net/moskytw/programming-with-python-adv.
This is the presentation I gave about Python 3.5 to my research group. It was my intention to introduce the Python language to some of the new members who don't know or have little knowledge about the language.
Semi-motivational talk about why today is a great time to learn Python. Slides include a brief overview of the current state of the language, its application areas, and Python's future.
Presentation used for tutorial session on Python for finalists of CSEA Code Maestros on Feb 11, 2012. More resources at http://athena.nitc.ac.in/~k4rtik/python/
The core idea of PyPy is to produce a flexible and fast implementation of the Python programming language. The talk will cover the interpreter, translator and jit parts of the code and their relationships and the fundamental ways in which PyPy differs from other virtual machine implementations.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
2. About the dude standing here
● Juhun “RangHo” Lee
● Professional procrastinator
● Commits bullshits for living
● Oh shit another hipster again
Twitter: @RangHo_777
GitHub: @RangHo
4. Rust is pretty cool…… Right?
● Compile-time memory safety
● Zero-cost abstraction
● Fearless concurrency
● Runtime engine not required
● FFI-able design
● Embed-able toolchain
● IT IS THE BEST COMPILED LANGUAGE EVER!!!11!!1!!!!
5. And Python is quite nice…… Isn’t it?
● Feature-rich standard library
● Partially prototype-based OOP
● (Relatively) Easy metaprogramming
● Multi-paradigm
● Syntax is hip af
● It works on your machine as well™
● IT IS THE BEST SCRIPTING LANGUAGE EVER!!!!!11!!
6. Imagination time!
● I have a Rust
○ which is hip in and of itself
● I have a Python
○ which used to be hip in and of itself
UH!
● Rust + Python! (or something)
○ which has to be hip af right? SO INTERESTING OMFG
“자, 재밌는 상상 한 번 해 보자고.” - Some random
dude
7. Heap Hip overflow — how?
● The big question: HOW DO WE DOUBLE THE HIP?
● Two of many ways to achieve hip²
1. Python-based: Building Rust for Python
2. Rust-based: Building Python for Rust
9. Python ❤️ Extension
● Python can be extended using C or C++
● Extensions - Python function with native code
● Python is slow af
○ Keras
○ TensorFlow
○ PyTorch
○ NumPy
○ SciPy
○ ...anything that requires heavy calculations
10. Where Python loses its strength…
● C/C++ extension requires...
○ Manual memory management and fun times free()-ing stuff
○ Manual reference counting with Py_INCREF and Py_DECREF macros
○ Saying bye bye to memory safety
“Why bother using Python, when you have C?”
11. Here comes a new challenger!
● Rust can fix these issues
○ Memory management? -> Leave that to the Borrow Checker™
○ Reference counting? -> Leave that to the Borrow Checker™
○ Memory safety? -> Leave that to the Borrow Checker™
● Make native Python more Python-y!
12. Sure, but we want the juice of it
● The most important stuff: PERFORMANCE!
● Simple implementation of Sieve of Eratosthenes
13. Performance Battle (ver. Python)
● Only 11 lines!
● Basically looks like a
pseudocode
○ (and it is basically a
pseudocode)
● It takes about 25ms to sieve
out 100,000 numbers
○ i7-9700K, btw
14. Performance Battle (ver. C)
● Relatively massive
● Some if statements for memory
safety
○ I forgot malloc safety check as
well
● It takes about 700µs to sieve
out 100,000 numbers
○ Same, i7-9700K
15. Performance Battle (ver. Rust + PyO3)
● Simpler than the C code
● Resembles Python more
● Requires two functions
○ Usually they are separated
● It takes about 670µs to sieve
out 100,000 numbers
○ Again, i7-9700K
16. Performance battle result
● Jesus Christ, Python is slow
● In most cases, Rust is as fast as C
● In most cases, Rust requires less memory-related code
=> Rust is enough to replace C for Python extensions!
18. There are loads of Pythons out there
● CPython - The “Reference”
● PyPy - The Ouroboros of Infinity
● MicroPython - The Featherweight Warrior
● Jython - Python with a cup of coffee
● IronPython - Python got Microsoft’d
Why another one?
19. “One of the reasons is
that… I wanted to
learn Rust.”
- Windel Bouwman
20. Learning Rust by making a Python interpreter
● Currently RustPython project has 5M+ lines of code
● In the beginning, it used to be really simple
○ https://github.com/windelbouwman/rspython
● Now it is fully (kinda) functional Python 3.5 interpreter
21. Yeah, but why?
Let’s pull out the C-equivalent of p[key], where p is dict:
PyObject *PyDict_GetItem(PyObject *p, PyObject *key);
From the dict
object
...find by key...and return the
borrowed reference
22. Yeah, but why? (Cont’d)
PyObject *PyDict_GetItem(PyObject *p, PyObject *key);
From the dict
object
...find by key...if no match,
return NULL
(no exception)
23. Yeah, but why? (Cont’d)
Because Python is GC’d language:
PyObject *PyDict_GetItem(PyObject *p, PyObject *key);
Keeps reference
counter of its own
Keeps reference
counter of its own
Keeps reference
counter of its own
24. Yeah, but why? (Cont’d)
● Here are some Rust features:
○ Rust ships with Borrow Checker to enforce strict borrowing rules.
○ Rust has a type called Result<T, E> to indicate a recoverable error.
○ Rust has a type called Rc to simplify reference counting.
● Sounds familiar yet?
25. Boy-meets-girl: an all-time classic
● Python interpreter’s benefit
○ Borrow Checker
○ Rust Standard Library
○ Cargo and Rust Packages
○ Memory Safety
○ WebAssembly
● The Holy Grail of Hipness
26. How RustPython sees Python
RustPython Interpreter
Design
AST
Byte
code
Source
27. Lexer & Parser
● Python grammar is painful
● Not context-free language
○ i.e. Indentation
● Two ways to solve issue:
1. Parser-lexer feedback loop
2. “Terminalize” indentation
● Possible to form context-free
grammar out of this spec
○ INDENT and DEDENT
○ Lexing rules are not CF
○ Parsing rules can be CF
○ LL(2) parser can be constructed
28. Compiler
● Python virtual machine only
understands bytecode
● AST to Bytecode
● Bytecode often reside in memory
● py_compile.compile(file)
○ Python2-> ./xxx.pyc
○ Python3-> ./__pycache__/xxx.pyc
29. Bytecode
● Python bytecode is not standardized
● Bytecode is subject to change
● Yet CPython has pretty comprehensive documents
○ https://docs.python.org/3/library/dis.html
30. Some remarks about Bytecode
● Python can be used without .py
source code
○ .pyc file has all the info
● Recovery of original source
code possible
○ e.g. DDLC
● Python bytecode is not
optimized well
○ “Python is about having the
simplest, dumbest compiler
imaginable.”
- Guido van Rossum, our Savior
Optimization Checklist
✓ Constant folding
✓ Immutable allocation
optimization
✗ Unused local variable
elimination
✗ Unnecessary intermediate object
elimination
✗ Loop optimization
✗ Tail recursion optimization
✗ ...and pretty much anything
else
31. RustPython Bytecode
● RustPython does not
produce bytecode file…
○ Say bye to marshal
● Separated into a crate
○ rustpython-bytecode
● Rather simple
architecture
○ no INPLACE_* or
other advanced stuff
● Massive dispatch loop
32. Virtual Machine
● Reads bytecode, executes the
darn thing
● Keeps track of runtime info
○ Frames
○ Imported modules
○ Settings
○ Context
○ All builtins
33. Virtual Machine: the good parts
● Honestly bytecode routine is
not fun at all
○ Read byte -> match instruction
-> dispatch -> go back
● The real fun stuff
○ How PyObject is implemented
○ __builtin__ hellfire mess
○ ByRef and ByVal in Python
○ Rust HashMap v. Python __hash__
○ Metaprogramming
34. Alright, now what?
● Why RustPython instead of CPython?
○ Native WebAssembly support
○ Guaranteed memory safety
○ Clean, readable codebase
○ Lots of things to learn
● Some projects started picking up
○ pyckitup 2D game engine
○ codingworkshops.org educational website
35. Can it really stand against CPython?
● Native integration is not
working yet
● Still lots of improvements
needed
○ Some features work on 🅱️in
🅱️ows only
○ It targets WASM but...
● Not very optimized
○ around x16 slower than CPython
○ Sub-optimal data structure
design
37. Alright, I know, let’s face it
● Rust is not the best
○ Any *good* programmer can make manageable code
○ Compilation takes eternity
○ Honestly, wtf is borrow checking
○ “OK, here’s langserver, deal with this crap”
○ Static linkage creates bloated binaries
○ Except libc, because reasons
38. Alright, I know, let’s face it (cont’d)
● Python is not the best
○ Honestly the “scope-by-whitespace” is an unintelligible mess
○ lol no proper threadings
○ Why no switch-case? WHY?
○ async is a function but no, it’s a generator, but still a function
○ Stop using Python2 already goddammit
○ Basically no optimization is made during compilation stage
39. Bottom line
● Rust can replace C, but cannot replace C++
○ Modern C++ has many features that help managing memories
○ Partial functional programming support is neat
○ Template-based metaprogramming is scalable enough
● Rust has potential
○ Data science
○ Compilation time is getting faster (for real)
○ Still better than golang, no?
40. Bottom line
● Python has its uses, but nothing more
○ Pseudocode must remain pseudocode
○ Great scripting engine to make simple CLI tools
■ Ruby, no one cares about that language anymore :(
■ “Perl is worse than Python because people wanted it worse.”
■ JavaScript, we don’t want another 120+MB of dependencies
■ Shell Script is useful, but complex logic is painful
● Stop giving Python a life support
○ Python 2 has fallen cold-dead, long live Python 3
○ Stop shoving more features into the poor thing
41. Still I am a hipster-
wannabe madman.
(Objectively speaking)