Re: IllegalStateException I/O in transaction in REPL

2012-06-22 Thread dmirylenka
Thank you for the answers, and sorry for late reply. It seems I figured out what the problem was. My code was placed at the top level of a file sci-clustering/examples.clj, and I was loading the namespace from REPL like this:(use 'sci-clustering.examples :reload-all). So it looks like

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-22 Thread Vinzent
given java.jdbc's position as the sort of lower level glue all these libraries are built on, maybe better then including a DSL in java.jdbc would be including an AST (some data representation of sql) and a compiler for same. Yeah, that's exactly what I wanted to suggest too. Seems like

defpartial returns object instead of html string

2012-06-22 Thread Murtaza Husain
Hi, I am using Chris Ganger's crate library to generate html on the client side. (defpartial html [] form) (def form [:div.form-horizontal [:fieldset [:legend Student Registeration] [:div.control-group [:label.control-label Hello World]]])

Re: defpartial returns object instead of html string

2012-06-22 Thread Ben Smith-Mannschott
str On Fri, Jun 22, 2012 at 11:58 AM, Murtaza Husain murtaza.hus...@sevenolives.com wrote: Hi, I am using Chris Ganger's crate library to generate html on the client side.     (defpartial html [] form)     (def form   [:div.form-horizontal    [:fieldset     [:legend

Re: defpartial returns object instead of html string

2012-06-22 Thread Murtaza Husain
Nope doesnt work. On Friday, June 22, 2012 4:05:13 PM UTC+5:30, bsmith.occs wrote: str On Fri, Jun 22, 2012 at 11:58 AM, Murtaza Husain murtaza.hus...@sevenolives.com wrote: Hi, I am using Chris Ganger's crate library to generate html on the client side.

Re: How to go about finding a Clojure job

2012-06-22 Thread Okan AKYÜZ
Dear Erol; In our country (Turkey) there is no opertunity to find a functional programing job. I guess your nation is Turk because of your name and surname. Anyway there are same cool lisp jobs on http://lispjobs.wordpress.com/ Okan Akyuz 2012/6/21 Erol Akarsu eaka...@gmail.com Colin, I

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-22 Thread brad bowman
On Thursday, June 21, 2012 12:58:19 PM UTC+10, John Gabriele wrote: On Jun 18, 10:23 pm, Chris Zheng zcaud...@gmail.com wrote: {snip} So basically, if a 'lead clojure evangelist' can either 'officially' or 'unofficially' recommend ONE emacs setup, along with a bunch of

How to read a file into a string up until a line? Any way to make it lazy?

2012-06-22 Thread Joseph Guhlin
I have a 2.5GB file, and will have other files, where the records are mutli-line (variable length) and are separated by // on a line by itself. What is the best way to read the record into a sequence of strings for parsing, and act on that record, and read the next record? It'd be great if it

Re: How to go about finding a Clojure job

2012-06-22 Thread Erol Akarsu
Hello All, I am interested in a job with Clojure language. I am located in Richmond VA and would like to work remotely. Thanks Erol Akarsu On Wednesday, June 20, 2012 8:18:10 PM UTC-4, Erol Akarsu wrote: Colin, I love Clojure language and have done small personal projects. Actually, I

Re: How to read a file into a string up until a line? Any way to make it lazy?

2012-06-22 Thread László Török
Hi, untested but: (require '[clojure.string :as str]) (with-open [reader (clojure.java.io/reader path/to/the/file)] (let [lines (line-seq reader) records (map #(str/split % #\/\/) lines)] ... do your processing here on the lazy record list )) L 2012/6/21 Joseph Guhlin

Re: How to read a file into a string up until a line? Any way to make it lazy?

2012-06-22 Thread Walter Tetzner
(defn read-records Read the data from the given reader as a list of strings, where each string is made up of multiple lines, separated by // on it's own line. [reader] (- (line-seq reader) (partition-by #{[//]}) (filter (comp not #{[//]})) (map (partial apply str

Re: How to read a file into a string up until a line? Any way to make it lazy?

2012-06-22 Thread Walter Tetzner
On Friday, June 22, 2012 8:28:02 AM UTC-4, Walter Tetzner wrote: (defn read-records Read the data from the given reader as a list of strings, where each string is made up of multiple lines, separated by // on it's own line. [reader] (- (line-seq reader) (partition-by

Re: defpartial returns object instead of html string

2012-06-22 Thread Dave Sann
you can't I believe that the code is designed to specifically bypass strings. Why do you want a string in the client? On Friday, 22 June 2012 20:38:09 UTC+10, Murtaza Husain wrote: Nope doesnt work. On Friday, June 22, 2012 4:05:13 PM UTC+5:30, bsmith.occs wrote: str On Fri, Jun

Re: defpartial returns object instead of html string

2012-06-22 Thread Dave Sann
actually - not quite true You could always extract the html from the generated element using std browser functions, jquery or similar. On Friday, 22 June 2012 23:16:56 UTC+10, Dave Sann wrote: you can't I believe that the code is designed to specifically bypass strings. Why do you want a

Re: defpartial returns object instead of html string

2012-06-22 Thread Murtaza Husain
Got some help on it from stackoverflow. It is actually a DOM object that is returned, and the html can be extracted using outerHTML property. Thanks, Murtaza On Friday, June 22, 2012 6:49:08 PM UTC+5:30, Dave Sann wrote: actually - not quite true You could always extract the html from the

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-22 Thread Sean Corfield
On Fri, Jun 22, 2012 at 1:50 AM, Vinzent ru.vinz...@gmail.com wrote: Ok, I see. I've misunderstood the goals. Though, it still duplicates significant part of clojureql\korma, right? Hmm, I wouldn't say a significant part. I think jsql covers a very small space. To satisfy the basic goal for the

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-22 Thread fenton
Hi Brad, I've updated my doc with your questions. Here is how I responded to your particular queries. Note the answer may not be correct as I'm a clojure newbie myself. - Leiningen is a build tool like maven for java, or rake (i think) for ruby. You can use it to publish your

Re: {ANN} Clojure-Control 0.4.0 is out!

2012-06-22 Thread Denis Labaye
Hi, This is interesting, but the github page you gave is missing an essential information: What does it bring compared to already existing mature Clojure solutions like Pallet ? Cheers, Denis On Thu, Jun 21, 2012 at 2:34 PM, dennis zhuang killme2...@gmail.com wrote: Clojure-control: a

Re: How to read a file into a string up until a line? Any way to make it lazy?

2012-06-22 Thread Joseph Guhlin
Awesome, thank you so much. Is there any way to make it lazy to avoid the dreaded outOfMemoryError ? Or is it already lazy and I'm not seeing it / working with it properly? Best, --Joseph On Friday, June 22, 2012 7:30:28 AM UTC-5, Walter Tetzner wrote: On Friday, June 22, 2012 8:28:02 AM

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-22 Thread Niels van Klaveren
I also can't help but think this is overlapping with ClojureQL/Korma. Korma also isn't that far from the 'metal' this library is shooting for. The biggest problem with SQL is that it isn't functionally composeable. Otherwise why use a DSL instead of SQL itself ? It seems a pretty well-designed

Re: How to read a file into a string up until a line? Any way to make it lazy?

2012-06-22 Thread Walter Tetzner
Is there any way to make it lazy to avoid the dreaded outOfMemoryError ? Or is it already lazy and I'm not seeing it / working with it properly? It's already lazy. If you are experiencing an outOfMemoryError, make sure you're not holding on to the head of the list. line-seq, partition-by,

error in clojurescript compilation

2012-06-22 Thread Murtaza Husain
Hi, I was hacking away happily with my clojurescript, when suddenly this error seems to crop up - java.lang.IllegalArgumentException: Parameter declaration clojure.core/let should be a vector core.clj:6567 clojure.core/assert-valid-fdecl core.clj:220

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-22 Thread Qiu Xiafei
p.s. I think idea + la enclosure works quite wellwhy beginners are always introduced to emacs solution? On Sat, Jun 23, 2012 at 4:45 AM, fenton fenton.trav...@gmail.com wrote: Hi Brad, I've updated my doc with your questions. Here is how I responded to your particular queries. Note the