Skip to content

Instantly share code, notes, and snippets.

@martintrojer
Created August 21, 2012 17:35
Show Gist options
  • Save martintrojer/3417638 to your computer and use it in GitHub Desktop.
Save martintrojer/3417638 to your computer and use it in GitHub Desktop.
A 643 chars minimized self-referential Leiningen project to bootstrap 4k Clojure demos.
(require 'leiningen.core.project)(leiningen.core.project/defproject _"":dependencies[[leiningen-core"2.0.0-preview8"]]:plugins[[lein-swank"1.4.4"]]:main project :source-paths["."])(ns project)(defn -main[](let[f(doto(java.awt.Frame.)(.setUndecorated true))](->(java.awt.GraphicsEnvironment/getLocalGraphicsEnvironment).getDefaultScreenDevice(.setFullScreenWindow f))(.createBufferStrategy f 2)(let[b(.getBufferStrategy f)s(.getBounds f)](while 1(let[g(.getDrawGraphics b)](try(.setColor g(java.awt.Color.(rand-int 0xffffff)))(.fillRect g 0 0(.width s)(.height s))(finally(.dispose g))))(when-not(.contentsLost b)(.show b))(Thread/sleep 20)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment