comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to specify which exact version of a subroutine to use....
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to specify which exact version of a subroutine to use.... [message #75545] Thu, 17 March 2011 13:30
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Mar 17, 4:42 pm, David Fanning <n...@idlcoyote.com> wrote:
> George Millward writes:
>>  Incidentally, the coyote library is really a victim
>> of it's own success in this regard.... whenever I
>> get given an idl project to work on it almost always has it's own
>> built in copy of coyote, so I can end up with half a dozen
>> coyote directories - and that's before any links into solarsoft or
>> anything.
>
> This is my experience, too. Almost any time I deal
> with a UNIX user, they have at least 4-5 versions
> of the Coyote Library on their path. Apparently,
> I'm not giving the right sort of directions
> to people. :-(

I never included Catalyst or Coyote in my programs that use them, I
only put a link the website. And still some users end up with multiple
copies, just as they end up with multiple copies of my libraries.

For that reason, in some of my programs I found it useful to put a
version identifier, either showing in the GUI, or as a property in the
object. That way the version can be read from running the code,
avoiding the issue of the user looking at a version in the source code
(which shows the latest number) which is not the same being executed.
Re: How to specify which exact version of a subroutine to use.... [message #75546 is a reply to message #75545] Thu, 17 March 2011 13:26 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Mar 17, 1:44 pm, David Fanning <n...@idlcoyote.com> wrote:
> And if you DO make changes to someone else's library
> programs and choose not to tell them about it, at least
> give the programs a different name. Otherwise chaos will
> reign supreme. :-(

Anytime I change someone elses's code I add a _pp suffix to the name.
Besides making it a different name, it is also not the same identifier
to the routines I write (for those I use a pp_ prefix), and it makes
the edited routine follow the original alphabetically.
Re: How to specify which exact version of a subroutine to use.... [message #75548 is a reply to message #75546] Thu, 17 March 2011 12:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
George Millward writes:

> Incidentally, the coyote library is really a victim
> of it's own success in this regard.... whenever I
> get given an idl project to work on it almost always has it's own
> built in copy of coyote, so I can end up with half a dozen
> coyote directories - and that's before any links into solarsoft or
> anything.

This is my experience, too. Almost any time I deal
with a UNIX user, they have at least 4-5 versions
of the Coyote Library on their path. Apparently,
I'm not giving the right sort of directions
to people. :-(

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to specify which exact version of a subroutine to use.... [message #75549 is a reply to message #75548] Thu, 17 March 2011 12:26 Go to previous message
George Millward is currently offline  George Millward
Messages: 29
Registered: February 2000
Junior Member
On Mar 17, 11:39 am, Paolo <pgri...@gmail.com> wrote:
> On Mar 17, 12:44 pm, David Fanning <n...@idlcoyote.com> wrote:
>
>> David Fanning writes:
>>> Several things can help. First, better communication!
>>> (And, by the way, Wayne Landsman is terrific to work with.)
>>> I don't mind people fixing bugs and adding features to my
>>> programs, but please let me know about it. I'm all for
>>> writing better programs!
>
>> And if you DO make changes to someone else's library
>> programs and choose not to tell them about it, at least
>> give the programs a different name. Otherwise chaos will
>> reign supreme. :-(
>
> Right - and solarsoft is quite guilty of that due to the
> fact that there are a large number of contributors that
> are not necessarily aware of each other's work - so
> sometimes I have encountered inconsistencies even
> between different branches of solarsoft (though
> that wasn't very often).
>
> As a lesson learned, everyone should write all their future
> software with a 2- (or better 3-) letter unique identifier
> in the program names - especially when they edit existing
> routines and change them.
>
> For the future, maybe some better namespace management tools
> should be added to IDL...
>
> Ciao,
> Paolo
>
>
>
>> Cheers,
>
>> David
>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>

Agreed that it's all a right pain. For now I think the solution for
me will be just to do a specific .compile
and go with that. Incidentally, the coyote library is really a victim
of it's own success in this regard.... whenever I
get given an idl project to work on it almost always has it's own
built in copy of coyote, so I can end up with half a dozen
coyote directories - and that's before any links into solarsoft or
anything.

Anyhow, thanks for the help,

George.
Re: How to specify which exact version of a subroutine to use.... [message #75551 is a reply to message #75549] Thu, 17 March 2011 10:39 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Mar 17, 12:44 pm, David Fanning <n...@idlcoyote.com> wrote:
> David Fanning writes:
>> Several things can help. First, better communication!
>> (And, by the way, Wayne Landsman is terrific to work with.)
>> I don't mind people fixing bugs and adding features to my
>> programs, but please let me know about it. I'm all for
>> writing better programs!
>
> And if you DO make changes to someone else's library
> programs and choose not to tell them about it, at least
> give the programs a different name. Otherwise chaos will
> reign supreme. :-(

Right - and solarsoft is quite guilty of that due to the
fact that there are a large number of contributors that
are not necessarily aware of each other's work - so
sometimes I have encountered inconsistencies even
between different branches of solarsoft (though
that wasn't very often).

As a lesson learned, everyone should write all their future
software with a 2- (or better 3-) letter unique identifier
in the program names - especially when they edit existing
routines and change them.

For the future, maybe some better namespace management tools
should be added to IDL...

Ciao,
Paolo




>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to specify which exact version of a subroutine to use.... [message #75552 is a reply to message #75551] Thu, 17 March 2011 09:44 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Several things can help. First, better communication!
> (And, by the way, Wayne Landsman is terrific to work with.)
> I don't mind people fixing bugs and adding features to my
> programs, but please let me know about it. I'm all for
> writing better programs!

And if you DO make changes to someone else's library
programs and choose not to tell them about it, at least
give the programs a different name. Otherwise chaos will
reign supreme. :-(

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to specify which exact version of a subroutine to use.... [message #75553 is a reply to message #75552] Thu, 17 March 2011 09:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
George Millward writes:

> I frequently encounter the problem where I am running a program that
> utilizes a number of IDL libraries
> (ie, coyote, solarsoft - etc.) . The problem that crops up constantly
> is with the program addressing the wrong
> version of a given subroutine. ie, right now I am trying to use a
> certain coyote routine and my code is crashing because it is picking
> up an older version of the routine that is attached to the solarsoft
> library - rather than the new version that is located locally on my
> own machine.
>
> Can I specify the exact version of the routine that I want the code to
> use - by providing the full path or something ?

I spent a couple of days trying to get my software
compatible with older versions in SolarSoft. The problem
is that SolarSoft used a number of my programs, then fixed
bugs and added features to the programs without notifying me
about it. So the programs drifted apart.

This is a real problem, and the same thing is likely
to happen now with the Astronomy Library routines,
which also contain most of the Coyote Graphics routines
from the Coyote Library.

Several things can help. First, better communication!
(And, by the way, Wayne Landsman is terrific to work with.)
I don't mind people fixing bugs and adding features to my
programs, but please let me know about it. I'm all for
writing better programs!

Second, we REALLY need a standard repository for all
these libraries, so we can work together on this. Or,
at least, when we build programs we can get the right
dependencies.

I don't know, it's a hard problem. But at least half of
the problems people report to me are caused by old programs
somewhere in their path.

Sigh... OK, had to get that out. ;-)

The program that is compiled is going to get used. Normally,
the "program that is compiled" is the first one found on the
IDL path. You can affect this by choosing your IDL path order.
In the case of Coyote and Solarsoft, you would be better off
with the Coyote directory listed first, since I have at least
*tried* to make my routines compatible with the older Solarsoft
routines. (If you report the problems, I'll try to fix them.
Please don't suggest firearms as a solution, because I would
take you seriously.)

This is a pain-in-the-kiester solution, of course. So, maybe
you need something better. You could create a list of the
conflicting routines and write a program that compiled one
set or the other. Maybe I should write this myself and add
it to the Coyote library. You could use RESOLVE_ROUTINE
to do the compilation for you. I envision something that works
like this:

IDL> Resolve_Conflicts, /Coyote
IDL> Resolve_Conflicts, /SolarSoft

If you want to use Coyote Graphics routines in conjunction with
SolarSoft routines, I'm not sure what you do. Maybe hand-compile
a routine just before you use it.

IDL> .compile /usr/lib/coyote/linkedlist__define.pro
IDL> cgContour, ...., /Window

Tough, situation. Maybe a letter to the SolarSoft people
will help. :-)

Cheers,

David





--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: CG resizable window won't resize during read
Next Topic: IDL Book Tour

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:43:20 PDT 2025

Total time taken to generate the page: 0.00743 seconds