Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • My productivity app for the past 12 years has been a single .txt file

    The biggest transition for me when I started college was learning to get organized. There was a point when I couldn't just remember everything in my head. And having to constantly keep track of things was distracting me from whatever task I was doing at the moment.

    So I tried various forms of todo lists, task trackers, and productivity apps. They were all discouraging because the things to do kept getting longer, and there were too many interrelated things like past meeting notes, calendar appointments, idea lists, and lab notebooks, which were all on different systems.

    I gave up and started just tracking in a single text file and have been using it as my main productivity system for 12 years now. It is so essential to my work now, and has surprisingly scaled with a growing set of responsibilities, that I wanted to share this system. It's been my secret weapon.

  • Displaying Quotes on a Kiosk -- and Javascript Memory Leaks

    When I said "easy" and "no problem", I was imagining writing a little Python program: get text, scale it to the screen, loop. I figured the only hard part would be the scaling. the quotes aren't all the same length, but I want them to be easy to read, so I wanted each quote displayed in the largest font that would let the quote fill the screen.

    Indeed, for plaintext it was easy. Using GTK3 in Python, first you set up a PangoCairo layout (Cairo is the way you draw in GTK3, Pango is the font/text rendering library, and a layout is Pango's term for a bunch of text to be rendered). Start with a really big font size, ask PangoCairo how large the layout would render, and if it's so big that it doesn't fit in the available space, reduce the font size and try again. It's not super elegant, but it's easy and it's fast enough. It only took an hour or two for a working script, which you can see at quotekiosk.py.

    But some of the quotes had minor HTML formatting. GtkWebkit was orphaned several years ago and was never available for Python 3; the only Python 3 option I know of for displaying HTML is Qt5's QtWebEngine, which is essentially a fully functioning browser window.

  • Introducing Zuul for improved CI/CD

    By mid-2013, Nodepool was constantly recycling as many as 100 virtual machines registered with Jenkins as slaves, but this was no longer enough to keep up with the growing workload. Thread contention for global locks in Jenkins thwarted all attempts to push past this threshold, no matter how much processor power and memory was thrown at the master server. The project had offers to donate additional capacity for Jenkins slaves to help relieve the frequent job backlog, but this would require an additional Jenkins master. The efficient division of work between multiple masters needed a new channel of communication for dispatch and coordination of jobs. Zuul's maintainers identified the Gearman job server protocol as an ideal fit, so they outfitted Zuul with a new geard service and extended Jenkins with a custom Gearman client plugin.

    Now that jobs were spread across a growing assembly of Jenkins masters, there was no longer any single dashboard with a complete view of job activity and results. In order to facilitate this new multi-master world, Zuul grew its own status API and WebUI, as well as a feature to emit metrics through the StatsD protocol. Over the next few years, Zuul steadily subsumed more of the CI features its users relied on, while Jenkins' place in the system waned accordingly, and it was becoming a liability. OpenStack made an early choice to standardize on the Python programming language; this was reflected in Zuul's development, yet Jenkins and its plugins were implemented in Java. Zuul's configuration was maintained in the same YAML serialization format that OpenStack used to template its own Jenkins jobs, while Jenkins kept everything in baroque XML. These differences complicated ongoing maintenance and led to an unnecessarily steep learning curve for new administrators from related communities that had started trying to run Zuuls.

    The time was right for another revolution.

  • Build engines suck. Help GPSD select a new one.

    One of the eternal mysteries of software is why build engines suck so badly.

    Makefiles weren’t terrible as a first try, except for the bizarre decision to make the difference between tabs and spaces critically different so you can screw up your recipe invisibly.

    GNU autotools is a massive, gnarly, hideous pile of cruft with far too many moving parts. Troubleshooting any autotools recipe of nontrivial capacity will make you want to ram your forehead repeatedly into a brick wall until the pain stops.

    Scons, among the first of the new wave of build engines to arise when mature scripting languages make writing them easier, isn’t bad. Except for the part where the development team was unresponsive at the best of times and development has stagnated for years now.

    Waf is also not bad, except for being somewhat cryptic to write and having documentation that would hardly be less comprehensible if it had been written in hieroglyphics.

  • Ruby Team: Ruby Team Sprint 2020 in Paris - Day Three

    Day three of our sprint was dominated by hacking. In the morning an archive wide rebuild against Ruby 2.7 had finished. So the list of packages in need of a fix for the upcoming transition got longer. Still we found/made some time for a key exchange in the afternoon, in which even some local university attendees participated. Further Georg gave a short talk how keysigning works using caff and the current situation of keyservers, specifically keys.openpgp.org and hockeypuck. (The traditional SKS network plans to migrate to this software within this year.)

    Regarding Salsa, Antonio was able to fix gem2deb so our extension packages finally build reprodicibly (Yeah!). The decision to disable the piuparts job on Salsa was discussed again. The tool provides a major functionality in question of preventing “toxic” uploads. But these issues usually occur on quite rare occasions. We think the decision to enable the piuparts job only for critical packages or on a case-by-case base is a sensible approach. But we would of course prefer to not have to make this decision just to go easy on Salsa’s resources.

  • Ruby Team Sprint 2020 in Paris - Day Four

    On day four the transition to Ruby 2.7 and Rails 6 went on. Minor transitions took place too, for example the upload of ruby-faraday 1.0 or the upload of bundler 2.1 featuring the (first) contributions by bundler’s upstream Deivid (yeah!). Further Red Hat’s (and Debian’s) Marc Dequènes (Duck) joined us.

    We are proud to report, that updating and/or uploading the Kali packages is almost done. Most are in NEW or have already been accepted.

    The Release team was contacted to start the Ruby 2.7 transition and we already have a transition page. However, the Python 3.8 one is ongoing (almost finished) and the Release team does not want overlaps. So hopefully we can upload ruby-defaults to Debian Unstable soon.

  • Using Non Default Php Version On Plesk Server Cli

    Plesk is a tool for managing multiple websites with their own settings including PHP. But comes with alot of caveats, especially with configuration.

    Recently I needed to run a PHP a script as 7.2, but the OS Default is 5.6 so plesk kept forcing the script to run as 5.6.

  • arduino-copilot combinators

    My framework for programming Arduinos in Haskell has two major improvements this week. It's feeling like I'm laying the keystone on this project. It's all about the combinators now.

  • RProtoBuf 0.4.15: One fix, some updates, depcrecation coming

    A new release 0.4.15 of RProtoBuf just arrived at CRAN. RProtoBuf provides R with bindings for the Google Protocol Buffers (“ProtoBuf”) data encoding and serialization library used and released by Google, and deployed very widely in numerous projects as a language and operating-system agnostic protocol.

    This release contains a small bug fix for repeated messages and groups. While making changes, I used the opportunity to change the unit testing framework to the excellent and lightweight tinytest package permitting, among other things, tests of the installed package, and also simplified the build by using pre-made pdf vignettes. A list of changes follows below

  • RcppArmadillo 0.9.850.1.0

    Armadillo is a powerful and expressive C++ template library for linear algebra aiming towards a good balance between speed and ease of use with a syntax deliberately close to a Matlab. RcppArmadillo integrates this library with the R environment and language–and is widely used by (currently) 685 other packages on CRAN.

    A new upstream release 9.850.1 of Armadillo was just released. And as some will undoubtedly notice, Conrad opted for an increment of 50 rather 100. We wrapped this up as version 0.9.850.1.0, having prepared a full (github-only) tarball and the release candidate 9.850.rc1 a few days ago. Both the release candidate and the release got the full reverse depends treatment, and no issues were found.

    Changes in the new release below.

  • SpecFuzz Emerges To Test Code For Spectre-Style Vulnerabilities

    Fuzzing is an important means of finding unintended/invalid behavior within software and now there exists a fuzzer for providing Spectre-type vulnerabilities.

    SpecFuzz is a new tool for uncovering possible Spectre vulnerabilities within source code. When compiling the software under test paired with extra instrumentation is able to uncover possible Spectre Variant One vulnerabilities in source code as a result of mispredictions by simulating speculative execution within this fuzzer.

  • Red Hat Talks Up debuginfod As The New Debug Info Web Server

    Debuginfod is the optional HTTP server that is part of the ELFUTILS package and is for distributing ELF/DWARF debugging information and program source code when requested based upon a build ID of what's being compiled/debugged. This Red Hat led initiative has already led to Debuginfod support added to the new Binutils 2.34 for being able to query source files and debug information when not present on the local file-system.

  • AMD's Zen 2 Scheduler Model Gets Partially Fixed Up In LLVM

    Landing in the LLVM compiler infrastructure code-base in January was finally an AMD Zen 2 scheduler model optimized for the latest-generation AMD processors when compiling code with Clang using the -march=znver2 targeting. However, now some important fixes to this scheduler model have landed.

  • LLVM Finally Buttoning Up Its Stack-Clash Protection For x86 CPUs

    It's been nearly three years since the Stack Clash vulnerability was really tossed into the spotlight while such vulnerabilities have existed longer. Now finally in 2020, the LLVM compiler stack -- and years after GCC's mitigation -- is preparing its stack clash protection.

    Since last autumn there has been stack clash protection under review for LLVM. This solution is similar to GCC's and exposes the same -fstack-clash-protection flag. When this stack clash protection feature is enabled on LLVM x86/x86_64, inline stack probing is used. "Probe stack allocation every PAGE_SIZE during frame lowering or dynamic allocation to make sure the page guard, if any, is touched when touching the stack, in a similar manner to GCC. This extends the existing `probe-stack' mechanism with a special value `inline-asm'. Technically the former uses function call before stack allocation while this patch provides inlined stack probes and chunk allocation."

  • Escoria - point-and-click system for the Godot engine

    Escoria, the point-and-click system for the Godot game engine, is now working again with the latest Godot (3.2).

    Godot is a general-purpose game engine. It comes with an extensive graphic editor with skeleton and animation support, can create all sorts of games and mini-games, making it an interesting choice for point-and-click's.

  • The Y2K bug could come back sooner than you think

    The start of the 21st century was a time of excitement and trepidation for the world. One one hand, we sat on the cusp of a future, an entirely new millenium, filled with countless possibilities. On the other hand, there was a small chance that the whole of modern human civilization would come crashing down around us because coders had for years used a shorthand method to denote the current date and our computer systems might not have been able to differentiate between the year 200 and the year 1900. We dodged a bullet when the Y2K bug fizzled out the first time. Will we be as lucky in 2038 when we once again face a similar threat?

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. 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 MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.