Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Matthieu Caneill: Debsources, python3, and funky file names

    Rumors are running that python2 is not a thing anymore.

    Well, I'm certainly late to the party, but I'm happy to report that sources.debian.org is now running python3.

    [...]

    While transitioning to python3 and juggling left and right with str, bytes and unicode for internal objects, files, database entries and HTTP content, I stumbled upon a bug that has been there since day 1.

    Quick recap if you're unfamiliar with this tool: Debsources displays the content of the source packages in the Debian archive. In other words, it's a bit like GitHub, but for the Debian source code.

    And some pieces of software out there, that ended up in Debian packages, happen to contain files whose names can't be decoded to UTF-8. Interestingly enough, there's no such thing as a standard for file names: with a few exceptions that vary by operating system, any sequence of bytes can be a legit file name. And some sequences of bytes are not valid UTF-8.

    Of course those files are rare, and using ASCII characters to name a file is a much more common practice than using bytes in a non-UTF-8 character encoding. But when you deal with almost 100 billion files on which you have no control (those files come from free software projects, and make their way into Debian without any renaming), it happens.

    Now back to the bug: when trying to display such a file through the web interface, it would crash because it can't convert the file name to UTF-8, which is needed for the HTML representation of the page.

  • gfldex: Iterative golfing
  • Rakudo Weekly News: 2022.04 Unsigned Merge

    This week’s good news is that the about 2 months of work of Stefan Seifert to properly support native unsigned integers, was merged. This work, and Daniel Green‘s work on using the mimalloc memory allocation library, however caused some unexpected ecosystem fallout. Instead of reverting all of this work (which would have been a big task in itself), it was decided to move forward by skipping the 2022.01 Rakudo Compiler release: the next release will be 2022.02. Which has an odd symmetry to it!

  • DIY “Solid State Drive” Puts Four Bytes In Your Pocket | Hackaday

    In a relatively short amount of time, the average capacity of USB flash drives has skyrocketed. It wasn’t so long ago that two and four gigabyte drives were considered to be on the high end, but today you can grab a 512 GB drive for less than $50 USD. In fact they’ve gotten so large that it can feel wasteful using them for some tasks, and we occasionally find ourselves wishing we could find some modern USB drives that didn’t rival the storage capacity of our whole computer.

    That said, this USB-C tetrabyte drive created by [Glen Akins] might be slightly too small for our tastes. No, that’s not a typo. As in the Greek tetra, this drive can hold a massive four bytes at a time. Even better, you don’t need a computer to write to it: the 32 DIP switches let you key in the content on the fly, bit-by-bit.

  • TSDgeos' blog: Okular: Signing of unsigned signature fields has landed

    Up to today, Okular would kind of error out when opening a PDF file that contains a signature field that was unsigned (think like the old space in paper forms saying "sign here")

  • LLVM Clang Now Defaulting To The DWARFv5 Debug Format - Phoronix

    Following GCC, the LLVM Clang C/C++ compiler front-end is now defaulting to using the DWARFv5 debugging data format.

    DWARFv5 was published in 2017 and offers faster symbol searching, better debugging for optimized code, improved data compression, improve descriptions for some elements of the code, new language codes, and other improvements over the decade old DWARFv4. The DWARFv5 specification and more details can be found at dwarfstd.org.

More in Tux Machines

Everything You Need to Know about Linux Input-Output Redirection

Are you looking for information related to the Linux input-output redirection? Then, read on. So, what’s redirection? Redirection is a Linux feature. With the help of it, you are able to change standard I/O devices. In Linux, when you enter a command as an input, you receive an output. It’s the basic workflow of Linux. The standard input or stdin device to give commands is the keyboard and the standard output or stdout device is your terminal screen. With redirection, you can change the standard input/output. From this article, let’s find out how Linux input-output redirection works. Read more

today's howtos

  • How to Fix Screen Tearing on Linux

    Screen tearing can be frustrating when scrolling through articles, playing a game, or doing just about anything in the graphical user interface (GUI). It can hamper your Linux experience and drive you into thinking of switching to Windows or macOS. Hold those thoughts because, fortunately, there's a fix for screen tearing that doesn't involve migrating to another OS. Let's dive into the process of fixing screen tearing on your Linux desktop.

  • How to deploy a Docker container with SSH access | TechRepublic

    When you have running containers, there might be a time when you have to connect to that container to run a command or handle some maintenance. Of course, you can always access the running container using the docker exec -it CONTAINER_ID bash command (where CONTAINER_ID is the actual ID of the container). But how do you SSH into those containers? And should you want to? That’s the rub. The problem is that because there are so many moving parts, containers can be insecure. Because of that, you won’t want to allow SSH connections to containers in production environments, but for development and testing environments, this can be a real help. With that said, I’m going to show you how to set up SSH connections for a Docker container. I’ll demonstrate using the latest Ubuntu image.

  • How to flush the DNS cache on Ubuntu Server | TechRepublic

    Sometimes a network connection doesn’t seem to function how we expect them to. And it doesn’t matter how much you troubleshoot the issue, the problem doesn’t go away. You’ve configured a static IP address, you know that configuration is solid and you can ping your gateway, but something is causing that Linux server from reaching the outside world in the manner you expect. One problem could be the DNS cache. DNS is a crucial aspect of networking for all machines, as it translates names to IP addresses. When something goes wrong with DNS, your machine might have trouble reaching the outside world. I have experienced, on a few occasions, a DNS cache to be the problem. When that happens, what do you do? You flush the DNS cache. This is a good task to undertake now and then, as your DNS cache can not only grow too large, but it could also contain corrupt entries (which can cause problems with connections). So, how do you flush the DNS cache on Ubuntu Server?

  • How to Fix "Could not get lock /var/lib/dpkg/lock" Error in Ubuntu

    In this article we’ll cover the cause of the Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable) error, and two methods on how to solve it.

  • How To Install Bpytop on Ubuntu 22.04 LTS - idroot

    In this tutorial, we will show you how to install Bpytop on Ubuntu 22.04 LTS. For those of you who didn’t know, Bpytop is a Linux command-line utility for resource monitoring that shows usage and stats for processor, memory, disks, network, and processes. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Bpytop system monitor tool on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

  • 10 basic cat commands in Linux with examples - RoseHosting

    In this tutorial, we are going to explain some basic cat commands in Linux, that are applicable on various distributions such as Ubuntu, Debian, CentOS, AlmaLinux and etc. The “cat” command is a shortcut of the word “concatenate” and is a very useful command that is frequently used, by system administrators and DevOps engineers. With this command you can easily view files, create them, filter information from them, display line numbers in files and etc. In this post, the cat command will be explained with real examples on Ubuntu 20.04. You can use the Linux distribution of your choice. Let’s get started!

Linux 5.17.9, 5.15.41, 5.10.117, 5.4.195, 4.19.244, 4.14.280, and 4.9.315

  • Linux 5.17.9
    I'm announcing the release of the 5.17.9 kernel.
    
    All users of the 5.17 kernel series must upgrade.
    
    The updated 5.17.y git tree can be found at:
    	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.17.y
    and can be browsed at the normal kernel.org git web browser:
    	https://git.kernel.org/?p=linux/kernel/git/stable/linux-s...
    
    thanks,
    
    greg k-h
    
  • Linux 5.15.41
  • Linux 5.10.117
  • Linux 5.4.195
  • Linux 4.19.244
  • Linux 4.14.280
  • Linux 4.9.315

Free, Libre Software Leftovers