Notes from a failed attempt to port LaTeX to iOS
vallettaventures.com
vallettaventures.com
First, the fact that the core TeX engine is written in WEB -- a literate programming system with Pascal as the underlying programming language. This is responsible for maybe 1% of the author's problems, but the author writes as if it's the main issue.
Second, the fact that the LaTeX ecosystem includes things like kpathsea built out of C, bash scripts, and baling wire. This is certainly a real problem for any porting effort.
Third, the fact that LaTeX itself equals the TeX engine plus lots (lots and lots and lots) of other bits written in TeX. TeX is not only a typesetter, it's a (horrible, horrible) programming language, and LaTeX is built out of lots of packages implemented on top of that. This is what makes LaTeX slow; it has nothing whatever to do with Pascal or WEB or even bash scripts.
Rewriting the WEB stuff in modern C (or CWEB, if the people concerned wanted to preserve the literate-programming approach) might help with portability. It would do nothing to help with speed. In fact, rewriting the old Knuth code would probably make the system slower -- there are things not to like about Knuth's coding style, for sure, but no one would accuse him of not being sufficiently concerned with efficiency or of not being able to write efficient code. What it would take to make LaTeX much faster is not a from-scratch rewrite of the codebase the author complains about, but a from-scratch redesign to enable much more of the work to be done in native code instead of in packages implemented in a nasty macro-expansion language, and to make the extension language nicer and more efficient. (Most likely, by replacing it with Python or Lua or something; see http://www.luatex.org/ for an attempt to do something rather like that.) Plus a monstrously large project to re-implement all the packages that make LaTeX what it is on that new substrate.
So now it's Latex's fault that Apple does not understand the concept of packages and libraries ?
Note that this applies to purchases as well, if you give the app money its always through the same interface. Users see spending money in iOS as being painless and danger free.
Do I wish I had more power over my iPad? Sure do, but Apple doesn't care about us, they care about the 90% of users who are less sophisticated then us.
For me, one of the big lessons from working on projects for a few years with other people, was that you should avoid taking big technical risks on non-toy projects as much as possible. I am sure most people reading this have seen projects that are valuable in themselves, but where someone at some point thought he can at the same time create a better web framework / better database / better encryption library etc. and now this valuable piece of software depends in thousands of places on a very peculiar solution that only the author (often having some authority at the company/project, a CTO or a valued programmer) knows and only the author likes - it ended up not getting any traction or wasn't even extracted from the core project and presented to the world. In projects that will live for many years and will need to be maintained by many people, it is important to remember that the vitality of the project will be proportional to the amount of people A) being able and B) willing to use the tools the project is built with, so it is important to use already estabilished tools, pick less-critical projects for experiments, always extract any new infrastructure pieces right from the start into a separate project, document it, see whether other people want to use it etc.
That's why I think LaTeX rewritten in simple C would be valuable and what the author has written is a testament to what I have written above - maybe we would not end up with a mix of WEB/Pascal, C and bash scripts if the original TeX/LaTeX was a program more people understood and could easily modify.
And developers are more than able to use libraries in iOS. They can create them, use shared libraries or frameworks. None of which stops you from releasing apps.
Also, he starts from a false premise when he points out that the ipad is the 'most beautiful platform'. It might be ok for watching videos and playing angry birds, but without a physical keyboard it will always suck for composing anything text-related, when compared to a real computer with keyboard and an eye-level screen (also, if you're carrying a BT keyboard for your ipad, you might do better with a macbook air).
I think that this assumption is fundamentally flawed. A Latex app only needs to be better than the alternatives in order to appeal to the entire potential user base - a user base which is quite small in relative terms.
In other words, the fundamental feature for the minimum viable product is just getting Latex running on the iPad (or even some meaningful subset). Snappy performance and a gorgeous interface are not critical features of Latex - it has always been about the document for those who have invested the time to learn it.
Of course, slow performance and a clunky experience may not make it through the review process, but a limited implementation would capture most of the potential market.
http://www.kickstarter.com/projects/251414413/tex-murphy-pro...