[dev] [sbase] [PATCH 1/3] grep: Reverse some if-else logic

2016-05-13 Thread Michael Forney
This way, people don't have to do double negatives in their head. --- grep.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/grep.c b/grep.c index 64ffbe2..ae23967 100644 --- a/grep.c +++ b/grep.c @@ -114,23 +114,23 @@ grep(FILE *fp, const char *str)

[dev] [sbase] [PATCH 3/3] grep: Fix -v output and exit status

2016-05-13 Thread Michael Forney
Previously, it printed lines that didn't match some pattern. Instead, it should print lines that don't match *any* pattern. Test case: out=$(echo foo | ./grep -v -e foo -e bar) if [ "$?" = 1 ] && [ -z "$out" ] ; then echo pass else echo fail fi --- grep.c | 28 +++

[dev] [sbase] [PATCH 2/3] grep: Fix exit status with -F when last line doesn't match

2016-05-13 Thread Michael Forney
Test case: if printf '%s\n' foo bar | ./grep -F foo >/dev/null ; then echo pass else echo fail fi --- grep.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grep.c b/grep.c index ae23967..fb911ff 100644 --- a/grep.c +++ b/grep.c @@ -107,7 +107,7 @@ grep

Re: [dev] Re: Linux distros that don't suck too too much

2016-05-13 Thread hiro
the main complication is not to learn how to use a piece of software, but to find or create the right one to use. On 5/13/16, Rubén Llorente wrote: > Ben Woolley wrote: >> The word "properly" presumes a purpose/end/effect. Billions of people use >> computers for their own purposes. If you are go

Re: [dev] Re: Linux distros that don't suck too too much

2016-05-13 Thread hiro
you're making up words there. nobody cares about your aesthetic problem if your code only adds complexity to people's lifes you shouldn't code. my code makes other people's lifes easier. finding the right abstractions is a process. this does not apply only to code btw. On 5/13/16, Ben Woolley