#clojure log - Jan 16 2013

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

0:01 DaoWen: can 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?

0:04 Raynes: If you're using RC2 (probably back to the latest previews...) you can do `lein test :only your.namespace/your-test

0:04 `

0:05 xeqi: !

0:05 Raynes: I did that.

0:05 Feel free to applaud.

0:06 DaoWen: Raynes: I don't think I'm using RC2, but thanks anyway

0:06 Raynes: technomancy: I think it's time to add 'alias leon=lein` to your suggested lein installation method.

0:09 tomoj: if 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?

0:10 wondering whether a closed keyword space will make keywordizing not so expensive

0:11 TimMc: Raynes: Noice.

0:15 tomoj: (def foo "foo" 3)

0:15 too many arguments

0:16 why not allow that?

0:16 mrowe: what would it mean?

0:17 tomoj: (def ^{:doc "foo"} foo 3)

0:18 paredit-reindent-defun really doesn't like def metadata

0:18 mrowe: hm

0:24 tomoj: I guess someone once suggested (def "foo" foo 3) and (defn "foo" foo [] 3)

0:28 dakrone: tomoj: hmm, would want something like that to be configurable, in the case of large or un-human-readable bodies

0:29 tomoj: well, it's just gonna be a byte array, right?

0:38 aperiodic: weird... in advanced mode, the closure compiler is munging a DOM method name

0:41 i suppose that's just another externs file

0:59 bbloom: tpope: ping

0:59 tpope: pong

1:00 bbloom: so i'm working on a namespace that uses :refer-clojure with an :exclude

1:00 and i think it breaks foreplay

1:00 tpope: pretty sure I've done that before

1:00 what's going wrong

1:00 bbloom: putting together a minimal repo for you

1:02 technomancy: Raynes: alias leon="echo Turn off autocorrect you buffoon."

1:03 bbloom: tpope:

1:03 er forgot to paste

1:03 tpope: https://www.refheap.com/paste/8679

1:03 that prints "OMG WTF BBQ"

1:03 tpope: oh, excluding eval

1:03 you're an asshole

1:03 bbloom: haha sorry

1:03 i'm writing an interpreter, it has an eval function :-P

1:03 sadly, that means you need a fully qualified reference to all the functions from core in your code :-/

1:04 tpope: jesus

1:04 even do?

1:04 bbloom: you can't qualify do

1:04 do is a primitive

1:04 tpope: oh right

1:04 it felt wrong

1:04 bbloom: but 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

1:05 ,`[do loop let if]

1:05 clojurebot: [do clojure.core/loop clojure.core/let if]

1:05 bbloom: ,`[do do* loop let if if* foo]

1:05 clojurebot: [do sandbox/do* clojure.core/loop clojure.core/let if ...]

1:05 bbloom: ,`[if if* foo]

1:05 clojurebot: [if sandbox/if* sandbox/foo]

1:05 bbloom: ,`[let let*]

1:05 clojurebot: [clojure.core/let let*]

1:05 bbloom: it's kinda inconsistent/annoying

1:06 i really want to define a symbol named 'if too :-P

1:06 tpope: throw is fine right?

1:06 bbloom: ,`[throw]

1:06 clojurebot: [throw]

1:06 bbloom: yes

1:06 tpope: ,`[try catch]

1:06 clojurebot: tpope: I don't understand.

1:06 bbloom: weird.

1:06 tpope: oh fuck you both

1:06 bbloom: ,`try

1:06 clojurebot: try

1:06 tpope: bot

1:07 did not mean both

1:07 ,`catch

1:07 clojurebot: tpope: Pardon?

1:07 tpope: ,`EAT SHIT AND DIE

1:07 clojurebot: sandbox/EAT

1:07 bbloom: lol.

1:07 catch isn't a primitive, it's just a regular symbol that 'try looks for

1:07 same with finally

1:10 i understand if this is an absurdly annoying bug report :-) my apologies

1:10 Raynes: What's annoying is that 'finally' and 'catch' are so special.

1:11 I hate it just about as much as I hate thrown? and thrown-with-msg? in clojure.test.

1:11 That's some real satanic shit.

1:11 bbloom: Raynes: agree, try is odd

1:12 tomoj: bbloom: do you want to :require :refer that if ?

1:12 I have done (defn if []) before with not much trouble

1:12 tpope: bbloom: fixed the critical path

1:12 tomoj: and (alias 'foo 'this.ns) at the top if you need to fully qualify it in macros

1:13 tpope: still plenty of unqualified symbols elsewhere

1:13 bbloom: tomoj: 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

1:13 tpope: that seems like a reasonable trade off...

1:13 tpope: at least until someone complains

1:13 tomoj: oh, crazy

1:14 yeah, problematic..

1:14 bbloom: i 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

1:14 tpope: certainly possible

1:14 bbloom: tpope: thanks for the quick fix!

1:17 tomoj: nothing annoys me as much as the qualified division symbol bug :-/

1:17 ,`damn.you//

1:17 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Invalid token: damn.you//>

1:18 tomoj: yeah, luckily in all my 'compete with core' ns's, / has not shown up :)

1:18 though.. I could easily imagine wanting to define math operators lifted to applicative functors.. :(

1:24 I also kind of wish you could make @ mean something else

1:25 bbloom: ,(with-redefs [clojure.core/deref inc] @5)

1:25 clojurebot: 6

1:26 bbloom: tomoj: that is evil.

1:26 mefisto`: 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

1:26 tomoj: I know, not very useful

1:26 mefisto`: I am doing ctrl-c ctrl-k after the changes also

1:26 tomoj: my plan is to just walk looking for for explicit clojure.core/deref and replace it with something else

1:26 :/

1:27 ivan: http://stackoverflow.com/questions/2706044/how-do-i-stop-jetty-server-in-clojure

1:27 bbloom: Raynes: would you be mad if i accidentally broke your bot?

1:27 metellus: ,(with-redefs [clojure.core/get conj] ({:a 1 :b 2} [:c 3]))

1:27 clojurebot: nil

1:28 bbloom: ,(with-redefs [clojure.core/deref #(Thread/sleep %)] @10000000000)

1:28 clojurebot: Execution Timed Out

1:28 bbloom: ,5

1:28 clojurebot: 5

1:28 bbloom: hey ok cool, security works :-P

1:28 ,@5

1:28 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IDeref>

1:28 mefisto`: ivan: thanks

2:11 cola_zero: hi, 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?

2:20 tomoj: hmm.. so it's pretty bad to extend a protocol to the CollReduce interface?

2:20 amalloy: that sounds like a terrible idea, yes

2:22 tomoj: so clojure.core.reducers is closed

2:25 amalloy: huh?

2:26 tomoj: as in, you can't extend a protocol to the stuff returned by the reducer transformers

2:32 augustl: hi folks, anyone got a generic AMQP library to recommend?

2:45 I found http://clojurerabbitmq.info/, but it seems RabbitMQ specific for some reason

2:46 and some reason seens to be that RabbitMQ has some custom extensions to AMQP

2:46 seems*

3:00 wuttf: Hi guys, new to Clojure. How hard is it to install Clojure on windows?

3:00 Ember-: easy, but not as easy as in *nix

3:01 since the automatic download stuff is broken

3:01 in leiningen

3:01 which you pretty much want to use with clojure :)

3:01 tkoskine: Yeah, I would say that plain Clojure is easy on both, but Leiningen is harder on Windows.

3:01 wuttf: So I will have hard time managing dependencies and stuff?

3:02 Ember-: leiningen takes care of that stuff

3:02 one of the reasons you want to use it

3:02 wuttf: I go and try to install leiningen

3:02 then

3:06 Foxboron: wuttf: i recommend getting cygwin or mysisgit.

3:06 Currently only lein1 works on cmd, but you want lein2.

3:07 wuttf: i am leaving in 10 mins for school, you can PM me later if you need any help :)

3:07 wuttf: Foxboron: I have both

3:07 Foxboron: Thank you =)

3:07 Foxboron: wuttf: great, then there should be no problems :)

3:11 wuttf: Arrgh wget is buggy on windows7

3:12 Ember-: there is no wget in windows

3:12 Foxboron: wuttf: if you use cygwin:

3:12 Ember-: you need install it separately

3:12 ro_st: anyone got ring web apps in production and have a way to do zero-downtime restarts?

3:12 Foxboron: fetch a wget from the web and put in the same dir as lein

3:12 Ember-: Foxboron: wget is available even without installing cygwin

3:12 wuttf: I am following this http://frozenlock.org/2012/03/06/clojure-on-windows-7/

3:13 Ember-: I *really* should continue on my work with lein.ps1 like I promised :(

3:13 wuttf: wget crashed, I found this http://lists.gnu.org/archive/html/bug-wget/2011-09/msg00018.html

3:13 Ember-: so we could dump the .bat

3:13 no need for wget or stuff like that then

3:13 Foxboron: Ember-: i am happy i got a new laptop so i didnt have to deal with windows <.<

3:13 wuttf: Problem is the link is dead there

3:14 Ember-: Foxboron: I'm perfectly happy with Windows 7, but old bat stuff is just... Bad

3:14 Foxboron: wuttf: really, fuck the guide. Open mysisgit, get the bash lein file and run it.

3:14 wuttf: that is the easiest way

3:14 wuttf: Foxboron: Okay.

3:15 Foxboron: Ember-: 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

3:15 Ember-: I installed leiningen by downloading the jar file manually

3:15 and placed the needed env variables etc by hand

3:15 Foxboron: Ember-: that is also another solution

3:16 Ember-: Foxboron: 10sec warmup time?

3:16 wtf

3:16 like 0.5sec here

3:16 Foxboron: mine had 10 sec

3:16 Ember-: something was badly broken bro

3:16 wuttf: What are the environment vars I have to set

3:17 Ember-:

3:17 Ember-: I'm pointing at a possible virus scanner or disc encryption

3:17 wuttf: wait a sec, I'll check em

3:17 Foxboron: Ember-: you are the first to have mentioned that bro

3:17 Ember-: wuttf: I have the following

3:17 wuttf: BTW I have never ever touched anything JVMish

3:17 No jars no nothing

3:17 Ember-: LEIN_ROOT <path-to-leiningen>

3:18 LEIN_JAR %LEIN_ROOT%\leiningen-20.0.0-preview10.jar

3:18 (yes, still on preview, should upgrade)

3:18 JAVA_HOME <path to java>

3:18 wuttf: I dled the preview too

3:18 Ember-: and to PATH add %LEIN_ROOT%

3:18 that's it

3:19 wuttf: to PATH?

3:19 Ember-: PATH environment variable

3:19 it tells the operating system where to look when you type some command and that executable etc isn't at the current directory

3:19 wuttf: K doing

3:21 Foxboron: anyway, school. Have fun wuttf :)

3:22 wuttf: Foxboron: Thank you ;)

3:25 Ember-: Your nick means "man" in Hungarian

3:25 *h

3:26 Ember-: my nick is soooo old...

3:26 dates back to when I was like 10 years old

3:26 wuttf: I am not sure about the JAVA_HOME

3:26 Ember-: and I liked to read fantasy literature :)

3:26 ember was a dragon in one of them

3:26 wuttf: :D Lol.

3:26 Ember-: that nick kinda stuck

3:27 wuttf: Cute.

3:27 Ember-: I'm 31 now, so it's pretty old nick

3:27 :P

3:27 wuttf: :DDDD

3:27 I have a "C:\Program Files (x86)\Java" But that contains to folders

3:27 jre7 and 6

3:27 Ember-: you need jdk

3:27 you obviously don't have it yet

3:28 go download it from oracle's site

3:28 jre is meant to _run_ java applications, jdk is meant to _compile_ (and run) java applications

3:28 wuttf: Okay. God... I knew I will be handicapped. I bet most of you are ex or current Java devs

3:28 Ember-: no problem, we all were newbies once

3:29 ro_st: beginners mind

3:29 best thing :-)

3:29 Ember-: yeah, nothing in way to find greatness

3:29 :)

3:30 ro_st: one of the main reasons i've enjoyed learning and using clojure so damn much

3:30 fredyr: and not being a java dev doesnt have to be a disadvantage either :)

3:30 p_l: I might currently code java, but that doesn't mean I'd call myself a Java dev :D

3:30 wuttf: Well I am rather proficient with other programming languages, but I skipped the Java universe entirely

3:30 p_l: I'm usually pissed off by java universe

3:30 Ember-: I'm mostly a java dev, but currently working with clojure full time

3:31 p_l: Clojure shields you a bit, but also tends to annoy as well

3:31 Ember-: done my share of c++ and stuff

3:31 wuttf: I have a natural aversion toward Java too, but Clojure spiked my interest, I like the immutability and the fact its a Lisp

3:32 p_l: the immutability pretty much kills it on platforms that have veeery costly GC... and short time for pauses

3:32 Ember-: java is way better than most languages, but then again it does have a lot of problems too, I'm first to admit that

3:32 and it's not a tool for every job

3:33 java would be way better if it could just dump the old legacy stuff to garbage

3:33 but backwards compatibility and so on...

3:34 but I'm really really enjoying my time with clojure

3:34 p_l: a 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

3:34 wuttf: Yes, too blue collar for me

3:34 Ember-: the sad thing is that most of the "java developers" aren't java developers

3:34 they are "framework x" developers

3:34 like spring framework

3:34 they use it but don't understand it

3:35 * Sgeo tends to get interested by a language first, framework second

3:35 Ember-: Sgeo: as it should be

3:35 p_l: Ember-: no, the sad thing is that majority of java code isn't OOP, but its sold as one, stifling programming everywhere

3:35 Ember-: p_l: that is so very true too

3:35 p_l: and no, I'm not talking about "utility classes"

3:35 Ember-: I agree completely

3:35 and yes, I know *exactly* what you are talking about

3:35 Sgeo: So, 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

3:35 p_l: I'm talking about bloated, giant inheritance trees and "classes-oriented" programming

3:35 Ember-: no real usable abstractions and stuff like that

3:35 bbloom: p_l: when i'm stuck with java, i basically `import static` pretty much everything

3:36 Ember-: huge inheritance like you said, no use of composition

3:36 p_l: Qi4J looks nice, but can be a bit annoying because it has to go around things in java

3:36 Ember-: bbloom: that's a bad practice in my opinion. But not the worst possible

3:36 wuttf: I was never excited about OOP.

3:36 p_l: meanwhile I can't really use it in my code

3:36 wuttf: most OOP isn't

3:36 Ember-: OOP is fine, but the problem is that you can SOOO easily use it in a wrong way

3:36 p_l: if you want OOP, look at smalltalk, or "protocol-oriented programming"

3:37 Ember-: at least in most languages

3:37 bbloom: Ember-: it's bad b/c it's not normal java, but it's good because i don't pull my hair out

3:37 Ember-: like in Java

3:37 wuttf: Nominal subtyping is an especially dangerous idea I think.

3:37 Ember-: bbloom: well, you only need import statics with static methods

3:37 bbloom: Ember-: right, and i mostly only write static methods

3:37 Ember-: that's not OOP :)

3:37 but I understand why :)

3:38 it would be stupid not to since I'm hanging on a clojure channel

3:38 p_l: funny 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

3:38 guess which one? :P

3:38 Ember-: p_l: yeah, not funny though. Sad really

3:38 p_l: Ember-: it's funny when some of the brighter devs vehemently disavow connection with OOP :P

3:38 wuttf: p_l: Dont hold it back

3:39 p_l: wuttf: Erlang. Process == Object

3:39 Ember-: and that stuff goes on and on in many different languages

3:39 p_l: Encapsulates state? Check. Communicates with messages? Check.

3:39 Ember-: trying to use language x to do code with paradigm y even though that language is for paradigm z

3:39 take javascript for example

3:40 wuttf: p_l: Erlang is nice. The syntax is ugly as hell though

3:40 Ember-: people try to create classes and classical inheritance with it

3:40 when it's a prototypical language

3:40 p_l: wuttf: beauty is in the eye of beholder. I know people who like it. Said people also like Prolog, which the syntax is from :D

3:41 bbloom: i'm of the opinion that "OOP" is now a completely meaningless term

3:41 it's so overloaded as to be entirely useless

3:41 wuttf: p_l: Its easy to like Erlang if you are a prolog guy

3:41 AimHere: With Javascript, isn't that because they put Java in the name and made the syntax similar so people assumed it was Javalike

3:41 Ember-: AimHere: yeah, one of the main reasons

3:41 Sgeo: wuttf, really? Because Erlang takes the Prolog syntax but not the stuff that makes Prolog really cool

3:42 Ember-: but erland does have actors :)

3:42 erlang

3:42 wuttf: Sgeo: I meant the syntax

3:42 Ember-: although those aren't called actors in it

3:42 p_l: AimHere: 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)

3:43 Sgeo: p_l, beyond lack of TCO and overly verbose lambdas and automatic ;, what dubious choices?

3:43 Oh, I remember something about objects not working well as hash-maps ick

3:43 wuttf: Now I installed the JDK where should my JAVA_HOME be?

3:43 Sgeo: And lack of first-class continuations

3:43 and lack of macros

3:43 p_l: Sgeo: leaky implementations, mostly.

3:43 Sgeo: well, macros weren't exactly forte of schemes ;P

3:44 (at least the standardized stuff)

3:44 Sgeo: p_l, o.O I thought Scheme was known for hygienic macros. Maybe historically not?

3:44 Ember-: wuttf: c:\program files (x86)\java\jdk_1.7.0_xx\

3:44 if that's where you installed it

3:44 p_l: Sgeo: yes, but my feeling with them is that they are... a bit stifled compared to DEFMACRO

3:44 wuttf: Ember-: Thanks! I was being blind

3:45 Sgeo: p_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

3:45 wuttf: Hey before I dive in to explore Clojure what are the shittiest parts of it?

3:45 p_l: Sgeo: nope. I'm not current on Scheme developement - frankly speaking, trying to go with Scheme slowed me a lot in grokking lisps

3:46 Sgeo: wuttf, needing to deal with the JVM, mostly, although there are other flaws

3:46 xificurC: how do you check if two keywords are equal?

3:46 wuttf: Sgeo: I thought being on the JVM is a pro

3:46 Sgeo: Incomprehensible error messages are always fun

3:47 Ember-: JVM as a runtime platform for Clojure is a great choice

3:47 like the best thing done for it

3:47 p_l: wuttf: JVM makes some stuff

3:47 annoying

3:47 wuttf: Sgeo: I am already used to that after Haskell.

3:47 Sgeo: wuttf, 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

3:47 p_l: Ember-: doesn't mean there isn't a price to pay

3:47 Ember-: p_l: of course there is

3:48 there is no such thing as free lunch

3:48 Sgeo: Java methods are not first-class functions

3:48 p_l: (or that the "chocie of libs" doesn't mean "choose between crap, crap, and utter crap")

3:48 Sgeo: No TCO

3:48 Ember-: but clojure imho is the first lisp to have actual chances to succeed to get a wider audience

3:48 wuttf: Well yes lack of TCO is kinda a bummer for a remotely functional lang

3:48 Ember-: and a big part of that is due to JVM

3:48 p_l: Ember-: not first.

3:49 xificurC: how can I check if two keywords are the same?

3:49 wuttf: But htere is a recur thingie, right?

3:49 Sgeo: ,(eq? :hi :hi)

3:49 wuttf: Won't that give you tail call?

3:49 Ember-: lack of TCO is kinda bummer but not THAT big thingy

3:49 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: eq? in this context, compiling:(NO_SOURCE_PATH:0)>

3:49 Sgeo: ,(= :hi :hi)

3:49 clojurebot: true

3:49 Ember-: since you want to use lazy sequences more than tail recursion

3:49 and there is recur

3:49 p_l: Ember-: 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

3:49 Ember-: p_l: indeed, I agree

3:49 xificurC: hm

3:49 Sgeo: wuttf, doesn't help for mutually recursive functions. There is trampoline, but it can be annoying to use

3:50 Ember-: but that one is a huge one

3:50 p_l: as for wider audience...

3:50 you do know that clojure is nowhere close two widely used lisps? :D

3:50 xificurC: Sgeo: thanks, the problem was somewhere else :)

3:50 Ember-: yes

3:50 but clojure is also way newer

3:50 ro_st: how do we get clojure to wide usage?

3:50 Ember-: common lisp has got kinda long headstart :)

3:51 p_l: Ember-: I'm not talking CL

3:51 nor Scheme

3:51 ejackson: ro_st: its growing like crazy

3:51 Sgeo: p_l, elisp?

3:51 ro_st: now children, let's count from 1 to 10. very good! now, tell me, what does this clojure code evaluate to?

3:51 p_l: There are two *giant* userbases - Elisp and AutoLISP

3:51 xificurC: you dont need a very wide audience to keep the language alive and good, just a decent one :)

3:51 p_l: the latter is most horrible

3:51 but unkillable

3:51 (despite Autodesk trying at least twice)

3:52 ro_st: ejackson: i'm talking at scaleconf in april (here in cape town)

3:52 you can bet all your parens i'll be pushing Clojure :-)

3:52 ejackson: yeah spread the (infection)

3:52 p_l: ro_st: take a big stick to use on Node.js? ;P

3:52 ro_st: happily

4:49 Raynes, 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?

4:55 bbloom: ro_st: dare i venture to #clojure.za ? what's over there?

4:56 ro_st: buncha south african coders :-) some using clojure. also, it's where we organise our cape town usergroup

4:57 bbloom: ah gotcha

4:57 cool

4:57 ro_st: be nice if we had one of the bots present, for the usual reasons :-)

4:59 ah, 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

4:59 bbloom: ro_st: oh, didn't see the schedule was out

5:01 clgv: ro_st: Raynes controls lazybot. just ask him when he is around. he let clojurebot join #clojure.de as well

5:01 ro_st: cool, thanks

5:01 clgv: args not clojurebot, lazybot!

5:03 bbloom: ro_st: i just wanna know what Pedestal is all about! :-P

5:03 damn secrets

5:03 ro_st: -grin- me too

5:03 any guesses?

5:04 cmdrdats: bbloom: probably going to be a game changer

5:04 bbloom: cmdrdats: ok... but what game is it going to change? heh

5:04 cmdrdats: bbloom: maybe a nice interface for overture

5:05 hehe

5:05 bbloom: i have no idea what overture is

5:05 ro_st: clojurescript-in-clojurescript is really exciting, too

5:05 cmdrdats: bbloom: music synthesis lib

5:05 ro_st: although, good luck porting the google closure compiler to js

5:05 cmdrdats: afaik… that is

5:06 bbloom: cmdrdats: do you mean overtone?

5:06 ro_st: overtone, ya

5:06 cmdrdats: ah, foo. yes.

5:06 bbloom: ro_st: you don't need to port closure to js

5:06 cmdrdats: overtone, my bad

5:06 bbloom: ro_st: you need to port the optimization passes to clj

5:07 ro_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

5:07 vijaykiran: Isn't pedestal something related to testing

5:07 cmdrdats: vijaykiran: i hope not :/

5:07 ro_st: bbloom: true. but the google closure compiler does incredible things with javascript, and we definitely want that benefit

5:08 at least, i do :-)

5:08 but even if cljs-in-cljs makes it possible to eval code browser side, i'd be happy

5:08 i don't know nearly enough about cljs internals to know if that's even possible. i speak as a User, now

5:09 bbloom: ro_st: the sorts of things that closure does with js are the sorts of things that any compiler does

5:09 ro_st: it's completely possible. the guy speaking has that working in his fork

5:10 ro_st: awwwwesome :-)

5:11 aw man. why did it have to clash with FRP!

5:11 FRP still gets my vote. have direct interest in using FRP in our code

5:11 * piranha is happy about setting an alert on word 'frp' :)

5:12 ro_st: http://clojurewest.org/sessions#dipert <<

5:12 piranha: oh right!

5:12 this is interesting

5:12 I'm actually trying to figure out this stuff right now, flapjax + enfocus :)

5:12 ro_st: oh, nice :-)

5:13 piranha: it works, though I'm not sure yet how to do forms nicely

5:13 one moment, I'll show the code, I'm excited about it quite a bit :)))

5:13 ro_st: check out this demo https://github.com/robert-stuttaford/demo-enfocus-pubsub-remote/

5:13 piranha: https://github.com/piranha/pairword/blob/master/src/pairwords/templates.cljs#L44 - I have templates defined here

5:13 ro_st: would you mind scanning through and telling me how much work it'd take to rework it with FJ ?

5:14 piranha: template is an enfocus one, receives a behavior and returns a DocumentFragment, which I append somewhere in document then

5:14 bbloom: i'm been experimenting with FRP for quite a while and i'm almost 100% convinced it's a dead end for GUIs

5:14 ro_st: tell me to piss off if i'm being cheeky

5:14 bbloom: it's still promising for animation

5:14 piranha: and it updates itself

5:14 bbloom: oh, why/

5:14 ?

5:14 ro_st: why, bbloom?

5:14 bbloom: I find Angular's game-engine like approach to be much more attractive

5:14 update & render

5:15 piranha: ro_st: not sure, I'm just starting, honestly :)

5:17 bbloom: 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 :)

5:18 bbloom: piranha: don't let me discourage you to keep experimenting and exploring

5:18 piranha: ok :-)

5:18 bbloom: piranha: but keep an eye out for what i brew up... probably going to have a demo by the time clojure/west comes around :-)

5:18 piranha: ah cool :)

5:19 I would love to attend clojure/west, it's a shame I live so far away %)

5:19 bbloom: piranha: all the videos should find their way online

5:20 piranha: bbloom: indeed, but it usually takes quite a time plus you don't get to talk with real people, which may be even more interesting :)

5:20 bbloom: yup

5:26 ro_st: bbloom: FRP appeals because we're using event sourcing in our client-server data model

5:30 hope to add websockets into the mix so that it's not just users -events-> server, but also server -events-> users

5:32 edtsech :-)

5:32 silasdavis: I'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

5:33 any thoughts?

5:33 edtsech: ro_st: hi :)

5:34 ro_st: silasdavis: (map pretty-message (message/all)) #just-saying

5:35 silasdavis: yeah that's a bit if (a == true), it had something more sensible in the lambda before...

5:36 ro_st: perhaps just (pretty-message (first (message/all))) and see if that works?

5:37 i haven't used liberator so i might be way off, here

5:40 anyone converting html to pdf with clojure?

5:42 silasdavis: ro_st: actually first doesn't work because it can't conert (message/all) to an ISeq

5:42 * p_l tries to figure how to make CL-style special variables with Java

5:42 silasdavis: but map does work

5:42 what collection types does map take?

5:43 bbloom: silasdavis: anything that implmenents clojure.lang.Sequable

5:44 silasdavis: if you're not sure, call `seq on it

5:44 silasdavis: bbloom: how can I get the first of anything Sequable?

5:44 bbloom: (doc seq)

5:44 clojurebot: "([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."

5:44 silasdavis: (map views/pretty-message (message/all))) -> works

5:44 bbloom: `first should already call seq

5:45 silasdavis: but (seq message/all) doesn't with "don't know how to creat ISeq"

5:46 bbloom: silasdavis: i dunno anything about whatever library you're using

5:46 edtsech: ro_st: I've used http://code.google.com/p/wkhtmltopdf/ but it's without clojure :)

5:48 silasdavis: (coll? (message/all)) returns true... shouldn't that be enough?

5:49 oh brackets omitted

5:49 my fault

6:16 ro_st: thanks edtsech

6:54 michaelr525: hello

7:06 acuzio: they use clojure @guardian.. - thats interesting

7:17 [Rock]: Rock

7:17 Ignore that^

7:33 silasdavis: when using lein ring server, it reloads changed files but it seems to lag by one change

7:55 is there a neater way to perform a lookup in nested maps than (:innermost (:inner (:outer (:outermost map))))?

7:55 ro_st: (-> map :one :two)

7:57 silasdavis: that's what I had in mind, thanks

8:00 Raynes: alexbaranosky: Hi.

8:00 ro_st, silasdavis: No it isn't. (get-in map [:outermost :outer :inner :innermost])

8:03 ro_st: that too

8:04 Raynes: any chance lazybot can park in #clojure.za, please?

8:04 Raynes: Sure

8:04 mpenet: silasdavis: get-in won't throw exceptions on you for non existant string keys, not to mention the "default" argument

8:04 Raynes: $login

8:04 lazybot: You've been logged in.

8:04 Raynes: $join #clojure.za

8:04 I'll edit the config to make it permanent.

8:04 ro_st: thank you :-)

8:04 mpenet: ,(-> {} "a" "b")

8:04 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn>

8:04 ro_st: is there a reference for its commands somewhere?

8:05 mpenet: ,(get-in {} ["a" "b"])

8:05 clojurebot: nil

8:05 Raynes: ro_st: Not really. Best to just browse the plugin list.

8:06 ro_st: where do i find that?

8:07 Raynes: google.com

8:07 * Raynes is just kidding

8:08 Raynes: Sec

8:08 ro_st: i already checked github/raynes :p

8:08 Raynes: https://github.com/flatland/lazybot/tree/develop/src/lazybot/plugins

8:08 Aye, it's a flatland project.

8:08 :D

8:08 ro_st: aha!

8:08 are all of these enabled?

8:08 Raynes: Most of them are enabled.

8:09 Some more pointless ones may not be

8:09 $loaded

8:09 $kill

8:09 lazybot: KILL IT WITH FIRE!

8:09 Raynes: Hm.

8:09 $loaded?

8:09 lazybot: :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

8:09 Raynes: Stupid question mark.

8:09 ro_st: ^ all of these are enabled.

8:09 ro_st: nice, thank you, sir!

8:09 Raynes: google is currently broken because I suck at switching json libs.

8:09 Will fix in the next day or two.

8:10 ro_st: i guess 1.5 will come when it goes final?

8:10 Raynes: Or, shit, I might fix it in a minute.

8:10 Version is utterly meaningless.

8:10 I haven't changed that version in over 9000 years.

8:10 I hardly ever even restart lazybot, I usually just reload code.

8:10 ro_st: i mean clojure 1.5

8:10 so we can use as-> and condp and whatnot

8:11 Raynes: Oh. Hah.

8:11 Yes.

8:11 I'll definitely update it for Clojure 1.5.

8:11 ro_st: kickass

8:12 cmdrdats: (inc Raynes)

8:12 lazybot: ⇒ 19

8:31 hyPiRion: Someone 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.

8:35 ejackson: maybe `fogus will agree to write one for you hyPiRion :)

8:36 cmdrdats: hyPiRion: Shen - http://www.shenlanguage.org/ - done.

8:36 hyPiRion: ejackson: Actually, I'm very interested in making my own.

8:37 cmdrdats: And thanks, it's on my "to-learn" list.

8:37 ejackson: hehe, I'll hang back a bit, still don't get Clojure well enough

8:37 cmdrdats: heh, cool - same

8:39 hyPiRion: Maybe I should go back to Oz. It has this sweet dataflow programming style I really like for writing concurrent programs

8:40 (like promise/deliver, but more integrated.

8:40 pandeiro: hyPiRion: i'm reading CTM now and digging it, but i didnt think anyone actually used Oz

8:41 hyPiRion: pandeiro: Exactly, noone uses it :p

8:41 pandeiro: hyPiRion: totally hipster

8:42 i was wondering if the dataflow style could be implemented in clojure somehow actually

8:42 hyPiRion: Well, I've seen dnolen using it/stealing ideas from there to core.logic I think

8:45 pandeiro: one 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

8:45 hyPiRion: yeah, it's just elisp

8:51 michaelr525: what is ctm?

8:52 hyPiRion: CTMCP: http://en.wikipedia.org/wiki/Concepts,_Techniques,_and_Models_of_Computer_Programming

8:53 pandeiro: michaelr525: someone here recommended it to me when i was asking about how queues work

8:54 there is a draft version available free

8:54 michaelr525: 'k :)

8:54 pandeiro: i think i had to google -> archive.org to find it though, it's not on the site anymore

8:55 hyPiRion: pandeiro: I think it's on the site actually. I'll have a look for it

8:56 Actually, searching for "CTMCP pdf" gives me a citeseerx link as first hit, which contains the draft

9:05 ro_st: Rich_Morin: i'm in for the datomic/codeq hack session

9:06 we use D in production so i should be able to contribute something :-)

9:12 Raynes: $google foo

9:12 hyPiRion: Raynes: Someone broke it

9:12 Raynes: hyPiRion: That'd be me, sir.

9:12 $shell git pull

9:12 lazybot: Updating b790d39..96fab3f Fast-forward src/lazybot/plugins/google.clj | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-)

9:12 Raynes: $reload

9:12 lazybot: Reloaded successfully.

9:12 Raynes: $google foo

9:12 lazybot: [Foobar - Wikipedia, the free encyclopedia] http://en.wikipedia.org/wiki/Foobar

9:12 hyPiRion: whut

9:12 Raynes: And now I fixed it.

9:12 ro_st: ^ Google fixeded.

9:12 ro_st: yay

9:13 well done!

9:13 tgoossens: i'm getting tired of this. Please tell me how to improve on this. I keep copying everything from sublime into the repl manually

9:13 whats the best way to make my life easier?

9:13 ro_st: awwwww yisss. motha -in emacs.

9:13 Raynes: tgoossens: 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.

9:14 tgoossens: Raynes: about the intendation

9:14 Raynes: tgoossens: When I have to work directly in a REPL, I tend to do (require 'foo.bar :reload) in my repl.

9:14 That'd what I'd do if I used ST2 and there wasn't some plugin to give me Emacs-like interaction with a repl.

9:14 Unless I needed to specifically copy one piece of code.

9:15 tgoossens: is that why my intendation gets screwed up everytime

9:15 https://github.com/tgoossens/cljstrips/blob/master/src/cljstrips/core.clj

9:15 Raynes: Yep. It's horrid.

9:15 tgoossens: i'm getting so tired of it

9:15 Raynes: It uses a crappy textmate bundle that is basically regex soup.

9:15 tgoossens: i really need a new texteditor

9:15 cmdrdats: notepad.

9:15 ro_st: tgoossens: emacs, vim or eclipse with CCW.

9:16 Raynes: There 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.

9:16 cmdrdats: untouchable. just like MS paint

9:16 tgoossens: i heard about emacs a lot (never tried it before)

9:16 pandeiro: tgoossens: prepare thyself

9:17 Raynes: tgoossens: https://github.com/odyssomay/sublime-lispindent This is less sucky than what is included by default.

9:17 It feels like a big hack to get around the ST2 including support for languages he doesn't care about and thus not maintaining them.

9:17 It also won't help with your repl woes.

9:17 Emacs + nrepl.el would, as would Vim and vim-foreplay.

9:17 tgoossens: pandeiro: hmm?

9:18 pandeiro: tgoossens: you may not have known about emacs but emacs certainly knew about you

9:18 Raynes: http://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!

9:18 * Raynes may be cynical far beyond his years.

9:19 tgoossens: ah you are working on sublime?

9:19 ro_st: tgoossens: http://blog.jr0cket.co.uk/2013/01/emacs-live-great-clojure-developer.html

9:19 you're welcome, and i'm sorry.

9:19 tgoossens: looks nice

9:20 Raynes: tgoossens: Nope.

9:20 I tried it recently though.

9:20 tgoossens: its the first editor that someone told me about (while telling me about clojure for the first time)

9:20 but i'm fed up with it

9:21 Raynes: $tryhaskell foldr (+) 0 [1..10]

9:21 lazybot:

9:21 ro_st: how long have you been struggling?

9:21 Raynes: Brokes.

9:21 $shell git pull

9:21 lazybot: Already up-to-date.

9:21 ro_st: tgoossens: are you south african?

9:21 tgoossens: nope belgium :)

9:21 ro_st: ah

9:21 tgoossens: euhm. since september or so :p

9:21 Raynes: $shell git pull

9:21 lazybot: Updating 96fab3f..3fe14b3 Fast-forward src/lazybot/plugins/haskell.clj | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)

9:21 Raynes: $reload

9:22 ro_st: yikes dude

9:22 lazybot: Reloaded successfully.

9:22 Raynes: $tryhaskell foldr (+) 0 [1..10]

9:22 lazybot: ⇒ 55

9:22 tgoossens: but not active development

9:22 more playing around (still studying)

9:22 Raynes: Sorry 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.

9:22 tgoossens: but at the moment i'm (for the first time) trying to write a fairly complex program in clojure

9:22 and i'm feeling the pain

9:22 badly

9:23 Raynes: Emacs is an excellent pain pill with a high addiction rate.

9:23 tgoossens: so yeah

9:23 Raynes: $he foldr (+) 0 [1..10]

9:23 tgoossens: i'm probably going to rage a discussion right now but..

9:23 why not

9:23 *Raise

9:23 Raynes: Whaaaaaat. Mueval is teh broke.

9:23 borkdude: tgoossens learning Emacs will make you a better text editor, even if you're not ever going to use Emacs ever again… eh, wait

9:23 tgoossens: vim vs emacs?

9:23 borkdude: lol ?

9:23 Raynes: tgoossens: Emacs has the best support for Clojure. Vim is a close second.

9:24 borkdude: tgoossens yes, lol

9:24 Raynes: tgoossens: As far as Emacs vs Vim as editors, that's a question nobody but you can answer.

9:24 tgoossens: ok. i'll be looking into emacs

9:24 but at the moment

9:24 Raynes: Some people hate Emacs for its key sequences and love vim for its modal editing.

9:24 tgoossens: what is the easiest way

9:24 to fix my intendation

9:25 in my core.clj file

9:25 Raynes: See the link above.

9:25 tgoossens: (not manually )

9:25 ah yes

9:25 pandeiro: tgoossens: emacs

9:25 Raynes: No, there is a plugin for ST2 he can use.

9:25 pandeiro: on any linux distro emacs is a command away

9:25 tgoossens: sublimeREPL

9:25 hmm

9:25 Raynes: That exists, but I'm not sure how well it works.

9:26 tgoossens: not well

9:26 Raynes: I've heard complaints about it before, but I can't think of specific stuff.

9:26 tgoossens: it freezes my xorg server

9:26 everytime again

9:26 not figured out why yet

9:26 Raynes: Nice.

9:26 borkdude: isn't there a leiningen plugin which slurps all project files and spits them correctly indented? ;)

9:26 Raynes: Well, not nice, but nice.

9:26 borkdude: Not that I know of.

9:26 tgoossens: :D

9:28 hyPiRion: Time to make "lein pprint"

9:28 borkdude: lein indentify

9:28 `fogus: ejackson: What are signing me up for this time?!

9:29 ejackson: the new language: "Hipster"

9:29 designed to keep users away

9:29 `fogus: Oh, I'm already done with that language... but you've probably not seen it

9:29 ejackson: :D

9:29 ro_st: ejackson: if brainfuck can't manage that, i don't know what can

9:33 tgoossens: hmmm

9:33 wtf for intendation is this?

9:35 whats with all the whitespace :p

9:35 https://github.com/tgoossens/cljstrips/blob/master/src/cljstrips/core.clj

9:35 (using the sublime indent plugin)

9:36 progo: tabs are evil

9:36 tgoossens: i noticed

9:37 ro_st: (inc that)

9:37 lazybot: ⇒ 1

9:37 tgoossens: but i use the tab button a LOT

9:37 java inheritance

9:37 ro_st: you can tell st to use spaces

9:37 tgoossens: ah voila

9:37 inheritance is bad :p

9:38 ok i see

9:38 convert tabs to spaces was switched off

9:39 oh now i get

9:39 vijaykiran: twit

9:39 tgoossens: why sublime screwed up my intendations

9:39 you can set the amount of spaces a tab is equivalent to

9:39 but

9:39 if you don't convert them to spaces

9:40 then sublime will do that for you. But in the editor you will see only the set amount of spaces

9:40 bah

9:40 progo: substandard editor.

9:40 tgoossens: i guess that

9:40 when i started using it

9:41 i was just enchanted by its interface en default color theme

9:44 ro_st: i use st2 every day

9:44 just not for clojure

9:45 Raynes: ST2 is a pretty editor. Pretty annoying, mostly.

9:45 ejackson: (inc Raynes)

9:45 lazybot: ⇒ 20

9:46 ejackson: M-x kurmedgeon-mode

9:47 tgoossens: haha

9:47 TimMc: Is that the KDE version?

9:48 tgoossens: what are the roles of clojurebut / lazybot

9:48 ejackson: $guards

9:48 lazybot: SEIZE HIM!

9:48 ejackson: mostly

9:48 TimMc: To further the world domination goals of hiredman / Raynes & amalloy, respectively.

9:49 tgoossens: $guards

9:49 lazybot: SEIZE HIM!

9:49 tgoossens: lol

9:49 ejackson: also they're C&C nodes for our fake parenthesis medication spam botnet

9:50 ro_st: ,(clojure.string/join " " (map name [:to :demonstrate :code]))

9:50 nDuff: $goards

9:50 clojurebot: "to demonstrate code"

9:50 ejackson: apply the cream.... oh, now I have more parentheses.... dear me.

9:50 tgoossens: ro_st: do you use it for java development as well?

9:50 (st2)

9:50 ro_st: tgoossens: gosh no. but then, i don't do java at all

9:53 tgoossens: ro_st: what do you use it for then?

9:54 ro_st: legacy php code

9:55 tgoossens: someone just told me something about catnip

9:55 anyone experience with that?

9:55 ferd: Thought 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"

9:56 ro_st: ferd: i'm actually thinking along those lines as well

9:56 modules of stacks rather than one big stack

9:57 tgoossens: catnip is an in browser editor that's actually very usable

9:58 ferd: ro_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

9:58 I'll go my way for now :-)

10:00 (sorry all, wrong channel)

10:00 tgoossens: :D

10:01 fredyr: :)

10:16 Anderkent: in Aleph, after running aleph.http/start-web-server, how can I find out whether the server is ready to take connections?

10:29 aroemers: tgoossens: I use ST for Clojure. Together with SublimeREPL and automatic conversion to spaces I think it works well enough.

10:29 Use what Raynes said about (require 'some.ns :reload), or use the copy-to-REPL shortcut.

10:30 I am learning emacs though, to see whether that really is a better experience.

10:30 Foxboron: aroemers: imma go with self promotion. Tried my Sublime plugins for CLojure :)?

10:30 one for snippets and one with doc search

10:30 TimMc: Foxboron: No, what editor are they for? ;-)

10:30 Foxboron: TimMc: Sublime :P

10:31 bpr: Anderkent: 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:31 aroemers: Foxboron: No, I haven't

10:32 Foxboron: aroemers: Enhanced Clojure and ClojureDocSearch :) I think you will like them ^^

10:33 aroemers: I will check them out some day

10:34 Foxboron: aroemers: Should do it a little better too get done stuff inside ST :P

10:35 silasdavis: mpenet: 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:35 where context is a map, is there a better way?

10:36 TimMc: THe latter seems harder to read, for me.

10:36 silasdavis: TimMc: but with the former I think I loose some exception proofing and default values

10:37 TimMc: If you really wanted get-in, I'd move context out in front (first arg to ->).

10:37 Hmm, true.

10:37 Writing (-> context :request :route-params (:id "default") ...) would look weird.

10:39 silasdavis: I think I'm actually going to catch the possibility of no id at an early stage in this case

10:39 do you use the maybe monad in clojure?

10:41 Sgeo: -?> acts a little like the maybe monad

10:43 ferd: Sgeo: FYI, I think contribs' -?> is now some-> in Clojure 1.5, right?

10:43 Sgeo: ferd, haven't really looked at 1.5

10:43 Nice to know though, thanks

10:49 TimMc: I think org.clojure/core.incubator has -?> at this point.

10:52 silasdavis: should I be using 1.5 for a new project?

10:52 TimMc: It isn't out yet.

10:52 silasdavis: TimMc: I wont' be fobbed off by trivia

10:53 TimMc: Then try 1.6. :-P

10:53 (:from __future__ [:import "1.6.0"])

10:55 silasdavis: I had heard that you could do stuff like that with macros yeah

10:58 TimMc: You just wrap (dwim ...) around your code.

10:59 (defmacro dwim [& args] (->> args pr-str (amazon/mechanical-turk {:service :code-rewrite}) read-string))

10:59 It's really important to AOT your code if you do that, because the macro can take *hours* to return.

11:01 bpr: lol

11:02 hyPiRion: TimMc:

11:02 ,(:from '__future__ [:import "1.6.0"])

11:02 clojurebot: [:import "1.6.0"]

11:02 hyPiRion: :D

11:02 TimMc: hahaha

11:05 hyPiRion: Try this: (ns foo.bar (:println Hello!))

11:06 silasdavis: could someone walk me through what the jvm is attempting when: Exception in thread "main" java.lang.NoClassDefFoundError: crosstalk/handler$loading__4784__auto__

11:06 happens

11:06 I've only made code changes, but this looks like a file is missing

11:07 TimMc: ANy chance this is an AOT issue?

11:07 - OR - I told you 1.5 wasn't ready yet!

11:08 silasdavis: I 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:08 yeah bumped to 2.0 to avoid 1.5's issues

11:10 I'm requiring one of my own modules [crosstalk.api :as api]

11:11 it's in the right place

11:11 is api___init a clojure generate class? what does it do?

11:12 TimMc: That's a class that's generated for the namespace itself.

11:12 bpr: did you restart your jvm after adding the crosstalk dependency?

11:13 silasdavis: no, but I have used the depency since

11:13 what's the best way to restart the jvm?

11:13 bpr: by "adding the dependency" i mean adding it to your project.clj

11:13 silasdavis: it's in the same project

11:14 bpr: oh. then nevermind me haha

11:14 TimMc: silasdavis: Not so much restart as stop the program/repl and start again.

11:14 silasdavis: oh yeah did that

11:14 when I try and load the referencing module into repl, first I get:

11:14 ClassNotFoundException crosstalk.api$loading__4784__auto__ java.net.URLClassLoader$1.run (URLClassLoader.java:366)

11:14 then if I load again I get:

11:14 TimMc: Although I guess if you were using Nailgun that would be another thing to check. :-)

11:14 silasdavis: NoClassDefFoundError Could not initialize class crosstalk.api__init java.lang.Class.forName0 (Class.java:-2)

11:15 TimMc: Try lein clean

11:15 silasdavis: I'm using la clojure, but I have terminated that

11:15 * silasdavis closes all his javas

11:16 silasdavis: yeah I had tried clean

11:16 I must be doing something stupid here

11:19 I can load the crosstalk.api module into repl fine

11:19 I can load the referencing module fine if I remove the require

11:21 commenting out part of the api module allows the referencing module to be loaded

11:21 TimMc: Is it a part with a fn called loading?

11:22 silasdavis: no, it's a liberator (defresource ...)

11:22 TimMc: Liberator?

11:22 silasdavis: it's a rest interface frameworky thing http://clojure-liberator.github.com/

11:24 and i've uncommented the same code it works

11:26 now everything works, but I essentially fixed it using magic

11:27 is there a place I could read up on clojure's compile process?

11:27 http://clojure.org/compilation

11:27 TimMc: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java

11:29 silasdavis: thanks, I think intellij must have been doing some AOT stuff

11:34 TimMc: Oh, that might be.

11:37 alandipert: what's the current hotness for html/js clj syntax highlighting?

11:39 silasdavis: better way of doing (nil? (get-in map [:one :two :three])

11:39 ?

11:43 aroemers: silasdavis: depends on the context, in many cases you won't need the nil? part.

11:43 silasdavis: oh yes nil is falsy

11:44 aroemers: exactly

11:46 silasdavis: even better because I was about to use (not (nil? thing)) and I can just use thing

11:46 how convenient

11:48 dgrnbrg: Is there a ring response function that lets me fetch another URL, and return that instead?

11:49 weavejester: dgrnbrg: If you're using Compojure, you just need to return a URL object.

11:49 dgrnbrg: weavejester: I don't want to redirect, though--I need to do the request from the server (to deal with security/routing)

11:49 weavejester: Otherwise, (response (io/input-stream "http:// …"))

11:50 dgrnbrg: a java.net.URL?

11:50 weavejester: dgrnbrg: I wasn't saying to redirect

11:50 dgrnbrg: ok, I just wanted to make sure :)

11:50 weavejester: If you return a java.net.URL, it grabs its contents

11:50 Which is how (io/resource …) works

11:50 with Compojure

11:52 dgrnbrg: Thanks!

11:53 TimMc: silasdavis: Looks like this fellow was using the dwim macro: http://www.theregister.co.uk/2013/01/16/developer_oursources_job_china/

11:53 devn: yogthos: luminus is cool

11:53 yogthos: devn: thanks :)

11:54 devn: <3

12:10 gfredericks: is there a tool for getting a namespace DAG from the ns forms?

12:11 man that's nearly exactly what tools.namespace claims to be

12:11 * gfredericks looks into it

12:14 Rich_Morin: I'm using a Cloure 1.4 REPL and having no luck in bringing in the expt function - help?

12:25 silasdavis: TimMc: ha

12:25 what's the clojurist way to TryParse a guid?

12:27 nDuff: TryParse?

12:27 ...is this clojure-clr?

12:29 silasdavis: no I've got a bit of a clr problem

12:29 I found isValid in org.bson.types.ObjectId

12:30 nDuff: ...if this were on the JVM, I'd probably do something like: (try (java.util.UUID/fromString "foo") (catch IllegalArgumentException e nil))

12:30 silasdavis: you can't pass by reference on jvm right

12:31 nDuff: ...but some of that kind of habit comes from languages where references are cheap.

12:31 ...huh?

12:31 silasdavis: you can't get at an object reference

12:31 nDuff: Anything that isn't a native type _is_ a reference.

12:31 s/references are cheap/exceptions are cheap/

12:31 silasdavis: I think I'm talking about the pointer to the reference

12:32 in c# you can do ref(object)

12:32 and method(out object)

12:33 nDuff: Such things exist, but their usage is extremely unidiomatic.

12:33 ...and I don't know why you'd want it here.

12:33 silasdavis: you're right I don't want it

12:34 do you know what clojure does with (. ObjectId isValid nil)

12:34 nDuff: that depends on what those things are, of course.

12:34 silasdavis: i.e. what the nil gets converted to before being passed as an argument for the java isValid method

12:34 so isValid takes a string

12:35 nDuff: Oh. If there are multiple calling conventions, and you want to specify one in preference to another, you need to be explicit about it.

12:35 s/calling/valid candidate calling/

12:35 ...type hinting's your friend in that case.

12:35 silasdavis: multiple calling conventions? could you give an example

12:36 gfredericks: does nrepl have any kind of history built in?

12:40 AtKaaZ: how can I evaluate all passed forms to a macro, within the macro ?

12:41 example: (defn somef_ [a] (assumedTrue (= 3 a))) and inside the macro: Unable to resolve symbol: a in this context

12:42 dnolen: AtKaaZ: sounds like you just need to fix your macro - no need to evaluate anything.

12:42 AtKaaZ: ok I'll recheck, thanks

12:42 gfredericks: AtKaaZ: a doesn't have a value until runtime, so it's not clear what evaling that at compile-time would mean

12:43 AtKaaZ: was that maybe because I was also calling: (somef_ 3) in the code?

12:44 instead of at the repl

12:44 gfredericks: AtKaaZ: macros don't normally need to eval things; what is the macro supposed to do?

12:44 dnolen: AtKaaZ: no it just sounds like your macro is wrong. Paste it somewhere.

12:44 AtKaaZ: gfredericks: i'm trying to check if all passed forms are all true, if any is false then throw

12:44 just a sec

12:44 Bronsa: why not using assert?

12:44 or preconditions

12:45 AtKaaZ: Bronsa, I'm using it in a :pre

12:45 gfredericks: AtKaaZ: but don't you want this to be checked at runtime instead of compile-time?

12:45 frozenlock: Could someone tell me how to convert into cljs the last bit from this? https://www.refheap.com/paste/8692

12:45 AtKaaZ: gfredericks, yes runtime

12:46 here it is, dnolen: https://gist.github.com/4549026

12:46 dnolen: AtKaaZ: ouch :) needs formatting

12:47 AtKaaZ: dnolen, it's my way of formatting, how should I reformat it? no dangling parens ?

12:47 I'll reformat, don't look yet =)

12:48 frozenlock: The `?' in the middle of the command confuses me :\

12:49 gfredericks: frozenlock: you're not familiar with the ternary operator?

12:49 should just be an if

12:49 foo ? bar : baz ==> (if foo bar baz)

12:50 AtKaaZ: 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:50 AtKaaZ: gfredericks, honestly I don't remember, should I recheck as to why?

12:50 dnolen: i reformated some: https://gist.github.com/4549026

12:50 frozenlock: gfredericks: I'm not, like java, I'm learning js through clj :)

12:51 gfredericks: AtKaaZ: well if you don't know why the code you're writing is necessary that sounds like somewhat of a limitation

12:51 AtKaaZ: gfredericks, I mean, I started it about 2 months ago, then took a break

12:51 Bronsa: AtKaaZ: why not just (defn somef_ [a] {:pre [(= 3 a)]} body)

12:53 AtKaaZ: Bronsa, that does seem to be working as I expect, let me remember why I didn't like this variant

12:54 Bronsa can I use that concept outside of :pre ? somehow

12:54 gfredericks: AtKaaZ: so you want assert but for multiple things?

12:54 AtKaaZ: gfredericks, assert, I'll have to recheck that

12:55 gfredericks: &(assert false)

12:55 lazybot: java.lang.AssertionError: Assert failed: false

12:55 gfredericks: &(assert true)

12:55 lazybot: ⇒ nil

12:55 AtKaaZ: does it say the line?

12:55 dnolen: AtKaaZ: you need to seriously rethink that macro :)

12:55 gfredericks: not sure

12:55 AtKaaZ: dnolen thanks, I'll do that for sure

12:55 dnolen: AtKaaZ: I would suggest some improvements but I have to run.

12:56 AtKaaZ: you don't need eval at, step back and first consider what the generated code should look like.

12:56 AtKaaZ: ok

12:56 dnolen: then write the macro that generates that code.

12:57 AtKaaZ: gfredericks, it does seem to show the line, but I think you're right, can only take like 1 param

12:58 gfredericks: AtKaaZ: (defmacro asserts [& forms] (cons 'do (for [f forms] (list 'assert f))))

12:58 s/'assert/`assert/

13:02 AtKaaZ: I'm going to be taking a while to retract my jaw and then trying to understand it, thank you

13:10 nice one, I think I fully understand it now, thanks again, gfredericks

13:12 jweiss: is there no predicate that returns true for any ordered coll type?

13:13 neither coll? nor seq? do that

13:13 gfredericks: AtKaaZ: no probs

13:13 jweiss: ##(doc sequential?)

13:13 lazybot: ⇒ "([coll]); Returns true if coll implements Sequential"

13:13 jweiss: ah

13:13 seangrove: Raynes: No erlang support in refheap?

13:19 silasdavis: if I want a anonymous method to just return a map like #({:a "map})

13:19 how can I do that without evaluating the map

13:21 seangrove: ,(constantly {:a "map"})

13:21 clojurebot: #<core$constantly$fn__2351 clojure.core$constantly$fn__2351@74a32a82>

13:21 seangrove: ,((constantly {:a "map"}))

13:21 clojurebot: {:a "map"}

13:21 seangrove: Or do you mean lazily evaluating the map?

13:23 silasdavis: That work for you?

13:28 silasdavis: seangrove: sort of, then have to choose between (fn [] {}) and #(constantly {})

13:29 I'm surprised there isn't a more elegant way to do it

13:29 seangrove: Why not just (constantly {}) ?

13:29 In fact, #(constantly {}) wouldn't work

13:29 ,(#(constantly {}))

13:29 clojurebot: #<core$constantly$fn__2351 clojure.core$constantly$fn__2351@7ee17e46>

13:29 seangrove: ,((constantly {}))

13:29 clojurebot: {}

13:29 S11001001: do

13:30 ,#(do {})

13:30 clojurebot: #<sandbox$eval133$fn__134 sandbox$eval133$fn__134@7157f95d>

13:30 S11001001: ,(#(do {1 2}))

13:30 clojurebot: {1 2}

13:30 S11001001: everyone forgets you can give one arg to do

13:30 seangrove: Hrm, I'd say constantly is probably clearer, but I don't have strong feelings about it

13:31 silasdavis: seangrove: oh I actually want to use an argument

13:31 seangrove: Ah, ok, I see

13:31 metellus: ,((constantly {}) 1)

13:31 seangrove: Didn't realize that, sorry

13:31 clojurebot: {}

13:32 silasdavis: (fn [c] {:c c})

13:32 is what I want to write

13:32 S11001001: #(do {:c %})

13:32 silasdavis: nothing particularly wrong with that, but seeing as I am using #() for other similar functions it would be nice to keep consistant

13:33 AtKaaZ: ,(ns-resolve *ns* 'source)

13:33 clojurebot: #'clojure.repl/source

13:33 silasdavis: S11001001: yeah that works, feels ever so slightly like a hack though

13:33 I'll use that

13:33 AtKaaZ: weird, I have to do (use 'clojure.repl) sometimes in eclipse/ccw 's repl

13:33 S11001001: silasdavis: why? it would be very bad if #({...}) did it, and acquiring a bunch of opens after # is syntactically wasteful.

13:35 silasdavis: I agree on the first point

13:35 * seangrove remembers back to the great shortage of opens, and how our parents scolded us if we used them after #

13:35 silasdavis: the inner brackets to signify execution is more logical

13:35 S11001001: well you can't have #{, it's already taken.

13:35 silasdavis: but I agree it's wasteful

13:36 given that # is shorthand...

13:36 S11001001: ...for a two-character-prefix readtable lookup.

13:44 mattmoss: :c

13:44 ,(fn? :c)

13:45 clojurebot: false

13:45 silasdavis: can I do a multiple if-let like (if-let [a 1 b nil c 2] ... <something appropriate>)?

13:45 klang: A 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:45 mattmoss: &(ifn? :c)

13:45 lazybot: ⇒ true

13:45 silasdavis: where thinking about it somehting appropriate wouldbe ... <value if a truthy> <value if a and b truthy> <value if a, b, and c truthy> ...)

13:50 mattmoss: &(let [[a b c :as x] [1 nil 2]] (if (apply and x) [a b c] nil))

13:50 lazybot: java.lang.RuntimeException: Can't take value of a macro: #'clojure.core/and

13:50 mattmoss: doh

13:53 &(let [[a b c :as x] [1 nil 2]] (if (every? x) [a b c] :otherwise))

13:53 lazybot: clojure.lang.ArityException: Wrong number of args (1) passed to: core$every-QMARK-

13:54 mattmoss: &(let [[a b c :as x] [1 nil 2]] (if (every? identity x) [a b c] :otherwise))

13:54 lazybot: ⇒ :otherwise

14:06 ppppaul: hey. 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:15 jkkramer: ppppaul: ##(java.io.ByteArrayInputStream. (.getBytes "foobar"))

14:15 lazybot: ⇒ #<ByteArrayInputStream java.io.ByteArrayInputStream@6a5426>

14:20 seangrove: Any tutorials on doing ui's in a functional way? I'm shoving so much state everywhere I'm going to cry

14:21 Anderkent: seangrove: monads!

14:21 technomancy: the first step is to just get it all out of your system; the sobbing often becomes controllable after 5-10 minutes.

14:22 Anderkent: but I was just leaving so I can't expand on that. They're just monoids in the category of endofunctors.

14:24 seangrove: Anyone 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:24 I'm dying for one, and I love the idea of having as much of a declarative approach to ui as possible

14:25 technomancy: seangrove: 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:28 seangrove: technomancy: Looks interesting!

14:28 Trying to keep it in cljs for now

14:34 frozenlock: technomancy: but the important question is: does it have a repl?

14:35 technomancy: frozenlock: I think so; the compiler is implemented in Haskell

14:38 frozenlock: Then I'm happy. I had to go back to language without any repl last week... hopefully never again.

14:39 systemfault: I'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:40 dnolen: systemfault: it's painful to go back ...

14:40 technomancy: frozenlock: never again

14:40 if I'm lucky

14:40 frozenlock: systemfault: you might want to stop while you can go back.

14:40 systemfault: When I was writing C++ for example.. I had a lol.cpp file with a main... to test snippets of code

14:40 dnolen: it's why I can't take languages like Go seriously even tho smart folks seem to like it.

14:40 frozenlock: 'cause you won't be able soon :P

14:40 systemfault: :D

14:41 cemerick: dnolen: BTW, core.match is brilliant. Many thanks. :-)

14:41 dnolen: cemerick: np, hopefully can figure out this AOT issue that's been plaguing it for months - I think we're close on it tho.

14:41 cemerick: sorry, which? Does it not AOT?

14:41 dnolen: cemerick: it possible to create patterns that won't AOT yes

14:42 cemerick: there's a big warning on the repo about that

14:42 cemerick: https://twitter.com/cemerick/status/290880701849554944

14:42 I fix that problem by never AOT'ing. :-P

14:42 dnolen: cemerick: heh, yeah seems like that's not an option for many people

14:42 technomancy: never AOT in libraries; I'm on board with that

14:42 cemerick: so I hear

14:43 dnolen: anyway, just wanted to let you know that you saved my ass again. :-)

14:43 technomancy: I saw some traffic on that non-transitive AOT issue; I wonder if that will ever go anywhere

14:43 dnolen: cemerick: 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:44 seangrove: dnolen: So you split your time between source maps and core.logic - anything else?

14:44 mmitchell: anyone using technomancy's starter-kit? I'm having problems with that, and nrepl

14:44 cemerick: technomancy: CLJ-322?

14:44 * cemerick has the ticket number memorized, unfortunately

14:45 technomancy: yeah

14:45 dnolen: seangrove: core.match, though I haven't committed much to that the past year and a half

14:45 seangrove: dnolen: Epic stuff :)

14:45 technomancy: mmitchell: what's up?

14:45 cemerick: There's a couple of patches on the ticket that work, but, yeah, it's stuck in the mud.

14:46 frozenlock: from 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:46 cemerick: I don't think anyone has the stomach to push serious compiler patches anymore.

14:46 JVM Clojure compiler, that is

14:47 hiredman: that's not true, there just doesn't seem to be any interest

14:47 (from rich and company)

14:48 cemerick: Well, however much that's the case, it's a reinforcing cycle then.

14:48 hiredman: I dunno, maybe that is what you meant

14:48 cemerick: I try to stay out of the speculation business. :-)

14:48 technomancy: it'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:49 cemerick: It needs a champion for whom the feature / bugfix is critical.

14:50 maybe the immutant guys, given jboss'/red hat's deployment model? :-P

14:51 technomancy: maybe someone could hire relevance for a consulting gig where it's an issue

14:52 cemerick: It's only going to be more and more of a fringe problem.

14:52 Oh, datomic is AOT'd. Maybe they'll eventually start needing to use core.match somewhere...

14:59 tcrawley: cemerick: we don't AOT with immutant, and don't recommend it. but we're also blacksheep inside RHT

15:02 cemerick: tcrawley: Sure. Mostly, I'm just trying to bait you. ;-)

15:02 tcrawley: heh

15:02 technomancy: tcrawley: I guess you don't really care about startup time since you just have rolling updates?

15:04 tcrawley: technomancy: 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:04 and that read time is dwarfed by the time to start the required services for the app

15:04 technomancy: tcrawley: sure

15:04 tcrawley: and loading clojure.jar itself in the app runtime

15:06 pjstadig: transitive AOT was at the top of andy's list of most voted for issues

15:19 warz: im 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:20 is one more prefered or common to stick with?

15:20 zilti: warz: Keywords as keys are more performant

15:20 frozenlock: Is your question about string VS keywords, or rather the ordering?

15:21 tokyo_: Is anyone else getting a 403 error on Leiningen install? looks like the amazonaws link is bad...

15:21 zilti: And it's definitely preferred. The order as well

15:21 warz: idk, i guess keywords vs keys. i didnt think about the difference there.

15:21 ive only been learning clojure for 2 days, so that didn't occur to me, yet.

15:21 i liked it because it was less verbose, heh.

15:21 technomancy: tokyo_: works for me; what's the URL you're having trouble with?

15:22 tokyo_: https://leiningen.s3.amazonaws.com/downloads/leiningen-2.0.0-standalone.jar

15:22 zilti: warz: keys are the "left thing" of a map entry, not a type. Almost anything can be used as key.

15:22 technomancy: tokyo_: where did you get that URL?

15:22 it's incorrect

15:22 tokyo_: the lein bash file

15:22 technomancy: where did you get the bash file? =)

15:22 warz: sorry, i meant strings vs keywords. typo'd there.

15:22 tokyo_: github lol

15:22 i just cloned the github entry, went from there.

15:22 do you know what the correct url is? i could just edit it.

15:22 technomancy: tokyo_: I've never pushed that URL to GitHub, can you be more specific?

15:23 tokyo_: sure, gimme a minute to back track here and figure it out

15:23 zilti: warz: No need to excuse ;) So then: Welcome and have fun with Clojure!

15:24 tokyo_: technomancy: https://github.com/technomancy/leiningen/blob/master/bin/lein#L192

15:25 technomancy: tokyo_: LEIN_VERSION there is set to 2.0.0-SNAPSHOT; in the link you posted above it's just 2.0.0

15:25 tokyo_: interesting...

15:27 technomancy: so would this be the proper url? https://leiningen.s3.amazonaws.com/downloads/leiningen-2.0.0-SNAPSHOT-snapshot.jar

15:27 technomancy: tokyo_: for master, yes, but self-install is meant to be used for releases rather than snapshots.

15:28 tokyo_: ah ok

15:28 technomancy: tokyo_: have you tried the install instructions in the readme?

15:28 tokyo_: i have

15:28 although i'm fairly new to this, let me review them one more time

15:30 technomancy: I think you're making it more complicated than it needs to be =)

15:30 tokyo_: technomancy: well i must have done something wrong, i simply redid the install as written and it works

15:31 i have the tendancy to do that :)

15:31 so i'm not surprised

15:31 thx for the advice, all installed now

15:31 technomancy: np

15:35 jweiss: there 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:36 i 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:36 *sorry i mean useless for my purposes, i know it's useful for unit tests

15:37 zilti: Argh. Does anyone know how to compose a korma where clause?

15:37 Seems to be totally impossible

15:39 joegallo: zilti: how about you paste the code you have and tell us what you thought it should do

15:40 nDuff: zilti: the use of macros does make it difficult.

15:40 * nDuff personally threw out korma over composability issues.

15:41 frozenlock: I'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:42 zilti: joegallo: https://www.refheap.com/paste/8700 I did some random stuff which didn't have any effect, so think away all those "list".

15:42 mmitchell: technomancy: 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:01 zilti: joegallo: "IndexOutOfBounds" is what I get

16:02 joegallo: ah, i don't use korma, i was just trying to help you bait somebody else into helping you :)

16:03 silasdavis: in (constantly (f x)) does (f x) get evaluated lazily

16:03 i.e. when the constantly-emitted function is first called

16:04 joegallo: silasdavis: no https://github.com/clojure/clojure/blob/d0c380d9809fd242bec688c7134e900f0bbedcac/src/clj/clojure/core.clj#L1345

16:04 progo: no. Arguments get evaluated at function call.

16:04 zilti: joegallo: My question-ask-credits probably are used up

16:04 `fogus: silasdavis: no. constantly is just a function

16:04 technomancy: mmitchell: the way midje runs things is pretty sketchy

16:04 I am not surprised that it causes problems

16:06 zilti: Macros suck.

16:06 nDuff: zilti: Misuse of them, anyhow, and korma is a poster child for that.

16:07 systemfault: I thought that the thing that makes LISP so powerful is macros..

16:08 technomancy: with great power comes great responsibility

16:08 zilti: Few times this phrase fits so perfectly.

16:08 cmdrdats: technomancy: no, no - with great power comes great technology

16:08 heh :P

16:09 zilti: cmdrdats: Or awful technology. Unfortunately. (spoken for everything, not for Lisp)

16:10 eww, I wrote some truly awesome english words

16:10 hyPiRion: Or barely any technology, depending on what power you have.

16:10 zilti: *awful

16:10 hyPiRion: Surely being the leader of North Korea doesn't give you the power of macros.

16:11 cmdrdats: xD

16:11 zilti: Wow. From great technology to no technology in a few lines :)

16:12 cmdrdats: we must have been talking about macros

16:12 silasdavis: `fogus: so for (def foo (constantly (f x))) does (f x) get evaluated every time foo is called

16:13 hyPiRion: silasdavis: no, only once.

16:13 silasdavis: on the definition of foo?

16:13 joegallo: silasdavis: sortof, it's evaluated before the invocation of constantly.

16:14 since constantly is just a function that takes the return value from (f x) as an argument.

16:14 silasdavis: can I write anonymous function #() with one argument without using that argument?

16:14 AimHere: If you want something repeatedly reevaluated, use repeatedly

16:14 joegallo: you sure can, you write it this was (fn [_] ...)

16:14 s/was/way/

16:15 silasdavis: but not with the # reader symbol?

16:15 amalloy: (inc joegallo)

16:15 lazybot: ⇒ 1

16:15 joegallo: silasdavis: it can be done, but it should not be done

16:15 silasdavis: ok I won't do it, how do you do it?

16:15 joegallo: i'm not telling you how, because you should go with convention on this

16:15 :)

16:15 AimHere: You could just read it and throw it away

16:15 joegallo: it involves comments...

16:15 hyPiRion: silasdavis: #(do % (stuff here))

16:15 amalloy: joegallo: wat

16:16 i mean, you can do it with comments, but that's silly

16:16 seangrov`: 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:16 What is this called?

16:16 hyPiRion: seangrov`: map-vals in useful.map

16:16 hiredman: it is called "a bad datastructure decision"

16:17 seangrov`: hiredman: How so?

16:17 hyPiRion: Thanks, will look for it, this is in cljs though

16:17 zilti: seangrov`: (keys map) and (vals map) and then you can use zipmap

16:18 hiredman: sequential datastructures provide better sequential data access

16:18 AimHere: Perhaps he wants sequential access AND random access

16:19 zilti: &(let [m {:a 1 :b 2 :c 3}]

16:19 (zipmap (keys m) (map inc (vals m))))

16:19 lazybot: java.lang.RuntimeException: EOF while reading, starting at line 1

16:19 seangrov`: 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:19 hyPiRion: Ahh, people need to learn about reduce-kv

16:19 zilti: well that's how it works in my repl, but here it gives an EOF.

16:20 metellus: because you put it across two lines

16:20 rasmusto: zilti: its the multi-line stuff

16:20 zilti: ah I see

16:20 metellus: &(let [m {:a 1 :b 2 :c 3}] (zipmap (keys m) (map inc (vals m))))

16:20 lazybot: ⇒ {:b 3, :c 4, :a 2}

16:20 hyPiRion: &(reduce-kv (fn [m k v] (assoc m k (inc v))) {} {:a 1, :b 2, :c 3})

16:20 lazybot: java.lang.RuntimeException: Unable to resolve symbol:   in this context

16:20 hyPiRion: &(reduce-kv (fn [m k v] (assoc m k (inc v))) {} {:a 1, :b 2, :c 3})

16:20 lazybot: ⇒ {:b 3, :c 4, :a 2}

16:21 amalloy: did you paste in an &nbsp or something, hyPiRion?

16:22 hyPiRion: amalloy: No, I have a Norwegian keyboard which screws up my life

16:23 Alt Gr+space -> nsbp

16:30 seancorfield: arohner: 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:30 arohner: yes

16:30 I can release 0.5 now that the lein-2.0.0-RCs are out

16:31 seancorfield: ah, ok... cool... i can update here at world singles and try it out! :)

16:31 arohner: seancorfield: thanks for the heads up :-)

16:58 seancorfield: lein-daemon 0.5.0 is released

17:03 AtKaaZ: does anyone know how to make counterclockwise in eclipse not automatically put a closing paren every time i type an open paren? ie. ( becomes ()

17:04 jamiei_: 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:05 Anyone able to decrypt? :)

17:05 Bronsa: jamiei_: paste your namespace declaration

17:05 AtKaaZ: something about this I guess: at my_app.routes$loading__4505__auto__.invoke(routes.clj:1)

17:08 bbloom: jamiei_: it's occurring on line 1

17:08 i assume you have a bad ns form

17:08 jamiei_: Bronsa: http://pastecode.org/index.php/view/19014527

17:08 Namespace declarations pasted above

17:08 I'm not sure what's wrong with them

17:09 amalloy: well, the my_app thing will break eventually, though it's probably not your problem yet. it needs to be my-app

17:09 bbloom: jamiei_: gah! so much :use

17:10 jamiei_: amalloy: I might have replaced the real name with my_app to protect the innocent! ;)

17:10 bbloom: jamiei_: anyway, what i always do when my ns form is bad: cut and paste the rest of the file into a temporary buffer

17:10 amalloy: the problem is in the ns form of some "controller" namespace

17:10 bbloom: jamiei_: then do a binary search on your ns form by deleting half of it and seeing if the namespace works

17:10 recurse on that :-P

17:10 amalloy: it probably contains a clause looking like (:use [foo.bar :only baz]) instead of (:use [foo.bar :only [baz]])

17:11 bbloom: amalloy: 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:12 amalloy: oh, or actually i think it's not in an ns form at all. maybe (defn foo bar ...) rather than (defn foo [bar] ...)

17:12 jamiei_: 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:12 amalloy: &(fn foo bar)

17:12 lazybot: java.lang.UnsupportedOperationException: nth not supported on this type: Symbol

17:13 bbloom: amalloy: yeah that sucks too

17:13 good error messages are hard.

17:13 amalloy: yes, (defn foo bar) gives that error message

17:14 jamiei_: you want to look in controller.clj for a malformed defn as above

17:14 bbloom: amalloy: i've made the opposite error too (def foo [x] (bar x)) ; CompilerException java.lang.RuntimeException: Too many arguments to def

17:14 AtKaaZ: for me that gives: IllegalArgumentException Parameter declaration bar should be a vector

17:14 in 1.5.0 RC2

17:14 bbloom: AtKaaZ: ah cool

17:14 jamiei_: amalloy: Good idea, I'll have a look now..

17:14 AtKaaZ: I think they improved it yey

17:15 amalloy: really? i thought they were making that error message less common, not more common

17:17 bbloom: amalloy: what do you mean? the error message is clearer (a bit)

17:18 amalloy: bbloom: 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:18 and that's a much more common mistake IME

17:18 jamiei_: amalloy: All defn's in controller.clj seem to have the parameters specified

17:19 bbloom: amalloy: yeah, error messages are hard... Should be something like "Invalid defn form on line 123. Expected vector of arguments in 3rd position"

17:35 brehaut: haha kickstarter have a url query arg for utf8=✓

17:35 wastrel: i just realized the j in clojure is for java

17:36 frozenlock: I 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:36 bbloom: brehaut: that's built in to rails

17:37 brehaut: bbloom: i can only assume its there to work around some derp hard piece of web tech

17:38 bbloom: brehaut: ie. what else?

17:38 er i mean IE not ie

17:38 technomancy: I've been against full-stack frameworks this whole time, but nobody told me we'd get to use unicode in query args.

17:38 amalloy: well, a very-old ie. halfway modern ones don't need this babying

17:39 technomancy: this is making me reconsider my positions

17:39 bbloom: technomancy: surely there is ring.snowman if you need a library instead of a framework

17:39 technomancy: bbloom: sounds hard for newbies

17:40 bbloom: technomancy: it's easy, just go to http://unicodesnowmanforyou.com/ for instructions

17:40 brehaut: more proof that you cant poiish a turd, but you damn sure can dip it in varnish

17:40 bbloom: lol his expressions just gets me every time

17:40 brehaut: bbloom, technomancy: we just yogthos to put it into luminous and then we tell people to go there

17:40 bbloom: i can't look at this damn snow man for more than 5 seconds without cracking up like a stoner

17:41 brehaut: why is the snowman wearing a fez

17:41 bbloom: brehaut: because fez are easier to kern at small font sizes than carrots

17:41 or top hats

17:41 apparently

17:42 brehaut: a compelling argument

18:15 augustl: are 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:17 I wander what the reason is for ClojureWerkz obsession with singleton connection objects :)

18:20 hiredman: singleton connection objects :(

18:21 augustl: hiredman: in a functional language, even the Java APIs doesn't do that :)

18:22 hiredman: augustl: 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:23 I guess that isn't true

18:24 no it is, then pass a channel around

18:24 to other threads, which is interesting, last I checked channels from the java amqp library were not threadsafe

18:29 I guess they are threadsafe now

18:29 http://www.rabbitmq.com/api-guide.html#channel-threads

18:35 augustl: I 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:40 nightfly: nrepl is probably what you want

18:41 I think I'm getting mine from marmalade

18:41 augustl: nightfly: I'll look that up, thanks :)

18:52 glide: i think my sublime text 2/clojure integration is broken, i can't see clojure in the REPL menu

19:05 think i'll stick to ccw

19:13 bbloom: ,(clojure.string/split "this is a string" #" ")

19:13 clojurebot: ["this" "is" "a" "string"]

19:14 bbloom: odd... if i do that in lein repl i get: Exception Ambiguous match for " \")" by #<Object[] [Ljava.lang.Object;@5280da83>

19:14 augustl: what'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:14 bbloom: augustl: you can just (loop [] (recur))

19:14 break == don't call recur

19:15 technomancy: yeah, low-level direct-to-java code is one of the few places direct loop calls are appropriate

19:15 augustl: blbrown_win3: ah, interesting

19:15 n_b: Would never have thought of that. That's great

19:15 augustl: bbloom, not blbrown_win3

19:16 bbloom: technomancy: 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:17 technomancy: bbloom: I get what clojurebot got?

19:17 augustl: hmpf, the outside of the loop also needs to get a variable obtained inside it

19:17 technomancy: bbloom: oh, lemme try a raw repl; I did it in emacs

19:17 bbloom: technomancy: https://www.refheap.com/paste/8706

19:17 wtf?

19:17 augustl: yay, loop returns when not recuring, awesome

19:18 technomancy: bbloom: ugh; looks like either a reply bug or sjacket

19:18 bbloom: can you open an issue for that and ping trptcolin?

19:18 bbloom: sure

19:19 technomancy: https://github.com/trptcolin/reply/issues/98

19:19 technomancy: thanks

19:37 augustl: hmm. 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:40 technomancy: augustl: I would recommend executors on a thread pool

19:41 augustl: technomancy: looking that up, thanks

20:00 aaelony: I'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:02 bbloom: aaelony: looks like you've got a seq of seqs

20:03 aaelony: probably need a concat in there somewhere :-)

20:03 aaelony: hmmm, concat.. will give that a try, thanks!!!

20:03 bbloom: try (apply concat my-seq) and see if that makes it go away. if so, then you need to figure out where that goes

20:03 aaelony: ok

20:05 that helps. My seq is being treated as a seq that contains a seq of characters...

20:05 thanks

20:06 bbloom: aaelony: ah, ok, if you have a seq of characters, you can use (apply str ...)

20:06 ,(apply str [\a \b \c \d])

20:06 clojurebot: "abcd"

20:08 aaelony: thanks, i have an (apply str …) in my function actually.

20:08 in any case, that narrows it down. should be solved soon. ;)

20:19 ah, 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:20 ,(doall (apply str (interpose "," [1 2 3 4 5 6 7]) "\n"))

20:20 clojurebot: "clojure.lang.LazySeq@ffdbd0b3\n"

20:21 aaelony: (str (apply str (interpose "," [1 2 3 4 5 6 7])) "\n") does what i wanted

20:21 thanks

20:24 Sgeo_: The Seaside book calls REST an "Advanced topic"

20:25 technomancy: Seaside is written by a guy whose blog is titled "HREF considered Harmful"

20:25 so ... take it with a grain of salt =P

20:26 * Sgeo_ thinks continuation-based web frameworks might be interesting, at least in some circumstances

20:26 Sgeo_: 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:26 technomancy: if uptime isn't critical and you never have to scale beyond one box I might consider it

20:26 bbloom: Sgeo_: more trouble than they are worth: turns a serialization problem into a resource management problem

20:28 Sgeo_: 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:29 bbloom: i don't like anything that hides an unavoidable truth: there is a slow network between me and an unreliable client

20:30 that rules out anything that blurs the lines between client and server or between multiple requests

20:30 it's a neat trick

20:35 Sgeo_: AIDA/Web is RESTful I think

20:56 muhoo: hmmm.. rabbitmq or aleph for an async service

20:57 leaning towards aleph and json over xhr or websockets

20:57 brehaut: json not edn?

20:58 muhoo: one of the clients will be android

20:58 no clj there

20:58 brehaut: ah :/

20:58 not that you have to use clj to use edn, but nevertheless

20:59 Sgeo_: Someone implemented a Clojure REPL for Android

21:01 cantsin: Sgeo_: but is it production ready?

21:02 amalloy: it's barely even development-ready

21:02 (is my understanding; i'm not an expert on it)

21:12 muhoo: it's bloated and not appropriate for this app

21:13 i have a clojure hammer, but, sadly, not everything is a nail

21:13 aleph should work as a server tho, so yay

21:31 tomoj: bbloom: (defn word? [var] (:factjor.core/impl (meta var))) ?

21:31 bbloom: tomoj: what about it?

21:31 tomoj: oh, nevermind, it's on the fn I see?

21:32 bbloom: tomoj: i've got another branch where i'm fleshing out the runtime types with an explicit Word type, Primitive type, IWord protocol, etc

21:32 but 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:34 tomoj: "This one should be obvious" - is that a joke or does it mean "obvious given the previous two anaphoric conventions"?

21:35 bbloom: haha the later, and yes, it's also a joke :-)

21:36 tomoj: the runtime branch doesn't have applicative currying yet for clojure interop

21:36 mainly b/c implementing the Fn interface is a pain in the ass

21:36 warz: with a map, is there some sugar for reaching into embedded maps? something instead of (:foo (:bye {:hi 1 :bye {:foo 2 :bar 3}}))

21:36 tomoj: what, (word x y z) == (((word x) y) z) ?

21:36 bbloom: warz: ##(doc get-in)

21:36 lazybot: ⇒ "([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:37 bbloom: warz: and, the very awesome, ##(doc update-in)

21:37 lazybot: ⇒ "([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:37 warz: awesome!

21:38 bbloom: lastly assoc-in for the most common usage of update-in

21:38 tomoj: oh!

21:38 bbloom: tomoj: ?

21:38 tomoj: I just realized from "hash-maps will be created" that that's the difference between a map lens and a vector lens

21:38 so you can't just have one associative lens

21:38 bbloom: ah, heh

21:38 you can't have generic lens in general

21:39 i might want an interleaving of maps and vectors and double-lists and other shit depending on my data structure

21:40 tomoj: sure

21:41 and they don't implement Functor, and we can't easily extend it to them all

21:41 hopefully they all can be reduced, so if you want a reducer out.. :(

21:42 well.. if they support #(into (empty %2) (r/map %1 %2))

21:42 ?

21:44 that's for applying the update everywhere in the collection

21:45 DoubleList is an IPersistentStack which you can use in weird ways

21:47 but you mean something like, a lens that applies an update inside a split of a counted double list?

21:47 interesting, counted double list is also Associative Int v

21:48 you can assoc at -1..

22:09 I wonder why ft-split-at's interface differs from split-at's?

22:13 seems the convention from split-with is to put the 'distinguished element' in the [_ post] ?

22:14 bbloom: wow. 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:20 tomoj: get/set pairs suck in java

22:20 you have to manually compose them

22:22 (comp :foo :bar) is nice

22:23 assoc-in/update-in seem to paper over lack of composition on the setter side

22:24 course it's nowhere near as bad as java even without those

22:27 bbloom: tomoj: update-in doesn't really paper over it. composition on the setter side is just sequence concatenation

22:27 ,(vec (concat [:foo] [:bar]))

22:27 clojurebot: [:foo :bar]

22:27 tomoj: hehe

22:28 warz: im 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:28 oops premature enter, haha. rest incoming.

22:28 tomoj: that's fine I suppose if you have only associatives, and want hash maps on nil

22:28 :)

22:29 warz: im 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:29 would a resursive function be what im aiming for here?

22:29 gfredericks: warz: my first thought would be loop; which I guess a tail-recursive function can accomplish

22:29 bbloom: warz: you want to make multiple requests to the server?

22:30 warz: bbloom, well multiple requests would be involved, but id like the function to encapsulate that and return 1 list

22:31 gfredericks, hmm ok ill have to google-fu that

22:31 bbloom: warz: ok well break it down into little pieces. start with a single function that gets the ids from an individual page

22:31 warz: thats what ive got currently, and i was trying to visualize how to move forward

22:31 bbloom: warz: so you're in a tricky spot because laziness and IO generally don't go well together

22:32 so you'd use something like doseq

22:33 but you could use lazy-seq to make a recursive function that walks each page and returns a sequence of pages

22:33 then you could use mapcat to grab the ids from each page and concatenate them together

22:34 whenever you have a series of things, try to figure out how to get a sequence of them

22:34 clojure looooves sequences

22:35 tomoj: seems like iterate might work?

22:35 warz: hm

22:35 bbloom: tomoj: iterate doesn't have a termination condition

22:35 tomoj: right, take-while

22:36 bbloom: tomoj: except that won't work with side effects b/c of chunking, no?

22:36 iterate says functions must be free of side effects

22:36 tomoj: oh, interesting

22:37 bbloom: lazy-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:37 something like that

22:37 obviously broken syntax in there

22:39 warz: ok, this is like day 2 with clojure for me, so ill have to research all the things mentioned here :)

22:39 tomoj: I wonder what the side-effect problem is

22:39 warz: i know what youre both talking about, but never used them yet

22:40 tomoj: &(dorun (take 3 (map println (vec (repeat 4 3)))))

22:40 lazybot: ⇒ 3 3 3 3 nil

22:40 tomoj: &(dorun (take 3 (iterate #(do (println %) %) 3)))

22:40 lazybot: ⇒ 3 3 nil

22:41 tomoj: concurrency?

22:41 (my point is that the seq iterate returns is not chunked)

22:41 bbloom: tomoj: yes, but that's an implementation detailo

22:42 tomoj: maybe a later version will add chunking, and then you'd say (first (iterate ...)) and you'll get 20 side effects

22:42 generally, it's a bad idea to do side effects at all inside lazy io

22:42 tomoj: yeah :(

22:42 you mean lazy io is bad?

22:43 bbloom: yeah, 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:43 tomoj: but what else would you do here? a reducer and implement r/take-while?

22:44 bbloom: quite honestly, i think loop/recur is perfectly reasonable here

22:44 if you have potentially 375093573535 pages, then maybe lazy io makes sense

22:44 but it makes me uncomfortable :-P

22:45 it 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:45 tomoj: so what (fn get-all-pages [url] (loop [url url] ... (recur next-url) ...)) ?

22:46 bbloom: that loop would need an accumulator for the pages

22:46 tomoj: oh right, naturally :)

22:46 bbloom: and i might just use reduce since it's not lazy in practice

22:46 tomoj: but now you have to go change that function to insert e.g. exponential backoff or just rate limiting?

22:46 bbloom: or (into []) or something

22:47 heh yeaaah it can get reeeaaaallly hairy if you want to be robust

22:48 high performance networking is complicated for plenty of other reasons too

22:48 what about pipeling?

22:48 for example

22:48 tomoj: I guess (fn get-all-pages! [url get-page] ...) then you can just rate-limit or retry in what you pass in

22:49 bbloom: this is why i generally dislike most friendly REST wrapper APIs

22:50 particularly in OOP style, where you have user.friends.first.photos or something does some crazy remote call magic voodoo

22:50 tomoj: yikes, I forgot about ActiveResource (I think they had that?)

22:50 bbloom: :-/ yeah

22:51 tomoj: I remember thinking something vaguely similar to "awesome!"

22:51 bbloom: i much prefer a narrow and flexible network API like the underlying SQL driver would give you

22:51 take a look at datomic for example, it has basically one method: transact! or whatever it's called

22:52 and it handles the connection pool internally

22:52 i guess datomic is doing something lazy-io-ish on read

22:53 lazy reading is not super bad. it's lazy mutations that are reeaaaally bad

22:53 lazy reading works in datomic b/c of immutability

22:58 warz: haha man, i thought this would be simple.

23:02 Sgeo: Could use an atom?

23:02 A bit of imperative programming

23:02 ?

23:06 bbloom: warz: it is pretty simple, tomoj and i are just discussing philosophy :-)

23:06 warz: 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:08 warz: alright ill see what i come up with

23:10 muhoo: bbloom: have you used shorleave, or is that more heavyweight than you want?

23:11 bbloom: don't use it. havent studied it deeply

23:15 gfredericks: what's the reasoning behind keywords not taking metadata?

23:16 bbloom: gfredericks: so that identical? works and is fast

23:16 gfredericks: that's a decent reason

23:16 tomoj: if that weren't true, would there be a reason to have keywords save for trimming a \"?

23:17 (and that IFn isn't a protocol so String doesn't participate..)

23:17 gfredericks: it 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:24 bbloom: tomoj: there are other differences

23:24 keywords are interned

23:24 which is also necessary to make identical? work

23:25 keywords are INamed, so name and namespace work

23:26 it's also useful to have the keyword? predicate for differentiating sentinel values from user supplied strings

23:26 most languages only have strings

23:26 some languages add symbols

23:26 and keywords are just symbols that always resolve to themselves

23:26 they are a special (and very common) case of symbol

23:27 tomoj: ah, namespace, yeah

23:28 wow http://comonad.com/reader/2013/algebras-of-applicatives/

23:30 systemfault: I'm really beginning to find clojure sexy

23:31 titanix: Anyone who does not, does not know the definition of sexy programming! :P

23:32 Sgeo: I don't find Clojure stacktraces to be sexy.

23:32 Nor the exception system

23:32 Nor the lack of TCO, and lack of first-class continuations.

23:34 bbloom: Sgeo: some of us find solving problems and building things to be sexy

23:34 Raynes: I don't think errors are supposed to be sexy.

23:34 And I don't remember a situation where I've wanted TCO. Recur is fine for me.

23:34 titanix: Lake of proper TCO is related to JVM, said hickey in a presentation.

23:34 bbloom: Raynes: i used a trampoline once... and then i realized that i was smoking crack

23:34 Raynes: Lack of TCO effectively does not matter, since we have recur.

23:35 bbloom: Was it good crack?

23:35 bbloom: Raynes: is there any other kind?

23:35 Raynes: lol

23:44 mattmoss: I'm blanking... TCO?

23:45 TimMc: tail call optimization

23:45 mattmoss: ah, ok

23:45 mthvedt: TCO always felt too much like magic to me

23:46 if i'm relying on the virtual machine not to blow the stack, i like making it explicit

23:54 warz: well damn, nevermind about that twitter api tool. their api requires oauth for everything, now.

23:54 must think of something else simple to write, now.

23:56 frozenlock: Grrrr... 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.

Logging service provided by n01se.net