{"id":52149980,"url":"https://github.com/yaml/yamlscript-fortran","last_synced_at":"2026-08-06T19:00:53.524Z","repository":{"id":374983665,"uuid":"1289409403","full_name":"yaml/yamlscript-fortran","owner":"yaml","description":"Program in YAML - Fortran binding","archived":false,"fork":false,"pushed_at":"2026-07-20T19:13:35.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-08-06T10:43:52.812Z","etag":null,"topics":["fortran","fpm","yaml","yamlscript"],"latest_commit_sha":null,"homepage":"https://yamlscript.org","language":"Fortran","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/yaml.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2026-07-04T18:00:44.000Z","updated_at":"2026-07-20T19:14:41.000Z","dependencies_parsed_at":"2026-08-06T10:53:59.656Z","dependency_job_id":null,"html_url":"https://github.com/yaml/yamlscript-fortran","commit_stats":null,"previous_names":["yaml/yamlscript-fortran"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/yaml/yamlscript-fortran","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript-fortran","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript-fortran/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript-fortran/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript-fortran/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaml","download_url":"https://codeload.github.com/yaml/yamlscript-fortran/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript-fortran/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36345931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-06T04:43:03.162Z","status":"ssl_error","status_checked_at":"2026-08-06T04:43:02.660Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fortran","fpm","yaml","yamlscript"],"created_at":"2026-08-06T19:00:45.584Z","updated_at":"2026-08-06T19:00:53.506Z","avatar_url":"https://github.com/yaml.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- DO NOT EDIT — THIS FILE WAS GENERATED --\u003e\n\nYAMLScript\n==========\n\nAdd Logic to Your YAML Files\n\n\n## Quick Start\n\nThis library lets you load YAML files that may or may not contain\n[YAMLScript](https://yamlscript.org) functional programming logic.\nYou can use it as a drop-in replacement for your current YAML loader.\n\nHere's an example `config.yaml` that makes use of YAMLScript functions.\n\n```yaml\n# config.yaml with YAMLScript:\n!ys-0:\n\n# Define variables\ndb-host =: ENV.DB_HOST || 'localhost'\ndb-port =: ENV.DB_PORT || 5432\ndeploy =: ENV.DEPLOYMENT || 'dev'\n:when deploy !~ /^(dev|stage|prod)/:\n  die: |\n    Invalid deployment value '$deploy'.\n    Must be one of: dev | stage | prod\n\n# Normal YAML data\ndescription: Dynamic application configuration\n\n# Dynamic data values\ndatabase:\n  host:: db-host\n  port:: db-port:num\n  name:: \"app_$deploy\"\n\n# Import external data\nfeatures:: load('common.yaml').features\n\n# Use logic and conditions\ncache:\n  # Variable scoped to this mapping\n  enabled =: deploy == 'production'\n\n  directory: .cache\n  enabled:: enabled\n  limit: 100\n  # Conditional key/value pairs\n  :when enabled::\n    limit:: 1000\n    ttl:: 60 * 60  # 3600\n```\n\n\n## What is YAMLScript?\n\nYAMLScript is a functional programming language that can be embedded in YAML.\nIts syntax is 100% YAML so files that embed it are still valid YAML files.\n\nThe YAMLScript project provides YAML loader libraries for many programming\nlanguages.\nThey can be used to load any YAML config files properly, whether or not they\ncontain functional programming logic.\n\nIt's perfect for:\n\n* **Configuration files** that need logic, variables, and dynamic values\n* **Data transformation** with built-in functions for JSON, YAML, and text\n  processing\n* **Templating** with powerful string interpolation and data manipulation\n* **Scripting** as a complete functional programming language\n\n\n## Key Features\n\n* **Drop-in YAML replacement** – Works with your existing YAML files\n* **Variables \u0026 functions** – Define and reuse values throughout your files\n* **External data loading** – Import JSON, YAML, or data from URLs\n* **Conditional logic** – Use if/then/else and pattern matching\n* **Data transformation** – Built-ins for transforming \u0026 manipulating data\n* **String interpolation** – Embed expressions/variables directly in strings\n* **No JVM required** – Runs as a native library despite compiling to Clojure\n\n\n## How It Works\n\nYAMLScript extends YAML with a simple, elegant syntax:\n\n```yaml\n# file.yaml\n!ys-0:               # Enable YAMLScript\n\nname =: 'World'       # Variable assignment\nnums =:: [1, 2, 3]    # Any YAML value\n\n# Literal YAML with ':'\na key: a value\n\n# Evaluated expressions with '::'\nmessage:: \"Hello, $name!\"\nsum:: nums.reduce(+)\ntimestamp:: now():str\n```\n\nYou can load this file from a program as described below, or you can use the\n`ys` YAMLScript binary to load the file from the command line:\n\n```bash\n$ ys -Y file.yaml\na key: a value\nmessage: Hello, World!\nsum: 6\ntimestamp: '2025-09-14T22:35:42.832470203Z'\n```\n\nUnder the hood, YAMLScript compiles YAML to Clojure and evaluates it, giving\nyou access to a rich functional programming environment.\n\n## Fortran Usage\n\nThe `load` function compiles and evaluates a YAMLScript (or plain\nYAML) string and returns the raw JSON response string from `libys`:\n`{\"data\": ...}` on success or `{\"error\": {\"cause\": ...}}` on failure.\nFortran has no standard JSON library, so parsing the response is left\nto the caller (for example with the\n[json-fortran](https://github.com/jacobwilliams/json-fortran)\npackage).\n\nFile `main.f90`:\n\n```fortran\nprogram main\n  use yamlscript\n  implicit none\n\n  type(yamlscript_t) :: ys\n  character(len=:), allocatable :: json\n\n  call ys%init()\n  json = ys%load('!ys-0:' // new_line('a') // 'key:: inc(41)')\n  print *, json\n  call ys%destroy()\nend program main\n```\n\n\n## Installation\n\nAdd `yamlscript` to your `fpm.toml` and install the `libys.so` shared\nlibrary:\n\n```toml\n[dependencies.yamlscript]\ngit = \"https://github.com/yaml/yamlscript-fortran\"\ntag = \"v0.2.29\"\n```\n\n```bash\ncurl -sSL https://yamlscript.org/install | LIB=1 bash\nexport LD_LIBRARY_PATH=\"$HOME/.local/lib:$LD_LIBRARY_PATH\"\n```\n\nBuild with the libys library path:\n\n```bash\nfpm build --flag \"-L$HOME/.local/lib\"\n```\n\nSee \u003chttps://yamlscript.org/doc/install/\u003e for more info.\n\n\n### Requirements\n\n* GFortran and the Fortran Package Manager (fpm)\n* Linux or macOS\n\n## See Also\n\n* [YAMLScript Web Site](https://yamlscript.org)\n* [Learn YAMLScript](https://exercism.org/tracks/yamlscript)\n* [YAMLScript Blog](https://yamlscript.org/blog)\n* [YAMLScript Source Code](https://github.com/yaml/yamlscript)\n* [YAMLScript Programs](https://rosettacode.org/wiki/Category:YAMLScript)\n* [YAML](https://yaml.org)\n* [Clojure](https://clojure.org)\n\n\n## Authors\n\n* [Ingy döt Net](https://github.com/ingydotnet)\n\n## License \u0026 Copyright\n\nCopyright 2022-2026 Ingy döt Net \u003cingy@ingy.net\u003e\n\nThis project is licensed under the terms of the `MIT` license.\nSee [LICENSE](https://github.com/yaml/yamlscript/blob/main/License) for more\ndetails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaml%2Fyamlscript-fortran","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaml%2Fyamlscript-fortran","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaml%2Fyamlscript-fortran/lists"}