News for hackers. Stuff that matters.
Re:Companies That Use Haskell in Production by _query on Tuesday May 03, 2022 @08:59AM (#31247724)
Haskell is famous for it's quite an academic nature. But the ecosystem has drastically improved in recent years, so that that image is really outdated by now.

E.g. with Haskell Language Server we have nice autocompletion. Recently dot-notation has been added, so you can now write `someValue.someField` as in other languages. And the documentation is improving as well.

If you're doing web development, a good starting point is IHP (https://ihp.digitallyinduced.com/ https://github.com/digitallyinduced/ihp). IHP is Haskell's version of Laravel/Rails/Django. It's really a superpower to have Haskell's type system combined with the rapid development approach of Rails :) (Disclaimer: I'm founder of the company that makes IHP)

Re:Companies That Use Haskell in Production by oconnore on Tuesday May 03, 2022 @03:08PM (#31252226)
I think of Haskell along with other languages that allow for shipping small, single-file binaries with a garbage collected, high level language. The straightforward alternatives I'm aware of include Nim, OCaml, Crystal, and Go.

Go is the most popular of this set, but to me seems like it barely qualifies as "high level". On Tiobe, the next most popular language from this set after Go is Haskell.

I like Haskell just fine, but what I really care about is "a more high level GC'd language than Go that ships binaries".

Re:Companies That Use Haskell in Production by leonidasv on Tuesday May 03, 2022 @04:30PM (#31253192)
Why do you think Go "barely qualifies as high level"?
Re:Companies That Use Haskell in Production by oconnore on Tuesday May 03, 2022 @09:00PM (#31255591)
I think it's trying to stay fairly close to C, with additional features selected judiciously. Systems programming was identified as an important design goal (e.g. having close control of memory layout).

See also: https://en.wikipedia.org/wiki/Go_(programming_language)#Omis...

Re:Companies That Use Haskell in Production by philjohn on Tuesday May 03, 2022 @06:10PM (#31254258)
I work for one of the companies on the list, and touch Haskell every now and then on the job - maybe it's because I worked with quite a few functional languages when I studied for my degree (Artificial Intelligence, started in 1998), but I really really enjoy it.
Re:Companies That Use Haskell in Production by schwartzworld on Tuesday May 03, 2022 @09:50AM (#31248290)
IHP looks amazing! I think I'm going to have to give it a go for my next project. Is it being used in production anywhere besides your company?
Re:Companies That Use Haskell in Production by montmorency88 on Tuesday May 03, 2022 @10:19AM (#31248621)
Hey, at Comhlan Ltd. we have a few projects in production built with IHP. The largest public facing one is a visitor booking system for an irish regional hospital group we've had out since January. Happy to answer any questions but short answer is GHC+nix+IHP has made for a really robust development/deployment experience. (Disclaimer: I'm founder of Comhlan and we are a IHP platinum partner as well).
Re:Companies That Use Haskell in Production by agumonkey on Tuesday May 03, 2022 @04:25PM (#31253134)
This is worth a 2h talk :)
Re:Companies That Use Haskell in Production by chrsig on Tuesday May 03, 2022 @02:45PM (#31251935)
Interesting, I hadn't heard it adopted a dot notation. Does this mean you can have different records with the same field names now?
Re:Companies That Use Haskell in Production by rowanG077 on Tuesday May 03, 2022 @03:44PM (#31252618)
You can already have different records with the same field with the "DuplicateRecordsFields" extension: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/dupl...

What is meant here is that instead of writing `fieldName record` you can write `record.fieldName` mirroring imperative language.

Re:Companies That Use Haskell in Production by grumpyprole on Tuesday May 03, 2022 @09:39AM (#31248156)
Security must be big selling point versus these other solutions?
Re:Companies That Use Haskell in Production by whateveracct on Tuesday May 03, 2022 @09:46AM (#31248238)
Security in Haskell isn't especially better than any other general purpose language. You do have a lot more tools to help though. For instance, you can make your web app fail to compile if you accidentally try to serialize sensitive information to JSON or plaintext. GHC will tell you exactly where you almost had a data leak.
Re:Companies That Use Haskell in Production by bcrosby95 on Tuesday May 03, 2022 @11:52AM (#31249807)
It's actually a bit harder than you're implying, because any request coming to the server could have sensitive information in it.

But, yes, wrapping your data helps solve some of the problem in any language. For instance, in Java we hold passwords from requests with a Password class rather than with a String class, whose .toString will return "xx" rather than the actual password.

Re:Companies That Use Haskell in Production by grumpyprole on Tuesday May 03, 2022 @12:49PM (#31250508)
I was asking about IHP specifically. Yes Haskell is just a tool and one could simply build PHP with it.
Re:Companies That Use Haskell in Production by pizza on Tuesday May 03, 2022 @11:58AM (#31249888)
I'll play devil's advocate with the hope that it facilitates a response by someone who understands the topic far better than me: what is security?
Re:Companies That Use Haskell in Production by icrbow on Thursday May 05, 2022 @02:42PM (#31277018)
Security is resilience with respect to your threat model. The usual security objectives are confidentiality, integrity, and availability.

Nothing is "secure" forever and ever. For each objective you need to state some assumptions that are required to uphold it.

Haskell allows you to express more assumptions in code, not just comments, to be enforced at compile time. And with some careful handling Haskell types provide a solid foundation without going into full deductive verification mode.

Re:Companies That Use Haskell in Production by grumpyprole on Tuesday May 03, 2022 @12:47PM (#31250481)
One example of security is not munging strings together and shipping it off to the database or some other "eval" with full privileges. A programming language with lightweight static types makes it easier to parse outside data into a typed representation, then transform/evaluate/compile as necessary. This is of course Haskell's bread and butter.
Re:Companies That Use Haskell in Production by dustingetz on Tuesday May 03, 2022 @01:32PM (#31251039)
So, how do I get a sane Haskell editor environment on MacOS?
Re:Companies That Use Haskell in Production by cosmic_quanta on Tuesday May 03, 2022 @01:39PM (#31251133)
Your best bet is probably to use VSCode + Haskell plugin, version 2.0+ (which handles the installation of everything via GHCup, I believe), barring any macOS-specific problems I don't know about.

That's the setup I use on Windows and Linux, and it's great

Re:Companies That Use Haskell in Production by _query on Tuesday May 03, 2022 @01:50PM (#31251255)
Check out this video on how to use VSCode with IHP https://www.youtube.com/watch?v=_8_8XYO6rgY