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

There is a huge disparity in the crimes for which men are charged (and then also for which they are convicted).

I don't have a citation for the statistics offhand, but from my work in drug policy, I can tell you that men and women (in the aggregate) are convicted of very different drug crimes.

Put another way, if you went to a men's prison and a women's prison and took a random survey just of the inmates who are serving time due to drug-related crimes, you'd end up with very different cross-sections.

comment 12y ago · link · parent

> I'm puzzled why it's not 1-249 with 0 being a different group. So this law basically means that as long as you send less than 250 requests to a single company you're fine.

I think you just answered your own question. The difference between 0 and 1 is pretty important.

Think of it this way: until relatively recently, Github would return either a 500 or a login page (I forget which) if a logged-out user tried to access a private repo, whereas they would return a 404 if a logged-out user tried to access a nonexistent repo.

If someone thought that you were working on a secret project and they had an idea what the project name might be, they would be able to confirm this with a simple HTTP request. They don't even need to see the contents of the repository in order to obtain what could be potentially damaging information (the mere existence of the project).

This way, one can never be sure whether a company has received any letters, which is itself a rather valuable piece of information, until they have already received a large number (and presumably for a large number of targets).

comment 12y ago · link · parent

As a Cloudflare customer, I'm really happy to see this. Cloudflare provides a great service, but to do so, they have to assume a position of enough power that makes them an easy (legal) target for a determined government.

As a US resident (and citizen), though, I find this very disconcerting. The difference between 0 and 249 requests is a lot.

There isn't much else a company the size of Cloudflare can be expected to do (lobbying the government requires levels of cash that I doubt Cloudflare has right now), but it makes me sad that this is even newsworthy.

comment 12y ago · link · parent

html/template is literally nothing more than an "HTML-safe" version of text/template, which is Go's arbitrary text template language. It's meant to be completely a drop-in replacement for text/template, and as such, its design does not give HTML output any special consideration, which an HTML-specific template language would.

I understand the point you're making - I just want to point out that Haml is explicitly designed for HTML, whereas html/template more or less "just happens" to be useful for HTML.

As for ERB, I'm not convinced that it is too different in this regard. I'm not much of a Rubyist, and I find it incredibly frustrating to use, but perhaps that's a matter of personal preference.

{text,html}/template have their warts - I literally started Jetpack because of an unusual html/template quirk I ran into that was tricky to debug. However, I don't think it's any worse than other template language in this regard (my main points of reference are Jinja2, ERB, Haml, and Scribble).

comment 12y ago · link · parent

> "html/template" doesn't support things like inheritance

I don't want to get into a debate about what "inheritance" means, but html/template does support template composition and nested templates, which seem to address the same use case.

> These two problems have made it so I've pretty much given up web apps in Go for now. Services in Go are _amazing_. But if you're trying to get a full blown web app (again, not the point of the linked article above), then you're gonna have a bad time.

I'm sorry to hear that, especially since writing a "full-blown web app" is really not difficult in Go at all, once you know what you're doing.

I've actually been working on Jetpack[0], a sample web application in Go to demonstrate how straightforward this is, once one understands how it actually works. (Disclaimer: it's still a work in progress, so it's not complete/ready yet).

[0] https://github.com/ChimeraCoder/go-angular-jetpack

comment 12y ago · link · parent

I'm going to chime in, since I've been using Go as my primary language for over a year, and I'm currently working on a major (production) Go project that others might see as well-suited for Rails (in fact, the early prototype was written in Rails[0])

> The thing no framework I have seen so far addresses is persistence. SQL persistence in Golang is a bit of a nightmare. It's raw SQL, and the database libraries are fussy.

> The thing that makes Rails so easy to write in, especially for newcomers, is ActiveRecord. As far as I can tell, nothing like it exists (in a stable form) for Golang.

I wouldn't recommend newcomers to Go use SQL right off the bat. Document-based storage (like CouchDB or MongoDB), or even key/value (Redis, etc.) is much more aligned with Go's concept of structs, and all three of those databases have strong library support in Go. If you're just looking to dabble in Go and just happen to need a database (and it doesn't matter which), I'd recommend playing around with those first. Even Neo4j works very well with Go, though as of January 2013 (when I last used it), the only Go library for Neo4j was third-party, and not very well-documented.

That said, once you know the Go language, using SQL (either with or without an ORM) is straightforward, if not as convenient as ActiveRecord. jmoiron has a good blog post[1] comparing the good, bad, and ugly of Go ORMs, so I won't try to top that here - rather, I'll share my experience.

(As pointed out elsewhere, ORMs are not universally liked as a general concept, so I'm writing this comparison assuming that one actually does want the features an ORM provides - naturally, if you prefer prepared SQL, Go already provides perfect support for that.)

Gorp is definitely not as "magical" as ActiveRecord, but it certainly does the job. A number of the ways in which it differs from ActiveRecord have more to do with the (strongly) static vs. dynamic difference in type systems, though some are specific to Go's architecture.

There are a few odd features here and there that are still missing (for example, I'm actually not sure if there's a wrapper function for "INSERT IF NOT EXISTS" yet, though it's not a huge bother).

I do end up spending more time thinking about the queries that I'm using, compared to Django or Rails. There is some additional verbosity - I have to write some helper functions that I wouldn't otherwise have to. On the other hand, I know exactly what queries are being executed at all times, so it's easy to identify potential bottlenecks.

In short - I agree that ActiveRecord is more convenient than anything that currently exists in Go. On the other hand, it's reasonably advanced enough that relative newcomers to the language[2] shouldn't have a problem with it. So far, the biggest bottleneck in development of this application has not been with the SQL bindings, even though it would be nice to spend a bit less time on that front.

It hasn't had as much time to develop and mature as ActiveRecord have, but those of us using it in production have accepted those tradeoffs.

[0] If you're wondering why we didn't continue it in Rails, we had to scrap the original codebase for a number of other reasons, so given that we weren't keeping any of the original code, there was no logical reason we needed to use the same language.

[1] http://jmoiron.net/blog/golang-orms/

[2] As opposed to newcomers to programming in general

comment 12y ago · link · parent

I'm not sure why you're being downvoted - what you're saying is mostly correct[0] and actually relevant. The Hippocratic oath is very misunderstood and improperly invoked in public discourse.

The Hippocratic oath is the medical equivalent of swearing a judge in on a Bible - symbolically very important, but of next to no literal significance.

For example, I bet most people don't know that the Hippocratic oath says the following:

> I will not use the knife, not even on sufferers from stone, but will withdraw in favor of such men as are engaged in this work[1]

By definition, any surgeon is violating the Hippocratic oath on a daily basis.

There are codes of ethics that doctors are expected to uphold, and the principles behind the Hippocratic oath are still relevant today, but the actual Hippocratic oath is all but obsolete.

I'm sure that the alleged actions of the doctors question violated whichever code of ethics they are bound to, but we should be discussing those instead, not the Hippocratic oath - if there is any possibility of their license being revoked, those codes are the bar against which their actions will be measured.

[0] https://en.wikipedia.org/wiki/Hippocratic_oath#Modern_use_an... [1] https://en.wikipedia.org/wiki/Hippocratic_oath#English_trans...

comment 12y ago · link · parent

Well, yes, obviously it's "easier" to litigate when you give yourself less legal standing to file suit, but that's a rather meaningless comparison. By that logic CC0, is the easiest to litigate, because you've given up all your rights as the license holder. That only makes sense if you place literally zero value on the rights that the license provides. It's only relevant to compare how easily enforceable two licenses are when the rights they provide are comparable (e.g., GPL and MPL, or 3-clause BSD and MIT).

The whole point of choosing the GPL over BSD/MIT is choosing a copyleft license. If all you care about is ensuring that the recipient is legally granted the rights provided by the BSD/MIT license, then the question of how "easy" it is for the license holder to litigate isn't relevant.

OP's argument was that it would be too much mental effort to enforce the GPL, though that's not really an argument for not choosing the GPL, because simply holding the license doesn't mean he has to enforce it.

If OP actually doesn't want the copyleft provisions, then obviously he shouldn't choose the GPL. But if that's something that he does care about, there's not really any downside to selecting the GPL, and no upside to selecting a non-copyleft license.

comment 12y ago · link · parent

> What if, when you were up at a ridiculous hour Skyping your relatives in Australia, you could borrow unused bandwidth from your sleeping neighbors to make your own broadband connection faster and stronger?

Maybe this makes sense if you're lucky enough to have FiOS (which gives you a dedicated line). For me (a Time Warner customer), this is already the case. Except, it's not "borrowing" so much as it is "stealing".

Technically, I should have 2.5MB/s down (20Mb/s is what I pay for), but in reality, I'm often lucky to get 1MB/s, because my neighbors are using the Internet and watching Netflix, etc. And I have never observed more than 2.5MB/s, so it doesn't average out.

Theoretically, this should already be illegal, but it's still very common in practice.

For this inconsistent connection (and no other services!), I am forced to pay over $50/month.

Edit: Updated - I pay for 20Mb/s, not 15Mb/s.

comment 12y ago · link · parent

> If I ever had to defend my intellectual property, I could do so myself, and the case would be over quick. That is more important to me, as a developer without access to lawyers, than ideological battles.

The case would be over quickly, but you may not be happy with the result.

If you are not well-trained in copyright law (specifically as it applies to software), you are not going to be able to enforce the BSD license any better than you will be able to enforce the GPL, without a lawyer. There are just so many other ways that a well-funded legal team can give you the run-around.

comment 12y ago · link · parent

> Developers are users.

Developers are users, but so are non-developers.

The question of whether developers should be able to restrict freedom of non-developers is the question of whether some users should be able to restrict the freedom of other users. This is an ethical (subjective) question.

Put another way, should landowners be allowed the freedom of having serfs or indentured servants? Not allowing them to do so is restricting the freedom of some people (the freedom to own serfs). But allowing them to do so is restricting the freedom of other people (the freedom to be... well, free human beings).

As a society, we believe restricting the freedom to be human beings is ethically abhorrent, so we have no qualms (anymore) about restricting people's freedom to own serfs.

Maybe you see non-free software as ethically abhorrent, the way slavery is, maybe you don't. But that is the axiom that the free software movement (and the GPL) is based on - to understand free software, you have to understand that principle, even if you disagree with it.

comment 12y ago · link · parent

> a program that was compiled using LLVM?

Neither compiler affects the licences of the output. In the case of a compiler, the "end user" is the end user of a compiler (which in today's world is a developer, but 20 years ago may not have been).

End users are "screwed over" in this sense every time permissively-licensed free software is forked into proprietary versions that the users cannot do one of the following

1) Study (view the source) 2) Modify (edit the source) 3) Distribute (send the source or binary to another person) 4) Distribute modified versions of the software

All of these freedoms include the freedom to hire someone else to do this for you, so even if you are not a developer, you still have the potential to benefit from free software, the same way all drivers benefit from the fact that any mechanic can service a car (not just the dealer).

comment 12y ago · link · parent

> You also have states that have said it is completely legal to possess, grow, and distribute it. Right there, that strikes me as a weird combination: Don't federal laws trump state ones? (And wasn't this sort of a central part of the Civil War, that states can't just make up their own laws that contradict federal ones?)

Sort of. But there's an argument to be made that the federal government doesn't have the constitutional authority to criminalize drugs.

In fact, the very first laws restricting drug and alcohol use were phrased in terms of other language[0], specifically because the common perception was that the federal government couldn't simply prohibit the states from allowing sale of a substance, due to the Tenth Amendment: https://en.wikipedia.org/wiki/United_States_Bill_of_Rights#T...

I'd recommend reading the Federalist papers (they're long, but there are a few that serve as a nice summary of the whole work). It's fascinating to see how different the attitude towards government in the 18th century was compared to today.

The Federalist Papers were essentially written as a "propaganda" (in the literal sense of the word) piece for the new form of government, directed at people who were concerned with the idea of a federal government and wanted the states to retain authority. This was especially true in large states (like New York), who feared losing control, and a lot of the papers are intended to assure those citizens that the Constitution, etc. should to limit federal power, not to grant it.

[0] For example, taxes: https://en.wikipedia.org/wiki/Marihuana_Tax_Act_of_1937

[1] Note that the 18th Amendment was exactly that - a Constitutional amendment, and not a simple bill passed by Congress or executive order.

comment 12y ago · link · parent

Like the US really cares about international drug treaties.

The reason that drug policy around the world is similar to drug policy in the US is specifically because the US has forced its approach on the rest of the world, not the other way around. Notice how many of the international anti-drug operations are carried out by the DEA.

If the US suddenly decided overnight that it wanted to do things its own way, I have a hard time believing they'd face any real international resistance.

comment 12y ago · link · parent

Agreed. It's very rare these days to find people who are willing to stick to their principles; we should respect those who do, rather than criticize them for not compromising on their principles[0].

From your linked post:

> You are crossposting to two public project lists of the GNU project with inflammatory language and mischaracterizations. You have been involved with the GNU project long enough to be well aware that this kind of crowbar approach does not lead to much more than headlines about Free Software infighting.

ESR is doing little more than trolling here. He knows exactly where the FSF stands, and he knows exactly why that's not going to change (asking the FSF to do something that they believe hinders free software is like asking MADD to open a drive-through liquor store).

The FSF has always been very clear that they see the "open source" movement as complementary to (though not the same as) the free software movement, fighting for similar goals but for different reasons[1]. It's sad to see ESR, an "open source" advocate, actively try to fan the flames.

Nobody wins from this. Except advocates of closed, proprietary software.

[0] Of course, ESR knows exactly what he's doing here - the issue is that he disagrees with their principles, but instead of debating those, he'd rather attack them for executing on their principles rather than executing on his principles. It's a cheap rhetorical trick and a rather low move.

[1] "We don't think of the Open Source movement as an enemy. The enemy is proprietary software.", from https://www.gnu.org/philosophy/free-software-for-freedom.en..... (Don't be fooled by the title - the content of the article is very even-keeled).

comment 12y ago · link · parent

In moot's own words: http://chrishateswriting.com/post/74083032842/today-my-start...

I'm really sad to see this, because I saw myself that DrawQuest was gaining traction.

That said, I really appreciate what Everpix did, and I'm glad that moot seems to value that transparency as well.

Failure is a really important part of the startup process - it happens over 90% of the time - and yet it accounts for less than 10% of the dialogue.

When startups and founders share post-mortem data like Everpix did, it's an incredible gift to the community. A startup may failed, but let it not have died in vain.

I know moot reads HN, so hopefully he sees this. Thanks for giving back to the community.

comment 12y ago · link · parent

> Such kind of "lossy compression" was used sometimes to transfer secret messages. It's impossible to fully decipher it without knowing the text, but it serves as a reminder for those who know it, so they can reconstruct it in full form if needed.

This was the way that the Qur'an was originally passed down. Originally, the Qur'an was meant to be a recited work. Furthermore, at the time, Arabic writing wasn't so much a complete orthographic system as much as a reminder of the roots of words[0]

This works well in Semitic languages, in which the consonants denote the general meaning of the word, and the vowels change the specifics.

For example, one might write "SLM", which can be expanded to any of the following (capitalization for emphasis)

1) iSLaM = "submission" (literally)

2) moSLeM = "one who has submitted"

3) SaLaaM = a greeting, similar to "peace" (etc.)

The writing is not enough to reconstruct the entire text, but it's good enough for someone whose job it is to recite the work, and simply needs a little reminder.

[0] In fact, not only did traditional written Arabic lack vowels (much like Hebrew), but I am told that even consonants were difficult to distinguish from each other.

comment 12y ago · link · parent

> We try to avoid buying enterprise drives at all costs.

Why is that? From what I can read on your website, it seems you would be the correct use-case for enterprise drives, no?x

comment 12y ago · link · parent

On the other hand, South Koreans are required (by law) to use Internet Explorer 8 or earlier for online transactions[0], and they are required to register for many (perhaps all) websites with user-generated content using their unique national ID number (sort of the Korean counterpart to a Social Security number)[1].

This is due to a law passed in the late 90s, in the name of security. Perhaps it once worked, but it clearly doesn't today: http://www.zdnet.com/bank-data-of-20-million-customers-leake...

They have very extensive censorship of websites - not "just" pornographic, but also those that are "subvserive" or "harmful to minors". In combination with the aforementioned "citizen identity number" law, this has been used to suppress political dissent and/or protest.[2]

Much as I wish I could do better than my molasses-esque Time Warner connection at home, I'll savor my freedom in the US to the extent I can.

[0] http://www.zdnet.com/south-koreans-use-internet-explorer-its...

[1] (There are exceptions, and the full realities are a bit more complicated, but it's bad enough that virtually everyone uses some form of Internet Explorer: http://www.washingtonpost.com/world/asia_pacific/due-to-secu...)

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

comment 12y ago · link · parent

> DPR espoused and was embraced by Libertarians. Turned out to be a contract-killing, drug-dealing, law breaking psychopath.

Nelson Mandela has been embraced by people and organizations that I would otherwise classify as peace-loving. And they knew the entire time that he was a "terrorist"!

Ideologies are complex. One may agree with parts of a person's work, but not other parts of their means (or vice versa, or any other possible combination).

It's unfair to say that DPR's shady behind-the-scenes actions are somehow characteristic of an entire ideology that happened to agree with some other consequences of his work, and therefore grounds to dismiss them entirely.

comment 12y ago · link · parent

I'm not a libertarian, but if I were, I would find this horribly offensive.

> What you also get from the report is just how connected all this stuff is with libertarian derp

Much of prominent libertarian philosophy is derived from principles of nonviolence. Of course, it is infer thaf this statement to apply to all libertarians, but simply dismissing them as 'libertarian derp' based on one violent individual is deliberately misleading.

Also, talking about Amy Adams and her cleavage? This is the New York Times, not Maxim.

I expect better from Krugman.

comment 12y ago · link · parent

I have been writing Go daily at work for about a year and a half. It is now my primary language, and my default choice for any new projects, the way Python used to be. Before that, I come from a background in functional programming (and still find functional programming to be my favorite paradigm).

It seems to me that there are two disjoint sets of people: those who write Go regularly, and those who complain about generics in Go.

Of course, you can interpret this either way you wish!

1) Perhaps those latter people would like Go despite its lack of generics if they only bothered to get familiar with idiomatic Go.

2) Perhaps the lack of generics is precisely what prevents them from writing Go on a daily basis.

But as someone who actually does write Go on a daily basis, and has for a year and a half, I can honestly say that I've only ever missed them a handful of times. And I say this as a functional programmer who is used to being able to call "map" everywhere.

In fact, if I had to prioritize the things that I wish I could change about Go, generics would not be in the top three - not even in the top five[0]. They're just really something that I don't miss anymore.

[0] I could tell you what they are, but that'd be making it too easy - give Go a shot, long enough to realize you really don't need generics as much as you think you do, and then you'll probably have a good idea of the good, bad, and ugly when it comes to Go.

comment 12y ago · link · parent

This title reminds me of the line, "Nobody goes to that bar. It's too crowded."[0].

I'm not sure why people love to insist that "email is broken" Email does its job remarkably well. In 2014, it's one of the only communication forms that's truly open, 100% cross-platform, and free-as-in-both-beer-and-freedom. If there's something more you need, it's easy to write (or extend) a client that handles your email according to whatever logic you set up.

The main complaint that I hear about email is that "we get too much of it". But that has little to do with email itself, and more to do with how much we do these days. The pace of business in 2014 is faster than the pace of business in 1964, and I'd wager that if you compared the volume of email today with the volume of paper mail then, the increased velocity of transactions would account for almost all of the difference.

Rather than trying to "fix" email by replacing it or extending the protocols in incompatible ways, let's work on creating clients that do what we want them to do.

[0] Currently the title is "Email is Broken: People Sent 67 Trillion Emails in 2013", though I suspect that this may be reverted soon, given the HN policy.

comment 12y ago · link · parent

> Who gets utilities for free with their rent.

Depends on what you mean by 'utilities', but in New York City, landlords are required to provide heat and hot water to all tenants. Technically they are allowed to itemize this as a recurring surcharge on top of the rent, but in practice I have never seen this done.

Electricity is not included in most modern buildings, though it sometimes is for older buildings which cannot separate the meters per unit easily.

comment 12y ago · link · parent

> In Go, you can branch on types at runtime, so in a hypothetical generic Go, you could write something which appears to only ever return its argument, but does something special if the argument is of a particular type

I'm not sure why you bring this up - nearly every language that enables reflection lets you do this, including Haskell[0].

No decidable static type system can ensure correct semantics for all use cases, including even badly written code[1].

[0] And you don't even need reflection to do this, per se; it just makes it more convenient.

[1] One could design a static type system that did, but it would be undecidable.

comment 12y ago · link · parent

> They weren't.... they just got their information about the bombings somewhere besides the NYT

Probably "other sources in addition to NYT", but yes.

Not just that, but the Boston Marathon bombings were an ongoing story - the NYT had a number of different stories that related to it.

NYT is actually not a great place to go for truly breaking news like that - except for pre-planned NYT-exclusive releases, they're almost never the first to post a story. On the other hand, they usually have more in-depth research, better analysis, and (most importantly) better fact-checking than other news sources; this is clearly a direct tradeoff.

I'm actually surprised that the Boston bombings was so high on the list. If anything, I think that speaks to the trustworthiness of the NYT as a news source, even in the online era.

comment 12y ago · link · parent

> ps. someone needs to do a mashup of his first campaign speech to end abuses, arguing against this other person

Here you go. It's rather painful to watch, as you might expect: https://www.youtube.com/watch?v=7BmdovYztH8

(FYI, I did not make this video)

comment 12y ago · link · parent

Thanks for the detailed breakdown.

I currently run Arch on my main computer (and have for the past few years), Ubuntu on a few others, and have dabbled with some other distros for fun. I'm thinking of giving Debian a shot for my main computer, though.

How would you compare unstable and/or testing to Arch (if you have any experience with it)?

comment 12y ago · link · parent

> I'm not really sure why Canonical doesn't just GPL like everyone else and leave it at that.

Because they want to be able to have the benefits of proprietary code for themselves (being able to provide their own software under a proprietary license to other parties), without allowing anybody else that same ability.

If it were under the GPL and each contributor retained their copyright over their submission (as is the case with the Linux codebase), this wouldn't be an issue. But by having complete ownership over all the code in the codebase, Canonical is free to change the license at any time they choose.

1
151152153
202