News for hackers. Stuff that matters.

dschoon

Re:How Gödel's Proof Works on Thursday August 13, 2026 @10:34PM (#49294182)
Quanta Magazine is a never ending source of good material. Add it to your feed.
Note that the homebrew package is out of date and will not work with APFS, or with the latest compression codecs.
I adored Eliss when it released. I still use it at one of the single best examples of how a touch UX radically changes the computing experience by aligning software behavior with physical intuitions.

Consider multitouch. Conventional mouse-desktop thinking orients us to one pointer and a one-point interaction mode. "Normal Users" (aka, the Your Mom archetype) new to the touch experience and to Eliss almost always use a single finger to drag around the screen objects, switching to two only to pinch. But around level 3, the game ramps up in difficulty, and this is when the magic happens. The user starts falling behind. Without asking or thinking about it, nearly every single one of them suddenly starts using their other hand. Nobody told them it would work! These are users terrified of clicking the File menu, because it once ate their Word document. Experimentation has a huge mental inhibition, and yet touch is so intuitive it bypasses the block. I've asked all these users whether they noticed -- and while this isn't rigorous by any degree -- nearly all of them reported they did not. This is magic.

Thank you Steph Thirion, for hours of enjoyment in Eliss as well as a lovely natural experiment in UX.

For unknown reasons, ARC has truncated my code-comment. It read:

// => `45`, because `this.a` is resolved to `window.a`, as `window` is the global variable used as the method context when we call an unbound function (which is stupid (`null` would have been a way better choice, Brandon)).

Yeah, I agree with the other comments -- the greatest JS scoping gotcha involves unbound methods.

    var o = { a:13, add:function(b){ return this.a + b; } };
    o.add(42); // => `55`
    var add = o.add;
    add(42); // => `NaN`, because `this.a` is (presumably) `undefined`
    var a = 3;
    add(42); // => `45`, because `this.a` is resolved to `window.a`, as `window` is the global variable used as the method context when we call an unbound function (which is stupid (`null` would have been a way better choice, Brandon)).
This is the sort of thing you learn and just get over to reach the level of javascript mastery. Yeah, some things are silly. But you know what? You only get to write one language to access the dynamic web.
Re:Thoughts on Python 3 on Wednesday December 07, 2011 @05:23PM (#3326409)
I've always heard them referred to as "Generic Functions", though the Wikipedia article is annoying opaque.

The important quality (in my practical understanding) is that a generic function's specialization is decoupled from the object system -- delegating to `x.__iter__()` doesn't require `x` inheriting a method from a parent; the process `iter(x)` uses to delegate might not even require any type information about `x` at all.

Re:What's wrong with OKCupid's matching algorithm. on Wednesday November 23, 2011 @08:46PM (#3272640)
This critique reminds me very strongly of Evan Miller's "How Not To Sort By Average Rating": http://www.evanmiller.org/how-not-to-sort-by-average-rating....

In both cases, the key observation is to realize that the meaning of the numbers is more important than the numbers (or how they're calculated, per se). This point is kind of abstract--especially compared to the salient examples in both pieces--but if you're looking to understand why this error is so common, look first to the fact that it's not an error of stupidity or insufficient maths.

You can sometimes avoid a big practical problem (e.g., an avenue to attack your system via diluting meaning ("spam")) by abstractly considering the meaning behind the structures available to you.

Re:http://(Type any keyword here).jpg.to on Saturday November 19, 2011 @08:12PM (#3256908)
Re:MongoDB 2.0 Should Have Been 1.0 on Monday November 07, 2011 @05:18PM (#3208410)
Here's that search-interest graph he inexplicably screencaps in the article, rather than also linking to it:

http://www.google.com/insights/search/#cat=0-5&q=cassand...

I added Cassandra, as it's substantially more popular than Riak (whereas HBase is not, and you only get 5 slots).

Re: C No Evil on Wednesday August 10, 2011 @12:21AM (#2866744)
Some of the most frustrating problems I've seen are due to misunderstanding or rare semantics rather than mistakes. Examples might include the specifics of floating-point math, or exactly how numeric coercion works. This is especially bad when the result isn't easy to eyeball as right or wrong.

For example, we could force a double-valued transcendental function to float and back for a small loss of precision in normal cases:

    #define sin(d) ((double)sinf(d))
Which yields...

    double i =  10
    --> i    =  10.0000000000
    sin(i)   = -0.5440211109
    sinf(i)  = -0.5440211296
    delta    =  0.0000000187
    
    double i =  0.25
    --> i    =  0.2500000000
    sin(i)   =  0.2474039593
    sinf(i)  =  0.2474039644
    delta    = -0.0000000051
    
    double i = 9999999.999999
    --> i    = 9999999.9999989998
    sin(i)   =  0.4205487007
    sinf(i)  =  0.4205478132
    delta    =  0.0000008875
(Format string was %25.10f, fwiw.)

Another idea: Let's say we know the application relies on rand() to produce the correct distribution for testing, or maybe to generate session keys. Changing the semantics of the RNG won't result in a compiler bug, but it might result in the tests failing to cover all cases, or a horrible security breach.

Re:Why HN Got Slow on Tuesday August 09, 2011 @09:43PM (#2866345)
You know, I still have a 50-odd Erlang article queue. So I'm not saying I want every day to be Haskell Day, but I'm also not saying I'd be terribly upset if I had a few hundred articles on Haskell to keep me warm at night...
Re:Byte Buffers and Non-Heap Memory on Tuesday July 19, 2011 @12:25PM (#2781602)
You might also look into Berkeley JE. It's an in-process KV store, which might be a minor crimp for you, but it's more mature than god and transparently handles paging to disk and shadowing. We used it as durable working memory for a high volume stream-processing application, bundling rows together into pages, compressing them, and then letting JE handle caching and GC. It does an excellent job.

http://www.oracle.com/technetwork/database/berkeleydb/overvi...

License for server usage is Sleepycat. http://en.wikipedia.org/wiki/Sleepycat_License

Re:Why I will never pursue cheating again on Tuesday July 19, 2011 @03:29AM (#2779912)
The original post has disappeared. Here's the google cache:

http://webcache.googleusercontent.com/search?q=cache:zlciYW0...

Re:Can you solve it? The Greplin programming challenge on Friday October 08, 2010 @04:11PM (#1773164)
I don't think trivializing the combinations with Python's builtins, looking up the fib primes with OEIS, or computing factors with Alpha is cheating. I hope, in fact, it's the whole point of the exercise: choose the right tools for the job. If you're writing code to test primeness or generate Fibonacci numbers, I sure as hell don't want to hire you.
Re:Apple faces $600m damages claim on Tuesday October 05, 2010 @10:29AM (#1759849)
David Gelernter is a CS professor at Yale, an author, and as far as I can tell, not really a scumbag. But who knows, he did name his coordination language Linda, because "'Ada' is to 'Ada Lovelace' as 'Linda' is to 'Linda Lovelace'".

http://en.wikipedia.org/wiki/Linda_%28coordination_language%...

He's got quite a few essays on edge.org of some repute, including this one from 2000 in which he eerily and in detail predicts the move to event stream-based information presentation. Quantity, not quality, he says.

http://news.ycombinator.com/item?id=1759763

In any case, all the Mirror Worlds patent trial documents are available here:

http://news.ycombinator.com/item?id=1759843

From the summary there:

The document display lawsuit involved Apple's Cover Flow, Time Machine, and Spotlight displays. Plaintiff Mirror Worlds LLC alleges that Defendant Apple, Inc. infringed on U.S. Patent Nos. 6,006,227 and 6,638,313 B1 entitled "Document Stream Operating System" and 6,725,427 B2 entitled "Document Stream Operating System with Document Organizing and Display Facilities," 6,768,999 B2 entitled "Enterprise, Stream-Based Information Management System".

Re:Xz on Thursday June 24, 2010 @07:42PM (#1459517)
I built and tried this out. I'm rather shocked to see speed and compression ratio better than gzip -9.

The results of my unscientific test (compression only):

   Compressor  Size  Ratio  Time
   gzip -1     23MB  88%     1.18s
   gzip -2     23MB  87%     1.38s
   bzip2       23MB  87%     5.57s
   xz -1       23MB  87%     5.35s
   xz -9       11MB  43%    10.58s
   bmz         13MB  45%     0.95s
Looking at the code, the hooks are DOM listeners that intercept the click to do the redirect. They don't modify the anchor tag, so there's no reason anyone should see them on mouseover or right-click-copy.
Re:Lightning - A new and faster way to use your shell on Tuesday April 13, 2010 @08:23AM (#1261705)
Fish shell (http://fishshell.org) performs essentially the same sort of completion for many classes of files based on context. I've found the complete subsystem to be quite pleasant compared to bash, and I recommend it to anyone interested in trying out this sort of thing.
Re:My Duck Duck Go reddit ad by the numbers on Monday March 29, 2010 @01:38PM (#1227047)
Related: I've often wondered why no one has found a successful way to brand opt-in ad targeting. You'd have to be big enough for it to matter (Google?), but it would have a tremendously positive effect on both the end-user experience, and on ad revenues.

Older »