mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] ANNOUNCE: texmacs-fedit plug-in


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] ANNOUNCE: texmacs-fedit plug-in
  • Date: Sun, 17 Oct 2010 09:47:49 +0200

Dear Sylvain and Sam,

Thanks for your efforts to investigate literate programming in combination
with TeXmacs. I do not have much time to dig into this issue myself,
so I will wait a bit until your work has stabilized, before inclusion.

In order to keep things simple, I would prefer to have a single
TeXmacs tool for literate programming, which does not mean that
you cannot experiment each on your side.

I think that Sam is also aware of the fact that code extraction is
best done from within TeXmacs, using some Scheme scripts.
Indeed, Sylvain is right that it would be best not to depend
on any external scripts. Ideally, there would just be a button
'compile and run'.

As to upcoming work in TeXmacs, I already mentioned the fact that
I just implemented Packrat parsing. I would very much appreciate
any help regarding the support of new programming languages,
so as to have formal grammars for as many languages as possible.
Besides syntax highlighting, I am thinking about automatic indentation,
and (in the later future) automatic help/completion of defined
identifiers and classes. Anyway, having the full grammars available
opens a lot of possibilities, and this is by far the most robust solution
towards an integrated literate programming environment.

Another thing which will be implemented is editable hyperlinks
(the destination of the link being included in the source document;
the destination might also be part of a document, or even a part
of a document which is computed dynamically). This will make it
potentially possible to implement literate programming as
annotation of existing source files (which could be edited
using other editors). I am not sure yet how robust such
a solution can be made, but it has the potential of removing
the major drawback of forcing all developers to use the same
literate programming tool.

Finally, replying to Sylvain, it is indeed possible to use
the plug-in serialization methods for converting trees into strings.
In the future, more sophisticated serialization methods could
be implemented on top of the new Packrat parsing facility.
I already rely on this possibility for checking the syntactical
correctness of mathematical formulas (see the std-math grammar).

For further discussions, please post on address@hidden

Best wishes, --Joris


On Thu, Oct 14, 2010 at 01:19:04PM +0200, sylvain wrote:
> Hi,
>
> Your project is great. I apologise for not having discovered it before.
>
> One of the fun of computing is that people can find very technically
> different solutions to the same problem. This is yet another example.
>
> We both wanted to be able to do the same: write program code in
> Texmacs.
>
> You seem to be very knowledgeable about literate programming à la
> Knuth. I am more used to Integrated Development Environment like
> Eclipse, that I love because of the productivity it allows.
>
> So, you asked yourself the question: how can I put markups in a Texmacs
> document so that my external program can extract it? User inserts code
> fragment in an arbitrary order and runs "make", which calls an external
> tool, that extracts the code, make compiles it. And your project does
> exactly that.
>
> I asked rather the question: how can I get Texmacs to extract the code,
> compile it and insert the result so that I can have fast round-trip?
>
> texmacs-fedit leverages the plug-in infrastructure to do exactly that.
>
> The project is structured so that one can add a specialized plug-in for
> a dedicated language. It is possible to parse the output of the compiler
> to, for example, highlight the location of an error.
>
> Another problem I wanted to try to solve is to explore the possibility
> to convert Texmacs advanced typesetting into one-lined ASCII concrete
> syntax understood by a compiler. I believe the one-dimensional one-line
> input from the good old 70's is holding us back. Not when you program in
> traditional languages, but when you want to program in modern languages
> like ATS, whose text source, when forced to be one-dimensional, become
> rapidly unreadable. Other languages I can think of that would benefit of
> that are Agda and Haskell.
> (The trouble is, I am stuck with a bug in my version of Texmacs
> (1.0.7.3, Ubuntu) and didn't made much progress on this front.)
>
> I personally hate duplication of effort. If it was clear-cut that your
> project has the best approach to reach these goals, I would drop fedit
> down right-away. But I am not convinced of that. Rather I think that
> both answer to different use-cases and are valuable. In that sense we
> didn't wasted our time, neither you nor me.
>
> Ideally, we would merge both projects, but I don't see for now how it
> could be done, since they have taken radically different technical ways.
> If you have an idea, let me know.
>
> Greetings,
> Sylvain



Archive powered by MHonArc 2.6.19.

Top of page