Re: Python & Go

2009-11-17 Thread Donn
On Saturday 14 November 2009 22:23:40 Paul Rubin wrote: > they'll have to call it Go2 Lol. Or we could fork it and call it Gosub ... and never return! \d -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & Go

2009-11-16 Thread Paul Rubin
sturlamolden writes: > A decorator function like @go could just call os.fork and run the > function in the child. We already have a between-process Queue in > multiprocessing to use as channels. Unlike with interthread queues, you have to serialize the values sent through those multiprocessing ch

Re: Python & Go

2009-11-16 Thread Graham Breed
Terry Reedy wrote: It seems to me that generators are already 'channels' that connect the calling code to the __next__ method, a semi-coroutine based on the body of the generator function. At present, the next method waits until an object is requested. Then it goes into action, yields an objec

Re: Python & Go

2009-11-16 Thread sturlamolden
On 16 Nov, 10:06, Terry Reedy wrote: > > Python run well on multiple cores, you just have to use processes > > instead of threads. > > But not so trivially as to add one word to an existing function. > Hence by tweak, I meant, as explained in another post, to add a keyword > or just a decorator t

Re: Python & Go

2009-11-16 Thread Terry Reedy
sturlamolden wrote: On 14 Nov, 23:10, Terry Reedy wrote: It would be much better, for instance, to tweak Python, which it has had great success with, to better run on multiple cores." Python run well on multiple cores, you just have to use processes instead of threads. But not so trivially

Re: Python & Go

2009-11-16 Thread Terry Reedy
Simon Forman wrote: On Sat, Nov 14, 2009 at 5:10 PM, Terry Reedy wrote: Paul Rubin wrote: Mark Chu-Carroll has a new post about Go: http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php In a couple of minutes, I wrote his toy prime filter example in Python, mostly fr

Re: Python & Go

2009-11-15 Thread sturlamolden
On 14 Nov, 23:10, Terry Reedy wrote: > It would be much better, for instance, to tweak Python, which it > has had great success with, to better run on multiple cores." Python run well on multiple cores, you just have to use processes instead of threads. -- http://mail.python.org/mailman/lis

Re: Python & Go

2009-11-15 Thread Simon Forman
On Sat, Nov 14, 2009 at 5:10 PM, Terry Reedy wrote: > Paul Rubin wrote: > >> Mark Chu-Carroll has a new post about Go: >> >> >>  http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php > > In a couple of minutes, I wrote his toy prime filter example in Python, > mostly from the

Re: Python & Go

2009-11-15 Thread sturlamolden
On 15 Nov, 05:21, Steven D'Aprano wrote: > Psyco does JIT compilation to machine-code for CPython, at the cost of > much extra memory. It's also limited to 32-bit Intel processors. The aim > of the PyPy project is to (eventually) make JIT machine-code compilation > available to any Python, on any

Re: Python & Go

2009-11-15 Thread Steve Howell
On Nov 14, 3:26 am, kj wrote: > One more thing: I found Rob Pike's mutterings on generics (towards > the end of his rollout video) rather offputting, because he gave > the impression that some important aspects of the language were > not even considered before major decisions for it were set in s

Re: Python & Go

2009-11-15 Thread Yoav Goldberg
On Sun, Nov 15, 2009 at 4:00 AM, Terry Reedy wrote: > Yoav Goldberg wrote: > > >> On Sun, Nov 15, 2009 at 12:10 AM, Terry Reedy > tjre...@udel.edu>> wrote: >> >>Paul Rubin wrote: >> >>Mark Chu-Carroll has a new post about Go: >> >> >> http://scienceblogs.com/goodmath/2009/11/the_go_i_

Re: Python & Go

2009-11-14 Thread Michele Simionato
Let me add a quote from the FAQ: """ Why does Go not have exceptions? Exceptions are a similar story. A number of designs for exceptions have been proposed but each adds significant complexity to the language and run-time. By their very nature, exceptions span functions and perhaps even goroutine

Re: Python & Go

2009-11-14 Thread Michele Simionato
On Nov 15, 3:00 am, Terry Reedy wrote: > It seems to me that generators are already 'channels' that connect the > calling code to the __next__ method, a semi-coroutine based on the body > of the generator function. At present, the next method waits until an > object is requested. Then it goes into

Re: Python & Go

2009-11-14 Thread Michele Simionato
On Nov 14, 7:18 pm, John Nagle wrote: >      Leaving out exceptions was a mistake.  Exceptions are well understood > now, > and they're far better than the usual "ignore errors" approach one sees in > lamer > C programs. I am also surprised about the lack of exceptions. I could infer that Rob P

Re: Python & Go

2009-11-14 Thread Steven D'Aprano
On Sat, 14 Nov 2009 11:14:04 +, kj wrote: > In <7xpr7lixnn@ruckus.brouhaha.com> Paul Rubin > writes: > >>It seems a little weird to me that they (Google) are concerned with the >>speed of the compiler, indicating that they plan to write enormous >>programs i

Re: Python & Go

2009-11-14 Thread Terry Reedy
Yoav Goldberg wrote: On Sun, Nov 15, 2009 at 12:10 AM, Terry Reedy > wrote: Paul Rubin wrote: Mark Chu-Carroll has a new post about Go: http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php In a couple of minutes, I w

Re: Python & Go

2009-11-14 Thread Yoav Goldberg
On Sun, Nov 15, 2009 at 12:10 AM, Terry Reedy wrote: > Paul Rubin wrote: > > Mark Chu-Carroll has a new post about Go: >> >> >> http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php >> > > In a couple of minutes, I wrote his toy prime filter example in Python, > mostly from

Re: Python & Go

2009-11-14 Thread Terry Reedy
Paul Rubin wrote: Mark Chu-Carroll has a new post about Go: http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php In a couple of minutes, I wrote his toy prime filter example in Python, mostly from the text rather than the code, which I can barely stand to read. It r

Re: Python & Go

2009-11-14 Thread Paul Rubin
sturlamolden writes: > The go keyword could be a problem as well. I suspect it could infringe > on Cilk++ patents. Perhaps Go cannot be used without a licence from > Cilk Arts? Also as somebody said, if after a while they decide to make a new version of the language, they'll have to call it Go2,

Re: Python & Go

2009-11-14 Thread sturlamolden
On 14 Nov, 19:18, John Nagle wrote: > Syntax for queues is a minor win. No, that's syntax bloat. The go keyword could be a problem as well. I suspect it could infringe on Cilk++ patents. Perhaps Go cannot be used without a licence from Cilk Arts? -- http://mail.python.org/mailman/listinfo

Re: Python & Go

2009-11-14 Thread Paul Rubin
kj writes: > One more thing: I found Rob Pike's mutterings on generics (towards > the end of his rollout video) rather offputting, because he gave > the impression that some important aspects of the language were > not even considered before major decisions for it were set in stone. > It looks lik

Re: Python & Go

2009-11-14 Thread Paul Rubin
sturlamolden writes: > And looking at Go, I cannot understand why Google prefer this over > e.g. Lua. I thought Lua had no type system and no concurrency. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & Go

2009-11-14 Thread John Nagle
sturlamolden wrote: On 12 Nov, 01:53, kj wrote: I'm just learning about Google's latest: the GO (Go?) language. It's interesting. The semantics are closer to Java than any other mainstream language. While Java usually is run with a "virtual machine", Go is more like Java hard-compiled (

Re: Python & Go

2009-11-14 Thread Michele Simionato
On Nov 14, 12:26 pm, kj wrote: > > The two goals of replacing C with "something more modern" and at > the same time have a "nearly zero learning curve" seem to me mutually > negating.  The closer to zero the learning curve is, the closer to > C/C++, and therefore the less modern, that language wil

Re: Python & Go

2009-11-14 Thread sturlamolden
On 12 Nov, 01:53, kj wrote: > I'm just learning about Google's latest: the GO (Go?) language. > (e.g.http://golang.orgorhttp://www.youtube.com/watch?v=rKnDgT73v8s). > There are some distinctly Pythonoid features to the syntax, such > as "import this_or_that", the absence of parentheses at the top

Re: Python & Go

2009-11-14 Thread kj
In <129a67e4-328c-42b9-9bf3-152f1b76f...@k19g2000yqc.googlegroups.com> Michele Simionato writes: >It does not look so primitive to me, compared to commonly used >languages. >I am pretty sure that they are "missing a lot of the latest ideas" on >purpose. If they want to succeed and make Go a popu

Re: Python & Go

2009-11-14 Thread kj
In <7xpr7lixnn@ruckus.brouhaha.com> Paul Rubin writes: >It seems a little weird to me that they (Google) are concerned with >the speed of the compiler, indicating that they plan to write enormous >programs in the language. Fast compilation also means that Go ca

Re: Python & Go

2009-11-13 Thread Michele Simionato
On Nov 14, 4:38 am, Paul Rubin wrote: > It seems a little weird to me that they (Google) are concerned with > the speed of the compiler, indicating that they plan to write enormous > programs in the language.  I've heard they use a 1000-node cluster to > compile their

Re: Python & Go

2009-11-13 Thread Paul Rubin
Duncan Booth writes: > > Haskell handles lookups through its type system; dealing with > > lookup errors (say by chaining the Maybe type) is clean and elegant. > I said exceptions or any other method of error handling. I think the use of an option type (like Maybe) is pretty standard and works fi

Re: Python & Go

2009-11-13 Thread Duncan Booth
Paul Rubin wrote: > Nah, exceptions are an ugly effect that gets in the way of > parallelism. Haskell handles lookups through its type system; dealing > with lookup errors (say by chaining the Maybe type) is clean and > elegant. Erlang handles it by crashing the pr

Re: Python & Go

2009-11-12 Thread Paul Rubin
Duncan Booth writes: > > http://scienceblogs.com/goodmath/2009/11/googles_new_language_go.php > > > Thanks for that link. I think it pretty well agrees with my first > impressions of Go: It looks like a not-so-interesting C follow-on, but the article doesn't describe any of the parallelism stuf

Re: Python & Go

2009-11-12 Thread Grant Edwards
On 2009-11-12, Patrick Sabin wrote: > kj wrote: >> >> I'm just learning about Google's latest: the GO (Go?) language. >> (e.g. http://golang.org or http://www.youtube.com/watch?v=rKnDgT73v8s). >> There are some distinctly Pythonoid features to the syntax, such >> as "import this_or_that", the abs

Re: Python & Go

2009-11-12 Thread Patrick Sabin
kj wrote: I'm just learning about Google's latest: the GO (Go?) language. (e.g. http://golang.org or http://www.youtube.com/watch?v=rKnDgT73v8s). There are some distinctly Pythonoid features to the syntax, such as "import this_or_that", the absence of parentheses at the top of flow control const

Re: Python & Go

2009-11-12 Thread Patrick Sabin
Carl Banks wrote: Well, it's hard to argue with not being like C++, but the lack of inheritance is a doozie. Well it has the concept of embedding, which seems to be similar to inheritance. - Patrick -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & Go

2009-11-12 Thread kj
In <3e2ec71b-1bd6-4fc7-b2fd-12ddb6fbd...@p8g2000yqb.googlegroups.com> Carl Banks writes: >...but the lack of >inheritance is a doozie. That's what I like most about it. Inheritance introduces at least as many headaches as it solves. For one, it leads to spaghetti code. When reading such code

Re: Python & Go

2009-11-12 Thread Michele Simionato
I forgot to post a link to a nice analysis of Go: http://scienceblogs.com/goodmath/2009/11/googles_new_language_go.php -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & Go

2009-11-12 Thread Duncan Booth
Michele Simionato wrote: > I forgot to post a link to a nice analysis of Go: > http://scienceblogs.com/goodmath/2009/11/googles_new_language_go.php > Thanks for that link. I think it pretty well agrees with my first impressions of Go: there are some nice bits but there are also some bits they

Re: Python & Go

2009-11-12 Thread Carl Banks
On Nov 11, 8:42 pm, Carl Banks wrote: > On Nov 11, 7:56 pm, geremy condra wrote: > > > On Wed, Nov 11, 2009 at 9:00 PM, Mensanator wrote: > > > On Nov 11, 6:53 pm, kj wrote: > > >> I'm just learning about Google's latest: the GO (Go?) language. > > >> (e.g.http://golang.orgorhttp://www.youtube.

Re: Python & Go

2009-11-12 Thread Michele Simionato
Well, Go looks like Python in the philosophy (it is a minimalist, keep it simple language) more than in the syntax. The one thing that I really like is the absence of classes and the presence of interfaces (I have been advocating something like that for years). I am dubious about the absence of exc

Re: Python & Go

2009-11-11 Thread Mensanator
On Nov 12, 12:44�am, geremy condra wrote: > On Thu, Nov 12, 2009 at 12:27 AM, Mensanator wrote: > > On Nov 11, 9:56�pm, geremy condra wrote: > >> On Wed, Nov 11, 2009 at 9:00 PM, Mensanator wrote: > >> > On Nov 11, 6:53�pm, kj wrote: > >> >> I'm just learning about Google's latest: the GO (Go?

Re: Python & Go

2009-11-11 Thread Vincent Manis
On 2009-11-11, at 21:27, Mensanator wrote: >> Go doesn't support inheritance, so C++ is pretty much out. C >> is a lot closer, but still not all that close. OK, if that's the case (I haven't read the Go documents), then Go is nothing like Python, no matter how many or few semicolons there are in

Re: Python & Go

2009-11-11 Thread geremy condra
On Thu, Nov 12, 2009 at 12:27 AM, Mensanator wrote: > On Nov 11, 9:56 pm, geremy condra wrote: >> On Wed, Nov 11, 2009 at 9:00 PM, Mensanator wrote: >> > On Nov 11, 6:53 pm, kj wrote: >> >> I'm just learning about Google's latest: the GO (Go?) language. >> >> (e.g.http://golang.orgorhttp://www.

Re: Python & Go

2009-11-11 Thread Mensanator
On Nov 11, 9:56 pm, geremy condra wrote: > On Wed, Nov 11, 2009 at 9:00 PM, Mensanator wrote: > > On Nov 11, 6:53 pm, kj wrote: > >> I'm just learning about Google's latest: the GO (Go?) language. > >> (e.g.http://golang.orgorhttp://www.youtube.com/watch?v=rKnDgT73v8s). > >> There are some disti

Re: Python & Go

2009-11-11 Thread Carl Banks
On Nov 11, 7:56 pm, geremy condra wrote: > On Wed, Nov 11, 2009 at 9:00 PM, Mensanator wrote: > > On Nov 11, 6:53 pm, kj wrote: > >> I'm just learning about Google's latest: the GO (Go?) language. > >> (e.g.http://golang.orgorhttp://www.youtube.com/watch?v=rKnDgT73v8s). > >> There are some disti

Re: Python & Go

2009-11-11 Thread geremy condra
On Wed, Nov 11, 2009 at 9:00 PM, Mensanator wrote: > On Nov 11, 6:53 pm, kj wrote: >> I'm just learning about Google's latest: the GO (Go?) language. >> (e.g.http://golang.orgorhttp://www.youtube.com/watch?v=rKnDgT73v8s). >> There are some distinctly Pythonoid features to the syntax, such >> as "

Re: Python & Go

2009-11-11 Thread Mensanator
On Nov 11, 6:53 pm, kj wrote: > I'm just learning about Google's latest: the GO (Go?) language. > (e.g.http://golang.orgorhttp://www.youtube.com/watch?v=rKnDgT73v8s). > There are some distinctly Pythonoid features to the syntax, such > as "import this_or_that", There's more to Python than import