Re: [dev] goblin (9base in Go)

2010-03-30 Thread Szabolcs Nagy
On 3/30/10, yy wrote: > 2010/3/29 Jeff Shipley : >> The primary reason I went with the optparse library instead of using >> flag is that flag doesn't support multiple values for the same flag. >> grep -e expression1 -e expression2 -e expression3 >> would be completely broken when using the flag pa

Re: [dev] goblin (9base in Go)

2010-03-30 Thread yy
2010/3/29 Jeff Shipley : > The primary reason I went with the optparse library instead of using > flag is that flag doesn't support multiple values for the same flag. > grep -e expression1 -e expression2 -e expression3 > would be completely broken when using the flag package. You can always parse

Re: [dev] goblin (9base in Go)

2010-03-29 Thread Szabolcs Nagy
On 3/29/10, Jeff Shipley wrote: > I've been thinking about it, and I'm actually inclined to simplify > grep (and eventually sed). It seems completely unnecessary to support > multiple -e arguments. The 9base man page doesn't say anything about > grep supporting multiple -e arguments, it simply sta

Re: [dev] goblin (9base in Go)

2010-03-29 Thread Jeff Shipley
On Mon, Mar 29, 2010 at 10:36 AM, Jeff Shipley wrote: > On Mon, Mar 29, 2010 at 9:56 AM, Alexander Surma > wrote: >> How about improving the flags-package - or somewhat merging optparse >> into flags (keeping the interface backwards-compatble). >> I assume that would be greatly appreciated. >> >>

Re: [dev] goblin (9base in Go)

2010-03-29 Thread Jeff Shipley
On Mon, Mar 29, 2010 at 9:56 AM, Alexander Surma wrote: > How about improving the flags-package - or somewhat merging optparse > into flags (keeping the interface backwards-compatble). > I assume that would be greatly appreciated. > > Surma >From what I've read/heard so far, this sort of a change

Re: [dev] goblin (9base in Go)

2010-03-29 Thread Alexander Surma
How about improving the flags-package - or somewhat merging optparse into flags (keeping the interface backwards-compatble). I assume that would be greatly appreciated. Surma On Mon, Mar 29, 2010 at 5:51 PM, Jeff Shipley wrote: > On Mon, Mar 29, 2010 at 2:41 AM, Szabolcs Nagy wrote: >> On 3/29/

Re: [dev] goblin (9base in Go)

2010-03-29 Thread Jeff Shipley
On Mon, Mar 29, 2010 at 2:41 AM, Szabolcs Nagy wrote: > On 3/29/10, Jeff Shipley wrote: >> If you feel like criticizing, suggesting improvements, or helping out, >> check it out at http://bitbucket.org/amertune/goblin >> >> > > grep.go:7: fatal error: can't find import: optparse > i think you sho

Re: [dev] goblin (9base in Go)

2010-03-29 Thread Szabolcs Nagy
On 3/29/10, Jeff Shipley wrote: > If you feel like criticizing, suggesting improvements, or helping out, > check it out at http://bitbucket.org/amertune/goblin > > grep.go:7: fatal error: can't find import: optparse i think you should use the "flag" package there as well in cat i think (&buf)[0:

[dev] goblin (9base in Go)

2010-03-28 Thread Jeff Shipley
As I mentioned in the "Summer of Suckless Code" thread, I've started working on goblin (9base written in Go). So far, I've written basename, cal, cat, cleanname, date, echo, grep, seq, sleep, tee (except for the ignoring interrupts bit), and touch. It currently weighs in at 690 SLOC. If you feel