Re: New Functional Programming Job Opportunities

2013-06-10 Thread Jiaqi Liu
any job opportunity in China ? 2013/5/27 Functional Jobs > Here are some functional programming job opportunities that were posted > > recently: > > > > Clojure Programmer at Triggit > > http://functionaljobs.com/jobs/148-clojure-programmer-at-triggit > > > > Cheers, > > Sean Murphy > > Functio

Re: [ANN] if-and

2013-06-10 Thread Jiaqi Liu
you can just use (every? true? '(arg1 arg2 )) or def a simple function . i think the Core is powerful enough. 2013/6/11 Cedric Greevey > There's also the defmacro route: > > (defmacro if-and [test-expr binding & tests] > `(let [~binding ~test-expr] > (and ~@(concat tests [binding])))

How to change map in doseq ?

2013-10-27 Thread Jiaqi Liu
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

Re: How to change map in doseq ?

2013-10-27 Thread Jiaqi Liu
rom internet , i am using line-seq & doseq to deal with the big log file lazily. Is that right way to use clojue to deal this problem? Any suggestions will be grateful!!! 2013/10/28 Michael Klishin > > 2013/10/28 Jiaqi Liu > >> i really don't get it. >> Any suggest

Out of Memory Error

2013-11-12 Thread Jiaqi Liu
hi , guys I wrote the following codes to parse log files. it's alright to parse small one. But with big log files , i got the following error: "OutOfMemoryError GC overhead limit exceeded clojure.core/line-seq (core.clj:2679)" (defn parse-file "" [file] (with-open [rdr (io/reader file)]

Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-19 Thread Jiaqi Liu
Hi,all I want to parse big log files using Clojure. And the structure of each line record is "UserID,Lantitude,Lontitude,Timestamp". My implemented steps are: > Read log file & Get top-n user list > Find each top-n user's records and store in separate log file (UserID.log) . The implement

Re: Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-19 Thread Jiaqi Liu
e (lines) to the > result of line-seq. Don't do that. Try: > (parse-recur (line-seq rdr)) > > > On Tue, Nov 19, 2013 at 7:27 PM, Jiaqi Liu wrote: > >> Hi,all >> I want to parse big log files using Clojure. >> And the structure of each line record is >>

Re: Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-19 Thread Jiaqi Liu
sorry, i mean "weird"... 2013/11/20 Jiaqi Liu > hi,Mark ,thanks for your suggestion. > I modified the main function to : > ; > (defn parse-file > "" > [file n] > (with-open [rdr (io/reader file)] >

Re: Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-20 Thread Jiaqi Liu
t; > This way, the recur goes back to the main function entry point and ls is > overwritten, so nothing is holding on to the head. Make similar changes to > the other functions. > > > > On Tue, Nov 19, 2013 at 8:07 PM, Jiaqi Liu wrote: > >>

Re: link for clojure programs

2013-05-05 Thread Jiaqi Liu
, this book is very easy for beginners to study , also have plenty source codes 2013/5/4 nrel...@yahoo.com > > > On Saturday, May 4, 2013 2:01:48 PM UTC+8, nre...@yahoo.com wrote: >> >> Can anybody give me a link/websites of codes for BEGINNERS FOR CLOJURE? >> > > Thanks > > -- > -- > You rec