Rewriting Dataframes for MicroHaskell
3 days ago
- #Haskell
- #MicroHs
- #DataFrames
- The author shares their journey of learning Haskell by creating practical projects, starting with a countdown timer for debate speeches.
- They explored Frege, a Haskell dialect for the JVM, and developed 'froid', a library for Frege in Android, but faced challenges due to GHC-specific libraries.
- The author expresses a desire for a broader Haskell ecosystem beyond GHC, highlighting MicroHs as a promising alternative with smaller binaries.
- The blog post details rewriting a dataframe library to be compatible with MicroHs, focusing on a simple, extension-free Haskell implementation.
- Key components include defining core data types (DataFrame, Column), implementing constructors, and handling expressions without GADTs or type families.
- The author demonstrates how to create a dataframe, perform operations like filtering and deriving columns, and render results in Markdown.
- Performance comparisons between MicroHs and GHC show that MicroHs binaries are significantly smaller but slower, offering a trade-off for specific use cases.
- The experiment concludes that a base-first design is feasible, portable, and practical, though more verbose, enabling use across different Haskell implementations.