Did you know nim can eval itself at runtime like a frickin scripting language?
Clone this gist and do...
nimble install compiler
nim c -r nimeval.nim
...and you should see:
██╗██████╗ ███████╗ █████╗ ███████╗ ███████╗ ██████╗ ██████╗ █████╗ | |
██║██╔══██╗██╔════╝██╔══██╗██╔════╝ ██╔════╝██╔═══██╗██╔══██╗ ██╔══██╗ | |
██║██║ ██║█████╗ ███████║███████╗ █████╗ ██║ ██║██████╔╝ ███████║ | |
██║██║ ██║██╔══╝ ██╔══██║╚════██║ ██╔══╝ ██║ ██║██╔══██╗ ██╔══██║ | |
██║██████╔╝███████╗██║ ██║███████║ ██║ ╚██████╔╝██║ ██║ ██║ ██║ | |
╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ | |
_______________________________________ | |
|,---"-----------------------------"---,| | |
||___ ............................ || |
Did you know nim can eval itself at runtime like a frickin scripting language?
Clone this gist and do...
nimble install compiler
nim c -r nimeval.nim
...and you should see:
# to build this with emscripten, you need emsdk on your PATH. | |
# first, clone https://github.com/emscripten-core/emsdk | |
# then in that repo run: | |
# ./emsdk install latest | |
# ./emsdk activate latest | |
# and then add the directories it prints out to your PATH | |
# | |
# then in this repo run: | |
# nim c -d:emscripten bug.nim | |
# |
{:deps {net.sekao/odoyle-rules {:mvn/version "RELEASE"}}} |
(defproject lein-paravim "0.1.0-SNAPSHOT" | |
:dependencies [[org.clojure/clojure "1.10.1"]] | |
; since paravim is in the `:dev` profile, | |
; it will launch when you do `lein run`. | |
; if you don't want that behavior, | |
; just change `:dev` to something else. | |
; if you change it to `:paravim`, you can | |
; launch it by doing `lein with-profile paravim run` | |
:profiles {:dev {:dependencies [[paravim "RELEASE"]] | |
:main paravim.start |
guitar: o3 b8 > c8 d4 < b > c < a b g a %1 | |
banjo: @1 o3 b8 > c8 d4 < b > c < a b g a %2 | |
guitar: @2 o3 b8 > c8 d4 < b > c < a b g a %3 | |
guitar: @3 d1 g4 g a b g b a1 %4 | |
banjo: @4 g4 g a b g1 %5 |
I made a documentation generator that cashes in on Clojure's dynamism. See the play-cljs docs (a ClojureScript game library) for an example of its output.
Like many of you, I've often wondered what my final regret will be on my deathbed. My best guess came to me in a dream recently. I was walking across the charred earth of an apocalyptic future world, maneuvering around the remains of the less fortunate. I was startled to find a young girl, barely holding onto her life. She murmured something to me. I asked her to repeat it, and she said more loudly: "I...wish your Clojure projects didn't have such crappy documentation."
ssh-keygen
, then hit enter until it is doneGo -> Go to Folder...
then type ~/.ssh
id_rsa.pub
with TextEditssh root@YOUR_IP_ADDRESS
apt-get update
(defscreen main-screen | |
:on-show | |
(fn [screen entities] | |
(update! screen | |
:renderer (model-batch) | |
:attributes (let [attr-type (attribute-type :color :ambient-light) | |
attr (attribute :color attr-type 0.8 0.8 0.8 1)] | |
(environment :set attr)) | |
:camera (doto (perspective 75 (game :width) (game :height)) | |
(position! 0 0 3) |