|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Mon Nov 28, 2016 5:59 pm Post subject: |
|
|
Eddie
I think that we may be referring to different things.
The ClearWin+ errors that I was thinking of relate to errors that the developer encounters when writing the code. They are like compile time errors in a way but currently are not detected until run time. They almost exclusively relate to winio@.
As such the developer should test every path through the code and make sure that the correct arguments etc. are passed. One hopes that this kind of error never gets to an end user.
As an experiment, the next release will include a feature where some winio@ error reports will be provided at compile time rather than run time. For the purpose of the experiment, the feature will be limited to /64 and /check. But just as at runtime, the first such error will be fatal. That is the nature of the beast. For me, given the speed of compilation, that is not a problem. I just deal with the errors one at a time and click on the compile or build button between changes. |
|
Back to top |
|
|
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Mon Nov 28, 2016 7:38 pm Post subject: |
|
|
well, it seems that the implementation of symbols is not something straightforward.....moreover, I would say that it is quite confusing. For instance,
CASE 1
CALL winop@("%pl[width=2]")
CALL winop@("%pl[colour=blue,style=6,pen_style=2]")
you get blue filled squares...but if you just change the width and set
CASE 2
CALL winop@("%pl[width=3]")
CALL winop@("%pl[colour=blue,style=6,pen_style=2]")
you get a different symbol, something that I couldn't define very well, so that, the problem is not only to define a separate parameter for symbol size, but to see how symbols are defined
with
CASE 3
CALL winop@("%pl[width=4]")
CALL winop@("%pl[colour=blue,style=0,pen_style=2]")
you get seemingly the same symbols as CASE 1, although it is probably due to the fact that the type of line (style = 0 is for line plots, isn't it?) results in something that is visually very close to the symbols in CASE 1
Seemingly, you need at least width = 3 in order to display a really distinguishable symbol.
Speaking about symbols, style=5 gives you open "45 degree-rotated" squares, style=4,
open down-triangles, style=3, open up-triangles, style=2, filled squares (but you need width=4 to distinguish them) and style=1, "original" open squares with a mark inside. I would say that the only "classical" symbols that are lacking are the open and filled circles.
Pen_style is irrelevant when you use styles 1, 3, 4, 5, 6, as it only controls line plots.
Agustin |
|
Back to top |
|
|
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Mon Nov 28, 2016 7:44 pm Post subject: |
|
|
Besides my previous comments about symbols, I would like to add some additional personal thoughts about the new implementation of %pl:
1) why not change the option "pen_style" to "line_style", as this would be more specific? (pen_style works only for lines)
2) why not define an option "plot_style" instead of "style" , i.e. plot_style 0 and 1 would be lines and 2 scatter (i.e. symbols, as what we get with style = 1). ?
3) why not define options "symbol_size" for scatter plots and "line_width" for line plots instead of a single "width" option that affects both types of plots?
4) why not define an option "[symbol=uptriangle,downtriangle,opensquare,etc.]", instead of the actual "[style =1,3,4,5,6]", as these numbers say nothing to the user, unless he/she remembers the meaning of these numbers....
I do not know if such implementations would result in a lot of additional work to the new implementation of %pl or would introduce some other problems......you know that better than me Paul...
Agustin |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2826 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: 7932 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: 2390 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: 7932 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: 2826 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: 7932 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: 2390 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: 2826 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: 7932 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: 2556 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 |
|
|
|
|
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
|