Closed shauncarpenter closed 12 years ago
Thanks Shaun!
All my testing so far has been on 32-bit linux with gcc 4.4, and when I look at my preprocessor output:
$ g++ -E boot.cc
It looks like unistd.h gets included deep inside some header on my system. Why is your solution unportable? (I'm not very knowledgeable about POSIX and so on..)
I thought it would be because it wouldn't work on a nonPOSIX system, but it seems that isn't your goal anyway! I guess it wouldn't matter, because if you were wanting to use gcc, you would be running cygwin/mingw, which wraps the windows equivalents to close, fork, and write.
Also, you're very welcome!
Ah, I didn't even think of non-POSIX systems :) I don't have access to any such, so philosophically my approach is to keep the code short, simple and hackable so others can fix them for themselves (and send me patches!).
(Goes without saying, but I'd love to hear what you think of this project.)
I think it is rather awesome, actually! I have recently discovered arc (after using scheme for a little while), and wanted to learn more about it by writing my own interpreter in C. I had just finished the basic parser when I found your project, and discovered that pretty much everything up to that point was identical to yours, so I decided I should just use this. (although, it's rather hard to write that first part differently).
You really seem to have achieved your goal of making it simple, I started reading the code yesterday and already understand a surprising amount.
I really like the way you encourage simply putting wart in with your code, and the way one can just give the right numbers to their code so it is run in the right order; I haven't really investigated it yet, but it seems this would make it much easier to interface homemade wart programs with C code.
also, optional significant whitespace; nice :)
(BTW, I sent a response last night to your gmail from commits on Pygmy. Let me know if that's not the best address for you. Mine: ak@akkartik.com)
So, I ran Wart from a fresh download, and got this:
https://gist.github.com/8a765721403bd26f259a
After a bit of searching, I ended up adding
to the end of the includes in boot.cc. This seems to have fixed the errors; I didn't make a patch because it seems rather unportable...
I'm running Arch Linux, 64-bit, gcc 4.7.1-5.