{"id":15873777,"url":"https://github.com/palisades-lakes/dynamic-functions","last_synced_at":"2025-03-16T04:30:44.248Z","repository":{"id":62435439,"uuid":"101116803","full_name":"palisades-lakes/dynamic-functions","owner":"palisades-lakes","description":"generic functions: more restricted but faster than Clojure multimethods","archived":false,"fork":false,"pushed_at":"2023-08-01T19:01:32.000Z","size":177,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T05:02:26.989Z","etag":null,"topics":["clojure","clojure-multimethods","generic-functions","multimethods"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palisades-lakes.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}},"created_at":"2017-08-22T23:35:30.000Z","updated_at":"2023-08-01T19:01:37.000Z","dependencies_parsed_at":"2022-11-01T21:02:23.287Z","dependency_job_id":null,"html_url":"https://github.com/palisades-lakes/dynamic-functions","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palisades-lakes%2Fdynamic-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palisades-lakes%2Fdynamic-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palisades-lakes%2Fdynamic-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palisades-lakes%2Fdynamic-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palisades-lakes","download_url":"https://codeload.github.com/palisades-lakes/dynamic-functions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243802942,"owners_count":20350316,"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":["clojure","clojure-multimethods","generic-functions","multimethods"],"created_at":"2024-10-06T01:06:27.373Z","updated_at":"2025-03-16T04:30:43.849Z","avatar_url":"https://github.com/palisades-lakes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynamic-functions \n\n[![Clojars Project](https://img.shields.io/clojars/v/palisades-lakes/dynamic-functions.svg)](https://clojars.org/palisades-lakes/dynamic-functions)\n\nThis library is currently a vehicle for experimenting with \ndesign and implementation alternatives for generic functions\n(aka multimethods)\nin Clojure.\nIt is therefore completely unstable \n(I'm committed to nothing for now)\nuntil at least version 0.1.0.\n\nInitial ideas:\n- all functions are generic functions\n- trade flexibility of Clojure multimethods for performance\n- no hierarchies\n- dispatch on class-based signatures only\n- signature specified via arglist type hints\n- only simple arglists (no destructuring)\n- single method per arity equivalent to Clojure `defn`\n- high performance with hinted primitives in and out\n- Clojure functions are nearly opaque; \nthe only API is `clojure.lang.IFn/invoke().  \n    Dynamic functions should be fully first class, with \n    an API exposing, at a minimum:\n    * the function name\n    * any hints on the return value\n    * the arglists, including type hints\n    * the relevant parts of the lexical environment in which it\n    was created, a list of bindings including names, values,\n    and type hints, possibly other hints as well.\n    * possibly also the dynamic environment\n    * the expressions that defined the bodies\n    * constructors that are functions, not just macros and special\n     forms.\n    For example, it should be possible to do something like\n    ```\n    (defn compose ^IFn [^IFn f ^IFn g]\n      (assert (matches? (arglist f) (return-value g))\n      (function (str (name f) \"-o-\" (name g)) (arglist g)\n        `(f (g ~(arglist g)))))\n    ```\n    It should be possible to examine the returned function object,\n    determine that it is the composition of `f` and `g`, and \n    generate a new function by supplying a modified environment, \n    say, by substituting something for 'f' or 'g'. \n \n## Usage\n\n### Dependency \n\nAvailable from \n[Clojars](https://clojars.org/palisades-lakes/dynamic-functions):\n\nMaven:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003epalisades-lakes\u003c/groupId\u003e\n  \u003cartifactId\u003edynamic-functions\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.x\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nLeiningen/Boot:\n```clojure\nLeiningen/Boot\n[palisades-lakes/dynamic-functions \"0.0.x\"]\n```\n\n### Code examples\n\n(require `[palisades.lakes.dynafn.api :as df])\n\n(df/defn intersects? \n  [^IntegerInterval s0 ^java.util.Set s1]\n  (.intersects s0 s1))\n  \n## Acknowledgments\n\n### ![Yourkit](https://www.yourkit.com/images/yklogo.png)\n\nYourKit is kindly supporting open source projects with its full-featured Java\nProfiler.\n\nYourKit, LLC is the creator of innovative and intelligent tools for profiling\nJava and .NET applications. Take a look at YourKit's leading software products:\n\n* \u003ca href=\"http://www.yourkit.com/java/profiler/index.jsp\"\u003eYourKit Java Profiler\u003c/a\u003e and\n* \u003ca href=\"http://www.yourkit.com/.net/profiler/index.jsp\"\u003eYourKit .NET Profiler\u003c/a\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalisades-lakes%2Fdynamic-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalisades-lakes%2Fdynamic-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalisades-lakes%2Fdynamic-functions/lists"}