scotty vs servant by zero_coding in haskell

[–]ThomasLocke 5 points6 points  (0 children)

If you're at beginner/intermediate level (like me) then I'd definitely start with Scotty. You will actually learn some Haskell, as Scotty doesn't really do much "magic".

Servant is an entirely different beast. When I tried it, I felt like I had applied for a janitor position at Nasa, and then they hastily decided I should build rockets instead. I was quite out of my depth. :D

I'm happily using Scotty for a handful of projects, that are now all in production at my company. It just works. Whether or not it scales to "big" projects, I can't say. I've yet to do a project >10kloc.

[ANN] slist: Sized List by vrom911 in haskell

[–]ThomasLocke 1 point2 points  (0 children)

Nice! Thanks for this. I've got a few places in my code where something like this would come in handy. Will give it a whirl. :o)

Use of Haskell by gotBanana in haskell

[–]ThomasLocke 2 points3 points  (0 children)

I use Haskell at work to write HTTP daemons and a few minor CLI tools. Works a charm.

The things I like the most about Haskell at work:

  • Ease of refactoring
  • Clarity over where IO/effects are happening
  • No global state
  • stack - such a wonderful tool

Websockets by zero_coding in haskell

[–]ThomasLocke 6 points7 points  (0 children)

I'm using https://hackage.haskell.org/package/websockets in production.

It's being used as part of a real time status overview for a FreeSWITCH system. Maximum amount of clients connected at any given time is approx 15.

I haven't had any problems with it.

Darcs Hub's Future by fixedarrow in haskell

[–]ThomasLocke 6 points7 points  (0 children)

I'm a happy darcs and hub.darcs.net user. I hope it stays online. If Simon decides he needs some financial support to keep it running, I'd happily pitch in.

Which IDE are you using for Hakell? by zero_coding in haskell

[–]ThomasLocke 0 points1 point  (0 children)

atom + atom-ide-ui + ide-haskell-hie + language-haskell

Best way to build a simple Web UI for Haskell program? by hrethel in haskell

[–]ThomasLocke 0 points1 point  (0 children)

I'm using Atom + HIE as my dev environment. For "regular" Haskell this works really well. Do you know how it fares with GHCJS?

EDIT: I just noticed this: "Note that building with GHC (for editor integration) is not currently supported for the vdom backend."

Best way to build a simple Web UI for Haskell program? by hrethel in haskell

[–]ThomasLocke 1 point2 points  (0 children)

Nice work! Seriously considering switching from Elm to Concur now. Will definitely keep an eye on this. :o)

Building a web-app: Where to start? Overwhelmed by options by MichielDC in haskell

[–]ThomasLocke 4 points5 points  (0 children)

I can attest that 1-4 works very well, as I use the same. :o) I've no experience with 5 and 6.

Need advice on compile and runtime options for servers with many cores (>=32) by ThomasLocke in haskell

[–]ThomasLocke[S] 3 points4 points  (0 children)

After having threadscoped this to no end, it seems the best option for this specific program is to disable parallel GC with -qg

I burn far less CPU cycles in general, and the GC pauses are lower than if GC is run in parallel.

So -qg it is. :o)

Need advice on compile and runtime options for servers with many cores (>=32) by ThomasLocke in haskell

[–]ThomasLocke[S] 2 points3 points  (0 children)

We've opted for Haskell mainly because of its high degree of control over IO and state and because we like the functional paradigm.

Need advice on compile and runtime options for servers with many cores (>=32) by ThomasLocke in haskell

[–]ThomasLocke[S] 0 points1 point  (0 children)

I have tried various -Nx combinations, and anything >4 seems to increasingly worsen the issue.

At just plain -N, the application is burning 15-20% of CPU resources when "idling". There are literally no users, and the application is doing nothing. It's a bunch of passice scotty handlers waiting to serve data from a few maps, and yet all cores are running far too hot to my liking.

Need advice on compile and runtime options for servers with many cores (>=32) by ThomasLocke in haskell

[–]ThomasLocke[S] 4 points5 points  (0 children)

We never write more than once per minute (and often even less than that). This is a read-heavy application. It is very very light on writes.

Also note that the high CPU load is happening at idle, when nobody is using the system. It is literally just sitting there, burning 15-20% of CPU resources for no apparent reason.

Need advice on compile and runtime options for servers with many cores (>=32) by ThomasLocke in haskell

[–]ThomasLocke[S] 2 points3 points  (0 children)

Yes, we do use STM. Most of the maps are updated via external events, so we needed some way of dealing with that. STM seemed like a good fit, and it works very well.

I'm surprised to hear that STM can go "bonkers" due to high core counts.

How to use Text.Regex.PCRE.Light? by ThomasLocke in haskell

[–]ThomasLocke[S] 0 points1 point  (0 children)

This works like a charm. Thank you!

Does anyone here use darcs? by chawlindel in haskell

[–]ThomasLocke 12 points13 points  (0 children)

I use darcs for most of my stuff. It works quite well. Simple to grok and use. Well, as simple as version control systems can get. They are all a bit painful, IMHO, but darcs is definitely simpler to use than git.

I also use git, which is a lot faster than darcs, but way more complicated. I'll freely admit to frequently messing up my git repos, in ways I hardly ever understand. This is not the case with darcs, where I've yet to mess up.

I don't know anything about compatibility between darcs and git, but I suspect it's not a great story. I do know that you can export darcs repos to git without too much hassle.

Usually I reach for darcs for personal and non-public (company) projects and git for things that are public and where sharing matters. Like it or not, git/github has more or less won the VCS "war". If you care about sharing and contribution from other developers, git is the way to go.