HNHacker News
TopNewBestAskShowJobs

zwegner

1,066 karma · joined February 12, 2013

https://github.com/zwegner https://twitter.com/zwegner zwegner@gmail.com
submissionscomments
zwegner··on Julia 0.2 released
I'm confused about your reference to C. C has multidimensional arrays, and all the elements are laid out contiguously in memory. No index calculations are needed, it's all done by the array indexing operation.

If you have this code:

    int a[10][10];
then:

    &a[x][y] == ((char *)a + x * sizeof(a[0]) + y * sizeof(a[0][0]))
where sizeof(a[0]) is == sizeof(int) * 10.

quick edit: added a (char *) cast so the arithmetic doesn't multiply by sizeof(int) again

zwegner··on Python 2 vs. Python 3: A retrospective
I've thought that dict.items() should be the default behavior for a while, but haven't really thought it through. The 'key in dict' example is interesting--is the expected semantics of 'x in y' for sequence types the same as 'any(x == z for z in y)'? That doesn't hold true for strings, as an example.
zwegner··on Python 2 vs. Python 3: A retrospective
As a noscript user, I think you're probably right.
zwegner··on The World Chess Championship is an anachronism
Elo scores in different rating pools are not directly comparable at all, only the difference in ratings in the same pool is significant (although generally computer chess rating lists try to make them look reasonably close to the FIDE list).

More big problems in comparing these ratings: intransitivity of chess strength, variation of strength for different time controls, volatility/time variation of human strength, and the much lower statistical significance of human rating lists. There's probably more that don't come to mind.

But anyways, yeah, it's pretty indisputable that computers absolutely massacre humans at chess these days.

zwegner··on Snapchat is Intrinsically Worthless
You can't really make anything "ephemeral" with data. The closest you can get is probably a neutral third party that promises to delete the data at a future point, and locks down all endpoints where users can see the data. Of course this is still quite imperfect.

With a distributed version, you'd just have to trust all the people you're sending data to to delete it.

zwegner··on Web Giants Threaten End to Cookie Tracking
Seconded. I use this along with NoScript, SelfDestructingCookies, and Adblock Edge (an ABP fork without any "acceptable ads" feature).

A lot of the time it's a big pain to get it working right (say, to watch a video on a news site), but that's simply the price I have to pay in today's web to retain at least a bit of privacy and security.

If anyone wants to make a neat extension, it seems like all these extensions could be combined into one with a slightly better user interface. If you want to make it really spiffy, the black/white listing for these could be shared in a distributed hash table with some sort of voting/trust mechanism.

zwegner··on Git is Not a New Subversion
I think local commits are pretty useful, and local branches sometimes are as well. But "using branches heavily" is a pet peeve of mine. Git encourages lots of branching that in most cases is unnecessary (e.g. making feature branches for everything, never committing directly into master). When working with a team, everybody should be working on as close to the same codebase as possible, to prevent difficult merges later on. In my view, merging has a very non-linear cost based on how far apart the branches are, both in terms of time and amount of code changed, because it's more likely that the merge will have more tangled dependencies, and the code will be less fresh in the mind of whoever's merging.

Merge commits can also hide lots of information, like exactly how any merge conflicts were resolved, since they're buried in what is basically a squashed commit of everything in the merged branch since it diverged.

And finally, they make the commit history much harder to understand. I had to bug everyone on my team to run "git config --global pull.rebase true" just to have a somewhat sane, linear history without tons of merges in day-to-day development.

zwegner··on Poll: Do you read the "new" page on HN?
I only occasionally read it. There's two main reasons why I don't do so more regularly:

1) There seems to be quite a lot of low-quality content (blogspam, etc.)

2) I primarily read HN for the comments, and the new page stories usually don't have any comments

zwegner··on Fingerprints are Usernames, not Passwords
That would be pretty cool. I can't imagine that nobody else has thought of this idea before, though...

What really scares me, though, is when we get to the point of not just being able to read thoughts, but being able to write them. How would you ever know that your memories and emotions have not been tampered with? As far as you know, you've always loved your corporate overlords, and would never do anything to work against them...

zwegner··on Fingerprints are Usernames, not Passwords
Unique? Maybe. Unreplicable? I can't imagine so, we're all just a bunch of molecules.

At some point in the perhaps-not-too-distant future, we will likely have very sophisticated brain-scanning technologies, and combined with advances against biometric methods, basically any form of authentication will be useless.

I have absolutely no idea how to get around this, and can only hope that our society has advanced enough by that point that we don't need to keep any secrets at all. Not much chance of that really, IMHO...

zwegner··on World
Yup--that's a great one. And it too is by Brian Westley...
zwegner··on World
Reminds me of the old 1992 winner of the IOCCC by Brian Westley (who consistently entered some of the most impressive programs in that contest). It doesn't spin, but it prints a map of the provided lat/long.

http://www.ioccc.org/1992/westley.hint

               main(l
          ,a,n,d)char**a;{
      for(d=atoi(a[1])/10*80-
     atoi(a[2])/5-596;n="@NKA\
    CLCCGZAAQBEAADAFaISADJABBA^\
    SNLGAQABDAXIMBAACTBATAHDBAN\
    ZcEMMCCCCAAhEIJFAEAAABAfHJE\
    TBdFLDAANEfDNBPHdBcBBBEA_AL\
     H E L L O,    W O R L D! "
       [l++-3];)for(;n-->64;)
          putchar(!d+++33^
               l&1);}
zwegner··on Hands on with the CODE keyboard
And you reach your pinky all the way up to the escape key? Try ctrl-[. :)
zwegner··on Lavabit Founder Says He Had ‘Obligation’ to Shut Service
You have showdead on, it seems...
zwegner··on Why I Changed My Mind On Weed
I don't think he claims that, but rather that slipped discs being painful is.

Not really sure about this (I haven't read that particular book), but I will say that Sarno's theories cured my RSI pain, which crippled me for over a year. I'm not sure if his explanations of the mechanism for the pain are correct (they seem very hard to test), but I'm pretty sure the pain was all psychosomatic.

zwegner··on Ask HN: I'm a chronic procrastinator – how do I break it?
> I know that I've been given a gift and that I'm a fucking idiot for wasting it, but I've just become a chronic procrastinator and it sucks.

As someone in a rather similar position (my life has been fucked up in so many ways from procrastination), one tip I can give you is to get rid of this mindset.

I feel horrible whenever I waste lots of time, looking back on how I spent my day, thinking "what the hell is wrong with me?" But the thing is, that attitude feeds much of the procrastination. I am an odd mix of being a total perfectionist, and really lazy, so it turns out that whenever I'm faced with a task that I don't really want to do, I'm quite adept at rationalizing ways to avoid doing the task. I think about possible roadblocks, or pretty much anything that would keep me from attaining my sought-ought perfection, and knowing that I'll have the same strong negative reaction later on that I always do, I just won't do it.

If you beat yourself up over procrastination, you're just subconsciously teaching yourself to not even think about whether you're procrastinating or not. Whenever you try and shift from unproductive tasks to work, it's much easier to just stay with the short-term dopamine kick of reading the internet or whatever, rather than dealing with harder decisions about what you need to do in the long term to be happy. Yes, this is backwards. Your subconscious is not very rational...

So, from my point of view, just do everything you can to recondition yourself to not hate working, and to not hate procrastination either. Just try to feel the bit of fulfillment you can get from writing code or whatever, basically just getting your shit done. Have patience with yourself, infinite patience, and know that it takes lots of work to get where you want to be, but it's worth it. You're the only one that can do this.

BTW, if you're like me, a perfectionist to the core, consider that this comes from a deep-seated insecurity, a part of your brain that tells you that you'll never be good enough. At least, that's the way it is for me, and it's been that way since my childhood, as far back as I can remember. On this front, I'd just try to evaluate your emotional well-being in the most balanced and unattached way possible. Get help if you feel like it. As others have mentioned, meditation can be amazingly helpful here, and exercise too. Unfortunately, they're both quite prone to being procrastinated on.

Good luck...

zwegner··on Higher social class predicts increased unethical behavior (2012) [pdf]
I would guess (of course this is just an observation, no real evidence) that both scenarios are plausible, and there is actually a feedback loop between them. Roughly:

Superiority complex -> unethical behavior economically -> economic superiority -> increased sense of superiority -> unethical behavior in general -> ad infinitum

zwegner··on Why would useless MOV instructions speed up a tight loop in x86_64 assembly?
Thanks for the link! Looks interesting.

Here's an alternative link, that actually works: http://lang.stanford.edu/courses/ee380/2003-2004/040218-ee38...

zwegner··on How I Cured my RSI Pain (2010)
I'm another person cured of RSI by the same approach. Initially, when learning of TMS, the RSI got worse (progressing from just constant pain to feelings of numbness and nerve damage).

Certainly worth a look if you have RSI--clearly if people can be cured more or less overnight by just reading, there's SOME mental component, whether or not Dr. Sarno's explanations of the mechanisms of TMS are correct.

zwegner··on LLVM Intermediate Representation is better than assembly
As a former chess engine author, and current compiler writer, with ideas in search-based compiler algorithms/unbounded compilation times, I hope to accelerate the arrival of that day :)
zwegner··on NSA Phone Snooping Cannot Be Challenged in Court, Feds Say
I had heard of that case before, but didn't know why it was dismissed:

"The case was subsequently dismissed by the 9th Circuit on the grounds of sovereign immunity."

And sure enough: https://en.wikipedia.org/wiki/Sovereign_immunity

"In the United States, the federal government has sovereign immunity and may not be sued unless it has waived its immunity or consented to suit."

So apparently the government cannot break the law, by definition. What the hell?!

zwegner··on NSA Phone Snooping Cannot Be Challenged in Court, Feds Say
Not only that, but "the requested injunction is irreconcilable with the public interest". Irreconcilable. I expected them to say the "public interest" bit, but... wow.
zwegner··on The Forbidden Island
You're being downvoted, but assuming you're talking about small non-weaponized drones, it's not necessarily a horrible idea. If you could do it without the people noticing, then you could learn a lot and not harm them. Of course, you'd heavily violate their privacy, but it's better than exposing them to diseases. I'd say I'm still against it, but given the kinds of viewpoints on privacy that are mainstream these days, it's at least worth contemplating...
zwegner··on [dead]
I thought HN detected duplicate submissions? Previous thread, 5 hours ago: https://news.ycombinator.com/item?id=6022638
zwegner··on Venezuela: My experience in the surveillance state
Snowden didn't leave the US to escape surveillance (as he's made clear, that doesn't really help). He left to escape a lifetime in prison.
zwegner··on Prism Break
Ugh, really? So is there no smartphone OS that you can be at-least-sort-of certain doesn't have a backdoor (leaving aside unintentional exploits)? My understanding was that even FFOS was built on top of an Android kernel...
zwegner··on Al-Qaida said to be changing its ways after leaks
It's amazing that the AP would so eagerly accept these anonymous government officials' stories after they were specifically targeted by the FBI, what was it, a month ago?

Why grant these people anonymity, when all they're doing is spouting out government-serving platitudes with zero evidence or justification for keeping their identities secret?

zwegner··on Al-Qaida said to be changing its ways after leaks
So now that The Terrorists are changing it up, might as well dismantle the surveillance state, huh? What good does capturing all this data do if they're not going to get anything useful?

The cognitive dissonance required to justify these programs is just staggering.

zwegner··on Could Glenn Greenwald go to jail? The law is alarmingly murky
Funny that they don't mention that the Washington Post also published classified info, and that perhaps they "aided and abetted" Snowden, to some "extent"...
zwegner··on U.S. charges Edward Snowden with espionage
Classic Greenwald on twitter:

"Anyone have interest in a criminal investigation to discover which "officials" leaked news of the sealed indictment? http://www.washingtonpost.com/world/national-security/us-cha... "

← PreviousPage 8 of 11Next →