Programming Leftovers
-
Rlang ☛ Methods for the smooth functions in R
I have been asked recently by a colleague of mine how to extract the variance from a model estimated using adam() function from the smooth package in R. The problem was that that person started reading the source code of the forecast.adam() and got lost between the lines (this happens to me as well sometimes). Well, there is an easier solution, and in this post I want to summarise several methods that I have implemented in the smooth package for forecasting functions. In this post I will focus on the adam() function, although all of them work for es() and msarima() as well, and some of them work for other functions (at least as for now, for smooth v4.1.0). Also, some of them are mentioned in the Cheat sheet for adam() function of my monograph (available online).
-
Karl Seguin ☛ TCP Server in Zig - Part 4 - Multithreading
While this approach is useful for getting familiar with various socket APIs and networking concepts, it isn't practical for most real world application. The issue is that it can only service 1 client at a time. Any additional clients will block (or fail to connect) until the currently connected client is finished and the server calls accept again to process the next client in line.
There are a few different ways to deal with this problem, with some of these being complementary. But a common place to start is to move step 5 and 6 from our above list into their own thread: [...]
-
James G ☛ Notes on performance_
When I am designing technology, I like to think about how fast I can make the experience. This involves making conscious engineering decisions at the beginning of a project to lay the foundation for building a fast application (i.e. choosing the right data structures). Then, as I develop, I ask questions like “is this as fast as it should be, given what I know about this problem space?” Where things are slower, I can start investigating ways to make the application or tool faster.
-
Baldur Bjarnason ☛ Liskov's Gun: The parallel evolution of React and Web Components
Unless you’re like me – an “extremely online” kind of web developer – you probably don’t notice the dramas and brouhahas that erupt in the web developer community with regularity. Most of the time these flame-wars offer little of value or less in terms of technical insight and the patter of angry voices fades away before it reaches the ears of the less online.
But a recent one, which began when the maintainer of the SolidJS web development framework wrote a long and very angry-sounding blog post outlining why he didn’t think web components represented the future of web development, is a little bit less usual. Not because it has staying power. It’s fading away at the same steady pace as these things usually do.
- sv/">Use nanoparquet instead of readr/CSV
Parquet is interoperable between Python and R, fast to read+write, works well with databases, and stores complex data types (e.g., tibble listcols). Use it instead of CSV. Many pros, few (no?) cons.
Yesterday I wrote about base R vs. dplyr vs. duckdb for a simple summary analysis. In that post I simulated 100 million rows of a dataset and wrote to disk as CSV. I then benchmarked how long it took to read in and compute a simple grouped mean.
-
Thorsten Ball ☛ Use data that looks like data
When debugging or testing your program, do not use data that looks like a variable or type name.
Do not use data that looks like a label or a column name or something your operating system has tons of.
Do not use data that looks like it’s part of the program.
-
[Old] Linus Åkesson ☛ Kernighan's lever
I call this mechanism Kernighan's lever. By putting in a small amount of motivation towards the short-term goal of implementing some functionality, you suddenly end up with a much larger amount of motivation towards a long term investment in your own personal growth as a programmer.
If we deliberately stay away from clever techniques when writing code, in order to avoid the need for skill when debugging, we dodge the lever and miss out on the improvement. We would then need other sources of motivation in order to grow as programmers, and if no such motivation appears, our abilities stagnate (or even deteriorate).
The psychological concept of flow, somewhat simplified, can be used to visualise the process. Flow is when you are "fully immersed in a feeling of energised focus, full involvement, and enjoyment in the process of the activity" (wikipedia), and it only occurs when the challenge that you are tackling matches your current level of skill.
-
Qt ☛ [Proprietary] LTS Qt 6.5.7 Released
We have released Qt 6.5.7 LTS for [proprietary] license holders today. As a patch release, Qt 6.5.7 does not add any new functionality but provides bug fixes and other improvements.
-
KDAB ☛ Choosing a Screen for Your Embedded Product
Not all devices require screens. Some rely on web-based user interfaces or smartphone apps for control and interaction. But if your product needs a built-in screen and you need to decide which to get and what to do with it, the rest of this blog is for you.
-
Rlang ☛ How to Combine Two Data Frames in R with Different Columns Using Base R, dplyr, and data.table
Combining data frames is a fundamental task in data analysis, especially when dealing with datasets that have different structures.
-
Paul E. McKenney ☛ Paul E. Mc Kenney: Parallel Programming: Cooperation
First, let me paraphrase something from my LiveJournal profile: These posts are my own, and in particular do not necessarily reflect my employer's positions, strategies, or opinions.
With that said, some say that the current geopolitical outlook is grim. And far be it from me to minimize the present-day geopolitical problems, nor am I at all interested in comparing them to their counterparts in the "good old days". But neither do I wish to obsess on these problems. I will instead call attention to a few instances of global cooperation, current and past.
-
Rlang ☛ R You Ready? Git Your Code Under Control!
Hey there, ready to get your R code under control? Whether you’re working on your own or in a small team, managing your code can sometimes feel like juggling too many things at once.
-
Rlang ☛ Shapiro-Wilk Normality Test | shapiro.test in R
Are you confident in your data analysis?
Shapiro-Wilk test in R is essential to ensuring your data fits a normal distribution, but how well do you understand its mechanisms and implications?
-
Rlang ☛ Fostering Open Science in Latin America: CZI Awards Funds for Sustainable Research Software Development [Ed: rOpenSci has become like a bribed front group of Mark Zuckerberg, working against the interests of the R community]
-
Rlang ☛ Tales from Open Source Development II: A package you depend on is archived
This is the second post about some “behind the scene” activities around R package development. The first part of the series was about the recent archival of my R package timeless.
-
K Desktop Environment/KDE SC/Qt
-
Carl Schwan ☛ Kirigami Addons 1.5
Kirigami Addons is out. This releases contains mostly code cleanup and minor improvements. There is netherless a few relevant changes. Thanks to everyone who contributed some code.
New KAppTemplate’s template
A new KAppTemplate is available as a good starting point for application that manage multimedia libraries. It is based on shared design of Peruse, Arianna and the WIP Calligra Launcher.
Hopefully it helps people who want to develop game launchers and other type of specialized multimedia applications.
-
-
Python
-
Linux Links ☛ reticulate – R Interface to Python
The reticulate package provides a comprehensive set of tools for interoperability between Python and R.
-
Qt ☛ Qt for Python release: 6.8 is out now!
We’re very happy to announce the latest release of Qt for Python 6.8. With every new release, we try to bring great things with Qt's new features and new trending ideas.
-
-
Rust
-
Rust Weekly Updates ☛ This Week In Rust: This Week in Rust 568
Hello and welcome to another issue of This Week in Rust!
-
-
Standards/Consortia
-
Threat Source ☛ What NIST’s latest password standards mean, and why the old ones weren’t working
The U.S. National Institute of Standards and Technology (NIST) recently announced new guidelines for the ways website and organizations should handle password creation and management that will do away with many of the “common sense” things we’ve thought about passwords for years now.
Here is a tl;dr version of what these proposed guidelines say: [...]
-
Open Web Advocacy ☛ Interop 2025 must drop secret vetos
Interop is a collaborative project between browser vendors to reduce compatibility issues between browsers so the code we write works the same on all devices and all browsers.
-
APNIC ☛ APNIC registry API now available
In response to requests from Members seeking to enhance their experience with APNIC services, the APNIC registry API is now available. This API supports the retrieval of delegation information, as well as the management of all whois records, reverse DNS records, ROAs, and route objects. The OpenAPI specification for the API is available online.
Using the APNIC registry API, Members can now automate changes that previously required manual input. For example, when adding an announcement in BGP, a Member can use the API to create new Route Origin Authorizations (ROAs) and route objects automatically, instead of logging in to MyAPNIC to make those changes manually.
-
Terence Eden ☛ Is IPA furigana a bad idea?
So I have abused(?) the ruby syntax to show the International Phonetic Alphabet above the English words.
Is this a good idea? Is it a valid use of the syntax? Is it semantically correct? I don't know. But I do now know that it is possible.
-
-
Education
-
HTML For People ☛ HTML for People
HTML isn’t only for people working in the tech field. It’s for anybody, the way documents are for anybody. HTML is just another type of document. A very special one—the one the web is built on.
I’m Blake Watson. I’ve been building websites since the early 2000s. Though I work professionally in the field, I feel strongly that anyone should be able to make a website with HTML if they want. This book will teach you how to do just that. It doesn’t require any previous experience making websites or coding. I will cover everything you need to know to get started in an approachable and friendly way.
-
Dan Q ☛ Meetup Magic
I’ve spent the last week in Tulum, on Mexico’s beautiful Yucatan Peninsula, for an Automattic meetup. And as usual for these kinds of work gatherings, it was magical (and, after many recent departures, a welcome opportunity to feel a closer connection to those of us that remain).
-