Programming Leftovers

-
An introduction to regular expressions
If you're new to the world of Linux administration and open source software, you've probably only just started scratching the surface of the power this new world offers. Eventually, however, you'll start mining deeper depths. When that fateful moment arrives, chances are you're going to need to use a regular expression or two.
[...]
What does that bit of cryptic nonsense mean? Well, it's actually not nonsense. The above regular expression searches for a string of characters (/^ marks the beginning of the string and $/ marks the end), between three and 16 characters, that includes lowercase letters, the numbers 0-9, or an underscore or hyphen.
Every regular expression has meaning and use. Although they might seem a bit complicated for new users, it's important to understand how they work.
-
Jussi Pakkanen: Do humans or compilers produce faster code?
Modern optimizing compilers are truly amazing. They have tons and tons of tricks to make even crappy code run incredibly fast. Faster than most people could write by hand. This has lead some people to claim that program optimization is something that can be left to compilers, as they seem to be a lot better at it. This usually sparks a reply from people on the other end of the spectrum that say that they can write faster code by hand than any compiler which makes compilers mostly worthless when performance actually matters.
In a way both of these viewpoints are correct. In another way they are both wrong. To see how, let's split this issue into two parts.
-
Payload, singleton, and stride lengths
Once again I’m inventing terms for useful distinctions that programmers need to make and sometimes get confused about because they lack precise language.
The motivation today is some issues that came up while I was trying to refactor some data representations to reduce reposurgeon’s working set. I realized that there are no fewer than three different things we can mean by the “length” of a structure in a language like C, Go, or Rust – and no terms to distinguish these senses.
Before reading these definitions, you might to do a quick read through The Lost Art of Structure Packing.
The first definition is payload length. That is the sum of the lengths of all the data fields in the structure.
-
How many function arguments?
In Haskell (and many other functional languages) it's quite common for the implementation of a function to reference one less argument than the type signature declares:
g :: foo -> bar
g = length . reverse
Known as point-free style by proponents (and pointless style by opponents), the function definition is a list of other functions which are composed together to produce a composite requiring a single argument: the missing one. -
The Decline of Usability
Designing UI:s is hard and application software can't please everyone all the time!
This is true and, as a software developer of more than 20 years, I have a huge amount of respect for the complexity of UI design. I also happen to know that such complexity is not a valid excuse for willingly and knowingly breaking UI concepts that have been proven and working for, in some cases, more than four decades. In fact, a lot of the examples above introduce more complexity for the user to cope with. The intricacies of each application and window decoration must be learned separately and time and energy is spent by repeatedly parsing the differences.
-
lowdown — simple markdown translator
lowdown is a Markdown translator producing HTML5, roff documents in the ms and man formats, and terminal output. The open source C source code has no dependencies.
The tools are documented in lowdown(1) and lowdown-diff(1), the language in lowdown(5), and the library interface in lowdown(3).
-
IoT Adoption: Before and After COVID-19
The survey data I’m referring to comes from a study conducted by the Eclipse Foundation about the adoption of commercial Internet of Things (IoT) technology. The aim of the study was to get a better understanding of the IoT industry landscape by identifying the requirements, priorities, and challenges faced by organizations deploying and using commercial IoT technologies. More than 350 respondents from multiple industries responded, with about a quarter of respondents coming from industrial production businesses.
-
Google's cross-platform UI toolkit has a Flutter on 'social development' with CodePen
"Social development environment" CodePen has unfurled support for Flutter, Google's open-source cross-platform framework for mobile and web.
CodePen is an online editor for HTML, CSS and JavaScript, intended for sharing design ideas, getting help with bugs, prototyping, or forming an online portfolio. A CodePen file is called a Pen, and is public by default. A Pen is limited to 1MB of code, but you can also create multi-file projects. Free users are limited to Pens, or one project with up to 10 files. Paying users get the option to mark their work as private, do collaborative editing, and eliminate ads. You can also use CodePen for deploying projects to production websites, though it is really optimised for demos and experiments.
-
The Cost of no Architecture
Back in 2013, QNX might have been a good choice compared to Linux. Today, with Yocto and similar tools for developing embedded Linux systems, it feels like an odd choice to add a license cost to such a device. But no biggie. Back in the day this was not an unreasonable choice (and still isn’t for certain applications).
The Flash stuff. There were alternatives back in 2013, but sure, there were plenty of developers at hand and things like Qt QML was still probably a bit clunky (I can’t recall the state of it back then – it required OpenGL ES, which I guess was a big ask back then).
But the mix of techniques and tools. The on-board web servers. The complexity of a small system and the costs it brings to maintenance and testability. If this is the foundation for Harmony remotes and a platform that has been used for the better past of the past decade, I wonder if the added engineering costs for architecture the platform to be more optimized early on would not have paid off in lower maintenance costs, as well as lower hardware costs.
-
Rust-Written Redox OS Booting The 128-Thread AMD Ryzen Threadripper 3990X
The Rust language focused Redox OS open-source operating system is now able to boot the AMD Ryzen Threadripper 3990X 64-core/128-thread processor and run with full multi-threading capabilities.
While one of the fundamentals of the Rust programming language is on offering safe concurrency, Redox OS itself had a multi-core issue until this week when it was sorted out by lead Redox OS developer (and System76 engineer) Jeremy Soller.
-

- Login or register to post comments
Printer-friendly version- 2286 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