How to Build an Instagram Clone App With React Native
Programming Languages: Python Apps Might Soon Be Running On Android - ZDNET
Thanks in part to the rise of machine learning, programming language Python is hugely popular with developers, but so far mobile devices have been no place for Python applications.
Yet Python creator Guido van Rossum and some Python developers hope that apps written in Python may one day run natively on iOS and Android devices. That could happen thanks to BeeWare, an open-source project headed up Russell Keith-Magee, which is porting CPython to Android, so apps written in Python can run natively on Android.
In February, Keith-Magee announced the project's first major Android milestone after getting a 'pure' Python application to run on an Android device. He gave an update at the 2020 Python Language Summit, which was held online this year due to the coronavirus pandemic.
SEE: Six in-demand programming languages: Getting started (free PDF)
BeeWare is aiming to let developers write apps in Python and get that code running everywhere using user interface (UI) widgets. It wants to help developers write Python apps using the same codebase running on iOS, Android, Windows, macOS, Linux, browsers, and tvOS.
CPython is the reference implementation of the open-source Python language used by other implementations such as Jython, which is written in Java that relies on a Java virtual machine (JVM). But Python is not cut out for mobile in the way it has been for desktop systems.
To address this shortcoming, last year the Python Software Foundation awarded the BeeWare project a $50,000 grant to bring its level of Android support up to par with its tools for iOS. The CPython Android port would have to support most modern Android hardware running version 4.4 or later.
"BeeWare's Android strategy was to compile Python to Java bytecode, but Android devices are now fast enough, and the Android kernel permissive enough, to run CPython itself," said A Jesse Jiryu Davis, an engineer at MongoDB and a Python contributor.
Davis said a major obstacle was the size of Android apps written in Python because they require their own copy of the Python runtime, meaning Python needed to be shrunk down for mobile.
Some have suggested solving this problem by creating a stripped-back 'kernel' version of Python – an idea that Keith-Magee believes could solve many Python mobile challenges, in combination with a package installer (pip) that lets developers install packages for a target platform rather than just the system it's running on.
"To regular Python programmers, the mobile environment is an alien planet," explains Davis. "There are no subprocesses; sockets, pipes and signals all behave differently than on regular Unix; and many syscalls are prohibited.
"TLS certificate handling on Android is particularly quirky. For the CPython test suite to pass on mobile, it must skip the numerous tests that use fork or spawn, or use signals, or any other APIs that are different or absent."
SEE: Data science interest spikes with COVID-19: Here are the online courses to get you started
Keith-Magee reckons more mature Android support means CPython contributors "can have a serious conversation about how we get these changes merged into CPython itself". So now the question is whether CPython developers will be interested in bringing mobile Python into the core.
The good news is that van Rossum has endorsed mobile support in the long term, according to Davis.
But there are big obstacles. According to Ned Deily, a Python core developer at PSF, delivering mobile support will require more money and people than many other Python initiatives.
On top of this, Davis notes that Python has a chicken and egg problem on mobile: "There is no corporate funding for Python on mobile because Python doesn't support mobile, so there is no one relying on mobile Python who is motivated to fund it."
More on Python and programming languagesProgramming Languages: Why Python Hasn't Taken Off On Mobile ... - ZDNET
Guido van Rossum, the creator of the hugely popular Python programming language, has given his thoughts on the language for the browser, mobile devices, and upcoming rivals like Julia.
ZDNET Recommends Where to learn the most popular programming languagesHere's a look at the courses you'll need to learn these programming languages.
Read nowVan Rossum, the former "Benevolent dictator for life" of Python has, since November, been working at Microsoft as a distinguished engineer, helping the software giant give back to the Python community who have helped make his creation one of the most popular programming languages today, thanks to the rise of machine learning and data science.
He's made a few announcements over the past few weeks in line with the PyCon 2021 conference, including that there is a plan to double the speed of CPython, the most widely used implementation of the language. Microsoft has funded a small Python team led by van Rossum to "take charge of performance improvements" in the interpreted language.
SEE: Hiring Kit: Python developer (TechRepublic Premium)
But mobile app development is one of the key growth fields that Python hasn't gained any traction in, despite it dominating in machine learning with libraries like NumPy and Google's TensorFlow, as well as backend services automation. Python isn't exactly boxed into high-end hardware, but that's where it's gravitated to and it's been left out of mobile and the browser, even if it's popular on the backend of these services, he said.
Why? Python simply guzzles too much memory and energy from hardware, he said. For similar reasons, he said Python probably doesn't have a future in the browser despite WebAssembly, a standard that is helping make more powerful applications on websites.
Mobile app development in Python is a "bit of a sore point", said van Rossum in a recent video Q&A for Microsoft Reactor.
"It would be nice if mobile apps could be written in Python. There are actually a few people working on that but CPython has 30 years of history where it's been built for an environment that is a workstation, a desktop or a server and it expects that kind of environment and the users expect that kind of environment," he said.
"The people who have managed to cross-compile CPython to run on an Android tablet or even on iOS, they find that it eats up a lot of resources," he said. "Compared to what the mobile operating systems expect, Python is big and slow. It uses a lot of battery charge, so if you're coding in Python you would probably very quickly run down your battery and quickly run out of memory," he said.
But Python is popular for backend web services, although he said that JavaScript dominates frontend web development. Increasingly, Microsoft's JavaScript superset TypeScript is being used by web developers.
"Python is a pretty popular language [at the backend]. At Google I worked on projects that were sort of built on Python, although most Google stuff wasn't. At Dropbox, the whole Dropbox server is built on Python. On the other hand, if you look at what runs in the browser, that's the world of JavaScript and unless it translates to JavaScript, you can't run it," van Rossum said.
"I don't mind so much different languages have to have different goals i mean nobody is asking Rust when you can write Rust in the browser; at least that wouldn't seem a useful sort of target for Rust either. Python should focus on the application areas where it's good and for the web that's the backend and for scientific data processing."
Python's benevolent dictator also had some words for would-be rival language in scientific computing and machine learning, Julia, a language that is gaining in popularity but doesn't have the wealth of machine-learning and data-science libraries Python has.
Developers wonder whether Julia will remain a niche language or if it has the potential to reach the heights of Python. Van Rossum said Julia, which emerged from MIT, was an "interesting take on something Python-like."
"[Julia] has enough details that are very similar to Python that when you realize, oh, but all the indexing is one ranges are inclusive instead of exclusive, you think arrgggh!"
"Nobody should ever try to code in Julia and in Python on the same day," he joked, describing it as a "niche language" compared to Python.
But he added: "If you're in that niche, it is superior because the compiler optimizes your code in a way that Python probably never will. On the other hand it is much more limited in other areas and I wouldn't expect that anybody ever is going to write a web server in Julia and get a lot of mileage out of it." Van Rossum is also fan of Rust but he reckons Google-created Go is the most "Pythonic" of all the new languages.
Developer It's the end of programming as we know it -- again Developers feel secure in their jobs, but they're still thinking about quitting The future of the web will need a different sort of software developer The best Linux laptops for consumers and developersPython Tutorial App 'Tinkerstellar' Now Has An IPhone Version
I wrote last year about Tinkerstellar, a new iPad app inspired by Apple's Swift Playground that's designed to help people learn Python through multiple interactive lessons. Tinkerstellar is now getting a major update, adding new lessons, a refreshed interface, and for the first time, an iPhone version.
What's new with Tinkerstellar 2.0 Tinkerstellar was first developed with the iPad in mind. However, as detailed by the developer, the app now works with the iPhone as well. This means that users can have all the same Python tutorials available on the iPad right from their pockets. With the iPhone version, Tinkerstellar also introduces a refreshed design. The Explore tab has been completely redesigned, and labs are now organized by topic, making it easier to discover new content. The app is also getting a Personal Library, so users can track their learning progress and manage downloaded tutorials from a single place. Under the hood, Tinkerstellar 2.0 comes with many improvements, such as support for Python 3.10 and improved stability. But more than that, the new version also adds multiple new tutorials. The labs now cover a range of topics, from Python essentials to advanced apps for networking, web scraping, data visualization, machine learning, and more. As before, there's no need to configure programming environments or depend on a network connection — Tinkerstellar's coding labs come fully equipped with everything you need, allowing you to practice with real-world data, libraries, and APIs offline, directly on your device. While the app remains available for free, the new courses are available as in-app purchases ranging from $1.49 to $2.99 each.
Comments
Post a Comment