Language Selection

English French German Italian Portuguese Spanish

XML5 and Python Leftovers

Filed under
Development
  • The case for XML5

    My XML5 idea is over twelve years old now.

    [...]

    XML in browsers has much less of a compatibility footprint. Coupled with XML not always returning a tree for a given byte stream making backwards compatible (in the sense that old well-formed documents parse the same way) extensions to it is possible. There is a chance for it to ossify like text/html though, so perhaps XML5 ought to be amended somewhat to leave room for future changes.

  • Linting with Flake8

    For so long the word "Linting" meant nothing to me. It sounded like some supercoder leet speak that was way out of my league. Then I discovered flake8 and realised I was a fool.

    This article is a simple one. It covers what linting is; what Flake8 is and has an embarrassing example of it in use.

    Before we get started, I need to get something off my chest. I don't know why but I really hate the word "linting". It's a hatred akin to people and the word "moist".

  • PyPy's new JSON parser

    In the last year or two I have worked on and off on making PyPy's JSON faster, particularly when parsing large JSON files. In this post I am going to document those techniques and measure their performance impact. Note that I am quite a lot more constrained in what optimizations I can apply here, compared to some of the much more advanced approaches like Mison, Sparser or SimdJSON because I don't want to change the json.loads API that Python programs expect, and because I don't want to only support CPUs with wide SIMD extensions. With a more expressive API, more optimizations would be possible.
    There are a number of problems of working with huge JSON files: deserialization takes a long time on the one hand, and the resulting data structures often take a lot of memory (usually they can be many times bigger than the size of the file they originated from). Of course these problems are related, because allocating and initializing a big data structure takes longer than a smaller data structure. Therefore I always tried to attack both of these problems at the same time.
    One common theme of the techniques I am describing is that of optimizing the parser for how JSON files are typically used, not how they could theoretically be used. This is a similar approach to the way dynamic languages are optimized more generally: most JITs will optimize for typical patterns of usage, at the cost of less common usage patterns, which might even become slower as a result of the optimizations.

  • Getting Started with Python PyAutoGUI

    In this tutorial, we're going to learn how to use pyautogui library in Python 3. The PyAutoGUI library provides cross-platform support for managing mouse and keyboard operations through code to enable automation of tasks. The pyautogui library is also available for Python 2; however, we will be using Python 3 throughout the course of this tutorial.

    A tool like this has many applications, a few of which include taking screenshots, automating GUI testing (like Selenium), automating tasks that can only be done with a GUI, etc.

    Before you go ahead with this tutorial, please note that there are a few prerequisites. You should have a basic understanding of Python's syntax, and/or have done at least beginner level programming in some other language. Other than that, the tutorial is quite simple and easy to follow for beginners.

More in Tux Machines

How GNOME uses Git

“What’s your GitLab?” is one of the first questions I was asked on my first day working for the GNOME Foundation—the nonprofit that supports GNOME projects, including the desktop environment, GTK, and GStreamer. The person was referring to my username on GNOME’s GitLab instance. In my time with GNOME, I’ve been asked for my GitLab a lot. We use GitLab for basically everything. In a typical day, I get several issues and reference bug reports, and I occasionally need to modify a file. I don’t do this in the capacity of being a developer or a sysadmin. I’m involved with the Engagement and Inclusion & Diversity (I&D) teams. I write newsletters for Friends of GNOME and interview contributors to the project. I work on sponsorships for GNOME events. I don’t write code, and I use GitLab every day. Read more

NordPy: An Open-Source Linux Client for NordVPN

NordVPN is a personal VPN software with the main focus on protecting user privacy and granting them access to regionally restricted content. It features a strong encryption protocol with a no-log policy and works with north of 5700 servers in at least 60 countries. It is available for Linux, Windows, macOS, AndroidTV, Android, iOS and NAS platforms. It can also be manually set up on WiFi routers. NordVPN is one of the most recommended VPN services and while it continues to receive positive reviews from customers, developers are beginning to dedicate some time to it and this is how NordPy has come to be. NordPy is an open-source GUI client for Linux users who like NordVPN and it inherits all the features in the official NordVPN applications. Its feature list includes connection to OpenVPN or NetworkManager-OpenVPN via TCP and UDP, no DNS leak when using OpenVPN, Read more

Announcing Rustup 1.20.0

The rustup working group is happy to announce the release of rustup version 1.20.0. Rustup is the recommended tool to install Rust, a programming language that is empowering everyone to build reliable and efficient software. Read more Also Mozilla: Karl Dubost: This is not a remote work

today's howtos