[liblouis-liblouisxml] Re: A new liblouis?

  • From: "John Gardner" <john.gardner@xxxxxxxxxxxx>
  • To: <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Sun, 27 Oct 2013 09:26:43 -0700

Aaron, thanks to you and many others on this list for introspective
comments.  The conversations of the last couple of days have been excellent,
both in content and civility.  We seem to be reaching a consensus that we
need to improve libblouis and, though perhaps not unanimously, that we need
to start over using a modern scripting language.  We have apparently
narrowed our choice to Python and Lua. Both have advantages and
disadvantages.  So the choice must hinge on how they need to be used.  I
have made two assertions that could point to Lua if correct and maybe to
Python if not.  So I will repeat the two assertions and flesh them out.  I
would appreciate comments from the list.  Am I right or am I wrong?

Assertion #1 is that we should have a huge dictionary for any language with
correct braille translations so that the great majority of words to be
translated wwill just be looked up by a fast compiled routine.  I am assured
that one should be able to optimize this lookup so that the time per word is
comparable to our present routines. There could be other compiled routines
for many other time-consuming tasks too.  And the scripting language would
be used to do the many nasty things that are so different from language to
language - emphasis, indicators, etc.  But since the time spent per word on
the nasty business is normally a small part of the total translation time,
it really wouldn't matter that it is slow (or a bit clumsy in the case of
Lua).

Assertion #2 is that performance is less important for formatting than
translation.  Speed is needed for "real time" use such as screen readers,
continuous translations in BrailleBlaster and other braille translator apps.
If one separates translation from formatting, then one would only
occasionally need to have the braille formatted.  And if it took a second or
two to format a big book, what's the big deal?  Obviously we would make it
as fast as our tools will permit, but we shouldn't make performance the
over-riding criterion for choosing tools for writing formatting routines.

I look forward to a continued excellent conversation.

John G



-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
[mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Aaron Cannon
Sent: Saturday, October 26, 2013 8:32 PM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: A new liblouis?

Responding to many of these points below:


On 10/26/13, Ken Perry <kperry@xxxxxxx> wrote:
> Remember light weight also means less functions which means less power 
> if you have tried doing string processing in 0python, gawk, perl.  
> Then tried it in a LUA embedded script you wil find there is stuff 
> that is just missing.

This is true.  There are very few batteries included with Lua.
However, the ease with which a developer can add bindings to C libraries
makes this much less of an issue than it could be, IMHO.

> Not only that depending on how you implement LUA you end up with 
> totally different functionality.  It is very important to use 
> something people can get plenty of documentation for and things like 
> python and perl and even javascript are much better supported languages.

Unless you are modifying the core, I don't believe that this is true.
The functions and objects made available by the developer can of course very
from project to project, depending on what is needed, but the core Lua
language stays the same.  This flexibility is a good thing.  It allows the
developers to include only what is needed, and not the rest.

As for documentation, the language is simple, and a quick Google shows many
good sources for learning.  Clearly there are other languages with more
users and more sites about them, but Lua users are by no means left without
resources.

Aaron
For a description of the software, to download it and links to project pages
go to http://www.abilitiessoft.com

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: