issue-#153 Basic in/out console functionality

Merged to the master branch

Re: issue-#153 Basic in/out console functionality

Postby Zinn » Thu Mar 23, 2017 9:32 am

Ok, there are different opinions about the implementation.
Can we get first an agrement about the interface?

Should the interface like Log and StdLog?
Code: Select all
DEFINITION Console;

   PROCEDURE Int (x: INTEGER);
   PROCEDURE Ln;
   PROCEDURE String (IN s: ARRAY OF CHAR);

END Console.

or more like TextMappers ?
Code: Select all
DEFINITION Console;

   PROCEDURE ReadLn (OUT text: ARRAY OF CHAR);
   PROCEDURE WriteChar (c: CHAR);
   PROCEDURE WriteLn;
   PROCEDURE WriteString (IN text: ARRAY OF CHAR);

END Console.

Need we the procedure ReadLn?
Which procedures are missing?
Which procedures are too much?

- Helmut
Zinn
 
Posts: 472
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main

Re: issue-#153 Basic in/out console functionality

Postby Josef Templ » Thu Mar 23, 2017 10:51 am

Helmut, the current version of my Console module provides some additional
features that turned out to be required for low-level debugging/logging.
Those features are only appreciated if one tries to do logging on the
Kernel level or within the Windows message handling loop. The problem is that
there are often a large number of messages and it is very hard to
see something on the Console without those features because the output
scrolls away too quickly. The indentation feature is very useful for showing the recursions
in the message handling, for example.
Also ReadLn/Pause turned out to be useful for debugging/logging.

One idea would be that both sets of output functions could be supported.

(1) WriteXxx style procedures for general purpose console app programming, and
(2) Log.Xxx style procedures for logging purposes. These have been named
after the corresponding Log procedures in order to be short and easy to memoize.
In addition, these turn on display of line numbering and indentation.

The interface of course gets larger this way but internally most things are shared
and for the regular BlackBox user this module is not relevant at all.
Currently, I would prefer this "unifying" approach.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#153 Basic in/out console functionality

Postby Ivan Denisov » Thu Mar 23, 2017 3:23 pm

It was my mistake to bind Josef's module with my suggestion. I was happy that this issue will "kill two birds with one stone". Now I see that this is maybe not possible to resolve in one issue.

Josef's module is very easy to implement basing on this Console BASIC functions. This BASIC interface should be "as simple as possible". Without all this indentation, line numbering etc.

When I will finish with Coroutines feature prototype, I will try to show, how it can be done using this simple basic interface.
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#153 Basic in/out console functionality

Postby luowy » Tue Apr 04, 2017 7:34 pm

after using Josef's Console module, I have done a refinement;
Disable the "close" button of the cmd's window, for it's click will kill the whole app!
instead with ctrl-c, ctrl-break shotcut ;

Code: Select all
StdCoder.Decode ..,, ..o60...3Qw7uP5PRPPNR9Rbf9b8R79FTvMf1GomCrlAy2xhX,Cb2x
 hXhC6FU1xhiZiVBhihgmRiioedhgrZcZRiXFfaqmSrtuGfa4700zdGrr8rmCLLCJuyKtYcZRiX
 7.2.s,Mi1,0k,5TWyql.bnayKmKKqGomC5XzET1.PuP.MHT9N9ntumaU2,CJuyKtQC98P9PP7O
 NbXmb.2.wUVk2kz10,6.cUGpmWLuOpoKqvCbHZiYpedhA704TeKKw.bHfEWUmL.6..D6.ApUE.
 0U18J99SqorGqmQCbWBxhYFWUl1UnNHEWUmr.6.QqSk5kJv,,E.kZO.86.QC18RdfQHfMf9R9v
 Q7ONb17.,.D,,6.I12U.U,.JFyuv.U.2m,.f.1cUZT16.,Uq.,UO.,E.12,Ue.E.07cEk.0.1k
 .EFF,8Mtr.0E.696.c46.,kmqA2Ue.E.07M4k4k,8Mtr.0E.6E2.c4E.m80.e0.,6YU8.56.IU
 HU.IU.k.W10E4E08Mtr.2.S02.e,0E.m80.e0.,6j3.y.KE,9z4U.EV1.0.p.0.4E.0.J,U.YL
 k.U6V,w12UAU2I.gU,E.o4AUsU.Y,YU32.K.2UPV,w02UAU2Q.g.kFk.800E4E0O.K.c7M.E.m
 .G.g.EHk.m20E4E0U3.S3OE,9z4U.EX5.2.p.,6.,A.,I.0.J,U.2GE,U8U02,2Uf4.A2cbM.B
 0,616,7.9.2AAUa.N.7.K.M8c,B.u.Ok1E.q,Ck3UdU,Q1M4c,f.,sSc,5.,cJ.M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76FN8r76Fd8,d.JuPbPNy2.uGWyK
 EemIqk28oWSoYuo4ak2WGJCJuGKac9HePd98jOOR1RtF99R5ORZfQ9fPd9JFfQ9PM7PG798HN8
 rtId9NN0NePrd8HN1HM05uPRvQkdGLtaKrSKI8GoKKqmqr0mvyKtmKm4GFamR0mVyKr.NePrN1
 HMFR8F,7FTvCPM0g,V0.T8Q9fPJ78HtC,76Fd8,FEeorC5.UD3iZphUIZdg,30kV..FN8rN1HM
 FsHVPNin4ak42Ze2YXZimZhUgZX3YU2YXZhjRiZ3YeAZBgV3pd2dGTvQ..8ssHpmsETfPdfQT9
 PNPNZvQRtIQcoJigZcZRiX3Ulb8..umVyKrG5EWKqtCK.Q6Grk.Um,..Unp3.6F6.ZD,6.636.
 M00U.2..AU0CyIhA8pumqm8rtumdcIf9PY62Ulb8.CLL8pumqmY62UmT.2U.kJl1kFF.0U10.b
 f9bWHZitZhZZcZRC,Mw.ELMSN12Umz.6..F.p00.32.oZ,ZC.G20U2U...G00k.0.0.0mFf32U
 wpr,6C5X,U,U.2.8Mtr.2..c4E.k.Ue2.6.2UEC.6..mEw7169rwKiEw3c0Cy2xBqqmU1xB..8
 ,2..606.k22.0sfCbOIZX8Utj00MyfU.QfcdaP7a.ud0...
 --- end of encoding ---



same as Josef said: it is useful for debug log,
I would like rename this module as "Conlog" or "conlog" instead of "Console".
I agree to Ivan's suggestion: the "Console" should used as a full feature interface for console apps;
How about DotNetCore's Console module ?

luowy
Last edited by luowy on Thu Apr 06, 2017 4:04 pm, edited 1 time in total.
luowy
 
Posts: 226
Joined: Mon Oct 20, 2014 12:52 pm

Re: issue-#153 Basic in/out console functionality

Postby Josef Templ » Thu Apr 06, 2017 2:21 pm

luowy wrote:after using Josef's Console module, I have done a refinement;
Disable the "close" button of the cmd's window, for it's click will kill the whole app!
instead with ctrl-c, ctrl-break shotcut ;


same as Josef said: it is useful for debug log,
I would like rename this module as "Conlog" or "conlog" instead of "Console".
I agree to Ivan's suggestion: the "Console" should used as a full feature interface for console apps;
How about DotNetCore's Console module ?

luowy


luowy, I cannot compile your module.

In general, I have no problem with renaming my module into something else.

The next question is what this issue is about.
Is it about adding an auxiliary low-level logging tool or a general purpose console app framework?
My understanding was that from the original proposal by Helmut this is about the former
but I am not sure if this is agreed by all.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#153 Basic in/out console functionality

Postby Ivan Denisov » Thu Apr 06, 2017 3:01 pm

I started new Feature Issue for low-level debugging.
viewtopic.php?f=41&t=616

This issue-#153 add basic console in/out functions, which can be used by this tool. However I do not want to force this solution.
This Josef's tool can be placed in Win subsystem as a single module to make it easier to import as a single item.

Here I am suggesting to continue discussion about Console.

I think, that is essential to wider applications of BlackBox. It can be used not only for GUI applications, but also for console and server (CGI) applications.
However there is no any standard interface for this. That issue with two modules solves this problem.
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#153 Basic in/out console functionality

Postby Ivan Denisov » Tue Apr 11, 2017 1:45 pm

What do members think? Do we need some basic functions to write to command line and to read from it?
This modules can be distributed as a separate extension. That is not big problem.
However well standard fixed in BlackBox will allow other components to use similar interface for command line applications.
BlackBox has "dos" key for linker and has no dos (command line) output standard. That is strange.
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#153 Basic in/out console functionality

Postby luowy » Tue Apr 11, 2017 2:48 pm

My Opinion:
1, "Console" as a standard interface for console app, read/write console window.
"HostConsole" as it's implementation,a full fledge one needed.

2,"Args"( or others) as standard module for parse command line options.

3, An enhanced tool/module used for automake console and gui app
luowy
 
Posts: 226
Joined: Mon Oct 20, 2014 12:52 pm

Re: issue-#153 Basic in/out console functionality

Postby Josef Templ » Wed May 24, 2017 12:44 pm

I have prepared a Console module now that is binary compatible with Ivan's suggestion.
That means, applications can use it without recompilation. Don't know if this is important
but I want to point out that it is hard to make it 'more compatible'.

The implementation is based on HostConsole of issue-#158.
I have also moved the source code comments from HostConsole to a Kernel-style fold in Host/Docu/Console.
Please review.

The diffs are here: https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=430e591cc6d5af315b66334224ae96034d93251c&rev_to=acc5c1fe580cd41a92e8718f3c4a7c945a8a09f1.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#153 Basic in/out console functionality

Postby Josef Templ » Thu Jun 08, 2017 3:37 pm

luowy wrote:My Opinion:
1, "Console" as a standard interface for console app, read/write console window.
"HostConsole" as it's implementation,a full fledge one needed.

2,"Args"( or others) as standard module for parse command line options.

3, An enhanced tool/module used for automake console and gui app


@1: Console is the subject of this issue.

@2: this would be a separate issue, I think.
I don't know if Ivan already has something like Args.
I have a module Args in ofront.
In any case, it is not easy to design such a module because the syntax of the command
line interfaces of programs tends to be different in many details.

@3: this would also be a separate issue, I think.
And it is a non-trivial one.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

PreviousNext

Return to Resolved (Features)

Who is online

Users browsing this forum: No registered users and 1 guest

cron