3 ms·
For what it's worth, it's extremely easy to write a fast WebSocket server in Haskell. [0] puts examples front-and-center on the Hackage page. [1] lets you eas
by nilkn 6y ago
For what it's worth, it's extremely easy to write a fast WebSocket server in Haskell.
[0] puts examples front-and-center on the Hackage page.
[1] lets you easily integrate WebSockets with other things like Warp.
[2] shows that WebSocket servers in Haskell are actually quite performant.
[0] https://hackage.haskell.org/package/websockets https://hackage.haskell.org/package/websockets
[1] https://hackage.haskell.org/package/wai-websockets https://hackage.haskell.org/package/wai-websockets
[2] https://github.com/hashrocket/websocket-shootout/blob/master/results/round-02.md https://github.com/hashrocket/websocket-shootout/blob/master...
- Silhouette 6y agoFor what it's worth, it's extremely easy to write a fast WebSocket server in Haskell. Again, that's all well and good if you already know how to do it. But to be useful for serious production work, it shouldn't take several hours of reading, including numerous side trips to dead ends, and a discussion on HN where multiple Haskell developers who apparently have a lot more experience in this area suggest a variety of different libraries that collectively might get the job done. Except that right now, we've got two libraries for dealing with the WebSockets aspect in play, not counting plumbing libraries to join them up with the other aspects, and it's not clear which would be preferable to use or why. It's worth remarking that at this point, we still haven't reached the point where I'd know how to write the simple proof of concept that I wrote in probably 20-30 minutes with Node without needing to consult anyone else. Achieving that within the Haskell ecosystem would apparently take considerable further reading, not to mention writing considerably more code if the examples we've collectively come up with so far in this discussion are as good as it gets. Just to be clear, that is a fair comparison. In both cases, I was already familiar with the language and its main tools but I had no previous experience of writing the server side of a web application using either. I don't know how much clearer I can make my point here, and I think perhaps those commenting to defend Haskell are still missing it. Even if some combination of libraries exists to do something in Haskell, that is still of very limited practical use if someone who isn't already an expert in them can't find the relevant information about what they are and how to use them. The documentation and packaging we've been talking about in this part of the discussion appear to be far from ideal, and keep in mind that even in the discussions here, we've already started from the premise that the developer recognised Yesod as the way to go when several other similarly well-known libraries are available for writing web servers in Haskell with varying capabilities and limitations. This is the same fundamental criticism that numerous people have made of the Haskell ecosystem in many different contexts, including elsewhere in today's HN discussion.
- nilkn 6y agoI'm largely sympathetic to the point that you're making. Your original claims were a little more inflammatory. This has transitioned into a discussion about the quality of documentation and tutorials, which I largely agree with.
- Silhouette 6y agoFWIW, my point was always intended to be about the big picture and not just what is technically possible for someone who is already an expert (as some of the replies seem to have interpreted it). I'm sorry if my original phrasing was insufficiently clear.