#clojure log - Mar 13 2013

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

0:21 binski: how can I un-nest this this s-expression? https://www.refheap.com/paste/12480

0:21 akhudek: with ->

0:22 binski: akhudek: yea, trying to but failing.. can you show?

0:22 jeremyheiler: arrdem, Would Clojure's for macro work for you?

0:23 akhudek: https://www.refheap.com/paste/12481

0:23 jeremyheiler: ,(-> "foo-bar" (clojure.string/replace "bar" "baz") (clojure.string/replace "foo" "goo"))

0:23 clojurebot: "goo-baz"

0:24 binski: ahh.. thank you

0:25 jeremyheiler: binski, Think of it as a lest of expressions, where the return value of an expression becomes the first argument to the next.

0:25 list*

0:26 binski: jeremyheiler: oh ok, thats quite clear now

0:28 arrdem: jeremyheiler: gah I remembered loop but forgot that we had for. thanks.

0:28 jeremyheiler: arrdem, np

0:29 binski, good :-)

0:49 technomancy: arrdem: there's an implementation in old contrib, but please don't use it =(

0:49 TheBusby: you could use unquote in defproject to conditionally include it

0:56 TheBusby: technomancy: excellent, thank you!!!

0:56 I suspect many other's may soon run into this same issue :(

0:56 technomancy: TheBusby: be aware that if you create an uberjar using java 1.7 it won't work on 1.6

0:57 does it blow up if you try to include it on 1.7?

0:58 TheBusby: no, should I just include it for all then?

0:58 technomancy: I think so, yeah

0:59 TheBusby: does that mean anything using Clojure 1.5.1 should also includes jsr166?

1:00 technomancy: no, lots of projects don't need it

1:00 TheBusby: ahh okay, I wasn't sure

1:02 amalloy: does the compile-if clause in clojure.core.reducers work now? it seems like it's still a totally broken approach, to me - they do conditional compilation of jsr-166 or java7 so that it can work in either context, but then they AOT the jar so that macro only gets run on their build servers

1:06 TheBusby: amalloy: I thought they disabled AOT for reducers.clj a couple versions back (I'm not sure though)

1:08 amalloy: did they? that would solve the problem, all right

1:08 although then i'd be worried about the (set! *warn-on-reflection* true) at the top of the file

1:09 TheBusby: I'm pretty sure that they fixed it at some point in beta, but in alpha I would have to build my own

1:09 amalloy: details -> http://dev.clojure.org/jira/browse/CLJ-1066

1:30 arrdem: technomancy: no worries about that... I was looking at porting my CL-idiomatic parser combinator instead of using fnparse again but opted to just fnparse again.

1:30 the CL side-effect-full itteration thang just doesn't slide in clojure

1:34 brehaut: i wish we had a better option than fnparse

1:34 there was a cottage industry in parser combinator libs for a while, and then tumbleweeds

1:36 jeremyheiler: brehaut, I don't know much about fnparse, but what don't you like about it?

1:36 arrdem: fnparse does a a pretty good job..

1:36 no complaints so far

1:36 just that we need a maintainer who isn't jchoi

1:36 brehaut: jeremyheiler: its pretty dead. theres a couple of people whove forked it to work with 1.3+

1:37 jeremyheiler: Ah, so it's just dusty.

1:37 brehaut: but thats about all the support it has had in years

1:37 arrdem: [factual/fnparse "2.3.0"] is 1.4.0... using it now

1:37 brehaut: huh well thats good

1:37 arrdem: dusty sure but it's off of contrib.monads

1:37 so anything else is just lack of new dev

1:38 brehaut: arrdem: old contrib monads, or algo.monads?

1:38 arrdem: brehaut: it uses algo.monads now, from contrib monads originally

1:38 brehaut: right

1:38 arrdem: factual ported it, and for that I owe him karma

1:38 brehaut: them

1:38 factual is a company i believe

1:38 jeremyheiler: it is

1:39 brehaut: arrdem: i could have been ported to protocol monads was the other thing

1:39 arrdem: any ideas for a simple html page I could point my new html -> compojure tool at?

1:39 brehaut: oh ok

1:39 * arrdem still needs to wrap his head around monads

1:40 arrdem: oh bugger this tool doesn't support comments or javascript...

1:40 brehaut: jeremyheiler, arrdem: there are a couple of weird cases where fnparse implements some ops as macros rather than functions which makes them a little awkward to compose. i suspect some of it is to work around problems with state monads in non-tail call optimized languages

1:41 arrdem: they are actually kinda simple. state monad in particular (the basis of fnparse) is a bit complicated.

1:41 arrdem: jimduey's clojure.net has some good introductions to monads in general though

1:42 arrdem: and i would suggest manually doing the substitutions for a state monad to get how it works. its kinda magically otherwise

1:42 jeremyheiler: Ditto for Jim Duey's blog posts. Lenoardo Borge's four part series was really good, too. http://www.leonardoborges.com/writings/2012/11/30/monads-in-small-bites-part-i-functors/

1:42 arrdem: brehaut: okay thanks I'll push that onto the reading list

1:43 brehaut: "Today I join the already bloated group of people who wrote monad tutorials. It’s a bit of a ritual, really." love it

1:43 jeremyheiler: haha yeah

1:43 brehaut: monads: super hard till you grok it, then super easy and you feel like you have an insight that will help everyone else grok them too

1:44 and then you read about arrows.

1:44 amalloy: i liked http://cdsmith.wordpress.com/2012/04/18/why-do-monads-matter/, which came from a rather different angle than macro blogs i'd read previously. rather long, though

1:44 jeremyheiler: amalloy, 404

1:44 brehaut: works here

1:44 jeremyheiler: Nevermind, sans the comma.

1:44 amalloy: jeremyheiler: your irc client is including my , in the url

1:44 but i'm sure that i'm just falling for the "the *last* article i read will be the *first* article anyone needs to read" trap

1:45 jeremyheiler: lol

1:45 amalloy: the first one will never make sense; you have to take your own spiritual journey

1:45 brehaut: haha

1:45 so true

1:45 jeremyheiler: That's so true.

1:46 brehaut: im pretty sure everyone has a different "hey you guys, you just need to understand X" moment

1:46 amalloy: even there, i've really just regurgitated the "monads are burritos" meta-tutorial and claimed it as my own

1:47 brehaut: ive never actually read the burritos one

1:48 amalloy: brehaut: it's really just what you said: everyone has their own 'you just need to understand X' moment

1:49 brehaut: oh right

1:50 jeremyheiler: The analogies never really worked for me. Ultimately I concluded that I just need to ask myself what exactly the particular monad I was trying to grok wanted to hide or ignore.

1:51 brehaut: jeremyheiler: i find that works for the simpler monads, but the state stuff really spanners it

1:51 because you also need to consider what constitutes a value and why

1:52 (where state monad uses functions to describe a rube goldberg machine that you eventually kick into life outside the monadic code)

1:56 jeremyheiler: brehaut, True, but the value is really no different then thinking about function args and return values anyway. Then the state monad is just about hiding the state when you're using the monadic functions.

1:57 brehaut: and this is why the X is different for everybody ;)

1:57 jeremyheiler: Yep

1:58 It's definitely interesting

1:59 brehaut: fwiw, my lightbulb moment was understandign the relationship between function application and composition and bind and >=>

2:02 huh, colloquay thinks the kleisli arrow is an emoticon. how odd

2:02 jeremyheiler: Nice

2:03 amalloy: brehaut: i've seen people use it. IME it signifies "i'm a twit"

2:03 brehaut: amalloy: remarkably apropos then

2:25 arrdem: aaand +1 to fnparse, html -> compojure translator works a treat the first time

2:32 Raynes: fnparse isn't maintained anymore, Why did you use it

2:32 ?

2:33 Oh, I guess Aaron Crow is maintaining it.

2:33 Oh, not.

2:33 He just released a version with a dep update.

2:33 So yeah, why fnparse?

2:34 https://github.com/blancas/kern and https://github.com/protoflex/parse-ez and...

2:34 amalloy: What's that other parser library?

2:35 The one that I ask you the name of on a monthly basis because I always forget?

2:35 amalloy: the parsatron

2:35 Raynes: Yes. That.

2:35 jeremyheiler: parsley?

2:35 clojurebot: parsley is an incremental parser with docs at http://wiki.github.com/cgrand/parsley/design-notes and at http://cloud.github.com/downloads/cgrand/parsley/parsley.pdf

2:35 amalloy: or parsley?

2:35 Raynes: That one too, but I was thinking of the parsatron.

2:37 arrdem: Raynes: because fnparse is something I've used before and was the first thing that sprang to mind. I messed with parse-ez once and had trouble with it, never touched kern before.

2:37 Raynes: arrdem: That's fine. I'm criticizing you anyways. Newb.

2:38 amalloy: i think given that factual has taken ownership of fnparse, it would be the first thing i'd try

2:38 Raynes: amalloy: I don't know if I would call this ownership.

2:38 He literally just released a version with deps that another fork had updated.

2:39 amalloy: heh

2:39 Raynes: Factual has no commits.

2:39 arrdem: Raynes: lol I see what you did there.

2:39 amalloy: well, i remember zack was saying he was looking into some bugs in it

2:39 * arrdem does the dance in that he survived long enough to get called a nub

2:39 amalloy: zach. i always get that wrong

2:40 Raynes: arrdem: Are you an old man, sir?

2:40 arrdem: Raynes: if you call 20 old...

2:40 Raynes: Oh, the 'survived' bit sounded like "I didn't die of old age before I got called a nub"

2:40 In other news, fantastic. Nice to meet other people in the young as shit club, arrdem.

2:42 Oddman: lol Raynes

2:42 you sound like an old, grumpy twat

2:43 arrdem: haha

2:43 Raynes: Oddman: I'm a young, abrasive twat!

2:43 arrdem: I aspire to grow up into a crotchety lisp fanatic...

2:43 just hope I get to do something cool first XP

2:43 Apage43: I used to aspire to becoming a crotchety academic type

2:44 Raynes: I think Oddman may be one of the few people left in Clojureland who doesn't know my age.

2:44 Apage43: but didn't finish any degrees so I have up on it =P

2:44 *gave

2:46 Oddman: Raynes, probably one of the many who doesn't care, also

2:46 Iceland_jack: lol

2:47 Raynes: I also think you may have misinterpreted my fun-making with arrdem as genuine crotchetiness.


2:47 Raynes: arrdem is approximately one year older than I.

2:48 arrdem: Raynes: holy shit dude

2:48 * arrdem bows before the throne of Rayne's github profile

2:48 Raynes: Haha

2:48 arrdem: s/Raynes/Raynes's?/g

2:48 jeremyheiler: arrdem, Remember all that time you wasted in high school? Well, Raynes didn't waste it :-P

2:49 Apage43: I spent highschool enamored with Common Lisp

2:49 arrdem: god fucking... I was doing so well with homeschooling before that too..

2:49 jeremyheiler: lol

2:49 Raynes: That's the truth behind my github profile is homeschooling.

2:49 arrdem: (inc Raynes)

2:49 lazybot: ⇒ 24

2:49 Raynes: And the truth behind that sentence is that it was really confusing.

2:50 But yeah, I was homeschooled k-12 so I had lots of time on my hands.

2:50 Apage43: picked up Clojure in '08, once I was out of high school and at my first job. Was wildly more practical =P

2:50 arrdem: Raynes: nice... I was homeschooled K-8 and did 9-12 in public

2:50 still managed to pick up Python, C++, Java and some Clisp tho.

2:51 jeremyheiler: Raynes, Nice, I wish I had the opportunity to do that.

2:51 arrdem: the shock of meeting other homeschoolers never quite goes away...

2:52 Apage43: I was a terrible PHP-for-everything guy for a time, once I started learning C to write PHP extensions I took a step back and started playing with a lot more stuff

2:53 Raynes: arrdem: Where does arrdem call home?

2:53 Texas.

2:53 Austin, Texas.

2:53 arrdem: yep.

2:53 you got me...

2:54 whether or not it was a good idea to leave so many direct links to my real life I have yet to decide.

2:54 Raynes: Your Github profile has a location.

2:55 arrdem: as does my blag (I think) and the whois of this irc connection is my office at UT

2:55 Raynes: I'm also well known for my ability to stalk. I spend most of my days across the room from amalloy but I still google him occasionally.

2:55 arrdem: haha

2:55 Raynes: Man, that poor Oddman guy really thinks I'm a terrible person now.

2:56 arrdem: oh come on. this is the internet.

2:56 Raynes: (this is the part where amalloy helpfully notes that Oddman's suspicions are correct)

2:56 arrdem: amalloy: ping ^

2:56 had to.

2:57 * Apage43 makes markov chain twitter bots out of people I sit next to

2:57 arrdem: Raynes: so that puts you at Flatland?

2:58 Raynes: arrdem: http://geni.com

2:58 flatland is our open source stuff (most of it).

2:58 arrdem: that's hillarious

2:59 would never have expected you two to be comming from a geneology startup

2:59 although I suppose Lisp plays well with graphs and geneology is a graph so...

3:00 amalloy: "coming from" is an odd way to put it

3:01 Apage43: they conjured you into existence somewhere in their office

3:01 with backstories, even

3:01 arrdem: lets go with that one.

3:02 Apage43: Raynes was homeschooled because it was an easier simulation.

3:02 Raynes: This is accurate.

3:03 arrdem: aw all I got was a few decades of making pots when I got uploaded.

3:05 Okay guys 2am and I need to hit the hay Raynes nice to "meet" you, hope to see you at a con one day. amalloy sorry to ping you in at this ungodly hour

3:05 Raynes: arrdem: Night Mr. Reid. It's only midnight here, so all is well.

3:06 * Apage43 misses Central Time

3:06 Raynes: Me too.

3:37 muhoo: best code comment evar https://github.com/technomancy/syme/blob/master/src/syme/db.clj#L47

3:51 ambrosebs: How can I use the ClojureCLR master branch from lein-clr?

5:00 talios: how often are you lot ( anyone whose awake ) using protocols in your clojure code?

5:00 ambrosebs: hardly ever.

5:01 I always choose multimethods.

5:02 talios: we were discussing the use of, and passing around arbitrary maps/lists to everything rather than records, or "types" - I'm still in favour of types over loose structures for larger projects, or ones with multiple programmers/modules/libraries.

5:03 coworker seems to want to avoid types as much as possible, imho maybe too much to

5:03 tho

5:05 ambrosebs: You'd rather records?

5:07 The safest I've found (I use this strategy in the core.typed implementation) is to use records backed by core.contracts. And use raw field lookups where possible, so it's a runtime error to look up an incorrect field.

5:07 talios: I'm not sure :) One instance was the postal email lib, that takes a map with set keys, like :host :user :pass , but since they're all optional if you pass in a map with :hst by accident, there's zero checking other than no email :)

5:08 mmm, I need to look into core.typed, and hadn't heard of core.contracts - time to go read!

5:08 ambrosebs: Highly recommend core.contracts. See defconstrainedrecord.

5:09 core.typed can help you here too.

5:09 (in theory, it's still early development)

5:12 talios: Also check out fogus/Trammel, it's a predecessor to core.contracts.

5:13 talios: willdo

5:13 cheers

5:14 ambrosebs: talios: cool

5:14 * talios sees ambrosebs on his screen in a video :)

5:14 ambrosebs: :)

5:15 talios: didn't know you were an aussie :)

5:16 acron^: show videos!

5:16 talios: arbscht just started a clojure group here in town ( hosted at our work ) - if you're ever in Auckland - come visit

5:17 acron^ - its http://www.youtube.com/watch?v=wNhK8t3uLJU i'm watching, from 2012 conj

5:18 ambrosebs: talios: It's true :)

5:18 talios: it's why I'm awake right now ;)

5:18 talios: i just thought you were a hard core lisper ;p

5:18 ambrosebs: LOL

5:19 talios: I submitted a talk to YOW! Lambda Jam, I might get close to Auckland ;)

5:19 talios: nice

5:20 ambrosebs: thanks for the invitation

5:24 cemerick: talios: In practice, silly stuff like :hst doesn't really happen.

5:25 Or, it happens as often as a whole range of other typos you can't typecheck, like a 0 where a 1 should be, etc.

5:26 talios: true, in one particular I hit today the argument was a map, that contained a list, that contained a map, and that last map had invalid keys - that silently got ignored, or produced broken results

5:27 it just seems that if you've got code that really wants known keys, that are documented in code comments, or on a wiki page, why not encode that in a type. same argument most people have with javascript and js-duck type comments etc

5:29 cemerick: I think that's putting the cart before the horse. Just because a fn expects a certain set of slots doesn't mean that that describes a type.

5:30 talios: not neccesarilly a type, but a well known/checked structure i guess

5:30 ambrosebs: talios: This example of a pretty complex heteroengeous map type in core.typed might interest you https://github.com/clojure/core.typed/blob/master/src/test/clojure/clojure/core/typed/test/compiler.clj#L61

5:31 Say you had a type that needed at least one of :host :name :phone, you could encode that in a static type.

5:31 If anything, it's very useful to use the syntax to standardise your expectations, even if you don't use the checker.

5:32 talios: *nod*

5:34 HMap looks like that would satisfy my gripe from this morning

5:35 clgv: talios: there are libs for checking map structure

5:42 talios: hazah - and now ambrosebs is talking about HMaps on my screen :)

5:43 ambrosebs: talios: I think I just skip over them.

5:43 *skim

5:43 talios: it'll give me an overview :))

5:54 mmmm 11pm and I'm feeling like bed already

6:00 clgv: talios: oh. where are you from. it's 11 am over here ;)

6:00 talios: clgv - Auckland, New Zealand - 11:01PM

6:00 clgv: talios: guessed for australia. close miss ;)

6:01 talios: the better nation :)

6:01 tho Aus gets better tours

6:04 grr - I hate how emacs prelude removes the arrow keys for navigation. for all the good things it gives, it just kills everything in the name of purity and crippled hands

6:31 corecode: talios: yea, bad for beginners

6:34 maio: talios: (setq prelude-guru nil)

6:34 https://github.com/bbatsov/prelude#no-arrow-navigation-in-editor-buffers

6:41 talios: maio - hrm, that doesn't seem to do anything hitting esc-x then typing that in, emacs is not meant for love

6:43 ahh - read the page and i'm all good :)

7:39 ljos: brehaut, ambrosebs: In core.typed, how do I annotate records? Do I just use the same as for deftype?

7:45 ambrosebs: ljos: not supported yet.

7:45 There's a subtle design issue. A record loses it's type if you dissoc all the base keys

7:46 ljos: abrosebs: yeah, I can see how that would be problematic.

7:46 ambrosebs: does a defrecord unify to a HMap per chance?

7:46 ambrosebs: unify?

7:47 cemerick: ambrosebs: s/all/any, right?

7:47 ambrosebs: cemerick: hmm I forget.

7:47 ljos: ambrosebs: I think I have been doing a bit to much prolog lately. Can I treat a record as a HMap when I give it to a function right now? or would that be a type error?

7:47 cemerick: yeah, any

7:48 ambrosebs: cemerick: cheers. Doesn't make it any easier though :)

7:48 cemerick: ambrosebs: pay no attention to the peanut gallery :-)

7:49 ambrosebs: ljos: I doubt it works

7:50 ljos: ambrosebs: Ok, I will test and report back. If it doesn't work I can just do something else here I think...

7:50 ambrosebs: In theory a record is an intersection of a datatype and a HMap, but I've made no implementation yet.

7:57 mpfundstein: is here anyone with lamina experience? i try to use it with aleph and i can't find a way to see if a client closed the connection

8:13 ambrosebs: ljos: find out anything exciting?

8:18 ljos: ambrosebs: First of all I had to fight a little with not being allowed to do a list with Symbols.

8:19 ambrosebs: really?

8:20 ljos: ambrosebs: I figured out that it seems like it does not like to be a HMap, but I am trying some things with IPersistentMap now, but I get some strange error that I haven't figured out why yet.

8:20 The thing with the symbols is probably because I don't understand core.typed yet.

8:22 ambrosebs: what am I doing wrong here: (ann-form '(a b) (List* Symbol Symbol)) ?

8:23 ambrosebs: List* should be IPersistentList

8:23 Hmm.

8:23 Ok that probably should work.

8:23 What's the error?

8:24 ljos: it does work if I change it to IPersistentList.

8:24 ambrosebs: ljos: Ah, it's one of *these* errors.

8:24 If you get a multiple methods error, that's a bug.

8:24 ljos: That is the one.

8:25 ambrosebs: Let me know when you find more, they're easy to fix.

8:25 I may abandon using a multimethod here anyway.

8:26 ljos: it seems to happen for any type here that is not of (Value X) when I use List*.

8:27 ambrosebs: Yep, makes sense.

8:29 ljos: FYI heterogeous List and Seq are half baked and not well tested.

8:29 hmaps and hvectors are much more solid atm

8:30 There shouldn't be too much issue though.

8:37 ljos: The List* example should work in master

8:42 ljos: ambrosebs: sweet!

8:54 ambrosebs: I get this error that I don't understand at all. I was wondering of you could have a look at it. I have put up a minimal version here http://pastebin.com/XWKcLLtx that shows the problem.

8:55 I don't understand how I could have the wrong number of arguments to a type I don't use.

8:57 ambrosebs: ljos: Yea, the record type just isn't set up to be used. I think core.typed is trying to go through the record's ancestors and instantiating them, but things don't match up to what is expected.

8:57 ljos: thanks, that's useful

8:59 ljos: ambrosebs: yeah, I was thinking it was something like that, but would expect it to look for the type in the supers that match the type I have specified for the function.

9:00 ambrosebs: What the error means is core.typed found an ancestors IPersistentCollection, when it should be (IPersistnetCollection x)

9:01 core.typed isn't very lenient with that at the moment. It's helped me find a few bugs so I'll keep that behaviour for the early versions.

9:04 ljos: ambrosebs: I managed to force the record into a IPersistantMap now and now it works how it should, though I loose the record type in the process.

9:05 ambrosebs: ljos: hehe really? that's interesting.

9:05 I don't know how that worked.

9:06 ljos: (into {} (R. 1)). I annotated into as (ann clojure.core/into (All [x y] [x y -> x])).

9:08 ambrosebs: ljos: right. That's cheating :)

9:12 ljos: ambrosebs: I know. into is way to lenient, but at least know I can work a bit with records, just that I won't know if the into function will crash everything or not.

9:13 or, the data in the record. Everything else is forgotten.

9:13 ambrosebs: ljos: you've given a quite inaccurate type to into :) you could put anything you want as the second argument

9:14 ljos: I know.

9:14 Kototama: hi, I have put my JS files in the project/src-js/libs directory and add the :libs ["src-js/lib"] to :compiler option for clojurescript, but cljsbuild does not compiler the source

9:14 what I am doing wrong?

9:14 michaelr524: hello

9:58 greg_: Hello all. Anybody here have any experience using 'lein deploy' to send jars, automatically, to Bitbucket's download section (of a given project)?

10:01 rcg: greg_, did you consider pushing to clojars.org?

10:02 it's fairly straight forward and lein will automatically fetch your lib for you from there

10:02 greg_: rcg, thanks, but this is a private project right now. The JARs are for release to a customer.

10:02 rcg: in case your project is a lib you use in other projects ;)

10:02 greg_, right, i see :)

10:05 delihiro_: Hi all. I'm using compojure to build my website. How should I keep ring server running? So far doing ``lein run&`` and when killing ``kill -9 blabla``...

10:06 ljos: ambrosebs: shouldn't ((Seqable Long) -> (Seqable Long)) be a subtype of ((Seqable

10:07 ((Seqable x) -> (Seqable x)) ?

10:07 hyPiRion: delihiro_: lein uberjar, then java -jar ... & (or even better, set up a supervisor for it)

10:07 ambrosebs: ljos: Yes I think so.

10:07 delihiro_: hyPiRion: thank you, I'll try that now

10:09 ljos: ambrosebs: my bad, I put [Fn [Long (All [x] (Fn [Seqable...]))]] instead of on the outside of the whole expression. That was what tricked it up.

10:09 instead of All on the outside*

10:10 ambrosebs: Yes ok.

10:11 juhuchapa: Hi guys!

10:13 yedi: y did that clojure all grown up post get so many upvotes

10:22 michaelr524: because hn ;)

10:24 Pupnik-: its not grown up until it has TCO!

10:30 jtoy_: can anyone tell me what is wrong with this: https://www.refheap.com/paste/12491 my code works if I just use map, but if I add a filter, it dies with: java.lang.RuntimeException: java.lang.NullPointerException

10:30 im just trying to process rows from a file and then filter then so i can do a count

10:32 frenchyp: can cheshire.core/parse-string return nil?

10:33 jtoy_: frenchyp: I dont think so, it should raise an exception instead

10:34 dakrone: frenchyp: if you parse the string "null", yes it can

10:34 clgv: Pupnik-: well, then Java and all JVM languages are not grown up :P

10:35 frenchyp: jtoy_: does it work if you wrap (map ..) with (first (map..)) to realize the lazy seq?

10:35 jtoy_: frenchyp: I just tried with only: (filter #(= % "m" ) (line-seq rdr)) and I get "(java.io.IOException: Stream closed" instead which makes me think im just doing it wrong

10:36 clgv: jtoy_: you are using with-open I guess and your lazy-seq leaves the with-open scope unevaluated

10:36 frenchyp: ya, I'd guess that's related to line-seq returning a lazy seq

10:37 if you are trying to process the whole file anyway, i'd try to add a doall around the map, or possible around the filter

10:37 jtoy_: yes, (first (map #(cheshire.core/parse-string %) (line-seq rdr))) works

10:38 frenchyp: *possibly

10:38 clgv: jtoy_: the problem is that the with-open statement closes your reader "rdr" before you evaluated your lazy-seq

10:39 jtoy_: uh, sorry to ask, but i've tried all the different combinations, can one of you guys show me a simpl example that should work with with-open, map, and filter ?

10:40 clgv: jtoy_: (with-open [rdr (io/reader "myfile.txt")] (doall (filter #(= % "m" ) (line-seq rdr))))

10:41 jtoy_: clgv: thx, i think i tried that before, but ill try it now

10:42 clgv: jtoy_: if your file is huge though, you should do the analysis in the with-open scope to benefit from the lazy nature of the line-seq

10:42 *the whole analysis

10:43 hmm probably a lazy-reader-seq would be great ^^

10:44 frenchyp: jtoy_: example with map https://www.refheap.com/paste/12492

10:44 clgv: frenchyp: "please paste the result"? :P

10:45 frenchyp: lol, not that interesting: ("ROOT:X:0:0:ROOT:/ROOT:/BIN/BASH")

10:45 jtoy_: I jsut got it to work, thx

10:46 clgv: ah right, password hashes are in a different file usually and you compare for equality

10:46 frenchyp: yes, /etc/shadow

10:47 jtoy_: clgv: your example isnt lazy bc of the doall, is that correct?

10:47 frenchyp: was my first try actually, but tight reading permissions reminded me of my foolishness

10:48 clgv: jtoy_: the lazy sequence in both examples (frenchyp's and mine) leaves the scope of the with-open evaluated completely, yes

11:01 jtoy_: if it leaves the scpoke, does that make with-open useless in that case?

11:02 frenchyp: no

11:02 the with-open is here to ensure that your file and its reader get closed properly when you are done working with them

11:03 so it is not useless

11:03 the fact that line-seq is lazy does become useless if you load the whole file, processed or not, into memory

11:03 but you get that lazyness for free, whether you end up using it or not

11:13 ambrosebs: Just ported analyzer to CLR https://github.com/clojure/clr.tools.analyzer

11:15 clgv: ambrosebs: how much work was it?

11:15 ambrosebs: about 2 hours.

11:16 I'd never used CLR before, and have basically zero .net experience.

11:16 clgv: then thats probabably pretty fast ;)

11:16 oh my spelling module failed^^

11:17 ambrosebs: I was pleased :) Some pretty nasty error msgs in CLR though.

11:17 Pupnik-: is clojure on clr much different to jvm clojure?

11:18 ambrosebs: Internals are identical.

11:19 noidi: ambrosebs, wow, worse than on the JVM? ;)

11:19 the erro messages

11:19 jtoy_: what is the idomatic way to get vales from a clojure.lang.PersistentArrayMap, I see that its not (:key persistentarraymap)

11:19 nDuff: jtoy_: if the key is a keyword, that is indeed it.

11:19 ambrosebs: noidi: well, they're different looking now :)

11:19 nDuff: jtoy_: otherwise, you need to use get

11:19 john2x: would anyone recommend PeepCode's Clojure screencast? https://peepcode.com/products/functional-programming-with-clojure

11:21 joegallo: wait -- isn't it idiomatic to (persistentarraymap "some-string") or whatever

11:23 jtoy_: idiomwhat do you mean by keyword?

11:23 blrm: john2x: i have only watched about 20 minutes of it so far, but I like it well enough. It is probably pretty dated though, it was made before Clojure 1.0

11:24 clgv: jtoy_: use (:mykeyword my-map) and (my-map anything)

11:24 Pupnik-: john2x, updated 2009, it might be pretty badly out of date

11:24 joegallo: :this :is :a :keyword

11:24 blrm: john2x: however the code used in the video has been updated to work with clojure 1.4.0: https://github.com/technomancy/mire

11:25 clgv: ambrosebs: what is your clojure clr setup concerning IDE/editor?

11:26 john2x: hmm right.. maybe i'll just wait for lispcast's screencasts. :)

11:26 ambrosebs: clgv: lein-clr plugin, lein clr repl + rlwrap, and vim for editing.

11:26 Pupnik-: ambrosebs, does it interop with c# (presumably) as easily as it does with java?

11:26 clgv: ambrosebs: ah ok. there is no good visual studio plugin, yet, is there?

11:27 ambrosebs: clgv: no idea, I'm in ubuntu :)

11:27 clgv: ambrosebs: ah, so you use clojure on mono^^

11:27 ambrosebs: Pupnik-: I think there's a little extra ceremony from looking at the docs.

11:27 clgv: yep, and it seems to work!

11:27 clgv: :)

11:29 ambrosebs: dmiller has done an awesome job, it's a pretty complete language.

11:36 jimduey: ambrosebs: I'm starting to annotate protocol-monads. :) Looks like it's going to be quite the task.

11:37 ambrosebs: jimduey: really? Interesting, which bits are hard?

11:39 jimduey: I don't know yet. :) Working on the first function which takes a list of monadic values. And the mv's can be pretty much any type.

11:40 ambrosebs: jimduey: cool! :)

11:40 I'd love to help if you need it.

11:47 jtoy_: ah, i see

12:01 llasram: ambrosebs: Is type inference in the roadmap for typed clojure?

12:04 jtoy_: can someone show em the correct way to create 1 large hash-map when processing a file: https://www.refheap.com/paste/12496 this built the wrong things, its a map of hashes

12:06 ambrosebs: llasram: nope. I'm working on squeezing a little more local type inference though.

12:06 llasram: I'll be happy once we only need to annotate vars and rarely have to touch actual code with annotations.

12:07 llasram: I don't think you could design a satisfying type system for Clojure with inference.

12:08 llasram: ambrosebs: Ok. I was wondering if it would just be too difficult/infeasible to get useful results. Oh well

12:08 faust45: can any one suggest up to date clojure wrap around lucene ?

12:08 technomancy: faust45: clojars uses clucy, but it's pretty minimal

12:09 ambrosebs: llasram: you'd probably end up with something like soft typing or Dialyzer, where you would be lenient about type errors. And that's fine, but that's not what I'm going for with core.typed.

12:09 llasram: ambrosebs: I'm interested in the idea of using typed clojure to figure out types for serialization, but needing to specify the types so proximately makes it less attractive vs just specifying the serialization

12:09 faust45: technomancy: thanks

12:09 llasram: ambrosebs: Although I suppose you would then have greater confidence that you could serialize correctly

12:10 ambrosebs: Gotcha. Thanks for the info

12:11 ambrosebs: llasram: core.typed offers very precise types, so there would probably be some utility documenting the code.

12:35 tgoossens: any ideas for a good website name for a belgian clojure user group?

12:35 suggestions : belgiumclj.org (naar http://amsclj.nl/) , be.clojuregroup.org , clojureusers.be clojuregroup.be clojurians.be cljug.be

12:37 bbloom: grumble grumble namespaces again

12:37 dnolen: core.logic 0.8.0-rc3 going out, probably the last one, hopefully more incremental updates after this.

12:38 bbloom: i want people to be able to import and single namespace with a single alias, but i redefine *a lot* of core names, so I basically do [:refer-clojure :only ()] so it's MEGA ANNOYING to write non-trivial functions in this namespace

12:38 but those non-trivial functions rely on stuff defined in that namespace

12:39 technomancy: bbloom: (:require [clojure.core :as cc])?

12:40 bbloom: technomancy: yeah, that's what i'm doing, but the issue is that there is a big disagreement between the API i want to provide and the 'ns macros that I need to not pull my hair out during development

12:42 jonasen: dnolen: no LOGIC-118 for rc3?

12:45 dnolen: jonasen: doubtful, waited long enough. But don't worry I'm sure 0.8.1 will be hot on the trail of 0.8.0 - there are issues of the same importance as 118 that also need to be addressed.

12:46 jonasen: dnolen: that's ok

12:46 dnolen: Do you want tests for patches also?

12:46 dnolen: jonasen: yes, that's preferred

12:46 jonasen: dnolen: I'll add some then

12:47 dnolen: jonasen: thanks!

12:49 jonasen: dnolen: when I updated kibit to 0.8.0-rc2 I got two bug reports which I think is related to core.logic. One is LOGIC-118 and the other one I have not yet reproduced: https://github.com/jonase/kibit/issues/78

12:51 dnolen: jonasen: hmm, sounds like they have a really deep structure or a circular reference.

12:55 juhu_chapa: What is a closure in clojure?

12:56 nDuff: juhu_chapa: When you generate a function that refers to names it inherits from surrounding scope, it "closes over" them.

12:56 clgv: juhu_chapa: something like that (let [x 2] (fn [y] (+ x y))

12:57 +)

12:57 nDuff: juhu_chapa: In the example clgv just gave, the fn closes over x

12:57 juhu_chapa: see also http://en.wikipedia.org/wiki/Closure_(computer_science)

12:59 juhu_chapa: Thank you guys!

13:03 skoodge: is there any way to get the arguments to a macro in syntax-quoted form instead of simply quoted?

13:05 bbloom: skoodge: unfortunately, it's somewhat non-trivial to resolve a symbol the same way syntax quote does, there is no standard function for it

13:06 skoodge: you can use the resolve-symbol function from backtick: https://github.com/brandonbloom/backtick/blob/master/src/backtick.clj#L85-L99

13:06 skoodge: or just look at what it does and decide which code paths you care about and copy paste inline

13:08 skoodge: bbloom: ok, I guess I'll use it inline then

13:08 not very pretty, but seems like the best solution :-/

13:09 clgv: skoodge: a shortcut is using `resolve` and using the fields ".ns" und ".sym" - but you will need to check if it still works when a new release of clojure is released

13:09 bbloom: skoodge: yeah, there's a lot of stuff going on in there: dealing with special forms, constructors, type names, method calls, constructor invocations, namespace resolution, etc

13:12 clgv: skoodge: in terms of the backtick source `resolve` + `var-symbol` gets you a resolve symbol for normal clojure symbols

13:12 grebus: anyone had luck with clj-iterate in clojurescript?

13:12 Pure_Loulou: hello :))

13:13 my code has a bug,but i cant find the line of the bug in the stack frama

13:14 it shows me code only from java, or from clojure.core

13:15 is there a way to automatically track the line of my code that produces the exception?

13:15 nDuff: Pure_Loulou: Short answer? No. Long answer? We'd need more details.

13:15 Pure_Loulou: Are you getting your exception from (clojure.stacktrace/e), from (clojure.stacktrace/print-exception), or somewhere else?

13:15 Pure_Loulou: ...is this evaluating a lazy sequence? Using concurrency primitives? etc etc.

13:15 Pure_Loulou: IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Keyword

13:15 clojure.lang.RT.seqFrom (RT.java:494)

13:15 clojure.lang.RT.seq (RT.java:475)

13:15 clojure.core/seq (core.clj:133)

13:15 clojure.core/map/fn--4087 (core.clj:2426)

13:15 clojure.lang.LazySeq.sval (LazySeq.java:42)

13:15 nDuff: Pure_Loulou: ...is this Java 8?

13:15 Pure_Loulou: clojure.lang.LazySeq.seq (LazySeq.java:60)

13:15 clojure.lang.RT.seq (RT.java:473)

13:15 clojure.lang.RT.countFrom (RT.java:526)

13:15 clojure.lang.RT.count (RT.java:519)

13:16 nothing from my code....

13:16 nDuff: Pure_Loulou: the point is that we need to know the actual _code_.

13:16 Oh -- it _is_ a lazy sequence.

13:16 ...well, not quite.

13:16 Trying to use a keyword as a sequence is a pretty clear error. :)

13:17 clgv: Pure_Loulou: you provided a keyword where a sequence was expected in a map statement

13:17 Pure_Loulou: yes but where i did that...

13:17 i dont know......

13:17 nDuff: Pure_Loulou: *shrug*. If you give us the code, we'll help you track that down and give you pointers about how we did.

13:17 clgv: Pure_Loulou: please paste additional code at refheap.com

13:17 nDuff: Pure_Loulou: Thing is, I don't know how I do it myself right now -- it's something I _do_, but that I don't understand well enough to explain.

13:18 clgv: if it does not happen in a macro, you should get a source file and line of your project

13:18 ieure: technomancy, Have you run into this with lein-tar before? https://gist.github.com/ieure/5154240

13:20 Pure_Loulou: thanx guys i will try a little by my self,but why in clojure you cant get the line of the bug automatically?

13:20 is this something that can be fixed?

13:20 nDuff: Pure_Loulou: Mostly you _can_.

13:21 clgv: Pure_Loulou: you usually get it if the error does not happen in a macroexpansion

13:21 nDuff: Pure_Loulou: Since you haven't given your code, we haven't been able to explain why that isn't the case in your current usage.

13:21 Pure_Loulou: i dont know where the error occurs to give you code

13:22 nDuff: Pure_Loulou: ...and I presume the context is proprietary or otherwise can't be shared for some other reason?

13:22 Pure_Loulou: i think this is the evil function https://www.refheap.com/paste/12498

13:22 no i am totally newbie no proprieraty

13:23 * nDuff waits for Light Table to fire up

13:24 nDuff: Pure_Loulou: Have an example of how you invoke/run that?

13:25 Pure_Loulou: (parse-graph {:a0 {:label :a, true :b1, false :b0}, :b0 {:label :b, true :zfalse, false :zfalse}, :b1 {:label :b, true :ztrue, false :zfalse}, :zfalse {:label false}, :ztrue {:label true}} :a0)

13:25 nDuff: Runs fine here.

13:26 Pure_Loulou: yes but the output is probably not normal for some other part of the program,anyway thx guys for trying

13:27 nDuff: Pure_Loulou: Why don't you give us your _entire_ program, in enough context we can reproduce your problem?

13:27 Pure_Loulou: ...instead of trying to guess at what function it's hiding in?

13:27 clgv: Pure_Loulou: that is not the function. search for "map"

13:28 owengalenjones: dumb question, is there an easy way to see what interfaces (java or clojure) classes implement?

13:28 technomancy: ieure: can't say I have. I haven't used lein tar in years though.

13:28 hiredman: do you guys still use it?

13:28 clgv: owengalenjones: yes ##(ancestors (class []))

13:28 lazybot: ⇒ #{java.util.List clojure.lang.Indexed clojure.lang.Seqable clojure.lang.ILookup java.util.concurrent.Callable clojure.lang.Counted clojure.lang.IPersistentVector clojure.lang.AFn clojure.lang.IMeta java.io.Serializable clojure.lang.IFn clojure.lang.Reversible j... https://www.refheap.com/paste/12499

13:28 ieure: technomancy, Okay. Just using a Makefile instead.

13:29 technomancy: ieure: geez you didn't have to say that out loud

13:29 hiredman: technomancy: yes?

13:29 I think

13:29 owengalenjones: clgv: thanks!!!

13:29 ieure: technomancy, I love make.

13:29 technomancy: now you're just messing with me

13:29 ieure: No way man.

13:29 Make is great.

13:30 hiredman: yes, lein tar

13:30 ieure: lein tar wouldn't have done what I needed anyway.

13:30 Moving a thing to lein from mvn.

13:30 And need to replicate what assembly did.

13:33 bbloom: anyone know of any attempts at fressian for javascript?

13:34 danielglauser: hiredman: technomancy: Just used lein tar on one of our projects yesterday

13:42 clojure-new: Hello, i have this in my .lein/profiles.clj {:user {:plugins [[jonase/kibit "0.0.9-SNAPSHOT"]]}}

13:43 But lein kibit says "'kibit' is not a task. See 'lein help'."

13:43 What i did wrong?

13:45 chronno: technomancy: I'm preparing for the key signing party, any tips for creating the keys and such?

13:45 technomancy: Right now I'm reading http://wiki.debian.org/Keysigning, but I'm not quite sure if such a big key (4096) is recommended/needed...

13:48 peat: ... I'm beating my head against a problem that seems like it should have an elegant answer. I'm looking for a way to turn [[:foo "bar"] [:baz "quux"] [:foo "doh"]] into { :foo ["bar" "doh"], :baz ["quux"] }. Any recommendations on where to start looking?

13:48 Pure_Loulou: my code i tried to example what it does ... https://www.refheap.com/paste/12500

13:49 jtoy_: can anyone show me how to make this more idiomatic or "beautiful"? https://www.refheap.com/paste/12501 I feel this is pretty crappy code and probably repeated

13:51 clgv: jtoy_: you do not need `doall` if you feed the lazy-seq into `into` ;)

13:51 clojure-new: Guys?

13:52 Gonzih: &(->> [[:foo "bar"] [:baz "quux"] [:foo "doh"]] (group-by first) (map (fn [[k v]] [k (map last v)])))

13:52 lazybot: ⇒ ([:foo ("bar" "doh")] [:baz ("quux")])

13:52 jtoy_: clgv: ok, i took that out, thx

13:52 Gonzih: peat: take a look

13:52 clgv: jtoy_: and I think you can improve it via `for`

13:53 Gonzih: &(->> [[:foo "bar"] [:baz "quux"] [:foo "doh"]] (group-by first) (map (fn [[k v]] [k (map last v)])) (into {}))

13:53 lazybot: ⇒ {:foo ("bar" "doh"), :baz ("quux")}

13:53 jtoy_: the map seems extra to me, but i coudlnt figure out how to create a hash-map iteraviley

13:54 peat: Gonzih: Hah! Thank you!

13:55 Gonzih: &(->> [[:foo "bar"] [:baz "quux"] [:foo "doh"]] (group-by first) (map (fn [[k v]] [k (vec (map last v))])) (into {}))

13:55 lazybot: ⇒ {:foo ["bar" "doh"], :baz ["quux"]}

13:55 Gonzih: with vectors

13:55 clgv: jtoy_: try that one https://www.refheap.com/paste/12502

13:55 Gonzih: peat: no problem :)

13:56 technomancy: chronno: hmm... so actually I didn't get to run a key signing party at the conj due to illness unfortunately

13:56 planning on doing one at clojurewest but haven't really gotten a chance to think through it much

13:56 clojure-new: jonasen: Can you help me?

13:56 technomancy: chronno: I don't think the huge key size is necessary, but honestly it can't hurt

13:56 Gonzih: clojure-new: try lein with-profile user kibit

13:57 clojure-new: Performing task 'kibit' with profile(s): 'user'

13:57 'kibit' is not a task. See 'lein help'.

13:57 Gonzih: ^

13:57 jtoy_: clgv: what is that :let syntax? I, there is no x here: (for [line (line-seq rdr) :let [[i1 i2] (clojure.string/split (clojure.string/lower-case x ) #"\s+")]]

13:57 and im not sure how to put the x/% item in bc i dont know that syntax

13:57 chronno: technomancy: ok, then I'll follow the debian docs and will wait to see how it rolls at clojure/west :-)

13:57 Gonzih: clojure-new: ok, give me one sec

13:58 clgv: toy_: I renamed "x" to "line"

13:58 chronno: technomancy: thanks

13:58 technomancy: chronno: do you use emacs?

13:58 jtoy_: clgv: ah, can you recommend a page that shows how to use :let

13:58 technomancy: oh, I see you're in #emacs

13:58 clgv: jtoy_: ##(doc for)

13:58 lazybot: ⇒ "Macro ([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, right... https://www.refheap.com/paste/12503

13:58 technomancy: chronno: the easypg package in emacs makes gpg really easy to work with

13:58 highly recommend reading up on it

13:59 Gonzih: clojure-new: Could not find artifact lein-kibit:lein-kibit:jar:0.0.9-SNAPSHOT in clojars

13:59 clojure-new: Gonzih: I've installed it locally.

13:59 Gonzih: clojure-new: change kibit line to [lein-kibit "0.0.7"]

13:59 clojure-new: Cloned from git and then 'lein install'.

13:59 Gonzih: clojure-new: it should be then on classpath to work properly i think

13:59 clojure-new: hm

13:59 chronno: technomancy: Yep, long time emacs fan. I'll check it out.

14:00 clgv: jtoy_: that's what I meant https://www.refheap.com/paste/12504

14:00 jtoy_: clgv: thx

14:00 Gonzih: clojure-new: I have no idea how that supposed to work. 0.0.7 works fine for me, don't know how to run 9-SNAPSHOT

14:00 clojure-new: sorry :(

14:00 clgv: jtoy_: play a bit with `for` to understand how it works

14:01 ustunozgur: how does one get a sorted by value set with priority-map? Neither (priority-map {:a 3 :b 1 :c 5}) nor (into priority-map {:a 3 :b 1 :c 5}) works.

14:02 jtoy_: clgv: yes, im still not sure about the difference in map vs for, i know in ruby for is for iterating while map is map

14:02 so still learning

14:02 Gonzih: jtoy_: I think for is list comprehension function and map is just map

14:03 clgv: jtoy_: `for` creates a lazy sequence as well but has a different syntax and is able to do nested loops

14:03 chronno: technomancy: although I was kinda wondering what I needed before arriving at the party. Obviously the key, and maybe some printouts?

14:03 clgv: jtoy_: e.g. ##(for [i (range 4) j (range 5) :when (< i j)] [i j])

14:03 lazybot: ⇒ ([0 1] [0 2] [0 3] [0 4] [1 2] [1 3] [1 4] [2 3] [2 4] [3 4])

14:04 technomancy: chronno: I'm actually hoping some people can show up with nothing and the people who are more familiar with the tools can help them through things

14:04 but showing up with your key and a little up-front research would be really helpful =)

14:05 if you want to bring cards with your key fingerprint on it that would save a little bit of time but imo it's not really worth worrying about

14:05 jtoy_: clgv: cool, i see

14:06 chronno: technomancy: Great then I'll create the key and that will be it :-)

14:17 jtg: i cant believe raynor dies at the end of heart of the swarm

14:19 arrdem: jtg: GODDAMNIT DON'T RUIN IT FOR ME

14:20 technomancy: ugh wtf

14:20 * arrdem needs to stop cursing in chan

14:21 jtg: oops, sorry, i was only trying to spoil it for cheezey

14:21 arrdem: does weavjester not idle here?

14:21 *weavejester

14:22 technomancy: arrdem: he's often here

14:22 arrdem: technomancy: mmkay just surprised he isn't forever logged in like you Raynes and amalloy

14:23 technomancy: they do things differently in the UK I guess

14:23 arrdem: silly brits

14:38 technomancy: so, anybody tried Syme for pairing yet? https://syme.herokuapp.com

14:40 arrdem: nope, looks like a good idea if you don't have a share(ed/able) *nix host tho.

14:40 technomancy: arrdem: yeah, sharing your own machine can get tricky.

14:41 if you don't have problems with port forwarding, the trust issues are problematic; you can't offer your pair sudo access, and you shouldn't give them access to your SSH agent.

14:41 bbloom: technomancy: will lein be updated to default projects to 1.5.1?

14:41 technomancy: bbloom: I think it might be already?

14:41 dnolen: lynaghk: have you looked at Ejecta at all?

14:42 bbloom: technomancy: i just did `lein upgrade` and then `lein new asdf` and it was 1.4.0

14:42 technomancy: bbloom: I mean on master

14:42 bbloom: technomancy: ah ok

14:43 technomancy: qwerty users... man.

14:43 bbloom: technomancy: `lein new aeou` just doesn't have the same ring to it

14:44 pjstadig: technomancy: for real

14:44 technomancy: bbloom: I was thinking of http://common-lisp.net/project/asdf/ actually

14:45 bbloom: heh, i use asdf almost as much as "foo" and "bar"

14:45 arrdem: technomancy: Dvorak man

14:45 s/technomancy/bbloom

14:46 bbloom: arrdem: not worth the trouble

14:49 finishingmove: what IDE can I use for Clojure on Windows?

14:49 daydreamt: finishingmove: Eclipse and Intellij both have Clojure plugins

14:50 finishingmove: daydreamt thanks

14:50 daydreamt: finishingmove many people seem to use emacs and vim though

14:50 technomancy: there is only one clojure IDE, and lpetit is its prophet?

14:52 lynaghk: dnolen: no, I haven't heard about this at all. Thanks!

14:52 er, dnolen_.

14:52 finishingmove: technomancy, hm? what do you mean by that

14:53 technomancy: eh, nothing

14:53 dnolen_: lynaghk: http://github.com/phoboslab/Ejecta

14:53 lynaghk: sounds right up your ally, target *native* OpenGL from JS using Canvas API

14:54 lynaghk: my studio mate who does lots of fancy graphics stuff uses it and was pretty impressed by the perf, 60fps and all that.

14:54 nDuff: finishingmove: Are you looking for something for learning/experimenting with the language, or real work?

14:54 finishingmove: if the former, I also suggest looking at LightTable

14:54 lynaghk: dnolen_: most of the work we do leverages CSS pretty heavily, so I dunno how far we'd be able to go with something like this.

14:54 arrdem: lol@ "real work"

14:54 dnolen_: lynaghk: gotcha

14:54 nDuff: arrdem: (?)

14:54 finishingmove: nDuff: learning / experimenting

14:54 i'll check it out

14:54 technomancy: finishingmove: CCW seems like the most polished IDE by a significant margin

14:55 lynaghk: dnolen_: it's a cool idea, though if we're going to drop CSS and other browser pieces we might as well take a look at ClojureC =P

14:55 * nDuff is a bit offended at the presumption that Emacs is somehow not an IDE.

14:55 * arrdem considers Emacs to be more of an IDE than Eclipse

14:55 technomancy: nDuff: well, yeah if you want to discuss semantics. =)

14:55 rabbit_airstrike: but our friend here is looking for windows IDEs

14:55 dnolen_: lynaghk: heh, this at least seems promising for supporting remote REPL and all that.

14:56 lynaghk: dnolen_: could use it to do something goofy like http://www.fourthdimensionapp.com/

14:56 rabbit_airstrike: my experiences with emacs on windows have been less than pleasant

14:56 technomancy: nDuff: I was having a rare fit of non-pedantry there; it won't happen again.

14:56 dnolen_: lynaghk: haha

14:56 lynaghk: dnolen_: yeah, sure. Though I have never really used the cljs repl---I get by with the plain Clojure REPL just fine

14:56 finishingmove: technomancy, where can i find CCW? (i can't seem to google it)

14:57 technomancy: ~ccw?

14:57 clojurebot: ccw is http://github.com/laurentpetit/ccw

14:58 auser: is anyone in here using riemann?

14:59 nDuff: Hrm. Anyone know if Manning has a discount for folks buying new editions of books they already own a prior edition of?

15:00 * nDuff is moderately interested in seeing what's being added to JoCv2, but not full-purchase-price interested.

15:01 * jeremyheiler Was wondering the same thing as nDuff

15:01 finishingmove: wow, LightTable looks awesome, I have to say

15:02 technomancy, thanks for the link to CCW, I will definitely consider it

15:03 technomancy: finishingmove: it's the only IDE afaik that has Leiningen integration

15:10 S11001001: nDuff: I don't think so.

15:12 supersym: yea i love the instarepl :)

15:14 eriko: nDuff: FWIW, just received a half-off offer from Manning for upgrades on JoCv2

15:16 nDuff: eriko: I don't think that offer is specific to upgrades

15:16 eriko: ...for that matter, it _includes_ an ebook of v1, so it's clearly aimed at folks who don't already own it.

15:18 eriko: nDuff: True. And apparently is also a MEAP at this point. Thanks for reading it carefully for me :)

15:23 finishingmove: does eclipse provide these rainbow parentheses like http://writequit.org/blog/?p=386 ?

15:24 nDuff: finishingmove: CCW adds them to Eclipse, yes.

15:24 Glenjamin: Hi guys, is noir actually deprecated? I started learning it then stumbled across a blog post from Raynes =/

15:24 nDuff: Glenjamin: Yes, but libnoir isn't.

15:25 Glenjamin: would be nice if webnoir.com mentioned it :(

15:25 .org even

15:25 arrdem: Glenjamin: I mean it still works fine... I'm pullint 35ms latencies on my Noir backed site

15:25 *pulling

15:25 * nDuff would actually consider CCW a pretty good environment if it had a more full-featured paredit mode

15:26 amalloy: nDuff: i thought its paredit was pretty reasonable

15:26 arrdem: nDuff: is paredit worth it? I never bothered to master the keybinds so it just got in the way.

15:26 Glenjamin: i'm just getting started with clojure, so i guess i'd be better off with compojure + lib-noir

15:26 amalloy: arrdem: yes

15:26 nDuff: arrdem: The emacs one is so, so, _SO_ very worth it.

15:26 llasram: arrdem: So very worth it

15:26 arrdem: okay I'll give it another shot one day.

15:26 Glenjamin: i've been trying to find something non-emacs with strict paredit + barf/slurp, but i don't think it exists

15:26 amalloy: editing lisp without paredit is like editing java without autocomplete

15:26 nDuff: amackera: A lot of my finger-memory motions require having barf and slurp.

15:27 err, amalloy ^^

15:27 llasram: arrdem: Learning it may be the best time/code-productivity investment you can make

15:27 * arrdem would be surprised given how much Emacs at large has helped

15:29 blrm: i like paredit.vim, but it says it isn't a complete implementation of paredit.el, so I assume I'm missing some of the magic

15:30 arrdem: blrm: I'd suspect so given how much magic I gained going from vimclojure to nrepl

15:32 is there a good way to have README.md files auto-update when I bump project.clj's version number or am I just stuck hand-updating

15:32 borkdude: there was a gist or blogpost popular on twitter some times ago that contained comparison between clojure, python, haskell, etc. in the example three things were done in parallel and then combined, in the clojure solution promises were used. who remembers this?

15:33 It could be something slightly different, I don't remember it clearly

15:37 amackera: nDuff: haha

15:38 nDuff: amackera: ...heh. I suppose that _does_ sound a little odd when taken out of context.

15:42 amackera: i know this is probably an often-asked question, but I'm looking for some beginner resources for clojure

15:43 i've used scheme a bit, and java

15:43 bbloom: amackera: http://clojure-doc.org/

15:43 amackera: is it best to hunker down with a book? or is there a web-accessble resource that's recommended?

15:43 bbloom: excellent, many thanks!

15:43 nDuff: amackera: The best resources are typically books.

15:44 amackera: http://www.clojurebook.com/ and "The Joy of Clojure" are the two leaders, IMHO.

15:44 frozenlock: cemerick: Can I haz more podcasts?

15:44 amackera: nDuff: thanks!

15:44 nDuff: amackera: ...do you learn better starting from high-level concepts or concrete examples?

15:45 amackera: concrete examples

15:45 nDuff: amackera: then you're better off with clojurebook.com

15:45 borkdude: nobody remember this example?

15:45 amackera: i have a moderate understanding of lispy concepts from scheme

15:45 nDuff: amackera: There are a lot of concepts to Clojure you won't have from there

15:45 blrm: amackera: 4clojure.com and the clojure-koans github repo are good, but they don't teach the concepts very well

15:46 nDuff: amackera: ...particularly around being a functional language with immutible data types and transactional memory.

15:46 amackera: ...knowing Scheme will help, but it might not help as much as you expect.

15:46 amackera: roger that, i expected as much

15:46 lynaghk: frozenlock: I think cemerick is bringing his podcast equipment up to Clojure/West and to a mini-conference the following week, so we should be able to get a lot of Clojure-related rants on tape

15:47 amackera: and any suggestions for vim + clojure development? some googling indicates that vimclojure is no longer the hotness in this regard

15:47 nDuff: amackera: Personally, I use vim for everything _but_ Clojure; the tools available for emacs are just that good.

15:47 frozenlock: lynaghk: Nice! I might 'almost' feel like I'm there :p

15:48 amackera: nDuff: aw :( it's been years since i touched emacs

15:49 blrm: amackera: vim-foreplay picked up the torch from vimclojure.

15:49 amackera: perfect

15:53 thank you!

15:55 ivan: barely-audible bootlegs from Clojure/West would be much appreciated

16:01 supersym: haha

16:11 finishingmove: has anyone worked with LightTable? I was writing something in an instarepl tab

16:12 how would i save that in a file now?

16:12 bbloom: finishingmove: you summon ibdknox

16:12 nDuff: finishingmove: "save file as..." works in the instarepl same as anywhere else.

16:13 finishingmove: Uncaught TypeError: Cannot read property 'offsetLeft' of

16:13 ...AppData/Local/Temp/nw6452_19414/deploy/js/bootstrap.js:20110

16:13 nDuff: Are you updated to 0.3.8?

16:13 finishingmove: i just downloaded LightTable 10 mins ago

16:13 nDuff: finishingmove: Right, and it upgrades itself after you run it.

16:14 finishingmove: The download is 0.3.0

16:14 finishingmove: ...you have to restart it to get to whatever's current.

16:14 finishingmove: go to "Light table version" in the menu, and see what you have.

16:14 finishingmove: it says version 0.3.8, binary 0.4.2

16:14 nDuff: Ahh. That's current, then.

16:14 *shrug*. Works for me, so talk to ibdknox.

16:14 finishingmove: but i didn't restart it so far

16:14 nDuff: (or report to the mailing list)

16:15 finishingmove: i will try to restart it now

16:15 nDuff: If it says that, you really do have the new one.

16:15 finishingmove: but i don't want to lose what i wrote

16:15 nDuff: ...so restarting shouldn't be necessary.

16:15 finishingmove: so how would i save the file ?

16:15 what format?

16:15 nDuff: Hmm? The conventional extension is .clj

16:15 finishingmove: like i said, i tried saving the contents of my instarepl as a .clj

16:15 but i can't open it

16:15 nDuff: Right, and if it doesn't work, there's a bug, and you should report it.

16:15 finishingmove: :\

16:15 k

16:15 nDuff: In the meantime, copy it to the clipboard or something.

16:16 finishingmove: re: bug reporting, https://groups.google.com/forum/?fromgroups#!forum/light-table-discussion

16:16 finishingmove: I've not had much luck with #lighttable on IRC, whereas things mentioned there tend to get fixed quickly.

16:16 finishingmove: ok thanks

16:16 nDuff: finishingmove: ...btw, I suspect that said bug is Windows-specific, since I can't repro it here (Linux).

16:17 finishingmove: could be

16:17 it's actually trying to

16:17 file:///

16:19 vurma: Is there a way to make a function call not be printed in repl?

16:20 nDuff: vurma: you mean have the value it returns not be printed?

16:20 vurma: (do (your-call) nil)

16:20 vurma: ...that way the nil is what gets returned.

16:20 vurma: Even if i juse java.io.FileReader to read it?

16:20 nDuff: vurma: might I ask why?

16:20 Huh?

16:20 vurma: I tried that ^^

16:21 nDuff: You can't have a FileReader read a function call

16:21 so I don't understand the question.

16:21 borkdude: nobody remembers a comparison example on the web between clojure, haskell, python, java in which three parallel things are calculated and then combined?

16:22 nDuff: (...now, you could eval something that a FileReader reads, but why you'd be doing that in a REPL and trying to hide the result...)

16:22 vurma: Im sure im using the wrong approach here, but what im doing is first (def dataslurp (slurp "my-file.db")), then (def datamap (java.io.FileReader. dataslurp))

16:22 for example

16:22 Well im just messing around with some functions and wanted to work with that in the repl, thats why.

16:23 nDuff: vurma: Okay, so you're creating two vars.

16:23 vurma: Would make little sense otherwise, yes.

16:23 Yep

16:23 nDuff: vurma: ...now, what do you _want_ to do, and how does that differ?

16:24 vurma: What i would like to do is not to have the contents of my-file.db printed in the repl when i define datamap, as shown above.

16:24 Its kind of a large file.

16:25 nDuff: vurma: err. It shouldn't be printing that at all. It should be printing something like #'user/datamap

16:25 vurma: Thats what i was thinking when i wrote it, but apparently not.

16:25 nDuff: vurma: or, rather, it would if that were a valid constructor for FileReader

16:25 vurma: ...which it isn't.

16:26 vurma: You're seeing the file's contents printed as part of an exception, not as part of output.

16:26 vurma: Got it. Yes, that makes sence.

16:26 sense*

16:26 nDuff: it'd just be (FileReader. "my-file.db")

16:26 ...if you really needed a FileReader for some reason.

16:28 vurma: nDuff, i will explore more optimal ways of doing this.

16:28 Thanks a lot for the input! :3

16:43 frozenlock: YArrrr! "IllegalAccessError app-handler does not exist clojure.core/refer (core.clj:3849)"

16:43 I know it exists, I can see it in the source!!! https://github.com/noir-clojure/lib-noir/blob/master/src/noir/util/middleware.clj#L84

16:44 Raynes: Glenjamin: Dunno if anyone mentioned it, but luminus is a good way to start.

16:44 $google luminusweb

16:44 lazybot: [Luminus - A Clojure Web Framework] http://www.luminusweb.net/

16:45 Raynes: arrdem: Morning pardner.

16:45 nDuff: Mmm; shiny.

16:46 arrdem: Raynes: 'sup?

16:47 Raynes: arrdem: Apartment hunting. Super fun (not).

16:47 arrdem: feh

16:47 I have yet to have the pleasure

16:47 and get one that is

16:53 dnolen: new miniKanren / core.logic google group http://groups.google.com/forum/?fromgroups=#!forum/minikanren

16:53 * frozenlock Obliterates any possible problem with a well placed `lein clean'

17:27 ubun22: how do i restructure a map with namespace qualified keys

17:27 i mean destructure

17:28 bbloom: ubun22: you don't

17:28 ubun22: its a limitation?

17:28 amalloy: bbloom: what? of course you can

17:28 ubun22: or a design choice

17:29 bbloom: amalloy: then i have the same question as ubun22

17:29 hiredman: you just can't use the shortcut destructuring, which is what most people use all the time

17:29 amalloy: &(let [{the-value :foo/bar} {:foo/bar 123}] the-value)

17:29 lazybot: ⇒ 123

17:29 ubun22: ok so no :keys shortcut

17:30 amalloy: you can destructure maps that have keys of any sort at all

17:30 hiredman: same thing if you want to do destructuring in nested maps

17:30 bbloom: amalloy: ah, interesting. i had no idea that existed

17:30 amalloy: i've never seen it (or recall seeing it) in any other code i've read

17:30 hiredman: ~destructuring

17:30 clojurebot: destructuring is http://clojure.org/special_forms#let

17:30 amalloy: bbloom: try macroexpanding a :keys let-clause

17:30 well, i guess that's no good

17:30 try reading hiredman's link :)

17:31 hiredman: fuh, looks like the website changed

17:31 clojurebot: forget destructuring | is | http://clojure.org/special_forms#let

17:31 clojurebot: I forgot that destructuring is http://clojure.org/special_forms#let

17:31 hiredman: ~destructuring

17:31 clojurebot: Huh?

17:32 hiredman: clojurebot: destructuring is http://clojure.org/special_forms#binding-forms

17:32 clojurebot: Ack. Ack.

17:32 hiredman: ~destructuring

17:32 clojurebot: destructuring is http://clojure.org/special_forms#binding-forms

17:32 ubun22: ,(let [{:keys [item/name]} {:item/name :foo}] item/name)

17:32 clojurebot: #<CompilerException java.lang.RuntimeException: Can't let qualified name: item/name, compiling:(NO_SOURCE_PATH:0:0)>

17:34 bbloom: amalloy: thanks

17:34 hiredman: ,(let [a-a 1 a_a 2] a-a)

17:34 clojurebot: 1

17:34 hiredman: huh

17:34 must be fixed in 1.5

17:35 joegallo: how nice for 1.5!

17:36 amalloy: haha gross

17:36 Raynes: amalloy: See why we should use 1.5? :p

17:58 jeremyheiler: hiredman, What were you expecting?

17:58 cemerick: lynaghk: I have podcasting equipment? :-P

18:08 keeds: clear

18:08 auser: wrong window keeds

18:09 arrdem: anyone here using the Mono build of Clojure care to comment on the unility of CLJ sans JVM/Java ecosystem support?

18:10 technomancy: it works on mono now?

18:11 arrdem: is the .net port not mono-compat?

18:11 technomancy: last I heard it required Windows

18:11 I guess that was a long time ago

18:12 finishingmove: how would i write the equivalent of return "str1"+"str2"; (javascript example of string concatenation) in a Clojure function?

18:12 brehaut: ,(str "str1" "str2")

18:12 arrdem: ,(str "a" "b")

18:12 clojurebot: "str1str2"

18:12 "ab"

18:12 arrdem: HAH

18:13 * arrdem high fives brehaut

18:13 brehaut: \o

18:13 finishingmove: hah cool thanks :D

18:15 hm, but that returns the hardcoded values

18:15 or not

18:15 it's working :)

18:18 brehaut: fwiw, str is smarter than + in JS; it uses a StringBuilder under the hood for concatenation so you dont need to do the build array, array.join trick

18:18 ivan: didn't Closure Library's StringBuilder revert to doing + without an array and join?

18:19 brehaut: ive never looked at clojurescript

18:21 dnolen: ivan: non-higher usage of str actually compiles to Array.join("") in CLJS

18:23 arrdem: so an IRL buddy of mine and I keep throwing around this idea for a Lisp micro-runtime OS

18:24 would there be value in giving said lisp Clojure's semantics without JVM or Mono support?

18:24 technomancy: arrdem: persistent data structures without a world-class GC would be really slow

18:24 ivan: dnolen: heh, interesting

18:25 technomancy: arrdem: of course, it's better to be slow and correct than fast and wrong

18:25 but building a good runtime is way more difficult than building a language

18:25 arrdem: yeah...

18:25 no expectations of speed

18:27 ivan: man Google Code's code browser is terrible, it won't even give you all of the folders in a folder

18:34 bbloom: ivan: google's internal processes are so formalized and streamlined that anyone who would be interested in working on any kind of code management system would rather work on internal tools than on the public google code

18:38 ieure: technomancy, Is there any way to make lein deploy an artifact without signing it?

18:38 technomancy: sure; :sign-releases false

18:38 ieure: Awesome, thanks.

18:39 technomancy: need to make that more obvious probably

18:39 ieure: technomancy, Yeah, it's not in sample.project.clj.

18:40 ivan: wondering why lein cljsbuild wasn't building anything... named my file .js instead of .cljs :(

18:49 being the kind of fool who learned about the JVM and -XX:+PrintCompilation after Closure Compiler, the JVM will always be a really neat version of advanced_optimizations for me

18:56 borkdude: did someone read this book? http://pragprog.com/book/mbfpp/functional-programming-patterns-in-scala-and-clojure - seems interesting

18:57 ivan: ClojureScript's way of macros and function sharing the same name is really cool

18:57 which makes ClojureScript macros sort of like Clojure special forms, though no doubt this analogy sucks in some way

18:58 borkdude: this seems interesting for my target audience: students who know OO and want to try clojure http://pragprog.com/book/mbfpp/functional-programming-patterns-in-scala-and-clojure

19:02 keeds: borkdude, there is also: https://leanpub.com/fp-oo

19:03 borkdude: keeds I also have that one

19:09 ivan: interesting how :optimizations :advanced actually changes what ClojureScript emits

19:15 tyler__: can i vote for this to be in core? https://github.com/rplevy/swiss-arrows heh

19:16 i need more parallel diamond fishing rod in my life

19:16 * bbloom hears zelda theme in his head

19:16 tyler__: heh

19:19 rlb: Is there a way to get the root tag when using xml->? (i.e. if you have an xml fragment -- doesn't start with <xml></xml>)?

19:20 Getting the root attributes is fairly straightforward.

19:21 Also, if you're using xml->, is there a way to stop at a given depth, and say "give me everything below here" as a clojure.xml style map (as you would receive from parse)?

19:22 finishingmove: does anyone know what's the default font LightTable uses? I really like it..

19:24 bbloom: finishingmove: try whatthefont.com

19:24 finishingmove: bbloom, oh cool. didn't know about that

19:27 NeedMoreDesu: What is the way to do let* ?

19:27 bbloom: finishingmove: looks like Riccia Light from Hubert Jocham Type Riccia

19:27 NeedMoreDesu: Ah, sorry.

19:27 bbloom: finishingmove: http://www.myfonts.com/fonts/hubertjocham/riccia/light/

19:37 pandeiro: are people doing clojurescript coding in lighttable? is it possible to build dom and things inside the lighttable node/webkit instance itself?

19:42 finishingmove: bbloom it doesn't look like the Riccia to me, tbh

19:42 can't test it since it's a commercial font i don't own

19:42 bbloom: finishingmove: *shrug* i'm bad at those font identification games

19:42 finishingmove: ofc, np

19:43 the website itself is kind of bad, at least from a programmer perspective

19:43 i mean you'd think they'd at least differentiate between monospaced fonts

19:43 but they don't have that category at all

19:43 ._.

19:44 pandeiro: riccia is very beautiful

19:44 (the aquatic plant i mean)

19:44 never heard of the font

19:44 bbloom: finishingmove: it's presumably for designers

19:57 squidz: Im having a problem using lazy sequences. I am passing a lazy sequence to my compojure handler, but it is still not evaluated. If for example I wanted a string representation of the sequence. Am I doing something wrong?

19:58 * nDuff eyes exoref (having been recently disappointed by Avout)

20:00 squidz: I tried calling doseq/doall/dorun on it but the lazy sequence still isnt being realized

20:01 qbg: Is the Datomic support in core.logic documented anywhere?

20:02 brehaut: squidz: what do you mean you are passing it to your compojure handler?

20:02 squidz: compojure handlers are just ring handlers; they take requests and return responses

20:02 squidz: do you mean you are wantiung the seq to be the :body of the response?

20:03 squidz: I have something like (GET "/r" [] (generate-page)) in the generate-page function I am passing a lazy sequence to clostache to use

20:04 and I dont know how to get the actual values from that lazy sequence

20:04 brehaut: that sounds more like a clostache problem than compojure

20:04 amalloy: hiredman: what's the syntax for teaching clojurebot to use <reply> again? i'm afraid if i experiment with it i'll teach him something i can't unteach

20:05 brehaut: key is <reply>value or phrase

20:05 (at least, thats what i have pinned behind my monitor)

20:05 squidz: brehaut: okay, so then is there no way to force evaluation of a lazy seq?

20:06 brehaut: squidz: of course there are. but it sounds liek something else is gone arwy. i think you'll need to paste up more than that snippet of code to get an answer

20:06 squidz: okay ill do that

20:08 Intensity: Hi. I'm wondering: apart from using transients, are there any other key ideas for efficiency out there to build a multidimensional hash map from a seq input? For example, suppose I have a list of strings and I want to put each word into a hash indexed by its first letter or first two letters.

20:09 squidz: brehaut: okay here are some snippets of what I got https://www.refheap.com/paste/12520

20:09 finishingmove: bbloom: it was Inconsolata

20:10 hiredman: yeah, what brehaut said

20:11 brehaut: squidz: you arent returning a response

20:12 squidz: https://www.refheap.com/paste/12520#L-21

20:12 squidz: how can I return the string representation of transitions-seq

20:12 brehaut: squidz: https://github.com/ring-clojure/ring/blob/master/SPEC#L93-L120

20:12 amalloy: ~helpme

20:12 clojurebot: A bug report (or other request for help) has three parts: What you did; what you expected to happen; what happened instead. If any of those three are missing, it's awfully hard to help you.

20:13 brehaut: squidz: https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/util/response.clj#L36-L42

20:13 squidz: which is to say, instead of (apply str …) you can call (ring.util.response/response …)

20:15 squidz: brehaut: the sequence still isnt being printed out

20:16 brehaut: squidz: either ids is nil or has a length of zero then. you are into the wilds of your own code at this point though

20:16 squidz: okay ill look into it again

20:16 brehaut: squidz: test your handlers from the repl. its trivial and makes life much easier

20:17 squidz: once you have sorted out this bug, your next task is to go and learn a) what ring is and b) how compojure relates to ring

20:17 squidz: i do sometimes but the output is sometimes too much for my emacs and id sometimes rather see the rendered html

20:19 Also, I was passing content of my sequence inside hiccups (html5 [:body ... which was giving ring what it wanted

20:19 I guess it is just my own bug of the sequence being emtpy

20:27 brehaut: okay, it seems that my function that was to be called by rings :init option in my project.clj wasnt being called. That function populates an in-memory DB which is why my results were just empty

21:08 yedi: in typical mvc, the controller is the only thing manipulating state righ?

21:13 hyPiRion: yedi: yes

22:04 ubun22: how do i retrieve a maximum of 10 records from datomic?

22:11 tyler__: would the statement "edn is turing complete" be true?

22:11 ubun22: i believe queries are lazy loaded, so (take 100 query) ?

22:11 not positive though

22:12 TimMc: tyler__: No.

22:12 xeqi: hmm, does edn include data readers?

22:12 hiredman: yes

22:12 tyler__: TimMc: to my statement or my question?

22:12 TimMc: tyler__: To your question.

22:23 dobladez: So, Google Reader will be shut down July 1st... Is anybody here using https://github.com/shenfeng/rssminer ? (it's Clojure)

22:29 tyler__: dobladez: a buddy of mine entertained the thought of making a SaaS rss reader in 48 hrs and charging 5 bucks a month

22:32 ivan: heh heh 48 hours

22:34 scottj: tyler__: why wouldn't people just use newsblur, a saas rss reader that's been developed for years and costs 1 buck a month (for premium account)

22:34 brehaut: make a feed syncing service and sell it to everyone rushing to make new reader apps in the wake

22:37 finishingmove: what does this represent

22:37 :something

22:37 ?

22:37 (i'm new)

22:37 brehaut: finishingmove: it represents :something

22:37 its a keyword

22:37 igorw: I'm writing an implementation of edn, is there a test suite that I can run against somewhere?

22:38 finishingmove: so what is the difference between :something and something ?

22:38 brehaut: something is a symbol

22:38 symbols refer to something else

22:39 keywords always refer to themselves

22:39 keyworlds also happen to implement IFn so they can be used as functions of maps

22:39 http://clojure.org/data_structures#Data%20Structures-Keywords

22:41 xeqi: igorw: you might be able to port https://github.com/relevance/edn-ruby/blob/master/spec/edn_spec.rb

22:43 bbloom: brehaut: symbols implement IFN too

22:43 ,('foo '{foo 1})

22:43 clojurebot: 1

22:43 brehaut: bbloom: huh.

22:43 igorw: xeqi: that suite seems rather poor, my own is already more advanced at this point. that's why I was hoping for something more generic, that I can at least read, write back and compare.

22:44 brehaut: bbloom: how long has tht been the case?

22:44 bbloom: as long as i've been using clojure...

22:44 brehaut: finishingmove: keywords are guarenteed to be unique, so identical? works & is fast. however, this means that symbols can have meta data, but keywords cannot

22:44 brehaut: its not exactly surprising given keywords are kinda special symbols

22:44 tyler__: what *is* an IFN? i see it all the time but haven't quite groked it fully yet

22:45 i just assumed it was a function

22:45 bbloom: tyler__: Fn is for functions, IFn is for things that are callable

22:45 brehaut: IFn is the interface you implement to make a type callable

22:45 tyler__: ah

22:45 bbloom: ,(map (juxt fn? ifn?) [inc :inc])

22:45 clojurebot: ([true true] [false true])

22:46 tyler__: so keywords are ifn but not fn

22:46 if i read that right

22:46 bbloom: tyler__: yes

22:47 tyler__: what does clojure "do" when you call a symbol?

22:47 bbloom: tyler__: Fn is just a marker interface (protocol in CLJS), IFn is the real interface that might as well be called ICallable

22:47 tyler__: the same thing it does when you call anything: execute the .invoke method of the IFn interface

22:47 tyler__: whats the "i" stand for?

22:47 bbloom: tyler__: Interface (or protocol, lol)

22:48 tyler__: bbloom: whats in the invoke method of a symbol?

22:48 bbloom: tyler__: don't be shy: read the source! https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Symbol.java#L126-L132

22:48 tyler__: omg

22:48 * tyler__ wets himself

22:48 tyler__: im so scared ;)

22:49 brehaut: the source for clojure is pretty reasonable (except the whitesmith formating style ;)

22:49 bbloom: tyler__: clojure's source is quite aprochable, if a bit... um... non-idiomatic java

22:49 brehaut: lol oh yeah, :set nolist

22:49 brehaut: :set nolist sooo hard

22:49 tyler__: oh wow

22:49 brehaut: bbloom: ?

22:49 tyler__: that is some clean code

22:50 bbloom: brehaut: vim-ism for disable showing of whitespace

22:50 cgag: note that the .invoke method gets called when you do ('foo <args>) not (foo args)

22:50 brehaut: aha

22:50 tyler__: i have a feeling its only non-idomatic java because theres not enough clojure people writing java ;)

22:51 brehaut: bbloom: so symbols got invoke in june of 2008, so i have no excuse other than perhaps clojure.org was still out of date in october of 2008

22:51 bbloom: heh

22:53 tyler__: not sure what RT is assuming its in java.io.Serializable or java.io.ObjectStreamException, my java-fu is kinda weak

22:53 bbloom: tyler__: the first thing you need to know about non-IDE based java-fu is that class names match file names

22:53 tyler__: ah

22:53 bbloom: tyler__: go to github, press "t" to open the fuzzy finder, and type "rt.java"

22:54 brehaut: RT = Run Time

22:54 bbloom: brehaut: entertainingly, RT.java does not mention that

22:55 brehaut: huh

22:55 clojure's java code is not exactly overflowing with comments :P

22:55 (except of course commented out code)

22:55 bbloom: lol

22:56 clojure's code base and popularity has jointly reminded me of the value of GETTING SHIT DONE

22:56 brehaut: haha

22:56 bbloom: it's not BAD code

22:56 it's just GOOD ENOUGH code

22:56 brehaut: certainly

22:57 its also surprisingly approachable

22:57 cgag: what keeps it from being good code?

22:57 bbloom: it's only not really approachable in a few parts that only really exist only in the code generation phase

22:57 brehaut: cgag: http://this-plt-life.tumblr.com/post/44333853864/when-i-look-at-a-pls-implementation

22:58 bbloom: cgag: i feel like good code at least has consistent whitespace lol

22:58 tyler__: ,('foo ["bar" 'foo])

22:58 clojurebot: nil

22:58 tyler__: meh

22:58 brehaut: tyler__: vectors have int keys

22:58 bbloom: tyler__: ##(1 ["bar" 'foo])

22:58 lazybot: java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn

22:58 bbloom: tyler__: ##(["bar" 'foo] 1)

22:58 lazybot: ⇒ foo

22:58 tyler__: ,('0 ["bar" "foo"])

22:59 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>

22:59 tyler__: ah '0 isn't a symbol

22:59 is that a correct statement?

22:59 brehaut: correct

22:59 bbloom: ,(symbol? 0)

22:59 clojurebot: false

23:00 bbloom: ,(= 'foo ''foo)

23:00 clojurebot: false

23:00 brehaut: tyler__: its a quoted long

23:00 bbloom: ,(= '0 ''0)

23:00 clojurebot: false

23:00 bbloom: ,(= 0 '0)

23:00 clojurebot: true

23:00 bbloom: tyler__: it's subtle :-) see ^

23:00 tyler__: i still haven't really grokked what the difference is between quoted things and unquoted things

23:00 or double quoted things heh

23:00 don't even think ive seen that before

23:01 jeremyheiler: ,'0

23:01 clojurebot: 0

23:01 jeremyheiler: ,''0

23:01 clojurebot: (quote 0)

23:01 jeremyheiler: heh

23:01 bbloom: ,'''''''''''''''0

23:01 clojurebot: (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote #))))))))))

23:01 jeremyheiler: ahhh

23:01 bbloom: ,'''''0

23:01 clojurebot: (quote (quote (quote (quote 0))))

23:01 brehaut: tyler__: quoted things are only really useful for lists and symbols (or other collectiosn containing lists or symbols)

23:01 tyler__: when you want the list or the symbol itself rather than the value of the expression the list represents or the thing the symbol refers to

23:02 bbloom: tyler__: in the lisps of yore, quoted things were symbols or trees made out of lists and symbols

23:02 tyler__: i thought they were used to escape stuff

23:02 like in datomics query syntax

23:02 bbloom: tyler__: now they are symbols or numbers or strings or integers or some other primtives.... or trees of those plus composites like lists, vectors, maps, etc

23:02 tyler__: '[:find ?foo :where [?e :bar ?foo]]

23:02 bbloom: tyler__: quoting basically says "disable evaluation, treat the following as data"

23:02 tyler__: like a macro?

23:02 bbloom: no

23:02 tyler__: or bad analogy?

23:02 ok

23:03 brehaut: tyler__: so datomic wants the symbols ?foo and ?e rahter than the value they may point refer to

23:03 bbloom: tyler__: well maybe....

23:03 tyler__: macros are functions that quote their arguments

23:03 tyler__: and also return quoted values that expand as if unquoted

23:04 tyler__: so macros use quotes *because* of their ability to disable evalution and treat as data?

23:04 danneu: tyler__: (1 2) will give you error "cannot cast 1 to function" because clojure is trying to expand 1 as though it's a symbol. so '(1 2) is saying not to evaluate it. you're 'escaping it' from evaluation.

23:05 tyler__: danneu: thnx

23:06 cgag: i've been to chicago, i know how to spell "chicago"

23:07 yunfan: hi,guys, i want you to recomment a rss parser for me, since GR would be shutdown sonner and i am a heavy user of them, i need to make my own

23:07 tyler__: so does `[]` cause evalution? still haven't grokked what gets evaluted yet

23:07 yunfan: blurnews

23:07 bbloom: tyler__: everything is evaluated except forms marked by ' and `

23:07 tyler__: newsblur rather

23:07 yunfan: tyler__: what is blurnews ? an alternative service?

23:07 tyler__: damn dyslexia

23:08 bbloom: tyler__: you can think of [1 2 3] as (vector 1 2 3)

23:08 tyler__: yunfan: yeah its kinda slammed right now though because everyone is going there since google reader is closing

23:08 bbloom: aaaaaaaaah lightbulb

23:09 yunfan: tyler__: is it just yet another GR or it has some enhancement?

23:09 danneu: ,(= [] (vector))

23:09 clojurebot: true

23:09 tyler__: yunfan: not really sure i don't really use it, its just what everyone is talking about

23:10 yunfan: tyler__: ok ,i will have a try, but GR really make me a lesson, i need to roll my own

23:11 back to my question, didnt there a rss parser for cloujure?

23:11 tyler__: https://github.com/scsibug/feedparser-clj

23:11 cgag: maybe rssminer?

23:11 tyler__: not sure if thats good

23:11 first result googling rss clojure

23:11 heh

23:12 danneu: clojure is making it hard to focus at my ruby dayjob

23:13 tyler__: i personally like a vanilla xml parser but thats just me

23:13 yunfan: well i need really efficient one, i have built a rss spider for my ex-company using python, the library is toooo slow

23:13 tyler__: danneu: i started a movement to convert our ruby code to clojure ;)

23:13 ToxicFrog: I'm starting to get my feet wet with Android + Clojure, hoping I can come up with a fun Clojure project for my 20% time.

23:13 tyler__: ToxicFrog: ive been thinking about attempting that

23:13 ToxicFrog: Based on my experimentation, though, I'm not sure Android meets the "fun" requirement~

23:13 yunfan: danneu: me too, when i wrote my python code, i just think if could be written shortly in cloujure

23:14 ToxicFrog: In any case, though, I'll be writing up the results once I actually get stuff running.

23:14 tyler__: ToxicFrog: i would read it

23:14 :)

23:14 ToxicFrog: I'll post it in here when it's done, then!

23:14 danneu: yunfan: yeah, 'unnecessary complexity' describes a lot of the codebases i work in.

23:15 tyler__: OO has a way of turns things to shite. not sure if jaded or just truth

23:16 turning*

23:16 arrdem: I mean... OO can be done right

23:16 danneu: i don't think it's OO

23:16 arrdem: it just doesn't largely lead to code reuse

23:16 tyler__: "can be" heh

23:16 arrdem: which was its main goal

23:16 tyler__: ironic

23:16 arrdem: I mean you can model yourself into a corner happily

23:17 then realize your data is too fragmented to do anything

23:17 the trick is devising the data model that suits your problem, which may involve an object hierarchy

23:17 * arrdem realizes he is monologuing and stops

23:18 danneu: nah, i'm reading

23:18 tyler__: arrdem: devising the data model *is* really the tricky part

23:18 arrdem: okay so tell me I'm wrong or something...

23:18 tyler__: ^^ that.

23:19 which is why I like Clojure's "map" pseudotypes

23:19 danneu: i think OO is hard. OO design is not trivial. what objects should i make? what should i put in them? it's too easy to get stuck designing something that should just be an array of hashmaps. i like clojure because it forces immutability and simplicity.

23:19 arrdem: and MongoDB

23:19 tyler__: even in clojure with datomic you still have to figure out how to model your data so it all fits together

23:20 although its easier

23:20 yunfan: i like py's list comprehension, and i like to use the sideeffect of it, but the community avoid this

23:20 brehaut: theres no silver bullet, news at 11

23:20 tyler__: lol

23:20 arrdem: so you (ab)use mongo until the dust settles, and then transition.

23:20 brehaut: lemme dig that essay back out..

23:21 brehaut: SO IT IS WRITTEN https://en.wikipedia.org/wiki/No_Silver_Bullet

23:21 tyler__: danneu: "it's too easy to get stuck designing something that should just be an array of hashmaps" man i so feel you there. especially with coworkers who want to create classes for *everything*

23:22 arrdem: ~bullet

23:22 clojurebot: magic bullet is http://www.infomercialcentral.com/store/files/images/d_77.jpg

23:22 arrdem: wut

23:22 brehaut: ~botsnack

23:22 clojurebot: thanks; that was delicious. (nom nom nom)

23:22 tyler__: https://en.wikipedia.org/wiki/No_Silver_Bullet was written before the creation of clojure

23:23 he didn't know any better

23:23 ;)

23:23 arrdem: haha I think he's still right...

23:23 tyler__: "Brooks makes a distinction between accidental complexity and essential complexity,"

23:23 arrdem: Clojure solves a lot of issues but doesn't fix the fundimental one that humans suck at software engineering

23:23 tyler__: i think rich addresses that in "simple made easy"

23:24 arrdem: tyler__: lunk?

23:24 tyler__: http://www.infoq.com/presentations/Simple-Made-Easy

23:25 bbloom: arrdem: we suck at more than just software engineering: we suck at both generalization AND specialization :-)

23:25 tyler__: lol

23:26 arrdem: haha

23:26 (inc bbloom )

23:26 lazybot: ⇒ 1

23:26 arrdem: wat

23:26 bbloom: arrdem: apparently string/trim error, try again :-P

23:26 arrdem: ,(doseq [x (range 3)] (println "(inc bbloom)"))

23:26 clojurebot: (inc bbloom)\n(inc bbloom)\n(inc bbloom)\n

23:27 arrdem: damnit

23:27 always wanted to try that one

23:27 (inc bbloom)

23:27 lazybot: ⇒ 7

23:27 arrdem: that's retarded

23:27 bbloom: hurray! still prime!

23:27 arrdem: someone fix the lazy as shit bot

23:27 brehaut: arrdem: patches are accepted

23:27 yunfan: 62;9;cnewsblur seems down when i friends checking it

23:28 arrdem: brehaut: I didn't say I would...

23:28 XP

23:28 yunfan: huge user are comming i think

23:28 bbloom: yunfan: Google's "not enough interest/traction to justify" is a startups "OMG THE SERVERS ARE ON FIRE"

23:29 danneu: arrdem: re "humans sucks at software engineering" <-- which is why i think it's smart to reduce the paths for making code unreadable to other developers.

23:29 yunfan: bbloom: yes, i used want to roll my own enhancement for GR, but since it could use those years, i just give up, now , it cut down my backway

23:29 arrdem: oh. my. god. M-x google-this

23:30 emacs... you have outdone yourself

23:30 ivan: do Google employees not use Reader every day?

23:30 bbloom: ivan: i can only assume the internal uproar is hilarious

23:32 ivan: hopefully I will not have to spend a lot of time backing up all of their feed archives

23:36 technomancy: isn't it more "we want people using G+" rather than "not enough interest"?

23:39 TimMc: technomancy: I feel like there's a Hanlon's Razor variant in here somewhere.

23:39 "Assume marketing rather than incompetence", perhaps?

23:39 ivan: http://googlesystem.blogspot.com/2012/12/google-reader-constantly-on-chopping.html

23:41 brehaut: TimMc: i like it

23:41 TimMc: It can be very hard to tell the difference, after all.

23:43 danneu: Is there a way to get 'lein repl' to autorequire some namespaces?

23:44 bbloom: danneu: see sample.clj in the lein codebase, you can add code or files to be evaled in your profile

23:47 tyler__: the lein samples are really nice and fleshed out

23:59 arrdem: danneu: okay great. now we have Lisp and our incompatible languages are only regular transforms away. still unreadable.

Logging service provided by n01se.net