#clojure logs

2012-04-17

00:05wkmanireA vector of vectors?
00:06emezeskewkmanire: [[11 12] [21 22]]
00:06wkmanireemezeske: He he he, I knew what you meant
00:07emezeskewkmanire: Oh!
00:07wkmanireI wasn't asking literally for you to explainwhat that is.
00:07wkmanireValidating columns and quadrants would be painful with a vector of vectors
00:08emezeskePainful?
00:09emezeske,(map #(get % 0) [[1 2] [3 4]])
00:09emezeskeThere's a column
00:09clojurebot(1 3)
00:09wkmanire&(doc get)
00:09lazybot⇒ "([map key] [map key not-found]); Returns the value mapped to key, not-found or nil if key not present."
00:10wkmanireI see how that works.
00:10wkmanireemezeske: I'm still taking my baby steps with clojure. The way I would have done that would been a whole lot uglier.
00:10emezeskewkmanire: ^_^
00:11wkmanireemezeske: Wanna golf some code back 'n forth on refheap?
00:11emezeskewkmanire: As for a quadrant, you might do something like ##(map #(subvec % 1 3) (subvec [[1 2 3 4] [5 6 7 8] [9 0 1 2] [3 4 5 6]] 0 2))
00:11lazybot⇒ ([2 3] [6 7])
00:11emezeskewkmanire: Although I'm not sure that's the most succinct approach
00:12emezeskewkmanire: A bit busy atm :)
00:12wkmanire&(doc subvec)
00:12lazybot⇒ "([v start] [v start end]); Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied, defaults to (count vector). This operation is O(1) and very fast, as the resulting vector shares structure with the original and no trimming is done."
00:12wkmanireemezeske: Bummer, maybe another time.
00:13wkmanireI'm going to hack around on this and try to learn me sumthin' before I go to bed.
00:13wkmanireThanks for the pointers.
00:14emezeskewkmanire: NP
00:14technomancymuhoo: the trampoline repl thing is a known bug; will be fixed in the next preview
00:16emezesketechnomancy: Hey, I wonder if you might have insight into this:
00:16emezesketechnomancy: When I add [org.apache.maven.artifact/maven-artifact "3.0.4"] as a dependency in lein-cljsbuild, lein2 seems to blow up
00:16emezesketechnomancy: I assume that it's because of a version conflict
00:16technomancyemezeske: I think it might need a different version of plexus from pomegranate, but I couldn't say for sure
00:17technomancyactually, maven 3.x should be compatible
00:17technomancywhat's the error?
00:17emezeskejava.lang.NoSuchMethodError: org.codehaus.plexus.DefaultPlexusContainer.initialize
00:17emezeskeI don't really care what version of the JAR I use, I'm just using it to compare versions
00:17technomancyoh gross dependency injection
00:17technomancysorry, no idea
00:17technomancycemerick might know
00:17emezeskehaha, thanks
00:18technomancyI can't even understand what dependency injection is, much less use it.
00:18emezeskePain... I just want to call one function from the JAR :(
00:18technomancyevery time I read about it, the words describing it just don't form coherent impressions in my mind.
00:18technomancywhich function?
00:18technomancymethod
00:18emezeskeactually I was wrong about just calling a func
00:18emezeskeDefaultArtifactVersion.
00:19TimMctechnomancy: I only know about DI from Java-land, where it basically consists of writing Java in XML syntax. /kills self
00:19technomancyemezeske: are you comparing two versions?
00:19emezesketechnomancy: yes
00:19technomancybecause I have a native Clojure function for that in leiningen.core.main
00:19emezesketechnomancy: is it a public function?
00:19technomancyaye
00:19wkmaniretechnomancy: There is an older google tech talk "Clean Code Talks" that demonstrates one understanding of dependency injection.
00:19emezesketechnomancy: thanks I'll just use that!
00:19technomancyemezeske: oh, it's marked ^:internal, but I should probably make it public
00:20wkmaniretechnomancy: The speaker was Misko Hevery.
00:20technomancyleiningen.core.main/version-satisfies?
00:20emezesketechnomancy: nice
00:20TimMcPretty sure dynamic vars take the place of a lot of dependency injection in Clojure.
00:20emezesketechnomancy: I'm not familiar with internal; is that enforced?
00:20technomancyemezeske: not a bit; it's just documentation
00:20wkmanireBut the examples were entirely imperative and he mostly cited the concept of requiring objects as arguments to your functions that you need to use
00:20wkmanireas opposed to having your functions take arguments and using them to create new object instances with them.
00:21technomancywkmanire: I think you might need to understand crappy type systems for it to make sense?
00:21emezesketechnomancy: Nice, I like that better than private ;)
00:21technomancythat's my theory
00:21xeqiheh, I had to write something similiar for pomegranate
00:21xeqire: version comparison
00:21technomancyxeqi: oh, I should use that then
00:21technomancyis yours public? =)
00:22xeqic.p.a/within?
00:22xeqiI think
00:22wkmaniretechnomancy: Well, the concept works even with languages that have generally liked typed systems like Python.
00:22technomancyxeqi: cool
00:22xeqiwell, it works on the coordinates, not the version specifically
00:22technomancyah, sure
00:22technomancyemezeske: best to go with that; mine might go away
00:23emezesketechnomancy: thanks
00:23emezeskeHmm, I don't know what "coordinates" means
00:23xeqi[ring "1.0.2"] <- coordinate
00:24technomancywkmanire: you can implement it in Ruby too, but you will be filled with regret years later if you do: http://weblog.jamisbuck.org/2007/7/29/net-ssh-revisited
00:24emezeskexeqi: Ah, the whole thing, I see
00:25xeqiare you just doing version comparisons?
00:25emezeskexeqi: yeah
00:25wkmaniretechnomancy: Yeah, with languages like Ruby an Python it is a lot easier to mock things.
00:25wkmanireand... I think the biggest draw of DI is testability.
00:25emezeskewkmanire: It's ridiculously easy to mock in clojure, see midje
00:26wkmanireNo need go to the extremes you need to to in languages such as VB.net or Java.
00:26wkmanireemezeske: I still haven't written a unit test for Clojure.
00:26xeqihttps://github.com/cemerick/pomegranate/blob/master/src/main/clojure/cemerick/pomegranate/aether.clj#L462
00:26wkmanireemezeske: I wrote my first Clojure app today, a number guessing game that uses the binary search algorithm
00:26emezeskewkmanire: I just started recently, I've been super impressed with midje
00:27wkmanirehttps://refheap.com/paste/2156
00:27wkmanireI really am just a wet-behind-the-ears clojure newb.
00:27xeqicould take just some of that if don't need full coordinates
00:27emezeskexeqi: thank you!
00:28wkmanireemezeske: I do want to start unit testing right out of the gate though. I waited about 10 years to start that habbit with imperative programming. That was a big mistake.
00:30emezeskewkmanire: Yeah, I hear you there
00:34wkmanire&(doc =>)
00:34lazybotjava.lang.RuntimeException: Unable to resolve var: => in this context
00:35wkmanireemezeske: Did they modify the way the reader works in midge to make => meaningful?
00:35RaynesWhy would they have to modify the reader?
00:35emezeskewkmanire: Nah, it's just a macro
00:35wkmanireRaynes: Cause I don't know how to ask the question gooder.
00:35emezeskewkmanire: Within the (fact ...) macro, you'll have to look at midje's documentation. It's a DSL.
00:36wkmanireokeydokey.
00:36Raynesemezeske: I'm lonely and you're the closest thing to a close friend who is around right now. You should give me hugs and stuff.
00:36eggsbyhey, is there any way to get run-jetty to work in conjunction with an infinite loop in the same project?
00:36eggsbyor will one just block the other from ever happening
00:36emezeskeRaynes: Doooon't be loonely
00:37Rayneswkmanire: Your double printlns in game-over can be a single println.
00:37RaynesNot that it matters. Just noting.
00:37Raynes<3
00:37xeqiemezeske: you can use {:join? false} to background jetty
00:37xeqierr
00:37xeqieggsby: ^
00:37eggsbyoh, thank you xeqi
00:38Raynesemezeske: I'm in West Hollywood alone in a tiny room and all of my friends are asleep.
00:38wkmanireRaynes: I realized that a bit earlier.
00:38emezeskeRaynes: I read that to the tune of the fresh prince of bel air theme song
00:38wkmanireRaynes: I'm all ears for pointers though. I kind of feel like I wrote an imperative thing dressed in FP.
00:38Raynesemezeske: Appropriately. I'm like a stones throw from Bel-Air.
00:39emezeskeRaynes: "On the REPL, is where I spent most of my days"
00:39Rayneso/
00:39emezeske"Chillin' out, relaxin, and maxin' all cool, just writin' some lambdas, inside where it's cool"
00:40emezeske"When a couple of bugs, that were up to no good, started makin' trouble in the neighborhood"
00:40wkmanireemezeske: Ever laugh at a crappy joke and then feel guilty about it?
00:40Rayneswkmanire: https://refheap.com/paste/2156#L-38 You don't need this do.
00:40emezeskewkmanire: Never.
00:41wkmanire:D
00:41RaynesOr this one https://refheap.com/paste/2156#L-26
00:41Rayneswkmanire: The code runs inside an implicit do.
00:41RaynesSo there can be multiple top-level expressions as if there were an explicit do there.
00:41wkmanireRaynes from the let from the defn?
00:42Rayneswkmanire: You're doing like (defn foo [] (do …)); you don't need to do that.
00:43wkmanireRaynes: Gotchya. I'll make a couple of edits. just a sec
00:44Rayneswkmanire: And the only reason you're getting tips is because you use my pastebin. If you pasted it on gist, you'd be dead to me right now. ;p
00:44wkmanireRaynes: For your information, I'm as proud of my number guesser as you are of your fancy pastebin.
00:44Raynes:p
00:45wkmanireDid you implement it with clojure?
00:45emezesketechnomancy: I noticed in the lein2 preview changelog that "Stop using numeric exit codes for task failures."
00:45emezesketechnomancy: I have some hooks that pay attention to tasks returning 0 or 1. Will my hooks need to change?
00:45Rayneswkmanire: Sure did: https://github.com/Raynes/refheap
00:46wkmanireRaynes: I'm a web-dev by trade. My ultimate goal with clojure is to build a site FP style.
00:46Rayneswkmanire: refheap can always use some web-dev expertise. Particularly: we all suck at design.
00:46wkmanireI'm also really fond of Javascript, so I'm interested to see what working with ClojureScript is like.
00:46emezeskewkmanire: It's fun :)
00:46wkmanireI also suck at design. web-dev, not web-designer.
00:47RaynesFair enough. :p
00:47laurusjoin #debian
00:47eggsbywhy does this return a null pointer exception? (while true (Thread/sleep 5000 (println 'hi')))
00:47laurusSorry.
00:47wkmanirelaurus: no.
00:47RaynesBut yeah, javascript is an area where we lack too. I can learn it as I go, but I imagine real jsers could think of stuff to add.
00:48wkmanireWell, Since you're helping me I'd be happy to have a look if there is something in particular you'd like me to see.
00:49RaynesNothing in particular. Just check out the issue tracker if you're ever looking for something to contribute to. I don't care if your code is perfect, so feel free to practice on stuff there and we can work through pull requests and stuff if you want.
00:49wkmanireThough to be honest, I don't have the foggiest idea of how to set up a dev environment for clojure for web stuff.
00:49eggsbywkmanire: lein
00:50wkmanireRaynes: Okeydokey.
00:50Raynes&(quot 10 2)
00:50lazybot⇒ 5
00:50Rayneswkmanire: ^ Integer division. Simplifies your mid-point function.
00:51wkmanirequot is short for quotiant?
00:51RaynesYessir.
00:51wkmanirehow the hell do you spell that word.
00:51wkmanireKwohshunt.
00:51Raynesquotient
00:51Raynesa vs e
00:54wkmanireRaynes: Wow, your paste has real editing.
00:54RaynesIndeed.
00:54wkmanireVery much appreciated.
00:54Raynes:D
00:54wkmanireIt irks me when I have to paste a new link to everyone every time i makea changed.
00:54wkmaniremake a change*
00:54wkmanireThere, I applied your advice and tested it in my terminal
00:55wkmanireseems to work with the undid do's.
00:55Rayneswkmanire: Looks good!
00:55wkmanireI forgot that do is part of let is part of defn.
00:56xeqieggsby: your calling Thread.sleep(long, int)
00:56xeqiprolly need to move a paren
00:57eggsbyah
00:57eggsbyshould I be using the 'future' macro for this?
00:58wkmanireRaynes: Gah, fixed height is a PITA. Issue #77. You guys are targeting only modern browsers right?
00:58wkmanireConsidering that it is a developer a tool.
00:59Rayneswkmanire: Yeah, there are already a few things that preclude <IE8 support.
00:59RaynesI don't care *at all* about IE though, even newer versions.
00:59RaynesThe answer to any IE problem is don't use IE>
00:59xeqifor this case (do (Thread/sleep 5000) (println "hi")) should work
01:01Rayneswkmanire: #77 is one solution to the problem. The problem with it is that when you paste something long, it throws you to the bottom of the page.
01:01xeqifuture is for when you want to do something in the background
01:01RaynesWhich makes sense and all, but the paste button is at the top of the page.
01:01xeqinot for rate limiting like you're doing here
01:01RaynesI'd personally just rather make it grow. I think autodidakto was looking at using media queries.
01:02eggsbyhmm, xeqi, how would I achieve something like this? https://refheap.com/paste/2171
01:02eggsbyIn that example, run-jetty never seems to happen (i.e. requests get dropped)
01:03eggsbyoops should have been defn
01:03eggsbyoh nvm
01:03wkmanireRaynes: I'll go ahead and clone the repo.
01:03eggsbyyaaaay it works
01:04eggsbythank you very much xeqi
01:04xeqinp
01:06wkmanireRaynes: I'm really seeing minimal JS here.
01:12wkmanireRaynes: I see you are using codemirror as your code editor. So fixing the full height + middle click paste issue means reading through that project's code.
01:20wkmaniregoodnight folks.
01:21spoon16if I want to use the clojurescript repl capability to connect a brower instance back to my listening repl… do I have to have the repl connect command execute from an iframe served from localhost?
01:23muhootechnomancy: thanks. i'd be happy to help with it, if i can, but it seems it may be beyond me.
01:23muhoobut i'm motivated since i work on low-memory, anemic-cpu netbooks, so trampoline is good
01:25afoolsuchasithere is a jar installed on my system at /opt/sphinx4/lib/sphinx.jar. I cannot seem to get this into my classpath for a slime repl started with clojure-jack-in. anyone know what i should be looking for for managing generic classpaths?
01:35muhooafoolsuchasi: lein-localrepo
01:36muhoospecifically https://github.com/kumarshantanu/lein-localrepo
01:38afoolsuchasithx. checking it out
01:46emezeskespoon16: I don't think you want to use an iframe
01:46emezeskespoon16: Or are you trying to do something like have the REPL run somewhere other than the web server itself?
01:47ibdknoxcross host won't work there
01:47emezeskeibdknox: Yeah
01:47emezeskeibdknox: Wouldn't an iframe run in a different javascript context?
01:47ibdknoxyep
01:48ibdknoxdamn browsers and their security features ;)
01:48emezeske^_^
01:49ivanyou can send messages across domains
01:49emezeskereverse SSH tunnel, anyone?
01:49ibdknoxivan: yeah, but the JS would be locked into the iframe
01:49ibdknoxso it wouldn't be meaningful
01:49ibdknoxand if the iframe is in a different domain the host frame can't grab its content
01:50ibdknoxthe real problems isn't the frame it's getting the stuff in and out of it :(
01:51ibdknoxemezeske: we should just implement the repl over websockets
01:51ibdknoxproblem solved.
01:51ibdknoxthat's how brepl worked
01:52ibdknoxgranted it used my socket.io implementation which is like shooting a fly with a nuclear bomb
01:53emezeskeibdknox: by which you mean "highly effective?"
01:53emezeske:)
01:53ibdknoxhaha
01:57emezeskeDoes anyone have lein-midje working with Leiningen 2?
01:59afoolsuchasisry, still trying to come to terms with clojure/lein build system. trying to install plugin localrepo, breaking with "cant find cemerick/pomegranate/aether.clj on classpath" i see aether in lein search but it doesnt seem to want to install, plugin, or dependency in my project. what do i need to do to satisfy that?
02:00afoolsuchasior rather, installed localrepo, trying to run and it breaks
02:00afoolsuchasiaether is :required in the main ns of the localrepo project
02:05xeqiafoolsuchasi: what does `lein version` output?
02:06afoolsuchasiLeiningen 1.7.0 on Java 1.7.0_147-icedtea OpenJDK 64-Bit Server VM
02:06xeqiwhat version of localrepo are you using?
02:09afoolsuchasi1.13.1
02:09afoolsuchasisorry
02:09afoolsuchasithat was the aether
02:09afoolsuchasiwas using 0.4.0
02:10emezeskedrewr: Give lein-cljsbuild 0.1.8 a shot, to see if it fixes your lein2 problem
02:10xeqilein 1.7 needs localrepo 0.3
02:10afoolsuchasioh fiddlesticks. i was thinking i had already gotten 2
02:10afoolsuchasithat didnt even click
02:10afoolsuchasithanks
02:11xeqimight need to rm 0.4 from ~/.lein/plugins depending on how you were using it
02:15afoolsuchasiwell localrepo now works. on with the quest. thanks.
02:16afoolsuchasii sense it is time to retire before i further shame my ancestors here. peace.
02:35ibdknoxseriously.. node still doesn't have hot code reloading?
02:35ibdknoxI'm way to used to Clojure lol
02:35ibdknoxtoo*
02:51seancorfieldamalloy_: yes, i figureed another thread was needed after i posed that Q (and i'd already suggested the queue for buffering) - glad i'm not insane :)
02:52seancorfieldibdknox: we finally decided to put swank servers in all our long-running processes so we could do hot code reloading :)
02:52ibdknox:)
03:13spoon16emezeske: I'm just messing around, but I'm trying to serve a site from a remote server to my browser and then in a separate window on the local machine connect a repl to the browser window. So yes, run the repl somewhere besides the server serving the HTTP requests.
03:16emezeskespoon16: A separate browser window?
03:18mrnex2010spoon16: are you using compojure?
03:19mrnex2010(im doing some compojure and i just found how to do that there
03:24spoon16a console repl
03:24spoon16I want the js on the website to execute and connect to "localhost:9000/repl"
03:25spoon16and then for my local repl to be able to pipe clojure -> javascript and execute it in the browser
03:25mrnex2010cool, what are you doing it for?
03:25spoon16for fun right now
03:25spoon16no real reason
03:25spoon16have to sleep now though
03:25spoon16will mess around more tomorrow
03:26mrnex2010cool bye
03:29emezeskespoon16: So you know that with an iframe or whatever, the REPL is not going to be able to affect your site, right?
03:29emezeskespoon16: It will only affect the context of that iframe
03:30emezeskespoon16: The browser REPL simply has to connect to the server the page was loaded from
03:30emezeskespoon16: If you really want to run the REPL on your local machine, I suggest setting up your webserver to proxy /repl
03:31emezeskeDoh, spoon16 is gone.
03:44kralmorning
05:28xumingmingvis there a btrace kind of thing for clojure? http://kenai.com/projects/btrace
05:30clgvxumingmingv: there is org.clojure/tools.trace - you can check the feature set on github
05:32TheBusby,(map clojure.string/trim [" a " "b" nil "d "])
05:32clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.NullPointerException>
05:33clgv,(map (fnil clojure.string/trim "") [" a " "b" nil "d "])
05:33clojurebot("a" "b" "" "d")
05:33xumingmingvclgv: thanks!
05:33TheBusbyclgv: thanks!
06:26tomojratios have no place in production, because doing a harmonic series with ratios is slow. oi
07:02michaelr525hi
07:02michaelr525tried building the latest enlive from github
07:02michaelr525leiningen can't find clojure-1.4.0
07:03michaelr525so where can I find it?
07:04clgvmichaelr525: 1.4.0 is not released yet. so you probably haveo use something like 1.4.0-betaX with X being the latest number
07:05michaelr525hey clgv
07:05michaelr525i can't the clojure jar on http://build.clojure.org
07:05clgvmichaelr525: humm well, on search.maven.org there is a clojure-1.4.0
07:05michaelr525ah.. let's
07:05michaelr525see
07:06vijaykiranI think 1.4 is in maven somewhere, my lein pulled it yesterday
07:07clgvstrange that there is no announcement on clojure.org or the ML
07:07babilen1.4.0 has been released?
07:08babilenYeah, 1.4.0 is on maven.org :-/ -- I am surprised that I missed that.
07:09clgvsilent release? :P
07:09babilenNothing on http://www.clojure.org as well
07:10michaelr525thanks clgv.. have to run now otherwise I would have asked why leiningen didn't find it. It said it was searching repo1.maven.org
07:11clgvmichaelr525: you got [org.clojure/clojure 1.4.0] in the project.clj?
07:12michaelr525nope, i've got this [org.clojure/clojure "[1.2.0,)"] - it's from https://github.com/cgrand/enlive/blob/master/project.clj
07:13michaelr525using the stable leiningen version
07:13babilenmichaelr525: I've just downloaded it from repo1.maven.org (1.4.0 that is) -- https://refheap.com/paste/2176
07:13clgvah ok
07:13babilen(lein2)
07:14michaelr525gotta run :)
07:14michaelr525bye
07:14clgvlein 1.7.1 works as well
07:38clgvclojure 1.4.0: http://corfield.org/blog/post.cfm/clojure-1-4-0-clj-time-congomongo
08:28tomojwhat's an elegant way to do (f [:foo :bar :baz]) == '([:foo (:bar :baz)] [:bar (:foo :baz)] [:baz (:foo :bar)])
08:29tomojright now I am iterating over indices and calling split-at
08:36clgvtomoj: ##(letfn [(f [coll] (for [a coll] [a (remove #{a} coll)]))] (f [:foo :bar :baz]))
08:36lazybot⇒ ([:foo (:bar :baz)] [:bar (:foo :baz)] [:baz (:foo :bar)])
08:36tomojI should have picked a better example
08:37tomoj(f [:foo :bar :baz :foo]) == '([:foo (:bar :baz :foo)] [:bar (:foo :baz :foo)] [:baz (:foo :bar :foo)] [:foo (:foo :bar :baz)])
08:37clgv##(letfn [(f [coll] (for [a coll] [a (remove #{a} coll)]))] (f [:foo :bar :baz :foo]))
08:37lazybot⇒ ([:foo (:bar :baz)] [:bar (:foo :baz :foo)] [:baz (:foo :bar :foo)] [:foo (:bar :baz)])
08:37angerman,(char 0x4)
08:37clojurebot\
08:38clgvoh well. than you probably need the index iteration
08:38clgvor you can try a lazy-seq approach
08:40clgvtomoj: lazy-seq where the function keeps track of prefix-coll and rest-coll and thus builds what you want
08:40angerman,(clojure.string/replace (list \a \b \c (char 0x4) \d) (char 0x4) "")
08:40clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Character>
08:41angerman,(clojure.string/replace (list \a \b \c (char 0x4) \d) (char 0x4) \space)
08:41clojurebot"(\\a \\b \\c \\ \\d)"
08:41llasramtomoj: Is the input always going to be a vector?
08:44tomojyes
08:44tomoj(fn ctx [less [x & more]] (lazy-seq (when x (cons [x (concat less more)] (ctx (conj less x) more)))))
08:44tomoj(e.g. (ctx [] [:foo :bar :baz]))
08:46tomojalso the input never has more than 5 elements in it...
08:47tomojclgv: good idea
08:58Kototamahi, where can i find the slime version compatible with lein swank?
08:59Kototamai would like to have the latest slime contrib files compatible with clojure
08:59llasramKototama: swank Clojure includes a/the compatible version of SLIME
09:00llasramIf you're just using SLIME with Clojure, you can just use clojue-mode's clojure-jack-in and be done
09:00Kototamaok but how can i get slime-fuzzy slime-c-p-c.el etc?
09:01llasramHmm. This question I cannot answer
09:01llasramYou can look at the version of SLIME bundled in swank-clojure and find the associated compatible versions?
09:11Kototamaok seems the frozen version is the one from technomancy
09:12babilenKototama:
09:13babilenKototama: All you have to do is to install clojure-mode and the swank-clojure leiningen plugin. See https://github.com/technomancy/swank-clojure for details
09:14Kototamano actually i need a bit more, i need to have the slime contribs working to have anything-slime working too
09:14Kototamait looks like the slime bundled xith swank clojure provides slime-repl but no more
09:14babilenKototama: Shouldn't be a problem to install that with package.el
09:15Kototamamost of the contribs are not on it :s
09:16babilenKototama: What about marmalade? How do *you* install it? (We venture into #emacs territory though)
09:17Kototamait's the same for marmalade most of the slime contribs are not on it
09:17Kototamai used to just use swank-clojure from package.el
09:18Kototamabut this time i downloaded the slime and the contribs from the technomancy github
09:18Kototamajust to have slime fuzzy slime-c-p-c etc
09:18angerman,(cons nil '(10 12))
09:18clojurebot(nil 10 12)
09:19Kototamait's really nice, you get a anything-slime-repl-history with anything-slime
09:19Kototamait acts like a filtered history on all your previous inputs
09:19Kototamaway better than the default
09:22gfredericksI'm trying to debug my "That's not a task" message I get from M-x clojure-jack-in
09:23gfredericksmy .lein/profiles.clj is '{:user {:plugins [[lein-swank "1.4.4"]]}}'
09:23gfredericksand I just ran `lein upgrade`
09:23gfredericksI'm not sure what else is necessary
09:25gfrederickswell I guess it's `lein repl` for now
09:33Kototamawhat happens if you call 'lein swank' from the shell?
09:33llasramgfredericks: `lein version` output?
09:34gfredericksllasram: Leiningen 1.7.1 on Java 1.6.0_26 Java HotSpot(TM) Client VM
09:35llasramgfredericks: Ah, there you go. Profiles aren't backported to lein 1.x. Need to either use the lein 2.0 preview release or `lein plugin install` the plugin
09:36gfredericksthe swank-clojure docs say that only applies to pre-1.6.2 :(
09:37llasramgfredericks: I believe at that point 1.6.2 was intended to be the last 1.x release, but there were some bugs which led to 1.7
09:37llasrams,at that point,when those docs were last updated,
09:38babilengfredericks: The README is outdated. It actually appliad to every 1.x release (of which 1.7.1 is the latest)
09:38babilen*applies
09:40gfredericksllasram: that does fix it; thanks
09:55flashingpumpkinguys, what would you recommend to work with websockets?
10:01jedahuwhat's the correct way to write this macro? http://dev.clojure.org/jira/browse/CLJ-869
10:02fliebeljedahu: let a normal gensym, and insert that.
10:03fliebel(let [a (gensym)] `(foo ~a)) or something like that
10:04fliebel&(let [a (gensym)] `(foo ~a))
10:04lazybot⇒ (clojure.core/foo G__7487)
10:04jedahufliebel: thanks, sorted :-)
10:26tomojhow do you typehint a primitive array in 1.3?
10:27dnolentomoj: ^doubles ^longs etc
10:28tomojhmm
10:28tomojwith ^bytes I get "java.lang.IllegalArgumentException: Unable to resolve classname: clojure.core$bytes@1fc5681"
10:29dnolentomoj: I not sure if there is support for ^bytes
10:30dnolen,(class (make-array Type/BYTE 0))
10:30clojurebot#<CompilerException java.lang.RuntimeException: No such namespace: Type, compiling:(NO_SOURCE_PATH:0)>
10:30dnolen,(class (make-array Byte/TYPE 0))
10:30clojurebot[B
10:30dnolen^"[B"
10:30dnolentomoj: ^ should work as well.
10:31tomojyeah, that's what I've got. I feel like #^bytes used to work?
10:32gfrederickshas anybody used the aleph http client to send post requests with data?
10:33dnolentomoj: I don't remember that, but even referencing that syntax - #^bytes - ancient history.
10:41dgrnbrgdnolen: what is your talk going to be on tomorrow? I follow all your postings to the mailing list carefully, and i'm trying to decide between your talk and another one-time-only event
10:42tomojgfredericks: some, yeah
10:42RickInGAdgrnbrg: what list?
10:43dgrnbrgthe main clojure list
10:43gfrederickstomoj: I don't see any documentation on it -- does it only accept channels of byte-arrays as the body?
10:43gfrederickstomoj: certainly strings don't seem to work
10:43tomojstrings work here
10:44gfrederickshrrrrm
10:44tomojalso e.g. vectors/maps with :content-type "application/json" and :auto-transform true
10:44gfredericksI'm probably going to use channels, but I'm having odd hard-to-debug trouble and so I'm just trying to get a feel for what's expected
10:45gfrederickstomoj: what version of aleph/lamina?
10:45jtoyhttp://www.niclas-meier.de/2012/04/first-hundred-days-of-clojure/
10:45tomojaleph 0.2.1-beta2
10:46gfredericksme too; I get the hugest stack trace if I pass in a string :/
10:46cmajor7when is "clojure east" (in New York)?
10:46gfredericksI'm just running against a compojure server I setup for testing this
10:46tomojthe stack trace is from the client though?
10:47gfrederickstomoj: that is difficult to discern since I have them running in the same process. Time to split them up I guess! hadn't thought of that
10:48tomojwell, is the stack trace about aleph http client stuff or compojure stuff?
10:48gfredericksoh definitely aleph
10:48gfrederickslotta lamina and netty and such
10:49gfredericksI think it's a timeout exception; I set a 1200 ms timeout on the request
10:50tomojso your server just isn't responding?
10:50jtoyhow do I return the first line from a slurp? (first (slurp "file")) seems to return the first character
10:50gfrederickstomoj: well it certainly responds if I use a channel instead
10:50gfredericksI guess I could log from the server to check
10:50tomojjtoy: (with-open [r (clojure.java.io/reader "file")] (first (line-seq file)))
10:51tomojif you use a channel the request is chunked
10:51tomojdunno why that should make the server not respond
10:51tomojI'd just test the client against `nc -l 8080`
10:51jtoyi see, why can't I use slurp for that though?
10:52rhcyou could always slurp - string/split "\n"
10:52tomojyou can, but it doesn't make much sense
10:52tomoj...if you only want the first line
10:53tomojinterestingly, the aleph client seems to spit out chunk lengths in hexadecimal when :auto-transform is true
10:53tomojoh, no it always does that :)
10:53gfrederickstomoj: I did not know about `nc`; this sounds useful
10:55tomojit will let you just see the raw http request aleph is producing
10:55gfredericksright
10:57gfrederickstomoj: when running with channel it outputs predictably; when running with string it prints nothing
10:57gfredericksbut the result channel responds to me shutting down nc (by enqueueing nil)
10:57gfredericksso it's as if it opens the tcp connection and then waits
10:57gfredericksI'm doing this from the repl, where oddly I see no stacktrace at all
10:58TimMcMan, would it have killed Rich to make PersistentHashMap generic?
10:58mdeboardYes
10:58TimMcI really want to use it from a Java project...
10:58mdeboardThere is a bomb in his brain
10:58mdeboardSet to go off if he makes it generic
10:58tomojgfredericks: strange.. works here
10:58tomoj((http/http-client {:url url :method :post}) {:body "foo"}) ?
10:59gfredericksuh
10:59gfredericksI'm using http-request
10:59tomojyeah, worked for me there too
10:59gfredericksI'll try yours
11:00gfrederickstomoj: yeah same behavior there
11:00gfredericksalright this is uberweird; I'll startup a fresh project on a fresh VM and see if it does the same thing
11:01tomoj0.2.1-beta2, right? I'm on clojure 1.3 as well, don't think it should matter
11:01gfrederickstomoj: same for both
11:01gfrederickstomoj: jvm?
11:02tomojsun 1.6.0_30
11:02gfredericksJava(TM) SE Runtime Environment (build 1.6.0_26-b03)
11:02gfredericksJava HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
11:02tomoj(http/http-request {:url "http://localhost:8083/&quot; :method :post :body "foo"}) doesn't print anything?
11:03gfrederickstomoj: it returns the channel that sits there waiting
11:03tomojbe sure to try a new port
11:03tomojit returns a result channel, right?
11:03gfredericksyeah
11:03gfredericksone sec I'll try new port
11:03tomojthat's to be expected, but nothing in nc?
11:03gfrederickscorrect
11:03gfredericksthe result channel waits until I close nc, then it gets nil
11:04tomojso it must be connecting, but it's not writing anything at all..
11:04gfredericksright
11:05tomojbaffling
11:05gfrederickstomoj: well at least you've helped me isolate the issue much more than I had on my own
11:11tomojextracted test https://gist.github.com/a552a8f82180e6d27f51
11:14gfrederickstomoj: sweet I was just doing something like that
11:15gfrederickstomoj: I like the version 0.1.0 part :) does lein default to that for you?
11:17tomojit defaulted to 0.1.0-SNAPSHOT
11:17tomojI think
11:17tomojor maybe I just still habitually change 1.0.0 to 0.1.0
11:18gfrederickstomoj: ooh, this seems to work fine; the plot is thickening
11:18gfrederickssweet, I'll do a binary search between these two setups to figure out wtf.
11:18gfrederickstomoj: much thx
11:19tomojrandom guess: do you have aleph jars in both lib and lib/dev?
11:19tomojthat would be odd
11:19gfredericksnope
11:20gfrederickslib has aleph-0.2.1-beta2.jar at top level
11:20tomojno clue what could cause that then
11:21gfrederickstomoj: I'll let you know what I figure out
11:25michaelbartonI'm getting java.lang.OutOfMemoryError errors for this code: https://gist.github.com/2406699
11:25michaelbartonI thought it was lazy but perhaps not?
11:26gfredericksmichaelbarton: well (apply str ...) definitely isn't lazy
11:26gfrederickswoah wait you're just printing a function
11:26gfredericksnever mind
11:27dnolenmichaelbarton: you're story a lazy sequence in a top level.
11:27michaelbartonThat bit should only be a three entry seq
11:27dnolenstoring
11:27dnolenmichaelbarton: line 20
11:27dnolenjonasen: how about that for something for kibit to catch? :)
11:28gfredericksmichaelbarton: so due to what dnolen just said, there's a global reference to the head of the seq
11:28gfredericksso as the seq is realized the whole thing stays in memory
11:28michaelbartonI see
11:28michaelbartonWhat's the correct way to do this?
11:28gfredericksyou could change normalized-edges to a function and call it inside your doseq
11:28dnolenmichaelbarton: what gfredericks said.
11:29michaelbartonOK
11:29michaelbartonI there a way to reference a sequence with holding the head? A function I suppose?
11:30michaelbartonSorry, I meant without.
11:30gfredericks(doseq [i (normalized-edges)] ...) will do it
11:30dnolenmichaelbarton: don't store it in a top level.
11:31michaelbartonHow does does putting normalised edges inside parenthesis change this?
11:31gfredericksmichaelbarton: you have to change normalized-edges to a function as well to match
11:31michaelbartonOK
11:32fliebelWould a memory-less lazy-seq be any good? You know, just calculate the next item every time it is requested.
11:32michaelbarton(defn normalised-edges [] ... )
11:32gfrederickssince the global var is now a function that returns the sequence, there's no global reference to it. You call the function and give the resulting seq to doseq, so you as the user have no references to it
11:32michaelbartonOK
11:32gfredericksfliebel: that sounds like clojure.org/streams
11:32michaelbartonThat's very helpful.
11:32gfrederickswhich I coincidentally saw for the first time yesterday
11:32michaelbartonThank you.
11:32fliebelgfredericks: I wouldn;t know. I'm going to look at them for sure.
11:33gfredericksfliebel: it's old history; I don't know why exactly though
11:35gfredericksfliebel: in any case what you're describing isn't really a lazy seq
11:35gfredericksit may as well be a function
11:36gfredericksotherwise it's pretending to be a data structure but somehow disappears from under you
11:37fliebelgfredericks: Hm, yea, what I have in mind would only work for generated lazy seqs, but not for 'consumed' ones(line-seq for example)
11:38fliebelWhat i mean is that you do not "realize" a seq, but calculate the crd/rest of a seq every time it is requested.
11:38gfredericksfliebel: so if the cdr is requested a second time you compute it again?
11:39fliebelyea, so you can hold on to the head all you want, without consuming memory, and iterate without any overhead. Only, the second time you need to iterate it is more expensive.
11:40michaelbartonThat worked perfectly.
11:40gfredericksthat is an interesting thought.
11:40michaelbartonAn much faster too.
11:40michaelbartonThank you gfredericks, dnolen
11:40fliebelIt is just the cached reference to the next value, that keeps the seq from being gcd.
11:40gfrederickstomoj: I inserted your code into my project and it failed. I deleted some deps and otherwise made no changes and it passed. So now to figure out which dep is the tipping point.
11:41devndnolen: have you seen the bill cunningham documentary?
11:41dnolendevn: no
11:41dnolenmichaelbarton: np
11:42devndnolen: total tangent, but he's a photographer at the NYT -- he does the style/fashion on the street photography. it was interesting, figured I'd mention it given you're around here.
11:42dnolendevn: yes, I know :) but I haven't seen it.
11:43devnhaha fair enough, just watched it the other night. it was good. </tangent>
11:45gfrederickstomoj: it seems to be [clj-http "0.3.6"], which I don't need thankfully
11:46dnolendevn: yeah I've heard it's great!
11:47tomojstrange
11:48gfrederickstomoj: I expect examining the recursive dependency tree would reveal something, but I'm not motivated to bother if nothing else comes up
11:48dabdDoes the clojurescript compiler support the full Clojure language at the moment?
11:48tomojI was wondering earlier how to even see the recursive dependency tree (other than manually)
11:48gfredericksdabd: certainly not the parts that don't apply well/at-all to JS
11:48gfredericksdabd: there are significant differences
11:48gfrederickstomoj: mvn dependency:tree I think
11:49gfredericks(after `lein pom`)
11:50dnolendabd: the bits that are missing are mostly concurrency related - which are mostly irrelevant for JS.
11:50dabdIs it possible to invoke Clojure from clojurescript?
11:52gfredericksdabd: at runtime all you have is the JS environment
11:53dabdIf I need to do processor intensive computation then I would need a server hosting JVM to run Clojure
11:54gfredericksembedding a java applet might be an option too
11:54dnolendabd: why would you want to invoke Clojure from CJLS?
11:54gfredericksso whichever is less of a hassle I guess
11:54dnolenCLJS
11:55dabddnolen: If I need to use existing Clojure code as a "service"
11:55dabdbecause it is processor intensive
11:56tomojI'd think you should invoke it just like you would invoke any other service from a JS environment
11:56dabdtomoj: In that case perhaps AJAX is better than applets right?
11:57dabdI meant Web Services instead of AJAX
11:57angerman_how do you do DB switching on dev and production env? using environment variables?
11:57dnolendabd: writing your client code in CLJS and your server in CLJ is an ideal use case yes if that's what you mean.
11:57tomojyou'd have to have a pretty strange use case to want to embed clojure in an applet instead of talking to it over ajax/whatever
11:57dabddnolen: yes that is exactly what I want. I want to write UI for existing Clojure code.
11:58dabdClojureScript One seems interesting
11:59dabdgfredericks: I was reading the CLJS docs and it shows the differences. thx
11:59tomojwill many calls to reify hog permgen?
12:00gfrederickstomoj: turns out aleph wants clj-http 0.1.3
12:00tomojah, I see
12:00dakronegfredericks: waa? why is aleph using clj-http at all in the first place, that seems strange
12:00dnolendabd: yes, people have been doing this.
12:01dakroneI thought it had its own http client
12:01gfredericksI haven't noticed it in the stacktrace; who knows what it's using it for
12:01gfredericksthere's a lot of helpers in clj-http I think
12:01dakronewhat version of aleph? I'll look
12:02dabdI was reading this blog http://blog.raynes.me/. Did anyone also switch from Emacs to VIM. I'm a long time Emacs user but sometimes I find it too cumbersome and heavy. VIM seems neater but I'm not sure it is as good for Lisp languages.
12:02gfredericksdakrone: 0.2.1-beta2; it's not a big deal for me personally at the moment
12:02dakronegfredericks: yea, I'm interested now though
12:02gfredericksI'm using clj-http in my tests, but I can look up how to use the older version
12:03dakrone0.1.3 is ancient by now :-/
12:04radsdabd: I used to use Emacs and switched to Vim
12:04radsI didn't really use clojure until I learned vim though
12:04TimMctomoj: "Reify Hog Permgen" scans like a person's name :-D
12:05gfredericksdakrone: aleph totally breaks with newer clj-http though
12:05dakronegfredericks: I am forking to fix
12:05gfredericksand I use the word "totally" very very loosely there
12:06gfredericksdakrone: here's what breaks when using 0.3.6: https://gist.github.com/a552a8f82180e6d27f51
12:06dakroneokay, shouldn't be too bad to fix
12:08radsdabd: the repl support isn't great. I use a macro to send the selected contents to a tmux buffer rather than the vimclojure repl. I like vim better in general, though. I prefer the modal editing to the keyboard shortcuts
12:09gfredericksdakrone: if you're working on it right now, keep me posted, so I know whether to backport to 0.1.whatsit or upgrade aleph
12:11dakronegfredericks: I will
12:19dakronegfredericks: https://github.com/ztellman/aleph/pull/60
12:21gfredericksdakrone: cool I'll try that out, thanks
12:22dakronehopefully Zach merges it too :)
12:22gfredericksuntil then we have lein checkouts
12:23gfredericksand clojars
12:23dabdrads: I might give it a try
12:23dabdbut it will be hard to leave more than 10 years of emacs behind :-)
12:26dnolen~max
12:26clojurebotMost users ever in #clojure: 404
12:27dnolenbah, we'll break 500 here soon
12:27gfredericksdnolen: you sure clojurebot didn't just deliver a not-found response? :)
12:34pandeirodnolen: have you noticed multimethod dispatch errors in cljs don't tell you which multimethod they're referring to?
12:35pandeiroi'm going to try to track that down and leave a bug report but i am just mentioning it in case it's already been fixed (i'm using the latest jar)
12:36dnolenpandeiro: haven't noticed, patch welcome ;)
12:39TimMcdnolen: That's a hardcoded factoid.
12:40TimMcclojurebot: forget max |is|<reply>Most users ever in #clojure: 404
12:40clojurebotI forgot that max is <reply>Most users ever in #clojure: 404
12:40TimMc~max
12:40clojurebotExcuse me?
12:41TimMcclojurebot: max is <reply>Neither bot has an accurate value for the max number of users in #clojure
12:41clojurebotOk.
12:45gfredericksTimMc: you could've replaced it with a more interesting number :)
12:45TimMc404 was the best it could be.
12:46gfredericksit could be good but also not believable
12:48ibdknoxnext time someone comes into the channel asking for a simple project to help the community we should have them add the max command to lazy bot
12:57autodidakto,(#(apply str (reduce conj () %)) "pey")
12:57clojurebot"yep"
13:07mebaran151so I'm having a little bit of trouble installing the lein noir plugin to start playing with noir; it complains about being unable to rebind a dynamic var
13:08unlink_Every time I run "lein ring server" on leiningen-1.7.1, it deletes my lein javac-compiled classes.
13:08unlink_Is that a feature?
13:08mebaran151any work around? I'm on Windows running a lein 1.7
13:09pandeiromebaran151: sounds like an old version of noir?
13:09mebaran151is the plugin no longer recommended?
13:09mebaran151I haven't gotten to the whole using noir part yet :)
13:11mebaran151though it looks so nice and clean and pretty; I'm in tooling purgatory atm
13:11rodnaphwhen using update-in to change a map, is there any way i get get hold of the change that was made to the map? (i need to put it in a datastore)
13:11pandeiromebaran151: tbh i'm not sure its status, check the github page... i think cljs-template uses a very recent version of noir, though maybe you don't want the clojurescript parts
13:12raekmebaran151: are you using lein-noir 1.2.0? are you sure you are not using lein2?
13:13mebaran151I do not believe I'm using lein2
13:15pandeiromebaran151: if i were you i'd just go the lein-newnew + cljs-template route
13:16raekmebaran151: what step goes wrong? "lein plugin install ..."? "lein noir new ..."? a later step?
13:16raek"unable to rebind a dynamic var" often indicates that code written for clojure 1.2 is being run in clojure 1.3 or later
13:17raekbut all lein 1.x plugins execute in the lein process, which uses clojure 1.2
13:17raek(lein2 uses clojure 1.3)
13:18gfredericksdoes paredit have a command for cleaning up whitespace?
13:19dakronegfredericks: emacs does, C-c n
13:19mebaran151raek: it's the lein plugin install step
13:19mebaran151it sounds like I should just reinstall lein, as somehow some something got crossed
13:20raekmebaran151: what does "lein version" output?
13:20gfredericksdakrone: crap I rebound that
13:21mebaran151Leinigen Version 1.7.1-SNAPSHOT
13:27autodidaktogfredericks: C-h a whitespace cleanup
13:28mebaran151raek: on Java 7, though I doubt that would matter
13:28gfredericksautodidakto: I rebound C-h too :-D
13:29autodidaktogfredericks: to what?
13:29gfredericksbackspace
13:29gfredericksbut F1 works
13:30gfredericksin any case, whitespace-cleanup doesn't seem to de anything for my " (three four)\n ))" chunk of code
13:30gfredericks(I want the last two parens to come up a line)
13:30autodidaktoreindent?
13:30gfrederickshow?
13:30clojurebotwith style and grace
13:31dakronegfredericks: whitespace cleanup won't touch that, you'll have to move it up yourself
13:31gfredericksoh man I thought paredit was cool about these things
13:31dakronethere might be a way to make it do that? no idea
13:31gfredericksokay, thanks
13:32autodidaktooh... come up a line... sorry that's not indent
13:32gfredericksokay how do I make org-mode work on vim?
13:32autodidaktogfredericks: you do, "electric returns" ? C-style )s, then reformat?
13:32gfredericksautodidakto: man I don't really know what any of those things are
13:33autodidaktoi think that's what it is called... there's a plugin for that... er... *grabs gfredericks and walks to #emacs*
13:33bradwrightgfredericks: mark all of it and do M-x indent-region
13:33bradwrightI think
13:34gfredericksbradwright: doesn't that keep everything on its own line?
13:34bradwrightYeah actually it does, sorry
13:46gfrederickscan clj-http be configured to not send retries?
13:46dakronegfredericks: you mean for redirects?
13:46gfredericksdakrone: no I'm sending a post with a multipart and it seems it's being sent 3 times before giving up (server failed to respond)
13:47gfredericksorg.apache.http is logging its retries
13:47dakronegfredericks: I'm not doing any retrying on my end, so apache must be trying the multipart stuff, open an issue with info and I can look into it
13:47gfredericksdakrone: okay, thanks
13:48dakronegfredericks: good to know that it does that, I'm sure there's a way I can make that configurable
13:49mebaran151raek: reinstalling lein seemed to do the trick; I'm not sure how it got all vesion confused
13:50gfredericksdakrone: done
13:50dakronegfredericks: thanks!
14:32dnolensomebody should really do this for CLJS, http://synonym.dartlang.org/
14:36aaelonyI'm confused as which clojars dependenc(y/ies) I need to start playing with cljs. Say I'm on clojars, the first hit seeking "clojurescript" is lein-cljsbuild 0.1.8, is that what I need?
14:37dnolenaaelony: lein-cljsbuild is all you need yes.
14:37aaelonydnolen: thx
14:38ibdknoxI forgot how much I disliked node's ecosystem :(
14:39aaelonydnolen: guessing that lein-cljsbuild is lein and not lein2 ?
14:39dnolenaaelony: works w/ both
14:39dnolenibdknox: what issues are you running into?
14:39aaelonydnolen: tres cool... !
14:40devndnolen: it reminds me a bit of coffeescript's website
14:40ibdknoxdnolen: I lost an hour and a half to broken versions of big libs (socket.io and express latest don't play well together)
14:41samratI'm having trouble installing lein. I did lein self-install but after that I get this error http://dpaste.com/733207/ when trying to run lein
14:42samrathow can i fix this?
14:42hiredmanibdknox: but JS is the future!!! the same language on the front and backend! and callbacks!
14:42dnolendevn: yes I think that was the idea
14:42ibdknoxhiredman: lol
14:42dnolenibdknox: heh - yeah
14:42ibdknoxdnolen: I think I found a bug in CLJS
14:43dnolenibdknox: wassup?
14:43ibdknoxdnolen: any method with the name static gets a $ appended to it. Including ones that aren't cljs :)
14:43xeqisamrat: can you remove that file, and your ~/.lein and re self-install?
14:43ibdknoxso expres.static is getting turned into express.static$
14:44dnolenibdknox: are you writing js/express.static ?
14:45ibdknoxdnolen: https://refheap.com/paste/2185
14:45ibdknoxdnolen: perhaps I'm doing it wrong?
14:46septomin_don't all js keywords get munged?
14:47samratxeqi: okay, i'm doing that now
14:48dnolenibdknox: yes file a bug, reserved words that appears as property names should probably not get munged like that.
14:48ibdknoxdnolen: will do
14:49dnolenibdknox: we'll need to double check to make sure this isn't going to cause problems w/ IE, I don't think it will.
14:53jtoyhow do I turn (def car "test") into #"test" ?
14:53wkmanireThe part that worries me is the reset.css I stuck at the top.
14:53wkmanireThat makes it easier to write cross-browser compatible CSS
14:53raekjtoy: re-pattern
14:53wkmanireoops
14:54wkmanireshit, wrong chat window.
14:54wkmanireSorry folks.
14:54jtoyah, nice
14:59amalloyibdknox: so javascript can actually have objects with a property named "static"? not much of a reserved word then :P
15:00gfredericksamalloy: you can at least only reference the property with string literals
15:00gfredericksor strings rather
15:01gfredericksbut you probably mean more than that
15:01amalloywell, that makes sense. so why would we expect cljs to be able to access them as properties?
15:01gfredericks"as properties" means the foo.bar syntax?
15:01gfredericksfoo.static in this case
15:02amalloygfredericks: actually i think you're wrong. you can do `foo.static = 4`, in a test i just did
15:02gfredericksI didn't say you couldn't; I just said even if you can't you can foo['static']
15:02amalloyyou can at least only reference the property with string literals - "only" here sounds like you said you can't
15:02gfredericksoh how did that word get there
15:11pandeirois there already an async flow control lib for clojurescript?
15:19dnolenpandeiro: there is not, I'd like to see someone fix delimc for CLJS
15:19dnolenor write something way better
15:20mmarczykdnolen: hi, thanks for applying the strobj patch
15:21dnolenmmarczyk: sure
15:21dnolenmmarczyk: thx for doing it
15:21mmarczykdnolen: np
15:21mmarczykdnolen: I'm experimenting with replacing inode-find with inode-lookup in PHM
15:21mmarczykdnolen: since cljs.core/find doesn't care about the key stored in the map...
15:21dnolennew performance bottleneck I want to eliminate - variadic fns.
15:22mmarczykdnolen: incidentally, that means that one can't use find to extract metadata attached to the actual key assoc'd onto the map -- not that I've ever done it, but it is possible in Clojure
15:23dnolenmmarczyk: I wouldn't do that
15:24dnolenunless there's a significant performance win.
15:24mmarczykdnolen: sure
15:25mmarczykdnolen: the current version is a direct port, which may be a good thing in and of itself -- as a non-trivial example of how one might build the equivalent of clj's PHM in clj(s)
15:25mmarczykdnolen: but no harm in running a few perf tests, so... :-)
15:29gfredericksokay, so when running an aleph http server, the request handler gets the response channel as its first argument. If I enqueue into the channel right away, it works. If I do it from a future, it doesn't.
15:30gfredericksalso does not work if I do it from a vanilla thread
15:32RickInGA_I have a function that only compiles when it is indented properly. https://refheap.com/paste/2187
15:32RickInGA_I am using inferior-lisp
15:33RickInGA_Whitespace isn't supposed to matter, right?
15:33gfredericksRickInGA_: can you reproduce the issue outside of emacs?
15:33gfredericksRickInGA_: whitespace definitely shouldn't matter
15:36RickInGA_gfredericks can't figure out how to run it outside of emacs
15:36gfredericksRickInGA_: you use leiningen?
15:36RickInGA_gfredericks: yeah
15:37gfredericksso put it in your main ns and do lein run or something...
15:39xeqior lein repl
15:39gfredericksaleph lesson learned: don't close the channel at the bottom of your function and forget you did that
15:42RickInGA_xeqi: gredericks: when I try to use the namespace that is giving me the problem in lein repl, again I am finding errors that are fixed by indentation
15:43gfredericksthat is the spookiest thing I have ever heard of.
15:43fliebelRickInGA_: Huh? Clojure is whitespace-sensitive? Python people will love this.
15:43RickInGA_it may be a phantom error, I moved some things between namespaces, so somethings legitimately are not found
15:43gfrederickssomebody should fork clojure and write a version of the reader that accepts indents in place of closing parens
15:44gfredericks"Clojure Ghost Stories"
15:44RickInGA_I will clean up ns errors, and then go try to mess with indentation again
15:46septomin_add more semicolons
15:50RickInGA_cleared up ns issues… lein repl works fine. inferior-lisp is still sensative to indentation
15:51ynnivtechnomancy: do you have any reference material to go with org.clojars.technomancy/osmosis-hstore ?
16:06pppauli was looking at the clojurescript wiki on github, and then reading the source code for .core. i'm interested in knowing, are persistent data structures and meta data implemented? (i see these things in the .core)
16:07devnpppaul: meta is in core.cljs, persistent data structures are WIP if I understand correctly
16:07pppaulwip?
16:07devnWork in Progress
16:07pppauloh, ok
16:07pppauli see a lot of code for them in core
16:07devnI saw something in this channel earlier today or late yesterday about PersistentHashSet (I think)
16:08pppauli guess it's not too big of a deal for me, cus in JS i do copy on write anyway
16:10dnolenpppaul: PersistentVector is in
16:10dnolenpppaul: we have a working PersistentHashMap that needs a little more assessment
16:11dnolenpppaul: PersistentTreeMap would be nice but no one's started
16:12pppaulcool
16:13jondot_is there anything special to consider when deploying a clojure ring/compojure app? tomcat/jetty? i'm also trying out deploying to heroku, not sure how common is that ?
16:14ibdknoxheroku works wonderfully :)
16:14jondot_hello ibdknox, loving your IDE concept, btw.
16:14RaynesHeroku is nice.
16:14mmarczykpppaul: persistent hash set will be in automatically if/when persistent hash map is
16:14ibdknoxthanks :)
16:15mmarczykdnolen: actually, about noone being starting on tree map... :-)
16:15jondot_so heroku runs on jetty? does that matter?
16:15mudphoneibdknox: jondot: ditto
16:16jondot_runs clojure apps on jetty that is
16:16jondot_from what i can remember of my dark java past, i used to sware by tomcat. not sure its true nowadays.
16:17ibdknoxjetty works just fine for all my sites
16:18blakesmithibdknox: Do you use jetty standalone via the adapter?
16:19ibdknoxblakesmith: yep
16:19mmarczyk*started
16:19cemerickjondot_: I'd probably prefer jetty over tomcat these days.
16:19ibdknoxI usually stick nginx in front of it if it's on my box
16:19ibdknoxon heroku I just leave it be
16:19cemerickheroku apps are already proxied to the nines anyway
16:19ibdknoxyup
16:20blakesmithFor deploys, do you drop a jar, or just 'lein run' the source itself?
16:20cemerickblakesmith: the adapter is fine; check out https://devcenter.heroku.com/articles/clojure if you want to use heroku
16:21blakesmithI'm talking about non-heroku deploys.
16:21jondot_i'm wondering if lein-ring makes any sense for heroku?
16:22ibdknoxjondot_: not really
16:22ibdknoxblakesmith: lein trampoline run
16:23jondot_ibdknox, suspected so. is it too complex to combine both? i do enjoy the development bonuses i get with lein-ring
16:23ibdknoxyou just need to create a -main, there's no reason you can't have both :)
16:24jondot_yep, ok
16:25pandeiroi still haven't used lein-ring much, what does it help with?
16:25dnolenmmarczyk: ! :)
16:26jondot_pandeiro, code reloads, war, opens a browser, etc. read on the github page
16:27mmarczykdnolen: sometime this week I'd say :-)
16:27cemerickblakesmith: Depends a lot on what you're targeting. Beanstalk requires a .war, as will any other container-based deployment. Elsewhere, perhaps not.
16:29pppaulhas anyone looked into doing servers on node.js?
16:29pppaulvia clojurescript?
16:31dnolenpppaul: some people have tho I haven't heard detailed reports
16:31dnolenpppaul: and ibdknox is looking into it as well it seems
16:32ibdknoxyeah, I managed to get it working
16:32jondot_foreman and jetty Just Works, with all my custom jars pulled in.. lein is great!
16:32pppaulare there enough libs ported to clojurescript to make it desirable?
16:33ibdknoxnot at all
16:33pppaulor, have people found servers on clojure (java) painful?
16:33ibdknoxI'd only do it if you have to
16:35yoklovpppaul: what sort of libs?
16:35yoklovjs or clj
16:35pppaulclj
16:36yoklovthere are a good amount, from what i've seen
16:36yoklovbut obviously its a small fraction
16:36yoklovor not-so-small fraction since there aren't _that_ many non-interop clj libs to begin with
16:37yoklovbut still pretty small
16:37yoklovi think its still quite desirable though :p
16:39ibdknoxsorry I meant over CLJ
16:39ibdknoxin the case of nodejs servers
16:39ibdknoxI would take noir + jetty/netty in a heartbeat
16:40kovasbibdknox: what is advantage of node then?
16:40ibdknoxnone
16:40abedra^^
16:41kovasb"ibdknox figures it out so that you don't have to"
16:41ibdknoxlol
16:42ibdknoxI was starting with node thinking that I'd write the core of the platform in JS
16:42ibdknoxI'm questioning that decision
16:42ibdknoxas I'm rapidly approaching the "fuck this" stage lol
16:42septomin_anyone played around with cljs on meteor?
16:42kovasbyeah, better sooner rather than later
16:42dnolenibdknox: heh, how will you run people's JS extensions? Rhino?
16:42cemerickibdknox: what, node isn't our salvation and solace? :-P
16:43dnolenibdknox: btw, man it didn't take long for the Light Table google group to pass noise to signal ratio
16:43ibdknoxdnolen: that's why I locked it down :(
16:43ibdknoxdnolen: I might still package node for the JS bit
16:43kovasbits like the fountain wishing well, everyone has their 2 cents
16:44yoklovoh, dnolen, i've been meaning to ask you, have you ever had any issues with the performance of cljs.core.str?
16:44dnolenibdknox: and communicate between JVM and Node.js?
16:44dnolenyoklov: yeah it stinks
16:44yoklovyeah
16:44ibdknoxdnolen: the architecture I have is very neat :)
16:45dnolenyoklov: I think largely due to how variadic fns are implemented
16:45dnolenyoklov: I'm looking into it.
16:45ibdknoxdnolen: all the pieces of the system are decoupled, so any one piece of it can be run remotely if so desired.
16:45dnolenibdknox: cool - cuz that would have sounded like a headache to me.
16:45ibdknoxdnolen: at some level it's necessary - you need all of these things to be out of process
16:46ibdknoxyou can't run all the language services on top of the JVM
16:46ibdknoxthey should talk to whatever thing makes the most sense. e.g. python service on top of pypy or whatever
16:46ibdknoxthey all talk through tcp
16:46hiredman(stomp)
16:47dnolenibdknox: and you're not too concerned about the JVM dependency?
16:47ibdknoxdnolen: not sure it's really any worse than a node dependency. Is there something specific you're thinking there?
16:47yoklovokay cool, yeah, just wanted to make sure that wasn't unknown
16:48dnolenibdknox: requires a separate install on OS X now right?
16:48yoklovdnolen: so you think its cljs being slow and not goog.string?
16:49dnolenyoklov: I benched variadic fns, str is particularly bad because it's recursive.
16:49dnolenyoklov: goog.string is not that slow
16:49ibdknoxdnolen: given that the target is devs, I don't think that's so bad, but it's a good point
16:50ibdknoxit doesn't prevent people from using eclipse
16:50yoklovdnolen: right, i didn't really think about the fact that str/str* were recursive
16:50wyanwhat's the current preferred way of using slime with clojure & sbcl side by side?
16:51wyan(not simultaneously, just on the same system)
16:51cemerickis node not require a separate install?
16:51cemerickdoes*, feh
16:51dnolencemerick: it's easy to package up node inside your OS X app - not sure about JVM ?
16:52ibdknoxcemerick: I might be able to package the binaries
16:52Raynescemerick: Borat-cemerick?
16:52cemerickRaynes: Might need to start a twitter account.
16:52cemerickibdknox: You can definitely redistribute OpenJDK FWIW.
16:52ibdknoxoo
16:53ibdknoxI wouldn't care, but this is seriously slowing me down
16:53cemerickOS X Java is going to be OpenJDK starting with 7 anyway.
16:53dnolenibdknox: cemerick: how big is OpenJDK tho?
16:54cemerickWhen I was redistributing the Sun JVM for windows apps, that was ~11MB?
16:54dnolencemerick: plus the JDK? really?
16:55ibdknoxjdk is around 70-80mb looks like
16:55ibdknoxdnolen: a far cry from VS's 4gb ;)
16:56RickInGA_ibdknox yeah, but vs lets me code without knowing how to program. emacs doesn't have that feature. slows me down considerably
16:56ibdknoxRickInGA_: :)
16:56dnolenibdknox: ok, yeah 70-80mb is not a big deal.
16:57ibdknoxyeah, that doesn't bother me
16:57yoklovisn't OS X losing built-in java when the next version comes out?
16:57ibdknoxI think I might go that route
16:57RickInGA_doh, must have left my work machine logged in. anyone have rights to kick RickInGA
16:58kovasbi think optimizing for development speed and capabilities versus download size is a win
16:58cemerickyoklov: It's not built-in starting with 10.7. Installs on demand.
16:58yoklovhuh, didn't realize I had installed it
16:58ibdknoxand that experience was quite nice
16:58ibdknoxwhen I did it
16:58ibdknoxok
16:58ibdknoxI'm sold.
16:58yoklovaside from when I installed the development stuff
17:01kovasbdnolen: any chance your talk tomorrow gets moved to a bigger room?
17:03dnolenkovasb: hmm I'm not in control of that sadly.
17:04RickInGA_dnolen any chance your talk tomrrow gets recorded? :)
17:04kovasbdnolen: guess I better show up early if I want a seat :)
17:04dnolenRickInGA_: not sure, sometimes thickey comes and does that.
17:05RickInGA_really? do you know where they get posted?
17:05dnolenkovasb: heh, it won't be too fancy, mostly a review.
17:05dnolenRickInGA_: vimeo / blip.tv
17:05RickInGA_dnolen: cool, I will go looking for them
17:06kovasbdnolen: mostly want to meet more clojure people in the city
17:06kovasbthough I'm sure ill learn something too
17:08cemerickibdknox: I can't find the JRE packages I built, but they were very slim; I think it was < 20MB, though that required some tricks (e.g. pack200, no i8n stuff, etc)
17:08ibdknoxcemerick: ah. I'm really not worried about download size
17:08ibdknoxcemerick: anything < 200mb is trivial for a dev
17:09cemerickSure. This was ~2005 for end users, so things were different. :-)
17:09ibdknoxabsolutely
17:09ibdknoxI'm lucky in that my audience is technically inclined :)
17:10cemerickgawd, thinking of the hours I spent slimming that download out… :-|
17:12dnolenneat seems like IFn is making Brendan Eich ponder callable Objects for JS
17:13kovasbdnolen: have you watched http://blip.tv/jsconf/jsconf2011-andrew-dupont-everything-is-permitted-extending-built-ins-5211542
17:14kovasbnear the end he starts talking about some new proposals for js
17:14dnolenkovasb: I have seen that yes.
17:14kovasbwatching it, 80% of the time I was like "yeah clojurescript solves that.."
17:15kovasbbut seems like they are coming to a similar conclusion
17:16dnolenkovasb: ClojureScript is live 5 years ahead of wherever JS is going. It also delivers most of what Google Dart is selling w/o forking the web.
17:16dnolens/live/like
17:18kovasbdnolen: on the one hand I'm glad I put off learning JS for so long. On the other hand it makes it harder to really get into the guts of cljs in the early days
17:18yoklovIFn is awesome
17:19dnolenkovasb: I definitely encourage digging into JS. One thing I never expected, writing fast CLJS code is way more fun than trying to wrangle Clojure on the JVM.
17:21kovasbdnolen: i could see that, given js is more dynamic. But the debugging situation is pretty tough unless u are pro
17:22dnolenkovasb: yeah, debugging story needs work
17:23yoklovdebugging code which uses cljs data structures is annoying
17:23yoklovharder to look at them in the debugger than arrays
17:23yoklovand in general you gotta know js
17:24dnolenyoklov: true, you do know I added toString methods right?
17:25yoklovhm, last I checked they were still printing "[object Object]"
17:25dnolenyoklov: not in master
17:25yoklovhm, i might have an old master then
17:25yoklovmight == must
17:26yoklovby the way, if anybody is interested in seeing a neatish cljs game-like-thing, http://thomcc.github.com/Argh/ is what i've been working on lately
17:26dnolenyoklov: :)
17:26dnolenyoklov: very nice
17:27yoklovhaha, thanks. it reminded me how little i remember from when i took linear algebra :p
17:27yoklovbut runs quite nicely
17:28dnolenyoklov: it's really awesome that you're focusing on game work with ClojureScript.
17:28brehautyoklov: is it using web3d ?
17:28yoklovbrehaut: no, though I should have
17:28brehautyoklov: thast even cooler :)
17:28yoklovi just draw pixels on a tiny tiny canvas
17:29yoklovand scale it up
17:29brehauthaha fantastic :)
17:29brehautyoklov: that explains why i was surprised it worked in safari
17:29yoklovdnolen: thanks, yeah, its the kind of stuff which i've been doing for a while (or at least as long as i've been programming) as side projects
17:30yoklovbrehaut: yeah, though the sound sounds awful in safari
17:30yoklovhtml5 audio is the worst for working cross browser.
17:30brehauthuh i dont even have any sound
17:30yoklovthats possible, it gives up after 1 second of waiting for assets to load.
17:31yoklovwhich is too short.
17:31yoklovsound only really works right in chrome, though locally it works in both chrome and firefox. i have no idea why.
17:32mmarczykyoklov: wow, that's really cool
17:32mmarczyk(just looked at Argh)
17:32yoklovmmarczyk: thanks!
17:34amalloyi think RickInGA's issue was caused by emacs's open-paren-in-column-0-is-defun-start
17:35amalloyhe's gone now, but someone (gfredericks?) was claiming clojure is whitespace-sensitive
17:35rplevyamalloy: just commas, and you get better perf if you leave them out
17:36drewrany ideas why this cljs repl require doesn't work? http://p.draines.com/13346981126818f600a46.txt
17:36rplevy it's like semicolons
17:37cemerickInteresting, there's hard API breakage between Clojure 1.2 and 1.3+: unchecked-divide and unchecked-remainder were renamed to add an -int suffix.
17:38dnolendrewr: hmm, haven't seen that before.
17:38yoklovcemerick, yeah, i noticed that if you look at the clojure alioth benchmarks they had to work around that
17:38dnolencemerick: core.logic works around that with macros+resolve
17:39dnolenI fixed that like a year ago.
17:41drewrdnolen: tried cleaning my working dir too (rm -rf .repl; git clean -fd; script/bootstrap)
17:42dnolendrewr: are you trying to dev against the clojurescript compiler directly? why not lein cljsbuild?
17:43drewrdnolen: in order to run script/repljs
17:43drewris there another way to get a cljs repl that I'm missing?
17:43dnolendrewr: lein cljsbuild supports REPLs
17:44dnolendrewr: Rhino and Browser
17:44dnolendrewr: oh but you're working against Node.js right?
17:44drewrdnolen: yes
17:46drewrah, but I see what you're saying.. cljs.nodejs won't be avail in rhino!
17:46drewrs/saying/implying maybe?/
17:47emezeskedrewr, dnolen: If someone points me toward a tutorial on how to set up a nodejs cljs REPL, I'd love to support that in cljsbuild
17:47emezeskeI've never messed with it, though, personally
17:47dnolendrewr: it wont
17:47dnolendrewr: if you feel ambitious I have an almost working Node.js REPL here https://github.com/swannodette/clojurescript
17:48drewrI have some ambition
17:48dnolendrewr: look in the node-repl branch
17:48pppauloh sweet!
17:48dnolendrewr: there's a working repl.js file, there's the necessary clj code, and a startup script.
17:49dnolendrewr: if someone makes it a little better I'm more than happy to merge it into CLJS proper
17:49pppaulhow large is a hello world clojurescript .js file?
17:49drewrdnolen: awesome; I'll take a look
17:49dnolenpppaul: probably 30-50k after advanced compilation, 7-8k gripped.
17:58yoklovpppaul: looks like 48k for advanced, and 8.7k gzipped
18:05ibdknoxLight Table is on kickstarter!
18:05ibdknoxhttp://www.kickstarter.com/projects/306316578/light-table
18:05crassuswhoo
18:06ibdknoxposted on HN, can a few people vote it up from the new page? http://news.ycombinator.com/newest
18:08Raynesibdknox: Awesome!
18:08emezeskeibdknox: Hmm, third on front page, not bad for 10 seconds
18:09ynniv wow, 14 points in 3 minutes
18:10Raynesibdknox: TAKE MY MONEY!
18:12jconnollyupboated ;D
18:13brehautibdknox: does the $50 include a tshirt as well or not?
18:13ynnivbrehaut: no, check the HN comments
18:14brehautah thanks
18:16ibdknoxanyone with reddit foo want to put it on reddit? :)
18:17amalloyibdknox: there will be five or ten separate reddit posts about it by tomorrow
18:17emezeskeibdknox: done
18:18emezeskeibdknox: http://www.reddit.com/r/programming/new/
18:19autodidaktoRaynes: stop throwing money at the screen :)
18:22brehautibdknox: i have had a question from one of my friends: is it a stand alone product, or will it be a web app?
18:22lancepantzibdknox: so you're just refreshing that page right?
18:22ibdknoxstandalone
18:22ibdknoxlancepantz: there's so much shit going down right now lol
18:22lancepantz:)
18:24ibdknoxhaha my girlfriend is apparently doing the refreshing for me
18:26autodidaktoibdknox: Just you? Or others too?
18:27ibdknoxautodidakto: I'm good, but not that good. I'll put together a team
18:28autodidaktoI'm not the one who'd know best, but lots of kickstarter projects go into more detail about the $... why that number, how long, what will be done if receive more, etc
18:31autodidaktoAnd I wanna see what t-shirt looks like :)
18:33sattvikibdknox: I'm confused is the $500 level the one that gets the earliest access? It seems odd that the higher levels don't.
18:34hiredmanhttp://news.ycombinator.com/item?id=3855293 <-- this is so dumb, if have a dev job $100 is a "rouding error" in your finances
18:34lancepantzhiredman: agree
18:34brehauthah yes. your chair should cost more
18:34hiredmangod, I am trying to pick a new chair now
18:34yoklovheh, that's the boat i'm in but then again i'm a student :p
18:35hiredmanshopping is hard, lets go programming
18:35brehauthiredman: thats been a long process right
18:35brehaut?
18:35lancepantzhiredman: nothing has yet to top the aeron
18:35lancepantzhiredman: atleast don't fall for the steelcase propaganda
18:35jodarothe best chair is no chair for me. i stand or sit on the floor.
18:35lancepantzi actually stand as well
18:36hiredmanthe chair? yeah I haven't really gotten serious about it, but I moved recently so trying to getting everything all nice
18:36hiredmanlancepantz: interesting, have you tried the mirra?
18:37lancepantzactually yes, i had one for about 8 months
18:37lancepantzi would put it below both the the steelcase and the aeron
18:37ynnivI haven't tried one, but I've heard that the Humanscale Freedom Chair is quite good
18:37brehautim probably going to be moving in the next few months. i need to get a proper desk
18:37emezeskeynniv: I use the freedom, it's good.
18:38ynnivemezeske: how does it compare to the aeron?
18:38lancepantzwe have freedom's all over the office, and people fight for the aerons
18:38hiredmanwith nerf guns?
18:38lancepantzbetter, deadly magnets
18:39hiredmanthose sound painful
18:39ynnivlike, MRI's?
18:39emezeskeynniv: Heh, I prefer it, but it's totally subjective. I really like the upright headrest thingie.
18:39septomin_how do they work?
18:39lancepantzseptomin_: :)
18:40ynnivwhich one is "the" steelcase chair? they seem to have many
18:40lancepantzynniv: the leap is what i used to have
18:41ynnivthe Leap WorkLounge looks serious
18:45ynnivibdknox: you don't mention deployment packaging anywhere. Do you plan on making a standalone app that wraps a web view, or would people run a local server and navigate to it?
18:46ibdknoxynniv: it'll be standalone
18:46ynniverm, well… both of those could be "standalone" :-)
18:48kovasb200k.. ambitious. i like it
18:48ibdknox200k is really just barely enough to be honest
18:49ynnivit's high for a single person, but low for a team
18:49LajlaTHat is not the point
18:49ibdknoxyeah, it's for a team
18:49metajackHas anyone tried the Embody, which seems to the be successor to the Aeron?
18:49Lajlawhat is the point is ##(symbol? (symbol ":This has spaces in it and starts with a colon"))
18:49lazybot⇒ true
18:49ibdknoxynniv: I added an answer to app for that question just now, it'll be in a webview and feel like an app :)
18:49ynnivexcellent. thanks :)
18:51kovasbwell i threw in my 100 :)
18:51brehaut3% of the way already :)
18:54brehautmdeboard: i expect most of them to complain about fonts and colors :P (because its the most obvious bike shed and everyone has an opinion)
18:54ibdknoxyeah, I'm not convinced this is going to work
18:54scriptoribdknox: that kickstarter won't work?
18:55ibdknoxwe'll see
18:55mdeboardbrehaut: As long as there's support for comic sans I'm good
18:55brehautits a very ambitious project
18:55ibdknoxI'm not convinced it'll hit the 200k mark, much less higher.
18:55brehaut~guards
18:55clojurebotSEIZE HIM!
18:55ibdknoxlol
18:56mdeboardibdknox: Would this be a pure Clojure product?
18:56brehautibdknox: well, data point for you, day job nerds i know who dont follow the tech news channels know about the project
18:56ibdknoxalso, I don't understand why everyone seems to think I can just add this to sublime/emacs/vim
18:56scriptoryea...
18:56mdeboardibdknox: Because everyone is terrible. People are, literally, the worst.
18:56scriptorI'm not sure if people actually paid attention to the video
18:56scriptoror even watched it
18:56yoklov^
18:56hagnafor datomic? I did
18:56scriptorjust going, "hurr durr emacs can do everything"
18:57scriptorhagna: for light table
18:57hagnaoh oops
18:57mdeboardwell to be fair, emacs CAN do everything
18:57scriptorcan you have draggable windows in emacs?
18:57wkellyscriptor: I watched the video, said "Hurr durr, emacs can do everything" and pledged money to the kickstarter ;p
18:58kovasbthat last 50 or 100k might require some work..
18:58mdeboardashton kutcher
18:58mdeboardscriptor: I'm 100% sure it's possible
18:58mdeboardscriptor: I'm basically trying to make the point that it's poss
18:58mdeboardible
18:58mdeboardbut I was mostly being sarcastic
18:58scriptorah
18:58mdeboardbecause whether or not it can isn't really relevant, it's whether you'd want to
18:59scriptoryea, part of the reason why this appeals to me is the from scratch idea
18:59scriptornot having to bother with emacs
18:59mdeboardId unno I really do use emacs for everything except web browsing
19:00yoklovyeah, i like emacs and all but having a 20+ year old design... sorta takes its toll
19:00mdeboardI'm chatting in emacs
19:00scriptorme too
19:00yoklovi am too
19:00mdeboardONLY ME
19:00wkellyhaha
19:00wkmanire_awayI wish I were.
19:00scriptorheh, ERC?
19:00wkmanire_awayERC rocks.
19:00mdeboardrcirc
19:00duncanmwhat's this kickstarter project about?
19:00brehautmdeboard: w3 wants to disagree with you :P
19:00mdeboardrcirc uber alles
19:00duncanmi use rcirc, i wish i could get rcirc-reconnect to work with irc proxies
19:00yoklovw3 stinks :/
19:01duncanmthere's some patch, but it's kinda rotted
19:01brehautnevertheless ;)
19:01scriptoroh nice, rcirc is installed by default
19:01brehautyoklov: the majority of the web browsers in the world stink, so its in good company
19:02yoklovheh, yeah but I wouldn't want to do any web development in it
19:02brehautyoklov: thats different to IE <= 8 how ;)
19:02yoklovconkeror is emacsy enough for me
19:02yoklovnot that i really use it
19:02brehaut(not that id ever use a browser embeded in emacs anyway)
19:03mdeboardwhoa amount doubled in the 20 minutes since I pledged
19:03hagnaacme can do everything :)
19:04wei_for a multimethod, can I dispatch on a key in a map, but pass the entire map to the dispatch function?
19:04scriptorwei_: yes, I believe so
19:04duncanmmdeboard: where's the link to the project?
19:04mdeboardhttp://www.kickstarter.com/projects/306316578/light-table
19:04brehautalternatively, anywhere you get your nerd news ;)
19:05amalloybrehaut: irc, evidently, making both of you correct
19:05scriptorwei_: check out http://clojuredocs.org/clojure_core/clojure.core/defmulti#example_549
19:05duncanmah, i didn't know he started a kickstarter project
19:05autodidaktowei_: your defmethods see the same arguments that the defmulti does
19:06scriptorwei_: in that example, 'params' will be english-map, french-map, etc.
19:08wei_oh, I got it. thanks!
19:11the1andonlycarydoes anyone have experience with incanter? I'm getting an 'unable to resolve symbol' when trying to use sample-weibull (https://gist.github.com/7d8dccd5df3a59cfeb7c)
19:15aaelonythelandonlycary: user=> (sample-weibull 1)
19:15aaelony1.0698556892475477
19:17aaelonythelandonlycary: here is the project.clj https://refheap.com/paste/2198
19:22the1andonlycarythanks, aaelony! I've got it running now :-)
19:22livingstoni'm looking for something like gentemp but that will give me a deterministic / reproducible set of names... I ended up with this which works but it feels ugly: git://gist.github.com/2409793.git
19:23livingstoner I mean this: https://gist.github.com/2409793
19:27aaelonythelandonlycary: cool
19:38yoklovoh huh, did clojure 1.4.0 come out?
19:38wei_how do I print an caught exception e to a file?
19:38hiredman~jdoc Exception
19:38clojurebotI don't understand.
19:38hiredmanclojurebot: jerk
19:38clojurebotyou cut me deep, man.
19:39amalloy$javadoc Exception
19:39lazybothttp://docs.oracle.com/javase/6/docs/api/java/lang/Exception.html
19:42wei_oh-- getStackTrace. thanks! I'll check the javadocs next time
19:43b_erbi want to increment a counter in a transaction (i know that this is usually a good cause for atoms). but i'm wondering if the inc function is actually commutative?
19:44lancepantzwei_: https://github.com/flatland/useful/blob/develop/src/useful/debug.clj#L33 may be of use
19:44llasramb_erb: What do you mean?
19:45hiredmanb_erb: http://en.wikipedia.org/wiki/Commutative_property
19:45hiredmanif I apply inc ten times to 1, can you rearrange the order that my incs are applied in and get a different result?
19:45yoklovno
19:45michaelbartonI have a quick question. How can I perform OR pairwise on two sequences?
19:46yoklovhiredman, inc is just +1
19:46yoklovno matter how you do 1+1+1+1+…+1+1 it's still the same result
19:46wei_lancepantz: thanks. all of those fns look useful actually
19:46yoklovbecause addition is commutative
19:46michaelbartonWould it be interleave then compare in steps of two?
19:46yoklovoh wait
19:47yoklovi didn't realize b_erb asked that
19:47llasramThe danger of the rhetorical question in IRC :-)
19:47b_erbhiredman: / yoklov: thanks, i should know this from back in the school. ;-) i was just distracted by "last-one-in-wins" and "in-transaction-value-of-ref".
19:47septomin_i assume he's asking if inc is safe
19:48llasramb_erb: I'm sensing potential confusion about what `inc` does...? Like most Clojure functions it's "pure" -- doesn't actually mutate anything, just returns the value of its input +1
19:49septomin_i.e. in java if you did x += 1 ten times without locking x
19:51sattvikmagnars: You mean like:
19:51sattvikmichaelbarton: like:
19:52sattvik,(map #(or %1 %2) [true true false false] [true false true false])
19:52clojurebot(true true true false)
19:54yoklovhm, you can't do (map or …) because or's a macro?
19:54yoklov,(map or [true] [false])
19:54clojurebot#<CompilerException java.lang.RuntimeException: Can't take value of a macro: #'clojure.core/or, compiling:(NO_SOURCE_PATH:0)>
19:54yoklovyup
19:54yoklovbummer
19:58michaelbartonPerhaps there is a way to do it with all? and true?
19:59yoklovhm?
20:00michaelbartonI think #(every? true? %) works
20:00yoklovoh you can do it the way he suggests
20:00michaelbartonSorry
20:00michaelbartonI didn't see that
20:01michaelbartonmap can take multiple sequences?
20:01yoklovyeah
20:01yoklovits awesome
20:01michaelbartonThey are automatically interleaved?
20:01yoklov,(map + [1 2 3] [4 5 6])
20:01clojurebot(5 7 9)
20:01amalloyinterleaving seems irrelevant
20:02michaelbartonI mean the arguments are passed pairwise to function?
20:02amalloy&(doc map)
20:02lazybot⇒ "([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls]); Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. A... https://refheap.com/paste/2201
20:02michaelbartonI see
20:02michaelbartonVery interesting
20:03michaelbartonThank you
20:15pablo_nsHas anybody who uses Moustache come up with a way to reverse routes? It's getting unruly to call routes with "/foo/bar" and I can't think of a way to reverse routes without named routes (which moustache doesn't support)
20:17brehautpablo_ns: i havent seen one. its quite a hard problem as any ring handler could be the RHS of a route, which means it might not be a moustache app thus not necessarily going to be reversable. I've just used a multimethod myself
20:18cemerickwhat's a sane way to run a shell command (that includes piping, etc)?
20:18cemerickI could pull in stevedore or something, but it seems like this should be easier than it appears...
20:19emezeskecemerick: Raynes' "conch" looks pretty cool
20:19Raynescemerick: conch should be able to do everything you need. If not, send me a pull request.
20:20pablo_nsbrehaut: thanks for the insight. Can you share a snippet of how you're using a multimethod in this way?
20:21brehautpablo_ns: sure. its particularly easy for me because my site uses couchdb and all my documents have :type keys, so i just have a multi switching on type and then the implementation of the methods unpacks the appropriate values
20:21brehautpablo_ns: its not especially elegant ;)
20:22pablo_nsI've searched high and low on github and past discussions for some code that does that, but everyone seems to call routes by hand (strings
20:22cemerickRaynes, emezeske: thanks, I'll keep it in mind. I managed to eliminate the piping, so c.j.shell/sh works now.
20:22brehautpablo_ns: https://refheap.com/paste/2203
20:23brehautpablo_ns: make-url just creates a fully qualified url from the fragments provided (interposes slashes) and prefixes the domain and scheme
20:25livingstonis there any way to set the value of a dynamic var to be a function that will be defined later? I tried (declare foo) (def ^:dynamic *my-foo* foo) (defn foo ...) but that doesn't seem to work?
20:25hiredman(declare ^:dynamic foo)
20:26pablo_nsbrehaut: Humm, I thought about something like that, but using metadata. Thanks for the snippet!
20:26brehautpablo_ns: no problem. i do think its a problem that does need to be solved, and ideally in a way tat works across ring libs
20:26livingstonhiredman: really? make the function itself dynamic too, weird
20:26hiredmanlivingston: I don't think you understand what you are doing
20:27livingstonoh you're just saying let people bind over the function itself yeah, that's not what I really want..
20:28livingstonin binding over *my-foo* I might still want to do something in terms of foo, if I bind over foo to do something in terms of foo, that seems ugly
20:29pablo_nsbrehaut: Yes. I don't think my models should know how to assemble their URLs, but so far that is the only sane way that I've seen.
20:29livingstonhiredman: I was just trying to keep all my globals at the top of the file, so I wanted to forward declare a function name.
20:32brehautpablo_ns: yeah, the models themselves shouldnt know how to reverse their urls, hence using a multi
20:33brehautpablo_ns: you could potentially use a protocol if you are using records (im not)
20:33brehautbut its still a half solution
20:34seancorfieldarohner: you around? Q about lein-daemon
20:34arohnerseancorfield: yeah, I'm here
20:35bsteuberibdknox: almost 10% within the first two hours should give you some confidence
20:35pablo_nsbrehaut: sorry, I was actually loud thinking about my solution before I saw your snippet =)
20:36brehautoh right :)
20:36ibdknoxbsteuber: Still skeptical, we'll run out of excited people soon enough ;) Those are the ones who jumped in that quickly.
20:36yoklovhm, so am I really the only one who has the google closure compiler crash on them _all the time_ while doing lein cljsbuild auto?
20:36ibdknoxyoklov: seriously never had it happen
20:36yoklovits extremely common for me.
20:36yoklovmore than 2 hours open and it will probably happen.
20:37bsteuberibdknox: I'd rather assume you'll have to figure out soon what to support after python ^^
20:37ibdknox:)
20:37ibdknoxRuby probably
20:37ibdknoxalthough with mono's stuff I could take on VS ;)
20:37bsteuberbtw. is cljs already included when you say clojure?
20:37ibdknoxyeah
20:37emezeskeyoklov: Never had the closure compiler crash on me
20:38bsteubercool
20:38yoklovemzeske: yeah, it runs out of memory
20:38yoklovemezeske*
20:38bsteuberparedit would be next on my list then ^^
20:38ibdknoxbsteuber: hopefully in a little bit I'll get it to the point where I can program it in itself, so it'll need CLJS
20:38bsteubermakes sense :)
20:38seancorfieldarohner: thanx... two Qs in fact... when I run lein daemon start :something I sort of expected it to fork it in the background and return to the command prompt
20:38emezeskeyoklov: Interesting...
20:38pablo_nsidbknox: Just make it clj-only and let the lesser languages drool over it wiht jealousy =)
20:38ibdknoxbsteuber: I was thinking about using that as a hiring project actually
20:38emezeskeyoklov: Have you tried setting lein's java options with a higher heap size?
20:38seancorfieldarohner: is that just my misunderstanding? and it's more like lein run in that way?
20:39seancorfieldarohner: also, where do stdout / stderr go?
20:39arohnerseancorfield: it waits for the pid file to show up, then exits
20:39yoklovemezeske: no, I haven't, thats a good idea.
20:39arohnerseancorfield: though I'm pretty sure it's not functional on lein2 yet
20:39yoklovemezeske, the thing is that I don't even have it doing any optimizations
20:39ivanCompiler needs hundreds of megs
20:40arohnerseancorfield: re stdout/stderr, that's a good question. I typically just use logging.
20:40seancorfieldi'm still on lein1... but it's just sitting there after start the process... hasn't exited
20:40emezeskeyoklov: Actually, I'm not sure if the JVM memory options would be carried from your project.clj into the lein cljsbuild options
20:40seancorfieldbut it created the pidfile fine
20:40emezeskeyoklov: I should look into that.
20:40bsteuberibdknox: you mean the first person to build paredit into codemirror will get hired? ^^
20:41ibdknoxhaha no, but it's a good proof that that person could be hired :)
20:41ibdknoxability is only one side of the equation, personality and fit is super important in small very quick moving teams
20:42bsteubersure - I'm afraid I don't have time at this point anyways ^^
20:42bsteuberbesides living in Europe
20:42muhoothat means a high probability the hires will come from #clojure
20:43emezeskeyoklov: https://github.com/emezeske/lein-cljsbuild/issues/82
20:43arohnerseancorfield: oh, right. I close stdout and stderr. I don't remember why exactly, but it has to do with daemonizing properly
20:43ibdknoxmuhoo: I'm actually trying to convince a couple of the guys I used to work with at MSFT to join. They're some of the best programmers I've ever met.
20:44seancorfieldarohner: ok, that answers that question - and i am using logging so i can get at things that way
20:44arohnerseancorfield: if you add :debug true to the value in your daemon map, it won't close the descriptors, which may aid debugging
20:44seancorfieldarohner: even after lein daemon stop :something, the original lein daemon start... invocation still just sits there
20:44bsteuberI actually think this might be the long-awaited Clojure killer app
20:44seancorfieldarohner: 'k i'll try that
20:45bsteuberbut we'll see ^^
20:45arohnerseancorfield: i.e. :daemon {"foo" {:ns foo.bar :debug true}}
20:45yoklovemezeske: hm, yeah that seems about right
20:46arohnerseancorfield: looks like the lein process waits 5 minutes for the pid to show up
20:46yoklovemezeske: Though wouldn't other people get the same issue if it's not user configurable at all
20:46emezeskeyoklov: Could be java/system version differences, e.g. maybe your default heap size is low for some reason?
20:46seancorfieldarohner: with :debug true i see the stdout output of my task but no indication why the lein process does not exit - i'm using a relative pid file path, just :pidfile "myproc.pid"
20:46muhooibdknox: good point, if you've worked with them before especially
20:47emezeskeyoklov: Or maybe your project requires more memory from the closure compiler for some reason?
20:47yoklovemezeske: Maybe, but it's set to only do whitespace optimizations
20:47seancorfieldand if i ^C the lein daemon start command after i see my task is running, it kills my task (as well as lein daemon start...)
20:48seancorfieldarohner: this is on mac os x lion, btw
20:48arohnerseancorfield: oh, what's your lein version?
20:48arohner1.7.x?
20:49seancorfieldarohner: yeah, 1.7.1
20:49emezeskeyoklov: Yeah, it seems very weird. Just a guess on my part, could be totally wrong !
20:49livingstonis there any way to make one namespace completely mirror the contents of one or more other namespaces? for example, if I have functions foo/fn1 and bar/fn2 I want to have baz namespace setup such that I can call baz/fn1 and baz/fn2 ?
20:49yoklovemezeske: yeah, and if it makes any difference I use mac os x lion too. I've never had the patience to run auto on advanced optimizations for any length of time.
20:49arohnerseancorfield: actually, I think it's broken there too. :-(. I'm on 1.6.1.1
20:49emezeskeyoklov: cool, thanks
20:50seancorfieldarohner: ah, so i'm doomed then?
20:50arohnerseancorfield: I think so. Sorry. I haven't looked into what changed yet
20:51yoklovjust to be sure I'm not an idiot, "com.google.javascript.jscomp.mozilla.rhino" seems like a google closure compiler package right?
20:52seancorfieldarohner: 'k guess i'll put my ticket back into the backlog then :) (my world singles ticket to investigate lein-daemon)
20:53kovasblivingston: I believe its possible to programmatically manipulate the namespace mappings
20:53devngood evening fellow clojuriants
20:53devnHail and well met!
20:54livingstonkovasb: yeah, I could just grab all the symbols and re-intern them in the new ns - I was just hoping there was something as nice as "use".
20:55kovasblivingston: i'd look at the chapter on namespaces in joy of clojure
20:55amalloylivingston: it's something you're not really encouraged to do
20:55emezeskeyoklov: I think si, yeah
20:55amalloybut various people love to do it, and potemkin probably has the basic tool you want
20:56livingstonamalloy: I know - it's a connivence thing. I'm trying to set up a shorthand namespace for use with some manual data entry.
20:56amalloy$google clojure potemkin
20:56lazybot[ztellman (Zach Tellman) · GitHub] https://github.com/ztellman
20:56amalloygithub's seo is so awful
20:56yoklovemezeske: Yeah, mozilla.rhino is in that one but com.google.javascript.jscomp seems fairly closure compilery. I posted a stacktrace on that issue, should it help, by the way.
20:57emezeskeyoklov: thanks!
20:59yoklovemezeske: no problem, if you want to know anything else i can answer it, that's just all I could think of
21:00livingstonamalloy: thanks that might be what I"m looking for... still digging into it.
21:05devnibdknox: maybe this is an obvious question, but how close to functional was your demo? It seemed like you had something already working? Is that way off?
21:10yoklovhow do you guys combat growing arglists?
21:10brehautkeyword args or maps
21:11yoklovalready doing that
21:11brehaut(sometimes anyway)
21:11yoklovsame size, just destructured
21:11brehautbut it lets you group args together, which means the prcessing of them can be handled by a seperate function
21:12yoklovhm
21:12brehaut(because lots of args often is a symptom of a function doing more than 1 thing)
21:14yoklovyeah, i agree. Right now I'm trying to refactor a terrible blob of a function into more managable pieces, and I can't think of how to do it without passing lots of args
21:17yoklovto make it even more difficult, I can't break things up to operations on sequences because it needs to be fast.
21:17yoklovblargh.
21:32ibdknoxdevn: it worked but it was a bit of a mess and missing some of the really simple things... like saving :)
21:35tufflaxDoes anyone know what's wrong with this? http://codepaste.net/w5idc1
21:36tufflaxThat error message is a bit cryptic
21:36septomin_that's a strange-looking destructuring
21:37tufflaxI think it's supposet to be fine though :p
21:37tufflaxsupposed* :p
21:38septomin_what's the point of [& dests] there?
21:38septomin_isn't it just equivalent to dests?
21:39tufflaxyes, you are right
21:39tufflaxbut still... :P
21:40tufflaxthe error persists
21:41emezesketufflax: You might want to give an example of the inputs passed to your function.
21:41tufflaxyes ok
21:42tufflaxor
21:42tufflaxThe error results when I try to compile it
21:42tufflaxbut yes, i can get some supposet input
21:42tufflaxd
21:43xeqiworks when I paste it in a repl
21:43emezeskeWell, the example input might help explain what you're trying to do
21:43amalloyit compiles fine when anyone else compiles it, so i suspect your error is in your environment, or in your ability to match line numbers up
21:43tufflaxhm
21:48tufflaxHm, I copied and pasted from codepaste and now it works, vim must have been playing tricks with me. :p
21:49septomin_some weird character in the source?
21:49tufflaxpossibly, but i tryied :set list
21:50tufflaxtried :P
21:51septomin_personally i don't trust any character over 127
22:05kovasbi don't trust any character over 30
22:13Lajlakovasb, but do you trust 30 in symbols?
22:24mebaran151I'm interacting with the Salesforce web service and would like individual steps in transaction to automatically check if they need to refresh their login token automatically (ie. try action against a set Salesforce environment and if you get an unauthorized access exception, refresh the login token and the connection environment)
22:24mebaran151to me, it seems like this would be a good fit for something adapted from a state monad
22:25mebaran151anybody here have much experience with the Clojure monad package and could comment if this idea would be overengineered
22:27brehautmebaran151: it would probably work nicely. depending how you are writing and composing operations it could be over engineered compared to just closing over an atom
22:28brehautbut the way you have described it (and my limited knowledge of the salesforce api) it sounds like a fit
22:28mebaran151good chance for me to play with the algo.monad library too
22:29brehautyup
22:29mebaran151my other idea was to just use a higher order function that took a bunch of salesforce related closures as the steps
22:30mebaran151but then I didn't have a good way to pass state between them without some clumsy global
22:30brehautstate-m is just doing that with some mechanical sugar to reduce the burden of passing crap everywhere
22:30S11001001mebaran151: I missed all but the last two lines, but sounds like you want a fold, or indeed, a state traversal
22:31S11001001setting aside monads, fold is the primitive functional list traversal in the same way that foreach is the primitive imperative list traversal
22:33kovasbisn't foreach more equivalent to map
22:33brehautfor is equive to mapcat
22:33tufflaxI'm gonna win the code golf at the lab presentations. I love Clojure. :)
22:34brehauttufflax: only if nobody else know APL ;)
22:34tufflaxhehe i dont think they do
22:34tufflaxeveryone's gonna use java
22:34brehautbahaha
22:34brehautyou cant play golf with java :P
22:36S11001001kovasb: for in clojure is like mapcat; for-each in scheme, mapc in lisp, each in ruby are the "foreach" I mean
22:38S11001001or doseq in clojure
22:39mebaran151does state-m use an atom?
22:39S11001001no
22:39brehautmebaran151: http://brehaut.net/blog/2010/welcome_to_the_machine
22:40brehaut(toot toot)
22:40mebaran151I'd normally just do a higher order function but for two things: 1) I want the functions to share a result set in a given set of actions/queries and 2) that I can thread in some login and environmental boilerplate in between
22:40mebaran151brehaut: pretty blog :)
22:40brehautthanks :)
22:41mebaran151I like playing with Haskell, but I've never really gotten to anything big
22:42mebaran151I'm thinking you could probably emulate something similar with reduce over a list of functions actually
22:42brehautmebaran151: apologies about the quality of the writing on that, its not my best use of english
22:42brehautmebaran151: basicly state-m just hides the state tracking inside a bunch of function calls so that you dont have to worry about it unless you need it
22:43mebaran151any advantage to the monadic approach compared to say (reduce #(do (refresh-salesforce) (%1 %2)) function-list)
22:44brehautmebaran151: if you have a number of operations and want to intermediate the context passing, and allow ad hoc composition at a later date, then state-m is probably what you want. if you just want to roll over a list of functions and dont mind explicitly passing the context state in and out, then reduce is fine
22:44mebaran151I'd prefer the former I think
22:44brehautmebaran151: the magic of state-m is that it is pure functional, but hides the state variable
22:45mebaran151well I essentially have two states, the state of my sales env (what environment to connect to, etc) and the results my last function returned, though the return really isn't state is it
22:45brehautmebaran151: you might also find http://www.clojure.net/2012/02/10/State/ useful
22:46brehautcorrect
22:46brehautif you need to track more than one thing in state-m you need to stuff it into a vector of map
22:47mebaran151the cleanest api would look something like (dosalesforce [res (query x) res2 (query res1)])
22:47brehautthat would be trivial
22:48mebaran151between res1, and res2, I'd make sure I fulfilled all the SF nonsense
22:48brehautyou could either do that by writing a salesforce monad that is like a state-m but does that checking in m-bind
22:48mebaran151trying the action, retrying after a refresh if salesforce kicked me out
22:48brehautor write a decorate for your query functions on top of state-m
22:49mebaran151I was just about to consider a decoration macro, but it feels cleaner in the bind function
22:49brehautbig old bag of it-depends
22:49brehautpersonally, i'd start with the decorators
22:49mebaran151also since the decoration is all about the state of environment, I'd probably have to put it in the bind
22:50brehautwhenever i use monads, i try to a) use an existing monad where possible, b) use it as internal mechanics rather than exposing it as the API
22:51brehautright; if your queries never want to know about the state of the salesforce nonsense, then by all means, put it in m-bind
22:51mebaran151because basically I'm saying try using the old environment first, and if you get a failure response, refresh the environment state and try to again
22:51mebaran151the queries should never want to know the login information, ever
22:51brehautoh then
22:51brehauts/oh/ok/
22:52brehautone question
22:52brehautare you going to want to be able to define a salesforce function in one place and use that in another saleforce function somewhere else?
22:52mebaran151I would also like some magic destructuring too if possible within the monad at each step ideally, though I'm not familiar enough with the monad interfaces to know if that's unrealistic
22:52brehaut(ie, are the queries you mentioned earlier also 'dosalesforce' things?)
22:53mebaran151I'd prefer them not to be
22:53mebaran151though they could be
22:53brehautif thats the case, then monads might be too heavy handed
22:53mebaran151they could be dosalesforce things theoretically
22:54mebaran151I'd assume within each query-fn, that it's environment would be essentially safe, though for a big long task, it might be nice to compose them
22:55brehautibdknox: lol, PHP support requested already. that'd have to be one hell of a stretch goal
22:56kovasbFacebook should drop 200k just for that
22:56mebaran151I suppose practically my interface looks a lot like a with macro really, that just makes sure the with stays nice and open and optionally logouts out at the end
22:57brehautmebaran151: yeah. monads (if you were familiar with them already) would make it trivial to implement (or prototype) but might be overkill otherwise
22:58mebaran151I was thinking this felt like the first place in some code I was writing that they really clicked
22:58brehautif it looks like a let, and has magic between the binding pairs, then a monad probably makes it easier, yes
22:59mebaran151exactly
23:01mebaran151actually the more I consider it, I'd ideally like more, where in I had a magic HTTP post that was state aware and knew to include the authorization token
23:02mebaran151so these actions are starting to look a lot more like they'd each have to be modeled as a dosalesforce to make sense
23:18kovasbnathanmarz: cloning right now :)
23:47kovasbnathanmarz: do i just use serializable.fn into my namespace?