From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62889 invoked by alias); 9 Feb 2017 15:48:23 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 62009 invoked by uid 89); 9 Feb 2017 15:48:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=christmas, Christmas, H*u:1.2.3, H*UA:1.2.3 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Feb 2017 15:47:56 +0000 Received: by simark.ca (Postfix, from userid 33) id 252E61E9A5; Thu, 9 Feb 2017 10:47:54 -0500 (EST) To: Tom Tromey Subject: Re: GSoC X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 09 Feb 2017 15:48:00 -0000 From: Simon Marchi Cc: gdb@sourceware.org In-Reply-To: <87k2907gk7.fsf@tromey.com> References: <87k2907gk7.fsf@tromey.com> Message-ID: <09b20ae4ac80cf2958ec873b83379862@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.3 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00020.txt.bz2 On 2017-02-08 12:12, Tom Tromey wrote: > 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. Ok, thanks for your feedback. So since nobody spoke against it, I'll submit an application today, we'll see where it leads. > 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 " (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. Well first of all, what is your idea of how the coloring should be? As a first step, I am envisioning, at least as a first step, to have symbols, value, file paths, etc, each printed in their own color, so that it's easy stop quickly spot the relevant information in a printout. I have made a mockup here: http://nova.polymtl.ca/~simark/ssg/filemC7ZUZ.png However I have found that it's easy to go overboard with it, at which point it looses of it usefulness, despite being a nice Christmas tree: http://nova.polymtl.ca/~simark/ssg/fileEv2diU.png > 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. I don't understand this part. Which tables/columns? Thanks! Simon