Domain: python.org
Stories and comments across the archive that link to python.org.
Comments · 1,513
-
Re:Could be worse
Like someone else said, freeze does this for unix executables. Py2Exe does this for windows exe files.
Hope that helps. -
Re:Comments
And make sure they update comments if changes necessitate it. There's nothing worse than reading through a function's description, complete with well-documented inputs/outputs/conditions/etc. and finding out that those things no longer apply because somebody changed a 1 to a 2.
That's why it's nice to have some formal semantics for inputs, outputs and conditions so that the documentation can be easily and automatically converted to, say, unittests. Take, for instance, JML which provides semantics for commenting your functions in a way that
(1) Can be used to generate automatic runtime checks for debugging
(2) Can be automatically included in your documentation
(3) Can be used to automatically generate JUnit unit tests
If you change the code but not the comment in a way that means it no longer behaves as the comment indicates... well the code will fail the unit test.
Even little things like Python's doctest module can be kind of nice, ensuring that the docstrings still represent the code they are meant to be documenting.
Jedidiah. -
Re:AAX???
Python can't run untrusted code. There used to be a way of doing so, but it was shown to be fundamentally insecure and abandoned. Nobody has found it necessary enough to replace it with something more secure. A web browser called Grail was written in Python years ago that could run Python scripts, but obviously that's insecure too as it relied on the above mentioned functionality.
-
Re:Java ???
> Good Java programmers... use Python instead.
-
My recommendation
I would seriously recommend Python http://www.python.org/ to someone who hasn't had any programming experience. Although I've only picked up this language recently and after I already had knowledge of several other languages. It scales nicely, and it is very similar in many aspects to other languages. The way it works on whitespace helps you to learn how to tab and format code in other languages. The great thing is that the distribution also includes a tutorial. I know you are looking for another answer, but the only way to learn how to program is to look at a language, read a book/tutorial and play around with it. Python is a great language to do this with. Take my advice if you are doing this in your spare time: if you aren't having fun don't do it. Coding isn't for everyone, but if you enjoy picking through your own code and finally finding your mistakes, or the pleasure of seeing something you had in your head become a reality, then give it a shot. Remember that everyone makes stupid mistakes coding and just have fun with it.
-
Here's a couple to look at
Compete File System at http://www.python.org/pycon/2005/papers/46/Compet
e FileSystem.pdf.
MogileFS at http://www.danga.com/mogilefs/ -
Re:Guile
Bad job avoiding the point. Read the post by Ian Bicking discussing how Guile relates to Parrot.
Those who ignore history are bla bla bla...
-Don
-
Guile
The Gnu kernel is being actively developed, and has bla bla bla...
Why aren't you just extending Guile, which has been declared the official GNU scripting langauge by none other than RMS himself.
Tom Lord discusses the history of Guile, in the context of the great TCL war, which happened just before Java came onto the scene.
Ian Bicking discusses some of the reasons why Guile failed to gain any traction.
-Don
-
Re:Perl's place in todays world?
The cheeseshop is currently the closest thing python has to CPAN. Only ~900 modules compared to CPAN's 8,000+, so it still has a way to go. There is also the Vaults of Parnassus.
Also, the daily python url is a great way to keep up with the latest developments in the Python world.
-
Re:Actually Link Grammar checker is not GPL...No, Python, is released under a license very similar to the BSD licenses, see http://www.python.org/doc/Copyright.html for details. and they use no mozilla code.
How to submit code to OpenOffice.org
We ask that all code submitted to OpenOffice.org be submitted via Issue Tracker . In your submission please list "Issue Type" as PATCH. Your code will be sent to the committer for the appropriate project.
- Submit a filled-out copy of the Joint Copyright Assignment form (JCA); we have a PDF version you may print out. We explain our reasons for requiring the JCA in the Licensing FAQ. The FAQ further explain the use and advantages of using this license.
This means that you CANNOT submit someone else's GPL code.You can however take Openoffice.org code and submit it to Kword or Abiword,
This is not FUD, it is a reality check that Openoffice.org does not have access to as much GPL code as projects that do not require Copyright assignment.
NeoOffice can add the the grammer checker that abiword uses because they do not require copyright assignment.
Sun and the Free Software Foundation like demanding copyright assignment, but they also get limited contributions from the community and seem to spend time complaining about it instead of realizing that many people don't like giving their work away for nothing. Kind of ironic since both organizations release software under the GPL. -
Re:Actually Link Grammar checker is not GPL...No, Python, is released under a license very similar to the BSD licenses, see http://www.python.org/doc/Copyright.html for details. and they use no mozilla code.
How to submit code to OpenOffice.org
We ask that all code submitted to OpenOffice.org be submitted via Issue Tracker . In your submission please list "Issue Type" as PATCH. Your code will be sent to the committer for the appropriate project.
- Submit a filled-out copy of the Joint Copyright Assignment form (JCA); we have a PDF version you may print out. We explain our reasons for requiring the JCA in the Licensing FAQ. The FAQ further explain the use and advantages of using this license.
This means that you CANNOT submit someone else's GPL code.You can however take Openoffice.org code and submit it to Kword or Abiword,
This is not FUD, it is a reality check that Openoffice.org does not have access to as much GPL code as projects that do not require Copyright assignment.
NeoOffice can add the the grammer checker that abiword uses because they do not require copyright assignment.
Sun and the Free Software Foundation like demanding copyright assignment, but they also get limited contributions from the community and seem to spend time complaining about it instead of realizing that many people don't like giving their work away for nothing. Kind of ironic since both organizations release software under the GPL. -
Re:Who is this XS4ALL?
And they host www.python.org.
-
Re:You're not getting "functional programming" rig
Point the third: please explain how anonymous closures are superior to lambda constructs, list comprehensions, or generators each used in the appropriate context.
There are two things I can think of (and I'm saying this as a Python advocate): finalization and some kinds of callbacks (some callbacks are best presented as functions, so they are already fine in Python). Finalization currently is done in python with try:finally:, and it's easy to forget the proper wrapping. Python 2.5 will add a new construct for this, described in PEP 343 (with some acknowledged heritage from Ruby). The second, callbacks, I think is largely addressed with coroutines, described in PEP 342.Some people would say that Ruby's one feature -- anonymous closures -- is superior because it is responsible for all sorts of functionality that is implemented via several constructs in Python. That I would disagree with -- the features (things like looping) are such fundamental patterns in a language that their use will always be idiomatic, no matter how elegantly they fit into some underlying syntax or functionality.
-
Re:You're not getting "functional programming" rig
Point the third: please explain how anonymous closures are superior to lambda constructs, list comprehensions, or generators each used in the appropriate context.
There are two things I can think of (and I'm saying this as a Python advocate): finalization and some kinds of callbacks (some callbacks are best presented as functions, so they are already fine in Python). Finalization currently is done in python with try:finally:, and it's easy to forget the proper wrapping. Python 2.5 will add a new construct for this, described in PEP 343 (with some acknowledged heritage from Ruby). The second, callbacks, I think is largely addressed with coroutines, described in PEP 342.Some people would say that Ruby's one feature -- anonymous closures -- is superior because it is responsible for all sorts of functionality that is implemented via several constructs in Python. That I would disagree with -- the features (things like looping) are such fundamental patterns in a language that their use will always be idiomatic, no matter how elegantly they fit into some underlying syntax or functionality.
-
Python's way ahead of ya
Actually, I don't know if this is exactly the same feature, but it sounds like it can be used that way. Check out the What's new in Python entry. This is currently implemented in Python CVS, to be available in Python 2.5.
The actual Python Enhancement Proposal gives more detail and several badass use-cases. -
Python's way ahead of ya
Actually, I don't know if this is exactly the same feature, but it sounds like it can be used that way. Check out the What's new in Python entry. This is currently implemented in Python CVS, to be available in Python 2.5.
The actual Python Enhancement Proposal gives more detail and several badass use-cases. -
whitespace
Truth is, Slashdot editors were probably just trolling for jokes about a python exploding from eating too much whitespace.
-
Re:Why design a new language?
You can do this in Python too, thanks to generators (which lets you treat inline code as "template methods" in controlling classes). There are some limitations in the current design (related to object passing and exception handling) which will be addressed in a future release:
http://www.python.org/peps/pep-0343.html
For the bigger perspective, see:
http://www.python.org/peps/pep-0340.html (an earlier version of 343)
http://www.python.org/peps/pep-0342.html (the "other half" of 343) -
Re:Why design a new language?
You can do this in Python too, thanks to generators (which lets you treat inline code as "template methods" in controlling classes). There are some limitations in the current design (related to object passing and exception handling) which will be addressed in a future release:
http://www.python.org/peps/pep-0343.html
For the bigger perspective, see:
http://www.python.org/peps/pep-0340.html (an earlier version of 343)
http://www.python.org/peps/pep-0342.html (the "other half" of 343) -
Re:Why design a new language?
You can do this in Python too, thanks to generators (which lets you treat inline code as "template methods" in controlling classes). There are some limitations in the current design (related to object passing and exception handling) which will be addressed in a future release:
http://www.python.org/peps/pep-0343.html
For the bigger perspective, see:
http://www.python.org/peps/pep-0340.html (an earlier version of 343)
http://www.python.org/peps/pep-0342.html (the "other half" of 343) -
Re:Why design a new language?
Language design is like the opposite to mountain climbing:
Q: Why design a new language?
A: Because it isn't there yet.We wouldn't have Python if people took your "why design a new language" argument seriously. Language design would have stopped years ago, with that parochial attitude.
Peaker, carefully read what "sickofthisshit" wrote about Lisp macros -- he hit the nail on the head: they're extremely important and Python suffers from not supporting them.
You are dead wrong about there being few cases where domain specific languages are useful.
I love Python and I write a lot of code in it, but the one big thing it's missing is macros. You can't just strap a decent macro system onto Python (or Java), because of Python's non-lisp-like syntax. Sure, Python has a parse tree api, but seriously, have you ever actually taken a look at it?!? It's *HORRIBLY* low level and totally inappropriate to implement a macro system with.
Lisp's parenthesis are just as easy to get used to as Python's indentation. There's nothing unreadable about Lisp syntax, unless you simply don't know the language, in which case you're not qualified to criticize it.
Sure, Python is great for whacking off web servers, but as you point out, it's not compiled, it's interpreted by its very design (which is why you seem to think that evaluating strings is as powerful as macros). You don't seem to get how important it is that Lisp code can be efficiently compiled, and that the programmer can deeply extend the compiler and tailor the language with macros.
-Don
-
Linux is not a compiler.
While the preferred method would be simply use Linux, unfortunately my company is using Microsoft Visual Studio 6.0 with C++
Quit with the "Linux solves everything" cluelessness - Linux is not a C++ compiler. You mean to say that you think you'd rather develop under Linux than Windows. Okay, but then you have to decide what compiler (probably GCC) build system (Make, Scons?), version control (Subversion, CVS?) and what IDE or text editor to use (Eclipse, vi, Emacs?). If you're working in a team, it's going to be essential to at least standardise compiler and build system.
One thing you may be overlooking is that it's easy to duplicate what you refer to as the "Linux" toolchain experience on Windows - proving that there's nothing exclusively "Linux" about them. Thank GNU and the open source movement, not necessarily some guy from Finland:
* MingW32 is an excellent port of GCC to Windows. It probably has some difficulty compiling MSVC-specific code (I doubt MFC and .NET classes work), but you should ideally be using a cross-platform framework like wxWidgets instead anyway.
* Scons is a great Python based build scripting system. It leaves Makefiles in the dust as it allows you to use Python logic in the make process. I've personally run it on four different platforms (Windows, Linux, FreeBSD and Mac) and would never go back to Make. Although it helps, but is not necessary to be a Python fanatic (and if you don't know Python, take 20 minutes to follow the "Instant Python" tutorial linked on their site - it's possible you will fall in love with the language instantly).
* Eclipse is a nice cross-platform IDE that works well on Windows (and Linux, FreeBSD and the Mac). When used with the C++ extensions you get full syntax highlighting, project browsing and integrated debugging. Via custom project settings, it can be easily told how to build Scons projects instead of Makefile ones. (The only problem I've ever had working with Scons is requiring different settings to build Debug and Release builds, but I just set the IDE up to do Debug [work with that most of the time], then compiling and running Release from the command line).
And all of the above can be made to work nicely on Windows and Linux. If you switch to using those cross-platform tools on Windows, at some point your choice of platform becomes irrelevent and transitioning to Linux becomes extremely easy. -
Re:Screensavers, music, and Unicode?OK, examples have been given up-thread.
For God's sake, it's still my language of choice! It's not like I'm condemning it, I'm just saying it'll be nice when the whole language can sit still for a few months. Here:
http://docs.python.org/lib/node110.html
It says "deprecated functions". Now, go scream "FUD" at Guido, yah swab!
-
Perl 6 is a mistake.I've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespacethank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. It's like Ada all over again! The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying.
-
um, not quite
Except, of course, for the fact that Neverwinter Nights doesn't use Lua at all. It's using a custom C-like language.
Lua's cool and all (and BioWare has used it for the Baldur's Gate games and the underrated MDK2), but it's not in NWN or NWN2.
In other game scripting news, Freedom Force and its sequal use the delicious Python. -
Re:Fantastic ...
The downside is that my program runs much slower than if it had been written in C++. So if you do a lot of computations in there might want to stick with C, it all depends...
One of the upsides of python is it's ability to work with native code modules (C or C++) wihout the JNI-like crap you have to get through to create native extensions to java code.
modularize and unit-test your code well, then profile it to extract the worst performing routines or modules (using the built in profiler, in the "profiler" module), try to optimize them and if you can't just rewrite them to native if needed. You have your unit tests, so the module'll perform just as well as the cPython ones quality-wise, and will be much faster.
It should also be noted that since you wrote the application a week after learning python, it may be very unpythonic and therefore very inefficient (remember, Python is not Java). Check PythonSpeed andPerformance Tips on the Wiki for more informations about speed-improving Python usages.
Last resource, if you need some more speed but don't want to switch to native modules, you may try Psyco if you don't care that much about RAM consumption
-
Re:Fantastic ...
The downside is that my program runs much slower than if it had been written in C++. So if you do a lot of computations in there might want to stick with C, it all depends...
One of the upsides of python is it's ability to work with native code modules (C or C++) wihout the JNI-like crap you have to get through to create native extensions to java code.
modularize and unit-test your code well, then profile it to extract the worst performing routines or modules (using the built in profiler, in the "profiler" module), try to optimize them and if you can't just rewrite them to native if needed. You have your unit tests, so the module'll perform just as well as the cPython ones quality-wise, and will be much faster.
It should also be noted that since you wrote the application a week after learning python, it may be very unpythonic and therefore very inefficient (remember, Python is not Java). Check PythonSpeed andPerformance Tips on the Wiki for more informations about speed-improving Python usages.
Last resource, if you need some more speed but don't want to switch to native modules, you may try Psyco if you don't care that much about RAM consumption
-
Re:To all you guys
It looks like there's a Python wrappper for the Win32 API. I shall have to make a note of it; it might come in handy if I ever start using Windows regularly again.
-
"future of cross-platform development"
-
Re:" All it does is..."The Python WSGI spec (PEP 333) is trying to address exactly this issue. And I agree it's an issue -- I maintain quite a lot of Python applications (not in CherryPy, but same basic setup) and it can be really annoying. CherryPy supports WSGI, though its WSGI support isn't perfect (but they're aware and working on it).
Relatedly I just released Paste Deploy, which is also intended to address these issues. It's just a small piece that will only be useful given more infrastructure support, but I'm optimistic. In the end I think it will mean some specific setup to support Python applications on a server, but once the basic support is configured adding an application should be a one-line affair.
-
" All it does is..."
It says "All it does is connect the Web server to your Python code with as little fuss as possible. It doesn't make decisions about what other tools to use,
..."
And then in the very next paragraph, it says: "Instead of relying on Apache or another Web server, CherryPy runs its own small Python-based Web server."
No, no, no!
I love CherryPy as a way of routing requests to Python objects and functions. Rock on!
But look, I'm running like 20 wiki and 5 custom web apps and a few WordPress installations on my server.
And they are all plugged into Apache.
So, actually, in fact, CherryPy has now made some decisions about what tools I'm supposed to use.
Sure, I can forward requests from Apache to the CherryPy server, but that is yet another hassle, it is yet another thing to support and maintain and think about.
I wish instead that the CherryPy dev's had made it so there were multiple adapters to the CherryPy system.
All that said:
CherryPy is my favorite system for doing web apps in Python. I've used it, I've loved it, it's great. It does make programming WebApps "fun," which is perverse. So, it's succeeded.
But I strongly dislike how I have to do this funny Apache business to get it to run on port 80, or I have to give people weird 8080 addresses, like you saw in the article.
Another thing I dislike, is that it's kind of tricky to get it to do XML-RPC, in my experience. (Then again, that was 3 months ago. Perhaps things have changed now.)
(I just use AutoXmlRpcServer or AutoXmlRpcCgi for when it's XML-RPC alone, without a web side along with it.)
But again: CherryPy is my favorite, when there is no XML-RPC aspect, and when I don't mind the weird config stuff I have to do to get it to cooperate with Apache. -
" All it does is..."
It says "All it does is connect the Web server to your Python code with as little fuss as possible. It doesn't make decisions about what other tools to use,
..."
And then in the very next paragraph, it says: "Instead of relying on Apache or another Web server, CherryPy runs its own small Python-based Web server."
No, no, no!
I love CherryPy as a way of routing requests to Python objects and functions. Rock on!
But look, I'm running like 20 wiki and 5 custom web apps and a few WordPress installations on my server.
And they are all plugged into Apache.
So, actually, in fact, CherryPy has now made some decisions about what tools I'm supposed to use.
Sure, I can forward requests from Apache to the CherryPy server, but that is yet another hassle, it is yet another thing to support and maintain and think about.
I wish instead that the CherryPy dev's had made it so there were multiple adapters to the CherryPy system.
All that said:
CherryPy is my favorite system for doing web apps in Python. I've used it, I've loved it, it's great. It does make programming WebApps "fun," which is perverse. So, it's succeeded.
But I strongly dislike how I have to do this funny Apache business to get it to run on port 80, or I have to give people weird 8080 addresses, like you saw in the article.
Another thing I dislike, is that it's kind of tricky to get it to do XML-RPC, in my experience. (Then again, that was 3 months ago. Perhaps things have changed now.)
(I just use AutoXmlRpcServer or AutoXmlRpcCgi for when it's XML-RPC alone, without a web side along with it.)
But again: CherryPy is my favorite, when there is no XML-RPC aspect, and when I don't mind the weird config stuff I have to do to get it to cooperate with Apache. -
Re:Help Me Here...
Since I need to learn this language and do rapid development, which would be easiest to grasp and learn.
If you are starting something new use Python.
that can be used to parse complicated log files and security scans
This is traditional Perl terrain because Perl is more or less Regexps and a little bit around it. However, in Python you can use regexps aswell and the stuff around it is much cleaner and easier to "grasp and learn". Perl has the motto "there is more than one way", which makes fast hacks easier and big projects and reading of other coders stuff harder. Contrast that with the Zen of Python: http://www.python.org/doc/Humor.html#zen
As for GUI-Stuff. TkInter is a very easy to use standard GUI in Python. Of cause there are also bindings to other crossplatform toolkits like GTK and WxWindows. The more I read about Perl, the more and more I want to learn Python.
Your gut-feeling is right there. -
Well, My Girlfriend likes Python!
My Girlfriend recently asked me to show her how to do this "Programming Stuff" I do for living. After some research, I decided to teach her some Python. I am quite suprised how well she has grokked it. She has already started writing a small schedular app(on her own..) Also, you can find some nice training videos here Another on language that I would recommend is Transact SQL. I know DB's aren't that sexy, but it's quite a powerful language in terms that you can do a whole lot in a few lines of code. Besides, anyone who wants to code for a living needs to understand how databases work. Plus SQL strikes a nice balance between procedural and functional programming models..
-
Map's 'n stuff
What I would like to see more companies do is license their artwork and map geometry under a creative commons type license. It would be really nice if the complete quakes 1-3 were free for non-commercial use and modification.
And what I would really love to see as I'm not that good at managing my own memory is a python engine embedded within the quake 3 engine. Then I could program all my slow high level ai and use quake 3 as a visualization engine either in real time or by generating demonstration files in a machinama kind of way. -
Re:no, you're not remembering correctly
From http://www.python.org/doc/essays/foreword.html:
"It all started with ABC, a wonderful teaching language that I had helped create in the early eighties".
So Python did indeed emerge from a language designed for teaching.
Spot on about Python being an extremely solid choice, though.
Couldn't agree more.
-
What you need is...You need a language that's:
- easy to learn
- teaches good programming practice
- has powerful advanced features
- has lots of free documentation
- works on a variety of platforms
- is fun and satisfying to use
-
Pascal WAS a language designed for teaching
It was designed as an introduction to structured programming.
Python wasn't designed as an educational language. Guido explains its origins in the FAQ. -
Re:BSD v Linux
Actually, in this particular case, you can fix things pretty easily. Corrupted Pythuon? Here's two fixes:
# wget http://python.org/python-source.tar.gz
# tar xzf python-source.tar.gz*
# cd python-source/ && ./configure && make && make install
-or-
# export ROOT="/mnt/gentoo"
# emerge -C python
# emerge python
* Not real URL -
I'm a Python coder & a great Python fan, but .... but this is plain disappointing.
Why do they included each _version_ of a package in the repository? EmPy listed and counted in the category list 4 times.
How can I easily download a package, including all of it's dependencies? Or, how can I just download a package from CheeseShop automatically, using a command-line utility?
-
Re:PythonOf course there's lots of options for Python besides Zope. Some say too many options, but there's a standard for smoothing out those differences, and there's been a lot of progress on that front in the last six months or so. Coming into Python this won't mean much, except that you won't find yourself in a dead end if you choose wrong from the available options.
Besides the Wiki page, this is a subjective but amusing review of the options.
-
Re:PythonOf course there's lots of options for Python besides Zope. Some say too many options, but there's a standard for smoothing out those differences, and there's been a lot of progress on that front in the last six months or so. Coming into Python this won't mean much, except that you won't find yourself in a dead end if you choose wrong from the available options.
Besides the Wiki page, this is a subjective but amusing review of the options.
-
Python, Zope, and Plone Are Good
I still use PHP for a lot of personal work and quick stuff, but I've been leaning more and more on Python, Zope, and Plone for building stuff at my day job. If you need to quickly and easily implement role based security, Zope makes it drop dead easy because it's built in and through ZEO, zope apps can be highly scalable. Of course as with most things, use whatever technologies get the job done. For example, my Zope apps live behind an Apache server that I use for SSL as well as access control.
-
Perl6 is a mistakeI've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. To put it bluntly, Perl scripts will still look less beautiful than our friend Mr Goat.cx. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying. Larry is buggering it up the ass without lubricants, just like Shoeboy is doing to Larry's daughter.
-
Python + Win32 + PIL
(1) Get over Macs. They're really not that great. For people who do work on their computer, applications are more important than the OS.
(2) Use Python with the Win32 extensions if you have to do anything special.
(3) Use the Python Image Library (PIL) for the graphics manipulation.
(4) Use wxPython for the user interface.
If you're careful you can make a platform-neutral solution that will work on Macs, Linux and Windows. So you can use your precious little brain filled with zelotry and illogical xenophobia to work on a Macs then deploy to Windows. -
Visual Basic for Applications (VBA) or Python
VBA is the standard scripting language in Microsoft-land, or use Python with the Win32 stuff.
Damien -
Visual Basic for Applications (VBA) or Python
VBA is the standard scripting language in Microsoft-land, or use Python with the Win32 stuff.
Damien -
Re:World Domination
No, I'm quite serious.
If you can tell me with a straight face that Python and Ruby solve a technical problem that cannot be solved with Lisp (or BASIC, Fortran, C, etc.) and can tell me what exactly that problem is, then maybe I'll believe you. As I see it now, they are both invented for political reasons or the search for the silver bullet (the mythical software technology or language that solves every problem). Or possibly they are created for egotistical reasons. You can't deny that Larry Wall has an overinflated sense of himself. Or James Gosling. Or Guido van Rossum.
Scheme's call/cc mechanism is a real technology. Syntax is a political tool, not a technology. Politics is the cause of many wars which kill innovation and progress.
You can read the reason behind Python's existance here
Guido mentions much about why Python was needed in the late '80s and early '90s. But it's 2005. Why continue with Python? And the only experience Guido claims to bring to the design table of Python is Modula-3 and the ABC language.
What was the motivation behind Modula-3? No one really knows. Greater stability and robustness are a few claimed desired attributes, yet neither of those is substantial motivation. Greater stability than what? C? Modula-3 adds garbage collection as if it were innovative in the late '80s. Complete NIH syndrome.
The Python/Ruby development models follow the same democratic evolution model that Linux does, to a certain extent. Neither is innovative, simply progressive. Evolutionary.
My favorite quote on innovation happens to come from Scheme R5RS spec. Keep in mind this quote does not only apply to language design, but design of all sorts:
Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary.
This goes back to what I was saying with Perl becoming unnecessary if the OS had the proper design to begin with. We wouldn't need all these silly hacks and languages we do today. Sure, Python and Modula-3 do make things easier in a certain sense than C. But that's only for doing things that C was doing in the first place. If you remove the restrictions C is bound by (file systems, etc.) then you won't need ten new languages for dealing with every tedious thing you have to do in C.
As much as people harp on about innovation on Slashdot and elsewhere, I have extensive first-hand experience that people really do not want innovation. What they want is to keep familiarity. They want their Linux, Windows, OS X, etc. but only patched up, and slightly better. Evolved. I once had a discussion about orthogonal persistence on a fairly open-minded forum (Lisp forum). A few people suggested no less than total apocalypse. "We can't have a global database like that! Look what happens with the Windows registry!" etc. etc. Yet they forget that their nice "plaintext" file system Unix is an illusion, albeit a damn good one (only because it's stable). If they had a look at PalmOS they would likely claim it's only possible on a small-scale. Yet any Palm Pilot or Clie today is just as capable as a Unix workstation 30 years ago.
-
well
apparently, this book, (should i ever come across it)(I have TERRIBLE trouble finding books; when I'm actually looking for them, I can't find them; the MINUTE i stop looking, I find in some weird section of the bookstore) would be a good thing to read if I was planning to get in programming on linux. But, I rather like python and am fairly proficient at it. But I might pick this up, just to see if it has any relevant information.
-
Re:The Guido Proposition
now I have an image stuck in my head of Guido van Rossum breaking someone's legs with a baseball bat.