Live data from Hacker News

Why I went from Python to Go (and not node.js)

orel.li

81–90 of 202 posts

Re: Why I went from Python to Go (and not node.js)

#81
post #72

Earlier quoted context omitted.

> one major problem is that Go can't construct new types at runtime. The current implementations can't. I don't see any reason why one couldn't. In any case, I don't think that's such a big deal. One just goes from completely seamless interactive coding to mostly seamless interactive coding. > Unless one builds a full Go interpreter That is precisely what I was proposing. (Are you implying some sort of hard VM/interp…

Go's compiler is said to be fast. Could you fake interpretation by continually recompiling everything?

Check out the gorun project.

Re: Why I went from Python to Go (and not node.js)

#82
post #72

Earlier quoted context omitted.

> one major problem is that Go can't construct new types at runtime. The current implementations can't. I don't see any reason why one couldn't. In any case, I don't think that's such a big deal. One just goes from completely seamless interactive coding to mostly seamless interactive coding. > Unless one builds a full Go interpreter That is precisely what I was proposing. (Are you implying some sort of hard VM/interp…

Go's compiler is said to be fast. Could you fake interpretation by continually recompiling everything?

> Could you fake interpretation by continually recompiling everything?

That's pretty much what the modern JIT VM Smalltalk environments do. On recompiling a method, all the affected JIT compiled machine code is kicked out of the code cache, and you start from interpretation again, which eventually results in the "hot" code being JIT compiled again.

Re: Why I went from Python to Go (and not node.js)

#83
post #9

Earlier quoted context omitted.

>Lots of fluff, not much substance. that was deliberate. There has been a glut of "introduction to Go" blog posts, and the documentation for introductory Go from the Go Team is quite good, so I didn't feel the need to author another introductory post. Most of the stories about why people use Go are bigger, established companies, so I wanted to show how it was perceived by a different audience. I don't remember where…

> but this is part of the problem: it's a library. Concurrency deserves language-level support. Adding concurrency at the library level is like adding an object system at the library level. Which is not a problem at all. Lisp and Scheme have been doing that since forever.

I assume they depend on macros to do so? That changes the game. Hans Boehm has an excellent paper on this issue titled "Threads Cannot be Imlemented as a Library": http://www.hpl.hp.com/techreports/2004/HPL-2004-209.pdf That paper was published in PLDI (http://dl.acm.org/citation.cfm?id=1065042).

His arguments have much to do with what the compiler doesn't know, which could potentially be solved with macros.

Re: Why I went from Python to Go (and not node.js)

#84

I keep hearing about go. I am new-ish to programming. Only really getting started on my first project, which depends on pyparsing, which depends on other things. Is go something a novice should be attacking real-world problems with?

if you're programming for the web, give it a Go.

Re: Why I went from Python to Go (and not node.js)

#85

I keep hearing about go. I am new-ish to programming. Only really getting started on my first project, which depends on pyparsing, which depends on other things. Is go something a novice should be attacking real-world problems with?

Probably not. Go is still in its infancy and not especially well-supported. If pyparsing is solving your problems well, stick with it. Python is great.

Of course if speed is important, you should ditch CPython anyway.

Re: Why I went from Python to Go (and not node.js)

#86
post #46

Earlier quoted context omitted.

> /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.

Can't be a bank, too conservative 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.

Very interesting! Thanks.

The idea comes from 10 years of working with them as an external vendor. I see all sorts (but especially Python and C++) on prop desks, but mostly C# in other areas (integration, data management etc.) That being said, nearly all of my experience is in front office trading and asset management, primarily in listed instruments, with little on OTCs, and nothing on payment processing, 'core banking' or the kind of stuff that spans the entire organisation.

It sounds like Haskell has found a niche at Standard Chartered doing perhaps just that. What are those two banks you mentioned doing with their Haskell code?

Re: Why I went from Python to Go (and not node.js)

#88
post #65

Earlier quoted context omitted.

I recommend starting with http://tour.golang.org/#1 . Yes, the Go tool comes with package-management capabilities. "go get labix.org/v2/mgo" will download the very excellent MongoDB driver mgo, for example.

But then actually implementing something useful is cryptic and obscure. I tried figuring out how to connect to a postgresql server following the spaghetti documentation of https://github.com/bmizerany/pq and http://golang.org/pkg/database/sql/ and have yet to find anything useful. Hacking around only leaves me with frustration. Searching around only leads me to unhelpful descriptions of what the GO command does in MS…

If you have Go questions and can't find the answer anywhere, feel free to post to StackOverflow or http://reddit.com/r/golang

You will get an answer quite fast.

Re: Why I went from Python to Go (and not node.js)

#89
For small tasks in the background of a web request, you can just, you know, use a worker thread. This author seemed like he didn't even try regular threads, and went directly from one hyped meme to another. It's often the case that the GIL isn't much of an issue.

Re: Why I went from Python to Go (and not node.js)

#90

"... as a Python programmer, I was the member of an elite cabal of superhuman ultranerds, smarter than those childish Rails/JavaScript/PHP/whatever developers that couldn’t write a bubble sort or comprehend even basic algorithmic complexity, but more in touch with reality than the grey-bearded wizards of Lisp/Haskell/whatever that sat in their caves/towers/whatever solving contrived, nonexistent problems for people t…

"Everyone less nerdy than me is stupid and everyone more nerdy than my is a no-life". I think it's pathetic, not funny.
Post reply on HN