Open-source News

Mesa Radeon Driver "RADV" Ray-Tracing Performance Becoming Viable For Linux Gaming

Phoronix - Wed, 09/21/2022 - 17:23
In addition to a ~10% performance boost seen yesterday for RADV ray-tracing performance with Quake II RTX, another merge request also made it to Mesa 22.3 for much more significantly bolstering the RADV ray-tracing performance. With all of the recent RADV ray-tracing work, we are finally reaching a point where it's becoming viable for Linux gamers on this open-source driver...

GCC Progressing On OpenMP 5.x, OpenACC 2.7+ GPU Offloading & More AMD Improvements

Phoronix - Wed, 09/21/2022 - 17:07
This past weekend was the GNU Tools Cauldron where Siemens presented a status update on the work around GPU accelerator offloading for the GNU Compiler Collection (GCC) and the work being done around OpenMP and OpenACC support...

Sound Open Firmware 2.3 Released With Support For AMD Rembrandt, Intel Raptor Lake

Phoronix - Wed, 09/21/2022 - 16:49
Sound Open Firmware is what started as an open-source Intel effort to push towards more open sound/DSP firmware and has grown since that point into a Linux Foundation project also supported by other vendors like Mediatek, AMD, Realtek, and others. Sound Open Firmware 2.3 was released on Tuesday as the latest advancement for this open-source audio DSP firmware stack...

AMD Hardware Ray-Tracing Hopes To Be Ready For Blender 3.5

Phoronix - Wed, 09/21/2022 - 16:39
While Blender 3.2 introduced AMD HIP on Linux support for GPU acceleration and the recent Blender 3.3 extended the AMD GPU Cycles acceleration back to GFX9/Vega GPUs, for those wanting AMD ray-tracing support within Blender it's not expected to come until Blender 3.5...

6 Python interpreters to try in 2022

opensource.com - Wed, 09/21/2022 - 15:00
6 Python interpreters to try in 2022 Stephan Avenwedde Wed, 09/21/2022 - 03:00

Python, one of the most popular programming languages, requires an interpreter to execute the instructions defined by the Python code. In contrast to other languages, which compile directly into machine code, it’s up to the interpreter to read Python code and translate its instructions for the CPU performing the related actions. There are several interpreters out there, and in this article, I’ll take a look at a few of them.

Primer to interpreters

When talking about the Python interpreter, it’s usually the /usr/bin/python binary being referred to. That lets you execute a .py file.
However, interpreting is just one task. Before a line of Python code is actually executed on the CPU, these four steps are involved:

  1. Lexing - The human-made source code is converted into a sequence of logical entities, the so called lexical tokens.
  2. Parsing - In the parser, the lexical tokens are checked in regards of syntax and grammar. The output of the parser is an abstract syntax tree (AST).
  3. Compiling - Based on the AST, the compiler creates Python bytecode. The bytecode consists of very basic, platform independent instructions.
  4. Interpreting - The interpreter takes the bytecode and performs the specified operations.

As you can see, a lot of steps are required before any real action is taken. It makes sense to take a closer look at the different interpreters.

1. CPython

CPython is the reference implementation of Python and the default on many systems. As the name suggests, CPython is written in C.
As a result, it is possible to write extensions in C and therefore make the widley used C based library code available to Python. CPython is available on a wide range of platforms including ARM, iOS, and RISC. However, as the reference implementation of the language, CPython is carefully optimized and not focused on speed.

2. Pyston

Pyston is a fork of the CPython interpreter which implements performance optimizations. The project describes itself as a replacement of the standard CPython interpreter for large, real-world applications with a speedup potential up to 30%. Due to the lack of compatible binary packages, Pyston packages must be recompiled during the download process.

3. PyPy

PyPy is a Just-in-time (JIT) compiler for Python which is written in RPython, a statically typed subset of Python. In contrast to the CPython interpreter, PyPy compiles to machine code which can be directly executed by the CPU. PyPy is the playground for Python developers where they can experiment with new features more easily.

PyPy is faster than the reference CPython implementation. Because of the nature of JIT compiler, only applications that have been running for a long time benefit from caching.  PyPy can act as a replacement for CPython. There is a drawback, though. C-extension modules are mostly supported, but they run slower than a Python one. PyPy extension modules are written in Python (not C) and so the JIT compiler is able to optimized them. As long as your application isn't dependent on incompatible modules, PyPy is a great replacement for CPython. There is a dedicated page on the project website which describes the differences to CPython in detail: Diffrences between PyPy and CPython

4. RustPython

As the name suggest, RustPython is a Python interpreter written in Rust. Although the Rust programming language is quite new, it has been gaining popularity and is a candidate to be a successor of C and C++. By default, RustPython behaves like the interpreter of CPython but it also has a JIT compiler which can be enabled optionally. Another nice feature is that the Rust toolchain allows you to directly compile to WebAssembly and also allows you to run the interpreter completely in the browser. A demo of it can be found at rustpython.github.com/demo.

5. Stackless Python

Stackless Python describes itself as an enhanced version of the Python programming language. The project is basically a fork of the CPython interpreter which adds microthreads, channels and a scheduler to the language. Microthreads allow you to structure your code into tasklets which let you run your code in parallel. This approach is comparable to using green threads of the greenlet module. Channels can be used for bidirectional communication between tasklets. A famous user of Stackless Python is the MMORPG Eve Online.

More Python resources What is an IDE? Cheat sheet: Python 3.7 for beginners Top Python GUI frameworks Download: 7 essential PyPI libraries Red Hat Developers Latest Python articles 6. Micro Python

MicroPython is the way to go if you target micro controllers. It is a lean implementation that only requires 16kB of RAM and 256kB of space. Due to the embedded environment which it is intended for, MicroPython’s standard library is only a subset of CPython’s extensive STL. For developing and testing or as a lightweight alternative, MicroPython also runs on ordinary x86 and x64 machines. MicroPython is available for Linux, Windows, as well as many microcontrollers.

Performance

By design, Python is an inherently slow language. Depending on the task, there are significant performance differences between the interpreters. To get an overview of which interpreter is the best pick for a certain task, refer to pybenchmarks.org. An alternative to using an interpreter is to compile Python binary code directly into machine code. Nuitka, for example, is one of those projects which can compile Python code to C code and from C to machine code. The C code is then compiled to machine code using an ordinary C compiler. The topic of Python compilers is quite comprehensive and worth a separate article.

Summary

Python is a wonderful language for rapid prototyping and automating tasks. Additionally, it is easy to learn and well suited for beginners. If you usually stick with CPython, it could be interesting to see how your code behaves on another interpreter. If you use Fedora, you can easily test a few other interpreters as the package manager already provides the right binaries. Check out fedora.developer.org for more information.

It could be interesting to see how your code behaves on another interpreter than what you're used to.

Image by:

WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0

Python Programming What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

My favorite open source alternatives to Notion

opensource.com - Wed, 09/21/2022 - 15:00
My favorite open source alternatives to Notion Amar Gandhi Wed, 09/21/2022 - 03:00

If you have notes to yourself scattered throughout your hard drive, you might need a notes application to collect and organize your personal reminders. A notes system can help you track ideas, important tasks, and works in progress. A popular application that isn't open source is Notion, but here are two options that respect your privacy and data.

Standard Notes

Standard Notes is an open source (AGPL 3.0 license) notes application featuring a password manager, a to-do list, and, of course, a great system for writing and storing notes.

One of the most important things about taking notes is finding them again, so organization is critical. Standard Notes uses an intuitive and natural tagging system to help you organize your content. You assign hashtags to each note to classify it.

Standard Notes is extensible through plug-ins. There are plug-ins for LaTeX, Markdown, code snippets, spreadsheets, and more. There's even an option to publish to a blogging platform, should you want to make some of your notes public.

Image by:

(Amir Gandhi, CC BY-SA 4.0)

Standard Notes also boasts numerous backup options, including email and cloud services. Furthermore, Standard Notes can work on any platform, including Linux, Windows, macOS, and Chrome OS.

More great content Free online course: RHEL technical overview Learn advanced Linux commands Download cheat sheets Find an open source alternative Explore open source resources Self-hosting Standard Notes

Standard Notes can be self-hosted. The developers provide a script that runs the application in a container, making it to run almost anywhere. If you've yet to explore containers, then you can get up to speed with Opensource.com's introduction to running applications in containers.

Another option is to use the hosted version provided by Standard Notes.

The development of Standard Notes can be followed on its Git repository.

Trilium

Trilium is a notes application that visually resembles Notion in many ways. It can handle various data types, including images, tables, to-do lists, highlighting, mind maps, flowcharts, family trees, code blocks, and more.

Trilium has several mechanisms to help you organize both your thoughts and your notes. You can view a history of recent changes, a global map of all your notes, note categories, or you can search for notes and contents.

Image by:

(Amir Gandhi, CC BY-SA 4.0)

You can install Trilium as a Flatpak from Flathub, or you can install it on your own server as a container. Alternatively, you can use Trilium's hosted instance.

Take note

There are plenty of useful note-taking applications in the open source world, and both Standard Notes and Trilium are designed with your data as the top priority. You can import and export data from these applications, so it's safe to try them out. You'll always have access to your data, so give Standard Notes or Trilium a try.

There are lots of useful open source note-taking tools out there. Standard Notes and Trilium are designed with your data as the top priority.

Alternatives What to read next 5 note-taking apps for Linux This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

20 mysqladmin Commands for MYSQL/MariaDB Database Administration

Tecmint - Wed, 09/21/2022 - 13:56
The post 20 mysqladmin Commands for MYSQL/MariaDB Database Administration first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

mysqladmin is a command-line database administration utility that comes with MySQL/MariaDB server, which is used by Database Administrators to perform some basic MySQL tasks such as setting the root password, changing the root password,

The post 20 mysqladmin Commands for MYSQL/MariaDB Database Administration first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Customer success stories: How Red Hat is helping organizations save money, enhance customer experience and improve uptime

Red Hat News - Wed, 09/21/2022 - 12:00

In this month’s customer success highlights, learn how three companies are making use of Red Hat OpenShift, Red Hat Ansible Automation Platform and Red Hat Satellite to save money, enhance customer experience and improve both uptime and security posture.

Mesa 22.2 Released With AMD RDNA3 Prep, Intel Arc Graphics, Many Vulkan Improvements

Phoronix - Wed, 09/21/2022 - 07:16
The belated Mesa 22.2 was unexpectedly released today for providing the very latest open-source Linux graphics driver support not only for Intel and AMD Radeon graphics hardware but also the reverse-engineered Nouveau (NVIDIA) driver and the many smaller drivers like Etnaviv, Mali, Panfrost, the new PowerVR Vulkan driver, and the software drivers like LLVMpipe and Zink...

NVIDIA 515.76 Driver Released With Bug Fixes, Linux 6.0 Compatibility

Phoronix - Wed, 09/21/2022 - 06:45
While not as exciting as this morning's GTC 2022 keynote and the introduction of the GeForce RTX 40 series, NVIDIA today released 515.76 as their latest production series Linux driver build...

Wasmtime 1.0 Released - Bytecode Alliance Declares It Production Ready

Phoronix - Wed, 09/21/2022 - 03:03
Way back in 2019 Intel, Mozilla, and Red Hat started the Bytecode Alliance as an initiative to promote running WebAssembly "everywhere" and expand the scope of WASM outside of the web browser. After being in development now for three years, Wasmtime 1.0 was released for this production-ready WebAssembly runtime...

FileRun on Docker - Linux Journal

Google News - Wed, 09/21/2022 - 01:10
FileRun on Docker  Linux Journal

NVIDIA Announces Open-Source CV-CUDA Project

Phoronix - Wed, 09/21/2022 - 00:22
Alongside the GeForce RTX 40 series debut and many other announcements today during the NVIDIA GTC 2022 keynote by Jensen Huang, CV-CUDA was announced as NVIDIA's newest open-source project...

Pages