{"id":20230829,"url":"https://github.com/sharkdp/painless","last_synced_at":"2025-07-22T05:04:43.623Z","repository":{"id":65984756,"uuid":"233375006","full_name":"sharkdp/painless","owner":"sharkdp","description":"Painless parameter handling for easy exploration","archived":false,"fork":false,"pushed_at":"2020-12-17T15:41:35.000Z","size":57,"stargazers_count":64,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T18:21:31.271Z","etag":null,"topics":["cpp","exploration","interactive","parameter","unix"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharkdp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"sharkdp"}},"created_at":"2020-01-12T10:32:21.000Z","updated_at":"2025-02-21T18:43:46.000Z","dependencies_parsed_at":"2023-02-19T19:05:13.561Z","dependency_job_id":null,"html_url":"https://github.com/sharkdp/painless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sharkdp/painless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpainless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpainless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpainless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpainless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharkdp","download_url":"https://codeload.github.com/sharkdp/painless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharkdp%2Fpainless/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266430671,"owners_count":23927167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","exploration","interactive","parameter","unix"],"created_at":"2024-11-14T07:43:52.224Z","updated_at":"2025-07-22T05:04:43.592Z","avatar_url":"https://github.com/sharkdp.png","language":"C++","readme":"# painless\n\n[![Build Status](https://travis-ci.org/sharkdp/painless.svg?branch=master)](https://travis-ci.org/sharkdp/painless)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n`painless` is a header-only C++ library that provides an easy way to use interactive parameters in\nyour program.\n\nNew parameters are defined with a macro call that takes an **identifier** (and name) for the parameter as well as\na **default value**:\n```c++\nPAINLESS_PARAMETER(my_parameter, 3.14f);\n```\nThe variable `my_parameter` can then be used as if it was a normal `float` value.\n\nAt runtime, `painless` then creates a file called `/tmp/painless/my_parameter` with the following content:\n``` python\n3.14\n# Parameter 'my_parameter'\n# Default value: '3.14'\n```\nIn the background, it spawns a thread that watches for modifications to that file.\nChanges to the value will be immediately reflected in the running program.\n\n## Example\n\n```c++\n#include \u003cpainless/parameter.h\u003e\n\n#include \u003cchrono\u003e\n#include \u003ciostream\u003e\n#include \u003cthread\u003e\n\nint main() {\n  PAINLESS_PARAMETER(count, 10);\n  PAINLESS_PARAMETER(message, \"X\");\n\n  while (true) {\n    // Print the 'message', 'count' times\n    for (int i = 0; i \u003c count; ++i) {\n      std::cout \u003c\u003c message;\n    }\n    std::cout \u003c\u003c \"\\n\";\n\n    std::this_thread::sleep_for(std::chrono::milliseconds(100));\n  }\n}\n```\nWhile this program runs, the files `/tmp/painless/message` and `/tmp/painless/count` can be\nedited in order to interactively change the values of the `message` and `count` parameters.\n\n## Goals\n\n`painless` is mainly intended for early exploratory development phases and does not aim to be a\nfeature-complete parameter handling solution.\n","funding_links":["https://github.com/sponsors/sharkdp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkdp%2Fpainless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharkdp%2Fpainless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkdp%2Fpainless/lists"}