~/talk

Parsing Inline Strings Across Platforms: Building a Small Cross Platform Library

Talkat DevFest Montreal 2024 · on Saturday, 2024-11-09· [compilers-and-language-design, kotlin]
name:Vincent
links:none on file
slides:none on file

Builds a small DSL for inline string styling that compiles markup into a platform-agnostic AST and then flattens it into an ordered list of styled elements for native renderers. Uses Kotlin Multiplatform for a single shared library, implements a lexer, parser and AST, keeps positioned parse errors for clear diagnostics, and recommends merging lexer+parser combined to save allocations. Covers API choice to hide the AST, caching parsed results, and tradeoffs that affect memory, performance and versioning.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 2:56Why we need a library
  3. 8:17Design guidelines for the library
  4. 13:38Creating a domain-specific language
  5. 18:37Implementing the lexer
  6. 22:29Building the parser
  7. 24:59Minimizing the API surface
  8. 26:47Performance optimizations
  9. 29:59Closing and resources
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.