News for hackers. Stuff that matters.

adilparvez

Re:Towards Idris Version 1.0 on Thursday December 01, 2016 @08:35AM (#13079218)
Take a look at PureScript [1], it's Haskell-like but strict.

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

Re:Regex that only matches itself on Friday November 11, 2016 @04:19PM (#12934434)
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

Hi HN,

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

Thanks.

Re:The P=?NP Poll (2002) [pdf] on Monday November 07, 2016 @01:56PM (#12893765)
Yes, I think it is like that.
Re:The P=?NP Poll (2002) [pdf] on Monday November 07, 2016 @01:47PM (#12893675)
Cool, I shouldn't make assumptions, thanks for the link.
Re:The P=?NP Poll (2002) [pdf] on Monday November 07, 2016 @12:32PM (#12892915)
> 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.

Re:The P=?NP Poll (2002) [pdf] on Monday November 07, 2016 @11:50AM (#12892488)
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.

Re:LessPass: sync-less open source password manager on Monday November 07, 2016 @10:58AM (#12892008)
I was meaning if your machine was compromised.
Re:LessPass: sync-less open source password manager on Monday November 07, 2016 @09:16AM (#12891102)
Yes, under that threat model you would lose with all of these password managers.
Re:LessPass: sync-less open source password manager on Monday November 07, 2016 @08:30AM (#12890819)
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.

Re:LessPass: sync-less open source password manager on Monday November 07, 2016 @07:25AM (#12890498)
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

Re:Facebook is harming our democracy on Sunday November 06, 2016 @06:30PM (#12887735)
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-....
Re:The Pac-Man Dossier on Sunday November 06, 2016 @01:53PM (#12886458)
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

Re:The X3DH Key Agreement Protocol on Sunday November 06, 2016 @06:34AM (#12884638)
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.

Re:“Sites like these give PHP a bad reputation” on Sunday November 06, 2016 @06:04AM (#12884568)
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

Re:H265: Technical Overview on Saturday November 05, 2016 @01:49PM (#12880874)
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.

Re:GoPro shows its vulnerability after horrific Q3 earnings on Friday November 04, 2016 @10:55AM (#12873040)
Kind of related: 360 real time stitched video http://www.argondesign.com/products/argon360/
Re:Raccoon – Play Store client on Friday November 04, 2016 @09:57AM (#12872565)
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.
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

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.

Re:Fast Fibonacci Algorithms (2015) on Friday November 04, 2016 @09:16AM (#12872275)
Oops, yes log(n), I'll correct the comment, thanks.
Re:Fast Fibonacci Algorithms (2015) on Friday November 04, 2016 @08:57AM (#12872171)
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

Re:H.264 is Magic on Friday November 04, 2016 @08:47AM (#12872108)
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/

If you want to go GApps free, I recently wrote about this. It's very short but points to where to find more. https://blog.adilparvez.com/post/2016/10/31/1/cyanogenmustar...

Older »