Live data from Hacker News

Google App Engine for Go

code.google.com

51–60 of 73 posts

Re: Google App Engine for Go

#51
post #44

Go's a System language. Doesn't that mean it's more suitable for writing a web server, database, driver or OS than as a web site scripting language? I mean, no one would write System code in PHP, and it's rare to see web sites written in C, so why write a website in Go?

Go turned out to be a pretty nice general purpose language. You got garbage collection, sane native string handling, native maps and lists. Mix that with static typing and you got a pretty nice language that enables fast and sane web development.

Having done a lot of CJK development, I felt that Go's unicode strings were pretty kludgey last time I looked. Go's strings are all utf8, so unless you're working in its ASCII subset alone, you have to manually iterate over multi-byte runes to get the unicode codepoints out. That's really not what I'd call a friendly unicode handling comparable to scripting languages, or even Java.

Please correct if things have changed. I haven't revisited Go for a little while now, and would be very interested as to any updates to its unicode handling.

Re: Google App Engine for Go

#52
post #30
post #25

Earlier quoted context omitted.

Pretty interesting. What do you think of the quote from this article http://news.ycombinator.com/item?id=2518609 http://www.theregister.co.uk/2011/05/05/google_go/print.html "Google has people who administer apps and services, and they need to, say, write tools that say scrape a few thousand machines statuses and aggregate the data," he says. "Previously, these operations people would write these in Python, but they'…

I think this may be specific to Google's situation--at least for now. PyPI may not be as comprehensive as CPAN, but it's rare these days that I can't "pip install" my way into having half the solution done before I start writing code. The same simply isn't (yet) true for Go. Google has many custom components, though. I personally don't write Go nearly as quickly as I write Python, but I have 4+ years of writing Pytho…

In addition to your custom components point, I wonder if licensing restrictions come into play at all. I am not familiar with Google's policy on use of external code based on license of said code. If there is, hypothetically, a policy to use code for internal projects of only certain licenses, then pypi (generally) may be slightly less useful to them.

If they were re-implementing a significant amount of code then go may indeed be more productive.

Re: Google App Engine for Go

#53
post #51
post #44

Earlier quoted context omitted.

Go turned out to be a pretty nice general purpose language. You got garbage collection, sane native string handling, native maps and lists. Mix that with static typing and you got a pretty nice language that enables fast and sane web development.

Having done a lot of CJK development, I felt that Go's unicode strings were pretty kludgey last time I looked. Go's strings are all utf8, so unless you're working in its ASCII subset alone, you have to manually iterate over multi-byte runes to get the unicode codepoints out. That's really not what I'd call a friendly unicode handling comparable to scripting languages, or even Java. Please correct if things have chang…

Iteration over strings is rune-by-rune in Go. However, (somewhat counter-intuitively) string indexing/slicing is byte-by-byte, so you can't just go "str[0:10]" and get the first 10 code points. Then again, that's true in utf16 also, if I'm not mistaken. But if you want an array of runes instead of a utf8 encoded string, you can just do "[]int(mystring)" and it'll do the conversion for you.

Re: Google App Engine for Go

#54
post #51
post #44

Earlier quoted context omitted.

Go turned out to be a pretty nice general purpose language. You got garbage collection, sane native string handling, native maps and lists. Mix that with static typing and you got a pretty nice language that enables fast and sane web development.

Having done a lot of CJK development, I felt that Go's unicode strings were pretty kludgey last time I looked. Go's strings are all utf8, so unless you're working in its ASCII subset alone, you have to manually iterate over multi-byte runes to get the unicode codepoints out. That's really not what I'd call a friendly unicode handling comparable to scripting languages, or even Java. Please correct if things have chang…

1. Range on a string iterates over Unicode code points (runes):

    s := "Какая-то строка"
    for _, rune := range s {
        // do something with rune 'К', 'a', ...
    }

2. Converting to []int gives you a slice of runes:

   s := "Какая-то строка"
   runes := []int(s)

   sub := string(runes[:8]) // "Какая-то"
however, slicing a string directly will slice it by byte:

   s[:8] // "Кака"

3. With package utf8 (http://golang.org/pkg/utf8/) you can manipulate runes manually.

While this is all not intuitive (you have to know what does what), I find it rather easy.

Re: Google App Engine for Go

#55
post #33
post #31

Earlier quoted context omitted.

While I agree that go on appengine might not take off, in no way is node.js "taking over that scene". If by scene you mean the "web app" scene. Just because node.js articles are constantly blowing up hn, reddit does not necessarily correspond to real world deployments of node.js apps. An admittedly hastily prepared google trends graph: http://www.google.com/trends?q=node.js%2C+python+django%2C+r... I am a node fan, I…

But with Go can you write your client code and your server code in the same language?

Maybe some day: http://code.google.com/p/go/issues/detail?id=498

(Native Client is also a possibility.)

Re: Google App Engine for Go

#56
post #31

It's going to be a tough sale for Google to convince people to adopt Go for their web apps when Node.js is taking over that scene. With Node I get the best of two worlds: high concurrency and speed -- presumably the top two selling points for using Go with web apps -- without having to teach myself yet another programming paradigm. Everyone and their mother knows some Javascript; good luck hiring help for your Go-bas…

While I agree that go on appengine might not take off, in no way is node.js "taking over that scene". If by scene you mean the "web app" scene. Just because node.js articles are constantly blowing up hn, reddit does not necessarily correspond to real world deployments of node.js apps. An admittedly hastily prepared google trends graph: http://www.google.com/trends?q=node.js%2C+python+django%2C+r... I am a node fan, I…

Go looks really nice and I'd really like to learn it especially if I can make a web app or something with it this summer.

Is there something comparable to npm or pip for go? I've seen a few go micro web frameworks but I'd really like to see a list of things like database adapters and the like which have been produced so far. The thing I find amazing about node is just how many great modules have been put out in it's short lifespan (https://github.com/joyent/node/wiki/modules). I suppose Go is a brand new language though.

Thanks!

Re: Google App Engine for Go

#57
It's about time! i always wondered why google left out Go! for the app engine last time i was there, since it's their language and stuff. Tough i guess it's ruby next? yeah probably not...

Re: Google App Engine for Go

#58
post #56
post #31

Earlier quoted context omitted.

While I agree that go on appengine might not take off, in no way is node.js "taking over that scene". If by scene you mean the "web app" scene. Just because node.js articles are constantly blowing up hn, reddit does not necessarily correspond to real world deployments of node.js apps. An admittedly hastily prepared google trends graph: http://www.google.com/trends?q=node.js%2C+python+django%2C+r... I am a node fan, I…

Go looks really nice and I'd really like to learn it especially if I can make a web app or something with it this summer. Is there something comparable to npm or pip for go? I've seen a few go micro web frameworks but I'd really like to see a list of things like database adapters and the like which have been produced so far. The thing I find amazing about node is just how many great modules have been put out in it's…

Go has a surprisingly large package list: http://godashboard.appspot.com/project

Like pip or npm, their is goinstall http://golang.org/cmd/goinstall/

Re: Google App Engine for Go

#59
post #8

Earlier quoted context omitted.

I've been enjoying using Go as a C replacement when I need more performance than Python, but don't actually need to use C. It's been fine for that purpose. I would note that they do keep changing the syntax on a fairly regular basis, the libraries are still young, and I do find the language oddly unexpressive in places compared to even C++ with boost. (E.g., no ternary operator, no list comprehensions, using the same…

Have you looked into other Python performance solutions like Cython which lets you add type declarations to Python code, and compile it into a C/C++ module? In my tests, it produces speedups on numerics that put it within spitting distance of hand-tuned C.

Oh, no question. That's part of why Mercurial is so close to Git in terms of speed, despite Git being hyper-optimized C and Mercurial being Python. But so far, this has always come up when I'm doing one-off, or nearly one-off, stuff. Getting CPython extensions whipped up is more effort, and less fun, than writing the solution in Go.

Re: Google App Engine for Go

#60
post #7

The official blog post: http://blog.golang.org/2011/05/go-and-google-app-engine.html And Hacker News thread: http://news.ycombinator.com/item?id=2533000

According to the blog post, deployment to app engine will only be available initially to those who sign up as a trusted tester via this form: https://spreadsheets.google.com/spreadsheet/viewform?formkey...
Post reply on HN