f



Re: Re: Re: Mathematica language issues

I think most people this entire discussion does not have any practical 
importance. Obviously something like this:


2*Unevaluated[1+1]


2 Unevaluated[1+1]

is extremly unlikely to have any practical use. After all, we use 
Unevaluated when we want something to remain unevaluated, whereas here 
only two things can happen: either one will be left with 
Unevaluated[something] or the "something" will evaluate. Both of these 
outcomes are obsiously undesirable. Why should one ever use anything 
like this in a program?

In fact if for some unimaginable reason somone needed this sort of 
thing and wanted Unevaluated to be removed all he needs to do is to 
ensure that some transformation that does not change the value of the 
expression will take place during evaluation. For example, one way to 
make sure thsi will happen woudl be:


a*2*Unevaluated[(1 + 1)/a]

4

Obvioulsy this or a similar method can be used in all cases. There are 
no imaginable cases where one woudl wihs to be left with Unevaluated, 
if one wanted that one should use Hold or HoldForm.

This also deals with the issue of "unpredictability". But for me that 
is non issue. I understand that there are some people who love life to 
be perfectly predictable and go to a great length to ensure that 
(particularly in the case of election results in certain countries) but 
there  others who find a little unpredictability, experimentation and 
the sense of discovery that goes with it quite pleasant and exciting. 
Mathematica is obviously more suitable for the second type of user. I 
am afraid this is not going to change unless someone decides to 
re-write it from scratch, which will make it a very different product.

Andrzej Kozlowski


On 21 Dec 2004, at 19:19, Maxim wrote:

> On Mon, 20 Dec 2004 11:53:46 +0000 (UTC), Andrzej Kozlowski
> <akoz@mimuw.edu.pl> wrote:
>
>>
>> On 19 Dec 2004, at 20:15, Maxim wrote:
>>
>>> On Sat, 18 Dec 2004 09:36:01 +0000 (UTC), Andrzej Kozlowski
>>> <akoz@mimuw.edu.pl> wrote:
>>>
>>>>
>>>> On 17 Dec 2004, at 19:20, Maxim wrote:
>>>>
>>>>> In[5]:=
>>>>> Unevaluated[1 + 1]*2
>>>>> 2*Unevaluated[1 + 1]
>>>>>
>>>>> Out[5]=
>>>>> 4
>>>>>
>>>>> Out[6]=
>>>>> 2*Unevaluated[1 + 1]
>>>>>
>>>>
>>>> This is not a glitch but works exactly as one woudl expect.  You can
>>>> see the difference and the reason by looking at Trace in both cases
>>>> (although there is no need for that, if you understand Unevaluated 
>>>> you
>>>> can see it right away).
>>>>
>>>> First:
>>>> 2*Unevaluated[1+1]//Trace
>>>>
>>>>
>>>> {2 (1+1),2 Unevaluated[1+1]}
>>>>
>>>>
>>>> First Unevaluated is stipped away and Mathematica attempts ot 
>>>> evaluate
>>>> 2*(1+1). Since it knows no rule to apply and the expression has not
>>>> changed Unevaluated is restored and evaluation is completed with the
>>>> output you see.
>>>>
>>>>
>>>>
>>>> Unevaluated[1+1]*2//Trace
>>>>
>>>> {(1+1) 2,2 (1+1),{1+1,2},2 2,4}
>>>>
>>>> As before, first Unevaluated is stripped away and Mathematica tires 
>>>> to
>>>> evaluate 2*(1+1). It now knows a rule to apply, which is given by 
>>>> the
>>>> Orderless attribute and the canonical ordering, so it converts the
>>>> expression into the form 2 (1+1). But now Unevaluated is not 
>>>> restored
>>>> because the expression has changed so evaluation continues with 1+1
>>>> evaluationg to 2 and finally you obtain 4.
>>>>
>>>> Now, I have honstly considered this case only because I could see at
>>>> once what what was going on. I do not knwo if any of the others are
>>>> glitches but jusdging by my experience with the past "language
>>>> glitches" you have reported (unlike the more serious problems 
>>>> desribed
>>>> in your last posting) I rather doubt it. However I have no time to
>>>> spend on this just to prove a point (again).
>>>>
>>>>
>>>>
>>>> Andrzej Kozlowski
>>>> Chiba, Japan
>>>> http://www.akikoz.net/~andrzej/
>>>> http://www.mimuw.edu.pl/~akoz/
>>>>
>>>
>>> I do not agree. Suppose we evaluate z*Unevaluated[1 + 1]; according 
>>> to
>>> your explanation, after the reordering of the factors Unevaluated
>>> should
>>> disappear from the final result. However, the expression evaluates to
>>> Unevaluated[1 + 1]*z. Further, suppose we take Unevaluated[1
>>> + 1]*Sin[Pi/4]: Sin[Pi/4] evaluates to 1/Sqrt[2], so in this case an
>>> evaluation step definitely takes place; however, the output is
>>> Unevaluated[1 + 1]/Sqrt[2]. Your theory simply doesn't work. But even
>>> if
>>> it did, there is another problem: suppose I use Sin[Pi/8] instead of
>>> Sin[Pi/4] -- then first you would need to know whether Mathematica 
>>> has
>>> a
>>> built-in rule for Sin[Pi/8] to arrive at any conclusion as to how it
>>> might
>>> work with Unevaluated (that is, what will count as an evaluation
>>> step?).
>>> So to apply your explanation we would have to search through all the
>>> built-in rules of Mathematica.
>>>
>>> Maxim Rytin
>>> m.r@inbox.ru
>>>
>>>
>>>
>> The principle behind Unevaluated, which I  described above and which
>> gos like this : strip off Unevaluated, keep applying all known rules 
>> to
>> the expression (without evaluating the part that is supposed to be
>> Unevaluated) then check if the expression "has changed", if not 
>> restore
>> Unevaluated, if yes do not restore it. I have not invented it, it can
>> be found in several perfectly reliable sources including  Michael
>> Trott's Giudebooks (section 4.7 of the programming volume).
>> You can go on saying as long as you like that you don't agree wiht 
>> this
>> or that  and that you have discovered "glitches" (as you imagine you
>> have done in the past with patterns and significance arithmetic) but
>> that is your and not my problem. It also does not seem to be a problem
>> for WRI since they rightly continue to ignore it.  You seem to think
>> that anything that you do not understand is a glitch or is wrong. I
>> have seen people with this attitude and I have long ago learned that 
>> it
>> can't be cured and that its best to just ignore it.
>>
>> Returning for the last time  to this issue: what you have discovered 
>> is
>> not a "glitch" but one of the many peculiarities of Unevaluated and
>> also of the (very special) functions Times and Plus.  They do not
>> matter at all to the user because none of the examples you present 
>> have
>> any realistic application.
>>
>> The point seems to be in deciding when  "an expression has changed" or
>> "has not changed". In this respect as in many others the functions
>> Times and Plus are peculiar because they treat numerical expressions
>> and symbolic ones in a different way.
>>
>> In general, if f is any function with the Orderless attribute f[a,b]
>> and f[b,a] will be considered as the same expression. Thus;
>>
>>
>>
>>
>>
>> SetAttributes[g,{Orderless,Flat,OneIdentity}]
>>
>>
>> Trace[g[ Unevaluated[f[1 , 1]],2]]
>>
>>
>> {g(f(1,1),2),g(2,f(1,1)),g(2,Unevaluated[f(1,1)])}
>>
>> Here although the Orderless attribute of g was used in the above to
>> reverse the order of parameters of g the expression is considered not
>> to have changed and Unevaluated is restored.
>>
>> This behaviour however changes when g is one of the functions Times or
>> Plus:
>>
>>
>> Block[{g=Times},Trace[g[ Unevaluated[f[1 , 1]],2]]]
>>
>>
>> {{g,Times},f(1,1) 2,2 f(1,1)}
>>
>>
>> Block[{g=Plus},Trace[g[ Unevaluated[f[1 , 1]],2]]]
>>
>> {{g,Plus},f(1,1)+2,f(1,1)+2}
>>
>> It will not, however,  happen when 2 is replace by a symbol:
>>
>>
>> Block[{g=Times},Trace[g[ Unevaluated[f[1 , 1]],z]]]
>>
>>
>> {{g,Times},f(1,1) z,z f(1,1),z Unevaluated[f(1,1)]}
>>
>>
>> Block[{g=Plus},Trace[g[ Unevaluated[f[1 , 1]],z]]]
>>
>>
>> {{g,Plus},z+f(1,1),z+f(1,1),z+Unevaluated[f(1,1)]}
>>
>>
>> In other words, the issue amounts to the way Mathematica views the
>> operation of commuting a number and (effectively) a symbol. In such
>> cases expressions that differ only in the order of factors are
>> considered different. Even simpler cases are:
>>
>>
>> Unevaluated[a]*2
>>
>>
>> 2 a
>>
>>
>> 2*Unevaluated[a]
>>
>>
>> 2 Unevaluated[a]
>>
>> and the same with Times, as compared with using two symbols:
>>
>>
>> Unevaluated[a]*z
>>
>>
>> Unevaluated[a] z
>>
>>
>> Unevaluated[z]*a
>>
>>
>> a Unevaluated[z]
>>
>>
>> you can even  do this:
>>
>>
>> Times[0,Unevaluated[Infinity]]
>>
>> 0
>>
>> Times[Unevaluated[Infinity],0]
>>
>> Indeterminate expression 0* Infinity encountered.
>>
>>
>>
>> O.K. so finally so what? Mathematica clearly treats the operation of
>> adding or multiplying a number and a symbol differently than it does
>> adding or multiplying two symbols or two numbers. This is not
>> documented but not really surprising. There are thousands of such
>> undocumented aspects of Mathematica but this does not matter because
>> they are totally irrelevant to the user. Nobody is ever going to use
>> any of the above for any purpose. There is no glitch , there is no
>> reason to change anything (and nothing will be changed. Your posting
>> seems to me like a waste of effort, but that is your problem. Reading
>> it and thinking about it is a waste of time and that is my problem. I
>> think I shall form now on leave it to those who like this sort of
>> thing.
>>
>>
>>
>> Andrzej Kozlowski
>> Chiba, Japan
>> http://www.akikoz.net/~andrzej/
>> http://www.mimuw.edu.pl/~akoz/
>>
>
> Basically you're saying that it works one way for numbers and another 
> way
> for symbols, one way for Plus and another way for other Orderless
> functions; but how does that explain anything? It would be more 
> precise to
> say that the result depends on whether Mathematica applies any built-in
> rules on intermediate evaluation steps, but this isn't a sufficient
> explanation either; consider
>
> In[1]:=
> Unevaluated[2]/Sqrt[2]
> Unevaluated[Sqrt[2] + Sqrt[2]]/Sqrt[2]
>
> Out[1]=
> Sqrt[2]
>
> Out[2]=
> Unevaluated[Sqrt[2] + Sqrt[2]]/Sqrt[2]
>
> In the first case 2/Sqrt[2] is reduced to Sqrt[2], which means that 
> some
> basic arithmetic rules are applied; in the second case (Sqrt[2]
> + Sqrt[2])/Sqrt[2] is not reduced to 2, so some basic arithmetic rules 
> are
> not applied; how can you tell which it's going to be in any given case?
>
> Next, compare
>
> In[3]:=
> Unevaluated[Sqrt[2]*(Sqrt[3] + 1)]*Csc[Pi/12]
> Unevaluated[Sqrt[6] + Sqrt[2]]*Csc[Pi/12]
>
> Out[3]=
> 2*(1 + Sqrt[3])^2
>
> Out[4]=
> Sqrt[2]*Unevaluated[Sqrt[6] + Sqrt[2]]*(1 + Sqrt[3])
>
> The difference is that in the first case the argument of Unevaluated
> exactly matches the result of the evaluation of Csc[Pi/12], and
> Mathematica transforms a*a to a^2; in the second case the argument of
> Unevaluated is the same numerically but has a different structure, and
> Mathematica cannot simplify the product further, thus Unevaluated 
> remains.
> I have to repeat what I said in my previous post: to predict the 
> outcome
> you need to know exactly what the part which isn't wrapped in 
> Unevaluated
> evaluates to; in other words, you need to see the output first and only
> after that you can explain to me why it was exactly the output you had
> been expecting.
>
> Maxim Rytin
> m.r@inbox.ru
>

0
akoz (2415)
12/22/2004 10:11:55 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

8 Replies
948 Views

Similar Articles

[PageSpeed] 29

You pretty much miss the point.
If you go into an elevator and press the button
labeled "4" you expect the elevator to (eventually)
stop at the 4th floor.  If you press two buttons
simultaneously, say "3" and "4" you would probably be
OK with one of these outcomes.
1. Only 3 lights up
2. Only 4 lights up
3. Both 3 and 4 light up
4. Neither lights up.

You would not be happy if, for example, the elevator
stopped half-way between the floors, or if it
blew up.

This is the case even if pressing two buttons simultaneously
does not have any practical importance.

Good programming languages and systems should not
behave in arbitrary, inconsistent, and apparently
inexplicable fashion -- (that is, There
are behaviors that may seem inexplicable to the naive --
but they can be explained eventually.)

You say this over and over.
"the program does X. the program has no bugs. the
behavior X is a feature."

I encourage you, once again, to read a book on programming
language design principles.  Tell us if you find one that says
"This statement is legal, but not important, so
we can do something random."

Regards.

RJF



Andrzej Kozlowski wrote:
> I think most people this entire discussion does not have any practical 
> importance. Obviously something like this:
> 
> 
> 2*Unevaluated[1+1]
> 
> 
> 2 Unevaluated[1+1]
> 
> is extremly unlikely to have any practical use. 


<<<<<<big snip>>>>>>>

0
fateman1 (97)
12/23/2004 1:21:45 PM
I don't think Mathematica's behavior is random; but I don't find it to be predictable, either. That's my own ignorance in part, but Maxim has convinced me I'd have to know ALL Mathematica's rules in order to predict the behavior of Unevaluated in fairly simple (but general) situations.

I sympathize with Andrzej's belief that it's sufficient to experiment until we are sure what will happen in the cases we're interested in. But we can't write functions for unknown inputs without SOME ability to predict outcomes.

I can't argue with Andrzej's claim that Maxim's examples have no real use, either -- the Villegas article uses examples that matter (and shows how to control the "randomness" so everything works out right).

So... I have to say, Unevaluated's behavior IS tough to predict, but using it carefully makes it a very useful feature.

Bobby

On Thu, 23 Dec 2004 07:58:59 -0500 (EST), Richard J. Fateman <fateman@eecs.berkeley.edu> wrote:

> You pretty much miss the point.
> If you go into an elevator and press the button
> labeled "4" you expect the elevator to (eventually)
> stop at the 4th floor.  If you press two buttons
> simultaneously, say "3" and "4" you would probably be
> OK with one of these outcomes.
> 1. Only 3 lights up
> 2. Only 4 lights up
> 3. Both 3 and 4 light up
> 4. Neither lights up.
>
> You would not be happy if, for example, the elevator
> stopped half-way between the floors, or if it
> blew up.
>
> This is the case even if pressing two buttons simultaneously
> does not have any practical importance.
>
> Good programming languages and systems should not
> behave in arbitrary, inconsistent, and apparently
> inexplicable fashion -- (that is, There
> are behaviors that may seem inexplicable to the naive --
> but they can be explained eventually.)
>
> You say this over and over.
> "the program does X. the program has no bugs. the
> behavior X is a feature."
>
> I encourage you, once again, to read a book on programming
> language design principles.  Tell us if you find one that says
> "This statement is legal, but not important, so
> we can do something random."
>
> Regards.
>
> RJF
>
>
>
> Andrzej Kozlowski wrote:
>> I think most people this entire discussion does not have any practical
>> importance. Obviously something like this:
>>
>>
>> 2*Unevaluated[1+1]
>>
>>
>> 2 Unevaluated[1+1]
>>
>> is extremly unlikely to have any practical use.
>
>
> <<<<<<big snip>>>>>>>
>
>
>
>



-- 
DrBob@bigfoot.com
www.eclecticdreams.net

0
drbob1 (1163)
12/24/2004 11:16:39 AM
One risk of saying that expressions are "unlikely to have any practical
use" is that sophisticated programming evironments tend to be used to
automate tasks that are relatively unrestricted.

Perhaps no human using Mathematica would type in these expressions by
hand, but it is certainly conceivable that someone might develop an
application package that would end up generating forms like these as
intermediate steps while addressing very sensible and practical
problems.

Think of something like a C language compiler: it is clear that C
compilers will, even for simple, straightforward C expressions,
generate machine code that is quite unlike what a human machine code
programmer would create. If a CPU acted strangely because its designer
never anticipated codes in these orders, people would complain that the
CPU has bugs. Perhaps compiler writers would learn to work around these
bugs, if they were isolated and predictable enough, but these would be
bugs nonetheless.

People trying to build large systems need building blocks that are
*robust*, in the sense of behaving predictably *even in situations that
might not be forseeable*.

You might get a warm fuzzy feeling from experimentation and discovery,
but people using libraries will end up performing mysterious
uncontrolled experiments, not of their own choosing, and perhaps
silently returning bad results. 

--Joe

0
12/25/2004 9:27:10 AM
bake 20 minutes more to form a glaze. 
Cut ribs into individual pieces and serve with extra sauce.



Fresh Sausage

If it becomes necessary to hide the fact that you are eating 
human babies, this is the perfect solution. 
But if you are still paranoid, you can substitute pork butt.

5 lb. lean chuck roast
3 lb. prime baby butt
2 tablespoons each: 
   salt
   black, white and cayenne peppers
   celery salt
   garlic powder
   parsley flakes
   brown sugar
1 teaspoon sage
2 onions
6 cloves garlic
bunch green onions, chopped

Cut the children?s butts and the beef roast into pieces 
   that will fit in the grinder. 
Run the meat through using a 3/16 grinding plate. 
Add garlic, onions and seasoning then mix well. 
Add just enough water for a smooth consistency, then mix again. 
Form the sausage mixture into patties or stuff into natural casings.



Stillborn Stew

By definition, this meat cannot be had altogether fresh, 
but have the lifeless unfortunate available immediately after delivery, 
or use high quality beef or pork roasts (it is cheaper and better to 
cut up a whole roast than to buy stew meat). 

1 stillbirth, de-boned and cubed
� cup vegetable oil
2 large onions
bell pepper
celery
garlic
� cup red wine
3 Irish potatoes
2 large carrots 

This is a simple classic stew that makes natural gravy, 
thus it does not have to be thickened. 
Brown the meat quickly in very hot oil, remove and set aside. 
Brown the onions, celery, pepper and garlic. 
De-glaze with wine, return meat to the pan and season well. 
Stew on low fire adding small amounts of water and 
   seasoning as necessary. 
After at least half an hour, add the carrots and potatoes, 
 


0
drbob1 (1163)
12/25/2004 5:44:42 PM
mustard
1 cup seasoned flour
oil enough for deep frying
1 loaf French bread
Lettuce
tomatoes
mayonnaise, etc.

Marinate the fetuses in the egg-mustard mixture. 
Dredge thoroughly in flour. 
Fry at 375� until crispy golden brown. 
Remove and place on paper towels.



Holiday Youngster

One can easily adapt this recipe to ham, though as presented, 
it violates no religious taboos against swine. 

1 large toddler or small child, cleaned and de-headed
Kentucky Bourbon Sauce (see index)
1 large can pineapple slices
Whole cloves

Place him (or ham) or her in a large glass baking dish, buttocks up. 
Tie with butcher string around and across so that he looks like 
  he?s crawling. 
Glaze, then arrange pineapples and secure with cloves. 
Bake uncovered in 350� oven till thermometer reaches 160�.



Cajun Babies

Just like crabs or crawfish, babies are boiled alive! 
You don?t need silverware, the hot spicy meat comes off in your hands.

6 live babies
1 lb. smoked sausage
4 lemons
whole garlic
2 lb. new potatoes
4 ears corn
1 box salt 
crab boil

Bring 3 gallons of water to a boil. 
Add sausage, salt, crab boil, lemons and garlic. 
Drop potatoes in, boil for 4 minutes. 
Corn is added next, boil an additional 11 minutes.
Put the live babies into the boiling water and cover. 
Boil till meat comes off easily with a fork.



Oven-Baked Baby-Back Ribs




0
12/25/2004 6:21:01 PM
serve just as well in this classic southern delicacy. 
The sandwich originated in New Orleans, where an abundance of abortion clinics 
thrive and hot French bread is always available.

2 cleaned fetuses, head on
2 eggs
1 tablespoon yellow mustard
1 cup seasoned flour
oil enough for deep frying
1 loaf French bread
Lettuce
tomatoes
mayonnaise, etc.

Marinate the fetuses in the egg-mustard mixture. 
Dredge thoroughly in flour. 
Fry at 375� until crispy golden brown. 
Remove and place on paper towels.



Holiday Youngster

One can easily adapt this recipe to ham, though as presented, 
it violates no religious taboos against swine. 

1 large toddler or small child, cleaned and de-headed
Kentucky Bourbon Sauce (see index)
1 large can pineapple slices
Whole cloves

Place him (or ham) or her in a large glass baking dish, buttocks up. 
Tie with butcher string around and across so that he looks like 
  he?s crawling. 
Glaze, then arrange pineapples and secure with cloves. 
Bake uncovered in 350� oven till thermometer reaches 160�.



Cajun Babies

Just like crabs or crawfish, babies are boiled alive! 
You don?t need silverware, the hot spicy meat comes off in your hands.

6 live babies
1 lb. smoked sausage
4 lemons
whole garlic
2 lb. new potatoes
4 ears corn
1 box salt 
crab boil

Bring 3 gallons of water to a boil. 
Add sausage, salt, crab boil, lemons and garlic. 
Drop potatoes in, boil for 4 minutes. 
Corn is added next, boil


0
12/25/2004 7:34:08 PM
mother and child, 
so why not consume it? 
Children or chicken breasts will work wonderfully also.

4 whole umbilical chords (or baby breasts, or chicken breasts)
4 thin slices of smoked ham, and Gruyere cheese
Flour
eggwash (milk and eggs)
seasoned bread crumbs
1 onion
minced
salt
pepper
butter
olive oil

Pound the breasts flat (parboil first if using umbilical 
   cords so they won?t be tough). 
Place a slice of ham and cheese on each, along with some minced onion 
   then fold in half, trimming neatly. 
Dredge in flour, eggwash, then seasoned breadcrumbs; 
   allow to sit for a few minutes. 
Saut� in butter and olive oil until golden brown, 
   about 6 minutes on each side.



Shish Kababes

As old as the hills, this technique has employed seafood, beef, pork, lamb, 
poultry, and vegetables; just about anything can be grilled, and young humans 
are no exception!

High quality marinade (Teriyaki and garlic perhaps)
1 inch cubes of tender meat, preferably from the nursery
Onions
bell peppers
Wooden or metal skewers

Marinate the meat overnight. 
Get the grill good and hot while placing meat, vegetables, and 
   fruit such as pineapples or cherries on the skewers. 
Don?t be afraid to use a variety of meats. 
Grill to medium rare, 
   serve with garlic cous-cous and saut�ed asparagus. 
Coffee and sherbet for desert then walnuts, cheese, and port. 


0
drbob1 (1163)
12/25/2004 9:02:10 PM
On 25 Dec 2004, at 18:00, josephoswaldgg@hotmail.com wrote:

> One risk of saying that expressions are "unlikely to have any practical
> use" is that sophisticated programming evironments tend to be used to
> automate tasks that are relatively unrestricted.
>
> Perhaps no human using Mathematica would type in these expressions by
> hand, but it is certainly conceivable that someone might develop an
> application package that would end up generating forms like these as
> intermediate steps while addressing very sensible and practical
> problems.
>
> Think of something like a C language compiler: it is clear that C
> compilers will, even for simple, straightforward C expressions,
> generate machine code that is quite unlike what a human machine code
> programmer would create. If a CPU acted strangely because its designer
> never anticipated codes in these orders, people would complain that the
> CPU has bugs. Perhaps compiler writers would learn to work around these
> bugs, if they were isolated and predictable enough, but these would be
> bugs nonetheless.
>
> People trying to build large systems need building blocks that are
> *robust*, in the sense of behaving predictably *even in situations that
> might not be forseeable*.
>
> You might get a warm fuzzy feeling from experimentation and discovery,
> but people using libraries will end up performing mysterious
> uncontrolled experiments, not of their own choosing, and perhaps
> silently returning bad results.
>
> --Joe
>
>
>

The simple answer to that is that I don't think  Mathemtica was ever 
written for this sort of purpose and WRI as a company does not aspire 
to a share of this market (if it exists). Otherwise obviously they 
would do something about this but the fact is that they don't, which is 
perfectly all right with me though may not be with you.
Mathematica was written for human beings and in fact for human being of 
above average intelligence.  At least for the time being this 
disqualifies it as a tool for the sort of purpose you have brought up 
here. If you are interested in that kind of thing, Mathematica is 
obviously not the right language for you. Why on earth does it have to 
be one? There are countless other purposes it is not suitable for and a 
huge number of other programming languages to choose form.

Andrzej Kozlowski

0
akoz (2415)
12/27/2004 11:43:34 AM
Reply:

Similar Artilces:

Re: Re: Re: Mathematica language issues #2
So far I could resist the temptation to participate in this discussion. However, in his mail Maxim Rytin presents some examples of which he thinks the result is unpredictable. Maybe there is some interest in how I predict the results of simple commands in which Unevaluated occurs. Of course these examples are of no practical interest. Unevaluated is meant to pass unevaluated arguments to a function body and as such it works perfectly. No one in practice is interested in (1+1)*Unevaluated[2+2]. The basic principle has been clearly explained by Andrzej Kozlowsky. Suppose we have a ...

Re : Unpredictability (was (Re: Unevaluated, Plus and Times (was Re: Mathematica language issues))
About Mathematica language issues and predictability : i=5 Print[++i * ++i] will always return 42 as Print[++i * i++] will always return 36. And it's predictable and will always return these values. In ISO C9x a construction like : int i=5; printf("%d",++i * ++i); is unpredictable. It may return 0 , -45621245 or even 42 ! Such a construction is not forbidden but inpredictable (cf C99 Rationale V5.10). I think in Mathematica it shoudln't be allowed at all. Of course who wants to Print[++i * i--] ? Jean-Michel Fred Simons wrote: > The discu...

Re: Re: Mathematica language issues
Correctness in the strict sense does not seem to be an issue here. Because it does not give you access to the source code Mathematica documentation consists either of "models" , rather like Fred's, or examples of usage from which the user is supposed to work by analogy to deduce what will happen in other cases. Neither of these approaches gives you full knowledge and always there is some remaining "mystery". Sometimes when working by analogy and attempting inputs that were not actually explicitly mentioned in the documentation you will soemtimes discover...

Re: Re: Mathematica language issues
On 19 Dec 2004, at 20:15, Maxim wrote: > On Sat, 18 Dec 2004 09:36:01 +0000 (UTC), Andrzej Kozlowski > <akoz@mimuw.edu.pl> wrote: > >> >> On 17 Dec 2004, at 19:20, Maxim wrote: >> >>> In[5]:= >>> Unevaluated[1 + 1]*2 >>> 2*Unevaluated[1 + 1] >>> >>> Out[5]= >>> 4 >>> >>> Out[6]= >>> 2*Unevaluated[1 + 1] >>> >> >> This is not a glitch but works exactly as one woudl expect. You can >> see the difference and the reason by looking at T...

Re: Re: Mathematica language issues #2
On 26 Dec 2004, at 12:14, DrBob wrote: >>> Occasionally WRI admits that this behaviour is not what they >>> intended and >>> it then is officially classified as a bug. > > I don't think I've ever heard of a case like that. At most, some > employee says, "That may be a bug," or "That looks like a bug." > There's never anything official about it, AFAIK. Is there an official > bug list that mortals can reach? I never heard of any. > Well, if you look at the past postings to this list by Daniel Lichtblau...

Re: Re: Re:
>From: David Elliott <elliott@stcnet.com> >To: "Yue Huang" <yue31@hotmail.com> >Subject: Re: Re: Re: >Date: Tue, 9 Dec 2003 23:29:13 -0500 > >On Dec 9, 2003, at 10:41 PM, Yue Huang wrote: > >> >>----- Original Message ----- >>From: "David Elliott" <elliott@stcnet.com> >>Newsgroups: comp.soft-sys.wxwindows >>Sent: Tuesday, December 09, 2003 12:44 AM >>Subject: Re: >> >> >>>You'll notice the code in that wxMac method sets the >>>kFloatingWindowClass Mac...

Re: Re: Re: Any Mathematica 6 book yet?
I must agree about the debugger. I was very excited by the release of Workbench 1.0 because of the promise of a good debugger. I even took a course on it. The reality is that Workbench is so hard to use ( I can't bring in my old code and debug changes- it just doesn't work) that I never use it. So I'm back to using Print statements again. I love Mathematica but would love to have an easy to use debugger with break points, etc. Oh well. Cliff Nasser Abbasi <nma@12000.org> wrote: "Murray Eisenberg" wrote in message news:fdf236$20u$1@smc.vnet.net... &...

RE: RE: Re: Mandelbrot Set & Mathematica
Sorry again, but your previous message said >=, not <=. It's still posted on Google Groups, and I checked to make sure. DrBob www.eclecticdreams.net -----Original Message----- From: AGUIRRE ESTIBALEZ Julian [mailto:mtpagesj@lg.ehu.es] Subject: RE: Re: Mandelbrot Set & Mathematica On Tue, 11 May 2004, DrBob wrote: > Sorry, but that just doesn't work, even after changing =BE to >=. There are > only two colors (even using your rainbow function), and no fractal > "antennae". As noted in a previous message, it should be "<=...

Re: Re: Mathematica Programmer vs. Programming in Mathematica
> -----Original Message----- > From: Steven T. Hatton [mailto:hattons@globalsymmetry.com] > Sent: 15 December 2005 10:30 > Subject: Re: Mathematica Programmer vs. Programming > in Mathematica > ....... > > I wonder what value there woudl be in trying to explain what makes > > Mathematica "functions" different from functions in > languages such as > > C in a book addressed to readers most of whom have no > knowledge of C > > and are not particualry interested in getting it? > > I suspect you will not find very many people who have never > programmed in Java, C#, or C++ and are likely to use > Mathematica extensively. I'm not really saying the > introduction should use these languages extensively as a > means of contrast. I'm saying that Mathematica should be > introduced very differently from the way these general > purpose languages are introduced. Hang on for a minute - our entire corridor is full of scientists who use Mathematica every day. And only a couple have used even C. Most scientists have grown up with Fortran, right? (at least judging from the way they use Mathematica! ;) So your statement that most Mathematica people start from Java or C is incorrect. > "Everything is an expression" should be explained in terms of > recursive data structures, which they are. Obviously, such a > presentation should i...

Re: Re: Re: Marc Re: Andreessen Re: created Re: the Re: first Re: web Re: browser
no. ...

RE: Re: Re: Suggestion: Visualization of complex functions with Mathematica
I'd like to add the ComplexAnalysis package at my web site below: This package contains complex analysis routines and complex graphics routines. There are routines that convert the regular 2D Graphics into equivalent complex forms. For example ComplexLine[{z1,z2,z3...}] takes complex numbers for the point coordinates. There are routines for producing one or two panel plots or animations of complex functions. Each panel may be one of the following plot types. 1) Cartesian/PolarSurface - Plots the surface s[f[z]] where f is a complex function and s is a real function. 2) Cartesian...

Re: Re: Re: Do Mathematica applications EVER get updated?
atul wrote: > I'm not entirely sure what prompts your anxiety, as I have used several > packages over the years, including Time Series, Wavelet Explorer and > Mathematica Link for Excel. While some functions (from both Time > Series and > Mathematica Link) were incorporated into the kernel over time, updates to > ensure compatibility with new versions of Mathematica were timely and > unobtrusive. > This has not been the case for me and I subscribe to "Premier Service". I must always ask (usually more than once) for updates to the "Mec...

Re: Re: Re: mathematica 64-bit for ms windows
On Thu, 14 Feb 2008 01:00:12 -0500 (EST), J=E1nos wrote: > > > On Feb 13, 2008, at 4:04 AM, David Park wrote: > >> But be aware that if you are buying a new computer, from Dell at >> least, and >> you specify a 64 bit microprocessor, you will not necessarily get a >> 64 bit >> operating system, and may not even be able to install a 64-bit >> operating >> system. So if you are looking to use 64-bit Mathematica check out very >> carefully before purchase that you will indeed have a 64-bit operating >> system. >>...

Re: Re: EUREKA Re: Types in Mathematica, a practical example
Hi David, Comments are interlaced in the text below, > -----Original Message----- > From: David Bailey [mailto:dave@Remove_Thisdbailey.co.uk] > Subject: Re: EUREKA Re: Types in Mathematica, a > practical example > > Hello, > > If you want to compute with undefined array elements, why not > use subscript elements such as Subscript[a,1,2]. Hmmm, maybe... Let's see ax := {{Subscript[ax, 1, 1], Subscript[ax, 1, 2]}, {Subscript[ax, 2, 1], Subscript[ax, 2, 2]}} is not a good idea, since evaluation of ax gives an infinite loop. (There are o...

Re: Re: Re: Not Using a Text Editor Interface for Mathematica
For some interesting reading take a look at Chapter 2 in Edward R. Tufte's 'Visual Explanations'. Dr. John Snow found the cause of the 1854 Cholera Epidemic in London by FIRST plotting the case data on a map of London, and THEN doing the analysis. In the case of the Challenger Space Shuttle disaster, although they were aware of the potential problem, the technicians never made the proper graphic that related risk to temperature in past launches and thus failed to present a convincing case for not launching. Maybe graphics doesn't always come before analysis, but ...

Re: Re: Re: Re: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data
John, I was thinking of angular measurement. The following works... Needs["Miscellaneous`Units`"] Convert[(Pi/4)*Radian, �] 45 � but the following, using an approximate value, does not work because Degree immediately multiplies out undoing the conversion. Convert[1.35 Radian, �] 1.35 The ExtendUnits package at my web site fixes this but at the expense of putting a HoldForm on the degree symbol. Needs["Miscellaneous`V4ExtendUnits`"] 1.35 Radian // ToUnit[�] % // FullForm 77.3493 � Times[77.34930234266115`, HoldForm[Degree]] Since I generally...

Re: Re: Re: Re: No future for DB2
Well, IDS 10 + XPS 9 as open source = Astonishing cool !! J. -----Original Message----- From: "Obnoxio The Clown" <obnoxio@serendipita.com> To: "Jean Sagi" <jeansagi@myrealbox.com> Date: Wed, 27 Jul 2005 22:00:31 +0100 (BST) Subject: Re: Re: Re: No future for DB2 Jean Sagi said: > > Online 5. as open source = Quite cool. But hugely impractical, as it would reveal far too much about IDS to the competition. -- Bye now, Obnoxio "C'est pas parce qu'on n'a rien � dire qu'il faut fermer sa gueule"...

RE : Re: RE : Re: copulas and SAS
Thanks, I appreciate your comments,I understand that copula is not the appropriate tool to use, what will be the alternative ? Adel David L Cassell <davidlcassell@MSN.COM> a �crit : joewhitehurst@GMAIL.COM replied: > >Adel, > >You may find the following artilce interesting. [article by Thomas Mikosch not copied] This is a really good article, and a really useful point to make. But 55K is a lot of article to copy. Would it have been easier to point to a URL? The people who read SAS-L as a digest and the people who have slow connections are probably not overly thrilled...

Re: Re: Re: Radio Re: Shack Re: TRP-100 Re: Printer Re:
> Also, trim your replies. Leaving a few pages of original text just so > you can add your few lines at the bottom is just insane. > > g. > > -- > Proud owner of F-15C 80-0007 > http://www.f15sim.com - The only one of its kind. > http://www.diy-cockpits.org/coll - Go Collimated or Go Home. > Some people collect things for a hobby. Geeks collect hobbies. > > ScarletDME - The red hot Data Management Environment > A Multi-Value database for the masses, not the classes. > http://scarlet.deltasoft.com - Get it _today_! > --- Synchrone...

Re: Re: Re: Re: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data #2
Speaking of colors, are any of you aware of a standard color palette or utility that electronically automates conversion of a given color scheme legend to a palette viewable by students who have trichromatic or dichromatic colorblindness? For example, to such people the area below the light blue in this graph http://www.wolfram.com/products/mathematica/usersanduses/experience/images/s urna3dvolume.th.jpg might be viewed as brown instead of a continuous green-yellow-red gradient. While colors are used as teaching tools in math and geography, colorblindness (like nearsightedness) is not a learning disability if a correction for the distortion is made and the colorblind do see some gradient of the light curve shifted more towards red or green. Let me know if you have come across any palette standards (other black-grey-white) that are color blind accessible or colorblind simulation utilities that can be used. Sylvia Hobbs sylvia.hobbs@state.ma.us -----Original Message----- From: John Jowett [mailto:John.Jowett@cern.ch] Subject: Re: Re: Re: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data David, I still don't have 5.1 but I agree with you that these seem to have be useless and arbitrary changes to Graphics`Colors`. Wolfram should fix it but, if they don't, I suppose it is always possible to keep a copy of the previous Colors.m inside a directory called Graphics in a location that comes earli...

Re: Re: Some bugs in Mathematica
Looking at the sum in more detail: s1[n_] := Sum[x^k*(Gamma[n-k-1/2]*Gamma[k+1/2])/ (Gamma[n-k-1]*Gamma[k+1]),{k,0,n-1}]; Calculating each term separately TableForm[t=Table[(Gamma[n-k-1/2]*Gamma[k+1/2])/(Gamma[n-k-1] *Gamma[k+1]), {n,5},{k,0,n-1}], TableHeadings->{Automatic,Table[i,{i,0,4}]}] Summing each row of the table Tr/@t {0, Pi/2, Pi, (3*Pi)/2, 2*Pi} For example, for n=2, the term for k=0 is ((Gamma[n-k-1/2]*Gamma[k+1/2])/(Gamma[n-k-1]*Gamma[k+1])/. {n->2,k->0}) == Gamma[3/2]*Gamma[1/2]/(Gamma[1]*Gamma[1])== (1/2)*Gamma[...

Re: Re: Types in Mathematica
I like this idea. Does the mathematical/algebraic "programming" style scale up to large problems? Are there examples? Or perhaps it doesn't strictly scale, but is better applied judiciously. It could be used to steer a code at a very high level, or conversely, used in the gaps (the Mathematica-in-the-gaps argument). Conventional programming would make up the difference. If indeed mathematical programming is not the silver-bullet paradigm, where should the conventional (though modern) programming be done? Within or without Mathematica? If within, then we've c...

Re: Re: Music to Mathematica
At 03:01 AM 3/30/2004, Matthias.Bode@oppenheim.de wrote: >Hello Steve, hello Marc, > >sorry, I wanted to be concise but was imprecise. > >1. I have music notes (a song) on paper (classical five line system). > >2. I identify (the key) the note(s) and pauses; e.g. "a" (= 440 Hz). (I can >calculate the frequency for each note.) > >3. How to input this information into Mathematica in order to make it *play* >the music? > >4. I do *not* want to write notes in classical notation on paper using >Mathematica. > >5. I used "...

Re: Re: Mathematica and Education
What an excellent and encouraging response! Here we have: 1) A skilled teacher who has given much thought on how to use Mathematica in an educational setting and has gained a lot of experience. 2) An institution that has given her serious support. 3) All the students have access to Mathematica all of the time. 4) The students learn Mathematica early in their college career so they will have easy use of it in their more advanced courses. I hope people flock to the University of Vermont to see how it's done. I'm sure there are others also and I hope we hear from some of the...

Web resources about - Re: Re: Re: Mathematica language issues - comp.soft-sys.math.mathematica

Philosophiæ Naturalis Principia Mathematica - Wikipedia, the free encyclopedia
The Principia states Newton's laws of motion , forming the foundation of classical mechanics , also Newton's law of universal gravitation , and ...

image processing - How do I find Waldo with Mathematica? - Stack Overflow
This was bugging me over the weekend: What is a good way to solve those Where's Waldo? [ 'Wally' outside of North America] puzzles, using Mathematica ...

Stephen Wolfram: The Background and Vision of Mathematica - YouTube
During the Wolfram Mathematica Virtual Conference 2011, Wolfram founder Stephen Wolfram shared the background and vision of Mathematica, including ...

Wolfram Mathematica coming to the iPad
It would appear that Wolfram, the company behind the Siri search engine is bringing its original product, Mathematica , to the iPad. In response ...

Premium Mathematica software free on budget Raspberry Pi
Wolfram Research is giving away its Mathematica software for use on the diminutive, $25 Raspberry Pi computers and debuting a brand-new programming ...

Stephen Wolfram: It was Steve Jobs who named 'Mathematica'
The creator of the answer engine in Siri writes about his long relationship with Jobs Wolfram. Photo: Creative Commons There are a several novel ...

700 New Functions In Wolfram Mathematica 10
Single biggest jump in new functionality in the software's history

New Wolfram Language Brings The Power Of Mathematica To Any Device
... is being expanded into a logic and knowledge engine that can operate locally or in the cloud. Wolfram Research's flagship program Mathematica ...

Mathematica and Wolfram On The Raspberry Pi
[Stephen Wolfram], possibly the only person on Earth who wants a second element named after him, is giving away Mathematica for the Raspberry ...

Wolfram Brings Mathematica Technical Computing to the Web
If you’re a fan of Wolfram’s Mathematica app, you’ll be pleased to hear its comprehensive tools for technical computing are now more accessible. ...

Resources last updated: 2/26/2016 5:15:17 AM