#clojure log - Jan 31 2014

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

0:00 cark: then you have to make sure your interpretation is the same than the one from browsers

0:00 that's a lot of work

0:01 seangrove: Oh, I'm saying anything is better than nothing

0:01 cark: might be easier to provide a servie that would validate with tagsoup =P

0:01 service

0:04 seangrove: cark: Ah, very clever actually. I suppose we could round-trip it to the server and use hickory there

0:05 Bit of a shame compared to doing it client-side, but could be a good stopgap

0:05 cark: but then you have to make sure that only your app uses the service

0:06 seangrove: Yeup

0:08 eyepatch: Why is Haskell better than Clojure?

0:08 nvm, just had to.

0:08 Why does http://ideone.com/mveUBD run 200x slower than http://ideone.com/CU5l4O

0:09 I tried to make them almost as identical as I could.

0:09 Though there were a few adjustments.

0:11 cark: you would need to use primitive ints all over, and i don't know if this is still the case, maybe declare your functions as static

0:11 eyepatch: ?

0:11 cark: add type hints to the functions too

0:12 optimizing this kind of stuff is kind of a black art

0:12 (to me)

0:13 buit you should be able to get at least to about half as fast

0:13 but*

0:13 eyepatch: black art as in evil or as in mysterious?

0:13 cark: mysterious

0:13 to me !

0:14 eyepatch: I should see if I can write less iterative version with type hints.

0:14 I wasn't really aware of them.

0:14 cark: start by adding (int value) everywhere you loop with this value and it comes from outside the function

0:15 should already shave a lot

0:15 (if my understanding is current)

0:15 i know they made a lot of optimizations behind my back

0:15 sneaky aintainers

0:15 maintainers

0:16 eyepatch: This might sound weird, but do you have a good resource on type hints handy?

0:17 cark: nope, i'm not too interested in that kind of stuff ...doing mainly business stuff here ...network is the bottle neck for me

0:19 eyepatch: finally, found something on Clojure.org

0:26 devn: eyepatch: anything in particular you are trying to figure out?

0:27 eyepatch: I've just never dealt with type hints.

0:27 But I'm headed to bed, so maybe tomorrow.

0:44 quizdr: it looks like let allows multiple bindings but if-let only allows a single binding, is that right?

0:46 Raynes: Yes.

0:49 quizdr: is there an elegant way to bind the if-let in two different ways, depending on the outcome of the binding test?

0:49 it looks like the if-let just simply fails or offers a then, but no other binding alternative should the test fail

0:51 I guess I should think of if-let as a variation of if, not a variation of let

1:09 does anyone use simple macros for logging or is it a bad idea? for example I just hacked up these half dozen lines: https://gist.github.com/quizdr/8727342

1:12 cark: quizdr: i thuink it's completely valid

1:12 quizdr: thanks, i'm new and don't want to "abuse" macros and get into bad habits.

1:40 seangrov`: How can we check if something is a sequence? I always blank on this...

1:40 Ah, coll?

1:40 ddellacosta: seq?

1:41 ,(doc seq?)

1:41 clojurebot: "([x]); Return true if x implements ISeq"

1:41 cark: ,(seq? [])

1:41 clojurebot: false

1:41 cark: ,(sequantial? [])

1:41 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: sequantial? in this context, compiling:(NO_SOURCE_PATH:0:0)>

1:41 cark: ,(sequential? [])

1:41 clojurebot: true

1:41 ddellacosta: ,(seq? (seq []))

1:41 clojurebot: false

1:41 ddellacosta: huh

1:41 duh, empty

1:41 ,(seq? (seq [1]))

1:41 clojurebot: true

1:41 ddellacosta: right

1:42 seangrov`, cark: what is the difference between Sequential and ISeq?

1:42 cark: well

1:43 ,(seq? [1 2])

1:43 clojurebot: false

1:43 cark: but it can be sequed

1:43 ddellacosta: cark: ?

1:43 cark: seq works with it

1:44 ddellacosta: cark: seq works with what?

1:44 cark: with a vector

1:44 with any Sequential

1:44 ddellacosta: https://groups.google.com/d/msg/clojure/K4Ss-eJyBLE/Ycm85a0PfUwJ

1:45 cark: right, but you're just defining things through tautologies now

1:45 cark: according to your link, my understanding is wrong

1:46 (sequable? [])

1:46 ,(sequable? [])

1:46 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: sequable? in this context, compiling:(NO_SOURCE_PATH:0:0)>

1:46 cark: =/

1:46 ,clojure.core.incubator/sequable? [])

1:46 clojurebot: #<CompilerException java.lang.ClassNotFoundException: clojure.core.incubator, compiling:(NO_SOURCE_PATH:0:0)>

1:47 cark: ,(clojure.core.incubator/sequable? [])

1:47 clojurebot: #<ClassNotFoundException java.lang.ClassNotFoundException: clojure.core.incubator>

1:47 cark: ,(require 'clojure.core.incubator)

1:47 clojurebot: #<FileNotFoundException java.io.FileNotFoundException: Could not locate clojure/core/incubator__init.class or clojure/core/incubator.clj on classpath: >

1:47 cark: =/

1:47 ahwell i guive up !

1:47 anyways i was wrong !

1:47 ,(sequential? {})

1:47 clojurebot: false

1:48 cark: there is the proof

1:48 quizdr: i thought sequential just meant the collection is ordered. but doesn't mean the sequence API is available on that collection (though seq is implicityly called in most of the sequence APIs to first turn the collection into a seq)

1:48 cark: that's apparently what it is

1:49 quizdr: a vector is not a sequence, but you can call sequence apis on it as they will first call seq on it

1:49 ddellacosta: quizdr: yeah, that is what the link above suggests.

1:49 quizdr: ,(seq? [1 2])

1:49 clojurebot: false

1:49 cark: ,(col? [])

1:49 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: col? in this context, compiling:(NO_SOURCE_PATH:0:0)>

1:49 ddellacosta: ,(sequential? [1 2])

1:49 quizdr: ,(sequential? [1 2])

1:49 clojurebot: true

1:49 true

1:49 cark: ,(coll? [])

1:49 clojurebot: true

1:49 cark: ,(coll? {})

1:49 clojurebot: true

1:49 ddellacosta: but it is sequential, right. Well, a bit of Clojure 101 for me out of the way...haha

1:49 cark: now the hard one

1:49 ,(coll? "")

1:49 clojurebot: false

1:49 cark: hahaaa !

1:49 ,(seq "hello")

1:49 quizdr: ,(seq? "abc")

1:49 clojurebot: (\h \e \l \l \o)

1:49 false

1:50 quizdr: ,(sequential? "abc")

1:50 clojurebot: false

1:50 quizdr: ,(coll? "abc")

1:50 clojurebot: false

1:50 quizdr: ,(coll? (seq "abc"))

1:50 clojurebot: true

1:50 quizdr: ,(sequential? (seq "abc"))

1:50 clojurebot: true

1:50 quizdr: ok that's enough of that

1:51 cark: so yeah, the incubator seqable? function would be usefull

1:55 quizdr: i'm curious about the memory limitations of something like this for a factoria: #(reduce * (range 1 (inc %))) it takes up O(n) memory ,right?

1:56 or because range is lazy and there is no head retention, the memory is in constant space?

1:56 cark: should be garbage collected, but anyways that's a non issue, the result would eat up memory faster than the original sequence

1:57 quizdr: ah, true, true...

2:16 cgag: ls

2:16 lazybot: bin boot media opt proc srv

2:17 cgag: clear

2:18 disrard that i'm an idiot, friggin irssi

2:20 mercwithamouth: =P

3:27 fredyr: morning

3:31 mercwithamouth: morning

3:42 elsen: hello!

3:46 what's your plan for this beautiful friday dear clojurists?

3:48 ddellacosta: elsen: well, it's still Thursday here, and I'm still finishing up my work day. But thank you for asking. :-)

3:48 elsen: excuse me, it's Friday night. Guess it's been a long week... :-p

3:49 * ddellacosta checks himself in the mirror for signs of braindead-ness

3:49 deadghost: elsen, try to finally, finally finish my derp simple note site

3:50 elsen: deadghost: that's sounds like a nice plan

3:50 what's special about it?!

3:51 deadghost: it's special because it's written by a special person

3:51 in a special language

3:51 super special

3:51 I'm pretty much testing clojure waters

3:52 right now it looks good to write my next major project in clojure

3:52 idk about cljs

3:52 ddellacosta: deadghost: do it. and CLJS is awesome

3:53 elsen: and it'll make your js so special!

3:54 deadghost: I have to say

3:54 after 3 months of CL and clojure

3:54 and writing some js yesterday

3:55 I got very confused

3:55 my brain has to think about not wrapping everything in parentheses

3:58 elsen: loosing the prefix notation is the worse

3:58 deadghost: so elsen what are you doing

3:59 I'm also thinking about ditching html

4:00 and just use enlive + enlive hiccup helpers

4:00 elsen: hiccups looks really cool

4:00 but I wonder if it's a good long term choice

4:01 if you want to work with a designer later, jinja-like templating would be more natural

4:01 piranha: it's a hard question, but from my experience writing it in medium-sized app (~2k sloc) it's quite convenient

4:01 except for designers, of course :)

4:02 deadghost: ehh I've done stuff with a designer

4:02 and I really question the benefit of keeping things in html for designer's sake

4:02 elsen: piranha: what would you use for large-sized app?

4:02 (just curiosity)

4:03 piranha: elsen: well right now we're using React with CoffeeScript and our app is quite hard to comprehend for markup guys

4:03 elsen: deadghost: really?!

4:03 piranha: so I guess hiccup wouldn't do much more harm there...

4:04 deadghost: elsen, I mean is it really much harder to understand

4:04 designers can just run the website

4:04 and see the html

4:04 piranha: don't think so as well, if a guy can find his way through coffeescript/react, then hiccup will be a minor thing. If he can't, then sure, just look at resulting HTML in your browser

4:04 deadghost: idk do designers typically touch code much?

4:05 would imagine it'd be designer + frontend guy

4:05 at least that's how it ended up being when I did stuff

4:05 piranha: well I'm not really talking about designers, but more markup coders

4:05 designer here has no idea about HTML code :)

4:06 elsen: yea, I'mmore thinking of the guy who does the frontend, css, html, etc

4:06 deadghost: well if you mark up coder is front end in general

4:06 if he can handle js

4:06 then it shouldn't be an issue

4:06 it's not rocket science

4:07 elsen: I'd think that'd create more friction

4:07 is it worth the gain?

4:08 deadghost: in having the front end guy deal with hiccup?

4:08 elsen: yup

4:08 deadghost: well I'll say it depends on who you have on frontend

4:09 http://beta.deadgho.st/

4:09 pw: goalrocket

4:09 like the guy that front-ended that

4:09 I trust won't have an issue with hiccup

4:09 like a day or less to figure out

4:10 more if you throw enlive into the mix

4:10 but I'd say two days tops

4:13 elsen: lovely

4:13 deadghost: elsen, we have no clients ;_;

4:14 elsen: well

4:14 you have no product

4:14 ;)

4:14 deadghost: our product is we'll code stuff for money/food

4:16 http://dreadfulfacts.com/

4:16 we also did that

4:17 elsen, how do you get money

4:17 I want money too

4:18 elsen: "You make as much impact on the world as a ping pong ball on a brick wall." <3

4:18 big data in java

4:18 no clojure yet, but I'm slowly working on it

4:18 dude, if I may, the first thing I was looking on your website is an address

4:19 deadghost: are you suggesting I list my home address?

4:19 elsen: A postal box?

4:24 If I'm looking for a company to do my website, knowing that they're in the same city/country than me would be a decision point

4:25 see ddellacosta? He doesn't even know what time it is where he lives, that's not a good sign if I want to have a confcall with him ;)

4:25 ddellacosta: haha

4:25 elsen: hey, come on, I get it right...most of the time. ;-)

4:26 deadghost: original plan was to target locally

4:26 scraped yellowpages for nearby businesses with no listed sites

4:26 and sent mailings

4:26 but it doesn't help that this area is kinda poor

4:26 might have to shift strategies

4:26 and visit businesses to see if they have anything I can solve with programming

4:27 elsen: no familly/friends businesses that'd like a website?

4:27 deadghost: nope

4:28 elsen: no local association? library? drug dealers?

4:28 deadghost: probably will compile a list of nearby business parks this weekend

4:28 and visit them next week for research

4:28 thinking about volunteering sites for local museums

4:29 and ask them to pay me in referrals

4:29 but I can see that very easily resulting in nothing

4:31 elsen, I'm very curious what kind of site drug dealers would have

4:32 well I guess there's silk road

4:32 wait is that still alive?

4:32 elsen: I'm almost certain I saw an article about a buy that bought drug.com

4:33 with a fancy 90s website, like the one at the beginning of breaking bad

4:33 deadghost: I just went to drug.com

4:33 and got some weird japanese medical company

4:36 elsen, dumb thought

4:36 I sell the data I scraped from yellowpages to web dev businesses

4:40 elsen: yea, datasets are trendy these days

4:42 mashape.com or a paid version of datahub.io?

4:43 deadghost: I was thinking of just hitting up web shops and going hey I'll sell you this list of 5000 businesses in a 100 mile radius of your location for $2000

5:08 xificurC: I'd need some pointers. Let's assume I have a csv file with data that has (unique-id, grouping, float-1, float-2) and another one with (grouping, sub-grouping, sub-group-percentage-1, sub-group-percentage-2). Now I need to take the first data and break each line into the group's number of subgroups and calculate their new floats based on the subgroups percentages. How would you solve this?

5:39 quizdr: is there a way to quickly reset the repl so it has no memory of prior definitions?

5:42 jowag: quizdr: (ns user2) :)

5:42 sobel: haha

5:46 someone mind telling me what i'm doing wrong? it's a short expression... http://pastie.org/private/rjp6fktjtzildaqndkfg

5:46 jowag: quizdr: more serious answer is (map #(ns-unmap *ns* %) (keys (ns-interns *ns*)))

5:46 sobel: that is 'palindrome detector'

5:46 quizdr: jowag thanks i found a good utility here: http://stackoverflow.com/questions/3636364/can-i-clean-the-repl

5:48 jowag: quizdr: but generated classes are not removed (e.g. deftype, protocols), so it is not equal to the fresh repl

5:48 quizdr: good to know

5:51 sobel are you getting and error? i haven't run it but at first glance it seems to be ok

5:51 jowag: sobel: give me the example input to the function

5:51 sobel: let me augment that pastie

5:52 http://pastie.org/private/a9rfdkzntktkfpnoaghf6g

5:52 jowag: sobel: but probably the error is in the (empty? (first fwd)), make it (empty? fwd)

5:52 sobel: OH

5:52 jowag: that now stands out like a sore thumb

5:53 jowag: :)

5:53 sobel: yeah, works now

5:54 i was just messy. i had a different implementation and that was actually part of it.

5:54 4clojure's tuts are great so far

5:56 quizdr: when i use (empty? fwd) in your function, i don't get errors, but the test still seems to fail

5:56 i.e. with (yourfunction [1 2 3 4 5 6]) returns false

5:56 sobel: that is accurate

5:56 a palindrome is the same seq forward as backward

5:56 quizdr: oh, right

5:56 nevermind

5:57 i agree 4clojure is an awesome learning tool. you comparing yoru answers to others, also playing the "code golf" ?

5:59 i think there is a more elgant solution, perhaps this hint might help:

5:59 ,(map = [1 2 3 4] [1 1 1 1])

5:59 clojurebot: (true false false false)

6:00 quizdr: and then....

6:00 ,(every? true? (map = [1 2 3 4] [1 1 1 1]))

6:00 clojurebot: false

6:00 jowag: ,(#(every? true? (map = (seq %) (rseq %))) [1 2 3 2 1])

6:00 clojurebot: true

6:01 quizdr: the great service of 4 clojure is in learning to take a 5-line function and turn it into a 1-line expression.

6:05 locks: ,(reduce 'and (map = [1 2 3 4] [1 1 1 1]))

6:05 clojurebot: false

6:05 sobel: i've been writing map and filter exprs in python a while. i didn't know it was FP.

6:05 locks: boo

6:06 sobel: but the data structure are mutable, right?

6:06 llasram: locks: That's the symbol `and` I'm afraid, not the macro. Also -- is a macro, so can't pass as a function

6:06 locks: oh

6:06 roger that

6:07 sobel: mostly i'm using the 4clojure tuts to just get a series of increasingly complex tasks. will work on style and such later, after i get enough syntax and idiom pounded into my head

6:07 jowag: ,(#(= (seq %) (rseq %)) [1 2 3 2 1])

6:07 clojurebot: true

6:07 sobel: locks: i didn't mean to say python is FP

6:08 locks: sobel: was just curious, because ruby has all the Enumerable stuff, but you can mutate the data meanwhile, which can be problematic

6:09 sobel: eff ruby

6:09 i'm probably poisoned for life on ruby by rubyists

6:09 jowag: ,(#(= % (rseq %)) [1 2 3 2 1])

6:09 clojurebot: true

6:10 locks: :C

6:10 sm0ke: when will core.async come out of alpha?

6:10 they have some complex semantic versioning for sure

6:10 sobel: so, who makes clojure? i have not looked into the project at all

6:11 clgv: sm0ke: no they dont. tbaldrige said replied to my similar question that he'd consider it out of alpha

6:11 quizdr: jowag specializes in the line that just keeps getting shorter

6:12 sm0ke: clgv: what does that mean? is it going to be named like this always?

6:12 clgv: sm0ke: he said it is stable enough for production if I remember correctly. and then a discussion about semantics and versions started-...

6:12 jowag: they made a breaking change to the API few days ago, so I would consider it still in alpha

6:13 clgv: jowag: well even for compliance with semantic version you can introduce breaking changes in minor version increments as long as there is a zero in front

6:14 locks: for compliance with semantic version, < 1.0 you can do whatever you like, since it doesn't matter

6:14 which means it's alpha

6:14 jowag: well but Clojure does not follow semantic versioning

6:15 clgv: well most core libraries use stable 0.x.y releases

6:15 I dont get the "eternal" alpha neither ;)

6:16 locks: you get to "I warned you", I guess

6:17 arcatan: i guess core.async is out of alpha, but not out of beta :P

6:17 locks: that's the same

6:18 clgv: I feel better as well when using a lib where the developers are confident enough to do a "stable" release ;)

6:19 locks: ruby and especially node suffers from the same syndrome

6:19 http://rake.rubyforge.org/doc/release_notes/rake-10_0_0_rdoc.html

6:20 https://rubygems.org/gems/pg/versions

6:20 surely they could 1.0 by now

6:43 mklappst_: Hey. I just put this together to generate a random color in clojure: https://gist.github.com/mklappstuhl/8730542

6:44 Curious if it can/should be done differently

6:46 xificurC: mklappst_: out of curiosity, why are you using keywords instead of characters? Since you are building a string from them in the end anyway

6:48 locks: https://www.irccloud.com/pastebin/li7RYZnH

6:50 xificurC: yeah like locks wrote or just (apply str \# (take 6 ...))

6:51 locks: ^

6:51 wei__: ,(format "%x" (rand-int 16rFFFFFF))

6:51 clojurebot: "dc6c71"

6:51 wei__: ,(format "%x" (rand-int 16rFFFFFF))

6:51 clojurebot: "2d00a1"

6:51 locks: just got schooled.

6:51 xificurC: heh

6:52 and locks, using shuffle isnt the best idea, you wouldnt get all the possible colors from that

6:52 jowag: wei__: probably won't work in CLJS

6:53 locks: xificurC: right, I derped that one hard

6:54 mklappst_: locks: xificurC, regarding shuffle... should it still be (repeatedly 6 #(rand-nth c)) then?

6:55 wei__: jowag: hmm, you're right

6:55 xificurC: btw, what library would you suggest using for one-pc data management? I'd like something where I can do the typical SQL stuff but also some simple mathematical relations

6:56 locks: mklappst_: yup

6:56 mklappst_: xificurC: whats one-pc

6:56 xificurC: mklappst_: yes I'd go more in https://www.refheap.com/30343

6:57 mklappst_: I mean I want to crunch a lot of data but dont need the option of distributing

6:58 mklappst_: ah

6:59 sobel: ok, i need a sql library. i don't want orm, i will write my own queries... suggestions?

7:00 s/sql/jdbc

7:00 mklappst_: thanks for your input guys. updated the gist with all the different variants https://gist.github.com/mklappstuhl/8730542

7:00 locks: sobel: http://sqlkorma.com/

7:00 mklappst_: s/guys/people

7:01 wei__: jowag: this should work in cljs: (.toString (rand-int 16rFFFFFF) 16

7:01 )

7:02 sobel: locks: i don't want a DSL in front of sql, i rather provide my own queres

7:02 SQL is already a DSL

7:02 i find it wrong-headed to invent DSL on top of DSL :)

7:02 locks: well…

7:02 mklappst_: wei__: cool, that works

7:03 sobel: that i can see, korma does that

7:03 "Take the pain out of relations"

7:03 ...what pain?

7:03 locks: I think you answered yourself then, JDBC :P

7:03 sobel: there's no thinner wrapper than korma?

7:05 mklappst_: Now that I have a random color I want to use the same color twice in a form so I have to "save it" and can't just call the function again... what do I need to look for?

7:06 locks: a let, probably

7:06 sobel: is clojure.java.jdbc a ..standard namespace? i don't even know how to ask this question in clojur-ese

7:06 do i need to add a lein dep?

7:07 CookedGryphon: sobel: yes, see https://github.com/clojure/java.jdbc

7:07 you'll need to add [org.clojure/java.jdbc "0.3.3"]

7:08 sobel: CookedGryphon: thx

7:24 mklappst_: locks: really, let would be enough? I thought that would only bind the var to the function and not its result, good to know

7:41 RickInAtlanta: does anyone know of an example edn file I could look at? I am trying to understand if a file is just a bunch of vectors and maps printed out, or if there are def statements.

7:43 kzar: RickInAtlanta: Well in Javascript say `var a = [1,2,3];` would define a to be the vector 1,2,3 but in JSON you would probably do something like "[1,2,3]" or "{a: [1,2,3]}". I think it's the same idea with edn vs clojure

7:43 The only confusion is that clojure itself is made up of edn

7:44 so `(def a [1,2,3])` is itself edn but it also defined a to be the vector 1,2,3. I'm guessing in a .edn file you'd again have "[1,2,3]". That said I'm probably not best person to ask

7:44 RickInAtlanta: kzar: that does make sense

7:44 andyf: RickInAtlanta: Not all edn files will look the same visually, but here is one that is a single Clojure map: https://github.com/jonase/eastwood/blob/master/resource/jvm-method-info.edn

7:45 RickInAtlanta: Can you search for def in the file you are looking at?

7:46 RickInAtlanta: andyf: I want to use it in my own projects, but I figure if it is a standard format, I should try to use it in a standard way (if there is one)

7:46 thanks for the sample

7:47 andyf: RickInAtlanta: An edn file typically is just one or more vectors/maps/sets printed out, often nested within each other. You can quickly try reading it in using clojure.edn/read or read-string

7:47 Well, quickly if it isn't too large :-)

7:50 RickInAtlanta: If I understand, if I were defining a backup folder in a .clj file I might have (def backup-folder "c:\\bak") In edn I would probably have {:backup-folder "c:\\bak"}, putting the description in the data structure.

7:51 andyf: yes

7:51 RickInAtlanta: thanks

7:52 andyf: project.clj files in Leiningen are usually also edn format (except for a few I have seen that are actually executable code, too)

7:52 RickInAtlanta: (inc andyf)

7:52 lazybot: ⇒ 2

7:52 RickInAtlanta: (inc kzar)

7:52 lazybot: ⇒ 1

7:52 kzar: heh ty

7:52 ,`(inc kzar)

7:52 clojurebot: (clojure.core/inc sandbox/kzar)

7:59 jowag: locks: xificurC: the distribution of shuffle vs random-int for two component color http://twitpic.com/dtyilz/full

8:01 xificurC: jowag: nice

8:01 jowag: the code https://gist.github.com/wagjo/8731671

8:04 meingbg: What triggers the execution of top-level forms in clojure?

8:05 jowag: meingbg: if they are part of .clj file, then they are evaluated when the file is loaded

8:06 meingbg: jowag: And if a namespace is :require d, does that mean the file is loaded?

8:06 jowag: meingbg: this happens e.g. when you call (require 'foo.bar)

8:06 meingbg: jowag: ok, well that's what I thought, but it doesn't seem to work.

8:06 jowag: meingbg: yes but only if it has not been loaded yet. In other words, it gets evaluated once

8:07 meingbg: if you want to force reload, use this (:require [foo.bar] :reload-all)

8:09 andyf: jowag: Is there a :reload and a :reload-all that do something different there?

8:09 clojurebot: Cool story bro.

8:09 jowag: meingbg: but be aware that top level forms are evaluated also in other cases. For example in AOT compilation or when you use core.typed, the namespaces are reevaluated

8:10 meingbg: so it is advised against doing side effects in top-level forms

8:12 meingbg: jowag: Well, I have res.clj which alters *data-readers*, then core.clj which requires res and thereafter needs the data readers in order to be parsed. However, after requiring res.clj, *data-readers* remains unchanged.

8:12 jowag: meingbg: reload-all reloads also all libs (another name for .clj file which has (ns) as first top level form) that are referenced from the library you are reloading :)

8:12 meingbg: see http://clojuredocs.org/clojure_core/1.2.0/clojure.core/require

8:13 andyf: jowag: Thanks, yeah, I see now. I had used :reload before but not :reload-all

8:15 meingbg: jowag: Does it work differently with nREPL? Or what may be the issue in my case?

8:15 xificurC: anyone using korma or suggeting an alternative?

8:16 jowag: meingbg: how do you alter it, set! or alter-var-root ?

8:16 meingbg: jowag: var-set

8:17 zilti: I just noticed something while loading 48k rows out of a database. The actual loading out of the database into a datastructure takes 2.4s with SQLKorma. But assigning it to a variable afterwards takes another whopping 300ms. What's going on there?

8:18 jowag: meingbg: var-set is thread local, maybe alter-var-root will help

8:18 meingbg: jowag: I'll try.

8:19 jowag: meingbg: anyway, the correct way is to put custom data readers into data_readers.clj

8:19 see http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/*data-readers*

8:19 meingbg: jowag: Yup, know about that.

8:20 jowag: It just puzzled me.

8:20 jowag: Would data_readers.clj in a library make the readers work in any project using that library? Or is it project-local?

8:21 scape_: anyone use .ready method on a bufferedreader of an inputstreamreader for a socket? it always seems to return false for me

8:23 meingbg: jowag: And alter-var-root doesn't work, btw. It seems as if *data-readers* is thread-locally bound, so alter-var-root doesn't have any effect at all

8:23 jowag: meingbg: it will work but there may be clashes if two dependencies both define data_readers.clj, of user will have its own data_readers.clj.

8:23 meingbg: so normally libraries should not have a custom data_readers.clj

8:25 meingbg: jowag: Right. In this case though, that is the very purpose of the library.

8:26 jowag: meingbg: are you testing it in the repl? try testing it outside IDE

8:26 meingbg: jowag: ok.

8:26 scape_: oh i misunderstood ready method incorrectly :-\

8:29 meingbg: jowag: lein compile works just fine, but lein run complains about missing reader function.

8:36 jowag: For some reason I don't like the project global data_readers.clj. The behaviour of the reader is defined by the active namespace, and one global variable *data-readers*. It's a bit inconsistent.

8:43 zilti: I just noticed something while loading 48k rows out of a database. The actual loading out of the database into a datastructure takes 2.4s with SQLKorma. But assigning it to a variable afterwards takes another whopping 300ms. What does Clojure do that it takes that long?

8:45 TimMc: zilti: How are you determining that?

8:49 zilti: TimMc: With the "time" macro. (time (def result (k/select whatever))) vs (time (k/select whatever))

9:01 sobel: ok, i got this back from my postgres database.. it's the right value so i'm more or less happy so far, but.. is this a Date object or what?

9:01 (#inst "2009-03-26T21:31:28.122222000-00:00")

9:01 ,(#inst "2009-03-26T21:31:28.122222000-00:00")

9:01 clojurebot: #<SecurityException java.lang.SecurityException: denied>

9:02 mdrogalis: sobel: That's a tagged literal.

9:02 ,(type #inst "2009-03-26T21:31:28.122222000-00:00")

9:02 llasram: zilti: criterium or it didn't happen

9:02 clojurebot: #<SecurityException java.lang.SecurityException: denied>

9:02 mdrogalis: Hmph.

9:02 sobel: i'll type it on my end

9:03 locks: jowag: that's a really cool visualization, thanks :) I derped because shuffle won't repeat elements *shakes head*

9:04 zilti: llasram: What "criterium"?

9:07 mdrogalis: zilti: It's a benchmarking library.

9:08 zilti: mdrogalis: Is "time" so utterly unreliable even though I can perfectly reproduce the result give or take a few ms?

9:08 llasram: On the JVM, yes

9:08 Well, JIT makes it worse anyway

9:09 zilti: I tested while on the REPL, both thingies alternating. One, then the other, then the first again, the second again. Same results

9:12 xificurC_: how do you connect to an odbc in korma?

9:12 llasram: zilti: Cool, but that doesn't tell anything about the distribution of results or the significance of the overhead. Unless you're using criterium or a process similar to what it encapsulates, then you're just reporting anecdotes

9:13 zilti: llasram: I could also use a stopwatch. 300ms is something I should be able to catch with it.

9:13 TimMc: zilti: I'm going to guess that laziness is involved.

9:14 Somehow.

9:14 Try (time (def result 5))

9:14 llasram: My guess is that their measurement process isn't accounting for the variability in the I/O

9:15 scape_: xificurC_: preface it with odbc

9:15 xificurC_: scape_: managed already thanks

9:15 zilti: TimMc: Gives 0.064 ms

9:16 TimMc: Yep, needs more criterium.

9:16 mercwithamouth: hmm i'm debating on getting the little schemer...is it all it's cracked up to be as far as getting a better grasp on lisp?

9:17 zilti: mercwithamouth: "Little Schemer" is really the beginner's book but it's very nice and well done.

9:17 mercwithamouth: alright...i'l pick it up. that sounds like what i need

9:19 that and sicp

9:21 mdrogalis: zilti: So the JVM is pretty magical. After you run your program long enough, it's going to start changing it significantly if it can.

9:21 zilti: Well I'm letting criterium run now

9:23 xificurC_: anyone ran korma against a csv via odbc? :)

9:24 TimMc: zilti: Go make yourself some coffee

9:25 zilti: TimMc: Oh nice. I got an OutOfMemoryError.

9:25 mdrogalis: Heh.

9:25 zilti: So, no criterium for this.

9:27 mdrogalis: That probably just means there's an underlying problem. Criterium shouldn't be accuring memory.

9:27 accruing*

9:27 Or larger amounts of it from run to run, I mean.

9:39 sobel: xificurC: why via odbc? i thought there was a csv driver

9:40 xificurC: sobel: is there?

9:40 scape_: http://korma.github.io/Korma/korma.db.html

9:41 I do not think so

9:41 xificurC: scape_: been there, dont see csv

9:42 I do have a csv connection or what to call it working on odbc though, but not through korma

9:43 sobel: http://sourceforge.net/p/csvjdbc/code/ci/master/tree/

9:44 i guess it's not in clojars

9:44 xificurC: I didnt do much, (defdb db (odbc {:dsn "csv"})) - that threw no error. Then (defentity brands-list) - the name of the csv file I want to query, no error here too. Then (select brands-list) - hangs

9:46 scape_: defentity wouldn't throw an error, to my knowledge

9:46 xificurC: scape_: well yeah the worst part is I get no errors but the process just hangs

9:47 scape_: perhaps try on a small csv a raw statement that selects all?

9:47 xificurC: I tried following the example from github but it all seems too magical. Creating a db with defdb but never calling it again, then creating an entity and not even telling where to look for it

9:47 scape_: I tried just that, its a 16KB file

9:48 scape_: korma assumes the last defdb to be the db of choice for all subsequent function calls, unless overridden

9:48 xificurC: ok

9:48 i still cant debug what went wrong though

9:49 scape_: not sure this would work with csv or whatnot, but: https://gist.github.com/viperscape/6135158

9:49 it builds defentities for all tables in the db

9:49 that gist relies on info schema, not sure if odbc has that

9:50 sobel: do you have another way to query through that odbc connection?

9:51 i would try to divide the problem space up at this point

9:52 xificurC: scape_: that threw a "CompilerException java.sql.SQLException: Connections could not be acquired from the underlying database!, compiling:(form-init6077136520192018995.clj:2:1) "

9:54 sobel: this is the first time im trying :S I have a normal db I could try connecting to but its down right now

9:54 sobel: d'oh

9:54 scape_: yea i don't know if odbc supports info schema, my guess is no and korma expects mysql or mssql and is complaining about that

9:55 sobel: honestly, clojure.java.jdbc returns nice structures. what was the basic problem?

9:55 xificurC: all i'd like to be able to do is connect to a csv or xls file as to a database and use sql on it freely

9:56 sobel: i understand some languages made resultset mapping a hassle, but clojure seems have it made fairly convenient to me

9:57 in hindsight, my initial take on ORMs was right for me. they are a needless complexity.

9:58 scape_: korma wraps things well, very clojure friendly but at a loss of some things

9:59 xificurC: im fine with java jdbc if it works

9:59 sobel: that's fine and good, but it crosses a line of responsibility i don't like being crossed

10:00 scape_: yea i learned update in korma returns nil, regardless

10:01 xificurC: any suggestions then how to get sql working on an excel file or csv (without setting my hair on fire)?

10:01 sobel: i have the same argument against 'migrations' in ruby. a DSL on top of a DSL, or meant to abstract over several DSL that differ for very good reasons, is a leaky abstraction and it has led to tears

10:01 xificurC: google docs

10:02 xificurC: sobel: in clojure please :) Excel VBA supports SQL as well if I want to go back to the metal

10:02 sobel: heh, VBA as 'metal'

10:02 scape_: I bet. I ran a query in korma and got back like 1200 rows, but the same query in mssql directly returned 1600+; never could figure it out

10:02 xificurC: sobel: well it certainly isnt a tool, just the ingredients :)

10:03 sobel: import the csv into a real database (i like postgresql) and hit it with jdbc from there

10:03 xificurC: that sounds reasonable

10:03 sobel: xificurC: au contraire, they have relational tools. you might be surprised what you can do with docs these days.

10:04 for example, you can make a timer call a function that scrapes a URL and loads it into your spreadsheet. then you can use that in relational queries.

10:04 what they have done with data tools is...sick

10:05 i just wish i could get that kind of service in a private/local cloud system. i know their platform is entirey too big to distribute like that, though.

10:12 RickInAtlanta: i just googled "clojure defrecord" now I am looking at an add that asks if my deftypes are a litle flabby!

10:12 scape_: lol

10:13 gfredericks: ads aren't even being written by humans anymore are they

10:13 are people running genetic algorithms or something?

10:14 eventually they will stumble onto a phrase so potent nobody will be able to resist clicking

10:14 edbond: where do you see those ads? I don't see any ads at google

10:14 RickInAtlanta: no, I think this was, it offers to help me lose hundreds of lines from my codebase overnight. It links to a github project called potemkin

10:15 edbond: at the bottom of the results page

10:16 gfredericks: or is this just ztellman trolling by buying his own ads

10:16 edbond: RickInAtlanta, I see only related searches :(

10:17 dsrx: Why won't Clojure programmers shut up about how great their data structures are? Because they're not mutable!

10:17 gfredericks: ~rimshot

10:17 clojurebot: Badum, *tish*

10:17 scape_: nice

10:18 RickInAtlanta: gfredericks: who was it the other day that had an ad "Rich Hickey hates him. Improve your clojure performance with this one weird trick."

10:18 gfredericks: you can't shut the clojure programmer up, you have to make a new clojure programmer that is shut up

10:18 RickInAtlanta: I dunno anymore; I feel like I keep hearing about variants

10:18 I first saw such a thing on ztellman's twitter

10:19 RickInAtlanta: Ok, so it was the same guy. :)

10:19 gfredericks: I'm gonna go with the theory that he's creating them

10:20 mmitchell: Is there a core fn for mapping over the values of a hash-map and returns a new *hash-map*? Looking for something more concise than reduce and for/into

10:20 gfredericks: mmitchell: not in core; people make it for util libs all the time

10:20 mmitchell: gfredericks: ok thanks

10:21 gfredericks: I think some people have the opinion that if you're trying to change everything in a map at once then maybe you shouldn't use a map; that might be the motivation for clojure.core not having anything built in

10:21 I still want to do it all the time though :)

10:21 john2x: hi.. i'm trying out Friend, but it's core.cache dependency is overriding lib-noir's. `lein deps :tree` suggests I do `[lib-noir "0.7.9" :exclusions [org.clojure/core.cache]]`, so I do that, but now I get `No such var: clojure.core.cache/through`. Do I have no choice but to keep on drilling fixing the dependencies?

10:21 mmitchell: right :)

10:21 xificurC: sobel: vba is a bad place to work at, no matter what it ca ndo

10:25 sobel: Clojure programmers never die, but the world changes namespaces

10:26 i hope i memed that up right

10:27 dsrx: better answer: Because they're mutable and persistent

10:27 s/mutable/not mutable/

10:29 john2x: ah should've known explicitly adding [org.clojure/core.cache] overrides all other libraries' dependencies..

10:41 mmitchell: is there an emacs more for re-formatted a clojure comment block? By re-format I mean tuck long lines down to the next etc.?

10:42 arcatan: whatever is usualyl bound to M-q

10:43 mmitchell: arcatan: that works for indenting, but not for code comments that start with ";;"

10:44 I should have said "clojure comment lines" not "block" sorry

10:44 arcatan: hmmh, works for me

10:44 mmitchell: oh dang, really? hmm

10:44 arcatan: weird.

11:05 nkoza: there is a way to temporary disable the execution of an atom watchers?

11:05 (without doing remove-watch / add-watch for every watcher)

11:13 edbond: nkoza, add another atom (paused) and check if it true in watch function

11:14 nkoza: edbond: good idea, it's a common idiom?

11:16 edbond: I think so, working code that solves the problem is pretty common idiom imo

11:16 juxovec: hi there, how can I create function which inserts 2 nodes into vector directly while creating vector (I am in Hiccup template [:table (myfn)] and need myfn to create two [:tr][:tr]

11:18 edbond: juxovec, I would use (apply vector :table (myfn))

11:18 xificurC: sobel: you told me to get postgre and import csv, how should I do that :)

11:18 edbond: where (defn myfn [] [[:tr] [:tr]])

11:21 juxovec: edbond: I am looking for more general solution, my markup is in [:div [:div.inner (table-default (for [project projects] ...here comes fn1... ...here comes fn2...))]] - but (for) doesn't have larger arity, so I put fn1, fn2 to [fn1 fn2] which isn't working at all

11:23 the only workaround I found is putting it into multiple [:tbody] elements which is valid, but isn't general solution of my problem

11:25 edbond: juxovec, I don't know better way, I just use apply

11:26 DerGuteMoritz: juxovec: IIRC you can just return (list [:tr ...] [:tr ...]) and hiccup will do the right thing

11:26 i.e. lists are spliced

11:27 juxovec: DerGuteMoritz: great! It solves my problem, thanks a lot!

11:28 DerGuteMoritz: juxovec: yw!

11:31 edbond: nice, I'm curious sablono can do the same

11:58 stompyj: Are there any good books/screencasts on functional/integration testing using midje or clojure.test? I'm making very slow progress and would happily pay to speed things up.

12:18 technomancy: stompyj: for how larger-scale integration tests might look you might take a peek at https://github.com/xeqi/kerodon/

12:18 even if you're not doing a web app it's a neat example

12:18 the clojars test suite uses it

12:19 stompyj: technomancy: awesome. thanks! I feel pretty good about most things in clojure, but the one area that still gives me the "YOU'RE DOING IT WRONG" spidey sense is writing "complex" integration tests

12:20 technomancy: stompyj: kerodon's use of -> is really neat for flow-driven tests

12:20 stompyj: yeah, this looks pretty clean

12:21 technomancy: even though the state of the app itself is changing, the session itself from the perspective of the test is functional

12:40 seangrov`: I'd like to make a map that can remember what it was originally instantiated with and tell me what keys have changed on it over its life time

12:40 Should I use defrecord?

12:41 technomancy: I'd use a map with metadata

12:41 but that's just me

12:42 seangrov`: technomancy: Ah, interesting, looks like meta survives assoc/etc.

12:42 I would have thought it would be cleared out, since we have a "new" map with every operation

12:43 technomancy: there are a few operations that will unexpectedly discard it

12:43 seangrov`: Alright, that seems nice enough, thanks technomancy

12:43 hyPiRion: seangrov`: Do you need to do rather complex lookups/changes based upon history? I'd just recommend to think a bit about the design before implementing anything.

12:43 technomancy: but that's a big part of what profile merging uses in leiningen

12:43 seangrov`: hyPiRion: No, just trying to track dirty fields in maps so we don't replace the entire row with Korma

12:44 hyPiRion: oh, alright. Good, because it's hard to get right

13:00 shipkiss: Hello, I am new to Clojure in general and recently installed LightTable to give it a go. I am on a Windows box, and am able to run simple commands in the InstREPL that comes with LightTable w/o issue. I have a project.clj file that I am trying to load, and I am receiving the following stack exception:

13:00 Error loading lighttable.nrepl.handler: Could not locate cljs/env__init.class or cljs/env.clj on classpath:

13:00 Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: lighttable.nrepl.handler/lighttable-ops in this context, compiling:(C:\Users\shipkiss\AppData\Local\Temp\form-init5817764817166730124.clj:1:5281)

13:00 I have the full stack trace available, and was wondering if anyone had seen anything like this before?

13:03 hyPiRion: shipkiss: That is an exception Leiningen is throwing, although I'm unfamiliar with LightTable code

13:04 dabd: what happened to the -?>> macro that was in clojure.contrib.core?

13:05 shipkiss: hyPiRion: So most likely an issue in the registered dependencies for the project? Prior to the exception, there is a warning message indicating "possible confusion dependencies found"

13:05 *confusing

13:05 bbloom: (doc some->) ; dabd

13:05 clojurebot: "([expr & forms]); When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc"

13:06 dabd: found it in clojure.core.incubator

13:06 oh nice thanks

13:06 hyPiRion: shipkiss: That may actually be it, yes. Based on that, I'd guess two dependencies depend on some other dependency, and it uses a version incompatible with one of the other deps

13:06 dabd: i liked the shorter name -?>>

13:07 seangrov`: technomancy: Pretty brilliant approach, lovely use of metadta

13:07 hyPiRion: shipkiss: If I were you, I'd report it to the lighttable github repo to get help for that

13:07 technomancy: seangrov`: cool; hope it works out well for you

13:07 seangrov`: technomancy: Worse case (if the metadata is stripped) it should fall back to its current behavior. Could be annoying, but not too bad.

13:08 scape_: in core.async thread returns a channel, how would the thread that spun off (if looping) be able to write to that channel? same with a go block; or should i create a chan specifically for this?

13:08 technomancy: aha, even better

13:08 seangrov`: Is there a list of functions that strip metadata?

13:08 shipkiss: hyPiRion: Thanks for the lead. This particular project lives on github also, so ill make sure I am using the latest code and then go back to lighttable if I still have issues.

13:09 stuartsierra: scape_: The channel returned by `thread` or `go` receives the return value of the body.

13:09 technomancy: seangrov`: you could write something to doseq over (ns-publics 'clojure.core) pretty quickly =)

13:09 seangrov`: $seen ddellacosta

13:09 lazybot: ddellacosta was last seen quitting 1 hour and 9 minutes ago.

13:09 hyPiRion: shipkiss: good! Well, good luck sorting it out, hopefully it's not too time consuming

13:09 scape_: stuartsierra: so if looping let's say in a thread, the channel is empty until the loop ultimately closes?

13:10 stuartsierra: scape_: yes

13:10 scape_: okay thanks

13:44 aaelony: yogthos: really liking your markdown-clj library. Two questions I haven't seen in the docs: 1. Does it support adding CSS to to the html markup it produces? and 2. are html tables supported?

13:46 sandbags: technomancy: any idea why clojars might be telling me "Invalid PGP public key"? I've generated and exported the key and I'm including the ---BEGIN ---END bookends

13:47 aperiodic: fireplace users: is there any way to get the value of an evaluation back in to my vim buffer easily? sometimes i want to be able to look at it while typing new things

13:47 sandbags: i'm using gpg from homebrew

13:47 says gpg v1.4.16

13:48 the pgp.com keyserver didn't barf on it so i'm a bit stumped about why clojars thinks it's invalid

13:48 please anyone else feel free to chip in, i only targeted technomancy because he seemed to be in charge

13:49 technomancy: sandbags: hmm... I wouldn't worry about what clojars says; the signature stuff is a bit half-baked right now unfortunately

13:50 sandbags: technomancy: so just leave the key out?

13:50 technomancy: sandbags: if you want to confirm that you've published signed artifacts correctly, I think `lein deps :verify` would be more reliable

13:50 sandbags: ok, thanks

13:50 technomancy: yeah... we should probably disable that section in clojars until we get the chance to do it right

13:59 steckerhalter: how do I make one vector from a list that contains several vectors?

14:00 fortruce: flatten

14:00 llasram: I'm thinking of mucking with clojure.lang.EdnReader's reader-macro dispatch table to allow #'namespaced/vars to read back as resolving the var. Level of evil?

14:00 aperiodic: steckerhalter: 1) flatten, but preferably 2) make the vector the right way in the first place, with e.g. mapcat

14:00 hyPiRion: steckerhalter: (reduce into [] list-of-vectors)

14:01 steckerhalter: aperiodic: ah yes, mapcat works perfectly. thanks

14:17 gfredericks: what's the preferred way to create a small IPersistentMap in the clojure java code?

14:17 the easiest seems to be PersistentHashMap.create(k,v, ...)

14:17 but presumably we like array-maps for small maps

14:18 and there is not an analogous method

14:19 llasram: gfredericks: I just happen to be looking right now at a direct call to the PersistentArrayMap constructor. Var.java, line 77

14:19 Seems to be comparably easy

14:20 gfredericks: ah with the array syntax

14:20 may as well

14:20 llasram: thanks

14:20 llasram: np

14:21 gfredericks: I think I remember a while ago you were trying to figure out some way of round-tripping Var's through reader or EDN serialization

14:22 gfredericks: Did you ever get a solution you were satisfied with?

14:23 yogthos: aaelony: you can mix in html tags freely, they just get ignored by the parser

14:25 drorbemet: Hi, how can I get a lazy seq of chars from a java.io.BufferedReader of a text file with very long lines?

14:27 gfredericks: llasram: I think so

14:27 let me dig that up

14:27 drorbemet: I am at this point, getting some lines

14:27 with-open [rdr (bz2-reader bz2file)] (print (take 20 (line-seq rdr))))

14:27 aaelony: yogthos: that's cool. I can always make a second pass to add css and table conversions. pretty cool...

14:27 llasram: drorbemet: If you really want just a sequence of chars, you can just wrap it in a lazy seq which calls the 0-argument `.read` repeatedly

14:27 yogthos: aaelony: it does allow adding custom transformers as well, don't know if that would help

14:27 ztellman: drorbemet: you just want characters?

14:27 gfredericks: llasram: https://github.com/fredericksgary/lib-7607/blob/master/src/com/gfredericks/lib_7607/serialization.clj#L82

14:28 llasram: Oh, the random numbers

14:28 drorbemet: ztellman: yes but lazy , the file is several gb large

14:29 ztellman: (take-while #(not= (int %) -1) (repeatedly #(.read reader)))

14:29 roughly

14:29 TimMc: zilti: Did you ever figure out the SQL timing thing?

14:29 drorbemet: ztellman: llasram: thanks I try again

14:29 aaelony: yogthos: cool, let me wrap my head around custom transformers... I just need to add something simple like <link type="text/css" rel="stylesheet" href="/css/mou.css"> and then also add table,th,td,tr etc.. tables

14:29 table tags

14:30 yogthos: aaelony: are you trying to inject those based on markup or are they static?

14:31 aaelony: yogthos: I think the output will be static, kind of like ipython notebooks..

14:31 llasram: gfredericks: Oh, so you create a new type (which just happens to also have base-name `Var`)? How do things get wrapped in that type in the first place?

14:31 aaelony: yogthos: something like a chronicle of what was done, how it happened, how to reproduce, etc..

14:32 yogthos: aaelony: why not just put the tags inline with the text passed to the parser?

14:33 aaelony: yogthos: could do that..

14:33 yogthos: it deviates a bit from the readability when writing it but would work.

14:34 yogthos: aaelony: right, the other option is to make a new transformer and define a tag for css links for example

14:34 aaelony: they're pretty simple, each transformer takes a map representing the current parser state and the line text

14:35 aaelony: then does something to the text and returns a new state/text

14:35 aaelony: yogthos: that's the best solution, depending on if I can sneek some time to write it :)

14:36 yogthos: this is it, right? https://github.com/yogthos/markdown-clj/blob/master/src/markdown/transformers.clj

14:36 llasram: Oh, duh -- I can just vendor a copy of EdnReader in which I (safely!) add a var-resolving dispatch for #'

14:36 Everyone wins

14:37 yogthos: aaelony: yup that's how the built in ones work

14:37 drorbemet: ztellman: I got a solution (take 20 (map char (repeatedly #(.read reader))))

14:37 aaelony: yogthos: ok, just need to figure out how it works... ;)

14:37 ztellman: drorbemet: that's going to be infinite, it returns -1 when it's empty

14:37 yogthos: aaelony: but you can initialize with additional ones doing (markdown/md-to-html-string "#foo" :custom-transformers [capitalize])

14:37 aaelony: or (markdown/md-to-html-string "#foo" :replacement-transformers [capitalize])

14:37 ztellman: you need to add a take-while clause

14:38 yogthos: aaelony: it's half way through the docs ;)

14:38 aaelony: yogthos: what's good example of this in that file?

14:38 drorbemet: ztellman: that't fine for me, I just need the head of a large file

14:38 ztellman: ok

14:38 * llasram twitches

14:38 yogthos: aaelony: the one in the docs is the simplest example: (defn capitalize [text state] [(.toUpperCase text) state])

14:39 ztellman: PSA that for general lazy consumption of bytes/characters, https://github.com/ztellman/byte-streams does all that and more!

14:39 drorbemet: ztellman: but I'll keep your solution for reference, don't worry :-)

14:39 aaelony: yogthos: saw that, didn't click though initially

14:39 yogthos: getting it now...

14:39 yogthos: aaelony: the simple transformers are good too https://github.com/yogthos/markdown-clj/blob/master/src/markdown/transformers.clj#L115

14:40 aaelony: you just call the separator and pass whatever separator you defined

14:40 aaelony: yogthos: very nice, thanks. If I come up with something decent I'll send it back for inclusion

14:41 yogthos: aaelony: sounds great :)

14:41 aaelony: yogthos: super :)

14:41 hiredman: ztellman: needs more reducers

14:41 ztellman: hiredman: it's true, who needs laziness when you have THE POWER OF FORK-JOIN

14:41 drorbemet: ztellman: you are right it's better to make it complete right away

14:41 (take 20 (take-while #(not= (int %) -1) (map char (repeatedly #(.read rdr)))))

14:42 ztellman: ,(char -1)

14:42 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Value out of range for char: -1>

14:42 ztellman: drorbemet you need to do the -1 check before mapping char over it

14:42 drorbemet: ztellman: oh right

14:42 hiredman: ztellman: oh, no, not fold, just reducers let the producer control resource life time, where lazy seqs don't

14:43 ztellman: hiredman I'm imaginging some sort of rich hickey as lion-o from thundercats picture right now

14:43 llasram: (inc hiredman)

14:43 lazybot: ⇒ 35

14:43 hiredman: ztellman: he has the hair for it

14:43 ztellman: hiredman: I create closeable seqs

14:43 llasram: hiredman: You may appreciate https://github.com/ring-clojure/ring/pull/115

14:43 drorbemet: ztellman: should have listened ;-)

14:43 hiredman: ztellman: sure, but the consumer still has to use with-open

14:44 BSfan: I am having an issue with my browser opening up tabs on its own. I have run scan. Is there any way to fix this without reformating? more info here http://pastebin.com/Xfi1BTCq

14:44 hiredman: ztellman: I did a write up http://ce2144dc-f7c9-4f54-8fb6-7321a4c318db.s3.amazonaws.com/reducers.html

14:44 ztellman: hmm, interesting

14:46 llasram: I wish rhickey had done them as a separate library though. As part of core, some of the missteps are probably frozen for a long time :-/

14:49 ztellman: hiredman: I don't see any reason not to add this sort of resource handling into byte-streams, thanks for the idea

14:50 hiredman: :)

15:05 sveri: hi, i am trying out datomic and i wonder if i need to define a schema before i can do inserts?

15:06 stuartsierra: sveri: You need to define some attributes, yes.

15:06 sveri: hm, is there an example that does not define a schema but attributes?

15:07 stuartsierra: sveri: A Datomic schema IS attributes.

15:07 sveri: stuartsierra: ah, i see, thats a pity

15:07 and i can change that schema every time?

15:07 I thought its like a document storage with no explicit schema

15:08 dnolen: sveri: it is not

15:08 stuartsierra: sveri: No, Datomic is not a document store.

15:08 shaungilchrist: thankfully

15:08 sveri: ok, but i can adopt the schema every time?

15:08 stuartsierra: Datomic stores tuples of entity-attribute-value-transaction where the attribute must be created in advance.

15:09 I'm afraid I don't understand what you mean by "adopt the schema every time."

15:09 sveri: stuartsierra: add some attributes to an existing schema

15:09 hiredman: sveri: an entity in datomic is not a document, an entity

15:09 stuartsierra: sveri: Yes, you can add attributes at any time.

15:10 hiredman: does not have to comform to a schema

15:10 attributes about an entity do

15:10 sveri: ok, thank you all very much, i guess that helps me for now :-)

15:10 seems like a lot people here have used that already

15:15 hiredman: llasram: that is a neat pr

15:16 stompyj: $seen stompyj

15:16 lazybot: stompyj was last seen talking on #clojure 20 milliseconds ago.

15:17 stompyj: ^nailed it

15:17 llasram: hiredman: Glad you like it. Switching to an internal ring-servlet release w/ that applied fixed several resource leaks in ring apps we have

15:18 bbloom: stompyj: lol i think that you just discovered lazybot's latency metric

15:18 $seen bbloom

15:18 lazybot: bbloom was last seen talking on #clojure 27 milliseconds ago.

15:18 bbloom: $seen bbloom

15:18 lazybot: bbloom was last seen talking on #clojure 30 milliseconds ago.

15:18 bbloom: $seen bbloom

15:18 lazybot: bbloom was last seen talking on #clojure 30 milliseconds ago.

15:18 stompyj: hahah

15:18 bbloom: lazybot: ping

15:18 lazybot: bbloom: Ping completed in 0 seconds.

15:18 bbloom: :-)

15:19 hiredman: llasram: the fact that it won't work on a collection of bytearrays makes me sad, but the old way wouldn't either

15:19 strings are of the devil

15:21 llasram: hiredman: Yeah -- I figured that was an orthogonal issue, to be solved at some point, but not all at once

15:23 BSfan: v

15:23 I am having an issue with my browser opening up tabs on its own. I have run scan. Is there any way to fix this without reformating? more info here http://pastebin.com/Xfi1BTCq

15:32 edbond: BSfan, you are talking in wrong channel. Install clojure first

15:34 BSfan, certanly not #clojure stuff

15:34 hyPiRion: BSfan: I wish anyone here could help you, but unfortunately this is the channel for the Clojure programming language, so it seems unlikely

15:37 fowlslegs: I have a sequence and I would like to all elements that are not integers in (range 65 91). How can I do this?

15:37 to remove*

15:37 edbond: ,(doc filter)

15:37 clojurebot: "([pred coll]); Returns a lazy sequence of the items in coll for which (pred item) returns true. pred must be free of side-effects."

15:38 fowlslegs: I looked at filter and remove and thought about putting an anonymous fn as the [pred], but wasn't sure how?

15:39 edbond: ,(filter (set (range 65 91)) [61 100 99 88 65])

15:39 clojurebot: (88 65)

15:39 dsrx: ,(filter #(> % 5) (range 10))

15:39 clojurebot: (6 7 8 9)

15:39 fowlslegs: Something like (filter #(=any (range 65 91) list)

15:39 hyPiRion: fowlslegs: (remove (set (range 65 91)) list)

15:39 fowlslegs: Okay thanks

15:40 llasram: You people are being way too literal -- numbers!

15:40 hyPiRion: for this particular instance though, you could do (remove #(<= 65 % 90) list)

15:40 dsrx: fowlslegs: the insight with those answers is that you can use a set as a function

15:40 llasram: hyPiRion: Finally, some sanity!

15:40 dsrx: ,(#{1 2 3 4} 10)

15:40 clojurebot: nil

15:40 dsrx: ,(#{1 2 3 4} 3)

15:40 clojurebot: 3

15:41 hyPiRion: llasram: I'm usually a poor variant of a hindley-milner which generalises too much

15:41 dsrx: umm

15:41 ,(remove #(<= 65 90) [66, 66.1, 91])

15:41 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox/eval146/fn--147>

15:42 dsrx: ,(remove #(<= 65 % 90) [66, 66.1, 91])

15:42 clojurebot: (91)

15:42 dsrx: ,(remove #(<= 65 % 90) [66, 66.1, 91, 91.1])

15:42 clojurebot: (91 91.1)

15:42 dsrx: does not remove all elements that are not integers in (range 65 91)

15:42 hyPiRion: dsrx: oh, it does that, and more

15:43 dobry-den: There's something to say about premature optimization. But there's also something to say about "I'll just hack this inefficient mudball of a function together for now so I can resume working on this other part of the code. Surely I'll remember that this is a fatal bottleneck."

15:43 dsrx: hyPiRion: 91.1 is not an integer in (range 65 91)

15:43 bbloom: dobry-den: that's why man invented the XXX comment marker

15:43 scape_: typecast it

15:43 bbloom: dobry-den: just throw a XXX in there

15:44 whenever anything goes wildly wrong, the first thing i do is grep for XXX to make sure i didn't warn myself about this

15:44 dobry-den: "but surely i'll remember!"

15:44 hyPiRion: dsrx: yeah, I see I read the question in the opposite order.

15:44 bbloom: dobry-den: yeah, you never remember :-)

15:44 i don't use comments as documentations, i use them as "notes to future self"

15:45 dobry-den: lesson learned though. just distinctly remember my confidence as i considered leaving myself a FIXME comment

15:45 bbloom: ;; XXX This is O(N^3) time and will surely blow up on non-toy datasets

15:45 ;; XXX oh god. make it stop

15:46 yeah, ego can prevent you from admitting stupidity when writing code

15:46 dobry-den: maybe i'll even make a (xxx) function that launches a JPanel when (= :staging env)

15:46 bbloom: but a carefully worded comment can side step that by making you look like a guy who gets shit done and cuts corners appropriately and lucidly to make forward progress

15:55 Krajsnick: When I use a library in my project, say for example enlive. I look up the version on clojars and add it to my lein project.clj. How do I know what namespace to require? Do I need to consult the enlive source?

15:55 hiredman: or docs

15:56 fortruce: should be: net.cgrand.enlive-html

15:56 stuartsierra: Krajsnick: docs or source, yes. There is no fixed relationship between the name of a Leiningen/Maven dependency and the Clojure namespaces it contains.

15:56 Krajsnick: I see, thanks :)

15:57 turbofail: ideally every project README would have an example namespace import

15:57 sadly this is not always the case

15:57 Krajsnick: I would like to try Light Table, however will it use my existing lein's Clojure? Because Light Table docs says their internal doc will download a clojure first time?

15:58 dnolen: Krajsnick: it will use your existing lein

15:58 Krajsnick: Sweet! :)

16:01 OscarZ: on documentation.. I really liked the docs on Welle, a Riak Clojure library: http://clojureriak.info/articles/connecting.html

16:01 didnt take long to try it

16:09 dacc: i should try light table again -- has it progressed much since summer?

16:12 BobSchack: dacc It's improved an incredible amount since summer

16:12 It's now open source in fact

16:19 fowlslegs: ,(-> "rhesus macaque" .toUpperCase (map int))

16:19 clojurebot: #<ExceptionInfo clojure.lang.ExceptionInfo: Don't know how to create ISeq from: clojure.core$int {:instance #<core$int clojure.core$int@1fa4175>}>

16:19 fowlslegs: ,(map int (.toUpperCase "rhesus macaque"))

16:19 clojurebot: (82 72 69 83 85 ...)

16:19 fowlslegs: Can someone show me the correct way to use ->

16:20 llasram: fowlslegs: The argument order for the threaded functions is the problem. Check -> vs ->>

16:20 fortruce: -> inserts as the second item in the form

16:20 ,(->> "rhesus macaque" .toUpperCase (map int))

16:20 clojurebot: (82 72 69 83 85 ...)

16:20 fortruce: ->> inserts as the last

16:21 shep-werk: ,(clojure.walk/macroexpand-all '(-> "rhesus macaque" .toUpperCase (map int)))

16:21 clojurebot: #<ClassNotFoundException java.lang.ClassNotFoundException: clojure.walk>

16:21 shep-werk: booo

16:22 => (map (. "rhesus macaque" toUpperCase) int)

16:32 edbond: fowlslegs, http://blog.fogus.me/2009/09/04/understanding-the-clojure-macro/

16:33 fowlslegs, and from comments there: https://en.wikibooks.org/wiki/Clojure_Programming/Examples/API_Examples/Macros

16:46 jonathanj: (. "xxx" toUpperCase) is pretty weird to read ;)

16:46 at least, i wasn't expecting that but it makes sense

16:47 stuartsierra: ,(.toUpperCase "xyz") ; is more common

16:47 clojurebot: "XYZ"

16:47 `cbp: ,(clojure.string/to-upper "xyz")

16:47 clojurebot: #<CompilerException java.lang.RuntimeException: No such var: clojure.string/to-upper, compiling:(NO_SOURCE_PATH:0:0)>

16:47 `cbp: wait it's upper-case

16:55 jonathanj: from a REPL can i print the source code of a macro?

16:56 llasram: ,(clojure.repl/source clojure.repl/source)

16:56 clojurebot: Source not found\n

16:56 llasram: pfft

16:56 Despite what clojurebot would have you believe, yes

16:56 jonathanj: user=> (source .)

16:56 Source not found

16:56 llasram: Oh, `.` is a special form, not a macro

16:56 jonathanj: ah

16:57 and ` too?

16:57 `cbp: you can (doc .)

16:57 llasram: jonathanj: ` is reader syntax

16:57 `cbp: ,(doc .)

16:57 clojurebot: It's greek to me.

16:57 `cbp: gdammit

16:57 llasram: (doc .)

16:57 clojurebot: Gabh mo leithscéal?

16:57 llasram: Oh come on

16:57 `cbp: ##(doc .)

16:57 lazybot: ⇒ "Special: .; The instance member form works for both fields and methods.\n They all expand into calls to the dot operator at macroexpansion time."

16:57 llasram: Pull yourself together, clojurebot!

16:59 stompyj: hahahahahahah

17:02 teslanick: nice

17:24 seangrov`: Hrm, how do I throw an error from cljs?

17:25 I see, just throw, I guess

17:25 That kills the cljs repl though

17:25 bbloom: seangrov`: what did you try to throw?

17:25 (throw (Error. "whatever"))

17:26 the repl might only catch Error instead of :default, since that feature didn't exist

17:27 seangrov`: hm, the std repl works. what repl are you using?

17:28 seems the browser repl only catches Error

17:29 dnolen: i'll send a patch your way ^^

17:29 dnolen: bbloom: cool thanks

17:30 seangrov`: bbloom: I'm actually testing out airbrake so we can store a user's entire state history on an error

17:31 sdegutis: ,(throw (Error. "whatever"))

17:31 clojurebot: #<Error java.lang.Error: whatever>

17:31 seangrov`: Then with their api + webhooks, it'll ping us with the history and error, we'll consume it and generate a test

17:33 bbloom: dnolen: https://gist.github.com/brandonbloom/8744556

17:33 seangrov`: that patch ^^ should help your browser repl :-)

17:39 seangrov`: bbloom: Good stuff, thank you :)

17:40 bbloom: Good luck on the JIRA journey

17:40 bbloom: seangrov`: no jira journey for cljs. i just pester dnolen here

17:40 :-)

17:40 seangrov`: Hard to resist, yeah

17:41 Hopefully should have some cool stuff to show with errors + om in a week or two

17:41 bbloom: cool

17:41 seangrov`: Going to try to take some of the wind out of dnolen's sails

17:42 dnolen: seangrov`: ha, sounds cool

17:49 jonathanj: how does one get a cljs repl?

17:50 dnolen: jonathanj: lein cljsbuild has some REPL support

17:50 ivan: jonathanj: https://github.com/ludios/py2clj-cheatsheet#get-a-clojurescript-repl-managed-by-austin

17:50 I didn't know that!

17:50 jonathanj: lein --help doesn't list cljsbuild, did i miss something?

17:51 llasram: jonathanj: It's a plugin

17:51 Krajsnick: Im going through this little webscrape tut. However date-parser and parse-money confuses me. They are used in the scrape-table fn. Though it explains nowhere how to define those, or am I missing something?

17:51 http://blog.safaribooksonline.com/2013/09/09/scraping-html-table-data-in-clojure-for-profit/

18:31 aperiodic: does anyone have any idea how to test jvm shutdown hooks?

18:31 short of shelling out to another JVM in a subprocess

18:34 seangrov`: Hrm, core.async makes catching errors with try/catch tough.

18:34 technomancy: try/catch is essentially dynamic extent

19:05 quizdr: question: are the resources available on the JVM and thus to Clojure usually the same as those on the PC on which they run?

19:07 technomancy: quizdr: are you asking if there is any overhead from the OS and other programs running on a PC?

19:08 yuri_niyazov: Hi there. How would I use java static methods as values?

19:08 IOW, I want to be able to do

19:08 quizdr: well, more if the JVM automatically limits the resources that are available

19:08 yuri_niyazov: #{Math/ceil Math/floor}

19:08 so that they are in a set

19:08 and then test whether a value being passed in is in a test

19:09 I know that this is doable with a clojure-level FN

19:09 quizdr: technomancy that is that custom VMs can be configured to only use a certain limit of PC resources, and am wondering if the JVM does this as well

19:11 aperiodic: nah, by default the JVM takes all the OS will give it

19:11 technomancy: quizdr: the default max heap size is based on the total amount of ram; I don't remember exactly how it's calculated but it's easy to look up

19:11 whether the amount of CPU is limited depends on how you set up your thread pools

19:11 quizdr: technomancy and I assume if you run the JVM on an 8-core machine, for example, then all 8 cores would be available to clojure code (assuming of course you are explicitly using threads in some fashion)

19:12 ahh you answered me already

19:14 yuri_niyazov: Alternatively - is there a way to curry Java methods?

19:16 rhg135: i was wondering if there is a good clj-aware profiler, currently looking at visualvm

19:16 noonian: you could wrap java methods in clojure fn's

19:17 devn: technomancy: is there any chance whatsoever of heroku ever allowing people to specify what kind of app /should/ be detected by Heroku?

19:17 i just had to drop an index.php file into my repo and create an .htaccess file to serve some static assets. what the?

19:18 technomancy: devn: you mean when you push a fresh new app that doesn't match any of the existing buildpacks?

19:18 devn: like if i have a project.clj and a Gemfile

19:18 suddenly it's a ruby project

19:18 technomancy: devn: echo "web: python -m SimpleHTTPServer $PORT" > Procfile

19:18 devn: technomancy: is that for static assets?

19:18 technomancy: right

19:19 devn: anyway, there's no way to change the default detect order without breaking thousands of existing apps, sadly

19:19 devn: wow dude. is that not documented? or did i just not find it?

19:19 because that's way better than having a 0byte index.php and .htaccess which essentially turns off PHP

19:20 technomancy: it's documented that you can put arbitrary commands in your procfile, sure =)

19:20 and it's documented that python ships with an HTTP server

19:20 I don't know if we explicitly put two and two together for you =)

19:20 devn: so what I would like to do is have the BUILDPACK_URL detected upon first push

19:20 devn: technomancy: thinking outside of the box is hard when the box you're deploying to seems to understand what you want before you ask for it

19:20 technomancy: then if you want to change it after that, it's up to you

19:21 devn: technomancy: that's helpful. thanks.

19:21 technomancy: but I'm not on the build team any more, so I don't know how likely that is to happen

19:25 devn: technomancy: i always feel bad that i bring up my heroku issues with you. i know you aren't paid to do support on IRC. you're my main vent though. I think sometimes heroku pays for itself over the long term, and then other times I am literally at my wits end with the inability to have control over the environment without handrolling a bunch of stuff.

19:25 like the fact that the index.php hack is documented should be alarming

19:25 technomancy: devn: yeah, that's super crappy

19:26 devn: i mean, why can't i just said: "hi. i have static html files. serve them."

19:26 technomancy: I waste enough time on IRC that actually answering heroku questions in here is probably a thing I should be doing

19:26 devn: that seems like the simplest thing possible

19:26 technomancy: eh

19:26 if you want to pay a bunch extra for something S3 does for nothing, that's cool

19:26 but it's not exactly our core competency

19:27 devn: sure, but it doesn't need to be. it's literally the simplest thing you could do with heroku, no?

19:27 technomancy: heroku is for running code

19:27 `heroku run bash` is the simplest thing you can do with heroku

19:28 devn: for the sake of argument though, people are trying to use heroku to serve a simple static site. maybe it's early in their projects' lifecycle and they just want a dead simple splash page.

19:28 and in order to do that, you need a config.ru, index.php, or a python server, etc.

19:29 technomancy: I think that has more to do with the problem of heroku being viewed as "a free place to put my stuff" than anything else

19:29 devn: if people are trying to do it, they may as well let it happen in a way that doesn't suck

19:29 technomancy: oh, ok. so that is something which is really crappy: the inline buildpack isn't the default

19:29 I complained about that a lot when I was on the build team but always got a lot of pushback

19:30 devn: what's the concern?

19:30 technomancy: using this makes things a lot simpler: https://github.com/kr/heroku-buildpack-inline

19:30 meingbg: So this is weird. Apparently clojure.core/= can return true for values that are not equal, and that will result in different result if used in computation.

19:31 technomancy: devn: no one wants to touch the default set of buildpacks because it's this silly thing that's grown as a series of historical accidents

19:31 devn: meingbg: example?

19:31 technomancy: meingbg: sad but true

19:31 meingbg: arguably laziness would be much more annoying without that property

19:31 devn: technomancy: ah, yeah i guess i can see that

19:31 technomancy: but it is a trade-off of correctness vs convenience

19:31 meingbg: devn: (let [a (seq [1 2 3]) b '(1 2 3)] (list (= a b) (list? a) (list? b)))

19:31 devn: i haven't ever dealt with = being a problem

19:32 ,(let [a (seq [1 2 3]) b '(1 2 3)] (list (= a b) (list? a) (list? b)))

19:32 clojurebot: (true false true)

19:32 technomancy: clojure.core/= will also compare two mutable hashmaps as equal =(

19:32 devn: ugh

19:32 technomancy: terribly terrible

19:32 devn: is this at all changed by the new hashing stuff?

19:32 nevermind, no, of course not.

19:33 technomancy: btw, the reason all of this came about, was that I was trying to find the simplest way to deploy a hoplon app

19:33 technomancy: devn: personally I think it's crazy not to use the inline buildpack if you have a chmoded bin/compile and none of the other buildpacks match, but not everyone agrees

19:33 s/chmoded/executable/

19:34 devn: technomancy: i just want a way to opt out of magic

19:35 noonian: meingbg: i prefer that behavior, since many core fns turn things into lazy seqs

19:35 devn: like an obvious, simple way to ask politely for no magic

19:35 technomancy: devn: setting BUILDPACK_URL to the inline buildpack is your best bet for that

19:35 devn: word. thanks.

19:35 technomancy: devn: then your build behaviour is delegated entirely to bin/compile

19:35 as it should be

19:35 noonian: ,(let [a (seq [1 2 3]) b '(1 2 3)] (list (= a b) (seq? a) (seq? b)))

19:35 clojurebot: (true true true)

19:35 noonian: ,(let [a (seq [1 2 3]) b '(1 2 3)] (list (= a b) (seqable? a) (seqable? b)))

19:35 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: seqable? in this context, compiling:(NO_SOURCE_PATH:0:0)>

19:36 noonian: ,(let [a (seq [1 2 3]) b '(1 2 3)] (list (= a b) (sequential? a) (sequential? b)))

19:36 clojurebot: (true true true)

19:36 meingbg: noonian: I'm fine with equality functioning that way, as long as you make the list? predicate return the same thing.

19:37 devn: ,(class (seq [1 2 3]))

19:37 technomancy: list? is the worst predicate

19:37 clojurebot: clojure.lang.PersistentVector$ChunkedSeq

19:37 noonian: but the list? predicate is about type, whereas = is about semantic equality in clojure

19:37 meingbg: noonian: devn: If two things are equal and immutable, then applying the same functional function to them both should give equal result.

19:37 devn: ,(class '(1 2 3))

19:37 clojurebot: clojure.lang.PersistentList

19:37 technomancy: it's just junk. never use it.

19:37 devn: (inc technomancy)

19:37 lazybot: ⇒ 96

19:37 devn: not that (class (seq [1 2 3])) is still persistentvector$chunkedseq

19:37 note*

19:38 meingbg: i am not saying you're wrong. i think it's a bit weird, but since you can see above they actually are of a different type, list? is being truthful

19:39 (seq [1 2 3]) is not a list

19:39 noonian: ,(for [c [[1 2 3] '(1 2 3)]] (map #(conj % 4) c))

19:39 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IPersistentCollection>

19:40 devn: ,(class (into '() (seq [1 2 3])))

19:40 clojurebot: clojure.lang.PersistentList

19:40 stcredzero: question: how do I get (debug-repl) to work in a live server, like iPython or irb?

19:40 devn: ,(into '() (seq [1 2 3]))

19:40 clojurebot: (3 2 1)

19:40 noonian: ,(for [c [[1 2 3] '(1 2 3)]] (map #(conj % 4) c))

19:40 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IPersistentCollection>

19:41 noonian: ,(for [c [[1 2 3] '(1 2 3)]] (conj c 4))

19:41 clojurebot: ([1 2 3 4] (4 1 2 3))

19:41 noonian: doh

19:41 meingbg: devn: Yup. I get why the functions act that way, I just feel that list? and = should live on different abstraction levels with a steel door between them. Like, not exposing list? to clojure.

19:42 technomancy: meingbg: dropping list? would be great, but it wouldn't actually help here

19:43 since vectors and lists behave differently with get, conj, assoc, etc

19:45 meingbg: technomancy: Is (seq [1 2 3]) still a vector? It prints like a list.

19:45 technomancy: it's not a vector

19:46 devn: ,(conj (seq [1 2 3]) 1)

19:46 clojurebot: (1 1 2 3)

19:46 devn: ,(class (conj (seq [1 2 3]) 1))

19:46 clojurebot: clojure.lang.Cons

19:46 yuri_niyazov: Hi there. Would appreciate a bit of help. What is the clojure idiomatic way to unit test floating point equality (or to be more precise, floating point nearness)

19:46 devn: ,(class (seq [1 2 3]))

19:46 clojurebot: clojure.lang.PersistentVector$ChunkedSeq

19:46 meingbg: technomancy: So your point is that we need list? to tell lists from vectors?

19:47 TEttinger: yuri_niyazov, good question... I mean you could use with-precision for BigDecimals, but not floats or doubles (I think)

19:48 devn: we need list? to know when something is *precisely* a list.

19:48 technomancy: meingbg: no, the point is lists and vectors behave very differently, and comparing them as = is just a concession to convenience in order to make you not go crazy with all the pervasive laziness clojure has

19:48 we don't need list? at all in application code

19:48 devn: need is a strong word, but in the above cases, list? does say when something is 100%, all the way down, a list

19:49 TEttinger: I think the simplest way might be (defn near [f1 f2] (== (long (* 1000000 f1)) (long (* 1000000 f2))))

19:49 technomancy: the only purpose of list? is to complect seq? and counted?

19:49 if you care about countedness, use counted?

19:50 devn: meingbg: it's like a marker interface that got behavior

19:50 technomancy is right

19:51 turbofail: yeah i don't think i've ever used `list?'

19:51 devn: it's a little funny that list is not used at all in clojure.core

19:51 i should pull up codeq and import the top 100 github clojure repos

19:51 and see if anyone uses it

19:52 technomancy: list? snuck in inside a patch with a bunch of actually-useful predicates

19:52 devn: technomancy: like ifn? and so on?

19:52 technomancy: something like that

19:52 devn: yeah, i mean, it's asking about whether it implements X i guess

19:53 like you said: counted?

19:53 Countable, Seqable, etc.

19:54 Bronsa: oh boy. http://dev.clojure.org/jira/browse/CLJ-1302 I wouldn't have expected this

19:55 I guess this means I will no longer have any use for zipmap and use reduce-kv instead

19:56 devn: Bronsa: you relied on the order of (keys m) and (vals m)?

19:56 Maps have bitten me enough on order that I basically don't trust a map at all. they are "objects" in a lot of ways to me.

19:57 and by bitten i mean, i've found myself in situations where i suddenly wanted/needed order

19:57 but it was too late, so i decided to represent my data some other way rather than relying on any of map's behavior

19:57 Bronsa: devn: I thought I could rely on keys and vals ordering being consistent with each other

19:58 technomancy: Bronsa: pretty sure stu has said multiple times that you can rely on that consistency

19:59 meingbg: technomancy: devn: Well I guess what I'm saying is that equality means, among other things, that performing equal operations on equal operands results in equal results. It's great to have laziness built-in or added to a language, and fine if you choose to expose or hide it in terms of equality... but if you choose to hide it, I don't see how it's fine to expose it through other functions, it destroys the sanity of equality.

19:59 Bronsa: so now I have to change https://github.com/clojure/tools.analyzer/blob/master/src/main/clojure/clojure/tools/analyzer.clj#L152-L153

19:59 technomancy: meingbg: I agree FWIW

19:59 noonian: can just write your own keys and vals that has that contract using (for [[k v] m] ...) if you are worried about it

19:59 Raynes: Bronsa: Nothing is real, everything is permitted.

19:59 technomancy: meingbg: rich disagrees though, which is what matters

19:59 or at least, he disagreed five years ago

20:00 what he thinks now is immaterial; he can't cahnge it

20:00 seangrov`: technomancy: How can I start an nrepl server in my code so I can later connect via `lein repl :connect` or M-x cider?

20:00 meingbg: technomancy: Well, the least one could do is to put big warning flags in the docstring of list? et al.

20:00 technomancy: seangrov`: I don't know off the top of my head, but it's in the nrepl readme

20:00 noonian: meingbg: = is about equality partitions and things, usually clojure programmers want '(1 2 3) and [1 2 3] to be equal for value checks, there are other comparing functions like identical? if you don't want that sort of equality

20:00 technomancy: meingbg: list? is completely immaterial

20:00 seangrov`: technomancy: Ah, good point, I'll check it out

20:00 technomancy: has absolutely nothing to do with equality

20:01 ,(let [x (java.util.HashMap.) y (java.util.HashMap.)] (= x y)) ; much worse

20:02 clojurebot: true

20:03 meingbg: noonian: That makes the water somewhat clearer.

20:04 technomancy: noonian: Well I guess clojures equality concept simply isn't what I supposed it was.

20:04 noonian: yeah, it's definitely something you need to read the docs about

20:04 meingbg: ,(= '(1 2 3) [1 2 3])

20:04 clojurebot: true

20:04 meingbg: ...and they don't even print the same.

20:04 technomancy: meingbg: rich has said clojure.core/= implements egal, but that's not quite true

20:05 noonian: most of the clojure books do a pretty good job going over it in the beginning i think

20:05 technomancy: noonian: is it documented?

20:05 I thought the Joy of Clojure was the first place the term "equality partitions" appeared

20:05 noonian: yeah, idk if it's in the official documentation

20:06 i probably read it in the Joy of Clojure and assumed it was an official language term

20:08 devn: boolean equality is also a thing

20:08 or rather, casting to bool

20:08 it seems related to this conversation

20:09 dsrx: cast everything to void

20:09 technomancy: devn: yeah but that's less contentious because everyone agrees it's a nightmare =)

20:09 devn: :)

20:09 i gotta run all

20:09 i wish you the best of clojuring

20:09 cheers

20:10 technomancy: meingbg: FWIW leaking equality between Java collections and the vector/seq thing are the only places clojure diverges from egal afaik

20:11 meingbg: technomancy: ok, thanks.

20:12 Raynes: technomancy: Heh, I'm pretty sure Stu has actually said that in talks and such.

20:13 technomancy: ¯\_(ツ)_/¯

20:13 Raynes: lol

20:14 * seangrov` feels sad at the lack of local keybindings to generate all the appropriate emojis

20:23 Bronsa: seangrov`: you know, you could use erc.. https://github.com/Bronsa/.emacs.d/blob/master/abbrevs#L4-L9

20:34 _eric: is there any general consensus as to what library/framework to use for making a web app?

20:34 rhg135: ring+compojure

20:35 _eric: cool

20:36 I was having trouble seeing if there was something compelling for using something like luminus or pedistal, but so far I've found ring is pretty greateven without compojure for just non HTML stuff

20:36 as I tried to do some HTML, I wasn't sure if I needed much more

20:39 Raynes: Luminous is a template for a ring+compojure app with lots of good defaults.

20:40 If you want that, that's there. If you're happy with what you've got...

20:40 :D

20:40 _eric: (I appologize for asking terribly ignorant questions... feeling out a new world is awkward)

20:41 Raynes: I didn't see any.

20:42 _eric: tharks for the info, I'll see how much trouble I get into with luminus

20:59 seangrov`: Is there no edn reader for clojurescript, just cljs.reader?

21:01 Uhg, and a string that reads fine both with the clojure reader and clojure edn reader fails to read with the clojurescript reader

21:02 Bronsa: seangrov`: which one?

21:03 seangrov`: Bronsa: Which string?

21:03 Bronsa: seangrov`: cljs.reader should just be edn + quote, deref & regex

21:03 seangrov`: yes

21:03 seangrov`: Bronsa: I'm going to see if I can figure out what part of the string is causing the failing in the cljs repl

21:03 Don't suppose there's a verbose option that tells me what it's reading, is there?

21:04 Bronsa: don't think so

21:05 seangrov`: well if it's failing to read on the repl than the reader there is tools.reader :/

21:07 seangrov`: Bronsa: No, it's failing to read on page load

21:07 Bronsa: ah ok

21:08 seangrov`: It's a string in source code I'm reading

21:08 Bronsa: not a tools.reader bug, I'm relieved

21:10 seangrov`: Bronsa: Don't be too relieved yet ;)

21:10 Well, assuming cljs.reader is the same as tools.reader

21:10 Bronsa: I didn't write it.

21:13 seangrov`: Hrm, I wonder if it's because of keywords like :2

21:13 and :2013-11-2

21:13 Would be very unpleasant to be bit by that

21:14 Bronsa: seangrov`: well, those are invalid keywords

21:15 seangrov`: Bronsa: Wasn't that only recently decided?

21:15 Yup, found the bug for it

21:15 http://dev.clojure.org/jira/browse/CLJS-677

21:16 Well, maybe I need to port clojure.tools.reader.impl.commons/parse-symbol , whatever that entails

21:16 Bronsa: well, the documentation explicitely states that keywors like symbols cannot start with non-numeric characters

21:16 keywords*

21:17 seangrov`: heh, cannot start with* numberic characters?

21:17 numeric*

21:17 Bronsa: .. yeah that

21:17 hiredman: Bronsa: that changed though, as per the link in the ticket

21:17 seangrov`: Bronsa: Well, that JIRA ticket disagrees more or less

21:18 hiredman: there was some discussion on the mailing list recently about it

21:18 http://dev.clojure.org/jira/browse/CLJ-1286

21:18 Bronsa: hiredman: seangrov` the ticket hasn't been accepted yet though

21:20 hiredman: Bronsa: the patch was already applied, then reverted

21:20 https://github.com/clojure/clojure/commit/249479ecebcb0cfca9e6a1d528e3d7f0b3ca7dc6

21:22 anyway, I'd rather we didn't allow keywords that started with numbers

21:22 but the clojure ml is on a roll ignoring my preferences :)

21:24 Bronsa: hiredman: I'm not saying the reader spec cannot/should not be changed, only that until the spec explicitely states that keywords should not start with numbers, it's not a bug

21:24 noonian: enlive and things already uses keywords starting with #'s

21:25 Bronsa: I've been bitten a good amount of times by people (ab)using undefined behaviour (myself included) while writing cinc, I won't encourage relying on anything that's not explicitely documented.

21:26 hiredman: Bronsa: well, isn't that like 50% of clojure?

21:26 Bronsa: yes. that's what pisses me off the most.

21:26 hiredman: :)

21:27 seangrov`: What's the argument against keywords starting with numbers?

21:27 hiredman: the-mostly-inaccurate-and-unofficial-clojure-spec.com

21:27 seangrov`: Well, I mean, from the spec's point of view

21:28 Bronsa: seangrov`: technically in the clojure impl keywords are backed by symols

21:28 seangrov`: I've got to figure out what to do about this problem now, I can't totally reshape the data at this point...

21:28 Bronsa: symbols

21:28 ,(.sym :1)

21:28 clojurebot: 1

21:28 Bronsa: there, now you have an invalid symbol.

21:28 seangrov`: ,'1

21:28 clojurebot: 1

21:28 Bronsa: ,(class (.sym :1))

21:28 clojurebot: clojure.lang.Symbol

21:29 hiredman: seangrov`: ' doesn't make it a symbol

21:29 Bronsa: seangrov`: but.. that's admittedly just an implementation detail.

21:29 seangrov`: hiredman: Yeah, sorry

21:29 ,(symbol 1)

21:29 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String>

21:29 Bronsa: ,(symbol "1

21:29 (defn parse-symbol [^String token]

21:29 (when-not (or (identical? "" token)

21:29 (not= -1 (.indexOf token "::")))

21:29 (let [ns-idx (.indexOf token "/")]

21:29 (if-let [ns (and (pos? ns-idx)

21:29 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading string>

21:29 Bronsa: (subs token 0 ns-idx))]

21:29 (let [ns-idx (inc ns-idx)]

21:29 (when-not (== ns-idx (count token))

21:29 (let [sym (subs token ns-idx)]

21:29 (when (and (not (numeric? (nth sym 0)))

21:29 (not (identical? "" sym))

21:29 hiredman: according to http://clojure.org/reader you can't put . in keywords

21:30 "They cannot contain '.' or name classes."

21:31 Bronsa: damn. did I spam much?

21:32 seangrov`: But outside of implementation, is there a reason to disallow it? hiredman you said you'd prefer it not be allowed

21:32 Bronsa: I'm sorry, I accidentally shift-ins'ed

21:33 hiredman: seangrov`: they are just weird

21:34 seangrov`: generally the reasons for accepting them are things like, oh well, java.jdbc unconditionally turns map keys in to keywords

21:34 technomancy: I think there's value in keeping keywords conceptually close to symbols

21:34 hiredman: which, well, you also get it creating keywords like :foo(1)

21:35 :COUNT(foo) I guess

21:35 which, well, obviously not going to be a legal keyword, so maybe java.jdbc just shouldn't be keywording everything

21:35 just because it is a key in a map, doesn't mean it needs to be a keyword

21:37 basically, I like it the way it is, and all arguments for changing it seem to come from what in my opinion are bad models

21:37 seangrov`: hiredman: Ah, that made me realize that it's cljs-ajax that's turning the numbers into keywords

21:37 bbloom: Bronsa: despite all the awesome work you do, you are not forgiven for accidentally spamming. turn in your badge and gun

21:41 seangrov`: ,(keyword "4")

21:41 Bronsa: bbloom: I still don't understand how I missed ) for ins

21:41 clojurebot: :4

21:41 seangrov`: So that should be invalid?

21:41 Bronsa: ,(keyword "]")

21:41 clojurebot: :]

21:41 bbloom: seangrov`: garbage in garbage out

21:41 Bronsa: there's no validation on symbol/keyword seangrov`

21:42 technomancy: seangrov`: undefined behaviour, isn't the same as invalid

21:42 bbloom: Bronsa: i haven't had an ins key in a long time, so i don't even remember where it is on the keyboard

21:42 hyPiRion: ,(keyword "-)")

21:42 clojurebot: :-)

21:42 seangrov`: Well, I guess this is part of the problem: (js->clj (js-obj "4" "example") :keywordize-keys true)

21:42 technomancy: ,(symbol "o hai") ; <- obviously nonsense

21:42 clojurebot: o hai

21:42 bbloom: (inc hyPiRion)

21:42 lazybot: ⇒ 33

21:42 seangrov`: => {:4 "example"}

21:42 bbloom: seangrov`: js->clj is a clearly bad idea

21:42 Bronsa: bbloom: in my keyword it's just above backspace. which means 2 keys to the left of ) and one above.

21:43 technomancy: Bronsa: using erc?

21:43 bbloom: seangrov`: as is clj->js

21:43 seangrov`: bbloom: We consume json feeds :P

21:43 Bronsa: technomancy: yes, with erc-flood-protect set to nil for some reason unkown.

21:43 technomancy: Bronsa: there's a better way to do it in 24.4

21:43 (setq erc-accidental-paste-threshold-seconds 0.5)

21:44 Bronsa: awesome, thanks

21:44 technomancy: erc-flood-protect just turns off trickling so freenode will boot you; this actually stops it before it's sent

21:44 (24.4 is not released yet, but whatever)

21:44 bbloom: seangrov`: a better idea is something like ruby's HashWithIndifferentAccess

21:44 technomancy: ~guards

21:44 clojurebot: SEIZE HIM!

21:45 bbloom: seangrov`: rather than *converting* you just wrap it in an adaptor that implements the protocols, backed by a raw json object

21:45 seangrov`: if you discard all aliases of the mutable JSON crap as soon as you get it, then that's as good as immutable :-)

21:46 seangrov`: bonus: no O(N) cost :-)

21:52 seangrov`: Wooo, replay actually worke

21:52 worked*

21:52 I had to hand-mangle the edn to get the replay data from airbrake in the right state, but now I can figure out how to smooth it out

21:53 bbloom: seangrov`: with react/om/whatever?

21:53 fuck yeah functional programming? :-P

21:56 seangrov`: bbloom: Yeup

21:57 Om/react => post error to airbrake with history of messages => webhook hits our site with the error and history payload => generate data to feed to a test replay with the shell of an automated test

21:57 bbloom: nice

21:58 seangrov`: Runs completely independently of any server too as a side effect

21:58 Basically re-inventing a substandard pedestal here

22:10 espeed: Hi - trying to deploy a pedestal service as a war in a Jetty container, and I'm getting this exception: "java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil"

22:10 Here's the full error from the log: https://gist.github.com/espeed/8747309

22:11 This is my first attempt to run any Clojure app in a container (up to this point I've always as standalone on Heroku)

22:11 hiredman: espeed: somewhere you are using io/resource to load something is not in the jar

22:11 (disclaimer I haven't looked at the log)

22:12 or war, whatever

22:15 espeed: hiredman: thanks -- io/resource is used in one place to read files located in resources/pages.

22:15 resources is included in my project.clj here: :resource-paths ["config", "resources"]

22:27 john2x: wow I'm having a *really* bad time with dependencies

22:28 espeed: hiredman: I checked the war file, and the resources dir isn't in there

22:30 akurilin: So I have a let in a defmacro and I'm getting the complaint that you can't let a qualified name. Is that an indication that I have to gensym it?

22:30 egghead: akurilin: #binding instead of binding

22:30 but ya, basically

22:31 john2x: everything was fine just a few days ago.

22:31 egghead: basically you have to use #binding so the compiler can create a funny gensym name like 'foo_a_2345' for #binding

22:32 akurilin: egghead: Hm I'm getting "no reader function for tag bla"

22:33 egghead: i'm sorry, I mean binding#, i derped it

22:33 (let [#foo ...] (use #foo))

22:33 again.. that's backward...

22:33 :|

22:33 akurilin: obviously i'm a little slow today...

22:35 akurilin: egghead: no worries, appreciate the help :)

22:36 ddellacosta: is the only mechanism for type dispatch in Clojure a multi-method?

22:36 excluding anything to do with Java inter-op

22:37 cark: protocols

22:37 they're for single dispatch

22:39 ddellacosta: cark: right, okay

22:40 cark: then you have maps !

22:40 {:add-item #(...) :cook-it #(...)}

22:41 ddellacosta: cark: the thing is, I want something that falls through to a parent if the child implementation doesn't exist, and I'm not sure how to do this other than multi-methods (in which case it's not parent/child so much as existing/non-existing types)

22:41 cark: you're not really looking for dispatch, but for inheritance then

22:42 look at hierarchies

22:42 ddellacosta: cark: well, but multi-methods could do it. I just was hoping for something that basically let me define a standard interface like a protocol, but would fall through to a standard implementation if it exists

22:42 egghead: couldn't you do that with extend-protocol ?

22:42 something like prototype chains in js

22:42 cark: i think you can do that with mutli-method and hierachies

22:43 ,(derive ::cube ::shape)

22:43 clojurebot: nil

22:43 cark: ,(parents ::shape)

22:43 egghead: right, like if you define color-code over ::color and then define color-code over ::red

22:43 clojurebot: nil

22:43 cark: hum

22:43 ,(parents ::cube)

22:43 clojurebot: #{:sandbox/shape}

22:43 ddellacosta: egghead: that's what I thought, but I"m having trouble figuring out the right pattern. defprotocol and then deftype + extend-type?

22:44 cark: okay, thanks, let me dig into that. I've barely used the hierarchy capabilities of clojure

22:44 john2x: can someone help me figure out this stacktrace? I've updated my deps already. I've individually tried out selmer and cheshire, and they work on their own. https://www.refheap.com/30806 I'm starting to really hate how clojure reports dependency issues

22:45 cark: just define your mutlimethod dispatch function to take advantage of that and you're golden

22:45 Bronsa: cark: multimethods already use isa?

22:46 ddellacosta: john2x: need to see the code that produces this. Yeah, the stack traces are a sore spot for Clojure, but once you get used to them they are not a problem.

22:46 cark: Bronsa: do they ? I don't think so

22:46 ddellacosta: cark: so, right, back to multimethods...haha

22:46 Bronsa: cark: they do

22:47 cark: hum... multimethods they just call the dispatch function and return what it returns ...that's basically it

22:47 john2x: ddellacosta: hold on, let me set up a gist.

22:47 Bronsa: nope cark

22:48 cark: http://sprunge.us/ONRi

22:48 ddellacosta: john2x: I see that you're getting that when trying to start up a repl, that's a pain. Well, you may want to try commenting out the code that is causing this to track it down. For example, I see selmer- and cheshire-related errors, and seems to be in the gasto.views (I assume that's your code), so maybe try commenting that out to get going.

22:49 cark: Bronsa: ohhh ok, didn't get it that way

22:49 so there is nothing to it, ddellacosta has his solution right there

22:49 john2x: ddellacosta: yes. gasto.views is generated by Luminus. ok, let me try that out.

22:49 ddellacosta: cark, Bronsa: thanks! That's helpful.

22:50 cark: Bronsa: and thinking back, i might have circumvented this easy solution a couple of times ... thanks !

22:53 Bronsa: cark: ddellacosta also isa? works recursively on vectors so you can do things like http://sprunge.us/JLFP which is extremely convenient

22:56 ddellacosta: Bronsa: nice

22:56 cark: and i could call "super" by doing (x ::bar) ...so that's the full thing right there

23:11 john2x: ddellacosta: ok, I removed all uses of selmer in my code. noir still uses cheshire, but I can't edit that directly. updated the stack trace: https://www.refheap.com/30806

23:12 why is it having trouble compiling cheshire? I've checked cheshire's code and ran its tests, and parse-strict is there clear as day

23:12 akurilin: Random question: there's no nice way of mocking a macro for testing purposes, eh?

23:12 john2x: how do I purge my libraries?

23:12 maybe it's conflicting versions?

23:12 ddellacosta: john2x: no idea if this is it, but you could try running lein reps :tree and see if things are pulling in conflicting versions

23:12 john2x: yep, what I was thinking

23:13 akurilin: depending on what you're doing, you could use with-redefs perhaps?

23:13 akurilin: ddellacosta: can you with redefs macros? I already use those plenty.

23:13 ddellacosta: some code I have is relying on the last value returned from c.j.j's (db-transaction)

23:14 ddellacosta: akurilin: ah, yeah, I don't know the answer to that.

23:14 akurilin: I guess one can mock the fn called within it

23:14 too much of a clusterfrack though. Sounds like this is going to go into integration tests.

23:15 ddellacosta: akurilin: I know it's easy to say, but I find that if my mocking gets too hairy, I've probably got some mis-structuring going on.

23:15 akurilin: ddellacosta: I can believe that.

23:16 some people just have a policy not to waste time on mocking on the more complex scenarios like calling API routes

23:16 john2x: ddellacosta: here's the tree https://www.refheap.com/30812.. it doesn't report any issues with selmer or cheshire

23:16 akurilin: too much interal magic / reliance on SQL or what not

23:16 Or maybe an indication of insufficient decoupling

23:16 or separation of concerns

23:16 or layering

23:19 Hammock time!

23:19 ddellacosta: akurilin: there ya go. ;-)

23:19 john2x: yeah, I really don't know, I'm sorry. :-( This is definitely one are that is frustrating when debugging Clojure. I would probably end up trying to find a point where things were working and track-forward from there.

23:22 john2x: ddellacosta: also, I should mention that I only get this issue when I upgrade lib-noir to "0.8.0". am I not allowed to change versions ever? :P and I'm pretty sure the changes were pretty minor (I requested the changes, but the author probably updated the deps while at it)

23:24 gonna try start a new project from scratch and just copy my progress.. lol.

23:27 ddellacosta: john2x: sorry I don't have any better suggestions. :-(

23:28 coventry: If you have a version of lib-noir it works with, you could bisect to find the breaking commit.

23:34 john2x: ddellacosta: no problem thanks for the help :)

23:35 coventry: gonna try that. good reason to learn how bisect works.

23:41 akurilin: Sanity checK: is there no ns :require exclusion?

23:41 Do I have to rely on :use to get exclusion?

23:41 As oppose to some kind of (:require :refer :all :except [bla]) ?

Logging service provided by n01se.net