HNHacker News
TopNewBestAskShowJobs

yew

610 karma · joined July 27, 2011

submissionscomments
yew··on SWAT Team Detains Popular Gamer Who Was Live-Streaming ‘Counter-Strike’
That's 'collected' only in the sense that the evidence has come into existence and legal proceedings have become a possibility. Speaking only for the US and as far as I'm aware, it isn't necessary for the evidence to actually be in the possession of any legal authority or for any legal proceedings to be underway.

Deleting incriminating emails in contemplation of future investigation is tampering with evidence, for example. I won't comment on police video recordings - knowledge and intent play a significant role in whether or not a crime has occurred, here.

yew··on A ToC of the 20-part linker essay (2008)
Ought to be fixed doesn't mean will be fixed, unfortunately. Especially when the people doing the fixing wouldn't be the developers. Fortunately there aren't too many applications that rely on interposition to function.

As for myself: I've only ever used symbol interposition for debugging, instrumentation, etc . . . for which it was quite useful (as I've said). I pay attention to what my libraries export, so accidental interposition has never been a problem for me. (Making that easier by default is something that I would support.) I'll happily discuss the matter further, but I'm not interested in arguing it.

yew··on A ToC of the 20-part linker essay (2008)
The first is faster, of course. Whether or not I want the second depends entirely on what I'm doing :) It certainly shouldn't be the default - it isn't very useful during normal work - but I've been glad to have it before.

I wouldn't recommend -Bsymbolic by default unless you know it's safe for your environment, though. There is software that uses symbol interposition to 'productive' ends in production (not much of it, thank heavens). Mobile platforms are something of a special case.

yew··on A ToC of the 20-part linker essay (2008)
Sure. Much of what I wrote is very x86 specific! Though I believe that a degree of indirection is preserved on AMD64 to enable symbol interposition?
yew··on A ToC of the 20-part linker essay (2008)
I don't have much experience with the Windows model, but if I'm understanding you correctly . . .

ELF does support load-time relocation, as appears to be done under Windows if two base addresses conflict. That just isn't the standard way of doing things, for several reasons.

First, load-time relocation imposes a cost at startup (whereas PIC imposes a smaller cost throughout the lifetime of the process). I'm given to understand that, back in the day, the startup delay for programs using large shared libraries could be quite noticeable.

Second, load-time relocation reduces in-memory text section sharing in the case where relocation is performed. If your goal in using shared libraries is saving RAM, this is a problem.

Third, it's a matter of inertia. Originally, UNIX shared libraries (a.out format) were built with a static, non-relocatable base address. Library authors had to coordinate via a central authority to ensure compatibility. PIC seemed like a good way to get as far away from that problem as possible - or so I understand.

Indirection through the GOT/PLT also serves another purpose, even in load-time relocation code - it enables replacing a symbol in one shared library with a symbol from another (eg via LD_PRELOAD). Though that's more of a side benefit than a justification.

yew··on Supreme court: Warrantless cell phone searches illegal [pdf]
Look at the footnote on page 18 of the opinion for a smidgen of context - it doesn't exactly explicitly mention wiretapping, but "the collection or inspection of aggregated digital information . . . under other circumstances" looks close enough.

Reproduced here:

Because the United States and California agree that these cases involve searches incident to arrest, these cases do not implicate the question whether the collection or inspection of aggregated digital information amounts to a search under other circumstances.

yew··on The Soylent Revolution Will Not Be Pleasurable
Does the author not understand that significant numbers of people already don't often get the opportunity to eat food that could be described as enjoyable? He seems to dismiss the idea without justification.

Given the choice between unhealthy almost-but-not-quite zero-variety food and healthy actually zero-variety food, the latter strikes me as the better option - and if you don't happen to live near a source of good food (no bakeries, butchers, delis, fresh fruit vendors, etc . . .), being low on time or money means making that choice (or not having one to make).

Speaking for myself, the cheap and ultra-quick food I usually ate during my years at school was just the same thing over and over - it didn't taste very good to begin with and certainly didn't improve with time. I couldn't fix something myself, or wait for someone else to fix something, or spend time socializing (that's what weekends were for!), or go somewhere else. I can say that I honestly would have preferred something like Soylent on grounds of both convenience and taste.

yew··on School spyware in coursebooks
I've always liked to imagine that if influential educators were genuinely interested in learning, they would make a better effort to account for Campbell's Law.

Perhaps there is an alternative explanation for the rampant misuse of metrics observed in most modern education systems? One that doesn't involve gross incompetence, I hope.

yew··on Dear Google: Parody Is Not Trademark Infringement
Parody is a specific legal defense against trademark infringement. The idea that trademark holders are always required to 'defend' their trademark regardless of context is simply false.

Given that the use here is noncommercial (Peng! is not selling a product in Google's area of business), it's almost certainly the case that Google is under no obligation to engage in any legal action. Even commercial parody can be protected, though the criteria are somewhat more complex.

Interestingly, it's easier to legally parody stronger trademarks because of public recognition of the parody - see Louis Vuitton v Haute Diggity Dog for an example. Google certainly qualifies as a strong trademark, although the parody name here isn't as memorable as 'Chewy Vuiton'.

yew··on How A Lawsuit Over Hot Coffee Helped Erode the 7th Amendment
I've found various sources claiming that Starbucks serves coffee at temperatures ranging from ~140 degrees F to ~190 degrees F. Most of these sources claim that their temperature is 'industry-standard'. I haven't been able to find an origin for any of these claims beyond the Specialty Coffee Association of America [0], who claim a standard 'cupping temperature' of 200+-2 degrees F.

Can anyone provide a reliable source for whether or not there is a standard temperature for coffee (and what that temperature is, if it exists)? Obviously, a certain degree of variance is expected based on the time between brewing and serving - if the variance really is ~50 degrees F, I don't see anything wrong with that answer if it's sourced.

[0] http://www.scaa.org/?page=resources&d=cupping-standards

yew··on Unpythonic Python
Taking that a little further,

  const char *fb[][2] = {{"%d\n", "Fizz\n"}, {"Buzz\n", "FizzBuzz\n"}};
  int i;
  for (i = 1; i <= 100; ++i)
          printf(fb[i % 5 == 0][i % 3 == 0], i);
(It's a pity we have to specify the second dimension manually . . .)
yew··on Linux: Difference between /dev/console , /dev/tty and /dev/tty0
Python does provide internal documentation tools via docstrings and the processing/viewing system for them (and the documentation for the standard library is generally good). You might also have a local copy of the online documentation installed (the package is usually named something like python-doc).

The lack of comprehensive offline documentation that seems to be becoming more and more common even for large projects is rather troubling, though.

yew··on Coming Soon to Hacker News: Pending Comments
It breaks down for threads that only ever get a single viewer (who comments).

At least, I don't get the impression that this update is intended to prevent such posts regardless of content (eg a reference to a related paper on some obscure topic).

yew··on Memory management in C programs
Techniques like these are always interesting, even if you don't have much opportunity/need to apply them. The source for software like NetHack might not be a good place to look for best practices, but it can be enlightening in other ways (if you're careful to avoid copying just anything you see).

On that note, while the article doesn't (explicitly) mention it, it would be wise to remember that VLAs of unbounded size will end up overflowing the stack eventually. They have their uses, but can be tricky to apply safely. Be careful!

yew··on Tesla Announces $1.6 Billion Convertible Notes Offering
All corporations play politics (whether well or badly), but some corporations emphasize that aspect of doing business and some deemphasize it . . .

Which side Tesla (Musk) happens to fall on is an open question, I think - perhaps you disagree?

yew··on Inferring too much (2011)
An interesting technique for optimizing, in particular, matrix operations in C++ (or even C, with the usual increase in verbosity). Also used in the Eigen math library (http://eigen.tuxfamily.org).

I hadn't considered the issue that type inference presented here until reading this article (and some of the comments - the issue is also present with template type inference).

yew··on JavaScript has a Unicode problem (2013)
If the Hangul and Tamil constructs are anything like ligatures (e.g. fi in the Latin alphabet), I would imagine that's the case most of the time. Plus lots of special rules for which glyphs to treat as single symbols and which to decompose (e.g. & is technically a ligature but almost never decomposed).
yew··on Ham on Nye: The high cost of “winning” an evolution/creation debate
I agree that formal debates over evolution are counterproductive - they give the impression that evolution and creationism should be taken equally seriously, and anyway they're more about who's a better presenter than who has the better evidence.

I appreciate Dawkins' writing, though. If nothing else, it contributed significantly to my shift away from evangelical fundamentalism. One of the benefits of Dawkins' choice of material is that it can communicate new ideas to the very religious (not "always does" but "has the capacity to"), whereas arguments about historical accuracy or studies of religious behaviour can't - because, from a fundamentalist perspective, that sort of evidence is necessarily secondary to communication directly from God.

For me, Dawkins first presented the idea that it might be possible for evidence to be more meaningful than faith, that everyone who wasn't a fundamentalist might not be lying or deceived. I consider that a justification for his work, though perhaps I'm wrong about its effectiveness (though I was a fairly strong believer when I read it). I don't know on what criteria you're basing your own judgement.

(Of course, I'm speaking here from my own experience and observation just of the community where I grew up. I'm glad that he existed at that time, but this is ultimately just an anecdote with a limited perspective.)

yew··on Observation of Dirac monopoles in a synthetic magnetic field
Thank you (and also to fennecfoxen)! My background in physics isn't sufficient to be sure of my interpretation of the details here.

I usually ignore implications of immediate world-changing revolution in popular science reporting (they're invariably nonsense in those fields where I'm qualified to come to a definite conclusion), but Nature (and certain other publications) are more circumspect, at least often enough to check first.

Of course, I'm still happy that the results are interesting!

yew··on Observation of Dirac monopoles in a synthetic magnetic field
Can anyone with a background in physics and/or interpreting Nature publications comment on this? It appears to be a peer-reviewed publication, rather than something merely published.

My understanding of Dirac's monopole hypothesis implies that these results would be very significant for particle theory . . .

yew··on Obama’s Path From Critic to Overseer of Spying
Mr. Obama hasn't changed more than would be expected over several years and, while I can't speak with certainty, I would be very surprised to find out that he was lying about his views during the presidential campaign (I don't know about his promises).

He has more information than he did then. And he trusts himself to use these powers more than he did the Bush administration.

Even postulating some revolutionary secret information seems to me to be unnecessary.

Obama has always trusted himself. Most people do. What's changed is that the president is now someone who is trusted by Obama. Everything that's happened up to this point falls nicely out of those circumstances.

yew··on How can C Programs be so Reliable? (2008)
Common Lisp's condition/restart system is very nice. It solves the context problem, which (at least in my experience) is the biggest problem with exceptions in day-to-day programming.

CL's dedication to the debugger also greatly reduces the downsides of not explicitly handling errors. You get the ability to notify the user of problems that they might be able to resolve manually for free.

The lack of function signature information is still a problem, though. Sometimes you really do need to know what exceptions might be thrown. There's also the issue of overhead . . .

I'm happy to say that exceptions are nice to have, but the idea that they're superior to returning error codes at all times in all places (especially in a language that supports returning multiple values) is more than a little silly.

yew··on How can C Programs be so Reliable? (2008)
The problem with exceptions (in certain contexts, of course) is precisely these assumptions.

Changes in low-level routines can change what your function is able to handle. Sometimes "just let it crash" isn't an option, period. Often, the exception hierarchy doesn't expose enough information to handle an exception without outside context (vis Python's OSError).

In many cases, exceptions are superior to returning error codes because of ease of use and debugging. In many other cases, returning error codes (or something like Java's checked exceptions, although those have some rough edges) are superior.

I've yet to see a universally applicable error handling model, and I suspect I never will.

(By the way, I believe the ability to throw arbitrary values in C++ is, somewhat loosely, related to something called 'foreign exceptions'. The Itanium C++ ABI on exception handling is an interesting read here. C++ implementations support throwing things into and out of non-C++ code, and simply don't limit what C++ code can throw under normal circumstances. Though perhaps they should have.)

yew··on How can C Programs be so Reliable? (2008)
The OOM killer is more likely to kill some other process and trash your server.

Thankfully that sort of behavior has been vastly reduced since the thing was introduced, but disabling overcommit for high-reliability applications is still a reasonable course of action.

yew··on Amazon Prime Air
Skepticism and rooting for failure are not the same thing. There are plenty of people here and elsewhere who are mindlessly critical of everything, but not all the critics fall into that category.

The greatest challenge for radically transformative technologies (and this would extend far beyond the scope of Amazon if ever implemented) is almost always being regulated out of existence. That response requires the least effort and the least shared motivation, and it's the one usually taken when a new technology inspires many diverse fears.

Comparing this situation with that of almost any purely Internet-oriented technology isn't likely to lead to an accurate prediction. The downsides of existing delivery methods are likewise unlikely to play a part in the final decision. Pending revelations regarding Amazon's interest in political involvement, skepticism seems warranted. The impact of (well-justified) skepticism on the mindset of innovators also seems desirable.

Speaking for myself, I'll grant that the FAA has a slightly better than average track record (when making executive decisions, anyway).

yew··on Linux ate my RAM
The gap between 'Joe Chucklefuck' and the lead developer for glibc is wide enough to fit a whole lot of people who can triage a bug without necessarily being skilled (or interested) enough to submit patches.

I think describing the phenomenon as 'noise' is reasonable. You find a moderate number of answers with a reasonable degree of certainty as to their accuracy and a large number of answers that are just whatever came to mind first (these aren't necessarily provided by completely distinct groups of people). The result is a lot of almost-but-not-quite-related nonsense that drowns out the answers with any relevant content.

This probably isn't purely a problem of numbers, either. Even attempting to be helpful takes a certain amount of effort that naturally limits the impact of the former group at any particular instant. It's also easy (as evidenced by this very article) to take helpful information and render it non-helpful by repeating it without context.

yew··on Going long long on time_t
The simplest solution (from the implementor's perspective) is probably to leave it to the user to reassign one. Allowing multiple-letter specifiers helps here. Coming from a C perspective, that's what I would prefer.

You could work out all sorts of namespacing and automatic reassignment schemes, of course.

I can't think of anything without trade-offs off the top of my head (I double that anything exists), but in my (limited) experience it's very workable.

yew··on Going long long on time_t
I've always felt that the 'right' solution was to emulate glibc and provide facilities for registering new format specifiers[1]. Then libraries could provide specifiers for everything that made sense and users could pick and choose.

Of course, there would be performance implications - not to mention the added complexity for implementors.

[1]http://www.gnu.org/software/libc/manual/html_node/Customizin...

yew··on How Two Newspaper Reporters Helped Free an Innocent Man
I'm well aware of the mechanics, thank you.

The state has already satisfied itself sufficiently to reverse a murder conviction. If the investigation that led to that course of action was causally descended from an article written by a journalist - what of it?

If you believe that the actions taken by the state up to this point were unwarranted, say so explicitly. Otherwise, please recognize that I am not talking about journalists here.

yew··on How Two Newspaper Reporters Helped Free an Innocent Man
. . . I don't recall mentioning journalists? I also wasn't aware that journalists could unilaterally free convicted felons.

I think the state's own findings are quite sufficient. The trick is to incentivize their use without unduly obstructing other operations of equal importance.

← PreviousPage 5 of 13Next →