1:29 nonuby: clj-schema looks interesting, but there before that I have to co-erce the data, .e.g imagine a json endpoint, the one of key of the map should have a datetime value, so first step is check that its datetime string, second step is coerce into a datetime or joda instace, third step clj-schema validates the real map. is there anything that covers the first two inclusive of the third
1:47 tieTYT: is it a good practice to mark all my side-effect functions as dynamic so I can bind them for testing purposes?
1:53 nightfly__: That sounds like a pretty bad practice
2:01 avishai: hu
2:01 suppose i need worker threads
2:01 agents can do that, but it doesn't feel natural
2:01 should i just use java executors?
2:31 muhoo: is there some magick required to get lein-cljsbuild to see cljs sources? i'm looking in the jar, the cljs files are there, and yet, i'm getting goog.require errors
2:32 auugh, nevermind :-/
2:32 * muhoo curses file system namespace segmenting grr
2:52 tomoj: avishai: yes
3:56 I want a programmer's thesaurus
3:56 flu-: rosetta code?
3:59 tomoj: that's cool, but I just mean domain words
3:59 basically I want a book that thinks for me I guess :(
3:59 flu-: heheh
3:59 then we'll all be out of a job
4:02 spoon16: dependencies resolved via s3-private-wagon do not get cached in ~/.m2
4:04 tomoj: hmm.. my guess is that most programmers will conclude that the chinese room is absurd very soon after encountering it
4:05 I'd like to think that's because they understand something searle doesn't.. :/
4:44 jjs: Wow. I just tripled my framerate by switching from `lein run' to `lein trampoline run'
4:58 swks: testing from emacs(sorry guys, just testing)
5:02 unsymbol: testing 1-2-3.
5:02 callen: jjs: framerate of what?
5:02 swks: messaging
5:02 can't believe that emacs so powerfull
5:08 jjs: callen: this OpenGL thing I'm working on. Currently streaming CPU-generated (and CPU-bound!) pixel data to the GPU
5:09 tomoj: odd
5:09 why should trampoline help?
5:09 I thought the only difference was whether another JVM was left sitting around
5:09 swks: :q
5:11 jjs: It could have something to do with how much memory is available to the program, but the memory I'm mapping is directly (and natively) allocated by the GPU driver... so it shouldn't be part of the JVM heap...
5:11 callen: that is pretty damn strange
5:11 stranger still is doing graphics work in the JVM :P
5:12 jjs: No, that shouldn't do it, either... top reports resident memory being stable ~480MB
5:13 callen: Why not? >:D
6:09 tomoj: I wrote "In reality, a clock never ticks. After a tick there is a new clock."
6:09 I think the epochal time model has destroyed my brain
6:15 wink: lol
6:15 I prefer to exchange my watch every second, this is I why I can't support atomic date times?
6:15 *not
6:16 tomoj: hah AtomicDate
6:16 don't tell rich
6:32 samrat: Raynes: tried using least.authorize but I'm getting {:error 13, :message "Invalid method signature supplied", :links []}
6:33 Raynes: I did exactly as the readme says
6:37 tomoj: "(ns core.async"
6:37 wait, what?
6:38 oh I guess somebody did `lein new core.async`
7:23 clojure-new: Hello.
7:25 naeg: hi clojure-new
7:25 clojure-new: I'm trying to make cond wrapper macro, like (defmacro [test body] `(cond (= ~test :predefined) (bla bla) ~@body))
7:26 I want body in format of (:test (bla bla) and i want expand it to (= test :test) (bla bla)
7:26 Is it possible?
7:26 (:test (bla bla))*
7:27 Oh wait, ((:test (bla bla) (:test2 (bla bla)), right.
7:27 ((:test (bla bla)) (:test2 (bla bla))) It's so hard without paredit.
7:28 Let me write a paste.
7:31 https://
7:31 The questions is how can i transform ((:test1 (bla bla)) (:test2 (bla bla))) into cond args?
7:32 ,(map #(list (list '= 'message (first %)) (list (last %))) '((:test1 (bla bla)) (:test2 (bla bla))))
7:32 clojurebot: (((= message :test1) ((bla bla))) ((= message :test2) ((bla bla))))
7:33 clojure-new: But it still wrong format for cond.
7:33 After @ it becames ((= message :test1) ((bla bla))) ((= message :test2) ((bla bla))).
7:33 I need (= message :test1) (bla bla) (= message :test2) (bla bla)
7:34 ,(map #(list (list '= 'message (first %)) (last %)) '((:test1 (bla bla)) (:test2 (bla bla))))
7:34 clojurebot: (((= message :test1) (bla bla)) ((= message :test2) (bla bla)))
7:34 clojure-new: One step closer.
7:36 @(((= message :test1) (bla bla)) ((= message :test2) (bla bla))) => ((= message :test1) (bla bla)) ((= message :test2) (bla bla)) => ? => (= message :test1) (bla bla) (= message :test2) (bla bla)
7:36 Can you tell me what that "?" should be?
7:38 naeg: clojure-new: how about telling us what the actual problem is and giving a concrete example?
7:39 in like on sentence
7:39 one*
7:39 IamDrowsy: clojure-new: are you looking for something like case
7:39 ,(doc case)
7:39 clojurebot: "([e & clauses]); Takes an expression, and a set of clauses. Each clause can take the form of either: test-constant result-expr (test-constant1 ... test-constantN) result-expr The test-constants are not evaluated. They must be compile-time literals, and need not be quoted. If the expression is equal to a test-constant, the corresponding result-expr is returned. A single default expression can foll...
7:39 Okasu: naeg: https://
7:43 clojure-new1: naeg: yes, like okasu said, i want to make something like wrawpper aroud cond
7:44 IamDrowsy: thanks, i'll take a look.
7:44 naeg: it pretty much looks like case
7:44 IamDrowsy: the doc string is quite verbose... just look at some examples at clojuredocs
7:45 naeg: https://
7:46 clojure-new1: thank you guys, its exactly what i wanted.
7:56 ddellacosta: wow, I'm just learning ClojureScript and I've come up against trying to pass object arguments to JS constructors…how do I do this in ClojureScript idiomatically? I'm finding a lot about using .strobj, and then things saying you shouldn't do that...
7:58 seems like this was getting discussed a long time ago, so I'm guessing there is a natural way to do it these days...?
8:00 ah, found it I think, cljs.core/js-obj
8:18 jugimaster: i'm new to clojure.. can i get by without having to touch maven/leiningen?
8:19 llasram: If you're a masochist, sure
8:19 jugimaster: :p
8:19 it's just that i come from a java background, and i remember maven being a massive, bloated pain in the butt
8:19 llasram: The little I've had to touch it has been pretty bad
8:20 jugimaster: mostly kind of useless too
8:20 llasram: Leiningen however is hands-down the best build/project tool I've ever used for any language
8:20 jugimaster: yeah.. so it seems a bit contradictory that something that's a bloated pile of shit in the java world, would suddenly be a vital, lovely part of every project's infrastructure when working with clojure
8:20 llasram: ? Leiningen has nothing to do with Maven
8:21 jugimaster: what about ant?
8:21 no? hm
8:21 i thought it was based on maven
8:21 llasram: It used to use the dep-resolution parts of Maven, but not even that anymore
8:21 jugimaster: hm.. well, i guess i should take another look at leiningen.. but iirc, it wants you to work within a set project structure etc.. ?
8:22 basically i'm just wondering how.. "necessary" lein is
8:22 llasram: Yes, but it's entirely flexible
8:22 Well
8:22 Clojure is just another Java library, packaged as a JAR
8:22 jugimaster: mmm
8:22 llasram: If you'd rather wrangle JARs some other way / by hand
8:22 you can do that
8:22 But you're causing yourself a ton of unnecessary pain
8:23 jugimaster: yeah so.. lein's main benefit is dep handling?
8:23 kind of like PIP for python
8:23 ?
8:23 i'm kind of confused about whether i "should" use clojure or golang
8:24 Foxboron: jugimaster: depends IMO
8:24 llasram: Think of it as more like a unified pip+virtualenv+ipython
8:24 jugimaster: but somehow i get the feeling that i'd like clojure's syntax better
8:24 hmm
8:24 Foxboron: Go is the same old C-syntax. Boring IMO. Clojure got this fancy LISP syntax which is "new" and interesting
8:24 jugimaster: sounds vaguely good :p
8:25 yeah well.. go's syntax looks just about decent enough.. but some C-likeness is leaking through and it scares me :p
8:25 for example some pointer stuff, which i have no clue about
8:25 i guess Go is more performant than Clojure though?
8:26 how reliable/kick-ass/lovely is http-kit?
8:31 scottj: jugimaster: http-kit is not widely used, yet.
8:31 jugimaster: yeah but should it be?
8:32 i mean, is it lovely? :p and "production-quality"?
8:32 or production-ready, etc
8:33 scottj: jugimaster: idk. I think the super-fast rewrite is very recent. rss miner, the site by the author, is the only one I know of that uses it but I'm not on the http-kit mailing list.
8:33 jugimaster: hmm
8:33 well, what would clojure people use, if you needed web sockets and asyncy stuff, if not http-kit?
8:35 it's kind of scary though, that if working with clojure, maybe i'd end up having to haul shitloads of useless JARs around, just so my app would function (or even start)
8:36 a big problem on the java side is whatever actually useful lib you might want to use depending on like a dozen commons-whatever.jar -shit-droplets
8:36 sooo.. is it possible to keep clojure projects "neat"?
8:37 with python it's lovely that practically everything i use just get slurped into the environment by pip, and it's all just python source code.. combined with whatever C-libs might get put in place - but i don't really have to mind that
8:38 llasram: That's why you use e.g. Leiningen. It pulls all the deps together. Build uberjars to deploy, bundling all your dependencies into one artifact
8:39 jugimaster: mmm
8:40 Foxboron: jugimaster: depends if you use venv or not. Sometimes you get dependency errors with pip.
8:40 jugimaster: sure, but i haven't run into any trouble yet myself
8:40 Foxboron: well really.
8:40 decaf: try working on an 64 bit windows 7
8:41 jugimaster: so can i sweep all the bloated bloatjars under the rug somehow, so that they wouldn't bother me with their presence? :p
8:41 Foxboron: jugimaster: you don't normally mind them at all. they just sit there.
8:41 jugimaster: hm
8:42 yeah i know, in a way.. i'd just like to keep them separate from my "actual projects" somehow
8:42 like, a project would be only the source code and resources that belong to the app _itself_.. and all deps would be somehow separate
8:42 llasram: You never actually see the JARs. The get background downloaded and cached -- usually in ~/.m2/ -- but you rarely need to even think about deps you aren't directly using yourself
8:43 You list your immediate deps, and that's it
8:43 Everything else is transparent, and your project only contains your source
8:43 jugimaster: ah right.. maven2.. back when i last used maven on a java project.. that .m2 directory ended up with a total fuckload of useless jars, eagerly gathered by maven
8:43 it just feels dirty
8:44 llasram: It's just a cache. Do you get upset about your OS filling your RAM with "dirty" disk blocks?
8:44 jugimaster: ok, so, without lein/maven hiding all that JAR shit somewhere, it's just a pain to manage the deps of whatever you might want to write?
8:44 :p
8:45 llasram: Without easy dependency management, then dependency management is not easy. Yes
8:45 jugimaster: :p
8:47 i keep repeating myself a bit.. but it's just that on python, even if you don't use pip, it's still like, cleaner to work with your deps manually.. mostly because typically one library is just one library, and doesn't have lots of useless deps to be lugged around with it.. basically, i guess my problem boils down to all those useless commons-whatevers that were stuffed into practically every java project i remember
8:48 in java projects, it was just easier to "include ALL the jars!" and usually just have your app work, without figuring out which jars it _actually_ needs
8:48 aand i guess as a result of that, something like maven was born
8:49 it was like an.. "at-least-seemingly-necessary evil" that people just lived with
8:50 llasram: Here's my take: environments naturally encourage libraries/modules to be of such granularity that the number/complexity of libraries is just below the threshold of pain
8:50 The experience with granularity across environments is not necessarily portable
8:50 jugimaster: except that java didn't.. that shit got way out of hand
8:51 llasram: Maven/Ivy may put you in XML-hell, but they definitely keep dependencies in order
8:51 jugimaster: but i guess.. if clojure apps tended to use some "new standard tools" that didn't have reams of unnecessary dependencies.. then that would be nice
8:51 for example, is hibernate a standard tool on the clojure side?
8:52 llasram: No
8:52 jugimaster: ok, what's replaced it?
8:52 Glenjamin: jugimaster: what concerns you about these "unnecessary dependencies" ?
8:52 jugimaster: Glenjamin: it's annoying to have to have them around
8:52 Glenjamin: oh, just read up - i think you just had this conversaion :)
8:52 jugimaster: :P
8:52 maybe
8:53 Glenjamin: dependencies = code i didn't have to write = good
8:53 llasram: AFAICT most people using Clojure with relational DBs don't use an ORM
8:53 jugimaster: Glenjamin: yeah, but "a bunch of commons-turd.jars that nothing in this app _actually needs/uses_" is Bad.. :p
8:54 Glenjamin: why?
8:54 clojurebot: why is the ram gone is <reply>I blame UTF-16. http://
8:54 jugimaster: because they shouldn't be there?
8:54 Glenjamin: if the cost of having them there is greater than the benefit of using whatever depends on them, then sure
8:54 but i don't believe that is the case
8:54 jugimaster: it makes sense that "code i didn't have to write" would be good.. assuming it's good code, and does exactly what you needed, of course
8:55 yep
9:18 xificurC: hi, I'm a little puzzled here, if I downloaded and installed leiningen did I also get the lastest version of clojure?
9:19 also could you point me to the current most used emacs+clojure choice?
9:19 llasram: xificurC: From the JVM perspective Clojure is just another library. Leiningen will download whatever version of Clojure a project specifies for that project to use
9:20 xificurC: llasram, ok thanks. What about emacs, do people use slime for clojure?
9:21 scottj: xificurC: people are moving to nrepl.el
9:21 llasram: Yah
9:21 Yah on what scottj said, to clarify
9:21 Use Emacs 24 and the builtin package manager. You'll need to add Marmalade as a package source, but then you can use `M-x package-list-packages` to install clojure-mode and nrepl.el
9:23 xificurC: cool I uesd nrepl before so I might be able to install it on this pc too
9:23 thanks!
9:23 llasram: np!
9:24 xificurC: do you guys recommend these settings to be added https://
9:25 llasram: Those are personal decisions you will need to make yourself :-)
9:26 xificurC: meh I never liked paredit
9:26 llasram: Then you are in the minority, sir
9:27 It took me a little getting used to at first, but now I'm not sure how anyone programs in a sexp-based language w/o it
9:27 tomoj: llasram: really? or are we just a very vocal minority :)
9:27 I still owe lau a screencast I think.. :/
9:28 xificurC: llasram, I dont see a problem finishing up my parens right. Maybe editing the code is easier with it?
9:28 llasram: tomoj: Almost everyone I know who has stuck with Clojure / been successful with it uses structural editing
9:29 tomoj: I should just record myself for a bit, I always wanted to do a nice tutorial screencast
9:29 llasram: xificurC: Yeah, there's two parts IMHO. (1) You just don't need to ever even worry about mis-matched parens. It never happens, so you stop even thinking about it
9:29 tomoj: just watch someone skilled use paredit, you'll see :)
9:30 llasram: (2) You stop editing your code as lines and instead purely as sexps. You can change structure in a way which makes sense for the language syntax with just a small collection of structural primitives
9:30 tomoj: and navigate
9:30 xificurC: I'd probably need to sit next to a heavy emacs user to learn all the editing tricks
9:31 tomoj: though I feel like getting good at navigation is a big investment, I still think I'm much clumsier navigating that the ideal paredit user after.. years
9:31 scottj: xificurC: maybe check this out http://
9:33 xificurC: ill take a look scottj thanks
9:34 jugimaster: so what do clojure folks use instead of hibernate?
9:34 llasram: SQL
9:34 jugimaster: jdbc?
9:34 is there anything like SQLAlchemy?
9:34 it's great
9:35 llasram: Korma is probably the closest, but it has several detractors as well: https://
9:36 xificurC: even strings close up? I dont remember that happening a couple months ago
9:50 dhl: jugimaster: Have you checked out ClojureQL? http://
9:53 xificurC: paredit-splice-sexp-killing-backward <-- lovely name that is
9:57 I dont understand why programmers dislike lisps. I'm no programmer and I love it
9:59 r0bglees0n: xificurC: i dont have an impression that programmers dislike lisps
10:03 xificurC: r0bglees0n, I feel like lisps arent popular enough. You see java, c#, python, ruby and such everywhere but not much common lisp, clojure, scheme or the like
10:03 hyPiRion: r0bglees0n: I have an impression that some programmers disklike the parentheses because there are so many of them
10:05 Glenjamin: sometimes when i line ends in ))))))) i :(
10:05 hyPiRion: I'm happy as long as I have my rainbow parens
10:06 Glenjamin: i really need to switch to a better editor
10:07 hyPiRion: Glenjamin: what are you currently using?
10:07 Glenjamin: sublime
10:08 hyPiRion: Well, it does have some plugins, doesn't it?
10:08 Glenjamin: yeah, but doesn't have anything that does rainbow
10:08 it's ok, but i should really try and switch to emacs for clojure
10:09 hyPiRion: Well, you should give it a try at least
10:10 kmicu: xificurC: Justin Bieber is popular, does that mean that it is good? #popularenoughsyndrome
10:11 jugimaster: dhl: that looks promising, thanks!
10:12 xificurC: kmicu, of course im not saying everything popular is good, im just often frustrated when something good remains unknown or underground
10:12 kmicu: Glenjamin: https://
10:12 dhl: jugimaster: :-)
10:12 Glenjamin: kmicu: i'm using that, it's kinda buggy but better than nothing :)
10:12 jugimaster: :p
10:20 kmicu: Glenjamin: You can always try to migrate to https://
10:29 swks: hello there
10:30 hyPiRion: 1hey
10:30 swks: feeling frustrating, more than 2 hours trying to figure out what's wrong with my emacs config
10:30 trying to set it up ready for clojure development
10:30 http://
10:31 doing everything line by line, but getting symbol doesn't recognized exceptions
10:32 hyPiRion: On the configure emacs-part?
10:32 swks: Maybe it's something wrong with repl
10:34 kmicu: If you are a fresh emacs user you should try some OOTB configs like https://
10:35 And you can start coding clojure in emacs in 5 minutes.
10:36 swks: kmicu: thanks, looks AWESOME!
11:15 m0smith: hi
11:16 Is it possible to treat am interface (ILookup) as a protocol?
11:16 Basically I have an object I want to be able to treat as a "map"
11:19 bbloom: m0smith: i'm not sure what you're asking about RE interfaces vs protocols, but it's actually quite a lot of work to provide a correct implementation of all the map interfaces. if you just want ILookup (and not, say, equality and seq and all that) then just read the docs for deftype
11:23 Glenjamin: you mean defrecord?
11:32 alandipert: m0smith: you can't extend-type an interface to your class, sadly. you can implement ILookup with reify and make a function that converts your objects into franken-maps, or you can make a full-blown type as bbloom points out. (http://
11:33 m0smith: generally if i need java objects to be associative i will convert them to maps via reduce, bean, or similar
11:36 pppaul: anyone in here use emacs live?
11:37 i've been using starterkit for a few years, just started playing with live… wondering if anyone in this channels has any thoughts on it
11:41 * kmicu has good thoughts
11:46 rhickey: there are now docs for core.async alt and async (but impls still wip) for those following along
11:48 bbloom: rhickey: cool! just the docstrings right now? or is there a broader overview somewhere? a design doc or something
11:50 rhickey: there are lots of design docs on my machine
11:51 I haven't put into a narrative for users yet
11:51 but basically its CSP-like channels, with thread blocking and inversion-of-control parking impls
11:52 the latter allowing for high-connection count servers on the JVM and use by CLJS wherever it runs
11:53 bbloom: excellent. dnolen & i and a few others were already plotting a CLJS port in here yesterday :-)
11:53 rhickey: hopefully the death of callback hell
11:53 the team will probably be doing a cljs version, and I hope to jugger the code so a minimal amount of cljs-specifics will be needed
11:53 jigger
11:54 So you should ping Timothy Baldridge to coordinate for cljs if you want to help out
11:54 bbloom: ok, even better! thanks
11:55 rhickey: cljs will be trivial, no locks needed
11:56 m0smith: alandipert: Thanks. The problem I have is I want to not modify the original object. It implements an interface but I need to keep the original implementation to pass back
11:56 rhickey: but same design and engine, queues of parked callbacks are used even in the blocking version, blocking is just at edges
11:56 bbloom: yeah, I think that the IOC stuff will be absolutely killer for CLJS
11:56 m0smith: What I really need to to be able to build a protocol from an existing interface
11:57 but I have not pried openthe protocol black box to see what is inside yet
11:58 rhickey: we'll also move to FJ pools on the parking JVM version
11:58 pppaul: where can i read the docs for core.async?
11:58 bbloom: pppaul: https://
11:59 rhickey: I saw there were some questions about scheduler etc for cljs, that won't be necesary
11:59 y
11:59 pppaul: i guess the tests are the docs
12:00 rhickey: pppaul: it's work in progress, not for consumption yet if you don't want to read code
12:00 pppaul: i like reading code
12:00 rhickey: tests are not docs, there are doc strings
12:00 feedback for which is welcome
12:06 ok, gotta run, hopefully in a few days it will be ready for more tire-kicking, including some narrative
12:07 pppaul: docs seem good, though i still have little idea as to how to use this.
12:07 Okasu: Hi, trying to create table using korma connection but failing, https://
12:10 bbloom: pppaul: i think that this golang video is a good intro https://
12:10 pppaul: thanks. watching
12:11 juxovec: hi
12:11 do any of you use Luminus (Clabango)?
12:11 Have you ever seen: Exception in thread "main" java.lang.Exception: Unable to resolve symbol: context-lookup in this context (tags.clj:67)
12:13 wink: juxovec: could you pastebin some code? :)
12:14 juxovec: i have no clue which part of my application causes this problem
12:14 exception is from clabango 67 https://
12:14 wink: juxovec: looks like if/endif, yea
12:15 I'd check the templates first
12:15 juxovec: yes, there is {% if message %} {{message}} {% endif %} in my templates
12:16 this is only if in my templates at all
12:19 wink: juxovec: are you using it any different than by using render in layout?
12:20 otherwise no clue, sorry
12:22 juxovec: when I remove posted snippet problem disappears
12:22 wink: maybe you managed to get a non-default whitespace in there?
12:23 or it can't do singleline? :P
12:23 I'm poking in the dark here
12:29 tomoj: hmm.. death of callback hell? OK. but aren't we just in CSP limbo? :)
12:29 I still need to read hoare
12:30 s/OK./yes!/
12:30 dnolen: brainproxy: pushed out mori 0.2.0 to npm
12:33 bbloom: tomoj: i'm still not sure why you are so negative on CSP
12:33 tomoj: I chose "limbo" in an attempt to not be so negative
12:33 bbloom: negative connotation to me :-)
12:34 tomoj: well, yeah, it ain't heaven
12:34 clojurebot: Huh?
12:35 tomoj: suppose you could get a lazy seq of mouse events w/ batik. abuse of lazy seqs?
12:35 well it wouldn't really be lazy huh, but a seq at least
12:36 bbloom: seqs are defined by two operations: first and next. channels have two DIFFERENT operations: put! and take!
12:36 tomoj: yeah
12:37 bbloom: channels are inherently queues, optionally bounded, and inherently mutable
12:37 tomoj: just hypothetically
12:37 the thing is, I don't want to be forced into exclamation points just because cljs only has one thread
12:37 bbloom: lazy seqs are "pure" in the sense that successive calls to first or next on the same seq produce the same results
12:37 but "exclamation points" aren't inherently bad if you need to actually have some effect on the outside world
12:38 tomoj: definitely, in that case I'm fully on board