News for hackers. Stuff that matters.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by TheCondor on Sunday March 19, 2017 @11:02AM (#13907445)
I don't know how to ask this without it sounding offensive, and I don't intend it that way. But do these "hardcore" haskellers enjoy writing programs at all? Like are there any well known open source apps that people actually use written in Haskell? There are tons of hobbiests and it has a following but what are the examples of its greatness?

I ask as an old SML guy, I like the math theory, I like the promise of better, more accurate and reliable software, I think you can do some beautiful things with algebraic types but I've been dumbfounded by the lack of great examples out there. Ada suffered/suffers the same fate, it has this "academic" pedigree for robustness but not many examples that you can get your hands on. so much expressiveness that doesn't seem to result in much expression.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by SwellJoe on Sunday March 19, 2017 @01:56PM (#13908612)
I've been thinking a lot lately about why Go, a quite minimalist language by modern standards, has been so incredibly successful in such a short time. It's about a decade old, and is already among the top 5 languages for people starting new OSS projects (at least in my area, which is systems management). Green field development is being done in Go at a rate unprecedented for such a new language, I think. Node/JS might be precedent if we say that Node is a whole new thing, even though it uses JS as its syntax, using it as a server language is pretty new (ignoring Netscape's failed attempts at it in the 90s).

I'm tempted to compare it to PHP, which exploded in popularity despite (unarguably, IMHO) better languages existing all around it at the time. Go doesn't seem like a bad language in the way that PHP was a bad language for its first 4~5 major versions, but it does find itself surrounded by many more powerful/expressive languages, and is seemingly getting much faster adoption.

I've been learning Go myself, and while I miss some of the features of my normal primary languages (Perl, lately, but also Ruby and Python), I like that I can read other people's Go code without having to look anything up, even though Go is very new to me and I have years experience reading/writing Perl/Ruby/Python. Of course, Perl/Python/Ruby aren't a major paradigm shift away from Go as Haskell is...but, it's still a question of whether it's better to write ten simplistic LOC or two maybe opaque LOC. I tend to prefer concision over verbosity (and thus hate reading Java; I get lost in the trees before I can find the forest).

Maybe Go is a sweet spot for a lot of developers. Rob Pike did a talk called Simplicity is Complicated, about this very subject...I found it a pretty convincing argument. https://www.youtube.com/watch?v=rFejpH_tAHM

Re:Three Months of Go, from a Haskeller’s perspective (2016) by sheepmullet on Sunday March 19, 2017 @05:18PM (#13909702)
> has been so incredibly successful in such a short time.

1) Our industry is obsessed with new and shiny.

2) There are a lot of developers and companies who don't have the time to invest in a new paradigm or language.

3) By learning/using golang these developers and companies can look "hip" and forward thinking with minimal effort.

With a Java background and a 10 hour investment in golang you can write decent software.

With a 10 hour investment in Haskell you can't do anything.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by CJefferson on Sunday March 19, 2017 @05:56PM (#13909887)
The problem is, people tell me that if I just learn Haskell, Idris, Closure, Coffescript, Rust, C++17, C#, F#, Swift, D, Lua, Scala, Ruby, Python, Lisp, Scheme, Julia, Emacs Lisp, Vimscript, Smalltalk, Tcl, Verilog, Perl, Go... then I'll finally find 'programming nirvana'.

While you might think it's worth spending 100+ hours learning Haskell, I don't (at the moment) have any reason to Haskell as a better time investment than anything else on that list.. why should I give it more than 10 hours?

Re:Three Months of Go, from a Haskeller’s perspective (2016) by angry_octet on Sunday March 19, 2017 @10:54PM (#13911360)
I don't know about you, but everything I work on is going to be something that someone will have to maintain, or will be actively developed by multiple people with different categories of expertise. Also, I usually want to build on other people's work (i.e. libraries).

So while I'd love to write big chunks of Haskell, if its just me doing it, that code will be nuked and rewritten unless I also undertake a project of education. So accessibility is key. Go/python/js seem to win in that regard, and likewise in access to libraries.

So unless as an organisation there is motivation to step up skilling, e.g. because there is a lot of money at stake if something breaks (e.g. trading software), or because there is a community of practice (compilers) its hard to see Haskell gaining much ground.

Likewise all those other languages has their niche, and it is hard to seem them displacing each other.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by rs86 on Sunday March 19, 2017 @11:59PM (#13911564)
100 hours is really optimistic for haskell
Re:Three Months of Go, from a Haskeller’s perspective (2016) by doall on Monday March 20, 2017 @01:54AM (#13912053)
Just a typo, but you mean Clojure? :)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by sheepmullet on Sunday March 19, 2017 @06:34PM (#13910090)
I completely agree.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by notjack on Sunday March 19, 2017 @04:14PM (#13909361)
Go has one of the largest tech companies on earth actively pushing it and pouring countless programmer hours into developing tooling and support for it. That pretty much trumps all of its misfeatures in terms of gaining adoption.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by SwellJoe on Sunday March 19, 2017 @04:17PM (#13909374)
So, it's previous analogs are Java and C#? That doesn't feel quite right, either, in that Google makes no money from Go; Java and C# are both direct moneymakers for their respective stewards. I haven't really seen Google pushing Go that hard; it feels like a skunkworks project that just happened to catch everybody's eye (including the company it came out of), rather than a grand plan to conquer the world of programming.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by im_down_w_otp on Sunday March 19, 2017 @04:47PM (#13909534)
It seems like everyone wants to believe they have Google-shaped problems, and thus should mimic Google in as many ways as they possibly can. Is some component of it that? Whether or not it's part of some grand plan?

This happens in hiring practices, in programming languages, in infrastructure tech, in data tech, etc.

It's extremely rare to encounter a data scale problem that actually requires a Hadoop-ish deployment, but they're all over the place. It's extremely rare to encounter an ops infrastructure that requires a scale and complexity where Kubernetes-ish tools make sense, but they're all over the place.

I admittedly don't fully understand the point of Go (as in existentially). I have used it, and will assuredly have to keep using it based on its increasing popularity. But it's not as good as Erlang for reliability or supporting production tools (services use cases). It's not as good as Rust or Haskell for implementation assurance (safety/security use cases). It's not as good for numerical processing as Julia or Fortran (scientific/performance use cases).

It feels a lot like the next generation of Java to me.

In that it's some shape of "good enough". And when "good enough" is combined with the cachet of aligning oneself with Google's ecosystem, it's basically unstoppable.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by SwellJoe on Sunday March 19, 2017 @07:09PM (#13910344)
There's a lot of Java at Google, so it wouldn't be surprising that Go would be Java-esque. But, I find it more like C. It has literally no accommodation for "enterprise" things. It's kind of its own thing that bubbled up out of a parallel timeline (which is kinda true, since it evolved out of the Plan 9 ecosystem and from Plan 9 developers), without much baggage from the couple of decades of commercialization of languages.

It's a pretty close to pure expression of a few language designer's vision, with very little in the way of corporate influence (that I can discern). And, I think that's the point of Go; it's the language its designers wanted for the tasks they wanted to work on (web scale services). It just happens that a lot of people want/need to work on the same sort of thing.

I agree that most people embracing massive scale are doing so way too early and probably aint gonna need it. But, that doesn't mean Go isn't a useful tool, anyway. I've watched a few videos, and read a few tutorials, and the brevity of Go for things like network servers is breathtaking. The cleverness of interfaces is...well, it really has to be seen to be understood. It's not OO, it's not functional. It's...something else. Contrary to the impression that maybe I've given in other comments, Go does have some features that aren't commonly seen elsewhere (or, if they are, they're bolted on). It has some fancy features, but only a few, and only in specific areas.

It seems like a very well thought out language, to me. Which might have been true of Java in its very early days...I'm not sure. I've never really been a Java developer, though I've read some Java code now and then.

So, Go might be merely "good enough" on some fronts, but I think it's great on a few specific fronts. And, it does it without requiring total buy-in on a new paradigm, which is probably its killer feature. It looks a little like Python or whatever in syntax, but acts a little like Erlang on a few specific details. Pretty good combination, and the community seems to agree.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by psiclops on Sunday March 19, 2017 @07:44PM (#13910562)
I post this pretty often when the conversation of design choices behind Go comes up. [0] There is definitely a heavy C and Plan 9 influence on it.

[0] https://commandcenter.blogspot.com/2012/06/less-is-exponenti...

Re:Three Months of Go, from a Haskeller’s perspective (2016) by im_down_w_otp on Sunday March 19, 2017 @08:07PM (#13910665)
I agree generally with this sentiment. It's probably the biggest reason I have such a hard time falling in love with Elixir. Because Erlang is simpler, despite them being largely interchangeable, and that simplicity is extremely appealing.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by notjack on Sunday March 19, 2017 @04:44PM (#13909513)
I wouldn't call it a grand plan, but it is one of Google's five officially supported server languages and as a result there's a lot of work being done to build tools and libraries for it. Code generation and relying on language-agnostic building and packaging systems (bazel) are both pretty common Google-isms, which show how the company's development culture influenced the priorities and direction of the language.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by brianyu8 on Sunday March 19, 2017 @05:15PM (#13909688)
What are the other 4? Python, C++, Java, and what other language?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by psiclops on Sunday March 19, 2017 @07:45PM (#13910567)
Javascript
Re:Three Months of Go, from a Haskeller’s perspective (2016) by notjack on Monday March 20, 2017 @01:09AM (#13911869)
Not a server language (no NodeJS at google). The other is C.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by psiclops on Thursday March 23, 2017 @05:47AM (#13938425)
AFAIK (although I could be wrong about this) the typical 'five' languages used at Google are not specifically for servers. I have heard they are Javascript, Java, Python, Go, and C++
Re:Three Months of Go, from a Haskeller’s perspective (2016) by coldtea on Monday March 20, 2017 @06:56AM (#13913095)
>So, it's previous analogs are Java and C#? That doesn't feel quite right, either, in that Google makes no money from Go; Java and C# are both direct moneymakers for their respective stewards.

Well, Google doesn't put as much money into Go either (as MS and Sun put into Java and C#). Sun and C# had much bigger teams, much bigger budgets, and tons of marketing money spent on them, including actual ads everywhere. Just the team writing the C# documentation was probably bigger than the whole Google Go team.

But that's relative:

Unlike most OSS/community driven languages (e.g. Nim or Julia), Go has a big enough team that's paid to work on Go. That makes a difference.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by spraak on Sunday March 19, 2017 @05:05PM (#13909639)
My journey and perspective is so similar, thank you for sharing your experience
Re:Three Months of Go, from a Haskeller’s perspective (2016) by shmageggy on Sunday March 19, 2017 @11:14AM (#13907546)
Off the top of my head, Pandoc, a tool for converting between different markup/down flavors, and xmonad, a tiling window manager for linux. Both are well known and popular.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by CJefferson on Sunday March 19, 2017 @05:57PM (#13909900)
I'm not sure I'll call xmonad popular. Also I know quite a lot of people who hate it -- because it's configuration language is "write some Haskell and recompile", so it tends to be very fragile (people who use Haskell love it)

Also found it crashed a lot, which I would have hoped would be one of the things Haskell would solve (the problems revolved it having to integrate into C code for linking to X, but that's part of living in the real world).

Re:Three Months of Go, from a Haskeller’s perspective (2016) by theoh on Sunday March 19, 2017 @12:41PM (#13908096)
Is there anything actually interesting about what they do, though? Converting markup is not a complex task.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by munchhausen on Sunday March 19, 2017 @03:02PM (#13908952)
Grandparent sold pandoc short. It is actually a really nifty utility capable of converting a plethora of formats from/to each other. It is a godsend for situations when you have to create MS Office-compatible documents, and want to avoid the inevitable muscle cramps you'd get if you were to actually use Word.

You can create your own document templates, and tweak the resulting output in a million ways. At my job, I have to create a lot of documentation, often in PDF or docx, and Pandoc has become an integral part of my workflow. I can create documents within the comfortable environment of Emacs, and use Pandoc to produce output in any old format that $pointy_haired_boss may desire.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by steveklabnik on Sunday March 19, 2017 @01:30PM (#13908440)
Parsing is something that's very pleasant in Haskell. Other languages can use parser combinators too, of course. It's good at it though.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by anistas on Sunday March 19, 2017 @01:49PM (#13908558)
C-to-Rust converter is written ... in Haskell https://github.com/jameysharp/corrode
Re:Three Months of Go, from a Haskeller’s perspective (2016) by steveklabnik on Sunday March 19, 2017 @01:56PM (#13908615)
Yup! There was already a great, ready to use C parser in Haskell, and we don't have one in Rust yet.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by TheCondor on Sunday March 19, 2017 @02:35PM (#13908811)
Great example!
Re:Three Months of Go, from a Haskeller’s perspective (2016) by theoh on Sunday March 19, 2017 @01:39PM (#13908499)
Yeah, fair point. That'll be a function of the fact that Haskell has tended to prioritize the concerns and problems of writing the compiler.

Complex transformations of data structures are part of the compilation activity too, but they're more difficult to spot in the wild of applications.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by dukerutledge on Monday March 20, 2017 @12:04AM (#13911593)
I'd disagree. Most business logic is just transformation of data structures in disguise. Once you have a sufficiently rich set of data structures this becomes abundantly clear.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by davesque on Sunday March 19, 2017 @01:28PM (#13908423)
Pandoc actually converts between a wide range of document formats.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by recursive on Sunday March 19, 2017 @02:13PM (#13908702)
Moving goalposts detected.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by theoh on Sunday March 19, 2017 @02:33PM (#13908807)
I didn't ask the original question.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by wyager on Sunday March 19, 2017 @03:02PM (#13908954)
Others have mentioned excellent software like pandoc and xmonad. There are also projects with a smaller target audience, but that are insanely impressive compared to what you could plausibly do in basically any other language. In particular, I've used Clash and Lambda-CCC, which let you compile Haskell code to VHDL or Verilog and put it on an FPGA.

I think the number of useful tools is pretty closely correlated to popularity, and obviously Haskell has a relatively small user base. It's not like Haskell gives you super-powers and makes you 10x more productive; it mostly lets you write better software, not necessarily more software. I do feel more productive with Haskell, but it's on the order of 50-100% (depending on the task), not enough to let Haskellers match the open-source output of a very popular language like C.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by ruslan_talpa on Sunday March 19, 2017 @12:15PM (#13907945)
Haskell community does tend to produce extremely powerfull libraries but not so may user facing tools (maybe it's just an impression). However, compilers for Elm and PureScript are written in Haskell :) and you probably know the FB spam filter core is also in Haskell
Re:Three Months of Go, from a Haskeller’s perspective (2016) by seagreen on Sunday March 19, 2017 @11:59AM (#13907851)
In addition to the others mentioned, PostgREST: https://github.com/begriffs/postgrest
Re:Three Months of Go, from a Haskeller’s perspective (2016) by peatmoss on Sunday March 19, 2017 @12:51PM (#13908170)
Any high-profile users of this that I might have heard of? Because on first look, PostgREST looks kind of... amazing.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by ruslan_talpa on Sunday March 19, 2017 @01:01PM (#13908231)
Depends on what you mean by high profile. I would not say there are high profile projects but that's only because it's quite a new project. The latest version which imo is the first one to be a truly powerful one is only a month old. But there are people using in production for close to a year now.

Oh, and i've seen someone on HN saying it's used in something like the upcoming Kosovo land property tax system or something like that but i am not directly aware of that.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by ruslan_talpa on Sunday March 19, 2017 @02:58PM (#13908934)
And since GraphQL is all the rage now, I'm using PostgREST here https://graphqlapi.com/ so i would say Haskell is picking up steam in terms of user facing products
Re:Three Months of Go, from a Haskeller’s perspective (2016) by nileshtrivedi on Sunday March 19, 2017 @02:01PM (#13908637)
You can apparently get a web-based UI too by simply using ng-admin: https://github.com/marmelab/ng-admin-postgrest
Re:Three Months of Go, from a Haskeller’s perspective (2016) by ocharles on Sunday March 19, 2017 @06:40PM (#13910129)
I have been writing Haskell professionally for about 4 years now, and I absolutely love it. I'm constantly finding myself having to answer questions of "So, what do you mean?" or "what is this" so early on in development. Never before have I had a language that is so directly tied to my understanding of problems.

On the practical side, I love having types that let me refactor so mercilessly, along with a very mature compiler with a decent suite of warnings.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by unscaled on Sunday March 19, 2017 @11:11AM (#13907521)
I think Pandoc can count as an example here - it may be a niche product, but it's well known in its niche, and it's arguably the most powerful document markup format converter out there. And it's all Haskell.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by willtim on Sunday March 19, 2017 @11:22AM (#13907610)
I enjoy it so much I quit mainstream tech to do Haskell professionally 5 years ago.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @01:12PM (#13908311)
That's really cool. What sort of problems do you work on? How did you manage to start working with it professionally?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by zumu on Sunday March 19, 2017 @03:11PM (#13909011)
Not OSS, but I know Galois use a lot of haskell in their work for largely government agencies (NASA, DoD, etc.)

Perhaps the type of problems Haskell is apt to solve (those requiring strict correctness, etc.) are not typically open source software projects.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by Ar-Curunir on Sunday March 19, 2017 @03:37PM (#13909166)
Maybe not Haskell, but a lot of ideas from Haskell and Haskell-like languages such as typeclasses, Option types, type inference, etc. have found their way to Rust, and it makes programming in Rust an absolute pleasure.

Rust, I'd argue, is the correct choice for many OSS projects. In fact, for security-focused projects, it should be the only choice. C-like performance without C-like vulnerabilities? It makes no sense to choose C or C++ any more.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by wollstonecraft on Sunday March 19, 2017 @12:39PM (#13908087)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by seagreen on Sunday March 19, 2017 @03:29PM (#13909128)
Replying again since I can't edit my comment: Idris, Elm and PureScript.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by theoh on Sunday March 19, 2017 @12:46PM (#13908133)
The Functional Pearls series, of which you are probably aware, seems to be full of idiomatic and brilliant Haskell techniques. It's not an application but it's a flowering of expression, of a sort...

https://wiki.haskell.org/Research_papers/Functional_pearls

Re:Three Months of Go, from a Haskeller’s perspective (2016) by stewbrew on Sunday March 19, 2017 @03:05PM (#13908976)
While I think you're doing injustice to the haskell community, I think it's quite interesting that I personally quite frequently stumble over relevant tools that are written in go -- e.g. syncthing. The only haskell-based app I use is pandoc (which is old) after my ruby-based (and even older) converter of choice got abandoned.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by j2kun on Sunday March 19, 2017 @12:03PM (#13907870)
I wrote a small javascript compiler in Haskell and it was great fun.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by seddona on Sunday March 19, 2017 @08:48PM (#13910847)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by smichel17 on Monday March 20, 2017 @11:20AM (#13914907)
Snowdrift.coop is written in Haskell/Yesod.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by crimsonalucard on Sunday March 19, 2017 @12:38PM (#13908086)
Haskell is actually less expressive. It is a functional abstraction on top of what is essentially a procedural machine and with all abstractions placed on top of lower layers you can only lose functionality as you go up rather than gain. You could say assembly language is the most expressive language out there.

The great thing about Haskell and other functional programming languages is that the functional style forces the program to be created in a form that is modular and elegant. Programs become modular and composable and re-composable in the functional world because the programmer has No Choice but to build his programs in an elegant way. It's hard to explain this to a typical programmer who hasn't dived deep into functional programming but code reuse, modularity and elegance are significantly higher in functional programming languages than in procedural.

This elegance, beauty and forced organization comes at a high cost though. And the cost is thinking in a way that is outside the normal paradigm of what humans are use to. I know a lot of haskellers think that humans can be taught to think in both ways equally, I disagree with them and believe that it is far Easier for a human to think about an algorithm procedurally than it is for him to think about it functionally.

If you have several tasks to execute, what is your first thought on how to plan out those tasks? A task list (aka list of functions) or a series of composed tasks placed in a single sentence (aka expression)? The answer is obvious: humans think about the list first because procedural programming comes more naturally.

This I believe is the main reason why Haskell or lisps haven't taken over the programming world. Functional programming is just HARDER. It takes me 10 times longer to hack out a simple program in haskell than it does in python because haskell doesn't allow you to 'hack' together a program. In haskell the application has to be an elegant diamond or the thing won't even compile! Python allows me to hack something together quickly which is both a good and a bad thing because as we all know hacking together software is quick but easily leads to unmaintainable software.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by platz on Sunday March 19, 2017 @01:11PM (#13908305)
> In haskell the application has to be an elegant diamond or the thing won't even compile!

Nonsense - You only have to make things as hard/elegant as you want them to be (and fore sure, some people do play that game for better/worse).

But, Haskell will happily allow you throw everything in to IO; you can side-step creating a perfect model and just hack together a list of imperative IO statements.

(unless you're referring to the difference between a dynlang and a static lang; that's a difference of another category altogether)

Re:Three Months of Go, from a Haskeller’s perspective (2016) by pekk on Sunday March 19, 2017 @03:22PM (#13909076)
If you are going to "throw everything in IO" then what advantage does Haskell have?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by tel on Sunday March 19, 2017 @04:31PM (#13909442)
Even "just IO" in Haskell enjoys some very nice typing properties and is often easier to write and ensure proper operation than similar "just IO" programs in other languages.

It's actually super pleasant!

Re:Three Months of Go, from a Haskeller’s perspective (2016) by swift on Sunday March 19, 2017 @03:56PM (#13909273)
You can refactor it later, of course.

It's even possible to opt out of static type checking if you want.

GHCi also provides a REPL that makes exploratory programming easy.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by platz on Sunday March 19, 2017 @03:44PM (#13909202)
yes, there is a difference between "'hack' together a program" and doing proper domain modeling.

However, neither should prevent the other. (i.e. "you can do X" should not be confused with "always do X"). Haskell allows you to choose.

Indeed, proper domain modeling is preferred.. but it's nice to have to ability to make that choice yourself based on your own constraints.

Additionally, Haskell makes it very easy/pleasant to refactor from the former to the latter. (On that note, imho the best models (in business) are arrived at iteratively rather than big-design-up-front)

Re:Three Months of Go, from a Haskeller’s perspective (2016) by rs86 on Monday March 20, 2017 @12:04AM (#13911592)
Lazyness, generic programming, algebraic datatypes, inferred typing
Re:Three Months of Go, from a Haskeller’s perspective (2016) by prance on Monday March 20, 2017 @04:17AM (#13912520)
> Haskell is actually less expressive. It is a functional abstraction on top of what is essentially a procedural machine and with all abstractions placed on top of lower layers you can only lose functionality as you go up rather than gain. You could say assembly language is the most expressive language out there.

That is not what is usually meant by "expressiveness" of a language. You seem to be talking about types of languages (as in the Chomsky hierarchy), by implying that there are problems you can solve in assembler but not in Haskell. That is not the case, as both are Turing-complete (Type-0).

In contrast, "expressiveness" usually refers to the "ease" (one may substitute conciseness in most cases) with which higher level concepts (abstractions) are expressible in the language, and here Haskell clearly wins against assembler, and many other popular languages.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by crimsonalucard on Wednesday March 29, 2017 @09:59AM (#13986240)
The set of all possible assembly instructions is bigger than the set of all possible assembly instructions that haskell can compile to. Therefore haskell is less expressive than assembly language. That is what I mean by expressive.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by prance on Friday March 31, 2017 @11:43AM (#14004928)
>The set of all possible assembly instructions is bigger than the set of all possible assembly instructions that haskell can compile to.

No it's not. The Haskell compiler is free to use whatever assembly instructions that it sees fit to compile the Haskell program.

Maybe you mean that effectively, the set of assembly programs (i.e. sequences of assembly instructions) which existing Haskell compilers happen to produce is limited. This is true. But it is also true that you can find an equivalent Haskell program for every possible assembly program, where equivalent means they exhibit the same behavior with respect to inputs and outputs. This is because both are Turing equivalent.

Now, it's also true that the way two equivalent programs get to their results may differ. For example, the assembly program might be faster. However, these are non-functional properties of the programs. And you were talking explicitly about functionality, so this point doesn't count towards your argument.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by crimsonalucard on Friday March 31, 2017 @03:42PM (#14007409)
My mistake, I shouldn't have used the word "functionality" so I concede. And yes, I meant sets of assembly instructions, thanks for the correction.

But this is the basic idea I was trying to convey: that you lose "expressiveness" as you get higher and higher in levels of abstraction.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by asdfasdf on Thursday April 06, 2017 @06:51AM (#14049427)
you are mistaking the meaning of expressiveness I'll provide a short example in assembler vs haskell expressive power. I'll use hello world as an example. This is considers an amd64 compatible processor, because I have to know the names of the registers.

```asm section .data str: db 'Hello world!', 0Ah str_len: equ $ - str

section .text global _start

_start: mov eax, 4 mov ebx, 1 mov ecx, str mov edx, str_len int 80h mov eax, 1 mov ebx, 0 int 80h ```

In Haskell I don't have to consider any processor.

```hs main = putStr "Hello World" ```

expressiveness is about how much code you need for a certain behavior. It's not about how many (possible fucked up) source files my compiler accepts.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jaegerpicker on Monday March 20, 2017 @12:19PM (#13915378)
I don't believe this is true for Haskell but I'm not a great Haskell dev. I do know Ocaml (mostly F# actually but it's super close) and this isn't at all true for OCaml which has a ton in common with Haskell. In OCaml I make lists of functions as pipe based expressions, where each step in the pipeline is a function. It's incredibly easy to reason about and matches the lists of functions view of development extraordinarily well. I know Elm (a simplified version of Haskell) supports pipe based programming also. Functional languages haven't taken over because OO and Java are still the primary way of teaching beginners to code. Very few beginners start with functional programming.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by crimsonalucard on Monday March 20, 2017 @04:40PM (#13917472)
function composition sort of emulates a list of procedures but it's not really the same thing. There's restrictions on function composition that aren't intuitive.

A typical task list has tons of side effects, which is not the case with your "pipe lines."

Re:Three Months of Go, from a Haskeller’s perspective (2016) by ngrilly on Sunday March 19, 2017 @04:10PM (#13909334)
I don't understand the downvote. The main argument looks valid:

> If you have several tasks to execute, what is your first thought on how to plan out those tasks? A task list (aka list of functions) or a series of composed tasks placed in a single sentence (aka expression)? The answer is obvious: humans think about the list first because procedural programming comes more naturally. This I believe is the main reason why Haskell or lisps haven't taken over the programming world.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by willtim on Sunday March 19, 2017 @06:03PM (#13909941)
It's overly simplistic. For example, Haskell's do notation allows asynchronous programming in a linear "task list" (to use your phrase). Yet most popular imperative programming languages do not; one must instead use callbacks.

As to whether programming with expressions is fundamentally harder, I'm not so sure. Since Fortran, most languages have supported arithmetic expressions over primitive numeric types, since they are certainly not easier with an imperative approach (MOV, MOV, ADD, PUSH). Haskell allows one to easily take this further using arbitrary objects and algebras, for example, expressions with drawing primitives, parsing grammars, financial contracts etc. With a small amount of syntactic sugar, you can even make expressions that look exactly like imperative programming (Haskell's do notation).

Re:Three Months of Go, from a Haskeller’s perspective (2016) by willtim on Monday March 20, 2017 @01:57AM (#13912066)
Forgot to mention that I didn't downvote either, despite disagreeing with much of the post.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by platz on Sunday March 19, 2017 @04:26PM (#13909421)
I'm not the downvoter, but I still don't understand the assertion why Haskell doesn't allow the "task list".

There is nothing preventing using these "task lists" (e.g. lists/steps/procedures) in Haskell. In fact, "do notation", a core language feature every beginner learns, features it.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by crimsonalucard on Sunday March 19, 2017 @07:16PM (#13910386)
You are right, but no beginner truly understands do notation. It's just magic to them. Do notation is an abstraction on top of monads which is an incredibly hard to understand abstraction on top of functional programming.

Functional programming in essence does not allow procedures, but with special incredibly complex abstractions you can simulate procedures. If you program using said abstractions I would argue that it makes functional programming even Harder to understand.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by mathw on Monday March 20, 2017 @03:21AM (#13912372)
I never found monads particularly difficult.

I still don't understand what the problem is with them.

It's just a box with some "stuff" in, a function that makes a new box with a thing inside, and a function that takes a box and a value and gives you a new box with some different stuff inside.

The hardest part for me was accepting that I can't look inside the box and don't actually need to.

I do get that there are a lot of people who'll look at monads and want to know why the heck they should bother when any "decent" or "reasonable" language just lets all their functions crap all over the filesystem whenever they like.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by platz on Sunday March 19, 2017 @07:35PM (#13910508)
Look, I'm not saying Haskell is easy to learn, it's one of the steepest learning curves I know of in programming.

But I don't think do notation is what trips up beginners (not sure if this discussion is about beginners per se). It is explained by simple mechanical plug-and-chug transformations that I think beginners understand, but am willing to hear if there is evidence otherwise.. I just think it's the other things that will eventually trip them up (I was only responding to specific claims made earlier). Also, on the point of resting on abstractions being a problem, I don't find compelling, because I'm also sure that Python beginners don't understand what "class MyStuff(object):" is really doing, but if the abstraction isn't leaky try don't need to know right away, and they can delve later.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by ScottBurson on Sunday March 19, 2017 @04:46PM (#13909532)
I didn't downvote either, but the first paragraph seems to me definitely wrong. The rest of the post makes an argument that I don't necessarily agree with, but I think is interesting and deserving of discussion.