As for the "imaginary diffusion equation" (I assume he means the Schrodinger equation), here is a simple program which solves it on the torus:
from pylab import *
from numpy.fft import *
def freeSchrodingerSolver(input, dx, dt):
np = input.shape[0]
k = arange(np)*2*pi/dx #Coordinate system in k-space
k[np/2:] -= np*2*pi/dx #FFT puts negative frequencies
#on right side of array
return ifft(exp(complex(0,-dt)*(k**2)/2)*fft(input)) / np
I really doubt it was easier to do that on a ZX Spectrum.
In my case: I started on basic in dos 5 or dos 6 when I was 10 or so, and every function I had to my disposal was listed in the help file. Alphabetically and by sorted by category. Sooner or later you find the SETPIXEL function, then discover screen 13, then discover how to draw lines and so on. You can discover that "one more thing" pretty easily, and at no point can you get stuck because dependencies are missing or you have the wrong version of libgd. Basic was installed on the family PC, and I had gorillas and snake as example programs to study. Many people I know started in a similar way.
Compare this with python today. First you have to download and install it. You don't just discover it by accident. Then you have to learn the whole edit program, save program, run in python steps. BASIC had a primitive IDE, Python doesn't. Then you have to understand packages and package management, learn how to install pylab, and so on. Python also isn't a very forgiving language.
Programming sound on BASIC was trivial too. The moment you discover SOUND and PLAY you can make primitive melodies. Want to delay? Add a few SLEEPs in between. Exploratory programing at its best, and no internet connection required.
Nearly all python functions are available in the help file sorted by category, though I'm not sure about alphabetically. IDLE (a primitive python IDE) is included in the standard distribution, and the ipython repl is easy enough to install.
I also started using QBASIC in DOS at age 10 or so. But I really don't see how it was easier. I don't think being being preinstalled is that big a deal; plenty of kids download and install games, level editors and the like. They also manage to program for games, e.g. Warcraft or Quake.
Learning to program differently than we did is not the same as being harder.
Actually, thanks for that, I didn't know about that stuff, and it looks really useful. If I can figure out how to get the drawings to move then it will do what I want. (to visualize the action of unitary matrices on Hilbert spaces)
But my point was that in 1982, my non-technical parents bought me a computer and then I was away. A couple of months later I had an animated model of the solar system. And I hadn't read anything except the spectrum manual (and the equivalent one for the TRS-80).
I can work out how to do the above installation for my hypothetical 12 year old son, but my poor father wouldn't have had a chance. And I suspect that the same would be true for most non-techie parents.
And how is the hypothetical son supposed to go from the pretty blue curve created by the magic plotting program to an animated solar system?
I can't see how to make the graphs move. Perhaps it can be done. Perhaps it can't and I should use SDL instead.
The point is that it is not obvious to me. Whereas the equivalent questions were obvious to a child thirty years ago.
Regarding a minimal setup python environment, which requires nothing more than a newbie parent to download, PythonTurtle or Squeak is probably what you want.
I think the issue is mainly just lack of knowledge that truly newbie friendly environments exist. Perhaps the solution is simply better advertising of squeak, or perhaps having it come preinstalled (as OLPC did)?
Incidentally, the animation info you seek (admittedly, not suitable for newbies):
for i in range(numframes):
[...code to make frame...]
savefig("framedir/" + str(framenumber).rjust(8,"0")+".png")
os.system("mencoder -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=1500 -mf type=png:fps=16 -nosound -of mpeg -o movie.mpg mf://framedir/\*.png")
Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03)
Type "copyright", "credits" or "license" for more information.
IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]:
Not any sort of actual setup the user is expected to perform.
As for "no installation", it's not that hard to install ipython on Linux. Windows, well, that's another story. But I think you're focusing on the wrong thing. The problem is not whether it came installed or not, as the effort to install is very low for anybody who's going to be motivated to do this sort of exploration in the first place. The question is, how is anybody supposed to discover that this is possible? I knew about iPython and I didn't even know it was that easy.
Additionally, you did not find this because it was sitting right in front of you. I have many friends who had things like Commodore 64s who never learned squat about them. You found them because you found documentation about it that wasn't drowned in gigabytes upon gigabytes of other information. You had limited, high-quality documentation to draw on, or good magazines, in the days that all the good magazines ran stuff like this. That's the missing step here; not the existence of good learning tools, all of which will actually blow away the experience you could get on those older machines (which were easy, but incredibly limited), but a way for anybody to stumble on them and find out what they are in the current environment, when a site full of crappy little flash games is orders of magnitude easier to find that a tutorial on Processing (http://processing.org/ ).
As for the "imaginary diffusion equation" (I assume he means the Schrodinger equation), here is a simple program which solves it on the torus:
I really doubt it was easier to do that on a ZX Spectrum.