{"id":13792783,"url":"https://github.com/readevalprintlove/black","last_synced_at":"2026-03-15T14:54:22.210Z","repository":{"id":20953356,"uuid":"24241945","full_name":"readevalprintlove/black","owner":"readevalprintlove","description":"Kenichi Asai's reflective programming language Black","archived":false,"fork":false,"pushed_at":"2022-04-11T06:39:38.000Z","size":30,"stargazers_count":195,"open_issues_count":2,"forks_count":17,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-18T06:49:48.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scheme","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kubernetes/heapster","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/readevalprintlove.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-19T19:04:54.000Z","updated_at":"2024-07-28T14:50:16.000Z","dependencies_parsed_at":"2022-07-23T15:32:12.792Z","dependency_job_id":null,"html_url":"https://github.com/readevalprintlove/black","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readevalprintlove%2Fblack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readevalprintlove%2Fblack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readevalprintlove%2Fblack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readevalprintlove%2Fblack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/readevalprintlove","download_url":"https://codeload.github.com/readevalprintlove/black/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253754995,"owners_count":21958937,"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","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":[],"created_at":"2024-08-03T22:01:15.947Z","updated_at":"2025-12-16T23:12:18.022Z","avatar_url":"https://github.com/readevalprintlove.png","language":"Scheme","funding_links":[],"categories":["Compilers and Interpreters","Scheme"],"sub_categories":["Educational and Toy Projects","course"],"readme":"README (July 12, 1996)\n\nThis package contains the complete Scheme implementation of the\nreflective language Black.  For more details on Black, see [1].\nThe file black.tar.gz (or .Z) contains the following files:\n\n  README\t: this file\n  env.scm\t: environment manipulation functions\n  black.scm\t: the main body of Black\n  black-with-delta.scm\n\t\t: same as black.scm except that it supports the\n\t\t  delta abstraction introduced in Blond[2].\n  int.scm\t: user observable metalevel interpreter\n  break.blk\t: a sample program which install two new special\n\t\t  forms: break and inspect.\n  compare\t: a simple shell script which compares black.scm\n\t\t  with int.scm (except for the insertion of meta-apply)\n\nSince the implementation uses no special constructs except for\ncons-stream and pp, it should run on almost any Scheme by typing:\n\n(define scheme-apply apply)\n(load \"env.scm\")\n(load \"black.scm\") or (load \"black-with-delta.scm\")\n(black)\n\nFollowings are the Scheme system on which we have tested our\nimplementation together with some specific definitions required:\n\nChez Scheme Version 5.0a:\n\t(define head car)\n\t(define (tail x) (force (cdr x)))\n\t(define-syntax cons-stream\n\t  (syntax-rules ()\n\t    ((cons-stream a b) (cons a (delay b)))))\n\n\t(define scheme-apply apply)\n\t(load \"env.scm\")\n\t(load \"black.scm\") or (load \"black-with-delta.scm\")\n\t(black)\n\n\tTo compile, you will have to include the definition of\n\tcons-stream, so that it is properly compiled as a macro.\n\nMIT-Scheme Version 7.3.0:\n\t(define scheme-apply apply)\n\t(load \"env.scm\")\n\t(load \"black.scm\") or (load \"black-with-delta.scm\")\n\t(black)\n\nGambit Scheme Version 2.2:\n\t(define head car)\n\t(define (tail x) (force (cdr x)))\n\t(##define-macro (cons-stream a b)\n\t  `(cons ,a (delay ,b)))\n\n\t(define scheme-apply apply)\n\t(load \"env.scm\")\n\t(load \"black.scm\") or (load \"black-with-delta.scm\")\n\t(black)\n\n\tTo compile, you will have to include the definition of\n\tcons-stream, so that it is properly compiled as a macro.\n\tYou will also have to declare:\n\n\t(##declare (r4rs-scheme))\n\n\tso that delay is compiled as a special form.\n\nSCM Version 4e1:\n\t(define head car)\n\t(define (tail x) (force (cdr x)))\n\t(define cons-stream\n\t  (procedure-\u003emacro\n\t     (lambda (x env)\n\t\t(let ((a (cadr x))\n\t\t      (b (caddr x)))\n\t\t  `(cons ,a (delay ,b))))))\n\n\t(define scheme-apply apply)\n\t(load \"env.scm\")\n\t(load \"black.scm\") or (load \"black-with-delta.scm\")\n\t(black)\n\nelk:\n\t(define head car)\n\t(define (tail x) (force (cdr x)))\n\t(define-macro (cons-stream a b)\n\t  `(cons ,a (delay ,b)))\n\t(autoload 'pp 'pp)\n\n\t(define scheme-apply apply)\n\t(load \"env.scm\")\n\t(load \"black.scm\") or (load \"black-with-delta.scm\")\n\t(black)\n\n\tIt seems that elk does not handle mutual tail recursion correctly.\n\tThus, stack overflow will eventually occur.\n\nTo quit Black, type an interrupt key.  Black has no command to quit\nthe system.  (exit 0) will merely exit the current level.\n\nThe extensions that are not described in the paper are as follows:\n\n1. Special forms not described in the paper (cond, let, etc.) are\n   supported.\n\n2. Special forms delay, force, cons-stream, and primitive-EM are\n   supported, so that the implementation is meta-circular.  You can\n   execute Black on top of Black by typing the followings in Black:\n\n   (define head car)\n   (define (tail x) (force (cdr x)))\n   (load \"env.scm\")\n   (load \"black.scm\") or (load \"black-with-delta.scm\")\n   (black)\n\n3. (if \u003cbool\u003e \u003cthen\u003e) without \u003celse\u003e is supported.\n\n4. The error \"Wrong number of arguments\" (for lambda closures) is\n   supported.\n\nWhen errors such as \"Unbound variables\" and \"Not a Function\" occur,\nthe current level is properly terminated, and the control moves to the\nupper level.  However, some errors cause the Black system to stop.\nSuch errors include the ones occured in the application of primitives,\ne.g., (car 0).  To handle these errors, we have to check if the\napplication of primitives leads to an error every time a primitive is\napplied.  Because it would make the apply procedure much longer and\ntedious, we do not remedy this but leave it as an alternative way to\nquit the Black system.\n\nFor questions, comments, etc., contact asai@is.s.u-tokyo.ac.jp.\n\nReferences\n\n[1] Kenichi Asai, Satoshi Matsuoka, and Akinori Yonezawa\n    \"Duplication and Partial Evaluation\n     --- For a Better Understanding of Reflective Languages ---\"\n    Lisp and Symbolic Computation, 9, pp.203-241, Kluwer Academic\n    Publishers, Boston (1996).\n\n[2] Olivier Danvy and Karoline Malmkjaer\n    \"Intensions and Extensions in a Reflective Tower\"\n    Lisp and Functional Programming, pp.327-341 (1988).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freadevalprintlove%2Fblack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freadevalprintlove%2Fblack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freadevalprintlove%2Fblack/lists"}