-
-
Save humorless/2f42b1bc910a2e2181728de9702e2b65 to your computer and use it in GitHub Desktop.
Try `clojure -Sdeps '{:deps {hello-clojure {:git/url "https://gist.github.com/athos/b68b15b08efedffaf14d8c020b125202" :sha "1c9a05106171f97f9b8e8ac8f58c7bd8dbe021f9"}}}' -m hello-clojure` on your terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:paths ["."] | |
:deps {clansi {:mvn/version "1.0.0"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns hello-clojure | |
(:require clansi | |
[clojure.java.io :as io])) | |
(def styles | |
{\b :bg-blue | |
\g :bg-green | |
\w :bg-white}) | |
(defn colorize-line [line] | |
(->> line | |
(map #(clansi/style " " (get styles % :bg-default))) | |
(apply str))) | |
(defn -main [] | |
(with-open [r (io/reader (io/resource "logo.dat"))] | |
(run! #(println (colorize-line %)) (line-seq r)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----------wwwwwwwwww----------- | |
---------wwwwwbbbbwwwww--------- | |
-------wwwbbbbbbbbbbbwwww------- | |
------wwbbbbbbbbbbbbbbbwww------ | |
-----wwbbbbbbbbbbbbbbbbbbww----- | |
----wwbbbbbbbbbbbbbbbbbbbbww---- | |
---wwwwwwwwbbbbbbbbbbbbbbbbww--- | |
--wwwwwwwwwwwwwwwwwbbbbbbbbbww-- | |
--wwwwgggwwwwwbbbbwwwbbbbbbbww-- | |
-wwwwggggwwgwwbbbbbbwwbbbbbbbww- | |
-wwwgggggwwggwwbbbbbbwwbbbbbbww- | |
wwwgggggwwgggwwbbbbbbbwwbbbbbbw- | |
wwgggggwwgggggwwbbbbbbbwbbbbbbww | |
wwgggggwwgggggwwbbbbbbbwwbbbbbww | |
wggggggwgggggggwbbbbbbbwwbbbbbww | |
wggggggwgggggggwbbbbbbbbwbbbbbww | |
wggggggwggggggwwwbbbbbbbwbbbbbww | |
wggggggwgggggwwgwbbbbbbwwbbbbbww | |
wwgggggwwggggwggwwbbbbbwwbbbbbww | |
wwggggggwgggwwggwwbbbbbwbbbbbbw- | |
-wggggggwwggwggggwwbbbwwbbbbbww- | |
-wgggggggwwgwggggwwbbwwbbbbbwww- | |
-wwgggggggwwwgggggwwwwbbbbwwww-- | |
--wwgggggggwwwwggwwwwwwwwwwwww-- | |
--wwgggggggggwwwwwwgggwwwwggw--- | |
---wwggggggggggggggggggggggww--- | |
----wwggggggggggggggggggggww---- | |
-----wwggggggggggggggggggww----- | |
------wwwggggggggggggggwww------ | |
--------wwwggggggggggwww-------- | |
----------wwwwwwwwwwww---------- | |
-------------wwwwww------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment