{"id":32195622,"url":"https://github.com/evanjbowling/base","last_synced_at":"2025-10-22T02:17:46.344Z","repository":{"id":144449045,"uuid":"170442947","full_name":"evanjbowling/base","owner":"evanjbowling","description":"Conversion of decimal representations using arbitrary-precision.","archived":false,"fork":false,"pushed_at":"2025-04-11T02:22:46.000Z","size":92,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T22:49:26.926Z","etag":null,"topics":["clojure","clojure-library","decimal"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evanjbowling.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2019-02-13T04:56:11.000Z","updated_at":"2019-08-31T17:13:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"7495aba6-c3d9-4094-8d92-75734fc9e44f","html_url":"https://github.com/evanjbowling/base","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/evanjbowling/base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanjbowling%2Fbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanjbowling%2Fbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanjbowling%2Fbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanjbowling%2Fbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evanjbowling","download_url":"https://codeload.github.com/evanjbowling/base/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanjbowling%2Fbase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280365625,"owners_count":26318388,"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-10-22T02:00:06.515Z","response_time":63,"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":["clojure","clojure-library","decimal"],"created_at":"2025-10-22T02:17:40.432Z","updated_at":"2025-10-22T02:17:46.335Z","avatar_url":"https://github.com/evanjbowling.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# base\n[![Build Status](https://travis-ci.org/evanjbowling/base.svg?branch=master)](https://travis-ci.org/evanjbowling/base)\n[![Dependencies Status](https://versions.deps.co/evanjbowling/base/status.svg)](https://versions.deps.co/evanjbowling/base)\n\n[![Clojars Project](https://img.shields.io/clojars/v/com.evanjbowling/base.svg)](https://clojars.org/com.evanjbowling/base)\n\nA tiny Clojure library for converting decimals to different base representations.\n\n## Quick Start\n\n```bash\nclj -Sdeps '{:deps {com.evanjbowling/base {:mvn/version \"0.1.0\"}}}' \\\n    -e \"(require '[com.evanjbowling.base :as b])(b/to-base 1234567.8901M 13)\"\n```\nOutput:\n```bash\n\"342C19.B7571B8C9B₁₃\"\n```\n\n## Install\n\nLeiningen/Boot:\n\n```clojure\n[com.evanjbowling/base \"0.1.0\"]\n```\n\nClojure CLI/deps.edn:\n\n```clojure\ncom.evanjbowling/base {:mvn/version \"0.1.0\"}\n```\n\n## Use\n\nReview the [Docs](https://evanjbowling.github.io/base/doc/).\n\n```clojure\n(require '[com.evanjbowling.base :as b])\n```\n\nThere are two main functions:\n\n* `to-base` - returns a string representation\n* `to-base-seq` - returns a sequence of numeric values (For every value v, 0 \u003c= v \u003c base) with two parts: integer sequence and fractional sequence.\n\nThe sequence version is meant to be useful for exploring the whole sequence (the fractional sequence may be infinite) or for encoding the values in another format (e.g. HTML).\n\n### String Representations\n\nThe `to-base` function maps every digit value in the sequence to the relevant character for the base.\n\nConvert simple decimals:\n\n```clojure\n(b/to-base 16.25M 2)  ; \"10000.01₂\"\n(b/to-base 16.25M 16) ; \"10.4₁₆\"\n```\n\nConvert larger decimals:\n\n```clojure\n(b/to-base 134983783748.98374983798374M 64) ; \"B9tqRVE.-9cHhZXg1G₆₄\"\n(b/to-base 8561238652.018972M 37)           ; \"3CH1F0G.0PZaLKFZT7₃₇\"\n```\n\nCustom digit mapping:\n\n```clojure\n(b/to-base 16.25M 2 {:b/digit-mapping \"XO\"}) ; \"OXXXX.XO₂\"\n```\n\n## TODO\n\n* review convenience fns, add common name aliases\n* proper docs\n* review rational support\n  * repeating rationals not currently supported\n* document and expand options map with formatting options (add sequence format)\n* repeating fractional sequence detection\n* branch with spec usage\n\n## Dedicate\n\nThis library is dedicated to the second sentence of the second paragraph of sections 5.1 and 5.2 on page 11 of rfc6234.\n\n## License\n\nCopyright © 2019 Evan Bowling\n\nDistributed under the Eclipse Public License version 1.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanjbowling%2Fbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevanjbowling%2Fbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanjbowling%2Fbase/lists"}