Re: [racket-dev] emscripten? (was: Re: Using clang to Build Racket on Mac OS X)
Two hours ago, John Clements wrote: > > On May 9, 2012, at 2:47 PM, Michael W wrote: > > Of course this is much more work than just getting racket to build > > with Clang, but I wonder what the implications of a successful > > port could be. > > I believe this would be hard, and I know that others have asked > about this part before (I think Eli's response compared it to > "Racket swallowing gcc" when compared to using Gnu lightning). Not just asked -- we had an experiment with an LLVM-based assembly language. In the end, the main problem it had was indeed that to use this for JIT, LLVM would need to be completely included -- and that's a huge overhead. (The LLVM library was a little bigger than the mzscheme excutable at the time, IIRC.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] emscripten? (was: Re: Using clang to Build Racket on Mac OS X)
On May 9, 2012, at 2:47 PM, Michael W wrote: > That's an interesting thought. > > Racket currently uses GNU Lightning as its JIT, correct? What if > it used LLVM instead? > http://en.wikipedia.org/wiki/LLVM#Description > > Of course this is much more work than just getting racket to > build with Clang, but I wonder what the implications of a > successful port could be. I believe this would be hard, and I know that others have asked about this part before (I think Eli's response compared it to "Racket swallowing gcc" when compared to using Gnu lightning). However, running racket under Emscripten might potentially be possible without the JIT entirely. Anyhow, it looks like Tony Garnock-Jones' response contains the current "state of the art". John smime.p7s Description: S/MIME cryptographic signature _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] emscripten? (was: Re: Using clang to Build Racket on Mac OS X)
That's an interesting thought. Racket currently uses GNU Lightning as its JIT, correct? What if it used LLVM instead? http://en.wikipedia.org/wiki/LLVM#Description Of course this is much more work than just getting racket to build with Clang, but I wonder what the implications of a successful port could be. 33 minutes ago, John Clements wrote: > > On Sep 10, 2011, at 6:33 PM, Will M. Farr wrote: > > > Thanks, Matthew! It seems to build OK now. > > > > I missed the implication of this, the first time around. > > If I'm reading this correctly, it means that clang can compile racket, which > is awfully close to being able to run Racket using an LLVM model such as > emscripten, and making it run in the browser. > > In particular, I would expect the JIT to be totally broken, and that there > would be a lot of painful parts related to linking to standard libraries, but > the resulting program could actually do client-side compilation in a web > browser, right? > > John -- Take it easy, _mike _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] emscripten?
On 05/09/2012 05:09 PM, John Clements wrote: In particular, I would expect the JIT to be totally broken, and that there would be a lot of painful parts related to linking to standard libraries, but the resulting program could actually do client-side compilation in a web browser, right? Yep. My initial experiments in this direction suggested that getting it to compile and run with emscripten was Difficult. I didn't put very much effort into it though. I don't remember exactly where I got stuck, but the attached is a build script I was using to try to iterate closer and closer to an appropriately-configured and -compiled Racket. Regards, Tony #!/bin/sh # First, mkdir .../racket/src/build, then from there, run this script. EMSCRIPTEN_PATH=~/src/emscripten-racket/emscripten/tools EMMAKEN_JUST_CONFIGURE=1 \ RANLIB=$EMSCRIPTEN_PATH/emmaken.py \ AR=$EMSCRIPTEN_PATH/emmaken.py \ CXX=$EMSCRIPTEN_PATH/emmakenxx.py \ CC=$EMSCRIPTEN_PATH/emmaken.py \ ../configure \ --host=i686-pc-linux-gnu \ --target=i686-pc-linux-gnu \ --enable-racket="`which racket`" \ --disable-gracket \ --disable-plot \ --disable-jit \ --disable-foreign \ --disable-pthread \ --disable-futures \ --disable-places sed -i bak -e 's:/\* #undef MZ_CAS_AVAILABLE \*/:#define MZ_CAS_AVAILABLE 1:' racket/mzconfig.h echo '#define NO_TCP_SUPPORT 1' >> racket/mzconfig.h echo '#define SCHEME_PLATFORM_LIBRARY_SUBPATH "js-emscripten-0.0"' > racket/src/schsys.h touch racket/starter _ Racket Developers list: http://lists.racket-lang.org/dev
[racket-dev] emscripten? (was: Re: Using clang to Build Racket on Mac OS X)
On Sep 10, 2011, at 6:33 PM, Will M. Farr wrote: > Thanks, Matthew! It seems to build OK now. > I missed the implication of this, the first time around. If I'm reading this correctly, it means that clang can compile racket, which is awfully close to being able to run Racket using an LLVM model such as emscripten, and making it run in the browser. In particular, I would expect the JIT to be totally broken, and that there would be a lot of painful parts related to linking to standard libraries, but the resulting program could actually do client-side compilation in a web browser, right? John smime.p7s Description: S/MIME cryptographic signature _ Racket Developers list: http://lists.racket-lang.org/dev