|
From: Magnus L. H. <ma...@he...> - 2004-07-29 11:12:37
|
Just looked at solve.py (which finally made it through CVS to my machine) -- looks great! :) -- Magnus Lie Hetland "Canned Bread: The greatest thing since sliced http://hetland.org bread!" [from a can in Spongebob Squarepants] |
|
From: Andre W. <wo...@us...> - 2004-07-29 11:28:53
|
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. I've just checked in another version, which gets rid of "==" 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). BTW, the name point (for a constant vector) vs. vector (for a variable vector) might be worth a discussion. 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). Too bad, that the anonymous CVS is behind all the time ... André -- by _ _ _ Dr. André Wobst / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ |
|
From: Magnus L. H. <ma...@he...> - 2004-07-29 12:13:48
|
Andre Wobst <wo...@us...>:
>
> Hi Magnus,
>=20
> On 29.07.04, Magnus Lie Hetland wrote:
> > Just looked at solve.py (which finally made it through CVS to my
> > machine) -- looks great! :)
>=20
> 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
separate classes?)
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
recarray).
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.
> Andr=E9
--=20
Magnus Lie Hetland "Canned Bread: The greatest thing since sliced
http://hetland.org bread!" [from a can in Spongebob Squarepants]
|
|
From: Andre W. <wo...@us...> - 2004-07-30 10:01:15
|
Hi, On 29.07.04, Magnus Lie Hetland wrote: > > I've just checked in another version, which gets rid of "==" 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. I think, you are right (for MetaPost), but not for solve.py. In MetaPost whatever is just a "unnamed" scalar variable typically used in the following way: scalar() * point(0, 1) Unfortunately, this fails with the current version of solve.py. (Even scalar() * point(0) fails, because point is a vector, but scalar() is a scalar.) I have to come around that. And as more as I think about it, it become clearer, that I need a second try for the term class (fixing this issue as well as the limitation to linear terms). I've already started something *really* cool yesterday evening, but didn't yet finished it. Don't worry, I'm almost there, I think. So stay tuned ... ;-) > > 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 > separate classes?) No, you're right! This was an important point to me. I'm working along that line. So thanks, this discussion helps me a lot ... André -- by _ _ _ Dr. André Wobst / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ |
|
From: Magnus L. H. <ma...@he...> - 2004-07-30 20:10:56
|
Andre Wobst <wo...@us...>: > > I've already started something *really* cool yesterday evening, but > didn't yet finished it. Don't worry, I'm almost there, I think. So > stay tuned ... ;-) How exciting :) > > > BTW, the name point (for a constant vector) vs. vector (for a > > > variable vector) might be worth a discussion. > >=20 > > Yeah, I thought about that when I read the code, but didn't comment o= n > > it. Doesn't sound completely obvious to me. (*Must* they be two > > separate classes?) >=20 > No, you're right! This was an important point to me. I'm working along > that line. So thanks, this discussion helps me a lot ... Great! > Andr=E9 --=20 Magnus Lie Hetland "Canned Bread: The greatest thing since sliced http://hetland.org bread!" [from a can in Spongebob Squarepants] |