Domain: wolfram.com
Stories and comments across the archive that link to wolfram.com.
Comments · 1,306
-
Backgrounder: A=B+C for all types
What a great article! There's a lot to get through there, so I thought I'd add a bit of extra info about one bit I know well.
Tim mentions how much more clear it is to use direct assignment (A=B+C) for all types (including lists) than having to worry about the details of the specific classes. This issue is part of the study of generic programming. This is generally quite easy to do with functional languages (e.g. have a look at some Mathematica programs to see what I mean).
A lot of effort is going into making this available in C++, with a particularly success being achieved by the STL. The STL gets over the problem of speed through using templates, which (as Tim mentions) are dealt with at compile time rather than run time. Although Tim apparently has no time for templates, they certainly achieve good results in the STL.
Those of you with their thinking hats on will be wondering "but what happens if I write A=B+C+D?". The STL would create two loops and two memory copies, since it thinks of it as ((B+C)+D). Some very interesting work to avoid this problem is being implemented in class libraries such as POOMA and Blitz++ which implement the fiendishly clever concept of expression templates to actually create and traverse a parse tree of the expression at compile time. Of course, this can lead to very long compilation times. An amazing side effect of this approach is that if you never actually use a value in A (having assigned B+C to it), then it will never get evaluated (e.g. the classes use 'lazy evaluation').
If you're interested in trying out some of these ideas in a strongly typed language, it's worth looking at C++. You'll need a good compiler though--if you're using GCC make sure it's the latest version, or for better results still try KAI C++. If you're a complete newcomer try out a functional language--I particularly recommend Mathematica, although you can use the functional concepts in Python (e.g. Map()) and Perl to make a start. -
Why not use ScriptAlias
Why doesn't anyone use the ScriptAlias directive? It does the same thing as query strings, but makes it look nicer, like the rest of the web. You can "say" your looking at a directory or a
.html file, but in reality you are viewing a singe script. For an example go to http://store.wolfram.com/. There are no directories on the server side, it's all served off of one script. Yet, to the user, it appears as a hierarchical directory structure, complete with .html files. The only query string is your session id, which is appended to the URL in case your browser doesn't support cookies (however, these are not there if a robot views the site). Anyway, a simple directive like ScriptAlias can save everyone a lot of trouble. If anyone has questions about its usage, send me an email.
Jon -
Why not use ScriptAlias
Why doesn't anyone use the ScriptAlias directive? It does the same thing as query strings, but makes it look nicer, like the rest of the web. You can "say" your looking at a directory or a
.html file, but in reality you are viewing a singe script. For an example go to http://store.wolfram.com/. There are no directories on the server side, it's all served off of one script. Yet, to the user, it appears as a hierarchical directory structure, complete with .html files. The only query string is your session id, which is appended to the URL in case your browser doesn't support cookies (however, these are not there if a robot views the site). Anyway, a simple directive like ScriptAlias can save everyone a lot of trouble. If anyone has questions about its usage, send me an email.
Jon -
Re:Facts and FUD
Actually, you can get Mathematica for Linux.
But there's no free (GNU) equivalent, as the original message pointed out...
-
Re:Obsolete skills need not be taught anymore.My intro to compsci teacher made a great point the first day of class - once you know how to do something, you should teach it to a computer. This has two benefits for you:
- You're certain you know how to do this, because you just described it in the excruciating detail needed for a computer to understand it, and
- You no longer have to do it again; you're spared from boring, repetitive work.
Using tools is great once you know the underlying stuff, but if you skip that step, you've had all the fundamentals of math abstracted out from under you. You'll never make mathematical progress, because you don't know the basics. Your hand calculator really is better than you, because it was programmed by engineers and mathematicians who knew what they were doing.
Isaac Asimov wrote a truly excellent short story about the consequences of the path you're talking about. Anyone remember the name?
-
Let me clear the (brain)fog
The Disc. Channel prog was good. It didn't pull punches when showing what they had. They said the computer (that could do the crack in under a second) was called a "Thinking Machine" it's actually a CM-5 (connection machine 5) made by Thinking Machines, Inc. Lotsa places have CM-5s, they're one of the most popular production supercomputers. Univ's like U. of Illinois (NCSA) and others have them availible to students.
They showed in the video a Cray T90-class supercomputer. Another popular one. These are nice systems (as far as supercomps go. they're just nice, not great.)
I assume that the NSA also has several of Cray's flagship models - the T3E-1200. Check out www.top500.org to see where I get my assumptions. The list is here.
The NSA has an affinity for very fast computers. They can use them to brute force just about anything.
Private companies have think tanks for coming up with math algorithms. Wolfram Research has some of them, they use them in Mathematica (a program). Mathematica has many secret algorithms for searching for prime stuff (numbers, factors, etc.).
There are other networks the NSA (presumably) uses to spy on people. One of them is rather obscure. Ask yourself this... "GPS uses like 24 satellites in polar orbit to cover the earth with a signal to tell you where you are. These are military (i.e. NSA) satelliites. They have the whole satellite to themselves. These are not little laptops in the sky - they're supercomputers. So what else do they put on the (several schoolbus sized) things???". Answer: Lots of goodies to make their jobs fun. Of course all of the things are top secret (even how GPS works). One of the things is a microwave camera. Ever use a cellphone in a building? Those signals go right through the walls (like they're not even there.) So does the light from these cameras. Ever had an x-ray done? You can see your bones. The freq. range they use is somewhere in between, so they can take pictures through walls, but get more than just bones on the "film". This is all well and good, but we can do better. Take three or more of these cameras and aim them at the same thing... What do you get? A 3-D image of an entire building whose contents show up through the walls.
Next time you're on the crapper, hemroids flairing, wave hi to the sky - we're watching.