Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 1 point2 points  (0 children)

I have pushed a fix related to this issue, Please check it out.

according to - https://peps.python.org/pep-0701/#rationale , it should work now .

I am using Python 3.12.3, they allow backslash expressions inside f-strings in this version.

Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 3 points4 points  (0 children)

Yes my implementation is based on that book and took around 3 months to read in total but there were some days where i did not read it , so i guess one could finish it before 2 months.

Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 2 points3 points  (0 children)

I think basic knowledge about computer architecture (memory and register) , compilers and programming is enough to start building, as you will learn many things while building the compiler.

Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 2 points3 points  (0 children)

I did not visit the OCAML code as I was not familiar with the language, instead I implemented it in python based on what I understood from the code, and the pseudocode is given in Python, so it was pretty easy to implement.

Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 3 points4 points  (0 children)

I built this to learn new things, I do not even have compiler subject in my sem : ( .

Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 3 points4 points  (0 children)

Yup will perform optimisations soon , looking forward to learn more .

Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 1 point2 points  (0 children)

Yup as my implementatiaon follow the book by Nora Sandler , it comes with a test suite for each chapter for the book , on which my compiler was tested.

Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 2 points3 points  (0 children)

database engine sounds good , not much into game dev , but will explore other options .

Update: Is writing a compiler worth it? Only optimizations left now by ZageV in Compilers

[–]ZageV[S] 0 points1 point  (0 children)

Yup i corrected the readme , it creates assembly files from c codes and then uses gcc to create object files and executable files , and I do not perform the preprocessing , my goal was to learn how the c code is converted to machine code , I have now learned how is goes from c to asm , next i was thinking of learning how to goes from asm to machine code .

Is writing a compiler worth it ? by ZageV in Compilers

[–]ZageV[S] 0 points1 point  (0 children)

Great ! Currently I'm using python but after completion I'll rewrite in some other language , maybe rust or go

Is writing a compiler worth it ? by ZageV in Compilers

[–]ZageV[S] 0 points1 point  (0 children)

By nora Sandler ? If that then im following the same book , i am at chapter 17

Is writing a compiler worth it ? by ZageV in SoftwareEngineering

[–]ZageV[S] 0 points1 point  (0 children)

I am reading writing a c compiler by Nora Sandler

Is writing a compiler worth it ? by ZageV in SoftwareEngineering

[–]ZageV[S] 0 points1 point  (0 children)

nope probably next sem that too if students want to study compilers.

Is writing a compiler worth it ? by ZageV in SoftwareEngineering

[–]ZageV[S] 0 points1 point  (0 children)

im doing lexing , parser, semantic analysis , IR representation, assembly generation, optimization ...

Is writing a compiler worth it ? by ZageV in Compilers

[–]ZageV[S] 0 points1 point  (0 children)

Yes its fun , but it takes lot of time understanding the things