Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-12-01 Thread Ben Hoyt
> I wonder if it makes sense, to expose more of the interpreter to go. > E.g.: register a user function or add an action written in go. > I had thought about this before, but your comment made me want to try it. It wasn't actually that hard, so I've added backwards-compatible support for this now

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-24 Thread Tong Sun
On Sat, Nov 24, 2018 at 10:11 AM Ben Hoyt wrote: For what it's worth, I found that tool quite interesting and relevant. > Tong, I think you're overreacting a bit here. > Oh, I'm sorry, *everyone*. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-24 Thread Ben Hoyt
> > probably this is better tool for the >> case >> > > - please don't just post a link, but include descriptions. > - please justify your claim "better" - a specific log file parser is > better than general-purpose awk scripts? In what way? > - please don't hija

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-24 Thread Ben Hoyt
> Hope there are future plans to extend it so that, > - people can define user function in go and use it in goawk > > handling, > as kty... has pointed out. > I toyed

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-24 Thread Tong Sun
On Sat, Nov 24, 2018 at 6:44 AM Denis Cheremisov wrote: > > - also enable normal go program to use awk scripts > > probably this is better tool for the > case > - please don't just post a link, but include descriptions. - please justify your claim "better" - a

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-24 Thread Denis Cheremisov
> - also enable normal go program to use awk scripts probably this is better tool for the case суббота, 24 ноября 2018 г., 5:43:22 UTC+3 пользователь Tong Sun написал: > > > > On Saturday, November 17, 2018 at 12:44:57 PM UTC-5, Ben Hoyt wrote: >> >> >> https

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-23 Thread Tong Sun
On Saturday, November 17, 2018 at 12:44:57 PM UTC-5, Ben Hoyt wrote: > > > https://benhoyt.com/writings/goawk/ > > > It's pretty much a toy project, not being used fo

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-18 Thread Ben Hoyt
Thank you. I knew Weinberger was at Google, but didn't know he was on the Go team -- cool! On Sat, Nov 17, 2018 at 6:03 PM Alan Donovan wrote: > This is great, both as an "étude"---a challenge for sharpening your > technique---and as an exemplary write-up of the process of building > something n

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-17 Thread 'Alan Donovan' via golang-nuts
This is great, both as an "étude"---a challenge for sharpening your technique---and as an exemplary write-up of the process of building something non-trivial and making it both correct and fast. Nice work. I'm sure you knew already, but Peter Weinberger (the W in AWK) is on the Go team at Google.

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-17 Thread ktye78
That looks nice! I wonder if it makes sense, to expose more of the interpreter to go. E.g.: register a user function or add an action written in go. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-17 Thread Ben Hoyt
I've "finished" my Go AWK interpreter and released v1.0.0 now. I've fixed several bugs, and also sped up the interpreter significantly, primarily by: 1) Resolving variable names to integers at parse time so we can do []value lookups instead of map[string]value lookups at runtime 2) Using normal er

[go-nuts] GoAWK: an AWK interpreter written in Go

2018-08-24 Thread Ben Hoyt
I recently wrote an AWK interpreter in Go: https://github.com/benhoyt/goawk It's a pretty simple implementation: hand-rolled lexer, recursive-descent parser, and tree-walk interpreter. It's pretty complete according to the POSIX spec, and it passes the AWK ("one true awk") test suite as well as