#clojure logs

2013-01-16

00:01DaoWencan I run a specific test by name from the command line with leon, or does it only let me run the tests in a given namespace?
00:04RaynesIf you're using RC2 (probably back to the latest previews...) you can do `lein test :only your.namespace/your-test
00:04Raynes`
00:05xeqi!
00:05RaynesI did that.
00:05RaynesFeel free to applaud.
00:06DaoWenRaynes: I don't think I'm using RC2, but thanks anyway
00:06Raynestechnomancy: I think it's time to add 'alias leon=lein` to your suggested lein installation method.
00:09tomojif you're still here, whoever you are (I forget), when you saw a lot of time spent in Keyword while profiling, what were the keywords?
00:10tomojwondering whether a closed keyword space will make keywordizing not so expensive
00:11TimMcRaynes: Noice.
00:15tomoj(def foo "foo" 3)
00:15tomojtoo many arguments
00:16tomojwhy not allow that?
00:16mrowewhat would it mean?
00:17tomoj(def ^{:doc "foo"} foo 3)
00:18tomojparedit-reindent-defun really doesn't like def metadata
00:18mrowehm
00:24tomojI guess someone once suggested (def "foo" foo 3) and (defn "foo" foo [] 3)
00:28dakronetomoj: hmm, would want something like that to be configurable, in the case of large or un-human-readable bodies
00:29tomojwell, it's just gonna be a byte array, right?
00:38aperiodicweird... in advanced mode, the closure compiler is munging a DOM method name
00:41aperiodici suppose that's just another externs file
00:59bbloomtpope: ping
00:59tpopepong
01:00bbloomso i'm working on a namespace that uses :refer-clojure with an :exclude
01:00bbloomand i think it breaks foreplay
01:00tpopepretty sure I've done that before
01:00tpopewhat's going wrong
01:00bbloomputting together a minimal repo for you
01:02technomancyRaynes: alias leon="echo Turn off autocorrect you buffoon."
01:03bbloomtpope:
01:03bbloomer forgot to paste
01:03bbloomtpope: https://www.refheap.com/paste/8679
01:03bbloomthat prints "OMG WTF BBQ"
01:03tpopeoh, excluding eval
01:03tpopeyou're an asshole
01:03bbloomhaha sorry
01:03bbloomi'm writing an interpreter, it has an eval function :-P
01:03bbloomsadly, that means you need a fully qualified reference to all the functions from core in your code :-/
01:04tpopejesus
01:04tpopeeven do?
01:04bbloomyou can't qualify do
01:04bbloomdo is a primitive
01:04tpopeoh right
01:04tpopeit felt wrong
01:04bbloombut what is actually a primitive is kinda funky and i believe the design wiki has a page where rich said he wishes the primitives were namespaced
01:05bbloom,`[do loop let if]
01:05clojurebot[do clojure.core/loop clojure.core/let if]
01:05bbloom,`[do do* loop let if if* foo]
01:05clojurebot[do sandbox/do* clojure.core/loop clojure.core/let if ...]
01:05bbloom,`[if if* foo]
01:05clojurebot[if sandbox/if* sandbox/foo]
01:05bbloom,`[let let*]
01:05clojurebot[clojure.core/let let*]
01:05bbloomit's kinda inconsistent/annoying
01:06bbloomi really want to define a symbol named 'if too :-P
01:06tpopethrow is fine right?
01:06bbloom,`[throw]
01:06clojurebot[throw]
01:06bbloomyes
01:06tpope,`[try catch]
01:06clojurebottpope: I don't understand.
01:06bbloomweird.
01:06tpopeoh fuck you both
01:06bbloom,`try
01:06clojurebottry
01:06tpopebot
01:07tpopedid not mean both
01:07tpope,`catch
01:07clojurebottpope: Pardon?
01:07tpope,`EAT SHIT AND DIE
01:07clojurebotsandbox/EAT
01:07bbloomlol.
01:07bbloomcatch isn't a primitive, it's just a regular symbol that 'try looks for
01:07bbloomsame with finally
01:10bbloomi understand if this is an absurdly annoying bug report :-) my apologies
01:10RaynesWhat's annoying is that 'finally' and 'catch' are so special.
01:11RaynesI hate it just about as much as I hate thrown? and thrown-with-msg? in clojure.test.
01:11RaynesThat's some real satanic shit.
01:11bbloomRaynes: agree, try is odd
01:12tomojbbloom: do you want to :require :refer that if ?
01:12tomojI have done (defn if []) before with not much trouble
01:12tpopebbloom: fixed the critical path
01:12tomojand (alias 'foo 'this.ns) at the top if you need to fully qualify it in macros
01:13tpopestill plenty of unqualified symbols elsewhere
01:13bbloomtomoj: it's for factjor, so it would probably be used via cat/if unless you have a pure factjor namespace, in which case you'd :refer-clojure :include [] and then :use factjor.core
01:13bbloomtpope: that seems like a reasonable trade off...
01:13tpopeat least until someone complains
01:13tomojoh, crazy
01:14tomojyeah, problematic..
01:14bbloomi wonder if you could, on session connect, build up a foreplay namespace, then you would only need to refer to your namespace with qualified symbols
01:14tpopecertainly possible
01:14bbloomtpope: thanks for the quick fix!
01:17bbloomtomoj: nothing annoys me as much as the qualified division symbol bug :-/
01:17bbloom,`damn.you//
01:17clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Invalid token: damn.you//>
01:18tomojyeah, luckily in all my 'compete with core' ns's, / has not shown up :)
01:18tomojthough.. I could easily imagine wanting to define math operators lifted to applicative functors.. :(
01:24tomojI also kind of wish you could make @ mean something else
01:25bbloom,(with-redefs [clojure.core/deref inc] @5)
01:25clojurebot6
01:26bbloomtomoj: that is evil.
01:26mefisto`having some problems experimenting with compojure in repl - nrepl in emacs. (real nooby sounding stuff coming up) so I did (run-jetty app {:port 8080 :join? false}) in the repl, and that's fine. But it doesn't seem to be picking up any changes I make to the routes. also not sure how to kill and restart the server
01:26tomojI know, not very useful
01:26mefisto`I am doing ctrl-c ctrl-k after the changes also
01:26tomojmy plan is to just walk looking for for explicit clojure.core/deref and replace it with something else
01:26tomoj:/
01:27ivanhttp://stackoverflow.com/questions/2706044/how-do-i-stop-jetty-server-in-clojure
01:27bbloomRaynes: would you be mad if i accidentally broke your bot?
01:27metellus,(with-redefs [clojure.core/get conj] ({:a 1 :b 2} [:c 3]))
01:27clojurebotnil
01:28bbloom,(with-redefs [clojure.core/deref #(Thread/sleep %)] @10000000000)
01:28clojurebotExecution Timed Out
01:28bbloom,5
01:28clojurebot5
01:28bbloomhey ok cool, security works :-P
01:28bbloom,@5
01:28clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IDeref>
01:28mefisto`ivan: thanks
02:11cola_zerohi, I noticed that nrepl-macroexpand-1 wo'nt work with ritz-nrepl but it works fine with nrepl.el. Because nrepl-macroexpand-1 use clojure.pprint, but it was not loaded by `lein ritz-nrepl` https://www.refheap.com/paste/8681. Are there any way to load clojure.pprint automatically?
02:20tomojhmm.. so it's pretty bad to extend a protocol to the CollReduce interface?
02:20amalloythat sounds like a terrible idea, yes
02:22tomojso clojure.core.reducers is closed
02:25amalloyhuh?
02:26tomojas in, you can't extend a protocol to the stuff returned by the reducer transformers
02:32augustlhi folks, anyone got a generic AMQP library to recommend?
02:45augustlI found http://clojurerabbitmq.info/, but it seems RabbitMQ specific for some reason
02:46augustland some reason seens to be that RabbitMQ has some custom extensions to AMQP
02:46augustlseems*
03:00wuttfHi guys, new to Clojure. How hard is it to install Clojure on windows?
03:00Ember-easy, but not as easy as in *nix
03:01Ember-since the automatic download stuff is broken
03:01Ember-in leiningen
03:01Ember-which you pretty much want to use with clojure :)
03:01tkoskineYeah, I would say that plain Clojure is easy on both, but Leiningen is harder on Windows.
03:01wuttfSo I will have hard time managing dependencies and stuff?
03:02Ember-leiningen takes care of that stuff
03:02Ember-one of the reasons you want to use it
03:02wuttfI go and try to install leiningen
03:02wuttfthen
03:06Foxboronwuttf: i recommend getting cygwin or mysisgit.
03:06FoxboronCurrently only lein1 works on cmd, but you want lein2.
03:07Foxboronwuttf: i am leaving in 10 mins for school, you can PM me later if you need any help :)
03:07wuttfFoxboron: I have both
03:07wuttfFoxboron: Thank you =)
03:07Foxboronwuttf: great, then there should be no problems :)
03:11wuttfArrgh wget is buggy on windows7
03:12Ember-there is no wget in windows
03:12Foxboronwuttf: if you use cygwin:
03:12Ember-you need install it separately
03:12ro_stanyone got ring web apps in production and have a way to do zero-downtime restarts?
03:12Foxboronfetch a wget from the web and put in the same dir as lein
03:12Ember-Foxboron: wget is available even without installing cygwin
03:12wuttfI am following this http://frozenlock.org/2012/03/06/clojure-on-windows-7/
03:13Ember-I *really* should continue on my work with lein.ps1 like I promised :(
03:13wuttfwget crashed, I found this http://lists.gnu.org/archive/html/bug-wget/2011-09/msg00018.html
03:13Ember-so we could dump the .bat
03:13Ember-no need for wget or stuff like that then
03:13FoxboronEmber-: i am happy i got a new laptop so i didnt have to deal with windows <.<
03:13wuttfProblem is the link is dead there
03:14Ember-Foxboron: I'm perfectly happy with Windows 7, but old bat stuff is just... Bad
03:14Foxboronwuttf: really, fuck the guide. Open mysisgit, get the bash lein file and run it.
03:14Foxboronwuttf: that is the easiest way
03:14wuttfFoxboron: Okay.
03:15FoxboronEmber-: found emacs to be hard to get working on windows when you aint used too it. So i used Sublime text....not to mention 10 sec warmup time on jvm
03:15Ember-I installed leiningen by downloading the jar file manually
03:15Ember-and placed the needed env variables etc by hand
03:15FoxboronEmber-: that is also another solution
03:16Ember-Foxboron: 10sec warmup time?
03:16Ember-wtf
03:16Ember-like 0.5sec here
03:16Foxboronmine had 10 sec
03:16Ember-something was badly broken bro
03:16wuttfWhat are the environment vars I have to set
03:17wuttfEmber-:
03:17Ember-I'm pointing at a possible virus scanner or disc encryption
03:17Ember-wuttf: wait a sec, I'll check em
03:17FoxboronEmber-: you are the first to have mentioned that bro
03:17Ember-wuttf: I have the following
03:17wuttfBTW I have never ever touched anything JVMish
03:17wuttfNo jars no nothing
03:17Ember-LEIN_ROOT <path-to-leiningen>
03:18Ember-LEIN_JAR %LEIN_ROOT%\leiningen-20.0.0-preview10.jar
03:18Ember-(yes, still on preview, should upgrade)
03:18Ember-JAVA_HOME <path to java>
03:18wuttfI dled the preview too
03:18Ember-and to PATH add %LEIN_ROOT%
03:18Ember-that's it
03:19wuttfto PATH?
03:19Ember-PATH environment variable
03:19Ember-it tells the operating system where to look when you type some command and that executable etc isn't at the current directory
03:19wuttfK doing
03:21Foxboronanyway, school. Have fun wuttf :)
03:22wuttfFoxboron: Thank you ;)
03:25wuttfEmber-: Your nick means "man" in Hungarian
03:25wuttf*h
03:26Ember-my nick is soooo old...
03:26Ember-dates back to when I was like 10 years old
03:26wuttfI am not sure about the JAVA_HOME
03:26Ember-and I liked to read fantasy literature :)
03:26Ember-ember was a dragon in one of them
03:26wuttf:D Lol.
03:26Ember-that nick kinda stuck
03:27wuttfCute.
03:27Ember-I'm 31 now, so it's pretty old nick
03:27Ember-:P
03:27wuttf:DDDD
03:27wuttfI have a "C:\Program Files (x86)\Java" But that contains to folders
03:27wuttfjre7 and 6
03:27Ember-you need jdk
03:27Ember-you obviously don't have it yet
03:28Ember-go download it from oracle's site
03:28Ember-jre is meant to _run_ java applications, jdk is meant to _compile_ (and run) java applications
03:28wuttfOkay. God... I knew I will be handicapped. I bet most of you are ex or current Java devs
03:28Ember-no problem, we all were newbies once
03:29ro_stbeginners mind
03:29ro_stbest thing :-)
03:29Ember-yeah, nothing in way to find greatness
03:29Ember-:)
03:30ro_stone of the main reasons i've enjoyed learning and using clojure so damn much
03:30fredyrand not being a java dev doesnt have to be a disadvantage either :)
03:30p_lI might currently code java, but that doesn't mean I'd call myself a Java dev :D
03:30wuttfWell I am rather proficient with other programming languages, but I skipped the Java universe entirely
03:30p_lI'm usually pissed off by java universe
03:30Ember-I'm mostly a java dev, but currently working with clojure full time
03:31p_lClojure shields you a bit, but also tends to annoy as well
03:31Ember-done my share of c++ and stuff
03:31wuttfI have a natural aversion toward Java too, but Clojure spiked my interest, I like the immutability and the fact its a Lisp
03:32p_lthe immutability pretty much kills it on platforms that have veeery costly GC... and short time for pauses
03:32Ember-java is way better than most languages, but then again it does have a lot of problems too, I'm first to admit that
03:32Ember-and it's not a tool for every job
03:33Ember-java would be way better if it could just dump the old legacy stuff to garbage
03:33Ember-but backwards compatibility and so on...
03:34Ember-but I'm really really enjoying my time with clojure
03:34p_la lot of stuff in java seems to be directed at the "coders" that write Nth UI screen in bland corpo-app, so that they blow up less stuff
03:34wuttfYes, too blue collar for me
03:34Ember-the sad thing is that most of the "java developers" aren't java developers
03:34Ember-they are "framework x" developers
03:34Ember-like spring framework
03:34Ember-they use it but don't understand it
03:35Ember-Sgeo: as it should be
03:35p_lEmber-: no, the sad thing is that majority of java code isn't OOP, but its sold as one, stifling programming everywhere
03:35Ember-p_l: that is so very true too
03:35p_land no, I'm not talking about "utility classes"
03:35Ember-I agree completely
03:35Ember-and yes, I know *exactly* what you are talking about
03:35SgeoSo, I don't look at Rails and go "Ooh", I look at Ruby, and then from there note Rails. Except I don't like Ruby, it's just a Perlified Smalltalk, so no
03:35p_lI'm talking about bloated, giant inheritance trees and "classes-oriented" programming
03:35Ember-no real usable abstractions and stuff like that
03:35bbloomp_l: when i'm stuck with java, i basically `import static` pretty much everything
03:36Ember-huge inheritance like you said, no use of composition
03:36p_lQi4J looks nice, but can be a bit annoying because it has to go around things in java
03:36Ember-bbloom: that's a bad practice in my opinion. But not the worst possible
03:36wuttfI was never excited about OOP.
03:36p_lmeanwhile I can't really use it in my code
03:36p_lwuttf: most OOP isn't
03:36Ember-OOP is fine, but the problem is that you can SOOO easily use it in a wrong way
03:36p_lif you want OOP, look at smalltalk, or "protocol-oriented programming"
03:37Ember-at least in most languages
03:37bbloomEmber-: it's bad b/c it's not normal java, but it's good because i don't pull my hair out
03:37Ember-like in Java
03:37wuttfNominal subtyping is an especially dangerous idea I think.
03:37Ember-bbloom: well, you only need import statics with static methods
03:37bbloomEmber-: right, and i mostly only write static methods
03:37Ember-that's not OOP :)
03:37Ember-but I understand why :)
03:38Ember-it would be stupid not to since I'm hanging on a clojure channel
03:38p_lfunny fact - one of the most OOP languages isn't claimed as one, with people using horrible things to "make OOP code" that actually... isn't
03:38p_lguess which one? :P
03:38Ember-p_l: yeah, not funny though. Sad really
03:38p_lEmber-: it's funny when some of the brighter devs vehemently disavow connection with OOP :P
03:38wuttfp_l: Dont hold it back
03:39p_lwuttf: Erlang. Process == Object
03:39Ember-and that stuff goes on and on in many different languages
03:39p_lEncapsulates state? Check. Communicates with messages? Check.
03:39Ember-trying to use language x to do code with paradigm y even though that language is for paradigm z
03:39Ember-take javascript for example
03:40wuttfp_l: Erlang is nice. The syntax is ugly as hell though
03:40Ember-people try to create classes and classical inheritance with it
03:40Ember-when it's a prototypical language
03:40p_lwuttf: beauty is in the eye of beholder. I know people who like it. Said people also like Prolog, which the syntax is from :D
03:41bbloomi'm of the opinion that "OOP" is now a completely meaningless term
03:41bbloomit's so overloaded as to be entirely useless
03:41wuttfp_l: Its easy to like Erlang if you are a prolog guy
03:41AimHereWith Javascript, isn't that because they put Java in the name and made the syntax similar so people assumed it was Javalike
03:41Ember-AimHere: yeah, one of the main reasons
03:41Sgeowuttf, really? Because Erlang takes the Prolog syntax but not the stuff that makes Prolog really cool
03:42Ember-but erland does have actors :)
03:42Ember-erlang
03:42wuttfSgeo: I meant the syntax
03:42Ember-although those aren't called actors in it
03:42p_lAimHere: it's actually a Scheme with prototype-based object model baked in, with some dubious choices that are biting it now (because it wasn't made to be serious language), which was given Algol-family syntax and got renamed as part of a deal between Netscape and Sun (Netscape bundled JRE)
03:43Sgeop_l, beyond lack of TCO and overly verbose lambdas and automatic ;, what dubious choices?
03:43SgeoOh, I remember something about objects not working well as hash-maps ick
03:43wuttfNow I installed the JDK where should my JAVA_HOME be?
03:43SgeoAnd lack of first-class continuations
03:43Sgeoand lack of macros
03:43p_lSgeo: leaky implementations, mostly.
03:43p_lSgeo: well, macros weren't exactly forte of schemes ;P
03:44p_l(at least the standardized stuff)
03:44Sgeop_l, o.O I thought Scheme was known for hygienic macros. Maybe historically not?
03:44Ember-wuttf: c:\program files (x86)\java\jdk_1.7.0_xx\
03:44Ember-if that's where you installed it
03:44p_lSgeo: yes, but my feeling with them is that they are... a bit stifled compared to DEFMACRO
03:44wuttfEmber-: Thanks! I was being blind
03:45Sgeop_l, have you read Oleg's stuff? He has some sort of Scheme to syntax-rules compiler. There's also syntax-case but that's not in R5RS
03:45wuttfHey before I dive in to explore Clojure what are the shittiest parts of it?
03:45p_lSgeo: nope. I'm not current on Scheme developement - frankly speaking, trying to go with Scheme slowed me a lot in grokking lisps
03:46Sgeowuttf, needing to deal with the JVM, mostly, although there are other flaws
03:46xificurChow do you check if two keywords are equal?
03:46wuttfSgeo: I thought being on the JVM is a pro
03:46SgeoIncomprehensible error messages are always fun
03:47Ember-JVM as a runtime platform for Clojure is a great choice
03:47Ember-like the best thing done for it
03:47p_lwuttf: JVM makes some stuff
03:47p_lannoying
03:47wuttfSgeo: I am already used to that after Haskell.
03:47Sgeowuttf, it's a mixed blessing. On the one hand, tons of stuff exists for free. On the other, a lot of compromises to get it to work nicely
03:47p_lEmber-: doesn't mean there isn't a price to pay
03:47Ember-p_l: of course there is
03:48Ember-there is no such thing as free lunch
03:48SgeoJava methods are not first-class functions
03:48p_l(or that the "chocie of libs" doesn't mean "choose between crap, crap, and utter crap")
03:48SgeoNo TCO
03:48Ember-but clojure imho is the first lisp to have actual chances to succeed to get a wider audience
03:48wuttfWell yes lack of TCO is kinda a bummer for a remotely functional lang
03:48Ember-and a big part of that is due to JVM
03:48p_lEmber-: not first.
03:49xificurChow can I check if two keywords are the same?
03:49wuttfBut htere is a recur thingie, right?
03:49Sgeo,(eq? :hi :hi)
03:49wuttfWon't that give you tail call?
03:49Ember-lack of TCO is kinda bummer but not THAT big thingy
03:49clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: eq? in this context, compiling:(NO_SOURCE_PATH:0)>
03:49Sgeo,(= :hi :hi)
03:49clojurebottrue
03:49Ember-since you want to use lazy sequences more than tail recursion
03:49Ember-and there is recur
03:49p_lEmber-: and I personally think JVM giving you access to java libs is more of "hype" thing, with more important being the ease to slip Clojure into enterprise
03:49Ember-p_l: indeed, I agree
03:49xificurChm
03:49Sgeowuttf, doesn't help for mutually recursive functions. There is trampoline, but it can be annoying to use
03:50Ember-but that one is a huge one
03:50p_las for wider audience...
03:50p_lyou do know that clojure is nowhere close two widely used lisps? :D
03:50xificurCSgeo: thanks, the problem was somewhere else :)
03:50Ember-yes
03:50Ember-but clojure is also way newer
03:50ro_sthow do we get clojure to wide usage?
03:50Ember-common lisp has got kinda long headstart :)
03:51p_lEmber-: I'm not talking CL
03:51p_lnor Scheme
03:51ejacksonro_st: its growing like crazy
03:51Sgeop_l, elisp?
03:51ro_stnow children, let's count from 1 to 10. very good! now, tell me, what does this clojure code evaluate to?
03:51p_lThere are two *giant* userbases - Elisp and AutoLISP
03:51xificurCyou dont need a very wide audience to keep the language alive and good, just a decent one :)
03:51p_lthe latter is most horrible
03:51p_lbut unkillable
03:51p_l(despite Autodesk trying at least twice)
03:52ro_stejackson: i'm talking at scaleconf in april (here in cape town)
03:52ro_styou can bet all your parens i'll be pushing Clojure :-)
03:52ejacksonyeah spread the (infection)
03:52p_lro_st: take a big stick to use on Node.js? ;P
03:52ro_sthappily
04:49ro_stRaynes, hiredman: are you the chaps responsible for the various bots in here? if so, what's the possibility we can have them visit #clojure.za too?
04:55bbloomro_st: dare i venture to #clojure.za ? what's over there?
04:56ro_stbuncha south african coders :-) some using clojure. also, it's where we organise our cape town usergroup
04:57bbloomah gotcha
04:57bbloomcool
04:57ro_stbe nice if we had one of the bots present, for the usual reasons :-)
04:59ro_stah, bbloom, if your talk didn't clash with ritz, i'd totally be there. i'm very keen to see how it applies to web stuff
04:59bbloomro_st: oh, didn't see the schedule was out
05:01clgvro_st: Raynes controls lazybot. just ask him when he is around. he let clojurebot join #clojure.de as well
05:01ro_stcool, thanks
05:01clgvargs not clojurebot, lazybot!
05:03bbloomro_st: i just wanna know what Pedestal is all about! :-P
05:03bbloomdamn secrets
05:03ro_st-grin- me too
05:03ro_stany guesses?
05:04cmdrdatsbbloom: probably going to be a game changer
05:04bbloomcmdrdats: ok... but what game is it going to change? heh
05:04cmdrdatsbbloom: maybe a nice interface for overture
05:05cmdrdatshehe
05:05bbloomi have no idea what overture is
05:05ro_stclojurescript-in-clojurescript is really exciting, too
05:05cmdrdatsbbloom: music synthesis lib
05:05ro_stalthough, good luck porting the google closure compiler to js
05:05cmdrdatsafaik… that is
05:06bbloomcmdrdats: do you mean overtone?
05:06ro_stovertone, ya
05:06cmdrdatsah, foo. yes.
05:06bbloomro_st: you don't need to port closure to js
05:06cmdrdatsovertone, my bad
05:06bbloomro_st: you need to port the optimization passes to clj
05:07bbloomro_st: in fact, most of those passes should happen long before the code is transformed to javascript, on the clj not on the js, then they same optimizations could be reused for other backends
05:07vijaykiranIsn't pedestal something related to testing
05:07cmdrdatsvijaykiran: i hope not :/
05:07ro_stbbloom: true. but the google closure compiler does incredible things with javascript, and we definitely want that benefit
05:08ro_stat least, i do :-)
05:08ro_stbut even if cljs-in-cljs makes it possible to eval code browser side, i'd be happy
05:08ro_sti don't know nearly enough about cljs internals to know if that's even possible. i speak as a User, now
05:09bbloomro_st: the sorts of things that closure does with js are the sorts of things that any compiler does
05:09bbloomro_st: it's completely possible. the guy speaking has that working in his fork
05:10ro_stawwwwesome :-)
05:11ro_staw man. why did it have to clash with FRP!
05:11ro_stFRP still gets my vote. have direct interest in using FRP in our code
05:12ro_sthttp://clojurewest.org/sessions#dipert <<
05:12piranhaoh right!
05:12piranhathis is interesting
05:12piranhaI'm actually trying to figure out this stuff right now, flapjax + enfocus :)
05:12ro_stoh, nice :-)
05:13piranhait works, though I'm not sure yet how to do forms nicely
05:13piranhaone moment, I'll show the code, I'm excited about it quite a bit :)))
05:13ro_stcheck out this demo https://github.com/robert-stuttaford/demo-enfocus-pubsub-remote/
05:13piranhahttps://github.com/piranha/pairword/blob/master/src/pairwords/templates.cljs#L44 - I have templates defined here
05:13ro_stwould you mind scanning through and telling me how much work it'd take to rework it with FJ ?
05:14piranhatemplate is an enfocus one, receives a behavior and returns a DocumentFragment, which I append somewhere in document then
05:14bbloomi'm been experimenting with FRP for quite a while and i'm almost 100% convinced it's a dead end for GUIs
05:14ro_sttell me to piss off if i'm being cheeky
05:14bbloomit's still promising for animation
05:14piranhaand it updates itself
05:14piranhabbloom: oh, why/
05:14piranha?
05:14ro_stwhy, bbloom?
05:14bbloomI find Angular's game-engine like approach to be much more attractive
05:14bbloomupdate & render
05:15piranharo_st: not sure, I'm just starting, honestly :)
05:17piranhabbloom: hm, but it's quite similar one to other, though in FRP you get dependency graph and in case of angular... well, I don't know, I'm not sure it's the best approach :)
05:18bbloompiranha: don't let me discourage you to keep experimenting and exploring
05:18piranhaok :-)
05:18bbloompiranha: but keep an eye out for what i brew up... probably going to have a demo by the time clojure/west comes around :-)
05:18piranhaah cool :)
05:19piranhaI would love to attend clojure/west, it's a shame I live so far away %)
05:19bbloompiranha: all the videos should find their way online
05:20piranhabbloom: indeed, but it usually takes quite a time plus you don't get to talk with real people, which may be even more interesting :)
05:20bbloomyup
05:26ro_stbbloom: FRP appeals because we're using event sourcing in our client-server data model
05:30ro_sthope to add websockets into the mix so that it's not just users -events-> server, but also server -events-> users
05:32ro_stedtsech :-)
05:32silasdavisI'm getting a clojure.lang.LazySeq cannot be cast to java.io.Writer using liberator with the following code: https://www.refheap.com/paste/8684
05:33silasdavisany thoughts?
05:33edtsechro_st: hi :)
05:34ro_stsilasdavis: (map pretty-message (message/all)) #just-saying
05:35silasdavisyeah that's a bit if (a == true), it had something more sensible in the lambda before...
05:36ro_stperhaps just (pretty-message (first (message/all))) and see if that works?
05:37ro_sti haven't used liberator so i might be way off, here
05:40ro_stanyone converting html to pdf with clojure?
05:42silasdavisro_st: actually first doesn't work because it can't conert (message/all) to an ISeq
05:42silasdavisbut map does work
05:42silasdaviswhat collection types does map take?
05:43bbloomsilasdavis: anything that implmenents clojure.lang.Sequable
05:44bbloomsilasdavis: if you're not sure, call `seq on it
05:44silasdavisbbloom: how can I get the first of anything Sequable?
05:44bbloom(doc seq)
05:44clojurebot"([coll]); Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Strings, native Java arrays (of reference types) and any objects that implement Iterable."
05:44silasdavis(map views/pretty-message (message/all))) -> works
05:44bbloom`first should already call seq
05:45silasdavisbut (seq message/all) doesn't with "don't know how to creat ISeq"
05:46bbloomsilasdavis: i dunno anything about whatever library you're using
05:46edtsechro_st: I've used http://code.google.com/p/wkhtmltopdf/ but it's without clojure :)
05:48silasdavis(coll? (message/all)) returns true... shouldn't that be enough?
05:49silasdavisoh brackets omitted
05:49silasdavismy fault
06:16ro_stthanks edtsech
06:54michaelr525hello
07:06acuziothey use clojure @guardian.. - thats interesting
07:17[Rock]Rock
07:17[Rock]Ignore that^
07:33silasdaviswhen using lein ring server, it reloads changed files but it seems to lag by one change
07:55silasdavisis there a neater way to perform a lookup in nested maps than (:innermost (:inner (:outer (:outermost map))))?
07:55ro_st(-> map :one :two)
07:57silasdavisthat's what I had in mind, thanks
08:00Raynesalexbaranosky: Hi.
08:00Raynesro_st, silasdavis: No it isn't. (get-in map [:outermost :outer :inner :innermost])
08:03ro_stthat too
08:04ro_stRaynes: any chance lazybot can park in #clojure.za, please?
08:04RaynesSure
08:04mpenetsilasdavis: get-in won't throw exceptions on you for non existant string keys, not to mention the "default" argument
08:04Raynes$login
08:04lazybotYou've been logged in.
08:04Raynes$join #clojure.za
08:04RaynesI'll edit the config to make it permanent.
08:04ro_stthank you :-)
08:04mpenet,(-> {} "a" "b")
08:04clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn>
08:04ro_stis there a reference for its commands somewhere?
08:05mpenet,(get-in {} ["a" "b"])
08:05clojurebotnil
08:05Raynesro_st: Not really. Best to just browse the plugin list.
08:06ro_stwhere do i find that?
08:07Raynesgoogle.com
08:08RaynesSec
08:08ro_sti already checked github/raynes :p
08:08Rayneshttps://github.com/flatland/lazybot/tree/develop/src/lazybot/plugins
08:08RaynesAye, it's a flatland project.
08:08Raynes:D
08:08ro_staha!
08:08ro_stare all of these enabled?
08:08RaynesMost of them are enabled.
08:09RaynesSome more pointless ones may not be
08:09Raynes$loaded
08:09Raynes$kill
08:09lazybotKILL IT WITH FIRE!
08:09RaynesHm.
08:09Raynes$loaded?
08:09lazybot:autoreply :brainfuck :clojure :clojuredocs :debug :dictionary :eball :embedded :fortune :github :google :haskell :help :internal :javadoc :karma :knowledge :leet :lmgtfy :load :log :logger :login :macro :mail :max :mute :operator :ping :rotten-tomatoes :rss :sed :seen :shorturl :timer :title :unix-jokes :utils :weather :whatis :yesno
08:09RaynesStupid question mark.
08:09Raynesro_st: ^ all of these are enabled.
08:09ro_stnice, thank you, sir!
08:09Raynesgoogle is currently broken because I suck at switching json libs.
08:09RaynesWill fix in the next day or two.
08:10ro_sti guess 1.5 will come when it goes final?
08:10RaynesOr, shit, I might fix it in a minute.
08:10RaynesVersion is utterly meaningless.
08:10RaynesI haven't changed that version in over 9000 years.
08:10RaynesI hardly ever even restart lazybot, I usually just reload code.
08:10ro_sti mean clojure 1.5
08:10ro_stso we can use as-> and condp and whatnot
08:11RaynesOh. Hah.
08:11RaynesYes.
08:11RaynesI'll definitely update it for Clojure 1.5.
08:11ro_stkickass
08:12cmdrdats(inc Raynes)
08:12lazybot⇒ 19
08:31hyPiRionSomeone told me "oh cool, you've got a Clojure button" today. I think I need to go to another more obscure language before Clojure is the most popular thing ever.
08:35ejacksonmaybe `fogus will agree to write one for you hyPiRion :)
08:36cmdrdatshyPiRion: Shen - http://www.shenlanguage.org/ - done.
08:36hyPiRionejackson: Actually, I'm very interested in making my own.
08:37hyPiRioncmdrdats: And thanks, it's on my "to-learn" list.
08:37ejacksonhehe, I'll hang back a bit, still don't get Clojure well enough
08:37cmdrdatsheh, cool - same
08:39hyPiRionMaybe I should go back to Oz. It has this sweet dataflow programming style I really like for writing concurrent programs
08:40hyPiRion(like promise/deliver, but more integrated.
08:40pandeirohyPiRion: i'm reading CTM now and digging it, but i didnt think anyone actually used Oz
08:41hyPiRionpandeiro: Exactly, noone uses it :p
08:41pandeirohyPiRion: totally hipster
08:42pandeiroi was wondering if the dataflow style could be implemented in clojure somehow actually
08:42hyPiRionWell, I've seen dnolen using it/stealing ideas from there to core.logic I think
08:45pandeiroone funny thing about CTM is all the talk about Mozart, which i built a VM for and compiled myself since it wasn't in my distro's repos, only to find out it's just Emacs
08:45hyPiRionyeah, it's just elisp
08:51michaelr525what is ctm?
08:52hyPiRionCTMCP: http://en.wikipedia.org/wiki/Concepts,_Techniques,_and_Models_of_Computer_Programming
08:53pandeiromichaelr525: someone here recommended it to me when i was asking about how queues work
08:54pandeirothere is a draft version available free
08:54michaelr525'k :)
08:54pandeiroi think i had to google -> archive.org to find it though, it's not on the site anymore
08:55hyPiRionpandeiro: I think it's on the site actually. I'll have a look for it
08:56hyPiRionActually, searching for "CTMCP pdf" gives me a citeseerx link as first hit, which contains the draft
09:05ro_stRich_Morin: i'm in for the datomic/codeq hack session
09:06ro_stwe use D in production so i should be able to contribute something :-)
09:12Raynes$google foo
09:12hyPiRionRaynes: Someone broke it
09:12RayneshyPiRion: That'd be me, sir.
09:12Raynes$shell git pull
09:12lazybotUpdating b790d39..96fab3f Fast-forward src/lazybot/plugins/google.clj | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-)
09:12Raynes$reload
09:12lazybotReloaded successfully.
09:12Raynes$google foo
09:12lazybot[Foobar - Wikipedia, the free encyclopedia] http://en.wikipedia.org/wiki/Foobar
09:12hyPiRionwhut
09:12RaynesAnd now I fixed it.
09:12Raynesro_st: ^ Google fixeded.
09:12ro_styay
09:13ro_stwell done!
09:13tgoossensi'm getting tired of this. Please tell me how to improve on this. I keep copying everything from sublime into the repl manually
09:13tgoossenswhats the best way to make my life easier?
09:13ro_stawwwww yisss. motha -in emacs.
09:13Raynestgoossens: Well, besides Emacs, Vim, or Eclipse, I'm not sure what to tell you. Not many people use ST2 for Clojure. The indentation sucks pretty bad for it too.
09:14tgoossensRaynes: about the intendation
09:14Raynestgoossens: When I have to work directly in a REPL, I tend to do (require 'foo.bar :reload) in my repl.
09:14RaynesThat'd what I'd do if I used ST2 and there wasn't some plugin to give me Emacs-like interaction with a repl.
09:14RaynesUnless I needed to specifically copy one piece of code.
09:15tgoossensis that why my intendation gets screwed up everytime
09:15tgoossenshttps://github.com/tgoossens/cljstrips/blob/master/src/cljstrips/core.clj
09:15RaynesYep. It's horrid.
09:15tgoossensi'm getting so tired of it
09:15RaynesIt uses a crappy textmate bundle that is basically regex soup.
09:15tgoossensi really need a new texteditor
09:15cmdrdatsnotepad.
09:15ro_sttgoossens: emacs, vim or eclipse with CCW.
09:16RaynesThere is a plugin to make the indentation better though, but it doesn't integrate with the built in 'reindent' command or vintage mode's stuff.
09:16cmdrdatsuntouchable. just like MS paint
09:16tgoossensi heard about emacs a lot (never tried it before)
09:16pandeirotgoossens: prepare thyself
09:17Raynestgoossens: https://github.com/odyssomay/sublime-lispindent This is less sucky than what is included by default.
09:17RaynesIt feels like a big hack to get around the ST2 including support for languages he doesn't care about and thus not maintaining them.
09:17RaynesIt also won't help with your repl woes.
09:17RaynesEmacs + nrepl.el would, as would Vim and vim-foreplay.
09:17tgoossenspandeiro: hmm?
09:18pandeirotgoossens: you may not have known about emacs but emacs certainly knew about you
09:18Rayneshttp://sublimetext.userecho.com/topic/98139-clojure-auto-indentation-is-almost-never-correct/ I posted this ages ago but nobody really cares. Too many new features needed for bugs to be fixed in existing ones!
09:19tgoossensah you are working on sublime?
09:19ro_sttgoossens: http://blog.jr0cket.co.uk/2013/01/emacs-live-great-clojure-developer.html
09:19ro_styou're welcome, and i'm sorry.
09:19tgoossenslooks nice
09:20Raynestgoossens: Nope.
09:20RaynesI tried it recently though.
09:20tgoossensits the first editor that someone told me about (while telling me about clojure for the first time)
09:20tgoossensbut i'm fed up with it
09:21Raynes$tryhaskell foldr (+) 0 [1..10]
09:21lazybot
09:21ro_sthow long have you been struggling?
09:21RaynesBrokes.
09:21Raynes$shell git pull
09:21lazybotAlready up-to-date.
09:21ro_sttgoossens: are you south african?
09:21tgoossensnope belgium :)
09:21ro_stah
09:21tgoossenseuhm. since september or so :p
09:21Raynes$shell git pull
09:21lazybotUpdating 96fab3f..3fe14b3 Fast-forward src/lazybot/plugins/haskell.clj | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
09:21Raynes$reload
09:22ro_styikes dude
09:22lazybotReloaded successfully.
09:22Raynes$tryhaskell foldr (+) 0 [1..10]
09:22lazybot⇒ 55
09:22tgoossensbut not active development
09:22tgoossensmore playing around (still studying)
09:22RaynesSorry for the spam. I'm unbreaking some breakage I did recently. I want you all to see how I maintain my projects. Because I totally do.
09:22tgoossensbut at the moment i'm (for the first time) trying to write a fairly complex program in clojure
09:22tgoossensand i'm feeling the pain
09:22tgoossensbadly
09:23RaynesEmacs is an excellent pain pill with a high addiction rate.
09:23tgoossensso yeah
09:23Raynes$he foldr (+) 0 [1..10]
09:23tgoossensi'm probably going to rage a discussion right now but..
09:23tgoossenswhy not
09:23tgoossens*Raise
09:23RaynesWhaaaaaat. Mueval is teh broke.
09:23borkdudetgoossens learning Emacs will make you a better text editor, even if you're not ever going to use Emacs ever again… eh, wait
09:23tgoossensvim vs emacs?
09:23tgoossensborkdude: lol ?
09:23Raynestgoossens: Emacs has the best support for Clojure. Vim is a close second.
09:24borkdudetgoossens yes, lol
09:24Raynestgoossens: As far as Emacs vs Vim as editors, that's a question nobody but you can answer.
09:24tgoossensok. i'll be looking into emacs
09:24tgoossensbut at the moment
09:24RaynesSome people hate Emacs for its key sequences and love vim for its modal editing.
09:24tgoossenswhat is the easiest way
09:24tgoossensto fix my intendation
09:25tgoossensin my core.clj file
09:25RaynesSee the link above.
09:25tgoossens(not manually )
09:25tgoossensah yes
09:25pandeirotgoossens: emacs
09:25RaynesNo, there is a plugin for ST2 he can use.
09:25pandeiroon any linux distro emacs is a command away
09:25tgoossenssublimeREPL
09:25tgoossenshmm
09:25RaynesThat exists, but I'm not sure how well it works.
09:26tgoossensnot well
09:26RaynesI've heard complaints about it before, but I can't think of specific stuff.
09:26tgoossensit freezes my xorg server
09:26tgoossenseverytime again
09:26tgoossensnot figured out why yet
09:26RaynesNice.
09:26borkdudeisn't there a leiningen plugin which slurps all project files and spits them correctly indented? ;)
09:26RaynesWell, not nice, but nice.
09:26Raynesborkdude: Not that I know of.
09:26tgoossens:D
09:28hyPiRionTime to make "lein pprint"
09:28borkdudelein indentify
09:28`fogusejackson: What are signing me up for this time?!
09:29ejacksonthe new language: "Hipster"
09:29ejacksondesigned to keep users away
09:29`fogusOh, I'm already done with that language... but you've probably not seen it
09:29ejackson:D
09:29ro_stejackson: if brainfuck can't manage that, i don't know what can
09:33tgoossenshmmm
09:33tgoossenswtf for intendation is this?
09:35tgoossenswhats with all the whitespace :p
09:35tgoossenshttps://github.com/tgoossens/cljstrips/blob/master/src/cljstrips/core.clj
09:35tgoossens(using the sublime indent plugin)
09:36progotabs are evil
09:36tgoossensi noticed
09:37ro_st(inc that)
09:37lazybot⇒ 1
09:37tgoossensbut i use the tab button a LOT
09:37tgoossensjava inheritance
09:37ro_styou can tell st to use spaces
09:37tgoossensah voila
09:37tgoossensinheritance is bad :p
09:38tgoossensok i see
09:38tgoossensconvert tabs to spaces was switched off
09:39tgoossensoh now i get
09:39vijaykirantwit
09:39tgoossenswhy sublime screwed up my intendations
09:39tgoossensyou can set the amount of spaces a tab is equivalent to
09:39tgoossensbut
09:39tgoossensif you don't convert them to spaces
09:40tgoossensthen sublime will do that for you. But in the editor you will see only the set amount of spaces
09:40tgoossensbah
09:40progosubstandard editor.
09:40tgoossensi guess that
09:40tgoossenswhen i started using it
09:41tgoossensi was just enchanted by its interface en default color theme
09:44ro_sti use st2 every day
09:44ro_stjust not for clojure
09:45RaynesST2 is a pretty editor. Pretty annoying, mostly.
09:45ejackson(inc Raynes)
09:45lazybot⇒ 20
09:46ejacksonM-x kurmedgeon-mode
09:47tgoossenshaha
09:47TimMcIs that the KDE version?
09:48tgoossenswhat are the roles of clojurebut / lazybot
09:48ejackson$guards
09:48lazybotSEIZE HIM!
09:48ejacksonmostly
09:48TimMcTo further the world domination goals of hiredman / Raynes & amalloy, respectively.
09:49tgoossens$guards
09:49lazybotSEIZE HIM!
09:49tgoossenslol
09:49ejacksonalso they're C&C nodes for our fake parenthesis medication spam botnet
09:50ro_st,(clojure.string/join " " (map name [:to :demonstrate :code]))
09:50nDuff$goards
09:50clojurebot"to demonstrate code"
09:50ejacksonapply the cream.... oh, now I have more parentheses.... dear me.
09:50tgoossensro_st: do you use it for java development as well?
09:50tgoossens(st2)
09:50ro_sttgoossens: gosh no. but then, i don't do java at all
09:53tgoossensro_st: what do you use it for then?
09:54ro_stlegacy php code
09:55tgoossenssomeone just told me something about catnip
09:55tgoossensanyone experience with that?
09:55ferdThought from a newbie: Instead of having controllers.js, services.js etc.Wouldn't it make more sense to group my JS files by "domain"? For example, I would have a users.js, containing all controllers/models/services dealing with "users"
09:56ro_stferd: i'm actually thinking along those lines as well
09:56ro_stmodules of stacks rather than one big stack
09:57ro_sttgoossens: catnip is an in browser editor that's actually very usable
09:58ferdro_st: that's how I'm doing it ... Since I'm new to angular and angular-seed suggests the other approach, I was wondering if there's any disadvantage to it
09:58ferdI'll go my way for now :-)
10:00ferd(sorry all, wrong channel)
10:00tgoossens:D
10:01fredyr:)
10:16Anderkentin Aleph, after running aleph.http/start-web-server, how can I find out whether the server is ready to take connections?
10:29aroemerstgoossens: I use ST for Clojure. Together with SublimeREPL and automatic conversion to spaces I think it works well enough.
10:29aroemersUse what Raynes said about (require 'some.ns :reload), or use the copy-to-REPL shortcut.
10:30aroemersI am learning emacs though, to see whether that really is a better experience.
10:30Foxboronaroemers: imma go with self promotion. Tried my Sublime plugins for CLojure :)?
10:30Foxboronone for snippets and one with doc search
10:30TimMcFoxboron: No, what editor are they for? ;-)
10:30FoxboronTimMc: Sublime :P
10:31bprAnderkent: i think it's ready when it returns. Though I'm not fully familiar with the underlying netty calls in aleph.netty.server/start-server
10:31aroemersFoxboron: No, I haven't
10:32Foxboronaroemers: Enhanced Clojure and ClojureDocSearch :) I think you will like them ^^
10:33aroemersI will check them out some day
10:34Foxboronaroemers: Should do it a little better too get done stuff inside ST :P
10:35silasdavismpenet: thanks, severely delayed response but... would you rewrite (-> context :request :route-params :id ObjectId. message/get-one) (-> (get-in context [:request :route-params :id]) ObjectId. message/get-one)
10:35silasdaviswhere context is a map, is there a better way?
10:36TimMcTHe latter seems harder to read, for me.
10:36silasdavisTimMc: but with the former I think I loose some exception proofing and default values
10:37TimMcIf you really wanted get-in, I'd move context out in front (first arg to ->).
10:37TimMcHmm, true.
10:37TimMcWriting (-> context :request :route-params (:id "default") ...) would look weird.
10:39silasdavisI think I'm actually going to catch the possibility of no id at an early stage in this case
10:39silasdavisdo you use the maybe monad in clojure?
10:41Sgeo-?> acts a little like the maybe monad
10:43ferdSgeo: FYI, I think contribs' -?> is now some-> in Clojure 1.5, right?
10:43Sgeoferd, haven't really looked at 1.5
10:43SgeoNice to know though, thanks
10:49TimMcI think org.clojure/core.incubator has -?> at this point.
10:52silasdavisshould I be using 1.5 for a new project?
10:52TimMcIt isn't out yet.
10:52silasdavisTimMc: I wont' be fobbed off by trivia
10:53TimMcThen try 1.6. :-P
10:53TimMc(:from __future__ [:import "1.6.0"])
10:55silasdavisI had heard that you could do stuff like that with macros yeah
10:58TimMcYou just wrap (dwim ...) around your code.
10:59TimMc(defmacro dwim [& args] (->> args pr-str (amazon/mechanical-turk {:service :code-rewrite}) read-string))
10:59TimMcIt's really important to AOT your code if you do that, because the macro can take *hours* to return.
11:01bprlol
11:02hyPiRionTimMc:
11:02hyPiRion,(:from '__future__ [:import "1.6.0"])
11:02clojurebot[:import "1.6.0"]
11:02hyPiRion:D
11:02TimMchahaha
11:05TimMchyPiRion: Try this: (ns foo.bar (:println Hello!))
11:06silasdaviscould someone walk me through what the jvm is attempting when: Exception in thread "main" java.lang.NoClassDefFoundError: crosstalk/handler$loading__4784__auto__
11:06silasdavishappens
11:06silasdavisI've only made code changes, but this looks like a file is missing
11:07TimMcANy chance this is an AOT issue?
11:07TimMc- OR - I told you 1.5 wasn't ready yet!
11:08silasdavisI don't think I'm doing any AOT, also this when loading another file into the repl: NoClassDefFoundError Could not initialize class crosstalk.api__init java.lang.Class.forName0 (Class.java:-2)
11:08silasdavisyeah bumped to 2.0 to avoid 1.5's issues
11:10silasdavisI'm requiring one of my own modules [crosstalk.api :as api]
11:11silasdavisit's in the right place
11:11silasdavisis api___init a clojure generate class? what does it do?
11:12TimMcThat's a class that's generated for the namespace itself.
11:12bprdid you restart your jvm after adding the crosstalk dependency?
11:13silasdavisno, but I have used the depency since
11:13silasdaviswhat's the best way to restart the jvm?
11:13bprby "adding the dependency" i mean adding it to your project.clj
11:13silasdavisit's in the same project
11:14bproh. then nevermind me haha
11:14TimMcsilasdavis: Not so much restart as stop the program/repl and start again.
11:14silasdavisoh yeah did that
11:14silasdaviswhen I try and load the referencing module into repl, first I get:
11:14silasdavisClassNotFoundException crosstalk.api$loading__4784__auto__ java.net.URLClassLoader$1.run (URLClassLoader.java:366)
11:14silasdavisthen if I load again I get:
11:14TimMcAlthough I guess if you were using Nailgun that would be another thing to check. :-)
11:14silasdavisNoClassDefFoundError Could not initialize class crosstalk.api__init java.lang.Class.forName0 (Class.java:-2)
11:15TimMcTry lein clean
11:15silasdavisI'm using la clojure, but I have terminated that
11:16silasdavisyeah I had tried clean
11:16silasdavisI must be doing something stupid here
11:19silasdavisI can load the crosstalk.api module into repl fine
11:19silasdavisI can load the referencing module fine if I remove the require
11:21silasdaviscommenting out part of the api module allows the referencing module to be loaded
11:21TimMcIs it a part with a fn called loading?
11:22silasdavisno, it's a liberator (defresource ...)
11:22TimMcLiberator?
11:22silasdavisit's a rest interface frameworky thing http://clojure-liberator.github.com/
11:24silasdavisand i've uncommented the same code it works
11:26silasdavisnow everything works, but I essentially fixed it using magic
11:27silasdavisis there a place I could read up on clojure's compile process?
11:27silasdavishttp://clojure.org/compilation
11:27TimMchttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java
11:29silasdavisthanks, I think intellij must have been doing some AOT stuff
11:34TimMcOh, that might be.
11:37alandipertwhat's the current hotness for html/js clj syntax highlighting?
11:39silasdavisbetter way of doing (nil? (get-in map [:one :two :three])
11:39silasdavis?
11:43aroemerssilasdavis: depends on the context, in many cases you won't need the nil? part.
11:43silasdavisoh yes nil is falsy
11:44aroemersexactly
11:46silasdaviseven better because I was about to use (not (nil? thing)) and I can just use thing
11:46silasdavishow convenient
11:48dgrnbrgIs there a ring response function that lets me fetch another URL, and return that instead?
11:49weavejesterdgrnbrg: If you're using Compojure, you just need to return a URL object.
11:49dgrnbrgweavejester: I don't want to redirect, though--I need to do the request from the server (to deal with security/routing)
11:49weavejesterOtherwise, (response (io/input-stream "http:// …"))
11:50dgrnbrga java.net.URL?
11:50weavejesterdgrnbrg: I wasn't saying to redirect
11:50dgrnbrgok, I just wanted to make sure :)
11:50weavejesterIf you return a java.net.URL, it grabs its contents
11:50weavejesterWhich is how (io/resource …) works
11:50weavejesterwith Compojure
11:52dgrnbrgThanks!
11:53TimMcsilasdavis: Looks like this fellow was using the dwim macro: http://www.theregister.co.uk/2013/01/16/developer_oursources_job_china/
11:53devnyogthos: luminus is cool
11:53yogthosdevn: thanks :)
11:54devn<3
12:10gfredericksis there a tool for getting a namespace DAG from the ns forms?
12:11gfredericksman that's nearly exactly what tools.namespace claims to be
12:14Rich_MorinI'm using a Cloure 1.4 REPL and having no luck in bringing in the expt function - help?
12:25silasdavisTimMc: ha
12:25silasdaviswhat's the clojurist way to TryParse a guid?
12:27nDuffTryParse?
12:27nDuff...is this clojure-clr?
12:29silasdavisno I've got a bit of a clr problem
12:29silasdavisI found isValid in org.bson.types.ObjectId
12:30nDuff...if this were on the JVM, I'd probably do something like: (try (java.util.UUID/fromString "foo") (catch IllegalArgumentException e nil))
12:30silasdavisyou can't pass by reference on jvm right
12:31nDuff...but some of that kind of habit comes from languages where references are cheap.
12:31nDuff...huh?
12:31silasdavisyou can't get at an object reference
12:31nDuffAnything that isn't a native type _is_ a reference.
12:31nDuffs/references are cheap/exceptions are cheap/
12:31silasdavisI think I'm talking about the pointer to the reference
12:32silasdavisin c# you can do ref(object)
12:32silasdavisand method(out object)
12:33nDuffSuch things exist, but their usage is extremely unidiomatic.
12:33nDuff...and I don't know why you'd want it here.
12:33silasdavis you're right I don't want it
12:34silasdavisdo you know what clojure does with (. ObjectId isValid nil)
12:34nDuffthat depends on what those things are, of course.
12:34silasdavisi.e. what the nil gets converted to before being passed as an argument for the java isValid method
12:34silasdavisso isValid takes a string
12:35nDuffOh. If there are multiple calling conventions, and you want to specify one in preference to another, you need to be explicit about it.
12:35nDuffs/calling/valid candidate calling/
12:35nDuff...type hinting's your friend in that case.
12:35silasdavismultiple calling conventions? could you give an example
12:36gfredericksdoes nrepl have any kind of history built in?
12:40AtKaaZhow can I evaluate all passed forms to a macro, within the macro ?
12:41AtKaaZexample: (defn somef_ [a] (assumedTrue (= 3 a))) and inside the macro: Unable to resolve symbol: a in this context
12:42dnolenAtKaaZ: sounds like you just need to fix your macro - no need to evaluate anything.
12:42AtKaaZok I'll recheck, thanks
12:42gfredericksAtKaaZ: a doesn't have a value until runtime, so it's not clear what evaling that at compile-time would mean
12:43AtKaaZwas that maybe because I was also calling: (somef_ 3) in the code?
12:44AtKaaZinstead of at the repl
12:44gfredericksAtKaaZ: macros don't normally need to eval things; what is the macro supposed to do?
12:44dnolenAtKaaZ: no it just sounds like your macro is wrong. Paste it somewhere.
12:44AtKaaZgfredericks: i'm trying to check if all passed forms are all true, if any is false then throw
12:44AtKaaZjust a sec
12:44Bronsawhy not using assert?
12:44Bronsaor preconditions
12:45AtKaaZBronsa, I'm using it in a :pre
12:45gfredericksAtKaaZ: but don't you want this to be checked at runtime instead of compile-time?
12:45frozenlockCould someone tell me how to convert into cljs the last bit from this? https://www.refheap.com/paste/8692
12:45AtKaaZgfredericks, yes runtime
12:46AtKaaZhere it is, dnolen: https://gist.github.com/4549026
12:46dnolenAtKaaZ: ouch :) needs formatting
12:47AtKaaZdnolen, it's my way of formatting, how should I reformat it? no dangling parens ?
12:47AtKaaZI'll reformat, don't look yet =)
12:48frozenlockThe `?' in the middle of the command confuses me :\
12:49gfredericksfrozenlock: you're not familiar with the ternary operator?
12:49gfredericksshould just be an if
12:49gfredericksfoo ? bar : baz ==> (if foo bar baz)
12:50gfredericksAtKaaZ: also, if you're doing this in a precondition, why would you need a macro at all? Isn't checking for truthiness exactly what preconditions already do?
12:50AtKaaZgfredericks, honestly I don't remember, should I recheck as to why?
12:50AtKaaZdnolen: i reformated some: https://gist.github.com/4549026
12:50frozenlockgfredericks: I'm not, like java, I'm learning js through clj :)
12:51gfredericksAtKaaZ: well if you don't know why the code you're writing is necessary that sounds like somewhat of a limitation
12:51AtKaaZgfredericks, I mean, I started it about 2 months ago, then took a break
12:51BronsaAtKaaZ: why not just (defn somef_ [a] {:pre [(= 3 a)]} body)
12:53AtKaaZBronsa, that does seem to be working as I expect, let me remember why I didn't like this variant
12:54AtKaaZBronsa can I use that concept outside of :pre ? somehow
12:54gfredericksAtKaaZ: so you want assert but for multiple things?
12:54AtKaaZgfredericks, assert, I'll have to recheck that
12:55gfredericks&(assert false)
12:55lazybotjava.lang.AssertionError: Assert failed: false
12:55gfredericks&(assert true)
12:55lazybot⇒ nil
12:55AtKaaZdoes it say the line?
12:55dnolenAtKaaZ: you need to seriously rethink that macro :)
12:55gfredericksnot sure
12:55AtKaaZdnolen thanks, I'll do that for sure
12:55dnolenAtKaaZ: I would suggest some improvements but I have to run.
12:56dnolenAtKaaZ: you don't need eval at, step back and first consider what the generated code should look like.
12:56AtKaaZok
12:56dnolenthen write the macro that generates that code.
12:57AtKaaZgfredericks, it does seem to show the line, but I think you're right, can only take like 1 param
12:58gfredericksAtKaaZ: (defmacro asserts [& forms] (cons 'do (for [f forms] (list 'assert f))))
12:58gfrederickss/'assert/`assert/
13:02AtKaaZI'm going to be taking a while to retract my jaw and then trying to understand it, thank you
13:10AtKaaZnice one, I think I fully understand it now, thanks again, gfredericks
13:12jweissis there no predicate that returns true for any ordered coll type?
13:13jweissneither coll? nor seq? do that
13:13gfredericksAtKaaZ: no probs
13:13gfredericksjweiss: ##(doc sequential?)
13:13lazybot⇒ "([coll]); Returns true if coll implements Sequential"
13:13jweissah
13:13seangroveRaynes: No erlang support in refheap?
13:19silasdavisif I want a anonymous method to just return a map like #({:a "map})
13:19silasdavishow can I do that without evaluating the map
13:21seangrove,(constantly {:a "map"})
13:21clojurebot#<core$constantly$fn__2351 clojure.core$constantly$fn__2351@74a32a82>
13:21seangrove,((constantly {:a "map"}))
13:21clojurebot{:a "map"}
13:21seangroveOr do you mean lazily evaluating the map?
13:23seangrovesilasdavis: That work for you?
13:28silasdavisseangrove: sort of, then have to choose between (fn [] {}) and #(constantly {})
13:29silasdavisI'm surprised there isn't a more elegant way to do it
13:29seangroveWhy not just (constantly {}) ?
13:29seangroveIn fact, #(constantly {}) wouldn't work
13:29seangrove,(#(constantly {}))
13:29clojurebot#<core$constantly$fn__2351 clojure.core$constantly$fn__2351@7ee17e46>
13:29seangrove,((constantly {}))
13:29clojurebot{}
13:29S11001001do
13:30S11001001,#(do {})
13:30clojurebot#<sandbox$eval133$fn__134 sandbox$eval133$fn__134@7157f95d>
13:30S11001001,(#(do {1 2}))
13:30clojurebot{1 2}
13:30S11001001everyone forgets you can give one arg to do
13:30seangroveHrm, I'd say constantly is probably clearer, but I don't have strong feelings about it
13:31silasdavisseangrove: oh I actually want to use an argument
13:31seangroveAh, ok, I see
13:31metellus,((constantly {}) 1)
13:31seangroveDidn't realize that, sorry
13:31clojurebot{}
13:32silasdavis(fn [c] {:c c})
13:32silasdavisis what I want to write
13:32S11001001#(do {:c %})
13:32silasdavisnothing particularly wrong with that, but seeing as I am using #() for other similar functions it would be nice to keep consistant
13:33AtKaaZ,(ns-resolve *ns* 'source)
13:33clojurebot#'clojure.repl/source
13:33silasdavisS11001001: yeah that works, feels ever so slightly like a hack though
13:33silasdavisI'll use that
13:33AtKaaZweird, I have to do (use 'clojure.repl) sometimes in eclipse/ccw 's repl
13:33S11001001silasdavis: why? it would be very bad if #({...}) did it, and acquiring a bunch of opens after # is syntactically wasteful.
13:35silasdavisI agree on the first point
13:35silasdavisthe inner brackets to signify execution is more logical
13:35S11001001well you can't have #{, it's already taken.
13:35silasdavisbut I agree it's wasteful
13:36silasdavisgiven that # is shorthand...
13:36S11001001...for a two-character-prefix readtable lookup.
13:44mattmoss:c
13:44mattmoss,(fn? :c)
13:45clojurebotfalse
13:45silasdaviscan I do a multiple if-let like (if-let [a 1 b nil c 2] ... <something appropriate>)?
13:45klangA question: in Emacs, it's possible to press M-. on a var, and get the definition of that var. Is it possible to include something in project.clj that makes it possible to jump to definition of the special forms? (i.e. all the way down to the java code)
13:45mattmoss&(ifn? :c)
13:45lazybot⇒ true
13:45silasdaviswhere thinking about it somehting appropriate wouldbe ... <value if a truthy> <value if a and b truthy> <value if a, b, and c truthy> ...)
13:50mattmoss&(let [[a b c :as x] [1 nil 2]] (if (apply and x) [a b c] nil))
13:50lazybotjava.lang.RuntimeException: Can't take value of a macro: #'clojure.core/and
13:50mattmossdoh
13:53mattmoss&(let [[a b c :as x] [1 nil 2]] (if (every? x) [a b c] :otherwise))
13:53lazybotclojure.lang.ArityException: Wrong number of args (1) passed to: core$every-QMARK-
13:54mattmoss&(let [[a b c :as x] [1 nil 2]] (if (every? identity x) [a b c] :otherwise))
13:54lazybot⇒ :otherwise
14:06ppppaulhey. i looked on the googles to find out how to turn my string into an input stream and found ring.util.test. it uses ByteArrayInputStream. when i try to use that i get a class not found exception
14:15jkkramerppppaul: ##(java.io.ByteArrayInputStream. (.getBytes "foobar"))
14:15lazybot⇒ #<ByteArrayInputStream java.io.ByteArrayInputStream@6a5426>
14:20seangroveAny tutorials on doing ui's in a functional way? I'm shoving so much state everywhere I'm going to cry
14:21Anderkentseangrove: monads!
14:21technomancythe first step is to just get it all out of your system; the sobbing often becomes controllable after 5-10 minutes.
14:22Anderkentbut I was just leaving so I can't expand on that. They're just monoids in the category of endofunctors.
14:24seangroveAnyone care to speculate on what the market would be like for a web-version of Interface Builder (a la 280 North's Atlas) that could plugin various gui-toolkit libraries?
14:24seangroveI'm dying for one, and I love the idea of having as much of a declarative approach to ui as possible
14:25technomancyseangrove: next time I have to do a non-trivial web UI I'm going to take a long hard took at http://elm-lang.org/
14:28seangrovetechnomancy: Looks interesting!
14:28seangroveTrying to keep it in cljs for now
14:34frozenlocktechnomancy: but the important question is: does it have a repl?
14:35technomancyfrozenlock: I think so; the compiler is implemented in Haskell
14:38frozenlockThen I'm happy. I had to go back to language without any repl last week... hopefully never again.
14:39systemfaultI'm at the opposite for now.. I never used a language with a REPL before so I don't really understand the advantages yet..
14:40dnolensystemfault: it's painful to go back ...
14:40technomancyfrozenlock: never again
14:40technomancyif I'm lucky
14:40frozenlocksystemfault: you might want to stop while you can go back.
14:40systemfaultWhen I was writing C++ for example.. I had a lol.cpp file with a main... to test snippets of code
14:40dnolenit's why I can't take languages like Go seriously even tho smart folks seem to like it.
14:40frozenlock'cause you won't be able soon :P
14:40systemfault:D
14:41cemerickdnolen: BTW, core.match is brilliant. Many thanks. :-)
14:41dnolencemerick: np, hopefully can figure out this AOT issue that's been plaguing it for months - I think we're close on it tho.
14:41cemericksorry, which? Does it not AOT?
14:41dnolencemerick: it possible to create patterns that won't AOT yes
14:42dnolencemerick: there's a big warning on the repo about that
14:42cemerickhttps://twitter.com/cemerick/status/290880701849554944
14:42cemerickI fix that problem by never AOT'ing. :-P
14:42dnolencemerick: heh, yeah seems like that's not an option for many people
14:42technomancynever AOT in libraries; I'm on board with that
14:42cemerickso I hear
14:43cemerickdnolen: anyway, just wanted to let you know that you saved my ass again. :-)
14:43technomancyI saw some traffic on that non-transitive AOT issue; I wonder if that will ever go anywhere
14:43dnolencemerick: so I'd like to see that fixed. I need to go back clean up the code. What the project really needs is some way to f**king visualize the pattern compilation process - otherwise it's really tricky to debug issues.
14:44seangrovednolen: So you split your time between source maps and core.logic - anything else?
14:44mmitchellanyone using technomancy's starter-kit? I'm having problems with that, and nrepl
14:44cemericktechnomancy: CLJ-322?
14:45technomancyyeah
14:45dnolenseangrove: core.match, though I haven't committed much to that the past year and a half
14:45seangrovednolen: Epic stuff :)
14:45technomancymmitchell: what's up?
14:45cemerickThere's a couple of patches on the ticket that work, but, yeah, it's stuck in the mud.
14:46frozenlockfrom js to cljs... "this.selection = selection;" Do I need to do something like (this-as my-this (set ...)) or is there a more clojurian(?) way to do this?
14:46cemerickI don't think anyone has the stomach to push serious compiler patches anymore.
14:46cemerickJVM Clojure compiler, that is
14:47hiredmanthat's not true, there just doesn't seem to be any interest
14:47hiredman(from rich and company)
14:48cemerickWell, however much that's the case, it's a reinforcing cycle then.
14:48hiredmanI dunno, maybe that is what you meant
14:48cemerickI try to stay out of the speculation business. :-)
14:48technomancyit's going to be a long time before I can stop caring about transitive AOT, so I'm less inclined to don a clothespin on my nose and dive back into Jira personally
14:49cemerickIt needs a champion for whom the feature / bugfix is critical.
14:50cemerickmaybe the immutant guys, given jboss'/red hat's deployment model? :-P
14:51technomancymaybe someone could hire relevance for a consulting gig where it's an issue
14:52cemerickIt's only going to be more and more of a fringe problem.
14:52cemerickOh, datomic is AOT'd. Maybe they'll eventually start needing to use core.match somewhere...
14:59tcrawleycemerick: we don't AOT with immutant, and don't recommend it. but we're also blacksheep inside RHT
15:02cemericktcrawley: Sure. Mostly, I'm just trying to bait you. ;-)
15:02tcrawleyheh
15:02technomancytcrawley: I guess you don't really care about startup time since you just have rolling updates?
15:04tcrawleytechnomancy: we have two issues - we can't AOT Immutant clj code, since we support multiple clojure versions, and the jvm is already up by the time we read any of the application's code.
15:04tcrawleyand that read time is dwarfed by the time to start the required services for the app
15:04technomancytcrawley: sure
15:04tcrawleyand loading clojure.jar itself in the app runtime
15:06pjstadigtransitive AOT was at the top of andy's list of most voted for issues
15:19warzim new to clojure, and im wondering which syntax should i use for maps? i've seen the following: ({ "a" 1 "b" 2} "a") and (:a {:a 1 :b 2})
15:20warzis one more prefered or common to stick with?
15:20ziltiwarz: Keywords as keys are more performant
15:20frozenlockIs your question about string VS keywords, or rather the ordering?
15:21tokyo_Is anyone else getting a 403 error on Leiningen install? looks like the amazonaws link is bad...
15:21ziltiAnd it's definitely preferred. The order as well
15:21warzidk, i guess keywords vs keys. i didnt think about the difference there.
15:21warzive only been learning clojure for 2 days, so that didn't occur to me, yet.
15:21warzi liked it because it was less verbose, heh.
15:21technomancytokyo_: works for me; what's the URL you're having trouble with?
15:22tokyo_https://leiningen.s3.amazonaws.com/downloads/leiningen-2.0.0-standalone.jar
15:22ziltiwarz: keys are the "left thing" of a map entry, not a type. Almost anything can be used as key.
15:22technomancytokyo_: where did you get that URL?
15:22technomancyit's incorrect
15:22tokyo_the lein bash file
15:22technomancywhere did you get the bash file? =)
15:22warzsorry, i meant strings vs keywords. typo'd there.
15:22tokyo_github lol
15:22tokyo_i just cloned the github entry, went from there.
15:22tokyo_do you know what the correct url is? i could just edit it.
15:22technomancytokyo_: I've never pushed that URL to GitHub, can you be more specific?
15:23tokyo_sure, gimme a minute to back track here and figure it out
15:23ziltiwarz: No need to excuse ;) So then: Welcome and have fun with Clojure!
15:24tokyo_technomancy: https://github.com/technomancy/leiningen/blob/master/bin/lein#L192
15:25technomancytokyo_: LEIN_VERSION there is set to 2.0.0-SNAPSHOT; in the link you posted above it's just 2.0.0
15:25tokyo_interesting...
15:27tokyo_technomancy: so would this be the proper url? https://leiningen.s3.amazonaws.com/downloads/leiningen-2.0.0-SNAPSHOT-snapshot.jar
15:27technomancytokyo_: for master, yes, but self-install is meant to be used for releases rather than snapshots.
15:28tokyo_ah ok
15:28technomancytokyo_: have you tried the install instructions in the readme?
15:28tokyo_i have
15:28tokyo_although i'm fairly new to this, let me review them one more time
15:30technomancyI think you're making it more complicated than it needs to be =)
15:30tokyo_technomancy: well i must have done something wrong, i simply redid the install as written and it works
15:31tokyo_i have the tendancy to do that :)
15:31tokyo_so i'm not surprised
15:31tokyo_thx for the advice, all installed now
15:31technomancynp
15:35jweissthere must be a better way to validate data than :pre (which tell you the condition failed, but not what the data was, useless), or the existing validation libraries (all of which are geared toward webapps, and only validate values in a map, nothing else).
15:36jweissi looked at clojure.test/is, but that just prints the failure to stdout, which also is useless and while the behavior can be changed, you cannot change it to throw an exception, because the lib will simply catch it.
15:36jweiss*sorry i mean useless for my purposes, i know it's useful for unit tests
15:37ziltiArgh. Does anyone know how to compose a korma where clause?
15:37ziltiSeems to be totally impossible
15:39joegallozilti: how about you paste the code you have and tell us what you thought it should do
15:40nDuffzilti: the use of macros does make it difficult.
15:41frozenlockI'm getting a weird error with a method in JS... wasn't there a catch22 about methods using `this' internally, or something like that? (I remember seeing something about this in a cljs video, but I don't remember where...)
15:42ziltijoegallo: https://www.refheap.com/paste/8700 I did some random stuff which didn't have any effect, so think away all those "list".
15:42mmitchelltechnomancy: oh hey... re starter-kit. Whenever I connect to an nrepl server, a blank buffer pops up. Also, not sure if you use midje-mode, but when I attempt running my "facts", I get a "no connection" message in the mini-buffer. Any suggestions?
16:01ziltijoegallo: "IndexOutOfBounds" is what I get
16:02joegalloah, i don't use korma, i was just trying to help you bait somebody else into helping you :)
16:03silasdavisin (constantly (f x)) does (f x) get evaluated lazily
16:03silasdavisi.e. when the constantly-emitted function is first called
16:04joegallosilasdavis: no https://github.com/clojure/clojure/blob/d0c380d9809fd242bec688c7134e900f0bbedcac/src/clj/clojure/core.clj#L1345
16:04progono. Arguments get evaluated at function call.
16:04ziltijoegallo: My question-ask-credits probably are used up
16:04`fogussilasdavis: no. constantly is just a function
16:04technomancymmitchell: the way midje runs things is pretty sketchy
16:04technomancyI am not surprised that it causes problems
16:06ziltiMacros suck.
16:06nDuffzilti: Misuse of them, anyhow, and korma is a poster child for that.
16:07systemfaultI thought that the thing that makes LISP so powerful is macros..
16:08technomancywith great power comes great responsibility
16:08ziltiFew times this phrase fits so perfectly.
16:08cmdrdatstechnomancy: no, no - with great power comes great technology
16:08cmdrdatsheh :P
16:09zilticmdrdats: Or awful technology. Unfortunately. (spoken for everything, not for Lisp)
16:10ziltieww, I wrote some truly awesome english words
16:10hyPiRionOr barely any technology, depending on what power you have.
16:10zilti*awful
16:10hyPiRionSurely being the leader of North Korea doesn't give you the power of macros.
16:11cmdrdatsxD
16:11ziltiWow. From great technology to no technology in a few lines :)
16:12cmdrdatswe must have been talking about macros
16:12silasdavis`fogus: so for (def foo (constantly (f x))) does (f x) get evaluated every time foo is called
16:13hyPiRionsilasdavis: no, only once.
16:13silasdavison the definition of foo?
16:13joegallosilasdavis: sortof, it's evaluated before the invocation of constantly.
16:14joegallosince constantly is just a function that takes the return value from (f x) as an argument.
16:14silasdaviscan I write anonymous function #() with one argument without using that argument?
16:14AimHereIf you want something repeatedly reevaluated, use repeatedly
16:14joegalloyou sure can, you write it this was (fn [_] ...)
16:14joegallos/was/way/
16:15silasdavisbut not with the # reader symbol?
16:15amalloy(inc joegallo)
16:15lazybot⇒ 1
16:15joegallosilasdavis: it can be done, but it should not be done
16:15silasdavisok I won't do it, how do you do it?
16:15joegalloi'm not telling you how, because you should go with convention on this
16:15joegallo:)
16:15AimHereYou could just read it and throw it away
16:15joegalloit involves comments...
16:15hyPiRionsilasdavis: #(do % (stuff here))
16:15amalloyjoegallo: wat
16:16amalloyi mean, you can do it with comments, but that's silly
16:16seangrov`I have a map, I would like to produce a new map with a function that will modify the values of the old map but keep the keys the same
16:16seangrov`What is this called?
16:16hyPiRionseangrov`: map-vals in useful.map
16:16hiredmanit is called "a bad datastructure decision"
16:17seangrov`hiredman: How so?
16:17seangrov`hyPiRion: Thanks, will look for it, this is in cljs though
16:17ziltiseangrov`: (keys map) and (vals map) and then you can use zipmap
16:18hiredmansequential datastructures provide better sequential data access
16:18AimHerePerhaps he wants sequential access AND random access
16:19zilti&(let [m {:a 1 :b 2 :c 3}]
16:19zilti (zipmap (keys m) (map inc (vals m))))
16:19lazybotjava.lang.RuntimeException: EOF while reading, starting at line 1
16:19seangrov`hiredman: google closure forms gives me data in a map that's not formatted properly (each of the vals is in wrapped in a spurious array), and so I need to tranform the map before submitting it to a 3rd-party api
16:19hyPiRionAhh, people need to learn about reduce-kv
16:19ziltiwell that's how it works in my repl, but here it gives an EOF.
16:20metellusbecause you put it across two lines
16:20rasmustozilti: its the multi-line stuff
16:20ziltiah I see
16:20metellus&(let [m {:a 1 :b 2 :c 3}] (zipmap (keys m) (map inc (vals m))))
16:20lazybot⇒ {:b 3, :c 4, :a 2}
16:20hyPiRion&(reduce-kv (fn [m k v] (assoc m k (inc v))) {} {:a 1, :b 2, :c 3})
16:20lazybotjava.lang.RuntimeException: Unable to resolve symbol:   in this context
16:20hyPiRion&(reduce-kv (fn [m k v] (assoc m k (inc v))) {} {:a 1, :b 2, :c 3})
16:20lazybot⇒ {:b 3, :c 4, :a 2}
16:21amalloydid you paste in an &nbsp or something, hyPiRion?
16:22hyPiRionamalloy: No, I have a Norwegian keyboard which screws up my life
16:23hyPiRionAlt Gr+space -> nsbp
16:30seancorfieldarohner: saw a Q on the ML about lein-daemon - looks like 0.5.0 is ready in Git but not released to Clojars? is that right?
16:30arohneryes
16:30arohnerI can release 0.5 now that the lein-2.0.0-RCs are out
16:31seancorfieldah, ok... cool... i can update here at world singles and try it out! :)
16:31arohnerseancorfield: thanks for the heads up :-)
16:58arohnerseancorfield: lein-daemon 0.5.0 is released
17:03AtKaaZdoes anyone know how to make counterclockwise in eclipse not automatically put a closing paren every time i type an open paren? ie. ( becomes ()
17:04jamiei_I'm getting a very cryptic compiler error suddenly and I can't work out why, paste of the stack trace here: http://pastecode.org/index.php/view/2804520
17:05jamiei_Anyone able to decrypt? :)
17:05Bronsajamiei_: paste your namespace declaration
17:05AtKaaZsomething about this I guess: at my_app.routes$loading__4505__auto__.invoke(routes.clj:1)
17:08bbloomjamiei_: it's occurring on line 1
17:08bbloomi assume you have a bad ns form
17:08jamiei_Bronsa: http://pastecode.org/index.php/view/19014527
17:08jamiei_Namespace declarations pasted above
17:08jamiei_I'm not sure what's wrong with them
17:09amalloywell, the my_app thing will break eventually, though it's probably not your problem yet. it needs to be my-app
17:09bbloomjamiei_: gah! so much :use
17:10jamiei_amalloy: I might have replaced the real name with my_app to protect the innocent! ;)
17:10bbloomjamiei_: anyway, what i always do when my ns form is bad: cut and paste the rest of the file into a temporary buffer
17:10amalloythe problem is in the ns form of some "controller" namespace
17:10bbloomjamiei_: then do a binary search on your ns form by deleting half of it and seeing if the namespace works
17:10bbloomrecurse on that :-P
17:10amalloyit probably contains a clause looking like (:use [foo.bar :only baz]) instead of (:use [foo.bar :only [baz]])
17:11bbloomamalloy: yeah, that's what's burned me a few times. clearly a few other people have made this mistake. would be nice to have a better error message in the ns form parser
17:12amalloyoh, or actually i think it's not in an ns form at all. maybe (defn foo bar ...) rather than (defn foo [bar] ...)
17:12jamiei_bbloom: Might give that a go, I think it might be what amalloy mentioned since I'm pretty sure mine look like (:use [foo.bar :only (baz)])
17:12amalloy&(fn foo bar)
17:12lazybotjava.lang.UnsupportedOperationException: nth not supported on this type: Symbol
17:13bbloomamalloy: yeah that sucks too
17:13bbloomgood error messages are hard.
17:13amalloyyes, (defn foo bar) gives that error message
17:14amalloyjamiei_: you want to look in controller.clj for a malformed defn as above
17:14bbloomamalloy: i've made the opposite error too (def foo [x] (bar x)) ; CompilerException java.lang.RuntimeException: Too many arguments to def
17:14AtKaaZfor me that gives: IllegalArgumentException Parameter declaration bar should be a vector
17:14AtKaaZin 1.5.0 RC2
17:14bbloomAtKaaZ: ah cool
17:14jamiei_amalloy: Good idea, I'll have a look now..
17:14AtKaaZI think they improved it yey
17:15amalloyreally? i thought they were making that error message less common, not more common
17:17bbloomamalloy: what do you mean? the error message is clearer (a bit)
17:18amalloybbloom: a little, although most of that is because you already know what to look for. but in particular, at the moment (defn foo (map inc xs)) gives the totally useless message "Parameter declaration map should be a vector"
17:18amalloyand that's a much more common mistake IME
17:18jamiei_amalloy: All defn's in controller.clj seem to have the parameters specified
17:19bbloomamalloy: yeah, error messages are hard... Should be something like "Invalid defn form on line 123. Expected vector of arguments in 3rd position"
17:35brehauthaha kickstarter have a url query arg for utf8=✓
17:35wastreli just realized the j in clojure is for java
17:36frozenlockI have a JS error that crashes my repl. I've tried try/catch, but it seems to slip throught. Any advice on how to protect my repl?
17:36bbloombrehaut: that's built in to rails
17:37brehautbbloom: i can only assume its there to work around some derp hard piece of web tech
17:38bbloombrehaut: ie. what else?
17:38bbloomer i mean IE not ie
17:38technomancyI've been against full-stack frameworks this whole time, but nobody told me we'd get to use unicode in query args.
17:38amalloywell, a very-old ie. halfway modern ones don't need this babying
17:39technomancythis is making me reconsider my positions
17:39bbloomtechnomancy: surely there is ring.snowman if you need a library instead of a framework
17:39technomancybbloom: sounds hard for newbies
17:40bbloomtechnomancy: it's easy, just go to http://unicodesnowmanforyou.com/ for instructions
17:40brehautmore proof that you cant poiish a turd, but you damn sure can dip it in varnish
17:40bbloomlol his expressions just gets me every time
17:40brehautbbloom, technomancy: we just yogthos to put it into luminous and then we tell people to go there
17:40bbloomi can't look at this damn snow man for more than 5 seconds without cracking up like a stoner
17:41brehautwhy is the snowman wearing a fez
17:41bbloombrehaut: because fez are easier to kern at small font sizes than carrots
17:41bbloomor top hats
17:41bbloomapparently
17:42brehauta compelling argument
18:15augustlare there any generic AMQP libraries around that manage all the connection stuff for me? I just want to putt stuff on queues, not manage connections :)
18:17augustlI wander what the reason is for ClojureWerkz obsession with singleton connection objects :)
18:20hiredmansingleton connection objects :(
18:21augustlhiredman: in a functional language, even the Java APIs doesn't do that :)
18:22hiredmanaugustl: I've never used a clojurewerkz library, but the docs http://clojurerabbitmq.info/articles/getting_started.html don't look like a singleton connection
18:23hiredmanI guess that isn't true
18:24hiredmanno it is, then pass a channel around
18:24hiredmanto other threads, which is interesting, last I checked channels from the java amqp library were not threadsafe
18:29hiredmanI guess they are threadsafe now
18:29hiredmanhttp://www.rabbitmq.com/api-guide.html#channel-threads
18:35augustlI need to get started with REPLs for my emacs.. Which one should I use? IIRC there's an old one and a new one.
18:40nightflynrepl is probably what you want
18:41nightflyI think I'm getting mine from marmalade
18:41augustlnightfly: I'll look that up, thanks :)
18:52glidei think my sublime text 2/clojure integration is broken, i can't see clojure in the REPL menu
19:05glidethink i'll stick to ccw
19:13bbloom,(clojure.string/split "this is a string" #" ")
19:13clojurebot["this" "is" "a" "string"]
19:14bbloomodd... if i do that in lein repl i get: Exception Ambiguous match for " \")" by #<Object[] [Ljava.lang.Object;@5280da83>
19:14augustlwhat's a good way to do a while true and a break in clojure, when doing java interop? It's for a blocking queue consume call with a check for the consumed message, and a break out of the loop if a predicate passes
19:14bbloomaugustl: you can just (loop [] (recur))
19:14bbloombreak == don't call recur
19:15technomancyyeah, low-level direct-to-java code is one of the few places direct loop calls are appropriate
19:15augustlblbrown_win3: ah, interesting
19:15n_bWould never have thought of that. That's great
19:15augustlbbloom, not blbrown_win3
19:16bbloomtechnomancy: can you do me a favor and try that split line in your repl... i feel like i'm going out of my mind
19:17technomancybbloom: I get what clojurebot got?
19:17augustlhmpf, the outside of the loop also needs to get a variable obtained inside it
19:17technomancybbloom: oh, lemme try a raw repl; I did it in emacs
19:17bbloomtechnomancy: https://www.refheap.com/paste/8706
19:17bbloomwtf?
19:17augustlyay, loop returns when not recuring, awesome
19:18technomancybbloom: ugh; looks like either a reply bug or sjacket
19:18technomancybbloom: can you open an issue for that and ping trptcolin?
19:18bbloomsure
19:19bbloomtechnomancy: https://github.com/trptcolin/reply/issues/98
19:19technomancythanks
19:37augustlhmm. I'm consuming from a message queue. I would like to do something like "one thread per request" for servlets. Is it safe/sane to just chreate a new thread every time I consume off of the queue?
19:40technomancyaugustl: I would recommend executors on a thread pool
19:41augustltechnomancy: looking that up, thanks
20:00aaelonyI'm getting bitten by unrealized lazy-seqs. I have: (doall (map #(my-func %) my-seq)) and it yields a list of lazy seqs like "clojure.lang.LazySeq@e095af1f\n".
20:02bbloomaaelony: looks like you've got a seq of seqs
20:03bbloomaaelony: probably need a concat in there somewhere :-)
20:03aaelonyhmmm, concat.. will give that a try, thanks!!!
20:03bbloomtry (apply concat my-seq) and see if that makes it go away. if so, then you need to figure out where that goes
20:03aaelonyok
20:05aaelonythat helps. My seq is being treated as a seq that contains a seq of characters...
20:05aaelonythanks
20:06bbloomaaelony: ah, ok, if you have a seq of characters, you can use (apply str ...)
20:06bbloom,(apply str [\a \b \c \d])
20:06clojurebot"abcd"
20:08aaelonythanks, i have an (apply str …) in my function actually.
20:08aaelonyin any case, that narrows it down. should be solved soon. ;)
20:19aaelonyah, basically the difference between (apply str (interpose "," [1 2 3 4 5 6 7])) => "1,2,3,4,5,6,7" and (apply str (interpose "," [1 2 3 4 5 6 7]) "\n") => "clojure.lang.LazySeq@ffdbd0b3\n" is what is happenning
20:20aaelony,(doall (apply str (interpose "," [1 2 3 4 5 6 7]) "\n"))
20:20clojurebot"clojure.lang.LazySeq@ffdbd0b3\n"
20:21aaelony(str (apply str (interpose "," [1 2 3 4 5 6 7])) "\n") does what i wanted
20:21aaelonythanks
20:24Sgeo_The Seaside book calls REST an "Advanced topic"
20:25technomancySeaside is written by a guy whose blog is titled "HREF considered Harmful"
20:25technomancyso ... take it with a grain of salt =P
20:26Sgeo_Although I'm thinking more RESTful by default but not RESTful in some appropriate places where the only entries should be via previous pages
20:26technomancyif uptime isn't critical and you never have to scale beyond one box I might consider it
20:26bbloomSgeo_: more trouble than they are worth: turns a serialization problem into a resource management problem
20:28Sgeo_Hmm. Well, Racket's web server stuff has a "stateless" mode where it's not really stateless but it allows continuations to be serialized to disk somehow
20:29bbloomi don't like anything that hides an unavoidable truth: there is a slow network between me and an unreliable client
20:30bbloomthat rules out anything that blurs the lines between client and server or between multiple requests
20:30bbloomit's a neat trick
20:35Sgeo_AIDA/Web is RESTful I think
20:56muhoohmmm.. rabbitmq or aleph for an async service
20:57muhooleaning towards aleph and json over xhr or websockets
20:57brehautjson not edn?
20:58muhooone of the clients will be android
20:58muhoono clj there
20:58brehautah :/
20:58brehautnot that you have to use clj to use edn, but nevertheless
20:59Sgeo_Someone implemented a Clojure REPL for Android
21:01cantsinSgeo_: but is it production ready?
21:02amalloyit's barely even development-ready
21:02amalloy(is my understanding; i'm not an expert on it)
21:12muhooit's bloated and not appropriate for this app
21:13muhooi have a clojure hammer, but, sadly, not everything is a nail
21:13muhooaleph should work as a server tho, so yay
21:31tomojbbloom: (defn word? [var] (:factjor.core/impl (meta var))) ?
21:31bbloomtomoj: what about it?
21:31tomojoh, nevermind, it's on the fn I see?
21:32bbloomtomoj: i've got another branch where i'm fleshing out the runtime types with an explicit Word type, Primitive type, IWord protocol, etc
21:32bbloombut mostly i'm working on DomScript now and any library functions i need i'm writing there & will back port to Factjor proper when i get the chance
21:34tomoj"This one should be obvious" - is that a joke or does it mean "obvious given the previous two anaphoric conventions"?
21:35bbloomhaha the later, and yes, it's also a joke :-)
21:36bbloomtomoj: the runtime branch doesn't have applicative currying yet for clojure interop
21:36bbloommainly b/c implementing the Fn interface is a pain in the ass
21:36warzwith a map, is there some sugar for reaching into embedded maps? something instead of (:foo (:bye {:hi 1 :bye {:foo 2 :bar 3}}))
21:36tomojwhat, (word x y z) == (((word x) y) z) ?
21:36bbloomwarz: ##(doc get-in)
21:36lazybot⇒ "([m ks] [m ks not-found]); Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not present, or the not-found value if supplied."
21:37bbloomwarz: and, the very awesome, ##(doc update-in)
21:37lazybot⇒ "([m [k & ks] f & args]); 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created."
21:37warzawesome!
21:38bbloomlastly assoc-in for the most common usage of update-in
21:38tomojoh!
21:38bbloomtomoj: ?
21:38tomojI just realized from "hash-maps will be created" that that's the difference between a map lens and a vector lens
21:38tomojso you can't just have one associative lens
21:38bbloomah, heh
21:38bbloomyou can't have generic lens in general
21:39bbloomi might want an interleaving of maps and vectors and double-lists and other shit depending on my data structure
21:40tomojsure
21:41tomojand they don't implement Functor, and we can't easily extend it to them all
21:41tomojhopefully they all can be reduced, so if you want a reducer out.. :(
21:42tomojwell.. if they support #(into (empty %2) (r/map %1 %2))
21:42tomoj?
21:44tomojthat's for applying the update everywhere in the collection
21:45tomojDoubleList is an IPersistentStack which you can use in weird ways
21:47tomojbut you mean something like, a lens that applies an update inside a split of a counted double list?
21:47tomojinteresting, counted double list is also Associative Int v
21:48tomojyou can assoc at -1..
22:09tomojI wonder why ft-split-at's interface differs from split-at's?
22:13tomojseems the convention from split-with is to put the 'distinguished element' in the [_ post] ?
22:14bbloomwow. i always preferred HashMap objects to getPropery and setProperty method pairs... but you don't appreciate how much get/set pairs suck until you've mastered clojure's maps
22:20tomojget/set pairs suck in java
22:20tomojyou have to manually compose them
22:22tomoj(comp :foo :bar) is nice
22:23tomojassoc-in/update-in seem to paper over lack of composition on the setter side
22:24tomojcourse it's nowhere near as bad as java even without those
22:27bbloomtomoj: update-in doesn't really paper over it. composition on the setter side is just sequence concatenation
22:27bbloom,(vec (concat [:foo] [:bar]))
22:27clojurebot[:foo :bar]
22:27tomojhehe
22:28warzim new to clojure so im trying to comprehend how to write a function like im about to describe. in c id just have a while loop, for example.
22:28warzoops premature enter, haha. rest incoming.
22:28tomojthat's fine I suppose if you have only associatives, and want hash maps on nil
22:28tomoj:)
22:29warzim reading some follower IDs from twiter, and twitter responds with paginated results. so id just to keep building the list of IDs while it has a next page.
22:29warzwould a resursive function be what im aiming for here?
22:29gfrederickswarz: my first thought would be loop; which I guess a tail-recursive function can accomplish
22:29bbloomwarz: you want to make multiple requests to the server?
22:30warzbbloom, well multiple requests would be involved, but id like the function to encapsulate that and return 1 list
22:31warzgfredericks, hmm ok ill have to google-fu that
22:31bbloomwarz: ok well break it down into little pieces. start with a single function that gets the ids from an individual page
22:31warzthats what ive got currently, and i was trying to visualize how to move forward
22:31bbloomwarz: so you're in a tricky spot because laziness and IO generally don't go well together
22:32bbloomso you'd use something like doseq
22:33bbloombut you could use lazy-seq to make a recursive function that walks each page and returns a sequence of pages
22:33bbloomthen you could use mapcat to grab the ids from each page and concatenate them together
22:34bbloomwhenever you have a series of things, try to figure out how to get a sequence of them
22:34bbloomclojure looooves sequences
22:35tomojseems like iterate might work?
22:35warzhm
22:35bbloomtomoj: iterate doesn't have a termination condition
22:35tomojright, take-while
22:36bbloomtomoj: except that won't work with side effects b/c of chunking, no?
22:36bbloomiterate says functions must be free of side effects
22:36tomojoh, interesting
22:37bbloomlazy-seq is easier to use in a case like this (defn get-all-pages [url] (let [page [get-page url)] (cons page (lazy-seq (get-all-pages (:next-url page))))
22:37bbloomsomething like that
22:37bbloomobviously broken syntax in there
22:39warzok, this is like day 2 with clojure for me, so ill have to research all the things mentioned here :)
22:39tomojI wonder what the side-effect problem is
22:39warzi know what youre both talking about, but never used them yet
22:40tomoj&(dorun (take 3 (map println (vec (repeat 4 3)))))
22:40lazybot⇒ 3 3 3 3 nil
22:40tomoj&(dorun (take 3 (iterate #(do (println %) %) 3)))
22:40lazybot⇒ 3 3 nil
22:41tomojconcurrency?
22:41tomoj(my point is that the seq iterate returns is not chunked)
22:41bbloomtomoj: yes, but that's an implementation detailo
22:42bbloomtomoj: maybe a later version will add chunking, and then you'd say (first (iterate ...)) and you'll get 20 side effects
22:42bbloomgenerally, it's a bad idea to do side effects at all inside lazy io
22:42tomojyeah :(
22:42tomojyou mean lazy io is bad?
22:43bbloomyeah, fuck lazy io :-P i avoid it completely. instead, i like to make a lazy sequence of IO to be performed and then execute that in a little pump/engine via doseq
22:43tomojbut what else would you do here? a reducer and implement r/take-while?
22:44bbloomquite honestly, i think loop/recur is perfectly reasonable here
22:44bbloomif you have potentially 375093573535 pages, then maybe lazy io makes sense
22:44bbloombut it makes me uncomfortable :-P
22:45bbloomit really depends on what you're doing too. if you want to make a spider, for instance, you might be better of with an IO queue
22:45tomojso what (fn get-all-pages [url] (loop [url url] ... (recur next-url) ...)) ?
22:46bbloomthat loop would need an accumulator for the pages
22:46tomojoh right, naturally :)
22:46bbloomand i might just use reduce since it's not lazy in practice
22:46tomojbut now you have to go change that function to insert e.g. exponential backoff or just rate limiting?
22:46bbloomor (into []) or something
22:47bbloomheh yeaaah it can get reeeaaaallly hairy if you want to be robust
22:48bbloomhigh performance networking is complicated for plenty of other reasons too
22:48bbloomwhat about pipeling?
22:48bbloomfor example
22:48tomojI guess (fn get-all-pages! [url get-page] ...) then you can just rate-limit or retry in what you pass in
22:49bbloomthis is why i generally dislike most friendly REST wrapper APIs
22:50bbloomparticularly in OOP style, where you have user.friends.first.photos or something does some crazy remote call magic voodoo
22:50tomojyikes, I forgot about ActiveResource (I think they had that?)
22:50bbloom:-/ yeah
22:51tomojI remember thinking something vaguely similar to "awesome!"
22:51bbloomi much prefer a narrow and flexible network API like the underlying SQL driver would give you
22:51bbloomtake a look at datomic for example, it has basically one method: transact! or whatever it's called
22:52bbloomand it handles the connection pool internally
22:52bbloomi guess datomic is doing something lazy-io-ish on read
22:53bbloomlazy reading is not super bad. it's lazy mutations that are reeaaaally bad
22:53bbloomlazy reading works in datomic b/c of immutability
22:58warzhaha man, i thought this would be simple.
23:02SgeoCould use an atom?
23:02SgeoA bit of imperative programming
23:02Sgeo?
23:06bbloomwarz: it is pretty simple, tomoj and i are just discussing philosophy :-)
23:06bbloomwarz: write it the way you would in a more traditional language and get the job done. you'll benefit more from going through the motions than from getting it perfect :-) you can always go back and improve it later
23:08warzalright ill see what i come up with
23:10muhoobbloom: have you used shorleave, or is that more heavyweight than you want?
23:11bbloomdon't use it. havent studied it deeply
23:15gfrederickswhat's the reasoning behind keywords not taking metadata?
23:16bbloomgfredericks: so that identical? works and is fast
23:16gfredericksthat's a decent reason
23:16tomojif that weren't true, would there be a reason to have keywords save for trimming a \"?
23:17tomoj(and that IFn isn't a protocol so String doesn't participate..)
23:17gfredericksit seems like a nice semantic distinction from strings; but maybe that's only cause we use them all the time and it's not really worth it
23:24bbloomtomoj: there are other differences
23:24bbloomkeywords are interned
23:24bbloomwhich is also necessary to make identical? work
23:25bbloomkeywords are INamed, so name and namespace work
23:26bbloomit's also useful to have the keyword? predicate for differentiating sentinel values from user supplied strings
23:26bbloommost languages only have strings
23:26bbloomsome languages add symbols
23:26bbloomand keywords are just symbols that always resolve to themselves
23:26bbloomthey are a special (and very common) case of symbol
23:27tomojah, namespace, yeah
23:28tomojwow http://comonad.com/reader/2013/algebras-of-applicatives/
23:30systemfaultI'm really beginning to find clojure sexy
23:31titanixAnyone who does not, does not know the definition of sexy programming! :P
23:32SgeoI don't find Clojure stacktraces to be sexy.
23:32SgeoNor the exception system
23:32SgeoNor the lack of TCO, and lack of first-class continuations.
23:34bbloomSgeo: some of us find solving problems and building things to be sexy
23:34RaynesI don't think errors are supposed to be sexy.
23:34RaynesAnd I don't remember a situation where I've wanted TCO. Recur is fine for me.
23:34titanixLake of proper TCO is related to JVM, said hickey in a presentation.
23:34bbloomRaynes: i used a trampoline once... and then i realized that i was smoking crack
23:34RaynesLack of TCO effectively does not matter, since we have recur.
23:35Raynesbbloom: Was it good crack?
23:35bbloomRaynes: is there any other kind?
23:35Rayneslol
23:44mattmossI'm blanking... TCO?
23:45TimMctail call optimization
23:45mattmossah, ok
23:45mthvedtTCO always felt too much like magic to me
23:46mthvedtif i'm relying on the virtual machine not to blow the stack, i like making it explicit
23:54warzwell damn, nevermind about that twitter api tool. their api requires oauth for everything, now.
23:54warzmust think of something else simple to write, now.
23:56frozenlockGrrrr... google compiler won't accept my js library. Need to use it as an external file, add it manually to the html head... feels messy.