Ben Hoyt

Results 354 comments of Ben Hoyt

Very weird! I get 4s consistently: ``` $ go test ./interp -run=TestExecuteContextSystemTimeout -v -count=1 === RUN TestExecuteContextSystemTimeout --- PASS: TestExecuteContextSystemTimeout (4.00s) PASS ok github.com/benhoyt/goawk/interp 4.005s ```

I've been thinking on and off about the best way to implement this. There will be a significant performance penalty for those functions (`index`, `length`, `match`, and `substr`): because Go/GoAWK...

@arnoldrobbins Yeah, on further thought I think that's fair enough. It shouldn't break many scripts, as you'd have to use constant indexes in substr() *and* have non-ASCII input for the...

Reopening this as I've unfortunately had to revert the above fix, due to its problematic O(N) behavior, which made certain scripts O(N^2) and untenably slow. To fix properly, we'll need...

@arnoldrobbins Thanks, that's very helpful. I figured Gawk would be a lot smarter about this. I could definitely do something similar in Go (though as you indicate, it does introduce...

I've started playing with this on the `fix-incr-decr` branch.

gawk, original-awk, and mawk all print `3` for that example. It's because they parse the expression as `$0++` (which returns the current value of `$0` but also post-increments `$0`); then...

Thanks for the contribution. I've been out of C++ for so long I don't really know how to evaluate this solution. Given that inih is stated as "good for embedded...

Thanks. I'm going to ping the recent (in the last few years!) contributors to the C++ wrapper for inih: @vrresto, @evorw, @NeatNit, @zhaowenlan1779, @Jvanrhijn, @FredrikBlix -- I'm assuming you're a...

Thanks. This looks good at first glance, but I don't think it's correct. You *can* have multiple items with zero distance between them. For example, in the case of image...