HNHacker News
TopNewBestAskShowJobs

johnp_

217 karma · joined April 19, 2016

submissionscomments
johnp_··on CloudFlare, SSL and unhealthy security absolutism
You could try Wappalyzer. Your comment just reminded me of that gem. No security state detection though. May be added if CloudFlare adds an x-cloudflare-crypto header.

https://wappalyzer.com/applications

johnp_··on A Quirky Function
Not a math student, but I tried it anyway:

  0 for x<=0
  1 for x>=1
  e^(1 - 1/(1 - (x - 1)^2)) else
Does this work? Does the last condition mean smoothness (C∞)?

(Not a native english or math speaker, so please forgive my ignorance)

edit: HN ate the link :/ wolframalpha code:

  Piecewise[{{0, x <= 0}, {1, x >=1}}, {e^(1 - 1/(1 - (x - 1)^2))}]
johnp_··on Contextual Identities on the Web
Well, there's an Add-on to prevent the latter:

https://addons.mozilla.org/en-US/firefox/addon/clean-links/

johnp_··on Firefox 48 Beta, Release, and E10S
The built-in dev tools have improved drastically in the latest versions of Firefox and that's also why [Firebug.next](https://getfirebug.com/downloads) (aka Firebug 3) isn't a standalone panel any more, but is integrated with and built upon the native dev tools.
johnp_··on Firefox 48 Beta, Release, and E10S
There isn't. It is planned to add an algorithm for grouping tabs into processes and dynamically adding/removing content processes, but that's low priority right now, because the current focus lies on getting the single content process e10s ready for the release channel.

More info in the e10s-multi bug and its dependencies:

https://bugzilla.mozilla.org/showdependencytree.cgi?id=e10s-...

(also a nice way to look for known issues that might affect you if you're interested in trying out e10s-multi)

johnp_··on Firefox 48 Beta, Release, and E10S
Please try out the development version of lastpass, as most of the e10s compatibility work has gone into that:

https://addons.mozilla.org/en-us/firefox/addon/lastpass-pass...

johnp_··on Linux 4.6 is out
np ;)

With blk-mq + nvme and later lightnvm that whole IO-scheduler mess will hopefully go away over the course of the next couple years (at least for personal computers).

johnp_··on The surprising cleverness of modern compilers
You're right. Least significant _set_ bit is (x & -x).

Got confused by the (x & (x-1)) and thought rosstex must have meant something more complicated, because it doesn't seem to result in the usual LSB either :/

johnp_··on The surprising cleverness of modern compilers
This just results in the "first" bit, essentially showing whether x is odd (1) or even (0).

Example: 6_10 = 110_2 and 1_10 = 001_2

(x&1) = 110 & 001 = 000 -> even number

I think the x&(x-1) is wrong though. I thought (x & -x) extracts the LSB:

010&110 = 010

110&010 = 010

001&111 = 001

111&001 = 001

001 010 100 = 110 101 100 = 000 000 100

This happens because the negative integers in two's-complement are just the positive number with all bits negated plus 1. If it'd only be negated, the result would be 0, as all bits would be different from one-another. Now everything right of the LSB of the argument is by definition zero and in the negated version by definition one. Finally, two's complement adds a one which turns all those bits back to zero and the position where the LSB is to one. This is now the only place in the two binary numbers where both bits are one, and therefore the only place that "survives" the '&'-Operation and remains one. All other bits become 0.

Disclaimer: Still studying and not teaching (yet) ;)

edit: changed order of examples to clarify, that it works from positive to negative and the other way round.

johnp_··on Signed overflow in C
Fwiw here's the Rust side of things (also with reference to `lea`):

https://huonw.github.io/blog/2016/04/myths-and-legends-about...

tl;dr:debug mode checks for overflow and panics when it happens; release mode is defined to wrap as two's complement

johnp_··on Linux 4.6 is out
Which scheduler are you using on the USB device? Did you try deadline or BFQ?

There is a long standing (CFQ-related) kernel issue causing system lockups in high I/O situations:

https://bugzilla.kernel.org/show_bug.cgi?id=12309

johnp_··on Amazon S3 Transfer Acceleration
Secure Connection Failed

An error occurred during a connection to aws.amazon.com. Peer attempted old style (potentially vulnerable) handshake. Error code: SSL_ERROR_UNSAFE_NEGOTIATION

Really,Amazon?

https://www.ssllabs.com/ssltest/analyze.html?d=aws.amazon.co...

No PFS, TLS 1.0 only, No HSTS or HPKP ??

← PreviousPage 3 of 3