{"id":16862507,"url":"https://github.com/aarzilli/iching","last_synced_at":"2025-04-11T08:57:19.081Z","repository":{"id":36945533,"uuid":"41253040","full_name":"aarzilli/iching","owner":"aarzilli","description":"Go library to encode binary numbers using I Ching hexagrams","archived":false,"fork":false,"pushed_at":"2022-11-07T15:37:08.000Z","size":91,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T06:23:50.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aarzilli.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":"2015-08-23T14:33:40.000Z","updated_at":"2024-04-25T01:12:01.000Z","dependencies_parsed_at":"2023-01-17T07:23:58.576Z","dependency_job_id":null,"html_url":"https://github.com/aarzilli/iching","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/aarzilli%2Fiching","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarzilli%2Fiching/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarzilli%2Fiching/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarzilli%2Fiching/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aarzilli","download_url":"https://codeload.github.com/aarzilli/iching/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248363517,"owners_count":21091375,"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-10-13T14:35:40.838Z","updated_at":"2025-04-11T08:57:19.059Z","avatar_url":"https://github.com/aarzilli.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A new way to encode binary numbers\nI Ching or \"Classic of Change\" is a Chinese book about telling the future or something. It doesn't matter.\n\nWhat matters is that I Ching defines a set of 64 \"figures\", called hexagrams, each consisting of 6 stacked horizontal lines, where each line is either a solid, unbroken line (Yang) or a line with a single gap (Yin).\n\nEach hexagram can therefore be easily used to encode a number up to 6bits of entropy, this library implements a function (`Itoiching`) to convert an arbitrary 64bit unsigned integer into its I Ching representation and a function (`Ichingtoi`) to do the reverse.\n\n## Conventions\n\nEach I Ching character represents a 6 bit value, strings are ordered with the most significant 6 bits of the number first. Withing a I Ching character the top line represents the most significant bit of the sextet.\nThe unbroken line (Yang) corresponds to 0, the broken line (Yin) corresponds to 1. We do not use the King Wen sequence.\n\n## Example\n\n```\n  iching.Itoiching(23) → ䷢\n```\n\n## Example programs\n\nThis library comes with two example programs (available under the `cmd` directory). Ichingtest takes a number as argument on the command line and converts it to its representation in decimal, octal and I Ching.\nThe other program is ichingdump and it's similar to hexdump (or od) but using I Ching encoding for all numbers.\n\n![Crystal clear](crystalclear.png?raw=true \"Screenshot of Ichingdump\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faarzilli%2Fiching","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faarzilli%2Fiching","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faarzilli%2Fiching/lists"}