From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29056 invoked by alias); 18 Jun 2016 16:29:06 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 29043 invoked by uid 89); 18 Jun 2016 16:29:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=kawa, Per, UD:jpg, Hx-languages-length:2237 X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 18 Jun 2016 16:28:55 +0000 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1bEJ75-000269-A0 for kawa@sourceware.org; Sat, 18 Jun 2016 18:28:51 +0200 Received: from 70-36-239-75.dsl.dynamic.fusionbroadband.com ([70.36.239.75] helo=toshie.bothner.com) by mailfront10.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1bEJ73-00059X-7Y for kawa@sourceware.org; Sat, 18 Jun 2016 18:28:49 +0200 Subject: kawa binary snapshot with domterm-based console To: kawa@sourceware.org References: <0f5f97f6-e993-f6e0-d20d-8305c33bb542@bothner.com> From: Per Bothner Message-ID: <81a7a345-da39-eb5e-98fd-775f0a1d9103@bothner.com> Date: Sat, 18 Jun 2016 16:29:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <0f5f97f6-e993-f6e0-d20d-8305c33bb542@bothner.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-q2/txt/msg00032.txt.bz2 The latest Kawa snapshot: ftp://ftp.gnu.org/pub/gnu/kawa/kawa-2.1.9-20160618.zip supports a completely new console (REPL) window (as started by -w). Before, when you created a new REPL window using -w (or no arguments in an environment with no Console) Kawa would create a Swing-based REPL: http://per.bothner.com/blog/2007/ReplPane/ This Swing-based REPL is no longer the default. Instead, Kawa uses DomTerm (http://domterm.org/) running in a JavaFX WebView. One advantage of DomTerm over the Swing console is that it is compatible with JLine3 (as mentioned in my 06/06 message), so you get Line3's multi-line editing. history, tab-completion etc. You can disable JLine3 with the command-line flag console:use-jline=no, in which case you get DomTerm's builtin line-editing (based on WebKit's contenteditable support), which includes basic history support (up/down-arrow but no history search). The DomTerm+JLine3 combination works out-of-the-box on Windows, using the binary snapshot. Another big advantage of DomTerm is you can "print" HTML expressions, including images and SVG. See the http://domterm.org for some examples. For example to print a cat image: #|kawa:1|# # You can also control the appearance of the DomTerm window using a CSS stylesheet. The new domterm-load-stylesheet procedure takes a literal stylesheet (and an optional name, defaulting to "kawa") and loads it. For example: #|kawa:2|# (domterm-load-stylesheet "div.domterm { background-color: yellow }") To load from a stylesheet file use the '&<' load-whole-file syntax: (domterm-load-stylesheet &<{foo.css}) or: (domterm-load-stylesheet &<[filename-expression]) The Swing console is still available, if you specific the command-line flag console:use-domterm=no or if DomTerm fails to load (if JavaFX or the domterm.jar are missing). I've also implemented interrupt handing: If you have an infinite loop, you can interrupt it with ctrl-c (at least on my Fedora Linux system). (When jline is enabled, asit is by default, there are glitches in ctrl-c handling that I haven't worked out yet.) -- --Per Bothner per@bothner.com http://per.bothner.com/