You should check out LaTeX if you haven't; I am a big fan of Markdown & syntax highlighters, but LaTeX is solving a much different problem, and it solves it very well.
I know, but what is in even the biggest set of optional packages to reach 4GB? Fonts? Viewers and tools? Maybe it's just the old unix fart in me, but we've had entire OSs with many GUI apps in much less than 1GB.
I'm not an iOS programmer, but I believe that in itself could present a few difficult issues on both the client and server end.
Despite the potential for the problem to be solved, I think the real purpose in the article wasn't to say that a LaTeX based typesetter could never be implemented on tablets, but to demonstrate that implementing one wouldn't be so hard if the codebase was cleaner. I think it outlines one of the really fundamental issues in OSS today, in that everyone wants to build, but no one wants to clean up, leading to extremely powerful pieces of software like LaTeX, that no one person can reasonably read and port anymore.
The author seems to blame Latex, when the fault squarely lies with Apple and their "any iPad app be a single executable" policy.
Oh, and Latex is not 4GB. The standard,minimal distribution (which is what 99% users will ever need) fits inside of 50MB (with all the fonts). For everything else there is CTAN.
So now it's Latex's fault that Apple does not understand the concept of packages and libraries ?
Apple understands it perfectly well. They just don't want any iOS apps that contain package managers. Which makes sense from their perspective, but it's very user-hostile.
I think that Apple sees this as not being user hostile. If you want packages installed then you have to use the appstore and in app downloads. This has the advantage of being a consistent experience across all apps. Users do not need to fear in app downloads, or get confused by them they get the same experience every time. Obviously this hurt geeks like us who have no problem using a more exotic system, but in general it favours the bulk of Apples user base.
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.
I thought the description of the problems with LaTeX architecture was pretty concrete and convincing. Knuth is no doubt a genius, I admire him as much as anyone, but he does his work in a certain niche in a very isolated setting and probably doesn't have that much experience doing software engineering work on larger projects and with other people.
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.
I really don't get what you mean by that last statement. iOS like OSX is a UNIX operating system hence contains hundreds of libraries.
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.
"there is nothing like it for composing beautiful documents, and the iPad is the most beautiful platform out there, so it is natural to try and combine the two"
I use TexLive on a Linux netbook almost every day and it weighs in at around 200 Mb. It includes TeX, LaTeX, XeTeX and LuaTeX. Its fast and works extremely well.
I don't know where this 4Gb figure comes from. OK, TexLive for OS X is bigger for some reason, but I'm sure its around 2Gb at most.
People laugh at netbooks but I find mine far more practical than an iPad. Not better, just better suited to programming a few things and using stuff like LaTeX.
"If we were going to bring LaTeX to the iPad we have would do so such that it would be usable and appealing to the majority of the iOS userbase,"
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.
The author seems to mix up three quite separate things.
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.
Maybe Lout has improved a lot since I last tried it -- which, admittedly, was a long long time ago -- but my recollection is that the quality of its typesetting was always very greatly inferior to that of TeX's. It might have 95% of the functionality as measured by feature-counting (though ... there are a lot of LaTeX packages out there, doing all kinds of wacky things) but that's not worth much if the output just doesn't look good.
Every now and then someone comes up with these 'brilliant' ideas, such as reimplementing (La)TeX or Emacs from scratch. All it shows is that they don't have a clue of the tons of man-years that have gone into the current incarnations, and the fact that they actually work awesomely well for 99.99% of the cases.
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).
28 comments
[ 3.3 ms ] story [ 71.5 ms ] threadhttp://itunes.apple.com/us/app/tex-touch/id377627321?mt=8
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.
http://sunburn.stanford.edu/~knuth/cweb.html
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.
That's where I stopped reading.
I don't know where this 4Gb figure comes from. OK, TexLive for OS X is bigger for some reason, but I'm sure its around 2Gb at most.
People laugh at netbooks but I find mine far more practical than an iPad. Not better, just better suited to programming a few things and using stuff like LaTeX.
http://www.kickstarter.com/projects/251414413/tex-murphy-pro...
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.
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.
http://lout.wiki.sourceforge.net
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).