Fork me on GitHub

Hi, is there a something equivalent to GOPROXY in maven for fetching dependencies. In our CI whenever it tries to build a jar it fetches the dependencies every time from Clojars.


It sounds like using docker without keeping your .m2 cache between builds, so persist your m2 between builds


But to build up m2 it will still fetch it from clojars right,


Only the first time


Anyone got any preferences for picking things out of parsed xml these days? I like the look of the approach in but there's no library there or anything, just some notes - wondering if maybe there's something out there now


maybe try spectre

book_guy 4
☝️ 4

Anyone here have experience with Clj on Windows through PowerShell versus Windows Subsystem for Linux?


I use clj with powershell

thanks2 4

it seems fine?

Jakub Holý (HolyJak)15:05:30

I want to read a long file, processing the lines, without keeping all of it in the memory. Is there a nice way to ensure the resource is closed once the whole line-seq is consumed? I guess I could wrap the processing in a transducer as they have the 1-arg "completion" arity... Thoughts? Thanks!


this might help, its from data csv but it might apply to whatever you are doing

Jakub Holý (HolyJak)15:05:20

Thank you. The proposed solution - move with-open up - is usable but not as nice :)

Ben Hammond15:05:13

@U0522TWDA I've had success with things like

(defn csv-maps
  "generic low overhead way to turn (massive) csv file
   into lazily evaluated stream of maps"
  [ff & opts]
  (reify clojure.lang.IReduceInit
    (reduce [_ f init]
      (with-open [^BufferedReader r (jio/reader ff)]
        (let [hdr (first (apply csv/read-csv (.readLine r) opts))]
          (transduce (map (partial zipmap hdr))
                     (completing f)
                     (apply csv/read-csv r opts)))))))

Ben Hammond15:05:46

you can reduce over that and you get maps of the row data

Jakub Holý (HolyJak)16:05:06

Thank you! Does it close properly when there is an exception during the processing?

Ben Hammond16:05:06

yeah the with-open should take care of that

Ben Hammond16:05:38

it expands to a

(finally (.close


is it correct that you can never see two sequential reader macros?


I don't think it is, I have never seen it done, but I believe that is supported behavior


sorry, no, I am thinking of tag literals


for reader macros, you can for exmaple, do things like #_#'+


ah i think i am more precisely talking about tag literals. #js, #uuid, etc


yeah, tag literals stack


makes sense i suppose. its just function composition, yes?


well sure, but the way the reader works it is basically "read the next form and hand the read result to this function", and if the next form is also a tag literal it just does that again


Aero configs use this a lot