Earlier quoted context omitted.
How far can you go without monads and category theory? I was looking at Clean which developed in parallel with Haskell and uses uniqueness typing instead of IO/mutation monads. Seems like it would be less offputting for a newcomer. Clean lacks community and a package manager, I believe which makes it less attractive. The language itself seems like a sweet spot for me.
Not used Clean, but it sounds interesting. What i'd love is an imperative language where you declare what effects a method can have and the compiler enforces them. E.g. if it promises not to mutate any parameters, it can only call functions that make the same promise etc.
Why GitHub used Haskell for Semantic
141–150 of 214 posts
Re: Why GitHub used Haskell for Semantic
#142Earlier quoted context omitted.
>Similarly, the difficulty to explain Monad is Monad itself is pretty abstract and general. A Monad is just a Monoid in the Category of Endofunctors.
For the non-Haskell readers, I should point out that this is just an old joke in the Haskell community. If you want it explained, see here: https://stackoverflow.com/questions/3870088/a-monad-is-just-...
Re: Why GitHub used Haskell for Semantic
#143Earlier quoted context omitted.
You seem like someone who could answer this: why use PureScript over Elm?
I've worked in Elm a decent bit, and used PureScript a little. Elm is a very opinionated language - it's very deliberately missing some abstraction power (typeclasses), and some functions that are the bread-and-butter of every functional programmer have steadily been getting removed from the base libraries, so if you're used to Haskell, you'll find yourself falling back to duplicating code by hand a lot. Elm also mak…
Some parsing is less efficient than Haskell because Elm doesn't have 20+ years of PhDs working on it, but there is no such thing as compiler-enforced formatting. I can't think of compiler errors regarding format that are the expression of a choice, as you put it, rather than the expression of less manpower.
Likewise, `where` clauses aren't forbidden, they are simply not implemented, which, given that you can already use `let.. in`, is not especially shocking.
Re: Why GitHub used Haskell for Semantic
#144https://github.com/ndmitchell/ghcid is a great tool that does exactly the last part.
Re: Why GitHub used Haskell for Semantic
#145"Semantic" looks pretty neat. Are there are previous threads or announcements about Github's goal in developing it (i.e. services for which they plan to use it)?
[1]: https://twitter.com/rob_rix/status/1134537990095720450
[2]: https://github.blog/2017-07-26-quickly-review-changed-method...
Re: Why GitHub used Haskell for Semantic
#146Earlier quoted context omitted.
I have never read a CS paper. I do not know Category Theory. I failed high school maths. I run three business on Haskell.
Nice. Tell more?
Re: Why GitHub used Haskell for Semantic
#147Earlier quoted context omitted.
I havr never noticed immutable data structures to be more difficult to deal with. For the most part, because of monads and effects and such you can essentially write better imperative code in haskell. Im noy sure why youve decided that haskell is incapable of the syntactic appearance of mutation.
You're lucky enough if you can find a developer who knows mutable data structures outside of SF. If you want immutable ones you need to add a zero to their wage. Most shops aren't prepared for that.
Standard Chartered has been a Haskell shop for a long time. There are some others in London I think.
And both England and Scotland have many universities teach Haskell. Let alone GHC and Idris were born in Scotland.
Re: Why GitHub used Haskell for Semantic
#148Earlier quoted context omitted.
PureScript has a (much) more advanced type system but that's about it. The tooling and general developer experience of Elm is probably as good as programming gets in 2019. (I've also quite enjoyed Rust.) That may sound like hyperbole but the combination of elm-graphql and elm-ui is something else. I'm from a JS background and the whole React/TS/CSS-in-JS soup just seems like a bad dream now.
> PureScript has a (much) more advanced type system but that's about it. There's a lot in "... but that's about it.". Elm has a very low upper bound on abstraction by choice. As an additional note: like many other communities in programming it has a very cult-like feeling to it and like others noted in these threads the mere mention that maybe this low upper bound on abstraction could be bad usually draws people a lo…
Re: Why GitHub used Haskell for Semantic
#149Earlier quoted context omitted.
> I agree. You master monads and IO, but then you want to use a web framework and there a bunch of other category theoretical concepts and/or Haskell advanced features you need to understand to serve up "Hello World". Compare that to expressjs. I started using haskell at my last job after having done a couple years of functional programming in scala, but I honestly never found it required that much knowledge of categ…
+1 everything you said. Do you think it would be dramatically improved if Haskell had a bigger community of people contributing user-friendly libraries and tutorials? That was something that made Ruby the perfect newbie language for me. And something I feel is downplayed in Haskell given it's more advanced user base who is a little too obsessed with it's power and demonstrating their knowledge as such, rather than he…
Make the frequent things easy and safe. And this means syntax should be easy to read and write, documentation should be plentiful and easy to read, easy to start using, even if you are not expert in the area that that particular library covers, etc.
Rust also suffers a bit from this, as more and more libraries are just the generated docs. Here are these 30 structs and 100 impls, godspeed. Yeah, but what is this library, when I would use it? What's the most 100 common use cases?
And a 100 might seem like a lot, but people will chose that instantly works for them. And there are a lot of strange stacks out there. Sometimes people just want the low-level bits of your library. No docs/API for that? Damn. Sometimes people just want to use it as a one-liner, no config files, no import-server-deploy, no binary? Damn.
Re: Why GitHub used Haskell for Semantic
#150Earlier quoted context omitted.
> One of the main reasons I don't care much about Haskell is because without any side-by-side comparisons of Haskell vs I don't understand what the Haskell advantages are, and I don't know when I'm dealing with a problem space where Haskell would help me. This is one of haskell's biggest problems. It's just enough outside of the normal flow of imperative languages (yet usable for the same problems) that you can't tel…
> changed what I expected from language was non-nullable types I got the same revelation from the a lot more conventional [ ] looking Crystal, which don't solve it through optionals but through union types. Exposure to that kind of type safety to enforce non-nullability is really a watershed moment. [ ] For values of convention that look like Ruby. Not everyone think that look is conventional enough.