Another gonatic? I'm immediately reminded of the days when everyone who liked D proclaimed it would overtake C++ and rule the world with terrible, contrived examples: "let me show you why my language is better than yours by completely misunderstanding how to solve a problem, then implementing that broken/overengineered solution in your language, then compare it to something my language's API can do for me, just so we…
>The insight to async I/O is that this server, for this I/O bound task, will perform as well as your GOMAXPROCS example: Will it? Luvit, which is implemented on Node's libuv outperforms Node in the trivial case because of higher lua performance (and lua->c interop performance).
Why I went from Python to Go (and not node.js)
41–50 of 202 posts
Re: Why I went from Python to Go (and not node.js)
#42 package main;
import (
"fmt"
"net"
)
func main() {
hosts := []string { "www.google.com", "www.example.com", "www.python.org" }
c := make(chan string)
for _, h := range(hosts) {
go get_ip(h, c)
}
for i := 0; i "
return
}
c Re: Why I went from Python to Go (and not node.js)
#43Dimissing Erlang and Haskell with a wave of the hand, while seriously considering node.js? Carry on, nothing to see here.
ah, so, I don't think I wrote that section particularly well. I hold Erlang and Haskell in very high regard; I was really trying to mock my own superiority complex, which I think is fairly common in the Python community. I guess what I was really trying to get at is that Go is verymuch an industry language. Haskell I would argue against being an industry language not because it can't be used in industry; that's not a…
Re: Why I went from Python to Go (and not node.js)
#44Earlier quoted context omitted.
You're digging in. > Haskell I would argue against being an industry language FYI, the problems the Haskell community has been working on are things like scalability, performance and safety because they're critical to industrial problems . Toy approaches don't work at the scale we operate at -- you need real computer science. You want 1,000,000 Haskell threads in your app? You've got it. Want to write numerical model…
> /me wanders back to a multi-million line Haskell codebase running systems in 25 countries, processing billions a year in financial transactions. Curious... Can't be a bank, too conservative. Hedge fund? I know Jane Street love their OCaml so functional does have a place in that world. But 25 countries? You'd have to be huge.
There is REAL WORK being done in Haskell! Now I just gotta find out how to get my foot in the door :)
Re: Why I went from Python to Go (and not node.js)
#45Earlier quoted context omitted.
"For me, Go's major shortcoming is its community's lack of focus on readability as compared to Python." Can you be a bit more concrete here? Because whether you like the code styles enforced by gofmt and the compiler itself or not, Go is the most consistently readable language I've ever used (once you adapt yourself to the language). IMO, this seems like an especially odd problem for someone to have with Go.
Idiomatic Go: http://golang.org/doc/effective_go.html Idiomatic Python: http://python.net/~goodger/projects/pycon/2007/idiomatic/han... (doesn't cover a number of important things) When comparing the two, I'm not impressed with Go.
Re: Why I went from Python to Go (and not node.js)
#46Earlier quoted context omitted.
You're digging in. > Haskell I would argue against being an industry language FYI, the problems the Haskell community has been working on are things like scalability, performance and safety because they're critical to industrial problems . Toy approaches don't work at the scale we operate at -- you need real computer science. You want 1,000,000 Haskell threads in your app? You've got it. Want to write numerical model…
> /me wanders back to a multi-million line Haskell codebase running systems in 25 countries, processing billions a year in financial transactions. Curious... Can't be a bank, too conservative. Hedge fund? I know Jane Street love their OCaml so functional does have a place in that world. But 25 countries? You'd have to be huge.
I know two large international banks that have significant Haskell codebases. I don't know where you get the idea that banks are too conservative.
Re: Why I went from Python to Go (and not node.js)
#47"As a Django developer, there wasn’t a straightforward and obvious way to just do things in the background on a page request. People suggested I try Celery, but I didn’t like that option at all. A distributed task queue? What? I just want to do something in the background without making the user wait; I don’t need some super comprehensive ultimate computing machine. The whole notion that I would need to set up and co…
What's more, the strategy of just spawning a thread to do with async processing doesn't scale. Once you hit the limit of requests that a machine can process, you'll need a distributed work queue anyway. Or do Go coroutines run through some sort of managed execution queue?
Re: Why I went from Python to Go (and not node.js)
#48Another gonatic? I'm immediately reminded of the days when everyone who liked D proclaimed it would overtake C++ and rule the world with terrible, contrived examples: "let me show you why my language is better than yours by completely misunderstanding how to solve a problem, then implementing that broken/overengineered solution in your language, then compare it to something my language's API can do for me, just so we…
People please .. stop the four line code comparisons. Write something serious instead and then see how it compares. Like for example show me how to suspend the HTTP request and wake it up later when you receive a message back from some long running process. Or simpler: show me how to start a long running async task from a request handler.
Re: Why I went from Python to Go (and not node.js)
#49Earlier quoted context omitted.
>The insight to async I/O is that this server, for this I/O bound task, will perform as well as your GOMAXPROCS example: Will it? Luvit, which is implemented on Node's libuv outperforms Node in the trivial case because of higher lua performance (and lua->c interop performance).
I'd be interested in a more in-depth look at why this might be the case, because in JS written such that V8 will optimize properly, it's generally faster.
Re: Why I went from Python to Go (and not node.js)
#50"As a Django developer, there wasn’t a straightforward and obvious way to just do things in the background on a page request. People suggested I try Celery, but I didn’t like that option at all. A distributed task queue? What? I just want to do something in the background without making the user wait; I don’t need some super comprehensive ultimate computing machine. The whole notion that I would need to set up and co…
well, the complaint isn't entirely that it's hard, per se, but that there are many different ways to do things concurrently in Python, and that it presents too many choices to be made for the novice programmer. In Go, you just say `go myfunction()` and you're done. There's a lot of value in that.