What Comes to Mind

Stuff, and more stuff

Substitution is Sometimes a Failure
2025-11-28 12:06

Why are optional::transform and optional::and_then not constrained by invocable?

Read more…

Nikola Blog Infrastructure
2024-12-23 13:15

I've migrated from WordPress to a static blog generator–Nikola. This is how it works.

Read more…

Concept Maps using C++23 Library Tech
2024-05-19 11:51

Abstract

C++0x Concepts had a feature Concept Maps that allowed a set of functions, types, and template definitions to be associated with a concept and the map to be specialized for types that meet the concept.

This allowed open extension of a concept.

Read more…

Slides from C++Now 2023 Async Control Flow
2024-05-18 18:27

Using Sender/Receiver for Async Control Flow

Steve Downey

These are the slides, slightly rerendered, from my presentation at C++Now 2023.

Abstract

How can P2300 Senders be composed using sender adapters and sender factories to provide arbitrary program control flow?

  • How do I use these things?
  • Where can I steal from?

Read more…

Some Informal Remarks Towards a New Theory of Trait Customization
2023-12-24 00:00

A Possible Technique

constexpr bool g(int lhs, int rhs) {
    auto& op = partial_eq<int>;
    return op.ne(lhs, rhs);
}
Compiler Explorer with Supporting Code A trait is defined as a template variable that implements the required operations. Implementation of those operations is possible via a variety of techniques, but existence is concept checkable. It might prove useful to explicitly opt in to a sufficiently generic trait. The technique satisfies the openness requirement, that the trait can be created independently of the type that models the trait. There can still only be one definition, but this enables opting std:: types into new traits, for example. It also doesn't universally grab an operation name. The trait variable is namespaceable. Syntax isn't really awesome, but not utterly unworkable.

Read more…

Special Blocks and Emacs Org-mode Export
2021-12-03 00:00

  • Document number:
  • Date: 2021-12-03
  • Author: Steve Downey <sdowney2@bloomberg.net>, <sdowney@gmail.com>
  • Audience: WG21 Emacs Authors

Abstract: Making emacs org-mode more usable for writing WG21 papers.

Read more…

A local CMake workflow with Docker
2021-10-03 00:00

l#+BLOG: sdowney

An outline of a template that provides an automated workflow driving a CMake project in a docker container.

This post must be read in concert with https://github.com/steve-downey/scratch of which it is part.

Routine process should be automated

Building a project that uses cmake runs through a predictable lifecycle that you should be able to pick up where you left off without remembering, and for which you should be able to state your goal, not the step you are on. make is designed for this, and can drive the processs.

Read more…

std::execution, Sender/Receiver, and the Continuation Monad
2021-10-03 00:00

Some thoughts on the std::execution proposal and my understanding of the underlying theory.

What's proposed

From the paper's Introduction

This paper proposes a self-contained design for a Standard C++ framework for managing asynchronous execution on generic execution contexts. It is based on the ideas in [P0443R14] and its companion papers.

Which doesn't tell you much.

It proposes a framework where the principle abstractions are Senders, Receivers, and Schedulers.

Sender
A composable unit of work.
Receiver
Delimits work, handling completion, exceptions, or cancellation.
Schedulers
Arranges for the context work is done in.

Read more…

Standard Vocabulary for Algorithms
2021-01-16 18:22

This is feedback after considering A Plan for C++23 Ranges Disclosure: I voted in favor of this. It does not suggest work on views::maybe [P1255R6]​. I'm fine with that priority.

Vocabulary is not just Types between Components

There's broad agreement that 'vocabulary types' belong in the standard. Domain independent types that can be used between otherwise uncoupled facilities. They each depend on facilities provided by Standard C++ and can thus be developed independently. Each component can rely on the API of a core vocabulary type not changing. This allows facilities to communicate effectively. A component can have std::string or std::vector<int> in its interface with little concern. The STL parts of the standard library have always relied on concepts for constraining template parameters implicitly, requiring an Iterator of particular category in places, or specializing algorithms based on such. Composition of container types has also been natural. No one is confused by a std::unordered_map<std::string, std::vector<my::person>>.

Read more…

Blog Infrastructure Work
2020-11-28 19:05

What feels like actual productive work, but is only work adjacent? Fixing up the blog.

I managed to gradually destroy the whole thing after a decade or more of platform migrations and upgrades. This is a new and from (mostly) scratch install, into which I've imported the contents of the old one. Good backups and some hints from the excellent staff at panix.com got me back in shape. I hope.

Read more…