{"id":17471309,"url":"https://github.com/breuleux/js-spacebear","last_synced_at":"2026-01-23T02:20:08.523Z","repository":{"id":30097058,"uuid":"33646772","full_name":"breuleux/js-spacebear","owner":"breuleux","description":"SPACE BEAR","archived":false,"fork":false,"pushed_at":"2015-06-28T22:05:37.000Z","size":380,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T22:35:43.929Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/breuleux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-09T03:39:16.000Z","updated_at":"2023-01-17T22:01:16.000Z","dependencies_parsed_at":"2022-08-23T19:50:19.211Z","dependency_job_id":null,"html_url":"https://github.com/breuleux/js-spacebear","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/breuleux/js-spacebear","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breuleux%2Fjs-spacebear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breuleux%2Fjs-spacebear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breuleux%2Fjs-spacebear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breuleux%2Fjs-spacebear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/breuleux","download_url":"https://codeload.github.com/breuleux/js-spacebear/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breuleux%2Fjs-spacebear/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28678045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"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":"2024-10-18T16:34:12.763Z","updated_at":"2026-01-23T02:20:08.487Z","avatar_url":"https://github.com/breuleux.png","language":null,"readme":"\nSPACE BEAR\n==========\n\nA framework for web applications inspired from React and Om, optimized\nfor the Earl Grey language.\n\nThe project is in its infancy and is not yet fully working (but a\ndecent chunk of the core is done).\n\nIn a nutshell, a Spacebear application will function like this:\n\n1. Generate initial application state\n2. Generate UI through *render* functions that track what they read\n3. Modify the app state through *transact* functions that track what they write\n   in order to create a \"patch\"\n4. Spacebear automatically decides what to re-render by comparing\n   reads to writes\n\nIn other words, Spacebear is a framework which, given a state `s`, a\nrendering function `f`, and a patch `p` to the state `s`, knows how to\nderive a patch on `f(s)`. In doing so, it minimizes the amount of work\ndone, whether that be DOM manipulation or computation itself.\n\nNeedless to say, rendering functions must be *pure*, devoid of side\neffects and must never access any object that may change outside of\nSpacebear's strict supervision.\n\n\nExample\n-------\n\nThis is how I envision a simple todo application will look like (this\nis written in the Earl Grey language):\n\n    require-macros:\n       spacebear -\u003e (reactive, transact)\n    \n    require:\n       spacebear -\u003e (System, %)\n    \n    reactive render-todo(todo) =\n       li % todo.description\n\n    reactive render-form(entries, todo) =\n       form %\n          input %\n             value = todo.description\n             on-change(e) =\n                transact: todo.description = e.target.value\n          button % 'Add #{entries.length}'\n          on-submit() =\n             transact:\n                entries.push with {done = false, description = todo.description}\n                todo.description = \"\"\n    \n    reactive render-todos(todos) =\n       div %\n          ul % todos.entries each todo -\u003e render-todo(todo)\n          render-form(todos.entries, todos.current)\n\n    init = {entries = {}, current = {done = false, description = \"\"}}\n    System(init, render-todos).render-to(document.get-element-by-id(\"target\"))\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreuleux%2Fjs-spacebear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreuleux%2Fjs-spacebear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreuleux%2Fjs-spacebear/lists"}