texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] plugin for Haskell


From: Massimiliano Gubinelli
Subject: Re: [Texmacs-dev] plugin for Haskell
Date: Fri, 22 Jun 2018 18:31:32 +0200

No, I’m quite busy lately. I went a long way to switch TeXmacs to chibi but then I realised that a standard r7rs implementation is not flexible enough to handle all the behaviours that TeXmacs' scheme needs and that Guile allows. s7 seems a more pragmatic scheme where maybe one can make things work.

There are two main difficulty in porting TeXmacs’ scheme to other interpreters than Guile. All these are mainly related to tm-define and tm-define-macro which implement TeXmacs overloading system.

1) modules can refer to identifier which will be tm-defined later and in other modules without any specific forward declaration of which these identifier be. Chibi for example assing “undefined” to these indentifier since they are not in scope at the moment the module is read. Even if the identifier become available later on this binding will not be modified and that is too rigid. If one would like to stick to a standard r7rs implementation maybe one should add forward declaration to the code, which would mean go on an modify much of the existing scheme files….

2) r7rs schemes do not have a flexible enough module system, in particular one need the possibility to “open” a module and add new idenfitier or macro to the list of its symbols. I hacked some support for chibi but I’m not satisfies. 

My attempts to replace guile with chibi are here:

https://github.com/mgubi/texmacs/tree/scheme

the code start booting but the tm-defined functions are not correcly bound and there are error which prevents the interface to boot completely.

Integrating s7 should not take much on the C++ side (one/two days) but still the stumbling block is how to make the scheme code compatible with the new interpreter.


Best
Max





On 2. Jun 2018, at 16:33, Darcy Shen <address@hidden> wrote:


Any progress on S7 scheme ?


---- On Thu, 08 Mar 2018 00:49:06 +0800 Massimiliano Gubinelli<address@hidden> wrote ----

Hi Bertrand,
in principle yes even if right now I’m busy hacking the Qt port to track down some bugs and update to Qt 5.0. I would also try to replace Guile with s7 Scheme which seems more easy to maintain and as fast (wrt. Guile 1.8).

At some point I though a bit about the plugins and felt that TeXmacs need to support the jupyter protocol (https://jupyter.org), this would make it a perfect frontend for iPython and iHaskell for example but we will give us access to many other systems supporting that protocol, see for example this list of maintained kernels for jupyter:

https://github.com/jupyter/jupyter/wiki/Jupyter-kernels

It would make perfect sense to me and does not seem so difficult.

Best
Max



> On 7. Mar 2018, at 13:26, Bertrand BRATSCHI <address@hidden> wrote:
>
> Hi,
>
> Are you still interested in such a project ?
>
> Bertrand
>
> ———————-
>
> WYSIWYG literate programming
> Massimiliano Gubinelli 27, 2009; 10:31am
>
> Hi,
> I would like to "advertise" TeXmacs (http://www.texmacs.org/) to the Haskell comunity as a possible front-end for literate programming in Haskell (and GHCI interaction). TeXmacs is a system which allows the production of documents featuring high quality typesetting (comparable to TeX) and high level of customizability (a la Emacs). It does not rely on TeX for the typesetting (but can export to Latex, HTML, etc..). It is written in C++ (unfortunately not Haskell) and use Scheme as extension language (specifically Guile). It has been in use for at least 10 years and has plugins for many external applications like Pari, Axiom, Maxima, Octave, R, Yacas, etc...
>
> From the webpage: "GNU TeXmacs is a free wysiwyw (what you see is what you want) editing platform with special features for scientists. The software aims to provide a unified and user friendly framework for editing structured documents with different types of content (text, graphics, mathematics, interactive content, etc.). The rendering engine uses high-quality typesetting algorithms so as to produce professionally looking documents, which can either be printed out or presented from a laptop."
>
> It would be nice to develop a pluging for GHC/GHCI to allow "direct" literate programming style with high-quality rendering. (If someone want to try before I find the time to do it myself.... )
>
> Massimiliano
> _______________________________________________
> Texmacs-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/texmacs-dev


_______________________________________________
Texmacs-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/texmacs-dev

_______________________________________________
Texmacs-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/texmacs-dev


reply via email to

[Prev in Thread] Current Thread [Next in Thread]