<laertus>i'm wondering why the bootstrap step uses an interpreter rather than a compiler <laertus>if the goal is to build a compiler, why not just start by building a compiler? <laertus>the interpreter is in C anyway, so why not start with a compiler in C? <dsmith-work>Because the compier is written in Scheme, and there is no system Scheme compiler. <laertus>but couldn't there be a bootstrap compiler written in C? <laertus>i mean just a minimal one, not a full-blown one <laertus>then why not object to having to do twice the work on the interpreter <laertus>the article says "In our case we do a half-bootstrap, first building an interpreter in C, compiling the interpreter in Scheme, then bootstrapping off that." <laertus>it sounds like double the work is done on the interpeter <dsmith-work>At one time, Guile was all C. Slowly moving to more and more Scheme. <laertus>i understand the desire to use less C and using more Scheme <laertus>but i just don't understand what using the interpreter first buys vs just going to a minimal compiler right away.. a bootstrap compiler <laertus>i'm not suggesting having the final scheme compiler in C.. but just the bootstrap one <dsmith-work>Well, you'd need to ask wingo about it. I'm pretty sure he doesn't want to put any effort into C code. <dsmith-work>I know it's hard. All that time building the initial compiler. The mind tries to think of things to make it better. <laertus>i'm just trying to decrease global warming... :) <laertus>hmmm... interesting comment in that article: "Bootstrapping Gambit from source takes about 3.5 minutes on a modern machine." <laertus>"A gambit-hosted guile compiler should be able to compile the guile sources in a blink of an eye." <davexunit>I bet they do not understand the situation fully enough to make that statement <davexunit>you can compile guile releases without bootstrapping the compiler <davexunit>the release tarballs have the pre-built modules <davexunit>you only do the full bootstrapping process when you are building from a git checkout <davexunit>guile is the only scheme I know about that can be compiled without using a pre-built version of itself. <davexunit>maybe gambit can, too, I dunno. but guile's long bootstrap process has good reason behind it. <davexunit>using gambit to compile guile would be really sad. it would mean that guile isn't good enough for itself. <laertus>davexunit: another approach could be to learn whatever gambit's doing in this case and apply it to guile <laertus>if in fact there is anything relevant to learn from it that guile's not already doing <davexunit>people told me that chicken does the same thing but much faster, but when I looked into it I discovered that it was completely different. <davexunit>if there are things to steal from gambit then we should steal them :) <laertus>i keep hearing about how incredibly fast it is.. faster than C even <davexunit>with a more advanced linker guile ought to be able to do some "whole program" optimization like that <laertus>stalin's probably not considered very practical because it only supports a subset of R4RS <laertus>but for a first-phase bootstrap compiler you might not need very much <davexunit>I don't think it makes sense to use another scheme compiler to bootstrap guile <davexunit>because it doesn't solve the bootstrapping problem <davexunit>it just pushes the problem to the other compiler you used to bootstrap it <davexunit>guile is its own language, it's not "just" a standard scheme, so it's highly unlikely that it would work anyway. <laertus>again, you don't necessarily have to use stalin itself, just maybe ideas from it to do something similar, if it's possible and if it offers a performance increase <davexunit>stalin is very slow in terms of compilation time <davexunit>at the expense of spending huge amounts of time optimizing <laertus>is it slower than the guile bootstrap interpreter, though? <laertus>also, if might be possible to cut down the optimizations that stalin does and still get a performance boost, i dunno <davexunit>if you could just use a compiler to start out with, the problem wouldn't exist <laertus>why couldn't you? that's what i don't understand <davexunit>because you would need an already built version of guile <laertus>but why don't you need an already built version of guile for the bootstrap interpreter? <laertus>why is it possible to bootstrap with an interpreter but not a compiler? <laertus>why couldn't a bootstrap compiler break the cycle? <davexunit>it would require writing a separate compiler in C <davexunit>completely different than guile's regular compiler <laertus>just like it requires writing a separate interpreter in C <davexunit>the interpreter is very simple by comparison <laertus>so guile's really choosing simplicity over performance <laertus>as far as the bootstrap process is concerned, anywy <davexunit>I don't think anyone is volunteering to write a completely separate compiler in C <davexunit>users compiling guile don't even have to deal with this because the release tarballs have a prebuilt bootstrap compiler <laertus>i'm building from git source, though <laertus>so i definitely have to wait.. and wait.. and wait.. <davexunit>once you do it once you'll rarely have to do it again <davexunit>unless you are hacking on the compiler itself <davexunit>then you might have to rebootstrap some subset of the compiler <laertus>by the way... i keep seeing the guile log show stuff like: BOOTSTRAP GUILEC ice-9/eval.go <laertus>or: BOOTSTRAP GUILEC ice-9/psyntax-pp.go <nee`>laertus: .go stands for guile object ***benq is now known as benqq
<akkad>ACTION needs help porting a simple scheme script <amz3`>akkad: what is a the question? <akkad>oh I see. no zlib support in guile-lib <davexunit>I wrote that quite a few years ago. hope it still works! patches welcome, if not!