Slap is a Lean Applicative Painter

Slap is a Lean Applicative Painter:


The tool is best when it doesn’t interrupt you but rather helps you get in the flow.

  • Slap is GPU accelerated
  • It integrates natively with macOS (other platforms later hopefully)
  • Yet it is designed not to be locked-in
  • It has a thin layer of Objective-C/AppKit I deliberately kept as Objective-C.
  • It is all driven by the Zig Build System.
  • It has 0 dependency.
  • It has DOD, upfront allocation, pop corn… you name it

video tour
source code

What did I learn? Let’s say when I started I was trying to figure out how to open an empty window…

The part you may be mostly interested in, technically, has been treating the painting history as a log rather than just maintaining a snapshot stack to undo brush strokes. It opens original possibilities.

A .slap file is essentially a log of painting actions, which makes the entire document replay-able. This gives me guaranteed undo all the way back to the beginning.

Supported Zig versions

I exclusively used Zig 0.16.0

AI / LLM usage disclosure

I use free chat as a contemporary google search for certain things.

5 Likes

Man this is beautiful! So much attention to detail. The color picker especially is fantastic. Will definitely try it out!

1 Like

Thank you so much! I’m glad it resonates with you!
I hope you will enjoy it!

L R desc
H G enter HSL color wheel mode
J F eyedropper. Samples at KeyUp, you don’t need to click
K D toggle brush settings mode
L S toggle eraser

Am I misreading that? Shouldn’t the Left and Right Handed keybinds be swapped?

I tried to disambiguate it with the note on the top with the hands emojis :sweat_smile:

Left handed → stylus in the left hand keyboard in the right hand
vice versa for right

1 Like