Better HN
topnewbestaskshowjobs
Log inSign up

ephemient

50 karma · joined Mar 19, 2010 (16y ago) · 26 submissions

Submissions

comment 13y ago · link · parent

On stock JB, even with USB debugging turned on, it's been tightened down. http://android-developers.blogspot.com/2013/02/security-enha...

comment 13y ago · link · parent

Are you thinking of EXTPROC/LINEMODE? There's outstanding patches to bash, telnet, and ssh to support these, which enables local line-editing that works smarter than just local echo.

TIOCPKT_IOCTL(EXTPROC) and TIOCSIG support landed in Linux kernel 2.6.36: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....

comment 13y ago · link · parent

My workaround is to click an element, then type into console

    $0.appendChild(document.createElement('tagName'))
but yeah, a [+] button would be nice…

comment 13y ago · link · parent

Android WebKit and Chrome use V8.

comment 13y ago · link · parent

Browser's gone from the stock image on the Nexus 4, 7, and 10.

android.webkit.WebView is still the same Android WebKit engine that Browser used (whether it's installed or not); Chrome brings along its own WebKit port.

comment 13y ago · link · parent

OAuth authentication for IMAP (via SASL): https://developers.google.com/google-apps/gmail/oauth_overvi...

I don't know if there are many clients that support it yet, though.

comment 14y ago · link · parent

Not true. Internet Explorer used to work with both NSAPI and ActiveX plugins, until they pulled support for the former.

"""Netscape-style plug-ins are supported in Internet Explorer 5.5 Service Pack 1 (SP1) and earlier, but are not supported in Internet Explorer 5.5 Service Pack 2 (SP2) and Internet Explorer 6.""" -- http://support.microsoft.com/kb/306790

comment 14y ago · link · parent

After switching between keyboards with Esc in different places, I've learned to use

    Ctrl-[
instead. Can hit it without moving that far, and it works just as well in GVim as it does in all terminal programs.

The only downside is being confused when nothing happens in a browser...

comment 14y ago · link · parent

Nope,

    <file ./command --args
and even

    ./command <file --args
works fine in Bash and Zsh.

comment 14y ago · link · parent

So that you can do tricks like this:

    #define ever (;;)
    for ever {...}
;-)

comment 14y ago · link · parent

You mean like http://developer.android.com/tools/extras/support-library.ht... ?

comment 14y ago · link · parent

As far as I know, it's an avoidance for a WebKit bug wherein elements' pixel positions and sizes are simply wrong at non-default zoom levels; see https://bugs.webkit.org/show_bug.cgi?id=60318 and all related.

comment 14y ago · link · parent

Not true: ARM can run PNaCL.

http://www.chromium.org/nativeclient/pnacl/building-and-test... http://www.chromium.org/nativeclient/reference/arm-overview

comment 15y ago · link · parent

As said above, it's only Win32 that's broken. NT filenames (e.g. \\?\...) aren't limited by MAX_PATH.

comment 15y ago · link · parent

http://blog.chromium.org/2011/06/introducing-non-admin-chrom...

comment 15y ago · link · parent

Chrome bundles a PDF renderer. (You won't find it in the open Chromium sources; it's by proprietary license from a third party.)

http://blog.chromium.org/2010/06/bringing-improved-pdf-suppo...

It's already sandboxed and pretty fast and light-weight, so I'm not sure the Chromium developers would put much work into a replacement.

comment 15y ago · link · parent

See also (2001): "LINE Is Not an Emulator. LINE executes unmodified Linux applications on Windows by intercepting Linux system calls."

http://sourceforge.net/projects/line/

comment 15y ago · link · parent

I'm not sure if you can access its state programmatically, but Android already does detection: the WiFi status icon is green if the system can make a connection to Google's servers, and grey otherwise.

IPv[46] have nothing to do with it. "Captive portal" pages are meant to prevent you from getting to the larger Internet, until you do whatever magic is required to dismiss them.

comment 15y ago · link · parent

I have not profiled the code, but I expect that the Newtonian approximation of sqrt is the slowest part.

It would surprise me if "powers" was a big problem relative to the rest. And no shortcuts: each of [1, b b², b³, b⁴, b⁵, …] (up to n) is used in the binomial expansion.

comment 15y ago · link · parent

Hmm, I screwed up and wrote iterate instead of iterate' where I intended. Not that it really makes a difference.

In any case, the average time to print the first 20 Fibonacci numbers is 0.4157ms with matrix exponentiation and 1.707063s with exact integer math (yes, the units are different) on a T400.

comment 15y ago · link · parent

http://stackoverflow.com/questions/4327846/calculating-fibon...

It's straightforward (if messy) to calculate two rationals exactly, then approximate √5 to within certain error bounds.

I wrote some code which does this, just as an experiment... and it's unbearably slow. Just try it.

  import Control.Arrow
  import Data.Ratio

  newtype Matrix2 a = Matrix2 (a, a, a, a) deriving (Show, Eq)
  instance (Num a) => Num (Matrix2 a) where
      Matrix2 (a, b, c, d) * Matrix2 (e, f, g, h) =
          Matrix2 (a*e+b*g, a*f+b*h, c*e+d*g, c*f+d*h)
      fromInteger x = let y = fromInteger x in Matrix2 (y, 0, 0, y)
  fib n = let Matrix2 (_, x, _, _) = Matrix2 (1, 1, 1, 0) ^ n in x

  binom n =
      scanl (\a (b, c)-> a*b `div` c) 1 $
      takeWhile ((/=) 0 . fst) $ iterate (pred *** succ) (n, 1)
  evens (x:_:xs) = x : evens xs
  evens xs = xs
  odds (_:x:xs) = x : odds xs
  odds _ = []
  iterate' f x = x : (iterate f $! f x)
  powers b = iterate (b *) 1
  esqrt e n = x where
      (_, x):_ = dropWhile ((<=) e . abs . uncurry (-)) $ zip trials (tail trials)
      trials = iterate (\x -> (x + n / x) / 2) n
  fib' n = (a, b) where
      d = 2 ^ n
      a = sum (zipWith (*) (odds $ binom n) (powers 5)) % d
      b = sum (zipWith (*) (evens $ binom n) (powers 5)) % d
  fib2 n = numerator r `div` denominator r where
      (a, b) = fib' n
      l = lcm (denominator a) (denominator a)
      r = a + esqrt (1 % l) (b * b / 5) + 1 % 2

comment 15y ago · link · parent

Wikipedia says "Intel still holds an ARM license even after the sale of XScale." http://en.wikipedia.org/wiki/XScale

I don't know if it's true five years later now, though.

comment 15y ago · link · parent

Are you on OS X Leopard?

My understanding is that the out-of-process rendering used by Chrome forces blitting the whole page from the child process to the parent chrome on systems predating Snow Leopard.

comment 15y ago · link · parent

Do you?

http://chromium.hybridsource.org/the-iron-scam

At a glance, it doesn't seem like much has changed. Some more tweaks and a minor amount of development.

comment 16y ago · link · parent

It may be the Java plugin crashing when loading the applet. Try disabling it.