21,186 karma · joined Oct 12, 2010 (16y ago) · 6,050 submissions
Personal site: http://www.adityamukerjee.net/
My email is pretty easy to guess from my username.
comment 13y ago · link · parent
If you ever find yourself constructing a recursively enumerable grammar (or even a CFG) using a regular expressions - whether PCREs or any other variant - you should ask yourself why you aren't using a parser generator or a proper tool for creating a compiler front-end.
I hope people don't miss the author's closing point, which is the most important part:
> But don’t forget: Just because you can, doesn’t mean that you should. Processing HTML with regular expressions is a really bad idea in some cases. In other cases it’s probably the best thing to do.
I disagree that there are cases in which it's probably the best thing to do. Most languages support XPATH/CSS selectors/etc., which are much better tools for matching arbitrary HTML patterns. I'm guilty of conjuring up a regex to scrape image links every now and then, but you should really only do that when your domain of expected input data is far more restricted than the actual CFG that you're dealing with.
comment 13y ago · link · parent
Amusingly, I'm also paying for much more data than I use - I use maybe ~200-300 MB/month, so there's no way they're losing money off of me. But then again, we've learned time and again that the data caps have nothing to do with costs....
comment 13y ago · link · parent
5104.
Andrew Parker: Spark Capital's Investment in Quantopian(thegongshow.tumblr.com ↗)
3 points · by chimeracoder · 13y ago · 1 comment
comment 13y ago · link · parent
Unless you're just trying to simulate an Apple keyboard configuration on Linux, that is.
comment 13y ago · link · parent
Because it may make you slightly slower for a week, but it makes you faster for the rest of your life.
Depending on how much time you think you'll spend in Vim for the rest of your life, that tradeoff may be very smart indeed.
Doing what seems easiest or most "natural" at first may not always be the best user interface in the long run.
comment 13y ago · link · parent
comment 13y ago · link · parent
Interestingly, the fact that this reduces the domain of possible functions significantly is specifically what lends static type systems incredible power, such as described by this author who has never run his own (deployed) Haskell libraries: http://r6.ca/blog/20120708T122219Z.html
For example, the only obvious function that goes from A -> A for all possible values of A is the identity function - and I'm struggling to think of any other non-obvious function that could do the same.
Of course, this only works with highly polymorphic functions, but that's still a huge statement.
comment 13y ago · link · parent
I'm in a desktop browser, and I find this incredibly annoying to navigate.
If that's not "primary usage" for viewing slides posted online, I don't know what is.
comment 13y ago · link · parent
I've written about this before at length, but I'll say it again here: the security practices of most major banks in the US are laughable. This applies to both online and offline banking.
comment 13y ago · link · parent
Typed Racket lets you easily migrate portions (or the entirety) of a dynamically typed codebase into an equivalent statically-typed version. You get the best of both - easy prototyping with dynamic typing, robustness and scalability of static typing, and then the flexibility of applying those choices to parts of your codebase while keeping everything completely interoperable.
comment 13y ago · link · parent
You can even turn off the static type checking while keeping the type annotations. Not to mention that the type system is incredibly powerful and expressive.
It's literally the best of both worlds.
comment 13y ago · link · parent
In New York, you can negotiate a contract to get this clause - it's quite common. The only difference is that contracts without the exemption (ie, total assignments) are considered enforceable, whereas in California, they aren't. That doesn't mean that Californian contracts don't sometimes include those clauses anyway - from a legal strategy standpoint, it's in the company's best interest to do so.
Furthermore, my understanding is that this Californian precedent is rather limited in practice, since it's easy for a company to claim that your product is related to something that the company is doing or is planning on doing (and hard to prove otherwise), and similarly easy for them to claim that you've used company resources and/or time to do the project, as people sometimes do without thinking about it. When you start picking it apart, the Californian exemption is very narrow in letter, and even more so in practice.
In short, you're definitely not missing out on anything automatically by coming to New York, because it depends on what kind of a contract you negotiate. And Californian law won't get you home free either, because there are too many other variables at play, and too many other ways for them to wiggle around the law - they just need the incentive to do so.
comment 13y ago · link · parent
Not just the number of suicides, but also the contexts (Elizabeth Shin's story is particularly chilling - that one stuck with me because I used to live with her former roommate's brother).
comment 13y ago · link · parent
That depends slightly - if your compiler uses Damas-Milner type inference, it's possible that the compiler will assign the most general type signature possible to your function, which will not prevent this type of error, as operations such as addition work on either integral or floating point numbers.
What you're really after is a strongly typed language that also has explicit type declarations (or a programmer that's reliable enough always to include them even when they are optional).
comment 13y ago · link · parent
Unfortunately, the same might be said of Martin Luther King and his "I Have a Dream" speech, which still can't be reprinted or rebroadcast in full until 2038, thanks to the greed of his estate.
It's a shame that legal technicalities can end up being so important, but the fact is that it's true.
comment 13y ago · link · parent
JSTOR has scholarly articles dating back centuries - when you consider that that information deserves to be free, and the societal cost of keeping that information and research hidden, JSTOR's mere existence is practically a crime.
CERN has been very clear in their opposition to JSTOR's practices, from what I know.