Better HN
topnewbestaskshowjobs
Log inSign up

adilparvez

105 karma · joined Nov 3, 2016 (10y ago) · 33 submissions

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

comment 9y ago · link · parent

Take a look at PureScript [1], it's Haskell-like but strict.

[1]: http://www.purescript.org/

2.

Generalised egg drop problem(blog.adilparvez.com ↗)

2 points · by adilparvez · 10y ago · discuss

comment 10y ago · link · parent

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

comment 10y ago · link · parent

Hi HN,

I wrote this script and thought it might be useful to others.

Thanks.

5.

Show HN: vault – create and use encrypted containers simply(gitlab.com ↗)

2 points · by adilparvez · 10y ago · 1 comment

comment 10y ago · link · parent

Yes, I think it is like that.

comment 10y ago · link · parent

Cool, I shouldn't make assumptions, thanks for the link.

comment 10y ago · link · parent

> 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.

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

I was meaning if your machine was compromised.

comment 10y ago · link · parent

Yes, under that threat model you would lose with all of these password managers.

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

It's great people are exploring this problem space, but so far nothing comes close to https://www.passwordstore.org/ which is just a wrapper around gpg and git. It has Android/iOS clients, as well as GUI clients.

On Android I use Password Store + OpenKeychain, the UX with a YubiKey is very smooth.

https://fossdroid.com/a/openkeychain.html https://fossdroid.com/a/password-store.html

comment 10y ago · link · parent

Facebook and companies like it will in the long run harm more than just democracy. See https://www.theguardian.com/technology/2014/jun/30/facebook-....

comment 10y ago · link · parent

Also check out the Making Crash Bandicoot series: http://all-things-andy-gavin.com/2011/02/02/making-crash-ban...

The post on GOOL (predecessor to GOAL [1]) is especially interesting.

[1]: https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

I've been using this on the desktop, and Password Store + OpenKeychain on Android, both are very polished apps. This setup works great with a YubiKey.

https://fossdroid.com/a/openkeychain.html https://fossdroid.com/a/password-store.html

comment 10y ago · link · parent

Another technical overview: http://forum.doom9.org/showthread.php?t=167081

Edit: Just realised IshKebab linked to my comment linking to doom9 in yesterday's h264 thread.

19.

Casper: A Compiler for the Analysis of Security Protocols(cs.ox.ac.uk ↗)

2 points · by adilparvez · 10y ago · discuss

comment 10y ago · link · parent

Kind of related: 360 real time stitched video http://www.argondesign.com/products/argon360/

comment 10y ago · link · parent

You might like this: https://blog.adilparvez.com/post/2016/07/21/1/lets-implement...

comment 10y ago · link · parent

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.

23.

Raccoon – Play Store client(onyxbits.de ↗)

1 points · by adilparvez · 10y ago · 1 comment

comment 10y ago · link · parent

I neglected to mention that the first time you install Signal it should come from a trusted source (e.g. copy it from someone who is happy to use the play store), then updating via apkmirror is safe, since the signatures will match.

Also this might be useful a desktop play store client: http://www.onyxbits.de/raccoon

comment 10y ago · link · parent

That is a really good point, I actually got someone else to get it from the play store then copied it, the updates from apkmirror are then fine since the signatures match. I'll edit the post to say, get it from a trusted source.

This is also useful: http://www.onyxbits.de/raccoon It's a dektop play store client. I tried it out a while back and it worked, don't know about now.

comment 10y ago · link · parent

Oops, yes log(n), I'll correct the comment, thanks.

comment 10y ago · link · parent

There is a log time way to do this, use Binet's formula (https://en.m.wikipedia.org/wiki/Fibonacci_number#Closed-form...), but do the arithmetic in the field Q[√5].

Edit: Someone's implementation: http://ideone.com/NWQe38

Edit: constant time -> log time

comment 10y ago · link · parent

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/

12