Better HN
topnewbestaskshowjobs
Log inSign up

chimeracoder

21,186 karma · joined Oct 12, 2010 (16y ago) · 6,050 submissions

Inveterate builder.

Personal site: http://www.adityamukerjee.net/

My email is pretty easy to guess from my username.

Submissions

comment 13y ago · link · parent

Yeah, "ok" here really signals whether or not the channel is closed. It will still block unless c is buffered.

There are actually a number of other errors in this post, unfortunately, even though I agree with the general conclusion.

comment 13y ago · link · parent

> Instead of creating the atomic elements needed to support generic data structures then adding a suite of them to the standard library, the Go team went the other way. There was a concrete use case for good data structures, and so they were added. Attempting a deep reconciliation with the rest of the language was a secondary requirement that was so unimportant that it fell by the wayside for Go 1.x.

For the last year or so, Go has essentially been my primary language. Before that, my primary languages were Python and Lisp (various dialects).

I don't think that anybody who uses Go extensively will deny that they have some feature $X that they'd love to have added to Go[0]. (For me, I miss being able to use some common Lisp idioms).

However, what I like the most about Go is that they don't "just add it" simply because some people suggest it, the way that other languages might. The feature set is incredibly minimal - while it's impossible to get rid of all redundancy, programming in Go is a very consistent experience, because everything that's been done feels like it's been done the right way[1].

Also, from the original post (the one that this blog post partially retracts):

> the exhilarating sense of weightlessness that you get when hacking in Python is largely due to the fact that the language works really, really hard to optimize this process. Go has given away this feeling of exhilaration, basically for nothing.

Hopefully the author now realizes that what Go gives up (only marginally) in "weightlessness" while developing is made up more than tenfold when maintaining code.

I honestly don't bat an eyelid anymore when I need to refactor Go code, even if I've forgotten to write tests[2]. It doesn't take anywhere near as long as refactoring Python takes me, and I don't worry as much about introducing logical errors (or worse, runtime exceptions).

[0] Incidentally, "generics" doesn't seem to be a common complaint among people who have actually programmed in Go for a moderate length of time, anecdotally.

[1] Yes, this is subjective.

[2] Yes, I know. Always write tests. But still.

comment 13y ago · link · parent

> behind to "Do you have any questions for me?"

A bit tangential, but I never liked that question. I mean, I understand the importance of giving the interviewee a chance to ask questions they may have about the company, but sometimes it feels like there's the expectation that one should have questions, and if you don't have any, it means you don't care, or aren't invested, or aren't a good candidate.

[In my experience, it usually means (A) someone else (perhaps one of the other interviewers) already answered it, or (B) it's hard to come up with questions on the spot.]

But maybe that's just a holdover from me having done interviewing workshops, etc. in high school/college which were tailored more for jobs in the financial sector, where this very much is the case.

Does anybody else feel this way? Or perhaps more importantly, if you conduct interviews (and ask this question), how do you react when a candidate doesn't have questions they want to ask?

comment 13y ago · link · parent

> From what I've read, the Israelis make border checks less problematic.

It's not surprising that, from what you've read, this system looks good on paper. But then again, so does stop-and-frisk in New York City, if you're white and live in the West Village or Upper East Side[0].

Israeli screening is good if you're a white, non-Arab person. Not always so great otherwise: http://www.thenational.ae/news/world/arabs-say-they-endure-d... . (This is in the case of airport security, but the same principle applies for border checks)

Unlike the US, Israel openly profiles based on race. Aside from the fact that this is illegal in the US[0], this has a serious practical problem: confirmation bias.

Because only a subset of people feel the cost of the profiling, the rest remain blissfully unaware of the problem. From their perspective, the system works fine - "I never have any trouble going through security!".

As for 'scaling' this, keep in mind that LAX alone services more than three times the number of passengers as Ben Gurion in Tel Aviv does.

[0] http://www.nyclu.org/stopandfrisk .

[1] though that doesn't prevent it from being practiced in effect! http://www.bostonglobe.com/business/2013/11/15/aclu-calls-fo...

comment 13y ago · link · parent

> Is using the keyboard with its tiny little buttons really that much better for you?

It's way, way better.

On my old Blackberry, I could type as fast as I could write by hand. (The Blackberry didn't even do any form of auto-correction or text-prediction).

I don't even have very large fingers, but there's a huge benefit to having the tactile feedback when typing quickly. Similarly, I'm dramatically slower on a full-size touchscreen "keyboard" than on a physical keyboard.

Of course, this effect is more noticeable the faster you type. I notice it a lot, because on a physical keyboard, I can theoretically type ~100 wpm[0]. In practice, this means I end up typing as fast as I think (which is obviously slower than 100wpm).

On a touchscreen "keyboard", I can't type as fast as I can think, and it's incredibly frustrating to keep halting my train of thought so what's on the screen can catch up.

[0] for a typing test, where I don't have to stop and think about what I'm typing.

comment 13y ago · link · parent

> It's a sad fact that the departure of the British Empire from various colonial possessions frequently resulted in a power vacuum followed by deep internal conflicts which remain problematic today - Ireland, Israel, and India being three obvious examples.

Let's not be overly generous.

I won't speak to Ireland or Israel, but in the case of India, the political strife was not a coincidence - it was the all-but-deliberate result of the British. They actively funded terrorist groups on conflicting sides with the express goal of dividing the region not just geographically (Partition), but ideologically and politically.

(This is, of course, not too different from the US funding terrorist groups when it is politically convenient to do so, and then invading foreign countries to overthrow the rulers brought to power by those same terrorist groups, when it becomes politically convenient to do that instead.)

comment 13y ago · link · parent

> In a further crackdown on what Mr Cameron referred to as ‘the darkest corners of the internet’, Downing Street will tomorrow announce that a national database will be created to give every illegal image a label.

While we're at it, why don't we do that with videos, too? The label won't contain any content, just some "metadata" that we can use to "verify" whether or not an image/video is illegal. [0]

We should also create an easily-queried database for all of these, just in case we aren't sure whether or not a particular image/video is actually illegal.

Then, we can create a tracking program, or "tracker" to keep tabs on who is in possession of these images/videos at all times, and broadcast their IP addresses publicly[1].

I think this would be an excellent use of government money.

[0] http://en.wikipedia.org/wiki/Magnet_URI_scheme

[1] http://en.wikipedia.org/wiki/BitTorrent_tracker

comment 13y ago · link · parent

> Getting your record sealed won't hurt

Actually, it may. If someone runs a background check and sees a sealed record, it tells them that a record exists, but not the nature of the offense. They would probably therefore assume something worse than a marijuana conviction, which is what OP has.

This may vary by state based on what information remains available, but sealing the record MAY actually be worse than leaving it open.

Obligatory: IANAL.

Edited wording to clarify that this is a hypothetical employer, not what I myself would do personally.

comment 13y ago · link · parent

Thanks for pointing that out.

GHB is most often used recreationally (intentionally); I only mention it as a "date rape" drug because that's the context in which people are more likely to be familiar with the name.

I wholeheartedly agree, though - alcohol is the most insidious date rape drug around.

comment 13y ago · link · parent

It all depends on whether (and how long) the big players (Pharma, etc.) can profit off of it.

Case-in-point: we're starting to treat heroin dependence with a drug that is just as recreationally potent, and has similar risk of overdose[0], when we could just easily be treating it with heroin itself (diacetylmorphine maintenance[1]).

Currently, buprenorphine is the "right" drug to be addicted to, but even its makers started advertising its high addictive potential (in an attempt to push their new "safer" version, which is still under patent protection and therefore more profitable[2]).

At some point, we can only imagine that Reckitt Benckiser (the makers) will have milked as much as they can out of the drug, and we will declare buprenorphine a "bad" drug to be addicted to, just like heroin, and treat its addiction with the latest shiny, new drug.

We've seen this cycle many, many times. In fact, it's worth mentioning here that the word "heroin" was originally a Bayer trademark[3]. It was a cough suppressant invented as a "safer" over-the-counter substitute for the recreational bogeyman of the time: morphine.

How times change!

(By the way, I recognize that buprenorphine can be very helpful in treatment. this is not to say that buprenorphine is either right or wrong for everyone, just that the laws and policies that we construct around these drugs often represent financial interests more than they represent scientific or medical facts.)

[0] http://www.nytimes.com/2013/11/17/health/in-demand-in-clinic...

[1] http://en.wikipedia.org/wiki/Heroin-assisted_treatment

[2] https://en.wikipedia.org/wiki/Evergreening

[3] https://en.wikipedia.org/wiki/Heroin#Etymology

comment 13y ago · link · parent

> It looks to be a GABA agonist, which as HarryHirsch points out, are hardly pharmaceuticals with a history of low risk ...

GHB[0], diazepam (benzo), phenobarbitol (barbiturate)....

GHB is in some sense safer than people think it is (the trouble is that overdoses are difficult to treat when they happen), but otherwise I'd agree - alcohol is in many ways one of the most dangerous drugs known to man, but sometimes it's better to stick to the devil you know.

[0] Common club drug, as well as a common date rape drug

comment 13y ago · link · parent

> What I would really like is a non-touch screen Paperwhite

I would honestly pay almost double the price for a Paperwhite that had physical buttons.

I love the Paperwhite - I stare at backlit screens all day enough as it is, so the frontlight is a welcome change - but I can't stand the touch screen. I really wish they'd bring the physical buttons back.

comment 13y ago · link · parent

> Do you have any data to back this up?

Yeah, I would be skeptical of any claim that conflates introversion, being humble, and having bad social skills, which are three completely different topics.

comment 13y ago · link · parent

> How it really works -- including compiling, linking, system calls, operating system involvement, hardware I/O, communication between ICs, etc. The path from the block of text to photons emitting from the screen, with fairly detailed explanations at every level.

That reminds me of JBQ's blog post from shortly after Dennis Ritchie's death: https://plus.google.com/112218872649456413744/posts/dfydM2Cn...

I would love to see that document if you still have it.

comment 13y ago · link · parent

> All of these findings have been reported to the Department of Homeland Security (TSA) to help them better detect these types of threats.

The threats that the TSA itself admits are non-existent? (http://tsaoutofourpants.wordpress.com/2013/10/17/tsa-admits-...)

The best I can see coming of this is that the TSA will start to ban braided leather belts and condoms.

comment 13y ago · link · parent

> That might be true for people who hail from certain coastal communities (like Bengal, Orissa, etc.)

Right, the fish part is mostly in areas where fish is already a staple of the diet.

My point was that "vegetarian" for many Indians is similar to "vegan" in that it proscribes eggs (though not always dairy).

comment 13y ago · link · parent

On the flip side, to many Indians, "vegetarian" means egg-free, though oddly, it may include fish dishes.

The special treatment of fish varies across parts of India, but the concept that eggs are non-vegetarian is fairly standard there (to a lesser extent abroad).

comment 13y ago · link · parent

I've been using Wallaby for a while (the company I used to work at invested in them).

They're really awesome.

I haven't used Coin or Echo for comparison, though.

comment 13y ago · link · parent

> claim that the credit card reader is "broken."

Fortunately, the law protects you again in this case. In NYC (and SF too, I believe), if the credit card machine doesn't work, and the cab driver doesn't tell you before you start the ride, you don't have to pay a dime.

comment 13y ago · link · parent

If you've already done the profiling, you're probably already aware of this, but for anybody else:

Go uses RE2, not PCRE (which Perl uses, obviously) for regular expressions: https://code.google.com/p/re2/. There is also a third-party PCRE library for Go somewhere, though the standard library uses RE2.

One of the advantages of RE2 is that it guarantees that the regular expression runs in linear time (in the length of the input), unlike backtracking-engines like PCRE (which are provably undecidable, like the halting problem).

However, aside from not supporting backtraces, it also can be slower on certain kinds of regexes and inputs.

As always, the best (only?) way to know which approach is better is to test (profile) - which, I agree, is a piece of cake in Go.

comment 13y ago · link · parent

> There are other ways to express the grammar of a language without semicolons and remain context-free.

Yes, you could use s-expressions, for example. I never said that this was the only way; I just explained part of the reason for the choice.

comment 13y ago · link · parent

A) Python is not context-free; this is a common misconception: http://trevorjim.com/python-is-not-context-free/

B) No one feature of a grammar provides context-freedom. It's not meaningful to compare Go's grammar to another grammar; it's meaningful to compare Go's grammar as-is to the way it would be if it allowed both forms.

In this case, I believe the same-line braces rule is not strictly necessary by itself (they could have gotten a context-free grammar other ways), but this was (part of) one approach.

comment 13y ago · link · parent

> People complain that go fmt isn’t customizable and that it puts braces where they don’t want them.

I assume this is referring to putting opening braces on the next line.

IIRC, this has nothing to do with the `go fmt` tool - unlike in C, this is actually a syntax error in Go: http://play.golang.org/p/bn30UNkr1z

One of the reasons for this decision is because it helps enforce a truly context-free grammar for the language.

Ironically, the fact that Go has a nearly context-free grammar is what allows tools like `go fmt` and the obsolete `go fix` to make modifications to the code deterministically, with guarantees that it will not change the behavior of the code.

comment 13y ago · link · parent

> I'd need a video of your dog barking a response to the NBA

So the pitch is, "We're like patent trolls, but for breach-of-contract entrapment lawsuits?"

I'd invest! ;)

comment 13y ago · link · parent

Agreed - if you're new to programming in Go, I'd recommend using the standard library (supplemented by Gorilla[0] once you get the hang of things).

If things start getting unwieldy as your app grows, you can always try out something like Revel, but by starting with the standard library (which already has a very clean web server built-in), you'll get a sense for the way things work "under the hood" early-on.

If you want to see how a Go web server built with just the standard lib + Gorilla looks, I wrote a simple sample application a while back: https://github.com/ChimeraCoder/go-server-bootstrap . The most verbose part is the oauth2 callback.

I should get around to updating it (it still even uses a Makefile! Eek!), but it gives the basic idea.

(Sidenote: When did Github stop supporting the ".markdown" extension instead of just ".md"?)

[0] http://www.gorillatoolkit.org/

comment 13y ago · link · parent

Man, there are so many things I love about that blog post (the Go being the least of them). Wish you guys had a presence here in NYC!

comment 13y ago · link · parent

> If you remember what happened and think that G+ has had a hand in the leakage, please feel free to ping me (my URL is in my profile) and I'll try to follow it up

Thanks for the offer - I really appreciate it. I think it had something to do with group contacts in Gmail, but I can't remember. If I have some time today I might take a look.

To clarify: I'm not exactly mad at Google in this case, because I'm a developer and I know how tricky it can be to get these things right even in small, standalone products[0]. And unlike some people on HackerNews, I don't think this is a result of bad intentions. It's just that, every time I see something like this happen (beagle3 points out the example of Buzz below), I can't help but notice that users' trust is both fragile (easily broken) and unforgiving (no benefit of the doubt).

These things are tough to get right, but they're very critical for the long-term success of a product.

[0] Also, the consequences for me happened to be pretty mild, thankfully.

comment 13y ago · link · parent

> I do want to point out that Google+, with old features or new, has never violated the ACLs that users set. If you set something to private, it remains private forever.

I know that, which is why I used the example of Facebook.

However, Google+ does make it incredibly easy to leak information that I would otherwise consider private accidentally.

For example, I can't use Google+ with my primary email address, as it's a Google+ account. However, because it's linked with my Gmail account (which does have a Google+ account), some people who have added me on Google+ have been able to figure out my Gmail address (which I haven't used for email purposes in years[0]).

I can imagine all the technical reasons for this, but that doesn't change the fact that it feels a bit wrong for a service to hand out my old email address (which I never give out anymore) to people I've met recently and who have added me on Google+ using my current email address.

Imagine your Google+ email address is something that you can't change, but don't really want people to see anymore - this isn't uncommon; it appeared in a New York Times piece just yesterday, in the context of college admissions[1]. Thankfully, my personal email address is much more tame than that student's, but that still doesn't mean I want anybody to know or use it nowadays.

Furthermore, it's incredibly easy to sign up "accidentally" to use Youtube with Google+ and your "real name" instead of continuing to use your pseudonym.

As for the distinction you point out - I know the difference, and you know the difference. But most users don't.

> To do otherwise would be corporate suicide.

Apparently not completely - Facebook's gotten away with it for years![2]

[0] This may have been fixed, since it was a while ago that I last noticed, but it was still the case for quite a while.

I would have to go through my inbox to remember the details of why this happened - I remember debugging and tracking it down. But the fact that it took that much effort to discover why my new acquaintances suddenly knew my old (personal) email address, and that I can't remember anymore, speaks volumes as to how easy it would be for a less savvy user to accidentally leak information that they wanted to keep private.

[1]http://www.nytimes.com/2013/11/10/business/they-loved-your-g...

[2] http://mattmckeon.com/facebook-privacy/ - this graph doesn't distinguish clearly between those which were automatically retroactive and those which weren't, but that's a topic that's been well-reported and is easy to search for.

comment 13y ago · link · parent

I wonder how much engagement Google/Facebook/et. al. lose from people who are about to make a comment/post a status/etc., and then thing 'Hm, no - this is private now, but what about in a year when they automatically change my privacy settings without asking me?'

Put another way, imagine I am a teenager or college student who uses Facebook.

1. Start to upload a photo from my phone of me and my friends doing shots

2. Try to figure out how (on my phone!) to set privacy settings so that my younger brother (who is my Facebook friend) and my parents (who aren't, but use the Internet and sometimes Google my name) can't see it.

3. Remember that Facebook has a history of "expanding" privacy settings retroactively

4. Think "Ah, fuck it", and send a Snapchat to my friends instead.

In reality it's probably not that common right now, but hopefully that may increase in the future. You can only pull the rug out from under your users so many times before learn to walk along another path.

comment 13y ago · link · parent

For those who don't know the context of the reference to the poppy, it's from the poem "In Flanders Fields"

>In Flanders fields the poppies blow

> Between the crosses, row on row,

> That mark our place; and in the sky

> The larks, still bravely singing, fly

> Scarce heard amid the guns below.

> We are the Dead. Short days ago

> We lived, felt dawn, saw sunset glow,

> Loved and were loved, and now we lie

> In Flanders fields.

> Take up our quarrel with the foe:

> To you from failing hands we throw

> The torch; be yours to hold it high.

> If ye break faith with us who die

> We shall not sleep, though poppies grow

> In Flanders fields.

http://en.wikipedia.org/wiki/In_Flanders_Fields

1
155156157
202