QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: Bruno Piazera Larsen <bruno.larsen@eldorado.org.br>
To: John Snow <jsnow@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Niteesh G. S." <niteesh.gs@gmail.com>
Cc: kwolf@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org,
	wainersm@redhat.com, ehabkost@redhat.com
Subject: Re: GSoC Intro - TUI interface for QMP
Date: Wed, 2 Jun 2021 08:08:40 -0300	[thread overview]
Message-ID: <1b8a4ade-4d86-df43-df3b-be7986264489@eldorado.org.br> (raw)
In-Reply-To: <351d1344-a243-ca77-396b-0c1d071b9066@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3176 bytes --]


On 24/05/2021 14:34, John Snow wrote:
> On 5/24/21 9:32 AM, Stefan Hajnoczi wrote:
>> On Sat, May 22, 2021 at 12:32:00AM +0530, Niteesh G. S. wrote:
>
> Welcome Niteesh :) I look forward to working with you this summer.
>
>>> By end of this summer, I would like to get a basic TUI with some 
>>> desirable
>>> features working. Some of the features I would like to get working are
>
> As a reminder to anyone reading this thread, the goal is to create a 
> qmp-shell that functions more as a TUI, akin to mutt, irssi, or (my 
> favorite example) mitmproxy. The idea is that there will be, at 
> minimum, a history panel showing QMP messages that have occurred so 
> far and a text entry panel for entering new commands.
>
> This shell can then be augmented with various other features to 
> facilitate testing, debugging, etc. One of the core upgrades over the 
> existing qmp-shell will be the featuring of truly asynchronous events 
> which will appear in the history panel without requiring the human 
> user to press <enter> to allow them to display. This will use a new 
> Asynchronous QMP library to facilitate this feature, bringing with it 
> fixes over our current use of undocumented Python features abusing 
> non-blocking sockets in the old QMP library.
>
> My plan is to worry about implementing the very basics of the shell 
> first, and then to add more features on as we feel comfortable with 
> the basics. We can discuss what we consider to be the bare minimum for 
> this project and lay out the feature requirements that define a 
> successful minimum.
>
>>> 1) Syntax checking
>
> To a limited extent. I don't want to disallow the user from sending 
> commands that are invalid in the event that we want to test the 
> server's ability to cope with and reply to invalid commands.
>
> However, if the syntax is malformed enough that we can't understand it 
> to send it to the server, good error messages that point out what 
> exactly went wrong are helpful.
>
I would actually suggest going the other way around. If there is a plan 
to test a server's ability to deal with invalid commands, it should be 
very obviously malformed, and when a user is trying to enter a command 
but has a small mistake (like a typo or something) telling the user that 
this was the likely mistake would make it more user-friendly.

A way to implement this would be to calculate a "proximity" value to all 
likely commands, and if it is very far from all known commands you send 
it to test, if it is very close to one or more, you print some helpful 
information. Other option is that you always show the closest command, 
say there's a mistake, and ask if the command should be sent anyway, 
which is easier to implement, but is a worse UX.

I admit this is pretty counter intuitive, but I think if it is well 
documented, it could be a better way to implement the feature

-- 
Bruno Piazera Larsen
Instituto de Pesquisas ELDORADO 
<https://www.eldorado.org.br/?utm_campaign=assinatura_de_e-mail&utm_medium=email&utm_source=RD+Station>
Departamento Computação Embarcada
Analista de Software Trainee
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>

[-- Attachment #2: Type: text/html, Size: 4334 bytes --]

  reply	other threads:[~2021-06-02 11:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAN6ztm-J2GoQKkLb=Az0H2Q8UKK4oE3PgXg7g14=T53sQAUyDg@mail.gmail.com>
2021-05-21 19:02 ` Fwd: GSoC Intro - TUI interface for QMP Niteesh G. S.
2021-05-24 13:32   ` Stefan Hajnoczi
2021-05-24 17:34     ` John Snow
2021-06-02 11:08       ` Bruno Piazera Larsen [this message]
2021-06-11 14:06       ` Vladimir Sementsov-Ogievskiy via
2021-05-26 15:35     ` Fwd: " Niteesh G. S.
2021-06-01 23:47       ` John Snow
2021-06-08 15:01         ` Markus Armbruster
2021-06-08 15:49           ` John Snow
2021-06-09 11:56             ` Markus Armbruster
2021-06-09 17:06               ` John Snow
2021-06-10  7:19                 ` Markus Armbruster
2021-06-09 12:07             ` Daniel P. Berrangé
2021-06-10 14:35               ` John Snow
2021-06-09 12:03           ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b8a4ade-4d86-df43-df3b-be7986264489@eldorado.org.br \
    --to=bruno.larsen@eldorado.org.br \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=niteesh.gs@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).