Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development

  • How to Create Audiobooks Using Python – Linux Hint

    As you might already know, Python is a wonderful programming tool because it allows us to do virtually anything! This also means that we can create our own software. In this tutorial, we will learn to synthesize speech, get Python to read pdfs, even translate them for us, and then read them to us.

    What we’re going to do here is to get Python to read us a pdf, and translate it for us. First, we’ll try to create an English audiobook. As such, the first thing we must logically do is to extract the text from the pdf. For this, we use the module known as tika. As usual, to install Tika, one conjures pip.

  • Rakudo Weekly News: 2021.29 Scheduled To 3

    After a lot of discussion, Andrew Shitov has announced the schedule of the first ever Raku Conference (online on 6, 7 and 8 August 2021). Yes, you read that right: 3 days! One track per day.

  • Nibble Stew: A quick look at the O3DE game engine and building it with Meson

    Earlier today I livestreamed what it would take to build a small part of the recently open sourced O3DE game engine. The attempt did not get very far, so here is a followup. It should not be considered exhaustive in any way, it is literally just me poking the code for a few hours and writing down what was discovered.

  • Use GDB Print Stack Trace of Core File

    If you have been programming for a while, you have come across the term core dump.
    If you look at the core man page, it defines as core dump as “a file containing an image of the process’s memory at the time of termination. This image can be used in a debugger (e.g.) gdb to inspect the state of the program at the time that it terminated”.

    In simple terms, a core dump file is a file that contains memory information about a process when the specific process terminates.

    There are various reasons why processes may crash and create a core dump file. This tutorial will show you how to use GDB to view the core dump file and print the stack trace.

  • Calling getpid function in C with Examples – Linux Hint

    Getpid() is the function used to get the process ID of the process that calls that function. The PID for the initial process is 1, and then each new process is assigned a new Id. It is a simple approach to getting the PID. This function only helps you in getting the unique processes ids.

    Functions used in getting ids

    Two types of IDs are present here. One is the current id of the process PID. Whereas the other is the id of the parent process PPID. Both these functions are built-in functions that are defined in library. While running the code without using this library may cause an error and stops executing.

  • C String Concatenation – Linux Hint

    Concatenation is the process to append second string to the end of first string. In this article we are going to discuss how to concatenate strings in C by using different methods.

    The standard C library function which is used to concatenate string is strcat().

  • Quick Sort in Java Explained

    Quick Sort, also written as Quicksort, is a list sorting scheme that uses the divide-and-conquer paradigm. There are different schemes for Quick Sort, all using the divide-and-conquer paradigm. Before explaining Quick Sort, the reader must know the convention for halving a list or sub-list and the median of three values.

    [...]

    What about the case, when the number of elements in the list or sub-list is odd? At the start, the length is still divided by 2. By convention, the number of elements in the first half of this division is length / 2 + 1/2. Index counting begins from zero. The middle index is given by length / 2 – 1/2. This is considered as the middle term, by convention. For example, if the number of elements in a list is 5, then the middle index is 2 = 5/2 – 1/2. And, there are three elements in the first half of the list and two elements in the second half. The middle element of the whole list is the third element at index, 2, which is the middle index because index counting begins from 0.

More in Tux Machines

Graphics: RenderDoc, Mesa, and Vulkan

  • RenderDoc 1.17 Released For This Leading Open-Source Graphics Debugging Tool - Phoronix

    RenderDoc 1.17 released this week as the newest version of this leading cross-platform, cross-API graphics debugging utility. RendertDoc 1.17 continues to be a gem for developers working with Vulkan and OpenGL along with Direct3D 11/12. RenderDoc as the MIT-licensed frame-capture-based graphics debugger works extremely well for game/engine developers as well as GPU driver developers in working through different issues.

  • DMA-BUF Feedback Support For Wayland Lands In Mesa 22.0's EGL Code - Phoronix

    Landing in Mesa on Black Friday was DMA-BUF Feedback support within the EGL code as another important step forward for Wayland. Introduced earlier this week was Wayland Protocols 1.24 and the primary addition to that collection of protocols is DMA-BUF feedback support. The DMA-BUF "feedback" support is important for Wayland multi-GPU systems where needing to know more information about the GPU device used by the compositor and for being able to efficiently exchange buffers between the secondary and primary GPUs.

  • RADV Vulkan Driver Finally Adds VK_KHR_synchronization2 Support - Phoronix

    The Mesa Radeon Vulkan driver "RADV" has added support for the prominent VK_KHR_synchronization2 extension introduced earlier this year. Added back in February with Vulkan 1.2.170 was VK_KHR_synchronization2 for simplifying the core synchronization APIs of this industry-standard graphics API. VK_KHR_synchronization2 makes Vulkan synchronization handling easier to deal with Those interested in the changes with the "synchronization2" revision can see this Khronos blog post going over the Vulkan synchronization handling in detail along with the changes from this extension.

Kernel: Futex2, Fixes, and Other New Features for Linux 5.16

  • Futex2 Brings Linux Gaming To The Next Level - Invidious

    Futex2 has been a work in progress by Valve and collabora for a very long time and it seems like it's finally going to make it's way into the kernel.

  • Patch out for Alder Lake Linux bug that reminds of the Windows 11 Ryzen CPPC issue - Neowin

    Linux boss Linus Torvalds merged earlier today several important patches for Intel CPU generally related to performance states (P-states) on Linux.

  • Linux 5.16 Merges Fix For One Of The Intel Alder Lake Issues - Phoronix

    Merged this Friday afternoon into the Linux 5.16 development kernel is fixing a performance issue affecting some Intel Alder Lake motherboards. The fix merged a short time ago is the item previously covered within Linux ITMT Patch Fixes Intel "Alder Lake" Hybrid Handling For Some Systems. As explained in that prior article, TurboBoost Max 3.0 / ITMT (Turbo Boost Max Technology) code within the kernel isn't being enabled for some systems, particularly if overclocking or even any memory XMP / optimal settings. The ASUS Z690 board I've been primarily using for the i9-12900K was affected as are numerous other boards. I've also heard reports of some motherboards running purely stock are even having this issue.

  • Intel Preparing USI Stylus Support For Linux - Phoronix

    Intel open-source driver engineers have been working on USI stylus support for the Linux kernel. The Universal Stylus Initiative (USI) aims to offer interoperability of active styluses across touchscreen devices. The Universal Stylus Initiative has a goal of allowing all styluses that comply with USI to work across devices. USI is backed by the likes of Google who wants to see USI working uniformally across Chromebooks, Dell and other hardware vendors, Intel is also involved and leading the upstream Linux support patches, and peripheral vendors like Logitech are also supporting the standard. Other big names like Wacom, Samsung, and many other players from desktop to laptops to mobile.

Open Hardware/Modding With LineageOS and Arduino

  • Ham Radio Gets Brain Transplant | Hackaday

    Old radios didn’t have much in the way of smarts. But as digital synthesis became more common, radios often had as much digital electronics in them as RF circuits. The problem is that digital electronics get better and better every year, so what looked like high-tech one year is quaint the next. [IMSAI Guy] had an Icom IC-245 and decided to replace the digital electronics inside with — among other things — an Arduino.

  • My phone - November 2021

    My current phone is the Google Pixel 3a from 2019. It’s running the LineageOS operating system without the Open GApps stack (GApps is short for “Google Apps”). This means there’s no proprietary software or tracking from Google on the phone by default.

  • PiGlass V2 Embraces The New Raspberry Pi Zero 2 | Hackaday

    Well, that certainly didn’t take long. It’s been just about a month since the Raspberry Pi Zero 2 hit the market, and we’re already seeing folks revisit old projects to reap the benefits of the drop-in upgrade that provides five times the computational power in the same form factor. Take for example the PiGlass v2 that [Matt] has been working on. He originally put the Pi Zero wearable together back in 2018, and while it featured plenty of bells and whistles like a VuFine+ display, 5 MP camera, and bone conduction audio, the rather anemic hardware of the original Zero kept it from reaching its true potential.

October/November in KDE Itinerary

Since the last summary KDE Itinerary has been moving with big steps towards the upcoming 21.12 release, with work on individual transport modes, more convenient ticket access, trip editing, a new health certificate UI, better transfer handling and many more improvements.

New Features
Current ticket access A small but very convenient new addition is the “Current ticket” action, which immediately navigates you to the details page of the most current element on the itinerary. That comes in handy when having to show or scan your ticket and avoids having to find the right entry in the list in a rush. This action is now also accessible from jump list actions in the taskbar on Linux, or app shortcuts on Android. Combined with the easily accessible barcode scanmode mentioned last time it’s now just two clicks or taps to get ready for a ticket check. Read more