RSSAmplifier

Blog

Romes' Blog RSS Feed

alt-romes.github.ioRSS feed ↗18 posts

Latest posts

Running out of Disk Space in Production

Last night I put up a simple server which allowed customers to download the digital Kanjideck files. This server is hosted on a small Hetzner machine running NixOS, at 4GB of RAM and 40GB of disk space. One of these downloadable files weights 2.2GB. The matter at hand boils down to a simple Haskell program which serves static files (with some extra steps regarding authorization) plus an nginx…

How I turned my Anki side project into a Kickstarter: A Walkthrough

Contents 1 The initial idea (August 2024) 1.1 What if ? 2 Manufacturing physical cards (September 2024) 3 Starting a Company in the U.S. (October 2024) 3.1 Accounting and Taxes 4 Spreadsheets and Pricing (November 2024) 5 Digital Infrastructure (December 2024) 6 Marketing and Ads (January 2025) 7 Burn-out (March 2025) 8 Reaching out for help (October 2025) 9 Launching on Kickstarter (January 2026)…

Haskell Debugger for GHC 9.14

This post was first published inline to the Haskell Discourse , where there was some discussion about the debugger : 1 The Haskell Debugger for GHC 9.14 The Haskell Debugger is ready to use with GHC-9.14! The installation, configuration, and talks can be found in the official website . The tl;dr first step is installing the debugger: $ ghc --version # MUST BE GHC 9.14 The Glorious Glasgow Haskell…

Lazy Linearity for a Core Functional Language (POPL 2026)

I’m very proud to announce that Lazy Linearity for a Core Functional Language , a paper by myself and Bernardo Toninho , will be published at POPL 26 ! [ DOI , ACM ]. The extended version of the paper, which includes all proofs, is available here [ arXiv , PDF , DOI ]. The short-ish story : In 2023, for my Master’s thesis, I reached out to Arnaud Spiwack to discuss how Linear Types had been…

Automatically Packaging a Haskell Library as a Swift Binary XCFramework

Contents 1 Announcing: xcframework 1.1 XCFrameworks 1.2 How to install xcframework 1.3 How to use the XCFramework in XCode 1.4 Building simple Swift package 1.5 Must use Cabal Foreign Library stanza 1.6 Conclusion I’ve written about Haskell x Swift interoperability before. Calling Haskell from Swift is about marshalling and the foreign function interface. But Creating a macOS app with Haskell and…

Implementing Unsure Calculator in 100 lines of Haskell

Contents 1 Unsure Calculator 1.1 Sampling it up 1.2 Calculator Expressions 1.3 Showing up 1.4 Conclusion 1 Unsure Calculator The recently trendy Unsure Calculator makes reasoning about numbers with some uncertainty just as easy as calculating with specific numbers. The key idea is to add a new “range” operator (written ~ ) to the vocabulary of a standard calculator. The range x~y denotes that a…

Planning Weekly Workouts in 100 lines of Haskell

Contents 1 A workout planner in 100 lines of Haskell I have recently started doing some outdoors bodyweight workouts. I also want to start running again, but I’m recovering from a minor knee injury until the start of next month. Tonight I decided to put together a weekly schedule to start following next month. The first pen and paper versions were fine, but I wasn’t completely satisfied. The next…

Calling Haskell from Swift

Contents 1 Introduction 2 Marshaling Inputs and Outputs 2.1 Haskell’s Perspective 2.2 Swift’s Perspective 3 Metaprogramming at the boundaries 3.1 Haskell’s perspective 3.2 Swift’s perspective 4 Remarks This is the second installment of the in-depth series of blog-posts on developing native macOS and iOS applications using both Haskell and Swift/SwiftUI. This post covers how to call (non-trivial)…

Computed Properties for Haskell Records

Contents 1 Records in Haskell 1.1 Overloaded Record Dot 1.2 Named Field Puns 2 Computed Properties 3 Conclusion 1 Records in Haskell Haskell has so-called record types, which are also commonly known as structs, for instance, in C, Swift, and Rust. To define a square, one would write: data Point = Point { x :: Int , y :: Int } data Square = Square { topLeft :: Point , bottomRight :: Point }…

Creating a macOS app with Haskell and Swift

Contents 1 Hello, Swift, it’s Haskell! 1.1 Setting up the SwiftUI app 1.2 Setting up a Haskell foreign library 1.3 Linking the Haskell library with the executable 1.4 The RTS must be initialized 2 Remarks 2.1 Further Reading This is the first part of an in-depth guide into developing a native applications for Apple platforms (macOS, iOS, etc.) using Haskell with Swift and SwiftUI. This is the…

Introducing ghc-toolchain to GHC

Contents 1 Compiler Toolchains 2 The runtime-retargetable future of GHC 3 Introducing ghc-toolchain 4 Migration to ghc-toolchain 5 Future work 6 Conclusion GHC, like most high-level language compilers, depends upon a set of tools like assemblers, linkers, and archivers for the production of machine code. Collectively these tools are known as a toolchain and capture a great deal of…

Writing prettier Haskell with Unicode Syntax and Vim

Contents 1 Haskell’s Unicode Syntax Extension 2 Digraphs in Vim 3 Conclusion 1 Haskell’s Unicode Syntax Extension Haskell (well, GHC Haskell) features an extension called UnicodeSyntax . When enabled, this extension allows the use of certain unicode symbols in place of their corresponding keywords. A great example is the forall keyword being equivalent to the unicode symbol ∀ , the two of which…

Monthly Update on a Haskell Game Engine

Contents 1 Ghengin 1.1 Bullets on Technical Details 1.2 The Small Victories 1.3 A peek into the code 1 Ghengin I’ve been working the past month or two in a game engine titled Ghengin (pronounced /ɡɛn-ʤɪn/, never /ɡɛn-ɡɪn/). This is not yet a release, and version 0.1.0 is far into the future. However, I’ve come a long way and I’d like to share a few pictures of my progress. This post was migrated…

Equality Saturation in Haskell, a tutorial

Contents 1 Symbolic Maths in E-graphs 1.1 Syntax 1.2 Language 1.3 Analysis 2 Equality saturation on symbolic expressions 2.1 Cost function 2.2 Rewrite rules 2.3 Equality saturation, finally hegg is a Haskell-native library providing fast e-graphs and equality saturation, based on egg: Fast and Extensible Equality Saturation and Relational E-matching . Suggested material on equality saturation and…

Graphical Applications in Haskell with FRP and Reflex

Contents 1 Functional Reactive Programming 1.1 Behaviours 1.2 Events 2 Reflex 2.1 Building UIs with Reflex-Dom 2.2 Reflex Combinators 3 Example: 101companies reflex library, and using them to create DOM-based graphical --> reflex-dom library... --> 1 Functional Reactive Programming Functional reactive programming is a general paradigm well suited to programming real-time systems in a high-level…

Graphical Applications in Haskell with MVC and Gloss

Contents 1 MVC 2 Functional MVC: Gloss 2.1 Picture 2.2 Event 2.3 Gloss 1 MVC Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. MVC says that an interactive application should consist roughly of three main parts – Model , View , and Controller . The Model is the data…

Haskell 102 Lecture Notes

Contents 1 Functions Types, Currying, Partial application, Higher-order functions 2 Laziness 3 Recursion: Inductive Method 4 Recursive data structures 5 Type Classes 6 Type Classes Kinds, Constraints 1 Functions Types, Currying, Partial application, Higher-order functions All functions have a type, the function type : length :: [a] -> Int length [] = 0 length (x : xs) = 1 + length xs The same way…

Haskell 101 Lecture Notes

Contents 1 Functions, Computations: Abstraction and application 2 Expressions, Values, Types 3 ADTs, Construction, Deconstruction 4 Polymorphism 5 Non-nullary type constructors, Kinds 1 Functions, Computations: Abstraction and application What is a function? f ( x ) = 4 x + 2 ? And what’s function application? f(x) = 4 x + 2 f( 5 ) = ? In mathematics, function application is the act of applying a…