Live data from Hacker News

Three Months of Go, from a Haskeller’s perspective (2016)

barrucadu.co.uk

221–230 of 363 posts

Re: Three Months of Go, from a Haskeller’s perspective (2016)

#221

Earlier quoted context omitted.

> 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…

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…

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)

#222

Earlier quoted context omitted.

> 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…

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.

I feel like you are arguing against Java, not against Haskell.

Re: Three Months of Go, from a Haskeller’s perspective (2016)

#223
post #65

Earlier quoted context omitted.

I mean that you will need to write more, and more duplicate code, to express the same, it’ll be less clear, and less safe. Generics, and annotation processing with code generation integrated in the compiler, are two example features supported by Java that improve this. Haskell obviously is a lot better even. Additionally, it’s also a question if, in the language, any state of the program is immediately obvious from t…

Very little people who have tried errors by value or Either monads (they are basically the same concept in some sense) think that exceptions are better. Exceptions cause your code to be non-linear. Also, it makes them seem like something exceptional (pun intended), whereas you should really carefully handle each error and decide what it implies. Also, just something I noticed after almost two years of Go. Thanks to l…

I think Go has made a lot of people re-think their assumptions about what makes a language a good language.

I have yet to figure out precisely what it is that makes me more productive in Go (which I have relatively little experience with) than Java (which I've programmed since the first beta).

Re: Three Months of Go, from a Haskeller’s perspective (2016)

#224

Earlier quoted context omitted.

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).

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

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)

#225
post #8

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 dep…

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 bett…

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)

#226

Earlier quoted context omitted.

Parsing is something that's very pleasant in Haskell. Other languages can use parser combinators too, of course. It's good at it though.

C-to-Rust converter is written ... in Haskell https://github.com/jameysharp/corrode

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)

#227

Earlier quoted context omitted.

In addition to the others mentioned, PostgREST: https://github.com/begriffs/postgrest

Any high-profile users of this that I might have heard of? Because on first look, PostgREST looks kind of... amazing.

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)

#228
post #223

Earlier quoted context omitted.

Very little people who have tried errors by value or Either monads (they are basically the same concept in some sense) think that exceptions are better. Exceptions cause your code to be non-linear. Also, it makes them seem like something exceptional (pun intended), whereas you should really carefully handle each error and decide what it implies. Also, just something I noticed after almost two years of Go. Thanks to l…

I think Go has made a lot of people re-think their assumptions about what makes a language a good language. I have yet to figure out precisely what it is that makes me more productive in Go (which I have relatively little experience with) than Java (which I've programmed since the first beta).

Make sure to write some blog post about it when you do! I'd be very curious to hear what it is.

Re: Three Months of Go, from a Haskeller’s perspective (2016)

#229
post #193

Earlier quoted context omitted.

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.

Is there anything actually interesting about what they do, though? Converting markup is not a complex task.

Moving goalposts detected.

Re: Three Months of Go, from a Haskeller’s perspective (2016)

#230
post #199

Earlier quoted context omitted.

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.

Doesn't every semi-decent IDE have an option to reformat your code? What makes gofmt so special?

That all code is written the same from the get-go, and you can readily browse it in places like github, etc.
Post reply on HN