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

Yes, and I wish I could remember why it didn't work, but this was several months ago.

If that's becoming standardized, the way pip/virtualenv are becoming a standard part of Python 3, that's good news. Maybe this problem is already on its way to being solved - let's hope so!

comment 13y ago · link · parent

I haven't written any Haskell code seriously in almost a year, so I may be fuzzy on the details with the following:

> Likewise, when you have concrete problems, have you asked for help on #haskell irc or the Haskell-Cafe mailing list?

Yes, and I will say that the Haskell community is one of the most friendly language communities in my experience. I was very impressed with the attitude on #haskell, and I wish other development communities were more like it.

That said, I don't think these problems should be happening in the first place (or at least as often). For contrast, a Python package that is correctly developed inside a virtualenv with a proper requirements.txt should be easily installable via pip on any POSIX machine[1]. Haskell's language design is much more strict that Python's, so it surprises me that something like virthualenv[1] is only in alpha rather than the standard approach.

If I remember correctly, my problem was that I wanted to use Snap for my application, but Snap would only compile with an older version of the same HTTP client library that was also needed for some other API library that I needed to use. Maybe there's so

A (separate) problem that makes these hard to debug is the way that Haskell modules (and their documentation) are organized. The documentation is highly focused around types, which makes sense, but this causes problems if you (A) aren't sure how to use the relevant constructors, or (B) aren't sure which module provides those types.

My favorite error message was something along the lines of "Data.Text.Lazy expected but found Data.Text.Internal.Lazy". Since I had at the time imported neither Data.Text nor Data.Lazy, I was left to figure out which module relied on those packages, and then which module I needed to import in order to construct the types that this module needed. This is a problem when the package names and the import paths are sufficiently different - maybe not to a veteran, but certainly to a newcomer.

By contrast, certain languages have very strong cultures of documentation-by-example. Go and Python would be two easy examples. It's incredibly helpful when most packages provide a minimum of one single, straightforward example of how to use the package. It makes it much easier

(As for the namespace issues, I really like the Go approach to this: the import path is just the same URL that is used for installing - ie, 'import "github.com/jbarham/go-cdb"'.)

> People: hand wavy complaints that do not give concrete examples are hard to fix.

It's hard to get much more specific when I'm not actively trying to solve the problem (anymore); I can't readily recreate error messages from several months ago.

[1] The possible exception being issues with compiling C extensions, but that's not even the biggest issue I've found with Haskell. And yes, I know it's taken Python 20 years to reach this state, but now other languages are starting to follow in its footsteps - look at npm, for example.

[2] http://hackage.haskell.org/package/virthualenv

comment 13y ago · link · parent

> The ultimate problem is that people insist on rolling their own sucky versions of build systems and package managers. (Though cabal and ghc --make suck less than most, I'll admit).

Cabal is probably the #1 thing keeping me from writing more Haskell code. I've had so many issues with conflicting versions of various libraries being required, and incredibly cryptic error messages upon failure.

Which is sad, because Haskell otherwise seems rather attractive.

It's also ironic, because I would have imagined that a package manager for a purely functional programming language would be a bit more robust[1].

http://nixos.org/

comment 13y ago · link · parent

> They will soon start school again and things will return to normal.

Except when they don't[1].

> . A terrible meme, but I wouldn't want people to misunderstand and think reddit has become a cesspool of hate.

The language originates from 4chan, where it is also used ironically. I get rather annoyed when I hear people dismiss 4chan as homophobic, because under the surface, it's actually not. Then again, if Reddit is starting to mimic 4chan in terms of its language and linguistic memes, either 4chan's reputation is ill-deserved, or Reddit's reputation will start to resemble 4chan's.

[1] https://en.wikipedia.org/wiki/Eternal_september

comment 13y ago · link · parent

I'm sorry, what does that have to do with their value as a news organization?

Furthermore, Jill Abramson is a far more relevant figure than Thompson in this context.

comment 13y ago · link · parent

> Instagram wasn't "worth $1B". It was worth $1B to Facebook

Which, (given a fixed supply of exactly 1 Instgram) means that it was worth $1B.

Whether Facebook overpaid (ie, whether they would have been better off spending part or all of that $1B elsewhere) is a completely separate question - the point is, the market valued Instagram at $1B.

comment 13y ago · link · parent

> the majority of the students who did well still had slight issues with their HTML parsing.

I'd like to hire the minority students, since it seems that they quite literally accomplished the impossible!

comment 13y ago · link · parent

> (jsdom, phantom, zombie) and proper HTML parsers in javascript

Well, for starters, if you're not using Javascript. All four tools you mentioned are Javascript-based.

comment 13y ago · link · parent

> Those aren't in the stdlib. gofmt is.

Which also means that you can count on any Go code you find online to be formatted the same way too.

It's like PEP 8, except better, because it's a lot more widely enforced.

comment 13y ago · link · parent

Slight correction

> The compiler not only checks for code that can theoretically result in a [logically correct], runnable program...

Some examples of this:

- If you try to assign to a variable that will never be read, this is a compile-time error.

- If you try to import a module that will never be used, this is a compile-time error.

- If your dependencies don't form a DAG, this is a compile-time error.

Incidentally, not only does this make runtime errors (or logical errors) much less common, it also makes Go code more readable and vastly contributes to its impressive compilation speed.

comment 13y ago · link · parent

It's exactly how I read it, and it seems others too.

It makes no sense to assert "there absolutely was an effect; we just don't know what it is". Unless you're a trader dealing in long straddles.

comment 13y ago · link · parent

I've read several places[1] that the producers and/or director of the show didn't realize that Richard Coyle (Jeff Murdoch on Coupling) wasn't Welsh until the second season of that show.

[1] http://www.tv.com/people/richard-coyle/

comment 13y ago · link · parent

> I don't have to manually turn off wi-fi or GPS for my iPhone to last about two days, why should I have to on an Android phone?

Because an Android phone doesn't assume you have unlimited data and automatically turn Wifi off periodically, thereby downloading things over the cell network.

I've gotten burned this way on the iPhone; luckily I opted for the larger data plan.

comment 13y ago · link · parent

Bingo.

If it comes with DRM, it's a rental, not a purchase, no matter how much you paid for it.

comment 13y ago · link · parent

Clojure has its selling points, but if you're learning Lisp for fun or intellectual gain, I'd definitely recommend Racket.

comment 13y ago · link · parent

> It denies the possibility that there is no effect.

"No effect" could be interpreted as the null effect, which is covered by "unknown effect".

comment 13y ago · link · parent

> Your average consumer is not going to want to have multiple devices.

Your "average consumer" already does. The point is that Android in three years will be serving an even wider range of devices and household appliances.

comment 13y ago · link · parent

> Which is exactly the same situation for android.

Not at all - the difference between any two Android devices is far less than the difference between any two potential viewers of a website.

> And android is a far smaller area so tricks like just using the center third in both directions for large screens doesn't work.

Android also has an extensive set of well-defined guidelines for layout and constructing applications - the more you rely on the core API to handle these tasks, the more portable your app will be across Android devices.

That's a lot more than can be said for browser rendering in the general case.

comment 13y ago · link · parent

> Yes, it's okay for developers to invest their own time to develop something, and try to recover their costs by selling it. And it's also ok if they decide to keep it closed source, because probably no one would bother to help. Just vote with your money.

If really nobody is interested in helping develop for it, I doubt many people would be willing to go out of their way to compile it from source to avoid paying for it too.

As you yourself demonstrate, making money off of your development and making that same project open source aren't mutually exclusive - so why not make it open source?

comment 13y ago · link · parent

> a system with many web browsers on it.

Try multiple systems (multiple operating systems), with combinatorially many possibilities for the interesections of {operating system, browser type, browser version, screen size, resolution}.

comment 13y ago · link · parent

> But because Android has more phones in the marketplace than iOS is it possibly now for developers to make Android 4.0 the minimum and still get a respected number of users?

There's no easy answer to that question because it depends on what your target use case actually is.

Remember that the goal of Android is to be a universal platform for hardware, which means that the target devices for Android are much more heterogeneous than iOS - and therefore the intended use case as well.

I use an out-of-date Android device as a portable music player and an up-to-date one as my regular phone. Even that's not that wildly different if you start imagining people running Android on their household appliances.

So, in my case, even though I technically still run Gingerbread, I'm fine with Android applications requiring 4.2+, since the only device that runs Gingerbread is essentially a single-purpose dedicated device. I imagine we'll start to see more of this behavior in the future.

comment 13y ago · link · parent

> It doesn't mean all apps follow the standard, especially those naievely ported from iOS.

Agreed. Amusingly, the only apps that I ever complain about (whether for the back button or for general styling and functionality) are the ones that are clearly half-baked ports of iOS apps.

No wonder it looks terrible and doesn't seem to work properly - you're following all the best practices for the wrong operating system!

comment 13y ago · link · parent

> no LTE

He was talking about the Galaxy Nexus, which does have LTE.

> battery life

That's a function of the functionality - I'd rather be able to synchronize my reading lists in the background and forgo a bit of the battery life. I rarely use more than half of my Galaxy Nexus's battery on a given day, so that's fine for me.

> screen quality

No idea where you're getting this from. Both screens are fine, but the Galaxy Nexus's screen size is the major difference.

comment 13y ago · link · parent

> you don't actually own the phone until such a time.

This is simply not true at all, from a legal standpoint.

You're confusing subsidy with ownership - the phone isn't rented; it's yours. You received a discount on the price at the moment of sale because you agreed to a separate (independent) contract which happens to guarantee them more money overall, but that doesn't change the fact that you own the device. If the contract gets broken due to breach of contract, you keep the phone, because it's your property - they don't take ownership of it again.

More importantly, this discussion is all completely irrelevant, because phone unlocking has nothing to do with a subsidy - almost all phones are locked, subsidy or no subsidy.

comment 13y ago · link · parent

This would only be the case if policy were linear, which it isn't.

ACA is a good example of this. I forget what the exact count when it passed in the House in March 2010 was, but Pelosi had several "backup" votes to spare. Kucinich, for example, voted against the bill in protest, but if they had known that the bill had less support, she could have counted on his vote towards passage.

Whipping votes takes resources - you don't want to use up any more favors than you have to, because that means one less favor you can call on for the next bill. It's better to call in exactly as many favors as you need to guarantee passage, and then let the rest slide so you can maintain leverage against them next time.

comment 13y ago · link · parent

My point is that there's no one format that's going to have seamless conversion with everything that various applications need, but the UNIX timestamp still makes for the best intermediary by far.

comment 13y ago · link · parent

Again, all problems that are pretty easy to solve with existing server-side build tools.

comment 13y ago · link · parent

> And of course, there's other explanations besides gerrymandering...it could be that the RNC and its financial allies spent more savvily in tight races and pulled through.

Yes, this issue is incredibly complicated to analyze - for example, in the House, contentious bills like the ACA are oftentimes passed with ~220 votes (usually ~217 defines a majority). That doesn't mean that only 220 people would have been been willing to support the bill; just that the winning party didn't need to waste any resources whipping another ten votes in excess of what was needed to secure a victory.

Just looking at the final vote tally is misleading, because if the threshold for passage were higher, it's very likely that the actual vote tallies would miraculously adjust accordingly.

comment 13y ago · link · parent

Instead of telling you about the worst one I've seen in an API implementation, I might as well just show you the code it took to turn it into a correct timestamp:

https://gist.github.com/4438567

(Yes, they gave TWO separate UNIX timestamps, neither of which corresponded to the actual time of interest).

1
172173174
202