Live data from Hacker News

Four days of Go

evanmiller.org

171–180 of 187 posts

Re: Four days of Go

#171
post #153

Earlier quoted context omitted.

no. there is a HUGE difference between std lib and third-party libs. Std lib is like a contract - maintainers of language have to keep all parts up to date and working. Maintainers of third-party library can write "Farewell Rust" blogpost and all projects, based on that library will be in trouble. And as http is a very important thing for web-programs, it's much better to see support of http in std lib.

Why not let a bunch of third party HTTP libraries pop up. Eventually things will converge on the "best" library for doing http in rust. Open a discussion and start adding great third part libraries to the std lib. The challenge then would be keeping this coherent throughout the std lib.

Not sure why you think I don't want to let libs pop up. I just ask for http module in std lib, not as the only implementation which can exist, but as "last resort", always working, in any new version of language, supported and tested by core team maintainers. Not full-featured thing with routes and other whistles and belts, just basic things.

Re: Four days of Go

#172
post #45

Earlier quoted context omitted.

> Go makes coordinating with them a lot easier. What I like about strongly opinionated languages in general is that most of the strong opinions are around trivial features of the languages relative to the complexity of a decently interesting programming problem. Features like formatting, no unused imports, etc. These are typically areas in a project where Parkinson's Law of Triviality rears its ugly head in project p…

>These are typically areas in a project where Parkinson's Law of Triviality rears its ugly head in project planning meetings. Everyone feels the need to bloviate about 2 vs 4 indents, tabs vs spaces, or which lint flags to enable/disable. It was in one of the numerous Go talks/videos/presentations where I think it was Ken Thompson who said that he could walk around the Google cafeteria and hear Python programmers arg…

I bet there are equally many Go programmers at Google who argue that the "right way" imposed by the Go design team isn't that "right".

Re: Four days of Go

#173

> It’s also worth mentioning that you can get Go-style M:N concurrency model in C by using Apple’s libdispatch. Not so fast. That library is only available for OS X and FreeBSD.

There are ports: Linux: https://github.com/nickhutchinson/libdispatch Windows: https://github.com/DrPizza/libdispatch

The Linux port seems to be using OS threads from Pthreads instead of coroutines for the concurrent queue.

Re: Four days of Go

#174
post #119

> If I had to guess, I’d say the Go gopher suffers from a mild form of autism. > I get the same feeling about the Go language. It feels like it is designed by an obsessive personality — obsessed with build times in particular, but also having an obsession with detail, someone who rarely makes mistakes when writing code, who generally will not run code until it appears to be complete and correct. WTF? Not only is it i…

As a high school teacher, I work with kids on the autism spectrum all the time, and I don't find his comments offensive. They seem relatively accurate, too.

> As a high school teacher

As a father of two autistic children, I do.

> and I don't find his comments offensive.

He's equating look to a disorder. It's like saying "Black man dressed 'street clothes' must be dangerous."

Re: Four days of Go

#175

Earlier quoted context omitted.

> Std lib is like a contract - maintainers of language have to keep all parts up to date and working. Rust has language stability (in practice right now, and officially once we hit 1.0 in a month), so we in fact do guarantee this. > Maintainers of third-party library can write "Farewell Rust" blogpost and all projects, based on that library will be in trouble. Languages can do that too, in which case the entire langu…

> Languages can do that too Languages can abandon own std lib? Keep away from such languages. > HTTP is a fast-moving standard (see HTTP 2, for example), and so it's very important to be able to iterate quickly to support new features. Golang doing it just fine, so Rust can too. > I disagree. Web applications need HTTP, but many applications aren't Web applications. I'm talking exactly about web applications, not abo…

Languages can abandon own std lib? Keep away from such languages.

Not abandon their stdlib. Be abandoned. There is nothing more preventing developers of the compiler/vm from abandoning their efforts than the developers of a library. It would make little sense for developers of the language to abandon just the stdlib, as it is part of the language.

I'm talking exactly about web applications, not about all applications. And if web applications is not the field of Rust - let us know about it. Right now is not obvious and even web frameworks exist in Rust.

Rust is a fine language for web applications, but it's not designed specifically for them. The languages with huge stdlibs date from a time when accessing libraries was much harder than it is today. The internet, as well as package management, was young when Python and Java were born. Now that it's easy to download packages, and we have reasonably passable tools for doing so, there's no need for heavy standard libraries.

Go is specially designed for running on servers and performing network tasks. So it makes sense that it would have a stdlib with rich networking support, including http.

Node was designed as a frontend to libuv, to make nonblocking IO easier to use. The most visible domain where nonblocking IO is extremely useful is in making web applications, AND the fact that it's javascript makes it even better suited to web. So Node has http support baked in.

Rust is meant to exist in the same space as C++. It can be used for anything. OS kernels to text editors to web applications. There is nothing in particular that ties it to any of these domains. It has the option of putting support for all of these in the standard library, which would make it hard to maintain. Every time one part of the stdlib needs to change, the language needs a minor version bump, or there's a delay before anyone can use the new libraries. Not a big deal when you only have one or two domain specific components in the stdlib, but a problem when you have twelve.

If the stdlib supported only some specific domains, it would give people from other domains the impression that they're second class, and drive them away. Not cool.

So rust goes for a minimal stdlib.

Re: Four days of Go

#176

I am worried that there might be a dangerous trend in conversations about go on HN recently. There seems to be a tendency toward ad hominem comments against the go authors. The article itself is a great read. I love hearing interesting and honest commentary about the language. But I wonder if comments like "for reasons that appear to be political, does not have integer Min and integer Max functions" are appropriate.…

> However, are these sort of off the cuff comments the right way to start a discussion about it?

Well it is a persons' opinion. There are some facts, some humor, some personal opinions. I am not sure the author planned on being on the front page of HN. I don't think he submitted his own article. It is up to the readers to put things in the appropriate "bins" so to speak -- "This is good advice", "I don't like this part", "This is just a personal attack" and so on. Sometimes the same article can contain a variety of things.

Re: Four days of Go

#177
post #119

Earlier quoted context omitted.

As a high school teacher, I work with kids on the autism spectrum all the time, and I don't find his comments offensive. They seem relatively accurate, too.

> As a high school teacher As a father of two autistic children, I do. > and I don't find his comments offensive. He's equating look to a disorder. It's like saying "Black man dressed 'street clothes' must be dangerous."

I think he's saying "overly concerned with detail, marked lack of eye contact; probably on the autism spectrum." These are literally two of the diagnostic criteria for 299.00 Autism Spectrum Disorder.

It seems like you're reading a negative connotation into the "autistic" label that isn't present in the article. Calling the gopher "unsettling" is the biggest insult I can find in what he wrote.

Re: Four days of Go

#178
post #56

> Go basically forces you to have clean code all along, > which is a bit like forcing a scientist to wipe down the > workbench and rinse all the beakers between every experiment, >or forcing a writer to run the spell checker after every cigarette. As usage of gofmt is idiomatic Go, simply using the superset goimports handles all of this for you. Sure, any language has tools to reformat code for you in some magic ways…

go fmt could be a tool that transformed "sloppy Go" (unused imports, variable redeclarations...) into formal Go before compiling...

Re: Four days of Go

#179

Earlier quoted context omitted.

Various core Go team members seem to have a different philosophy regarding generics. They actually don't have a united front on this. It seems Russ Cox and Rob Pike are either anti-generics or in the you-dont-really-need-them camp, but Ian Thompson and Brad Fitzpatrick have seemed very open to the idea - what they can't, however, agree on, is exactly how to implement them so that they make sense in Go. That's it. If…

This is already a thing, no? https://blog.golang.org/generate

Almost. So close. But no cigar. Go generate is for the package creator, not the package consumer. So you, as a package creator, may create a "generic" red-black tree, but unless you pre-generate all my use cases for all my data types, I can't pull your package and then use go generate to create Tree and Tree if that makes sense.

Re: Four days of Go

#180
post #175

Earlier quoted context omitted.

> Languages can do that too Languages can abandon own std lib? Keep away from such languages. > HTTP is a fast-moving standard (see HTTP 2, for example), and so it's very important to be able to iterate quickly to support new features. Golang doing it just fine, so Rust can too. > I disagree. Web applications need HTTP, but many applications aren't Web applications. I'm talking exactly about web applications, not abo…

Languages can abandon own std lib? Keep away from such languages. Not abandon their stdlib. Be abandoned. There is nothing more preventing developers of the compiler/vm from abandoning their efforts than the developers of a library. It would make little sense for developers of the language to abandon just the stdlib, as it is part of the language. I'm talking exactly about web applications, not about all applications…

Language can be abandoned, but it's pointless argument, sorry. When language is abandoned, there's no reasons to argue about any aspect of that language.

In second part of your comment you comparing stdlib and external libs as they are equally reliable, but my point is exactly about difference in this aspect. I agree stdlib shouldn't be swiss knife, but I disagree it shouldn't have nothing except minimal set to serve language constructions. Go was designed as C++ also, not only for networking. And it has image module, not only http (for example). I see how fast and successfully Go evolving, I think Rust is better and that's why I think it's the area where Rust can take better idea from Go.

Post reply on HN