Live data from Hacker News

Four years of Go

blog.golang.org

101–110 of 202 posts

Re: Four years of Go

#101
So I've given Go a try with a couple of projects, and I like it so far. However, I really don't like its "warnings are errors" feature — in particular in respect to unused imports. If I comment out a line that uses an import, then it no longer compiles until I go to the top of the file and comment it out.

Has anyone come up with a good solution to this? Preferably using Vim tooling.

Re: Four years of Go

#102
post #50

Earlier quoted context omitted.

Hmm... I did miss the line with groupcache and kv. Sorry about that. Though I still think you'd agree with me that go is not exactly killing it at that level of the stack (as opposed to the numerous examples of rather more successful usage at a level higher than that).

I think it's mostly a case of storage systems being a very core, important part of any software stack. If shit goes wrong at that level you're really screwed, so it takes longer to develop that kind of software and also longer for people to trust it enough to use it for serious things. But there is plenty of action at that level in the Go community, and as distributed consensus libraries like go-raft mature it will o…

Personally, I think there are other reasons.

I developed software system with hundreds of millions to a few billions data entries items in the core object store (C++) and need to very fast access time. There are needs to open/load/read those objects in database in very fast speed ( 10 millions records.

To get around those limitation, I end up design the data structures / datastore that eliminated the malloc/free, new/delete and do my own memory manager to map all the info directly to the structure in the file via mmap and do my own sub allocations. With those, I can get everything in I think all modern day database or BIG DATA type system app depend on its own custom memory manager. My theory, a language that depend on garbage collection can not be used in those big data app design.

I love to be proven wrong by someone re-implement the mysql, (or even just sqlite) in "pure golang" (not sqlite driver in C) that can provide similar level of performance with golang's garbage collector compare to sqlite's C counter part.

The use case I care about is DB size of 0.1GB - 50 GB with hundreds of millions of records in the DB.

Re: Four years of Go

#103
post #86

Earlier quoted context omitted.

My experience with Go was bizarre -- I loved programming in it, but I don't understand why! For example, Go has no REPL. (It's difficult for statically-typed languages to provide one.) It's commonly believed that a REPL is valuable and increases productivity. So if you were offered the choice, is there any circumstance in which "no REPL" is equally powerful as having one? Well, the vast majority of great hackers seem…

> Or do you believe in the other possibility: having a REPL doesn't matter as much as everyone thought? The importance of REPL is very exaggerated. Neither Java, C#, C++ nor C have one (and together, these four languages probably make up for 95% of programming languages). There is nothing that prevents any of these languages to get one (Scala has one, a bunch of these exist for other statically typed languages), it's…

There is a c/c++ repl http://root.cern.ch/drupal/content/cling .

For java there is bean shell/groovysh which isn't quite as good.

There is a mono repl and there is linqpad for c#. Ive used linqpad and it is very usefull.

scala worksheets are also very cool.

Re: Four years of Go

#104
post #86

Earlier quoted context omitted.

My experience with Go was bizarre -- I loved programming in it, but I don't understand why! For example, Go has no REPL. (It's difficult for statically-typed languages to provide one.) It's commonly believed that a REPL is valuable and increases productivity. So if you were offered the choice, is there any circumstance in which "no REPL" is equally powerful as having one? Well, the vast majority of great hackers seem…

> Or do you believe in the other possibility: having a REPL doesn't matter as much as everyone thought? The importance of REPL is very exaggerated. Neither Java, C#, C++ nor C have one (and together, these four languages probably make up for 95% of programming languages). There is nothing that prevents any of these languages to get one (Scala has one, a bunch of these exist for other statically typed languages), it's…

> Most of the time I need REPL-like functionalities, I need it in the heart of my application, with all its structures and state initialized and in the middle of a breakpoint. I hardly ever need to type snippets of code with zero context around them, which is what REPL's offer.

This is why we Lisp developers have networked REPLs -- I can start up a remote JVM, in communication with other services, connected to my local vim session. I can dynamically load code into it, start and stop my application, etc, all from my editor.

https://github.com/clojure/tools.nrepl

Re: Four years of Go

#105
post #72

Earlier quoted context omitted.

By then you'll need at least 10 years of Go experience to qualify for the job postings. ;-)

That is almost doable, but would be exceptional unless your name is Rob, Robert or Ken. I think I could almost claim 9 years at that point, conveniently ignoring the fact I stopped coding a few years back.. :-)

I think this is a joke -- job postings have been spotted in the wild demanding X years experience for languages that have existed for <X years.

Re: Four years of Go

#106
post #87

Earlier quoted context omitted.

My experience with Go was bizarre -- I loved programming in it, but I don't understand why! For example, Go has no REPL. (It's difficult for statically-typed languages to provide one.) It's commonly believed that a REPL is valuable and increases productivity. So if you were offered the choice, is there any circumstance in which "no REPL" is equally powerful as having one? Well, the vast majority of great hackers seem…

You don't really need a REPL when compiles take literally only a second or two. It's only the fact that C++ had a static type system where programs took (literally) hours to compile that made dynamic typing look so great in comparison. "Poorly designed static type systems drive people to dynamic typing," as Rob Pike said.

Dynamic typing has nothing to do with compilation speed. Furthermore, static typing is not orthogonal to dynamic; rather static type system is just another utility language on top of the actual language which helps to prove the correctness of the program. Such type systems can event be optional, see e.g. Clojure or Erlang.

Re: Four years of Go

#107
post #101

So I've given Go a try with a couple of projects, and I like it so far. However, I really don't like its "warnings are errors" feature — in particular in respect to unused imports. If I comment out a line that uses an import, then it no longer compiles until I go to the top of the file and comment it out. Has anyone come up with a good solution to this? Preferably using Vim tooling.

Yep. In vim (make sure to have plugins that come with go in misc/vim/ directory installed):

   :Drop fmt
to remove package "fmt" from imports, and

   :Import fmt
to put it back.

Re: Four years of Go

#108
post #87

Earlier quoted context omitted.

My experience with Go was bizarre -- I loved programming in it, but I don't understand why! For example, Go has no REPL. (It's difficult for statically-typed languages to provide one.) It's commonly believed that a REPL is valuable and increases productivity. So if you were offered the choice, is there any circumstance in which "no REPL" is equally powerful as having one? Well, the vast majority of great hackers seem…

You don't really need a REPL when compiles take literally only a second or two. It's only the fact that C++ had a static type system where programs took (literally) hours to compile that made dynamic typing look so great in comparison. "Poorly designed static type systems drive people to dynamic typing," as Rob Pike said.

And yes, REPL is still helpful even if the compilation is fast; amusingly most languages that have REPL features fast compilation (at least those not based on JVM). The benefit of REPL is that it preserves state which one can experiment on, and sometimes that state can be cumbersome/take long to acquire.

Re: Four years of Go

#109
> If you're in Europe in February 2014, come along to the Go Devroom at FOSDEM 2014.

Ok, so now I really have to attend next year's FOSDEM.

Re: Four years of Go

#110
post #86

Earlier quoted context omitted.

My experience with Go was bizarre -- I loved programming in it, but I don't understand why! For example, Go has no REPL. (It's difficult for statically-typed languages to provide one.) It's commonly believed that a REPL is valuable and increases productivity. So if you were offered the choice, is there any circumstance in which "no REPL" is equally powerful as having one? Well, the vast majority of great hackers seem…

> Or do you believe in the other possibility: having a REPL doesn't matter as much as everyone thought? The importance of REPL is very exaggerated. Neither Java, C#, C++ nor C have one (and together, these four languages probably make up for 95% of programming languages). There is nothing that prevents any of these languages to get one (Scala has one, a bunch of these exist for other statically typed languages), it's…

> Neither Java, C#, C++ nor C have one (and together, these four languages probably make up for 95% of programming languages).

C# ==> http://www.mono-project.com/CsharpRepl

C++ ==> http://root.cern.ch/drupal/content/cint

C ==> http://www.softintegration.com/demos/chstandard/interactiveC...

Java ==> http://www.javarepl.com/console.html

People, please pay attention in compiler design classes and don't mix languages with implementations.

Post reply on HN