Progress report in Pen programming language

April 9th, 2022

@raviqqe

Agenda

  • Progress report
    • Code formatter
    • Documentation generator
  • Next plans

Progress report

Code formatter

  • Pull request: #874
  • Similar to go fmt
    • No configuration
    • No maximum editor width

Code formatter (continued)

  • The previous work
  • AST -> Doc -> String
  • Doc: IR for formatted codes
    • It represents all the possible formatted codes in one format.

Code formatter (continued)

  • Rewritten once...
    • v1: AST -> String
    • v2: AST -> Doc -> String
    • 5 times faster!

Documentation generator

  • Pull request: #878
  • It's all about formatting codes as well.
    • But in a flipped way
    • Codes in comments v.s. comments in codes
  • Reuses the same formatting logic.

Next plans

  • New packages and examples with map types
    • Knapsack problem
    • Conway's game of life
    • Json package
    • Flag package

Summary

  • Progress
    • Code formatter
    • Documentation generator
  • Future plans
    • New packages and examples with map types