3 ms·
So, if it compiles to C in the end, how is Apple going to be able to tell how it was compiled?
by bdotdub 17y ago
So, if it compiles to C in the end, how is Apple going to be able to tell how it was compiled?
- jlongster 17y agoCompilers usually leave some kind of footprint, usually in the form of some kind of runtime. Running `nm <myapp>` makes it pretty clear there is a Lisp system there. Still, I doubt hey would enforce it. But you can't build a business around it anymore, it's just too risky.
- lispm 17y agoI guess there are some Lisp to C compilers that don't need much of a runtime. Candidates for that are Stalin, the 'Lisp to C' compiler, ThinLisp, CLICC and some others. The 'Lisp to C' compiler was developed to create readable and maintainable C code.
- jlongster 17y agoYou are right. There's really no way they can reliably detect where the code came from. In fact, it should be pretty difficult to generally, but unfortunately, this clause will scare off business built around this. There's also PreScheme, which is one of my favorites. It's subset of Scheme which simply generates a few C functions that use a bunch of stack variables and gotos without any runtime.
- wtn 17y agoWhy do you think it's unfortunate? Won't that mean less competition for anyone who can reliably pass Apple's scheme-to-C "Turing test"?
- hga 17y agoOne glance at the C code tells you that it wasn't (directly) written by a human. The opportunity cost risk is rather high, you're betting that Apple will never figure out that you're violating the terms of the new agreement.
- Psyonic 17y agoYou don't send them your code. That said, patterns can often be found in the binary as well. So your point stands.
- hga 17y agoI suppose it's telling that it never occurred to me that they don't demand your code, or at least have that option.... ADDED: Evil Thought: if they want to audit your code in the future, requiring it to be in a strictly limited number of languages will allow that. Not saying they will, not saying they've even thought about it ... just that "Power tends to corrupt, and absolute power corrupts absolutely" (http://en.wikipedia.org/wiki/Power_corrupts#.22Lord_Acton.27s_dictum.22 http://en.wikipedia.org/wiki/Power_corrupts#.22Lord_Acton.27...) and that someday this limitation will add to Apple's temptations.
- bad_user 17y agoCompilers leave a heavy footprint. Consider how compilation works ... you have a parser that takes your source-code and builds a syntax tree from it. Then the syntax tree is checked for correctness, optimized, transformed, with type rules inferred and symbol tables created and all that. Then a backend takes the result and generates source-code (or byte-code or assembly). The thing to remember is that compilers use certain patterns and certain optimizations to generate the resulting source code. Because of the transformations a compiler does on the syntax tree and the way the result is generated, such patterns can emerge even from the binary. It's difficult to have 100% accuracy though, but I don't think they would sweat over that.