#clojure logs

2015-05-27

00:28sdegutisok
00:31currento_
00:34sdegutisok
00:34sdegutisHi.
00:35sdegutisI heard something about using monads to make Datomic usage cleaner in Clojure.
00:35sdegutisI think the pattern goes: all lower-level functions just manipulate and return transactions, and the highest-level function receives this and commits it to Datomic.
00:36sdegutisThey do this by composing functions that return either a transaction or an error, and are composable such that if any functino returns an error, the rest of the chain propagates the error instead of building up the transaction with the next function.
00:36sdegutisI think this is what monads are for, right?
00:38sdegutisI like the idea behind it, I just don't fully know how to execute it.
00:47Viestihum
00:49ViestiI'm finding myself looking for an enumeration which maintains order
00:53ViestiIn my case a have a UI which shows a set of options, these options are keywords which would be neat to keep in a set so that I could then do contains? and use the set as a predicate
00:53Viestibut set doesn't maintain order...
00:54Viestiso iterating over it in the UI would not show the literal order
00:55ViestiI ran into this library, which looks neat: https://github.com/amalloy/ordered
00:55Viestijust thinking that is the a simpler solution...
00:55ViestiI could put the options into a vector
00:55Viestiand then convert to set when needed
00:55Viestibut hmm...
00:57zematis not a clojureist - I just lurk here. But a sorted-set is what you need Viesti
00:58Viestiwhich leads to making up a rank for each keyword
00:58Viesticould have the rank stuff in the ui only though
00:59Viestijust thinking that is what I'm looking for overkill :)
00:59Viestiand there seems to be a library too so using it would be easiest :)
00:59zematisthis maybe..
00:59zematishttps://clojuredocs.org/clojure.core/sorted-set
01:12andyfViesti: sorted-set will do it if the default ordering is acceptable. sorted-set-by lets you supply a custom comparator function.
01:13andyfViesti: If the order you want is not easily specified by a comparator function, then something like am alloy's ordered may be useful.
01:23Viestiandyf: yep, ordered-set from amalloy is nice since I get insertion order, which is the same as in the literal expression that I write
01:23Viestis/same/same order
01:27WickedShellto any seesaw experts out there, if I provide my own repaint method for a component, is there a way I can call super() within it?
01:28Viestiordered-set/ordered-map implementations seem to have a vector for maintaining the order (in the set case a map is used also) which is similar to what I'd probably need to do otherwise to keep insertion order
01:33WickedShelloh I see, I can actually control that in seesaw, with a more advanced paint component
02:10WickedShellstupid question, how do you require a map in a function signature without listing required keys? (ie the function supports a large number of keys and I need to test with contains? inside the function to determine if I should use that key
02:18andyfWickedShell: Meaning you want an exception to be thrown if that argument is not a map? One way to do that is a precondition. That feature is built into Clojure. Another is to use Prismatic's Schema library, I think (I haven't used it).
02:19WickedShellwell I figured if I called (contains? foo :bar) and foo wasn't a map I'd get an error, was trying to see if I could solve it at the function signature level
02:19andyfTo see an example precondition, search for :pre on this page http://clojure.org/special_forms
02:20andyfyou could also require only one key in the signature, and use :as foo to give the entire map the name foo
02:20WickedShellandyf: while not what I was looking for thats really intresting to know in general
02:22andyfSearching for :as on that same page has examples for both vector/sequence arguments, as well as maps
03:58acron^rich hickey always reminds me of weird al ...teehee
03:59acron^haha, and i'm not the only one
03:59acron^https://twitter.com/mrspeaker/status/561935228189831169
04:10WickedShellI'm having trouble with a case statement, I know I have valid messages coming in, but I only ever execute the default case here. http://pastebin.com/2TV0GMWx (moving away from my if/else blocks that went in in early testing, function calls are identical to what they were before)
04:42mnngfltgdysfun, thanks!
04:43dysfunhowever, it can be made shorter, sec
04:43dysfunwell firstly there's the extra paren before the arglist
04:44dysfunit's single arity, so you don't need it
04:44dysfunand there are some primitive functions that more concisely express it
04:44dysfun(is the cheatsheet slow to load for anyone else right now?)
04:46mnngfltghttps://gist.github.com/pesterhazy/fc8930c8eaa4f2eadc02
04:46mnngfltghere's my current version
04:47mnngfltglet's merge it into clojure.core :)
04:48mnngfltg(j/k, I'm sure it's flawed somehow)
04:49dysfunyou say flawed, i say improvable
04:49dysfunnext one is you can create an assertionerror with AssertionError.
04:49dysfun(instead of (new AssertionError.
04:50dysfunthen there's if-some, which combines the let with the nil check
04:50dysfun,(defmacro guard-nil [x] `(if-some [v# ~x] v# (throw (AssertionError. (str "Nil guard gailed: " (pr-str '~x))))))
04:50clojurebot#'sandbox/guard-nil
04:50dysfun,(guard-nil false)
04:50clojurebotfalse
04:50dysfun,(guard-nil nil)
04:50clojurebot#error {\n :cause "Nil guard gailed: nil"\n :via\n [{:type java.lang.AssertionError\n :message "Nil guard gailed: nil"\n :at [sandbox$eval79 invoke "NO_SOURCE_FILE" 0]}]\n :trace\n [[sandbox$eval79 invoke "NO_SOURCE_FILE" 0]\n [clojure.lang.Compiler eval "Compiler.java" 6792]\n [clojure.lang.Compiler eval "Compiler.java" 6755]\n [clojure.core$eval invoke "core.clj" 3079]\n [clojure.core$ev...
04:51dysfunwell, bar the typo in the error message
04:53mnngfltgdidn't know about `if-some`
04:54dysfunyeah i only discovered it last week :)
04:54mnngfltgit's new in 1.6 so we can be excused for that
04:55dysfun*shrug* 1.6 has been out for a long time
04:55dysfuni think the whole time i've been programming clojure seriously actually
04:56mnngfltgyes, but a lot of the code out there (which we've been reading) predates 1.6
04:56mnngfltgand you learn from reading other people's code, for the most part
04:59mnngfltghttps://gist.github.com/pesterhazy/fc8930c8eaa4f2eadc02 <-- here's my amended version
05:10zotis there a cleaner way to take a series of things, and make a map of thing -> #{child1 child2 ..} ? I have working code here, but it feels pretty sloppy: https://gist.github.com/benfleis/ddf17381dcd7dd112236
05:11TEttingerzot, map or set?
05:11zotthe outer thing is a map, the values within are sets
05:11TEttingerah
05:12zotthe code above seems to work from some tests; just feels very bulky, like i'm missing something far more idiomatic
05:12TEttingerI'm not sure what your input looks like
05:12zotthe 3rd term is sample input
05:13zoti'll add the output in the gist, 1 sec.
05:13TEttingera vector of quoted vectors?
05:13TEttingerwhy quote the inner vectors though?
05:13markpgood morning folks - where is the user forum for leiningen?
05:13TEttinger,[[and 1 2 3][not 1 2]]
05:13zotthis was code that was being used w/ expresso
05:13clojurebot#error {\n :cause "Can't take value of a macro: #'clojure.core/and"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Can't take value of a macro: #'clojure.core/and, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6543]}\n {:type java.lang.RuntimeException\n :message "Can't take value of a macro: #'clojure....
05:13TEttingeroh
05:13TEttingerthat's why
05:14TEttingermarkp: uh, probably github issues or ask here
05:14zotyeah, just using the symbols as they specify. could be keywords, etc. for the generic case.
05:15markpthanks TE*, will do
05:15TEttingerbut github issues is for actual problems with lein
05:16TEttingernot just how to use. if you have some how-to-type questions, probably many of the people in here can answer
05:16zotTEttinger: gist updated w/ resulting values (as desired)
05:16TEttingerok
05:17zotperhaps simpler to have just asked for input -> output, to avoid mixing in my ugly sol'n :)
05:17TEttinger,(def conjuncts ['[and f1 f2 f3] '[and f1 f2] '[not f4]])
05:17clojurebot#'sandbox/conjuncts
05:18TEttinger,(into {} (map (juxt identity rest) conjuncts))
05:18clojurebot{[and f1 f2 f3] (f1 f2 f3), [and f1 f2] (f1 f2), [not f4] (f4)}
05:18TEttinger,(into {} (map (juxt identity (comp set rest)) conjuncts))
05:18clojurebot{[and f1 f2 f3] #{f1 f3 f2}, [and f1 f2] #{f1 f2}, [not f4] #{f4}}
05:25zotTEttinger: bingo :) I really need to remember juxt in my mental toolbox… it's been the answer for the last 2 of these questions!
05:25zot(inc TEttinger)
05:25lazybot⇒ 56
05:27TEttingercool!
05:33mnngfltgzot, `juxt` and `reduce` are in my box of "things that don't occur to you until you realize they're the obvious tool"
05:37TEttingerreductions too
05:37TEttingerfrequencies is handy but it's usually obvious when you need it
05:38WickedShellI've inadvertently designed my program around a feature that has been added to development core.async and shows up in documentation, but is not in the last release version (which was done sep 2014). Is there a preffered method to build and include it within my project from the bleeding edge on github?
05:38J_ArcaneI'm terrible at thinking up more than fairly innocuous uses of reduce.
05:42TEttinger&(reductions + (range 21))
05:42lazybot⇒ (0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 210)
05:42TEttingertriangular numbers
05:43kastermaHere is a question on juxt and how to maybe avoid it. I have https://gist.github.com/kasterma/538aaf8e279e04b2234f
05:43kastermachecking a rule in a sudoku
05:44kastermanos-locs is the combination of numbers and locations where they appear in the sodoku
05:44kastermaReasonable use of juxt (which is why I thought of it now).
05:45kastermaTo heavy handed use of frequencies and filter it seems to me.
05:46TEttingerI'm uh not sure what your sudoku looks like, or what a rule looks like
05:46kastermaA sudoku is a vector of length 9 with vectors of length 9 in it
05:47kastermaa rule is a vector of length 9 of pairs (locations).
05:48TEttingerI'd make get-loc take a pair so you don't need to apply, that bit is just a bit needlessly confusing
05:49TEttingerunless you explicitly need to make a partial with only one element of the pair
05:49TEttingerjust change the def to (defn get-loc [sud [i j]]
05:49kastermayeah, that would save the apply
05:50TEttingergood ol' destructuring
07:54timvisher,(if-let [[ohai] []] ohai 'made-it)
07:54clojurebotnil
07:54timvisher,(if-let [[ohai] [1]] ohai 'made-it)
07:54clojurebot1
07:54timvisher,(if-let [[ohai] nil] ohai 'made-it)
07:54clojurebotmade-it
07:55timvisheris that the expected behavior for everyone else?
07:55timvisheri'm quite surprised by it
07:55timvisher:)
07:55ReefersleepHello everyone. Anyone use vim-fireplace and know how to resolve dependencies when doing cpp/cpR or whatever it is I need to do to send the current buffer to the REPL?
07:57ReefersleepActually, my problem stems from just trying to evaluate the current buffer in order to properly syntax highlight function calls to required dependencies :/
07:58ReefersleepTrying to get vim-clojure-highlight to work.
07:58heuristReefersleep: I am not at a repl ATM, so the fingers-knowledge maybe wrong, but to eval a whole file I sometimes use ggcpG
08:00Reefersleepheurist: Cheers. Let me just paste the result from that:
08:02gfrederickssdegutis: you could call the jvm method that clojure calls, which would give you determinism
08:03gfrederickshttp://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#shuffle%28java.util.List,%20java.util.Random%29
08:03ReefersleepCompilerException java.io.FileNotFoundException: Could not locate clj_time/core__init.class or clj_time/core.clj on classpath: , compiling:(vim_clojure_highlight_example/ex.clj:1:44)
08:04Reefersleepah sorry, gotta go, be back later. Will stay on the channel though :)
08:04justin_smithOK, that is not vim at all
08:05justin_smiththat's a deps issue
08:10zottimvisher: seems intuitive to me; the binding-form test is true, even w/ [] — if you want to invert the nil condition, you need to call (first …) in the test, methinks.
08:13timvisherzot: what do you mean by 'the binding-form test is true, even w/ []'? it's entirely likely that I don't understand conditionals in clojure, but i would expect anything that returned falsey there to trigger the alternative rather than the consequent
08:13timvisher,(if-let [[ohai] [nil]] ohai 'made-it)
08:13clojurebotnil
08:13timvisheramazing
08:13zot,(first [])
08:13clojurebotnil
08:13zot(boolean [])
08:13timvisher,(if-let [ohai nil] ohai 'made-it)
08:13clojurebotmade-it
08:13zot,(boolean [])
08:13clojurebottrue
08:13zotthe thing returned is [], which is true
08:14zotif you change the entire expression to:
08:14timvisherwhere is `[]` returned?
08:14timvisheris that how binding works?
08:14zotit's the RHS of that binding
08:14justin_smithzot: in (if-let [[ohai] [nil]] ...) it's [nil] which is tested, and that is truthy
08:14zotright
08:14timvisherwow
08:15zot(he didn't use [nil], but [], but for this case, the destructuring is the same)
08:15justin_smith,(boolean [nil]) ; what was actually tested
08:15clojurebottrue
08:15justin_smithright
08:15timvisheri guess that's the part that i was confused about
08:15timvisheri assumed that the symbol that i was destructuring into was the one that would be tested
08:15justin_smithtimvisher: yeah, we don't do false punning for empty collections
08:15timvishernot the 'intermediate' vector
08:15zot,(if [ohai (first [])] ohai 'made-it)
08:15justin_smith,(boolean ())
08:15clojurebot#error {\n :cause "Unable to resolve symbol: ohai in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: ohai in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6543]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: ohai in this co...
08:15clojurebottrue
08:15zot,(if-let [ohai (first [])] ohai 'made-it)
08:15clojurebotmade-it
08:16zotthat's the line you want, if you want [] to trigger a false eval
08:16timvisherzot: yes. i'm aware of the use of first there :)
08:16zotok
08:16timvishermy point was that i would've expected to not have to use it
08:16justin_smithanother option ##(if-let [[a] (some [])] 'made-it a)
08:16lazybotjava.lang.RuntimeException: Unable to resolve symbol: a in this context
08:16justin_smitherr
08:17zotthe doc says pretty clearly that the result of test is checked — the binding form is a separate beast
08:17timvishermy model of how if-let destructuring worked was basically that it unrolled to `(let [[ohai] s] (if ohai consequent alternative))`
08:17timvisherobviously it does not
08:17timvisher:)
08:18timvisherand in fact now that i actually type that out it doesn't even make any sense
08:18justin_smith,(if-let [a (not-empty [])] a 'made-it)
08:18clojurebotmade-it
08:18timvisherbut nevertheless that's what i thought
08:18zotunderstood
08:18zotseems to be often like that — intuition betrays, until you think further about it, and your intuition gets updated
08:18zots/seems/clojure &/
08:18justin_smith,(if-let [[a] (not-empty [1])] a 'made-it)
08:18clojurebot1
08:18justin_smith,(if-let [[a] (not-empty [])] a 'made-it)
08:18clojurebotmade-it
08:19timvisherzot: lol. making no claims at all about my intuition getting better. this smacks of something that i will come back with in 6 months when i try to do it again and it doesn't work. :)
08:19justin_smithI'm rather fond of not-empty
08:19timvishermy neurons are quite unimpressionable :)
08:19zotyes, it seems very useful
08:20m1dnight_I was reading up on the volatile keyword in java. Is it okay to ask a question about that in here?
08:20justin_smith,(if (not-empty "") 'full 'empty)
08:20clojurebotempty
08:24timvisherjustin_smith, zot: thanks for the ideas. i don't particularly like either one a whole lot more than just having an explicit let with a conditional inside it, but they do seem like useful alternatives.
08:45tsdhIs there something that helps emitting EDN data? Basically, I want to be able to serialize my app's own data types (using custom tags) plus anything supported by default, e.g., serializing a map from UUIDs to vectors of my.app/Foo objects (or any other mix) should just work.
08:45justin_smithtsdh: pr-str / pr are my usual gotos
08:46tsdhjustin_smith: But how to I tell pr/pr-str how my.app.CustomType instances have to be serialized?
08:46justin_smithif your custom data types are created with defrecord, pr will work with them too
08:46tsdhjustin_smith: No, they aren't.
08:46justin_smithtsdh: you're out of luck I guess
08:47justin_smiththere's a multimethod you can implement, I forget the name
08:47tsdhjustin_smith: I guess you mean print-method, right?
08:47justin_smithis that the one that prints readably?
08:49tsdhjustin_smith: Indeed, so probably print-dup?
08:49justin_smithsounds right, you'll also need to define custom reader macros of course
08:49justin_smithit's a lot easier to just use defrecord in the first place
08:52tsdhjustin_smith: Yes, the readers are dispatched automatically. I hoped that something like that is also true for the writers. defrecord is no option as my custom objects are defined by plain Java interfaces.
08:54Reefersleepjustin_smith: how do I fix the dependencies issue?
08:58ReefersleepTo reiterate (for justin_smith and anyone else familiar with vim-fireplace): upon doing ggcpG, I get CompilerException java.io.FileNotFoundException: Could not locate clj_time/core__init.class or clj_time/core.clj on classpath: , compiling:(vim_clojure_highlight_example/ex.clj:1:44)
08:59ReefersleepI _think_ I've put all the right things into :dependencies in project.clj .
09:01luxbockBronsa: with tools.analyzer, if I have a :binding node of a let-bound local, is there a way for me to somehow fetch the node for the let-form it's from, or would I need to grab that information by going top-down instead?
09:03ReefersleepAnyone know how I can figure out how to amend my FileNotFoundException upon doing ggcpG in a vim buffer with vim-fireplace?
09:07Bronsaluxbock: no, there are no cycles in the AST
09:07justin_smithReefersleep: as I said above, it is not a fireplace issue
09:07justin_smithReefersleep: how did you add the dep for clj-time?
09:09Reefersleepjustin_smith: like this: http://pastebin.com/VTAkKx2F
09:09justin_smithhave you restarted your repl since that dep was present?
09:09justin_smithif you run (System/getenv "PWD") does it show a directory inside your project?
09:10justin_smithI have to leave for work, I'll be back later, I'm sure others can help though
09:10Reefersleepcheers justin_smith
09:10Reefersleepnot sure I've restarted the REPL
09:11Reefersleepmight very well be that
09:19shaymHi , i am trying to use JPA from clojure , i added the JPA and hibernate deps , but i am getting a class not found exception on one of the hibernate classes
09:19shaym(def emf (javax.persistence.Persistence/createEntityManagerFactory ""))
09:20shaymjava.lang.NoClassDefFoundError .... org.hibernate.ejb.Ejb3Configuration
09:20luxbockBronsa: say I have the AST for a top-level form called T, and then I have an inner-node that contains a locally bound variable called X, and I'd like to find the node for the let-form where X was bound (in the scope of the inner node)
09:20ReefersleepUpon doing ggcpG now in a vim buffer with vim-fireplace, I am now getting CompilerException java.lang.IllegalAccessError: Readport does not exist, compiling:(vim_clojure_highl ight_example/ex.clj:1:44)
09:20ReefersleepAnyone have a clue why? :)
09:20shaymdo i need to specially import each dependent class?
09:21chousershaym: No, I wouldn't think so.
09:21luxbockBronsa: would you say the easiest way to find that node would be to call clojure.tools.analyzer.ast/nodes on the top-level node, and then filter for all nodes who contain the location of the inner node per their :line, :column, :line-end and :column-end
09:21shaymchouser, yes that is what i was suspecting
09:22luxbockand then filtering for let and letfn nodes, and taking the last one of those
09:22luxbockso that (let [x 10] (let [x 9] (foobar x))) would still find the inner let instead of the outer
09:28ReefersleepI figured out the Readport thing. Ach, all I'm really trying to do is to replicate the .gif before/after example given for vim-clojure-highlight at https://github.com/guns/vim-clojure-highlight
09:29ReefersleepCan't get it to work - method calls to outside modules are not highlighted
09:32Bronsaluxbock: you are using t.a.jvm right?
09:32luxbockBronsa: yes
09:32Bronsaluxbock: then the uniquify-locals pass is being run -- each local has a uique id
09:33luxbockBronsa: is that the loop-id?
09:33Bronsaluxbock: no, :name
09:34Bronsaluxbock: so in (let [x 1] (let [x 2] x)) the fist x will have :name x#__1, the second one x#__2
09:34Bronsaand the x local wil refer to x#__2
09:35luxbockBronsa: ahh I see, yeah that should help
09:35Bronsaluxbock: IOW shadowing is explicit, once you extract the local :name it shouldn't be hard to locate the original let form
09:36luxbockwhat does IOW mean?
09:36Bronsain other words :)
09:36luxbockok :)
09:36luxbockthanks
09:36Bronsanp
09:47ReefersleepTo anyone following my stream of questions: I think I finally grokked vim-clojure-highlight
09:48tsdhHow do I serialize a map as EDN? (binding [*print-dup* true] (pr my-map)) results in #=(clojure.lang.PersistentArrayMap/create {...}). Omitting the *print-dup* binding works but I need that because I've defined EDN representations for other data in terms of the print-dup multimethod.
09:50tsdhOf course, I could use clojure.core/read with *read-eval* set to true to read that back but I'd prefer to be able to use clojure.edn/read.
10:06justin_smithReefersleep: what was the secret?
10:11luxbockI really wish when-let and if-let allowed multiple bindings
10:11Reefersleepjustin_smith: I had misspelled a reference, which was a minor obstacle
10:12justin_smithluxbock: I forget what it is called, but flatland/useful has something like this
10:12Reefersleepjustin_smith: but really, after restarting the REPL with the correct dependencies in my project.clj, all I needed to do was to ggcpG followed by :e
10:12Reefersleepit was the :e step that I think tripped me up
10:12justin_smithawesome
10:13ReefersleepI'm now trying to figure out how I can automatize it, I don't want to type that out all the time
10:13luxbockjustin_smith: there's a lot of great stuff in many utility libraries, but I don't really want to add them as a dependency for something I need to use once
10:13Reefersleeplooking through .vimrcs on github
10:13justin_smithluxbock: fair enough - useful tends to be, dare I say... useful, so pays off a few times once added to a project.
10:14luxbockjustin_smith: also if I'm working on someone elses project then adding a new dependency like that feels a bit rude
10:14justin_smithReefersleep: regarding the restarting the repl after adding the dep thing, a convenient thing to have in your ~/.lein/profiles.clj is pallet/alembic, which has the function still/load-project which adds all new deps without restarting the repl
10:14justin_smithluxbock: oh, in that case yeah, maybe you can copy paste the def :P
10:16Reefersleepjustin_smith: cool, let me check that out
10:16justin_smithit's one of the things I always want to be present, alongside clojure.tools.trace for debugging and criterium for microbenchmarks
10:18ReefersleepI hear ya
10:18ReefersleepHaven't messed abou with .lein yet, I'll try it now
10:18afhammadhow do you ensure a lib in checkouts folder gets updated in host?
10:18luxbockmaybe someone should create a searchable web site for self-contained useful snippets
10:20luxbockyou could populate it by running a script on a few of the popular utility libraries and inlining any non-core fns
10:26luxbock(try (foo x) (catch Exception e nil)) <-- there's nothing like this in the core lib right?
10:27Reefersleepjustin_smith: what do you put in your .lein/profiles.clj? Just {:user {:dependencies [[alembic "0.3.2"]]} ?
10:27justin_smithReefersleep: that's about it, yeah
10:28justin_smiththen in a repl (require '[alembic.still :as still]) (still/load-project)
10:28justin_smithor (still/distill '[[som.lib "version.whatever"]]) to just try a random lib
10:32Reefersleep_justin_smith: Sorry, got thrown off, there. What do you have in your .lein/profiles.clj to enable reloading of dependencies - and how do you reload?
10:32justin_smithReefersleep_: the :user thing in my profiles.clj
10:33justin_smiththen (require ...) and (still/distill ...) or (still/load-project) as I specified above
10:33Reefersleep_Aha. :)
10:33Reefersleep_let me try it out.
10:36luxbockis there any reason why `keys` shouldn't work on vectors as well? it'd be a bit shorter to type than (range (count v))
10:37gfredericksluxbock: I can't think of any
10:39Reefersleep_justin_smith: Just (still/load-project) in the REPL after starting it with lein repl inside the project root?
10:39justin_smithwhile you are at it you could extend it to work on sets too
10:39gfredericksluxbock: though maybe you could argue that because (seq v) doesn't give you a seq of entries that you could call `key` on...
10:39justin_smithReefersleep_: after requiring alembic.still and adding a new dep to the project.clj, yeah
10:41Reefersleep_justin_smith: so: lein repl - (require alembic.still) - (still/reload-project) ?
10:41justin_smith(require '[alembic.still :as still]) (still/load-project)
10:41Reefersleep_aaah
10:41Reefersleep_I suck at dependencies :/
10:42justin_smithrequire is a little weird outside the ns block
10:42Reefersleep_Maybe this is the wrong channel to ask questions like these - maybe they belong at #clojure-beginners ?
10:43justin_smithReefersleep_: this channel is fine for beginner questions, #clojure-beginners is handy for when dnolen and Bronsa and puredanger get to discussing compiler internals and people get excited and chatty about that stuff and nobody notices the simple beginner questions
10:43justin_smithfor example
10:44Reefersleep_Thanks a lot, justin_smith, it seems to work. Do you do anything to automagically require the dependency? Like, put it in the .lein/profiles.clj, too?
10:44Reefersleep_justin_smith: Cool, I will continue on, then :)
10:45justin_smithReefersleep_: clojure doesn't by default do much "magic" - the opinionated preference is to have explicit require or use to pull things into scope
10:45justin_smiththat said, there are libs like vinyasa for those who want a bit more automation of ns stuff in their dev environment
10:45Reefersleep_Alright. Think I'll write a little ;;note in that .lein/profiles.clj file...
10:50r4viis there a way to auto-partial an entire namespace? if I'm using a api client library which takes *oauth-creds* as first param to every function; I'm working in the repl and don't want to bother passing them every time is it possible to create a new ns from the foo.client.api -> user.repl.api that replicates each fn in foo.client.api except it's all partials with the first param already supplied?
10:51justin_smithr4vi: you could write a macro that does that. the magic function to help with that would be ns-publics
10:52justin_smithI would iterate over the map returned by ns-publics, deref each var and check for an ifn, and generate a partial for each ifn, then intern that to another namespace (via intern or def, your choice)
10:52r4vicool - doesn't seem too hard.. thanks
10:52justin_smithr4vi: http://conj.io/store/v1/org.clojure/clojure/1.7.0-alpha4/clj/clojure.core/ns-publics/
10:53gfredericksprobably no reason to have a macro
10:53justin_smithin fact, now that I think of it, if you used intern instead of def it wouldn't even need to be a macro
10:53justin_smithgfredericks: exactly
10:53gfredericksif you're going to be mucking with low-level var/ns functions anyhow
10:53justin_smithgfredericks: it would just be def's macro contagion
10:54r4viok another question (related) what do other people do when working with libs like this?
10:56justin_smithr4vi: I usually go ahead and use the oauth-creds arg, to be honest
10:56r4vijust do (def creds {username "foo" token "foobarbaz"}) then (api/get creds 123)
10:56justin_smithright
10:57justin_smithor make a component, where the creds come in as an initialization
10:57justin_smith(as in stuartsierra/component, my favorite lib right now0
10:57justin_smith)
11:00Reefersleep_Does anyone know how to get vim-clojure-highlight to automatically do ClojureHighlightReferences? I think it feels a bit awkward having to do :e after having done cp[movement]
11:00Reefersleep_I've tried putting au BufRead *.clj ClojureHighlightReferences in my .vimrc, but no luck. (I'm not good with the au syntax)
11:02r4vijustin_smith: reading about it now
11:07ionthas_Reefersleep: I have the same problem. I didn't solve it yet.
11:22Reefersleep_ionthas_: What have you tried?
11:22Reefersleep_Or do you have an idea of where to go?
11:45Reefersleep_ionthas_ / justin_smith: Well, I got a first step of the way.
11:46Reefersleep_I put this in my .vimrc:
11:46Reefersleep_nmap l cpr :ClojureHighlightReferences<CR>
11:46Reefersleep_which means that pressing l in normal mode will first do cpr, then :ClojureHighlightReferences
11:46Reefersleep_I tried doing nmap cpr cpr :ClojureHighlightReferences<CR>, but no dice :/
11:54heuristReefersleep_: maybe try something horrible like: nnoremap <silent><buffer> cpr :if expand('%:e') ==# 'cljs'<Bar>Require<Bar>else<Bar>RunTests<Bar>endif<CR>:ClojureHighlightReferences<CR>
12:06Reefersleep_heurist: cheers :) Doesn't seem to work, though
12:07Reefersleep_if I do :nmap after adding your contribution, heurist, it reports:
12:07Reefersleep_n cpr *@:if expand('%:e') ==# 'cljs'|Require|else|RunTests|endif<CR>
12:10Reefersleep_So it looks like the ClojureHighlightReferences<CR> part is not added for some reason
12:11irctc_How do I open Vim mode in Light Table?? o(一︿一+)o
12:11heuristReefersleep_: did you change buffers after that? the @ in the mapping means is it for that buffer only. Maybe leave the <buffer> part out of the mapping command, or do it in an autocommand.
12:14justin_smithirctc_: I think at this point light table should be considered a cool way to dive into clojure for newcomers, but not a good choice as a long term primary editor? I could be wrong about this, but I don't think its very actively developed at this point, and there are not many people using it to do their day to day coding.
12:14oddcullyl in normal mode?
12:15heuristoddcully: right...
12:15Reefersleep_heurist: I did :vim ~/.vimrc, edited my stuff, :wq, :vim [path-to-my-.clj-file], then cpr
12:16Reefersleep_heurist: tried both with and without <buffer>, no difference
12:16Reefersleep_oddcully: I just selected some random key :)
12:16oddcullyam i missing something or would this not just rob you of moving your cursor around?
12:16justin_smithReefersleep_: you must use the arrow keys like some kind of heathen, huh :)
12:16Reefersleep_It would and did and I quickly got rid of it
12:16justin_smithahh
12:16Reefersleep_certainly not! :)
12:17Reefersleep_There'd be no point in Vim then (for me)
12:17heuristReefersleep_: if you change to a clojure buffer, run that mapping (with the <buffer>) and then do :map cpr what does it say? it should overwrite the current buffer's mapping.
12:21Reefersleep_heurist: after switching to a Clojure buffer and doing the mapping and then doing :map cpr, I get n cpr *@:if expand('%:e') ==# 'cljs'|Require|else|RunTests|endif<CR>:ClojureHighlightReferen ces<CR>
12:21Reefersleep_, so it looks good
12:21clojurebot#error {\n :cause "Unable to resolve symbol: so in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: so in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6543]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: so in this context"...
12:21heuristReefersleep_: then try something like this in your .vimrc, or in an after file so it overrides fireplace's autocommand: autocmd FileType clojure nnoremap cpr ...
12:21Reefersleep_heurist: just what I was about to say
12:22Reefersleep_I learned a little today :)
12:22Reefersleep_heurist: you mentioned it was horrible, though. Why, exactly?
12:23heuristReefersleep_: most of my "off the top of my head, not trying it out myself" ideas are horrible, there must be a better way to do it. (:
12:23Reefersleep_hehehe
12:28Reefersleep_heurist: wrestling a bit with the .vimrc autocmd
12:28Reefersleep_"autocmd FileType clojure nnoremap cpr ..." does not seem to work
12:28Reefersleep_feel like there's a little thing missing
12:31heuristReefersleep_: fireplace is adding another autocmd later, try adding yours to ~/.vim/after/clojure-highlight.vim (check the exact filename, I am guessing).
12:33Reefersleep_I don't have a /after inside ~/.vim
12:33Reefersleep_*an
12:33Reefersleep_heurist :/
12:34heuristReefersleep_: it can
12:34heuristReefersleep_: it can't be that hard to make one (:
12:34Reefersleep_well no :) But I have no idea what I'm doing. Is reading the /after folder a part of Vim's base functionality?
12:35Reefersleep_From what you first said, I thought it might be something that vim-fireplace had introduced into ~/.vim
12:35Reefersleep_or maybe vim-clojure-highlight
12:35oddcullyyou can also go for ~/.vim/after/ftplugin/clojure.vim
12:36oddcullythis gets executed last for all clojure files
12:36Reefersleep_aha
12:36Reefersleep_There's so much to keep track of in configuring Vim :/
12:36oddcullyused this recently to remove `/` from keyword detection after fireplace
12:36heuristReefersleep_: it is standard vim. after loading all your config files and plugins, vim then loads all the files in the after/ directory in the same way. so you will need to put your file in ~/.vim/after/plugin/filename.vim.
12:37Reefersleep_cheers oddcully/heurist
12:37heuristReefersleep_: yeah, after/ftplugin sounds like the right place.
12:37Reefersleep_what does ftplugin refer to?
12:37Reefersleep_trying it out now
12:38heuristReefersleep_: file type plugin they only load for that file type.
12:38Reefersleep_aaaaaaaaaah
12:38oddcullyas in pain or joy?
12:38Reefersleep_revelation
12:38Reefersleep_^_^
12:38oddcullyahh!
12:39heuristReefersleep_: you want "revelation"? try :tab help after replace "after" with whatever you you want to know more about. the vim docs are good.
12:39oddcullyif you open a file xxx.cljs e.g. and do `set ft` you will see the detected filetype there
12:39oddcullyi find the way over (after)/ftplugin alot easier to manage than autocmd stuff
12:41Reefersleep_heurist: I guess so, I tend to find that they have too much general information for me. Maybe it's harder for me to read docs because English is my second language, or maybe I'm just an impatient reader :/
12:41heuristReefersleep_: oddcully makes a valid point, you can maybe just add the map command to the after/ftplugin instead of adding a autocmd to that file. try both, see which works.
12:41Reefersleep_oddcully: I see your point there
12:43Reefersleep_heurist/oddcully: well, I tried just adding the command (nnoremap <silent ...), but that doesn't seem to work
12:43Reefersleep_adding the autocmd worked. Yay!
12:44Reefersleep_I should write a blog post on this :/
12:45Reefersleep_oddcully/heurist: So, the result so far is that I have a ~/.vim/after/ftplugin/clojure.vim with the following line: autocmd FileType clojure nnoremap <silent><buffer> cpr :if expand('%:e') ==# 'cljs'<Bar>Require<Bar>else<Bar>RunTests<Bar>endif<CR>:ClojureHighlightReferences<CR>
12:45Reefersleep_So the next step would be to make it work for movements other than cpr, such as cpG, for example
12:46oddcullyi'd say, that you don't need to write autocomd there any more
12:46heuristReefersleep_: I am guessing that the fileplace autocmd is getting in the way, and now your autocmd is killing it. they are probably both still running, you might want to try something like augroup fireplace_require autocmd! youraucmd augroup END to clean that up. or not bother.
12:46oddcullyat this point it is already clear, that this is a clojure file
12:46oddcullyjust do your nnoremap
12:49heuristReefersleep_: the need to repeat the process for each command is only *one* of the reasons it was a "horrible solution"
12:49Reefersleep_oddcully: the nnoremap alone does not work
12:50Reefersleep_heurist: I could try that, but now I noticed a different problem: :ClojureHighlightReferences kills my rainbow_parentheses
12:50Reefersleep_all of my parens are one colour now
12:50Reefersleep_after doing cpr
12:51Reefersleep_I feel like I need cpr
12:51Reefersleep_I've spent a whole afternoon trying to configure Vim. Stuff like this makes me reconsider trying Emacs.
12:51justin_smithReefersleep_: what you are doing now is nothing in comparison to upgrading a cider version, in my experience
12:52Reefersleep_*brain explodes*
12:52heuristReefersleep_: /urgh now you add a rainbowToggle (x2) to the command, and so it goes. sounds like you need to write a bug report on the highlight plugin rather then a blog post (:
12:54Reefersleep_heurist: I could try that. With stuff like this, I tend to get a bit confused, though - I'm not even sure where I think the bug resides, there are so many intermingling elements. Seems like vim-clojure-highlight would be a good place to start, though.
12:54heuristReefersleep_: I would think about looking for a autocmd hook for "after running a command (cp*)" and have the run your highlight update and rainbow fix. not sure what autocmd rule that would be though, you will need to check the docs or ask in #vim
12:56heuristReefersleep_: I assume this "dynamic highlight" that you are fighting with? I only the static version.
12:56Reefersleep_heurist: Correct on dynamic highlight
12:57Reefersleep_Writing it like this in ~/.vim/after/ftplugin/clojure.vim does not work: autocmd FileType clojure nnoremap <silent><buffer> cpr :if expand('%:e') ==# 'cljs'<Bar>Require<Bar>else<Bar>RunTests<Bar>endif<CR>:ClojureHighlightReferences<CR>:RainbowParenthesesToggle<CR>:RainbowParenthesesToggle<CR>
12:57Reefersleep_I can't :RainbowParenthesesToggle manually either
12:57Reefersleep_rainbows are dead after cpr
12:58heuristReefersleep_: after your "new and improved cpr"? or after normal cpr as well?
12:58Reefersleep_:RainbowParenthesesActivate doesn't work either
12:58Reefersleep_heurist: I think it's ok with normal cpr
12:58Reefersleep_let me just try
12:59heuristReefersleep_: also try see if just doing :ClojureHighlightReferences kills your rainbows.
13:00Reefersleep_heurist: :ClojureHighlightReferences is the sinner
13:01heuristReefersleep_: so lots of bug reports for dynamic highlight. check the bug tracker to see if others have had the same experience and if they have found workarounds or solutions. (for both problems)
13:02Reefersleep_I will, cheers heurist
13:04Reefersleep_heurist: I think I've mislead you, the plugin I've been trying to get to work is vim-clojure-highlight
13:05Reefersleep_and one guy had a similar problem (though with the niji parens plugin)
13:08heuristReefersleep_: when originally looking at the assortment of rainbow plugins I did notice that they where mostly 90% the same code, so it does not surprise me that that same issue happen with more than one of them. I can mot comment on vim-clojure-highlight though.
13:17Reefersleep_heurist: what is the dynamic highlighting, you were talking about?
13:17Reefersleep_-,
13:19heuristReefersleep_: I think it was the plugin you referred to, that was just to distinguish it from https://github.com/guns/vim-clojure-static
13:21Reefersleep_heurist: My initial assumption was correct, then :)
13:21Reefersleep_(that you were indeed talking about vim-clojure-highlight)
13:22Reefersleep_heurist: this confuses me, though. You wrote: "so lots of bug reports for dynamic highlight." Where did you see this?
13:22heuristReefersleep_: you need to write them. you found the bugs.
13:23Reefersleep_Ah, I thought you found an existing list of them :)
13:24Reefersleep_heurist: Alright, I'll get to work.
13:24Reefersleep_heurist: I've got other problems, too, like weird indentation after gg=G'ing
13:24Reefersleep_heurist: No matter what I do, I cannot get sane indentation in a clojure file with a number of nested forms
13:25Reefersleep_heurist: But maybe this is a problem for another day. Do you know if it's a common problem, though?
13:25heuristReefersleep_: is that with vim-clojure-highlight? I have not had issues with indenting.
13:26Reefersleep_That was before vim-clojure-highlight
13:27Reefersleep_I've tried with an empty .vimrc, I've tried disabling every indentation-related line in my .vimrc one by one
13:27Reefersleep_heurist: Sometimes, wrongful indentation at one place will be fixed, only to be replaced by wrongful indentation at a different point in the file.
13:28Reefersleep_heurist: When talking about disabling lines in my .vimrc, that includes plugins such as vim-fireplace
13:30Reefersleep_It's so weird. And very, very annoying. :(
13:32jbwivhello, posted this on #clojure-beginners with no luck, so thought it was worth asking here...
13:32jbwivwhat's the best, most current book from which to learn clojure for an experienced developer with only slight lisp experience? So slick that by experience, I really mean reading this (http://www.defmacro.org/ramblings/lisp.html) :-)
13:33url-10:32 *** tomphp QUIT Client Quit
13:33url-Reefersleep_: You can try my vim setup if you want. https://github.com/earle/vimrc
13:33url-Reefersleep_: may be a good time to switch to emacs though :)
13:35Reefersleep_url-: I'm tempted :) justin_smith said that there are similar problems in Emacs, though.
13:37Reefersleep_url- can I get you to try and touch a .clj with the code I've written and do gg=G, and see if it looks correct?
13:37Reefersleep_heurist: same question
13:37oddcullyReefersleep_: make a gist,refheap,...
13:39Reefersleep_oddcully: here you go
13:39Reefersleep_https://gist.github.com/Reefersleep/b1b2b35eacec6e7a33c6
13:40Reefersleep_I'm sure the code is horribly unidiomatic :)
13:40Reefersleep_Been wanting to clean it up.
13:42oddcullyReefersleep_: breaks the same for me. my guess would be the \[
13:43Reefersleep_oddcully: I had the same suspicion and changed the [ to .
13:43Reefersleep_oddcully: no difference
13:44oddcullyhmm no. it just falls appart
13:44Reefersleep_oddcully: With a different combination of plugins, don't know exactly which, \[ did indeed break the indentation, but here, it seems like it just gives up
13:44Reefersleep_Maybe it's telling me to write smaller functions
13:44Reefersleep_:)
13:45Reefersleep_Alright, amazing to find that it was just not my unique setup that caused this.
13:45Reefersleep_oddcully: I guess now we figure out what exactly controls the indentation for our setups and report a bug to the rightful maintainer?
13:47mikerodI was trying to setup a large set of tests to run on multithreads to improve their runtime performance. This was looking pretty optimistic without huge changes, until I realized we had some usages of with-redefs out there.
13:47mikerodso to accomplish this sort of testing, we'd have to do some overhaul in those cases where we wanted something like a mock (not very common, but it does come up from time to time).
13:48mikerodI was curious if others had ran into this before.
13:48mikerodIt'd be nice to have something like a with-redefs that locked access to the var.
13:48mikerodI guess that could be implemented
13:48oddcullyReefersleep_: i killed the first two cond statements and then it looked ok
13:48mikerodI just found this to be of interest
13:49Reefersleep_oddcully: I'm seeing the same
13:49mikerodI know with-redefs isn't a good idea, but in testing I think it may be somewhat common. and its usage can lead to unsafe multithreading, which sucks when you could speed up testing quite a bit over like 8 cores.
13:50mikerodand separate JVMs is a much higher bar to shoot for
13:50oddcullyReefersleep_: only removing one of the two looks ok except the :else branch
13:50Reefersleep_oddcully: let's zoom in. Seems like it's either the number of cond statements or the nesting in the same
13:51heuristReefersleep_: I am not at a machine that can test your code. But, since oddcully appears to get the same formatting there is not much point. Learning emacs is a good idea anyway though, even if you do not end up using it much, better than having to learn ed, but knowing a bit of ed is good too, saved me a few times. (:
13:51opqdonutmikerod: how about binding?
13:51opqdonutmikerod: and have all your multithreading use binding-conveyor-fn
13:51mikerodopqdonut: yes, that'd work if you setup your vars to be dynamic
13:51opqdonutyeah having them dynamic is a bit of a performance hit
13:52mikerodwhich is probably not desired
13:52mikerodperf hit + a semantics change in the real code to facilitate a tests
13:52mikerodtest*
13:52mikerodI tend to not desire that
13:52mikerodI'd rather just have a big locking mock
13:52mikerodso if two threads hit that mock at one point, they can just block
13:52opqdonutyou can just do (locking var ...) I guess
13:52justin_smithmikerod: my preference is the pattern of abstracting things that interact with the "outside world" such that they are explicit args, that can be replaced while running tests. Their default provision can be part of a thin wrapper.
13:53mikeroddue to our infrequent use of mocking, I think it'd be mostly unblocked threads still
13:53opqdonutyeah, injecting is the standard option
13:53Reefersleep_heurist: I guess I'll get around to emacs sometime - the lure of rewriting the editor in a lisp is great :)
13:53oddcullyReefersleep_: could be just length. removing something from the middle fixes one later block
13:53mikerodjustin_smith: yes, I agree. using with-redefs is a pretty rare thing
13:53Reefersleep_oddcully: seems to me like it's the number of statements
13:53mikerodbut we had one point of interacction that many tests may be interested in - and with-redefs breaks them from being threadsafe
13:53sorbo_I feel like I'm just about ready to switch from Vim -> emacs + evil mode
13:53mikerodone or two*
13:54heuristReefersleep_: every time I have to look I vimscript I weep.
13:54Reefersleep_oddcully: Not the depth of nesting - try to remove depth from one of the statements, it makes no difference.
13:55oddcullyReefersleep_: 8 on the same level?
13:55heuristsorbo_: emacs + evil is not bad to work in, possibly better than vim itself; emacs is just to slow though.
13:56justin_smithheurist: depends on what you are trying to make emacs do, eg. it's much faster without cider. Root is that emacs is single threaded, and cider asks for it to do a bunch of background work.
13:56Reefersleep_heurist: I feel a bit flustered about this whole afternoon, for sure. Not because of vimscript, though.
13:56justin_smithheurist: for example, on my machine emacs is snappy, for coworkers it has a painfully slow refresh rate.
13:56Reefersleep_oddcully: I thought so, but if I remove depth from a number of them, they are indented correctly
13:56sorbo_heurist: slow how? I remember reading some anecdotal stuff on its requiring more system resources
13:57sorbo_yeah, I was thinking skipping cider at first
13:57sorbo_plus I mean
13:57justin_smithsorbo_: it's not emacs core that is doing it, it's bad elisp code.
13:57sorbo_I'm used to lein and JVM start times
13:57sorbo_so my definition of slow has changed over time :)
13:57justin_smithhaha
13:57heuristjustin_smith: mainly startup time. as a sysadmin I very often start an editor, make a small change and exit again, I can do all this in vim faster then many of the overworked servers can start emacs (:
13:58justin_smithheurist: emacs has a server mode, where instead of starting a new process you can connect to a running instance
13:58justin_smiththis even works when you ssh in, even if hte emacs was a GUI instance
13:58xemdetiaheurist, or you can use tramp from a continious session
13:58sorbo_oh nice
13:58xemdetiatramp is nice because you can view files as buffers from multiple servers and ediff them or whatever is necessary
13:59justin_smiththe server can give you a UI within your terminal, or in a new window, but it's part of the running emacs. But admitted, I am just using vi for quick editing tasks (especially ones where I need to edit as root)
13:59Reefersleep_oddcully: I tried removing the depth from all but the :else statement
13:59Reefersleep_oddcully: Indentation is correct
13:59heuristjustin_smith: sure, but server mode does not help when sshing into a server making a quick change and then leaving. If I was doing long term programming more then I would use server mode and might not care as much. but sadly that is not my life :)
14:00justin_smithheurist: you can use tramp, from the emacs on your home box
14:01justin_smithheurist: but sometimes emacs is just too much, even just for startup time reasons, sure.
14:01Reefersleep_oddcully: I succeeded in breaking it a different way
14:02Reefersleep_oddcully: git coming
14:02Reefersleep_*gist
14:02heuristjustin_smith: might be true (will look at tramp) but I do not have the ability to install stuff on some of the server I work on, so I will probably stay with vi or ed.
14:02justin_smithheurist: tramp uses sh, ed, cat
14:02justin_smithhopefully you have those things installed
14:02Reefersleep_oddcully: https://gist.github.com/Reefersleep/d0ed08a3f2915db25138
14:02justin_smithmaybe it is sed rather than ed? I forget
14:03oddcullyReefersleep_: i tried a (cond) with several simple statements, but not as many
14:03heuristjustin_smith: cool, thanks. though I am a old-time vim user, so it will be hard to justify the change (:
14:03justin_smithheurist: every time you open a file via tramp it ensures you have an ssh to that host, opening a file invokes cat, saving changes invokes cat, or ed
14:03justin_smithso the remote host just thinks you are doing it cave man style :)
14:04heuristjustin_smith: been there, done it cave-man-style.
14:04oddcullyReefersleep_: at least the later one would make a reasonable example to show the problem
14:05Reefersleep_oddcully: I feel more empowered now after having identified the problem as not unique to me and after having shown it in two different situations :) But how do we figure out where the bug should be filed?
14:05justin_smithheurist: I don't have much to gain by trying to convince you to use emacs in this situation, but at least you now know it's possible without any special remote install
14:06oddcullyReefersleep_: i'd check if the clojure files comes with plain vim (i'd guess so) and report it there
14:06Reefersleep_I think they do
14:06Reefersleep_I read that vim-clojure-static is included in vim
14:07Reefersleep_if that's what we're discussing :)
14:07oddcullyReefersleep_: i have my doubt's that a plugin messes it up - maybe fireplace by fiddling with the keywords. that i'd make sure first
14:07xemdetiaheurist, when I use tramp I connect to limited servers or servers I don't have tooling on so I can bring my tooling to the problem. :)
14:07heuristjustin_smith: yes, appreciate that. googling tramp now.
14:08Reefersleep_oddcully: Oh yeah, thinking back, I think it's actually a plugin. I think I'll get different results with a completely commented out .vimrc
14:08Reefersleep_lemme check
14:09heuristxemdetia: agreed, except my tooling is vim, I sometimes use its scp editing command :r scp://server/file but not very often.
14:09oddcullyReefersleep_: plain vimrc works :*)
14:09oddcullyReefersleep_: and it's alot faster
14:09oddcullyReefersleep_: do you have paredit?
14:09xemdetiaheurist, true- I usually don't even have vim. Just plain vi
14:10heuristxemdetia: pretty much the same thing for me, been using vi since before vim, though not many systems have vi that is not vim anymore.
14:10oddcullyReefersleep_: o well it does not. now main at :else level
14:11Reefersleep_oddcully: plain vimrc does not work for me
14:11justin_smithheurist: eg. :e /ssh:justin@noisesmith.org:.profile (with evil mode turned on, that is)
14:11Reefersleep_super weird stuff happening
14:12Reefersleep_the "(defn interpret" line is indented, to begin with
14:12Reefersleep_a number of the cond statements are aligned, then a following number of them are a bit further to the left
14:12heuristjustin_smith: or :e scp://justin@noisesmith.org:.profile in vim if I recall correctly.
14:13Reefersleep_I'm talking about the gist with the many shallowly nested forms, here
14:13oddcullyReefersleep_: ignore my "it works" the file is just so huge i have to squit really hard to see it falling appart. the problems are way more subtle
14:13justin_smithheurist: cool
14:13Reefersleep_hehe oddcully
14:13Reefersleep_So
14:13Reefersleep_oddcullly: bug reports for both Vim and vim-fireplace? :)
14:14oddcullyi'd start with plain vim with the plain vimrc
14:14oddcully(to report to i mean)
14:15Reefersleep_yeah
14:15Reefersleep_Guess I could then proceed to apply plugins one at a time, see if it makes any difference and, if so, report for each of those?
14:15oddcullyi'd wait for the feedback first from core
14:16Reefersleep_Why? Because the others might be based on it?
14:16oddcullythat time might be better spend either trying out emacs or refactoring the code ;P
14:16Reefersleep_good point! :D
14:16Reefersleep_(nobody else ever came upon this problem because nobody got so deep into nested forms)
14:16oddcullyyes. because core has the first level of a problem
14:17oddcullyif it alls magically disappears, then fine. if not you can go the next step
14:17Reefersleep_cheers oddcully
14:18Reefersleep_Alright, got 1 bug report for Vim and 1 for vim-clojure-highlight.
14:20Reefersleep_oddcully heurist justin_smith url- (and whomever I might have forgotten): Thanks for your help :)
14:20oddcullyReefersleep_: cheers!
14:33Reefersleep_ping
14:33justin_smith,ping
14:33clojurebot#error {\n :cause "Unable to resolve symbol: ping in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: ping in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6543]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: ping in this co...
14:33justin_smith~ping
14:33clojurebotPONG!
14:33justin_smiththere we go
14:38dazed_and_amused\exit
14:48elarsonI'm curious if anyone has tried out repose (http://openrepose.org/) and has any thoughts on how difficult it would be to write filters in clojure?
14:49elarsonI'm not a java programmer, but enjoy clojure, so making the link between the two languages is rather opaque
14:53xXx_GAY_POO_xXxsup nigz
14:54xXx_GAY_POO_xXxwho has drugs
14:54xXx_GAY_POO_xXxsrs
14:55url-elarson: You can just run it as a proxy in front of another service. Or you can access the java interfaces directly via Clojure if you like as well.
14:55url-elarson: https://repose.atlassian.net/wiki/display/REPOSE/Proxy+Server+%28Valve%29+Installation
14:56elarsonurl-: right, I'm currently using as a proxy for some python apps, but I'm curious about writing a filter in clojure. if that makes sense.
14:57elarsonmy understanding is I'd create a jar and add it to the ear deployed with repose, but I'm not clear the best way to implement whatever interfaces are required
14:58xXx_GAY_POO_xXx[PHP]
14:58xXx_GAY_POO_xXx;;;;;;;;;;;;;;;;;;;
14:58xXx_GAY_POO_xXx; About php.ini ;
14:58xXx_GAY_POO_xXx;;;;;;;;;;;;;;;;;;;
14:58xXx_GAY_POO_xXx; PHP's initialization file, generally called php.ini, is responsible for
14:58xXx_GAY_POO_xXx; configuring many of the aspects of PHP's behavior.
14:58xXx_GAY_POO_xXx; PHP attempts to find and load this configuration from a number of locations.
14:58xXx_GAY_POO_xXx; The following is a summary of its search order:
14:58xXx_GAY_POO_xXx; 1. SAPI module specific location.
14:58xXx_GAY_POO_xXx; 2. The PHPRC environment variable. (As of PHP 5.2.0)
14:58xXx_GAY_POO_xXx; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
14:58xXx_GAY_POO_xXx; 4. Current working directory (except CLI)
14:58xXx_GAY_POO_xXx; 5. The web server's directory (for SAPI modules), or directory of PHP
14:58xXx_GAY_POO_xXx; (otherwise in Windows)
15:06wasamasaright
15:07elarsonwasamasa: I'm thinking I could write a plugin that uses clojure rather than xml/xslt for writing filters and do it that way
15:07wasamasaelarson: I was refering to the accidental spam
15:08elarsonwasamasa: ah right :)
15:35chouserwasamasa: I think you'd have to find a Java API to hook your Clojure into
15:52borkdudewhat is the boot equivalent of lein repl?
15:52borkdudedon't tell me it is boot repl
16:09gfredericks,(type #=(clojure.lang.PersistentTreeSet/create (1 2 3)))
16:09clojurebot#<RuntimeException java.lang.RuntimeException: EvalReader not allowed when *read-eval* is false.>
16:09gfredericks^ can somebody confirm that this creates a hash set and explain me why the hell?
16:10chouserneat!
16:10Bronsai know why
16:11Bronsaone sec
16:12hiredmanbecause the compiler?
16:12chouserI'm thinking it must go through a print/read cycle
16:12amalloygfredericks: the reader reads it as a tree set, but then you evaluate it, and the evaluator probably doesn't expect to see a treeset
16:12hiredmanyeah to be emitted in the byte code
16:12hiredmanand the compiler just says "oh, a set is a set"
16:12Bronsayeah
16:12gfredericksokay phew
16:12gfredericksthat's less crazy
16:12Bronsahttp://dev.clojure.org/jira/browse/CLJ-1460 maybe this
16:13gfrederickscool thanks
16:14BronsaI came to the conclusion that embedding in code collections that are not PAM/PHM/PV/PL should be disallowed
16:17hiredmanICanBeSerializedToByteCode
16:17Bronsathat wouldn't be such a bad idea actually :)
16:18gfredericks,(binding [*print-dup* true] (pr-str (sorted-set 1 2 3)))
16:18clojurebot"#=(clojure.lang.PersistentTreeSet/create [1 2 3])"
16:18gfredericks,(clojure.lang.PersistentTreeSet/create [1 2 3])
16:18clojurebot#error {\n :cause "clojure.lang.PersistentVector cannot be cast to clojure.lang.ISeq"\n :via\n [{:type java.lang.ClassCastException\n :message "clojure.lang.PersistentVector cannot be cast to clojure.lang.ISeq"\n :at [sandbox$eval71 invoke "NO_SOURCE_FILE" -1]}]\n :trace\n [[sandbox$eval71 invoke "NO_SOURCE_FILE" -1]\n [clojure.lang.Compiler eval "Compiler.java" 6792]\n [clojure.lang.Compile...
16:18gfredericks^ so what's up with the vector there?
16:19Bronsahttp://dev.clojure.org/jira/browse/CLJ-1461
16:19justin_smithI like that ICanBeSerializedToByteCode reads like a first person statement
16:19TimMcTHat's how I read it!
16:19hiredmanvectors are not seqs...
16:19justin_smith~hiredman can be serialized to bytecode.
16:19clojurebotGabh mo leithscéal?
16:19gfredericks~Bronsa is a reference for anything weird you find at your repl
16:19clojurebotRoger.
16:19TimMcI didn't get that it used the I-for-interface convention until you mentioned that. :-P
16:20amalloyjustin_smith: a first person statement, read in a robot voice
16:20gfredericksTimMc: justin_smith: same
16:20TimMc~hiredman |can be| serialized to bytecode.
16:20clojurebotAck. Ack.
16:20Triclops256Probably a silly question, but what is the legal standing on publishing a wrapper library around a java library on github with no explicit license.
16:21Triclops256Clarification: The java library has no explicit license, I'd like to license with an appropriate open source license
16:22TimMcTriclops256: Sounds bad.
16:22Triclops256https://github.com/leebyron/mesh is the lib
16:22justin_smithTriclops256: you could try submitting a PR that would specify your preferred license?
16:22hiredmanit doesn't really matter
16:22amalloyTriclops256: you certainly can't rerelease their code with a license of your own
16:23amalloybut as far as i know you are free to create a wrapper that depends on their code, and give it whatever license you want
16:23hiredmanthe original library cannot be used with out a license, so you wrapper will be useless regardless of the license
16:23Triclops256amalloy: I wasn't going to release their code, just a compiled jar in the wrapper
16:24chousergfredericks: yeah, I don't think I get it yet. Manipulating print-method and print-dup doesn't seem to change the behavior of your #=(...) example.
16:24shaymwhen listing a java maven project dependency , does it automatically bring all the dependencies from the pom for that artifact?
16:24justin_smithshaym: via lein or boot, yes, deps are transitive
16:24amalloychouser: i don't think it goes through print/read, it's just that the compiler sees a set, and emits the same code as if it saw #{1 2 3}
16:25amalloybecause it's just like (cond (set? x) (emit-set x) (map? x) (emit-map x) ...)
16:25shaymi keep getting classnotfound exceptions when trying to start JPA from the clojure REPL
16:25justin_smithshaym: is JPA something where there are multiple implementations, and you need to explicitly provide at least one?
16:26shaymjustin_smith, i did add the hibernate impl , and tested the same deps and code in java
16:26TimMcchouser: (class #=(java.util.ArrayList.)) ;; clojure.lang.PersistentVector
16:26justin_smithshaym: odd!
16:26TimMcThis is great.
16:26shaymjustin_smith, sec ill pastebin the 4 lines
16:27hiredmanhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L3094
16:27hiredmanhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6533-L6534
16:28shaymjustin_smith, http://pastebin.test.redhat.com/286133
16:28chouserhiredman: nice
16:28justin_smithshaym: it's saying not available
16:28chouserso we should get the same results from macros, since they expand before analysis, right?
16:29chouserIndeed.
16:29Bronsachouser yup
16:29chouser(defmacro z [] (sorted-set 1 2 3)) (type (z)) ;=> clojure.lang.PersistentHashSet
16:29chouserThat seems even easier to trip over than #=(...)
16:29hiredmanit is actually sort of complicated I think, because emitValue(s) special cases hashsets (but not other kinds of sets) but I am not sure where analysis or emitValue would end up determining the behaviour
16:29Bronsai wasted hours on that
16:30shaymjustin_smith, oops here is the right one http://pastebin.com/Yr15wMYA
16:30hiredmanhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L4706
16:31shaymjustin_smith, and to make things interesting when i use the LT repl it reports a different class as missing
16:31Bronsahiredman: IIRC it depends whether it's a constnat set or not
16:31chouserMan, the compiler wants protocols!
16:32TimMchiredman: Huh, I don't see how my example of java.util.ArrayList => PV happens...
16:33justin_smithshaym: is this applicable? http://stackoverflow.com/questions/9134436/how-can-i-resolve-java-lang-classnotfoundexception-org-hibernate-util-dtdentity
16:33hiredmanthat actually may be a print dup thing
16:33BronsaTimMc: that returns an ArrayList for me
16:33justin_smithshaym: I suspect if you looked at "lein deps :tree" you would see a different set of versions than you expect somewhere
16:34chouserTimMc: must be a different path
16:34chouser(defmacro z [] (java.util.ArrayList. [1 2 3])) (type (z)) ;=> java.util.ArrayList
16:34hiredmanat one point there was some code committed to master that changed some java collections to print as their clojure counter parts
16:34shaymjustin_smith, definitely looks plausible trying it out now
16:34Bronsathey still do
16:34hiredmanbut I believe that was removed/disabled
16:34Bronsa,(java.util.ArrayList.)
16:34clojurebot[]
16:34hiredman(or not)
16:35hiredmanso that is almost certainly a print-dup thing
16:35BronsaTimMc: are you using lein repl?
16:35chouserIn 1.7.0-beta2 I'm getting an ArrayList
16:35Bronsame too chouser
16:36hiredman,*clojure-version*
16:36clojurebot{:major 1, :minor 7, :incremental 0, :qualifier "master", :interim true}
16:36TimMcInteresting.
16:36Bronsa,(class #=(java.util.ArrayList.))
16:36clojurebot#<RuntimeException java.lang.RuntimeException: EvalReader not allowed when *read-eval* is false.>
16:36TimMcBut I'm not printing it, I'm passing it straight to class.
16:36Bronsa,(defmacro x [] (java.util.ArrayList.))
16:36clojurebot#'sandbox/x
16:36Bronsa,(class (x))
16:36clojurebot#error {\n :cause "EvalReader not allowed when *read-eval* is false."\n :via\n [{:type java.lang.ExceptionInInitializerError\n :message nil\n :at [sun.reflect.NativeConstructorAccessorImpl newInstance0 "NativeConstructorAccessorImpl.java" -2]}\n {:type java.lang.RuntimeException\n :message "EvalReader not allowed when *read-eval* is false."\n :at [clojure.lang.Util runtimeException "Util....
16:36Bronsaoh come on
16:36chouser,(binding [*print-dup* true] (prn (java.util.ArrayList.)))
16:36clojurebot#=(java.util.ArrayList. [])\n
16:36Bronsa,(macroexpand-1 '(x))
16:36clojurebot[]
16:36TimMc(class #=(java.util.ArrayList.)) ;;= clojure.lang.PersistentVector
16:37Bronsa,(class *1)
16:37clojurebotclojure.lang.Var$Unbound
16:37TimMc^ No printing involved.
16:37hiredmanthe compiler uses eval reader and prn-dup for some things
16:37shaymjustin_smith, it does look better , i guess the fact that LT was reporting totally different class exceptions was throwing me off
16:37BronsaTimMc: printing/reading is happening during loading
16:37Bronsa,(class (macroexpand-1 '(x)))
16:37clojurebotjava.util.ArrayList
16:37chouserTimMc: What version of Clojure is that? I'm getting different results.
16:37hiredmanTimMc: reader returns a clojure list containing an arraylist, which then has to be compiled to bytecode before execution
16:38hiredmanwhich means everything has to be serialized to bytecode
16:38TimMcchouser: 1.6.0
16:38hiredmanthe compiler lacking any special casing rules will serialize unknown objects to bytecode using pr and deserialize at runtime using read-string
16:39hiredmanhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L4733-L4758
16:41Bronsathe issue is that print-dup either doesn't work for some collections or just emits regular colls
16:41hiredman(which would matter if say ArrayList was printing as [] for whatever reason)
16:42hiredmanactually it calls plain pr I think, no print-dup
16:42TimMcFascinating. That kind of makes sense.
16:42irctcTrying to use lein :prep-tasks to first compile a single java file, then a single Clojure ns, then the rest of the Java files, then the rest of the Clojure files.
16:42irctc:prep-tasks [ ["javac" "com/xyz/prj/MyClass.java"] ["compile" "my-ns.blah"] "javac" "compile" ]
16:42chouserwow, I have so many different clojure jars in my .m2 :-P
16:43irctcBut get javac: file not found: com/xyz/prj/MyClass.java
16:43justin_smithirctc: is com under a subdir?
16:43TimMchiredman: That would explain this: (class #=(java.lang.Object.)) ;;= clojure.lang.Symbol
16:43irctcIt's as if :java-source-paths ["src/main/java"] is not being used as the root.
16:43chouser(class #=(java.util.ArrayList.)) gives me ArrayList on Clojure 1.6.0
16:43BronsaTimMc: wtf is that
16:44BronsaTimMc: you have something behaving weird. that has never ever worked in regular clojure
16:44chouser"Can't embed object in code, maybe print-dup not defined: java.lang.Object@2de186d9"
16:44hiredmanTimMc: you have some library loaded that is screwing with printing
16:44BronsaTimMc: what are you using as your repl? I feel like nrepl or something changes the way your repl prints/reads stuff
16:45irctcjustin_smith: running lein from project root. Call it / and the Java is in /src/main/java
16:45TimMchahaha, I'll check
16:46hiredman,*clojure-version*
16:46Bronsahiredman: I confess I never really understood the difference between pr and pr-dup, where does it matter?
16:46clojurebot{:major 1, :minor 7, :incremental 0, :qualifier "master", :interim true}
16:46chouserBronsa: print-dup tries harder to maintain object type
16:46chouser...though after this discussion I wonder if it succeeds
16:46hiredmanBronsa: I dunno, all I understand is you should only use print-dup if you want everything to break all the time
16:47chouser,(binding [*print-dup* true] (prn (sorted-set 1 2 3)))
16:47clojurebot#=(clojure.lang.PersistentTreeSet/create [1 2 3])\n
16:47chouser,(prn (sorted-set 1 2 3))
16:47clojurebot#{1 2 3}\n
16:48hiredmanbut of course that create method doesn't exist
16:48sandbagsi'd be interested to know if there's anyone here who has successfully used the :processable? decision point in Liberator?
16:48Bronsaso it's either "print in a way that doesn't work" or "print in a way that doesn't preserve type info"? :)
16:48irctcjustin_smith: Yes, from the project root the location of com/xyz/... is under /src/main/java full path= /src/main/java/com/xyz/prj/MyClass.java
16:49hiredmanright
16:49hiredmantypes are dumb anyway, right?
16:49justin_smithirctc: I think javac wants a path, not a classpath relative location - try specifying that full path instead?
16:50TimMcWTF, cannot reproduce.
16:51justin_smithirctc: alternatively, what do you specify as your :java-source-paths option?
16:51BronsaI feel like both the compiler and print-dup must have written with the idea that there would be no c.l.IPersistent* colls outside those in c.l itself
16:51Bronsabut even then..
16:51justin_smithirctc: I think setting that properly would be the right thing
16:51irctcjustin_smtih: rce-paths ["src/main/java"]
16:52irctcjustin:smith: :java-source-paths ["src/main/java"]
16:53hiredmanthe most powerful thing to do for the ICanBeSerializedToByteCode interface would be for it to have a serialize method that basically had the entire compiler exposed to it
16:53hiredmanbut then there would be 3rd party collections that depend on the guts of the compiler, and that'll turn out great
16:53TimMcNonsense, who ever heard of such power?
16:54hiredmanand even with that, serializing as we all know is not something one does simply
16:54irctcjustin_smith: putting the full path doesn't compile the class. No .class generated.
16:54Bronsahiredman: I really don't think there would be any issues with whitelisting what can be embedded
16:55hiredmanand just exploding otherwise?
16:55Bronsaat the class level rather than at the interface level
16:55Bronsahiredman: sure, why not
16:55hiredmandunno
16:55Bronsai'd rather have clojure tell me "you can't embedd this sorted map in code" than assuming i'm fine with a normal map and exploding my app at runtime
16:56chouseror succeeding at write time and failing at read time
16:56Bronsa(sorted-maps can't be embedded ever, because of comparator-fn btw)
16:56chouserright, only the default comparator-fn
16:57chouseroh. maybe not even that?
16:57Bronsathere are obviously classes that can be converted to a normal clojure coll no problem like subvecs/map-nodes
16:57irctcjustin_smith: the output is a compilation error that different Java class can't find a AOT class (my-ns.blah) that should have been created in the 2nd step in prep-tasks ["compile" "my-ns.blah"]
16:58Bronsawell, those actually must be.
16:59irctcjustin_smith: ... when entering the full path (i.e. src/main/java/com/xyz/prj/MyClass.java)
16:59Bronsachouser not with the current impl, no
16:59irctcjustin_smtih: perhaps boot is the answer.
17:00Bronsachouser would be trickier for sorted-sets than for sorted-maps since they comparator is hidden in the underlying sorted-map
17:01Bronsaoh the comparator is a public field
17:01Bronsa,(.comparator (sorted-map-by >))
17:02clojurebot#object[clojure.core$_GT_ 0x3d24069e "clojure.core$_GT_@3d24069e"]
17:07ionthas_Is there any point into using concurrency if the target machine only has one core?
17:07ionthas_when I say point i mean benefit.
17:07ionthas_(performance wise)
17:08justin_smithionthas_: code that is more readable because it isn't all fragmented into callbacks
17:08justin_smithperformance wise? none
17:08justin_smiththough concurrency makes it easier to write code that is responsive, it can't do anything on a single processor that other code could not
17:09ionthas_thanks justin_smit :)
17:12Triclops256Alright, so, I have a jar file which is not on maven central that I want to distribute with my clojure project. How do I 1.) include it with the jar deployed to clojars [currently it's in my resources folder] and 2.) allow the clojure code to load it into the classpath?
17:12Triclops256Also, I should mention, the jar does allow redistribution
17:15TimMcBronsa, hiredman: I can't reproduce it! That is quite upsetting.
17:16TimMcI put all my dependencies back and the behavior has disappeared.
17:18url-cd
17:18justin_smithls
17:18lazybotlib lost+found media opt run
17:20irctcjustin_smith: got the Java/Clojure stuff working manually. First compile Java by hand, then lein compile, fails the first time because lein is creating a subdir under target called target\base+system+user+dev\classes move the java .class file to the new dir and run lein compile again. Yuck!
17:44amalloyjustin_smith: i don't think that's true. single-core machines can benefit from concurrency, by having multiple threads blocking on IO while one does cpu work
18:23TimMcTriclops256: The jar should really be deployed to repository somewhere. You don't want to include it in your project.
18:33justin_smithamalloy: my thought was that there would always be an equivalent single threaded program that has what would effectively be unrolled coroutines.
18:33justin_smithI guess we could argue semantics about whether that is concurrency
18:34amalloyand about whether that is a program anyone who is not insane or a node.js programmer would actually write
18:37spiedenanyone aware of companies hiring remote clojure devs? i'm checking out sonian and datastax so far
18:43kwladykais it easy to get hosting with datomic with good price?
18:43kwladykai am thinking about which database should i use
18:43kwladykaalways i used only MySQL
18:44drojas_anyone knows any way to use core.match with hashsets?
18:44kwladykai need database for web applications
18:44drojas_kwladyka: I'd suggest you to look at graph databases, but the best choice depends on what is your project about
18:45drojas_neo4j is a good start for graph databases btw
18:45ed-gkwladyka, for what its worth I'm really happy with Postgres + Yesql.
18:46kwladykabut what with hosting later? Is it easy to run Clojure + something else then Postres or mysql? (with good price)
18:47ed-gI was shopping around for hosted databases and compose.io seemed good
18:47ed-gcheck clojure-toolbox.com for all kinds of database libraries
18:47lvhkwladyka: it's just as hard as it is running with any other language
18:48lvhkwladyka: managing databases is nontrivial, so if you don't want to do it you should pay someone to
18:48lvhkwladyka: Amazon has RDS, Rackspace has Cloud Databases, ObjectRocket has MongoDB, Heroku has managed Postgres...
18:50kwladykai am thinking about solution similar to heroku, but i didnt have any ocasion to use something like this before. I don't want care about server, but from other hand i am afraid of cost solutions like Heroku.
18:51lvhkwladyka: Can't have your cake and eat it; either it's your problem or someone else's.
18:51lvh(hint: if unsure, the correct answer is "someone else's"
18:52lvhkwladyka: the other options are cheaper
18:53lvhkwladyka: heroku has a free tier; a cheap rackspace db is 40/mo
18:53kwladykaas i see heroku and others solutions dont have datomic?
18:54kwladykaoh datomic working with other DB...
18:54kwladykaok i know too less about this now :)
18:55ed-gkwladyka, it sounds to me like you want to define your budget, and the important properties for your database, and how much time you're willing to spend on maintainance, and how much you want to learn about db administration. then I think it will be easier to make the decision.
18:56kwladykai think the problem is i didnt use other solutions then MySQL and hosting / own servers and i don't really feel how other solutions work
18:57ed-gkwladyka, compose.io has free trials, also databaselabs.io (postgres only) so you can try them out. even Amazon RDS has a free trial I think.
18:58kwladykabut how solutions like datomic works, because i am a little confuse. Is it storage engine or is use other storage engines?
19:00kwladykaas i understand it is interface to use other storage engines
19:04spiedenkwladyka: yes, datomic lets you pick which storage backend to use with it
19:05justin_smithkwladyka: consider the fact that a db like postgres happens to use files on disk
19:05justin_smithin a similar way, datomic happens to use postgres
19:05justin_smithbut it has its own semantics and rules that are not identical to those of postgres
19:06kwladykammm so at the end: for new projects (small i guess) do you recommend use free datomic or use free solutions like clear Postgres?
19:07kwladykaoh datomic free is only for open source
19:08kwladykaok but there is datomic pro starter
19:10spiedenyes, which i believe is free to use for small commercial deployments. i could be wrong
19:10tcrayford____it is, as long as you're accepting that you won't get software updates after 12 months
19:18kwladykatcrayford____, this is a good point! thank you :)
19:18kwladykaok it is time to sleep, goodnight!
20:04j-pbdo you guys know if anybody has written code to use instaparse as an emitter? I'd be really interesing to get one for free when specifying a parser.
20:27gfredericksis anybody else getting a test failure on clojure/master?
20:29gfredericksI bet it's a dirty compile issue
20:31gfredericksyeah I think that's all it was; false alarm
22:05justin_smiththe dev who cried test failure
23:58auxcharJust wondering, is there a way to make a PersistantList that contains itself?
23:59justin_smithauxchar: only via some reference type, or a delay or promise