; discussed here https://groups.google.com/d/msg/clojure-dev/cWzMS_qqgcM/7IAhzMKzVigJ | |
; nested reduced | |
=> (transduce (comp (take 1)) conj [:a]) | |
[:a] | |
=> (transduce (comp (take 1) (take 1)) conj [:a]) | |
#<Reduced@65979031: [:a]> | |
=> (transduce (comp (take 1) (take 1) (take 1)) conj [:a]) | |
#<Reduced@fcbc8d1: #<Reduced@60bea99a: [:a]>> | |
=> (transduce (comp (take 1) (take 1) (take 1) (take 1)) conj [:a]) |
(ns foami.core | |
"FOreign Asynchronous Mechanism Interop" | |
(:require [clojure.core.async :as async])) | |
(def ^:private abandon (doto (async/chan) async/close!)) | |
(def ^:private pending-writes (async/chan)) | |
(defn put! | |
"Tries to put a val into chan, returns either: true if put succeeded, false if chan is |
(ns mutabots | |
"Reimplementation of transducers, in terms of processing functions instead | |
of reducing functions. | |
tl;dr: reducing-fn based transducers are a special case, influenced by reducers, | |
of processing-fn based transducers. | |
In Clojure 1.7.0-alpha2, transducers are expressed in terms of the existing | |
concept of reducing functions. | |
To sum it up, a transducer has currently the signature : |
; passes | |
(let [{:keys [bar foo] | |
:or {foo 1 | |
bar (inc foo)}} {}] | |
(assert (= foo 1)) | |
(assert (= bar 2))) | |
; does not compile | |
(let [{:keys [foo bar] | |
:or {foo 1 |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
Integrating third party JavaScript libraries not written with Google Closure Compiler in mind continues to both be a source of error for users when going to production, and significant vigilance and effort for the the broader community (CLJSJS libraries must provide up-to-date and accurate externs).
In truth writing externs is far simpler than most users imagine. You only need externs for the parts of the library you actually intend to use from ClojureScript. However this isn't so easy to determine from Closure's own documentation. Still in the process of writing your code it's easy to miss a case. In production you will see the much dreaded error that some mangled name does not exist. Fortunately it's possible to enable some compiler flags :pretty-print true :pseudo-names true
to generate an advanced build with human readable names. However debugging missing externs means compiling your production build for each missed case. So much time wasted for such simple mistakes damages our sen
;; Using clojurescript master 1.9.512 uberjar | |
;; Commit 52ff7a2bdcaacf840f7aae72f4be4575297f7db1 | |
(require 'cljs.build.api) | |
(cljs.build.api/build "src" {:optimizations :advanced | |
:pretty-print true | |
:pseudo-names true | |
:output-to "out/main.js"}) |