Well, that was easy enough. I modified the load function inside
RT.java to load classes/namespaces out of .dex files. (use
'my.compiled.namespace) will now look for either the compiled .class
(and load it), or it will look for a .clj (and compile & load it -
thanks to George Jahad's work), or it will look for a .dex file
("my.compiled.namespace.dex") inside the .apk and try to load the
class from there.
Charming!
I've already split clojure-master into several parts (.dex files for
core,main,zip,set,walk,xml,java,inspector,pprint,repl), so now the
next step would be to figure out how to get it all together and
integrate it with leiningen: Build clojure-master .dex files (<- done)
with a custom main (<- todo) which calls the users main android
activity (<- todo), package everything into an apk (<- done) and
install it on the emulator (<- done).

On May 29, 4:07 pm, MHOOO <thomas.karol...@googlemail.com> wrote:
> I'd like to try to compile the clojure code (i.e. its different parts
> like .core, .main, .set, etc) into different .dex files so as to speed
> up both compilation (since you'll only have to recompile those .dex
> files which have changed) and start-up (since only those .dex files
> are loaded which are needed during program runtime). However I'm not
> quite sure where to hook into as I have only little understanding of
> how clojure loads files. Is there a function somewhere in the java/
> clojure side of the code which is responsible for finding a namespace
> (possibly compiling it first) and loading it?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to