IUCompilerCourse / Essentials-of-Compilation

A book about compiling Racket and Python to x86-64 assembly
1.31k stars 141 forks source link

How to build the Racket version #88

Closed stefanos82 closed 2 years ago

stefanos82 commented 2 years ago

make command defaults to Python on my system which currently misses chapters 9 to 12.

How do I tell it to build the Racket version which is complete?

jsiek commented 2 years ago

On line 28 of book.tex, change the edition to 0 as follows to get Racket. (1 for Python.)

\def\edition{0}
jsiek commented 2 years ago

Chapters 9-12 of the Python version haven't been written yet. But I'm writing as fast as I can.

stefanos82 commented 2 years ago

On line 28 of book.tex, change the edition to 0 as follows to get Racket. (1 for Python.)

\def\edition{0}

Thank you for letting me know.

Is there a way to pass this argument in make command to get something like make book="python" or even better make racketbook?

stefanos82 commented 2 years ago

Chapters 9-12 of the Python version haven't been written yet. But I'm writing as fast as I can.

I appreciate your hard work.

I like learning things around compilers and interpreters; the more I learn the better, fascinating topic.

stefanos82 commented 2 years ago

On line 28 of book.tex, change the edition to 0 as follows to get Racket. (1 for Python.)

\def\edition{0}

By the way, I have been trying for hours to find a solution without any success; the above suggestion does not work as it complains about incomplete \if:

Overfull \hbox (16.64928pt too wide) in paragraph at lines 14726--14727
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][] 

LaTeX Warning: Reference `fig:type-check-Llambda' on page 141 undefined on inpu
t line 14773.

)
! Incomplete \if; all text was ignored after line 14889.
<inserted text> 
                \fi 
<*> book.tex

? 
jsiek commented 2 years ago

I've pushed the fix. As you've just found out, the book is under active development and not guaranteed to build at any given point in time. The stable draft of the Racket version is available here: https://www.dropbox.com/s/ktdw8j0adcc44r0/book.pdf?dl=1

stefanos82 commented 2 years ago

I've pushed the fix. As you've just found out, the book is under active development and not guaranteed to build at any given point in time.

Thank you for letting me know.

The stable draft of the Racket version is available here: https://www.dropbox.com/s/ktdw8j0adcc44r0/book.pdf?dl=1

I know, that's why I ended up following the repo instead; I had to figure out how those "corner things" had to go!

I can't stand those crop marks :D hahaha!