#clojure logs

2012-01-14

00:00aamarDoes anyone know a handy API for simple 2D graphics, similar to the HTML5 canvas API?
00:01aamarI need to render some simple graphics from clojure or js, but I'd like to avoid running a headless browser on my server.
00:04TimMcHmm, someone was asking about something like this recently. Let me check my logs.
00:09TimMcaamar: There's nothing conclusive, but you might look to see if Swing or AWT provides headless graphics so you can render on a canvas.
00:09TimMcMight be a good use-case for CLJS.
00:10yoklovuse graphics
00:10ibdknoxpinot has a simple canvas API
00:10yoklovswing/awt graphics
00:10yoklovit actually works quite well
00:10yoklovand is way faster than most other things
00:11aamarYeah, 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.
00:11aamarTimMc, yoklov, ibdknox: thanks for the suggestions!
00:42dgrnbrg_ I have a style guide question about closure
00:42dgrnbrg_if i'm writing a library, and I want to have a function to concatenate bitstrings
00:42dgrnbrg_should I make concat polymorphic/a multimethod, or should I make a new function, like bit-concat?
00:52yoklovyessssss my code works
00:53yoklovhttp://dl.dropbox.com/u/13069163/itsworking.png
00:53yoklovand _NOW_ i am going to sleep for real this time
05:41foodooIs there a reason to use (when) even if you don't have multiple then-clauses? Or should I use (if) in all cases?
06:02thorwilfoodoo: (when) is for a single clause, where it's sole advantage over (if) is making that obvious
06:06jowagmoreover, (when) implicitly wraps its body in do
06:07foodoothorwil: So (when) is used to emphasize that here is no else-clause?
06:08jowagyes, if you have else clause, you cannot use when
06:09jowagor better, use (when) if your else clause is nil
06:13xenoxeno
08:53kenanbhi, http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html
08:53kenanbi am trying to setup clojure using this
08:53lazybotThe 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.
08:53kenanbbut i get errors at lein deps part
08:54kenanbwow
08:54kenanbcool bot answer
08:55djh_haha
09:00bpri'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?
09:00bprspecifically i'm talking about (:reload-clj one.sample.config/config)
10:19ziltiI'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:21jowagzilti: have you salted your hashes?
10:22ziltijowag: No... I don't know how to do that with the java whirlpool class I'm using.
10:23jowagthan you should not public the hash in cookie.
10:23ziltithere's a "digest" input, I guess that's something like salting?
10:24jowagdunno
10:26raekzilti: if you just want a password hash that just works, check out http://www.mindrot.org/projects/jBCrypt/
10:27jowagwhat raek said, and read this: http://codahale.com/how-to-safely-store-a-password/
10:28raekmaybe it's better to use something else as the source of the identification string
10:29jowagI would generate session UID which I would send in a cookie, map it to hash and keep that mapping on the server
10:29ziltiHmm I see
10:36raekzilti: 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:36ziltiI found the maven version just seconds ago, thanks :)
10:36ziltiHow do I add a repo to leiningens project.clj?
10:37raekzilti: which repo? leiningen already knows about the maven central repo.
10:37ziltiraek: Ah, ok, I thought it's in an another repo.
11:53ashafahello
11:53ashafaim tring to compile some cljs
11:54ashafai've got two files in a folder named core.cljs and utils.cljs
11:54ashafanamespaced com.example.core and com.example.utils respectively
11:55ashafacore.cljs requires com.example.utils
11:56bprhow do the strings in clojurescript one's (:reload-clj one.sample.config/config) vector map to files?
11:57ashafawhen 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:58ashafaany ideas what I maight be doing wrong?
11:59ibdknoxashafa: you have a cljs file on your classpath as well as in the path of compilation
11:59ibdknoxcausing it to compile and evaluate twice
12:00bprif 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:00bprso, i'm confused about it
12:00ashafaibdknox: that might be it... let me check
12:01ibdknoxthat's usually what causes that error :)
12:01bproop, well it seems to have an explicit .clj so nm my last comment
12:03bprpfft s/explicit/implicit/
12:16yoklov_what happened to clojure contrib?
12:18zilticlojurebot: what happened to contrib?
12:18clojurebotWell... it's a long story: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
12:20ashafaibdknox: Thanks. I think that was the problem. just have to figure out how to compile different folders with different options
12:28TimMcAnyone know any cool tricks for getting "break"- and "return"-like functionality in Clojure?
12:29TimMcI'd like to be able to bail out of a function more easily.
12:29TimMcI remember a cute trick with continuations in some Scheme, but that doesn't help here.
12:30ziltiTimMc: There isn't such functionality because Clojure is intended to be used for functional programming
12:31ibdknoxlol
12:31ziltiTimMc: Just write smaller functions
12:31TimMczilti: ...
12:31ibdknoxzilti: I'm pretty sure he knows.
12:31ibdknoxTimMc: you're doing it wrong, man :p
12:31TimMchaha
12:31ziltiOh. Yeah. Sorry, I didn't look at the nick lol
12:32ziltiAnyway, I couldn't imagine a use case for "break" or "return" in Clojure
12:32ibdknoxI've wanted it a few times
12:32ibdknoxsometimes it's nice if at the top of a function you can escape on some simple condition without having to nest
12:33TimMczilti: 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:34TimMcibdknox: Right now I'm reimplementing with a cond.
12:34ibdknoxTimMc: that was usually what I did :/
12:35TimMcI 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:36TimMcI mean, I know why you can't do (+ 1 (recur ...))
12:36TimMcbut (loop [] (when ... (recur ...)) ...) seems fine to me.
12:36tmciverTimMc: have you tried out debugging using swank clojure? https://github.com/technomancy/swank-clojure
12:36tmciverYou can set break points
12:36TimMctmciver: Not yet, I broke my .emacs trying that and restored from backup.
12:37ziltiYou can do something like (fn name [x] (when ... (name ...)) ...)
12:37ziltiBut that'll use stack space
12:37tmciverTimMc: it seems pretty good though I haven't used it *a lot*
12:37TimMcI really want to use CDT for the try-cljs stuff.
12:42TimMcAch, I'm an idiot. I'll just call System/exit.
12:42tmciverI 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:43TimMcSomehow I'd gotten the impression that if -main returned a number, that would be the exit code -- but that's not true. >_<
12:44raekTimMc: yup. :-) main has return type void on the JVM.
12:45TimMcYeah, I thought Clojure was doing something clever -- but there's not actually a wrapper around main.
12:45TimMcHmm, if I return something from -main, it gets printed. What's going on there?
12:46raekhow do you invoke it? lein run? java -jar ....?
12:46TimMcMmm, lein run.
12:46TimMcOK, running the uberjar as java -jar, it is silent.
12:48TimMcI guess gen-class is forcing -main to end with a void return.
12:51TimMcOr... AOT produces an outer class with a proper main that calls -main and ignores the result. That's my best guess now.
12:51raekhrm https://github.com/flatland/classlojure/blob/master/src/classlojure/core.clj#L77
12:53raekI'm pretty sure the generated main method looks something like "public static void main(String[] args) { ... apply -main ... }"
12:53raekwhere the return value of -main is simply ignored
12:54TimMcYeah, that's what the disassembled code is looking like, although I'm not good at reading the output of javap.
12:54raekTimMc: do you have the javap output in a gist?
12:55TimMcgimme a sec
12:59TimMcIt's going to be easier to make a repo.
13:01raekok, you don't have to do that for me... :-)
13:02chhildebHi everyone.
13:03chhildebI'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:03TimMcraek: 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:04chhildebIt's normally called mapcan
13:04alandipertchhildeb, mapcat perhaps?
13:04chhildebDoes anyone know what clojure calls it?
13:04alandipertmap + concatenate
13:05TimMcI should get a proper decompiler, not just the bytecode printer.
13:05chhildebWell, that was fast.
13:05chhildebThanks.
13:05chhildebDon't know why I didn't find that earlier.
13:06alandipertchhildeb, at the repl in 1.3, you can do things like (apropos 'map) to get a list of map-related functions in core
13:06chhildebAh very nice.
13:06chhildebThatt'l come in handy.
13:06chhildebs/att/at
13:07chhildebseeing as I'm currently translating a whole bunch of my sbcl stuff to clojure.
13:07chhildebThank you for the help.
13:08alandipertchhildeb, np, have fun
13:08chhildebThat sounded weird, sorry. Just transliterated German there.
13:10TimMcchhildeb: Sounded like normal English to me.
13:10chhildebI thought "your help" would have been more idiomatic.
13:10chhildebAlways learning something new I guess ;).
13:11alandipertTimMc, raek, gen-class generates implementations for all methods specified including -main, then delegates to your code
13:12TimMcalandipert: *nod*
13:12alandipertTimMc, *wink*
13:14TimMcI 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:15TimMcHaha, sweet! http://java.decompiler.free.fr/?q=preview Instant .class decompiler, just drop your files on the page.
13:19TimMcFar from perfect.
13:19TimMc...but hella better than .javap files in some parts.
13:21chhildebDoes anyone in here use counterclockwise? Or are you all into emacs?
13:23chhildebI'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:24chhildebSo I wrote a new one which works without any dependencies apart from clojure 1.2, 1.3 or 1.4
13:24chhildebBut I can't seem to get a hold of the guy in charge of the lein-eclipse clojars group.
13:28TimMcCCW is still maintained and used, I think. (Emacs is the majority editor, and I think vim comes in second.)
13:30TimMcchhildeb: If the lein-eclipse maintainer doesn't respond, maybe just talk to the CCW folks.
13:31chhildebTimMc, 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:31chhildebTimMc: or am I just wrong there?
13:31TimMcOh, I assumed it was used by CCW.
13:31chhildebNot to my knowledge.
13:32chhildebAlthough that would be nice :D
13:32TimMcRight, I would just announce your new plugin on the Leiningen mailing list and add it to the Plugins page.
13:33chhildebJust giving it another name, like lein-ccw? That might work, although it could seem impolite to the guy who made lein- eclipse.
13:34chhildebI think I'll do that.
13:34foodooI'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:34TimMcchhildeb: How long ago did you contact the maintainer?
13:35chhildebThere was no contact data to be found in his files
13:35chhildebnor on his clojars profile
13:35chhildebjust a name in the copyright license file
13:36chhildebabrenk
13:36chhildebon clojars.org
13:36foodoooh, silly me. Got it
13:37chhildebfoodoo your link doesn't seem to work.
13:37chhildebOh found it.
13:37TimMcfoodoo: What was the problem?
13:38foodooTimMc: That code doesn't behave lazily
13:38foodooTimMc: But it needs to, because there are infinite fibbonacci numbers
13:38chhildebfoodoo did you find the problem?
13:39foodoochhildeb: I've an idea, just give me a second. Then I'll report back
13:39TimMcfoodoo: count!
13:39foodooTimMc: good hint O.O
13:39TimMc&(doc nnext)
13:39lazybot⇒ "([x]); Same as (next (next x))"
13:40foodooTimMc: great. That would have been the next question. Your abilities are truly astonishing :)
13:41chhildeb&(good-guy? :TimMc) ; => true
13:41lazybotjava.lang.RuntimeException: Unable to resolve symbol: good-guy? in this context
13:41chhildebThis bot is broken.
13:42chhildebOr is that function contrib?
13:42TimMchaha
13:42TimMcThere is $inc or something but it doesn't always work.
13:42TimMcoh, wait
13:42TimMc$karma TimMc
13:42lazybotTimMc has karma 2.
13:42TimMcOK, it's not broken today.
13:43chhildebAh. Good to know, thanks.
13:43TimMcAls, it randomly resets, probably to promote detachment.
13:43chhildebThat should inc your karma.
13:43andrewvosWhat's a nice simple web framework in clojure?
13:43chhildebI didn't even know karma exists in here.
13:44chhildeb$karma chhildeb
13:44lazybotchhildeb has karma 0.
13:44mdeboardandrewvos: noir
13:44andrewvosmdeboard: Thanks
13:44TimMc$inc mdeboard ; this should do it...
13:44lazybot⇒ 3
13:44ibdknox(inc TimMc)
13:44lazybot⇒ 3
13:45chhildebAh.
13:45chhildeb(inc TimMc)
13:45lazybot⇒ 4
13:45TimMcchhildeb: It's just a toy, unlike on Reddit, where it is srs bsns.
13:45andrewvosWhat testing framework does everyone use?
13:45andrewvosunit*
13:45TimMcandrewvos: clojure.test is the default, but midje gets good reviews
13:45ibdknoxclojure.test or midje seem to be the standards
13:46TimMcsniped!
13:46ibdknox:p
13:46andrewvoshah
13:46chhildebStill, it makes me want it simply for being there, so it seems to be effective.
13:46andrewvosOk i've head a lot about midje will go with that
13:46TimMcibdknox: My internet connection doesn't suck today.
13:46ibdknoxhaha a winner is you ;)
13:46TimMcWhen it gets really cold, the packets freeze in the wires or something.
13:47ibdknoxlol
13:47ibdknoxI hate it when that happens
13:47andrewvosHmm I want to do a web project and wondering if I should be using cucumber
13:47chhildebTimMc, do you use Clojure professionally?
13:48TimMcchhildeb: 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:49chhildebI could never hope to.
13:49tmcivertmciver: and I'm not even lucky enough to do Java :( C++ yuck!
13:49foodooTimMc: Are people still too afraid of the parantheses at your place?
13:49tmciveroops to TimMc
13:49chhildebWe have too much legacy code in C.
13:49chhildebSo C is what I use.
13:50TimMctmciver: 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:50chhildebSo I clearly win the has-to-use-sucky-language-at-work contest.
13:50ibdknoxI use professionally
13:50ibdknoxit
13:50chhildeb:)
13:50TimMcibdknox: Or at least that's what you'd like to think? :-P
13:50ibdknoxTimMc: nobody said for what profession or what quality ;)
13:50TimMchehe
13:51chhildebWhy ibdknox what do you do?
13:51ibdknoxUnfortunately a better question would be what don't I do :)
13:51TimMc"I write Clojure unprofessionally. It makes passes at my coworkers and watches YouTube all day."
13:51ibdknoxlol
13:52ibdknoxchhildeb: I work at a startup and manage a couple of decently sized OSS clojure projects
13:52chhildebI meant what makes TimMc say you'd like to think that? :)
13:53pandeiroibdknox: did you ever end up making anyone's prototype with your promotion? just curious
13:53ibdknoxpandeiro: yep
13:53pandeirousing noir?
13:53ibdknoxyep
13:53TimMcchhildeb: I'm envious of ibdknox, and poking fun at him because of it. :-P
13:53pandeiroawesome :) - probably not open source i'm guessing?
13:53ibdknoxpandeiro: unfortunately no ;)
13:54ibdknoxchhildeb: don't let him fool you. He secretly hates me and is trying to slander me here in this public forum ;)
13:54pandeiroibdknox: only ask because i am curious how larger apps are organized
13:54pandeiroibdknox: i'm also curious if you have tucked into cljs-one already and have any thoughts?
13:54chhildebTimMc I gathered that it was just a joke. I'm envious of people making money off having fun as well :)
13:55ibdknoxpandeiro: there are some neat ideas there, not really sold on the notion of reinventing everything though
13:55chhildebibdknox: His karma says differently.
13:55TimMcibdknox: Is that secret project out yet? I'm guessing not, because the world is pretty much the same as last week.
13:55ibdknoxTimMc: probably not until february :)
13:55TimMcok
13:56ibdknoxmaybe a preview for you guys earlier
13:56ibdknoxpandeiro: once we have some sort of artifact for CLJS, some cool things will happen
13:56chhildebTimMc you evil man. Now you have me hooked for more information just by using the word sectet.
13:57TimMcandrewvos: 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:57chhildebI guess I can't take that karma too seriously, after all.
13:59pandeiroibdknox: yeah i noticed they re-did cljs-watch, anything else that you consider re-inventing? i'm still reading through it
13:59ibdknoxpandeiro: jQuery :)
13:59_carlos_hi
13:59pandeiroha yeah, that
14:00ibdknoxI'm reworking pinot as I go through with this new thing I'm working on
14:00ibdknoxand it does some cool stuff with jquery
14:00pandeiroibdknox: cool... now that my clojure literacy has improved a little i need to re-read pinot and see how you organize things
14:01ibdknoxpandeiro: definitely don't use that as a guide, pinot was very... thrown together as necessary :)
14:01pandeiroyou don't think it would be useful to have like a zepto-esque DOM utility compatible with the compiler though?
14:01ibdknoxpandeiro: korma would be a much better example
14:01mdeboardpinot, noir, get it
14:01ibdknoxmdeboard: I really don't ;)
14:02mdeboardnext app should be called "grigio"
14:02pandeiromust be a beer drinker
14:02mdeboardor "film"
14:02ibdknoxpandeiro: I think it will never be as tested or as robust as jquery
14:03ibdknoxpandeiro: 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:03pandeiroibdknox: i see, and iyo jquery fits in with clojure idioms? and having g/closure and jquery isn't a waste?
14:03ibdknoxpandeiro: I didn't say it wouldn't be wrapped ;)
14:03pandeirointeresting :)
14:04ibdknoxpandeiro: 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:04pandeiroyeah that's a good point
14:05ibdknoxpandeiro: 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:06ibdknoxpandeiro: but ultimately, it should just be a base. jQuery is far from the pinaccle of awesomeness ;)
14:06pandeiroibdknox: i see, i'm very interested to see what you come up with
14:06chhildebI don't see the Committee on Jewish Law and Standards as much of a j"
14:06chhildebquery replacement anyway
14:07tmciverchhildeb: close: CLJS
14:07pandeirochhildeb: i was just kvetching
14:07chhildebOh wrong wikipedia redirect
14:07chhildebi see
14:08chhildebDamn my nischl for not seeing that ;)
14:09pandeiroibdknox: 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:09ibdknoxpandeiro: yep :)
14:09ibdknoxpandeiro: you're still going to want stateful sessions and cookies and reloading and ...
14:09pandeiroibdknox: yeah sessions, i figured that
14:09ibdknoxmoreover there's no real downside to it
14:10pandeiroyeah one thing i noticed that i was gonna ask you about...
14:10ibdknoxit essentially is just automatically doing what you would've done with compojure
14:10pandeiroyou don't pass the options map to compojure/site when you init the server
14:11ibdknoxpandeiro: 1.3.0-alpha4 cleans that up
14:11andrewvosRight 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:12ibdknoxandrewvos: what kind of project?
14:12andrewvosibdknox: A web app using the noir framework
14:12pandeiroibdknox: much appreciate the answers, keep up the good work
14:12ibdknoxandrewvos: did you use lein noir new to create it? :)
14:12ibdknoxpandeiro: anytime :)
14:12andrewvosibdknox: No! I will do though thanks :)
14:12chhildebandrewvos does leoin noir new not work?
14:14andrewvoschhildeb: I had not installed lein even
14:14ibdknoxandrewvos: ah, you definitely want to do that
14:15ibdknoxandrewvos: then follow the instructions on http://www.webnoir.org
14:15ibdknoxthat'll get you a running site very quickly :)
14:15andrewvosibdknox, chhildeb Thanks
14:15andrewvosWow leiningen is 9mb?
14:15andrewvosRhetorical
14:16chhildebandrewvos: in case you also use ccw, also use lein-ccw afterwards to make that project structure work for eclipse.
14:16andrewvoschhildeb: ccw?
14:16chhildebcounterclockwise
14:16ibdknoxandrewvos: it's an eclipse plugin for clojure
14:16chhildebThought that might be the reason you don't use lein
14:16andrewvoschhildeb: I won't be using Eclipse again in this life.
14:16ibdknoxhaha
14:17chhildebandrewvos: Probably for the best. Unless you haven't tried e4 yet.
14:18chhildebandrewvos: Which is much more like emacs than eclipse 3 in terms of customizability
14:18chhildebandrewvos: With the added bonus that you can use clojure for customization instead of elisp.
14:19andrewvoschhildeb: You're not selling Eclipse to me :)
14:20tmciverchhildeb: you can use Clojure to customize Eclipse?
14:21chhildebtmciver: Eclipse 4, yes. Eclipse 3, I don't think so.
14:21andrewvosSo lein in written in clojure?
14:22andrewvoss/in/in
14:22andrewvoss/in/is
14:22chhildebtmciver: 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:22tmciverchhildeb: it's been a while since I seriously used Eclipse.
14:22tmciverchhildeb: but I don't mind elisp in emacs; if you squint your eyes, it looks like Clojure.
14:24andrewvosheh
14:25chhildebtmciver: 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:31tmciverchhildeb: 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:41augustlshould I use markdownj for markdown support in my noir app?
14:42augustlclj-markdown seems dead, it's depending on contrib for example
14:42andrewvosRight 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:43andrewvosI'm using noir so if I could circumvent having to do an actual request that would be nice...
14:44andrewvosI suppose I'm looking for something like capybara
15:02ibdknoxandrewvos: look at the noir.util.test namespace: http://webnoir.org/autodoc/1.2.1/noir.util.test-api.html
15:02ashafacljsc/build question
15:03ashafacan you exclude a namespace when compiling
15:03ashafa?
15:03andrewvosibdknox: I am actually. Not finding any example articles online though :(
15:03dnolenashafa: what do you mean?
15:05ibdknoxandrewvos: https://github.com/ibdknox/noir/blob/master/test/noir/test/core.clj#L76
15:05ashafadnolen: i figured out another solution
15:06ashafabut basically i wanted to compile with optimize simple a directory but not include certain sub-directories
15:08weavejesterandrewvos: As far as I know there's nothing directly analogous to Capybara, yet.
15:08weavejesterandrewvos: There is ring-mock, for creating Ring requests for sending to handlers
15:09ashafaif theres a way to do that it would be the path i would love to take
15:12andrewvosweavejester: Thanks
15:12andrewvosDoes `lein test` normally take about five seconds?
15:13ibdknoxJVM startup is pretty slow, you might try lein interactive
15:13ibdknoxthen you can just run test over and over again
15:14andrewvosibdknox: Is that what everyone uses?
15:14ibdknoxI think most people just test in the repl and use lein test :)
15:14ibdknoxbut I'm not a big TDD'r so probably not the best person to ask
15:15andrewvosibdknox: Thanks
15:20horatio_cromwellclojure, 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:21TimMcCouldn't understand your question.
15:21TimMcAre you asking about methods vs. functions?
15:22augustlhoratio_cromwell: not sure what you're refering to with "data with behaviour is an advancement in programming"
15:22augustlhasn't most people been complecting data and behaviour for ages? Not much advancement there lately.
15:22horatio_cromwellthe concept of encapsulating behaviour and data in a package that is manipulated by an interface
15:23augustlhoratio_cromwell: after just briefly touching clojure I find object oriented programming incredibly complex and odd
15:24augustlanecdotal I know ;)
15:24mdeboardAre you asking how Clojure people feel about stateful data structures?
15:24TimMcI think he's asking about methods, which are functions bound to data structures.
15:25ibdknoxI think he's talking about plants. :D
15:25TimMcSo, a piece of code is always (usually?) attached to some class.
15:25TimMcYou could have persistent data structures with methods. I don't think there's a conflict there.
15:25augustlI 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:26ibdknoxhoratio_cromwell: I think if you consider the general history of programming that most "advancements" have been things that decoupled parts of your program
15:26augustlvalidations, data processing, persistence, and much more :)
15:26ibdknoxhoratio_cromwell: OOP inherently couples data and behavior, with the suggested notion that encapsulation is the benefit
15:27horatio_cromwellwell 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:27TimMcPython has a bit of the right notion -- functions don't have to be attached to classes.
15:28ibdknoxhoratio_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:28TimMchoratio_cromwell: Repaste following "as supposadly this" -- it was cut off.
15:28ibdknoxhoratio_cromwell: I haven't looked back... and I used to be the PM in charge of C# and VB :p
15:28horatio_cromwell as supposadly this was menat to be an advancent over procedural code
15:29jowagIn 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:29horatio_cromwellby 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:30augustlhoratio_cromwell: I recommend http://www.infoq.com/presentations/Simple-Made-Easy if you haven't seen it
15:30ibdknoxhoratio_cromwell: well, I think that depends on what trend you're following
15:30horatio_cromwellTimMC: as supposadly this was menat to be an advancent over procedural code
15:30augustlbasically a 1h talk on clojure with no code in it
15:30alandiperthoratio_cromwell, check out http://groups.google.com/group/clojure/msg/330c230e8dc857a9, helped me understand
15:30TimMchoratio_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:30ibdknoxhoratio_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:31ibdknoxhoratio_cromwell: so I don't really think Clojure is going against the grain
15:31mdeboardibdknox: Pypy is trying to implement STM too I guess. Not sure how good the implementation will be
15:31horatio_cromwellOK, well my background is Python, although I was made to use C++ for work
15:31ibdknoxmdeboard: haha cool
15:32horatio_cromwellto 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:32alandiperthoratio_cromwell, btw welcome to the party, help yourself to the parentheses buffet :-)
15:33ibdknoxin case anyone is interested, I figured out how to eval while preserving line numbers
15:33arkhcan jline use vim bindings?
15:33horatio_cromwellI 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:33horatio_cromwell:P
15:33ibdknoxarkh: why not run your repl in VIM?
15:33ibdknoxhoratio_cromwell: it's a good place to be :)
15:33arkhI'd like to use ClojureScript One which wraps a repl in jline
15:34horatio_cromwellyep, clojurescript is another thing that is tempting me, and the google closure integration for web client side dev
15:34arkhibdknox: and I'd like to try to "develop from the repl" which I hear is the cat's meow ; )
15:35horatio_cromwellI 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:35ibdknoxarkh: 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:35arkhibdknox: I've used vimclojure with some satisfaction but I'd like to develop with better turnaround and try things from just a repl
15:35arkhibdknox: that's true
15:36ibdknoxarkh: 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:36alandipertarkh, don't know about jline, but if you wrap with rlwrap instead, it respects your ~/.inputrc
15:36arkhalandipert: cool - good to know
15:36TimMcibdknox: Do tell, re: line numbers.
15:37arkhibdknox: 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:38arkhibdknox: the workflow still seemed a bit combersome but maybe that's my ignorance of everything vimclojure allows a person to do
15:38ibdknoxTimMc: create a LineNumberingPushbackReader then in a loop (with-bindings {clojure.lang.Compiler/LINE_AFTER ...and LINE_BEFORE eval the code
15:38augustllooking for a clojure HTML parser that turns a string into a hiccup style vector
15:39ibdknoxaugustl: data.xml can do that I think. there's also clj-tagsoup
15:39horatio_cromwellanyone got any experience of moving from say java/python to cljure and how they found the transition
15:39augustlibdknox: just found clj-tagsoup, looks good, thanks :)
15:40ibdknoxarkh: can you describe your workflow
15:40augustlibdknox: what's data.xml?
15:40TimMchoratio_cromwell: It was not hard, although I went through JS and Scheme on the way. :-)
15:40ibdknoxaugustl: https://github.com/clojure/data.xml
15:40RaynesGod. clj-tagsoup.
15:40TimMcJS helped on the functional end of things, since I was working with closures.
15:40ibdknoxRaynes: is there a better alternative?
15:40horatio_cromwellTimMc: I am not suggesting it's hard, just wondering what the productivity benefits are
15:40arkhhoratio_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:40Raynesibdknox: Know, but I sure wish there was.
15:41ibdknoxyeah
15:41ibdknoxme too
15:41ibdknoxlol
15:41RaynesNo. Jesus. I've got to stop staying up so late.
15:41hypercube32was jesus keeping you awake? lol
15:41horatio_cromwellI 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:41Bronsawhat time is it where you are
15:41hypercube32maybe you need a jesus touched me doll j/k
15:41RaynesBronsa: 2:43PM. I just woke up.
15:42Bronsawoah
15:42horatio_cromwelle.g. Ruby to me is too similar to python but inmo with more downsides
15:42horatio_cromwellso i wouldn;t learn that
15:42horatio_cromwellerlang is interesting
15:42horatio_cromwelland clojure
15:42arkhibdknox: 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:42RaynesRuby is like Python only it isn't completely nuts. Only partially so.
15:43hypercube32erlang is just eccentric punishment :P
15:43ibdknoxarkh: vimclojure allows you to have the repl directly inside VIM, it also lets you just evaluate forms magically
15:43ibdknoxarkh: it approximates the emacs magic pretty well
15:43RaynesVim is so not made for that.
15:43arkhibdknox: ok - maybe I should pursue that harder then I have
15:43horatio_cromwellhypercube32: the erlang VM/runtime is impressive
15:44TimMchoratio_cromwell: I am enjoying programming more. :-)
15:44hypercube32horatio_cromwell, ive never actually used it but ill keep that in mind
15:44RaynesI don't even want to think about what the VimL to implement that nailgun stuff looks like.
15:44horatio_cromwellhypercube32: I have the stuart holloway book in my amazon basket, is that any good ?
15:44arkhyes, thank you Mr. Brandmeyer
15:45ibdknoxRaynes: scary
15:45hypercube32horatio_cromwell, i wouldnt know i havent messed with erlang much
15:45hypercube32horatio_cromwell, read the amazon reviews on it
15:45RaynesI don't know about an editor language that doesn't have a built in way to get a visual selection programmatically.
15:46horatio_cromwellhypercube32: lol sorry the book is called programming clojure
15:46horatio_cromwellhypercube32 by stuart holloway
15:46TimMcibdknox: Ah, so you are pre-filling the line numbers?
15:46hypercube32oh sorry, didnt know what you were refering to, i learned via internet, not the books
15:46horatio_cromwellhypercube32: np
15:46dnolenhoratio_cromwell: I tell people Clojure is OO "The Good Parts"
15:46ibdknoxTimMc: using the reader I can keep track of the numbers magically, just have to rebind them
15:47horatio_cromwelldnolen: but in the rationale written by rich hickey he complains about OO
15:47dnolenhoratio_cromwell: "The Bad Parts"
15:48horatio_cromwellso basically the concesus is, clojure is where its at ?
15:48horatio_cromwellconsensus
15:48horatio_cromwell:)
15:48dnolenhoratio_cromwell: there are lots of interesting languages out there.
15:49dnolenhoratio_cromwell: but I think Clojure has a sweet spot as far as feature set and community
15:49horatio_cromwelldnolen: well I have been loooking at a number of them and I have come down to erlang and clojure
15:49TimMchoratio_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:50horatio_cromwellTimMc what have you used in the past the
15:50horatio_cromwelln
15:50TimMcJava, JS, Python
15:50horatio_cromwellhow would you rank them all in order of productivity
15:50TimMcOh, and I have used PLT Scheme and C briefly, but not really for projects.
15:50horatio_cromwellJava, JS, Python, Clojure ?
15:50horatio_cromwell:)
15:51TimMcSomethin like that, yes.
15:51TimMcWith Python I can generally move pretty fast, but periodically get bogged down in circumventing some horrible design flaw.
15:51horatio_cromwellwell 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:52TimMcOCaml looks really cool, but I had trouble with the syntax. I'll take another stab at, or more likely Haskell.
15:52TimMcEveryone should probably learn Haskell at some point. :-)
15:53horatio_cromwellTimMc: yeah I lookedat Haskell (briefly), but it sort of strikes me as very acedemic
15:53tmciverI gotta learn me a haskell
15:54Raynes&he 1 + 2 + 3 + 4
15:54lazybotjava.lang.RuntimeException: Unable to resolve symbol: he in this context
15:54hiredman~python
15:54clojurebotpython is (defmulti #^{:doc "docs for foo"} foo class)
15:54Raynes$he 1 + 2 + 3 + 4
15:54lazybot⇒ 10
15:54hiredman~python
15:54clojurebotpython is ugly
15:54RaynesHaskell!
15:54hiredman~botsnack
15:54clojurebotthanks; that was delicious. (nom nom nom)
15:55RaynesToo bad you can't write Vim scripts in Haskell.
15:55horatio_cromwellTimMc: what horrible design flaw you talking about regarding Python ?
15:55RaynesThat'd be something to see.
15:55Raynes"Sorta strikes me as academic" sorta strikes me as "I heard someone say it was mostly an academic language."
15:57TimMchoratio_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:58TimMchoratio_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:58RaynesLots of people use xmonad. Not just Haskellers.
15:59RaynesHahaha, TimMc, I was just telling ibdknox how I wrote https://refheap.com/paste/255 last night and wanted to kill myself.
16:00TimMcOK, getting groceries.
16:02thorwilhmm, clojurescript-one's script/deps fails with "script/bootstrap: 36: jar: not found" here
16:03augustlhow do I turn [:baz, :maz] into [:foo, :baz, :maz]?
16:03tmciver&(doc cons)
16:03lazybot⇒ "([x seq]); Returns a new seq where x is the first element and seq is the rest."
16:04augustlthanks
16:04tmciver&(cons :foo [:baz :maz])
16:04lazybot⇒ (:foo :baz :maz)
16:05tmciver&(vec (cons :foo [:baz :maz]))
16:05lazybot⇒ [:foo :baz :maz]
16:05augustlthanks again :)
16:05horatio_cromwellTimMc: 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:06tmciverhoratio_cromwell: he's getting groceries! :P
16:09tmciverIs there a way to recursively call an anonymous function? (fn [a] ... recur)
16:09RaynesYou can name it.
16:10Raynes(fn x [a] … (x newa)).
16:10RaynesNot sure about recur.
16:10jamiltronRecur seems to work with a trivial test.
16:11Raynes&((fn [x] (if (< x 3) (recur (inc x)) x)) 1)
16:11lazybot⇒ 3
16:11RaynesYep.
16:11tmciverRaynes: I tried creating a multi-arity anonymous function and it didn't work for me.
16:11alandiperttmciver, there's also letfn
16:11mdeboardA boolean in Java is the same as a boolean everywhere else right? True/False etc
16:12tmciveralandipert: yes, I was trying it first in a normal let.
16:13hiredmanrecur 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:13thorwilshould i have a "jar" command on my path?
16:13jamiltron&((fn [x y] (if (= (- x y) 0) 0 (recur x (inc y)))) 5 1)
16:13lazybot⇒ 0
16:13tmciverhiredman: well, that explains it.
16:13tmciverthanks
16:14tmciverRaynes: duh, I didn't realize you could name a function in fn. :/
16:15horatio_cromwellI have still not had an answer from someone who was a OOP evangelist who has converted to clojure :)
16:15Raynestmciver: The name is totally local though. Just a way for you to refer to the function inside the body of the function.
16:15augustlhmm, hiccup seems to unescape html entities. It turns <code>&lt;script&gt;</code> into <code><script></code>. Anyone know how to disable that?
16:16ibdknoxaugustl: https://github.com/weavejester/hiccup/blob/master/src/hiccup/core.clj#L22
16:16augustlI don't want it to escape
16:16augustlI want it to not unescape :)
16:17hiredmanhoratio_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:17augustlhmmm, now I got it to not unescape, by changing nothing at all. I apparently don't quite grok what's going on :)
16:18ibdknoxaugustl: to my knowledge, hiccup doesn't escape input
16:18augustlindeed, (html5 [:body [:code "&lt;script&gt;"]]) works just as expected
16:20augustlit's an issue with the clj-tagsoup parser
16:21augustlIt turns ""<p>Hello, <code>&lt;script&gt;</code> World!</p>"" into [:html {} [:body {} [:p {} Hello, [:code {} <script>] World!]]]
16:21augustlhow nice..
16:21ckirkendall`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:21ibdknoxckirkendall`: it includes the google closure extensions
16:21Raynesckirkendall`: Hahaha, goof.jar. Excellent.
16:21horatio_cromwellhiredman: 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:22augustlso I'm guessing this is _actually_ an issue with the Java tag soup parser it uses under the hood
16:22hiredmanhoratio_cromwell: either does js, but js has objects, so are classe fundamental to oop or objects?
16:23hiredmanthere are so many different kinds of systems that claim to be "oop" that it has lost most of it's descriptive power
16:24hiredmanif I say "language X is object oriented" what does that tell you about language X? not a lot
16:24ckirkendall`Ibdknox thats what i thought
16:24horatio_cromwellhiredman: 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:25tmciverhoratio_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:26hiredmanhoratio_cromwell: so are clos generic functions object oriented?
16:26horatio_cromwellhiredman: 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:27hiredmansure, 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:27hiredmanhoratio_cromwell: do you have a specific language or set of features you want to ask about?
16:28augustlanyone 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:29RaynesThere aren't many options for html parsers.
16:29tmciverhoratio_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:29horatio_cromwellhiredman: I wil RTFM :), you don't know what I mean
16:29augustlI wonder what the rationale is for a html parser to unescape entities...
16:29hiredmanhoratio_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:29RaynesHTML5 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:30horatio_cromwelltmciver: you talk like someone who has been press ganged into coding in clojure
16:30horatio_cromwell:)
16:30Raynes(the page fonts take about 30 seconds to load, so give it a minute.
16:30Raynes)
16:30tmciverhoratio_cromwell: not at all
16:31tmciverit's a pleasure to use Clojure.
16:31dnolenhoratio_cromwell: in Clojure you also have containers for data and behavior via polymorphic functions.
16:31dnolenhoratio_cromwell: the big difference in Clojure from most languages with classes is that you don't have inheritance.
16:32augustlRaynes: I guess I should find me a real template language ;)
16:32augustlcurrently 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:37ritrehoratio_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:38dnolenritre: I wouldn't go that far ;)
16:38ritrednolen: why?
16:39dnolenritre: I think other languages that offer that realization as well
16:40mdeboardWho 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:40dnolenritre: but again, maybe Lisp is a sweet spot
16:41ritrednolen: surely
16:42ritreno language holds that concept so clearly and firmly
16:43ritrethan lisp
16:56dnolenritre: I've been impressed by the simplicity of term manipulation in Prolog
17:02ritrednolen: hmm, I've never tried prolog, but I wanted to learn it
17:40DerGuteMoritzI 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:41DerGuteMoritzs,regard it as implemented,regard the type as satisfiying the protocol,
17:43DerGuteMoritzexample: http://moritz.twoticketsplease.de/paste/prot.clj.html
17:47DerGuteMoritzI 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:48amalloythat'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:48DerGuteMoritzamalloy: yeah that's why I'm asking for enlightenment :-)
17:49DerGuteMoritzbut given that there is no description of the actual behavior in the documentation it may as well be a bug
17:50DerGuteMoritzI mean "Returns true if x satisfies the protocol" parses as "implements all methods of the protocol" for me
17:50DerGuteMoritzwell, the second half of that sentence :-)
17:51BronsaIMO in such a case extends? should return true wether satisfies? should retourn false
17:51Bronsa*wheter
17:51Bronsa*whether
17:52DerGuteMoritzBronsa: well, satisfies? works on instances while extends? works on types ... not sure!
17:52DerGuteMoritzI'd expect extend, extend-type, and defrecord to bomb
17:52DerGuteMoritzand reify I guess
18:08augustlimplementing commonjs with clojure as backend using spidermonkey or v8... hmmm :)
18:09adiabaticSo 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:11adiabaticput another way: what sorts of errors cause NullPointerExceptions?
18:11alexbaranoskyadiabatic, some method attempted to be called on a null
18:12adiabaticaha!
18:12alexbaranoskyadiabatic, 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:12adiabaticRight. I'm not stopping when I get to the end of the list.
18:13alexbaranoskyadiabatic, was that helpful?
18:13adiabaticyes
18:15adiabaticmmph, they're really testing for lazy
18:44amalloyadiabatic: 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:56mdeboardI'm looking through the cascalog source; what is the significance of the double colon e.g. `(defstruct edge :source :target ::extra-data)`
19:57ibdknoxmdeboard: it namesapces the keyword
19:57mdeboardI don't understand.
19:57ibdknoxlet's say I'm in ns foo
19:58ibdknoxand I want to use a keyword in a map called :name
19:58mdeboardCan you think of a simple example off the top fo your head by chance?
19:58ibdknoxmdeboard: korma uses it so that keys in maps don't collide
19:59ibdknoxif I have a map that other people might assoc into and I use a really common name
19:59ibdknoxthe probability that my key is overwritten is pretty high
19:59ibdknoxin other languages the solution would be to obfuscate the name
19:59ibdknoxso instead of using :foo I would use :__foo
20:00ibdknoxbut keywords can be namespaced
20:00ibdknoxallowing you to sidestep the issue entirely
20:01ibdknox,(= :foo ::foo)
20:01clojurebotfalse
20:01ibdknox,::foo
20:01clojurebot:sandbox/foo
20:01ibdknox,:foo
20:01clojurebot:foo
20:01mdeboardhuh
20:01mdeboardOk, cool
20:29notsonerdysunnywhat happens when there are cyclic-dependencies in the clojure-files by means of which name-space requires which namespace
20:33mabes_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:34notsonerdysunnymabes_: thanks.
21:15scottjnot sure if I'm missing something here, but does the cljs1 sample app just consist of what's your name and hello name?
21:16scottj(beside the documentation)
21:26tolstoyIf you run (shutdown-agents) in a repl (slime/swank), is there a way to recover without restarting the running image?
21:28tolstoyEven 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:32tolstoyHm. Looks like the answer is, "Don't run shutdown-agents."
21:41TimMc"Unable to resolve var: leiningen.repl/*retry-limit*" when I run leiningen -- any idea?
21:45TimMcLooks like that var was renamed at some point to lose its earmuffs, but why is my init.clj only now causing that problem.