Fire up a REPL using any of the following forms.
clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:git/url "https://github.com/mfikes/clojurescript" :sha "ed1e7373a9ecd8b52084dc438e6c21d23dba47ca"}}}' -m cljs.main -re node
An experimental change for fast Clojure REPL startup:
java -jar clojure-1.8.0-fast.jar
The code used to create this JAR is on GitHub.
What's it doing?
It is:
You need to first install GraalVM, and then set your PATH so that you
get the GraalVM binaries (incluing the GraalVM version of node
).
You can then install R and Ruby via
gu -c install org.graalvm.r
gu -c install org.graalvm.ruby
If you wan't a cljs
that acts like clj
, but for ClojureScript, there are a few minor changes you can make:
First, add the following entry to ~/.clojure/deps.edn
under the :deps
key:
org.clojure/clojurescript {:mvn/version "1.10.439"}
Then make copies of clj
and clojure
named cljs
and clojurescript
, and put those copies on your path.
This page logs work being done under Clojurists Together Q2 2018 Funding Round towards the ClojureScript project. High level progress reports will be published formally with Clojurists Together, but you can follow here if you are interested in low-level details, progress notes, etc.
The concrete themes identified include:
ClojureScript master now has cljs.core/eval
. This delegates to cljs.core/*eval*
which, by default throws, but you can bind it to any implementation that can compile and evaluate ClojureScript forms.
If you require the cljs.js
namespace (which is the main support namespace for self-hosted ClojureScript), then cljs.core/*eval*
is set to an implementation that uses self-hosted ClojureScript for this capability. This means that all self-hosted ClojureScript environments will now have a first-class eval
implementation that just works. For example, Planck master:
$ planck -q
cljs.user=> (eval '(+ 2 3))
5
/* | |
* Copyright (c) 2018 Nordic Semiconductor ASA | |
* | |
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | |
*/ | |
#include <zephyr/types.h> | |
#include <stddef.h> | |
#include <string.h> | |
#include <errno.h> |
;; Need to set js/React first so that Om can load | |
(set! js/React (js/require "react-native/Libraries/react-native/react-native.js")) | |
(ns future-app.core | |
(:require [om.core :as om])) | |
;; Reset js/React back as the form above loads in an different React | |
(set! js/React (js/require "react-native/Libraries/react-native/react-native.js")) | |
(ns api-server.file-io | |
(:use [clojure.tools.logging :only (info warn error)]) | |
(:import (java.nio.channels CompletionHandler AsynchronousFileChannel) | |
(java.nio ByteBuffer) | |
(java.nio.file.attribute FileAttribute) | |
(java.nio.file StandardOpenOption) | |
(java.util.concurrent Executors)) | |
(:require [clojure.core.async :as async :refer [chan go put! close!]] | |
[clojure.java.io :as io])) |
[16:53:32] <kjeldahl> Is the comment about the JavaScript Runtime not running with JIT still true, after iOS 8? | |
[16:59:53] <ide> kjeldahl: yes no JIT unless you run it out of process which is laggy | |
[17:01:02] <ide> not sure if the JIT matters that much though. like I’m curious if an iphone 6 without the JIT beats a 4s with the JIT | |
[17:02:25] <kjeldahl> ide: Ok, thx. |