Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Error Codes And The Law Of Least Astonishment | Hackaday

    Do you know the law of least astonishment? I am not sure of its origin, but I first learned it from the excellent “Tao of Programming.” Simply put, it is the principle that software should always respond to the users in a way that least astonishes them. In other words, printing a document shouldn’t erase it from your file system.

    Following the law of least astonishment, what should a program do when it hits a hard error? You might say that it should let the user know. Unfortunately, many systems just brush it under the rug these days.

    I think it started with Windows. Or maybe the Mac. The thinking goes that end users are too stupid or too afraid of error codes or detailed messages so we are just leaving them out. Case in point: My wife’s iPhone wouldn’t upload pictures. I’m no expert since I carry an Android device, but I agreed to look at it. No matter what I tried, I got the same useless message: “Can’t upload photos right now. Please try again later.” Not only is this not very informative, but it also implies the problem is in something that might fix itself later like the network.

  • GStreamer ❤ Windows: A primer on the cool stuff you’ll find in the 1.20 release

    The GStreamer community keeps focusing their efforts on improving Windows support and is still adding various super fascinating features for Windows. GStreamer is about to release a new stable release (1.20) very soon, so you may want to know what’s new on the Windows front

  • webrtcsink, a new GStreamer element for WebRTC streaming

    webrtcsink is an all-batteries included GStreamer WebRTC producer, that tries its best to do The Right Thing™.

    Following up on the last part of my last blog post, I have spent some time these past few months working on a WebRTC sink element to make use of the various mitigation techniques and congestion control mechanisms currently available in GStreamer.

    This post will briefly present the implementation choices I made, the current features and my ideas for future improvements, with a short demo at the end.

    Note that webrtcsink requires latest GStreamer main at the time of writing, all required patches will be part of the 1.20 release.

  • awstranscriber

    awstranscriber, a GStreamer wrapper for AWS Transcribe API

    If all you want to know is how to use the element, you can head over here.

    I actually implemented this element over a year ago, but never got around to posting about it, so this will be the first post in a series about speech-to-text, text processing and closed captions in GStreamer.

    Speech-to-text has a long history, with multiple open source libraries implementing a variety of approaches for that purpose[1], but they don't necessarily offer either the same accuracy or ease of use as proprietary services such as Amazon's Transcribe API.

    My overall goal for the project, which awstranscriber was only a part of, was the ability to generate a transcription for live streams and inject it into the video bitstream or carry it alongside.

    The main requirements were to keep it as synchronized as possible with the content, while keeping latency in check. We'll see how these requirements informed the design of some of the elements, in particular when it came to closed captions.

    My initial intuition about text was, to quote a famous philosopher: "How hard can it be?"; turns out the answer was "actually more than I would have hoped".

  • Dirk Eddelbuettel: RcppArmadillo 0.10.7.5.0 on CRAN: Bugfixes

    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) 937 other packages on CRAN, and downloaded over 22 million times (per the partial logs from the cloud mirrors of CRAN).

    This release brings another bug fix release 10.7.5 by Conrad in the ‘long-term support’ 10.7.* series we started with 0.10.7.0 on September 30. As the bug fixes can come a little quicker than the desired monthly cadence CRAN aims for, we skipped a few of those release for CRAN only but of course still provide them via the Rcpp drat repo.

  • Dirk Eddelbuettel: RProtoBuf 0.4.18: Multiple Updates

    A new release 0.4.18 of RProtoBuf arrived on CRAN earlier today. 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, the first since March of last year, contains two contributed pull requests improving or extending the package, some internal maintance updating the CI setup as well as retiring an old-yet-unused stub interface for RPC, as well as an update for UCRT builds on Windows.

  • Qt5 qtbase compiled in OE

    But, would really like to compile the latest Scribus. Also, Vym is a great mind-mapping tool that requires qt5. What else? -- krita is another qt5-base app I think.

    So, I examined the error message where it failed. It is code supporting the AVX instructions. These are instructions that were added onto Intel x86 CPUs in 2011, though even now not all recent Intel CPUs support AVX.

    Apparently, although qt5 will compile-in support for these instructions, it will detect support in the CPU at run-time, and fallback if AVX not supported.

  • Qt4 and Scribus 1.4.8 compiled

    Back in OE Pyro-series, I compiled Qt5 and Scribus 1.5.x in OpenEmbedded. Now on the OE Dunfell-series, no such luck.

    OE has a 'meta-qt5' layer, which is supposed to be compatible with the Dunfell release, however compile fails. The error message looks like it might be related to the gcc version. My guess is that the meta-qt5 developers are focussed on OE releases after Dunfell and have neglected the Dunfell release.

    OE does have a 'meta-qt4' layer, and that has recently had commits to make it compatible with the Dunfell release. It just needed a couple of little patches, and it compiled.

  • First stable release of the Mold linker developed by the developer LLVM lld

    Rui Ueyama, author compositor LLVM lld and compiler chibicc , introduced the first stable release of the new high-linker the Mold , well ahead of the binding rate of object files linkers GNU gold and LLVM lld. The project is considered ready for production deployments and can be used as a faster transparent replacement for GNU linker on Linux systems. The plans for the next significant release include bringing support for the macOS platform to readiness, after which work will begin to adapt Mold for Windows.

    Mold is written in C ++ (C ++ 20) and is distributed under the AGPLv3 license, which is compatible with GPLv3, but not compatible with GPLv2, since it requires opening changes when developing network services. This choice is explained by the desire to receive funding for the development – the author is ready to sell the rights to the code for relicensing under a permissive license such as MIT, or to provide a separate commercial license for those who are not satisfied with the AGPL.

  • Day 17 – Generic data structure traversals with roles and introspection – Raku Advent Calendar

    I am a lambdacamel and therefore I like to adapt concepts and techniques from functional programming, and in particular from the Haskell language, to Raku. One of the techniques that I use a lot is generic traversals, also known as “Scrap Your Boilerplate” after the title of the paper by Simon Peyton Jones and Ralf Lämmel that introduced this approach.

  • Follow-up on the moderation issue

    Last week, the following e-mail was sent to all members of the Rust project (including all working groups) to follow up on the moderation issue. The footnotes have been added to provide additional context to the wider Rust community, and were not part of the original e-mail.

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.