8 ms·
I worked on this project for a week during the FB team matching process. I had previous Haskell experience, but what struck me was how irrelevant that was. To
by koala_man 2y ago
I worked on this project for a week during the FB team matching process.
I had previous Haskell experience, but what struck me was how irrelevant that was.
To their immense credit, they had managed to use Haskell to write an entirely entreprise focused, "boring" business rule backend serving millions of QPS, and people who were not Haskell fans could easily use its sensible DSL to accomplish their goals.
Way too many Haskell projects are about Haskell itself, so this was really fascinating to see.
- siltcakes 2y agoEvery time I try to work on someone's Haskell code, I'm confronted with a slew of custom infix operators, and I find my previous experience is completely irrelevant as I learn the new DSL the authors chose to write (which more often than not also involves flexing their brain as hard as they can).
- plagiarist 2y agoI'm sure it is super cool and immediately comprehensible for an independent project. I'm actually really fascinated by programming languages like APL that take it even further, I'd like to try some of those out but I don't have a great fit for a project to use with them. But all I can think of when I see custom operators professionally is how much of a nightmare it would be the second one has to onboard a junior developer onto the project.
- siltcakes 2y agoIt's super cool, but I'm not sure immediately comprehensible. I can't even read my own Haskell code after a few months away from it. You end up using other people's infix operators from the libraries and it's easy to forget what they are.
- ahefner 2y agoBut that's like half of computing.. every new tool the world inflicts on you, configured in Jojo's Awesome Configuration Language, with some arbitrary made up grammar punctuated by Tourette outbursts of special character line-noise. That, or YAML, then a tool to template and generate the YAML, and then a stack of tools wrapped around that, ad infinitum. A little learning is the cost of not having to write the thing yourself. On the other hand, hell is the non-composable tower of babel that is computing. Total employment by exponentially compounding incidental complexity.
- siltcakes 2y agoI think it's a sliding scale and Haskell is definitely on the extreme end.
- lmm 2y agoThe fact that people do it in the ordinary language, so you can click through to the operator definition and see immediately what it does, makes it a lot less taxing IMO. Even if the code is quite complex, figuring out what an actual function does is 10x easier than doing the same with a magic annotation, which is what you have to do in that situation in most other languages.
- fredrikholm 2y agoIt's one of many reasons I love Go. The amount of arbitrary glue, configuration and "cool things" I need to learn-and-forget for every new project is an order of magnitude less than any other language I've used in anger.
- emodendroket 2y agoI don't know that I really exactly like working with Go but I do have to hand it to them, they did nail this aspect of it.
- jokethrowaway 2y agoI don't see how that is language specific. I think it's entirely based on the project size. Pick up docker or kubernetes and you'll have to learn plenty of stuff. Pick up ory/hydra to do auth in go, same thing. Check out the age (from FiloSottile) or the rage (Rust port) codebase and they require similar level of understanding.
- foobarian 2y agoRight, now imagine the templated YAML mess implemented in Haskell together with the app. By someone smart enough to liberally use Haskell's most complicated features
- tome 2y agoThat's interesting, because Haskell is the only language in which I can easily read code written by others (and in "others" I include "myself three years ago").
- jokethrowaway 2y agoSame! Well, Rust fits the bill too. Generally, any language with a type system advanced enough.
- nextos 2y agoHaskell could be a great practical language if some constraints were introduced, e.g. limiting the language extensions used. https://www.simplehaskell.org https://www.simplehaskell.org attempted to do this and, currently, https://neohaskell.org https://neohaskell.org is going in the same direction. After all, Haskell '98 is not that hard. Personally, I think Haskell, or something like Haskell, is going to be reasonably popular in the near future. Functional programming and an expressive type system are great for ML-powered synthesis. You provide the type signature, and the machine fills in the function body. Furthermore, with dependent or refinement types, the solution can be verified to be correct.
- BoingBoomTschak 2y agoMaybe I'm completely wrong (as an outside than never touched anything ML other than OCaml), but Idris 2 does seem like a "clean Haskell" minus the laziness.
- 7thaccount 2y agoI'm not fully convinced. FP is such a different paradigm than the leading imperative/OO design that most are comfortable with. Other languages that are too different like lisp, forth, Apl, Haskell, and Prolog are just too different for the average person IMO. I've given Haskell/OCaml/F# a go a few times and enjoy learning new paradigms and it certainly didn't click for me. I have a feeling it'll be even harder with more normal people not into this as a hobby. Here is how to read a text file in Haskell (I assume a standard way): https://stackoverflow.com/questions/7867723/haskell-file-reading https://stackoverflow.com/questions/7867723/haskell-file-rea... From a Python tutorial: https://www.pythontutorial.net/python-basics/python-read-text-file/ https://www.pythontutorial.net/python-basics/python-read-tex... I could be biased, but it certainly seems like Python has a lot less conceptual hurdles here. You basically specify a filepath and then for loop through each line and print. The Haskell solution requires more steps and theory. I know Haskell is a very awesome and cool language and super powerful for all kinds of uses that Python may be inferior at (example compilers). You'll get no argument there. I'm just pointing out that I think wide adoption may be difficult. I drank the koolaid and read dozens of blog posts and a couple of Haskell books and really wanted to make it work. I'm an engineer and like math and puzzles and learning new programming languages...and yet I couldn't make it that far (without sinking a whole lot more time into it than I had) and ultimately gave up.
- kilpikaarna 2y ago> Way too many Haskell projects are about Haskell itself, so this was really fascinating to see. It seems like Haskell is a good match for the requirements in this case, too. Implicit concurrency and enough robustness from the type system that new filters can be deployed directly to production plays to the strengths of the language. It doesn't feel like the usual solution in search of a problem.