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 anyone can contribute to open source software in their job

Imagine a world where your software works perfectly for you. It meets your needs, does things your way, and is the ideal tool to achieve great things toward your goals. Open source software stems from these roots. Many projects are built by engineers that have a problem and build a solution to solve it. Then they openly share their solution with others to use and improve. Unfortunately, building software is hard. Not everyone has the expertise to build software that works perfectly for their needs. And if the software developers building applications don't fully understand users' needs and how they do their job, the solutions they build may not meet the users' needs and may accidentally create a lot of gaps. Read more

5 open source tools I can't live without

Some time ago, I engaged with a Twitter thread that went viral among techies. The challenge? Pick only five tools that you cannot live without. I started to think about this in relation to my everyday life, and picking just five tools was not easy. I use many tools that I consider essential, such as my IRC client to connect with my colleagues and friends (yes, I still use IRC), a good text editor to hack on things, a calendar app to keep organized, and a videoconferencing platform when more direct interaction is needed. So let me put a twist on this challenge: Pick just five open source tools that boost your productivity. Here's my list; please share yours in the comments. Read more

How to Install Microsoft Edge Browser in Ubuntu and Other Linux

This guide explains the steps required to install Microsoft Edge Browser in Ubuntu and Other Linux. We explain both graphical and UI methods. Read more

today's leftovers

  • A Quick Look At Ubuntu 20.04 LTS vs. 20.10 With The Core i9 10900K - Phoronix

    With Ubuntu 20.10 due for release this week I have begun testing near-final Ubuntu 20.10 builds on many more systems in the lab. Larger than our normal distribution/OS comparisons, here is the culmination of running hundreds of benchmarks (366 tests to be exact) under both Ubuntu 20.04 LTS with all available updates and then again on the Ubuntu 20.10 development state while testing on Intel Comet Lake. Aside from specific improvements for bleeding-edge hardware like Intel Tiger Lake performing better on Ubuntu 20.10 or when looking at cases like the Intel and Radeon graphics performance being better on Ubuntu 20.10 due to the newer Linux kernel and Mesa, for general CPU/system workloads the performance has largely been found to be similar to that of Ubuntu 20.04 LTS. The other caveat is for workloads being built from source, Ubuntu 20.10 now ships with GCC 10 rather than GCC 9. GCC 10 doesn't normally yield any night-and-day differences in performance but in some cases for newer CPU microarchitectures there has been some improvements there or with features like LTO.

  • TSDgeos' blog: Make sure KDE software is usable in your language, join KDE translations!

    Translations are a vital part of software. More technical people often overlook it because they understand English well enough to use the software untranslated, but only 15% of the World understands English, so it's clear we need good translations to make our software more useful to the rest of the world. Translations are a place that [almost] always needs help, so I would encourage you to me (aacid@kde.org) if you are interested in helping. Sadly, some of our teams are not very active, so you may find yourself alone, it can be a bit daunting at the beginning, but the rest of us in kde-i18n-doc will help you along the way :)

  • News – WordPress 5.6 Beta 1 – WordPress.org

    WordPress 5.6 Beta 1 is now available for testing! This software is still in development, so we recommend that you run this version on a test site. [...] The current target for final release is December 8, 2020. This is just seven weeks away, so your help is needed to ensure this release is tested properly.

  • Google Patches Bug Used in Active Attacks Against Chrome

    Google has discovered and patched a serious vulnerability in Chrome that attackers are actively exploiting at the moment. The bug is a high-severity heap buffer overflow in FreeType, a free font-rendering engine that Chrome, among many other projects, uses. A member of Google’s Project Zero vulnerability research team discovered the vulnerability and subsequently found that attackers were already exploiting it. Google patched the flaw in Chrome 86.0.4240.111 for desktop browsers and the maintainers of the FreeType Project pushed out an emergency release of the library to fix it, as well. “I've just fixed a heap buffer overflow that can happen for some malformed .ttf files with PNG sbit glyphs. It seems that this vulnerability gets already actively used in the wild, so I ask all users to apply the corresponding commit as soon as possible,” Werner Lemberg, one of the original authors of the FreeType, said in an email to the FreeType announcement mailing list.

  • FreeType 2.10.4 Rushed Out As Emergency Security Release

    The FreeType text rendering library is out with version 2.10.4 today as an important security update.

  • Intel: replace thermal compound “every few years”

    Thermal compound (sometimes called thermal paste or grease) is applied to fill minuscule gaps in the materials in the heat spreader (the metal covering on top of the processor) and the heatsink. Eliminating these gaps is essential to ensuring efficient heat transfer into the heatsink. The thermal compound that is used in your computer generally won’t go bad or degrade in its useful lifespan. It will get displaced over time, however. You’d need higher temperatures than what you’ll typically find in a computer for other failure modes to come into effect. The displacement is caused by thermal cycling that results in an effect known as “thermally induced pump-out.” As the components heat up and cool down, the processors’ heat spreader (its metal top) and the heatsink will expand and contract. This effect will, over time, pump the thermal compound out from in between the two metal plates. You can find illustrations and a more technical explanation in the source links below.