Open GoogleCodeExporter opened 9 years ago
[deleted comment]
I find what kill the crancher - this is symbol "~" (bitwise not)
Original comment by malakhov...@gmail.com
on 6 Aug 2008 at 4:56
The code in this project is an old version, as I closed the google account it
belonged to, and forgot that this was on it, so I no longer have any control
over
it. There's a more up to date version at http://www.calamity.org.uk/crunchy/
which
doesn't have this bug. I'll make the source available soon.
Incidentally, your code has an error in it, the line:
r=m-1;}}else{while(l<=r){m=(l+r)>>1;this[m]==v)return
has a an unmatched ')'. I think it should be:
r=m-1;}}else{while(l<=r){m=(l+r)>>1;if(this[m]==v)return
Original comment by dnl...@gmail.com
on 7 Aug 2008 at 6:24
hm... I my original code is
Array.prototype.binarySearch = function( value, comparer ) { var l = 0, r =
this.length-1, m; if( comparer != null ) { var res; while( l <= r ) { m = ( l +
r )
>> 1; res = comparer( this[m], value ); if( res == 0 ) return m; if( res < 0 )
l = m
+ 1; else r = m - 1; } } else { while( l <= r ) { m = ( l + r ) >> 1; if(
this[m] ==
value ) return m; if( this[m] < value ) l = m + 1; else r = m - 1; } } return
~l; }
no error here, I think that cruncher make this, or maybe I make this error while
copy-pasting and playing with it... :)
I hope that sources will available soon... project is very interesting!
so I have some ideas how to make more compression ratio, and I think that be
cool to
make Javascript LINT based on your sources
Original comment by malakhov...@gmail.com
on 8 Aug 2008 at 6:39
Original issue reported on code.google.com by
malakhov...@gmail.com
on 6 Aug 2008 at 4:39