All Projects → as → edit

as / edit

Licence: BSD-3-Clause license
A stand-alone implementation of the Acme text editor's command language.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to edit

A
A graphical text editor
Stars: ✭ 280 (+865.52%)
Mutual labels:  acme, sam
command-flow
A flexible command framework and dispatcher which removes lots of boilerplate code used in commands. While it is used generally on Bukkit it is platform agnostic
Stars: ✭ 103 (+255.17%)
Mutual labels:  command
dynamic-cli
A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI
Stars: ✭ 151 (+420.69%)
Mutual labels:  command
termco
Regular Expression Counts of Terms and Substrings
Stars: ✭ 24 (-17.24%)
Mutual labels:  regular-expression
tpack
Pack a Go workflow/function as a Unix-style pipeline command
Stars: ✭ 55 (+89.66%)
Mutual labels:  command
montre
The original timed regular expression matcher over temporal behaviors
Stars: ✭ 14 (-51.72%)
Mutual labels:  regular-expression
Regex
🔤 Swifty regular expressions
Stars: ✭ 311 (+972.41%)
Mutual labels:  regular-expression
php-exec-command
Simple php command executor with param binding
Stars: ✭ 20 (-31.03%)
Mutual labels:  command
labca
A private Certificate Authority for internal (lab) use, based on the open source ACME Automated Certificate Management Environment implementation from Let's Encrypt (tm).
Stars: ✭ 126 (+334.48%)
Mutual labels:  acme
fzf-marker
The terminal command tweak from @pindexis/marker
Stars: ✭ 22 (-24.14%)
Mutual labels:  command
csv-cruncher
Treats CSV and JSON files as SQL tables, and exports SQL SELECTs back to CSV or JSON.
Stars: ✭ 32 (+10.34%)
Mutual labels:  command
unix-programming-and-regular-expressions-workshop
A workshop on Unix Programming Principles using tools such as grep, sed, awk, shell programming and regular expressions
Stars: ✭ 25 (-13.79%)
Mutual labels:  regular-expression
LLRegex
Regular expression library in Swift, wrapping NSRegularExpression.
Stars: ✭ 18 (-37.93%)
Mutual labels:  regular-expression
bin
My bioinfo toolbox
Stars: ✭ 42 (+44.83%)
Mutual labels:  sam
gw
A Wrapper of a command to watch any changes in filesystem
Stars: ✭ 16 (-44.83%)
Mutual labels:  command
vscode-powertools
A swiss army knife with lots of tools, extensions and (scriptable) enhancements for Visual Studio Code.
Stars: ✭ 44 (+51.72%)
Mutual labels:  command
regexp-expand
Show the ELisp regular expression at point in rx form.
Stars: ✭ 18 (-37.93%)
Mutual labels:  regular-expression
es6-template-regex
Regular expression for matching es6 template delimiters in a string.
Stars: ✭ 15 (-48.28%)
Mutual labels:  regular-expression
artisan-aliases
Save keystrokes and run Artisan commands your way
Stars: ✭ 23 (-20.69%)
Mutual labels:  command
parsesig
A Telegram bot that forwards messages from one private/public channel to another after formatting
Stars: ✭ 40 (+37.93%)
Mutual labels:  regular-expression

edit

Edit is an implementation of the Acme/Sam command language

usage

ed, _ := text.Open(text.NewBuffer())
ed.Insert([]byte("Removing vowels isnt the best way to name things"), 0)

cmd, _ := edit.Compile(",x,[aeiou],d")
cmd.Run(ed)

fmt.Printf("%s\n", ed.Bytes())
// Rmvng vwls snt th bst wy t nm thngs

example

See example/example.go

reference

Rob Pike pioneered structural regular expressions in the 1980s. The original implementations can be found in his Sam and Acme text editors.

http://doc.cat-v.org/bell_labs/structural_regexps/

http://doc.cat-v.org/bell_labs/sam_lang_tutorial/

Go Report Card

appendix

This implementation now runs 10-1000 times faster

Benchmark before coalescing (2017.09.17)

goos: windows
goarch: amd64
BenchmarkChange128KBto64KB-4             	       1	3531749200 ns/op
BenchmarkChange128KBto128KB-4            	       1	3784740700 ns/op
BenchmarkChange128KBto128KBNest4x2x1-4   	       1	3642752800 ns/op
BenchmarkChange128KBto128KBx16x4x1-4     	       1	3589181900 ns/op

After coalescing (current)

goos: windows
goarch: amd64
pkg: github.com/as/edit
BenchmarkChange128KBto64KB-4                           2         530753100 ns/op
BenchmarkChange128KBto128KB-4                        200           6529711 ns/op
BenchmarkChange128KBto128KBNest4x2x1-4               200           6450888 ns/op
BenchmarkChange128KBto128KBx16x4x1-4                 200           6333687 ns/op
BenchmarkDelete128KB-4                            200000             11720 ns/op
BenchmarkDelete128KBx64-4                             20          93447760 ns/op
BenchmarkDelete128KBx8-4                              20          68008640 ns/op
BenchmarkDelete128KBx1-4                               5         263001000 ns/op
BenchmarkDelete256KBx1-4                               2         519648200 ns/op
BenchmarkDelete512KBx1-4                               1        1032597800 ns/op
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].