Re: How to profile a clojure program?

2015-02-08 Thread Di Xu
You can try timbre https://github.com/ptaoussanis/timbre 2015-02-09 2:23 GMT+08:00 Giovanni Gherdovich : > Hello, > > I am trying to use a java profiler (jvisualvm) > to see why my clojure program is so slow. > But I now realize that the profiler has no notion of my clojure program; > I have cloj

Re: Introduction GSoC 2015

2015-02-15 Thread Di Xu
Hi, maybe you can read idea page <http://dev.clojure.org/display/community/Project+Ideas+2014> from last year to find out what you're interested in. I'm not sure why clojure community haven't bring this year's idea page out. Thanks, Di Xu 2015-02-16 9:17 GMT+08:00

Re: [GSoC] core.typed Annotations and Macros Proposal

2015-03-17 Thread Di Xu
ng [2] http://dev.clojure.org/jira/browse/CTYP [3] https://github.com/clojure/core.typed/blob/master/module-check/src/main/clojure/clojure/core/typed/base_env.clj ​Best wishes for your GSoC​ Thanks, Di Xu 2015-03-18 4:44 GMT+08:00 ZhanLin Shang : > Hello all, > > My name is Zhanlin Shan

Re: [GSoC] core.typed Annotations and Macros Proposal

2015-03-18 Thread Di Xu
Read code base, submit some patches to get familiar with the process, etc. Also you can reach Ambrose to discuss your idea & proposal. Di Xu 2015-03-18 13:29 GMT+08:00 ZhanLin Shang : > Hi, > Thanks for replying, I've signed the CA and forwarded this post to the > core.

Re: Deterministic macro expansion for Clojure?

2015-03-22 Thread Di Xu
Well, I think it's nondeterministic by design, we usually just test its behavior, not the form it expanded to. 2015-03-23 10:52 GMT+08:00 myguidingstar : > Hi all, > I wonder if there is any way to make macro expansion in Clojure > deterministic. That would be useful in unit tests. Something lik

Re: Project Better Clojure/Android integration

2015-07-22 Thread Di Xu
I believe student application for GSoC 2015 is already closed at March, you can only try it next year. 2015-07-23 11:12 GMT+08:00 Devang Shah : > Can anyone please help? > > > On Saturday, July 18, 2015 at 8:33:58 PM UTC-7, Devang Shah wrote: >> >> Hello >> >> I am a master's student and would l

Re: Understanding when compilation occurs - for function producing functions

2014-06-21 Thread Di Xu
nymous function, and since it's a function and it's in the first position of list, clojure will invoke it with 2, and that anonymous function will do actual computation. functions are compiled at once when clojure reader meet them, and invocation is just the matter of instantiate. Thank

Re: OT: Github Alternatives

2014-06-30 Thread Di Xu
gitlab[1]? ​[1]​ https://about.gitlab.com/ 2014-06-30 18:34 GMT+08:00 Adrian Mowat : > Hi All, > > Sorry for the off topic thread but my company is looking at alternatives > to gihub that are a) hosted internally and b) cheaper (!) > > I was wondering what everyone else is using out there? The

Re: Is clojars down?

2014-07-29 Thread Di Xu
I can open cljars.org as normal, and can also download jars from there. 2014-07-29 20:42 GMT+08:00 Yves Parès : > Hi, it seems than clojars is down. Lein refuses to start, and apparently > it won't download jars from maven central either... > Am I the only one with this problem? > > -- > You rece

Re: Is clojars down?

2014-07-29 Thread Di Xu
sorry for that.. 2014-07-29 20:49 GMT+08:00 Josh Kamau : > Sorry... the url is clojars.org and its working perfectly. > > josh > > > On Tue, Jul 29, 2014 at 3:46 PM, Marc Limotte wrote: > >> lein is working for me, and is downloading jars from clojars. Assuming >> it's a network issue on your s

Re: where do I think the wrong way

2014-10-29 Thread Di Xu
maybe you should do this: (defn add-author [book new-author] (update-in book [:authors] conj new-author) Thanks, Di Xu 2014-10-29 19:01 GMT+08:00 Roelof Wobben : > Hello, > > For a exercise I have to add something to the end of a existing map. > > So I thought this would w

Re: Newbie's confusion

2014-12-05 Thread Di Xu
your development a **lot**. Thanks, Di Xu 2014-12-05 17:41 GMT+08:00 Laye Zhou : > Hi, > > I started learning Clojure this week and I'm a bit confused about the > general development process in the Clojure world. > > When I write Java there is a main method as the entry of the pr

Re: core.typed questions

2014-12-12 Thread Di Xu
com/forum/#!forum/clojure-core-typed>, you can ask question about core.typed there instead of general clojure list here. Thanks, Di Xu -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroup

Re: How do I return the data I need from this Exception?

2015-10-08 Thread Di Xu
Well, I think you just misunderstand exception and try..catch expression. catch subexpression (in your case println) will evaluated only when try subexpression (in your case log & let) throws exception. Thanks, Di Xu 2015-10-08 14:35 GMT+08:00 Lawrence Krubner : > I'm thinki

Re: meta circular clojure

2014-02-11 Thread Di Xu
Hi, lisp in lisp evaluator is the simplest evaluator you can build, because lisp uses list to represent its program, and all lisp dialect provide `read` function, so if you want to build an evaluator, you could just use this function and don't need to do lexical and syntax analysis. This is the po

Re: meta circular clojure

2014-02-13 Thread Di Xu
2014-02-13 1:05 GMT+08:00 Herwig Hochleitner : > 2014-02-12 5:36 GMT+01:00 Di Xu : > >> >> all lisp dialect provide `read` function, so if you want to build an >> evaluator, you could just use this function and don't need to do lexical >> and syntax analysis.

[GSOC2014] proposal for Typed Clojure: Heterogeneous operations & Dotted Polymorphism

2014-03-08 Thread Di Xu
is idea can be viewed here[3], any feedback or comment is welcome. [1] https://github.com/xudifsd?tab=repositories [2] http://dev.clojure.org/jira/browse/CTYP-115 [3] https://docs.google.com/document/d/1EEHIf6o86Am6wEPT7BSdoabc3TjFPS2ixVstE5rjuI8/edit# Than ks, Di Xu -- You received this message

Re: Concurrency, Parallelism, and State. And Zombies.

2014-03-26 Thread Di Xu
I really enjoy your post, especially the emacs one, I've been using vim for five years, and always want to learn something about emacs, but didn't have any good material to get start. That post is very useful for me. Thanks, Di Xu 2014-03-26 21:45 GMT+08:00 Daniel Higginbotham : >

Re: REPL

2014-04-08 Thread Di Xu
;, and start REPL via lein repl Thanks, Di Xu 2014-04-08 20:01 GMT+08:00 Cecil Westerhof : > Just downloaded and started with Clojure. > > Is there a reason that cursor movement does not work in the REPL? I am > used that I can use up-cursor to execute an old commands again. > &

Re: Output of printf is buffered

2014-04-10 Thread Di Xu
there're three buffer mode in unix, line buffered, full buffered and no buffered, if the output is terminal then it's default to line buffered. That means it buffer the output until '\n' occurs, you can force output via flush. Thanks, Di Xu 2014-04-10 19:30 GMT+08:00 Cecil

Re: Output of printf is buffered

2014-04-10 Thread Di Xu
Well, I'm not very familiar with buffer in java. But I think it's always safe to call flush if you want to see the output immediately. 2014-04-10 19:50 GMT+08:00 Cecil Westerhof : > 2014-04-10 13:40 GMT+02:00 Di Xu : > > there're three buffer mode in unix, line buffer

Re: Problem in loop (for loop) with Cascalog results

2014-04-23 Thread Di Xu
Isn't your "loop [hour-part 01]" should be "loop [minute-part 01]"? because you recur with "(recur (+ minute-part 01))"? I'm not very familiar with cascalog, maybe you should post this to https://groups.google.com/forum/#!forum/cascalog-user Thanks, D

Re: how to add a function to a collection ?

2014-05-22 Thread Di Xu
> > (defn *f1* [msg] (*fn[msg](println (str "hello " msg))*)) > (def collection '()) > (cons (f1) collection) > ​change ​ (cons (f1) collection) into (cons (f1 "xxx") collection) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: How to iterate over maps and drop one specific element each time?

2014-06-11 Thread Di Xu
(map #(dissoc % :op) [{:op :e :v 1} {:op :n :b 2} {:op :m :z 2.3}]) 2014-06-11 21:09 GMT+08:00 Hussein B. : > Hi, > > I have a seq of maps: > > [ {:op :e :v 1} {:op :n :b 2} {:op :m :z 2.3} ] > > How to iterate over the sequence and extracting only the non-op entries? > > Desired result is: > > [

Re: Help with writing a function to merge two maps

2014-06-17 Thread Di Xu
, Di Xu 2014-06-17 20:24 GMT+08:00 Shoeb Bhinderwala : > Can someone help me write the following function: > > I have two lists of maps as inputs: > > (def xs [{:id 1 :val 10} > {:id 2 :val 20} > {:id 3 :val 30} > {:id 4 :val 40}])