{"id":14235679,"url":"https://github.com/lloda/guile-raw-strings","last_synced_at":"2025-08-11T00:32:23.034Z","repository":{"id":114815531,"uuid":"110255258","full_name":"lloda/guile-raw-strings","owner":"lloda","description":"A Guile reader extension for ‘raw strings’","archived":false,"fork":false,"pushed_at":"2024-10-21T11:27:39.000Z","size":24,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-13T01:34:23.722Z","etag":null,"topics":["guile","raw-strings","reader","scheme","syntax"],"latest_commit_sha":null,"homepage":"","language":"Scheme","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lloda.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}},"created_at":"2017-11-10T14:22:07.000Z","updated_at":"2024-10-21T11:27:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9f90669-b1d7-4454-9ab9-a1ff5e1909ef","html_url":"https://github.com/lloda/guile-raw-strings","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lloda/guile-raw-strings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloda%2Fguile-raw-strings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloda%2Fguile-raw-strings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloda%2Fguile-raw-strings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloda%2Fguile-raw-strings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lloda","download_url":"https://codeload.github.com/lloda/guile-raw-strings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloda%2Fguile-raw-strings/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269813575,"owners_count":24479340,"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-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["guile","raw-strings","reader","scheme","syntax"],"created_at":"2024-08-20T21:02:16.532Z","updated_at":"2025-08-11T00:32:22.719Z","avatar_url":"https://github.com/lloda.png","language":"Scheme","funding_links":[],"categories":["Scheme"],"sub_categories":[],"readme":"\n# guile-raw-strings [![guile-3.0](https://github.com/lloda/guile-raw-strings/actions/workflows/guile-3.0.yml/badge.svg)](https://github.com/lloda/guile-raw-strings/actions/workflows/guile-3.0.yml) [![guile-2.2](https://github.com/lloda/guile-raw-strings/actions/workflows/guile-2.2.yml/badge.svg)](https://github.com/lloda/guile-raw-strings/actions/workflows/guile-2.2.yml)\n\n`guile-raw-strings` is a reader extension for [GNU Guile](https://www.gnu.org/software/guile) that lets you write verbatim strings such as\n\n    #R-(quotes \" and escapes \\ and newlines\n               can \" freely be used \" here)-\n\nwhere you'd normally need escapes:\n\n    \"quotes \\\" and escapes \\\\ and newlines\\n           can \\\" freely be used \\\" here\"\n\nThis comes in handy for docstrings, regexps, etc.\n\nThe string between the `#R` and the `(` is the 'delimiter'. The string ends with a `)` followed by the delimiter. In the example above, the delimiter is `-`. The delimiter can be empty, as in `#R(put your '\\\"\\\\)` for `\"put your '\\\\\\\"\\\\\\\\\"`.\n\nYou can also use `[]` or `\"\"` instead of `()` to ‘delimit the delimiter’\u003csup id=\"a1\"\u003e[1](#f1)\u003c/sup\u003e. This means that you cannot use the characters `[(\"` as part of the delimiter. Whitespace in the delimiter is forbidden.\n\n* `#R(hello)`  ⇒ `hello`\n* `#R\"hello\"`  ⇒ `hello`\n* `#R[hello]`  ⇒ `hello`\n* `#Rdo-not-repeat(hello)do-not-repeat`  ⇒ `hello`\n\nThe open-close pair must be matched, but the delimiter must be repeated verbatim.\n\n* `#R(\"hello\")`  ⇒ `\"hello\"` —empty delimiter, open-close-pair is `()`.\n* `#R\"(hello)\"`  ⇒ `(hello)` —since `\"\"` is an open-close pair, this also has an empty delimiter.\n* `#R]\"hello\"]` ⇒ `hello` —here the delimiter is `]` and the open-close pair is `\"\"`.\n* `#R[\"hello\"]` ⇒ `\"hello\"` —here the delimiter is empty and the open-close pair is `[]`.\n\nThe extension should run on Guile 2.2 or later. To enable it, install `mod/raw-strings.scm` in your module path and then ``(import (raw-strings))``.\n\nRun the test with\n\n    $GUILE -L mod -s test.scm\n\nI hope you find this useful.\n\n## References\n\n1. Revised⁵ Report on the Algorithmic Language Scheme, Feb. 1998. §6.3.5: Strings.\n2. Per Bothner, SRFI-109: Extended string quasi-literals, 2013. \u003chttps://srfi.schemers.org/srfi-109/srfi-109.html\u003e\n3. Scheme registry: # lexical syntax. \u003chttps://registry.scheme.org/#hash-syntax\u003e\n4. *Raw string literal* in \u003chttps://en.cppreference.com/w/cpp/language/string_literal\u003e\n5. *raw strings* in \u003chttps://docs.python.org/3/reference/lexical_analysis.html\u003e\n6. \u003chttps://docs.racket-lang.org/axe/index.html#%28part._raw-string%29\u003e\n7. s7: A Scheme implementation. \u003chttps://ccrma.stanford.edu/software/snd/snd/s7.html\u003e\n8. Chicken Scheme: Non-standard read syntax. \u003chttps://wiki.call-cc.org/man/5/Extensions%20to%20the%20standard\u003e\n\n—\n\n\u003cb id=\"f1\"\u003e¹\u003c/b\u003e You can configure the open-close pairs, as well as the extension character `R`, with the variables `openc`, `closec` and `extension-char` at the top of the source. A single open-close pair seems preferable, if everyone agrees on what that should be. [↩](#a1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloda%2Fguile-raw-strings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flloda%2Fguile-raw-strings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloda%2Fguile-raw-strings/lists"}