News for hackers. Stuff that matters.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @05:32AM (#13906120)
It is, I think, going to be very difficult to enjoy writing code in a less powerful language when you are exposed to languages that hold awesome power.

In fact, this has been the basis for much writing on Lisp too. Paul Graham has written entire essays along the same lines.

If you work in a job that forces the use of a less powerful language than what you've been exposed to, you can, I think, go through a sort of depression. You simply long to use the tools that you know hold much more power yet must resign yourself to the tools you have.

You can overcome the problem by being present in your work. The language might be ugly. It might be totally underpowered with limited means of abstraction and a type system that snmacks you and, sometimes, your client over the head. What you can do is, despite that, commit to writing great software with the tools you have. Commit to improving your work. Perhaps expand the ecosystem with tools borne of insights from your adventures with high-powered tools.

You will have a much more enjoyable time in most languages this way. Perhaps except MUMPS but there might be hope.

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.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by noir_lord on Sunday March 19, 2017 @09:55AM (#13907078)
I prefer less powerful languages (that have sufficient power to clearly express the domain).

I've found that "powerful" languages allow me to do clever things(TM) and I hate clever things(TM) retroactively when I come back to them.

This gets even worse when you have multiple people on the team doing clever things(TM).

Re:Three Months of Go, from a Haskeller’s perspective (2016) by coldtea on Sunday March 19, 2017 @10:30AM (#13907264)
>I've found that "powerful" languages allow me to do clever things(TM) and I hate clever things(TM) retroactively when I come back to them.

They also allow you to do sensible things(TM) like use the one and single, battle tested, standard library's generic sort, btree, etc implementation, instead of having to roll (and then read) 1000s of your own over the span of a year...

And it's a false dichotomy that you can't have the sensible things(TM) without the too-clever-for-their-own-good-things (TM) you allude too.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by fauigerzigerk on Sunday March 19, 2017 @01:28PM (#13908427)
The problem with "too clever" isn't just about cleverness that is actually in the code. It's also very much about cleverness that could potentially lurk behind any particular syntactical expression.

When you look at a line of code, what can you tell about its semantics without considering non-local information? What is invariant and what could potentially be redefined?

I think the answer to this question is extremely important for readability when you're not already familiar with a codebase.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by didibus on Sunday March 19, 2017 @01:51PM (#13908578)
That's a great call out, though I see this in most languages, Haskell and go equally have implicit non local behaviours, but I find the functional paradigm tend to have less, because of side effect free functions.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by lilactown on Sunday March 19, 2017 @04:42PM (#13909497)
I find laziness (coming from more imperative, non-lazy languages) to be a huge source of implicit non-local behavior. Trying to figure out how efficient my code is without specific knowledge of how certain functions in the standard library work/how the compiler interprets my code is a impossible.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by didibus on Monday March 20, 2017 @01:17AM (#13911912)
You're right, the execution context is non local. I'm actually not a big fan of laziness as the default myself. I love the option of lazy evaluation, because sometimes, it makes things really easy, like for infinite sequences, but most of the time, it does add complexity in reasoning about the code.

There's functional alternatives to Haskell which adopt the non-lazy as default, such as Elm, Rust, SML, Lisps, Fantom, Elixir, Scala, etc.

I have to admit though, this is a bit of a trade off situation. Working with pure functions is very simple, but to map those to unpure behavior, like IO, you need something that isolate that, and without laziness, I'm not sure how you can get that to be practical.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by fauigerzigerk on Sunday March 19, 2017 @02:22PM (#13908758)
I'm not yet familiar enough with Haskell to be honest, but languages like Scala, C++ (to the extreme) and to a lesser degree C# and Swift have a lot more support for non local redefinition of syntactic expressions than Go.

I totally agree with you about pure functions. They can be a real simplification, but only if any deviation from purity requires special syntax at the call site. Otherwise you're back in the guessing game.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by chongli on Sunday March 19, 2017 @07:54PM (#13910600)
but only if any deviation from purity requires special syntax at the call site.

Haskell makes it easy to write data and function types that enforce purity at the call site, throwing a type error if you make a mistake. Not just purity though, you can restrict these types to any arbitrary set of methods of your choosing. This lets you do things like parsing a blob of JSON and having all functions that depend on the result be guaranteed not to have to deal with a failed parse or otherwise invalid data. The fact that the data is good has been encoded in the types, preventing you from passing bad data by throwing a type error.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by tel on Sunday March 19, 2017 @04:32PM (#13909447)
> special syntax at the call site

Definitely Haskell's game then

Re:Three Months of Go, from a Haskeller’s perspective (2016) by canes123456 on Sunday March 19, 2017 @10:59AM (#13907424)
No one is arguing to roll your own when there a generic sort in the standard library. The issue with clever things is that people try to make a all purpose solution for what could be a simple one off solution. The all purpose is only used for 2-3 uses and it never battle tested.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by unscaled on Sunday March 19, 2017 @11:14AM (#13907547)
Clever things like a sort function that can sort both ints and floats and any new type that implements a comparison function?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by voutasaurus on Sunday March 19, 2017 @01:34PM (#13908469)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by canes123456 on Sunday March 19, 2017 @12:29PM (#13908032)
I am not arguing for Go. I am arguing that there is an issue with some complex languages. Go is trying to avoid that issue. I agree that the issue is real but also think go takes it a little too far.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by daxfohl on Sunday March 19, 2017 @12:17PM (#13907954)
Or a quicksort in constant memory.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by coldtea on Sunday March 19, 2017 @12:53PM (#13908181)
Haskell, if that's where the sneer is addressed to, absolutely gives you that.

It's just toy first-timer Haskell examples of quicksort (that still work, mind you) that don't.

But then again, take a language like C, and consider how many things (like proper error handling) are missing from 99% of the toy tutorial examples available.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by didibus on Sunday March 19, 2017 @01:54PM (#13908591)
I feel like you are arguing against Java, not against Haskell.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by ruslan_talpa on Sunday March 19, 2017 @12:11PM (#13907919)
If by clever things you mean "pointfree" all over the place then i agree but if you mean "abstractions" in general then that's a different thing and this says it best.

“The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.”

~ Edsger Dijkstra

I think i can honestly say i did not fully get that quote until i learned Haskell

Re:Three Months of Go, from a Haskeller’s perspective (2016) by didibus on Sunday March 19, 2017 @01:56PM (#13908610)
Great quote. I think if people think of level of abstraction it makes more sense. All code is an abstract representation, but to solve a problem, it's easier to work within an abstraction level that fits the problem.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by tazjin on Sunday March 19, 2017 @10:08AM (#13907147)
Agreed, but I'd take this into a different direction and argue that code generation - as it is often practiced in Go - is a Clever Thing (TM).

A language like Haskell lets me write extremely complicated code, but it also lets me concisely express the constraints I want in the form of types without getting too verbose. Go lets me do neither.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by ajmurmann on Sunday March 19, 2017 @10:39AM (#13907331)
I think it depends what type of "power" we are talking about. Ruby's meta programming stuff certainly falls into the problematic area. A powerful type system might be seen as quite the opposite because it can make code more predictable.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by crimsonalucard on Sunday March 19, 2017 @12:47PM (#13908138)
Powerful languages do clever things under the hood so you don't have to(TM). All programmers use this same abstraction so there is no confusion.

Less powerful languages force the programmer to come up with their own clever abstractions so that if you have multiple programmers you'll end up with 20 different clever ways of doing the same thing.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by julian_1 on Sunday March 19, 2017 @05:16PM (#13909689)
I hate "clever things" as well, but it's worth being precise about what constitutes cleverness in different languages.

Dynamic languages - ruby, python, bash, objective C etc - allow all sorts of cleverness - such as monkey patching, attribute injection, dynamic lookup - because of their dynamic runtime. All the checks about whether the code makes sense is performed at runtime.

Languages with more mature/strong/static typesystems are initially restrictive - but the emphasis in cleverness is to be able to know upfront - and at compile time - if the code expressed is consistent in the way data and effects are represented and expressed.

Of course - there are other kinds of code complexity -in terms of ease of understanding, and maintainability - that will always involve tradeoffs considering the task at hand and nature of the programming environment (solo, community, commercial, academic etc).

Re:Three Months of Go, from a Haskeller’s perspective (2016) by avisser on Sunday March 19, 2017 @10:09AM (#13907149)
This is 100% my recollection of my 2 months of Scala.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by camus2 on Sunday March 19, 2017 @06:37AM (#13906295)
> If you work in a job that forces the use of a less powerful language than what you've been exposed to, you can, I think, go through a sort of depression. You simply long to use the tools that you know hold much more power yet must resign yourself to the tools you have.

I was forced to use go for a job, it actually made me feel stupider, so much that I didn't know how to use the right types anymore when i moved back to a more sophisticated language. I was afraid the language wouldn't let me do what I want, just like Go.

There will be a "go programmer generation" and it's not going to be pretty. If people deem "generics too complicated to understand", what can you expect from programmers who don't want to learn anything? The only thing I find nice about the language is implicit interfaces. But not at all cost.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @07:36AM (#13906500)
Go has a lot of advantages.

Yes, you are a little bit limmited sometimes because of the lack of generics and the like, but at the same time, if you learn to use Go interfaces well, you end up using them most of the time happily. The parallelism primitives are great too.

As much as I love complex type systems, pattern matching, algebraic data types etc., I know that if Go had those things, it wouldn't be the language I love to write everyday anymore.

Somehow, Go is a really practical language and you end up being very productive in it, at least from my experience.

Saying that people who write Go should be stupid is shallow thinking. Complex languages aren't the only complexity that you should have. Some people concentrate on sophisticated architectural design (like Kubernetes).

There is one thing in Go, that I haven't met anywhere else. I can really understand any codebase I stumble upon in a matter of seconds. This is a huge boon to productivity.

Anyways, I never had any problems switching between Go and languages like F# or Scala on a daily basis. Rust looks interesting, though I think it will end up being too complex for a lot of people to understand, which will hinder its growth.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by pka on Sunday March 19, 2017 @08:11AM (#13906632)
> There is one thing in Go, that I haven't met anywhere else. I can really understand any codebase I stumble upon in a matter of seconds.

Care to elaborate a bit more?

I understand that when you see for(...) { b[i] = f(a[i]); } then you instinctively know that it's a loop that maps over some sequence, and so on. But let's say you have a 50-100kloc codebase with a 100 files in it. In what unique to Go way does Go help you understand the big picture/coarse architecture of such a project?

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @08:52AM (#13906774)
Oh, that it doesn't.

I meant smaller parts of code, and not for loops actually. (I prefer maps, filters etc.). Things like gofmt and the simplicity (in that, small number of concepts) of the language lead to most people writing fairly idiomatic code. This way most codebases look the same and you read each other's code as it were yours.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by matwood on Sunday March 19, 2017 @09:09AM (#13906836)
I'm just getting into Go and have found what you said to be true. It's easy to read other people's code on GH (Java is much the same way). Compare that to something like Scala, where no ones code looks the same.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by Elrac on Sunday March 19, 2017 @11:47AM (#13907784)
I'd like to echo what you said. I tend to be a victim of analysis paralysis, spending hours thinking up the most clever design. Go offers far fewer alternatives so there goes the temptation. Given a smallish task, I simply sit down and grind out code, and a couple of thousand lines later I have a simple, self-contained executable that does what I wanted to do. I feel there's a kind of magic in Go's brute simplicity.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @09:21AM (#13906874)
Check out sourcegraph, it's great for reading Go and Java code and has a GitHub integration.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by kasey_junk on Sunday March 19, 2017 @09:34AM (#13906951)
Honestly the biggest thing go has going for it is gofmt. Its one of the few things I miss when I work with other languages.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by efdee on Sunday March 19, 2017 @12:52PM (#13908176)
Doesn't every semi-decent IDE have an option to reformat your code? What makes gofmt so special?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @02:14PM (#13908710)
That all code is written the same from the get-go, and you can readily browse it in places like github, etc.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by kasey_junk on Sunday March 19, 2017 @08:07PM (#13910664)
No external choices the language dictates style. It ships with the sdk & contributors are expected to use it so there is a cultural agreement out of the box. It's a cli tool so it's immensely scriptable and easy to integrate.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @09:46AM (#13907030)
I think it may actually be the thing I miss the most. (together with implicit interfaces)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by AlphaSite on Sunday March 19, 2017 @09:56AM (#13907086)
My biggest problem with it is implicit interface.

I genuinely despise that about it.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @10:35AM (#13907295)
Why don't you like implicit interfaces, it's the feature I love the most actually?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by tonyedgecombe on Sunday March 19, 2017 @02:15PM (#13908714)
I like it as well although I can see there would be times when you might want to be explicit.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @03:02PM (#13908960)
I understand, but why would it be the greatest issue to despise, I'm just curious.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by andmarios on Sunday March 19, 2017 @07:09AM (#13906413)
So, do people who write timeseries databases in Go (like influxdb and prometheus), people who solve complex infrastructure problems (like k8s and docker), people who do distributed software (like consul) feel stupider because they write in Go?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by unscaled on Sunday March 19, 2017 @11:34AM (#13907687)
Probably not. As someone who finds Go cringeworthy, I still find it extremely useful for certain types of programs. I write far simpler Microservices in Go, and I don't feel stupid. It's pretty rough and boring tool, and using it is a chore, but if the tool fits the job well enough, you can get good craftsmanship done even with a hammer.

I think it's in the same position Java found itself in the early 2000s, another boring and unimaginative language that ended up being a workhorse.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by kuschku on Sunday March 19, 2017 @07:38AM (#13906504)
A good engineer can build a bridge out of rotten trees.

But they could still build a better bridge, in less time, with proper materials.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @09:56AM (#13907085)
You know, I think, maybe it's not a coincidence that almost all high-scale infrastructure tooling is written in Go nowadays.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by kuschku on Sunday March 19, 2017 @10:03AM (#13907119)
Almost all high-scale infrastructure tooling? Are there many databases, parallelism frameworks, indexing systems, or machine learning frameworks in go?

I’d be interested if you can name any fields where non-Google go projects dominate. I only know of containers.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @10:09AM (#13907152)
Service Discovery and configuration (Consul, etcd), Monitoring (Prometheus and Influx), non-container cluster management (Nomad), databases (CockroachDB), messaging (NATS, Jocko), Terraform. Other than that, I think everybody noticed the frequent posts "xxx database written in Go". Also, most high scale computing companies now use Go for their infrastructure parts.

EDIT: You can also check out all the stuff the CoreOS team puts out.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by kuschku on Sunday March 19, 2017 @10:20AM (#13907211)
I’ve actually never used any of them, and none of the devs or ops people I usually talk to used them either.

We never even heard of any of those except for CockroachDB.

Are you sure these are "dominating the entire industry"-products, as you mentioned before? Or is it more that they’re only used in SV?

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @10:30AM (#13907269)
Totally not, I'm working in Poland. And, I'm sorry to say, if you haven't heard about Consul, then you're really not in a position to judge if infrastructure tools are or aren't written in Go. Consul is the de'facto industry standard for service discovery for a few years already.

EDIT: Cockroach is actually the most SV'ish of all those.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by unscaled on Sunday March 19, 2017 @11:24AM (#13907626)
I think you exaggerate. Consul is probably the go-to discovery service discovery for new projects at startups and tech companies that aren't afraid of the bleeding edge, but if you count installed base and less bleeding-edge companies ZooKeeper probably still reigns supreme.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by kuschku on Sunday March 19, 2017 @11:31AM (#13907669)
Definitely. And while ZooKeeper is common, (and apparently Consul is now the hot new thing, I guess?), many places also build their own systems.

I wouldn’t call Consul "industry-dominating technology", as you’d do with ElasticSearch, Hadoop, Spark, etc.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @11:38AM (#13907719)
I'd call Spark a much more bleeding edge product than Consul. And no, it's not the hot new thing at all. It's just a standard tool.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by unscaled on Sunday March 19, 2017 @11:41AM (#13907741)
And the funny part is that all of them are Java. :) Well, except Spark which is Scala.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by kuschku on Sunday March 19, 2017 @11:44AM (#13907764)
Yes, exactly. In a list of most important tools out there, Go only turns up for a few tasks that used to be done in C++, as layer between the OS and services.

Almost everywhere else, it’s not "industry-dominating" at all, so I’m not sure why people use the argument "go is used everywhere and everything is in go" (which is obviously false) to argue that go is a good language.

(besides, C is actually used everywhere, but no one would use that as argument to show how C is a good language).

Re:Three Months of Go, from a Haskeller’s perspective (2016) by kuschku on Sunday March 19, 2017 @11:01AM (#13907442)
> Consul is the de'facto industry standard for service discovery for a few years already.

So standard that it doesn’t even have a Wikipedia page? Nor is there even one for this specific type of datacenter-oriented service discovery?

This is all pretty niche tech, used by a handful of startups that engineer technology for billions of users, but not used anywhere else. I’ve never seen any companies on national scale operate with this – nor would they need to.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @11:09AM (#13907502)
The thing is, I know a lot of companies using it at nationwide scale (non-startups). I think there's a reason you are getting downvoted.

Anyways, Service Discovery like this is less niche than containers are. If containers are still niche for you, then there you go.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by kuschku on Sunday March 19, 2017 @11:29AM (#13907650)
> I think there's a reason you are getting downvoted.

Well, so are you, your comments are even so grey I can barely read them anymore (and I can’t downvote you).

Regarding the rest: Containers are far less niche than Consul is. For service discovery, the market isn’t nearly as monopolized as containers are. And containers are far more used than consul is – most places I’ve seen build their own service discovery systems, or hardcode a main node and then have services in containers register with that, etc.

While for containers, at the moment, there’s almost only docker, due to the ecosystem.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by maloney on Sunday March 19, 2017 @11:04AM (#13907469)
etcd is also used quite a bit for service discovery, but it's written in Go too :)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @12:11PM (#13907916)
Are you using it personally? I never met anyone using it for that. How's your experience with it been? (in case you did use it)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by koffiezet on Monday March 20, 2017 @10:44AM (#13914604)
In the ops world, these tools are pretty much the standard. If you look at the state of many of the tools targeted at infrastructure were, with in the best scenario a decently maintained Python code-base - it's no surprise the ops world jumped on Go.

Go's main attraction there is that it's a simple, script-like language that compiles to easily deployed static binaries. That enables people who's main job is not necessarily coding, but with a good scripting background to solve problems by writing more complex/performance-critical stuff which was previously not feasible in languages like Python, Ruby, ...

These projects requiring more performance would have required a seasoned dedicated C/C++ coder before, but now they can be started and maintainer by people initially not focusing on programming, but on solving problems they are facing in their daily job. They don't have the time to invest learning a language with complex typesystems where initially, you'll be fighting the language itself more than solving actual problems. For programmers, this investment is useful, it's their main skill and is worth something. Ops people have other things to worry about, and just want to solve problems.

It does mean wheels are being reinvented, but the major projects now have pretty smart people working on them, hitting the limits of the language and it's garbage collector, pushing them forward.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by ex_amazon_sde on Monday March 20, 2017 @11:42AM (#13915105)
> In the ops world, these tools are pretty much the standard

Thankfully, this is true only in the HN bubble. One example: Amazon.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Monday March 20, 2017 @01:11PM (#13915836)
Amazon is a big enough company that it's obvious that they'll roll their own stuff usually.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @06:54AM (#13906356)
I am forced to use PHP at work. I hope that the stimulation I throw at my brain on lunch breaks and evenings offsets what you describe. Maybe it isn't enough and I'm on a long road down towards a point of no return.

That said if I look back on the past 6 months, I believe I have improved. In fact, a core principle I hold dear goes as follows:

"If I look back 6 months and I'm not any better, there's a big problem".

At one point, it seemed to annoy my non-technical boss because he couldn't understand why some of the code I wrote 6 months ago is perhaps not as good as it could be. He has kept me around so maybe it isn't a bad thing :)

We will, I think, always have programmers who don't want to learn anything new. It's interesting that there exists "Continuing Professional Development points" in the UK for healthcare: you get a rebate for each hour spent on courses to further your education. Maybe software engineering would benefit from this given the amount of, quite significant, cost sunk into large scale projects. Their universal credit programme should be incentive enough.

Entirely different problem though. If not Go, then what?

Re:Three Months of Go, from a Haskeller’s perspective (2016) by im_down_w_otp on Sunday March 19, 2017 @03:20PM (#13909069)
I experience this depression constantly. It's very rare to find people or places using Erlang, the community is extremely small and seemingly getting smaller all the time, and new things attempting to approximate its core strengths (often badly or incompletely) keep coming to the market and only further exacerbating the situation.

So I end up stuck working with crappier tech, crappier tools, and dealing with the effects of fewer and fewer resources going into improving the last 5% of annoying things about Erlang. While a deluge of resources go into partially reinventing the first 50% of it over and over again in some other random language.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by im_down_w_otp on Sunday March 19, 2017 @04:57PM (#13909586)
Having now read the entirety of the originally linked post... I'm doubly depressed.

Erlang would have been a great fit for Pusher's problem space.

Blargh! :-(

Re:Three Months of Go, from a Haskeller’s perspective (2016) by Veen on Monday March 20, 2017 @05:06AM (#13912696)
What are your thoughts on Elixir?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by im_down_w_otp on Monday March 20, 2017 @01:34PM (#13916042)
It's fine. Parts of it seem really weird to me.

Agents don't seem like they should be in the standard library. The pipe operator should probably have some sugar for representing the first implicit argument to the function because it's weird to have things like Enum.map/2 become written as Enum.map/1 in that context. Protocols are bizarrely complex (you can do the same thing in Erlang with about 10% of the ceremony) and made weirder by the fact that structs are represented as maps with a special key instead of as records, so field access and key walking has an unnecessary amount of overhead comparatively. It doesn't feel "complete", because there are pretty big chunks of the underlying system that still make you extremely aware you're really running atop Erlang (debugging, tracing, profiling, etc.), up to and including the docs themselves which often just point you straight to the relevant Erlang documentation.

I like that it has brought a lot of new energy to the BEAM ecosystem. I like the tooling and focus on docs and testing that have come with it. I like the macro system, even though I think it's overused by the community and often to ill effect, but the system itself is much cleaner than Erlang's.

tl;dr... Sure, why not. :-)

Re:Three Months of Go, from a Haskeller’s perspective (2016) by manmal on Sunday March 19, 2017 @07:10AM (#13906418)
It's stoicism for programming. Accept what you cannot change (tools, language), and focus on what you can change (attitude, striving for great solutions).
Re:Three Months of Go, from a Haskeller’s perspective (2016) by coldtea on Sunday March 19, 2017 @10:32AM (#13907282)
>Accept what you cannot change

Only you can easily change languages...

Stoicism was referring to actual things one cannot change. Like, say, death, or their status as a roman slave.

So it's less stoicism and more "our way or the highway".

Re:Three Months of Go, from a Haskeller’s perspective (2016) by burntsushi on Sunday March 19, 2017 @11:08AM (#13907494)
> Only you can easily change languages...

That's a ridiculous blanket statement to make. Changing languages can incur a very high cost. Making peace with this as an individual seems like a useful skill to acquire. If you want to insist then there's no connection to stoicism, then fine, but don't try to pass off language choice as something that's easy to change along the way.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by coldtea on Sunday March 19, 2017 @11:34AM (#13907691)
>That's a ridiculous blanket statement to make. Changing languages can incur a very high cost.

Yes, but you can always not even get started with Go (or whatever language you don't like) to begin with, so no change cost there.

Also, you can always change organizations, especially in today's "buyer's market" IT landscape. Better than working with something that you feel makes you miserable and non-productive.

And it's best to apply the principle of charity to what one responds to. Things are not always meant at their strictest interpretation. Compared to the "things you cannot change" stoicism was concerned with (like death, your past, some genetic misfortune, etc.), a programming language is nothing especially unchangeable -- which was my point.

That said, I absolutely love your libs and programs and use them all the time :-)

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @12:06PM (#13907888)
> That said, I absolutely love your libs and programs and use them all the time :-)

I don't write Rust or Go code but his repo seems like it is a great showcase for both languages - from what I read, it seems Rust is a little bit more expressive than Go but, having not written anything significant in either, I'm not the best judge.

I think Rust especially should be on on my "to explore" list :)

Re:Three Months of Go, from a Haskeller’s perspective (2016) by burntsushi on Sunday March 19, 2017 @10:11PM (#13911204)
I'm skeptical of declaring what stoicism ought to be applied to. It seems like a generic framework that works at the level of perception rather than a finite whitelist of approved things.

I would consider changing organizations to be an immense cost. It would be perfectly reasonable to apply stoic principles to make peace with language choice. Many of the costs associated from using a tool one believes is inferior are related to one's own emotional reaction to it. If you can conquer that, then you've made yourself a lot more flexible.

I can't imagine how anyone could claim that changing organizations is something that's easy. :-/

Thanks for your comment on charity. I admit that I came on a bit strong after rereading my comment. I sometimes get frustrated quite a bit with your commentary on Go, and I let it get the best of me. Sorry about that.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @11:40AM (#13907728)
Much more fundamental is the idea that suffering itself is an unchangeable fact of life. This, I think, is what makes it so similar to Buddhism. Inact, suffering is a necessary contrast to bliss and one can induce bliss via temporary​ self-induced periods of bliss.

Perhaps then the stoic lesson is we should write some machine code from time to time to really enjoy the benefits of anything above. Or, to relate, writing a bit of Go for some time when you mostly write Haskell.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by evilduck on Sunday March 19, 2017 @11:13AM (#13907533)
An individual can easily change languages.

It's significantly harder for an organization of 10+ developers to change from a single language to another single language without a technically savvy and respected manager just mandating what it will be.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by rpeden on Sunday March 19, 2017 @07:33AM (#13906490)
I agree to a certain extent. There are times when I've seen great beauty in something as mundane as pre-generics Java, when someone put together a well factored set of loosely couple objects to accomplish a task.

Other times, though, being forced to work with obtuse tools feels like trying to construct a skyscraper out of sticks and dog crap. No matter how elegant a structure you manage to construct, doing so is a miserable experience because you're never able to transcend the feeling that you're working with twigs and poo.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @08:27AM (#13906688)
I understand the analogy but I think many ancient cultures did great things with twigs and poo. In fact, there are many wattle and daub structures still standing - there's one around the corner that's protected by law.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by literallycancer on Sunday March 19, 2017 @09:06AM (#13906822)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by hamming on Sunday March 19, 2017 @05:15PM (#13909682)
this is a shitty analogy
Re:Three Months of Go, from a Haskeller’s perspective (2016) by ruleabidinguser on Sunday March 19, 2017 @07:52AM (#13906560)
>It is, I think, going to be very difficult to enjoy writing code in a less powerful language when you are exposed to languages that hold awesome power.

As someone whos written code in Haskell (even some medium sized programs) and moved on just fine, no.

Frankly, Haskell can be an excercise in frustration.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @08:24AM (#13906675)
It depends, I imagine, on how much you enjoy working with it. If it was so painful, I think moving to another language would be refreshing as opposed to depressing.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by mathw on Monday March 20, 2017 @03:25AM (#13912380)
I'd concur. It's mostly around tooling for me (and Stack has helped here) but whenever I pick up Haskell for an out-of-work project now I end up putting it down again. I find Rust increasingly pleasing, although the lack of constraints on side effects is frustrating compared to Haskell's purity.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by brightball on Sunday March 19, 2017 @11:53AM (#13907809)
You're not wrong. When you have access to what feels like "the answer" to so many problems and you repeatedly see your company experience those problems...over and over again...it can be depressing when the solution falls on deaf ears.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by bobsam on Sunday March 19, 2017 @05:41AM (#13906145)
TL;DR : get off​ your high horses and get to work
Re:Three Months of Go, from a Haskeller’s perspective (2016) by iagooar on Sunday March 19, 2017 @08:09AM (#13906622)
Isn't it possible to choose the best tool AND get to work? Isn't it our responsibility, as software engineers, to ensure that those who pay for our services get the best bang for their buck? That includes choosing a programming language that actually helps developing new features faster, while guaranteeing that the system is available, robust and maintenance costs are low.

Choosing a language that makes these things difficult, is a poor choice. We should not accept subpar languages to be used just because.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @08:38AM (#13906730)
You're right. If you have the freedom to choose the best tool, I think you absolutely should.

I think the problem lies in the fact many programmers don't have the luxury of making those decisions. I imagine if one of those programmers refused to use the mandated tools, they'd get the sack. Many of those programmers, again, don't have the leg room to handle that. Plus, I don't think any employer would look favourably on "I got sacked because I refused to use language X because language Y is superior". I know that isn't the kind of attitude to work I would appreciate.

The companies that allow freedom of choice in tools and languages are perhaps the best companies to work for. Unfortunately, those companies hire the best programmers in the first place, or at least set the bar with that in mind. Most programmers, including myself, are not of this calibre.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by bobsam on Sunday March 19, 2017 @08:50AM (#13906766)
Counterpoint: Programmers don't choose the best language, they choose the language they are comfortable using.

Source: at a previous job we had a "use whatever tool you want, just get the job done" policy. After two years we had everything from Perl to JavaScript in the same project.

Edit: ... and this project was a desktop application!

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @08:59AM (#13906797)
This is true, from my experience. When I'm screening candidates, I often ask them to solve a problem in their language of choice. They choose PHP, even though I know the same problem solution can be expressed far clearer and shorter in Ruby.

Perhaps we are unearthing various kinds of choices i.e choices for best fit vs best convenience. Perhaps that's a case of engineering vs something other.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by woah on Sunday March 19, 2017 @10:31AM (#13907274)
Despite its checkered past, isn't php these days a more powerful language than ruby?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by wtetzner on Sunday March 19, 2017 @11:06AM (#13907480)
That's the first time I think I've heard that. I've heard many times that PHP is much better than it used to be, but in what ways is it more powerful than Ruby?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by fiddlerwoaroof on Sunday March 19, 2017 @11:50AM (#13907794)
One nice feature is that it is optionally typed (php 5.6 had this for classes and arrays php 7 added support for specifying primitive types.)

Also, the newer parts of the language such as the object system and the presence of closures and first class functions are almost pleasant to work with: for the most part, the annoyances come from the old stuff

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @11:59AM (#13907849)
Not at all.

I abused Ruby's metaprogramming capabilities to build a small functional language with operators. I monkey patched symbols with operator overloading to add the typical functional operators such as composition (using * since . isn't possible). I created operators for piping, partial application, etc. Terrible abuses that probably reduced inter-library and future compatibility to 0.

I don't think that would be possible in any way with PHP without PECL (there is an extension for operator overloading magic methods) whereas it is with Ruby out the box.

If the language allows me to abuse it in such a way more than another, I reckon it holds more expressive power. Case in point: Lisp.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by sanderjd on Sunday March 19, 2017 @12:22PM (#13907984)
I'm really curious about this! I don't know much about recent versions of PHP - what do you think makes it more powerful than Ruby?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by eeZah7Ux on Monday March 20, 2017 @11:31AM (#13914995)
> Programmers don't choose the best language

bad programmers do that. As professionals, we should refuse to implement something in the wrong language and allow somebody else to do the job.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by agumonkey on Sunday March 19, 2017 @06:04AM (#13906195)
I ended up calling this engineering. Language is just a mean to an end, and learning its limits, picking one that match the most the problem at hand.

That said FP/Lisp are very hard to leave, I can understand that.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by jwdunne on Sunday March 19, 2017 @05:57AM (#13906172)
Or perhaps "we are programmers - if you wish for X in a language, make it so". Maybe a bit too long? I certainly don't want to sound prickly :)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by sfifs on Sunday March 19, 2017 @12:57PM (#13908204)
I find that I end up picking the excellent language engineering that is in Go almost any day over languages with many features that simply don't work well together.

Just the other day I was struggling with the hopeless nightmare of Java's lack of true first class functions (but still having some first class function like semantics) combined with embedded classes restrictions combined with generics thrown in for good measure (AsyncTask embedding in an activity and updating result in the activity).

Go features are clearly specified in a very readable and fairly concise spec and guide and its features fit seamlessly together virtually every time​