HNHacker News
TopNewBestAskShowJobs

mnarayan01

719 karma · joined January 2, 2013

submissionscomments
mnarayan01··on Promises are not neutral enough
> you cannot cancel the actual (OS controlled) asynchronous operation

This is way too broad a claim. If I do something like:

  (sleep 1 ; echo "done") &
  kill $!
I'm pretty clearly "cancelling the actual (OS controlled) asynchronous operation". Now it may have done some sleeping at that point, and if you replace the sleep with something that has side-effects, then some of those side-effects may have occurred, but the operation is still being "cancelled".

Obviously it's not the case that every operation can be (meaningfully) cancelled, but some can. This is even more true when you consider that when you're using JS, you're generally way above the OS level. XMLHttpRequest has an abort() method for a reason: The underlying socket request may be queued up based on your browser's connection limits and, even if it's kicked off, your browser is going to have multiple opportunities to abort the process even if none of the underlying sub-operations can be preemptively cancelled.

mnarayan01··on Earthsea – A Rival to Tolkien and George RR Martin (2015)
You mean "breaking the fourth wall" a la Deadpool? He at least skirts that line in some places (e.g. Wit/Hoid/etc.). I'd probably class those parts similarly to Shallan's puns: Moderately annoying but tolerable due to rarity.

Or maybe some super-set incorporating both the flat word play and "breaking the fourth wall" all with other willful discarding of immersion? I can't think of anyone else who goes as deep and long into fantasy as he does, and then occasionally casually discards immersion simply to wink at the reader or make a (weak) joke or whatever.

I'm not a fan of this either, though it doesn't happen often so I find it tolerable. That very rarity, though, particularly in combination with the breaks in immersion always seeming gratuitous, does make it feel like an unforced error on his part. If someone's not sold on the 1000 other pages, adding less than five pages of immersion discarding humor seems unlikely to sufficiently sweeten the deal.

> Which, again, as many have pointed out, is due to the prolificness of his writing.

I assume his prolificacy hurts the quality of his prose (though that's very much a pass/fail sort of thing for me; he passes, so his prolificacy is a pure win for me), but what I'm talking about (and maybe you are as well) seems more like what I'll describe as "Get an [expletive] editor." In some ways he seems particularly egregious, as I don't know if even one percent of his content feels like it needs to be excised, and what does feels like it could go for free.

Edit: Reading your sibling comment, I'm probably off-base with the above.

> I think that Shallan, as presented, is written lazily and with a way of thinking and talking that has been forcibly transplanted from our (as in, the World, 2018) current culture and into a fantasy universe, which is jarring to me.

The dialog generally "feels" reasonable to me, but that's obviously something where tastes strongly vary. One note. Looking at:

> No, drat. It would have to be Misjasnahistic, and that doesn't work nearly as well, does it?

I, at least, don't know anyone who talks like that. Which is not to say it's good, just that describing it as "hip" does seem quite curmudgeonly :)

mnarayan01··on Deep-copying in JavaScript
> The object is still passed by value, however the object itself contains references, which may be mutated.

This would imply that:

  var v = 1;

  (function (o) {
    o.a = 2;
  }({ a: v });

  console.log(v);  // => 2
The whole "objects are pass-reference-by-value" is obviously annoying and confusing, but we're kind of stuck with it.
mnarayan01··on Earthsea – A Rival to Tolkien and George RR Martin (2015)
If you're cringing at it, I think you must be getting more from it than I am. The only thing I get out of it is the surface level pun, so I feel the same way as with pretty much all of his other puns: slightly baffled as to why they're included. With this one (though not most others), it feels like there might be a second level that English/Literature majors might get around etymology, but if so, I miss it entirely.

Sanderson also clearly gets many orders of magnitude more out of "word shape" than I do, so he might just really like puns. I've also never translated that quote to any of the various forms of sigals Sanderson defines in the series; if you do so, it might well be breathtakingly beautiful.

> But just like the Marvel movies probably won't be regarded as the masterpieces of our times, despite their popularity, Sanderson's books are not, to me, worthy of such praise either.

Forty years later Star Wars hasn't exactly fallen out of favor. Ignore the stilted dialog...it has a "robot" which is really obviously just a trashcan. Mark Twain's books contain a lot of colloquial dialog which is very much not "soaring prose", and they remain popular a century later. Which is not to say that I think Sanderson will be a hot read in eighty years, but I doubt Jordan or Martin will either. While the average library system presumably has a copy of The Dispossessed at one of its branches, the average branch has zero copies IME.

All of which is totally tangential, I just couldn't let it go (and I tried).

mnarayan01··on Earthsea – A Rival to Tolkien and George RR Martin (2015)
Her wordplay often feels weak (though "hip" seems like an odd way of describing it), but you could probably fit all of it in one page and there are over 2000 pages in the first two books. If you feel disinterested after reading 2000+ pages I'm not inclined to say you should read the next 1000+ page book, but others should note that this is probably not a common opinion. (Shallan does suck the air out of the first book to some extent, but she's great in the second IMO.)
mnarayan01··on Monthly Amazon Prime membership fees are about to increase
[Obsolete; new HN title is fine]
mnarayan01··on Did Ken, Ritchie and Brian choose wrong with NUL-terminated text strings? (2011)
Two bytes extra for the length, but one byte saved from the marker character.
mnarayan01··on Fork is not my favourite syscall
Unless you have vm.overcommit_memory set to 1, then AIUI you can implement malloc s.t. a read/write to the returned memory won't generate a SIGSEGV, e.g. using mmap sans MAP_NORESERVE. Even if vm.overcommit_memory=1, you can still (I assume) do it by simply having your malloc implementation populate each page.

That said, as long as "too small to fail" (https://lwn.net/Articles/627419/) is around (which is presumably "forever"), the oom-killer won't be going away. Fork obviously compounds this massively due to copy-on-write. So ensuring your malloc'd memory is actually writable may just make you a more tempting target for the oom-killer.

> Doesn't ISO C require that if malloc returns a nonzero pointer, it has to backed physically (need not be RAM, could be swap on disk or some other thing)

I don't see anything like that, though admittedly I don't have a "real" copy of the standard. I'd also be at least a little surprised if it were true (though my being surprised by the C standard would...actually not be surprising). While the "spirit of the law" would probably make sense, the "letter of the law" would be difficult. Consider e.g. an otherwise side-effect free function with a statically computable result assuming a successful malloc (and corresponding free), could the compiler optimize away the malloc call?

mnarayan01··on C++17 constexpr everything, or as much as the compiler can
> Doesn't making a variable constexpr ensure it is a compile time value

It ensures that the variable could be evaluated at compile time, where "could be evaluated at compile time" means "conforms to the rules set forth in the C++ standard". Whether or not it is computed at compile time is dependent on the compiler.

mnarayan01··on “Username or password is incorrect” is bullshit
Any evidence of this being used in the wild, particularly where the attack is only trying password variants if the initial failure indicated the user exists? Not disagreeing with the point, just would be interesting if anyone's seen such an attack.
mnarayan01··on “Username or password is incorrect” is bullshit
Doing it every time a user login failed is probably infeasible if you have even a moderate number of users, but you can presumably do it on an ad hoc basis unless you have a ton of users. Or am I missing something?
mnarayan01··on “Username or password is incorrect” is bullshit
The point is that sites generally leak this anyway via signup. With github it's even easier, e.g. https://github.com/someuser -- I looked through my settings and their doesn't appear to be any way to "be invisible", though I could be missing something. When you can do a simple query like that, sacrificing UI at sign-in seems totally pointless.
mnarayan01··on A Classic Extension Reborn: Tree Style Tab
Thanks for all your work. If you had a donation option, I'd be happy to limit my contribution to what I've gained from the past ~10 years of usage with literally no expectation of continued development.
mnarayan01··on A Classic Extension Reborn: Tree Style Tab
Note that the shortcut is equivalent to hitting the "Tree Style Tab" button in the main toolbar, so if you're like me and want to show the tabs all the time you don't need to worry about having a keyboard shortcut.

If you do need the shortcut, AFAIK your only option is to edit the extension. Modify the manifest.json file in the root of the XPI around:

  "commands": {
    "_execute_browser_action": {
      "suggested_key": { "default": "F1" },
      "description": "__MSG_sidebarToggleDescription__"
    }
  }
Unfortunately, actually installing your changes requires a decent amount of arcane incantation (particularly if you're not using Nightly) -- https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Pu... describes how to do it if you want to go that route.
mnarayan01··on How do groups work on Linux?
Manually call e.g. /lib/ld-linux.so.2 (man ld.so for more info).
mnarayan01··on Puffs: Parsing Untrusted File Formats Safely
Consider:

  2-3^4
mnarayan01··on Useful GCC warning options not enabled by -Wall -Wextra
Consider static type checking when adding a new value to the enum. If the switch has a default, then obviously you lose this, but it's nice for the others.
mnarayan01··on Guacamole – A clientless remote desktop gateway
If you invent a Quantum Fusion Plasma Turbine Terraformer, I imagine people will be happy to let you name it whatever you want. Whether due to extreme gratitude, extreme terror, or both.
mnarayan01··on Ntpd won't save you from one particular rogue bit
Unless you're running it with additional configuration (e.g. the -g option), I don't think ntpd will save you from any bit flips other than the 10 least significant: You'll be outside the 1000s panic threshold.
mnarayan01··on Welcome to the World of Software Defined Radio (2016)
If anyone's confused, parent is presumably intended for https://news.ycombinator.com/item?id=15302267.
mnarayan01··on Let’s Debate Female Viking Warriors Yet Again
> Are you saying that the person being female casts doubt on the initial analysis of the person as a warrior?

No -- Her being a female makes her classification as a warrior interesting (i.e. worthy of publication in American Journal of Physical Anthropology).

Let's say someone went through and did genetic analysis on e.g. 10,000 Viking bodies each of which was considered to belong to a warrior with 95% likelihood. Finding that one of those bodies was female would not justify a conclusion of "A female Viking warrior confirmed by genomics".

The above, however, are just some random thoughts in answer to your question; it is not "what I'm saying". I'm merely defending the author of the linked post against claims that she is being pedantic: Taking issue with an article titled "A female Viking warrior confirmed by genomics" is not pedantic if the individual was not a warrior. Note that I take absolutely no position on whether she's right about there being legitimate doubt as to whether or not the individual was a warrior, I merely note that while the objection may be foolish, but it is absolutely not pedantic.

mnarayan01··on Let’s Debate Female Viking Warriors Yet Again
If someone claims that a certain class of problem that no one particularly cares about is in P, and then I prove that said problem is NP-complete, jumping up and writing a paper titled "P = NP" would be vastly premature. The previous claim that the problem is in P is now doing way more work, and thus needs to be reexamined.

A title of "A female Viking warrior confirmed by genomics" goes way too far if the individual question is not, in fact, a warrior.

mnarayan01··on Let’s Debate Female Viking Warriors Yet Again
The linked article raises four concerns:

1. It's not clear whether the skeleton goes with the grave -- The excavation was in the 19th century and there are various methodological concerns.

2. It's not clear that the graveyard was for "warriors" -- The number of bodies with serious injuries is low.

3. It's not clear that the grave was for someone of "high rank", particularly in as much as "high rank" modifies "warrior".

4. The paper gives short shrift to the work of language/text specialists. Notable in light of (2) and (3) above.

How much each of these things is a problem is going to depend on deep factual information, but they are not indicative of "excessive concern with minor details and rules".

mnarayan01··on Let’s Debate Female Viking Warriors Yet Again
> stop couching our barely-disguised political motivations in pedantry?

While I'm also a little dubious as to this article's relevance to HN, nothing in the linked article strikes me as "pedantry".

mnarayan01··on Redefine statistical significance
Curious if anyone's done any work to determine if changing the P-value threshold for e.g. Psychology studies (as they call out Psychology in particular) measurably affected replicability with p > 0.005?
mnarayan01··on An Opinion in Defence of NATs
This view always seems to get crucified in these discussions. While it is certainly true that a NAT is neither necessary nor sufficient for the kind of protection provided by a properly configured firewall, it's way better than the realistic alternative in 90+% of the cases: "Literally nothing". Just think how many actual businesses got nailed by e.g. Mongo's former default of listening on all interfaces.
mnarayan01··on How Python does Unicode
> I feel like it's a huge scam and a kind of cultural imperialism from us hacker types to the folks who are late to the party and for whom ASCII++ isn't going to really cut it.

It's more pay-to-play than "cultural imperialism". Arabic does seem to suffer due to no primarily-Arabic country being a member of the consortium (IIRC and it hasn't changed in the last five years). If someone was willing to absorb that cost then they could almost certainly get things done (e.g. look at Japanese).

While the pay-to-play aspect is obviously not utopia, it does seem to work quite well in practice: Arabic does have a large amount of support as is; to get more, you really need to have people who use Arabic as primary members so they can make the hard decisions.

mnarayan01··on Why I hate your Single Page App
> They can all be added, it just takes effort.

This, in combination with the fact that developers don't take the extra effort, is exactly what the article is complaining about.

mnarayan01··on Why I hate your Single Page App
Middle-click is not working for me either in Firefox.
mnarayan01··on Why I hate your Single Page App
> If I mis-enter information into a form, your error handling forgets all my information and I have to re-enter it.

This really shouldn't be a problem for anything other than file inputs. If someone's form is losing submitted information on a validation failure when using an actual HTML submit, then I find it pretty unlikely that they're doing a good job of AJAX submission.

← PreviousPage 2 of 14Next →