Domain: scipy.org
Stories and comments across the archive that link to scipy.org.
Comments · 104
-
Whatever gets the job done, basically
There's everyday tasks like plots and statistics, and then there's specialized tools that are specific to fields and, er, specialties.
For simple plotting and statistics, I'd look into Scientific Python, or Matlab/Octave/Gnuplot.
For programming concepts in general, I advocate taking a course from the CS department, preferably one of the ones that are based on SICP (Berkeley CS61A, MIT 6.001). Then supplement that with some sort of imperative language, and you'll be set for life (cough).
In High Energy Physics, most software has historically been written in FORTRAN. However there is a move toward C++. A few examples:
The main framework for analysis is called ROOT. It's C++ based and very capable. The old FORTRAN-based framework is called PAW.
PYTHIA is the primary simulator for particle physics. Past versions were in FORTRAN, but recently the first C++ version has appeared.
(FORTRAN is kinda fun, in that you have to watch your spaces... and the commonblocks...) -
Re:Not really adding anything important but...
Thanks, but between numpy and matplotlib, I've basically got MatLab covered (plus I actually shelled out for a student edition back when I needed it for my class on matlab.) Hell, instead of Presentation I can use PsychoPy and PyEPL. It's just that often I'm stuck using other programs 'cause I'm a lowly inexperienced undergrad and therefore only have as much say as anyone will give me (which, well I'm working on convincing one prof. 'cause he's programmed before and therefore hates Presentation as much as I do.)
-
Re:Good and bad news
My biggest thing that I depend on is the fminsearch function.
Fminsearch is just the Nelder-Mead simplex algorithm. It, and many other optimization methods, can be found in this SciPy package:
http://www.scipy.org/doc/api_docs/SciPy.optimize.html
It's generally not a good idea to rely just on Nelder-Mead; there are many problems for which it simply doesn't yield good results.
What really makes me slow to move is that my university just negotiated a site license, so MATLAB is free, increasing my dependance on the program.
It may seem "free" now, but the more you get addicted to it, the more Mathworks can charge you later, and they will. It's least expensive to kick the habit early on. -
SciPy
Octave is a great effort, and it is very useful for being able to be able to run Matlab code freely. However, most of the effort in open source numerical computing is happening with NumPy and SciPy (www.scipy.org). For most applications, SciPy is already far superior to even the commercial version of Matlab, and SciPy is the de-facto standard in several scientific communities. There are a few areas where Matlab still has toolboxes that have no good equivalent for SciPy yet, but that's going to get fixed.
So, if you're looking for an open source Matlab alternative, use SciPy for new development and stick to Octave only for occasional backwards compatibility and testing during porting. -
Re:Good and bad newsWell, that's a no then. Actually, it's a yes. Just specify your variable to be a matrix, and you can use your nice A*B syntax.
-
Re:Good and bad news
has any syntax inspired more flamewars than python's?
I suppose you mean the spaces vs. tabs thing, maybe you're right, but no one can deny that Python has an extremely simple syntax.
You can do anything with it, from HTML parsing to a game physics engine to 3d graphics to Excel spreadsheets to... you name it.
Even if Python isn't quite enough for your needs, you can very easily link it with C language or Fortran modules in a trivial way.
If I have an alternative that is, at the same time, simpler and more powerful, then why should I bother with this whole Octave/Scilab/Matlab mess? -
Good and bad newsThe good news is that they are doing in a free way what the Matlab Co. has been charging (a lot!) for, which is distributing an API to use all those libraries the US Federal Government labs give away for free.
The bad news is that they are wasting their time using the Matlab syntax, while there is a much better alternative for doing exactly the same thing. Python is universal, if there's anything you can do with a computer, the simplest way to do it is with Python, so why do it the hard way? -
Re:OS X PPC?
Try looking here: http://sage.scipy.org/sage/SAGEbin/apple_osx/
Or you can compile from source, though that takes several hours. http://sage.scipy.org/sage/dist/src/index.html -
Re:OS X PPC?
Try looking here: http://sage.scipy.org/sage/SAGEbin/apple_osx/
Or you can compile from source, though that takes several hours. http://sage.scipy.org/sage/dist/src/index.html -
Re:Evidently these "experts"
These "experts" you refer to are experts, and they seem to know better than you (it has even domain in scipy...): http://sage.scipy.org/sage/ (other words: It makes really good use of it)
-
Mirror links
The site is already very slow, so posting the actual links.
http://www.sagemath.org
http://sage.math.washington.edu/sage
http://modular.fas.harvard.edu/sage
http://www.opensourcemath.org/sage/
http://www.cecm.sfu.ca/sage
http://sage.apcocoa.org
http://echidna.maths.usyd.edu.au/sage
http://sage.scipy.org/sage -
Re:At this rate...
actually, it wasn't PySH, it was:
http://ipython.scipy.org/moin/
Which is IPython (not to be mistaken for iPython, Steve Job's variant of Python!) -
Re:At this rate...Wake me up when *nix gets an object-oriented (rather than text-oriented) shell.
Python? http://ipython.scipy.org/ -
Re:I'm torn...
-
Re:Open source systems are out there, too
wxMaxima and SciPy could round out a nice open-source scientific suite. SciPy uses wxWidgets for its GUIs as well. (I prefer GNUstep personally, but whatever works.)
In the distant future, some kind of integrated portable platform for both high-performance numerical analysis and reliable symbolic/special functions calculation would be fantastic . -
Re:Sage the "super" computer
It is just our luck that the the server room is undergoing major renovations this week...
See a mirror, e.g. http://sage.scipy.org/sage/
FYI, sage is fully (GPL/GPL-compatible) open source. -
Re:Why bother?
-
What do you want to accomplish?
I'd say python, or a similar language with a good interactive shell, and similarily equipped with with poweful libraries would be much better, because it would allow the kids to actually do usefull stuff.
On the other hand, if you want to give them a feel for how the computer "really" works, teach assembly programming. C has a place in modern programming, but I think it's a bad choice for a first language.
For just about any language, you can demonstrate basic concepts, and give such thrills as being able to print out your name 10 times etc. But for moving on to doing really cool stuff that you can show your friends, such as consuming rss, doing interactive 3d etc ... python would be an almost perfect fit, especially paired with a couple of modules/packages like http://www.pygame.org/ and http://ipython.scipy.org/.
Java comes a close second, but even using a tool such as http://judo.sourceforge.net/ or http://www.bluej.org/, java requires much, much more setup pr project to get up and running. Additionally java has no transparent compilation, which means you're stuck with the write-compile-test-cycle, rather that just write-test-change-test...
Another alternative would be http://www.squeak.org/ and/or http://www.opencroquet.org/. But it's a pretty steep learning-curve going from c to smalltalk, IMNHO. You're students should have an easier time of it, though.
Give some thought to what platform you and your students will be working on, too. For Mac OS X, I suppose objective-c might be a good place to start. On linux, I'd go with python, on windows, either python or c#.
The one good thing about c, that is also true for assembler *and* python, is simplicity. You don't *need* an IDE to get from idea to working program. Programming java with notepad and javac very quickly becomes difficult to manage, due to classpath-issues. But with c and assembly you'll still need linking for anything but the most trivial programs -- another win for python (or perl, ruby tcl, lisp etc). -
try the numpy way
So why not try the scam that Travis Oliphant at the numpy project has tried to pawn off...write free sotware, but sell the documentation. No man page = $$$!
-
Array type for numerical calculations??
At some point there was talk about including a simple array type in python. http://scipy.org/BaseArray http://mail.python.org/pipermail/python-dev/2006-
J une/066516.html Does anybody know when this plugin will be ready for inclusion in python? -
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:No.
at the command prompt type: python
For an even better experience, try ipython. Python prompt with tab completion, coloured output, dynamic introspection, debugger integration, nicer backtraces and much more. -
Maybe you do have a choice
I spoke to someone at the help desk/sales department and got nowhere (if the disk is faulty due to a manufacturing defect send it back and we will replace it). Not like I had much of a choice, so I ponied up the money.
Additions to python such as scipy are bring some Matlab like functionality. Defining class objects in Matlab is Ugly Ugly Ugly. In Python creating new classes is so much easier.
The extensions to Python are not as complete as the Matlab toolboxes but python is a far far better programming license. And Python is free.
-
Re:Python hype does not exist
"The lack of information hiding makes it very hard to ensure that fellow programmers use your classes in the way intended"
No offence, but people who think that python lacks information hiding should consider learning more about OOP/OOD.
"small typos in function/variable names aren't caught nearly as quickly"
1. use pychecker / pylint
2. do unit testting
It's hard to belive that some typo can pass through these 2 simple steps.
"based on what I'd heard about how great python was, I'd say python *IS* overhyped"
I know this feeling... It comes from trying to write JAVA/C++ in Python. You should continue to learn Python, as there is a tipping point, after which You understand 'the Python way' of doing things. BTW: learning Lisp helps.
"performance is far behind java (which in turn is behind C/C++ of course), etc"
1. Use scalable algorithms
2. Learn about performance of 'language constructs'
3. Cache results (it's dead simple with decorators and dictionaries)
4. Profile the code and find 'offending' functions. Inline them in C or use Pyrex to achieve near C++ performance (http://www.scipy.org/documentation/weave/weaveper formance.html)
"I'd heard a lot of people call python a better replacement for java, and it just isn't"
For most applications: it is. -
Have you tried IPython?Take a look at http://ipython.scipy.org. You can actually use it as a shell replacement. Quoth the homepage:
IPython is a free software project (released under the BSD license) which tries to:- Provide an interactive shell superior to Python's default. IPython has many features for object introspection, system shell access, and its own special command system for adding functionality when working interactively. It tries to be a very efficient environment both for Python code development and for exploration of problems using Python objects (in situations like data analysis).
- Serve as an embeddable, ready to use interpreter for your own programs. IPython can be started with a single call from inside another program, providing access to the current namespace. This can be very useful both for debugging purposes and for situations where a blend of batch-processing and interactive exploration are needed.
- Offer a flexible framework which can be used as the base environment for other systems with Python as the underlying language. Specifically scientific environments like Mathematica, IDL and Mathcad inspired its design, but similar ideas can be useful in many fields.
- Provide an interactive shell superior to Python's default. IPython has many features for object introspection, system shell access, and its own special command system for adding functionality when working interactively. It tries to be a very efficient environment both for Python code development and for exploration of problems using Python objects (in situations like data analysis).
-
Re:impressive
What makes MSH rock is that it's a python-like programming languaje PLUS a user-oriented (user=administrator) shell like bash
Perhaps that's interersting from the POV of the programmer, but from the POV of the sys admin, it's a nightmare.
Those that don't understand Unix are bound to reimplement it, badly.
Bash goes out of its ways to provide tools and syntax allowing you to remove all customizations others could have put in the environment. Korn shell compatible shells are lightweight and portable and cross-platform and respect a small standard. Lacking any of this means a shell is NOT like bash (or any other shell). So your premise is wrong for MSH. MSH does not have MOST of these power features of shells, so I don't understand how you can compare it to them.
In linux we're used to program scripts with python
I'm not. Who is this 'we' ?
then pass the data through pipes to bash to do something with it. Crappy.
This says it all. It is one of the most powerful feature of Unix, and you call it 'crappy'.
Again, 'those that don't understand Unix ...'
FYI, I saved several production data in real time in big french firms thanks to this crappy feature ...
When you have to do things like "command | cut -d ' ' -f 3 | cut -d ':' -f 1" to get some data, you know something is WRONG
Which, obviously here, is the person who has wrote this garbage. I would never write this, but would rather write a sed command to do that.
The cool thing about MSH that its a SUBSTITUTE to bash/cmd.exe, not a "complement" like python is
It sure is cool. csh was cool too. Look at what happened to it. Cool and Useful/Powerful are not the same.
Is not that bash or python are bad
Fortunately you have enough common sense to agree with that.
but bash-like shells are 30-years-old unchanged technology
Proven technology, what is wrong with that ?? FYI, people have tried to add cool things to the concept (csh types, zsh, ...). Bash is actually an evolution of sh/ksh, contrary to what you say. It's just more powerful.
A shell must have, among its features, stability and security. 30 years old is a good thing when you want these. Given that MSH is developed by MS, and given their track record on these 2 points (stability, security), excuse me if I don't hold my breath on MSH.
Fortunately, there're people writing user-oriented python-based shells, like http://ipython.scipy.org/
User-oriented python-based shells, OMG !!
Given the problems I've got till this day with Python apps (memory leaks, unexplained and untracable crashes), given the tedious work of migrating core systems based on Python (look at Gentoo), excuse me, but I think I will stay with bash for a long time. -
impressive
Indeed, that MSH demo is impressive and all, but python is great too. System-wide integration? Big fucking deal:
>>> import kudzu
>>> kudzu.probe(kudzu.CLASS_HD, kudzu.BUS_IDE, kudzu.PROBE_ALL)
[Desc: MAXTOR 6L040J2 Driver: ignore
Device: hda , Desc: ST360021A
Driver: ignore Device: hdc
, Desc: Maxtor 6Y120P0 Driver: ignore
Device: hde ]
etc, and python is easily expandible to cover ALL the system. What makes MSH rock is that it's a python-like programming languaje PLUS a user-oriented (user=administrator) shell like bash. In linux we're used to program scripts with python, then pass the data through pipes to bash to do something with it. Crappy. When you have to do things like "command | cut -d ' ' -f 3 | cut -d ':' -f 1" to get some data, you know something is WRONG.
The cool thing about MSH that its a SUBSTITUTE to bash/cmd.exe, not a "complement" like python is. Is not that bash or python are bad, but bash-like shells are 30-years-old unchanged technology. Fortunately, there're people writing user-oriented python-based shells, like http://ipython.scipy.org/ -
Re:CodeZoo
Indeed. I was just browsing and this seems especially useful: http://www.scipy.org/. It's a mathematical library addon for python (turning it into a sort of matlab).
-
open source for proprietary platform
This is a pretty typical abuse of open source by a commercial company. Not only is MATLAB hugely expensive, in addition, while they make money on platform sales, they want other people to develop free and open source software for their platform to make it more valuable.
In fact, the only thing that has made MATLAB valuable is that it is in widespread use and that everybody develops add-ons for it. As a numerical programming environment, it is technically considerably worse than available alternatives, both commercial and free.
Don't waste your time doing free work for MATLAB (or other arrogant companies like that). The same amount of time and effort would have been better spent contributing to one of the open source MATLAB alternatives, like Numerical Python and Scientific Python. -
Python to the rescue
To those people who detest using Fortran, check out http://www.scipy.org/
.All these libraries are based on the same dependant Fortran code.
For signal,image processing and more, in a nice python syntax. Nice readable code, no learning curve!
From the website:
SciPy is an open source library of scientific tools for Python. SciPy supplements the popular Numeric module, gathering a variety of high level science and engineering modules together as a single package.
SciPy includes modules for graphics and plotting, optimization, integration, special functions, signal and image processing, genetic algorithms, ODE solvers, and others.
SciPy is developed concurrently on both Linux and Windows. It has also been compiled successfully on Sun and Mac, and should port to most other platforms where Python is available.
-
IPython
Those shopping for a shell, and with a taste for Python, would do well to check out ipython.
In the 'pysh' mode, it acts as a fully functional system shell, even on Windows. Bash and friends suck on windows, but IPython truly shines there. It really makes the command prompt use of Windows feasible, with bash like filename completion etc. Being able to extend it with python functions (as opposed to separate scripts) is a killer feature as well.
I've actually replaced the command prompt launchers on my KDE desktop with 'ipython -p pysh' launchers. -
Don't Fall For Premature OptimizationsI almost never have problems with performance in Python, and I program in it exclusively. For those things where performance really matters -- e.g., image processing -- there are library written in C that are available from Python (and fairly easy to use) like PIL. There are lots of algorithms in Python itself that are extremely fast, like a great hashtable implementation (Python dictionaries) and sort algorithm.
If it's really a problem, there are a myriad of solutions -- Numeric and numarray for lots of numbers, psyco for JIT optimizations, Pyrex for a Python-like syntax that compiles to C (and can be as fast as C if you use it correctly), and lots of other new options as well -- IronPython is supposed to be faster than CPython (the standard implementation), there's quite a bit of work on type inference, PyPy is working hard at compiling Python to fast C, Boost can inline C++ code... there's a huge number of options.
I've never encountered someone who had to throw a project away because of performance issues in Python. Sometimes they have to change the design, move some small parts of C, make better use of other people's libraries, and always of course driven by profiling -- but that's the kind of refactoring that always happens in development. And for a very large number of applications it simply is never a problem.
-
Re:OpenOffice 2.0 vs MS Office 2003
Honestly I wouldn't use either Office or OpenOffice for these tasks. Nor would I dis your average office worker. I would check out Numeric and SCI Python. More on it Here . And a presentation from EuroPython where the BioSimGrid is manipulating and reporting on 2000 chunks of data that are each 5-20GB in size.
-
Re:Numerical Python
Numerical Python is a set of libraries providing fast, multidimensional, array processing facilities. I have no knowledge of the Perl PDL, so I can't provide any comparitive information.
More information can be found at http://numeric.scipy.org/numpydoc/numdoc.htm
and at:
http://www-128.ibm.com/developerworks/linux/librar y/l-cpnum.html -
Re:like the tetris-playing botYou are so correct, my man. What is the point of a library if you didn't write it yourself? Why, it would be utterly useless!
First, you ought to know that sarcasm does not work well in ASCII.
Second, who the fuck said libraries weren't useful? Python is great for many reasons (my favorite is that code can look like pseudocode if you don't use lambdas all over the place), and one reason is the great libraries available. I threw together a working curve-fitting program with NumPy, Numarray, and the builtins. It was a learning exercise for me, really, because I do molecular biology by trade--not programming. The vast majority of "my" curve-fitting program was the code from NumPy and Numarray. Can I really take credit for all their work, and call it my own?
Taking pride in the number of lines of code is pretty stupid, unless there is some way to normalize it. What language are we talking about? Do you count the lines of code in all imported libraries? If not, why not? And some languages are very sparse, with few builtin libraries. Obviously I can write a program with fewer lines in a language that has everything including the kitchen sink built in. I never said this jigsaw program wasn't impressive; I'm just saying I'd be way more impressed if someone did the same thing in 200 lines of assembly.
-
Quantian articleI own the quantian.org domain. The following is from my article on the Quantian Distribution. Here is a brief run down of links, programs, and other goodies in Quantian.
- R, including several add-on packages (such as tseries, RODBC, coda, mcmcpack, gtkdevice, rgtk, rquantlib, qtl, dbi, rmysql), out-of-the box support for the powerful ESS modes for XEmacs as well as the Ggobi visualisation program;
- A complete teTeX, TeX, and LaTeX setup for scientific publishing, along with TeXmacs and LyX for wysiwyg editing;
- Perl and Python with loads of add-ons, plus ruby, tcl, Lua, and Scientific and Numeric Python;
- The Emacs and Vim editors, as well as Gnumeric, kate, Koffice, jed, joe, nedit and zile;
- Octave, with add-on packages octave-forge, octave-sp, octave-epstk, and matwrap;
- Computer-algebra systems Maxima, Pari/GP, GAP, GiNaC and YaCaS;
- the QuantLib quantitative finance library including its Python interface;
- GSL, the Gnu Scientific Library (GSL) including example binaries;
- The GNU compiler suite comprising gcc, g77, g++ compilers;
- the OpenDX, Plotmtv, and Mayavi data visualisation systems;
- it includes apcalc,aribas,autoclass,
-
SciPyHow about SciPy. This is scientic extensions added to Python. This includes Numeric to give arrays that act the way we expect from using Matlab®.
-
Re:Broken link, java jab
You can also compile your numeric code into blitz(optimized C++ templated libraries) which are pretty speedie(2-4* faster than numeric).
http://www.scipy.org/site_content/weave
Then get a good vectorizing compiler like vectorc. Which can often produce much faster C/C++ output compared to gcc.
Then you have far better speed than java, more readable code, in less time. Yah! multiple languages win again :)
Of course for a distributed FP program, maybe java is better for the results, as I heard earlier the fp ops are equivalent on different architectures. Whereas even on x86 different machines give you different fp results.
Now if only I/someone could get around to finishing that runtime assembler optimizer for numeric...
Have fun! -
Re:Python
It already exists !
IPython -
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.
-
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.
-
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.
-
A command line with user testing
Linux CLI interfaces evolved within a natural selection framework from an ancient interface to the modern ones. In this process, all kinds of idiosyncrasy survived that aren't needed anymore, but you have fabulous CLI interfaces like IPython where you can easily transform and query a bunch of data and throw it away. Now they will develop a CLI interface testing it with developers. Soon opensource will have to catch windows.
-
Re:Much of this could be done in linux...
Ask and ye shall receive:
http://ipython.scipy.org/
Granted, it's actually an enhanced interpreter with a few bash-isms thrown in, but hey, it's nice and it works. -
Re:Much of this could be done in linux...
As you say, it lacks some of the built-ins of a typical shell that make the easy things easy. Check out IPython.
-
Interview with Anders HejlsbergEarlier this week, artima.com published an interview with Anders Hejlsberg, lead architect of the C# programming language. Hejlsberg, interviewed by Bruce Eckel and Bill Venners, talks about the C# design process, the trouble with checked exceptions, and his idea of simplexity .
C# is one programming language I've stayed away from--and for no particular reason. I had picked up the C# specification [PDF] in 2000, but never really got down to the canonical "hello world" program. Today in 2003, as I look back, I guess I haven't missed much.
Let's go back to August 2000 and revisit Hejlsberg's famous O'Reilly interview by Josh Osborn.
Why are there no enums in Java, for example? I mean, what's the rationale for cutting those?
And Java has enums now, just like they come in C#.
one of our key design goals was to make the C# language component-oriented
I think this was really nice, and fitted in well with Microsoft's COM framework. I remember COM enthusiasts mentioning how every C# object would automatically be a COM object, thereby eliminating all that old school drudgery.
C# is the first language to incorporate XML comment tags that can be used by the compiler to generate readable documentation directly from source code.
Python and Java have docstrings (or javadoc) as part of the language.
Developers are building software components these days. They're not building monolithic applications or monolithic class libraries.
Developers are building all sorts of stuff, and not just "components". I think that statement is overrated.
Boxing allows the value of any value type to be converted to an object, while unboxing allows the value of an object to be converted to a simple value type.
Thanks, now Java has it too!
Unsafe code allows you to write inline C code with pointers, to do unsafe casts, and to pin down memory so it won't accidentally be garbage-collected. [...] The real difference is that it's still running within the managed space. The methods you write still have descriptive tables that tell you which objects are live, so you don't have to go across a marshalling boundary whenever you go into this code. Otherwise, when you go out to undescriptive, unmanaged code (like through the Java Native Interface, for example), you have to set a watermark or erect a barrier on the stack.
Honestly, I didn't understand the stuff about "unsafe code", the implementation of IL, and the implementation of generics. Just for comparison sake, Python also has a scheme for inlining C and C++ code.
Let's face it, some people like to program in COBOL, some people like to program in Basic, some like C++, and some will like C#, I hope. But we're not trying to tell you to forget everything you ever did.
I've raised this point to Java bigots on several occasions. It's just too difficult (and sometimes impossible) to interface Java with other languages. (In this context,
-
A lack of Parallelism
All of these tools address different aspects of numerical computing. A mixture of languages and tools will generally produce the best results.
I've been experimenting with a number of scientific programming packages, ranging from traditional languages like Fortran 95 to new developments like SciPy. Of the "new" approaches, I like SciPy the best, given its support for MPI and ease of linking to traditional languages.
Support for NUMA and SMP architectures is severely lacking in most "free" packages. This may, in some respects, be due to the lack of parallel support on gcc (although there is an effort underway (gomp) to add OpenMP support to gcc).
Parallelism is important to any large-scale numerical application -- and PDL, as yet, does not appear to support SMP, NUMA, or cluster architectures. I know there are attempts at adding parallel support to Perl, but haven't seen much activity with them.
GSL does not implement any parallel algorithms; according to this post by Brian Gough (), GSL is not designed to support parallelism.
-
scipy
Well, I don't know about how mature/not mature Scientific Python or Octave are with respect to PDL, but I like Python better and I was used to Matlab in the past anyway.
At present, I am using Scipy, a nice more complete version of Numerical Python. Together with IPython, I get a very nice numerical environment. Unfortunately, while Scipy is very nice, it is still a bit of a bleeding edge product. But it is **very** fast for large array computations. I also like the fact that you can link fortran routines easily (yes, people still use fortran, it's useful and easy).
I also use Octave because I miss the ease of generating plots in Matlab (yes, I could do this with scipy, but somehow, I resort to using Octave). It is a very complete program, with many toolboxes. Given that some of the Matlab toolboxes can also be incorporated, there is a vast array of functions for you to play around with.
On the other hand, I think that none of the "established languages" are a good comparison. IDL is extremely powerful for Remote Sensing/Image Processing tasks (my area of research). It is simple to use, and a bit of a standard in the field. From the PDL changelog, the cartographic features in PDL amount to no more than transformations... Mathematica is extremely powerful in symbolic Maths, which as far as I can tell, is not what pdl is about. And Matlab is turning into the VB of scientists (at least, it is multiplatform
:D)Oh well, I'll have to give it a go
:-D -
scipy
Well, I don't know about how mature/not mature Scientific Python or Octave are with respect to PDL, but I like Python better and I was used to Matlab in the past anyway.
At present, I am using Scipy, a nice more complete version of Numerical Python. Together with IPython, I get a very nice numerical environment. Unfortunately, while Scipy is very nice, it is still a bit of a bleeding edge product. But it is **very** fast for large array computations. I also like the fact that you can link fortran routines easily (yes, people still use fortran, it's useful and easy).
I also use Octave because I miss the ease of generating plots in Matlab (yes, I could do this with scipy, but somehow, I resort to using Octave). It is a very complete program, with many toolboxes. Given that some of the Matlab toolboxes can also be incorporated, there is a vast array of functions for you to play around with.
On the other hand, I think that none of the "established languages" are a good comparison. IDL is extremely powerful for Remote Sensing/Image Processing tasks (my area of research). It is simple to use, and a bit of a standard in the field. From the PDL changelog, the cartographic features in PDL amount to no more than transformations... Mathematica is extremely powerful in symbolic Maths, which as far as I can tell, is not what pdl is about. And Matlab is turning into the VB of scientists (at least, it is multiplatform
:D)Oh well, I'll have to give it a go
:-D -
Re:MathCad?
User friendly? Are you talking about the program that I use on a daily basis? Surely not. MathCAD is without a doubt the prettiest of all the options but it is among the worst in user interface.
For those of you who are not familiar with MathCAD, it works like this:
Anything and everything that you want to input into MathCAD is in it's own little box. Be it a text or an equation box.
The horrid part is trying to organize all these boxes on the page. Putting everthing in a box means that it operates completely contrary to what most people are used to with MS Word. Say you enter some equations and then decide you want to add a few more in the middle. You can't just hit the up arrow and start typing with maybe an enter. Instead, you'll often have to select the later equations and drag them down to make room for the new. Then, if you have a lot of equations you likely didn't move all of them down. So, you have to select the equations that now overlap and select 'Separate Regions' from a menu. This gets to be very tedious.
Furthermore, is it too much to expect MathCAD to figure out that I don't want have my equation on page one and the rest on page two? Why should I have to go and select "Reimpaginate' from a menu before I print?
Entering equations is no joy either. I'm constantly frustrated when I try and do something as simple as add antoher term to an equation, like changing x^2 - 3 to x^2 + x - 3. I find myself starting over and at times typing 1 + 1 - 1 and then replacing the ones. I mean, come on, I've seen many math typeing solutions that are far better, in MathType, and LyX for example.
Sure you might have a nice looking document but was it really worth the pain? Furthermore, I find MathCAD to be seriously lacking in function compared to Maple et al.
Of course, Maple et al. all have their problems with user interface. Why should I have to end with a semi-colon? And you have to realize that it's never going to look the way you want it to. So you have to suck it up and do the math without worrying about the beauty of the output.
Not to sell MathCAD short, there are some things that it does do well:
-
Units, the best unit management system I've had the joy to use. Very nice.
-
The output is beatiful.
-
Simple math that doesn't require big complicated equations and lots of loops.
Personally, I can do the easy math by hand. For more advanced stuff check out SciPy.org. They provide a python interface to established numerical algorithms in C and Fortran. But it's much quicker and 'funner' to use. Unfortunately they are only at alpha right now. But, you can't be the price and for the most part, I've found the optimization sections to be quite stable. Combine it with pychart and your've got a good science package for free.
Otherwise, the only package that I've actually heard people rave about is Matlab.
-