{"id":33204864,"url":"https://github.com/AccelerationNet/access","last_synced_at":"2025-11-16T19:01:18.031Z","repository":{"id":1820118,"uuid":"2744360","full_name":"AccelerationNet/access","owner":"AccelerationNet","description":"A common lisp library to unify access to common dictionary-like data-structures","archived":false,"fork":false,"pushed_at":"2025-04-15T18:34:38.000Z","size":142,"stargazers_count":87,"open_issues_count":2,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-15T19:42:37.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"heelhook/chardin.js","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AccelerationNet.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}},"created_at":"2011-11-09T20:43:51.000Z","updated_at":"2025-04-15T18:34:43.000Z","dependencies_parsed_at":"2024-03-24T23:42:51.292Z","dependency_job_id":null,"html_url":"https://github.com/AccelerationNet/access","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AccelerationNet/access","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AccelerationNet%2Faccess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AccelerationNet%2Faccess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AccelerationNet%2Faccess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AccelerationNet%2Faccess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AccelerationNet","download_url":"https://codeload.github.com/AccelerationNet/access/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AccelerationNet%2Faccess/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284759739,"owners_count":27058842,"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-11-16T02:00:05.974Z","response_time":65,"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":[],"created_at":"2025-11-16T10:00:19.805Z","updated_at":"2025-11-16T19:01:18.025Z","avatar_url":"https://github.com/AccelerationNet.png","language":"Common Lisp","readme":"# Access\n\nA Common Lisp library to unify access to the most common data\nstructures and to allow you to operate on them as they are (ie as a\nbunch of dictionaries with slightly different apis)\n\n## access, accesses , (setf access), (setf accesses)\n\nThese functions allow unified access to these data structures:\n\n * accessor access to CLOS objects\n * slot access to CLOS objects if the key matches a slot name but not\n   an accessor\n * plists\n * alists\n * hash-tables\n * arrays\n\nThey also opts to produce nil as opposed to signaling errors when they\nfail to access (eg (access nil 'anything) produces nil rather than\nsignaling a missing method on nil (though if 'anything is specialized\non nil it will call that method)). Slot unboundedness errors are not \nsignaled.\n\nThis library will probably appeal most to new comers to the language\nas everyone else will probably be happy just calling each type of\naccess according to its own api.\n\n### accesses, (setf accesses)\n\nThese can be handy for modifying deeply nested structures without lots\nof intermediary bindings eg:\n\n(setf (accesses ucw::*context* 'ucw::context.request\n               ucw::parameters '(\"id\" :type :alist)) \n      2043) \n\nWill correctly set the \"id\" parameter of the request to 2043. \nIt will not signal an error if request is *context* is unbound, nor \nany of the slots.\n\nThe '(\"id\" :type :alist) is required because ucw expects an alist, but\naccess will default to plist when asked to set on a nil.\n\n## do-access, do-set-access \n\nWhen we fail to find an reader/writer function, access will ultimately\nhave to be reading and writing a datastructure.  That happens in these\ngeneric functions.  These functions also allow access extensibility to\nsupport any conceivable map datastructure.\n\n### What happens when setting through nil?\n\nAccess will create a dictionary to put stuff into. The type of\ndictionary will depend on the :type parameter.  \n\n * :type is expected to be: cl:array, :array, cl:hash-table , :plist,\n   :alist, :object, cl:standard-object, or a type that we can call\n   'make-instance on with no arguments.\n\nEX:\n \n```\n=\u003e(setf (accesses place\n         '(:a :type :alist)\n         '(2 :type array)\n         '(:b :type 'hash-table)) 3)\n;; 3\n\n=\u003e place\n\n;; ((:a . #(nil nil #\u003chash-table :b=3 \u003e)))\n\n```\n\n### Limitations\n\n * Accessors should share slot names for this to work best.  This is\n   due to differences in \"direct\" class slots versus indirect slots\n   (only direct slots have the reader value filed out).\n * While most structures use equalper to get around differnt key\n   packages and strings vs symbols.  Hash-tables do not currently\n   support an equalper style interface.  As such some small care needs\n   to be taken.  We try to support this by looking up values by\n   symbol, then by symbol-name if symbol fails to produce a result.\n\n### A word on performance\n\nThis libary is meant to make writing the program easier.  It does many\nruntime lookups and checks to make sure that funcations called can\nsupport the types they are called with.  As such it should not be used\nin code where performance is important. It should however allow you to\nprototype more rapidly and change the backing data stores without\nhaving to change their access (ie I can switch from a plist to an\nalist and everything will continue to work)\n\n## Utilities\n\n### has-slot?, has-reader?, has-writer?\n\nGiven a function or symbol, see if the object has a slot named that or\na reader/writer function associated with that name\n\n### class-slot-names, class-slot-readers, class-slot-writers \n\nReturns the names associated with the classes slots.  Readers and\nwriters returns the functions used to access and set these slots,\nhowever these currently only support readers/writers with the same\nname as the slot.\n\n### call-if-applicable, call-applicable-fns\nGiven an object and a function / funcation-name, this will call the\nfunction passing in the object if it seems like that will work\n\n\n\n### class-of-object \nA helper to find you the class of a given thing\n\n```\n  (typecase o\n      (symbol (find-class o))\n      (standard-class o)\n      (standard-object (class-of o)))\n```\n\n### equalper\n\nA predicate to make comparing symbols in different packages easier, by\ncomparing them case-insensitively based on symbol-name.  In other\nrespects it is equalp.\n\n### plist-val, rem-plist-val, set-plist-val\n\nFunctions to ease access to plist values (used by access when\ndetecting a plist)\n\n\n\n## DOT syntax\n\nDOT syntax is invoked with #D reader macro on a form or by wrapping\nthat form in a with-dot call\n\nMany new-comers to the language long for their dot operator from other\nlanugages they know.  This functionality is provided (when desired) by\nenable-dot-syntax (for #D) or wrapping a block in the with-dot macro.  I wrote\nthese for fun and much prefer just using the access functions directly\n(ie. I never actually use these syntax transformers).  That said, when\nthe dot syntax is enabled, symbols with a dot in them will be\ntransformed to the appropriate `accesses` calls.\n\n\n  EX: #Dfoo.bar.bast =\u003e (accesses foo 'bar 'bast)\n  EX: (with-dot () (setf ht.key.subkey new-val)) =\u003e (setf (accesses ht 'key 'subkey) new-val)\n\n## Authors\n\n * [Acceleration.net](http://www.acceleration.net/) - [Donate](http://www.acceleration.net/programming/donate-to-acceleration-net/)\n  * [Russ Tyndall](http://russ.unwashedmeme.com/blog)\n  * [Nathan Bird](http://the.unwashedmeme.com/blog)\n  * [Ryan Davis](http://ryepup.unwashedmeme.com/blog)\n\n```\n;; Copyright (c) 2011 Russ Tyndall , Acceleration.net http://www.acceleration.net\n;; All rights reserved.\n;;\n;; Redistribution and use in source and binary forms, with or without\n;; modification, are permitted provided that the following conditions are\n;; met:\n;;\n;;  - Redistributions of source code must retain the above copyright\n;;    notice, this list of conditions and the following disclaimer.\n;;\n;;  - Redistributions in binary form must reproduce the above copyright\n;;    notice, this list of conditions and the following disclaimer in the\n;;    documentation and/or other materials provided with the distribution.\n;;\n;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n;; \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n;; A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT\n;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n```\n\n\n\n\n\n","funding_links":[],"categories":["North America","Expert Systems"],"sub_categories":["United States"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAccelerationNet%2Faccess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAccelerationNet%2Faccess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAccelerationNet%2Faccess/lists"}