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

The full set of PCREs, as the author points out, are NP-complete. The problem is, just because you can do something doesn't mean you should.

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

Verizon has been trying to persuade me off their unlimited 4G data plan for ages now (I'm grandfathered in). Little do they realize that, as soon as they remove the one incentive I have to stick with Verizon, I'm ditching them for an open carrier.

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

With all due respect, even if the rhetoric is a bit hyperbolic, redwood's point is still valid. Winning major legislative and court victories against telecom, for example, makes no difference if consumers are willing (or forced) to negotiate their way into even worse positions than before as technological and market forces render cable/broadband and wireless providers the true behemoths of the modern market.

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

Is there a build for this that doesn't require CoreAudio?

I would love to run this on Linux - yet one more thing I can do straight from my terminal.

comment 13y ago · link · parent

Is that even possible? No matter which way I've tried mapping the keys on OS X, something just can't be placed in the right spot on the keyboard - mostly because many uses of CTRL are placed on the equivalent of Mod-4 (the Command key).

Unless you're just trying to simulate an Apple keyboard configuration on Linux, that is.

comment 13y ago · link · parent

This is the number one reason I've kept my .vimrc to 11 lines. Anything else I've tried adding - particularly in the way of plugins - has only caused me annoyances when working other machines.

comment 13y ago · link · parent

> No, instead, they advise all new users that they should force themselves.

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

The piano/keyboard isn't my main instrument, but I'm not sure that the color of the keys would make a huge difference. Practiced/professional violinists, for example, don't use sight to figure out how to place their fingers, and pianists don't even have to worry about tuning the way violinists do.

comment 13y ago · link · parent

Or better yet, do what Python does. Require a constant in front of the 'i', even if it's only '1'. Since identifiers can't begin with a numeral, there's no way to shadow a valid use of a complex number this way.

comment 13y ago · link · parent

> if you doubt that, try coming up with some examples of operations you can perform on a value without knowing something about the type of that value.

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

Who's knocking anything or looking to abolish anything?

Being aware of the limitations and biases of one's own paradigm and cognizant of the fact that it's an artificial construction is different from declaring that it has no value.

comment 13y ago · link · parent

> This view isn't inspired by Euro-centrism, but by the idea that China is an indivisible nation while Europe clearly is not.

Euro-centrism isn't the culprit here; it's the fixation on the arbitrary concept of the nation-state that's responsible.

comment 13y ago · link · parent

> I really must pester her to finish editing and get it published.

Yes, you do, because I want to read it, and I know several others who would too.

comment 13y ago · link · parent

What, you mean "issue 9" isn't a catchy enough name?

comment 13y ago · link · parent

> You are asking a lot of the slide authors to minor facilitate secondary usage at the expense of primary usage.

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

> The banks operate on the assumption that their user's machines will be compromised and have undertaken plenty of steps to manage their risk e.g. two factor auth, transfer limits etc.

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

You can test it out yourself: http://docs.racket-lang.org/ts-guide/

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

Typed Racket[1] has the advantage of being completely inter-operable with dynamically typed Racket - I can (and have) imported dynamically typed modules and used them in (statically) typed modules, as well as imported (statically) typed modules and used them in dynamically typed ones.

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.

[1] http://docs.racket-lang.org/ts-guide/

comment 13y ago · link · parent

I got one - they may just be sending them out in batches.

comment 13y ago · link · parent

> Any programmer who thinks that they should have any right to have "their own time" and "side projects" should leave for a more friendly state. Like California.

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

No, I've just been on the Internet long enough to know that I have better ways of spending my time than trying to hold a debate with a person who calls me an idiot.

comment 13y ago · link · parent

> Hur, indie programmer humor.

> People who think that are idiots.

> Kids these days.

I try my best to keep the level of Hacker News discourse high, but your response is incredibly rude.

comment 13y ago · link · parent

> The Manifesto was from an era when the hardware you owned was practically a useless toy,

I'd argue that's what we're moving towards.

comment 13y ago · link · parent

You're not exaggerating: http://web.mit.edu/~sdavies/www/mit-suicides/

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

> Fully statically typed languages put these concerns right in your face and make you think about them.

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

I'm confused - this link seems to be for a petition that's several months old, already past the deadline, and already reached the threshold number of signatures?

And more confusingly, there's no response to it either. Am I missing something?

comment 13y ago · link · parent

> he probably wouldn't have wanted us to deal with the trivialities of copyright law at the expense of a good cause.

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

Someone on Reddit explained this better than I can, but JSTOR is basically a scam. It pockets the money that it receives and doesn't pay anything back to the authors. As an author, you yourself have to pay for access to your own work (or your university does, via a subscription).

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.

1
170171172
202