~/talk

Formatting F# Code, There and Back Again

Talkat NDC Oslo 2021 · 2021-11-29..12-03· [dotnet, developer-experience]
slides:none on file

A practical report on an F# code formatter that actually runs: Fantomas parses source via FSharp.Compiler.Service, builds an AST plus token trivia to preserve comments and strings, and rewrites code as a source-to-source tool and CLI. It integrates as a daemon for editors, raised unit tests from ~300 to ~2,000, formats most real projects but once corrupted an FSharp.Data file and required a .fantomasignore, offers an online Azure-backed formatter that files GitHub issues, and is sponsored by G‑Research while aiming to format the F# compiler (11k lines took 10 minutes).

AI-written summary · about

  1. 0:00Introduction to formatting
  2. 1:19Philosophy of code styling
  3. 2:39What is code formatting?
  4. 5:05F# formatting challenges
  5. 7:11Phantomous project history
  6. 9:00Mentorship and maintenance
  7. 12:58Phantomous in action
  8. 17:05Handling formatting errors
  9. 20:22Reporting bugs
  10. 23:37Technical implementation
  11. 28:49Formatting settings
  12. 32:00Community contributions
  13. 34:51The F# style guide
  14. 38:22Sponsorship and industry
  15. 40:42Future releases and daemon
  16. 43:25Editor integration demo
  17. 46:50CI/CD integration
  18. 48:53The endgame: compiler core
  19. 52:53Performance improvements
  20. 55:22Phantomous 5 roadmap
  21. 57:45Code generation demo
  22. 59:12Q&A and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.