#clojure logs

2017-01-09

01:21SeyleriusOkay, how do I read an edn file?
01:21SeyleriusClojure 1.8
01:33ridcully_with clojure.edn/read
01:41Seyleriusridcully_: Somehow I can't `require` clojure.edn
01:54ridcully_you have to be more specific then. what is the code, what is the error
01:56SeyleriusWell, I managed to call clojure.edn/read directly, but now it's not reading properly.
01:56Seylerius(def checked-data (with-open [edn-file (io/reader "../cleaned.edn")] (clojure.edn/read edn-file)))
01:56SeyleriusCompilerException java.lang.ClassCastException: java.io.BufferedReader cannot be cast to java.io.PushbackReader, compiling:(form-init3778823564624194270.clj:65:63)
02:03ridcully_add (java.io.PushBackReader. (io/reader ...))
02:07Seyleriusridcully_: That did it, thanks.
05:18osfabibisieeek, they've announced my talk! http://www.lambdalounge.org.uk/#text-editor-data-structures
05:18osfabibisi(now I have to go and write it...)
05:19menguwhen i'm in lein repl, is there an easy way to install a dependency? for example, i'm in repl and i wanted to try out clojure.core/match. how should i proceed? close the repl, download the jar, add it to my classpath, re-start the repl?
05:20dysfunthat's what i used to do
05:21dysfunpomegranate exists though
05:21osfabibisioh, lein doesn't have the boot thing of just adding it to your dependencies?
05:21osfabibisi(even then you still have to close the repl and reopen it to download and install it)
05:21winkosfabibisi: that sounds really interesting, would love to watch that
05:21dysfunlein doesn't have "just do the deps"
05:21dysfunosfabibisi: no you don't, you just eval the set-env! in the rrepl
05:22dysfunhttps://github.com/cemerick/pomegranate is the way forwards with lein
05:23winkdysfun: what do you mean with 'just do the deps' - as in, interactively?
05:23dysfunwink: lein has this 'everything is config' approach, which means there isn't just a function 'install-deps'
05:23dysfunboot's set-env functions for doing that
05:24winkdysfun: did you look at the implementation of 'lein deps'?
05:24dysfunno, but i don't see how i'd be able to run that in a repl and have the state updated, so it's a boot moot?
05:25dysfunhence my recommendation of pomegranate. which lein uses under the hood
05:26winksure, but I'm just wondering if it wouldn't be possible anyway
05:26dysfunok, well basically boot exposes all the things you need as functions because there is no 'config api'
05:26osfabibisidysfun: ah, I had no idea
05:26winkwell I've never used boot, so that point is moot for me :P
05:27dysfunwell, sure, until you consider that means that the way you install deps in a repl is the same way you install deps in a build.boot
05:28dysfunso you can just keep updating your build.boot in emacs and keep evaling the changed bit of your build.boot as you modify it
05:28dysfunthat btw, is my favourite boot feature, hands down
05:28mavbozowink, i've used vinyasa so that i can pull dependencies in the repl
05:28mavbozolike (pull '[my.lib])
05:29dysfunnow, `lein deps` in another shell will make sure the dep is installed, but it won't update your classpath
05:29dysfunnot for the running repl
05:29mavbozohmm, vinyasa now known as lucidity
05:29winkdysfun: yeah, I know that much. but that doesn't mean it can't be fixed
05:29mavbozowink, is this what you want http://docs.caudate.me/lucidity/lucid-package.html#pull
05:30dysfuni don't know what a 'fix' would look like. probably default exporting a new function in the lein api into the repl namespace
05:30winkmavbozo: that sounds useful, yes, but still the problem with the claspath persists I guess
05:36dysfunthere will always be problems with the classpath :)
05:37winkmavbozo: hm, doesn't work for me but I'll try in a different project
06:03menguthanks dysfun
06:03mengui'll check out pomegranate