#clojure log - May 27 2015

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:28 sdegutis: ok

0:31 currento_:

0:34 sdegutis: ok

0:34 Hi.

0:35 I heard something about using monads to make Datomic usage cleaner in Clojure.

0:35 I 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.

0:36 They 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.

0:36 I think this is what monads are for, right?

0:38 I like the idea behind it, I just don't fully know how to execute it.

0:47 Viesti: hum

0:49 I'm finding myself looking for an enumeration which maintains order

0:53 In 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

0:53 but set doesn't maintain order...

0:54 so iterating over it in the UI would not show the literal order

0:55 I ran into this library, which looks neat: https://github.com/amalloy/ordered

0:55 just thinking that is the a simpler solution...

0:55 I could put the options into a vector

0:55 and then convert to set when needed

0:55 but hmm...

0:57 zematis: not a clojureist - I just lurk here. But a sorted-set is what you need Viesti

0:58 Viesti: which leads to making up a rank for each keyword

0:58 could have the rank stuff in the ui only though

0:59 just thinking that is what I'm looking for overkill :)

0:59 and there seems to be a library too so using it would be easiest :)

0:59 zematis: this maybe..

0:59 https://clojuredocs.org/clojure.core/sorted-set

1:12 andyf: Viesti: sorted-set will do it if the default ordering is acceptable. sorted-set-by lets you supply a custom comparator function.

1:13 Viesti: If the order you want is not easily specified by a comparator function, then something like am alloy's ordered may be useful.

1:23 Viesti: andyf: yep, ordered-set from amalloy is nice since I get insertion order, which is the same as in the literal expression that I write

1:23 s/same/same order

1:27 WickedShell: to 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?

1:28 Viesti: ordered-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

1:33 WickedShell: oh I see, I can actually control that in seesaw, with a more advanced paint component

2:10 stupid 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

2:18 andyf: WickedShell: 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).

2:19 WickedShell: well 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

2:19 andyf: To see an example precondition, search for :pre on this page http://clojure.org/special_forms

2:20 you could also require only one key in the signature, and use :as foo to give the entire map the name foo

2:20 WickedShell: andyf: while not what I was looking for thats really intresting to know in general

2:22 andyf: Searching for :as on that same page has examples for both vector/sequence arguments, as well as maps

3:58 acron^: rich hickey always reminds me of weird al ...teehee

3:59 haha, and i'm not the only one

3:59 https://twitter.com/mrspeaker/status/561935228189831169

4:10 WickedShell: I'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)

4:42 mnngfltg: dysfun, thanks!

4:42 * mnngfltg is happy about his first macro

4:43 dysfun: however, it can be made shorter, sec

4:43 well firstly there's the extra paren before the arglist

4:44 it's single arity, so you don't need it

4:44 and there are some primitive functions that more concisely express it

4:44 (is the cheatsheet slow to load for anyone else right now?)

4:46 mnngfltg: https://gist.github.com/pesterhazy/fc8930c8eaa4f2eadc02

4:46 here's my current version

4:47 let's merge it into clojure.core :)

4:48 (j/k, I'm sure it's flawed somehow)

4:49 dysfun: you say flawed, i say improvable

4:49 next one is you can create an assertionerror with AssertionError.

4:49 (instead of (new AssertionError.

4:50 then there's if-some, which combines the let with the nil check

4:50 ,(defmacro guard-nil [x] `(if-some [v# ~x] v# (throw (AssertionError. (str "Nil guard gailed: " (pr-str '~x))))))

4:50 clojurebot: #'sandbox/guard-nil

4:50 dysfun: ,(guard-nil false)

4:50 clojurebot: false

4:50 dysfun: ,(guard-nil nil)

4:50 clojurebot: #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...

4:51 dysfun: well, bar the typo in the error message

4:53 mnngfltg: didn't know about `if-some`

4:54 dysfun: yeah i only discovered it last week :)

4:54 mnngfltg: it's new in 1.6 so we can be excused for that

4:55 dysfun: *shrug* 1.6 has been out for a long time

4:55 i think the whole time i've been programming clojure seriously actually

4:56 mnngfltg: yes, but a lot of the code out there (which we've been reading) predates 1.6

4:56 and you learn from reading other people's code, for the most part

4:59 https://gist.github.com/pesterhazy/fc8930c8eaa4f2eadc02 <-- here's my amended version

5:10 zot: is 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

5:11 TEttinger: zot, map or set?

5:11 zot: the outer thing is a map, the values within are sets

5:11 TEttinger: ah

5:12 zot: the code above seems to work from some tests; just feels very bulky, like i'm missing something far more idiomatic

5:12 TEttinger: I'm not sure what your input looks like

5:12 zot: the 3rd term is sample input

5:13 i'll add the output in the gist, 1 sec.

5:13 TEttinger: a vector of quoted vectors?

5:13 why quote the inner vectors though?

5:13 markp: good morning folks - where is the user forum for leiningen?

5:13 TEttinger: ,[[and 1 2 3][not 1 2]]

5:13 zot: this was code that was being used w/ expresso

5:13 clojurebot: #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....

5:13 TEttinger: oh

5:13 that's why

5:14 markp: uh, probably github issues or ask here

5:14 zot: yeah, just using the symbols as they specify. could be keywords, etc. for the generic case.

5:15 markp: thanks TE*, will do

5:15 TEttinger: but github issues is for actual problems with lein

5:16 not just how to use. if you have some how-to-type questions, probably many of the people in here can answer

5:16 zot: TEttinger: gist updated w/ resulting values (as desired)

5:16 TEttinger: ok

5:17 zot: perhaps simpler to have just asked for input -> output, to avoid mixing in my ugly sol'n :)

5:17 TEttinger: ,(def conjuncts ['[and f1 f2 f3] '[and f1 f2] '[not f4]])

5:17 clojurebot: #'sandbox/conjuncts

5:18 TEttinger: ,(into {} (map (juxt identity rest) conjuncts))

5:18 clojurebot: {[and f1 f2 f3] (f1 f2 f3), [and f1 f2] (f1 f2), [not f4] (f4)}

5:18 TEttinger: ,(into {} (map (juxt identity (comp set rest)) conjuncts))

5:18 clojurebot: {[and f1 f2 f3] #{f1 f3 f2}, [and f1 f2] #{f1 f2}, [not f4] #{f4}}

5:25 zot: TEttinger: bingo :) I really need to remember juxt in my mental toolbox… it's been the answer for the last 2 of these questions!

5:25 (inc TEttinger)

5:25 lazybot: ⇒ 56

5:27 TEttinger: cool!

5:33 mnngfltg: zot, `juxt` and `reduce` are in my box of "things that don't occur to you until you realize they're the obvious tool"

5:37 TEttinger: reductions too

5:37 frequencies is handy but it's usually obvious when you need it

5:38 WickedShell: I'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?

5:38 J_Arcane: I'm terrible at thinking up more than fairly innocuous uses of reduce.

5:42 TEttinger: &(reductions + (range 21))

5:42 lazybot: ⇒ (0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 210)

5:42 TEttinger: triangular numbers

5:43 kasterma: Here is a question on juxt and how to maybe avoid it. I have https://gist.github.com/kasterma/538aaf8e279e04b2234f

5:43 checking a rule in a sudoku

5:44 nos-locs is the combination of numbers and locations where they appear in the sodoku

5:44 Reasonable use of juxt (which is why I thought of it now).

5:45 To heavy handed use of frequencies and filter it seems to me.

5:46 TEttinger: I'm uh not sure what your sudoku looks like, or what a rule looks like

5:46 kasterma: A sudoku is a vector of length 9 with vectors of length 9 in it

5:47 a rule is a vector of length 9 of pairs (locations).

5:48 TEttinger: I'd make get-loc take a pair so you don't need to apply, that bit is just a bit needlessly confusing

5:49 unless you explicitly need to make a partial with only one element of the pair

5:49 just change the def to (defn get-loc [sud [i j]]

5:49 kasterma: yeah, that would save the apply

5:50 TEttinger: good ol' destructuring

7:54 timvisher: ,(if-let [[ohai] []] ohai 'made-it)

7:54 clojurebot: nil

7:54 timvisher: ,(if-let [[ohai] [1]] ohai 'made-it)

7:54 clojurebot: 1

7:54 timvisher: ,(if-let [[ohai] nil] ohai 'made-it)

7:54 clojurebot: made-it

7:55 timvisher: is that the expected behavior for everyone else?

7:55 i'm quite surprised by it

7:55 :)

7:55 Reefersleep: Hello 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?

7:57 Actually, my problem stems from just trying to evaluate the current buffer in order to properly syntax highlight function calls to required dependencies :/

7:58 Trying to get vim-clojure-highlight to work.

7:58 heurist: Reefersleep: I am not at a repl ATM, so the fingers-knowledge maybe wrong, but to eval a whole file I sometimes use ggcpG

8:00 Reefersleep: heurist: Cheers. Let me just paste the result from that:

8:02 gfredericks: sdegutis: you could call the jvm method that clojure calls, which would give you determinism

8:03 http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#shuffle%28java.util.List,%20java.util.Random%29

8:03 Reefersleep: 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)

8:04 ah sorry, gotta go, be back later. Will stay on the channel though :)

8:04 justin_smith: OK, that is not vim at all

8:05 that's a deps issue

8:10 zot: timvisher: 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.

8:13 timvisher: zot: 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

8:13 ,(if-let [[ohai] [nil]] ohai 'made-it)

8:13 clojurebot: nil

8:13 timvisher: amazing

8:13 zot: ,(first [])

8:13 clojurebot: nil

8:13 zot: (boolean [])

8:13 timvisher: ,(if-let [ohai nil] ohai 'made-it)

8:13 clojurebot: made-it

8:13 zot: ,(boolean [])

8:13 clojurebot: true

8:13 zot: the thing returned is [], which is true

8:14 if you change the entire expression to:

8:14 timvisher: where is `[]` returned?

8:14 is that how binding works?

8:14 zot: it's the RHS of that binding

8:14 justin_smith: zot: in (if-let [[ohai] [nil]] ...) it's [nil] which is tested, and that is truthy

8:14 zot: right

8:14 timvisher: wow

8:15 zot: (he didn't use [nil], but [], but for this case, the destructuring is the same)

8:15 justin_smith: ,(boolean [nil]) ; what was actually tested

8:15 clojurebot: true

8:15 justin_smith: right

8:15 timvisher: i guess that's the part that i was confused about

8:15 i assumed that the symbol that i was destructuring into was the one that would be tested

8:15 justin_smith: timvisher: yeah, we don't do false punning for empty collections

8:15 timvisher: not the 'intermediate' vector

8:15 zot: ,(if [ohai (first [])] ohai 'made-it)

8:15 justin_smith: ,(boolean ())

8:15 clojurebot: #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...

8:15 true

8:15 zot: ,(if-let [ohai (first [])] ohai 'made-it)

8:15 clojurebot: made-it

8:16 zot: that's the line you want, if you want [] to trigger a false eval

8:16 timvisher: zot: yes. i'm aware of the use of first there :)

8:16 zot: ok

8:16 timvisher: my point was that i would've expected to not have to use it

8:16 justin_smith: another option ##(if-let [[a] (some [])] 'made-it a)

8:16 lazybot: java.lang.RuntimeException: Unable to resolve symbol: a in this context

8:16 justin_smith: err

8:17 zot: the doc says pretty clearly that the result of test is checked — the binding form is a separate beast

8:17 timvisher: my model of how if-let destructuring worked was basically that it unrolled to `(let [[ohai] s] (if ohai consequent alternative))`

8:17 obviously it does not

8:17 :)

8:18 and in fact now that i actually type that out it doesn't even make any sense

8:18 justin_smith: ,(if-let [a (not-empty [])] a 'made-it)

8:18 clojurebot: made-it

8:18 timvisher: but nevertheless that's what i thought

8:18 zot: understood

8:18 seems to be often like that — intuition betrays, until you think further about it, and your intuition gets updated

8:18 s/seems/clojure &/

8:18 justin_smith: ,(if-let [[a] (not-empty [1])] a 'made-it)

8:18 clojurebot: 1

8:18 justin_smith: ,(if-let [[a] (not-empty [])] a 'made-it)

8:18 clojurebot: made-it

8:19 timvisher: zot: 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. :)

8:19 justin_smith: I'm rather fond of not-empty

8:19 timvisher: my neurons are quite unimpressionable :)

8:19 zot: yes, it seems very useful

8:20 m1dnight_: I was reading up on the volatile keyword in java. Is it okay to ask a question about that in here?

8:20 justin_smith: ,(if (not-empty "") 'full 'empty)

8:20 clojurebot: empty

8:24 timvisher: justin_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.

8:45 tsdh: Is 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.

8:45 justin_smith: tsdh: pr-str / pr are my usual gotos

8:46 tsdh: justin_smith: But how to I tell pr/pr-str how my.app.CustomType instances have to be serialized?

8:46 justin_smith: if your custom data types are created with defrecord, pr will work with them too

8:46 tsdh: justin_smith: No, they aren't.

8:46 justin_smith: tsdh: you're out of luck I guess

8:47 there's a multimethod you can implement, I forget the name

8:47 tsdh: justin_smith: I guess you mean print-method, right?

8:47 justin_smith: is that the one that prints readably?

8:49 tsdh: justin_smith: Indeed, so probably print-dup?

8:49 justin_smith: sounds right, you'll also need to define custom reader macros of course

8:49 it's a lot easier to just use defrecord in the first place

8:52 tsdh: justin_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.

8:54 Reefersleep: justin_smith: how do I fix the dependencies issue?

8:58 To 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)

8:59 I _think_ I've put all the right things into :dependencies in project.clj .

9:01 luxbock: Bronsa: 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?

9:03 Reefersleep: Anyone know how I can figure out how to amend my FileNotFoundException upon doing ggcpG in a vim buffer with vim-fireplace?

9:07 Bronsa: luxbock: no, there are no cycles in the AST

9:07 justin_smith: Reefersleep: as I said above, it is not a fireplace issue

9:07 Reefersleep: how did you add the dep for clj-time?

9:09 Reefersleep: justin_smith: like this: http://pastebin.com/VTAkKx2F

9:09 justin_smith: have you restarted your repl since that dep was present?

9:09 if you run (System/getenv "PWD") does it show a directory inside your project?

9:10 I have to leave for work, I'll be back later, I'm sure others can help though

9:10 Reefersleep: cheers justin_smith

9:10 not sure I've restarted the REPL

9:11 might very well be that

9:19 shaym: Hi , 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

9:19 (def emf (javax.persistence.Persistence/createEntityManagerFactory ""))

9:20 java.lang.NoClassDefFoundError .... org.hibernate.ejb.Ejb3Configuration

9:20 luxbock: Bronsa: 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)

9:20 Reefersleep: Upon 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)

9:20 Anyone have a clue why? :)

9:20 shaym: do i need to specially import each dependent class?

9:21 chouser: shaym: No, I wouldn't think so.

9:21 luxbock: Bronsa: 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

9:21 shaym: chouser, yes that is what i was suspecting

9:22 luxbock: and then filtering for let and letfn nodes, and taking the last one of those

9:22 so that (let [x 10] (let [x 9] (foobar x))) would still find the inner let instead of the outer

9:28 Reefersleep: I 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

9:29 Can't get it to work - method calls to outside modules are not highlighted

9:32 Bronsa: luxbock: you are using t.a.jvm right?

9:32 luxbock: Bronsa: yes

9:32 Bronsa: luxbock: then the uniquify-locals pass is being run -- each local has a uique id

9:33 luxbock: Bronsa: is that the loop-id?

9:33 Bronsa: luxbock: no, :name

9:34 luxbock: so in (let [x 1] (let [x 2] x)) the fist x will have :name x#__1, the second one x#__2

9:34 and the x local wil refer to x#__2

9:35 luxbock: Bronsa: ahh I see, yeah that should help

9:35 Bronsa: luxbock: IOW shadowing is explicit, once you extract the local :name it shouldn't be hard to locate the original let form

9:36 luxbock: what does IOW mean?

9:36 Bronsa: in other words :)

9:36 luxbock: ok :)

9:36 thanks

9:36 Bronsa: np

9:47 Reefersleep: To anyone following my stream of questions: I think I finally grokked vim-clojure-highlight

9:48 tsdh: How 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.

9:50 Of 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:06 justin_smith: Reefersleep: what was the secret?

10:11 luxbock: I really wish when-let and if-let allowed multiple bindings

10:11 Reefersleep: justin_smith: I had misspelled a reference, which was a minor obstacle

10:12 justin_smith: luxbock: I forget what it is called, but flatland/useful has something like this

10:12 Reefersleep: justin_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:12 it was the :e step that I think tripped me up

10:12 justin_smith: awesome

10:13 Reefersleep: I'm now trying to figure out how I can automatize it, I don't want to type that out all the time

10:13 luxbock: justin_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:13 Reefersleep: looking through .vimrcs on github

10:13 justin_smith: luxbock: fair enough - useful tends to be, dare I say... useful, so pays off a few times once added to a project.

10:14 luxbock: justin_smith: also if I'm working on someone elses project then adding a new dependency like that feels a bit rude

10:14 justin_smith: Reefersleep: 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:14 luxbock: oh, in that case yeah, maybe you can copy paste the def :P

10:16 Reefersleep: justin_smith: cool, let me check that out

10:16 justin_smith: it's one of the things I always want to be present, alongside clojure.tools.trace for debugging and criterium for microbenchmarks

10:18 Reefersleep: I hear ya

10:18 Haven't messed abou with .lein yet, I'll try it now

10:18 afhammad: how do you ensure a lib in checkouts folder gets updated in host?

10:18 luxbock: maybe someone should create a searchable web site for self-contained useful snippets

10:20 you could populate it by running a script on a few of the popular utility libraries and inlining any non-core fns

10:26 (try (foo x) (catch Exception e nil)) <-- there's nothing like this in the core lib right?

10:27 Reefersleep: justin_smith: what do you put in your .lein/profiles.clj? Just {:user {:dependencies [[alembic "0.3.2"]]} ?

10:27 justin_smith: Reefersleep: that's about it, yeah

10:28 then in a repl (require '[alembic.still :as still]) (still/load-project)

10:28 or (still/distill '[[som.lib "version.whatever"]]) to just try a random lib

10:32 Reefersleep_: 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:32 justin_smith: Reefersleep_: the :user thing in my profiles.clj

10:33 then (require ...) and (still/distill ...) or (still/load-project) as I specified above

10:33 Reefersleep_: Aha. :)

10:33 let me try it out.

10:36 luxbock: is 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:37 gfredericks: luxbock: I can't think of any

10:39 Reefersleep_: justin_smith: Just (still/load-project) in the REPL after starting it with lein repl inside the project root?

10:39 justin_smith: while you are at it you could extend it to work on sets too

10:39 gfredericks: luxbock: though maybe you could argue that because (seq v) doesn't give you a seq of entries that you could call `key` on...

10:39 justin_smith: Reefersleep_: after requiring alembic.still and adding a new dep to the project.clj, yeah

10:41 Reefersleep_: justin_smith: so: lein repl - (require alembic.still) - (still/reload-project) ?

10:41 justin_smith: (require '[alembic.still :as still]) (still/load-project)

10:41 Reefersleep_: aaah

10:41 I suck at dependencies :/

10:42 justin_smith: require is a little weird outside the ns block

10:42 Reefersleep_: Maybe this is the wrong channel to ask questions like these - maybe they belong at #clojure-beginners ?

10:43 justin_smith: Reefersleep_: 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:43 for example

10:44 Reefersleep_: 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:44 justin_smith: Cool, I will continue on, then :)

10:45 justin_smith: Reefersleep_: clojure doesn't by default do much "magic" - the opinionated preference is to have explicit require or use to pull things into scope

10:45 that said, there are libs like vinyasa for those who want a bit more automation of ns stuff in their dev environment

10:45 Reefersleep_: Alright. Think I'll write a little ;;note in that .lein/profiles.clj file...

10:50 r4vi: is 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:51 justin_smith: r4vi: you could write a macro that does that. the magic function to help with that would be ns-publics

10:52 I 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:52 r4vi: cool - doesn't seem too hard.. thanks

10:52 justin_smith: r4vi: http://conj.io/store/v1/org.clojure/clojure/1.7.0-alpha4/clj/clojure.core/ns-publics/

10:53 gfredericks: probably no reason to have a macro

10:53 justin_smith: in fact, now that I think of it, if you used intern instead of def it wouldn't even need to be a macro

10:53 gfredericks: exactly

10:53 gfredericks: if you're going to be mucking with low-level var/ns functions anyhow

10:53 justin_smith: gfredericks: it would just be def's macro contagion

10:54 r4vi: ok another question (related) what do other people do when working with libs like this?

10:56 justin_smith: r4vi: I usually go ahead and use the oauth-creds arg, to be honest

10:56 r4vi: just do (def creds {username "foo" token "foobarbaz"}) then (api/get creds 123)

10:56 justin_smith: right

10:57 or make a component, where the creds come in as an initialization

10:57 (as in stuartsierra/component, my favorite lib right now0

10:57 )

11:00 Reefersleep_: 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:00 I've tried putting au BufRead *.clj ClojureHighlightReferences in my .vimrc, but no luck. (I'm not good with the au syntax)

11:02 r4vi: justin_smith: reading about it now

11:07 ionthas_: Reefersleep: I have the same problem. I didn't solve it yet.

11:22 Reefersleep_: ionthas_: What have you tried?

11:22 Or do you have an idea of where to go?

11:45 ionthas_ / justin_smith: Well, I got a first step of the way.

11:46 I put this in my .vimrc:

11:46 nmap l cpr :ClojureHighlightReferences<CR>

11:46 which means that pressing l in normal mode will first do cpr, then :ClojureHighlightReferences

11:46 I tried doing nmap cpr cpr :ClojureHighlightReferences<CR>, but no dice :/

11:54 heurist: Reefersleep_: 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:06 Reefersleep_: heurist: cheers :) Doesn't seem to work, though

12:07 if I do :nmap after adding your contribution, heurist, it reports:

12:07 n cpr *@:if expand('%:e') ==# 'cljs'|Require|else|RunTests|endif<CR>

12:10 So it looks like the ClojureHighlightReferences<CR> part is not added for some reason

12:11 irctc_: How do I open Vim mode in Light Table?? o(一︿一+)o

12:11 heurist: Reefersleep_: 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:14 justin_smith: irctc_: 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:14 oddcully: l in normal mode?

12:15 heurist: oddcully: right...

12:15 Reefersleep_: heurist: I did :vim ~/.vimrc, edited my stuff, :wq, :vim [path-to-my-.clj-file], then cpr

12:16 heurist: tried both with and without <buffer>, no difference

12:16 oddcully: I just selected some random key :)

12:16 oddcully: am i missing something or would this not just rob you of moving your cursor around?

12:16 justin_smith: Reefersleep_: you must use the arrow keys like some kind of heathen, huh :)

12:16 Reefersleep_: It would and did and I quickly got rid of it

12:16 justin_smith: ahh

12:16 Reefersleep_: certainly not! :)

12:17 There'd be no point in Vim then (for me)

12:17 heurist: Reefersleep_: 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:21 Reefersleep_: 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:21 , so it looks good

12:21 clojurebot: #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:21 heurist: Reefersleep_: 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:21 Reefersleep_: heurist: just what I was about to say

12:22 I learned a little today :)

12:22 heurist: you mentioned it was horrible, though. Why, exactly?

12:23 heurist: Reefersleep_: 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:23 Reefersleep_: hehehe

12:28 heurist: wrestling a bit with the .vimrc autocmd

12:28 "autocmd FileType clojure nnoremap cpr ..." does not seem to work

12:28 feel like there's a little thing missing

12:31 heurist: Reefersleep_: fireplace is adding another autocmd later, try adding yours to ~/.vim/after/clojure-highlight.vim (check the exact filename, I am guessing).

12:33 Reefersleep_: I don't have a /after inside ~/.vim

12:33 *an

12:33 heurist :/

12:34 heurist: Reefersleep_: it can

12:34 Reefersleep_: it can't be that hard to make one (:

12:34 Reefersleep_: well no :) But I have no idea what I'm doing. Is reading the /after folder a part of Vim's base functionality?

12:35 From what you first said, I thought it might be something that vim-fireplace had introduced into ~/.vim

12:35 or maybe vim-clojure-highlight

12:35 oddcully: you can also go for ~/.vim/after/ftplugin/clojure.vim

12:36 this gets executed last for all clojure files

12:36 Reefersleep_: aha

12:36 There's so much to keep track of in configuring Vim :/

12:36 oddcully: used this recently to remove `/` from keyword detection after fireplace

12:36 heurist: Reefersleep_: 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:37 Reefersleep_: cheers oddcully/heurist

12:37 heurist: Reefersleep_: yeah, after/ftplugin sounds like the right place.

12:37 Reefersleep_: what does ftplugin refer to?

12:37 trying it out now

12:38 heurist: Reefersleep_: file type plugin they only load for that file type.

12:38 Reefersleep_: aaaaaaaaaah

12:38 oddcully: as in pain or joy?

12:38 Reefersleep_: revelation

12:38 ^_^

12:38 oddcully: ahh!

12:39 heurist: Reefersleep_: you want "revelation"? try :tab help after replace "after" with whatever you you want to know more about. the vim docs are good.

12:39 oddcully: if you open a file xxx.cljs e.g. and do `set ft` you will see the detected filetype there

12:39 i find the way over (after)/ftplugin alot easier to manage than autocmd stuff

12:41 Reefersleep_: 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:41 heurist: Reefersleep_: 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:41 Reefersleep_: oddcully: I see your point there

12:43 heurist/oddcully: well, I tried just adding the command (nnoremap <silent ...), but that doesn't seem to work

12:43 adding the autocmd worked. Yay!

12:44 I should write a blog post on this :/

12:45 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:45 So the next step would be to make it work for movements other than cpr, such as cpG, for example

12:46 oddcully: i'd say, that you don't need to write autocomd there any more

12:46 heurist: Reefersleep_: 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:46 oddcully: at this point it is already clear, that this is a clojure file

12:46 just do your nnoremap

12:49 heurist: Reefersleep_: the need to repeat the process for each command is only *one* of the reasons it was a "horrible solution"

12:49 Reefersleep_: oddcully: the nnoremap alone does not work

12:50 heurist: I could try that, but now I noticed a different problem: :ClojureHighlightReferences kills my rainbow_parentheses

12:50 all of my parens are one colour now

12:50 after doing cpr

12:51 I feel like I need cpr

12:51 I've spent a whole afternoon trying to configure Vim. Stuff like this makes me reconsider trying Emacs.

12:51 justin_smith: Reefersleep_: what you are doing now is nothing in comparison to upgrading a cider version, in my experience

12:52 Reefersleep_: *brain explodes*

12:52 heurist: Reefersleep_: /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:54 Reefersleep_: 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:54 heurist: Reefersleep_: 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:56 Reefersleep_: I assume this "dynamic highlight" that you are fighting with? I only the static version.

12:56 Reefersleep_: heurist: Correct on dynamic highlight

12:57 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:57 I can't :RainbowParenthesesToggle manually either

12:57 rainbows are dead after cpr

12:58 heurist: Reefersleep_: after your "new and improved cpr"? or after normal cpr as well?

12:58 Reefersleep_: :RainbowParenthesesActivate doesn't work either

12:58 heurist: I think it's ok with normal cpr

12:58 let me just try

12:59 heurist: Reefersleep_: also try see if just doing :ClojureHighlightReferences kills your rainbows.

13:00 Reefersleep_: heurist: :ClojureHighlightReferences is the sinner

13:01 heurist: Reefersleep_: 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:02 Reefersleep_: I will, cheers heurist

13:04 heurist: I think I've mislead you, the plugin I've been trying to get to work is vim-clojure-highlight

13:05 and one guy had a similar problem (though with the niji parens plugin)

13:08 heurist: Reefersleep_: 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:17 Reefersleep_: heurist: what is the dynamic highlighting, you were talking about?

13:17 -,

13:19 heurist: Reefersleep_: I think it was the plugin you referred to, that was just to distinguish it from https://github.com/guns/vim-clojure-static

13:21 Reefersleep_: heurist: My initial assumption was correct, then :)

13:21 (that you were indeed talking about vim-clojure-highlight)

13:22 heurist: this confuses me, though. You wrote: "so lots of bug reports for dynamic highlight." Where did you see this?

13:22 heurist: Reefersleep_: you need to write them. you found the bugs.

13:23 Reefersleep_: Ah, I thought you found an existing list of them :)

13:24 heurist: Alright, I'll get to work.

13:24 heurist: I've got other problems, too, like weird indentation after gg=G'ing

13:24 heurist: No matter what I do, I cannot get sane indentation in a clojure file with a number of nested forms

13:25 heurist: But maybe this is a problem for another day. Do you know if it's a common problem, though?

13:25 heurist: Reefersleep_: is that with vim-clojure-highlight? I have not had issues with indenting.

13:26 Reefersleep_: That was before vim-clojure-highlight

13:27 I've tried with an empty .vimrc, I've tried disabling every indentation-related line in my .vimrc one by one

13:27 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:28 heurist: When talking about disabling lines in my .vimrc, that includes plugins such as vim-fireplace

13:30 It's so weird. And very, very annoying. :(

13:32 jbwiv: hello, posted this on #clojure-beginners with no luck, so thought it was worth asking here...

13:32 what'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:33 url-: 10:32 *** tomphp QUIT Client Quit

13:33 Reefersleep_: You can try my vim setup if you want. https://github.com/earle/vimrc

13:33 Reefersleep_: may be a good time to switch to emacs though :)

13:35 Reefersleep_: url-: I'm tempted :) justin_smith said that there are similar problems in Emacs, though.

13:37 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:37 heurist: same question

13:37 oddcully: Reefersleep_: make a gist,refheap,...

13:39 Reefersleep_: oddcully: here you go

13:39 https://gist.github.com/Reefersleep/b1b2b35eacec6e7a33c6

13:40 I'm sure the code is horribly unidiomatic :)

13:40 Been wanting to clean it up.

13:42 oddcully: Reefersleep_: breaks the same for me. my guess would be the \[

13:43 Reefersleep_: oddcully: I had the same suspicion and changed the [ to .

13:43 oddcully: no difference

13:44 oddcully: hmm no. it just falls appart

13:44 Reefersleep_: 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:44 Maybe it's telling me to write smaller functions

13:44 :)

13:45 Alright, amazing to find that it was just not my unique setup that caused this.

13:45 oddcully: I guess now we figure out what exactly controls the indentation for our setups and report a bug to the rightful maintainer?

13:47 mikerod: I 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:47 so 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:48 I was curious if others had ran into this before.

13:48 It'd be nice to have something like a with-redefs that locked access to the var.

13:48 I guess that could be implemented

13:48 oddcully: Reefersleep_: i killed the first two cond statements and then it looked ok

13:48 mikerod: I just found this to be of interest

13:49 Reefersleep_: oddcully: I'm seeing the same

13:49 mikerod: I 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:50 and separate JVMs is a much higher bar to shoot for

13:50 oddcully: Reefersleep_: only removing one of the two looks ok except the :else branch

13:50 Reefersleep_: oddcully: let's zoom in. Seems like it's either the number of cond statements or the nesting in the same

13:51 heurist: Reefersleep_: 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:51 opqdonut: mikerod: how about binding?

13:51 mikerod: and have all your multithreading use binding-conveyor-fn

13:51 mikerod: opqdonut: yes, that'd work if you setup your vars to be dynamic

13:51 opqdonut: yeah having them dynamic is a bit of a performance hit

13:52 mikerod: which is probably not desired

13:52 perf hit + a semantics change in the real code to facilitate a tests

13:52 test*

13:52 I tend to not desire that

13:52 I'd rather just have a big locking mock

13:52 so if two threads hit that mock at one point, they can just block

13:52 opqdonut: you can just do (locking var ...) I guess

13:52 justin_smith: mikerod: 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:53 mikerod: due to our infrequent use of mocking, I think it'd be mostly unblocked threads still

13:53 opqdonut: yeah, injecting is the standard option

13:53 Reefersleep_: heurist: I guess I'll get around to emacs sometime - the lure of rewriting the editor in a lisp is great :)

13:53 oddcully: Reefersleep_: could be just length. removing something from the middle fixes one later block

13:53 mikerod: justin_smith: yes, I agree. using with-redefs is a pretty rare thing

13:53 Reefersleep_: oddcully: seems to me like it's the number of statements

13:53 mikerod: but we had one point of interacction that many tests may be interested in - and with-redefs breaks them from being threadsafe

13:53 sorbo_: I feel like I'm just about ready to switch from Vim -> emacs + evil mode

13:53 mikerod: one or two*

13:54 heurist: Reefersleep_: every time I have to look I vimscript I weep.

13:54 Reefersleep_: oddcully: Not the depth of nesting - try to remove depth from one of the statements, it makes no difference.

13:55 oddcully: Reefersleep_: 8 on the same level?

13:55 heurist: sorbo_: emacs + evil is not bad to work in, possibly better than vim itself; emacs is just to slow though.

13:56 justin_smith: heurist: 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:56 Reefersleep_: heurist: I feel a bit flustered about this whole afternoon, for sure. Not because of vimscript, though.

13:56 justin_smith: heurist: for example, on my machine emacs is snappy, for coworkers it has a painfully slow refresh rate.

13:56 Reefersleep_: oddcully: I thought so, but if I remove depth from a number of them, they are indented correctly

13:56 sorbo_: heurist: slow how? I remember reading some anecdotal stuff on its requiring more system resources

13:57 yeah, I was thinking skipping cider at first

13:57 plus I mean

13:57 justin_smith: sorbo_: it's not emacs core that is doing it, it's bad elisp code.

13:57 sorbo_: I'm used to lein and JVM start times

13:57 so my definition of slow has changed over time :)

13:57 justin_smith: haha

13:57 heurist: justin_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:58 justin_smith: heurist: emacs has a server mode, where instead of starting a new process you can connect to a running instance

13:58 this even works when you ssh in, even if hte emacs was a GUI instance

13:58 xemdetia: heurist, or you can use tramp from a continious session

13:58 sorbo_: oh nice

13:58 xemdetia: tramp is nice because you can view files as buffers from multiple servers and ediff them or whatever is necessary

13:59 justin_smith: the 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:59 Reefersleep_: oddcully: I tried removing the depth from all but the :else statement

13:59 oddcully: Indentation is correct

13:59 heurist: justin_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:00 justin_smith: heurist: you can use tramp, from the emacs on your home box

14:01 heurist: but sometimes emacs is just too much, even just for startup time reasons, sure.

14:01 Reefersleep_: oddcully: I succeeded in breaking it a different way

14:02 oddcully: git coming

14:02 *gist

14:02 heurist: justin_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:02 justin_smith: heurist: tramp uses sh, ed, cat

14:02 hopefully you have those things installed

14:02 Reefersleep_: oddcully: https://gist.github.com/Reefersleep/d0ed08a3f2915db25138

14:02 justin_smith: maybe it is sed rather than ed? I forget

14:03 oddcully: Reefersleep_: i tried a (cond) with several simple statements, but not as many

14:03 heurist: justin_smith: cool, thanks. though I am a old-time vim user, so it will be hard to justify the change (:

14:03 justin_smith: heurist: 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:03 so the remote host just thinks you are doing it cave man style :)

14:04 heurist: justin_smith: been there, done it cave-man-style.

14:04 oddcully: Reefersleep_: at least the later one would make a reasonable example to show the problem

14:05 Reefersleep_: 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:05 justin_smith: heurist: 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:06 oddcully: Reefersleep_: i'd check if the clojure files comes with plain vim (i'd guess so) and report it there

14:06 Reefersleep_: I think they do

14:06 I read that vim-clojure-static is included in vim

14:07 if that's what we're discussing :)

14:07 oddcully: Reefersleep_: 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:07 xemdetia: heurist, 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:07 heurist: justin_smith: yes, appreciate that. googling tramp now.

14:08 Reefersleep_: 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:08 lemme check

14:09 heurist: xemdetia: agreed, except my tooling is vim, I sometimes use its scp editing command :r scp://server/file but not very often.

14:09 oddcully: Reefersleep_: plain vimrc works :*)

14:09 Reefersleep_: and it's alot faster

14:09 Reefersleep_: do you have paredit?

14:09 xemdetia: heurist, true- I usually don't even have vim. Just plain vi

14:10 heurist: xemdetia: 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:10 oddcully: Reefersleep_: o well it does not. now main at :else level

14:11 Reefersleep_: oddcully: plain vimrc does not work for me

14:11 justin_smith: heurist: eg. :e /ssh:justin@noisesmith.org:.profile (with evil mode turned on, that is)

14:11 Reefersleep_: super weird stuff happening

14:12 the "(defn interpret" line is indented, to begin with

14:12 a number of the cond statements are aligned, then a following number of them are a bit further to the left

14:12 heurist: justin_smith: or :e scp://justin@noisesmith.org:.profile in vim if I recall correctly.

14:13 Reefersleep_: I'm talking about the gist with the many shallowly nested forms, here

14:13 oddcully: Reefersleep_: 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:13 justin_smith: heurist: cool

14:13 Reefersleep_: hehe oddcully

14:13 So

14:13 oddcullly: bug reports for both Vim and vim-fireplace? :)

14:14 oddcully: i'd start with plain vim with the plain vimrc

14:14 (to report to i mean)

14:15 Reefersleep_: yeah

14:15 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:15 oddcully: i'd wait for the feedback first from core

14:16 Reefersleep_: Why? Because the others might be based on it?

14:16 oddcully: that time might be better spend either trying out emacs or refactoring the code ;P

14:16 Reefersleep_: good point! :D

14:16 (nobody else ever came upon this problem because nobody got so deep into nested forms)

14:16 oddcully: yes. because core has the first level of a problem

14:17 if it alls magically disappears, then fine. if not you can go the next step

14:17 Reefersleep_: cheers oddcully

14:18 Alright, got 1 bug report for Vim and 1 for vim-clojure-highlight.

14:20 oddcully heurist justin_smith url- (and whomever I might have forgotten): Thanks for your help :)

14:20 oddcully: Reefersleep_: cheers!

14:33 Reefersleep_: ping

14:33 justin_smith: ,ping

14:33 clojurebot: #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:33 justin_smith: ~ping

14:33 clojurebot: PONG!

14:33 justin_smith: there we go

14:38 dazed_and_amused: \exit

14:48 elarson: I'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:49 I'm not a java programmer, but enjoy clojure, so making the link between the two languages is rather opaque

14:53 xXx_GAY_POO_xXx: sup nigz

14:54 who has drugs

14:54 srs

14:55 url-: 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:55 elarson: https://repose.atlassian.net/wiki/display/REPOSE/Proxy+Server+%28Valve%29+Installation

14:56 elarson: url-: 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:57 my 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:58 xXx_GAY_POO_xXx: [PHP]

14:58 ;;;;;;;;;;;;;;;;;;;

14:58 ; About php.ini ;

14:58 ;;;;;;;;;;;;;;;;;;;

14:58 ; PHP's initialization file, generally called php.ini, is responsible for

14:58 ; configuring many of the aspects of PHP's behavior.

14:58 ; PHP attempts to find and load this configuration from a number of locations.

14:58 ; The following is a summary of its search order:

14:58 ; 1. SAPI module specific location.

14:58 ; 2. The PHPRC environment variable. (As of PHP 5.2.0)

14:58 ; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)

14:58 ; 4. Current working directory (except CLI)

14:58 ; 5. The web server's directory (for SAPI modules), or directory of PHP

14:58 ; (otherwise in Windows)

15:06 wasamasa: right

15:07 elarson: wasamasa: I'm thinking I could write a plugin that uses clojure rather than xml/xslt for writing filters and do it that way

15:07 wasamasa: elarson: I was refering to the accidental spam

15:08 elarson: wasamasa: ah right :)

15:35 chouser: wasamasa: I think you'd have to find a Java API to hook your Clojure into

15:52 borkdude: what is the boot equivalent of lein repl?

15:52 don't tell me it is boot repl

16:09 gfredericks: ,(type #=(clojure.lang.PersistentTreeSet/create (1 2 3)))

16:09 clojurebot: #<RuntimeException java.lang.RuntimeException: EvalReader not allowed when *read-eval* is false.>

16:09 gfredericks: ^ can somebody confirm that this creates a hash set and explain me why the hell?

16:10 chouser: neat!

16:10 Bronsa: i know why

16:11 one sec

16:12 hiredman: because the compiler?

16:12 chouser: I'm thinking it must go through a print/read cycle

16:12 amalloy: gfredericks: 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:12 hiredman: yeah to be emitted in the byte code

16:12 and the compiler just says "oh, a set is a set"

16:12 Bronsa: yeah

16:12 gfredericks: okay phew

16:12 that's less crazy

16:12 Bronsa: http://dev.clojure.org/jira/browse/CLJ-1460 maybe this

16:13 gfredericks: cool thanks

16:14 Bronsa: I came to the conclusion that embedding in code collections that are not PAM/PHM/PV/PL should be disallowed

16:17 hiredman: ICanBeSerializedToByteCode

16:17 Bronsa: that wouldn't be such a bad idea actually :)

16:18 gfredericks: ,(binding [*print-dup* true] (pr-str (sorted-set 1 2 3)))

16:18 clojurebot: "#=(clojure.lang.PersistentTreeSet/create [1 2 3])"

16:18 gfredericks: ,(clojure.lang.PersistentTreeSet/create [1 2 3])

16:18 clojurebot: #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:18 gfredericks: ^ so what's up with the vector there?

16:19 Bronsa: http://dev.clojure.org/jira/browse/CLJ-1461

16:19 justin_smith: I like that ICanBeSerializedToByteCode reads like a first person statement

16:19 TimMc: THat's how I read it!

16:19 hiredman: vectors are not seqs...

16:19 justin_smith: ~hiredman can be serialized to bytecode.

16:19 clojurebot: Gabh mo leithscéal?

16:19 gfredericks: ~Bronsa is a reference for anything weird you find at your repl

16:19 clojurebot: Roger.

16:19 TimMc: I didn't get that it used the I-for-interface convention until you mentioned that. :-P

16:20 amalloy: justin_smith: a first person statement, read in a robot voice

16:20 gfredericks: TimMc: justin_smith: same

16:20 TimMc: ~hiredman |can be| serialized to bytecode.

16:20 clojurebot: Ack. Ack.

16:20 Triclops256: Probably 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:21 Clarification: The java library has no explicit license, I'd like to license with an appropriate open source license

16:22 TimMc: Triclops256: Sounds bad.

16:22 Triclops256: https://github.com/leebyron/mesh is the lib

16:22 justin_smith: Triclops256: you could try submitting a PR that would specify your preferred license?

16:22 hiredman: it doesn't really matter

16:22 amalloy: Triclops256: you certainly can't rerelease their code with a license of your own

16:23 but 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:23 hiredman: the original library cannot be used with out a license, so you wrapper will be useless regardless of the license

16:23 Triclops256: amalloy: I wasn't going to release their code, just a compiled jar in the wrapper

16:24 chouser: gfredericks: 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:24 shaym: when listing a java maven project dependency , does it automatically bring all the dependencies from the pom for that artifact?

16:24 justin_smith: shaym: via lein or boot, yes, deps are transitive

16:24 amalloy: chouser: 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:25 because it's just like (cond (set? x) (emit-set x) (map? x) (emit-map x) ...)

16:25 shaym: i keep getting classnotfound exceptions when trying to start JPA from the clojure REPL

16:25 justin_smith: shaym: is JPA something where there are multiple implementations, and you need to explicitly provide at least one?

16:26 shaym: justin_smith, i did add the hibernate impl , and tested the same deps and code in java

16:26 TimMc: chouser: (class #=(java.util.ArrayList.)) ;; clojure.lang.PersistentVector

16:26 justin_smith: shaym: odd!

16:26 TimMc: This is great.

16:26 shaym: justin_smith, sec ill pastebin the 4 lines

16:27 hiredman: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L3094

16:27 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6533-L6534

16:28 shaym: justin_smith, http://pastebin.test.redhat.com/286133

16:28 chouser: hiredman: nice

16:28 justin_smith: shaym: it's saying not available

16:28 chouser: so we should get the same results from macros, since they expand before analysis, right?

16:29 Indeed.

16:29 Bronsa: chouser yup

16:29 chouser: (defmacro z [] (sorted-set 1 2 3)) (type (z)) ;=> clojure.lang.PersistentHashSet

16:29 That seems even easier to trip over than #=(...)

16:29 hiredman: it 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:29 Bronsa: i wasted hours on that

16:30 shaym: justin_smith, oops here is the right one http://pastebin.com/Yr15wMYA

16:30 hiredman: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L4706

16:31 shaym: justin_smith, and to make things interesting when i use the LT repl it reports a different class as missing

16:31 Bronsa: hiredman: IIRC it depends whether it's a constnat set or not

16:31 chouser: Man, the compiler wants protocols!

16:32 TimMc: hiredman: Huh, I don't see how my example of java.util.ArrayList => PV happens...

16:33 justin_smith: shaym: is this applicable? http://stackoverflow.com/questions/9134436/how-can-i-resolve-java-lang-classnotfoundexception-org-hibernate-util-dtdentity

16:33 hiredman: that actually may be a print dup thing

16:33 Bronsa: TimMc: that returns an ArrayList for me

16:33 justin_smith: shaym: I suspect if you looked at "lein deps :tree" you would see a different set of versions than you expect somewhere

16:34 chouser: TimMc: must be a different path

16:34 (defmacro z [] (java.util.ArrayList. [1 2 3])) (type (z)) ;=> java.util.ArrayList

16:34 hiredman: at one point there was some code committed to master that changed some java collections to print as their clojure counter parts

16:34 shaym: justin_smith, definitely looks plausible trying it out now

16:34 Bronsa: they still do

16:34 hiredman: but I believe that was removed/disabled

16:34 Bronsa: ,(java.util.ArrayList.)

16:34 clojurebot: []

16:34 hiredman: (or not)

16:35 so that is almost certainly a print-dup thing

16:35 Bronsa: TimMc: are you using lein repl?

16:35 chouser: In 1.7.0-beta2 I'm getting an ArrayList

16:35 Bronsa: me too chouser

16:36 hiredman: ,*clojure-version*

16:36 clojurebot: {:major 1, :minor 7, :incremental 0, :qualifier "master", :interim true}

16:36 TimMc: Interesting.

16:36 Bronsa: ,(class #=(java.util.ArrayList.))

16:36 clojurebot: #<RuntimeException java.lang.RuntimeException: EvalReader not allowed when *read-eval* is false.>

16:36 TimMc: But I'm not printing it, I'm passing it straight to class.

16:36 Bronsa: ,(defmacro x [] (java.util.ArrayList.))

16:36 clojurebot: #'sandbox/x

16:36 Bronsa: ,(class (x))

16:36 clojurebot: #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:36 Bronsa: oh come on

16:36 chouser: ,(binding [*print-dup* true] (prn (java.util.ArrayList.)))

16:36 clojurebot: #=(java.util.ArrayList. [])\n

16:36 Bronsa: ,(macroexpand-1 '(x))

16:36 clojurebot: []

16:36 TimMc: (class #=(java.util.ArrayList.)) ;;= clojure.lang.PersistentVector

16:37 Bronsa: ,(class *1)

16:37 clojurebot: clojure.lang.Var$Unbound

16:37 TimMc: ^ No printing involved.

16:37 hiredman: the compiler uses eval reader and prn-dup for some things

16:37 shaym: justin_smith, it does look better , i guess the fact that LT was reporting totally different class exceptions was throwing me off

16:37 Bronsa: TimMc: printing/reading is happening during loading

16:37 ,(class (macroexpand-1 '(x)))

16:37 clojurebot: java.util.ArrayList

16:37 chouser: TimMc: What version of Clojure is that? I'm getting different results.

16:37 hiredman: TimMc: reader returns a clojure list containing an arraylist, which then has to be compiled to bytecode before execution

16:38 which means everything has to be serialized to bytecode

16:38 TimMc: chouser: 1.6.0

16:38 hiredman: the compiler lacking any special casing rules will serialize unknown objects to bytecode using pr and deserialize at runtime using read-string

16:39 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L4733-L4758

16:41 Bronsa: the issue is that print-dup either doesn't work for some collections or just emits regular colls

16:41 hiredman: (which would matter if say ArrayList was printing as [] for whatever reason)

16:42 actually it calls plain pr I think, no print-dup

16:42 TimMc: Fascinating. That kind of makes sense.

16:42 irctc: Trying 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:42 :prep-tasks [ ["javac" "com/xyz/prj/MyClass.java"] ["compile" "my-ns.blah"] "javac" "compile" ]

16:42 chouser: wow, I have so many different clojure jars in my .m2 :-P

16:43 irctc: But get javac: file not found: com/xyz/prj/MyClass.java

16:43 justin_smith: irctc: is com under a subdir?

16:43 TimMc: hiredman: That would explain this: (class #=(java.lang.Object.)) ;;= clojure.lang.Symbol

16:43 irctc: It's as if :java-source-paths ["src/main/java"] is not being used as the root.

16:43 chouser: (class #=(java.util.ArrayList.)) gives me ArrayList on Clojure 1.6.0

16:43 Bronsa: TimMc: wtf is that

16:44 TimMc: you have something behaving weird. that has never ever worked in regular clojure

16:44 chouser: "Can't embed object in code, maybe print-dup not defined: java.lang.Object@2de186d9"

16:44 hiredman: TimMc: you have some library loaded that is screwing with printing

16:44 Bronsa: TimMc: what are you using as your repl? I feel like nrepl or something changes the way your repl prints/reads stuff

16:45 irctc: justin_smith: running lein from project root. Call it / and the Java is in /src/main/java

16:45 TimMc: hahaha, I'll check

16:46 hiredman: ,*clojure-version*

16:46 Bronsa: hiredman: I confess I never really understood the difference between pr and pr-dup, where does it matter?

16:46 clojurebot: {:major 1, :minor 7, :incremental 0, :qualifier "master", :interim true}

16:46 chouser: Bronsa: print-dup tries harder to maintain object type

16:46 ...though after this discussion I wonder if it succeeds

16:46 hiredman: Bronsa: I dunno, all I understand is you should only use print-dup if you want everything to break all the time

16:47 chouser: ,(binding [*print-dup* true] (prn (sorted-set 1 2 3)))

16:47 clojurebot: #=(clojure.lang.PersistentTreeSet/create [1 2 3])\n

16:47 chouser: ,(prn (sorted-set 1 2 3))

16:47 clojurebot: #{1 2 3}\n

16:48 hiredman: but of course that create method doesn't exist

16:48 sandbags: i'd be interested to know if there's anyone here who has successfully used the :processable? decision point in Liberator?

16:48 Bronsa: so it's either "print in a way that doesn't work" or "print in a way that doesn't preserve type info"? :)

16:48 irctc: justin_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:49 hiredman: right

16:49 types are dumb anyway, right?

16:49 justin_smith: irctc: I think javac wants a path, not a classpath relative location - try specifying that full path instead?

16:50 TimMc: WTF, cannot reproduce.

16:51 justin_smith: irctc: alternatively, what do you specify as your :java-source-paths option?

16:51 Bronsa: I 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:51 but even then..

16:51 justin_smith: irctc: I think setting that properly would be the right thing

16:51 irctc: justin_smtih: rce-paths ["src/main/java"]

16:52 justin:smith: :java-source-paths ["src/main/java"]

16:53 hiredman: the 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:53 but then there would be 3rd party collections that depend on the guts of the compiler, and that'll turn out great

16:53 TimMc: Nonsense, who ever heard of such power?

16:54 hiredman: and even with that, serializing as we all know is not something one does simply

16:54 irctc: justin_smith: putting the full path doesn't compile the class. No .class generated.

16:54 Bronsa: hiredman: I really don't think there would be any issues with whitelisting what can be embedded

16:55 hiredman: and just exploding otherwise?

16:55 Bronsa: at the class level rather than at the interface level

16:55 hiredman: sure, why not

16:55 hiredman: dunno

16:55 Bronsa: i'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:56 chouser: or succeeding at write time and failing at read time

16:56 Bronsa: (sorted-maps can't be embedded ever, because of comparator-fn btw)

16:56 chouser: right, only the default comparator-fn

16:57 oh. maybe not even that?

16:57 Bronsa: there are obviously classes that can be converted to a normal clojure coll no problem like subvecs/map-nodes

16:57 irctc: justin_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:58 Bronsa: well, those actually must be.

16:59 irctc: justin_smith: ... when entering the full path (i.e. src/main/java/com/xyz/prj/MyClass.java)

16:59 Bronsa: chouser not with the current impl, no

16:59 irctc: justin_smtih: perhaps boot is the answer.

17:00 Bronsa: chouser would be trickier for sorted-sets than for sorted-maps since they comparator is hidden in the underlying sorted-map

17:01 oh the comparator is a public field

17:01 ,(.comparator (sorted-map-by >))

17:02 clojurebot: #object[clojure.core$_GT_ 0x3d24069e "clojure.core$_GT_@3d24069e"]

17:07 ionthas_: Is there any point into using concurrency if the target machine only has one core?

17:07 when I say point i mean benefit.

17:07 (performance wise)

17:08 justin_smith: ionthas_: code that is more readable because it isn't all fragmented into callbacks

17:08 performance wise? none

17:08 though 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:09 ionthas_: thanks justin_smit :)

17:12 Triclops256: Alright, 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:12 Also, I should mention, the jar does allow redistribution

17:15 TimMc: Bronsa, hiredman: I can't reproduce it! That is quite upsetting.

17:16 I put all my dependencies back and the behavior has disappeared.

17:18 url-: cd

17:18 justin_smith: ls

17:18 lazybot: lib lost+found media opt run

17:20 irctc: justin_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:44 amalloy: justin_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:23 TimMc: Triclops256: The jar should really be deployed to repository somewhere. You don't want to include it in your project.

18:33 justin_smith: amalloy: my thought was that there would always be an equivalent single threaded program that has what would effectively be unrolled coroutines.

18:33 I guess we could argue semantics about whether that is concurrency

18:34 amalloy: and about whether that is a program anyone who is not insane or a node.js programmer would actually write

18:37 spieden: anyone aware of companies hiring remote clojure devs? i'm checking out sonian and datastax so far

18:43 kwladyka: is it easy to get hosting with datomic with good price?

18:43 i am thinking about which database should i use

18:43 always i used only MySQL

18:44 drojas_: anyone knows any way to use core.match with hashsets?

18:44 kwladyka: i need database for web applications

18:44 drojas_: kwladyka: I'd suggest you to look at graph databases, but the best choice depends on what is your project about

18:45 neo4j is a good start for graph databases btw

18:45 ed-g: kwladyka, for what its worth I'm really happy with Postgres + Yesql.

18:46 kwladyka: but what with hosting later? Is it easy to run Clojure + something else then Postres or mysql? (with good price)

18:47 ed-g: I was shopping around for hosted databases and compose.io seemed good

18:47 check clojure-toolbox.com for all kinds of database libraries

18:47 lvh: kwladyka: it's just as hard as it is running with any other language

18:48 kwladyka: managing databases is nontrivial, so if you don't want to do it you should pay someone to

18:48 kwladyka: Amazon has RDS, Rackspace has Cloud Databases, ObjectRocket has MongoDB, Heroku has managed Postgres...

18:50 kwladyka: i 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:51 lvh: kwladyka: Can't have your cake and eat it; either it's your problem or someone else's.

18:51 (hint: if unsure, the correct answer is "someone else's"

18:52 kwladyka: the other options are cheaper

18:53 kwladyka: heroku has a free tier; a cheap rackspace db is 40/mo

18:53 kwladyka: as i see heroku and others solutions dont have datomic?

18:54 oh datomic working with other DB...

18:54 ok i know too less about this now :)

18:55 ed-g: kwladyka, 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:56 kwladyka: i 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:57 ed-g: kwladyka, 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:58 kwladyka: but how solutions like datomic works, because i am a little confuse. Is it storage engine or is use other storage engines?

19:00 as i understand it is interface to use other storage engines

19:04 spieden: kwladyka: yes, datomic lets you pick which storage backend to use with it

19:05 justin_smith: kwladyka: consider the fact that a db like postgres happens to use files on disk

19:05 in a similar way, datomic happens to use postgres

19:05 but it has its own semantics and rules that are not identical to those of postgres

19:06 kwladyka: mmm so at the end: for new projects (small i guess) do you recommend use free datomic or use free solutions like clear Postgres?

19:07 oh datomic free is only for open source

19:08 ok but there is datomic pro starter

19:10 spieden: yes, which i believe is free to use for small commercial deployments. i could be wrong

19:10 tcrayford____: it is, as long as you're accepting that you won't get software updates after 12 months

19:18 kwladyka: tcrayford____, this is a good point! thank you :)

19:18 ok it is time to sleep, goodnight!

20:04 j-pb: do 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:27 gfredericks: is anybody else getting a test failure on clojure/master?

20:29 I bet it's a dirty compile issue

20:31 yeah I think that's all it was; false alarm

22:05 justin_smith: the dev who cried test failure

23:58 auxchar: Just wondering, is there a way to make a PersistantList that contains itself?

23:59 justin_smith: auxchar: only via some reference type, or a delay or promise

Logging service provided by n01se.net