works for me: => (*let [^java.io.BufferedReader a (clojure.java.io/reader"c:\\windows\\setupact.log")] (println (. a readLine))) * AudMig: No audio endpoint migration settings found 0x2 nil
=> *(let [a (clojure.java.io/reader "c:\\windows\\setupact.log")] (println (. a readLine)))* Reflection warning, NO_SOURCE_PATH:1:72 - reference to field readLine can't be resolved. AudMig: No audio endpoint migration settings found 0x2 nil => **clojure-version** {:major 1, :minor 5, :incremental 0, :qualifier "RC4"} On Sun, Feb 3, 2013 at 9:50 PM, Kanwei Li <kan...@gmail.com> wrote: > Unfortunately it doesn't work. > > Reflection warning, NO_SOURCE_PATH:20 - call to write can't be resolved. > > Reflection warning, NO_SOURCE_PATH:21 - reference to field newLine can't > be resolved. > > On Sunday, February 3, 2013 2:35:23 PM UTC-5, Luc wrote: > >> Why not add type hints like this ? >> >> (let [^java.io.BufferedReader in .... >> ^java.io.BufferedWriter out ...] >> .. >> >> Luc P. >> >> > Hey guys, >> > >> > I'm trying to read a lot of data, sometimes from *in* and sometimes >> from a >> > file. I extensively use the native .write and .read java methods. >> > >> > According to the clojure doc for reader, it says that "Default >> > implementations always return a BufferedReader". However, when I write, >> > >> > (*defn* solve [src dest] >> > >> > (*let* [in (clojure.java.io/reader src) >> > >> > out (clojure.java.io/writer dest) >> > >> > I get a bunch of reflection warnings on .read and .write, and most of >> the >> > running time is spent on reflection. AFAIK you can't type hint a (let) >> > construct, so what should I do here? >> > >> > Thanks! >> > >> > -- >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Clojure" group. >> > To post to this group, send email to clo...@googlegroups.com >> > Note that posts from new members are moderated - please be patient with >> your first post. >> > To unsubscribe from this group, send email to >> > clojure+u...@**googlegroups.com >> > For more options, visit this group at >> > http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en> >> > --- >> > You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an email to clojure+u...@**googlegroups.com. >> > For more options, visit >> > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>. >> >> > >> > >> > >> -- >> Softaddicts<lprefo...@**softaddicts.ca> sent by ibisMail from my ipad! >> > -- > -- > 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 from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Please correct me if I'm wrong or incomplete, even if you think I'll subconsciously hate it. -- -- 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 from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.