[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konsole-devel
Subject:    [Konsole-devel] wlterm, konsole, libvt and common emulator library.
From:       Lars Doelle <lars.doelle () on-line ! de>
Date:       2012-09-30 11:31:55
Message-ID: 201209301331.55966.lars.doelle () on-line ! de
[Download RAW message or body]

Hi All,

since x11 is renewing its code base right now (Wayland),
terminal emulation might use this impetus and work down
some issues that crept up over the last three decades.

Both David and i would be willing to put some effort in
making a share emulation library as one point. Crucial
would be the opinion of the konsole-devel list and in
particular the konsole's maintainers, since i would then
work to factor out the emulation core.

With the next post, i'll forward  David's reply on my initial
posting, listing some issues i see with the emulation pipeline,
that could need a bit more love after this long time IMO and
that would need to be addressed if any true advances in
terminal emulation are wanted.

Kind regards, Lars D=F6lle

["forwarded message" (message/rfc822)]

Return-path: <dh.herrmann@googlemail.com>
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on x64.localnet
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=unavailable version=3.3.2
Envelope-to: doelle@localhost
Delivery-date: Sun, 30 Sep 2012 12:58:00 +0200
Received: from ip6-localhost ([::1] helo=x64.localnet)
	by x64.localnet with esmtp (Exim 4.80)
	(envelope-from <dh.herrmann@googlemail.com>)
	id 1TIHDk-0004yV-Bs
	for doelle@localhost; Sun, 30 Sep 2012 12:58:00 +0200
Received: from mail.exess.net [195.64.106.47]
	by x64.localnet with POP3 (fetchmail-6.3.22)
	for <doelle@localhost> (single-drop); Sun, 30 Sep 2012 12:58:00 +0200 (CEST)
Received: from mail-we0-f179.google.com ([74.125.82.179])
	by ndisco.misc.net with esmtp (Exim 4.72)
	(envelope-from <dh.herrmann@googlemail.com>)
	id 1TIHBD-00088N-LV
	for lars.doelle@on-line.de; Sun, 30 Sep 2012 12:55:24 +0200
Received: by weyz49 with SMTP id z49so2707799wey.24
        for <lars.doelle@on-line.de>; Sun, 30 Sep 2012 03:55:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :cc:content-type;
        bh=B/KLv1V2+jLzYt37whhMkwmcT47XFYY9w/b+hbrOIsY=;
        b=Q4UoXqn9M1p3qsfGCOSx2Z01tYugJQHkpgDz6qGKFouCa8a2aMP3OcA8jii4+O4LoE
         DG5hmqsSv4oOWFWifR5cKylPHAkPvnAfH8DNi4zU5UJbD5ZrSCeZvlzLR08W73yNRjJ5
         IrkkNXEfKILFGDujiA+VSdN4khCv0BJuvOYBkAcLj40GsZvsbE+GqnZbWb9sbmRf4qnG
         NUmEdd3ymiCjmPTPRv53c7j2gMXssfXi6yxw965UK42fHy9MQPl/NycIVmBv3dB5e0zp
         3X12QtYqToT/+lIjZxXRFok+C6DV2n5S5MAjWDwZXA1GMrC40BR6MeWDGgwCZBBnqN+C
         HZjQ==
MIME-Version: 1.0
Received: by 10.180.105.6 with SMTP id gi6mr7858674wib.4.1349000828998; Sun,
 30 Sep 2012 03:27:08 -0700 (PDT)
Received: by 10.216.14.166 with HTTP; Sun, 30 Sep 2012 03:27:08 -0700 (PDT)
In-Reply-To: <201209292155.38843.lars.doelle@on-line.de>
References: <201209291905.55035.lars.doelle@on-line.de>
	<CANq1E4RYT5ZrR8ea6n8uzgMvNTuvwQCh-V01fgwvrP4Qa4ndrg@mail.gmail.com>
	<201209292155.38843.lars.doelle@on-line.de>
Date: Sun, 30 Sep 2012 12:27:08 +0200
Message-ID: <CANq1E4St1Nx37dXczmrgAtWzKEPCzFg6iTtfTQoT-kAiic94eA@mail.gmail.com>
Subject: Re: wlterm
From: David Herrmann <dh.herrmann@googlemail.com>
To: Lars Doelle <lars.doelle@on-line.de>
Cc: Thomas Dickey <dickey@his.com>
Content-Type: text/plain;
  charset=ISO-8859-1
X-UID: 

Hi Lars

On Sat, Sep 29, 2012 at 9:55 PM, Lars Doelle <lars.doelle@on-line.de> wrote:
> David,
>
>> wlterm emerged out of kmscon
>> (which is still the main project I am working on in this regard) and
>> so I am not into terminal-emulation for very long. The reason I
>> started developing TSM (the terminal-emulation layer behind
>> wlterm/kmscon) was that I couldn't find a decent library that does
>> terminal-emulation without doing rendering. Both wlterm and kmscon
>> require independent rendering layers so I couldn't use the known
>> libraries like libvte.
>
> Perhaps this is a first point we could work together. The konsole's
> core /is/ just a terminal emulation without rendering. An extreme
> minimum of QT stuff crept in but i have removed it e.g. for some
> project where the core is used in a telnet-proxy, that does not do
> any rendering at all. The core is well layered and i could even write
> some documentation for it.

The code you sent me looks great! It is indeed very similar to TSM
(even the naming of the objects). However, the code has to be put into
a proper shared-library. It would be the first great step to have
several terminal-emulator-teams work on a shared core library which
just does emulation.
Everything else can be based on this work.

> The only disadvantage i could think of, is that the library uses C++.

That is a problem, indeed. The code you sent me is _very_ hard to
maintain as a library as it exposes very much information to the user.
C++ adds much burden on keeping ABI compatibility, although it is
possible to do it. But you will never find any agreement with GTK
people when not exposing a native C API.

And creating shared-libraries means guaranteeing ABI/API stability,
hiding information from the public API to allow changing it between
releases. And while benchmarking kmscon I noticed that the bottleneck
of every terminal is the rendering, not the emulation. So no problems
here.

> If you have interest, i could try to modify both the core and wlterm
> so, that they match. The core of the konsole emulation is virtually
> unchanged since its very beginning, i.e. highly stable. All the work
> on the konsole since then went mostly into fancy surface stuff, fully
> unrelated to the core.

Highly stable code is great! Very old code is also good if you do not
plan on extending it. However, if we plan on working on it and maybe
adding some of the features that were always missing from terminal
emulation, then an old and very long unchanged code-base isn't really
helping.
Your TE library is about 2.5k lines and TSM is about 6k lines, so both
projects are neither big nor hard to rewrite. So I am not sticking to
any code either.

> Additionally, i could forward our conversation so far to konsole-devel,
> to learn about opinions w.r.t. an extraction, if this were fine with you.

I have no idea who the maintainer of konsole is, so I would very much
appreciate if you can do this. Feel free to add libvte to CC (they
have no Mailing list, but maintainers are "Christian Persch
<chpe@gnome.org>" and "Behdad Esfahbod <behdad@behdad.org>", maybe
also Chris Wilson <chris@chris-wilson.co.uk> but I think chris is only
working on Intel-DRI today).

So what I think of is a shared core library. One that all the
emulators can use and which guarantees that they behave the same way.
But you have to keep in mind, that many of them might not be
interested in a shared-core if in the end it will be the same
feature-set as now.
So this might also be about convincing them to work on a
bigger-feature set which can be implemented in this library. If these
features are really worth working for, then we can have a chance of
seeing konsole and vte guys spending time on reworking the
emulation-core.

I am willing to spend much time on this and I am open for reusing
existing code or rewriting from scratch. We are not talking about 100k
lines of code so this can be done either way. But if konsole, vte,
urxvt or other guys have no interest in doing this, then I am all for
working on something new, leaving legacy behind.

So maybe an initial public mail to konsole-devel describing the ideas
behind the projects
 (maybe even linking to you emulation library or the src/tsm_*.h
headers) would be nice. With your layer and TSM there are already two
such libraries so this isn't really something we make up in our mind,
but rather something that already exists.
Also feel free publishing this conversation.

Thanks for sharing your ideas!
David



_______________________________________________
konsole-devel mailing list
konsole-devel@kde.org
https://mail.kde.org/mailman/listinfo/konsole-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic