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 11y ago · link · parent

The reason Netflix is tricky[0] to run on Linux is due to DRM in Silverlight, which is maintained by Microsoft.

Linux can run Silverlight applications in general using Moonlight. (Broadly speaking, Moonlight:Silverlight :: Mono:.NET). However, the DRM is not available on Linux, and was non-trivial to get working under Wine until November 2012, when someone finally published a straightforward way to patch Wine to run Netflix.

Nowadays, Netflix has also switched to using HTML5 DRM when possible, so it is possible to watch Netflix on Linux using Chrome (not Chromium). However, it's worth noting that many distributions ship Chromium instead of Chrome by default, as it is proprietary software. It is still not possible to watch Netflix on Firefox, as they have not yet implemented EME (HTML5's DRM). Because of the way HTML5's DRM works, there is no way to produce a fully FOSS browser that can watch Netflix; the DRM extensions have to be purchased uner a proprietary license.

OP's wish was to be able to access Netflix or a similar service while using only FOSS software. That is still not possible, and I don't see a way for it to become possible anytime in the near future, at least until the MPAA finally gives up DRM (the way the RIAA did).

[0] Not impossible, but definitely a pain.

comment 11y ago · link · parent

For what it's worth, you don't need to even need to type out the struct manually when unmarshalling JSON; you can generate it automatically[0] (this tool is compatible with `go generate`).

In addition to the effects of being statically typed, which you mentioned, Go is a bit lower level than Python or Ruby, so it will always perform at least slightly worse when compared on a strict line-by-line basis. Fortunately, though, it's not that much more verbose in this case. And as an added benefit, the struct value, once unmarshalled, is typesafe (which is not true in Python[1]).

[0] https://github.com/ChimeraCoder/gojson

[1] Because Python is not only dynamically typed but strongly typed, I've more than once run into an issue where a misbehaving API returns a string instead of an int, and then Python throws a runtime exception because it can't add a string and an int.

comment 11y ago · link · parent

I grew up in New England, so I can provide a bit of relevant context:

New Hampshire is a very quirky state, politically, in a number of ways. In a sense, New Hampshire state government looks a lot more like city-level or county-level government in many other states.

Compared to other states, state representatives are far more likely to "average citizens" instead of career politicians - just everyday people who have decided to do as single term in state government, and have little to no plans to run again. This is very frustrating for the leadership of both chambers, since it makes it very difficult to whip votes! On the other hand, it arguably makes it easier for elected officials to buck party lines and vote their conscience, if they so choose.

In addition New Hampshire does not (last I checked) have direct-vote ballot initiatives the way California does, but it does make it much easier for citizens to propose legislation. Whether or not this legislation gains traction or actually passes is a separate matter. Look no further than the long history of repeated attempts at marijuana policy reform in NH to see just how difficult it can be to predict which bills will end up gaining traction[0].

As a result, it's very common to see bills that are proposed and supported by a small contingent of backers, but never end up going anywhere. This bill may or may not end up passing, but just keep this context in mind whenever you read news about a bill being brought to the NH legislature with only a handful of supporters.

[0] This issue is actually a particularly fascinating case study in NH government, because NH is a very libertarian-leaning state, and it baffled reform advocates for the longest time that they had such difficulty in getting NH to pass relatively uncontroversial reform measures.

comment 11y ago · link · parent

I was incredibly excited to see this news upon seeing the headline in the New York Times, and surprised, because Harper Lee has been a recluse for almost her entire life since writing To Kill a Mockingbird, and has repeatedly insisted that she had no desire to publish another book ("I wouldn't go through the pressure and publicity I went through with To Kill a Mockingbird for any amount of money. Second, I have said what I wanted to say and I will not say it again."[0])

After doing a bit of digging, however, I'm a bit concerned. Now, Lee is almost 90, and has suffered a stroke that seems to have had lasting effects. She filed a lawsuit in 2007 against the son-in-law of her former agent, claiming that he took advantage of her mental state during her recovery and duped her into assigning him the copyright to To Kill a Mockingbird[1]. For much of her adult life, her sister handled press relations and shielded Lee from these pressures. Her sister passed away three months ago, and suddenly this new book comes to light[2].

I really hope these suspicions are wrong, and that there's nothing shady at play here. I'm excited to read the book, but I can't help but be skeptical of the timing.

[0] https://en.wikipedia.org/wiki/Harper_Lee#After_To_Kill_a_Moc...

[1] https://en.wikipedia.org/wiki/Harper_Lee#Lawsuit_to_regain_c...

[2] (I dislike linking to Gawker Media sites on principle, but Jezebel actually wrote a good post digging into the details of this - "Be Suspicious of the New Harper Lee Novel".)

comment 11y ago · link · parent

> But should you ever meet a Comcast employee at a technical conference, realize that they hate the evil Comcast machine as much as you do. But they're working from the inside to try to make things better -- at least as much as they can as a developer.

I'd extend this to the customer support people as well (at least the ones who actually interact with customers).

At a company like Comcast, customer support people rarely have much autonomy, if any at all. They're forced to read from a very narrow script, are penalized heavily for deviating from the script, and are also penalized heavily if they underperform even when using the script. They're not paid terribly well, and since it's relatively unskilled labour, they often don't have very good alternative job choices (unlike developers in today's market).

I hate Time Warner as much as any of their customers should, though it's always good to keep in mind the separation between the company as a whole and the individuals within the company. The ones who are actually responsible for all of the reasons we hate Comcast/Time Warner are the ones that we're likely never to speak with, and that's no accident - they go out of their way to avoid talking to any customers[0].

[0] Because, unlike most startups, they don't have to worry about building a product people want to use - their customers have no choice.

comment 11y ago · link · parent

> saying that your type system doesn't have generics is like saying your car doesn't have wheels.

To overburden an analogy, it'd be more like complaining that your tank doesn't have wheels[0], or your hovercraft. Go takes a different approach to the same problem (in this analogy, getting from point A to point B).

But really, this is a rather tired flamewar that gets beaten to death literally every time a post about Go makes the front page, and there's really nothing more that can be said about it. Either program in idiomatic Go, which means using the language as it's designed (ie, without generics, at least in its current form), or don't, but it's very tiresome to see this argument rehashed again and again.

[0] https://en.wikipedia.org/wiki/Continuous_track#mediaviewer/F...

comment 11y ago · link · parent

> - Go is a minimal language and has been called boring. [2] I don't claim to be an expert yet, but I don't think I've reached this level of productivity with a language this quickly before.

I was drawn to Go initially because of its promises around concurrency, but this is why I stayed. Within less than a month, I was as productive in Go as I was in Python, despite the fact that I had been programming in Python for several years at that point.

> - I totally agree with the comments on this thread about dependency management. Godep [1] is nice, but it would be great to see a canonical dep management tool for go.

For what it's worth, Docker has more or less replaced this need for me. I know it doesn't actually do "dependency management" in the traditional sense, but by the time that ad-hoc vendoring no longer works, I've found it's already time to start using Docker for deployment for other reasons anyway. At this point, it's just as easy to use Docker to manage the dependencies at the application level while developing as well.

comment 11y ago · link · parent

> Reclassification is at best a hack that's going to have a lot of unintended consequences.

It's not that Title II is the ideal option. On a practical level, it's the only option left on the table.

The EFF is well aware of the issues with Title II, which is why it held out for so long (until just six months ago!) before advocating reclassification, and which is why even then the EFF was very clear to advocate forbearance[0] alongside reclassification, not just reclassification no-strings-attached.

Given the current political climate, I really don't see any way of implementing net neutrality other than Title II reclassification that has even a remote chance of both coming into effect and standing up to the courts. Title II reclassification may be an uphill battle, but any other proposal that I can think of has less than a snowball's chance in hell of actually coming into effect, let alone achieving the actual goal.

We've already seen that there's no way that the FCC can regulate a neutral net under its current authorization without classification under Title II - that's almost literally what the federal court ruling last year said. And there's no way that Congress will pass a new law that either expands the FCC's authority or somehow provides for a neutral net independently of the FCC. So repurposing an existing piece of legislation is what we're left with.

[0] https://www.eff.org/deeplinks/2014/07/forbearance-what-it-wh...

comment 11y ago · link · parent

My favorite example of these "dumb" (to human eyes) recommendations happened to me a year ago: https://twitter.com/chimeracoder/status/423877639666167808. Note the reason Netflix recommended it.

I have no trouble understanding why a recommendation engine might yield this sort of result (e.g. parents sharing accounts with kids), but I'm a bit surprised that Netflix doesn't do a better job of inferring when different people are using the same account, even when the users don't keep their profiles separate explicitly.

The amusing part is that I've never even seen the show myself. My friend happened to watch a single episode of Law & Order: SVU on my computer while she was staying at my place... and now I'm probably on a government list somewhere after this recommendation!

comment 11y ago · link · parent

> Technically, we could claim that we are HIPAA compliant, as we don't store PHI

Disclaimer: I am not a lawyer, I am not your lawyer, and this is not legal advice.

There's a lot more to being HIPAA compliant than how you store PHI. As an engineer, you might view not storing PHI as compliance-by-default (the null case), but I don't think a lawyer would agree. Even if you're correct and HIPAA doesn't apply to you (which I'm not convinced is the case), it'd be like saying "we're PCI-compliant, because we don't store any financial information or process any financial transactions".

For what it's worth, I founded a company that does store PHI, and we had to get a BAA with AWS (though we ended up using Aptible (YC S14)[0] for hosting and compliance, as it's much easier. Using Aptible is like using Heroku (git push to deploy), and they manage not just the data backups/retention/etc. from a technical standpoint, but all of the human training and paperwork aspects to compliance[1].

[0] https://www.aptible.com/

[1] Which, to be honest, is the tough stuff. From a technological perspective, HIPAA doesn't really mandate much that developers of robust applications shouldn't already be doing, but it's the matter of actually demonstrating that you've done everything in compliance with the law that makes things complicated. Having the 'rubber stamp' of a third-party company that specializes in this matter gives immense peace-of-mind as the CTO, compared to the DIY approach.

comment 11y ago · link · parent

> While I got also shocked at first by Go's time formatting, is by far the easiest to learn and memorize once you get it.

I completely agree. I've used strftime and the like for years, and I still can't remember %m vs %M without thinking twice about it, at which point I usually just look at the docs to make sure I'm not making a mistake.

By contrast, as soon as I learned the "trick"[0] behind the canonical date in Go, I had it committed to memory, and I haven't needed to look it up once since.

YMMV, but personally, I'd much rather write "Jan" when I want a three-character month and "January" when I want a full month than try to remember that the former is %a and the latter is %A (...or is it the other way around? Time to check... again!)

[0] http://golang.org/pkg/time/#pkg-constants

comment 11y ago · link · parent

> real world conditions like snowy roads and places with obscured road signs.

Snowy roads are actually much better in many ways for cars (theoretically) than humans, because cars have much shorter reaction time. As for obscured road signs, if self-driving cars become the norm, road signs will likely disappear, because (A) they will use wireless communication to transmit information to cars, rather than visual scanning, and (B) a lot of information contained on road signs would simply be irrelevant or redundant for self-driving cars.

Remember that modern cars are already very autonomous, even though they "feel" manual. Recently, I drove a car[0] that will actually automatically steer the car back into a lane if it senses that the driver is veering on the highway (ie, if he/she falls asleep or is drunk).

We don't think of this as "self-driving" because the improvements are incremental and the driver is still present and feels like he/she is in control, but drivers have been slowly giving up control over cars for several decades now. Self-driving cars are actually much less of a leap from the status quo than people realize; it's simply[1] the final step in a long series of incremental automation of automobiles[2].

[0] Subaru, I believe.

[1] Not that it isn't still an impressive feat, of course.

[2] Let's not forget the prefix or etymology of the world automobile - it's not accidental!

comment 11y ago · link · parent

> On other side author was detained for 5 hours. That is practically rounding error in __ANY__ country.

As someone who was detained for about the same amount of time, under circumstances about as ridiculous as OP's, I take serious issue with this characterization of five hours' illegal detention as "practically a rounding error".

comment 11y ago · link · parent

> systemd-nspawn calls itself "chroot on steroids", and chroot cares nothing about the init system.

If I remember correctly, systemd-nspawn uses cgroups (hence the "steroids" part of of "chroot on steroids").

On Linux, cgroups require a single manager for all cgroups (in this case systemd). This is not a systemd limitation; it is a requirement set by the Linux kernel[0].

In theory you could bring-your-own cgroup manager, but cgroups are nascent enough that trying to make a userland tool like systemd-nspan work with a completely pluggable cgroup manager would be a nightmare.

[0] http://www.freedesktop.org/wiki/Software/systemd/ControlGrou...

comment 11y ago · link · parent

> So long as the FCC continues to allow wireless carriers to manage our networks and differentiate our products, Sprint will continue to invest in data networks regardless of whether they are regulated by Title II, Section 706, or some other light touch regulatory regime.

This is really huge, because it endorses applying Title II to wireless networks, not just wired broadband.

Much of the discourse so far has been around wired broadband, and many of the proposals so far (including the FCC regulations that were shot down last year in court) carved out special exemptions for wireless networks.

comment 11y ago · link · parent

How rich does a country have to be, then, in order to be able to "burn money on CERN"? What is the "acceptable threshold" of poverty, healthcare coverage, civil liberties, and so forth at which a country can decide to divert money towards investing in science instead of solving these problems?

It's analogous to this XCKD, except with money instead of time: https://xkcd.com/1232/

comment 11y ago · link · parent

First you teach them how to write idiomatic code (non-performant), and then you teach them how to make the idiomatic code more performant.

It's very common for new users (in any language, not just Go) to try to jump right to the end, but focusing on performance before understanding basic language building blocks is a recipe for frustration, both for the new users and for the language designers.

comment 11y ago · link · parent

It's important to understand how new users are using the language, but new users of the language should not be focusing on performance before they learn the language well enough to know what is idiomatic and what is not, which was the original criticism.

The criticism is well-grounded: it's rather tiring to see endless "performance benchmarks" that test little more than printing to the console[0], or create artificial programs that are direct line-for-line translations of another language, and don't represent what an actual developer would generally write.

Think of it as a from of premature optimization - literally.

[0] Not in Go, but I can't count the number of times I've seen people use these comparisons for languages like Python and Ruby. It's incredibly ironic, because these languages really just farm out to the same underlying C libraries for this functionality, so it's testing something, but not really the performance of the actual language features.

comment 11y ago · link · parent

> before we know it, Ubers will be rude, yapping on their phone in unknown languages, and the cars will have torn upholstery and reek of incense

I understand that you mean to say that you expect the quality of Uber rides to drop, but can you do so in a way that doesn't draw upon negative stereotypes of other ethnicities?

comment 11y ago · link · parent

This is a cool project, though the name might be a bit confusing in conversation. The MongoDB driver for Go is called "mgo" and pronounced "mango"[0].

[0] https://labix.org/mgo

comment 11y ago · link · parent

> Or actually, it's not a generic (as in generics) package, which is why you lose type safety.

Can we please skip just one opportunity to begin this endless flamewar on a HN post about Go? Just one? Please?

This topic has been beaten to death and beyond, and is not relevant to TFA at all, as the word "generic" can be used in many contexts, and it's more than clear which context OP meant.

comment 11y ago · link · parent

interface{} is different from []interface{}.

You can do a type assertion (not cast - these are different concepts) from interface{} to another type. You cannot do a type assertion on []interface{}; you have to iterate over each element and assert individually.

I agree with GP - the built-in primitives for synchronization, along with sync from the stdlib, are much cleaner once you know how to use them, and they're more idiomatic.

comment 11y ago · link · parent

> Zero-rating is free shipping. I don’t know of anyone that considers free shipping anti-competitive, though one could make the same argument.

That's a bad analogy. A better analogy would be USPS[0] providing certain shippers with free shipping, and not others[1]. Imagine the disastrous effects this would have on small sellers, who would certainly not have the means to negotiate these rates with USPS, whereas a larger company would.

So it's not a slippery slope, because the anti-competitive impact is direct and immediate. USPS has to charge everyone the same price for the same service, and for good reason.

[0] Like broadband ISPs, USPS has an effective monopoly on shipping in parts of the country, as private carriers (UPS/FedEx) will simply "offload" certain deliveries to them, as USPS is required to ship to all locations.

[1] USPS does offer, for example, "Media mail" discounts, but this is available to all shippers, and represents a different service (slower delivery, no guaranteed dates - in the olden days, it represented surface shipping, though I'm not sure that is the case anymore).

comment 11y ago · link · parent

I'm kind of surprised that the Nexus 5 (hammerhead) isn't in the first batch of devices, since it's the last Nexus device that was released without Lollipop, and stock Lollipop has been available on the Nexus 5 for a while.

It's especially weird, since the Nexus 4 (mako) is in the first batch of devices. I'd expect the more recent and more up-to-date devices to be easier to port, and also a higher priority.

That said, this has taken a lot less long than I'd feared, so I'm pretty excited to see this! Privacy Guard alone is worth the switch to Cyanogenmod[0], in addition to a number of other tweaks that CM allows.

[0] Yes, it's available on rooted non-CM devices, but it's much cleaner when it's integrated into the ROM.

comment 11y ago · link · parent

> From what I know, a symmetric key is more suitable to encrypting huge amounts of data.

Symmetric key encryption is more efficient, but the typical approach when using public key encryption with large files is to use symmetric key encryption, then encrypt the symmetric key with the public key, and then transmit that over the wire.

I imagine that the process used in this software is the following:

1. Generate symmetric key

2. Encrypt symmetric key using (known) public key (the private key remains on the malware owner's servers)

3. Delete the unencrypted symmetric key.

If these three steps are done before the user is told that their files have been held hostage, then by the time that they know they are infected, it's too late to do any analysis of the program, sniff memory, etc. (at best they'll be able to recover the public key and the encrypted symmetric key, which is useless without the corresponding private key). As soon as the ransom is paid, the malware owners will decrypt the symmetric key (using their private key), and send that back to the victim[0].

This could, of course, also use a different symmetric key for each file as well, in addition to the above.

[0] In theory, the malware owners don't even need to store anything per-victim, since the encrypted symmetric key can remain "safely" with the users the entire time. All they need to store is the single master private key.

comment 11y ago · link · parent

> Kant's categorical imperative:

> > Act only according to that maxim whereby you can, at the same time, will that it should become a universal law.

For what it's worth (and perhaps you intended it this way), this is a somewhat shallow application of the categorical imperative. There are other ways to justify using AdBlock (and in fact, condemn not using AdBlock) by means of the categorical imperative. For example: "If everyone uses AdBlock to prevent sleazy ads that can contain malware, then those ads will no longer have value, and they will cease to exist." If you think of AdBlock as a vaccine, then by the categorical imperative, it's necessary to vaccinate everyone[0].

Or, "If everyone uses AdBlock, then websites will have to invent monetization tactics that don't involve auctioning off its user's eyeballs and privacy". If you consider ads to be an intrusion and invasion of privacy, then killing the ad-supported model could actually be a good thing.

I don't really want to get into a debate on adblockers in general, because the topic has been beaten to death on HN before, but I just felt compelled[1] to make this note about the categorical imperative for the sake of others reading this.

[0] This is also a somewhat simplistic reduction, but you get the idea.

[1] (Yes, that's a Kant pun)

1
130131132
202