8 ms·
I disagree. It's not obvious to me at all. Which is why I asked for their reasons.
by aston 19y ago
I disagree. It's not obvious to me at all. Which is why I asked for their reasons.
- SwellJoe 19y agoWhat do you believe would be the obvious choice for a web-based application that administers everything on a UNIX system? Keep in mind: It runs as root. Directly parses and edits every configuration file that is managed--this is not a "generate config files from a database plus templates" tool--it has to understand the configuration files and edit them cleanly. Strong regex support is vital. It is internationalized to dozens of languages...it needs to support Unicode. It has to be reasonably fast...it serves dozens of users simultaneously, often doing rather complicated tasks. It needs to be a widely available and stable language--we support dozens of platforms (nearly all Linux distros, Mac OS X, the BSDs, and even Windows to some degree). All of them have different versions of Perl, Python, Ruby, PHP etc. and varying degrees of library support "out of the box". We need to know that whatever reasonably recent version exists will work fine now and in the future.
- aston 19y agoI would've probably picked Python, mostly because you get all of that stuff with (almost) uniformly better syntax. But I certainly don't blame you, especially in light of the details from above.
- SwellJoe 19y agoIf we were starting Webmin, Virtualmin and Usermin today, it could very well be in Python. We both like it as a language, and have worked in it on pretty large projects. And the syntax is certainly cleaner and simpler. I'm also quite fond of Ruby, though its standard implementation leaves a lot to be desired (performance, Unicode, lack of libraries). But, we'd have to spend some time with it to know for sure...as I mentioned in the longer explanation in this thread, I've done quite a bit of sysadmin tasks in Python (modifying others code, generally), and in every single case I've felt like the implementation was longer than it needed to be, and more complex. In a couple of cases, I even talked it over with seriously good Python guys and did comparative implementations to try and improve my own grasp of Python, and the response was generally something like: "Sure, the Python implementation is twice as long, and runs slower, but I can't read the Perl implementation!" Which is a valid response, of course, but I think just showed that they had never worked in Perl and had little comprehension of its idioms. But, to be fair, I've been pleasantly surprised by some of the Python code I've had to modify. Perhaps the single most satisfying patch I ever wrote for someone else's code was to add authentication support back into yum after they moved from urllib to urllib2. It was the first Python code I'd ever touched, and it was a very pleasant learning experience. Really nice code.