News for hackers. Stuff that matters.
Re:The price of a messy codebase: No LaTeX on the iPad by tolmasky on Tuesday November 22, 2011 @02:45AM (#3264573)
Yes I noticed that in the comments before I posted which is why I was careful to specifically say "The executable described here is 4GB" so as to refer to whatever it is he was trying to work with. I suppose whether all of the 4GB is needed for what he wanted, whether it could easily be taken apart, or could now be remade in a much smaller package, are all valid questions.
Re:The price of a messy codebase: No LaTeX on the iPad by JoachimSchipper on Tuesday November 22, 2011 @03:02AM (#3264610)
4G is a bit over the top. My install (TeXLive 2010 on OpenBSD) is ~2G, and that includes gobs of rarely-used packages and documentation.

Really, borrowing MikTeX's install-on-first-use for packages and making documentation optional should result in a much more reasonable size. If you want to get fancy, teach LaTeX how to decompress packages on demand.

Re:The price of a messy codebase: No LaTeX on the iPad by joelhaasnoot on Tuesday November 22, 2011 @03:41AM (#3264701)
Here comes the problem: Apple requires it to be a single binary, distributed once. You can't install packages the LaTeX ways should you want to, so you have to bundle most (if not all) packages into the single binary.
Re:The price of a messy codebase: No LaTeX on the iPad by r00fus on Tuesday November 22, 2011 @01:33PM (#3266712)
What about in-app purchases? Why not a set of free in-app "purchase" options for large sets of these packages?
Re:The price of a messy codebase: No LaTeX on the iPad by msbarnett on Tuesday November 22, 2011 @04:07PM (#3267367)
In-app purchases can be used to trigger your application to download new data, but not new executable code.
Re:The price of a messy codebase: No LaTeX on the iPad by angus77 on Tuesday November 22, 2011 @06:02PM (#3267846)
The packages are text files, not executables.
Re:The price of a messy codebase: No LaTeX on the iPad by joelhaasnoot on Wednesday November 23, 2011 @02:37AM (#3269181)
Exactly, so all you could do is trigger certain bundles to be 'unlocked': you would always have to ship them.
Re:The price of a messy codebase: No LaTeX on the iPad by Tomis on Tuesday November 22, 2011 @04:18AM (#3264777)
You could use a virtual machine library (if anything suitable exists) and run everything inside one executable - it would probably have horrid performance but you get rid of the single binary restriction. You can put on a nice front-end and tell the user how much longer he has to wait until the operation is complete.
Re:The price of a messy codebase: No LaTeX on the iPad by shaggyfrog on Tuesday November 22, 2011 @05:05AM (#3264877)
Virtual machines are generally prohibited by the guidelines as well. (Exceptions exist for things like script interpreters, which need to be present for some games to run, e.g. Lua.)
Re:The price of a messy codebase: No LaTeX on the iPad by gurkendoktor on Tuesday November 22, 2011 @09:09AM (#3265532)
I think the difference here is between interpreting scripts that come with the binary, and downloading new scripts from the internet (or other untrusted locations). The latter is prohibited.

To get around it, you'd have to make it In App Purchases, because these also come from a the App Store.

Re:The price of a messy codebase: No LaTeX on the iPad by einhverfr on Tuesday November 22, 2011 @08:04PM (#3268236)
So the issue here is not that the TeX codebase is messy, but that it doesn't conform to Apple's App Store guidelines, right?
Re:The price of a messy codebase: No LaTeX on the iPad by einhverfr on Tuesday November 22, 2011 @05:57AM (#3264995)
So, go with LuaTeX ;-)
Re:The price of a messy codebase: No LaTeX on the iPad by iqster on Tuesday November 22, 2011 @08:10AM (#3265362)
I never understood the exception for game engines (ala Lua). Why are those okay but other VMs not okay (from Apple's perspective, of course)?
Re:The price of a messy codebase: No LaTeX on the iPad by bzbarsky on Tuesday November 22, 2011 @09:10AM (#3265535)
Apple wants to restrict the platform options available to preserve their user lock-in. They were sort of forced to make an exception for games because they had no alternative to offer.
Re:The price of a messy codebase: No LaTeX on the iPad by albertzeyer on Tuesday November 22, 2011 @08:37AM (#3265432)
They don't want to have other platforms inside their platform because they think it would result in a bad user experience.
Re:The price of a messy codebase: No LaTeX on the iPad by Tomis on Tuesday November 22, 2011 @08:45AM (#3265459)
You can't do very much within those guidelines, can you?
Re:The price of a messy codebase: No LaTeX on the iPad by shaggyfrog on Tuesday November 22, 2011 @02:57PM (#3267076)
Totally, that's why there are hardly any apps for iOS, and the paying market is such a fraction of that on Android.
Re:The price of a messy codebase: No LaTeX on the iPad by Tomis on Tuesday November 22, 2011 @06:15PM (#3267898)
It seems the cult of Apple is touchy today and can't detect a joke. I'm sorry if I have inadvertently hurt your feelings - I will be sure to clearly state my humorous intentions next time. </humour>

For the record, I do not own devices based on iOS or Android and I don't care for your little Apple-Google feud with which you seem to be so concerned with. So please, carry on with those market statistics about Android, I am dying to know more.

Re:The price of a messy codebase: No LaTeX on the iPad by shaggyfrog on Tuesday November 22, 2011 @06:53PM (#3268014)
This ad hominem kind of scrawl is inappropriate for HN.
Re:The price of a messy codebase: No LaTeX on the iPad by Tomis on Wednesday November 23, 2011 @03:15AM (#3269254)
I get carried away from time to time, sorry about that. No offense meant.
Re:The price of a messy codebase: No LaTeX on the iPad by deadcyclo on Tuesday November 22, 2011 @04:19AM (#3264783)
Well you obviously weren't careful enough. Nowhere in the article does he talk about a 4 GB binary or binaries. To quote him:"A 4GB Tex distribution dependant on over a 100 binaries" He is talking about the _whole_ distribution not a single or several binaries. So even though you were careful, you still misquoted the article.
Re:The price of a messy codebase: No LaTeX on the iPad by tolmasky on Tuesday November 22, 2011 @05:12AM (#3264897)
"The App Store guidelines insist that any iPad app be a single executable. Jailbreaking would ease this restriction, but in this case Apple’s gatekeepers are right. A 4GB TeX distribution dependant on over 100 binaries is not acceptable on the iPad."

From that quote ("A 4GB TeX distribution dependant on over 100 binaries is not acceptable on the iPad."), it is clear that he is musing about a scenario where he ships all 4GB. As stated many times (and also in that same quote), on the iPhone you are forced to ship something as one executable. Thus, the theoretical distribution he is referring to would in fact be a single executable of about 4GB. In fact I think that's the whole point of those two sentences. So it appears that I was indeed quite careful.

Re:The price of a messy codebase: No LaTeX on the iPad by masklinn on Tuesday November 22, 2011 @07:16AM (#3265199)
> As stated many times (and also in that same quote), on the iPhone you are forced to ship something as one executable.

On the other hand, yes the executable must be "one". On the other hand you can download stuff (either directly or via DLC). The issue is that while Apple has relaxed their restrictions on bundling interpreters in applications (you can do that), they have not relaxed their restrictions on downloading interpretable code: it's not allowed. So downloading even styles would be verboten, since styles are TeX, and TeX is executable code.

Re:The price of a messy codebase: No LaTeX on the iPad by deadcyclo on Tuesday November 22, 2011 @07:42AM (#3265268)
I think you are missing the point. The apple guidelines do not state that a program can only consist of an executable. That would not make any sense. Rather they state that any application can only consist of a single executable in addition to whatever resource files are included. In the case of the Latex distribution in question one would have to convert all 100 executables into one executable, my guess would be perhaps 100 megabytes. In addition one would have to include lots of resource files, mainly sty-files bringing the whole bundle of an executable + resource files up to 4GB.

AFAIK Apple doesn't restrict you from bundling files in your application. That simply wouldn't make any sense.

The point here is that he is talking about an application consisting of a single runnable binary of size X with tons of bundled .sty-files that brings the whole application up to 4GB.

Previously, this would not be allowed, since .sty-files are interpreted (which in turn would make it impossible to implement LaTeX on the iPhone), but that really wasn't the point here. The point is simply that this wouldn't be a single 4GB executable, but a an executable of perhaps 100MB bundled with a whole bunch of .sty (and other) files to a total size of 4 GB.

Edit: Fixed typos. Sorry. HN doesn't work very well on my phone.