{"id":13559307,"url":"https://github.com/as/edit","last_synced_at":"2026-01-31T09:46:51.932Z","repository":{"id":57486341,"uuid":"99639480","full_name":"as/edit","owner":"as","description":"A stand-alone implementation of the Acme text editor's command language.","archived":false,"fork":false,"pushed_at":"2018-10-21T21:39:06.000Z","size":42,"stargazers_count":32,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-01T13:16:37.808Z","etag":null,"topics":["acme","command","edit","language","regular-expression","sam","structural"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/as.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-08T02:10:14.000Z","updated_at":"2023-06-30T07:22:43.000Z","dependencies_parsed_at":"2022-09-01T21:02:25.437Z","dependency_job_id":null,"html_url":"https://github.com/as/edit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fedit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fedit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fedit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fedit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/as","download_url":"https://codeload.github.com/as/edit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222978457,"owners_count":17067530,"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":["acme","command","edit","language","regular-expression","sam","structural"],"created_at":"2024-08-01T13:00:17.609Z","updated_at":"2026-01-31T09:46:46.913Z","avatar_url":"https://github.com/as.png","language":"Go","readme":"\n# edit \nEdit is an implementation of the Acme/Sam command language \n\n# usage\n```\ned, _ := text.Open(text.NewBuffer())\ned.Insert([]byte(\"Removing vowels isnt the best way to name things\"), 0)\n\ncmd, _ := edit.Compile(\",x,[aeiou],d\")\ncmd.Run(ed)\n\nfmt.Printf(\"%s\\n\", ed.Bytes())\n// Rmvng vwls snt th bst wy t nm thngs\n\n```\n\n# example\nSee example/example.go\n\n# reference\nRob Pike pioneered structural regular expressions in the 1980s. The original implementations can be found in his Sam and Acme text editors. \n\nhttp://doc.cat-v.org/bell_labs/structural_regexps/\n\nhttp://doc.cat-v.org/bell_labs/sam_lang_tutorial/\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/as/edit)](https://goreportcard.com/report/github.com/as/edit)\n\n# appendix\n\nThis implementation now runs 10-1000 times faster\n\nBenchmark before coalescing (2017.09.17)\n\n```\ngoos: windows\ngoarch: amd64\nBenchmarkChange128KBto64KB-4             \t       1\t3531749200 ns/op\nBenchmarkChange128KBto128KB-4            \t       1\t3784740700 ns/op\nBenchmarkChange128KBto128KBNest4x2x1-4   \t       1\t3642752800 ns/op\nBenchmarkChange128KBto128KBx16x4x1-4     \t       1\t3589181900 ns/op\n```\n\nAfter coalescing (current)\n\n```\ngoos: windows\ngoarch: amd64\npkg: github.com/as/edit\nBenchmarkChange128KBto64KB-4                           2         530753100 ns/op\nBenchmarkChange128KBto128KB-4                        200           6529711 ns/op\nBenchmarkChange128KBto128KBNest4x2x1-4               200           6450888 ns/op\nBenchmarkChange128KBto128KBx16x4x1-4                 200           6333687 ns/op\nBenchmarkDelete128KB-4                            200000             11720 ns/op\nBenchmarkDelete128KBx64-4                             20          93447760 ns/op\nBenchmarkDelete128KBx8-4                              20          68008640 ns/op\nBenchmarkDelete128KBx1-4                               5         263001000 ns/op\nBenchmarkDelete256KBx1-4                               2         519648200 ns/op\nBenchmarkDelete512KBx1-4                               1        1032597800 ns/op\n```\n\n","funding_links":[],"categories":["Inspired By"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas%2Fedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fas%2Fedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas%2Fedit/lists"}