Thanks for your suggests~
The above piece of code is just for test.
The practical problem i want to solve is that
-->read a very big log file (each line is like that : "user id, latitude,
longitude, timeStamp")
-->statistic the number of each user (store in a map like that { id1 100 ,
id2 200, id3
I took some inspiration from Tim Baldridge's code-walking macro youtube
video (http://www.youtube.com/watch?v=HXfDK1OYpco) and updated print-foo's
`print-sexp` macro to intelligently expand the code it surrounds.
print.foo=> (print-sexp (str (+ 3 4) (+ 5 (* 6 2)) 4))3 34 4(+ 3 4) 75
56 62 2(* 6 2)
Given the source map improvements to ClojureScript, now is a good time to
present a newbie friendly guide to hacking with ClojureScript. Emphasis on
no fuss and getting as quickly as possible to productive experimentation:
http://swannodette.github.io/2013/10/27/the-essence-of-clojurescript/
--
2013/10/28 Jiaqi Liu
> i really don't get it.
> Any suggestion??
>
Clojure data structures are immutable. clojure.core/assoc
produces a new data structure instead of changing the one you have.
You can use an atom if you need to update a map from doseq
but more likely you want to use the actual
Hi , all
I am new to Clojure.
For now , i have a piece of code :
(let [res {}]
(doseq [id [111 222 333]
num [2 3 4]]
(assoc res id num))
(count res))
i want to get the res {111 2 , 222 3 , 333 4} and count 3
but the repl return me {} and 0
i r
Hi Scott,
I only began Clojure web development recently and decided to use Luminus
[1]; it brings together a bunch of frameworks (lib-nior, ring, compojure,
etc). Felt like a good starting point for me.
Paul.
[1] http://www.luminusweb.net/
On Mon, Oct 28, 2013 at 9:51 AM, James Reeves wrote:
Oh? What are the benefits of using those over Korma? I've been more than
happy with it up to now.
On Mon, Oct 28, 2013 at 10:30 AM, Alexander Hudek wrote:
> http://www.luminusweb.net/ gives a reasonable starting setup. The only
> thing I would recommend doing differently is to use clojure/java.j
Yes, coming very soon.
Alex
--
--
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
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe fro
You can use Korma with Stuart Sierra's workflow just fine.
On Sunday, October 27, 2013 5:07:02 PM UTC-7, Manuel Paccagnella wrote:
>
> Il giorno lunedì 28 ottobre 2013 00:30:06 UTC+1, Alexander Hudek ha
> scritto:
>
> http://www.luminusweb.net/ gives a reasonable starting setup. The only
>> thin
I'm using FW/1 (but then it's my framework, ported from CFML :) which
is based on Ring and uses Enlive and Selmer for templating. It uses
conventions rather than configuration (although you can specify routes
if you want to override configuration).
https://github.com/framework-one/fw1-clj
Sean
ClojureScript, the Clojure compiler that emits JavaScript source code.
README and source code: https://github.com/clojure/clojurescript
New release version: 0.0-1978
Leiningen dependency information:
[org.clojure/clojurescript "0.0-1978"]
Changes:
* tools.reader 0.7.10
Enhancements:
* Sig
Il giorno lunedì 28 ottobre 2013 00:30:06 UTC+1, Alexander Hudek ha scritto:
http://www.luminusweb.net/ gives a reasonable starting setup. The only
> thing I would recommend doing differently is to use clojure/java.jdbc or
> honeysql instead of korma for an sql dsl.
>
I agree. Korma is quite i
http://www.luminusweb.net/ gives a reasonable starting setup. The only
thing I would recommend doing differently is to use clojure/java.jdbc or
honeysql instead of korma for an sql dsl.
On Sunday, October 27, 2013 1:43:21 PM UTC-4, Scott M wrote:
>
> Ring seems well maintained, but Noir and Comp
Compojure isn't deprecated. What made you think it was?
- James
On 27 October 2013 17:43, Scott M wrote:
> Ring seems well maintained, but Noir and Compojure are marked deprecated.
>
> Can anyone lay out a Clojure Web library "stack" (up to templating) that
> is current and maintained?
>
> Any
Noir is deprecated in favor of lib-noir.
Where have you seen some indication that Compojure is deprecated?
Andy
On Sun, Oct 27, 2013 at 10:43 AM, Scott M wrote:
> Ring seems well maintained, but Noir and Compojure are marked deprecated.
>
> Can anyone lay out a Clojure Web library "stack" (up
Ring seems well maintained, but Noir and Compojure are marked deprecated.
Can anyone lay out a Clojure Web library "stack" (up to templating) that is
current and maintained?
Any and all sagacious wisdom greatly appreciated - thanks!
- Scott
--
--
You received this message because you are su
(get a-map :b my-foo) will result in the function object itself being
returned if :b is not found. If you want it to be called only in the event
of not found, you need either
(if (contains? a-map :b) (a-map :b) (my-foo)) -- which may perform the
lookup twice -- or
(if-let [r (a-map :b)] r (my-foo
Conj Schedule any time soon? EOM
--
--
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
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe
Silly me, thank you for your replies guys!
One more question though, what if my-foo had parameters?
Ryan
On Sunday, October 27, 2013 6:55:34 PM UTC+2, Luc wrote:
>
> You are getting my-foo evaluated, remove the parens around it.
>
> Luc P.
>
>
> > Hello,
> >
> > I am trying to understanding
You are getting my-foo evaluated, remove the parens around it.
Luc P.
> Hello,
>
> I am trying to understanding why is this happening:
>
> > (defn my-foo [] (println "Why do I get printed?"))
> > #'sandbox4724/my-foo
> > > (get {:b 1} :b (my-foo))
> > Why do I get printed?
> > 1
> > >
>
>
The function's arguments will be evaluated before calling it.
So the (my-foo) will be called before 'get'.
2013/10/28 Ryan
> Hello,
>
> I am trying to understanding why is this happening:
>
> > (defn my-foo [] (println "Why do I get printed?"))
>> #'sandbox4724/my-foo
>> > (get {:b 1} :b (my-f
Hello,
I am trying to understanding why is this happening:
> (defn my-foo [] (println "Why do I get printed?"))
> #'sandbox4724/my-foo
> > (get {:b 1} :b (my-foo))
> Why do I get printed?
> 1
> >
Shouldn't (my-foo) only be called in case the key isn't found? Why am I
seeing the above behavio
Thanks Malcom,
Even something really simple like showing your current project setup would be
really good for me to get going.
On 21/10/2013, at 15:57, Malcolm Sparks wrote:
> Hi Chris, yes I will try to do something like that very soon.
>
> On Friday, October 18, 2013 12:30:20 AM UTC+1, zcaud
23 matches
Mail list logo