[ANN] Edit - Acme command language

249 views
Skip to first unread message

as....@gmail.com

unread,
Aug 8, 2017, 6:10:48 AM8/8/17
to golang-nuts
I'm sure this has been done already, but I thought I'd share my implementation of this here for anyone interested in using structural regular expressions in Go. It doesn't cover 100% of what Edit does in Acme, but its close enough that I can use the example program as a substitute to sed on Windows.

github.com/as/edit

Reference

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

roger peppe

unread,
Aug 8, 2017, 6:59:35 AM8/8/17
to as....@gmail.com, golang-nuts
It's nice to see this, but it would be nicer still if it
was amenable to representations that weren't
just a slice of bytes (for example disk or network
backed files, or just something which made insertions
not O(n)). It seems like it might be possible
to use Regexp.FindReader* to avoid duplicating
the stdlib's regexp package.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Rob Pike

unread,
Aug 8, 2017, 7:05:24 AM8/8/17
to roger peppe, as....@gmail.com, golang-nuts
When I wrote that (1985?), I was misinformed about the Four Horsemen.
Also now "u-" is redo.

-rob

roger peppe

unread,
Aug 8, 2017, 7:34:02 AM8/8/17
to Rob Pike, as....@gmail.com, golang-nuts
On 8 August 2017 at 12:04, Rob Pike <r...@golang.org> wrote:
> When I wrote that (1985?), I was misinformed about the Four Horsemen.

Which particular Four Horsemen would those be?

as....@gmail.com

unread,
Aug 8, 2017, 8:54:49 AM8/8/17
to golang-nuts
Thanks for suggesting the Reader(q0, q1 int64) io.RuneReader. I accidentally replied off list.

I wasn't aware of up to four horsemen being involved. The man pages didn't prepare me for this.

Michael Jones

unread,
Aug 8, 2017, 4:35:41 PM8/8/17
to as....@gmail.com, golang-nuts
The Four Horsemen of the Apocalypse, surely! It would be tempting fate to shade them or step on their brand.

On Tue, Aug 8, 2017 at 5:54 AM, <as....@gmail.com> wrote:
Thanks for suggesting the Reader(q0, q1 int64) io.RuneReader. I accidentally replied off list.

I wasn't aware of up to four horsemen being involved. The man pages didn't prepare me for this.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Michael T. Jones
michae...@gmail.com

roger peppe

unread,
Aug 8, 2017, 4:58:49 PM8/8/17
to Michael Jones, as as, golang-nuts
On 8 August 2017 at 21:34, Michael Jones <michae...@gmail.com> wrote:
> The Four Horsemen of the Apocalypse, surely! It would be tempting fate to
> shade them or step on their brand.

Ah, but of which apocalypse?

Rob Pike

unread,
Aug 8, 2017, 5:50:37 PM8/8/17
to roger peppe, Michael Jones, as as, golang-nuts
Grep for conquest.

-rob
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.

roger peppe

unread,
Aug 8, 2017, 6:46:02 PM8/8/17
to Rob Pike, Michael Jones, as as, golang-nuts
Hang by your pseudopod, write if you find a warm rich planet ripe for conquest.

Rob Pike

unread,
Aug 8, 2017, 10:25:54 PM8/8/17
to roger peppe, Michael Jones, as as, golang-nuts
I wasn't speaking metaphorically.

-rob


On Wed, Aug 9, 2017 at 8:45 AM, roger peppe <rogp...@gmail.com> wrote:
Hang by your pseudopod, write if you find a warm rich planet ripe for conquest.

On 8 August 2017 at 22:49, Rob Pike <r...@golang.org> wrote:
> Grep for conquest.
>
> -rob
>
>
> On Wed, Aug 9, 2017 at 6:58 AM, roger peppe <rogp...@gmail.com> wrote:
>> On 8 August 2017 at 21:34, Michael Jones <michae...@gmail.com> wrote:
>>> The Four Horsemen of the Apocalypse, surely! It would be tempting fate to
>>> shade them or step on their brand.
>>
>> Ah, but of which apocalypse?
>>
>> --
>> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages