#clojure logs

2013-01-27

00:53cakeheroHi team
00:53cakeherois this answer correct: http://cl.ly/image/0H0T3P320G1o
00:54Rayneslol
00:54Raynesamalloy: ^
00:54RaynesPretty good one, I'd say.
00:54cakeherothanks
00:54cakeheroI'm super good at algorithms
00:54cakeherofor finding maximums
00:55cakeheroRaynes I wonder if I could have it randomly pick from the three numbers, and just re-run it until it gets the right answer
00:55cakeheroI'm going to try that
00:59cakeheroRaynes http://cl.ly/image/2m1R0P0z3H2e getting there
01:01cakeherohttp://cl.ly/image/0Q1D1j3T0u1y <--- random
02:31danbellAnyone know how to stop a call to reduce in the middle? Say I've got an infinite sequence, and I want to process members of it until $arbitrary-truthy-thing. Anyone know how to do this?
02:31RaynesYou can't do that.
02:32amalloywell. in 1.5 you can do that
02:32RaynesWhat?
02:32clojurebotwhat is exceptions
02:32amalloyprevious to 1.5, the best you can do is loop/recur, or use reductions and take-while
02:32RaynesReducers crap?
02:32amalloynah, not really related
02:32RaynesThen explain, man!
02:32amalloy(reduced 10) ;; the answer is 10, stop reducing
02:32danbellthanks Raynes; I noticed M. Fogus alluding to "how to short-circuit reduce"
02:33danbelloh, reductions might be what I'm looking for
02:34Raynesamalloy: What do you mean it isn't related to reducers? I can't find any instance of 'reduced' outside of reducers.
02:34amalloyi find reductions often sounds pretty cool, but most of the time using it leads to less readable code
02:35RaynesOh
02:35RaynesI'm dumb.
02:35amalloyRaynes: support for reduced could have come without all the big reducers changes
02:35RaynesI see the reduced function in core.clj now.
02:35danbellare reducers considered to be...off?
02:35amalloydoes that mean something, or is it just...drama?
02:36RaynesI called it 'crap' because I haven't bothered learning what it is yet and I hate things I don't understand.
02:36danbellha
02:36danbellyeah, was keying off of raynes' crap comment
02:36amalloyno, Raynes is just a twit
02:36amalloyreducers are pretty cool
02:37danbellreading about them now...
02:40RaynesI wish somebody other than Rich would write about reducers. He is great and all, but these weird bullet points with questions peppering his blog post confuse me more than they help me.
02:41RaynesAnd he is all "I'll give you the end first <bullet points>. Story starts best at the bottom."
02:41RaynesOKAY, MAN, CAN YOU TELL ME ABOUT REDUCERS NOW!?!?!
02:47tomojdo you know Foldable?
03:16yedianyone have guidelines or best practices for writing wrappers of java libraries
03:19AtKaaZhey guys, how would you do this: #{"yes" or "make it settable" or "something [1]"} and have the `or` be ignored or be `,` ?
04:55grcTrying to get my head around why ('foo 1 2) => 2. Any explanations?
04:55tomojah, I understand why there is no INamed in cljs :(
04:55tomojgrc: ##('foo {'foo 3})
04:55lazybot⇒ 3
04:56tomoj&('foo {'bar 3} 2)
04:56lazybot⇒ 2
04:56tomoj&({'bar 3} 'foo 2)
04:56lazybot⇒ 2
04:56tomojmake sense now?
04:57tomoj(doc get)
04:57clojurebot"([map key] [map key not-found]); Returns the value mapped to key, not-found or nil if key not present."
04:57grctomoj: Thanks.
04:57tomojsymbols, keywords, and maps all act as functions with get-like signatures
04:59tomojI wonder why not (= :foo (0 [:foo])) in cljs
05:25tomoj&(mapcat inc)
05:25lazybotclojure.lang.ArityException: Wrong number of args (1) passed to: core$map
06:00tomojI was thinking you could do "extend AProtocol to any type which implements BProtocol but doesn't already have an AProtocol impl" inside a default AProtocol impl
06:00tomoj..but then everything satisfies AProtocol
06:01tomojI guess you could put it in a helper function instead of a default
06:39z3phyrwhat do you say about joxa?
06:40z3phyrIt looks much like clojure.
06:44tgoossensAnyone knows a library for working with graphs. Preferably includes loop detection .
06:44tgoossensI'm looking at clojure contrib now. But
06:45tgoossensmaybe some of you know some other interesting stuff
06:49hcumberd`:)
06:55z3phyrjoxa is a mixture of clojure and scheme and targets BEAM
06:56z3phyrreally, a must try language for clojure fans
07:05z3phyrjoxa is a language I look to
07:09saint_cypheris clojurescript one still a good starting place or is it old and busted?
07:11z3phyrsaint_cypher : It was a good starting place when I last checked
07:13z3phyrand if anybody wants to experiment, try joxa. Its too good IMHO
07:14saint_cypherz3phyr: thanks, I just noticed that it hadn't been committed to in a year and still had lein bootstrap in the docs so I had some hesitation.
07:17hcumberd`Is there a better / shorter way to write (DataInputStream. (FileInputStream. file)) ?
07:50rlhm is there any built-in symbol for current directory when compiling a faile?
07:50rl*file
07:50rlor do i have to do some processing againast *file* ?
08:12rlnvm, found a solution at http://www.learningclojure.com/2010/03/conditioning-repl.html
08:12hcumberd`;)
08:30tomojsaint_cypher: there's an M003 branch with somewhat more recent commits
09:45pepijndevosdnolen: core.logic/ping
09:48pepijndevosI'm staring at dcg.clj. I'm interested in playing with it. But I remember you said somewhere it's slow. It's also littered with todo statements, and quite big for the cosmetic transformation wikipedia makes it out out be.
09:58ChongLiare these differences up to date?
09:58ChongLihttps://github.com/clojure/core.logic/wiki/Using-core.logic-with-ClojureScript
09:58gfredericks,(take 10 (reify clojure.lang.ISeq (first [this] 42) (more [this] this) (seq [this] this)))
09:58clojurebot(42 42 42 42 42 ...)
10:00maxalwingsIs there any Lobos related tutorial out there?
10:01pepijndevosChongLi: I was wondering the same. Especially FD stuff.
10:15svjsonI'm running JDK7 on my machine - is there any way to tell leiningen/lein-ring to compile to JRE6-compatible bytecode?
10:20svjsonthere is :javac-options ["-target" "1.6" "-source" "1.6"], but I read that as affecting .java-files included in the leiningen project, not that it will apply to the compiled clojure files. True?
10:24hyPiRionsvjson: true
10:26hyPiRionI'll have a peek
10:26svjsonhyPiRion: thanks
10:28svjsonThere's the option of downgrading to JDK6, of course. But that would be to take the long way around, to say the least
10:33hyPiRionSo we're using clojure.core/compile to compile down to bytecode, but I'm not sure how to pass options to that one
10:33hyPiRionCurrently there's no way of specifying so.
10:34svjsonRight. So downgrading to JDK6 might be my best bet, anyway then.
10:35svjsonSeems pacman would have me remove all dependent packages first, and re-install them once JDK6 is in place. Quite a headache :/
10:35svjsonhyPiRion: Thanks for looking into it, in any case
10:36hyPiRionsvjson: Sounds messy, couldn't you just install JDK6 and keep JDK7?
10:36hyPiRionIf I were you, I'd use JDK7 and set LEIN_JAVA_CMD to point to JDK6
10:37svjsonpacman won't let me. It mentions unresolvable conflicts when trying to install them side by side.
10:38hyPiRionhuh, strange
10:38svjsonProbably has to do with how they are packaged. Both 6 & 7 come from the Arch Linux User Repository, so they are not official packages
10:38svjsonI've had different JDK versions set up side by side on machines in the past, but never on Arch
10:39hyPiRionSounds messy, it's rather simple to set up on Debian (and prolly Ubuntu too)
10:40svjsonYeah, agreed
10:42hyPiRionThere is no spoon.
10:44svjsonenlive sure is mind-bending. But in a good way :)
10:46Iceland_jackAs opposed to mind-bending in a bad way ;)
10:47josteinksvjson: absolutely
10:47svjsonIceland_jack: point :)
10:48josteinkAfter years and years of template-placeholder oriented web design and OO/control-oriented web design
10:48josteinkit feels like something new, something -interesting- for once
10:53svjsonjosteink: Exactly what I felt when I ventured down that rabbit hole
10:58svjsonTurns out that culprit in all this might be clj-json - the project wont compile at all under JDK6.
10:58svjsonIs there any way to tell which Java version libs are compiled for? I
11:02svjsonSo, moving from clj-json 0.5.3 to 0.5.0 builds on JDK6. What would life be without excitement?
11:03pepijndevosDoes core.logic have difference lists? and…. is it relevant?
11:03pepijndevoshttp://homepage.cs.uiowa.edu/~fleck/dcgTrans.htm
11:17pepijndevosWhat is the correct check if something is an expression in a macro? list? seq?
11:19cemerickit looks like browser-REPL is busted in ClojureScript builds >= 1535 (NPE attempting to compile any namespace that requires clojure.browser.repl). Can anyone confirm this, or call me crazy?
11:20hyPiRion,(map (juxt list? seq?) ['(a b c) (list 1 2 3) [1 2 3]])
11:20clojurebot([true true] [true true] [false false])
11:20Bronsa,((juxt list? seq?) (cons 1 '(2)))
11:20ChongLicemerick: how do I check which cljs version I have? I'm using cljsbuild
11:20clojurebot[false true]
11:21Bronsa,((juxt list? seq?) (map identity '(2)))
11:21clojurebot[false true]
11:21Bronsause seq?
11:26cemerickChongLi: it looks like cljsbuild uses 0.0-1552, which means I must be crazy :-/
11:26ChongLiahhh
11:26ChongLithe browser repl is pretty hard to use anyway
11:26ChongLiI have no idea how to get it working with my page being served by ring
11:27ChongLiseems like it'd be a lot of work
11:27cemerickWorking on making it easier :-)
11:27ChongLithe same origin policy really kills us here
11:27cemerickit's just another port number, so same origin doesn't matter
11:27ChongLihmm
11:27cemerickthough you can't just load the HTML file from disk
11:28ChongLiyeah that's what I mean
11:28ChongLithe hard part is you need to use a web server
11:29ChongLiseems like the cleaner way to go would be to have an in-browser terminal connected to a repl running on cljs-on-cljs
11:29ChongLiavoid the web server, avoid the jvm compilation step
11:29ChongLican you run a server in javascript with websockets?
11:30ChongLiyeah looks like it
11:30ChongLiso you could have an nrepl server running in the browser
11:33ChongLithe other idea I like is to run a browser inside light table
11:35Arxontas_tou_Skohello :))
11:36ChongLihi
11:36Arxontas_tou_Skoi have a dynamic var,represent a list
11:36Arxontas_tou_Skoi want to copy it to an immutable list
11:36Arxontas_tou_Skohow can i do it?
11:37ChongLithe list is immutable
11:37ChongLionly the var is mutable
11:37Arxontas_tou_Skothe first list is local binding
11:38Arxontas_tou_Skoi want to copy it to a normal immutable list
11:38ChongLiI still don't quite understand
11:38Arxontas_tou_Skohow to copy a thread local list,to a normal immutable list
11:39ChongLiyou mean you def'd it with ^:dynamic
11:39ChongLi?
11:40Arxontas_tou_Skoyes,its dynamic and thread local
11:40Arxontas_tou_Skoi want to copy it
11:40ChongLiwhere?
11:40clojurebotwhere is log
11:41ChongLiclojure is a functional programming language, you don't copy things around
11:41ChongLithat's an imperative concept
11:41ChongLijust return the list from a function
11:42Arxontas_tou_Sko1 minute sorry
11:46pepijndevoswhy is there now llast :
11:51Arxontas_tou_SkoChongLi: i want to save a thread local var,to a normal var
11:52ChongLi&(def ^:dynamic x '(1 2 3))
11:52lazybotjava.lang.SecurityException: You tripped the alarm! def is bad!
11:52ChongLiahh
11:52ChongLidamn it
11:52ChongLiyeah, what you're saying doesn't make sense
11:53Arxontas_tou_Sko:)
11:53Arxontas_tou_Skoi am newbie
11:53ChongLimy advice is not to use thread local vars right now
11:53ChongLithey are an advanced feature
11:54Arxontas_tou_Sko(def ^:dynamic x '(1 2) ) -->i want to copy the value to an immutable name
11:54ChongLi(def y x)
11:54ChongLithere you go
11:54Arxontas_tou_Skoits causes problems i think
11:54ChongLiwhy?
11:54clojurebotwhy not?
11:55Arxontas_tou_Skoi tried it,if you change y ,x also changes!
11:55ChongLiyeah, of course
11:55ChongLiyou're not supposed to change defs
11:55BronsaArxontas_tou_Sko: #'x is mutable, x returns the immutable value
11:56Arxontas_tou_Skook guys thx for trying to help me i will read more :)
11:56ChongLiArxontas_tou_Sko: in functional programming you want to think about "what is"
11:56BronsaArxontas_tou_Sko: http://sprunge.us/dTNG
11:56ChongLinot "how to do it"
11:56ChongLiyou're telling the computer what you think the values of different things are
11:57ChongLiyou're not telling it how to do its job
12:00pepijndevosI forgot how refreshing works...
12:00pepijndevos(minikanren)
12:03gfrederickspepijndevos: refreshing?
12:03pepijndevosgfredericks: when you call fresh on a variable that is already bound
12:04pepijndevosI think it's just like le. I the stoce it's just a fresh thing
12:04gfredericksyou don't call fresh on variables; fresh always gives you new variables
12:04pepijndevos*let
12:04pepijndevosbut i mean, call on a symbol that is already defined
12:04pepijndevos(run [q] (fresh q))
12:04gfredericksyou're shadowing it the same way you might do with let
12:04pepijndevosright
12:04Arxontas_tou_Skogfredericks do you know how to get the value of a thread local var,and copy it in a normal var?
12:05gfredericksArxontas_tou_Sko: getting the value of thread-local vars is done by implicitely dereferencing them, the same as a normal var
12:05gfredericks(defn thread-local-value-of-x [] x)
12:05ChongLigfredericks: Arxontas_tou_Sko is new
12:06ChongLiand seems to be doing something wrong :)
12:06gfredericksArxontas_tou_Sko: you can do (def a-normal-var some-thread-local-var), but this would be highly unidiomatic, as I expect people have said before
12:06ChongLiI don't think he's quite understood functional programming
12:07ChongLiand seems to be trying to write an imperative program with mutation
12:07Arxontas_tou_Skoi will try again thx anyway guys :)
12:07gfrederickspepijndevos: (run* [q] (fresh [q] (== q 42))) returns (_0), since the two q's are different variables
12:07ChongLiArxontas_tou_Sko: read SICP
12:07pepijndevosyea, makes sense.
12:07ChongLihttp://mitpress.mit.edu/sicp/full-text/book/book.html
12:08pepijndevosgfredericks: I'm doing my own cfg implementation
12:08Arxontas_tou_SkoChongLi functional programming runs in my veins but the flow just started :)
12:08Arxontas_tou_Skook i will read more :)
12:24Arxontas_tou_Skoi want to get the value of a dynamic(thread local var),and make it immutable stored in a normal var
12:24Arxontas_tou_Skoone last try
12:24gfredericksArxontas_tou_Sko: what happened when you used the def approach I suggested?
12:24Arxontas_tou_Skothe new var shares the mutable value
12:25Arxontas_tou_Skonot a copy of it i think...
12:25gfrederickswhat kind of object is this "mutable value"?
12:25Arxontas_tou_Skoa list
12:25gfredericksa clojure list?
12:25Arxontas_tou_Skoyes
12:25gfredericksclojure lists are immutable so there is no need to explicitely copy them
12:26ChongLiI tried explaining that earlier
12:26gfredericksif you (def a-normal-var a-dynamic-var-holding-a-list) then the list is not copied, because there's no need as it's immutable
12:26gfredericksbut a-normal-var is updated to point to the same list that the dynamic var does
12:27ChongLiI think Arxontas_tou_Sko misunderstands the purpose of ^:dynamic
12:27Arxontas_tou_Sko^:dynamic mean mutable right?
12:27gfredericksno
12:27gfredericksnormal vars are mutable
12:27ChongLithat's technically true but not really helpful at this stage :)
12:28ChongLiArxontas_tou_Sko: think of everything in Clojure as being immutable for now
12:28ChongLiwrite a program without trying to mutate anything
12:28Arxontas_tou_Skook i so newbie i dont know how to even ask:)
12:28Arxontas_tou_Skobye guys thx for trying
12:28ChongLiArxontas_tou_Sko: wait!
12:29ChongLidon't leave
12:29Arxontas_tou_Skook
12:29ChongLitell me what kind of program you want to write
12:31Arxontas_tou_Skoi will try something and maybe come back,thx chongli
12:31ChongLiok
12:31gfrederickssomebody should change the topic of #clojure to be "Tell us what you're _actually_ trying to do."
12:31hyPiRion~anybody
12:31clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
12:32hyPiRiongfredericks: ^ that's sufficient
12:32ChongLigfredericks: yeah everybody falls into that trap
12:32gfrederickshyPiRion: that's kind of a different purpose
12:32ChongLithey ask a question about some very specific implementation detail
12:32ChongLiwhen it may be that their entire approach is wrong
12:32ChongLiand so answering the specific question doesn't really help
12:33weavejesterHas anyone heard of a function for core.logic that chooses a random solution?
12:33ChongLiby the way, why is def turned off on lazybot? I thought it'd work to have like 5 defs as a limit before undefing
12:33hyPiRionweavejester: isn't rand-nth sufficient?
12:33gfredericksweavejester: I've tried to write condr a few times
12:34weavejesterI mean obviously you can get a seq of all solutions and then randomly choose, but if the number of solutions is very large, it becomes infeasible.
12:34gfredericksweavejester: https://gist.github.com/4334295
12:34hyPiRionNot that I'm a core.logic guy though.
12:34weavejestergfredericks: You said "tried". Does that mean it doesn't work?
12:35gfredericksweavejester: I think a good impl of condr would let you customize the distribution based on how deep you want it to search for your random solution
12:35hyPiRionweavejester: Do you need the pick to be uniformly distributed over the possibilities?
12:35gfredericksweavejester: it works, it's just basic
12:35gfrederickswhen there are an infinite number of solutions you can't pick uniformly of course
12:35gfredericksso lots of subtleties around that
12:35ChongLigfredericks: why not?!!
12:35ChongLihaha
12:35weavejesterhyPiRion: As uniformly as possible.
12:35hyPiRionweavejester: meh. Otherwise `first` would've been sufficient.
12:36gfredericksChongLi: I'll assume based on 'haha' that the question wasn't serious
12:36weavejesterYeah, "first" isn't going to do it :)
12:36ChongLigfredericks: there's gotta be some way to pick a random number which is unbounded
12:36gfredericksweavejester: I think a good impl would have to be lower-level too
12:36gfredericksChongLi: there is but not uniformly
12:36weavejesterBut condr looks interesting, and I have a finite solution space.
12:37ChongLiwhat does it even mean to have a uniform distribution in an unbounded space?
12:37gfredericksChongLi: short proof: if the distribution is uniform, then for any X the selection is virtually guaranteed to take more than X bytes to contain
12:37ChongLiI guess it means having no samples at all
12:38gfredericksso maybe it makes theoretical sense, but there's nothing practical you can do with it
12:38ChongLiyeah, not without some magical machine beyond the capabilities of a turing machine
12:38ChongLiwith infinite speed and infinite storage
12:39gfredericksyeah that'd probably make it doable
12:39weavejesterTuring machines do have infinite storage.
12:39gfredericksbut you need the infinite speed to get at it :)
12:39hyPiRionNo need for infinite speed.
12:39ChongLiyeah, just infinite time
12:40hyPiRionExactly. As long you can prove it terminates, it's okay.
12:40weavejesterWell, the "speed" of a Turing Machine is kinda academic, because time doesn't factor into the model.
12:41gfrederickscome to think of it even with an infinite amount of time I'm not sure what algorithm would uniformly sample the integers
12:41gfredericksthat's a tricky thing to reason about
12:41ChongLiyeah it seems to be a non-computable function
12:41ChongLithough I have no proof
12:41gfredericksyou probably just have to take that as a primitive
12:42gfrederickswell wait
12:42ChongLiuniform sampling just seems to be meaningless when the space is infinite
12:43gfredericksif you can generate an infinite list of random bits, you can probably do it that way
12:43gfredericksyeah
12:43ChongLiit's like asking whether or not you're moving if you're the only particle in an empty universe
12:44gfredericksso if you represent the number five as (list* 1 0 1 (repeat 0))
12:44cemerickwhat could make the url of a cljs.closure.JavaScriptFile nil? Based on the provides, the lib in question looks to be part of the third party bits in goog.async (http://closure-library.googlecode.com/svn/docs/closure_third_party_closure_goog_mochikit_async_deferred.js.source.html)
12:45gfredericksthen (defn rand-non-negative-int [] (repeatedly (rand-int 2)))
12:45pepijndevosI keep thinking dcg should be implemented with defrel, but I can't see how to actually do it.
12:45HolyJakEmacs question: How do I jump to a particular namespace such as clojure.core (to browse it)? M-. can jump to a var in a ns but not to a ns itself. I'm using nRepl in Emacs. Thanks!
12:46ChongLijeez what is up with that page?
12:46ChongLidark gray on light gray?
12:47pepijndevoswait…. multimethod + conde… would that work. need more tea
12:58seangroveHrm, this reminds me of ohpauleez's leap motion hacking http://www.forbes.com/sites/parmyolson/2012/07/16/the-amazing-digital-gloves-that-give-voice-to-the-voiceless/
13:08TheComradeHowdy. Is it appropriate to ask IDE/plugin-specific workflow questions in here?
13:09gfredericksprobably; though IDE users are a minority I think
13:10bawrIt's an Emacs land. :<
13:10ChongLisome people use eclipse
13:10ChongLiI think cemerick does
13:10TheComradeYeahhhhh so I read. I am starting to see why.
13:10ChongListarting to see why? how so?
13:11TheComradeSo I'm running IntelliJ + La Clojure + Leiningen? various tutorials all are pretty simple, there are shortcuts to run selected text or load a file into a REPL, no problem. But...
13:13TheComradeI can't figure out simple stuff like, switch the focus to the REPL without clicking on it. :(. Or like, why the Run menu has four Run / Debug options (run core, debug core, run, debug). Like, it feels like the expected dev process is to load a file with a shortcut, then click on the REPL, then do something like (ns leintest.core) and then type (foo)? This seems extremely cumbersome.
13:14ChongLiah
13:14ChongLiare you a long-time intellij user?
13:14TheComradeNope, just grabbed it.
13:14ChongLiah, you may want to try some other stuff then
13:14pietuTheComrade: alt + 4 toggles the repl
13:15TheComradepietu, thanks. How would I have learned that? :)
13:16TheComrade(osx)
13:17pietuTheComrade: well there aren't so much to do with idea than load file to repl (cmd + sift F10) and toggle repl
13:18pietubut if you go to setting -> keybindings (or similar) you can find the shortcuts
13:18TheComradeso alt+4 must be an IDEA shortcut, it's not listed in La Clojure shortcuts
13:18pietuthere's also a plugin that alerts key shortcut when you use your mouse
13:18pietuyeah, idea shortcut
13:19pietuand sorry, cmd + sift F10 opens the repl
13:19pietucmd + sift + l loads file in it
13:20pietubut as said, if possible, try emacs :)
13:20ChongLiyeah try emacs
13:20ChongLiemacs is fantastic
13:20ChongLiif you're going to learn something new, might as well
13:20pietuLaClojure plugin is quite good, but doesn't play with same league with emacs
13:21pietu/s/with/in
13:21arrdemI too will vote for emacs.. I made the vimclojure -> emacs+nrepl switch about a month back and I'm loving it.
13:21charliegrieferTheComrade - I'm about to start week 3 of "force myself to use Emacs". It's been way less scary than I thought it was going to be.
13:21TheComradeMk, I will try this out. I am by nature a CLI / Linux guy but everytime I've tried emacs I feel like I'm fighting horrible documentation and alpha-stage plugins.. but I'll give it another go
13:21TheComradereally worth spending weeks of learning curve? :)
13:22charliegrieferit's certainly not "foce myself" mode anymore. was over that within the first couple of days.
13:22ChongLiTheComrade: the key to learning emacs is C-h f along with ido mode
13:22charliegrieferI had a cheat sheet up on the laptop while i worked on the desktop
13:22charliegrieferhelped out quite a bit
13:22seangroveWho is this mike anderson from nuroko, and is he in here?
13:22charliegrieferi knew what I needed to do, just didn't know the command. so, glanced over at the cheat sheet.
13:22ChongLimakes it very easy to find functions thanks to fuzzy completion
13:23arrdemcharliegriefer: from heroku I think you meant...
13:23TheComradeCool. Thanks, I will give emacs a go for this.
13:23arrdemyeah A-tab fuzzy complete is epic
13:23arrdemOkay. Meta-Tab
13:23seangroveWill the real Mike Anderson please stand up?
13:23cemerickdamn, here's the reason why I've been struggling with cljs and browser-repl all day: http://dev.clojure.org/jira/browse/CLJS-418
13:23arrdemMr. Anderson....
13:23cemerick:-(
13:24ChongLifuzzy completion is the greatest thing ever
13:25seangrovecemerick: Yeah, that one sucks
13:25TheComradeYou guys using this? http://emacsformacosx.com/
13:25ChongLiTheComrade: I'm using linux
13:25seangroveTook a month for domina to pull in a pr for the README to tell users to add it to their deps :P
13:25ChongLiI've heard aquamacs is the most recommended osx version
13:27TheComradeDo you use 23 or 24?
13:27ChongLilatest version
13:28TheComradeWell the latest aquamacs is 23.3 ? I seem to recall the last time I looked at emacs there was some debate about whether to stay with 23 or switch to 24
13:28cemerickseangrove: what I don't grok is why the dep wasn't just added straight off...
13:28ChongLioh, huh
13:28ChongLiyeah use 24 then
13:28seangrovecemerick: Yeah, I could have put that in the pr, I suppose. But didn't know if there was a reason it wasn't there
13:29seangroveOr do you mean just to the clojurescript distro?
13:29ChongLicemerick: you still use eclipse + CCW?
13:29cemerickseangrove: yeah, in the cljs release pom
13:29cemerickChongLi: yes
13:29ChongLiTheComrade here is wondering about what IDE to use
13:29ChongLiwe suggested emacs
13:29seangroveThat'd be nice i suppose. Was definitelyt confused by the split - I understand the licensing, but the outcome was a bit painful
13:30ChongLiperhaps you can make a case for eclipse + CCW
13:30cemericktoo busy for tool advocacy at the moment :-)
13:30ChongLiI'm guessing eclipse will have a shallower learning curve
13:30ChongLihaha
13:30TheComradelol
13:30cemerickTheComrade: use what you know; don't take on a new tool and a new language at the same time.
13:31ChongLiTheComrade: hmm, I guess aquamacs isn't recommended anymore
13:31cemerickI think I may just make that my default response on all tooling questions from here on out.
13:31ChongLicemerick: haha
13:31TheComradeIt's very concise advice.
13:32ChongLiTheComrade: what do you traditionally use?
13:32gfredericksthe notepad plugin for clojure is not very advanced
13:32ChongLiat the very least you need something to help you match parens
13:32seangroveMeh, I learned ruby, rails, and emacs at the same time
13:32seangroveBut that was pretty painful, in hindsight
13:33ChongLiwriting in any lisp has got to be a nightmare without that
13:33cemerickgfredericks: yes, there are some reasonable expectations
13:33callenbotis anyone here using CLJS with Node.js?
13:34ChongLicallenbot: running clojurescript on the server?
13:34TheComradeChongLi, Mostly Jetbrains stuff for php, flash builder for AS3 (worked three years on FB games for take-a-guess). Used Netbeans to write a Java/ANTLR utility
13:34cemerick,(rand-nth #{:ccw :intellij :emacs :textmate :sublime :vim})
13:34clojurebot#<UnsupportedOperationException java.lang.UnsupportedOperationException: nth not supported on this type: PersistentHashSet>
13:34cemerickoh brother
13:34callenbotother than ibdknox.
13:34callenbotChongLi: yes
13:34ChongLiTheComrade: zynga?
13:34cemerick,(rand-nth [:ccw :intellij :emacs :textmate :sublime :vim])
13:34clojurebot:ccw
13:34TheComradeayup
13:34cemerickproof that the universe is aligned ^^
13:34gfrederickscemerick: you rigged it!
13:35cemerick,(rand-nth [:ccw :intellij :emacs :textmate :sublime :vim])
13:35clojurebot:sublime
13:35cemerickoh, that would've been too good
13:35gfrederickssomebody submit a jira ticket to amend the rand-nth docstring to say "chosen by cemerick"
13:35ChongLicallenbot: I asked about this the other day
13:35ChongLiand it was recommended against
13:35cemerickrand-nth-as-a-service
13:35callenbotChongLi: Prismatic does it...
13:36callenbotChongLi: why was it recommended against?
13:36ChongLiI was told that clojure + ring etc. on the jvm is better on a server
13:36callenbotChongLi: yeah but Node.js has way better libraries.
13:36weavejestercallenbot: Out of interest, what libraries in particular were you thinking about?
13:36ChongLiI don't know anything about node.js libs
13:37ChongLiTheComrade: so is clojure your first functional programming language?
13:37ChongLierr, I guess that'd probably be AS3
13:38ChongLithough you might not have used a functional style
13:39pietuTheComrade: I hava now been using idea for a year and a half with clojure and clojurescript, about to change to emacs + evil mode
13:39ChongLiTheComrade: not recommended btw!
13:39TheComradeChongLi, I've been reading up 'pure functional' for years, but haven't dug in. I discovered along the way that I was sort of unconsciously using functional ideas in AS3, like computing return values whenever possible instead of manipulating state
13:40ChongLiif you think learning emacs is hard, learning it with evil mode is just insane
13:40TheComradeChongLi, Hah
13:40pietuanyways, idea works. no doubt about it and if you are familiar with it, i suggest you to go with idea
13:40ChongLiTheComrade: yeah, you've got an intuitive grasp on the concepts demonstrated in "out of the tarpit"
13:41callenbotweavejester: Swig, SocketIO, Jade, Mongoose, node-flask-router, Express, Everyauth, scss-js, emailjs.
13:41ChongLihttp://shaffner.us/cs/papers/tarpit.pdf
13:41ChongLiI'm actually reading this right now, I just keep getting interrupted :)
13:42TheComradeChongLi, I'll check out that link. Yeah, intuitive is a good word for it. I know what feels clean but I'd be hard pressed to spit out a formal definition
13:43weavejestercallenbot: Could you give an example of how they're better than the equivalent Clojure libraries?
13:43callenbotI'm writing that out right now.
13:44weavejestercallenbot: Everyauth looks more mature than any Clojure equivalent
13:44callenbotweavejester: can't get anything like Jade or Swig in Clojure, SocketIO integration story sucks on Clojure compared to Node.js, Mongoose is a nice interface to MongoDB although I don't doubt the werkz guys have something there, node-flask-router and Express could be mimicked by a Ring app but it's a pale comparison. The excessive minimalism hurts the Clojure community here. Everyauth is a joy and things like friend and sandbar really d
13:44maiopietu: I switched to Emacs+Evil from Vim ~ year ago
13:44pietumaio: how does it feel?
13:44callenbotthe templating Jade/Swig/Django/Jinja templates issue is a drum I've been beating for a very long time in here. that shouldn't surprise anybody.
13:45weavejestercallenbot: What about Clabango?
13:45callenbotthe websockets story for Clojure doesn't seem to be well integrated into the Ring/Jetty stack so you have to run two servers.
13:45callenbotwhich sucks, you can use one code-base in Node.js
13:46maiopietu: well it feels good, but I'm editor/configuration freak .) I switched because I wanted to do some Clojure development but since I switched I have been playing with Emacs-Lisp and not with Clojure... :)
13:46callenbotweavejester: I had the impression it wasn't usable yet. I'd been eyeballing another equivalent. I'll take a look.
13:46ChongLihow the heck did such an ecosystem spring up in node?
13:46weavejestercallenbot: You can run it in the same code base using Aleph, but websockets and HTTP are fundementally two different protocols.
13:46callenbotChongLi: they give a shit about webapps.
13:46weavejestercallenbot: My preference for templating is Hiccup, so I haven't really looked at the alternatives closely.
13:46callenbotweavejester: another irritation is that there's nothing like Flask's g object in Ring. I have to explicitly kick around every single little variable and the keyword argument syntax in Clojure is a travesty.
13:46pietumaio: sounds like my colleague
13:47arrdemSo what makes Clojure feel so much less crufty than common lisp?
13:47callenbotweavejester: I "settled" on Hiccup but as it stands I'm less productive in Clojure than Python or Node.js atm.
13:47callenbotweavejester: being able to invoke {% if g.user %} in any given template thanks to the RequestContext lifecycle in Flask is *amazing*
13:47callenbotand saves a lot of goddamn time
13:47ChongLiClojure's built on standard abstractions and uses very nice, clean syntax for literals
13:47maiopietu: but now I'm ready for some Clojure finally :) I started to write 2 toy projects in it few days ago
13:48callenbotarrdem: I used to do CL before Python, trust me, Clojure is way less crufty.
13:48weavejestercallenbot: Is there a reason you can't use a dynamic binding to achieve the same result?
13:48pietumaio: main thing to move from idea is to get more lightweight dev env, idea works just fine with Repl and everything, but it's just too much
13:48callenbotweavejester: it needs to reset with the request lifecycle ala Kiln.
13:48arrdemcallenbot: I know it is. I just spent a week and a half hacking CL and I'm trying to put my finger on why I don't like it besides lack of internet docs
13:48ChongLithe focus on immutability, the standard persistent data structures
13:49callenbotarrdem: I mean I could explain the culture if you want, but you seem to know what's up already.
13:49ChongLialso the LISP-2 thing is just... I'm sorry
13:49weavejestercallenbot: In general, my preference is toward tight lexical scoping over more global variables. The latter make things easier, but more complex, because they tie each part of your application to a huge mass of data.
13:49ChongLifuncall everywhere
13:49callenbotweavejester: I need arbitrary access to a request context scoped user object
13:50weavejestercallenbot: Why doesn't a dynamic binding do that?
13:50ChongLihashquoting everything
13:50arrdemChongLi: could you elaborate on that? of all the lisp lore I've consumed L1 vs L2 is the thing I get the least
13:50callenbotweavejester: I don't know how I would make it scoped to the serving of each request individually.
13:50ChongLiarrdem: in clojure if you say (def a 32)
13:50callenbotweavejester: because I don't know enough about the semantics of RIng.
13:50callenbotRing*
13:50ChongLiand (def b (fn [x] (+ x x))
13:50ChongLia and b occupy the same namespace
13:51Bronsa(map inc [1 2 3 4]) vs (mapcar #'1+ '(1 2 3 4))
13:51callenbotweavejester: are just talking an init and kill middleware here or what?
13:51arrdemright... :cl-user by default or user/
13:51ChongLiI don't mean that sort of namespace
13:51weavejestercallenbot: No, middleware that adds a binding form around your handler
13:51maiopietu: do you use Vim a lot?
13:51arrdemChongLi: oh name binding scope
13:51callenbotweavejester: it's not just the handler, the template has to be able to access the user too.
13:52callenbotand any other code I invoke
13:52callenbotlike a utility function
13:52ChongLiarrdem: here's a clearer example
13:52pietumaio: not a lot, mut yeah, i use it quite a lot
13:52weavejestercallenbot: It would, because the template would be called by the handler.
13:53callenbotyou have to explicitly pass all bindings to clabango AFAIK
13:53ChongLisay you call (defn foo [] #(+ % %))
13:53weavejestercallenbot: https://gist.github.com/4649745
13:53ChongLinow foo is a function that returns a function
13:53ChongLiin clojure you can do this ((foo) 3 4)
13:54callenbotweavejester: I still have to manually pass every binding. I don't have globals unless I write a macro. (render-file "example/templates/index.html" {:greeting "Hey!"}))
13:54maiopietu: if I could I would skip Evil part of my switch to Emacs as it would save me a lot of time. But I have been using Vim for a loong time so that was no option for me
13:54ChongLiinbut in a lisp-2 you have to use funcall
13:54callenbotactually that's a really good idea.
13:54callenbotI'll just write a macro.
13:54arrdemChongLi: ah that's irritating
13:54weavejesterI mentally wince every time "global state" is mentioned :)
13:55callenbotweavejester: I don't care about aesthetics, I just need to be building things efficiently.
13:55ChongListuff like (funcall #'+ 3 4)
13:55pietumaio: yeah, that's kind of boost for me too, besides my colleague sitting next to me has just got everything working so
13:55callenbotweavejester: I am homo economicus, if there's something that'll help me build faster, I'm gonna use that. if Clojure can't be on top of that pile because the community is too fussy then I can't use it.
13:55ChongLiarrdem: actually the best example is in a function like map
13:56weavejestercallenbot: It's not about aesthetics. You're essentially trading short term speed for long term complexity.
13:56ChongLiin CL it's called mapcar
13:56weavejesterWhich in some cases is a good trade-off
13:56ChongLiand it is called like this
13:56callenbotweavejester: that's a consciously made decision
13:56ChongLi(mapcar #'not '(t nil t nil t nil))
13:56callenbotweavejester: I build things to test hypotheses. Refactors can happen later, I need to shotgun out as many projects as quickly as possible to determine what's worthwhile
13:56ChongLiwhich returns (NIL T NIL T NIL T)
13:56maiopietu: then go for it. I'm pretty sure you wouldn't regret it :)
13:57ChongLimapcar's implementation almost certainly uses funcall
13:57pietumaio: yep, I might bug you in future though :)
13:57weavejesterThat's reasonable, so long as your applications have nothing in common.
13:58weavejesterOr are different enough that there are no common pieces of functionality that could be shared.
13:58callenbotweavejester: they have basic CRUD on the backend in common, it's mostly frontend variation.
13:58weavejesterI find that web applications tend to have a lot of things in common
13:58callenbotuhm, sure? but the Clojure community seems to hate web frameworks that eliminate a lot of that duplicated work so I'm left managing it myself.
13:58yedianyone have guidelines or best practices for writing wrappers of java libraries
13:58callenbotmodulo yogthos|away 's efforts anyway.
13:59maiopietu: ok! good luck :)
13:59ChongLiyedi: why write a wrapper?
13:59weavejestercallenbot: Frameworks tackle duplication effectively through copy-and-paste.
13:59arcatanhmm, i've been heavy Vim user and now I'm using Emacs for Clojure work. tried out Evil, but it was just in the way.
13:59ChongLiarcatan: evil just bends my brain
14:00ChongLiI was a heavy vim user and now an emacs user
14:00arrdemarcatan: TBH I'm liking not <esc> mashing in emacs
14:00callenbotweavejester: see, aesthetics again.
14:00ChongLiarrdem: why are you mashing <esc>?
14:00callenbotweavejester: I don't care. I don't care if it's built from the bone and sinew of babies. I want *more productivity*, period, end of story.
14:01yediChongLi: figured it was the best way to go. Writing a clojrue wrapper to help access the library to a more clojurish api and to try and hide state in the java lib
14:01arrdemChongLi: jumping command mode to insert mode and back
14:01ChongLiarrdem: ahh, why not use C-[
14:01ChongLi?
14:01arrdemChongLi: didn't know it existed XP
14:02weavejestercallenbot: I'm not sure that prefering functions over copy-and-paste is necessarily all "aesthetics"
14:02ChongLiyedi: ah, yeah as long as you aren't wrapping to try and build some portable library across clojure and clojurescript
14:02hyPiRionOh wow, so using Emacs, Vim or Emacs+Evil is based on subjectivity and not objective explanations?
14:02maio(key-chord-define evil-insert-state-map (kbd "jk") 'evil-normal-state) :)[C[C[C[C[C[C[C[C
14:02ChongLithat would just be silly
14:02arrdemhyPiRion: Yep! welcome to the editor war..
14:02weavejesterIf we accept that code reuse through functions is a better idea than code reuse through code generation
14:02hyPiRionarrdem: http://www.gnu.org/fun/jokes/ed-msg.html
14:02arrdemmaio: STHAP WUTRUDOING
14:03arrdemhyPiRion: 404 there
14:03callenbotweavejester: fine, then link these functions you're using to be so productive.
14:03hyPiRionarrdem: Works fine here, strange.
14:03yediChongLi: any advice?
14:04weavejestercallenbot: Admittedly all the functions I want don't yet exist :)
14:04ChongLiyedi: general advice? hmmm, it's tough to say
14:04arrdemhyPiRion: dropped the trailing L
14:04weavejestercallenbot: But neither do all the frameworks
14:04weavejestercallenbot: And if we have a choice in direction - whether to go framework heavy or function heavy
14:04ChongLiit depends on what library I guess
14:04hyPiRionhttp://www.gnu.org/fun/jokes/ed-msg.txt should work too.
14:04callenbotweavejester: well, people are out there *making things* with these web frameworks
14:04weavejestercallenbot: Then the latter is what we should be developing.
14:05callenbotweavejester: you're complaining about something real that is helping people make things and suggesting an alternative you admit hasn't really developed into something that really exists at the moment.
14:05weavejestercallenbot: Something real? What do you mean?
14:06callenbotshow me what to use to be as productive as using a web framework would be, without using the framework.
14:06weavejestercallenbot: Are you talking about web frameworks that exist for other languages, or web frameworks that exist for Clojure?
14:06ChongLiyedi: I guess the best advice I can give is to go about building a mini-DSL
14:06callenbotweavejester: Clojure is fine, I just want to know how to eliminate all that CRUD work.
14:07arrdemcallenbot: .... what crud work?
14:07ChongLitry to focus on dealing with clojure data structures like maps, vectors and sets
14:08hyPiRioncallenbot: It's not the crud work, it's the web interface you talk about I suppose
14:08hyPiRionCRUD in Clojure is just map manipulations.
14:08callenbotI don't really care what you call it, I just want to factor out the duplication and focus on the differentiated bits.
14:09hyPiRionIt helps if everyone has the same idea of what the problem is, isn't it?
14:09weavejesterWhat duplication?
14:09hyPiRion/s/isn't/doesn't/
14:09yediChongLi: thanks
14:10ChongLiyedi: yeah, generally follow the guiding Clojure philosophy
14:10ChongListick to mostly pure functions on Clojure data structures
14:10callenbotweavejester: okay here's a specific one for you, how do I do websockets in Clojure with my webapp without running two different leiningen projects?
14:11weavejestercallenbot: Have you tried using Aleph?
14:11callenbotweavejester: this is, mind you, a single git clone away in Node.js land, they have Express+SocketIO templates with best practices exemplified built right now.
14:11callenbotweavejester: can I do my whole webapp with Ring+Aleph? I was under the impression you couldn't push to the browser client like that.
14:11callenbotwhich destroys the whole purpose of websockets.
14:11callenbotso we've already failed the comparison with Node.js by it not being a single git clone away to being a template, but lets see how deep this rabbit-hole goes
14:11weavejestercallenbot: What gave you that impression?
14:12callenbotwhat does it take to write a unified webapp that can do the normal HTTP as well as websockets in Clojure?
14:12callenbotif it exists, where's the leiningen template?
14:13callenbotweavejester: http://stackoverflow.com/questions/10967426/clojure-webbit-ring "Ring defines only request-response cycle, there’s no push in Ring SPEC. You can write webbit ring adapter, but it will only allow you to react to the events happening in browser, without the ability to notify browser from server side."
14:13weavejestercallenbot: I don't believe there is a template, but it would only save you writing a few lines of code.
14:13ChongLicallenbot: I guess node.js is basically state of the art for working with websockets?
14:13callenbotnota bene there is no Ring/Webbit adapter AFAICT
14:13callenbotChongLi: and writing web apps in general
14:14ChongLicallenbot: you probably want to use node.js then
14:14callenbotgod fucking dammit I really don't.
14:14callenbotthe callback spaghetti is horrendous.
14:14weavejestercallenbot: Because Ring abstracts HTTP, not web sockets. Aleph sits on top and handles both protocols.
14:14ChongLicallenbot: http://brianmckenna.org/blog/cps_transform_js
14:14callenbotweavejester: is there an example of doing this I can learn from that will work with a simple client-side websockets demo?
14:15weavejestercallenbot: There's a wiki page on using Aleph with HTTP here: https://github.com/ztellman/aleph/wiki/HTTP
14:16weavejestercallenbot: I don't believe anyone's created a full application yet, but I could whip something up.
14:18callenbotweavejester: http://stackoverflow.com/questions/6411070/nodejs-socket-io-simple-client-server-example-not-working how long would it take you to make a working demo app like that?
14:18callenbotwhich had a working bidirectional websocket on the frontend
14:19weavejestercallenbot: Let me put something together for you now
14:29ChongLiI wonder what it'll look like when cljs is fully fleshed out
14:29yediweavejester going above and beyond
14:29yediit's not fully fleshed out?
14:29ChongLiin terms of ecosystem
14:29ChongLiand tooling
14:29yedii c
14:30ChongLiI can imagine writing a single codebase that encompasses client and server in a very natural and idiomatic fashion
14:30technomancycallen: your bot is saying some strange things about node.js having a more mature library ecosystem than the JVM; you might want to check its logic circuits.
14:30ChongLihahaha
14:30technomancypossibly some kind of positronic interference
14:30arrdem(inc technomancy)
14:30lazybot⇒ 45
14:31ChongLiwe'll have to do a tachyon sweep
14:31callentechnomancy: you raaaaang?
14:31yediChongLi: you think cljs will eventually replace clojure in doing the back end of web applications
14:31ChongLiyedi: no, it'll supplement it
14:32ChongLiI don't think you'll ever be able to replace JVM's library ecosystem
14:32technomancywhere'd I put my voight-kampf unit again?
14:33arrdemtechnomancy: other jumpsuit
14:33arrdemleft pocket
14:33callentechnomancy: Choice. No but seriously the whole obsession with frontend web Node.js has combined with the raw numbers of people banging away has led to an impressive ecosystem.
14:35gfredericksthe primary effect from my perspective is the greater frequency of tweets about node.js programmers reinventing things
14:36callengfredericks: nevertheless, if I need to setup a websocket + messaging server I can do so in node.js trivially. If they're so silly and pointless, why not provide a superset of what they offer?
14:37ChongLi"Given that we are considering the ideal world, it is not unreasonable to assume that the next step is to simple execute these formal requirements directly on our underlying general purpose infrastructure."
14:37ChongLiI love that
14:38callenhttps://github.com/jaymedavis/hubble case in point, really.
14:53ChongLiohhh
14:54ChongLigoogle image search has a nice new lightbox-style feature
14:59fakedrakehello
14:59ChongLihi
15:00fakedrakewhat is the correct way to define html snippets in hiccup (like noir's defpartial)?
15:00ChongLiI think it's defhtml
15:01ChongLithere's also defelem
15:01ChongLihttp://weavejester.github.com/hiccup/hiccup.def.html
15:02weavejestercallenbot: Take a look at https://github.com/weavejester/websocket-example
15:02weavejesterIt mimics the node.js example you supplied earlier.
15:03fakedrakehmm, I am currently to just substitute defpartial with defmacro
15:03fakedrakei will try defelem
15:03ChongLiweavejester: am I right? fakedrake wants help with hiccup here
15:03weavejesterfakedrake: You can just use a function
15:03arrdemweavejester: is :require :all the new :use?
15:04weavejesterdefelem defines a function with some additional code to accept an optional attribute list.
15:04weavejesterSo if I wrote: (defelem link-to [url text] [:a {:href url} text])
15:04weavejesterThen I could write: (link-to {:class "foo"} "/blog.html" "Blog")
15:04fakedrakeweavejester: is that preferable to defelem?
15:05fakedrakeah
15:05weavejesterdefelem is only if you want that extra attribute map.
15:05weavejesterOtherwise you can use defn
15:05fakedrakeweavejester: thank you!
15:05weavejesterThere's also a defhtml for performance, which serializes directly into strings, but prefer defn unless you find things running slowly.
15:05weavejesterarrdem: Basically, yes. :)
15:06fakedrakeweavejester: why is defn not good with attributes?
15:06ChongLiit's nice to be able to come in here and get support from the library author
15:06technomancyarrdem: :require/:refer/:all, yes, but don't use it except for a very small number of cases
15:07fakedrakelike so: (defn link-to [url text] [:a {:href url} text])
15:07weavejesterfakedrake: defn is just the normal Clojure function. It doesn't automatically add an optional attributes arguement.
15:07technomancypretty much just in test cases and live-coding
15:07arrdemtechnomancy: I figured.
15:07weavejesterEr, normal Clojure macro
15:07fakedrakeaha now i get it
15:07fakedrakenice
15:07weavejestertechnomancy: I use it sometimes for things like core.logic
15:07weavejesterOr if I have a namespace dedicated to a single library
15:08weavejesterLike Compojure routes, or core.logic, or a Hiccup template.
15:09weavejesterBut in the example I posted, maybe it would be better to be explicit, so that it's obvious where the functions come from.
15:10arrdemUnderstood that it's unhygenic to just :refer :all, but is there anything strictly wrong with it besides that you drag in refs to stuff you may not be using?
15:11weavejesterarrdem: Nope
15:11ChongLiif you qualify it
15:12ChongLiit makes it easier to see where all the functions come from
15:12ChongLiwhich can be helpful sometimes
15:12ChongLijust imagine bringing in 10 namespaces at once
15:13ChongLibesides the possibility of collisions, you're likely to forget where functions are from
15:13callenbotweavejester: danke
15:19maehow do I quote a symbol in a macro? like I really need to give it a symbol but it keeps qualifying it to user/
15:19arrdemmae: ~'foo if I remember..
15:19arrdem,(macroexpand `(~'foo))
15:19clojurebot(foo)
15:20maedude, amazing, thank you so much
15:20arrdemmae: no problem
15:20ChongLimae: writing an anaphoric macro?
15:21TimMcChongLi: Or a reify-producing macro -- you need it there as well.
15:21maei have no idea what that means, hehe
15:22maei am just hacky hacking, i'm an inductive/kinesthetic learner, I learn from the bottom up
15:22arrdemhttp://en.wikipedia.org/wiki/Anaphoric_macro
15:22ChongLimae: an anaphoric macro is one that captures a symbol deliberately
15:22maegotcha
15:22ChongLiallowing you to refer to things with words like "it"
15:22ChongLileading to more natural english-like expressions
15:23ChongLiahhhh
15:24TimMc...but potentially hella confusing.
15:24ChongLiwhy does chrome tab-complete to a domain name before tab-completing to a search engine I've specified?
15:25ChongLinow I have to clear my whole browsing history to fix this
15:25fakedrakehow do i tell ring to publish my .js and .css files?
15:26ChongLifakedrake: you want a wrap-resource middleware
15:26ChongLihttp://ring-clojure.github.com/ring/ring.middleware.resource.html
15:27fakedrakethnx! ill take a look
15:30fakedrakehttp://clojurewise.blogspot.gr/2011/03/static-resources-in-compojure-uberjar.html
15:30fakedrakethis one is more like what i needed, i should have asked for a compojure way to do it
15:30ChongLifakedrake: ah, I used wrap-resource myself
15:31ChongLiit's still pretty straightforward
15:53seangroveIt'd be very cool if you could trace the file-size of my cljs file down to the namespaces
15:54seangroveMy advanced-optimized cljs file is ~400kb, would be nice to know where it comes from
16:01Arxontas_tou_Skoanyone using counterclockwise? how to stop auto-close parenthensis?
16:01Arxontas_tou_Skoi type ( and it closes automatically
16:01ChongLiArxontas_tou_Sko: that's a feature :)
16:02ChongLiin Clojure you almost never want unbalanced parentheses
16:03Arxontas_tou_Skoi know can i cancel it?
16:03Arxontas_tou_Skoit make me dizzy
16:03hyPiRionave a look at preferences, and you would most likely find
16:03hyPiRionsomething.
16:03Arxontas_tou_Skoi tried preferences
16:03Schaeferyou are in strict/paredit mode
16:04Arxontas_tou_Skoif i uncheck that it will go away??
16:04lazybotArxontas_tou_Sko: What are you, crazy? Of course not!
16:04Schaeferyou can toggle off by Alt-D in windows. check the clojure popup menu in the editor
16:06Arxontas_tou_Sko you are in strict/paredit mode?? i uncheked that but it still auto close them
16:07Schaeferi think that's a new default behavior in the non-strict mode. laurent is going to change that in the next release, i think
16:07Arxontas_tou_Skoits default
16:07Arxontas_tou_Skoi update it today
16:07Arxontas_tou_Skoi am stuck in hell
16:08Schaeferi can't imagine not using non-strict anyway
16:08Arxontas_tou_Skoi cant stop it right?
16:09Schaeferi don't think so
16:09Arxontas_tou_Skook thx :)
16:09Schaefernot sure how the non-strict behavior works
16:09Arxontas_tou_Skomaybe its better but it make me dizzy
16:10Schaeferi used to have the same problem. clarity came to me when i stopped thinking of CCW as a text editor but rather a data structure editor
16:10ChongLiyeah
16:11ChongLithat's what you do when you write lisp code
16:11ChongLiyou're building data structures
16:11ChongLinot really writing text
16:11Schaeferexactly. that new way of thinking really changed my approach to programming
16:13inavathello
16:13ChongLihi
16:13Schaeferhi
16:16inavatI want to use Clojure for a program I want to write, but the program is a command-line utility that should be responsive, so I'm worried about the startup time. Does anyone know, is this a problem that people are working on fixing, or has it been decided that Clojure isn't really the right language for that kind of thing?
16:16ChongLiinavat: you could use clojurescript on node.js
16:16Schaeferyou might consider using ClojureScript and Google's V8 engine. i understand that has good startup time
16:17infiniteonehello, I'm using nrepl in emacs and can't get the inline documentation working I, can use tab to get a completion list but no doc anyone else have this problem
16:18inavatI was considering that.. I was considering embedding V8 in c++ to create a standalone app. I guess I'd be a little sad to lose some of the stuff from Clojure.. I was particularly excited to learn to use STM
16:19ChongLiinavat: ah, STM is not available in clojurescript (javascript doesn't have threads)
16:19inavatright
16:19rclarksoni have a sequence and wanna loop the elements in it .. i want to output "Hello", "Goodbye", "Hello", "Goodbye", that is the loop will switch for every other element .. how do i do this?
16:19inavatguess I can't have my cake and eat it too
16:19ChongLiif you want to write a nice command line app that makes use of STM and concurrency, perhaps haskell is a better fit
16:20ChongLihaskell compiles to native code so it starts up fast
16:21ChongLi&(take 5 (cycle '("hello" "goodbye")))
16:21lazybot⇒ ("hello" "goodbye" "hello" "goodbye" "hello")
16:23amalloyinavat: you could try using drip, as well
16:24rclarksonChongLi: good example .. i wasn't being specific .. it's more that I already have a list with elements eg. '("Foo", "Bar", "Baz", "Bam") and want it to print out "Hello Foo", "Goodbye Bar", "Hello Baz", "Goodbye Bam"
16:24ChongLirclarkson: oh
16:25amalloy&(map list (cycle '[hello goodbye]) '[foo bar baz bam])
16:25lazybot⇒ ((hello foo) (goodbye bar) (hello baz) (goodbye bam))
16:25clojurebotbam is BAM!
16:26inavatamalloy, I've heard people talk about drip, and it's been dismissed as not idea. What would be the down sides to using drip?
16:26ChongLiamalloy: that's not quite it
16:26amalloywell, it might not work
16:26inavatas I understand it, it keeps running VMs ready to go
16:26ChongLihe wants hello and goodbye for each name
16:26amalloymostly it works, but it's not super well tested
16:27amalloyChongLi: i produced the exact output he wanted. i don't know why you think he wants something else
16:27ChongLiamalloy: oh you are right, I misread it
16:28metellus,(map str [
16:28clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
16:28rclarksonamalloy: thx
16:28metellusoops
16:28inavatChongLi, thanks for the Haskell recommendation. I'm interested in Haskell as well, though not as much as I am in Clojure.
16:29ChongLiinavat: yeah I used Haskell a bunch before discovering Clojure
16:29ChongLiI really love a lot of what's in Haskell
16:29ChongLibut I also love Clojure
16:29ChongLiit's another "can't have cake and eat it too" things
16:30inavatthe program I want to write will make use of lots of web services, have plugins, etc.. it feels like Clojure, with its rich library ecosystem, is a better fit
16:30Arxontas_tou_Skoi think imperative languanges model the way you act,lisp models the way you reason,prolog models the way you know
16:30Schaeferif you're embedded a JVM into C++, you can use JNI's invocation API to maintain an internal JVM in your C++ process. you may not need to shut the JVM down
16:31fakedrakeI am using friend for authentication and I would like it to query a database for users, not use a map. Is there an easy way to do that?
16:31Schaeferthus, you would only pay the cost of starting a JVM once
16:31inavatSo is the slow startup thing considered a problem by the Clojure community? Is it something you'd bet will get better in the future? Or is it something you just take with Clojure and it'll probably always be the case?
16:31Schaeferinavat: is your C++ process long-lived?
16:31ChongLiinavat: it's a problem with the JVM in general
16:31inavatSchaefer, no it's not.. it will be used like a command line utility.
16:32amalloyChongLi: jvm startup time is minimal compared to clojure's startup time
16:32Schaeferinavat: ah. forget the JNI approach then:)
16:32ChongLiamalloy: but that's only because the JVM doesn't include everything Clojure needs!
16:32inavatMaybe embedding V8 in C++ and using ClojureScript is the best approach. Even then, I'd miss out on lots of clojure and java libs that won't be available in ClojureScript, right?
16:33ChongLiinavat: don't you need STM?
16:34Schaeferi'd be really surprised if you'd want the STM in something short-lived like a utility
16:34ChongLiyeah I was wondering about that as well
16:34ChongLiseems odd
16:34Schaeferif you need mutable state, you can still use atoms in clojurescript
16:34inavatI was excited about STM. I wouldn't say I *need* it. I'm really a beginner at Clojure, and haven't learned STM yet, so I can't say for sure I won't need it..
16:34inavatyeah, I guess I see this being single-threaded
16:34Schaeferah, so a solution in search of a problem :)
16:35ChongLiyeah we want everything, don't we
16:35inavatokay, you've convinced me ClojureScript in embedded V8 might be a good option. But what about the library ecosystem, is it as rich in CLojureScript as it is in Clojure?
16:35ChongLihigh level language with beautiful libraries, instant start-up time, interpreted language that's as fast as hand-rolled C
16:36ChongLiinavat: according to callenbot the node.js ecosystem is richer even than the JVM!
16:36Schaeferinavat: true, the ecosystem isn't as rich as clojure's. i'm not as familiar with clojurescript but i think many libraries would work. what does this utility do? what sort of utilities do you think you'll need?
16:37inavatI see. Well I'll try it out.. wont' hurt to get familiar with the ClojureScript ecosystem at least
16:37ChongLiinavat: be forewarned
16:37ChongLiclojurescript is a lot newer than clojure
16:37ChongLiand can be tricky to get into
16:37ChongLidue to having less documentation/tooling
16:38ChongLiyou'll want to use cljsbuild
16:39inavatDo people commonly write programs and libraries in the language that's the intersection of Clojure and ClojureScript?
16:39ChongLiinavat: there are a few, yes
16:40ChongLiwork on this is ongoing
16:40yedicallen: http://shenfeng.me/add-async-to-ring.html
16:41ChongLiyedi: weavejester already wrote an example for him
16:41yedioh
16:41ChongLihttps://github.com/weavejester/websocket-example
16:45edtsechChongLi: I think, it's for aleph not for http-kit.
16:45ChongLioh good point
16:45ChongLiI didn't read yedi's link
16:47cemerickwhat might cause browser-REPL to work in Chrome+Safari, but not Firefox?
16:48ivancemerick: did you look in Firefox's Error Console? (now hidden, has to be enabled in about:config)
16:48rclarksonis this a good way to put something into a vector as last element? (into [:one :two] '(:three))
16:49ChongLi&(conj [:one :two] :three)
16:49lazybot⇒ [:one :two :three]
16:50ChongLiunless you actually have a list
16:50devnWhat companies are doing Clojure in SF?
16:50ChongLithen you want concat
16:50ChongLi&(concat [:one :two] '(:three))
16:50lazybot⇒ (:one :two :three)
16:51ChongLibut that gives you back a LazySeq
16:56gfredericks&(into [:one :two] '(:three))
16:56lazybot⇒ [:one :two :three]
16:59yedihttp://shenfeng.me/600k-concurrent-connection-http-kit.html
17:04dabd_I am having problems with floating point numbers. This won't work ,(filter #(== % 8.3) (range 0 25.1 0.1))
17:04dabd_,(filter #(== % 8.3) (range 0 25.1 0.1))
17:04clojurebot()
17:04hyPiRion,(abs -1)
17:04clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: abs in this context, compiling:(NO_SOURCE_PATH:0)>
17:05hyPiRionBlu. ##(filter #(< (Math/abs (- % 8.3)) 0.001) (range 0 25.1 0.1))
17:05lazybot⇒ (8.299999999999986)
17:06hyPiRionComparing exactly isn't smart, check if the difference of the values are less than some low value epsilon.
17:07hyPiRione.g. wouldn't even ##(== 0.0M 0M) give the expected result.
17:07lazybot⇒ false
17:07gfredericksor use ratios!
17:07gfredericksratios are the best except when they're bad.
17:07dabd_yeah maybe i should read "what every computer scientist should know about floating-point arithmetic" :-)
17:08gfredericks,(filter #(= 83/10) (range 0 251/10 1/10))
17:08clojurebot#<ExecutionException java.util.concurrent.ExecutionException: clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox$eval133$fn>
17:08hyPiRiondabd_: there's valuable information there :)
17:08gfredericks,(filter #(= 83/10 %) (range 0 251/10 1/10))
17:08clojurebot(83/10)
17:09dabd_thanks guys ratios seems good for me
17:10hyPiRiongfredericks: In 10 minutes someone will come here and ask why their program is so slow.
17:10gfredericksbetter than asking why their program is so wrong :P
17:14hyPiRiontrue enough
17:19tomojhuh, datomic has bigdec
17:19gfredericksthat's curious
17:20SegFaultAXWhy did Prismatic close up all their libs?
17:20tomojbut they use a different equality :/
17:21tomojI guess that's good
17:21gfredericksSegFaultAX: there was a conversation about that a while ago wherein it was suggested they were trying to get bought or something I think
17:22SegFaultAXDoes their sutff being OSS impact that?
17:22gfredericksapparently
17:22SegFaultAX:(
17:22cemerickivan: yeah, nothing there
17:22SegFaultAXThey had some really neat stuff (at least from the talks I've seen)
17:22gfredericksibdknox seemed to know the reasoning behind that
17:22gfredericksI've never bought or sold a company before so it's all foreign to me
17:23p_lSegFaultAX: OSS tends to impact some buyers
17:24p_lespecially when you try to get bought based on your IP
17:24p_lit pays off to have the "core, money-bringing" stuff private
17:24SegFaultAXWell it's not like their core product was OSS. Just some pretty nifty libs.
17:25SegFaultAXI'm mostly interested in their Store library.
17:25yediwhat's Store
17:25SegFaultAXyedi: A clojure abstraction over a bunch of different datastores.
17:26SegFaultAXyedi: Check it http://www.infoq.com/presentations/Why-Prismatic-Goes-Faster-With-Clojure
17:26yediah, i remember now
17:27yediit sucks that theyre tryna get bought tho
17:28SegFaultAXyedi: Meh. I'm only sad that the clojure community can't benefit from their work (anymore/yet).
17:29yediexactly
17:29gfredericksfork all the things
17:30SegFaultAXgfredericks: Don't be that guy. ;)
17:41inavatwhat's the downside of using drip to work around the slow startup?
17:42hyPiRionI suppose there's some JVM running in the background
17:43TheComradecan anyone suggest why (going through emacs / clojure tutorial) that compiling test file gives me "unable to resolve symbol", but running lein test on CLI generates correct output?
17:43TheComradeon core_test.clj
17:48inavatI can't see why that's a down-side hyPiRion. I'm here considering whether to use ClojureScript and V8... or Haskell or Ruby or some other language.. but I think I should just use Drip
18:02juliend_Hi all, I need some help wrapping my head around some of the concepts of clojure dev
18:02ChongLijuliend_: hi
18:03juliend_I use ccw as a dev env
18:03ChongLiok
18:03juliend_question 1) Does that make a big difference in terms of dealing with the REPL ?
18:03ChongLiin terms of features... or?
18:03juliend_the specific problem I'm having is that my application state seems to get corrupted
18:03ecmendenhallHi everyone!
18:03ecmendenhallI have a flat list of vectors generated by zipping through a hiccup page.
18:04ecmendenhallHere's a paste: https://www.refheap.com/paste/9012
18:04ecmendenhallI'm trying to walk over it and generate nested :ul hiccup elements to create a table of contents.
18:04juliend_ChongLi: I get a error like: java.lang.StackOverflowError at clojure.lang.PersistentHashMap.seq(PersistentHashMap.java:194) at clojure.lang.RT.seqFrom(RT.java:480) at clojure.lang.RT.seq(RT.java:475)
18:04ecmendenhallThere must be a way to do this with walk or reduce, but I'm stuck. Any suggestions?
18:04hyPiRioninavat: Uses more memory, bad for portable things like phones and Nexus 7
18:04ChongLijuliend_: are you using explicit recursion?
18:05juliend_after entering some bad code, which is fine, but when I remove that bad line of code. the exception remains
18:05juliend_the only thing I can do is restart the java process and repl completely
18:05juliend_then it works fine, with the same code
18:05juliend_so I am confused with how exactly the REPL works and how it ties in to the runtime
18:06ChongLithere should be a hotkey to reload your code in the repl
18:06juliend_no explicit reccusion, but it might be in there I'm a big nood
18:06juliend_noob
18:06juliend_the code that caused it was: (println (alength statuses))
18:07amalloyit should be possible as reduce, ecmendenhall, but it doesn't look easy. hiccup is great for generating html, but working with already-hiccuped data structures is no fun; perhaps you already have it in some nicer form?
18:07ChongLijuliend_: is statuses a java array?
18:07juliend_no, statuses is just a reg clojure array
18:07ChongLiyou mean a vector?
18:08juliend_(def statues [])
18:08juliend_*statuses
18:08arrdemvector.
18:09juliend_my main question is not why this code failed on me, but rather why it seems that my application runtime was corrupted afterwards
18:09juliend_removing the bad line doesn't seem to help, it keeps throwing the same runtime exception
18:09juliend_am I missing something ??
18:09lazybotjuliend_: Definitely not.
18:10juliend_lazybot: def not what ?
18:10ecmendenhallamalloy, Yeah, I have it as html and markdown. I'll think about trying to parse the markdown. All the header elements are at the same level of the DOM, though.
18:10ChongLijuliend_: that's a bot
18:10ChongLihaha
18:10ecmendenhallI'll chew on it for a while...
18:10juliend_ok lol
18:11ChongLijuliend_: I wish I could be of more help, I don't use eclipse or ccw
18:11juliend_ChongLi: what do you use? anything you'd recommend ?
18:11arrdemChongLi: on three?
18:11juliend_ChongLi: I've also tried light table but it's far from being operational
18:12arrdemjuliend_: yeah Light Table has a long way to go.
18:12arrdemjuliend_: emacs + nrep.el seems to be the favorite around here.
18:13inavatjuliend_, you need to get the REPL to reload your newly updated code
18:13inavatit's got the old definition in there
18:13inavatI don't know anything about CCw
18:14inavatso I don't know how you'd do it
18:14ChongLiI use emacs + nrepl.el
18:14ecmendenhallI've also been having trouble connecting to the ClojureScript browser REPL. I'm pretty sure I've just made a dumb configuration mistake...
18:14ecmendenhallThis one has a long explanation, so I'll just share my SO question here: http://stackoverflow.com/questions/14552026/connecting-to-clojurescript-brepl-clojure-browser-repl-connect-throws-typeerror
18:15DigitalJackCan someone tell me how to get emacs to quit highlighting the "current" word/name?
18:17ChongLiecmendenhall: there's nothing dumb about it, the browser REPL is currently nontrivial to get running
18:17dnolenChongLi: CLJS support only basic core.logic - no support for constraint or FD stuff. Probably won't see anything like that until feature expressions or something like it gets sorted out.
18:18ivaraasenhyPiRion: this in-place amap is really swell. less taxing for the heap.
18:18dnolenpepijndevos: yeah DCG is slow, a lot of optimization work is required for that stuff to work reasonably.
18:18dnolenmmarczyk: pong
18:19ecmendenhallChongLi, haha, thanks. It sure is. I saw the same problem in the irc logs from earlier this year, but I couldn't find a solution.
18:20ChongLidnolen: is that in reference to my question about this?:
18:20ChongLihttps://github.com/clojure/core.logic/wiki/Using-core.logic-with-ClojureScript
18:20ChongLidnolen: so that is up to date?
18:20juliend_inavat: thanks, i'm pretty sure im reloading right because I see some debug lines that are at the top level being reprinted in the REPL. However, when I request a specific route, the whole thing crashes. If I restart the REPL & process with the exact same code, it works fine
18:20Bodildnolen: Oh, that reminds me, is core.logic for Cljs mature enough for a potential Kibit port? That'd be awesome for Catnip.
18:21dnolenChongLi: yes in ref to that question. It is up to date as far as how to use the CLJS version of core.logic.
18:22ChongLidnolen: ok cool
18:22dnolenChongLi: CLJS version of core.logic is very minimal - hardly any of the fancier stuff available - tabling, constraints (so no FD or nominal), no disequality
18:22ChongLiI was just wondering based on the "last edited 10 months ago"
18:22dnolenChongLi: it's basically just miniKanren more or less
18:23bosie_is there a function for maps that insert a new key but won't override the key if it already exists?
18:23dnolenBodil: but doesn't Catnip require the JVM anyway? So couldn't you just run kibit against the CLJS?
18:24Bodildnolen: I'd like to ditch the JVM at some point. Also, hack value. :)
18:24bosie_merge i guess is what i am looking for
18:25dnolenBodil: heh, well soon as I can easily maintain a single codebase I will.
18:25dnolenBodil: so yeah, something like that should be possible in the future.
18:26cemerickChongLi: only a matter of time at this point :-)
18:26Bodildnolen: I'll be looking forward to the future, then. :)
18:33dnolenecmendenhall: I believe when using the latest CLJS you need the third party Closure jar as well
18:33cemerickYeah, I hit that hard today
18:34cemerickthat's http://dev.clojure.org/jira/browse/CLJS-418 if people want to watch/vote
18:34dnolenfeel free to comment / upvote if you want to see CLJS require it as a dependency (which I think it should)
18:34dnolenhttp://dev.clojure.org/jira/browse/CLJS-418
18:35inavatwhat's the best twitter library for clojure?
18:35inavattwitter-api?
18:36ecmendenhalldnolen: aha, thanks. I'll try that out.
18:37dnolencemerick: oops heh, you beat me to it.
18:37arrdemlol
18:37arrdemwhy does clojurebot not do libraries too?
18:38cemerickdnolen: yeah. Brutal earlier. Send whiskey. :-P
18:48ivaraasendnolen: what's the current status of core.logic and fork/join?
18:48dnolenivaraasen: no status
18:49dnolenivaraasen: jamie brandon has done some work, but I'd like to approach the problem in a more general way.
18:49dnolenivaraasen: http://github.com/clojure/core.logic/wiki/Search-customization-%26-instrumentation
18:50dnolenivaraasen: jim duey also did some experimental work - but it was done in such a way that it's not mergeable at all
18:50ivaraasendnolen: looks interesting. lots of cool stuff happening at the moment.
18:50dnolenivaraasen: yes!
18:51ivaraasendnolen: implemented a prototype based on the Prismatic Flop slides the other day
18:53juliend_I need help on something simple: I am doing a compojure/ring web app. I have a vector, statuses, that contains messages I want to display on a route. In the fn that fires for that route, how do I iterate on my vector to output a sequence of [:li that-status]
18:53juliend_?
18:54weavejesterjuliend_: Are you using Hiccup?
18:54dnolenivaraasen: neat, I haven't looked at the flop stuff
18:54juliend_weavejester: Yes!
18:55ivaraasendnolen: it's only like three macros. pretty darn fast too. in-place amap! is pretty appealing as well for large arrays
18:55weavejesterjuliend_: You could just do [:ul (for [status statuses] [:li status])]
19:03juliend_weavejester: For some reason, I get: java.lang.StackOverflowError
19:04juliend_weavejester: Here's my code: http://pastebin.com/TS1Me3CC
19:06weavejesterjuliend_: There's nothing obvious there that would cause a stack overflow unless there was something strange in layout-narrow.
19:12juliend_weavejester: Thanks... Here's layout-narrow: http://pastebin.com/nGrk3QNk if you could have a look :)
19:12juliend_it relies only on hiccup APIs
19:13weavejesterNothing hugely odd there, either. A stack overflow usually comes from runaway recursion. As far as I can see, all the code you have is bounded.
19:13weavejesterWhat's the stack trace like? It should tell you what part is repeating.
19:14juliend_at clojure.lang.Util.classOf(Util.java:94) at clojure.core.protocols$fn__5828$G__5823__5841.invoke(protocols.clj:13) at clojure.core$reduce.invoke(core.clj:6030) at ns_tracker.dependency$transitive.invoke(dependency.clj:15) at ns_tracker.dependency$transitive$fn__3120.invoke(dependency.clj:14) at clojure.core.protocols$fn__5871.invoke(protocols.clj:76) at clojure.core.protocols$fn__5828$G__5823__5841.invoke(protocols.clj:13) a
19:14juliend_....
19:14juliend_and on and on and on
19:15weavejesterjuliend_: That looks like a circular dependency.
19:15weavejesterns-tracker creates a graph of dependencies, but it assumes there are no circular dependencies.
19:16juliend_weavejester: the weird part is.. I've been getting this error a lot. And reverting the code that simingly caused it and reloading the file in the REPL doesn't help
19:16weavejesterFor example, if file A requires file B, but file B requires file A, that's a circular dependency.
19:17francisAnyone, is this a good representation of the difference between a lisp-1 and a lisp-2? https://gist.github.com/4651584
19:17juliend_weavejester: if I shut down the repo and the java process, and start it from scratch, then it works. with the same code!
19:19weavejesterjuliend_: It's likely a problem with wrap-reload. You technically shouldn't have any circular deps in your source code, but it might be possible to have them without generating an error in Clojure itself.
19:20juliend_I think you're right, because it only starts to happen when I reload a file for the first time
19:20juliend_so it's not a problem starting from scratch, but it is when a file is live reloaded
19:20juliend_and I did find a self reference in a :require, that should be it
19:21weavejesterjuliend_: Yes. ns-tracker should really have better error reporting for self references and circular dependencies.
19:21juliend_weavejester: it should. at least I found it with your help. there's a lot of traps for noobs out there!
19:24beffbernardHi, is there a way to pass in parameters to a route without going about it with middleware or a global state?
19:48weavejesterI'm having a bit of difficulty with recursion in core.logic
19:49technomancyfrancis: that's not really right
19:49weavejesterI've set up a base case, and a recursive case, but I can't stop it from iterating forever
19:49weavejesterUnless… the results from run* are not lazy...
19:49technomancyfrancis: lines 5 and 12 would show the lambda; you'd use (funcall x) in line 12 to get that value
19:49technomancyand (x) in line 5
19:50hiredmanweavejester: you may want to look in to tabling, or restructure your cases, because conde does each clause, it doesn't stop at the first clause that matches like cond
19:50hiredmanweavejester: https://github.com/clojure/core.logic/wiki/Features mentions tabling
19:51hiredmantabling is, as far as I can tell, memoization for logic programs
19:51weavejesterhiredman: I think it this case it was because I assumed that (take n (run* …)) was the same as (run n …)
19:51weavejester(defn repeato [q qs]
19:51weavejester (conde
19:51weavejester [(conso q [] qs)]
19:51weavejester [(fresh [rs]
19:51weavejester (repeato q rs)
19:51weavejester (conso q rs qs))]))
19:52hiredman:/ yeah that is very similar looking to the tabling example
19:53weavejesterI think the difference is that I don't expect the results to terminate without setting an explicit limit.
19:55hiredmanI've been writing core.logic programs that query jira's rest interface, tabling cuts down on the number of rest calls that happen
19:56weavejesterI'll optimize it later :)
19:57hiredmanhttps://gist.github.com/4651836
19:59francistechnomancy: Thanks.
20:02weavejesterHum, maybe I'll need tabling after all.
20:04brehautis there a good low complexity sql db migratiion lib around?
20:05brehautim fine with typing in all the sql statements manually, i just want something that will manage running them when needed
20:05TimMcbrehaut: You only want up-migrations, yeah?
20:05weavejesterI hesitate to nominate one of my own projects, but Ragtime perhaps?
20:05brehautTimMc: i think so yeah
20:05brehautweavejester: irc is exactly for that sort of recommendation
20:06brehautTimMc: yeah up only
20:06brehautbecause i am a DB heathen
20:07brehautweavejester: ragtime does look like it covers all my needs and more
20:08brehautweavejester: any downsides to ragtime?
20:13weavejesterbrehaut: It's not as mature as, say, Ring. But I have used it in production without problems.
20:13brehautweavejester: ok thanks.
20:14rationalrevoltHi room, i'm just starting out with ring and was trying out session middleware. I tried making a session counter, but its always incrementing twice - am I doing something wrong? https://gist.github.com/4651916
20:14weavejesterrationalrevolt: Probably because the browser is looking for a favicon
20:15weavejesterrationalrevolt: So when you go to "/", the browser makes 2 requests, one to "/" and one to "/favicon.ico".
20:16rationalrevoltook - so, this should work right if map my handler to a path other than "/"
20:17brehautweavejester: the docs for ragtime suggest putting ragtime "0.3.2" into dependancies; is it safe to use def dependancies?
20:17rationalrevoltthank you weavejester
20:17weavejesterbrehaut: def dependencies?
20:17brehautweavejester: sorry, dev. dependancies
20:18brehaut(dependancies only defined for the development profile)
20:18weavejesterbrehaut: I don't see why not
20:18brehautcool
20:19weavejesterI mean it's all the same thing by the time it gets to the app.
20:29FrozenlockI just stumbled uppon a goog.events which is in the closure library, but not accessible with cljs. Is cljs only using a subset of the closure library?
20:30dnolenFrozenlock: what do you mean "in", if it's in the jar you can use it.
20:31ChongLiFrozenlock: you can use it
20:31ChongLiyou just need to fully qualify when you construct one of the objects
20:32ChongLisay you want a KeyHandler
20:32FrozenlockWell, if I type "goog.events.MouseWheelHandler" in my js console: On the goog. demo page, it will return the definition. However on my cljs page, it's undefined. https://closure-library.googlecode.com/svn/trunk/closure/goog/demos/mousewheelhandler.html
20:33ChongLifirst you need to (:require [goog.events.KeyHanlder :as key-handler]) in your ns declaration
20:33ChongLithen you create one with (def kh (goog.events.KeyHandler.))
20:34ChongLiworks exactly the same way with MouseWheelHandler
20:35FrozenlockOh right. I suppose what I was comparing it with was already required elsewhere
20:35FrozenlockWorks now, thank you very much :)
20:35fakedrakehello, i want to keep a stack of errors so i came up with this, but it seems a bit ugly, is there a better way? https://gist.github.com/4652070
20:35ChongLino prob
20:36S11001001fakedrake: that's unsafe too
20:36ChongLifakedrake: put it in an atom
20:36fakedrakecould you show me?
20:36ChongLi(def errors (atom '()))
20:36S11001001fakedrake: or carry the error vec around with you
20:37ChongLi(defn push-error [error] (swap! errors conj error))
20:38fakedrakeChongLi: Thank you
20:39ChongLito get at the value in the atom you deref it with @
20:39ChongLi@errors
20:39ChongLiswap! is used to update it
20:40TimMcfakedrake: Vars are not meant to be used that way, and thus do not have the behavior you need.
20:40TimMcParticularly, var mutation is not thread-safe.
20:41ChongLioverriding with def is basically meant only for use in a repl
20:46fakedrakeare atoms thread safe?
20:47TimMcYep, that's what they're there for.
20:48fakedrakehow about this: (defn pop-all-errors [] (let [tmp-errors errors] (reset! errors '()) tmp-errors))
20:48fakedrake?
20:49amalloyno
20:49fakedrake:S
20:49amalloymutation is hard, man. write code without it
20:50fakedrake:S I kind of want to retrieve errors asynchronously so they will show up during rendering...
20:50fakedrakeI will look for another way
20:52ChongLifakedrake: read out of the tarpit
20:53xumingmingvgiven a fn, is there a programmatical way to determine it is an anonymous function or not?
20:53TimMcChongLi: All I got out of OotTP was a sense of frustration at all current programming systems. :-P
20:54TimMcxumingmingv: In a realiable way, or in a hack-assed way?
20:54xumingmingvI'd like hear both, if possible ;)
20:55TimMcI'm not guaranteeing that either exists, mind you.
20:55ChongLiTimMc: it's really been enlightening to me
20:55ChongLiI can practically trace the philosophy of Clojure through it
20:55TimMcChongLi: Enlightening, yes, but I haven't been able to apply anything I've learned from it.
20:56n_bOotTP?
20:56ChongLiTimMc: that depends on how literally you take it
20:56pppaulanyone here worked with clojurescript and angularjs? i would like to know if clojurescript would be easier to work with than that?
20:56TimMcI'm not finished. Just getting into the FRP stuff.
20:56gfredericksclojurebot: OotTP is Out of the Tarpit
20:56ChongLiwhen they talk about using "separate languages"
20:56clojurebotc'est bon!
20:56ChongLiyou don't literally have to use completely separate programming languages
20:56ChongLiyou can use DSLs
20:56TimMcsure
20:57rplacaxumingmingv: how badly do you want to know? You can enumerate all the vars in all the namespaces and see if any of them point to it
20:57ChongLiand if you look at clojure, you can see that atoms, refs, agents etc. form a DSL for handling state
20:57rplacathat shouldn't be too hard, but it's not very efficient
20:57ChongLiwith their own special operator
20:58xumingmingvrplaca: sounds like a solution
20:58ChongLianother thing to look at is macros in clojure
20:58ChongLiyou could consider them a DSL for implementing control (though they can do much more than that, obviously)
20:59rplacaxumingmingv: an anonymous function is just a function that hasn't been assigned to a var
20:59TimMcxumingmingv: Which of these is "anonymous"? #(), (fn [] ()), (fn foo [] ())
20:59gfredericks,#()
20:59clojurebot#<sandbox$eval27$fn__28 sandbox$eval27$fn__28@2d14a694>
20:59xumingmingvrplaca: actually it is enough for my purpose, thanks
20:59gfredericks,(#())
20:59clojurebot()
20:59gfredericksweeeeeird
20:59TimMcheh
20:59ChongLixumingmingv: keep in mind that defn is a macro in clojure
20:59ChongLiit expands to def
21:00ChongLiwith a regular (fn [] ...) in there
21:00xumingmingvTimMc: I think I mean the first two
21:00ChongLias well as handling some other stuff for you
21:00ChongLi(through optional params)
21:00xumingmingvTimMc: The third one does have a name, right?
21:00TimMcSort of.
21:01TimMcClojure functions don
21:01xeqipppaul: have you had any luck figuring out how to make peridot send the files you want?
21:01rplaca(defn f [x y z] ...) == (def f (fn f [x y z] ... )), roughly
21:01TimMcClojure functions don't carry names beyond compile time.
21:01ChongLia clojure function is a value that can be bound to a var; like any other value
21:01TimMc(Unlike JS fns, for instance.)
21:01nedis test.generative like haskell's QuickCheck?
21:01pppaulxeqi, i am doing lots of file testing with is, however i haven't got a chance to refactor my tests to make them look the way i want
21:02ChongLiunlike other languages which use special statements to define functions
21:02ChongLia clojure function is defined by an expression
21:02TimMc&(class (fn CHECK [] ()))
21:02lazybot⇒ sandbox8276$eval77672$CHECK__77673
21:03gfredericksChongLi: well it is a special form
21:03gfredericksalso JS is roughly the same
21:03ChongLigfredericks: no
21:03ChongLiJS has function expressions and function statements
21:03ChongLiwith different syntactical rules
21:03gfredericksdo they have different semantics?
21:03ChongLiyeah
21:04TimMcSort of...
21:04ChongLia function statement can't be called immediately with ()
21:04TimMcChongLi: A JS function statement is basically a JS var assignment + a function expression.
21:04TimMcNot so different from Clojure.
21:04gfredericksChongLi: worked for me
21:04TimMcNow, there may be some differences between browsers re: scope, instanceof, etc.
21:04ChongLiit wasn't a function statement then
21:05ChongLifunction statements are denoted by the f in the word function being in the first column of a line
21:05gfrederickswell you can't call anon functions like that either
21:05gfredericksfunction(){return 5}() fails
21:05TimMcThat's a statement.
21:06TimMcgfredericks: Try (function(){return 5})()
21:06gfrederickssure
21:06gfredericks"anonymous" normally means nameless to me
21:06TimMcWell, that's nameless, and it works.
21:06gfrederickssure but so is mine
21:06gfredericksbut I can't call it
21:06ChongLibecause it's a statement
21:06ChongLinot an expression
21:07TimMcgfredericks: With yours, "SyntaxError: function statement requires a name"
21:07gfredericksTimMc: chrome gives me unexpected token (
21:07TimMcOoh, does it let the fn statement through?
21:07gfredericksI guess it's an error without the () too though
21:08gfrederickssame error though
21:08gfredericks(about the paren)
21:08TimMcAh, it's the *first* paren.
21:08gfrederickswhich I guess means the same thing as requiring a name
21:08ChongLiyeah the unexpected token is where the name should be
21:09ChongLibut anyway, my point is that statements are generally bad
21:09ChongLibecause they enforce silly arbitrary syntactic ordering/rules
21:10ChongLiexpressions (particularly S-expressions) are a lot simpler to deal with
21:10gfrederickshttp://this-plt-life.tumblr.com/post/36425234294/when-i-see-that-a-new-language-makes-a-difference
21:11ChongLihaha there you go
21:15ChongLiwhat does Rich Hickey think of feature expressions?
21:23xeqiis there some middleware that can be added to make (compojure.routes/resources ..) have etags or last-modified headers for caching?
21:27technomancygfredericks: if you meet someone who has invented a language with statements, is it more polite to try to comfort them ("everyone makes mistakes", etc) or to pretend you don't know?
21:28arrdemnope, not working for me.
21:38TimMctechnomancy: The one place it would be useful to have statements in Clojure: println at the REPL.
21:39TimMcand even then it's just that I'd rather not see "nil" at the end of a printout.
21:45yazirian#fossworldproblems
21:46TimMc(inc yazirian)
21:46lazybot⇒ 1
21:46yazirian:)
21:46arrdemTimMc: if we had reader macros that'd be easy....
21:47TimMc&(do (println "Look Ma, no nil!") (symbol ""))
21:47lazybot⇒ Look Ma, no nil!
21:47TimMc...but that's sort of cheating.
21:47arrdemhaha
21:48hadronzooI've created a custom record in ClojureScript that I'm serializing with pr-str. When I use read-str to reload that record, I get a Javascript error that it could not find tag parser. Is it possible to read records in Clojurescript?
21:48TimMcadiii: I've done that for REPL util fns before.
21:48TimMcbah
21:48TimMcarrdem: ^ not adiii
21:49hadronzooDo I need to register a custom tag parser for each record type I create?
22:00hadronzooI answered my own question. Currently, you do have to register a tag parser, as shown here: https://coderwall.com/p/3xqr7q
22:10rlhmm, i'm trying to figure out symbol scope in eval, ex
22:10rl( (fn [x] (eval 'x)) 56)
22:10rlcompalsin about symbol x not existing
22:12rlwhat am i not getting?
22:13rationalrevolt&((fn [x] (eval x)) 56)
22:13lazybotjava.lang.SecurityException: You tripped the alarm! eval is bad!
22:13rllol
22:13rationalrevoltlol
22:14arrdemmeh... anyone know a really ultralight html templating engine?
22:14rlarrdem: i'm actually working on one right now
22:14arrdemI need to bang out some page mock-ups and I don't want to set up a full blown ring/compojure instance...
22:15arrdemrl: do tell
22:15gfrederickstechnomancy: are you suggesting I start a "Dear PLT Abby" column?
22:15rlit's now done yet, but look at fleet. it might meet your needs
22:16rlhttps://github.com/Flamefork/fleet (this is someone elses project)
22:16arrdemnot sure if beautiful or repulsive..
22:17arrdemcute either way
22:17rlarrdem: what does "&" stand for? hard to use search engine with that symbol
22:18callenbotyedi: I'm not going to use long polling.
22:18arrdemrl: up in rationalrevolt's example?
22:18rlwhoops, yes haha
22:19arrdemit's just syntax so that the channel clojure evaling bot(s) would pick it up.
22:19arrdem,(println "hellp rl!")
22:19clojurebothellp rl!\n
22:19arrdem&(println "hello rl!")
22:19lazybot⇒ hello rl! nil
22:19rlah cool
22:20arrdemclojurebot does most of the talking, but lazy bot deals with karma
22:20arrdem~cons
22:20clojurebot(def ^:const x 42) will cause any compiled reference to x to be as if you wrote 42 instead
22:20arrdem~guards
22:20clojurebotSEIZE HIM!
22:20arrdem~gourds
22:20clojurebotSQUEEZE HIM!
22:20arrdemyou get the idea
22:20rlhm, mabey i should re-work my system
22:21rlbascially im slurping in a html file, splitting up "<html>HI !%%some_clojusre_stuff%% </html>" into multiple vectors, string ont he left and clojure data/code on the right
22:22rlthen using eval on the index that contains the code/data
22:22gfredericksis there a special function for getting a range of keys from a sorted-map?
22:23arrdemgfredericks: wouldn't you just (filter) it?
22:24gfredericksthat would presumably not take advantage of the underlying data structure for efficiency
22:24arrdemcorrect
22:24gfredericksthese sorted-maps must be good for something besides printing maps with their keys sorted
22:25arrdemgfredericks: one would hope...
22:26dcbI'm frustrated that I can't attach metadata to datomic entities. Is there a technical reason entities can't have metadata?
22:26gfredericksdcb: you want to store the metadata in the db?
22:27dcbgfredericks: no. Just on the entity I pull back from the database. Not meant to persist at all.
22:27gfredericksthen I have no idea; I wouldn't think it's a technical limitation
22:28amalloygfredericks: subseq
22:29dcbgfredericks: Yah it seems obvious that they should be able to, as they are in a lot of ways just a fancy collection type. I haven't been able to find anyone discussing it though. I guess metadata is not that widely used?
22:30gfredericksamalloy: and that's why (apropos "key") didn't find it :) thanks
22:30gfredericksdcb: I have no hunches; I haven't used datomic either.
22:32rationalrevoltIs _method in a form parameter used to indicate the form submission method, i.e. GET/POST? Is this in any standard?
22:32gfredericksrationalrevolt: I don't think it's standard but pretty common
22:32rationalrevoltgfredericks: alright
22:32gfredericksusually to fake a PUT or DELETE
22:33gfredericksfor people who like HTTP verb variety more than web browsers do
22:34rlah, here is the issue
22:34rl(let [data "test"] (eval (read-string "data")))
22:34rl&(let [data "test"] (eval (read-string "data")))
22:34lazybotjava.lang.SecurityException: You tripped the alarm! eval is bad!
22:35rl,(let [data "test"] (eval (read-string "data")))
22:35clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
22:35gfredericksrl: eval doesn't see locals
22:35rlhmmm
22:36gfredericksif you want to set up some particular locals for some code you're going to eval, you can wrap the code in a let and eval that
22:36rationalrevoltgfredericks: is this commonly used in client side js for REST or something? Like if i needed to do a PUT call from the browser?
22:36gfredericksrationalrevolt: exactly
22:36arrdemherm, so nrepl can't seem to find lein when it's clearly installed and on my path.
22:36gfredericksI can't say for sure I've seen it outside of rails but I always had the impression it was in the pile of quasi-standard web programming hacks
22:37arrdemdoes it use a different search path than the launching user?
22:41rationalrevoltLike &(...) to evaluate an sexp here in this chat room - are there other hooks?
22:41brehautreasons i should be moving my site of couchdb: i have entire types of document i no longer recognise at all
22:41gfredericksrationalrevolt: & triggers lazybot
22:42gfredericks&(#(% %) #(% %))
22:42lazybotjava.lang.StackOverflowError
22:42rationalrevoltsomeone here also did a ,(..) which gave some sandbox message - are there other hooks like that?
22:42gfredericks , is for clojurebot, also for eval
22:42clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: is in this context, compiling:(NO_SOURCE_PATH:0)>
22:43gfredericks,(#(% %) #(% %))
22:43clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.StackOverflowError>
22:43gfredericksclojurebot: lazybot?
22:43clojurebotlazybot is echo ~lazybot
22:43xeqirationalrevolt: , and & trigger the two bots. lazybot also listens to $ for commands, ~ triggers clojurebot to talk
22:43xeqi$findfn 1 2 3
22:43xeqi~gourds
22:43clojurebotSQUEEZE HIM!
22:43hiredmanclojurebot: what is good in life?
22:43clojurebotmeaning of life is to become one with Lisp
22:43lazybot[clojure.core/bit-or clojure.core/bit-xor clojure.core/+ clojure.core/unchecked-add clojure.core/+' clojure.core/unchecked-add-int]
22:43gfredericks~botstack
22:43clojurebot/me puts lazybot on his head and gropes blindly for a third bot to complete the stack.
22:44arrdem(inc clojurebot)
22:44lazybot⇒ 16
22:44gfrederickscallenbot is here...
22:44arrdemis there a limit on how many lines clojurebot'll print?
22:45gfredericks,(dotimes [n 10] (println n))
22:45clojurebot0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n
22:45gfredericksthat I hadn't seen.
22:45gfredericks,(println "foo\nbar")
22:45clojurebotfoo\nbar\n
22:46arrdemthat's new...
22:46gfredericks,(println (apply str (repeat 200 \x)))
22:46clojurebotxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n
22:47arrdem~setf
22:47clojurebotI don't understand.
22:47arrdem~setq
22:47clojurebotIt's greek to me.
22:47arrdem~set
22:47clojurebotIt's greek to me.
22:59xeqirecently got a screencast about friend and creating a login form polished enough, would appreciate any feedback; http://www.clojurewebdevelopment.com/videos/friend-interactive-form
23:02francisxeqi: Nice tutorial.
23:03arrdemherm... can I get someone else's `which lein`?
23:03arrdemxeqi: what line highligher are you running here?
23:03francisarrdem: ~/bin/lein
23:03arrdemfrancis: weird... thanks.
23:04arrdemfrancis: can you M-x nrepl-jack-in ?
23:05francisarrdem: No, I end up starting a REPL on the terminal and connecting to that.
23:06francisxeqi: More specifically, I like that you included creating tests as part of the process. It sets a good example.
23:06arrdemxeqi: yaaay bcrypt
23:06ppppaulanyone have experience working with clojure.data.xml?
23:07arrdemsolved my nrepl issue by sudo ln -s ~/bin/lein /usr/local/bin/lein X-P
23:09francisppppaul: I have some experience, why?
23:09callenbotxeqi: thanks for sharing this!
23:10xeqiarrdem: I'm using the monokai theme
23:10xeqithough I remember changing that color due to some interaction wieh emacs and urxvt
23:12callenbotxeqi: what bit is highlighting the failed step of the test?
23:12xeqicallenbot: thats clojure-test-mode using C-c C-, in the test file
23:13callenbotxeqi: thanks
23:14ppppaulfrancis, i'm doing a test. i have an input xml and some output xml (both are zipped and go through xml->).... i want to compare a single branch of their tags, but my data structure from xml-> is huge and contains way more stuff than i expected it to contain... how would i trim it down so i can compare my xml objs?
23:15xeqifrancis: thanks, I come from a tdd-ish background and love having tests that make sure I'm doing what I think I am
23:15ppppaulhttps://gist.github.com/4652966
23:16cshellppppaul: DOM Manipulation/XPath query?
23:17ppppaulhmm
23:19callenbotxeqi: how do you like living in Texas?
23:19ppppaulit comparing pieces of xml not a use-case in xml manipulation/creation libs?
23:19callenbotxeqi: I'm in the bay area and considering going back to contracting and leaving Cali.
23:21xeqicallenbot: I see the benefits of being in the bay area career wise, I'm here cause its better for wife's career
23:22xeqicheap houses with lots of room, but that causes the sprawl
23:22xeqithough parts of austin are bikable
23:22callenbotxeqi: I'm just miserable here and would rather go back to contracting. I preferred living in the country.
23:24xeqiah, plenty of that here, and lots of suburbs for the have some room but not be alone feeling
23:24cshellcallenbot: What is bringing you misery in the bay area?
23:25xeqithough you give up the tech meetups; we've got ~5 regulars for the houston clojure meetups
23:25callenbotcshell: quite a lot. I'm culturally alienated. I find most of the startups I've run into or worked for to be disingenuous.
23:25callenbotxeqi: there's nothing at all impressive about the bay area programming meetups here. They're mostly a travesty. The Clojure ones are slightly better.
23:26callenbotxeqi: one Clojure meetup group is used as a guy's personal profiteering opportunity, the other is populated mostly with curious tourists.
23:26cshellcallenbot: I'm interested because I'm considering moving from CO to the bay area, solely for the career opportunities. Have you been mostly working at startups rather than the established/larger companies?
23:26Schaefercallenbot: if you prefer the counry, you might consider alameda. it's the midwest of the bay area
23:26callenbotSchaefer: uh no, I want out of Cali.
23:27callenbotSchaefer: I was thinking Washington, Texas, NM, AZ, OR.
23:27xeqihaha, I got a couple of contracting oppertunities out of the local ruby group when I was doing that, so I figured they had to be more valuable out there
23:27callenbotcshell: all startups, yes.
23:27ppppaulcome to canada
23:27cshellcallenbot: I've heard great things about Austin for developers - they say the demand down there is incredibly high
23:27Schaeferalright then :) i've been here for 20 years and it's definitely not everyone's cup o' tea
23:27callenbotppppaul: I don't want to live in Canada.
23:27callenbotcshell: Austin is on my hot list.
23:27xeqi+1 austin
23:28callenbotxeqi: I don't mean sometihng like that, I mean he's literally using the meetup group to advertise expensive classes
23:28callenbotand he had a funded startup on top of that. This isn't something relatively innocuous like picking up contracting work
23:28callenbotwhich I'm considering doing with an old friend so we can both leave Cali.
23:29callenbotI'm to the point where I'm convinced I'll do my own startup, but it'll be bootstrapped and that I wouldn't want anything to do with the bay area ecosystem.
23:29cshellcallenbot: Where are you thinking of picking up contracting work outside of Cali? It's hard in CO to find contracting work that doesn't want you onsite or through an agency
23:29callenbotcshell: Cali is pretty hostile to contracting in general and just wants to hire, in my experience.
23:30callenbotcshell: I was thinking of seeking remote projects and individual work.
23:30cshellcallenbot: That's similar to CO as well - where will you look for the remote projects/ind. work? When I've looked, the market seems to be dominated by people in India bidding super cheap for large projects
23:31francisppppaul: I started looking at your issue, but then was forced to close my emacs, could you tell me again exactly what your issue is?
23:31cshellcallenbot: just interested cause I've been thinking of the same things
23:31callenbotcshell: I've got a long history, broad range of experience, and some particularly expensive specialties. I'm hoping that and a good sense of taste will help me get back in the game.
23:31ppppauli want to compare a branch of 2 similar xml docs francis
23:31callenbotcshell: I've been a 100% remote consultant before. This is nothing new for me.
23:31ppppaulthe branch in the 2 docs should be the same, the rest of the tree could differ
23:32callenbotcshell: what's new is wanting to do it as a small concern with my friend.
23:32francisppppaul: I'm not sure what you mean by 'docs'
23:32ppppaulxml documents (files)
23:33ppppaulone is a file, one is generated from my db
23:33callenbotApage43: I'm from Ohio and have been miserable here for ~2 years. I'm almost itchy with desire to leave. What about you?
23:33callenbotApage43: I lived in NYC for 2 years prior to this.
23:33Apage43callenbot: From Arkansas. Previously working remote, still working for the same company here.
23:34callenbotI have thoroughly established that I hate city life.
23:34Apage43It seemed like a better idea then than it does now =P
23:34xeqicallenbot: oh, if you're considering tx I hope you like it hot; and humid if your near the coast
23:34callenbotxeqi: that could be a blocker. I'm a winter creature.
23:34Apage43callenbot: I kind of knew I didn't like urbanness before moving, I just underestimated that since I'd only experienced it in bursts
23:34callenbotxeqi: I'll give it thought. I'm hoping Austin is a best-of-all-worlds situation for wanting to live in the country but having access to a city.
23:35arrdemxeqi: not really... mod our sweltering summer the winter here is equivalent to east-coast spring
23:35Apage43I grew up in East TX though (also known as Patent Litigation Country)
23:35callenbotApage43: I figured it out quickly in NYC, was hoping CA wouldn't be the worst of all worlds in urban-ness and suburban-ness.
23:35francisppppaul: Personally I would turn them into clojure data structures, then grab the parts/branches I want and compare those. Is your question how would one go about that?
23:36ppppaulwell, they are clojure data structures....
23:36ppppaulbut they are zipped and unmanageable for me
23:37Apage43anyway i'm about to commit to an apartment for a while, so no escaping in the near term
23:37ppppaulApage43, sublet
23:38callenbotApage43: I'm not in a lease, and even if I was, I'd burn the fucking apartment to the ground before staying here any longer than I have to.
23:38callenbotthe moment I figure out an income not connected to my physical location, I'm goooooooone
23:38ppppauldoesn't subletting exist in america?
23:38callenbotppppaul: I'm subletting right now, technically.
23:38arrdemppppaul: it does, but many contracts prohibit it.
23:38callenbotppppaul: we're generally less apt to make formalisms out of casual arrangements.
23:38ppppaulno need to burn things
23:38arrdemppppaul: doesn't mean that ppl don't do it
23:39callenbotyeah I'd say most leases don't allow it
23:39Apage43callenbot: mine kind of *wasn't* and then it let it become that way :/
23:39callenbotwe got away with it by aggressively ignoring the whiny landlord.
23:39ppppaulcal = anti tenant
23:39francisppppaul: I've never used private messages before on IRC, did that reach you?
23:40Apage43*then I
23:40arrdemppppaul: bullshit SF is pro-tennant as hell
23:41callenbotSF isn't the entirety of California
23:41callenbothow pro-tenant the law is depends on the municipality.
23:41callenbotIn general, SF's pro-tenant laws are part of what makes it so expensive to live there
23:41arrdemyeah... 'cause once you're in your landlord basically can't remove you.
23:41callenbotthere's a bimodal distribution of incomes in SF, wealthy and very poor, because of the high costs, high regulation, subsidization, etc.
23:42callenbotso if you're not a post-IPO founder or unemployed, you can't live in SF.
23:43ppppaularrdem, then why no subletting?
23:46arrdemppppaul: not sure about SF, I'm only aware of the state there second hand. here in ATX subletting is largely against contract tho.
23:47ppppaulagainst contract != against law
23:47ppppaulin ontario i think that a contract is void if it states any crazy crap against subletting
23:48arrdemtrue... but that's really just semantics. either way the landlord has the consequent power to evict you.
23:48callenbotI really liked the tenant law in Ohio
23:48callenbotit was a good balance