Better HN
topnewbestaskshowjobs
Log inSign up

papsosouid

2,420 karma · joined Apr 9, 2012 (14y ago) · 1,199 submissions

Submissions

comment 13y ago · link · parent

I write haskell code all day. I spend my day writing it at work (with occasional HN breaks obviously) and then I go home and write personal projects in it. I advocate haskell on a semi-regular basis. I certainly fall on the pro-haskell side of things. But GHC absolutely does not meet all those bullet points.

Compiler speed is not some minor difference, it is absolutely massive. Build times of 30 seconds vs 2 seconds, and that is without counting the 10 seconds of cabal resolving dependencies.

>Go comes with a complete set of documentation available from the command line

GHC does not come with command line docs.

>All Go code is statically compiled so deployment is trivial

GHC links in C libs dynamically, and as far as I can figure there is no way to get static linking working, so I have to have all the same C libs installed on my production servers as my build server. With go you can just upload your binary to a bare bones server and it works.

>but it also has a tool to clean up code: gofmt

GHC has nothing like this.

>And there's also go fix which can automatically convert Go code designed for earlier versions to newer versions

Or this.

Haskell is a great language, but it does not match go's toolchain.

comment 13y ago · link · parent

>custom fonts shouldn't be used for body copy?

No.

>Shouldn't technology be bending to our will? Not our will to technology?

It has nothing to do with technology, it is about user experience. Pushing a crappy font on me because you think it is pretty does two things. It makes you feel good about yourself, and makes it harder for me to read your site. This is the same narcissistic designer syndrome that gave use flash intros back in the day.

comment 13y ago · link · parent

No, 2 is never necessary. You can set yourself apart with design just fine. The text, actual information people are trying to retrieve, is not part of the design. Specifying a font for the ordinary text is a perfect example of designers prioritizing self-obsessed wankery over the user.

comment 13y ago · link · parent

>are very important in sociology

No, they are very important to sociologists who also happen to be into women's studies. Pretending all sociologists go along with that is dishonest.

>and were coined in large part by sociologists looking for a way to describe social phenomenon that they'd observed.

No they were not, see the rest of the thread.

>but when sociologists and academics use them

Which is relevant to lay-persons using them here on this forum and then being told they are wrong when they are not wrong?

>I'm sad to see that steveklabnik has been downvoted so much on this board for saying something that is so very correct.

I suspect the downvotes were more due to the way he told people their correct use of a term is incorrect, simply because there is a second correct use of that term.

comment 13y ago · link · parent

>In the case of "sexism", when we are talking about it here we are usually talking about it from within the disciplines that actually deal with it

No, we are not. That is the entire point. We are not in a women's studies department. We are not women's studies majors. We are not talking about women's studies. So the terminology of women's studies is not relevant.

>Within all of these fields, sexism is a technical term that means (with slight variations between fields) exactly what steveklabnik above summarised it as.

No, it is not. History and philosophy do not use sexism that way. Only a minority of sociologists do. The only example you listed that is actually correct is women's studies.

comment 13y ago · link · parent

If we were astronomers, you would have a point. This is not a women's studies department, we're not discussing women's studies. We're non-experts, discussing ordinary daily life. The field specific meanings are not appropriate, and telling people who use the general definition they are wrong is not constructive. Please stop accusing people of being a troll for no reason. It is also not constructive.

comment 13y ago · link · parent

>Did you even read that post?

Yes. I even understood it, which appears to be what's bothering you. The quotes you refer to, once again, does not support the claim. The statement "sexism has been used to do X" does not mean "the definition of sexism is X". Paint has been used to cover walls. That does not mean the definition of paint is "stuff that covers walls".

comment 13y ago · link · parent

Your link does not support the idea that the term sexism means what the poster claimed it means. In fact, it contradicts it:

>Sexism is judging people by their sex when sex doesn’t matter

comment 13y ago · link · parent

There is no branch of science which defines the words that way. And even if there were, rejecting a redefinition of a common word is not rejecting an entire branch of science. If everyone involved in astronomy suddenly decided the word large only applies to things greater in size than the sun, people continuing to use large to refer to their soda would not be rejecting astronomy as a consequence.

Also, you appear to be deliberately misrepresenting a small subset of sociologists as being representative of the entire field. That redefinition of sexism isn't even universally accepted in women's studies and feminism, much less sociology. It is in fact a clique that uses those terms that way, not a branch of science.

comment 13y ago · link · parent

Sorry to single you out for this question, but you're the first person I've seen who actually has one. Does the unified inbox thing support RSS? The concept seems great, but without RSS support it isn't that useful to me.

comment 13y ago · link · parent

Yes, we understand that you wish to redefine words to make them more suitable to you. It is not ignorance of your dialect, it is a rejection of it. Those words already have meanings in English, and people are not wrong for continuing to use those meanings. You are welcome to use whatever meaning you wish, but saying "my clique uses a totally different meaning for those words, so you are wrong now" is not a constructive activity.

comment 13y ago · link · parent

>These are the kind of interviewers that keep asking technical questions until they find something you don't know

Don't make the mistake of assuming that asking harder and harder questions must mean I am trying to deflate your ego. I am trying to hire people who are smarter than me, and know more than me, and can bring something I am lacking to the team. I need to ask harder and harder questions to find those people.

comment 13y ago · link · parent

>You can get the best of both worlds by making it so that your user (has to?) also set a password when they finish logging in via facebook the first time.

Then why are they bothering to sign in with facebook at all? It is now a more involved process than simply signing up with email/password, which is what facebook logins are supposed to be for avoiding.

comment 13y ago · link · parent

>But it's also the price you pay if you want to tap into their user base. So it is what it is.

It is? The facebook userbase is entirely and completely unwilling to sign up with a password? Putting a facebook login button on your site doesn't tap into facebook's userbase. If you want to try to tap into their userbase, you need actual integration with facebook, which can be done even though you had them sign up using a password. That way they can still use your site when facebook fucks up, and only the "automatically spam my friends" stuff stops working.

comment 13y ago · link · parent

You feel that you would have been better off hearing that, but you're also forgetting that some people will feel the exact opposite. I also spent my late teenage years playing video games. I do not regret it at all, and I have tons of great memories of that time in my life. If I were to give younger me advice it would be to relax and enjoy yourself while you don't have bigger things to worry about.

comment 13y ago · link · parent

>But the current 'fad' is exactly what you're talking about: flat, minimalist, getting out of the way?

I only see that for the online version of a brochure. "This is us, buy our thing". There can't really be much of a user interface for those, since there's not much to do, and currently they are all identical ugly bootstrap things with obnoxious javascript scrolling instead of pages.

But actual web apps, where there has to be a user interface to let you interact with things I see mostly a "throw everything on there and who cares if it is usable" approach.

comment 13y ago · link · parent

I'm amazed to see people still doing browser detection (hint: other browsers actually do have the features you need, you just didn't think to put them in your list), and worse yet still outright blocking you when they mistakenly think your browser won't work. "We haven't tested your browser, continue at your own risk" is fine, "we won't let you look at this because we don't know your browser exists" isn't.

comment 13y ago · link · parent

>UI that gets out the way.

This is the biggest problem with the current fad in web design. Designers are designing for their own sense of "look what I can do" instead of for users. People need to stop designing UIs for the sake of seeing how much crap they can stuff in front of my face and start designing UIs to be used.

comment 13y ago · link · parent

None of that explains why you need erlang. Any language can do message passing. The whole point is that we should be expecting these capabilities from every language, rather than pretending using an event loop is in any way reasonable.

comment 13y ago · link · parent

>In a very high concurrency environment with OS based threads it is not always the case.

We're talking about green threads, remember?

>Async or green threads have a smaller overhead of switching, but any CPU based concurrency is usually missing

The point is that async and green threads are the same thing, just one has a better interface. Of course they both have the same downside.

comment 13y ago · link · parent

I don't understand the problem you're describing. If you're waiting on some external resource then you've yielded to another "thread" in either an event loop or green thread style. Are you suggesting partially modifying some state, then waiting on an external resource before finishing modifying the state? And no other "threads" can touch the state in the mean time? That is going to be a bad thing to do no matter what style you use.

comment 13y ago · link · parent

That link is a good example of exactly why we need to push for languages to take concurrency seriously. That's an example of how a haskell user has to deal with the issue when interfacing with a C lib that rolled their own event loop. For most languages people have to deal with that issue all the time, for their own code, entirely in that one language.

I have no idea why you are talking about pixie dust. My point was that explicitly using event loops instead of abstracting it into a green thread library is dumb, and we need to start having higher expectations from languages rather than accepting backwards shit like node. Not "green threads are magic".

comment 13y ago · link · parent

>Doesn't this make it harder to reason about cases where multiple userland threads need to mutate the same state?

Most languages make it very hard to reason about state in general. Haskell provides STM, so ensuring correct access to shared state is as simple as using an MVar. I absolutely agree that this is an important part of languages making concurrency a priority, they can't just add green threads and pretend that is good enough.

comment 13y ago · link · parent

I am not blocking or using event loops, that's the point. When I call read on a socket, the IO manager handles saving my context, doing the async read, yielding, and then restoring context and resuming when there's data to be read. The entire point is that green threads are equivalent to event loops, but taking advantage of abstraction to move the complexity away from the thousands of individual programmers, and onto the language authors.

comment 13y ago · link · parent

>Are you using a framework, or developing one?

No.

>Who gets to choose the concurrency strategy?

The person writing code?

>Clients are the clients of the API I'm talking about, which is a hypothetical "lightweight thread" based API where everything just works as per original post.

In that context, I am the client. Here's how it works:

    forkIO myFunction
That's it. Very simple, scales to millions of "threads", and if compiled with -threaded, those millions of "threads" are spread over a set of OS threads so I also get parallelism.

>The really cynical part of my mind is going "please tell me about this magical solution to integrating different event loops and concurrency models" and the less cynical part is open to your suggestions.

The key is just in the "demanding better from languages" part. You don't have to worry about a dozen incompatible green thread libraries if it is built into the language.

comment 13y ago · link · parent

>Yup. If I have an event driven program can I use another library that is not built on the same event driven framework?

This is why my original post suggested that people need to start demanding better of their languages. This is a total non-issue in haskell because the "event driven framework" (that's really over-stating it, they are just relatively simple libs) is part of the language runtime. So everything uses it. I get concurrency and parallelism with the scalability of an event loop just by doing:

    forkIO myFunction

comment 13y ago · link · parent

Paying for it how? You get a simple model to work with and reason about, and the performance of an async event loop. Where does the problem arise?

comment 13y ago · link · parent

>Performance.

Is identical.

>And the best solution was a solution based on a select/epoll/kpoll loop

But the underlying mechanism does not need to dictate what interface is exposed to be used.

>And it turns out that in most practical application userland threading is actually built on an asynchronous IO select-like call.

That is precisely the point. Presenting it as though the only options are "use native threads" and "use callbacks and event loops" is the myth. Use userland threads, you get the same performance and scalability as an event driven style, as it uses the exact same async calls under the hood, but you get a programming style that is readable and maintainable.

Using an event loop is like rolling your own while loop out of setjmp/longjmp. Yes, the underlying mechanism of a loop is the same, but abstraction is pretty nice.

>For that you need Erlang

Why?

comment 13y ago · link · parent

>In practical terms what happens is that your clients need to have a real good mental model of what will block and what won't.

I don't understand. Who are "clients" in this context? You need to know what calls will block and what calls won't regardless of style (event vs thread) unless you are using OS threads or processes.

>Threading sucks.

Why?

>Which ones do you think are good?

The one that comes with ghc.

comment 13y ago · link · parent

>Don't you trade for a different type of complexity in yield/resume?

That depends on the library in question. Generally the event/callback style code people are writing are only "yielding" at calls to the non-blocking version of otherwise blocking functions, like read type functions, or accept. Most userland threading libs I've seen make the assumption that you want that, and so you don't need to yield yourself. If you did want that level of control, it is still simpler than the event style of achieving the same result.

>Also you will lost some of the scalability advantages because you have to store context for all of the idle fibers.

The overhead is small, especially if you know you don't need much stack and set the thread stack size lower.

1
212223
40