3,297 karma · joined Nov 15, 2012 (14y ago) · 1,171 submissions
comment 13y ago · link · parent
Go is a very young language so while very fast compared to an interpreted language like Ruby, Python, etc by virtue of being compiled, it going to take some time be be on par (in terms of execution speed) with a Java, a JIT language that has had 18 years to mature.
It says a lot for Go that its execution time is on par with C#: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
comment 13y ago · link · parent
I do believe the Go code is more maintainable and I like the fact it is statically typed.
comment 13y ago · link · parent
1. runs fast
2. uses little memory
3. is easily made (or is) concurrent / parallel
4. is transparent (the intuitive run time complexity of operations is apparent, no hidden O(n..) operations, etc)
5. is easy to maintain
If this code happens to be more verbose than say Java, so be it, it is still beautiful. On an anecdotal note, most large C++, Java and node.js projects I have ported to Go have ended up being fewer LOC in Go.comment 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
When you pass a slice around are are really passing a small struct around by value (http://golang.org/pkg/reflect/#SliceHeader), and it is that struct that contains the pointer to the data.
comment 13y ago · link · parent
For example if you pass a struct, you are passing it by value, but if you pass a pointer to that struct, you are also passing by the argument by value. Why? Because even though the pointer contains a reference to the struct as its value, the pointer itself (which is the same as any other integer datatype to the computer) is being passed by value.
If your not familiar with pointers and C and languages with reference values like C++/Java this distinction isn't going to mean much to you however.
comment 13y ago · link · parent
comment 13y ago · link · parent
Also some of the built-in types like channels and maps are reference types (so they are always passed by reference).
comment 13y ago · link · parent
This is pretty true, although I would not bother using tip if writing a small command line utility or learning Go, but for a large project this is good advice. Execution time and memory usage are greatly improved in tip, at the cost you might run into bug that has not been fixed yet.
Here is the burn down to Go 1.1's release, when it hits bottom it releases. http://swtch.com/~rsc/go11.html# Go 1.1 RC should be out in April I believe.
Also if you need to pick a Go tip build to use this is useful: http://build.golang.org/
comment 13y ago · link · parent
Cache tangent: Of course it can and will, generally things that use caches wait for the results of those caches query before hitting whatever the slower thing is being cached. Anytime you have a cache miss and the slower thing must be queried anyway, the wasted time you spent waiting for the cache query results "slowed you down". Also applications that allocate huge caches for data sets with poor cache rates or low utilization can "slow things down" by starving other data-sets with better hit rates or higher utilization from being as large as they could be.
comment 13y ago · link · parent
The best benchmark is always your application. All benchmarks are flawed, use your judgement and determine how flawed a benchmark is; Any flaws are relative to your application similarity to what the benchmark tests. An imperfect tool is not a useless tool, so long as you are smart about how you use it.
This is probably relevant too: http://benchmarksgame.alioth.debian.org/dont-jump-to-conclus...
comment 13y ago · link · parent
Scala vs Python: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
Also since he mentioned Haskell at first, Haskell vs Scala: is also interesting: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
Haskell vs Python is just for lolz: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
comment 13y ago · link · parent
While Go is a young language, I find working in it to be extremely productive, it makes concurrency easy to implement and get right, and produces application with good run-time characteristics.
1104.
Big Wins Processing Big Data: Behind the Scenes with Big Data at Torbit(torbit.com ↗)
19 points · by voidlogic · 13y ago · 7 comments
comment 13y ago · link · parent
comment 13y ago · link · parent
Do you do this because you are curious, or because you don't want to click the link if it is an affiliate link? If the latter is the case, it seems strange you would not want to support the tech blogs you read, at no extra cost to yourself, if you already intend to purchase the item linked.
comment 13y ago · link · parent
There were several student complaints about the lack of an IDE or debugger. These tools do exist: I use LiteIDE, with syntax highlighting, code autocomplete and built in Go debugging everyday. Perhaps the professor was not aware of LiteIDE, but his students could have used Google.
http://code.google.com/p/liteide/
https://github.com/visualfc/liteide
Go also has great built-in profiling support: http://blog.golang.org/2011/06/profiling-go-programs.html
Installing Go is easy, you can download it as an archive or use your package manager:
http://code.google.com/p/go/downloads/list
aptitude install golang-go
Also even installing Go from source is easy: cd ~/
hg clone -u release https://code.google.com/p/go
cd ~/go/src/
./all.bash
I think the hardest part is the environment variables, but these are well documented.