Programming
  • Infelicities With Traditional Compiler Architecture on X86

    by Vanessa McHale | Programming

    Compilers are written as a pipeline: in particular, instruction selection and register allocation are different phases. GHC, for instance, uses maximal munch for instruction selection and a variety of register allocators. However, on x86-64 (for instance), register allocation constrains the particular instruction encodings, which affects the cost of some instructions.

  • APL Is Truly Different

    by Vanessa McHale | Programming

    APL is truly different from other languages; nearly every language uses lexical scoping to express composition. Both GHC Haskell and GCC/Clang use a stack for variables across procedures because it models how variables become available (FIFO). Putatively different languages are constrained by the same fundamentals.

  • Don't Bother With LLVM for Hobby Compilers

    by Vanessa McHale | Programming

    LLVM is widely used for compilers (rustc, Swift, Kitten), particularly in tutorials (kaleidoscope), but it need not be a default.

  • Finding Haskell Libraries Used in an Executable

    by Vanessa McHale | Programming

    We can find all (Haskell) libraries linked against the final executable with:

  • Dimension Is a Functor

    by Vanessa McHale | Programming

    Dimension is a functor. This is true for points in space as well as arrays (more concretely).