1. For the namespace thing, the answer is no. The variable is scoped to the local context. However, Java does have the concept of public/private members, and Python has no such distinction. We used a syntactical marker ('_foo') to show private members and counted on code reviews to catch transgressions. Because Python has an automated way of setting up getters/setters using the property keyword, this is mitigated somewhat.
2. Dynamic programming errors: the Python world has this neat utility called pychecker, which does a static compile-time check of everything and warns you about potential problems. It catches a LOT of stuff, much like it was a typed language. Also, read this: http://www.artima.com/intv/pycontract.html
3. Agreed about the scripting language stuff - I was being a bit tongue in cheek. To me, they're all just programming languages, and I choose the right one for the job. The great thing about Java isn't the language itself, which is pretty dull, but the incredible support - huge class libraries, J2EE servers, and so on.
4. Python's unofficial motto is "There's only one way to do it." The emphasis is on readability, which is why map and filter are supposedly being dumped, because list comprehensions do the same thing more readably. So you shouldn't be concerned on this front.
Washington/Idaho, eh? Strangely enough, I was nearly in Idaho this summer. I work well remotely, by the way;)
Re:Sometimes I feel like a Luddite...
on
IronPython 1.0 is Born
·
· Score: 2, Informative
Wow, lots of questions! Okay, here we go:
1. There were around 25 people working on our product, with people spread around the province (not state;) We had a good project manager who tracked progress closely; normally there were no more than two people working on the same component. We were lucky in that most people were relatively senior. Also, not everything was the Python part of the server; we also had guys writing kernel code, TI DSP software, etc.
2. We used UML and well-defined interfaces in the form of abstract base classes that were implemented using the staticmethod decorator. An "interface" keyword would have been nice, mind you. Obviously, these interfaces were hammered out before any coding started.
3. Can you clarify the namespace question? Python uses packages and modules aligned along directories much like Java does.
4. Python has built-in support for unit tests. It is considered a part of the "Python way" to use them.
5. We are scaling with hardware, and that works rather well. But you're right, the Python world could really use a JBoss or similar. I guess Zope sort of fits that bill, but I've never been able to figure it out.
6. Object management is a good question. Originally, we cached our objects to prevent bottlenecking the database with reads. Later, we hit on the bright idea of a fully stateless system where every method is decorated with the classmethod keyword. So objects do not maintain state, because no objects are allocated - everything is a class method (obviously, we do create lots of temporary objects to complete tasks, but these lifetimes don't outlast the method they're in). On the downside, every time a request comes in, it means an entirely new Python instance with all the classes needs to be created. Happily, mod_python can cache interpreter instances so multiple requests can come in to our stateless system without causing huge delays. But any time you want to retrieve state, it means a database hit...such is the price of simplicity. Kind of embarrassingly, we got the idea for a fully stateless system from a.Net system.
7. It's not an amazing undertaking. Lots of people are using Python as the back-end these days for their transactional systems. Read about the Django project for some cool examples. Django is a fine piece of work. So is Twisted, which we were originally going to use as well.
8. We chose Python for speed of development and language features. Like Peter Norvig of Lisp and Google fame says, Python is Lisp with a conventional syntax. Practically everything in software boils down to operations on lists of objects. So language features like list comprehensions and dynamic yet strong typing, plus strong support for unit tests, made Python an easy choice. And pydoc is just like javadoc, so we get class documentation for free.
9. I can write "Hello, world" in C in a single line;) How about this: a scripting language is fully interpreted, with no intermediate compilation step. Bash and Javascript are scripting languages, for example. Python, Java, and Perl are bytecode-interpreted languages, while C and C++ are machine-instruction interpreted;)
Anyway, thanks for all the questions. To be honest, I'm off that project now, and I'm looking for contract work, which will probably end up being Java...
Re:Sometimes I feel like a Luddite...
on
IronPython 1.0 is Born
·
· Score: 2, Interesting
"However, if your task is implementing a large, distributed client/server app involving tens of thousands of classes coded by dozens of people, reliable object transfer/messaging, reliable easy access to various forms of communications (Sockets, etc), the ability to run on Unix, coordination of multiple groups in many locations, etc.. and you want to be able to maintin it for a few years, your only rational choice is Java."
Oddly enough, I just finished a 3.5 year project very much like what you described, and we rejected Java in favour of Python. It worked out great. Java feels so clunky now - no list comprehensions!
By the way, what's a scripting language? Python compiles to an intermediate object code, runs on a virtual machine, and is very portable. I guess that makes Java a scripting language, too?
You're right, I did miss the point. Well, there's stuff like Inferno, which I've read about but never tried, and which is definitely very different. It's based on Plan 9 circa 1996, which sort of fails your legacy requirement. But it's certainly very cool.
I agree that Linux (which I use every day) and all other Unix derivatives are things of the past. Despite its somewhat radical design (for example, you can't run native code on it - the entire os is a virtual machine), Inferno is marketed as a Unix successor.
iptables is a part of the Linux kernel. There is a userspace program called 'iptables' that acts as a front end, but all packet filtering, rule traversing, etc. happens in kernel space.
Linux does not have well-defined interfaces, particularly not at the kernel level. Just ask any driver writer.
"Not too far down the line, it will become completely impossible for any fully independent developer to compete against the collosal pyramid of software resources being constructed by the FOSS movement."
There are thousands of niche apps created by small vendors that have no open source equivalent, and never will. Give your head a shake, and stop dreaming.
Realise that there will always be a place - a very large place - for proprietary, paid-for software. Usability, strange niches (like bingo cards), custom projects, games, and so on will always mean a huge marketplace for software. And yes, I have written Linux kernel code, contributed to projects like KDE and Asterisk, and so on and so forth. But I write closed source software for a living, on contract, and let me tell you, there is so much work out there it's crazy, and it's only getting bigger.
Where precisely did I say I think everyone should think like me? I think you have some anger issues to work out. A reading comprehension class might help too, as would a sense of humour.
Python is used commercially all over the place. My friend bought Civilization IV, and I was astounded to see it supports game modifications via Python. Meanwhile, I read an interview with the guy behind PyQt, the Python bindings for Trolltech's Qt library, and he said he has over 200 commercial users - including Disney, Pixar, and Industrial Light and Magic. All of these companies use Python and Qt, an extremely powerful app development environment if I've ever seen one. It seems like a natural match.
So the reason you don't hear Python hype is because the language simply doesn't need it. Ruby hasn't "arrived" yet, so its supporters are more vocal. It's all very similar to desktop Linux.
You're in luck! Here's a quote from Guido: "Maybe my spiritual beliefs shine through here -- I'm a convinced atheist."
I don't know anything about Ruby's creator, but Larry Wall has always creeped me out too. I sure was happy when Python came along - a sensible language created by a logical Dutchman.
FreeNX is the solution. Not that tough to set up at all, and it performs very well, much better than VNC. It even has a (very ugly) gui. However, it doesn't use RDP, so you have to access the server with an NX client.
C is a terribly inefficient language for GUI programming - it's all about time to market. How many commercial products can you name that use GTK? Meanwhile, Qt is successfully used all over the place, from Google to Adobe to all that phone stuff.
Worth considering by who? Justifying things on the basis of ancient philosophies in the absence of empirical evidence is useless. You can argue all you want about the existence of the soul or God or the Tooth Fairy, but until you can measure these things, no one cares.
Don't worry though, they'll catch up one day. From what I observed, it's mostly just old people anyway. The young are still drinking, fucking, and having fun just like their peers in the West.
This debate is only in the U.S. The rest of the Western world got over it a long time ago, women's rights are a fact of life, and yes, it's commonly accepted that abortion isn't a form of murder. Sorry to burst your bubble.
What?? This is the most misinformed thing I've read here in a long time, and that's saying something.
Apple used the Mach kernel (not associated with BSD at all) and parts of BSD Unix (originally 4.3BSD, later FreeBsd) to form a kernel called XNU. It is a notably poor performer. Meanwhile, there is a userspace component to provide stuff like POSIX compliance and so forth. This whole thing together is called Darwin.
What makes OS X interesting and, in my opinion, awesome, is not Darwin. Quartz, pervasive Unicode, ColorSync, XGrid, etc. are all way more topical than the kernel and its interface. People here focus on the bits of BSD that are in OS X, but really I don't think those things play much of a part in what makes this the world's best consumer OS.
You think trolling Slashdot is interesting and fulfilling? I sure don't. Bashing online delivery because it doesn't suit your probably-unemployed circumstances is just dumb, that's all.
"Oh, but you are Canadian. I know what you are talking aboot. You live in some frigid area where it's like 50 miles to get to any place that has more than 50 people living together in a thing called a city."
Spud.ca only delivers to the Vancouver metropolitan area, which has something like 2 million people. Despite your lame musical pretensions, you really do seem awfully thick.
The city in question where this is happening, Vancouver, is well-known as having pretty much the skinniest population in North America. So it would seem there isn't much to your asserted correlation between coinless meters and getting fat.
I order my groceries online via spud.ca. It's a fantastic service and it saves me loads of time to do more interesting and fulfilling things than walking down to the market. I guess you have lots of empty hours to kill. Have you considered a hobby?
Evolution is not a hypothesis. It's a scientific theory, lending it huge validity and overwhelming acceptance in the scientific community. Questioning it as an untrained layman makes you come across as a perpetual motion/zero point energy type of crackpot. Also, religious viewpoints in general tend to be openly mocked here, which is nice.
Evolution explains how life adapts to a certain set of circumstances, possibly resulting in speciation. It has nothing to say about the origins of life, just about how extant species adapt and change. You may not care about this area of research, but lots of other people do. You are of course free to pursue your own "origins of life" research channels.
Maybe the US should consider studying countries with successful public education systems - Japan, Canada, Korea, and Finland spring to mind.
Okay, let's see:
h tml
;)
1. For the namespace thing, the answer is no. The variable is scoped to the local context. However, Java does have the concept of public/private members, and Python has no such distinction. We used a syntactical marker ('_foo') to show private members and counted on code reviews to catch transgressions. Because Python has an automated way of setting up getters/setters using the property keyword, this is mitigated somewhat.
2. Dynamic programming errors: the Python world has this neat utility called pychecker, which does a static compile-time check of everything and warns you about potential problems. It catches a LOT of stuff, much like it was a typed language. Also, read this: http://www.artima.com/intv/pycontract.html
3. Agreed about the scripting language stuff - I was being a bit tongue in cheek. To me, they're all just programming languages, and I choose the right one for the job. The great thing about Java isn't the language itself, which is pretty dull, but the incredible support - huge class libraries, J2EE servers, and so on.
4. Python's unofficial motto is "There's only one way to do it." The emphasis is on readability, which is why map and filter are supposedly being dumped, because list comprehensions do the same thing more readably. So you shouldn't be concerned on this front.
Here, read this for god's sake: http://dirtsimple.org/2004/12/python-is-not-java.
Washington/Idaho, eh? Strangely enough, I was nearly in Idaho this summer. I work well remotely, by the way
Wow, lots of questions! Okay, here we go:
;) We had a good project manager who tracked progress closely; normally there were no more than two people working on the same component. We were lucky in that most people were relatively senior. Also, not everything was the Python part of the server; we also had guys writing kernel code, TI DSP software, etc.
.Net system.
;) How about this: a scripting language is fully interpreted, with no intermediate compilation step. Bash and Javascript are scripting languages, for example. Python, Java, and Perl are bytecode-interpreted languages, while C and C++ are machine-instruction interpreted ;)
1. There were around 25 people working on our product, with people spread around the province (not state
2. We used UML and well-defined interfaces in the form of abstract base classes that were implemented using the staticmethod decorator. An "interface" keyword would have been nice, mind you. Obviously, these interfaces were hammered out before any coding started.
3. Can you clarify the namespace question? Python uses packages and modules aligned along directories much like Java does.
4. Python has built-in support for unit tests. It is considered a part of the "Python way" to use them.
5. We are scaling with hardware, and that works rather well. But you're right, the Python world could really use a JBoss or similar. I guess Zope sort of fits that bill, but I've never been able to figure it out.
6. Object management is a good question. Originally, we cached our objects to prevent bottlenecking the database with reads. Later, we hit on the bright idea of a fully stateless system where every method is decorated with the classmethod keyword. So objects do not maintain state, because no objects are allocated - everything is a class method (obviously, we do create lots of temporary objects to complete tasks, but these lifetimes don't outlast the method they're in). On the downside, every time a request comes in, it means an entirely new Python instance with all the classes needs to be created. Happily, mod_python can cache interpreter instances so multiple requests can come in to our stateless system without causing huge delays. But any time you want to retrieve state, it means a database hit...such is the price of simplicity. Kind of embarrassingly, we got the idea for a fully stateless system from a
7. It's not an amazing undertaking. Lots of people are using Python as the back-end these days for their transactional systems. Read about the Django project for some cool examples. Django is a fine piece of work. So is Twisted, which we were originally going to use as well.
8. We chose Python for speed of development and language features. Like Peter Norvig of Lisp and Google fame says, Python is Lisp with a conventional syntax. Practically everything in software boils down to operations on lists of objects. So language features like list comprehensions and dynamic yet strong typing, plus strong support for unit tests, made Python an easy choice. And pydoc is just like javadoc, so we get class documentation for free.
9. I can write "Hello, world" in C in a single line
Anyway, thanks for all the questions. To be honest, I'm off that project now, and I'm looking for contract work, which will probably end up being Java...
"However, if your task is implementing a large, distributed client/server app involving tens of thousands of classes coded by dozens of people, reliable object transfer/messaging, reliable easy access to various forms of communications (Sockets, etc), the ability to run on Unix, coordination of multiple groups in many locations, etc.. and you want to be able to maintin it for a few years, your only rational choice is Java."
Oddly enough, I just finished a 3.5 year project very much like what you described, and we rejected Java in favour of Python. It worked out great. Java feels so clunky now - no list comprehensions!
By the way, what's a scripting language? Python compiles to an intermediate object code, runs on a virtual machine, and is very portable. I guess that makes Java a scripting language, too?
You're right, I did miss the point. Well, there's stuff like Inferno, which I've read about but never tried, and which is definitely very different. It's based on Plan 9 circa 1996, which sort of fails your legacy requirement. But it's certainly very cool.
I agree that Linux (which I use every day) and all other Unix derivatives are things of the past. Despite its somewhat radical design (for example, you can't run native code on it - the entire os is a virtual machine), Inferno is marketed as a Unix successor.
Have a look at Haiku:
http://haiku-os.org/learn.php
iptables is a part of the Linux kernel. There is a userspace program called 'iptables' that acts as a front end, but all packet filtering, rule traversing, etc. happens in kernel space.
Linux does not have well-defined interfaces, particularly not at the kernel level. Just ask any driver writer.
I take it you also consider not collecting stamps a hobby.
"Not too far down the line, it will become completely impossible for any fully independent developer to compete against the collosal pyramid of software resources being constructed by the FOSS movement."
There are thousands of niche apps created by small vendors that have no open source equivalent, and never will. Give your head a shake, and stop dreaming.
Realise that there will always be a place - a very large place - for proprietary, paid-for software. Usability, strange niches (like bingo cards), custom projects, games, and so on will always mean a huge marketplace for software. And yes, I have written Linux kernel code, contributed to projects like KDE and Asterisk, and so on and so forth. But I write closed source software for a living, on contract, and let me tell you, there is so much work out there it's crazy, and it's only getting bigger.
Where precisely did I say I think everyone should think like me? I think you have some anger issues to work out. A reading comprehension class might help too, as would a sense of humour.
Python is used commercially all over the place. My friend bought Civilization IV, and I was astounded to see it supports game modifications via Python. Meanwhile, I read an interview with the guy behind PyQt, the Python bindings for Trolltech's Qt library, and he said he has over 200 commercial users - including Disney, Pixar, and Industrial Light and Magic. All of these companies use Python and Qt, an extremely powerful app development environment if I've ever seen one. It seems like a natural match.
So the reason you don't hear Python hype is because the language simply doesn't need it. Ruby hasn't "arrived" yet, so its supporters are more vocal. It's all very similar to desktop Linux.
You're in luck! Here's a quote from Guido: "Maybe my spiritual beliefs shine through here -- I'm a convinced atheist."
I don't know anything about Ruby's creator, but Larry Wall has always creeped me out too. I sure was happy when Python came along - a sensible language created by a logical Dutchman.
FreeNX is the solution. Not that tough to set up at all, and it performs very well, much better than VNC. It even has a (very ugly) gui. However, it doesn't use RDP, so you have to access the server with an NX client.
C is a terribly inefficient language for GUI programming - it's all about time to market. How many commercial products can you name that use GTK? Meanwhile, Qt is successfully used all over the place, from Google to Adobe to all that phone stuff.
Worth considering by who? Justifying things on the basis of ancient philosophies in the absence of empirical evidence is useless. You can argue all you want about the existence of the soul or God or the Tooth Fairy, but until you can measure these things, no one cares.
"What's the point of democratic government if not to impose a generally agreed-upon morality?"
What an archaic idea of government you have. Things have moved on since the Middle Ages.
Don't worry though, they'll catch up one day. From what I observed, it's mostly just old people anyway. The young are still drinking, fucking, and having fun just like their peers in the West.
This debate is only in the U.S. The rest of the Western world got over it a long time ago, women's rights are a fact of life, and yes, it's commonly accepted that abortion isn't a form of murder. Sorry to burst your bubble.
What?? This is the most misinformed thing I've read here in a long time, and that's saying something.
Apple used the Mach kernel (not associated with BSD at all) and parts of BSD Unix (originally 4.3BSD, later FreeBsd) to form a kernel called XNU. It is a notably poor performer. Meanwhile, there is a userspace component to provide stuff like POSIX compliance and so forth. This whole thing together is called Darwin.
What makes OS X interesting and, in my opinion, awesome, is not Darwin. Quartz, pervasive Unicode, ColorSync, XGrid, etc. are all way more topical than the kernel and its interface. People here focus on the bits of BSD that are in OS X, but really I don't think those things play much of a part in what makes this the world's best consumer OS.
You think trolling Slashdot is interesting and fulfilling? I sure don't. Bashing online delivery because it doesn't suit your probably-unemployed circumstances is just dumb, that's all.
"Oh, but you are Canadian. I know what you are talking aboot. You live in some frigid area where it's like 50 miles to get to any place that has more than 50 people living together in a thing called a city."
Spud.ca only delivers to the Vancouver metropolitan area, which has something like 2 million people. Despite your lame musical pretensions, you really do seem awfully thick.
Hahaha, fair enough. Who would have thought that the fine line between fat and skinny was the two metres between the car door and the parking meter?
The city in question where this is happening, Vancouver, is well-known as having pretty much the skinniest population in North America. So it would seem there isn't much to your asserted correlation between coinless meters and getting fat.
I order my groceries online via spud.ca. It's a fantastic service and it saves me loads of time to do more interesting and fulfilling things than walking down to the market. I guess you have lots of empty hours to kill. Have you considered a hobby?
Evolution is not a hypothesis. It's a scientific theory, lending it huge validity and overwhelming acceptance in the scientific community. Questioning it as an untrained layman makes you come across as a perpetual motion/zero point energy type of crackpot. Also, religious viewpoints in general tend to be openly mocked here, which is nice.
Evolution explains how life adapts to a certain set of circumstances, possibly resulting in speciation. It has nothing to say about the origins of life, just about how extant species adapt and change. You may not care about this area of research, but lots of other people do. You are of course free to pursue your own "origins of life" research channels.