Skip to content

Instantly share code, notes, and snippets.

@pfeodrippe
Last active November 16, 2025 21:57
Show Gist options
  • Select an option

  • Save pfeodrippe/7d822e7091ab91b4cfaf694e733c9a12 to your computer and use it in GitHub Desktop.

Select an option

Save pfeodrippe/7d822e7091ab91b4cfaf694e733c9a12 to your computer and use it in GitHub Desktop.
Jank
(ns eita
(:require
[jank.compiler :as jc]
[jank.nrepl-server.server :as server]))
(comment
;; PATH="/Users/pfeodrippe/dev/jank/compiler+runtime/build:$PATH" jank --module-path src run-main eita
(server/start-server {:port 5557})
(ns-publics (symbol (namespace `server/start-server)))
(jc/native-source 3)
(-main)
())
(cpp/raw "
inline int cpp_rawinline_hello() {
return 20;
}
")
#_
(cpp/raw "
inlinde int cpp_rawinline_hello() {
return 10;
}
")
(defn -main []
(println (cpp/cpp_rawinline_hello))
(let [srv (server/start-server {:port 5557})]
(read-line)
(server/stop-server srv)))
(defn sample-fn "demo doc"
([x] x)
([x y] (+ x y)))
(def my-fn
"My function"
(fn* [x] (+ x 10)))
(def ^{:arglists '([x] [y x])
:doc "My function"}
my-fn
(fn* [x] (+ x 10)))
(defproject my-app "v0.0.1"
:plugins [[org.jank-lang/lein-jank "0.0.1-SNAPSHOT"]]
:main eita
:source-paths ["src"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment