1,062 karma · joined September 21, 2007
Here is a question. Do you agree or disagree that survival/death decides which of nature's experiments work?
For example, we might say that children born with fatal/harmful defects are "unlucky," which is true, but this is a short-term perspective. Over larger timescales, we can say (poetically) that the rarity of these particular kinds of DNA configurations is a "design choice" rendered by the laws of nature. The larger the time scale, the less meaningful individual "chance" things are and the more "systemic" factors come into play. This is probably an instance of "the law of large numbers".
--
Another important thing to point out is that the environment is dynamic and species interact with eachother in all sorts of ways. The concept of a single species evolving in vacuo is very dry, but the reality is different. Throw a few different species into the mix and suddenly you have an explosion in the kinds of behavior and phenomena you will find. I think intelligence is one of those phenomena.
In other words, the natural world has all the depth and richness necessary to account for the "enlightened" properties that you attribute to life. In fact, if I had to pick one gripe I have with religion, it would be that it blinds people as to the raw amazingness and beauty that can be found in the natural world.
i.e. the idea that life is due to nothing more than chance is a strawman
i think generally ancient people don't get the credit they deserve. they weren't dummies. even now-silly-sounding ideas (e.g. geocentric model) had logic to them (e.g. stars had no apparent parallax)
and i don't think anyone claims it wouldn't be a different culture, or that we should throw away core privacy like being able to sleep in our own beds without someone watching
makeObj[] := Module[{obj, i = 0},
obj["inc"] := ++i;
obj["dec"] := --i;
obj[] := i;
obj];
makeObj = function() {
var i = 0;
var obj = function(in) {
switch(in) {
case "inc" : return ++i;
case "dec" : return --i;
case undefined: return i;
};
};
return obj;
};you can do, for example:
RandomChoice[{Plus, Times}][2, 3]
where the result will be either 5 or 6. in more explicit form: If[RandomReal[] < .5, Plus, Times][2, 3]
example of an "anonymous" function: (#1^2 + #2^2 &)[2, 3]
square of all numbers from 1 to 100: #^2 & /@ Range[100]
simpler form: Range[100]^2
all pairwise products of the first seven prime numbers (among themselves): Times @@@ Tuples[Prime /@ Range[7], 2]
etc. makeObj[] := Module[{obj, i = 0},
obj["inc"] := ++i;
obj["dec"] := --i;
obj[] := i;
obj];
precisely speaking, however, Module simply renames symbols to make them unique. the effect is the same as a closure, but it isn't a "pure" closure like you would find in other functional languages, because you can do for example Names["i*"] and find that the supposedly-private 'i' has the name i$2656 and you can alter its value that wayanother point is that you could, if you wanted to, create your own version of Module and other scoping stuff, since it's a matter of making a macro by using the HoldAll atttribute [1] and using 'ReplaceAll' to replace specific variables or arbitrary structures
[1] http://reference.wolfram.com/mathematica/ref/HoldAll.html
In[1]:= FullForm[a + b]
Out[1]= Plus[a, b]
In[2]:= a + b /. Plus -> Times
Out[2]= a b SetOptions[EvaluationNotebook[], DockedCells :> {}]
and there are options to remove the window frame, etc. but i think if you are using certain licenses the toolbar may not disappear. and the main toolbar never disappears, to my dismaythat said, i think it is lisp-like as a design choice. the Mathematica language itself is more raw than even lisp -- you can take the language in different design directions. Wolfram chose to include lisp aspects
and by the way, Mathematica's documentation is enormous so i don't think a single spec would be necessary. maybe a few functions here or there would need some clarification in certain edge cases, but those would be higher-level functions like Plot
[1] http://reference.wolfram.com/mathematica/ref/TextRecognize.h...
obj["a"] = 1;
obj["b"] = 2;
Print[obj["a"]]
or obj = { "a" -> 1, "b" -> 2 };
Print["a" /. obj]
?everything in Mathematica (including graphics and UI) is described using the structure of the Mathematica language itself. the whole system is malleable/composable to a degree that few languages approach
for example:
Nest[Button, "hello", 5]
will create a nesting of 5 buttons. that's the same Nest you would use when nesting a function: Nest[# + 1 &, 2, 5]
And neither of these are hacks, they both work under the same exact rules, because: Nest[whatever, a, 5]
gives whatever[whatever[whatever[whatever[whatever[a]]]]]
it's the frontend that chooses to interpret certain symbols (such as 'Button') in particular ways. m = {{39, 90, 75, 88, 15, 57},
{9, 2, 58, 68, 48, 64},
{29, 55, 16, 67, 8, 91},
{40, 54, 66, 22, 32, 25},
{49, 1, 17, 41, 14, 30},
{44, 63, 10, 83, 46, 3}};
Select[
Extract[m, #] & /@ Transpose[{Range[6], #}] & /@ Tuples[Range[6], 6],
Total[#] == 419 &]