Skip to main content
Post Closed as "Needs details or clarity" by Wheat Wizard, caird coinheringaahing, Stephen, mbomb007, Gymhgy

This is based on a talk on compilers I listened to a while back, but I, unfortunately, can't remember when or where.

Create the shortest compiler in any language that can compile itself. Target any reasonable ISA (68K, x86, MIPS, ARM, SPARC, IBM BAL, etc.) that doesn't have a "compile-program" instruction (this may exclude some versions of VAX). Read source programs from stdin and print generated code to stdout. You may use the standard C library for I/O and string processing (e.g., _printf). You do notdon't need to compile the whole language, just the compiler. just any subset that contains the compiler (i.e., just printing an assembly language quine, while impressive, does not count as a solution.)

This is based on a talk on compilers I listened to a while back, but I unfortunately can't remember when or where.

Create the shortest compiler in any language that can compile itself. Target any reasonable ISA (68K, x86, MIPS, ARM, SPARC, IBM BAL, etc.) that doesn't have a "compile-program" instruction (this may exclude some versions of VAX). Read source programs from stdin and print generated code to stdout. You may use the standard C library for I/O and string processing (e.g., _printf). You do not need to compile the whole language, just the compiler. just any subset that contains the compiler (i.e., just printing an assembly language quine, while impressive, does not count as a solution.)

This is based on a talk on compilers I listened to a while back, but I, unfortunately, can't remember when or where.

Create the shortest compiler in any language that can compile itself. Target any reasonable ISA (68K, x86, MIPS, ARM, SPARC, IBM BAL, etc.) that doesn't have a "compile-program" instruction (this may exclude some versions of VAX). Read source programs from stdin and print generated code to stdout. You may use the standard C library for I/O and string processing (e.g., _printf). You don't need to compile the whole language, just any subset that contains the compiler (i.e., just printing an assembly language quine, while impressive, does not count as a solution.)

edited tags
Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
edited tags
Link
C. K. Young
  • 5k
  • 4
  • 32
  • 36
add code-golf tag
Link
luser droog
  • 5k
  • 2
  • 37
  • 61
Loading
edited tags
Link
moinudin
  • 13k
  • 7
  • 35
  • 40
Loading
added 158 characters in body
Source Link
Hoa Long Tam
  • 2.1k
  • 17
  • 18
Loading
Source Link
Hoa Long Tam
  • 2.1k
  • 17
  • 18
Loading