> > I would actually not include it with the distribution, but just make it
> > part of the Web pages. My original idea (I think) was to have something to
> > point skeptics (and other curious parties) to when they wanted to know
> > what LyX is really like without having to download and install it first.
> > Something like:
>
> However, I *still* think that particularly clueless people (e.g., my mom)
> might enjoy doing the graphical tutorial before the much heavier Tutorial.
> Perhaps a pointer in Introduction.lyx (and/or in Tutorial.lyx and/or the
> README)? Basically, I'm arguing that if LyX has already been downlaoded onto
> their system, or if they didn't read the graphical tutorial before
downloading
> lyx, then your enumerate above doesn't work & people might still enjoy the
> lgt.
I like the work and the idea in it, but think it's too much to download 1.5 MB
to see. And worse, it's too much work to keep it up to date when we change LyX
to automatically switch to the Author environment after typing the title.
Therefor, it struck me that it's relatively easy to patch LyX to do the
demonstration by itself!
So, under the "help" menu, we'd have a "graphical tutorial #1", and when we
invoked that, LyX would pop up with a dialog where all the text from the nice
work from Mike is presented.
When the user presses "Next", LyX will do the things one step at a time, and
the user will see how easy it is to do it, and the effects of it immediately,
including updating the DVI view and all that.
Sounds like science fiction?
It's is, but not for ever. In particular, it's a piece of cake if we have a
scripting language.
For LyX 1.0, we would have to hardcode it, and thus, it would not give us any
real benefits. Instead, it's something to remember for the development
version.
I.e. it's something to think a bit about, and maybe we should decide for a
scripting language to help that process. We have all had some time to ponder
on this (more than a year), and maybe it's time to decide for something.
I vote for Python because it's easy to learn, has a natural syntax and it's
cross-platform.
The core language is stable, but still the language is actively developed.
Also it's free, well documented, functional (i.e. bug-free), also on Windows
and other platforms. Python has bindings to KDE, Gnome and lots of toolkits.
Finally, the Python language is relatively wide-spread - and thus installed
many places.
This is in contrast with Guile, which I don't think is mature enough, and
Unix-only at this point. Also, the existing syntaxs for Guile are arguably
hard to learn for novices, not to mention the functional programming. (I say
this with a bleeding heart, because I love Scheme as a programming language.)
Another serious candidate is Perl, which is more widespread than Python, but I
fear the syntax of the language will scare people from trying to use it.
Of course the best would be to use SWIG such that people can choose their own
scripting language, but unfortunately, it seems that the next release of SWIG
is being delayed again and again. I doubt that SWIG is a feasible solution for
now - it's not designed for embedded interpreters, and although this feature is
planned for the next relase, this release is still vapourware.
Another alternative would be JavaScript. It has a well-known syntax for C and
C++ and Java programmers, and it has a high hype-value, but I think that it
might be too scary for novice users. "if (a==0) b = 0; else { ++c; }" is not
easy to understand, and much less write, the first time you see it.
Yet another alternative is to write our own small interpreter with a very
simple syntax. This has the really nice advantage that people do not need to
install yet another package to use LyX, and also that we can handtune it to fit
our purposes exactly, but the really serious disadvantage that it will take
away scarce development resources for other things.
Of course, all of this depends on what we consider the target audience, and
what we want to achieve. I would like to make the scripting language as easy
to get into as possible, both for us developers and for users of it. This is
my primary concern. Speed and access to low level system features are not
important. It should be easy to do something like a graphical tutorial, so
that anybody that knows how to use LyX could do that.
IMO Python fits this goal.
Consider the task of doing an interactive graphical tutorial that should
replace the web-based one. Think of how you would program that, and try to
write a few lines of pseudo-code to do that. Then have a look at how it looks
in Python, and you'll find that this is what you already wrote.
Now consider how you would do it in practice:
Of course, it would be real easy to implement a "macro-recording" facility,
because this would be nothing else than a log of what goes through the
dispatcher.
This means that doing a graphical tutorial would be nothing else than writing
the resulting document with the macro-recorder on, and then edit the macro that
resulted, because execution of the macro would recreate the document from
scratch.
Now, insert a few dialogs here and there, and you are done. The neat thing
would be that the resulting macro would be entirely readable, so this task is
not intimidating.
Another advantage would be that the tutorial would be 5k rather than 1.5 MB.
Greets,
Asger