News for hackers. Stuff that matters.
Re:What I've learned since quitting Elm by AzzieElbab on Sunday August 26, 2018 @05:41PM (#17848094)
Anyone getting deeper and deeper into fp is destined to end up with Haskell or purescript. No matter if you start with elm, scala, elixir or reason. Then, of course you work with Haskell for a bit and end up going back to whatever you started with unless your work in PL research or similar
Re:What I've learned since quitting Elm by tazjin on Sunday August 26, 2018 @06:06PM (#17848203)
> Then, of course you work with Haskell for a bit and end up going back to whatever you started with

Why do you think that? Haskell sees pretty widespread industry usage these days.

Re:What I've learned since quitting Elm by AzzieElbab on Sunday August 26, 2018 @06:30PM (#17848292)
In my experience Haskell is exactly what one of it's creators called it "a DSL for writing DSls". Elm can be viewed as one of such dsl, occam razor focused on web front-end. Otherwise,90% of the time you are stuck in IO along with some really hard to grasp libs to help your pl learnings and rarely anything else
Re:What I've learned since quitting Elm by Tehnix on Sunday August 26, 2018 @07:15PM (#17848445)
I'm not really sure what you're trying to get at? While, sure, Haskell excels at making (e)DSLs, it's far from the only usage for it. For web development it's quite good as well, a long with a ton of other areas. There are plenty of practially oriented libraries, and at the same time, also plenty of libraries focused on using as much of the advanced type system as possible.
Re:What I've learned since quitting Elm by vmchale on Sunday August 26, 2018 @09:08PM (#17848809)
I'm not really sure what you mean by "stuck in IO" but that's a consequence of laziness so it's pretty much unavoidable in FP in general.

As for "hard to grasp libs," I find them much easier to use than C libraries. They're actually quite well suited to certain domains.

Re:What I've learned since quitting Elm by efnx on Sunday August 26, 2018 @07:17PM (#17848455)
This is simply not true.
Re:What I've learned since quitting Elm by hardwaresofton on Sunday August 26, 2018 @08:35PM (#17848716)
I think you're mistaking Haskell for Lisp?
Re:What I've learned since quitting Elm by sridca on Sunday August 26, 2018 @07:52PM (#17848568)
> Haskell sees pretty widespread industry usage these days.

Yes, just for one example:

https://www.reddit.com/r/haskell/comments/86cg1u/jobs_obsidi...

Re:What I've learned since quitting Elm by st1ck on Monday August 27, 2018 @12:18PM (#17852349)
Did you have to link to a 5 months old post? :)

Each week some new job gets posted on r/haskell.

Re:What I've learned since quitting Elm by sridca on Monday August 27, 2018 @12:38PM (#17852489)
I linked to this one because it is relevant to Elm, also because I now work here :)
Re:What I've learned since quitting Elm by Touche on Sunday August 26, 2018 @06:03PM (#17848185)
Reminder that lisps are FP too.
Re:What I've learned since quitting Elm by kjeetgill on Sunday August 26, 2018 @09:34PM (#17848891)
Depends on which lisp and who you ask.

For many, functional programming is just as much about expressive type systems, purity, and immutability as is about robust first-class funtions and higher order functions.

Lisp is like the python version of Haskell (as compared to Java I guess?) It's a rough metaphor but I think it makes enough sense.

Re:What I've learned since quitting Elm by Touche on Monday August 27, 2018 @11:41AM (#17852127)
I know that many today use "functional" to mean ML-derived languages but that definition is incorrect.

Lisps are not very much like Haskell at all, and have different goals. Which is why today's ML-centric worldview of functional programming so often forgets about them.

Re:What I've learned since quitting Elm by AzzieElbab on Sunday August 26, 2018 @06:57PM (#17848392)
JS is a bad lisp
Re:What I've learned since quitting Elm by ihm on Sunday August 26, 2018 @07:02PM (#17848407)
Why do you include Reason? Reason is just an alternate syntax for OCaml which has a "fancy" type system like Haskell or purescript.
Re:What I've learned since quitting Elm by AzzieElbab on Sunday August 26, 2018 @07:17PM (#17848452)
Well, typeclasses and monads are not easy to implement in ocaml, to the best of my knowledge
Re:What I've learned since quitting Elm by ihm on Tuesday August 28, 2018 @10:14AM (#17858900)
We use monads extensively (with monad syntax provided by the ppx_let extension) and OCaml also has a sophisticated module system that is useful in a similar way that type classes are. I would say type classes and a good module system are essentially incomparable language features though, and programming in Haskell always feels painful to me once you get to a few files without modules.
Re:What I've learned since quitting Elm by zem on Sunday August 26, 2018 @07:58PM (#17848600)
monads are; there's just no syntactic support for them in the language, so they're a little clunkier to work with than they are in haskell
Re:What I've learned since quitting Elm by vmchale on Sunday August 26, 2018 @09:05PM (#17848804)
I am currently employed full-time writing Haskell.
Re:What I've learned since quitting Elm by star-techate on Sunday August 26, 2018 @07:59PM (#17848602)
Laziness is a superficially useful anti-feature.

I'd suggest waiting with OCaml until dependently-typed languages become more practical.

Re:What I've learned since quitting Elm by vmchale on Sunday August 26, 2018 @09:09PM (#17848815)
This is simply false. One can debate laziness as a default, but pure immutable languages need laziness.
Re:What I've learned since quitting Elm by star-techate on Sunday August 26, 2018 @09:29PM (#17848873)
> pure immutable languages need laziness

https://mercurylang.org/

If you put the most valuable thing in the universe inside a box that can't be opened or permeated by any force in the universe--then that thing is no longer valuable. Go find the former #2. If you have a programming ideal and that ideal requires laziness--then you've messed up. You have to conclude that there was something flawed about the ideal.

I'm a lot more confident about laziness being bad than about what you're thinking of as "a pure immutable language" being bad, but part of the problem about laziness is that it's a feature apart from the language it's in. If you implement a cache with a hash table in any normal language, then you can later on check and see how much data you have cached, keep track of your cache hit rate, empty the cache, pre-load your cache from a previous run, and so on. To work with your cache, you have the language itself at your disposal. If you implement a cache with a lazy list in language X, then language X can't help you. You'll need to hope that whatever Gods dangled laziness before you, also have some tools dangled elsewhere.

Re:What I've learned since quitting Elm by vmchale on Sunday August 26, 2018 @11:40PM (#17849297)
> If you put the most valuable thing in the universe inside a box that can't be opened or permeated by any force in the universe--then that thing is no longer valuable. Go find the former #2. If you have a programming ideal and that ideal requires laziness--then you've messed up. You have to conclude that there was something flawed about the ideal.

Not at all what I am talking about.

Please consult the literature on the subject and then we can continue this conversation as equals.

Re:What I've learned since quitting Elm by star-techate on Monday August 27, 2018 @01:18AM (#17849582)
> I'll just bet that you haven't read anything, because you disagree with people I think are, like, super-duper smart :)

Maybe if I read enough Foucault, or drink enough bleach, we'll be able to continue this conversation as equals :)

Re:What I've learned since quitting Elm by vmchale on Monday August 27, 2018 @11:28AM (#17852051)
> I'll just bet that you haven't read anything, because you disagree with people I think are, like, super-duper smart :)

It is quite obvious from what you have said you are not aware of the literature surrounding laziness.

Re:What I've learned since quitting Elm by dang on Monday August 27, 2018 @05:43PM (#17854830)
Please do not cross into incivility regardless of how wrong someone is or you feel they are.

https://news.ycombinator.com/newsguidelines.html

Re:What I've learned since quitting Elm by star-techate on Monday August 27, 2018 @12:48PM (#17852558)
Yeah, there's no amount of bigoted "Haskell uber alles" posturing that can replace a simple, supported argument. None of the reading you think you've done, and I haven't, has succeeded in distinguishing your output from that of a complete poser.
Re:What I've learned since quitting Elm by dang on Monday August 27, 2018 @05:43PM (#17854832)
Please don't become uncivil on HN, regardless of who started it or did it worse.

https://news.ycombinator.com/newsguidelines.html

Re:What I've learned since quitting Elm by AnaniasAnanas on Monday August 27, 2018 @02:07AM (#17849734)
Why do you think so? I don't even remember the last time that I used lazyness myself. Not to mention that there are other pure functional languages (such as Idris) that are strict.
Re:What I've learned since quitting Elm by vmchale on Monday August 27, 2018 @11:27AM (#17852040)
You can consult Okasaki's thesis (regrettably it is somewhat out of date) for a list of functional data structures. Some of them are lazy, some of them are strict. But being able to use all them is essential to getting good asymptotic complexity.