 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Mon Nov 28, 2016 10:07 pm Post subject: |
|
|
Paul,
I am always trying to write my code such a way that there will be no crash in any circumstances. You as a developer definitely have even more control over that so why it is impossible in case of all unknown errors just add one small screen such as
"%pl can not finish the task due to unknown problem. Press OK to continue",
or "Internal crash while performing %gr. Press OK", or
"The resize can not be completed due to unknown error. Press OK to continue"
Or just one single message for all cases "To prevent crash due to unknown reason the Clearwin task was aborted. We suggest you to check user supplied parameters. Press OK to continue"
I know that our re#$%^ Fortran Standard committee of pensioners wants to crash, crash,crash and crash Fortran code always and in all unknown circumstances blaming programmer. But this is obsolete absurd DOS command prompt way of doing things. Windows Clearwin+ code must never crash, period.
Always think how Fortran will be used for heart beat controllers. Crash means death.
Or imagine that you have 100 tabs in your browser and some code in one of them crash the entire browser with all its tabs. Same was in Windows 95 era, you have 100 windows open and abruptly one error in one of them took the whole computer to reboot. That was total absurd. That is unacceptable.
Today when anyone opens my code (which is doing a hell lot of things gathered under one name) when the user is ready to navigate the universe the movie can abruptly stop with crash in some small task, small sub-code which is 1/10000 of what user could do. Anyone would think that i as an author am total idiot who can not program . Or even worse. Just remember how did you call Bill Gates at the time of crashing DOS/Windows ?
Last edited by DanRRight on Mon Nov 28, 2016 11:07 pm; edited 9 times in total |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Mon Nov 28, 2016 10:32 pm Post subject: |
|
|
Agustin
1) I used [pen_style] because it already has this name in %gr.
2) [style] is not new but I could add [plot_style] as an alias.
3) Remarkably I have anticipated your request and [symbol_size] has already been added.
4) I have added four more symbols so I don't think that I can give them all names. At some point they will be documented and developers can annotate their code. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Mon Nov 28, 2016 10:55 pm Post subject: |
|
|
Hi Paul,
Thank you for responding to my post while you are busy with %pl. I think Dan and I are on the same wavelength. 'Fortran Stop' (or a variation of it) is not really the way to terminate a windows application, but ClearWin's origins date back to when it was. If even by Windows 10 Microsoft can't guarantee that apps don't crash then programmers must program defensively, especially as Dan's suggestion looks to me to be a major software development task.
Eddie |
|
Back to top |
|
 |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Mon Nov 28, 2016 10:55 pm Post subject: Re: |
|
|
PaulLaidler wrote: | Agustin
1) I used [pen_style] because it already has this name in %gr.
|
well, that's a good reason...
Quote: |
2) [style] is not new but I could add [plot_style] as an alias.
|
I think it would be nice, but I do not know what the other users think about..
Quote: |
3) Remarkably I have anticipated your request and [symbol_size] has already been added.
|
great!
Quote: |
4) I have added four more symbols so I don't think that I can give them all names. At some point they will be documented and developers can annotate their code. |
I have to agree with you in this point.....but symbol numbers should be consecutive, not as it happens now that you have to use numbers 1, 3, 4, etc. and avoid number 2 in the style option because 2 is related to a style of line. I don't know if it is possible= easy to revert this and let 0 and 1 for lines and the rest of the numbers for symbols...
Agustin |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Mon Nov 28, 2016 10:58 pm Post subject: |
|
|
Dan
We seem to be at cross purposes. I am thinking of errors like a missing winio@ argument or perhaps there is an argument but it has the wrong type.
These are the kind of errors that cause ClearWin+ to abort.
If there is a particular situation where you think that ClearWin+ should be able to recover then please post some code to illustrate this so that we can try to make improvements. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Tue Nov 29, 2016 1:25 am Post subject: |
|
|
Here is the code which works with pre-selected parameters, just click and see that. You can add Y_max=0.9 to PlotSettings and run again, it works OK. But if you change just one letter wrong way, for example, Y_min to X_min (X_min option does not exist yet, or change 0.2 to o.2 or add anything stupid to PlotSettings) and again click "Launch Plot" you will get the entire code crashed instead of coming out without crash with error message (and may be even also with an offer to repeat your choice with different parameters. OK, this is completely optional)
Code: | module AllSubs
parameter(n=100)
real*8 x(n),y(n)
integer wid, heig
character PlotSettings*64
Contains
Integer function plotter()
i=winio@('%ww%pv&')
i=winio@(PlotSettings, wid, heig, N, x, y)
i=winio@('%ff%cn%bt[OK]%es')
plotter =2
end function
end module AllSubs
!.............................................
Program Test
use clrwin
use AllSubs
do i=1,n
x(i)=i-1
y(i)=sin(7.*i/n)**2
enddo
wid =400
heig=250
PlotSettings ='%pl[x_array,Y_min=0.2]&'
i=winio@('%ww%ca[Plot]&')
i=winio@(' Enter Plot parameters%30rs%ff %ff&',PlotSettings)
i=winio@('%cn%^tt[Launch Plot]%ff&', plotter)
i=winio@('%cn%bt[OK]%es')
end program
|
|
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Tue Nov 29, 2016 9:06 am Post subject: |
|
|
Agustin
To make things simpler I propose to add [lines] as an alternative for [style=0] and [curves] as an alternative for [style=2]. Then I will also be able to add [symbol=n] as an alias for [style=n]. The result will be that you will be able to have symbols joined with straight lines or curves.
Dan
Are you sure that you want to lose the trace-back information that tells you where the error occurred in your code? At the moment I can only provide one or the other not both. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Tue Nov 29, 2016 11:40 am Post subject: |
|
|
Paul,
Traceback info is of use to a developer (and then only if you understand what it is telling you) but of no use to an end-user - unless you are programming for yourself, as I often am.
Perhaps there needs to be some differentiation between compiling or linking a 'release; version from a 'development' version.
Which ultimately is having your cake and eating it, I suppose.
Eddie |
|
Back to top |
|
 |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Tue Nov 29, 2016 12:58 pm Post subject: Re: |
|
|
PaulLaidler wrote: | Agustin
To make things simpler I propose to add [lines] as an alternative for [style=0] and [curves] as an alternative for [style=2]. Then I will also be able to add [symbol=n] as an alias for [style=n]. The result will be that you will be able to have symbols joined with straight lines or curves.
|
excellent idea!.........I will wait for the next DLLs version......in the meantime I am also thinking about how to write plot legends...for simple line plots I am using draw_line_between@ and draw_character@, but for scatter plots and line+symbol, well, it will be rather more complex.....but the improvements you are doing for %pl are great!!
Agustin |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Tue Nov 29, 2016 6:45 pm Post subject: |
|
|
Paul,
Well, let's do the experiment. I have some Clearwin+ code which not me not anyone else here were able to make amicable for a decade. It crashes on all my computers. The only time it does not crash is when I run it through the debugger even if I compile it with /nocheck. This behavior prevents finding the bug as the debugger medicine does not work with this devil's self-hiding bug. This devilry surprisingly does not crash on John-Silver's computer. Yes it provides me crash info but I have no willingness or such amount of free time to dig into its French (read - assembler). I feel that most probably the reason is in some Property Sheet %ps conflict.
If you will find this bug using this crash traceback then let's consider keeping traceback for extra hard cases. If not then I agree with Eddie that we have to kill this purely top 0.00001℅ of power users and developers option.
I am sure if developers like them they will find hidden ways to keep them for themselves. But for the users crash is unacceptable at least for Clearwin code and possibly for entire Fortran.
Clearwin code is essentially multithreaded and the bug in one independent thread does not have to put down all others. That may mean that company has to make special developer edition or option of compiler.
To accelerate the interest i will pay $100 for fixing the bug natural way without major rebuild of the code. I also welcome anyone who wants to try. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Wed Nov 30, 2016 8:21 am Post subject: |
|
|
Dan
For $100 no, but as a challenge I will at least look at the code if you can put it on to Dropbox. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Wed Nov 30, 2016 11:58 pm Post subject: |
|
|
Dan,
Last time you offered a $ reward for fixing a problem, I recall I was unable to collect due to the fine print !!
If you have a link for this problem, send it to me and I will see if I can understand the problem and provide a fix.
I will try to use Clearwin+ /64 and see where I get to.
John |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
|
Back to top |
|
 |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Thu Dec 01, 2016 6:00 pm Post subject: |
|
|
Great job Paul!......I am testing your new version and runs fine.....the frame option is nice, and the variety of options now make %pl a very good tool for 2D plots....however.....I still have a pair of questions:
a) the lack of circles within the symbols set is due to some kind of difficulty to make %pl to draw them?......I ask this just because open and filled circles are usually the first symbols one selects for a plot...although I do not know why.....
b) is there any possibility to change the location of the x-axis caption to the centre of the axis?. Now we have the y-caption centred (in general, but in some cases it can appear quite below the centre) but the x caption appears (always) located towards the end of the axis.
c) I am now plotting a data set that goes from 0.0 to 60.0 on the x-axis and the result is that the x-axis shows 30 tick labels and the y-axis 23. Moreover: as the y-values are not very far one from the other, I have duplicated labels among those 23, i.e. 0.01,0.01,0.02,0.02,0.03,0.03, etc....with [x_array] option, "dx" does not work. I do not know if it could be possible to indicate %pl to write a label every n ticks.
These are some kind of embellishments of %pl, not critical issues......in the meantime, I will continue testing the new DLLs....thanks a lot Paul for your efforts.
Agustin |
|
Back to top |
|
 |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Thu Dec 01, 2016 6:19 pm Post subject: |
|
|
More about the ticks.....
As I mentioned, I have a data set with x going from 0 to 60, and the number of ticks depends in a funny way on the x-range plotted. The following is what I have obtained after plotting a region of the data set.
The x-axis shows:
Case 1: data plotted from 0 to 5: tick interval =0.15
Case 2: data plotted from 0 to 10: tick interval = 0.30
Case 3: data plotted from 0 to 15: tick interval = 0.45
Case 4: data plotted from 0 to 20: tick interval b= 0.5 from 0 to 10, then 1 from 10 to 17 and finally no tick from 17 to 20
Case 5: data plotted from 0 to 25 (0-30 or 0-35): tick interval = 1
Case 6: data plotted from 0 to 40: tick interval = 1 from 0 to 34, then no tick
Case 7 data plotted from 0 to 45: tick interval = 1.5
Case 8: data plotted from 0 to 50: tick interval = 1.5
Case 9: data plotted from 0 to 55: tick interval = 1.5, but no tick above 51
Case 10: data plotted from 0 to 60: tick interval = 2
These results indicate that there is no simple way in which Clearwin makes the division of the axis.
Agustin |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|