This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[17:33] <joepie91> so like, the big problem with IPFS-based things is that nobody feels responsible for maintaining availability | |
[17:33] <joepie91> which is fine for popular things like torrents with thousands of seeds | |
[17:33] <joepie91> but not for small/uncommon things | |
[17:33] <joepie91> there's no central server with a backup regime which is responsible for availability | |
[17:33] <joepie91> in one way, that is a feature | |
[17:34] <joepie91> but in another way, it means that none of the peers are likely to have a similar availability regime or guarantee | |
[17:34] <joepie91> because everybody thinks "oh, it's distributed, I can just rely on the other peers" | |
[17:34] <joepie91> it's a game theory problem really, and unless it's solved, this trend of building everything on top of IPFS is going to result in *massive* data loss in the next 2-3 years |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urwid, random, re, time | |
blank = urwid.Divider() | |
palette = [ | |
('body','light gray','black', 'standout'), | |
('reverse','light gray','black'), | |
('header','white','dark red', 'bold'), | |
('important','dark red','black',('standout','underline')), | |
('editfc','white', 'dark blue', 'bold'), | |
('editbx','light gray', 'dark blue'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BinarySearch { | |
public int find(int[] arr, int v) { | |
int i = 0; | |
int b = (1 << (Double.doubleToLongBits(arr.length - 1) >> 51)); | |
while ((b >>>= 1) > 0) { | |
if ((i | b) < arr.length && arr[i | b] <= v) i |= b; | |
if (arr[i] == v) return i; | |
} |
OlderNewer