Last active
May 30, 2018 09:31
-
-
Save mfikes/e600e965da916699a703c9b1f1ff6d3b to your computer and use it in GitHub Desktop.
Try running this in your terminal: clojure -Sdeps '{:deps {github-mfikes/e600e965da916699a703c9b1f1ff6d3b {:git/url "https://gist.github.com/mfikes/e600e965da916699a703c9b1f1ff6d3b" :sha "aa946e43d193fa719544057b0561b03ce2a72977"}}}' -m cljs.main -m hello-clojure
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 {org.clojure/clojurescript | |
{:git/url "https://github.com/clojure/clojurescript" | |
:sha "08beee84b05f911a6bb0eff0dd1235c201b26c70"}}} |
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 | |
[clojure.string :as string] | |
[resources])) | |
(def styles | |
{\b "\u001b[38;44m \u001b[m" | |
\g "\u001b[38;42m \u001b[m" | |
\w "\u001b[38;47m \u001b[m" | |
\- " "}) | |
(defn colorize-line [line] | |
(->> line | |
(map #(string/escape % styles)) | |
(apply str))) | |
(defn -main [] | |
(run! #(println (colorize-line %)) (string/split-lines resources/logo))) |
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 resources) | |
(def logo "-----------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-------------") |
Excuse me! But how can I run this with lein
but not clojure
itself?
@4mitch it has deps.edn instead of project.clj so you dont need lein.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @ormendezmorales , I think you might want to upgrade to clojure 1.9. You also want to copy the deps.edn file up above to the current working directory where you are planning on executing this. Otherwise you can put it in
~/.clojure/deps.edn
You should be able to determine how to copy the clojurescript dependency into your globaldeps.edn
Then you can put the other two files next to each other and try re-running your script.I haven't tested this, but I hope it helps!