{"id":17214492,"url":"https://github.com/suzannesoy/remember","last_synced_at":"2026-01-05T22:42:31.571Z","repository":{"id":62424355,"uuid":"59917247","full_name":"SuzanneSoy/remember","owner":"SuzanneSoy","description":"Compile-time memoization for Racket.","archived":false,"fork":false,"pushed_at":"2021-04-04T14:29:00.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T11:42:09.723Z","etag":null,"topics":["macros","memoization","racket-library"],"latest_commit_sha":null,"homepage":"http://docs.racket-lang.org/remember/","language":"Racket","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SuzanneSoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-more.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-28T22:38:32.000Z","updated_at":"2021-10-04T20:20:20.000Z","dependencies_parsed_at":"2022-11-01T18:01:21.774Z","dependency_job_id":null,"html_url":"https://github.com/SuzanneSoy/remember","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/SuzanneSoy%2Fremember","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuzanneSoy%2Fremember/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuzanneSoy%2Fremember/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuzanneSoy%2Fremember/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuzanneSoy","download_url":"https://codeload.github.com/SuzanneSoy/remember/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467106,"owners_count":20620209,"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":["macros","memoization","racket-library"],"created_at":"2024-10-15T03:03:23.683Z","updated_at":"2026-01-05T22:42:31.510Z","avatar_url":"https://github.com/SuzanneSoy.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status,](https://img.shields.io/travis/jsmaniac/remember/main.svg)](https://travis-ci.org/jsmaniac/remember)\n[![Coverage Status,](https://img.shields.io/codecov/c/github/jsmaniac/remember/main.svg)](https://codecov.io/gh/jsmaniac/remember)\n[![Build Stats,](https://img.shields.io/badge/build-stats-blue.svg)](http://jsmaniac.github.io/travis-stats/#jsmaniac/remember)\n[![Online Documentation,](https://img.shields.io/badge/docs-online-blue.svg)](http://docs.racket-lang.org/remember/)\n[![Maintained as of 2017,](https://img.shields.io/maintenance/yes/2017.svg)](https://github.com/jsmaniac/remember/issues)\n[![License: CC0 v1.0.](https://img.shields.io/badge/license-CC0-blue.svg)](https://creativecommons.org/publicdomain/zero/1.0/)\n\nremember\n========\n\nThis Racket library provides a compile-time memoize feature. It allows\nremembering a value with `(remember-write! 'category 'value)`. In subsequent\ncompilations, `(get-remembered 'category)` will return a set of all\npreviously-remembered values.\n\nInstallation\n============\n\nraco pkg install remember\n\nExample use case: the `phc-adt` library\n=======================================\n\nThis library is used to implement \"interned\" structure and constructor types\nin the [`phc-adt`](https://github.com/jsmaniac/phc-adt) library. The `phc-adt`\nlibrary needs to know the set of all structure and constructor types used in\nthe program, and uses `remember` to automatically memoize structure\ndescriptors and constructor names.\n\nWhen the `structure` macro defined in\n[`structure.hl.rkt`](https://github.com/jsmaniac/phc-adt/blob/refactor/structure.hl.rkt)\nencounters an unknown list of field names, it uses the `remember` library to\nappend the tuple of field names to a user-specified file. That file is loaded\nin subsequent compilations, so that the tuple of fields is known to `phc-adt`.\n\nThe memoized descriptors are used to know all possible structs that can\ncontain a field with the desired name when accessing it with `(get instance\nfield-name)`. The `get` macro can then retrieve the field's value using the\nright accessor (for example `(struct123-fieldname instance)`). Knowing all\nexisting structures allows `get` to perform some kind of dynamic dispatch to\nobtain the appropriate accessor, for example using a `cond` which tests for\nall possible types.\n\nThe `constructor` macro defined in\n[`constructor.hl.rkt`](https://github.com/jsmaniac/phc-adt/blob/refactor/constructor.hl.rkt)\nworks in the same way, but remembers the name of the constructor's tag instead\nof field names. The memoization feature is used so that all uses of a\nconstructor with a given name are equivalent, across all files.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuzannesoy%2Fremember","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuzannesoy%2Fremember","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuzannesoy%2Fremember/lists"}