IMO this is a myth. Python's dynamic typing causes more problems than
it solves. Runtime errors suck, and tracking them down is a huge
productivity drain in my experience. (Not to mention the reliability
issues in production environments.)
Of course, I'm more than a little biased. ;-)
Andrew
IMO it has a lot less to do with the tools than with how they are used.
You can certainly stumble into monkey-patch hell with any number of
dynamic languages, or use pointer arithmetic to load the Russian Roulette
pistol with five bullets in C. Conversely, you can use those very
facilities to construct expressive, understandable code if you know what
you're doing and make it clear to the next person who comes along.
Choosing a language is more about the ability to express your solution to
a problem than it is about preventing bugs. Some problems are better
expressed in languages that can modify themselves. Some benefit from
abstractions that are more oriented towards process control. The list
goes on. That's why there are n languages, with n^n evangelists.
--
.o. | Sterling (Chip) Camden | http://camdensoftware.com
..o | ster...@camdensoftware.com | http://chipsquips.com
ooo | 2048R/D6DBAF91 | http://chipstips.com
Ragging on python is too easy ;)
If high performance is the overriding requirement then Go is a very good choice, and the productivity loss compared to dynamic languages is only marginal - by the time you factor in writing tests etc. Go is competitive with both Python and Ruby for any problem that's not heavily based in dynamic typing. And even then you lose a lot less productivity than would be the case in Java or C++.
Ellie
Eleanor McHugh
Games With Brains
http://feyeleanor.tel
----
if _, ok := reality.(Reasonable); !ok { panic(reality) }
On Mar 29, 2011, at 8:04 PM, luisbebop <luis...@gmail.com> wrote:
> Hi Brad.
>
> I've tried your code but i got the error:
>
> "
> 2011/03/29 20:50:36 Accepted 247
> 2011/03/29 20:50:36 Accepted 248
> 2011/03/29 20:50:36 accept error: accept tcp 0.0.0.0:2020: too many
> open files
> "
You need to raise your ulimit which isn't straightforward on a Mac. See
http://joerg.delker.de/blog/?tag=ulimit
Brian
>
Windows users should be able to regedit this registry key
outbound concurrent connections for each IP Address
[HKEY_LOCAL_MACHINE \System \CurrentControlSet \Services
\Tcpip\Parameters] MaxUserPort = 5000 (Default = 5000, Max = 65534)
-joe
If you're into experimenting, you might want to check out node.js
(http://nodejs.org/) as it uses async event driven model and can
handle massive amounts of connections.
In the Python world, there are many frameworks that can handle such
numbers of concurrent connections: Twisted, Tornado, gevent, etc.
There's even a WSGI server called Gunicorn which is compatible with
most python web frameworks and offers features you need.
Twisted is suitable for much more than just web app server
implementation but it has a bit of a steep learning curve. Tornado
looks pretty impressive and I would definitely give it a shot if I
were you.
In my experiments, I used gunicorn with gevent worker (with nginx in
front of it all) and having recommended number of workers (2 *
num_cores) + 1 and was able to reach thousands of connections on my
moderate test hardware.
There was someone on the list recently who wrote a benchmark for Go
and Python, you might want to check that out as well.
As for me, it would be a close match between Erlang and Go, depending
very much on what kind of server you're trying to implement (if it's
not a http server).
-alex.
--
a lex 13 x
http://www.a13x.info
Another Bug which was closed recently would have prevented creating
On Mar 30, 6:16 am, Brad Fitzpatrick <bradf...@google.com> wrote:
> Yeah, just crank it up to 65k or something.
>
> I thought Debian's old 1024 default was silly. OS X apparently beats even
> that!
>
more threads anyway:
http://code.google.com/p/go/source/detail?r=085423df5c7fbb6a7561db8b022f13d3398c2a9c
] IMO this is a myth. Python's dynamic typing causes more problems than
] it solves. Runtime errors suck, and tracking them down is a huge
] productivity drain in my experience. (Not to mention the reliability
] issues in production environments.)
I've just written about this in a little more depth in the
first section of
http://eris.okfn.org/ww/2011/03/gockan
the problem you speak of is compounded, in my experience, by
eventually requiring a bloated test suite to check for what
amount to type errors. And the larger the test suite, the
longer it takes to run and the less productive Python becomes.
Cheers,
-w
--
William Waites <mailto:w...@styx.org>
http://river.styx.org/ww/ <sip:w...@styx.org>
F4B3 39BF E775 CF42 0BAB 3DF0 BE40 A6DF B06F FD45