News for hackers. Stuff that matters.
Re:A 220b spreadsheet app in HTML/JS by Arnavion on Thursday September 28, 2017 @05:55AM (#15355937)
>Can somebody explain to me how: "a[i]+-~j" is the same as "a[i]+(j+1)" ?

-(~j) = Twos complement of the ones complement of j

Twos complement = ones complement + 1

So twos complement of (ones complement of j) = ones complement of (ones complement of j) + 1 = j + 1

Re:A 220b spreadsheet app in HTML/JS by hjalle on Thursday September 28, 2017 @07:25AM (#15356300)
Am I missing something or isn't the "+" unnecessary? i.e. a[i]+-~j = a[i]-~j
Re:A 220b spreadsheet app in HTML/JS by xem on Thursday September 28, 2017 @08:55AM (#15356707)
Sure, i explained it here earlier today: https://github.com/xem/sheet/issues/4