Programming leftovers

-
APT for Advent of Code
Advent of Code, for those not in the know, is a yearly Advent calendar (since 2015) of coding puzzles many people participate in for a plenary of reasons ranging from speed coding to code golf with stops at learning a new language or practicing already known ones.
I usually write boring C++, but any language and then some can be used. There are reports of people implementing it in hardware, solving them by hand on paper or using Microsoft Excel… so, after solving a puzzle the easy way yesterday, this time I thought: CHALLENGE ACCEPTED! as I somehow remembered an old 2008 article about solving Sudoku with aptitude (Daniel Burrows via archive.org as the blog is long gone) and the good same old a package management system that can solve [puzzles] based on package dependency rules is not something that I think would be useful or worth having (Russell Coker).
Day 8 has a rather lengthy problem description and can reasonably be approached in a bunch of different way. One unreasonable approach might be to massage the problem description into Debian packages and let apt help me solve the problem (specifically Part 2, which you unlock by solving Part 1. You can do that now, I will wait here.)
-
Dirk Eddelbuettel/Thinking inside the box: qlcal 0.0.1 on CRAN: New Package
A new package of mine arrived on CRAN yesterday in its inaugural 0.0.1 upload: qlcal.
qlcal is based on the calendaring subset of QuantLib. It is provided (for the R package) as a set of included files, so the package is self-contained and does not depend on an external QuantLib library (which can be challenging to build). The only build requirements are Rcpp for the seamless R/C++ integration, and BH for Boost headers.
qlcal covers over sixty country / market calendars and can compute holiday lists, its complement (i.e. business day lists) and much more.
-
Peter Czanik: Reducing the complexity of log management
It is easy to over-complicate log management. Almost all departments in a company need to log messages for their daily activities. However, installing several different log management and analysis systems in parallel is a nightmare both from a security and an operations perspective and wastes many resources. You cannot always reduce the number of log analysis systems, but you can reduce the complexity of log management. Let me show you, how.
-
Intel, Arm & Khronos Feel Ready to Land SPIR-V Backend Within LLVM - Phoronix
Engineers from Intel and Arm in cooperation with The Khronos Group feel ready now to begin landing their SPIR-V back-end within the upstream LLVM source tree! This SPIR-V back-end for LLVM would ultimately allow LLVM front-ends for different languages to more easily target this industry-standard shader representation so that it could be ingested by Vulkan / OpenCL drivers.
Being worked on for a while has been this "LLVM-SPIRV-BAckend" as a means of generating SPIR-V binaries from LLVM. This back-end has been in the works for a while and unlike earlier SPIR-V + LLVM translation attempts this is a true back-end for LLVM. Intel for their part has been initially focused on OpenCL compute portion of SPIR-V while acknowledging the possibility of extending it to support 3D shaders for Vulkan.
-
BOLT Close To Merging Into LLVM For Optimizing Performance Of Binaries - Phoronix
In addition to the LLVM SPIR-V back-end appearing ready for merging, also working through the final steps for being mainlined in the LLVM compiler stack is also Facebook's BOLT project for optimizing the performance of binaries.
Going on for the past several years has been Facebook's BOLT to speed-up Linux binaries by collecting an execution profile for large applications/binaries and then BOLT optimizes the code layout of the binary.
-
Bash For Loop Array: Iterate Through Array Values
How do I use bash for loop to iterate thought array values under UNIX / Linux operating systems? How can I loop through an array of strings in Bash?
The Bash provides one-dimensional array variables. Any variable may be used as an array; the declare builtin will explicitly declare an array. There is no maximum limit on the size of an array, nor any requirement that members be indexed or assigned contiguously. Arrays are indexed using integers and are zero-based. This page explains how to declare a bash array and then use Bash for Loop to iterate through array values.
-
Python identifiers, PEP 8, and consistency [LWN.net]
While there are few rules on the names of variables, classes, functions, and so on (i.e. identifiers) in the Python language, there are some guidelines on how those things should be named. But, of course, those guidelines were not always followed in the standard library, especially in the early years of the project. A suggestion to add aliases to the standard library for identifiers that do not follow the guidelines seems highly unlikely to go anywhere, but it led to an interesting discussion on the python-ideas mailing list.
To a first approximation, a Python identifier can be any sequence of Unicode code points that correspond to characters, but they cannot start with a numeral nor be the same as one of the 35 reserved keywords. That leaves a lot of room for expressiveness (and some confusion) in those names. There is, however, PEP 8 ("Style Guide for Python Code") that has some naming conventions for identifiers, but the PEP contains a caveat: "The naming conventions of Python's library are a bit of a mess, so we'll never get this completely consistent".
But consistency is just what Matt del Valle was after when he proposed making aliases for identifiers in the standard library that do not conform to the PEP 8 conventions. The idea cropped up after reading the documentation for the threading module in the standard library, which has a note near the top about deprecating the camel-case function names in the module for others that are in keeping with the guidelines in PEP 8. The camel-case names are still present, but were deprecated in Python 3.10 in favor of names that are lower case, sometimes with underscores (e.g. threading.current_thread() instead of threading.currentThread()).
-
My Favorite Warnings: shadow
OK, Perl does not literally have a warning about a 1930's pulp fiction and radio serial character. But Perl 5.28 introduced shadow as a new warning category for cases where a variable is redeclared in the same scope. Previously, such warnings were under misc.
-
Raku Advent Calendar: Day 9: Raku code coverage
Although I love using Raku, the fact that it is still a relatively young language means that there is a fair amount that is lacking when it comes to tooling, etc. Until recently, this included a way to calculate code coverage: how much of the code in a library is exercised (=covered) by that library’s test suite.
Now, truth be told, this feature has been available for some time in the Comma IDE. But this (together with other arguably essential developer tools like profiling, etc) is only available in the “Complete” edition, which requires a paid subscription.
Still, I knew that the Raku compiler kept track of covered lines, so I always felt like this should be doable. It only needed someone to actually do it… and it looks like someone actually did.
-
Rust advances to become the second language of the Linux kernel
Rust is called to do great things, to the extent that it has been proposed that Linux be rewritten, at least partially, in said programming language. Linus Torvalds did not close the door to this possibility, but the creator of the kernel, who is not very disruptive, showed some skepticism about how the technology from Mozilla would work when push comes to shove.
However, the strong interest in bringing Rust to Linux, together with the enormous potential that the official implementation of the language holds, suggested that its introduction was going to take place sooner rather than later, and as has been seen recently, that’s how it will be, given that some developers are taking important steps to make Rust the second language of the Linux kernel.
Before proceeding further, it is important to note that Linux, at least at the project level, not pure C for a long time. This means that Rust would not be the first outsider that “sneaks” into one of the projects that, to this day, remains one of the main bastions of the C language, which has endured and continues to endure as one of the great references of low-level programming.
-
This Week In Rust: This Week in Rust 420
-

- Login or register to post comments
Printer-friendly version- 2074 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
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.
|
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.
|
today's howtos
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago