Better HN
topnewbestaskshowjobs
Log inSign up

voidlogic

3,297 karma · joined Nov 15, 2012 (14y ago) · 1,171 submissions

Submissions

comment 13y ago · link · parent

When I read the blog, the first thing I thought was "boy am I glad I don't use rails". I realize all frameworks and toolkits have issues, but Rails seems to be particularly bad.

I think the big take away here is the importance of apparently redundant sanity checks....

comment 13y ago · link · parent

Many computer lab like environments use NFS... While there may not be a lot of these, they can have hundreds of machines...

comment 13y ago · link · parent

The JVM is really fast- but to be fair note the JVMs memory usage in that comparison. Also version of Go used in that comparison is Go 1.0.3 and Go 1.1 RC (which is much faster and has better garbage collection) is going to be out next month.

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

Pretty much like you would expect, the Go code is a bit longer but much more efficient at runtime; similar to what you see at the benchmark game: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t... Note: That graph is using go 1.0.3 not Go tip which is even faster.

I do believe the Go code is more maintainable and I like the fact it is statically typed.

comment 13y ago · link · parent

"Because of that, I'm having trouble persuading myself that Go is much more expressive than competitors" Beauty is in the eye of the beholder. While one programmer might say beautiful code is expressiveness (ex. performing a one liner quick sort), that is not what most Go developers I know see as beauty. Beautiful Go in my opinion is code that (in increasing importance):

  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

"less terrifying than writing Ruby extensions in C" Very true, still terrifying though. I wonder if the reputation of C might not cause a selection bias towards the type of developer that can hack it though. Anyway, this is definitely a solid move.

comment 13y ago · link · parent

I'm sure there are many Ruby programmers that are competent at low level code, but based on my anecdotal observations, I find the thought of the average Ruby developer writing Rust terrifying...

comment 13y ago · link · parent

Even though it is terribly out of fashion, the performance of database interface classes (a database access layer) that wraps and abstracts SQL prepared statements and/or stored procedure calls is almost always much more efficient than ORM when the SQL written by someone minimally SQL competent. ORM can be much faster to implement, ah- classic tradeoffs.

comment 13y ago · link · parent

If you read the golang-dev google groups mailing list you will see lots of micro-benchmarks posted for specific commits. The best test is to install both stable and tip on your machine and compile your application with both. In one of my application there was a 9% improvement, in another it was 53%. When Go 1.1 is released I presume the computer benchmarks game will be updated, which might make comparison, at lease with other languages, easier.

comment 13y ago · link · parent

How do you know this is the case, that is people who talk about Go a lot do not use it? I often talk about Go on HN, I also use Go for my work and personal projects and write Go 10+ hours a day... Many of the people I see talk about Go on HN are active on github and golang-nuts... I know they are writing Go.

comment 13y ago · link · parent

Language comparison are so ridiculously multi-dimensional and my knowledge of Netflix's internal applications are shallow enough I thought specifics would be a waste of time. I see Go in general as a reaction to the overcomplexity of Java/C++ and the performance issues of Python/Ruby. Since Go seems to be popular with people who use Java/Python, and Netflix uses Java/Python, I was curious if Go was on the table. I would hardly call my original post blind advocacy...

comment 13y ago · link · parent

As a Java/Python shop I think Netflix should evaluate Go after 1.1 RC comes out in April. Go is very popular with people who have heavily used both Java and Python (as well as C).

comment 13y ago · link · parent

I would agree with that sentiment. I would have called them "auto-alias types" maybe or "auto-clone types"?

comment 13y ago · link · parent

You are correct, I was not being clear. They are not Go reference types are not reference types in the same way that they are in other languages.

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

Besides the few special built-in types that are passed by reference, everything else if passed by value. (Even "reference types" are actually structs that are passed by value (http://golang.org/pkg/reflect/#SliceHeader). And not reference types in the sense they are in other languages.

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

Is this what you want? http://play.golang.org/p/Pt1D_ICJu5

comment 13y ago · link · parent

Gos lack of pointer arithmetic is one of the design decisions that allows go to be memory safe (http://en.wikipedia.org/wiki/Memory_safe) . If you need need to be naughty with pointers you can use the "unsafe" package. But some environments like GAE or Go playground do not allow this.

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

"Tip Or Don't Bother"

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

"first, a cache should never slow you down."

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

All benchmarks come with the implicit disclaimer:

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

No discussion of run-time characteristics? I realize for a some start-ups this is not the most important metric, but these guys sound like they might be compute bound. And faster language can mean cheaper/less hardware.

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

It is just an internal project name. If we open source the map reduce library we can always rename it.

comment 13y ago · link · parent

Both Go and Java are more likely going to have a faster development cycle for many developers than C++ and are less likely to have memory management bugs because they are garbage collected and memory safe[1]. Compared to many languages like Ruby, Python, etc all three of those are "high performance" languages. With a lot of optimization C++ has the potential to probably be the "fastest" solution. It all comes down to balancing execution performance, memory efficiency and development maintenance efforts.

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.

[1]: http://en.wikipedia.org/wiki/Memory_safe

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

I'm guessing this list as the same pitfall as food labels and is showing quantities based on the amount of energy (calories) in the raw material rather than using the amount of energy the human digestive system can actually exploit. For example while you might get nearly 200 calories of from 200 of white bread, you would only actually get 150 calories from 200 calories of many meats. I think that if nutrition labels changed to estimated "exploitable calories" that a lot of the magic diet nonsense would evaporate.

comment 13y ago · link · parent

"you could get the very same item through your own affiliate scheme"

FYI. The Amazon affiliate program does not allow you to purchase items via your own referrals. To do so is a contract violation and they will terminate your affiliate account.

comment 13y ago · link · parent

"I know I for one always hover over links before I click on them to see if they're affiliate links"

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

Many people use baremetal for their base-load and virtual/cloud instances for their fail-over and elastic loads. Its not all or nothing.

comment 13y ago · link · parent

I think students always complain the first couple times they are forced to learn new languages, but this is an important skill for them to master.

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.

comment 13y ago · link · parent

I've been very happy with DigitalOcean since switching to them. This blog echo's my anecdotal experience. If DigitalOcean would open up a Chicago and West coast DC I could switch completely over...

I wish this had been a $20 vs $20 plan comparison.

1
3637383940