$ cat src/foo/core.cljs
(ns foo.core)
(prn (time (reduce + (map inc (map inc (range (* 1024 1024)))))))
$ clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.516"}}}' -m cljs.main -O advanced -c foo.core
$ node out/main.js
$ cat src/foo/core.cljs
(ns foo.core)
(prn (time (reduce + (map inc (map inc (range (* 1024 1024)))))))
$ clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.516"}}}' -m cljs.main -O advanced -c foo.core
$ node out/main.js
{:deps {org.clojure/tools.cli {:mvn/version "0.3.7"} | |
org.clojure/data.csv {:mvn/version "0.1.4"} | |
semantic-csv {:mvn/version "0.2.1-alpha1"}}} |
(defn stopwatch | |
"When started, invokes action every ms, until stopped. Reset will | |
start the stopwatch if it wasn't yet or will reset the timer." | |
[ms action] | |
(let [state (volatile! :paused) | |
started? #(= :started @state) | |
cmd-ch (a/chan) | |
start (fn [] | |
(a/go-loop [] | |
(vreset! state :started) |
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:
In this talk, I want to share my experience gained during the development of frontend applications in several programming languages.
I think it's not a secret for anybody that developing large JavaScript applications is not so easy as it seems at first glance. We all want something simpler and more reliable. Therefore, many developers and even entire companies switch to different, compiled in JavaScript, programming languages. The bulk of such transitions is accounted for TypeScript and flow, and often, developers faced with more problems than they were before.
I wasn't the exception. Moving to a new project, I started using TypeScript and was disappointed. Luckily in my next project I used ClojureScript and it was like everything is illuminated!
/* This code snippet is a part of the blog at | |
https://github.com/animeshtrivedi/blog/blob/master/post/2017-12-26-arrow.md | |
*/ | |
import com.google.common.collect.ImmutableList; | |
import org.apache.arrow.memory.RootAllocator; | |
import org.apache.arrow.vector.*; | |
import org.apache.arrow.vector.dictionary.DictionaryProvider; | |
import org.apache.arrow.vector.types.FloatingPointPrecision; | |
import org.apache.arrow.vector.types.pojo.ArrowType; |
(ns text-xform | |
(:require [clojure.java.io :as io] | |
[clojure.string :as str] | |
[cheshire.core :as json]) | |
(:import [java.io BufferedReader])) | |
;;;; inspired by https://tech.grammarly.com/blog/building-etl-pipelines-with-clojure | |
(def db (atom 0)) |
#!/bin/bash | |
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home lein run |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
(ns net.thegeez.advent.spec-parsing | |
(:require [clojure.string :as str] | |
[clojure.spec :as s] | |
[clojure.spec.gen :as gen] | |
[clojure.test.check.generators :as tgen])) | |
;; Dependencies: | |
;; [org.clojure/clojure "1.9.0-alpha14"] | |
;; [org.clojure/test.check "0.9.0"] | |
;; Advent of Code is a series of code challenges in the form of an advent |