From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Colorized REPL Date: Thu, 06 Dec 2012 12:28:08 +0800 Organization: HFG Message-ID: <1354768088.25329.136.camel@Renee-desktop.suse> References: <1354692089.25329.71.camel@Renee-desktop.suse> <1354697316.25329.83.camel@Renee-desktop.suse> <1354703255.25329.107.camel@Renee-desktop.suse> <1354761834.25329.119.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1354768099 25804 80.91.229.3 (6 Dec 2012 04:28:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2012 04:28:19 +0000 (UTC) Cc: guile-devel@gnu.org To: Daniel Hartwig Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 06 05:28:32 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TgT4a-0001PT-6v for guile-devel@m.gmane.org; Thu, 06 Dec 2012 05:28:32 +0100 Original-Received: from localhost ([::1]:58593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgT4O-0000Pa-5g for guile-devel@m.gmane.org; Wed, 05 Dec 2012 23:28:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgT4K-0000PP-D7 for guile-devel@gnu.org; Wed, 05 Dec 2012 23:28:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgT4J-0005B2-5W for guile-devel@gnu.org; Wed, 05 Dec 2012 23:28:16 -0500 Original-Received: from mail-pa0-f41.google.com ([209.85.220.41]:48139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgT4I-0005Ay-SH for guile-devel@gnu.org; Wed, 05 Dec 2012 23:28:15 -0500 Original-Received: by mail-pa0-f41.google.com with SMTP id bj3so4068644pad.0 for ; Wed, 05 Dec 2012 20:28:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:x-mailer:mime-version :content-transfer-encoding; bh=595+KHzvQoCPIor9JQawCWeFr8/n18RwNshU/cLpTVk=; b=cyxdvZHXPSMmZef12RcwgS3KGHm7A6pNdqg2xIOYx6IcjmZaABBrazPBHhZ4HjzpaA qGvtepnBZPXlWXvS/+pGDtTPeInQ1sfXZuvceJYup9OtuR6j9sRy6sI67YyyS4ANfYrq kDvh8r8xeS/2zYzy35I8PeowG2gZzAJ59SnpqWl+gWiVvoClVnR0jsebJhpzN0WbTqxE DwvLC6++XzibKiVpwKUjogfODh9N2QAXszc0tZ5OOmHyonMTU3y0VnSAKtOFrSAQTIq9 TRwE3i3XGvBpD0CIc5SCW+HGJ33HFg5U4SWlcAClU1IyPX8AGl40601ERIe3z85ujxVE QU3g== Original-Received: by 10.68.219.164 with SMTP id pp4mr2514956pbc.72.1354768093939; Wed, 05 Dec 2012 20:28:13 -0800 (PST) Original-Received: from [147.2.147.112] ([61.14.130.226]) by mx.google.com with ESMTPS id hs2sm4054019pbc.22.2012.12.05.20.28.10 (version=SSLv3 cipher=OTHER); Wed, 05 Dec 2012 20:28:12 -0800 (PST) In-Reply-To: X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.41 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15313 Archived-At: On Thu, 2012-12-06 at 11:09 +0800, Daniel Hartwig wrote: > On 6 December 2012 10:43, Nala Ginrut wrote: > > But if we need the original author to assign the copyright, I'm not sure > > how long will it be. Last time I assigned the copyright took about one > > month, since it's long way to send a hand-written assignment to USA. > > Or I just request the original author to assign the copyright in the > > code? > > Which one is right? > > On those things, I don't know. > > In the mean time do not worry about merging of ansi-color, just adjust > your syntax as discussed and continue to develop in your git repo. If > it should later become merged then we can remove the duplicates. > Or—again and for the final time—target this work at guile-lib. > OK, I'll keep updating it here, in 'upstream' branch: https://github.com/NalaGinrut/guile-colorized/tree/upstream The 'upstream' branch won't guarantee an independent module to be used. > I presume that in the long term you would integrate this directly with > the existing pretty-print procedure, rather than, e.g., reimplementing > how to print vectors, arrays, etc.. That makes a lot of sense, and > saves you having to figure out all the details of correctly formatting > an array: just intersperse the colourize code throughout pretty-print. I was aimed to patch pretty-print for coloring. But I changed my mind because an independent module is easy to develop and debug. Anyway, I think it's nice to integrate it into pretty-print and inner-debugger in the long term. BTW, I added custom-color-scheme feature, then the users can define their own color-scheme in '~/.guile'. As you suggested, they my define the color for any data-type they like, they can pass their own type-checker/colorize-method in. For a instance: ==========================~/.guile============================= (use-modules (ice-9 colorized)) (add-color-scheme! `(,(lambda (data) (> data 10000)) 'MY-LONG-NUMBER ,colorize 'BLUE)) =============================end=============================== And 10001 would be rendered as blue one. Regards.