Andre Wobst <wobsta@...>:
> Hi Magnus,
> On 29.07.04, Magnus Lie Hetland wrote:
> > Just looked at solve.py (which finally made it through CVS to my
> > machine) -- looks great! :)
> I should tell you, that I still can't resist on that topic.
Hah! Even better! Keep up that addiction ;)
> I've just checked in another version, which gets rid of "=3D=3D" and
> becomes even nicer. What we'll need additionally is a "whatever"
> used in front of a vector (or point, if its not a variable).
That would be nice, yes. But, in MetaPost, IIRC, 'whatever' is
actually a completely normal variable -- it's just a new variable each
time it's used. Isn't it? In that case you could just use var() (or
whatever the constructor is) instead of whatever...
But I guess it's highly probable that I've missed some snag here.
> BTW, the name point (for a constant vector) vs. vector (for a
> variable vector) might be worth a discussion.
Yeah, I thought about that when I read the code, but didn't comment on
it. Doesn't sound completely obvious to me. (*Must* they be two
If you could emulate the numarray/Numeric behavior of the array class
you could name it array (this name is already used for differet kinds
of arrays, e.g. in the built-in array module). Then the variable kind
could be vararray (just like numarray has, for example, chararray and
Then you could even get around my quibble about the constructor...
def point(x, y, z=3DNone):
if z is not None:
return array([x, y, z])
return array([x, y])
(Similar for varpoint, perhaps.)
Or maybe I'm just muddling things here.
But using varpoint (or something like that) instead of vector might
have a more obvious meaning.
> Next step is to properly handle (intermediate) non-linear terms. I
> already thought about it a little, and I think I know what to do (at
> least I have the current impression to know what to do).
Great. I think this sort of thing is another feature that will put PyX
way ahead of most similar packages. (The only serious contender is
MetaPost anyway, it would seem.)
> Too bad, that the anonymous CVS is behind all the time ...
Actually, I got it now. Hm.
Magnus Lie Hetland "Canned Bread: The greatest thing since sliced
http://hetland.org bread!" [from a can in Spongebob Squarepants]