All Projects → sharkdp → Painless

sharkdp / Painless

Licence: mit
Painless parameter handling for easy exploration

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Painless

Masterkey
secure interactive password manager with xchacha20poly1305, argon2id, and Go
Stars: ✭ 271 (+431.37%)
Mutual labels:  unix, interactive
Survey
A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
Stars: ✭ 2,843 (+5474.51%)
Mutual labels:  unix, interactive
Goridge
High-performance PHP-to-Golang IPC bridge
Stars: ✭ 950 (+1762.75%)
Mutual labels:  unix
Degust
An interactive web-tool for RNA-seq analysis
Stars: ✭ 46 (-9.8%)
Mutual labels:  interactive
Errand Boy
A memory-conscious alternative to os.fork() and subprocess.Popen().
Stars: ✭ 34 (-33.33%)
Mutual labels:  unix
Je
A distributed job execution engine for the execution of batch jobs, workflows, remediations and more.
Stars: ✭ 30 (-41.18%)
Mutual labels:  unix
Svg World Map
🗺 A JavaScript library to easily integrate one or more SVG world maps with all nations (countries) and second-level political subdivisions (countries, provinces, states).
Stars: ✭ 38 (-25.49%)
Mutual labels:  interactive
Soundwaveinteractive
Interactive Sound Board for Mixer. Microsoft shut Mixer down, so this application no longer works. RIP Mixer.
Stars: ✭ 27 (-47.06%)
Mutual labels:  interactive
Luneta
command-line fuzzy finder
Stars: ✭ 49 (-3.92%)
Mutual labels:  unix
Posnk
An operating system project.
Stars: ✭ 34 (-33.33%)
Mutual labels:  unix
Ipympl
Matplotlib Jupyter Integration
Stars: ✭ 1,024 (+1907.84%)
Mutual labels:  interactive
Glfw
A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input
Stars: ✭ 8,416 (+16401.96%)
Mutual labels:  unix
Illumos Gate
An open-source Unix operating system
Stars: ✭ 952 (+1766.67%)
Mutual labels:  unix
Crypt
Pure Go crypt(3) Implementation
Stars: ✭ 39 (-23.53%)
Mutual labels:  unix
Unitial
🖥 My rc / configs / dotfiles 📂
Stars: ✭ 29 (-43.14%)
Mutual labels:  unix
Vue Svg Map
A set of Vue.js components to display an interactive SVG map
Stars: ✭ 48 (-5.88%)
Mutual labels:  interactive
Notes
📝 Simple delightful note taking, with more unix and less lock-in.
Stars: ✭ 939 (+1741.18%)
Mutual labels:  unix
Awesome Unix
All the UNIX and UNIX-Like: Linux, BSD, macOS, Illumos, 9front, and more.
Stars: ✭ 973 (+1807.84%)
Mutual labels:  unix
Tldr
fast and interactive tldr client written with go
Stars: ✭ 984 (+1829.41%)
Mutual labels:  interactive
Tween.js
JavaScript/TypeScript animation engine
Stars: ✭ 8,409 (+16388.24%)
Mutual labels:  interactive

painless

Build Status License: MIT

painless is a header-only C++ library that provides an easy way to use interactive parameters in your program.

New parameters are defined with a macro call that takes an identifier (and name) for the parameter as well as a default value:

PAINLESS_PARAMETER(my_parameter, 3.14f);

The variable my_parameter can then be used as if it was a normal float value.

At runtime, painless then creates a file called /tmp/painless/my_parameter with the following content:

3.14
# Parameter 'my_parameter'
# Default value: '3.14'

In the background, it spawns a thread that watches for modifications to that file. Changes to the value will be immediately reflected in the running program.

Example

#include <painless/parameter.h>

#include <chrono>
#include <iostream>
#include <thread>

int main() {
  PAINLESS_PARAMETER(count, 10);
  PAINLESS_PARAMETER(message, "X");

  while (true) {
    // Print the 'message', 'count' times
    for (int i = 0; i < count; ++i) {
      std::cout << message;
    }
    std::cout << "\n";

    std::this_thread::sleep_for(std::chrono::milliseconds(100));
  }
}

While this program runs, the files /tmp/painless/message and /tmp/painless/count can be edited in order to interactively change the values of the message and count parameters.

Goals

painless is mainly intended for early exploratory development phases and does not aim to be a feature-complete parameter handling solution.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].