Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb@sourceware.org
Subject: Re: GSoC
Date: Wed, 08 Feb 2017 17:12:00 -0000	[thread overview]
Message-ID: <87k2907gk7.fsf@tromey.com> (raw)
In-Reply-To: <edb7fcc880be7c063b31451376903581@polymtl.ca> (Simon Marchi's	message of "Tue, 07 Feb 2017 16:00:06 -0500")

>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

Simon> It would be interesting to gather some feedback from those who lead
Simon> this initiative in the past.  Would you suggest trying to go for it
Simon> again?  Why, why not?

I did it in the past but stopped because I wasn't spending enough time
mentoring.  I think it is worth doing but you have to be more organized
and committed than I was.

Simon> On my side, there's the output colouring support which I'd like
Simon> to see become a reality some day :).

I actually did this, but I didn't submit it.  I got sort of mired in
design choices.

The first approach I took was to just hack some color stuff directly the
CLI ui-out, and add a way to "set color <mumble>" (I don't actually
remember exactly how I spelled this, and the branch is long gone).  This
required some hacks to get the column computation to be correct so that
wrapping wouldn't suffer.  I think I just made it so the color string,
whatever it was, was assumed not to take any space -- a hack since this
wasn't actually enforced.

This was a bit too inflexible for me so I abandoned it.


The second approach I took (I still have this branch) was to let the
Python layer insert an object that would replace the CLI ui-out object.
Then colorizing and other reformatting -- the Python ui-out object is
"MI-like" and so had access to more data -- could be done by writing
some Python code.

I liked this approach ok but it needed some hacks (maybe since obsoleted
due to Pedro's recent work, not sure).  Also I think it suffered because
there was no way to get the wrap hints into the Python layer.

And, finally, for something like "set color", there's no good way to
implement completion because there isn't a list of the table- and
column-names.  This could be done by introducing enums or something like
that, but at that point the patch is going to be beyond what I would
want to commit to.

Tom


  parent reply	other threads:[~2017-02-08 17:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 21:00 GSoC Simon Marchi
2017-02-07 21:40 ` GSoC Phil Muldoon
2017-02-07 22:11   ` GSoC Simon Marchi
2017-02-07 21:41 ` GSoC Jose E. Marchesi
2017-02-07 22:13   ` GSoC Simon Marchi
2017-02-08 17:12 ` Tom Tromey [this message]
2017-02-09 15:48   ` GSoC Simon Marchi
2017-02-09 18:59     ` GSoC Tom Tromey
2017-02-09 21:35     ` GSoC Simon Marchi

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=87k2907gk7.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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