Just do the following one by one, and you should be fine.
You will need Java to work with this Clojure workshop content.
// Copy static resources from your node modules - CSS files, font files etc. | |
let publicDir = "resources/public"; | |
const copyStatics = async () => { | |
var katex = { | |
"css/fonts": {"pattern": "katex/dist/fonts/**/*"}, | |
"css": {"pattern": "katex/dist/**/*.min.css"} | |
} | |
var normalize = { |
(ns etaoin-play.core | |
(:require [etaoin.api :refer :all] | |
[etaoin.keys :as k])) | |
(defonce drivers (atom {})) | |
(defmacro a [action _ & body] | |
`(for [[_# driver#] @drivers] | |
(future (~action driver# ~@body)))) | |
;; You can try evaluating individual expressions in steps instead of calling the function `steps` by itself. |
;; So that we don't repeat figwheel config options in two places. | |
(use 'figwheel-sidecar.repl-api) | |
;; See - http://stackoverflow.com/questions/16270805/how-to-get-the-version-of-the-current-clojure-project-in-the-repl | |
;; This script should be invoked from the base project directory. | |
(def project (->> "project.clj" | |
slurp | |
read-string | |
(drop 2) | |
(cons :version) |
(ns s-and-l.main) | |
#?(:cljs (set! *print-fn* #(.log js/console %))) | |
#?(:cljs (def log print)) | |
#?(:clj (def log println)) | |
(def max-board-value 100) | |
(defn roll-dice [] | |
(-> #?(:cljs (.random js/Math) :clj (java.lang.Math/random)) | |
(* 100) |
;;; Some NS which has the gen-class directive | |
(defn -main-that-wont-work [] | |
(let [coll (some-collection-returning-function)] | |
(for [c coll] | |
(transform c) | |
) | |
) | |
) |
// do "sbt run" to see exceptions while running main (although main is discovered fine.) | |
trait Foo[+A] | |
// Change trait to class, and it works. | |
object Foo { | |
def main(args: Array[String]) : Unit = println("Hello, Foo!") | |
} |
require 'java' | |
require 'mvn:org.scala-lang:scala-library' | |
require 'case' | |
module Akka | |
include_package 'akka.actor' | |
include_package 'akka.util.duration' | |
java_import 'akka.routing.RoundRobinRouter' | |
java_import 'akka.util.Duration' | |
end |