Domain: python.net
Stories and comments across the archive that link to python.net.
Comments · 64
-
Re:Guilty pleasures
So if anyone can suggest a programming language to replace PHP I would love to know.
My personal favorite is python. It's easy to work with, logical, and really fits the way I think.
Some resources:
* Instant python - gives a quick rundown on basic python
* Ideomatic python - this is more about how one should use the languagePackages:
* Bottle micro web framework - small and doesn't have the niceties of the larger python frameworks, but it's great if you just want to get your feet wet, and do something right now
* VirtualEnv - Creates virtual python environments where you are free to experiment with different packages (and python versions) without affecting anything else.
* PIP - package manager. Works incredibly well with virtualenv, and have some neat features (like making a list of all packages and versions installed in active VirtualEnv) -
Re:C++ has had its day
have you heard of ctypes? write the number crunching stuff in C, and then make the OO stuff in Python. but keep in mind that in Python there is a (large) constant cost to calling any function, so you should try to call as little Python functions as possible. see my above comments (repplies to "C'mon Python users tell us why") if you're interested: I generate C code, then compile and run it through Python.
-
Re:Platforms where C does not work
C does work on the server side of web applications, in fact many of the first server side apps were written in C running via CGI. No reason it won't work on shared hosting either, last time I looked my shared hosting provider had a CGI directory. You have have to compile on another machine and copy across. No problems with using C in Python or PHP (I've done the latter and it's very easy).
All in all I think you're completely wrong.
Phillip.
-
Re:Just use php's functions?
You'd probably be a LOT better off it you used Python and the Python Imaging Library, instead of trying to noodle around with combining PHP/Perl/ImageMagick.
First of all, PIL can solve your imaging problem, but more importantly, Python can solve your PHP problem. And then you won't have to get yourself hooked on a Perl problem as well.
There is of course an ImageMagick module for Python. But I prefer to use PIL, which is full featured, well integrated with Python, robust and efficient, and plays nicely will with Numerical Python.
-Don
-
Re:"Accelerating" PHP is a waste of time
You say that VBScript is bad, but please note that the ASP object model is pretty nice, and that you can access it through any ActiveScript language. Windows comes by default with VBScript and JScript, but you can also use PerlScript, ActiveRuby, and Python (with the Win32 extensions). That also means you get to use the libraries of those languages, which are a lot better than what VBScript itself has to offer.
-
Re:Options
There are quite a few out there:
http://davidf.sjsoft.com/mirrors/mcmillan-inc/inst aller_dnld.html
http://py2exe.sourceforge.net/
http://starship.python.net/crew/atuining/cx_Freeze /
I prefer the first. -
Re:Visual-Studio is a great IDE, Visual-Python = gWell there's always PyDev for Eclipse
I tried PyDev for Eclipse but couldn't get the debugging to work. When I installed plone, I found PythonWin in the program files menu. That's the best editor/debugger that I have found for python development so far. It is much faster than Eclipse. Statement completion is spotty for those who like that sort of thing. PythonWin is also Windows only whereas PyDev for Eclipse is cross platform. PythonWin can edit/debug any python program. It is not really tied to plone.
-
Small Wikis
If you're up for small Wikis, there's always HeyHeyWickie, a Python Wiki in under 4K lines of code (using EmPy and docutils).
-
Biological robotic - choose python not labview
Was involved with a similar project but we were ripping out crappy Labview apps for a biological research company with lots of robots. Labview is initially easier but you get stuck after a while.
Tool selected was python
Boost Python (http://www.boost.org/libs/python/doc/) is a library for wrapping C++ libraries that already exist to make them accessible from Python. Includes the boost python library. A favorite for wrapping c++ code.
Swig (http://www.swig.org/) is another library for connecting C and C++
code with Python
ctypes http://starship.python.net/crew/theller/ctypes/
ctypes allows loading dlls/shared libs and calling functions in that lib.
PyInline (http://pyinline.sourceforge.net/) is a module which will allow
you to write methods inline in C.
Python can use COM or you can create COM objects. Make apps with simple web interfaces (Medusa) and webservices style interfaces. Also can check out jython etc. -
Re:Do people still write new C++ code?
I was thinking py2exe actually converts byte code to machine code. Apparently it doesn't. My main point stands, there is no reason why you couldn't convert byte code to machine code
-
py2exeFirst, you don't need any cygwin stuff to run python. The normal version is a native win32 executable.
Secondly, you can use py2exe to generate a win32 executable out of your python code, including all required packages. It's all self-contained. The end user will have no idea that it's python code.
-
Re:who cares?
Sorry, but what competitors to VB6 does the OSS community have? [...] PythonGTK is nice, but still nowhere near VB6 (look at the complexity of the runtimes).
I use both PyGTK and PyQt (professionally), deploying on Windows and GNU/Linux clients. There is no runtime issue. py2exe creates a standalone executable for Windows. Conceptually it's very similar to VBRUN600.DLL, except that your own extension modules can also go into the executable, so there's no need to leave rubbish lying around the system.
-
Learn Python instead.
Seriously. I learned Basic when I was a kid, but if I could be a kid again, I would have learned Python instead (if it had been invented then). the limitations of Basic (no pointers, etc), give it serious problems with anything but low end programs. It certainly has no place in modern commercial development. Visual Basic programmers might disagree, but it's my experience that you're all brutally retarded anyway.
Basic might be good for beginning programmers to get a brief overview of how to code, but before long I would expect them to move onto a better, more capable language before it gives them bad habbits and slows them down. C is a complex language, but Python is exactly right for learners - it's complicated and hugely capable if you want it to be, but is quite capable of small projects and is forgiving for learners.
* Python - A modern, neet-o general purpose language.
* Psyco - Runtime compiler.
* Py2Exe - Converts Python scripts to Windows executables.
* Pythonwin - Windows extensions (and an excellent code editor).
(I want to recommend learning assembler for beginners, since you'll understand exactly what's going on, but almost nobody cares about it these days.. sigh..) -
Trying to predict the next 2 years...Being regular Python user/fan, each news, which features Python makes me happy. How do you think, will Python become more and more popular in the next years? I think so.
- web development: Not only Zope and Plone, there's a lot of interesting development going on with Twisted... and, well, Twisted is not only about the web, it is about networking in general;
- .NET / Java development in general: Python in Java exists already... Java gaining more and more popularity? No problem, Python is already there.
.NET/Mono taking the market away from Java? The industry will perhaps support more and more .NET techniques - with IronPython (featured recently on /.), Python is already there. No problem; - some people might wonder if you really need that stinkin'
.NET/Java stuff at all - Python is already very portable, but that's not everything - it already supports a wide range of MacOS/Unix/win32-specific functionalities. - anything else makes you wonder, if Python is a good choice at all? What about realtime applications, like a VOIP phone (GUI included, win32/unix compatible) in Python? Do you read "interpreted" as "slow", do you wonder if Python is good enough to be useful in CPU-demanding programs like games? Anything else against it? Perhaps you're worried about Python's extensibility?
- if software telephony sucks for you, perhaps you should try a real mobile phone
;) -
Re:Are there any real reasons against?The core of OSX's Network Utility application is a little command line program (...)stroke.
Stroke isn't "the" core of Network Utility... the app drives eleven command line programs, of which stroke is just one. (The others are in [/usr]/sbin.)
The sort of apps you're talking about here (there are tons more, e.g. SimpleWget) are very limited though: basically they just exec CLI apps, and all they can be is some sort of form-based interface to enter CLI arguments. Which invariably turns out to be crippling -- soon enough we're back to the command line and manpage, if we want to dig -x or wget less than the entire internet.
Much more interesting (and relevant to the TUI question, IMO) are apps that expose libraries: ReSTedit, TestXSLT, TeXShop,...
-
Re:They picked the wrong iRiver, too.
My problem with the iRiver is that you can't browse the contents by the ID3 tag content - only filenames.
This was an issue I had with it at first, but decided it was actually a non-issue.To explain to everybody else: The iRiver comes with software that scans the portable's drive and builds a database from your ID3 tags. You can then flip an option in the iRiver's menus and it will let you browse by the contents of this database, rather than by filenames.
There are a couple of problems with this, though. First, the software is Windows-only. Second, it only supports MP3s, even though the device itself understands OGG comments. Third, it's buggy. Apparently there are unnatural limits on the length of the filenames and the paths to the filenames.
Then I discovered that there are, in fact, a couple of projects either ready or in the works to build iRiver database software for other platforms:
- iRipDB is the oldest. It's written in C, and compiles on Linux. The easiest way to get it to compile on BSD or Mac OS X is to track down JFTW, which implements the missing routines needed to walk a filesystem. You'll also need the appropriate third-party libraries for OGG and ID3 support (unlike the supplied software, it handles both). It doesn't seem to have the filename/path limitations of the supplied software. It's command-line only and a little clunky, but thankfully the author has also supplied documentation for the database file format, so you can use this as a basis to write our own software in some other language, if you choose.
- This guy seems to have taken that spec and written something in Python, which requires the appropriate ID3 and OGG libraries for Python. I don't do much mucking around with Python myself, so having got the C version working I didn't bother with this one, though it might be superior.
- ihptool is another utility, written -- mysteriously enough -- in C#. Haven't looked at this one much.
- iFish wants to do it in Java, which sounds like a good, cross-platform idea, and he claims things like fast database updates that only write the changes; but so far hasn't released anything.
I'm told the iRiver can do searches on the whole database, which might be handy. But I quickly realized that the main reason it would be handy was because ID3 tags are often corrupted. If you have albums by "Police" and "The Police," they'll show up in two totally different areas of the ID3 navigation. Not so if you manually threw them both into the same directory in the filesystem. There's no way to manually modify ID3 tags with the device; anytime you spot errors, you'll have to go back to the PC, update the tags, and rebuild the database.
In the end, I decided it was much more efficient, and much more forgiving of weird tags on downloaded MP3s, if I just managed the organization of the thing myself, using old fashioned files and folders.
P.S. And if that post doesn't earn a +1 Informative, I don't know what does!
-
Python ResourcesPython is an ideal language for hacking in - I completely agree with your points about it being easy to pick up - and easy to pick up your own code again after a month or two away from it. Here's a handy list that I have prepared for whenever somebody mentions Python in a context like this one:
Python Resources
This is a list of what I consider to be the most useful Python packages. They give Python the ability to tackle almost any project.
Core packages- Python - Get the Python interpreter, base libraries from here. The default install includes the IDLE editor.
- Win32All - Windows extensions package that includes the excellent Pythonwin editor.
- wxPython - Wrapper to the cross-platform wxWindows window manager library. It's a better windowing system than the TCL/TK library that is the default Python install.
- Boa Constructor - GUI builder that uses the wxWindows library.
- Psyco - x86 runtime compiler. Transparently improves the performance of most Python code - for performance-critical apps, it's often a much better solution than a C rewrite.
- Py2Exe - Builds Python scripts into Windows executables. Perfect for distributing programs to systems that do not have Python installed. Use with Psyco for the best effect.
- PyOpenGL - Use OpenGL from within Python
- Python Image Library (PIL) - Package for easy image loading and manipulation
- PostGreSQL - Full-function SQL database. More complete and advanced than MySQL.
- PyGreSQL - Python bindings for the PostGreSQL database.
Python includes a full suite of functionality to build internet applications in the core install, but the following are frameworks for building and deploying web applications. -
Python ResourcesPython is an ideal language for hacking in - I completely agree with your points about it being easy to pick up - and easy to pick up your own code again after a month or two away from it. Here's a handy list that I have prepared for whenever somebody mentions Python in a context like this one:
Python Resources
This is a list of what I consider to be the most useful Python packages. They give Python the ability to tackle almost any project.
Core packages- Python - Get the Python interpreter, base libraries from here. The default install includes the IDLE editor.
- Win32All - Windows extensions package that includes the excellent Pythonwin editor.
- wxPython - Wrapper to the cross-platform wxWindows window manager library. It's a better windowing system than the TCL/TK library that is the default Python install.
- Boa Constructor - GUI builder that uses the wxWindows library.
- Psyco - x86 runtime compiler. Transparently improves the performance of most Python code - for performance-critical apps, it's often a much better solution than a C rewrite.
- Py2Exe - Builds Python scripts into Windows executables. Perfect for distributing programs to systems that do not have Python installed. Use with Psyco for the best effect.
- PyOpenGL - Use OpenGL from within Python
- Python Image Library (PIL) - Package for easy image loading and manipulation
- PostGreSQL - Full-function SQL database. More complete and advanced than MySQL.
- PyGreSQL - Python bindings for the PostGreSQL database.
Python includes a full suite of functionality to build internet applications in the core install, but the following are frameworks for building and deploying web applications. -
(offtopic, but..) Python
auto-completing python interpreter and editor
An auto completing Python interpreter and editor:
Pythonwin (Windows only).
When it expands a class or module, select the one you want with the up and down arrows (or just keep typing to narrow the selection down), then press tab to select it. -
Re:Adaption, but..Well if producing a CLR version is proof of life (and how exactly do they provide C pointers when every object is supposed to be by reference anyway) then COBOL is alive with Fujitsu COBOL.Net, and Fortran has 2 zombies, with ftn95 and Lahey/Futisju Fortan
Who would have though that a mainframe manufacturer would keep prompting dead langauges? <g>
Whilst Algol isn't there, Oberon is, as is Ada, a shareware version of Forth, Haskell, Eifell, Pascal, Perl, Python (twice) and SmallTalk
-
Re:Python and data typesYou're already proposing several solutions, as others are as well -- SDL (probably most accessible through PyGame), PIL, Numeric, some extensions available through SciPy, and eventually moving into things like PyTables or even lower-level functionality like array or ctypes, there's also the possibility of coding in C or another compiled language, or using Pyrex. for some easy-Python-integration goodness, or Psyco which can do some pretty magic stuff in select situations.
No, it's not like MATLAB -- Python is a general-purpose language. If you want MATLAB, then you're looking for a more specialized environment, like SciPy (maybe using iPython to provide a nice interactive environment). As a MATLAB replacement, Python is probably a work in progress.
If you want homogeneous collections with fast transformations, you must do it with somewhat opaque containers like Numeric, where anything that runs inside the inner loops of transformations is written in a very fast language. (Oh, I just remembered Weave) This is true in Lisp as well, though Lisp has also had compiled forms which are pretty quick.
Anyway, lots of options. Stop complaining and enjoy what you got!
So, is Java really better? I honestly don't know the scientific or image processing domain, so I don't know where Java's at there.
-
Python Resources.This is a list of what I consider to be the most useful Python packages. They give Python the ability to tackle almost any project.
- Python - Get the Python interpreter, base libraries from here. The default install includes the IDLE editor.
- Win32All - Windows extensions package that includes the excellent Pythonwin editor.
- wxPython - Wrapper to the cross-platform wxWindows window manager library. It's a better windowing system than the TCL/TK library that is the default Python install.
- Boa Constructor - GUI builder that uses the wxWindows library.
- Psyco - x86 runtime compiler. Transparently improves the performance of most Python code - for performance-critical apps, it's often a much better solution than a C rewrite.
- Py2Exe - Builds Python scripts into Windows executables. Perfect for distributing programs to systems that do not have Python installed. Use with Psyco for the best effect.
- PyOpenGL - Use OpenGL from within Python
- Python Image Library (PIL) - Package for easy image loading and manipulation
- Plone - Web applications, built on top of the Zope framework.
Abandon Perl! Python is the future! -
Python Resources.This is a list of what I consider to be the most useful Python packages. They give Python the ability to tackle almost any project.
- Python - Get the Python interpreter, base libraries from here. The default install includes the IDLE editor.
- Win32All - Windows extensions package that includes the excellent Pythonwin editor.
- wxPython - Wrapper to the cross-platform wxWindows window manager library. It's a better windowing system than the TCL/TK library that is the default Python install.
- Boa Constructor - GUI builder that uses the wxWindows library.
- Psyco - x86 runtime compiler. Transparently improves the performance of most Python code - for performance-critical apps, it's often a much better solution than a C rewrite.
- Py2Exe - Builds Python scripts into Windows executables. Perfect for distributing programs to systems that do not have Python installed. Use with Psyco for the best effect.
- PyOpenGL - Use OpenGL from within Python
- Python Image Library (PIL) - Package for easy image loading and manipulation
- Plone - Web applications, built on top of the Zope framework.
Abandon Perl! Python is the future! -
Python scripting for NSIS...
And now for something completely different.
It's...
Python scripting for NSIS.
Seriously, there are times when these scripting systems can't do the heavy lifting of a "real" scripting language. I've often thought that Python might be an ideal embedded scripting language for an installer, especially with Mark Hammond's excellent Windows Extensions.
Has anyone used this NSIS/Python package? I suppose the only thing stopping me from trying at this point is my own laziness. Alas, this plugin requires that you track your own Python module dependencies.
-Peter -
Yes, e.g. with these:
I bet you've already seen the answer to your q in the threads here, but for anyone else who missed them:
fredrikj's post on Psyco, and
(another) AC's post mentioning both Psyco and Py2Exe, among other useful things. -
Silly trolling article writer.One drawback sometime cited is its relatively slow execution speed compared to compiled languages such as C.
A mention of the Psyco Python runtime compiler is in order. It's simple to use as well - all you do is put this at the top of your entry script:import psyco
All routines called are then compiled from bytecode on-the-fly into native x86 code. It's not quite as fast as C - but with Psyco you can easily get close, especially if you design your algorithms properly.
psyco.full()
While I'm here, these are the Python packages that I find essential once I have the base installation (which includes the IDLE IDE). I've used these packages under Windows, but most work on Linux as well:- Win32All - Windows 32 extensions & the Pythonwin IDE
- wxPython - A GUI library based on wxWindows. Far superior to the included TCL/TK libraries.
- Psyco - Runtime compiler, mentioned above
- Py2Exe - Takes in Python scripts, spits out executables (note: use in conjunction with Psyco for best effect)
- Boa Constructor - A wxWindows GUI design tool. It's a full blown IDE as well, but I have only used it to design GUI layouts, I code in Pythonwin.
-
Silly trolling article writer.One drawback sometime cited is its relatively slow execution speed compared to compiled languages such as C.
A mention of the Psyco Python runtime compiler is in order. It's simple to use as well - all you do is put this at the top of your entry script:import psyco
All routines called are then compiled from bytecode on-the-fly into native x86 code. It's not quite as fast as C - but with Psyco you can easily get close, especially if you design your algorithms properly.
psyco.full()
While I'm here, these are the Python packages that I find essential once I have the base installation (which includes the IDLE IDE). I've used these packages under Windows, but most work on Linux as well:- Win32All - Windows 32 extensions & the Pythonwin IDE
- wxPython - A GUI library based on wxWindows. Far superior to the included TCL/TK libraries.
- Psyco - Runtime compiler, mentioned above
- Py2Exe - Takes in Python scripts, spits out executables (note: use in conjunction with Psyco for best effect)
- Boa Constructor - A wxWindows GUI design tool. It's a full blown IDE as well, but I have only used it to design GUI layouts, I code in Pythonwin.
-
Re:Anything but odd/new language...
"It's a good rant but it's not really very relevent - writing your app in python (at least in the way he describes) simply isn't plausible if you're writing an app for commercial or even mass distribution - you can't rely on an existing Python installation and if you've got to package one with your installer then theres hardly any more work to embed an interperter instead."
This is old enough it will probably never be read, but that isn't true. There are utilites that do this in a snap, in addition to finding any extension package or dll deps that your python is using automagically in almost all cases. Just today I took a small app written in python using WxWindows ran it through py2exe and it runs on all flavors of windows, without python or wxWindows libs installed on either one. Took me about ten minutes.
McMillian Installer will do the same trick, tho I haven't used it recently. Mcmillan also does the same thing for Linux, where I wish a lot more people were making packages available as no dep binaries as well as more traditional source packages, but that is just me.
Now, as for your other points, if you happen to want to write your code in Python, well, that is a different matter. But if you choose to, it is very easy and fast to distibute your program binary without deps.
-
Re:Intelligent filtering
That would be excellent - although I'm stuck with Outlook at work.
Then try SpamBayes for Outlook -
Re:moving towards bloatware or are these important
It sounds like it's moving towards Python with the addition of Lisp-ish functions and itterators.
Any programmers looking at C#, I recommend also checking out Python, it is a wonderful language. Particularly with Win32 extensions (Windows-specific extensions, but most useful feature is an amazing editor / debugger, Pythonwin) Psyco runtime compiler and wxPython for cross-platform GUI building. -
Re:You just don't get it
Realistically, I don't give a damn how much spam _you_ get, I care that _I_ don't get any.
You cannot automatically filter spam. Bayesian filtering works because it works on your own personal items only, and you have a method of manually removing false positives. There is nothing worse than the possibility that an ISP will filter out a real email in their spam system. That simple fact makes server side spam filtering impossible for most situations. You can filter spam into /dev/null (unacceptable), you can filter into a spam box (How many POP users would that rule out, who only have one POP box?), or you can keep it bundled in email with a flag, and expect people to update their clients, in which case you have the exact scenario you have now - the client has to do something themselves.
Until Hotmail et al starts offering bayesian filtering with a separate 'spam' mailbox, consider server side filtering worthless.
I am smart and don't get any spam. A lot of people I see in my line of work, aren't. These people are going to get something like Outclass (an Outlook plugin for POPfile), and then they are going to see the problem go away, and they're not going to lose any email in the process.
I'd rather use SpamBayes, but the Outlook plugin has an annoying bug that renders autocompleting addresses in Outlook useless. -
The problem that just won't go away.My Hotmail account has been filling up regularly with spam like this for years, and I always wondered not only who the hell would buy something like this from someone they didn't know but also why people who are dumping hundreds of thousands of messages an hour through a network aren't having their connections terminated. You know the drill; everybody's got an abuse policy, but apparently abuse@whatever.com is routed to the Recycle Bin.
Despite my vehement loathing of spam, a recent incident is making me question how we go about dealing with it. Recently, Something Awful has been having issues with the SPEWS list, a popular spam blacklister, who according to Something Awful blacklisted a whole chunk of IP addresses that happened to include their own unabused server without offering recourse or explanation simply because it had the misfortune of sharing address space unknowingly and unwillingly. I'd call that overkill, and more offensive than the perceived problem of spam itself if truth be told. Bayesian filters work, so why do we need to continue inadvertently censoring netizens who have nothing to do with spamming?
I tell you, folks, after reading this article and hearing about what anti-spam proponents have come up with for solutions, I'm starting to have second thoughts about the whole deal. For me it comes down to to the freedom of speech issue -- I've always been told that if you can't handle free speech you don't agree with you obviously can't handle free speech -- and I suppose just because something irritates me doesn't mean that the greater good would be served by silencing that something.
Another perspective is that the amount of money being pumped back into the economy by so-called unsolicited commercial e-mail is nothing to scoff at, and perhaps legislating it in some tolerable form such as limiting a company to one commercial message per person per day would create a new legitimate business method in this country. It's something to think about, certainly. I'd hate to think we're going to lose another revenue stream to outsourcing before we've even had a chance to give it a go locally, and this may be a way for us to recapture some of those IT jobs that have been lost and generate a whole new crop of successful entrepeneurships.
-
Two free suggestions one commercialI find that spamassassin's approach works really well and run it at home on Win32 following the instructions here.
If she's using POP3 to download her mail I can heartily recommend SAProxy which encapsulates Spamassassin as a POP3 proxy with a nice Windows installer & configuration screens.
I have not used this one but have heard great things about it: spambayes, a Python based Bayeian classifier with nice plugin for Outlook 2000/XP.
Last but not least, since Mcaffee bought Deersoft you can expect that their next version of SpamKiller should be at least as good as Spamassassin Pro was.
Balam -
Take a look at SpamBayes
Check out the SpamBayes Outlook Addin. It's free, and based on the open source SpamBayes Project
I just read about this in Infoworld so I haven't had a chance to evaluate it, but they gave it rather high marks. -
Re:wikipedia is a good example
Second the recommendation to use a Wiki. There are Wiki engines that support user authentication and history. Various backend storage mechanisms are also supported, from flat text files to full-blown relational databases. Take a look at the Wiki Clones Directory
-
Wow, I'm really surprisedTooting the Python horn a little then, there are at least two good and free ways to generate executables from Python programs. There was a good-sized discussion of this on comp.lang.python in early January.
The two most dominant options appear to be py2exe and Gordon McMillan's Installer, which also has a nice summary of other options as well. I personally use Installer and find it to work just fine; that said I don't have any experience with its GUI capabilities - I know it's supposed to have decent support for the common Python GUI techniques, but all my stuff is command-line driven.
-
Packages
I think this depends a lot on the kind of research you do. I do ocean modeling, and beyond the actual model code, which is written mostly in Fortran, the only packages I use are Matlab, Scientific Python, and an open source oceanography analysis package called Ferret. This is mostly because I don't have to solve any equations; all my results are based on number crunching. If you are doing theoretical work, and have to find polynomial roots or something, you use something different.
Actually though, I am trying to get away from Matlab more and more. It has some terrible features in it (Like a completely botched graphics library and a for loop command that takes EONS to run) and it costs at least $100 for a personal copy. Sci Py is free and does most of the same things, except that it has no standard plotting routines. At least, none I am aware of... -
Re:well
It's a shame so many people are taking this "oh god don't lock us in" stance. To me, and people will disagree with this,
.NET is the Sun/Java 'write once, run anywhere' concept done right because it's:
- Language Independant (although I would agree that C# seems best suited to it for me)
- Potentially Platform Independant (not yet, maybe not soon, but possible - well done to the Mono team)
- Generally runs faster than Java on Windows ('big surprise' you say - but see how Mono goes)
This isn't even mentioning the fact that developers can gather together to work on a software project using .NET, and can contribute regardless of their language of choice.
Naturally there's barriers to such a thing actually happenning. For example, imagine reading the source code to a large project developed in such a manner: where My.Namespace.Person is written in C#, My.Namespace.BusDriver is written in J#, My.Namespace.BusinessManager is written in VB.NET and My.Namespace.HospitalityManager is written in Managed C++. In such a scenario, Person would be the base class of BusDriver and BusinessManager, and HospitalityManager would be derived from BusinessManager.
Thus to understand that relatively small section of a project (four classes!) you need to know four separate languages. Obviously, a good design will save a person from having to do such a thing. Unfortunately, good designs are hard to come by. Harder still is following a good design to the letter. Although you can argue otherwise, the fact of the matter is that we haven't yet perfected the art/science of software engineering at its current level of complexity - why make it more complex?
That said, there's nothing to stop you from developing with, for example, C# as your main language then using Python or Perl for handling complex text files.
As previously stated, so far as I'm aware there's no more 'lock-in' to .NET than there is to other Microsoft (and indeed some non-Microsoft) software. I've spoken to various companies here in Australia and few of them are even thinking about installing the .NET CLR on their Windows systems - let alone their servers.
I think the biggest problem with .NET for managers is a lack of understanding. .NET has a bit of an identity crisis in that it seems hard to define what it is in layman terms, and the technical terms tend to evolve from simple two-line explanations into long, drawn-out descriptions of the CLR and assemblies.
It's a simple concept that I feel is hard to convey. How do others feel regarding this?
Anyway I'm rambling now. Outies :)
Tom L -
Re:A duck
However Microsoft have got pretty much every other language - Basic, Python, Eifel, Cobol, Perl, Scheme etc. to run.
Um, that's not true. The Python .NET work was an experimental effort that was incomplete, impractically slow, was never used for production work by anyone, and is no longer being developed or maintained. Perl.NET takes the existing C Perl interpreter and interfaces it so you can write .NET components, but Perl isn't being translated to CIL. The only Scheme compiler I can find implements a subset that doesn't support continuations.I don't know why no one has called Miguel on his claim that you have to translate everything to Java, but
.NET provides a happy shiny world where all of the languages are well-supported. Clearly that's untrue. -
perl/python phrasebook
Try this site.. it's basically a "phrasebook" that shows common tasks being done in both perl and python. It's a great introduction to the language, and it helps a lot in terms of getting the python-idiom-y ways to do lots of commonthings embedded into your head.
It isn't *very* long, and doesn't go too deep, and the formatting's not great, but it's a quick read, and if it doesn't fit your needs there's always that book Snowbike recommended.
At present I think my python programming is too formal
The catch about the funkiness of python's syntax is not that it demands formalism; it's just that it demands you will do only one thing per line. It's kind of hard to get yourself thinking this way, and it's really irritating to write code this way (i never write python without pining for a ?: construct, a single-line version of "except", or a less-crippled lambda construct).
The thing is, though, that obeying python's rule basically comes down to seperating each expression into unnecessary variables, and mercilessly abstracting all those potentially-repeated 'common tasks' that somehow always seem to wind up taking five lines in python into functions. However, i find when i write perl, most of the time i spend revising code is spent going back and doing the above two things-- splitting overly-complex expressions into subvariables, pulling out bits of code and making them subexpressions. Python just forces you to do these things ahead of time, and you benefit greatly in the long run. (Whether that's worth all the irritation, though, i don't know :)) -
Re:An W2K SP3 experience.
Yep, the WSH (Windows Scripting Host) is a framework that allows you to use any language you like to script windows events.. windows comes bundled with VBScript and JScript (kinda like JavaScript, just more prorietary), but there are other addons available, such as Perl and Python.
Keep in mind WSH is not by default installed on all machines (I believe Win95 does not have it, some Win98 Installs do, and anything after 2K comes bundled with it), so you may need to grab the installer from here. -
Re:Depends on how you use itgrab one of your "real" programming languages and write an object that generates dynamic PDF's.
It's exactly what I am doing using Java implementation of XML-FOP. Check Apache FOP. By the way it is free
:)The other free PDF libraries are available for Common Lisp, Python, C
Conclusion: I know what I am talking about. But I am not that "expert" as you may think about me. Here is an example of what real experts are saying:
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
Will you argue with Dijkstra? I won't. Although he is talking about myself as well - I am poisoned with PHP experience as you do. I just aware of that fact and you don't.
-
remote rdf examples that work?
mozilla with xul/js allow you to build some interesting tools. But try building a simple front end tool that reads a RDF as a remote datasource. I have yet to see an online working example displayed in a tree.
While the responses on the mozilla newsgroups are excellent (with the actual netscape engineers responsible responding), the lack of consistant *complete working examples* is a pain.
I had to laugh when I stumbled upon Mark Hammonds site and found a mozilla /xul python search page. Quickly I checked the xul source to see if mark used remote RDF only to see the code commented out with a remark along the lines of, 'almost got going'. Marks example works ,but like the code I was working on it had to use a different approach.
I just want to to use remote RDF feeds. -
remote rdf examples that work?
mozilla with xul/js allow you to build some interesting tools. But try building a simple front end tool that reads a RDF as a remote datasource. I have yet to see an online working example displayed in a tree.
While the responses on the mozilla newsgroups are excellent (with the actual netscape engineers responsible responding), the lack of consistant *complete working examples* is a pain.
I had to laugh when I stumbled upon Mark Hammonds site and found a mozilla /xul python search page. Quickly I checked the xul source to see if mark used remote RDF only to see the code commented out with a remark along the lines of, 'almost got going'. Marks example works ,but like the code I was working on it had to use a different approach.
I just want to to use remote RDF feeds. -
One example
One example that comes to my mind immeiately is MMTK ( link) (Molecular modeling tool kit) developed in python by Konrad Hinsen.
-
Re:Lots o' languages
But there are other ways.
For python you can use freeze (comes with the source distribution) or py2exe.
I've used this to produce different binary versions of the same program that ran happily enough on Win2k/NT, HP-UX and Solaris, all without having to distribute the interpreter itself, or require that these systems had python installed. -
Re:Problem with Python...
There are some alternatives to freeze check:
This link.
Also, if that doesn't suit your needs, you could enhance it or write your own... I would sure appreciate it. :) -
Re:Standard is bibtex.I've been searching for the right tool for quite a while now, but am yet to find it. We use latex/bibtex for all our papers, so I need to keep my refs in bibtex format. For now, I just use Emacs' bibtex mode, which functions quite nicely for entering biblio information. Fancier GUIs are available: for instance, take a look at the cross-platform TkBibTeX.
You can also "roll your own" using the perl modules from btOOL.
My general dissatisfaction with the freely available tools means that a bibliography manager will be one of my first programming projects when I lay my hands on an OS X box in a few weeks (drool...)
-
Stackless, microthreads
Yup, this port uses Stackless Python to the best of my knowledge (but you could get a more certain answer by going straight to Jeff Collins). Unfortunately they haven't included the continuation module or the microthread module. Chris Tismer has plans eventually to move a lot of the microthread machinery to C, and maybe at that point, it will find its way into the Palm port.
-
This is for MODELING
Does anyone even bother reading the article? This is to use open source to develop further molecular modelling software. Of course, such software would be useful for nanotech, but that's not the point. This type of technology already exists, see for example the Catalogue of Molecular Biology Programs, some of which are open source, like Garlic, and MMTK. The actual creation of nanotech can't be open sourced, since the requirement to create it can not be bought off the shelf. (Well, if you have a few million, you probably could buy it.) The primary prerequisite for open source research is that the materials are relatively cheaply and easily available to the general public. Thalia