#clojure log - Jan 14 2012

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

0:00 aamar: Does anyone know a handy API for simple 2D graphics, similar to the HTML5 canvas API?

0:01 I need to render some simple graphics from clojure or js, but I'd like to avoid running a headless browser on my server.

0:04 TimMc: Hmm, someone was asking about something like this recently. Let me check my logs.

0:09 aamar: There's nothing conclusive, but you might look to see if Swing or AWT provides headless graphics so you can render on a canvas.

0:09 Might be a good use-case for CLJS.

0:10 yoklov: use graphics

0:10 ibdknox: pinot has a simple canvas API

0:10 yoklov: swing/awt graphics

0:10 it actually works quite well

0:10 and is way faster than most other things

0:11 aamar: Yeah, I'm using CLJS currently to render js to canvas on the front end. Would like to fallback to pre-rendered pngs in some cases.

0:11 TimMc, yoklov, ibdknox: thanks for the suggestions!

0:42 dgrnbrg_: I have a style guide question about closure

0:42 if i'm writing a library, and I want to have a function to concatenate bitstrings

0:42 should I make concat polymorphic/a multimethod, or should I make a new function, like bit-concat?

0:52 yoklov: yessssss my code works

0:53 http://dl.dropbox.com/u/13069163/itsworking.png

0:53 and _NOW_ i am going to sleep for real this time

5:41 foodoo: Is there a reason to use (when) even if you don't have multiple then-clauses? Or should I use (if) in all cases?

6:02 thorwil: foodoo: (when) is for a single clause, where it's sole advantage over (if) is making that obvious

6:06 jowag: moreover, (when) implicitly wraps its body in do

6:07 foodoo: thorwil: So (when) is used to emphasize that here is no else-clause?

6:08 jowag: yes, if you have else clause, you cannot use when

6:09 or better, use (when) if your else clause is nil

6:13 xeno: xeno

8:53 kenanb: hi, http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html

8:53 i am trying to setup clojure using this

8:53 lazybot: The riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you.

8:53 kenanb: but i get errors at lein deps part

8:54 wow

8:54 cool bot answer

8:55 djh_: haha

9:00 bpr: i'm playing with clojurescript one. specifically, i'm looking at the one.sample.config and the list of files to watch. I am confused about the paths in this list. They are absolute, and also a file named "host_page" does not exist in the entire one repository. Are the strings in this list simply examples without necessarily pointing to real files?

9:00 specifically i'm talking about (:reload-clj one.sample.config/config)

10:19 zilti: I've written a login system - now my question is if it is safe? What I'm doing is I store a whirlpool hash of the user password. Is it a problem that I also use this same hash as the identification string I store in a cookie?

10:21 jowag: zilti: have you salted your hashes?

10:22 zilti: jowag: No... I don't know how to do that with the java whirlpool class I'm using.

10:23 jowag: than you should not public the hash in cookie.

10:23 zilti: there's a "digest" input, I guess that's something like salting?

10:24 jowag: dunno

10:26 raek: zilti: if you just want a password hash that just works, check out http://www.mindrot.org/projects/jBCrypt/

10:27 jowag: what raek said, and read this: http://codahale.com/how-to-safely-store-a-password/

10:28 raek: maybe it's better to use something else as the source of the identification string

10:29 jowag: I would generate session UID which I would send in a cookie, map it to hash and keep that mapping on the server

10:29 zilti: Hmm I see

10:36 raek: zilti: in case you decide to go with jBCrypt: There is a version in the maven repos [org.mindrot/jbcrypt "0.3m"] and in this version the class is org.mindrot.jbcrypt.BCrypt rather than just BCrypt

10:36 zilti: I found the maven version just seconds ago, thanks :)

10:36 How do I add a repo to leiningens project.clj?

10:37 raek: zilti: which repo? leiningen already knows about the maven central repo.

10:37 zilti: raek: Ah, ok, I thought it's in an another repo.

11:53 ashafa: hello

11:53 im tring to compile some cljs

11:54 i've got two files in a folder named core.cljs and utils.cljs

11:54 namespaced com.example.core and com.example.utils respectively

11:55 core.cljs requires com.example.utils

11:56 bpr: how do the strings in clojurescript one's (:reload-clj one.sample.config/config) vector map to files?

11:57 ashafa: when compiling im getting an error "ERROR: JSC_DUPLICATE_NAMESPACE_ERROR. namespace "com.example.utils" cannot be provided twice at <...out/com/example/utils.js>"

11:58 any ideas what I maight be doing wrong?

11:59 ibdknox: ashafa: you have a cljs file on your classpath as well as in the path of compilation

11:59 causing it to compile and evaluate twice

12:00 bpr: if viewed as pathnames they're absolute and don't map to any files on my system. if viewed as pathnames under the CLJSC_CP environment variable, there are no files named "host_page" or "reload" or "dev_server"

12:00 so, i'm confused about it

12:00 ashafa: ibdknox: that might be it... let me check

12:01 ibdknox: that's usually what causes that error :)

12:01 bpr: oop, well it seems to have an explicit .clj so nm my last comment

12:03 pfft s/explicit/implicit/

12:16 yoklov_: what happened to clojure contrib?

12:18 zilti: clojurebot: what happened to contrib?

12:18 clojurebot: Well... it's a long story: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

12:20 ashafa: ibdknox: Thanks. I think that was the problem. just have to figure out how to compile different folders with different options

12:28 TimMc: Anyone know any cool tricks for getting "break"- and "return"-like functionality in Clojure?

12:29 I'd like to be able to bail out of a function more easily.

12:29 I remember a cute trick with continuations in some Scheme, but that doesn't help here.

12:30 zilti: TimMc: There isn't such functionality because Clojure is intended to be used for functional programming

12:31 ibdknox: lol

12:31 zilti: TimMc: Just write smaller functions

12:31 TimMc: zilti: ...

12:31 ibdknox: zilti: I'm pretty sure he knows.

12:31 TimMc: you're doing it wrong, man :p

12:31 TimMc: haha

12:31 zilti: Oh. Yeah. Sorry, I didn't look at the nick lol

12:32 Anyway, I couldn't imagine a use case for "break" or "return" in Clojure

12:32 ibdknox: I've wanted it a few times

12:32 sometimes it's nice if at the top of a function you can escape on some simple condition without having to nest

12:33 TimMc: zilti: It's annoying to have a big stack of ifs in my -main function that check for error conditions and bail with an exit code.

12:34 ibdknox: Right now I'm reimplementing with a cond.

12:34 ibdknox: TimMc: that was usually what I did :/

12:35 TimMc: I tried to use a loop/recur, but I forgot that recur has to be in tail position even there. I'm not actually sure why, but I just woke up...

12:36 I mean, I know why you can't do (+ 1 (recur ...))

12:36 but (loop [] (when ... (recur ...)) ...) seems fine to me.

12:36 tmciver: TimMc: have you tried out debugging using swank clojure? https://github.com/technomancy/swank-clojure

12:36 You can set break points

12:36 TimMc: tmciver: Not yet, I broke my .emacs trying that and restored from backup.

12:37 zilti: You can do something like (fn name [x] (when ... (name ...)) ...)

12:37 But that'll use stack space

12:37 tmciver: TimMc: it seems pretty good though I haven't used it *a lot*

12:37 TimMc: I really want to use CDT for the try-cljs stuff.

12:42 Ach, I'm an idiot. I'll just call System/exit.

12:42 tmciver: I need to use swank more for debugging and hit technomancy up with some questions because sometimes it doesn't seem to do the right thing for me (but it's probably just me)

12:43 TimMc: Somehow I'd gotten the impression that if -main returned a number, that would be the exit code -- but that's not true. >_<

12:44 raek: TimMc: yup. :-) main has return type void on the JVM.

12:45 TimMc: Yeah, I thought Clojure was doing something clever -- but there's not actually a wrapper around main.

12:45 Hmm, if I return something from -main, it gets printed. What's going on there?

12:46 raek: how do you invoke it? lein run? java -jar ....?

12:46 TimMc: Mmm, lein run.

12:46 OK, running the uberjar as java -jar, it is silent.

12:48 I guess gen-class is forcing -main to end with a void return.

12:51 Or... AOT produces an outer class with a proper main that calls -main and ignores the result. That's my best guess now.

12:51 raek: hrm https://github.com/flatland/classlojure/blob/master/src/classlojure/core.clj#L77

12:53 I'm pretty sure the generated main method looks something like "public static void main(String[] args) { ... apply -main ... }"

12:53 where the return value of -main is simply ignored

12:54 TimMc: Yeah, that's what the disassembled code is looking like, although I'm not good at reading the output of javap.

12:54 raek: TimMc: do you have the javap output in a gist?

12:54 * raek is interested but lazy...

12:55 TimMc: gimme a sec

12:59 It's going to be easier to make a repo.

13:01 raek: ok, you don't have to do that for me... :-)

13:02 chhildeb: Hi everyone.

13:03 I'm looking for a function that I presume just has another name in clojure than in traditional lisps, but I couldn't find it anywhere.

13:03 TimMc: raek: https://github.com/timmc/junk-drawer/tree/master/clj-decomp-main-return It was probably faster that pasting stuff into a gist with file names and everything.

13:04 chhildeb: It's normally called mapcan

13:04 alandipert: chhildeb, mapcat perhaps?

13:04 chhildeb: Does anyone know what clojure calls it?

13:04 alandipert: map + concatenate

13:05 TimMc: I should get a proper decompiler, not just the bytecode printer.

13:05 chhildeb: Well, that was fast.

13:05 Thanks.

13:05 Don't know why I didn't find that earlier.

13:06 alandipert: chhildeb, at the repl in 1.3, you can do things like (apropos 'map) to get a list of map-related functions in core

13:06 chhildeb: Ah very nice.

13:06 Thatt'l come in handy.

13:06 s/att/at

13:07 seeing as I'm currently translating a whole bunch of my sbcl stuff to clojure.

13:07 Thank you for the help.

13:08 alandipert: chhildeb, np, have fun

13:08 chhildeb: That sounded weird, sorry. Just transliterated German there.

13:10 TimMc: chhildeb: Sounded like normal English to me.

13:10 chhildeb: I thought "your help" would have been more idiomatic.

13:10 Always learning something new I guess ;).

13:11 alandipert: TimMc, raek, gen-class generates implementations for all methods specified including -main, then delegates to your code

13:12 TimMc: alandipert: *nod*

13:12 alandipert: TimMc, *wink*

13:14 TimMc: I see a ldc #14; areturn; in the output for $main, which I guess is putting the return value on the stack and returning it. I can't figure out the other .javap files yet, but once I realized that my -main wasn't getting called directly, I was a lot less confused.

13:15 Haha, sweet! http://java.decompiler.free.fr/?q=preview Instant .class decompiler, just drop your files on the page.

13:19 Far from perfect.

13:19 ...but hella better than .javap files in some parts.

13:21 chhildeb: Does anyone in here use counterclockwise? Or are you all into emacs?

13:23 I'm asking because I noticed that the lein-eclipse plugin has been left unattended since 1.0.0, which means it has quite a lot of outdated dependencies.

13:24 So I wrote a new one which works without any dependencies apart from clojure 1.2, 1.3 or 1.4

13:24 But I can't seem to get a hold of the guy in charge of the lein-eclipse clojars group.

13:28 TimMc: CCW is still maintained and used, I think. (Emacs is the majority editor, and I think vim comes in second.)

13:30 chhildeb: If the lein-eclipse maintainer doesn't respond, maybe just talk to the CCW folks.

13:31 chhildeb: TimMc, I'll try that, although I'm not really sure what they could do, seeing as lein-eclipse is a leiningen plugin that they don't seem to have anything to do with.

13:31 TimMc: or am I just wrong there?

13:31 TimMc: Oh, I assumed it was used by CCW.

13:31 chhildeb: Not to my knowledge.

13:32 Although that would be nice :D

13:32 TimMc: Right, I would just announce your new plugin on the Leiningen mailing list and add it to the Plugins page.

13:33 chhildeb: Just giving it another name, like lein-ccw? That might work, although it could seem impolite to the guy who made lein- eclipse.

13:34 I think I'll do that.

13:34 foodoo: I'm working on this 4clojure problem: https://www.4clojure.com/problem/132 My Code seems to work fine except for the last case http://pastebin.com/RqG6RRDu . For some reason, Clojure doesn't behave as lazily, as it should. Why is this code evaluated eagerly?

13:34 TimMc: chhildeb: How long ago did you contact the maintainer?

13:35 chhildeb: There was no contact data to be found in his files

13:35 nor on his clojars profile

13:35 just a name in the copyright license file

13:36 abrenk

13:36 on clojars.org

13:36 foodoo: oh, silly me. Got it

13:37 chhildeb: foodoo your link doesn't seem to work.

13:37 Oh found it.

13:37 TimMc: foodoo: What was the problem?

13:38 foodoo: TimMc: That code doesn't behave lazily

13:38 TimMc: But it needs to, because there are infinite fibbonacci numbers

13:38 chhildeb: foodoo did you find the problem?

13:39 foodoo: chhildeb: I've an idea, just give me a second. Then I'll report back

13:39 TimMc: foodoo: count!

13:39 foodoo: TimMc: good hint O.O

13:39 TimMc: &(doc nnext)

13:39 lazybot: ⇒ "([x]); Same as (next (next x))"

13:40 foodoo: TimMc: great. That would have been the next question. Your abilities are truly astonishing :)

13:40 * geoffeg_c downloads the peepcode clojure video

13:41 chhildeb: &(good-guy? :TimMc) ; => true

13:41 lazybot: java.lang.RuntimeException: Unable to resolve symbol: good-guy? in this context

13:41 chhildeb: This bot is broken.

13:42 Or is that function contrib?

13:42 TimMc: haha

13:42 There is $inc or something but it doesn't always work.

13:42 oh, wait

13:42 $karma TimMc

13:42 lazybot: TimMc has karma 2.

13:42 TimMc: OK, it's not broken today.

13:43 chhildeb: Ah. Good to know, thanks.

13:43 TimMc: Als, it randomly resets, probably to promote detachment.

13:43 chhildeb: That should inc your karma.

13:43 andrewvos: What's a nice simple web framework in clojure?

13:43 chhildeb: I didn't even know karma exists in here.

13:44 $karma chhildeb

13:44 lazybot: chhildeb has karma 0.

13:44 mdeboard: andrewvos: noir

13:44 andrewvos: mdeboard: Thanks

13:44 TimMc: $inc mdeboard ; this should do it...

13:44 lazybot: ⇒ 3

13:44 ibdknox: (inc TimMc)

13:44 lazybot: ⇒ 3

13:45 chhildeb: Ah.

13:45 (inc TimMc)

13:45 lazybot: ⇒ 4

13:45 TimMc: chhildeb: It's just a toy, unlike on Reddit, where it is srs bsns.

13:45 andrewvos: What testing framework does everyone use?

13:45 unit*

13:45 TimMc: andrewvos: clojure.test is the default, but midje gets good reviews

13:45 ibdknox: clojure.test or midje seem to be the standards

13:46 TimMc: sniped!

13:46 ibdknox: :p

13:46 andrewvos: hah

13:46 chhildeb: Still, it makes me want it simply for being there, so it seems to be effective.

13:46 andrewvos: Ok i've head a lot about midje will go with that

13:46 TimMc: ibdknox: My internet connection doesn't suck today.

13:46 ibdknox: haha a winner is you ;)

13:46 TimMc: When it gets really cold, the packets freeze in the wires or something.

13:47 ibdknox: lol

13:47 I hate it when that happens

13:47 andrewvos: Hmm I want to do a web project and wondering if I should be using cucumber

13:47 chhildeb: TimMc, do you use Clojure professionally?

13:48 TimMc: chhildeb: I'd like to. The place tmciver and I work is a Java shop, and we're both trying to wedge some clojure in there.

13:49 chhildeb: I could never hope to.

13:49 tmciver: tmciver: and I'm not even lucky enough to do Java :( C++ yuck!

13:49 foodoo: TimMc: Are people still too afraid of the parantheses at your place?

13:49 tmciver: oops to TimMc

13:49 chhildeb: We have too much legacy code in C.

13:49 So C is what I use.

13:50 TimMc: tmciver: Oh yeah, that's right -- your side doesn't have as much Java. There's a bunch of C and C++ on my side too, I guess.

13:50 chhildeb: So I clearly win the has-to-use-sucky-language-at-work contest.

13:50 ibdknox: I use professionally

13:50 it

13:50 chhildeb: :)

13:50 TimMc: ibdknox: Or at least that's what you'd like to think? :-P

13:50 ibdknox: TimMc: nobody said for what profession or what quality ;)

13:50 TimMc: hehe

13:51 chhildeb: Why ibdknox what do you do?

13:51 ibdknox: Unfortunately a better question would be what don't I do :)

13:51 TimMc: "I write Clojure unprofessionally. It makes passes at my coworkers and watches YouTube all day."

13:51 ibdknox: lol

13:52 chhildeb: I work at a startup and manage a couple of decently sized OSS clojure projects

13:52 chhildeb: I meant what makes TimMc say you'd like to think that? :)

13:53 pandeiro: ibdknox: did you ever end up making anyone's prototype with your promotion? just curious

13:53 ibdknox: pandeiro: yep

13:53 pandeiro: using noir?

13:53 ibdknox: yep

13:53 TimMc: chhildeb: I'm envious of ibdknox, and poking fun at him because of it. :-P

13:53 pandeiro: awesome :) - probably not open source i'm guessing?

13:53 ibdknox: pandeiro: unfortunately no ;)

13:54 chhildeb: don't let him fool you. He secretly hates me and is trying to slander me here in this public forum ;)

13:54 pandeiro: ibdknox: only ask because i am curious how larger apps are organized

13:54 ibdknox: i'm also curious if you have tucked into cljs-one already and have any thoughts?

13:54 chhildeb: TimMc I gathered that it was just a joke. I'm envious of people making money off having fun as well :)

13:55 ibdknox: pandeiro: there are some neat ideas there, not really sold on the notion of reinventing everything though

13:55 chhildeb: ibdknox: His karma says differently.

13:55 TimMc: ibdknox: Is that secret project out yet? I'm guessing not, because the world is pretty much the same as last week.

13:55 ibdknox: TimMc: probably not until february :)

13:55 TimMc: ok

13:56 ibdknox: maybe a preview for you guys earlier

13:56 pandeiro: once we have some sort of artifact for CLJS, some cool things will happen

13:56 chhildeb: TimMc you evil man. Now you have me hooked for more information just by using the word sectet.

13:57 TimMc: andrewvos: I couldn't get a great sense of cucumber from reading about it -- but the DSL aspects of Lisps make it sound like a decent match.

13:57 chhildeb: I guess I can't take that karma too seriously, after all.

13:59 pandeiro: ibdknox: yeah i noticed they re-did cljs-watch, anything else that you consider re-inventing? i'm still reading through it

13:59 ibdknox: pandeiro: jQuery :)

13:59 _carlos_: hi

13:59 pandeiro: ha yeah, that

14:00 ibdknox: I'm reworking pinot as I go through with this new thing I'm working on

14:00 and it does some cool stuff with jquery

14:00 pandeiro: ibdknox: cool... now that my clojure literacy has improved a little i need to re-read pinot and see how you organize things

14:01 ibdknox: pandeiro: definitely don't use that as a guide, pinot was very... thrown together as necessary :)

14:01 pandeiro: you don't think it would be useful to have like a zepto-esque DOM utility compatible with the compiler though?

14:01 ibdknox: pandeiro: korma would be a much better example

14:01 mdeboard: pinot, noir, get it

14:01 ibdknox: mdeboard: I really don't ;)

14:02 mdeboard: next app should be called "grigio"

14:02 pandeiro: must be a beer drinker

14:02 mdeboard: or "film"

14:02 ibdknox: pandeiro: I think it will never be as tested or as robust as jquery

14:03 pandeiro: that being said, I wouldn't discourage the effort. I just think we need something else to start with and if CLJS is ever to reach a larger audience, jQuery needs to be there

14:03 pandeiro: ibdknox: i see, and iyo jquery fits in with clojure idioms? and having g/closure and jquery isn't a waste?

14:03 ibdknox: pandeiro: I didn't say it wouldn't be wrapped ;)

14:03 pandeiro: interesting :)

14:04 ibdknox: pandeiro: all of the unused g/closure stuff will get removed by the compiler anyways, and jquery is already on everyone's computer. I don't think there's much of a size impact there

14:04 pandeiro: yeah that's a good point

14:05 ibdknox: pandeiro: I just want a solid base for people to build cooler stuff on, there's no need to recreate the most battle-tested client side framework out there

14:06 pandeiro: but ultimately, it should just be a base. jQuery is far from the pinaccle of awesomeness ;)

14:06 pandeiro: ibdknox: i see, i'm very interested to see what you come up with

14:06 chhildeb: I don't see the Committee on Jewish Law and Standards as much of a j"

14:06 query replacement anyway

14:07 tmciver: chhildeb: close: CLJS

14:07 pandeiro: chhildeb: i was just kvetching

14:07 chhildeb: Oh wrong wikipedia redirect

14:07 i see

14:08 Damn my nischl for not seeing that ;)

14:09 pandeiro: ibdknox: last question, promise - for building a backend that's an API endpoint for a single page app, are noir's abstractions over compojure still useful iyo?

14:09 ibdknox: pandeiro: yep :)

14:09 pandeiro: you're still going to want stateful sessions and cookies and reloading and ...

14:09 pandeiro: ibdknox: yeah sessions, i figured that

14:09 ibdknox: moreover there's no real downside to it

14:10 pandeiro: yeah one thing i noticed that i was gonna ask you about...

14:10 ibdknox: it essentially is just automatically doing what you would've done with compojure

14:10 pandeiro: you don't pass the options map to compojure/site when you init the server

14:11 ibdknox: pandeiro: 1.3.0-alpha4 cleans that up

14:11 andrewvos: Right ok so I'm setting up my clojure project and have just realised I have no clue how the project structure is meant to look.

14:12 ibdknox: andrewvos: what kind of project?

14:12 andrewvos: ibdknox: A web app using the noir framework

14:12 pandeiro: ibdknox: much appreciate the answers, keep up the good work

14:12 ibdknox: andrewvos: did you use lein noir new to create it? :)

14:12 pandeiro: anytime :)

14:12 andrewvos: ibdknox: No! I will do though thanks :)

14:12 chhildeb: andrewvos does leoin noir new not work?

14:14 andrewvos: chhildeb: I had not installed lein even

14:14 ibdknox: andrewvos: ah, you definitely want to do that

14:15 andrewvos: then follow the instructions on http://www.webnoir.org

14:15 that'll get you a running site very quickly :)

14:15 andrewvos: ibdknox, chhildeb Thanks

14:15 Wow leiningen is 9mb?

14:15 Rhetorical

14:16 chhildeb: andrewvos: in case you also use ccw, also use lein-ccw afterwards to make that project structure work for eclipse.

14:16 andrewvos: chhildeb: ccw?

14:16 chhildeb: counterclockwise

14:16 ibdknox: andrewvos: it's an eclipse plugin for clojure

14:16 chhildeb: Thought that might be the reason you don't use lein

14:16 andrewvos: chhildeb: I won't be using Eclipse again in this life.

14:16 ibdknox: haha

14:17 chhildeb: andrewvos: Probably for the best. Unless you haven't tried e4 yet.

14:18 andrewvos: Which is much more like emacs than eclipse 3 in terms of customizability

14:18 andrewvos: With the added bonus that you can use clojure for customization instead of elisp.

14:19 andrewvos: chhildeb: You're not selling Eclipse to me :)

14:20 tmciver: chhildeb: you can use Clojure to customize Eclipse?

14:21 chhildeb: tmciver: Eclipse 4, yes. Eclipse 3, I don't think so.

14:21 andrewvos: So lein in written in clojure?

14:22 s/in/in

14:22 s/in/is

14:22 chhildeb: tmciver: I'm thinking of writing a tutorial on that to make it easier to get started than with the official eclipse tutorials that are in java.

14:22 tmciver: chhildeb: it's been a while since I seriously used Eclipse.

14:22 chhildeb: but I don't mind elisp in emacs; if you squint your eyes, it looks like Clojure.

14:24 andrewvos: heh

14:25 chhildeb: tmciver: If you like emacs and don't miss an interactive graphical namespace explorer, stay with emacs. Eclipse has nothing else to offer to someone fluent in elisp.

14:31 tmciver: chhildeb: I used to use Eclipse for Java development; I've never used it for Clojure. emacs is used by a lot of smart Clojure hackers and so I feel smart when I use it. ;)

14:41 augustl: should I use markdownj for markdown support in my noir app?

14:42 clj-markdown seems dead, it's depending on contrib for example

14:42 andrewvos: Right I want to write an integration test for my web app using midje. What should I use to do the request to the page?

14:43 I'm using noir so if I could circumvent having to do an actual request that would be nice...

14:44 I suppose I'm looking for something like capybara

15:02 ibdknox: andrewvos: look at the noir.util.test namespace: http://webnoir.org/autodoc/1.2.1/noir.util.test-api.html

15:02 ashafa: cljsc/build question

15:03 can you exclude a namespace when compiling

15:03 ?

15:03 andrewvos: ibdknox: I am actually. Not finding any example articles online though :(

15:03 dnolen: ashafa: what do you mean?

15:05 ibdknox: andrewvos: https://github.com/ibdknox/noir/blob/master/test/noir/test/core.clj#L76

15:05 ashafa: dnolen: i figured out another solution

15:06 but basically i wanted to compile with optimize simple a directory but not include certain sub-directories

15:08 weavejester: andrewvos: As far as I know there's nothing directly analogous to Capybara, yet.

15:08 andrewvos: There is ring-mock, for creating Ring requests for sending to handlers

15:09 ashafa: if theres a way to do that it would be the path i would love to take

15:12 andrewvos: weavejester: Thanks

15:12 Does `lein test` normally take about five seconds?

15:13 ibdknox: JVM startup is pretty slow, you might try lein interactive

15:13 then you can just run test over and over again

15:14 andrewvos: ibdknox: Is that what everyone uses?

15:14 ibdknox: I think most people just test in the repl and use lein test :)

15:14 but I'm not a big TDD'r so probably not the best person to ask

15:15 andrewvos: ibdknox: Thanks

15:20 horatio_cromwell: clojure, no objects, given that the mainstream status quo is that tying data with behaviour is an advancement in programming, I was just wondering what clojure people feel about this, or is it a non issue ?

15:21 TimMc: Couldn't understand your question.

15:21 Are you asking about methods vs. functions?

15:22 augustl: horatio_cromwell: not sure what you're refering to with "data with behaviour is an advancement in programming"

15:22 hasn't most people been complecting data and behaviour for ages? Not much advancement there lately.

15:22 horatio_cromwell: the concept of encapsulating behaviour and data in a package that is manipulated by an interface

15:23 augustl: horatio_cromwell: after just briefly touching clojure I find object oriented programming incredibly complex and odd

15:24 anecdotal I know ;)

15:24 mdeboard: Are you asking how Clojure people feel about stateful data structures?

15:24 TimMc: I think he's asking about methods, which are functions bound to data structures.

15:25 ibdknox: I think he's talking about plants. :D

15:25 TimMc: So, a piece of code is always (usually?) attached to some class.

15:25 You could have persistent data structures with methods. I don't think there's a conflict there.

15:25 augustl: I wrote a small "orm" (just 100 lines or so) in Ruby for CouchDB yesterday. Boy did that feel wrong. A mish-mash of at least 5 completely different concepts.

15:26 ibdknox: horatio_cromwell: I think if you consider the general history of programming that most "advancements" have been things that decoupled parts of your program

15:26 augustl: validations, data processing, persistence, and much more :)

15:26 ibdknox: horatio_cromwell: OOP inherently couples data and behavior, with the suggested notion that encapsulation is the benefit

15:27 horatio_cromwell: well I have only briefly looked at clojure, but basically it looks like it id data being passed around to functions which is what was happening pre OOP. no i know that in clojure there is alot more than this, like immutable data, and all the STM and what have you, but basically I am just wondering what peoole who actually use the language think about losing the concept of classes/objects, as supposadly this

15:27 TimMc: Python has a bit of the right notion -- functions don't have to be attached to classes.

15:28 ibdknox: horatio_cromwell: I would argue that functional program further decouples this without necessarily sacrificing the notion of encapsulation, but instead by adjusting its implementation a bit

15:28 TimMc: horatio_cromwell: Repaste following "as supposadly this" -- it was cut off.

15:28 ibdknox: horatio_cromwell: I haven't looked back... and I used to be the PM in charge of C# and VB :p

15:28 horatio_cromwell: as supposadly this was menat to be an advancent over procedural code

15:29 jowag: In JS, I need to represent a tree of characters. Should I represent a character as a string or should I store its char-code number?

15:29 horatio_cromwell: by the way I am not trolling I don;t give shit about OOP, I am just intrigued to see something that is going against the norm

15:30 augustl: horatio_cromwell: I recommend http://www.infoq.com/presentations/Simple-Made-Easy if you haven't seen it

15:30 ibdknox: horatio_cromwell: well, I think that depends on what trend you're following

15:30 horatio_cromwell: TimMC: as supposadly this was menat to be an advancent over procedural code

15:30 augustl: basically a 1h talk on clojure with no code in it

15:30 alandipert: horatio_cromwell, check out http://groups.google.com/group/clojure/msg/330c230e8dc857a9, helped me understand

15:30 TimMc: horatio_cromwell: It's a bit hard to make the comparison, since the only strong-OOP I've worked with has been Java, which is *not* OOP-done-right!

15:30 ibdknox: horatio_cromwell: the latest trend is toward immutability and functional programming as its the only sane way we've come up to deal with the ever increasing concurrency in software

15:31 horatio_cromwell: so I don't really think Clojure is going against the grain

15:31 mdeboard: ibdknox: Pypy is trying to implement STM too I guess. Not sure how good the implementation will be

15:31 horatio_cromwell: OK, well my background is Python, although I was made to use C++ for work

15:31 ibdknox: mdeboard: haha cool

15:32 horatio_cromwell: to me in this day and age anyone advocating c++ for run of the mill mainstream dev is nutts, unfortunately there seems to be alot of nutts people

15:32 alandipert: horatio_cromwell, btw welcome to the party, help yourself to the parentheses buffet :-)

15:33 ibdknox: in case anyone is interested, I figured out how to eval while preserving line numbers

15:33 arkh: can jline use vim bindings?

15:33 horatio_cromwell: I am interested in clojure becaiuse I had heard afair bit about Lisp in the past but it was all mysterious, and now looking at how quickly adoption of clojure has been I am wondering whether I am missing out :), I alsways want an edge on mainstream

15:33 :P

15:33 ibdknox: arkh: why not run your repl in VIM?

15:33 horatio_cromwell: it's a good place to be :)

15:33 arkh: I'd like to use ClojureScript One which wraps a repl in jline

15:34 horatio_cromwell: yep, clojurescript is another thing that is tempting me, and the google closure integration for web client side dev

15:34 arkh: ibdknox: and I'd like to try to "develop from the repl" which I hear is the cat's meow ; )

15:35 horatio_cromwell: I think maybe I need to just dive in, its just I spose you need faith that giving up what mainstream tells you (OOP) isn;t bad

15:35 ibdknox: arkh: I assume you can just start a cljs repl from within a normal one, in which case you could still do it from VIM :)

15:35 arkh: ibdknox: I've used vimclojure with some satisfaction but I'd like to develop with better turnaround and try things from just a repl

15:35 ibdknox: that's true

15:36 ibdknox: arkh: when people say develop with the REPL, they mean with something like the emacs repl, they don't usually mean lein repl or some such

15:36 alandipert: arkh, don't know about jline, but if you wrap with rlwrap instead, it respects your ~/.inputrc

15:36 arkh: alandipert: cool - good to know

15:36 TimMc: ibdknox: Do tell, re: line numbers.

15:37 arkh: ibdknox: ok - I wasn't sure if there was a magical land of repl devlopment I hadn't yet explored ... probably seems silly to say considering I have a working vimclojure

15:38 ibdknox: the workflow still seemed a bit combersome but maybe that's my ignorance of everything vimclojure allows a person to do

15:38 ibdknox: TimMc: create a LineNumberingPushbackReader then in a loop (with-bindings {clojure.lang.Compiler/LINE_AFTER ...and LINE_BEFORE eval the code

15:38 augustl: looking for a clojure HTML parser that turns a string into a hiccup style vector

15:39 ibdknox: augustl: data.xml can do that I think. there's also clj-tagsoup

15:39 horatio_cromwell: anyone got any experience of moving from say java/python to cljure and how they found the transition

15:39 augustl: ibdknox: just found clj-tagsoup, looks good, thanks :)

15:40 ibdknox: arkh: can you describe your workflow

15:40 augustl: ibdknox: what's data.xml?

15:40 TimMc: horatio_cromwell: It was not hard, although I went through JS and Scheme on the way. :-)

15:40 ibdknox: augustl: https://github.com/clojure/data.xml

15:40 Raynes: God. clj-tagsoup.

15:40 TimMc: JS helped on the functional end of things, since I was working with closures.

15:40 ibdknox: Raynes: is there a better alternative?

15:40 horatio_cromwell: TimMc: I am not suggesting it's hard, just wondering what the productivity benefits are

15:40 arkh: horatio_cromwell: I did that - thinking 'functionally' was a big step but worth it in the end. I prefer clojure above all other languages I've tried

15:40 Raynes: ibdknox: Know, but I sure wish there was.

15:41 ibdknox: yeah

15:41 me too

15:41 lol

15:41 Raynes: No. Jesus. I've got to stop staying up so late.

15:41 hypercube32: was jesus keeping you awake? lol

15:41 horatio_cromwell: I only want to learn something if it is an advancement on what I have used previously, or that learning something is an enlightening experience

15:41 Bronsa: what time is it where you are

15:41 hypercube32: maybe you need a jesus touched me doll j/k

15:41 Raynes: Bronsa: 2:43PM. I just woke up.

15:42 Bronsa: woah

15:42 horatio_cromwell: e.g. Ruby to me is too similar to python but inmo with more downsides

15:42 so i wouldn;t learn that

15:42 erlang is interesting

15:42 and clojure

15:42 arkh: ibdknox: I want to develop close to a repl, in the manner referred to in the clojurescript one wiki. I'd also like vim bindings at the repl. The way I've been developing is a more old-school (lame-school) edit, then run, then edit etc.

15:42 Raynes: Ruby is like Python only it isn't completely nuts. Only partially so.

15:43 hypercube32: erlang is just eccentric punishment :P

15:43 ibdknox: arkh: vimclojure allows you to have the repl directly inside VIM, it also lets you just evaluate forms magically

15:43 arkh: it approximates the emacs magic pretty well

15:43 Raynes: Vim is so not made for that.

15:43 arkh: ibdknox: ok - maybe I should pursue that harder then I have

15:43 horatio_cromwell: hypercube32: the erlang VM/runtime is impressive

15:44 TimMc: horatio_cromwell: I am enjoying programming more. :-)

15:44 hypercube32: horatio_cromwell, ive never actually used it but ill keep that in mind

15:44 Raynes: I don't even want to think about what the VimL to implement that nailgun stuff looks like.

15:44 horatio_cromwell: hypercube32: I have the stuart holloway book in my amazon basket, is that any good ?

15:44 arkh: yes, thank you Mr. Brandmeyer

15:45 ibdknox: Raynes: scary

15:45 hypercube32: horatio_cromwell, i wouldnt know i havent messed with erlang much

15:45 horatio_cromwell, read the amazon reviews on it

15:45 Raynes: I don't know about an editor language that doesn't have a built in way to get a visual selection programmatically.

15:46 horatio_cromwell: hypercube32: lol sorry the book is called programming clojure

15:46 hypercube32 by stuart holloway

15:46 TimMc: ibdknox: Ah, so you are pre-filling the line numbers?

15:46 hypercube32: oh sorry, didnt know what you were refering to, i learned via internet, not the books

15:46 horatio_cromwell: hypercube32: np

15:46 dnolen: horatio_cromwell: I tell people Clojure is OO "The Good Parts"

15:46 ibdknox: TimMc: using the reader I can keep track of the numbers magically, just have to rebind them

15:47 horatio_cromwell: dnolen: but in the rationale written by rich hickey he complains about OO

15:47 dnolen: horatio_cromwell: "The Bad Parts"

15:48 horatio_cromwell: so basically the concesus is, clojure is where its at ?

15:48 consensus

15:48 :)

15:48 dnolen: horatio_cromwell: there are lots of interesting languages out there.

15:49 horatio_cromwell: but I think Clojure has a sweet spot as far as feature set and community

15:49 horatio_cromwell: dnolen: well I have been loooking at a number of them and I have come down to erlang and clojure

15:49 TimMc: horatio_cromwell: Clojure is not the best of all possible worlds -- there are some concessions to practicality and performance that create small pockets of ugliness -- but there's no language I'd rather be programming in right now.

15:50 horatio_cromwell: TimMc what have you used in the past the

15:50 n

15:50 TimMc: Java, JS, Python

15:50 horatio_cromwell: how would you rank them all in order of productivity

15:50 TimMc: Oh, and I have used PLT Scheme and C briefly, but not really for projects.

15:50 horatio_cromwell: Java, JS, Python, Clojure ?

15:50 :)

15:51 TimMc: Somethin like that, yes.

15:51 With Python I can generally move pretty fast, but periodically get bogged down in circumventing some horrible design flaw.

15:51 horatio_cromwell: well I personally think that python pisses all over java, so if clojure is at least as productive as python then its worht looking at

15:52 TimMc: OCaml looks really cool, but I had trouble with the syntax. I'll take another stab at, or more likely Haskell.

15:52 Everyone should probably learn Haskell at some point. :-)

15:53 horatio_cromwell: TimMc: yeah I lookedat Haskell (briefly), but it sort of strikes me as very acedemic

15:53 tmciver: I gotta learn me a haskell

15:54 Raynes: &he 1 + 2 + 3 + 4

15:54 lazybot: java.lang.RuntimeException: Unable to resolve symbol: he in this context

15:54 hiredman: ~python

15:54 clojurebot: python is (defmulti #^{:doc "docs for foo"} foo class)

15:54 Raynes: $he 1 + 2 + 3 + 4

15:54 lazybot: ⇒ 10

15:54 hiredman: ~python

15:54 clojurebot: python is ugly

15:54 Raynes: Haskell!

15:54 hiredman: ~botsnack

15:54 clojurebot: thanks; that was delicious. (nom nom nom)

15:55 Raynes: Too bad you can't write Vim scripts in Haskell.

15:55 horatio_cromwell: TimMc: what horrible design flaw you talking about regarding Python ?

15:55 Raynes: That'd be something to see.

15:55 "Sorta strikes me as academic" sorta strikes me as "I heard someone say it was mostly an academic language."

15:57 TimMc: horatio_cromwell: Haskell is very popular in the academic community, but there are real-world apps written in it, such as window managers and web servers.

15:58 horatio_cromwell: The latest thing I ran into in Python was that I couldn't use sets in dicts or soemthing lke that. mumble mumble hashing and mutability mumble

15:58 Raynes: Lots of people use xmonad. Not just Haskellers.

15:59 Hahaha, TimMc, I was just telling ibdknox how I wrote https://refheap.com/paste/255 last night and wanted to kill myself.

16:00 TimMc: OK, getting groceries.

16:02 thorwil: hmm, clojurescript-one's script/deps fails with "script/bootstrap: 36: jar: not found" here

16:03 augustl: how do I turn [:baz, :maz] into [:foo, :baz, :maz]?

16:03 tmciver: &(doc cons)

16:03 lazybot: ⇒ "([x seq]); Returns a new seq where x is the first element and seq is the rest."

16:04 augustl: thanks

16:04 tmciver: &(cons :foo [:baz :maz])

16:04 lazybot: ⇒ (:foo :baz :maz)

16:05 tmciver: &(vec (cons :foo [:baz :maz]))

16:05 lazybot: ⇒ [:foo :baz :maz]

16:05 augustl: thanks again :)

16:05 horatio_cromwell: TimMc: Writing python and java code looks very different from clojure, not just the syntax but more the abstractions, say I was creating something to handle a TCP connection I would probably create a sockethandler class and instantiate an object for each, what do you do in clojure without classes ?

16:06 tmciver: horatio_cromwell: he's getting groceries! :P

16:09 Is there a way to recursively call an anonymous function? (fn [a] ... recur)

16:09 Raynes: You can name it.

16:10 (fn x [a] … (x newa)).

16:10 Not sure about recur.

16:10 jamiltron: Recur seems to work with a trivial test.

16:11 Raynes: &((fn [x] (if (< x 3) (recur (inc x)) x)) 1)

16:11 lazybot: ⇒ 3

16:11 Raynes: Yep.

16:11 tmciver: Raynes: I tried creating a multi-arity anonymous function and it didn't work for me.

16:11 alandipert: tmciver, there's also letfn

16:11 mdeboard: A boolean in Java is the same as a boolean everywhere else right? True/False etc

16:12 tmciver: alandipert: yes, I was trying it first in a normal let.

16:13 hiredman: recur is a functional veneer on top of the jvms limited goto which only works with in methods, for multi arity functions each arity is a different method, so you cannot recur to different arities

16:13 thorwil: should i have a "jar" command on my path?

16:13 jamiltron: &((fn [x y] (if (= (- x y) 0) 0 (recur x (inc y)))) 5 1)

16:13 lazybot: ⇒ 0

16:13 tmciver: hiredman: well, that explains it.

16:13 thanks

16:14 Raynes: duh, I didn't realize you could name a function in fn. :/

16:15 horatio_cromwell: I have still not had an answer from someone who was a OOP evangelist who has converted to clojure :)

16:15 Raynes: tmciver: The name is totally local though. Just a way for you to refer to the function inside the body of the function.

16:15 augustl: hmm, hiccup seems to unescape html entities. It turns <code>&lt;script&gt;</code> into <code><script></code>. Anyone know how to disable that?

16:16 ibdknox: augustl: https://github.com/weavejester/hiccup/blob/master/src/hiccup/core.clj#L22

16:16 augustl: I don't want it to escape

16:16 I want it to not unescape :)

16:17 hiredman: horatio_cromwell: the first thing you have to do is figure out what "oop" is, what you mean by it, and what the people you are talking to mean by it, because the term has essential lost all specific meaning

16:17 augustl: hmmm, now I got it to not unescape, by changing nothing at all. I apparently don't quite grok what's going on :)

16:18 ibdknox: augustl: to my knowledge, hiccup doesn't escape input

16:18 augustl: indeed, (html5 [:body [:code "&lt;script&gt;"]]) works just as expected

16:20 it's an issue with the clj-tagsoup parser

16:21 * Raynes shudders

16:21 augustl: It turns ""<p>Hello, <code>&lt;script&gt;</code> World!</p>"" into [:html {} [:body {} [:p {} Hello, [:code {} <script>] World!]]]

16:21 how nice..

16:21 ckirkendall`: Ibdknox: what is special about the goof.jar on clojars. I am using goog.dom.query amd your goog.jar works but i get failures with the base.

16:21 ibdknox: ckirkendall`: it includes the google closure extensions

16:21 Raynes: ckirkendall`: Hahaha, goof.jar. Excellent.

16:21 horatio_cromwell: hiredman: either clojure isn't that different conceptually to Java or you haven't programmed in Java (or another OOP language) to contrast it to, because to me , the fact that clojure has no concept of classes etc in the traditional sense is different

16:22 augustl: so I'm guessing this is _actually_ an issue with the Java tag soup parser it uses under the hood

16:22 hiredman: horatio_cromwell: either does js, but js has objects, so are classe fundamental to oop or objects?

16:23 there are so many different kinds of systems that claim to be "oop" that it has lost most of it's descriptive power

16:24 if I say "language X is object oriented" what does that tell you about language X? not a lot

16:24 ckirkendall`: Ibdknox thats what i thought

16:24 horatio_cromwell: hiredman: OK, i mean has the concept of a container that you can say Object.dosomething() and then Object.dosomething else and the Object has data that is manipulated by these, and the Object can be passesd aaround a system encapsualting data and behaviour

16:25 tmciver: horatio_cromwell: I'm no clojure expert, so I won't try to give a solution to your TCP example, but Clojure allows you to wrap the underlying Java classes to solve such a problem.

16:26 hiredman: horatio_cromwell: so are clos generic functions object oriented?

16:26 horatio_cromwell: hiredman: I may just be waffling I have had a drink this evening :), I am just wondering that you must at least understand that clujure is different enough to warrant these questions

16:27 hiredman: sure, clojure is different enough to warrant questions, but the term "oop" is well enough defined to get a good answer to "how is clojure different from oop"

16:27 horatio_cromwell: do you have a specific language or set of features you want to ask about?

16:28 augustl: anyone know about a HTML parser for clojure that doesn't parse <code>&lt;script&gt;<code> into [:code {} "<script>"]? I'm expecting [:code {} "&lt;script&gt;"]

16:29 Raynes: There aren't many options for html parsers.

16:29 tmciver: horatio_cromwell: I've been studying clojure for a while after having come from OOP languages and the transition is not that bad; you just have to buy and read all the Clojure books and spend 10-12 hours/day on #clojure.

16:29 horatio_cromwell: hiredman: I wil RTFM :), you don't know what I mean

16:29 augustl: I wonder what the rationale is for a html parser to unescape entities...

16:29 hiredman: horatio_cromwell: right, as I said "oop" is a meaningless term, so stop using it, no one knows what you mean when you use it

16:29 Raynes: HTML5 is the first version (IIRC) of HTML to actually define a parsing algorithm. http://about.validator.nu/htmlparser/ is probably the best choice these days, but it isn't on maven and isn't yet wrapped by a Clojure library.

16:30 horatio_cromwell: tmciver: you talk like someone who has been press ganged into coding in clojure

16:30 :)

16:30 Raynes: (the page fonts take about 30 seconds to load, so give it a minute.

16:30 )

16:30 tmciver: horatio_cromwell: not at all

16:31 it's a pleasure to use Clojure.

16:31 dnolen: horatio_cromwell: in Clojure you also have containers for data and behavior via polymorphic functions.

16:31 horatio_cromwell: the big difference in Clojure from most languages with classes is that you don't have inheritance.

16:32 augustl: Raynes: I guess I should find me a real template language ;)

16:32 currently writing docs for a project in HTML, goal was to get a vector in clojure, find all :code tags and highlight with pygments (or something) and that's about it

16:37 ritre: horatio_cromwell: all programming is just about a tripartite of: data, algorithms and forms, nothing else, discovering this is an enlightenment that you can get only with a language from lisp family

16:38 dnolen: ritre: I wouldn't go that far ;)

16:38 ritre: dnolen: why?

16:39 dnolen: ritre: I think other languages that offer that realization as well

16:40 mdeboard: Who maintains the clojure.org/cheatsheet page? There's a "pageeditor" div that's breaking the page on Chromium, but not apparently on FF 10

16:40 dnolen: ritre: but again, maybe Lisp is a sweet spot

16:41 ritre: dnolen: surely

16:42 no language holds that concept so clearly and firmly

16:43 than lisp

16:56 dnolen: ritre: I've been impressed by the simplicity of term manipulation in Prolog

17:02 ritre: dnolen: hmm, I've never tried prolog, but I wanted to learn it

17:40 DerGuteMoritz: I have a question regarding protocols: clojure doesn't seem to check whether a participant in the protocol implements all its methods. in fact, I don't have to implement any method at all and satisfied? will still regard it as implemented. can anyone enlighten me on the utility of this behavior?

17:41 s,regard it as implemented,regard the type as satisfiying the protocol,

17:43 example: http://moritz.twoticketsplease.de/paste/prot.clj.html

17:47 I can see that implementing only part of a protocol may make sense in certain situations. OTOH this might be an indicator that a protocol is too big and should be split into smaller protocols.

17:48 amalloy: that's just sorta The Way Things Are. i agree it doesn't really make much sense to me, but i suspect others have thought harder about it than i have

17:48 DerGuteMoritz: amalloy: yeah that's why I'm asking for enlightenment :-)

17:49 but given that there is no description of the actual behavior in the documentation it may as well be a bug

17:50 I mean "Returns true if x satisfies the protocol" parses as "implements all methods of the protocol" for me

17:50 well, the second half of that sentence :-)

17:51 Bronsa: IMO in such a case extends? should return true wether satisfies? should retourn false

17:51 *wheter

17:51 *whether

17:52 DerGuteMoritz: Bronsa: well, satisfies? works on instances while extends? works on types ... not sure!

17:52 I'd expect extend, extend-type, and defrecord to bomb

17:52 and reify I guess

18:08 augustl: implementing commonjs with clojure as backend using spidermonkey or v8... hmmm :)

18:09 adiabatic: So I'm reimplementing map and I got a NullPointerException on https://gist.github.com/1613291 (lines 3 and 5 in my code are flagged, and also deep within clojure.lang.Numbers.inc.) Is there anything I can get out of this error message other than "you screwed up somehow"?

18:11 put another way: what sorts of errors cause NullPointerExceptions?

18:11 alexbaranosky: adiabatic, some method attempted to be called on a null

18:12 adiabatic: aha!

18:12 alexbaranosky: adiabatic, usually you follow the stacktrace down and see what was null, then follow it back up to see where the logic went wonky tht got the null in there in the first palce

18:12 adiabatic: Right. I'm not stopping when I get to the end of the list.

18:12 * adiabatic fixes

18:13 alexbaranosky: adiabatic, was that helpful?

18:13 adiabatic: yes

18:15 mmph, they're really testing for lazy

18:44 amalloy: adiabatic: it's remarkably difficult to add test cases for all the interesting corner cases. with map, for example, i believe we forgot to test that your solution works for inputs of length 0

19:56 mdeboard: I'm looking through the cascalog source; what is the significance of the double colon e.g. `(defstruct edge :source :target ::extra-data)`

19:57 ibdknox: mdeboard: it namesapces the keyword

19:57 mdeboard: I don't understand.

19:57 ibdknox: let's say I'm in ns foo

19:58 and I want to use a keyword in a map called :name

19:58 mdeboard: Can you think of a simple example off the top fo your head by chance?

19:58 ibdknox: mdeboard: korma uses it so that keys in maps don't collide

19:59 if I have a map that other people might assoc into and I use a really common name

19:59 the probability that my key is overwritten is pretty high

19:59 in other languages the solution would be to obfuscate the name

19:59 so instead of using :foo I would use :__foo

20:00 but keywords can be namespaced

20:00 allowing you to sidestep the issue entirely

20:01 ,(= :foo ::foo)

20:01 clojurebot: false

20:01 ibdknox: ,::foo

20:01 clojurebot: :sandbox/foo

20:01 ibdknox: ,:foo

20:01 clojurebot: :foo

20:01 mdeboard: huh

20:01 Ok, cool

20:29 notsonerdysunny: what happens when there are cyclic-dependencies in the clojure-files by means of which name-space requires which namespace

20:33 mabes_: notsonerdysunny: it doesn't work... in 1.2 you get odd errors about the namespace not being available or something.. not sure if 1.3 improves on those errors

20:34 notsonerdysunny: mabes_: thanks.

21:15 scottj: not sure if I'm missing something here, but does the cljs1 sample app just consist of what's your name and hello name?

21:16 (beside the documentation)

21:26 tolstoy: If you run (shutdown-agents) in a repl (slime/swank), is there a way to recover without restarting the running image?

21:28 Even evaluating a new (def some-name (agent {})) and then sending it functions results in a RejectedExecutionException no matter what. (Once shutdown-agents has been invoked.)

21:32 Hm. Looks like the answer is, "Don't run shutdown-agents."

21:41 TimMc: "Unable to resolve var: leiningen.repl/*retry-limit*" when I run leiningen -- any idea?

21:45 Looks like that var was renamed at some point to lose its earmuffs, but why is my init.clj only now causing that problem.

Logging service provided by n01se.net