I have no experience with Elm, but I have made a card game with
ClojureScript:
http://thegeez.net/2012/03/20/racket_gin_clojurescript.html
As well as a version with a Datomic back-end:
http://thegeez.net/2014/06/12/gin_datomic.html
--
You received this message because you are subscribed to the
No init value given with transduce uses the zero arity value of f rather
than the zero arity of the reducing function through xform:
With Clojure 1.7.0-alpha2:
user=> (doc transduce)
-
clojure.core/transduce
([xform f coll] [xform f init coll])
reduce with a transformati
Hi,
At a recent Amsterdam Clojure Meetup, we were looking into transducers.
We could not find any situation where the "zero arity" println would get
called when using this futile transducer:
(defn println-transducing-fn
[reducing-fn]
(fn new-reducing-fn
([]
(println "zero arity")
3 AM UTC+2, Dry Jin wrote:
>
> Great, but I couldn't play this game.
>
> Do I need something else to play this?
>
> I am using IE8.
>
> 2014년 6월 13일 금요일 오후 4시 49분 19초 UTC+9, Gijs S. 님의 말:
>
>> Hi all,
>>
>> I wrote a web app where you can
Hi all,
I wrote a web app where you can play a card game with Clojure,
ClojureScript and Datomic.
Background on the design is here:
http://thegeez.net/2014/06/12/gin_datomic.html
The game is playable here: http://gin.thegeez.net/
The code is on github: https://github.com/thegeez/gin
-Gijs
-
> deploy it to heroku?
>
> On Wednesday, April 30, 2014 8:32:24 AM UTC-5, Gijs S. wrote:
>>
>> Hi all,
>>
>> I've released a Clojure web application. It includes a front-end using
>> DataScript and React.js in ClojureScript.
>>
>> More d
Hi all,
I've released a Clojure web application. It includes a front-end using
DataScript and React.js in ClojureScript.
More details here:
http://thegeez.net/2014/04/30/datascript_clojure_web_app.html
The code is on github: https://github.com/thegeez/clj-crud
Demo on heroku: http://clj-crud.
Untested of course, but I think you need to use either :body or
:form-params rather than :query-params to put the query-params data into
the body of the post request.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send ema
Look at clojure.walk for mapping functions over nested structures:
(defn mapv-in [f coll]
(clojure.walk/prewalk #(if (coll? %) % (f %)) coll))
Clojure walk api: http://clojure.github.com/clojure/clojure.walk-api.html
On Friday, October 5, 2012 7:58:30 AM UTC+2, nchurch wrote:
>
> I ended u
I once ran into this error message when I entered the address
"http://localhost:9000/repl"; into the address bar of the browser by
mistake. This address should only be used in ClojureScript code.
You should open a page in the browser that contains compiled ClojureScript
that connects to this
Hi,
Re: ContentEditableField
ContentEditableFIeld has only recently been added to the Google Closure
Library
(http://code.google.com/p/closure-library/source/list?path=/trunk/closure/goog/editor/contenteditablefield.js&start=2035).
Are you sure that the version of the Google Closure Library t
The order of arguments you pass to long-poll-newest doesn't look
right.
You defined long-poll-newest to optionally take a fourth parameter for
the existing xhr connection. However, when calling long-poll-newest
you pass the existing xhr connection as the first argument.
Replace
(long-poll-newest
See this blog post for more background on BrowserChannel and why it is
useful for ClojureScript web applications:
http://thegeez.net/2012/04/03/why_browserchannel.html
-Gijs
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send
Here is the chat app on Heroku:
http://cold-stream-6156.herokuapp.com/index.html
-Gijs
On Mar 28, 1:39 pm, "Gijs S." wrote:
> Hi,
>
> clj-browserchannel-demo demonstrates cross-browser compatible, real-
> time, bi-directional communication between ClojureScript and
Hi,
clj-browserchannel-demo demonstrates cross-browser compatible, real-
time, bi-directional communication between ClojureScript and Clojure
using Google Closure BrowserChannel.
>From the Google Closure API: "A BrowserChannel simulates a
bidirectional socket over HTTP. It is the basis of the Gma
Hi,
The solution is to explicitly require goog.fx.DragDrop in the :require
in the ns declaration:
[goog.fx.DragDrop :as dd-import]
This adds this line in the generated js output:
goog.require('goog.fx.DragDrop');
This line is required because DragDrop lives in its own file within
the Google Clo
Subject: = in ClojureScript differs from Clojure API for arities other
than 2
Using ClojureScript f4c0de502c92ce710da923888d672f22213b902c (checked
out on Thu Jan 19 2012)
=> (= 1)
false ;; incorrect
=> (= 1 1)
true
=> (= 1 1 2)
true ;; incorrect
=> (= 1 1 1)
true ;; correct, but by accident
The problem is the setTextContent function from Google closure. Text
content is the text within a div, span, p, label etc but not the value
of an input element. Likewise getTextContent on field1 returns "",
rather than the value "Hello World!".
The following clojurescript can set the value of a te
Out :as fx-dom-FadeOut]))
>
> (defn ^:export main []
> (let [kurdt (dom/getElement "kurdt")
> anim (fx-dom/FadeOut. kurdt 1234)]
> (.play anim)
> (dom/appendChild (.body (dom/getDocument)) (dom/createDom "h1" 0
> (str (.duration anim))
>
Hi,
I have run into a similar problem. The problem is something with the
"require" and namespaces in JavaScript. The following worked for me:
(ns example.example
(:require [goog.fx.Dragger :as unused-alias]))
And then to call the Dragger constructor:
(goog.fx.Dragger. )
In the twitterbuzz exam
Yes, my suggestion without type indicators in SDB would look something
like this:
(def config {:sdb-client (AmazonSimpleDBClient. ...)
:mapping {"Link" {"url" {:encode encode-string :decode
decode-string}
"points" sdb/integer-encoding
Hi,
I have dabbled a bit with both AWS SimpleDB and the sdb library as
well as with the similar Google App Engine Datastore and related
Clojure libraries.
These two parts are indeed no-brainers:
- Support for consistent reads
- Support for literal string queries
Re: numeric formatting
I
Hi Alex,
Glad to be of help. I had never heard of FatJar before and it turned
out to work great for a clojure project I needed to distribute.
Also, as a fellow Dutch clojurian I can recommend the Amsterdam
Clojurians group at http://ams-clj.github.com.
Cheers,
Gijs
--
You received this message
Hi,
Perhaps it is a typo but you should have
(defn -main [] ...) rather than (defn- main [] ...)
Note the place of the dash "-".
defn- yields a non public var (a private declaration)
(http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/
defn-)
-main uses the dash, which is the
I also get consistent better times with (freq-layer layer) vs. (nth
freq-layer layer).
Gist updated: https://gist.github.com/666228
-Gijs
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
N
Indeed I was not using the transients correctly. Transients are not
designed to be bashed in-place. (http://clojure.org/transients)
The gist is updated with a version that first worked without the
transients and then had the transient operations added. (https://
gist.github.com/666228)
The times
The problem is not the freqs function. The implementation in Python
and in Clojure are different algorithms.
Both produce a graph with the number of blocks per layer per type, for
6 particular types. These six types are the Clay, Coal ore, Diamond
ore, Gold ore, Iron ore, Obsidian, and Redstone or
Finished is a predicate which designates when the seed is exhausted.
Because seed is not necessary a sequence, finished is not always
empty?.
For instance:
=> (unfold (fn [x] [(* x x) (inc x)]) #(> % 10) 0)
(0 1 4 9 16 25 36 49 64 81 100)
Or the zipmap (zip2) example from the wikipedia pa
This answers neither question 1 nor 2, but there is a function from
the map, filter and reduce family of higher order functions that is
applicable to this problem. The function is called unfold and is the
opposite of reduce (see http://en.wikipedia.org/wiki/Anamorphism).
"An unfold builds a (poten
29 matches
Mail list logo