HNHacker News
TopNewBestAskShowJobs

premchai21

116 karma · joined April 3, 2011

Also known as Drake Wilson. Meager website at http://dasyatidae.net/~drake/.
submissionscomments
premchai21··on When Banks Use Facebook Friends To Determine Your Credit Score
If you actually mean “asynchronous”, could you please explain how that is relevant? Or perhaps you meant “asymmetrical”.
premchai21··on A Case Against Using CoffeeScript
Ruby methods bound to their objects can be passed around; it's just a bit more cumbersome, in the form of « m = obj.method(:foo) » followed by « m.call(…) ». You can even do « m = :foo.to_proc » in recent Ruby and be able to « m.call(obj, …) »; this is quite useful for things like « [1, 2, 3].inject(&:+) ».

So we have that Python's dot always binds, Ruby's dot always calls, and Lua's dot is always a table lookup, with Lua's colon being a separate syntax for (always) the compound operation with injected self-argument.

And then JavaScript is the schizophrenic one: « obj.foo(bar) » is not the same as « var y = obj.foo; y(bar) ». Property lookup and function call insert a hidden step between them when and only when directly composed, and a function call without an immediately adjacent property lookup in a way injects the opposite step of making « this » in the callee be the global object (I think). “Politicians lie in cast iron sinks.”

premchai21··on Busted: BitTorrent Pirates at Sony, Universal and Fox
The number of available TCP ports is typically, but incorrectly, stated as 2^16 ports, but in practice, you can't use all of them.

That's mainly why I wrote “at most” instead of trying to compute the exact available number, yes.

You don't even theoretically need application-layer gateways to multiply the effective number of ports by a large factor for common loads, of course, as I mentioned; I just erroneously thought such technique was not in common use, per my reply to eggnet.

premchai21··on A Case Against Using CoffeeScript
What do you mean “isn't actually bound”? The function being defined using colon syntax doesn't close over self, since it's a parameter—but functions defined within that function will close over the self parameter, since it's a local from an enclosing scope:

    foo = { x = 3 }
    function foo:bar(baz)
        return function(thud)
            return thud + baz + self.x
        end
    end

    womble = foo:bar(4)
    womble(7) --> 14
Python I believe also closes over self as a variable, and Ruby has similar behavior for local procs, even though « self » is a special form in Ruby.

This is in distinct contrast to JavaScript, where the value of the special form « this » goes nuts inside closures because it's attached to the function:

    foo = { x: 3 };
    foo.bar = function(baz) {
        return function(thud) {
            return thud + baz + this.x;
        };
    };

    womble = foo.bar(4);
    womble(7) # --> NaN
So in what way are you placing Lua and JavaScript together, and Python and Ruby together?

[slightly rearranged for clarity]

premchai21··on Why you can't hire
Don't underestimate the hard, fractal, handwavey problems, though. Place a thousand apes together and they start forming chaotic systems that can be very hard to understand. What's worse, most bugs on that front are virtually guaranteed to be undiagnosable without altering the dynamic—and there's ethical problems with just getting out the logic probe…
premchai21··on Busted: BitTorrent Pirates at Sony, Universal and Fox
I was originally thinking this would break things like IDENT, but then I remembered that they use the entire tuple (d'oh). I'll take your word for the pf behavior, and retract my bogus guess about kernel NAT. :-)
premchai21··on A Case Against Using CoffeeScript
What do you mean by Lua leaving the caller to explicitly specify? Are you referring to earlier versions of Lua that used the explicit ^ upvalue sigil? Lua 5.1 (and 5.2) functions close over all local variables (including the implicit “self” introduced by function definitions with colon syntax), with the innermost ones first and no explicit upvalue sigil, much like Scheme.
premchai21··on Busted: BitTorrent Pirates at Sony, Universal and Fox
But there are at most 2^16 TCP ports available on the other side. I think this doesn't theoretically prevent one from reusing an exterior port multiple times for multiple connections to different other IP addresses or ports, but that would be both rather tricky and inconsistent with some cultural expectations regarding the use of initiating ("client") ports, and so I doubt any current NAT stack in common use uses that approach (though I'd love to be proven wrong). It also fails naturally if all sixteen million hosts try to communicate with the same host/port on the other side. UDP has similar but nonidentical constraints.
premchai21··on CaterwaulJS "Nobody in their right mind would use this language"
Stack languages like Forth and PostScript could reasonably be considered SOV. In PostScript, even control flow words come at the end, with subordinate clauses being deferred by curly braces: « (Hello, world!) 2 2 add 5 eq { 0 5 getinterval } { 7 6 getinterval } ifelse » places the string "world!" on the stack.
premchai21··on This Site’s Domain is Stolen
One thing to note about EasyDNS is that last I checked, glue updates require human intervention, and IPv6 glue is a good way to confuse the humans on the other side of the support channel. If you don't use glueful delegations, then you probably don't care, but this is the sort of thing that's harder to tell upfront.
premchai21··on Show HN: a Lisp that uses JSON instead of S-expressions (in .js)
They're similar, but the Lua form is much cleaner. In particular, JS objects only permit string keys, which makes Arrays sort of preposterous; they also have other baggage related to the prototype system. Lua tables can have any type except nil (which is not truly first-class in Lua) as keys, and can also have "metatables", which are of similar or greater power to the latter baggage but semantically somewhat simpler. To me this makes a world of difference.
premchai21··on Show HN: a Lisp that uses JSON instead of S-expressions (in .js)
Lua tables are a general-purpose associative structure that are used for both map and list functions in that language: there's syntactic sugar for both consecutive integer keys and simple string keys, and the former are used to make sequences (with internal, semantics-preserving optimizations in the Lua runtime for storing them). They strike me as one of the best options for a single core data structure if one were limited to one.
premchai21··on RIP, Anne McCaffrey
I was deliberately using the now-mostly-archaic sense of the noun referring to dragons. It puns nicely on my given name, among other reasons.
premchai21··on RIP, Anne McCaffrey
polyphonic radio croon in imitation of her dragons' death-recognition calls

(I'm not Pernese myself, though I am a drake. But it seems fitting.)

premchai21··on http://(Type any keyword here).jpg.to
Note that that particular word is a katakana phonetic import from English; in romaji that reads "hakkaa". So while that works as an example of multilingual character support, it may not be the best example for a foreign word per se. :-)
premchai21··on Spark
I'm curious: is there a reason U+2584 LOWER HALF BLOCK is missing from the character set, which otherwise contains the progression from U+2581 to U+2587?

Edit: U+2588 seems like an obvious candidate as well.

premchai21··on Java.sun.com is down - breaking builds across the land
Viz. XML Catalogs: http://www.oasis-open.org/committees/entity/spec-2001-08-06....
premchai21··on Introducing Bitcoinica API (The first RESTful Bitcoin Trading API)
The base definition of XML doesn't specify hyperlinks. But XLink does, and because XML has namespaces, it can be integrated into any other namespace-aware XML application without risk of collisions: http://www.w3.org/TR/xlink/
premchai21··on If PHP Were British
Yes, and “Perl” has often been expanded as “Practical Extraction and Reporting Language” (I don't recall whether this is a half-joke or not, but I think it is).

If you like you can add the “compatible” though, which would conveniently add to the length.

premchai21··on If PHP Were British
preg_match might actually be better expanded as practical_extraction_and_reporting_language_regular_expression_match. (I'd comment on the original but it's currently too overloaded for it, I gather.)
premchai21··on JQuery 1.6.2 syntax error? You may be the victim of SEO.
Which fake software is this? If it's already taken control of the client side, too, couldn't it just be altering the root certificate set rather than exploiting some weakness of the union of all of the existing roots (which no doubt have many such weaknesses regardless)?
premchai21··on Backbone.js 0.5.0 Released (with pushState)
I'm suspicious of certain possible scenarios here. Someone without the history state API (e.g., an Internet Explorer 8 user) who wants to send out links winds up publishing fragment-based links (with all the scattered interoperability breakage thereof), but others get and publish full(-flavor) links. Then someone finds that with more restrictive JavaScript settings, some of the links work and some of them don't, or bookmarks two references to the same thing, or…

It seems like it would have potential for confusion, but it strongly depends on the application and its context. It's possible for the author to partially work around this by providing what amounts to an extra URI indicator (similar to “permalink” markers in blogs and other time-dependent views of content stores), but this is awkward. (Is there an add-on library for that, for that matter?)

premchai21··on Show HN: I made this: ShoutFast
> 2. Asking for an "Email Address" would be better than asking for a "Username". You kill two birds with one stone. Most people can remember their email address(es) but I know I don't remember the different usernames I use. Allow users to add multiple email addresses and sign in with any of these.

As a counterpoint, I regularly use different Sneakemail addresses on different sites to be able to categorize my mail by origin and provide for limited sending capabilities. These are random-like (in order, among other things, to not be trivial to link to each other) and perfectly machine-readable, but they're difficult to use as usernames. So the trend of “email address as the only acceptable identifier for login” makes things more awkward for me. (This obviously doesn't apply if you allow associating a short name as well.)

premchai21··on Show HN: I made this: ShoutFast
I have little to say about the main functionality at the moment, but I'm afraid my first visual impression of that stylized “o” in the logo is somewhat squick-worthy! Perhaps a bit of reworking might be in order?
premchai21··on Firefox add-on to add OTR encryption to web-based chats
You are misunderstanding, in the latter case. Asymmetric cryptography is used to determine a session shared secret. The deniability aspect is that either participant can generate messages in the same session. Alice receiving X from Bob knows that either Alice or Bob wrote X (assuming the session secret stays secret). Alice cannot prove to Carol that Bob wrote X because Alice's inference of this is dependent on local knowledge that Alice did not write X.
premchai21··on Hello World execution time
Interestingly, Java and Clojure have decidedly different startup times on my machine.

A trivial hello-world in Java takes ~130 ms on my Debian sid box with « OpenJDK Runtime Environment (IcedTea6 1.8.7) (6b18-1.8.7-4) / OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode) ». This is with all default runtime options.

The program « (ns hello (:gen-class)) (defn -main [] (println "Hello, world!")) » compiled with Clojure 1.2.0 (again from Debian sid) takes ~1700 ms. Using -Xbootclasspath takes it down to ~800 ms. -client doesn't do anything obvious. Unpacking the Clojure JAR increases the time.

So presumably there's something about pulling in the Clojure runtime pieces that is very slow, but I have no idea what it is.

premchai21··on Things you (probably) didn't know about xargs
Would not « print0() { tr '\n' '\0'; } » work in most cases? Does your utility do something special to existing instances of \0? That's the only case I can imagine where the transformation is necessarily lossy and it's not clear what to do. I suppose in theory you could have newline normalization or something too.
premchai21··on Lulzsec Declares 'Operation Anti-Security'
While the latter is logically true, one has to be careful. It may be easy to erroneously interpret that as comparing “rebellious hacker teens not recruited by terrorists” and “rebellious hacker teens recruited by terrorists”, which pair has no such guaranteed monotonicity.
premchai21··on Facebook's Internet identity monopoly
> People have a reason to use their accounts on Gmail, Yahoo Mail, Hotmail/Live, Facebook, Twitter, and etc. […] As long as OpenID remains just an identity provider, it will continue to lose ground.

I'm not sure I understand what you're saying here. TTBOMK, Google, Yahoo!, and Windows Live ID are all also OpenID providers. E.g., the Isotropic online Dominion server allows users to “log in with a Google or Yahoo! account” with an OpenID backend.

So if your thesis is that people reject OpenID because they can't extend their identities from those existing accounts, I don't see how that's the case, unless the OPs have restrictions I'm unaware of. (People might not know they can identify themselves with those accounts, which I think is a real problem, but a separate one.)

premchai21··on HAL is a lean hypermedia type for your RESTful APIs
MIME multipart is pretty good in and of itself, and in particular can represent a larger space of content types well. I'm trying to imagine how this interacts with things like URI fragment identifiers, though. MIME has Content-ID, but that's defined to be a msg-id, which doesn't help much. xml:id might be more effective in a sense, but then you run into the internal collision problem again.

Implementationally, hooking up an extra MIME layer is a lot more cumbersome than it should be. This is theoretically a transient characteristic, but I have the creeping feeling that that will destroy any attempts to use MIME for this purpose regardless.

← PreviousPage 2 of 4Next →