Hello,
I am just trying to understand the best practices in ClojureScript One.
One thing that strikes me is that most html gets put (with the help of
macros using enlive) in the actual cljs page.
As someone who hasn't done web-applications for years I myself would have
created as much dynamic
How about the new reducers library:
http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html
http://clojure.com/blog/2012/05/15/anatomy-of-reducer.html
Jonas
On Wednesday, August 8, 2012 7:48:23 PM UTC+3, Brian Marick wrote:
I'm looking for medium-scale
Sounds like a bug to me, in that it doesn't behave as I would expect.
On Thu, Aug 9, 2012 at 7:29 PM, Baishampayan Ghose b.gh...@gmail.comwrote:
Hi,
It seems reduce-kv doesn't reduce a sorted-map in the correct order.
Example -
user (def *sm (into (sorted-map) {:aa 1 :zz 2 :bb 3 :yy 4 :cc
While admittedly neat, and educational, this kind of code is fancy for
production use in my opinion:
(defn make-point [x y]
(fn [member]
(cond (= member :x) x
(= member :y) y)))
On Fri, Aug 10, 2012 at 6:06 PM, Jonas jonas.enl...@gmail.com wrote:
How about the new reducers
Confirmed -- thanks for the report.
Stu
Hi,
It seems reduce-kv doesn't reduce a sorted-map in the correct order.
Example -
user (def *sm (into (sorted-map) {:aa 1 :zz 2 :bb 3 :yy 4 :cc 5 :xx 6}))
;= #'user/*sm
user *sm
;= {:aa 1, :bb 3, :cc 5, :xx 6, :yy 4, :zz 2}
;; plain
Enlive is abstractement conceive : if you put a remote on client you could
cache it...
To do that with the same abstract language , you have the awesome enfocus
[0] lib
with a sample app here [1], and for those clojururians interested in MVC [2]
Any way, there will be some *remote *to get
After discovering a need for currying functions with partial evaluation
(and having to do it by hand) in a clojurescript project, and deciding that
a macro version might be feasible, I decided to give it a try. The result
is here https://github.com/fredericksgary/currj, and seems to work at
Hi,
I have a ref type that wraps a map, this map is going to embed many nested
other maps.
According to immutability rules, what happens when:
A new nested map is updated (entry is removed or update) or even a new
nested map is added to the master map that is wrapped by ref type?
Thanks for
I think enlives transformersare a very good example of functions returning
functions. Maybe you should have a look at the getting started guide and
the tutorials
Send from Android
Am 09.08.2012 23:13 schrieb Jonah Benton jo...@jonah.com:
You've probably seen these, but if not, Doug Crockford's
Would answer, if you want to be atomic, means transactional memory, that is
a feature of Clore .
Le vendredi 10 août 2012 18:21:12 UTC+2, Hussein B. a écrit :
Hi,
I have a ref type that wraps a map, this map is going to embed many nested
other maps.
According to immutability rules, what
If you want to stay with atomic transactions this is a Clojure feature ,
STM, if my souvenirs sont bons
Le vendredi 10 août 2012 18:21:12 UTC+2, Hussein B. a écrit :
Hi,
I have a ref type that wraps a map, this map is going to embed many nested
other maps.
According to immutability rules,
@(:dfw clojure-user-groups)
I'll claim that promise. :)
--Proctor
On Thursday, August 9, 2012 8:42:07 AM UTC-5, Alex Robbins wrote:
The group hasn't met in a long time, but we were actually talking
about some kind of a relaunch last week. We were hoping some Clojure
interest had
The following code fails with a strange exception No matching field found:
_GT_foobar for class user.MyFoobar:
(defprotocol Foobar
(-foobar [this]))
(defrecord MyFoobar [value]
Foobar
(-foobar [this] (str Foobar: value)))
(extend-protocol Foobar
String
(-foobar [this] (str
I think it depends on the style of web site you are making.
On the more GMail style 'web app' end of the spectrum,
rendering/templating on the client side means you don't have to
inundate the server with AJAX requests (for example, if different
items are cached upon the initial connection). This
On 8/10/12 5:21 AM, john wrote:
Hello,
I am just trying to understand the best practices in ClojureScript One.
One thing that strikes me is that most html gets put (with the help of
macros using enlive) in the actual cljs page.
As someone who hasn't done web-applications for years I myself
Hussein:
If you ignore the ref for the moment, making any change to a map, or a map
nested inside a map however many levels deep you wish, does not mutate the
original map. Instead it creates a brand new map with the new set of keys and
values. It is as if the original was copied, and the
Crystal clear, thanks.
On Friday, August 10, 2012 10:16:19 PM UTC+3, Andy Fingerhut wrote:
Hussein:
If you ignore the ref for the moment, making any change to a map, or a
map nested inside a map however many levels deep you wish, does not mutate
the original map. Instead it creates a
Hi,
I'm collecting analytics data. I used a master map that holds many other
nested maps.
Considering maps are immutable, many new maps are going to be allocated.
(Yes, that is efficient in Clojure).
Basic operation that I'm using is update-in , very convenient.
Do you have a better idea how to
Hi,
Why Clojure map literal creates an instance of array map but not hash map?
What are the advantages of array map over hash map?
Thanks.
--
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
It's not dependent on whether it's a literal but on the size of the map, 8
key-value pairs is the threshold.
This results in a PersistentHashMap
(class {1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9}) =
clojure.lang.PersistentHashMap
This gets you a PersistentArrayMap
(class {1 1 2 2 3 3 4 4 5 5 6 6 7 7
Hi,
I want to measure how much space an algorithm is taking and then trying to
change some aspects to see how things are going to differ.
I also want to measure how much time it takes to complete an operation.
What tools can I use?
Thanks.
--
You received this message because you are
Thanks, never knew about this hashtable threshold factor.
On Saturday, August 11, 2012 1:01:02 AM UTC+3, Tamreen Khan (Scriptor)
wrote:
It's not dependent on whether it's a literal but on the size of the map, 8
key-value pairs is the threshold.
This results in a PersistentHashMap
(class
Hello John,
ClojureScript One is an example of a single-page application. This means
that you get one page load from the
server and everything else happens in the browser without any further page
loads. The initial page that
is loaded is dynamically generated on the server. Any other updates
Hmm if by space you mean memory then I think that only a profiler can help
with that, regarding time using https://github.com/hugoduncan/criterium for
benchmarking is the path I would take
Ronen
On Saturday, August 11, 2012 1:21:05 AM UTC+3, Hussein B. wrote:
Hi,
I want to measure how much
That's a good call. +1
On Friday, August 10, 2012 8:36:25 AM UTC-4, Jonas wrote:
How about the new reducers library:
http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html
http://clojure.com/blog/2012/05/15/anatomy-of-reducer.html
Jonas
On
25 matches
Mail list logo