HN user

adilparvez

105 karma

https://adilparvez.com/ https://gitlab.com/adilparvez

Posts5
Comments26
View on HN

In Haskell and PureScript, Monad is a typeclass just like any other.

They are an abstraction, effectful computation is not inherent to them, they represent computational contexts, e.g. the list monad is used to model non-determinism, the maybe monad represents computations that can fail, both of these are pure.

This is an excellent set of posts for building an intuition about monads: http://mvanier.livejournal.com/3917.html

If P = NP, then P^X = NP^X for any oracle X, right?

Edit: No, I think. See child comment by JadeNB.

Probably wrong { Yes, since we could just not invoke the oracle. But people do this sort of stuff to study it backwards e.g. what do P^X and NP^X (and any class^X) tell us about P and NP (and any other class). }

I hope this is clearer, let {A, B, C, ...} be the set of all oracles.

For TM + A:

P^A is the class of problems that can be done in P time on this machine.

NP^A is the class of problems that can be done in NP time on this machine.

Similarly for

TM + B

TM + C ...

This theorem says that if we choose one of these oracle machines uniformly at random then P =/= NP in _its_ model of computation a.s.

This is an entirely probabilistic statement about machines that are more "powerful" than standard TMs.

A really cool result which seems relatively unknown is that if we augment our Turing machines with an oracle X chosen uniformly at random from all oracles then P^X =/= NP^X with probability 1.

An oracle is a black box that can solve a particular decision problem in O(1).

The notation means e.g. P^SAT = class of all problems that can be solved in P time with a machine that has an oracle for SAT.

It gets really ingesting because there are particular oracle machines for which P^X == NP^X.

See https://en.m.wikipedia.org/wiki/Oracle_machine for references to papers.

Also see https://en.m.wikipedia.org/wiki/Almost_surely if you don't know what with probability 1 is.

Off topic (but related to almost surely), one of my favourite theorems is Pólya's recurrence theorem which says that a simple random walk on Z^d (lattice) is recurrent for d=1,2 and transient otherwise, so if you get lost on a 1 or 2 dimensional grid, just execute a simple random walk and you'll get back to the origin almost surely! IIRC the probability of recurrence is about 34% in 3d.

You can use a hash of the site appended with a .pass wide pepper as the name of the directory storing credentials for a particular site, then use a wrapper script that hashes its input before passing it to pass.

Also full disk encryption.

On (a) This https://whispersystems.org/bigbrother/eastern-virginia-grand..., claims they only store "date and time a user registered with Signal and the last date of a user's connectivity to the Signal service".

However I think the parent might be concerned that OWS could be compelled to change their server code to log more meta data, currently we must trust them.

For (b) Not sure what could be done about this, maybe an independent service audits each release, subsequent audits would take less time since the diff of the code base would be small. Don't really know, I'd like to know of there are any solutions to this, it seems less like a technical problem than the others though.

For (c) Opening up the server code would encourage people to run their own, see See https://whispersystems.org/blog/the-ecosystem-is-moving/ for why moxie doesn't want federation.

On (d) Using GCM means Google can get all the meta data too if they want/are compelled to. This is a legitimate concern but OWS is very clear what signal does, they don't claim to tackle e.g. traffic analysis. A world with everyone using end to end encryption would be much closed to the crypto-utopia.

This might help you if you want to go GApps free, set up a google account just for using raccoon and have a safe way to get apps without having the play store.

H.264 is Magic 10 years ago

Related, how h265 works: http://forum.doom9.org/showthread.php?t=167081

This is a great overview and the techniques are similar to those of h264.

I found it invaluable to get up to speed when I had to do some work on the screen content coding extensions of hevc in Argon Streams. They are a set of bit streams to verify hevc and vp9, take a look, it is a very innovative technique:

http://www.argondesign.com/products/argon-streams-hevc/ http://www.argondesign.com/products/argon-streams-vp9/