#clojure logs

2013-09-26

00:45chordstarcraft clone please
00:45chordi'm becoming desperate
00:45chordi'm willing to dump my girlfriend and spend all my time on the game if you help me
01:07logic_progmy goal is to visualize some XML data in HTML/CSS. Is there a nice way to auto transform clojure.data.xml nodes into hiccup structs?
01:08logic_progIn fact, want every XML node mapped to a HTML Div, somehow preserving the names, then using CSS markup, I wnat to describe how the XML should bedisplayed.
01:09brehautlogic_prog: enlive uses the same structure as clojure.data.xml, and i believe (though not 100% sure) that tinsel can also use it
01:09TimMclogic_prog: What you want is probably in clojure.walk
01:10nopromptclojure.xml + clojure.walk?
01:10brehautTimMc: of course, good point
01:10logic_progso basically: don't use hiccup? :-(
01:10logic_progI found hiccup/garden more intuitive than enlive
01:10callenlogic_prog: don't use Hiccup, use Selmer! https://github.com/yogthos/Selmer/
01:11callenlogic_prog: it's better to use stuff like SCSS if you really need to generate your CSS :)
01:11callen(sorry nopro :( )
01:11Apage43he's not templating
01:11logic_progno hiccup, no garden
01:11Apage43he's generating html from scratch
01:11logic_prognext up you're going to tell me not to use vim
01:11logic_progI'm generating HTML from scratch.
01:11callenlogic_prog: oh, if you're not templating for a web app, then disregard me. Sorry :)
01:11sm0kehello, i have downloaded a example project which uses multiple namespaces each with a main func defined..can i run a specific ns main function from lein ? i mean in java i could have given a classname ..how does clojure translates ns to class?
01:11callenlogic_prog: I recommend Selmer for web apps/templating :)
01:12brehautlogic_prog: enlive is mostly confounded by the damn deftemplate stuff. snippets plus emit* is much similer to grok
01:13logic_progwalk function Usage: (walk inner outer form) Traverses form, an arbitrary data structure. inner and outer are functions. Applies inner to each element of form, building up a data structure of the same type, then applies outer to the result. Recognizes all Clojure data structures except sorted-map-by. Consumes seqs as with doall.
01:13logic_prog<-- that is what I want, correct?
01:13callenI use clojure.walk/walk all the time. I do not think doing so is a good idea.
01:13Apage43postwalk (or prewalk) are a bit more pre-baked
01:13nopromptjava.lang.IllegalArgumentException: No method in multimethod 'emit-constant' for dispatch value: class clojure.lang.Var
01:13noprompt
01:14Apage43but there is what callen said
01:14noprompti fucking hate that error.
01:14callenalso walk doesn't behave exactly the way you expect. Making it fully recursive in the ways you want is initially non-intuitive.
01:14callenand not tail-recursive, if memory serves.
01:14nopromptthere's also clojure.zip/xml-zip
01:14callenlogic_prog: what's the use-case again?
01:15logic_progI have an xml file. I want to display it in HTML/CSS.
01:15brehautcallen: he wants a functor of <node> … </node> to <div class="node">…</div>
01:15Apage43tree transform!
01:15logic_progI want to transform each XML node into a HTML node, where XML node of <blah> becomes HTML <div class=:blah">
01:15callenlogic_prog: that's clojure.walk/walk
01:15logic_progokay, thanks :-)
01:15nopromptform of tree!
01:15callenlogic_prog: I can show you example code adapted from work-code if you're patient and let me sanitize it.
01:16callenI've been doing a lot of recursive tree processing lately.
01:16logic_progI am patient.
01:16logic_progI will in paralle, try to work it out myself.
01:16nopromptthere's a good joke in there. i promise.
01:16callenlogic_prog: clojure.walk won't be tail recursive though.
01:16logic_progit's fine,
01:16logic_progthese files are < 100 KB
01:16callenlogic_prog: you may be best served by reduce and a clever use of context and the reducer fn or a loop/recur form.
01:16Apage43I have a *terrible* docbook XML -> markdown converter that I wrote for work =P
01:16brehautlogic_prog: its not length its depth that matters
01:16callen^^ what brehaut said.
01:16logic_proghmm
01:17logic_progthey're at most 5 layers deep
01:17callenyou can increase the stack alloc for your JVM, but it's still dodgy.
01:17callenoh, then you can cheat.
01:17callenparse the XML into nested vectors and blast that bitch.
01:17callentree-seq/zip/walk...whatever.
01:17callenI had to handle arbitrarily deep embedded documents. it was ugly and cancer-inducing.
01:18noprompt"blast that bitch" <-- wow
01:18callen5 layers deep? you can't possibly mess that up.
01:18callenI just got done writing a recursive processor for embedded documents that has the word "reduce" in it 6 times across 7 functions.
01:18callenhorrific.
01:19callenlogic_prog: you get lost with clojure.walk/walk - ping me. I can help you out. I've got to gather my stuff and go home now. :)
01:19logic_progcallen: sure, though http://clojuredocs.org/clojure_core/clojure.walk/walk looks simple
01:19logic_progit's almost like map-reduce
01:19logic_progthe first function is called on each node, then the latter to combine them
01:20noprompt♫ Bom Bom ♫ Bom Bom ♫ Bom Bom Bom ♫
01:20callenlogic_prog: well. it's fully recursive and simple if your problem can be baked down to homoiconic nested seqs/vectors.
01:20callenlogic_prog: my problem wasn't that nice. you may be luckier :)
01:20logic_progyeah, I can all decisions can be made "locally"
01:21callenlogic_prog: then god speed. I had to traverse my recursive documents two generations at a time. Sucked.
01:22brehaut(apropos nothing https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills is an amazing resource)
01:23callenbrehaut: that's pretty sweet. Thank you :)
01:24brehautcallen: sadly does not include a mouseleave shim :/
01:25callenbrehaut: write one :)
01:25brehautcallen: yeah basically
01:26sm0keok weird..i am doing a lein compile..and i dont see .class files inside target folder
01:26brehautcallen: mucking about with dom mouse events is however at the bottom of my list of 'fun to do' things
01:26logic_proghow do I convert all clojure.data.xml.Element into maps ?
01:26brehautlogic_prog: its presumably a record already right?
01:27logic_progyes
01:27logic_progbut it's bitching ab me about:
01:27logic_prog#clojure.data.xml.Element{:tag :call, :attrs {:val interp}, :content (Require Import ZArith List String.)} UnsupportedOperationException Can't create empty: clojure.data.xml.Element clojure.data.xml.Element (xml.clj:43)
01:27noprompttake a look at some of dnolen's blurgh posts.
01:27Apage43OH yeah
01:27logic_progthe first line is when I try to print it out (it's an clojure.data.xml.Element)
01:27Apage43that was why I didn't use clojure.data.xml
01:27Apage43because clojure.walk doesn't work on it
01:28logic_progthe second line is when I call (cloure.wak/walk identity identity data) -- which should just return itself
01:28Apage43clojure.walk only understands list/vector/set/map
01:28noprompthe's got some really nice examples of how to handle dom events with core.async. it's quite elegant.
01:28Apage43not records
01:28Apage43and data.xml uses records
01:28logic_progokay, so I should use clojure.xml/parse ?
01:28brehautlogic_prog: (into {} element) would trivially (but stupidly perhaps) convert them
01:28brehautoh for functors
01:29Apage43clojure.walk should work fine on what you get out of clojure.xml/parse, but yeah, you could also just do what brehaut said on the (outer) function, I believe
01:29Apage43maybe
01:30Apage43I wound up making it work for another project I had since I *needed* the parsing to be lazy (I was working on multi-gigabyte XML files)
01:30nopromptfwiw goog.events/listen handles all the horse shit around browser inconsistency with mouse clicks.
01:31logic_progsing xml.parse
01:31logic_progworked fine
01:31brehautnoprompt: basically every large javascript library has some wrapper for that nonsense. if you are writing javascript without some big ass library, you occasionally still want that stuff
01:31logic_progwill try brehaut's technique when I'm forced to use data.xml :-)
01:31brehauti wouldnt call it a technique per se ;)
01:32brehautmore of a hack
01:32nopromptbrehaut: yeah, i was just bringing it up cause i don't think everyone knows about it.
01:33nopromptbrehaut: there's a lot of good stuff in goog.*. why people would want jQuery in the face of that kind of baffles me.
01:33nopromptbut hey, not my problem.
01:34Apage43dang
01:34Apage43I didn't do any really tree-y stuff for that problem, just found the code
01:34nopromptugh, why am i having problems with these macros in cljs? :-(
01:34Apage43it was just USPTO data
01:34brehautnoprompt: well, some of my projects the javascript requirements are so low that i dont want _any_ big arse library, jquery, goog or otherwise
01:36nopromptbrehaut: oh definitely. i'm surprised how many JS developers i've met who've drank the "don't do js with jQuery" koolaid.
01:37nopromptthe dom api's suck, sure. but you can get a long way with "The Definitive Guide" as a reference and a few wrapper fns.
01:37nopromptbtw, the book is a godsend.
01:37brehauti dont think i understand your koolaid comment
01:37brehaut"don't do js with jQuery" do you mean dont do js without jquery?
01:37nopromptjust learned the other day that Function.bind() can be used to do function currying in js.
01:38nopromptbrehaut: oh, yeah, that's what i meant. :P
01:38brehautphew :)
01:38brehauti thnk i knew that about bind, but i also recall it being relatively new
01:39nopromptbrehaut: right, if you wanna implement currying for ES3 you have to roll up your sleeves.
01:39brehautnoprompt: sorry i meant that the versions of bind that existed prior to ES6 introducing it didnt support partial application
01:39brehauteg the prototype.js one that came about first
01:40nopromptbrehaut: right.
01:41brehauthmm, i mght be full of crap looking at hte docs, or alternatively the prototype implementation has followed the spec
01:41nopromptomg, i think i'm going to jump off a mountain with these macros. ; _ ;
01:41robinkI have a data structure (String, in this case) that's composed of n*m elements. How can I break it up into a list/vector of m number of elements of n size? There is no delimiter, I simply need to break every n elements. I don't care (or necessarily know) what m is, but know that both n and m are factors of the (count) of the structure.
01:41nopromptbrehaut: eh, it's really not that important. :P
01:41brehautprobably not
01:42brehaut,(partition-all 3 (range 10))
01:42logic_progdoes clojure have a ismap / isvector function?
01:42clojurebot((0 1 2) (3 4 5) (6 7 8) (9))
01:42logic_prog(for my walker, I need to dispatch on type)
01:42Apage43robink: partition
01:42brehautlogic_prog: map? vector?
01:42robinkApage43: Thanks
01:42Apage43robink: careful though
01:42robinkApage43: How so?
01:42Apage43if you don't have a number of elements that chunk evenly, partition won't return the last chunk
01:42logic_progbrehaut: I like. Thanks!
01:43Apage43if you want the last chunk even if it isn't a whole chunk-size, use partition-alll
01:43Apage43*all
01:43robinkApage43: Gotcha. Was wondering what would happen if you passed partition a number that wasn't a factor of (count mypileofstuff)
01:43brehautlogic_prog: you can always define your own by partially applying instance? with the interface or type too
01:43noprompt,(map #(apply str) (partition-all 3 "foobarbazquux"))
01:43clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox$eval57$fn>
01:43Apage43,(parition 3 (range 10))
01:43clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: parition in this context, compiling:(NO_SOURCE_PATH:0:0)>
01:43Apage43I can't spell
01:43noprompt,(map #(apply str %) (partition-all 3 "foobarbazquux"))
01:43clojurebot("foo" "bar" "baz" "quu" "x")
01:43robinkooo
01:43robinkI like that.
01:44Apage43but partition leaves the last chunk off, parition-all doesn't
01:45robinkApage43: I will risk it with partition knowing that I have to pick a number whose modulo of the count of the collection is 0.
01:53noprompti'm so confused. i have two macros in a clj file. i can require and use one of them with :require-macros but the other one blows up in my face and complains.
01:54callennoprompt: why are you using require-macros in Clojure?
01:55nopromptcallen: it's cljs.
01:55noprompti'm having the problem in cljs.
01:56callenokay, I'm less confused now than I was before.
01:57callennoprompt: You go to the doctor. You raise your arm in a funny way, you tell the doctor, "moving my arm like this hurts"
01:57callennoprompt: what does the doctor say?
01:57callen"Don't move your arm like that"
01:57nopromptlol
01:59nopromptcallen: man a little bit emacs goes a long way. i'm loving that little multi-shell hack.
02:00callennoprompt: http://i.imgur.com/b22KlwL.png
02:00nopromptlol
02:01nopromptcallen: where is that happening?
02:01callennoprompt: Prismatic offices. SF?
02:01nopromptcallen: is that this week?
02:02callennoprompt: https://github.com/bitemyapp/dotfiles/blob/master/.emacs.d/clojure/clojure-config.el
02:02callenmy clojure/emacs magic ^^
02:02callennoprompt: Oct 2
02:03callenSHHHHHH SEKRIT
02:03Apage43I should go to that
02:03nopromptyeah me too.
02:03callenApage43: yes, then you can meet me.
02:03callenyisssss
02:03noprompti think i can get my lazy ass out of Fresno.
02:03Apage43I usually can't be arsed to actually go to SF
02:03nopromptplus it'll give me a reason to go to the house of prime rib.
02:04nopromptthat place is sooooooooooooooo legit.
02:04callenI actually only shared the link for lulz value, but this is is even better.
02:04callennoprompt: I have a better place if you want.
02:04callenwell, not for rib. For steak.
02:04nopromptoh wait. ah, fuck it's on tuesday.
02:04nopromptcallen: have you been to HOPR?
02:04callennoprompt: Eds.
02:04callennoprompt: Weds.
02:05nopromptcallen: please tell me the plates are ~$50
02:05nopromptoh, wait, yay!
02:05nopromptthe food at hopr is like an acid trip so good.
02:06callennoprompt: I haven't been to HOPR. I just suspect I know of a place that has superior steak.
02:06nopromptcallen: i suppose i could be convinced to steak instead.
02:08nopromptcallen: nice stuff in that emacs file. think i'll pilfer some of it.
02:08Apage43calendared.
02:09nopromptthat dom selection stuff in dommy definitely should be pulled out in to it's own lib.
02:10nopromptmaybe i just have javascript fever.
02:11nopromptA FUNCTION IS LIBRARY.
02:11noprompt*IS A.
02:11nopromptlol @ "javascript fever"
02:12Apage43I think the every ten lines of code should be made into a separate library thing is more of a node-ism than a js-ism
02:12brehautive got a fever and the only cure is more dependancies
02:13noprompt"dependency fever"
02:15Apage43that's also fun when you combine it with the marekting tendency to call any project with a name a "technology"
02:17nopromptApage43: it makes everything else feel so "primative"
02:18gwsbuild 5 node.js function-libraries, and you're a Solutions Architect
02:19nopromptgws: that reminds me of visual studio. it's not a project; it's a solution.
02:19nopromptcan you imagine add this dependency to your "solution.clj" file.
02:20Apage43IIRC "solutions" were a workspace and could contain several "projects"
02:22Apage43(and your projects could actually belong to multiple solutions.)
02:22callennoprompt: the trace stuff is hella useful.
02:24chordcallen are you still alive?
02:25callenchord: ssshhhh
02:25chordcallen: I got to chapter 14 of learn you a haskell
02:25chordalmost DONE
02:25chordWHERE IS YOUR CLOJURE BOOK
02:26chordcallen do your parents know you procrastinate and slack off on making the clojure book?
02:26nopromptchord probably wears a helmut when he programs.
02:26nopromptwith all that type safety and all.
02:26callenchord: I am preparing to crush my opponents in Clojure Cup SIR
02:27gwshttp://www.mask-shop.com/images/helmut_kohl_promi_latex_maske__helmut_kohl_latex_mask.jpg
02:27noprompthe's probably got plastic on his funiture and foam around the corners of his coffee table.
02:27chordcallen: you know those competitions are rigged to give the dumbest shit ideas first place
02:27gwschord: just like real life
02:27chordnoprompt: you mad that you couldn't read the entire haskell book?
02:28brehautnoprompt: perhaps thats enough ad hominem for one day?
02:28chordgws: thats why you gotta do stuff outside of the competition such as starcraft clojure
02:28nopromptchord: not really. it's not like, you know, something worth getting upset about.
02:28nopromptbrehaut: yeah probably. i actually don't have problem w/ haskell, ml, etc.
02:29robinkhttp://blogs.sfweekly.com/thesnitch/2013/09/sf_techie_explains_why_the_wor.php
02:29brehautnoprompt: i dont think many people here do.
02:29nopromptbrehaut: i'm just messing with him.
02:29robinkSFW, no swears, but gobs of snark
02:29robinkYour boss may complain that it's "politically incorrect" or "not aligned with our business principles"
02:30nopromptbrehaut: i've actually been doing a bunch of SML for a college class i'm taking.
02:30brehautnice!
02:30brehautnoprompt: i keep meaning to spelunke into F# some more, but i dont have the time
02:30chordso now that we've got all of callen, noprompt, gws, brehaut, robink looking at the chat, now we can all start on starcraft clojure
02:31nopromptbrehaut: tends to be much easier when you have a grade-gun pointed at your head.
02:31s4muelrobink: Why? Because 2.0
02:31chordwith 6 people total starcraft clojure cant fail
02:31robinks4muel: Yep
02:31robinkchord: Yes
02:31brehautnoprompt: aha yeah
02:31robinkchord: Is that StarCraft written in Clojure?
02:31brehautnoprompt: ive written a couple of small services in F# at my old job. it was a very pleasant environment.
02:31chordrobink: what else would it be
02:31robinkchord: Or a StarCraft server written in Clojure?
02:31nopromptbrehaut: i just found out that i've been loosing points for not showing up to the labs. i've just been doing them from home and submitting them. kind of lame.
02:32brehautnoprompt: :/ thats a bit lame
02:32robinkchord: It could be a StarCraft mod written in Clojure, a StarCraft multiplayer server written in Clojure, a StarCraft server browser written in Clojure...
02:32nopromptbrehaut: it really doesn't make much sense to me.
02:32brehautme neither
02:32gwsstarcraft AI written in clojure...
02:32chordnoprompt: you gotta go up to the professor and talk to him, you can't let him bitch slap you because you're afraid to talk back
02:32chordrobink: starcraft CLONE written in clojure
02:33robinkchrisrossi: Network protocol compatibility?
02:33robink*chord: Network protocol compatibility?
02:33nopromptbrehaut: SML is fun though. it's fun shifting gears and working in a statically typed language.
02:33callenbrehaut: F# is for corporate fascists.
02:33chordrobink: no a new game
02:33robinkchord: Oh, that'd be easier
02:33brehautnoprompt: agreed. im quite fond of the ML family in general.
02:33robinkchord: Written in Clojure, Clojure-CLR or ClojureScript?
02:33callenbe cool like technomancy and use OCaml.
02:33brehautcallen: open source corporate fascists?
02:33chordrobink: clojure
02:34robinkchord: Ah
02:34nopromptbrehaut: oreilly has a new ocaml book coming out.
02:34robinkchord: So making use of Swing and the Java 2D APIs for the client end of things?
02:34noprompt"real world ocaml"
02:34chordrobink: I tried to get it in haskell but those assholes banned me from #haskell
02:34robinkchord: It's getting to the point where writing it in ClojureScript would be actually feasable.
02:34Ember-why swing since we have javafx these days
02:34Ember-which is like ten times better api
02:35nopromptwhenever oreilly puts "real world <language x>" on a book you can almost gaurentee it's because no one gives a shit about <language x>.
02:35robinkchord: Tried to "get it"? ...and why would they ban you? If you ask implementation questions that aren't 'StarCraft in Haskell'-specific, they wouldn't even have to know you want to make a StarCraft clone in a FL.
02:35brehautnoprompt: lol
02:35Viesti<want>namespace browser in emacs</want>
02:35robinkEmber-: Yes, but you must remember that as far as computing technology goes, I'm living in the early '90s at best. Most of the time I regress to a '70s-programmer state.
02:35s4muelnoprompt: Yeah, the 'Totally Academic' series didn't pan out
02:35nopromptthat's not to say <language x> is bad though.
02:35chordrobink: well you got guys like callen who tried to get me banned from this channel, THAT EXPLAINS EVERYTHING
02:36robinkchord: Uh, not to me, but whatever.
02:36Ember-robink: oh, in that case you should use AWT, not Swing
02:36Ember-:)
02:36robinkAh
02:36robinkOh, my apologies, I thought I was in #gentoo-chat
02:36robinkGoing all the way back to the sfweekly article
02:36chordrobink: wait doesn't awt and swing suck shit for making a game?
02:37brehautnoprompt: when they achieve Real World Agda, I'll be buying that thing. no hesitation
02:37Ember-chord: they suck shit for making anything imho
02:37nopromptbrehaut: that or Real World Coq.
02:37robinkchord: I wouldn't necessarily use them for 2d accel, but they'd be OK for a UI
02:37Ember-but performancewise they have no problems
02:37Ember-unless you want to make a super high performance 1st person shooter
02:37Ember-in which case you shouldn't use JVM at all anyway
02:37utkarshThis would probably be obvious to you people, but how do I install clojurescript from a git clone of its source? I get "Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main" when I run bin/cljsc
02:39chordhow exactly do you translate a c++ opengl win32sdk game to JVM based clojure, can you directly interface to win32sdk from jvm?
02:39nopromptutkarsh: how familiar with the clojure toolchain are you?
02:40utkarshnoprompt: I'm familiar with leiningen, but clojurescript doesn't use it to manage dependencies it seems.
02:41nopromptbrehaut: "Real World BrainFuck: Code you won't understand tomorrow"
02:41supersymchord: Not that I know of
02:41brehautnoprompt: to be honest, thats no different to agda or coq ;)
02:41brehautnoprompt: its just harder to satisfy the compiler
02:41callenAgda - guaranteed to work, but you'll never change it again.
02:41nopromptutkarsh: that's not true. you can add clojurescript as a dependency to your project.
02:42nopromptutkarsh: i was asking because, you can also add austin for a nice cljs repl experience if you jsut wanna hack around.
02:42chordrobink: so you gonna start the rts in clojure project?
02:42robinkchord: It's intriguing, but I'm not sure I'm up to the task right now.
02:42nopromptutkarsh: but that's not totally necissary.
02:42chordrobink: you need to dump your girlfriend to create the time
02:42robinkchord: I'd get lazy (not the good kind) and try to do it with mutable state.
02:43nopromptutkarsh: add this to your :dependencies [org.clojure/clojurescript "0.0-1889"]
02:43robinkchord: No girlfriend, taking the quarter off, not much work :-)
02:43chordrobink: oh jesus christ fine use Go language
02:43robinkchord: ...
02:43chordrobink: WTF YOU'RE NOT EVEN WORKING OMG YOU LAZY
02:43nopromptutkarsh: and this to your :plugins [lein-cljsbuild "0.3.2"]
02:43robinkchord: No, I am working, and I'm lazy in the *wrong* way.
02:43utkarshnoprompt: Can I not just use the cljs compiler standalone, to compile a .cljs file to .js?
02:43callenutkarsh: you shouldn't
02:44nopromptutkarsh: you can but it's generally not recommended.
02:44chordrobink: you need to stop the procrastination, look noprompt can keep you on schedule my managing you
02:45nopromptutkarsh: we can help you get a nice environment set up if you're patient.
02:45supersymutkarsh: I had some problems getting this stuff in my head too, its really the sum of all parts with cljs... so many stuff that gets combined into the compiled whole
02:45muhoopedestal
02:46nopromptutkarsh: but it's not as simple as, say, coffeescript. also if you were to use cljs directly it would be slow and painful.
02:46muhooif you don't want to have to deal with all the moving parts yourself
02:46supersymhttps://github.com/Gozala/wisp is more what does your 1-1 Clj-JS
02:46chordnoprompt: if i changed project from clojure to clojurescript would that entice you to make the starcraft clone?
02:46utkarshnoprompt: callen: what would be the easiest way to just see the js output for a cljs script? Right now, my objective is to see the compiled output to see the optimizations performed by the compiler; I don't even need it to execute.
02:47nopromptutkarsh: i can post a quick gist for you.
02:47utkarshnoprompt: that would be wonderful. :)
02:47akurilinWhat are people's thoughts on noir.validation? I'm seeing that it's using the dynamic var trick in the middleware to aggregate validation errors. In one way that's very convenient, no need to add anything to the response yourself, yet also magical if you haven't read the source.
02:48nopromptutkarsh: alright, gimme a sec
02:49chordrobink: you lazy to work on rts because you're high on drugs, i'm right aren't i
02:50robinkchord: Well, not exactly
02:50chordrobink:so thats a yes...
02:50robinkchord: It's sort of an 0.3 thing where {0 false 1 true}
02:51chordrobink: so multiply by 2 to compensate for bias means 0.6
02:52robinkchord: Interesting that a 'bias multiplication' would turn any value over 1.5 to something "more than true"
02:52utkarshnoprompt: found this https://github.com/clojure/clojurescript/wiki/Quick-Start which seems to be exactly what I want. Giving it a try...
02:53chordrobink: you've been playing starcraft 2, league fof legends, world of warcraft, and diablo 3
02:53chordrobink: thats why you're lazy
02:54robinkchord: I don't *own* StarCraft 2, and have never played it. One of the reasons I'm probably not ideal for this task.
02:54nopromptutkarsh: oh, you sure?
02:54utkarshnoprompt: running the bootstrap script, will tell in a min
02:55chordrobink: why is everyone in here hate starcraft
02:56robinkchord: I don't, I just don't know how to talk functional programming patterns for an RTS, so will sit quietly until someone asks me a question about Clojure.
02:57chordrobink: so you can learn!!!
02:57robinkchord: Yes, but I can probably learn more by reading than by talking to you.
02:57chordrobink: so go read and make it
03:00chordrobink: have you seen this https://artillery.com/
03:01OtherRavenchord: do you do this every day?
03:01chordOtherRaven: until the project succeeds yes
03:02robinkchord: No, but that's sort of what I wanting to say about ClojureScript. The browser is close enough to being a viable platform that even a JS-compiled language handling a 3d canvas can actually be a possibility.
03:02OtherRavenchord: how many people have you gotten to work on this?
03:03chordOtherRaven: you and robink
03:03robinkOh no
03:04chordoh yes
03:04OtherRavenchord: okay, and how many have actually agreed to help?
03:04OtherRavenbecause it's looking like zero
03:04chordOtherRaven: OtherRaven: 0.1 , robink: 0.2
03:06OtherRavenchord: you're... curious
03:07chordOtherRaven: whats the minimal amount of code that needs to be written before you jump into the project
03:08OtherRavenchord: I have no desire to write your game for you. I'll make my own, thanks.
03:09chordOtherRaven: AH HAH I FOUND AN OPENING LET ME JOIN YOUR GAME TEAM
03:09OtherRavenchord: newp
03:09chordOtherRaven: you afraid that I'll out haX0r you?+
03:10callenchord: you haven't written any code that anybody is aware of, so I doubt they're worried about that.
03:10OtherRavenchord: newp, I have no idea how good you are or aren't
03:10callen(he's not.)
03:10chordOtherRaven: train me then
03:10OtherRaventehehe
03:10chordcallen: I ASKED YOU TO TRAIN ME IN CLOJURE
03:11OtherRavenchord: okay, lesson one... <incoherent mumbling> and now for your homework: learn clojure
03:11callenchord: you can read the book
03:12chordOtherRaven: how about a deal, I write a clojure program that creates a window and you LET ME ON TEAM NOW
03:12chordcallen: remember how you didn't actually finish your clojure book
03:12chordcallen: how can i read the nonexistent book
03:13callenI'm working on a cookbook chapter and doing Clojure Cup first
03:13callenI am not a parallel algorithm.
03:14chordOtherRaven: link to your current game you're working on so I know you're not BS'ing me
03:15OtherRavenchord: BSing you about what? I said I have my own game I'm working on, not that I want your help or to share it with you. My hobbies are my own, thanks.
03:15chordOtherRaven: so you have no demo of the game?
03:15callenin psychology this is called projection
03:15callenCasting doubt on others because you know yourself not to be trustworthy.
03:15OtherRaventehehe
03:16OtherRavenchord: newp, and I don't need to demo anything to you
03:16chordcallen: psychology also says that the way to help people with the disorder is to train them in clojure
03:16chordcallen: you see how this OtherRaven is intentionally refusing to show me the demo to rile me up
03:16OtherRavenXD
03:17OtherRavenchord: actually, I'm waaaaay before the demoing state. You're just making wild assumptions.
03:17s4muelHave you guys read chord's book?
03:18TEttingerOtherRaven, have you seen libgdx?
03:18s4muel"Effortless Trollin'" ?
03:18OtherRavenvalid point
03:18s4muelseriously, I can't believe anyone continues these discussions beyond 5 seconds. just /ignore, ffs
03:19OtherRavenTEttinger: newp, though I may have a look at it
03:20TEttingerOtherRaven, it's pretty good, I just started porting a swing game to it
03:20chordOtherRaven: I'm going to prove you wrong about me, I will have a stupid game up and running and show you the github code
03:20TEttingers4muel: I have had him on ignore since I found http://i.imgur.com/KFR6caY.png
03:20chordthat was taking out of context
03:20s4muelTEttinger: what a creep.
03:23devnclojure people
03:23devno/
03:23callendevn: hai
03:23TEttingerhey devn
03:23devnsup
03:24callendevn: I have a full-house. Things ended up working out after all :)
03:24callendevn: gf3, s4muel, and noplamodo are all on my team :D
03:25callenerrr... noprompt.
03:25devnnice
03:25chordcallen: you feel good about rejecting me from your team
03:25devnchord: dude, be nice
03:25devnplease and thank you
03:27TEttingercallen, what's this team for?
03:27devnclojurecup
03:27devnhttp://clojurecup.com
03:27callenTEttinger: ClojureCup! We're making Simonides :)
03:27callenTEttinger: http://clojurecup.com/apps.html
03:27devncallen: I may do a one man team
03:27callendevn: traitor!
03:28devncallen: if we're in the car i might be able to sneak it
03:28chorddevn: you make clojure starcraft clone for the cup ok?
03:28callenlol. sneaky.
03:28devnchord: ok
03:29chorddevn: you lying to me?
03:29devncallen: lol, i dont have a plan though
03:29callendevn: I have a to-do list you could pick from.
03:29devnchord: im chilling
03:29callendevn: also you need to do something about getclojure - it keeps breaking and I like using it.
03:29devnwha?
03:29devnit's broken?
03:29callendevn: is the source to getclojure on your github?
03:29devnyeah
03:29callendevn: it breaks all the time.
03:30devnalbeit messy and stuff
03:30callendevn: is the data on the github too?
03:30devnyeah
03:30callensweet!
03:30callenthank you.
03:30devnit's the preparsed data
03:30devn"the names have been changed to protect the innocent"
03:30callenthe guilty you mean.
03:30devneither way
03:31callenI had somebody post a triple-star Clojure oneliner I wrote to Twitter as an example of horrible code.
03:31devncallen: what do you mean triple star?
03:31callen,(:a @@@(atom (atom (atom {:a 1}))))
03:31clojurebot1
03:32callendevn: http://c2.com/cgi/wiki?ThreeStarProgrammer
03:32callenclassic C2 wiki
03:32devnlol
03:32devnman, i don't read enough c2
03:32callenClearly.
03:33callenEggscellent.
03:33devnEggsactly.
03:33devnEggsema. Eggsaterrestrial.
03:34OtherRaventhis is getting eggsessive
03:34chordOtherRaven: you going to be in this chat tomorrow so that I can post github link to my first clojure project to prove you wrong?
03:35callenchord: I'll be waiting for you my love.
03:35devnOtherRaven: You'd do well on my eggsams.
03:35devnYou seem to eggcel at this kind of thing.
03:36callenI am relaying these egg puns to my housemates.
03:36callenThey have no idea what IRC or programming is, but they
03:36OtherRavendevn: XD
03:36callenare loving it.
03:36devnEggspand on that though.
03:36devnthought*
03:37TEttingerthat's eggregious
03:37devnFor eggsample: I am eggcited right now.
03:37OtherRavenTEttinger: eggstrordinarily so
03:38devnI am trying to eggspress all of my emotions in terms of eggs.
03:38TEttingerthese are some awful jokes I mean yolks
03:39devn(inc TEttinger)
03:39lazybot⇒ 4
03:39devnTEttinger: We haven't even begun to crack the shell on it.
03:39Apage43This is eggsasperating.
03:39callen(inc TEttinger)
03:39lazybot⇒ 5
03:39TEttingerhaha
03:40TEttinger(inc devn)
03:40lazybot⇒ 12
03:40chordomg stop these egg jokes
03:40devnStop "beating" it to death?
03:40kitofr(inc egg)
03:40lazybot⇒ 1
03:40OtherRavenyou mean egg "yokes" :p
03:41devnegg beats talking about other off topic nonsense.
03:41callenOtherRaven: do you have a github? mine is bitemyapp.
03:41Apage43Not the worst idea that's hatched in here lately.
03:41devnhahaha
03:41devn(inc Apage43)
03:41lazybot⇒ 3
03:41callen(inc Apage43)
03:41lazybot⇒ 4
03:42TEttinger(inc Apage43)
03:42lazybot⇒ 5
03:42callenThese terrible yolks are scrambling my nerves.
03:42TEttinger(inc callen)
03:42lazybot⇒ 11
03:42devnIf this sort of thing continues, there might be a mass eggsodus.
03:42OtherRavencallen: newp, sorry
03:43devnPeople may be eggspelled from #clojure for having bad yolks. :(
03:43akurilinAny of you guys using liberator here? Wondering if there's a way to have the :handle-malformed handler return a body with content type that's not just text/plain.
03:43chordyou guys are so boring with your egg jokes that I'm starting non the project that I kept talking abotu
03:43TEttingers/ex/egg
03:44TEttingeraw, lazybot...
03:44callenOtherRaven: np, figured I'd ask because your nick was unfamiliar.
03:44devns/\sit\s/\segg\s/g
03:44OtherRavencallen: yeah, I'm pretty new XD
03:45devnakurilin: have you looked at the core.clj source?
03:46Apage43akurilin: totally guessing (reading the source)
03:46devnhttps://github.com/clojure-liberator/liberator/blob/master/src/liberator/core.clj#L156
03:46Apage43but It looks like you set a :media-type on the :representation in your response context
03:46Apage43as devn just linked
03:47chorddo you guys use clojure from linux or windows, I need to know for the game
03:47callenMac and Linux.
03:47s4muelOtherRaven: welcome to #clojure. don't be afraid of posting horrid code, after all, you're just breaking out of your shell.
03:47devnoh god
03:47callenOtherRaven: do not be afraid of being wrong. Walking gingerly around your ignorance only sustains your lack of knowledge. Being vigorously wrong, all the time.
03:47s4muelthat's what years of slashdot will do to you
03:47callenOtherRaven: it brings on correction and new knowledge.
03:47Apage43after all, you can't make an omelette without catching a few exceptions
03:47OtherRavens4muel: thanks, I may just do that
03:47callenOtherRaven: break things, make mistakes!
03:48devns4muel: your most recent joke was like someone eggsuming bodies from a cemetery. let it be dead.
03:48OtherRavencallen: I'll go with being cautiously wrong... that way I can always turn around and say "I thought that might not be right... and I was right" XD
03:48devnakurilin: is that helpful at all?
03:48callenOtherRaven: shed your ego, just learn! be wrong!
03:49callenOtherRaven: you will become awesome-r faster if you just *go*!
03:49devnyou mean eggo
03:49devn?
03:49callendevn: GOD
03:49OtherRavenlol
03:49devneggeurysm?
03:49Apage43trying too hard now
03:49TEttingercallen's been scrambled
03:49akurilindevn, Apage43 looking at it right now, thanks for the direction. I'm trying to implement server-side html form validation, and I figured I'd just use :malformed? for that purpose, then I found out it default to plain even though the only :available-media-type I set is html
03:49TEttingerhis brain is fried
03:49OtherRavenyou need your head eggsamined
03:50john2xwho's joining the clojurecup?
03:50Apage43and ex->eggs is just too easy, come on :)
03:50callenjohn2x: memememememememe
03:50Apage43folks, I hear
03:50callenjohn2x: and my brave team of 3 comrades.
03:51Apage43all I do is hang out in IRC though
03:51devnbetter than playing WoW
03:51akurilindevn, what's sad is that I totally ran into the documentation of the 3 supported ways of returning responses at some point in the past 2 days and I haven't been able to fin dthem since
03:51devnIRC is a text-based adventure game
03:52s4muel... guys i thought this was nethack
03:52OtherRavenfilled with eggs and trolls
03:52devnakurilin: i've never used liberator so i can't be too helpful. sorry :\
03:52scottjcallen: what is your team building?
03:52Apage43what, with your bare hands? Against his bear hands?
03:52akurilindevn, ha no worries, that's plenty already!
03:52callenscottj: http://clojurecup.com/apps.html Simonides
03:53devnakurilin: happy hunting, sir.
03:53callenI want to win Clojure Cup just so I can hang a hammock at my desk at work instead of a chair.
03:54callenif I lose...I'll probably just buy a hammock. Or if a teammate wants the hammock.
03:54devnim going to write a game of simon says that uses core.logic, core.async. core.typed, reducers, datomic, transients, refs, agents, and atoms in a point free style
03:54callen^^ instant winner.
03:56devncallen: you missed the best part. i'm doing it in clojurescript
03:56devnwell, part of it
03:56devnim actually compiling to COBOL
03:56Apage43dang
03:57devnand, if i have time, i'm going to have it wear pants
03:57devnliterally.
03:57TEttingerdevn, all through one clojure macro right?
03:58devnwell yeah, but it's a macro to generate macros to write a macro which...
03:58TEttinger5 star general
03:58devnthe people's clojure army
04:00s4muelThe Ten Pass Campaign
04:00s4muelTEttinger: Heh, I haven't heard the star programmer term dug up in a while
04:01TEttingerblame callen
04:02s4muelFigures.
04:03TEttingeris Raynes the one to ask about lazybot?
04:03TEttingerRaynes: does lazybot have the ability to run one instance over multiple servers?
04:09chordWE ARE ALL HUMANS
04:11devnDon't get so eggcited
04:12devnWe don't even know for sure that we eggsist
04:20chorddevn: have you seen this artillery.com
04:20chordwww.artillery.com
04:21mercwithamouthcow-orker: how's your game coming?
04:21amalloyTEttinger: yes, it does
04:21mercwithamouthhave you gotten the camera engine working yet?
04:31nonubyif building a library that works in an async fashion is the idiomatic approach to take care of your own thread pool (thread pool per async library) like http kit does, then the high level programmer than augment shit by passing a c as a callback (keep core.async stuff cpu bound and thus no/rare need to adjust its own threadpool)
04:32nonubyc as callback meaning channel from core.async as callback
04:32chordanswer is 47
04:32nonubyawesome!
04:43chordnonuby you work on starcraft clone written in clojure ok?
04:44nonubyeh?
04:44chordok?
04:46chordYOU ANSWER YES
04:48TEttingeruh, is there a good way to store an indirect reference to a slow-to-compute value that I don't expect to change often but don't think I want to use a concurrency primitive for? I was thinking like (let [walls ['north-wall 'east-wall]] (map eval walls)), but that doesn't respect let bindings.
04:48TEttingererr
04:49TEttingerthe let should have had the definitions for north and east wall as like 1 and 2
04:49TEttingerthe problem is eval doesn't seem to know what's in a let
04:51kawPretty sure eval is almost always the wrong answer, but it's not entirely clear what the actual slow-to-compute problem is?
04:51TEttingeryeah, it's going to be a texture region pulled from an atlas
04:51TEttingerjava code
04:52TEttingerI don't really want to recompute the texture get a lot
04:53chordtettinger: link to your github code for your game
04:53kawAh, no
04:53kawBut there are too many to just load them all up front?
04:53mpenetTEttinger delay maybe?
04:53mpenet,(doc delay)
04:53clojurebot"([& body]); Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with force or deref/@), and will cache the result and return it on all subsequent force calls. See also - realized?"
04:53mpenetor that's what you want to avoid
04:57chordwho here has had their girlfriend dump them
04:58TEttingermpenet, that might be good. what I want to be able to do is define a level-map, call it dungeon, made of different wall tiles. the wall tiles are generated without knowing what images the end result will use, and the images could be drawn from a number of wall themes, but a north-south wall should be able to be requested, and another theming function just decides which north-south wall.
04:59TEttingerdoes that make sense? like I would return a dungeon made of calls to things like north-south-wall, and another function takes those calls or delays or whatever they are and turns them into the appropriate versions
05:01kawAre you sure it's really slow to compute? It sounds like you're kind of mentally binding together choosing a tile variation with loading the actual tile, if I'm understanding you right
05:01TEttingerI think I just got it
05:01kawDo you have such a large tile set that it'd be bad to keep it all loaded at once?
05:02TEttingerkinda.
05:02chordwww.artillery.com
05:02TEttingerhttps://dl.dropboxusercontent.com/u/11914692/slashem-revised.png
05:04kawTargeting mobile devices?
05:04TEttingerwhat I'll do is just return a vector of functions, and call the functions passing in the theme as an arg when "realizing" them
05:04kawI guess the thing is that if it really is bad to keep it all in memory at once, you need a strategy for releasing them when you no longer need them, not just for loading them as they first become needed
05:05TEttingerno, I'm not too concerned about memory because I'm not targeting mobile
05:05TEttingerI just wasn't sure how to do the name-f thing
05:05TEttingername-0o
05:06TEttingername-of
05:11Apage43maybe you want https://github.com/clojure/core.memoize ?
05:12Apage43(or just clojure.core/memoize if you never need to release the cached value. That's just built in to clojure.)
05:13Apage43pong TEttinger
05:13Apage43,(doc memoize)
05:13clojurebot"([f]); Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache of the mapping from arguments to results and, when calls with the same arguments are repeated often, has higher performance at the expense of higher memory use."
05:14TEttingeroh yes. thanks Apage43
05:15chordEAT THAT BITCHES I FINISHED READING LEARN YOU A HASKELL
05:15chordyou all thought I would fail to finish
05:15chordI showed you all
05:15Apage43i hear go has starcraft in the standard library
05:16chordApage43: you talking to me?
05:16Apage43just letting that float
05:17chorddo i know you
05:26sm0keHello anyone working with jeromq? i have small example i cant get working
05:26sm0kewhere do i paste code?
05:27Apage43refheap.com
05:28sm0kehttps://www.refheap.com/19020
05:30sm0kei first start listeners then publishers
05:32jonasensm0ke: why have you wrapped the code in go blocks?
05:33sm0kejonasen: i am just using fireplace wanted to just do everthing from same ide without freezing ti
05:33sm0kejonasen: its just for prototyping..do you think thats what is wrong here?
05:35sm0keinterestingly it never gets up to the "listeners quit" statement!
05:36sm0keone sec does pub needs to be binded before connect on sub?
05:36nonubyhow about inserting a (Thread/sleep 1000) between the go blocks
05:36sm0kenonuby: yea let me do that
05:37sm0kenonuby: between the go blocks?
05:37nonubyyes
05:37nonubyso l16
05:37sm0kenonuby: i am actually executing every form individually
05:38nonubyokay, still not dug too far into core.async but what about changing go to future
05:38sm0keaha exactly what i thought!
05:39sm0kepub needs to bind before sub connects!! weird
05:46sm0kei have edited it with the sleep which fixes it
05:53sm0keOK more weirdness to follow..it seems that i just need to have a sleep there..then it doesnt matter even if sub start before pub
05:54sm0keif i remove it nothing works
06:30TEttingerso I'm having a bit of trouble with reflection that isn't going away with type hints
06:30TEttinger (def ^OrthographicCamera camera (OrthographicCamera.))
06:30TEttinger (.setToOrtho camera false 800 480)
06:31TEttingerthe second line seems to be reflecting, but I can't figure out why
06:31TEttingeroh it could be a float thing
06:31TEttingernope.
07:13ro_sthyPiRion: loved your article
07:13ro_stmore! more! :-)
07:13TEttingerso, lein run doesn't seem to show any reflection warnings with that code, but lein compile does
07:14TEttingerhey cgrand
07:15TEttingerro_st, have you used *warn-on-reflection* in clojure?
07:15hyPiRionro_st: yay :D
07:15clgvsomtimes there are evil dependencies that switch on *warn-on-reflection* in one of their main namespaces ;)
07:15hyPiRionThere will be another one about indexing and persistent vector's tail next week. I guess we'll filter out all the non-clojurians in that one
07:16clgvhyPiRion: what did you write about?
07:16hyPiRionclgv: http://hypirion.com/musings/understanding-persistent-vector-pt-1
07:16hyPiRionHow Clojure's Persistent Vector work
07:17clgvah nice.
07:17cgrandTEttinger: hi
07:19ro_sthyPiRion: the diagrams did it for me. what did you use to make them?
07:20ro_stit'd be great to see how that picture varies for sets, maps, lists and vectors (which i'm guessing it does)
07:21wunkiis there a fn in clojure which swaps the arguments of a fn?
07:21ro_stswaps them when, wunki?
07:22wunkifirst argument becomes second, second argument the first
07:22hyPiRionro_st: nothing more than graphviz (dot). Unfortunately I can't/don't want to release the source of the graph generation, because that's part of a project at university I'm working on
07:22wunkifor threading purposes
07:22hyPiRionIt'll be released in mid December though, I promise!
07:23TEttingerlike ##((fn [f a b] (f b a)) / 1 0)
07:23lazybot⇒ 0
07:23clojurebotIt's greek to me.
07:23ro_stwunki: (fn [f & args] (apply f (reverse args)))
07:24TEttingerwunki, it does seem like that should exist already
07:24wunkiro_st: that could be a good one indeed. Would think there is a fn in core for that though
07:24TEttingerthere's ->>
07:24TEttinger,(doc ->>)
07:24clojurebot"([x form] [x form & more]); Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc."
07:24TEttingersince you mentioned threading
07:25ro_sthyPiRion: no problem. just dig it, it's a really nice viz
07:25ro_stlook forward to the release!
07:25wunkiTEttinger, exactly, but when you start with a `->` and then comes a function which should have been `->>`
07:25TEttingerah I get it
07:26ro_stthat's usually a good indication that you probably want to break things up
07:26wunkiI know from previous experience that you could just add a `->>` in the `->`, but Clojure was a while ago for me
07:26ro_streadability > brevity
07:26s4muelwunky: https://github.com/Prismatic/plumbing/blob/master/src/plumbing/core.clj#L275-L289
07:26s4muelwunki rather, derp
07:28wunkiah, thanks s4muel. Another great library from Prismatic :)
07:28hyPiRionro_st: http://hypirion.com/data/pvec-pt-1.tar.gz is the source for the text and the .dot files, if you're interested.
07:29ro_stthx!
07:29ro_stheh "Jason W01fe is happy to give a talk anywhere any time on the calculus of arrow macros"
07:31wunkianother solution is btw: (-> m (select-keys some-fn) (->> (fmap some-fn)))
07:32TEttingerfmap?
07:32TEttinger,(doc fmap)
07:32clojurebotTitim gan éirí ort.
07:32wunki[clojure.algo.generic.functor :refer [fmap]]
07:33wunki,(doc clojure.algo.generic.functor/fmap)
07:33clojurebotexcusez-moi
07:33TEttingerso a little more active now -- I had a question earlier about an odd reflection problem. the second line gives a warning:
07:34TEttinger (def ^OrthographicCamera camera (OrthographicCamera.))
07:34TEttinger (.setToOrtho camera false 800.0 480.0)
07:34TEttingerthis is with *warn-on-reflection* true
07:35opqdonuthmm. what is the signature of the setToOrtho method?
07:35TEttingerI can't figure out why that would have that problem... hang on, will fetch
07:36TEttingerhttps://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/OrthographicCamera.java#L141
07:36TEttingerdo I need to cast to float?
07:37TEttingernope, didn't solve it
07:37TEttingerthanks opqdonut
07:38TEttingerthe actual error:
07:38TEttingerReflection warning, dk/DKGame.clj:18:4 - call to setToOrtho can't be resolved.
07:42opqdonutTEttinger: sorry, no idea. seems mysterious
07:42clgvTEttinger: don't forget that the type information of the object might be also missing
07:42opqdonutTEttinger: you _could_ try hinting camera with the fully qualified class name, i.e. ^com.badlogic.gdx.graphics.OrthographicCamera
07:43clgvthat would only help if it is not imported
07:44clgvTEttinger: oh just saw your `def` statement. that is the problematic spot. even if you type hint it clojure cannot be sure that its value wont change
07:45clgvTEttinger: usually you should use type hints somewhere locally to the method calls
07:57TEttingerclgv, will try
08:03TEttingerclgv, woohoo! that did it
08:03TEttingerno warnings!
08:04clgvthe clojure compiler can only infer the type for `def` forms with ^:const metadata since anything else might change during runtime
08:05TEttinger(inc clgv)
08:05lazybot⇒ 8
08:05clgv:D
08:05TEttinger(karma technomancy)
08:06clgv$karma technomancy
08:06lazybottechnomancy has karma 76.
08:06clgvthat's a bit ;)
08:06clojurebotPardon?
08:06TEttingerputs everyone but amalloy to shame
08:06TEttinger$karma amalloy
08:06lazybotamalloy has karma 71.
08:06TEttinger$karma Raynes
08:06lazybotRaynes has karma 36.
08:06clgvhis bot should love him more ;)
08:06TEttingerhaha
08:07Bronsaclgv: that's not true (def tag handling)
08:07Bronsatry (def ^String x "") (defn a [] (.hashCode x)) (def x 1) (a)
08:08Bronsaif you manually type hint you're declaring to the compiler that the tag of the var is not going to change
08:09clgvBronsa: humm well, it does not always seem to work that way
08:10TEttingerBronsa, yeah, I was getting reflection warnings for every call that didn't have the method's object typehinted, even if that object was def'ed with a typehint
08:10TEttinger(clojure 1.5.1)
08:12Bronsado you have an example of this?
08:18glosoliHey folks, I have some form template made with Enlive (with values hardcoded for the development) and I am curious if anyone could suggest a sane way for them to be removed each time I deploy the app ? there is dev profile in the project which defines the mocks used for the development, but I am a bit confused how can I cleanly mock form template depending on the profile
08:20TEttingerBronsa, yes. it's java interop stuff, but:
08:20TEttinger (def ^OrthographicCamera camera (OrthographicCamera.))
08:20TEttinger (.setToOrtho camera false 800.0 480.0)
08:20TEttingerwill send out a reflection warning
08:20TEttingerif I hint camera in the method call, it does not
08:21TEttingerthe line is https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/OrthographicCamera.java#L141
09:05tbaldridgemdrogalis: ping
09:08mdrogalistbaldridge: pong
09:08tbaldridgemdrogalis: deep walking macros? https://www.youtube.com/watch?v=HXfDK1OYpco
09:08mdrogalistbaldridge: Hell yeah!
09:09mdrogalisWell my work day is shot for the next hour. ;)
09:09tbaldridgelol
09:09mdrogalisBetter than a blog post.
09:10tbaldridgeyeah, I really stink when it comes to writing blog posts
09:14clmsyhi everyone
09:14solussdhi
09:14clmsyi have no lisp background or actually any functional prog. background , im a python developer
09:14solussdthat's not a bad place to start from
09:14clmsybut i m interested in clojure and started to learn it
09:15clmsycan i ask questions here
09:15clmsy?
09:15solussda good book is, imo, the best place to start.
09:15solussdsure
09:15mdrogalistbaldridge: I'll give you some feedback in ~2 hours. Going to have to watch it in pieces.
09:15llasramclmsy: Fortunately yes, what with that being a question and all :-)
09:15clmsywell i thought 4clojure.com is pretty cool
09:16clmsycan someone explain me what does ' do infront of lists ?
09:16solussdsome of the online tutorials are pretty cool, but a good book would explain things, like quoting lists, for example, better.
09:16clmsycan you recommend me one solussd
09:16solussdpytting a ' in front of any clojure code "quotes" it, which means you'll get the literal datastructure and it will not be evaluated
09:17solussdThe orielly "Clojure Programming" is a good start
09:17clmsyah ty ^^
09:18clmsyill pick it up first thing
09:18llasram+1 for /Clojure Programming/. And once you've got a handle on the basics of the language, I highly recommend /The Joy of Clojure/
09:18solussdlists look like this (1 2 3). The first item in a list is treated as a function though, so if you want the literal list you have to quote it so it isn't evaluated, e.g., '(1 2 3)
09:18solussd,'(1 2 3)
09:18clojurebot(1 2 3)
09:18solussd(1 2 3)
09:18solussd,(1 2 3)
09:18clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
09:19llasramclmsy: The exceptions start to make sense pretty quickly, I promise :-)
09:19solussdThe joy of clojure is a wonderful book, but much more advanced
09:19clmsyallrighty =)
09:20solussddo you have any java experience?
09:20clmsyyes i do
09:20clmsyi have jvm exp
09:20clmsybut 0 lisp
09:20clmsyand 0 fp
09:20solussdthat exception is saying that the first item in the list (a java.lang.Long, 1), does not implement the IFn interface, which all functions implement
09:20clmsyhmm
09:21solussdmost of clojure implements abstractions. At ground-level those abstractions are java interfaces
09:21clmsynice examples ^^ ty man
09:22solussdnp- have fun learning clojure! It was the most fun I had learning a language since, well, python. :)
09:22clmsy(list [:a :b :c])
09:22llasramditto, though s,python,EVARR!!!one,
09:23solussdif you put a comma before it, it'll get evaluated here
09:23solussd,(list [:a :b :c])
09:23clojurebot([:a :b :c])
09:23solussdso that made a list containing a vector
09:24solussdif you want to use the items in the vector as args for the list function, use 'apply'
09:24solussd,(apply list [:a :b :c])
09:24clojurebot(:a :b :c)
09:24clmsywhat if i want
09:24clmsy'(:a :b :c)
09:24Bronsa,(list* [1 2 3])
09:24clojurebot(1 2 3)
09:25solussdyou need to put a comma out front for the IRC bot to know you want to eval it
09:25clmsyi want the datastructre of a vector
09:25solussdthen just use [:a :b :c]
09:25clmsy,[:a :b :c]
09:25clojurebot[:a :b :c]
09:25solussdor construct one:
09:25solussd,[:a :b :c]
09:25clojurebot[:a :b :c]
09:25solussd,(vector :a :b :c)
09:25clojurebot[:a :b :c]
09:26AimHere,(vec '(:a :b :c))
09:26clojurebot[:a :b :c]
09:26solussdvec takes a collection (e.g., a list) and converts it to a vector
09:26clmsylists can be constructed with either a function or a quoted form.
09:26clmsy(= (list __) '(:a :b :c))
09:26clmsythis is the 4clojure question
09:27clmsyi need to use list fn to create a datastruce
09:27solussdah yes, (list '(:a :b :c))
09:27clmsythats what i understand
09:27clmsyyes
09:27clmsyty
09:27solussderr wait no
09:27AimHereNo
09:27solussdit wants (list :a :b :c)
09:28solussdlist takes any number of args and returns a list of them
09:28solussd,(= (list :a :b :c) '(:a :b :c))
09:28clojurebottrue
09:28clmsyjust a sec
09:28clmsyquick question
09:28clmsy(:a :b :c)
09:28clmsythis is a vector right
09:28clmsy?
09:28AimHereIt's a list
09:28solussdthat's a list
09:28clmsydamn
09:28clmsyso what is the : do here
09:29AimHereIn clojure, vectors have square brackets, and maps have curlies, and sets have hash-curlies, like #{:a :b :c}
09:29clmsyoh man your right yeah
09:29solussdvectors use [], maps use {}, sets use #{}, lists use (), and lists that arent quoted are evaluated
09:29AimHereThat's a keyword
09:29AimHereKeywords are a funny kind of data structure, that just evalutes to itself.
09:30solussda keyword is a symbol that always evaluates to itself. It can be used as a function, which "looks itself up" in an associative datastructure, like a hash-map
09:30AimHereWhen people were programming in other lisps, they found that they sometimes just wanted to pass along as symbol (a name for something, similar to a variable name) without bothering to evaluate it
09:30solussdkeywords are nice as keys in a map: {:mykey "some value"}
09:30solussdthen you can use it, as a function, to look itself up:
09:30AimHereFor instance, in C or C++, you might enum up a list of integers, just because you want to have something bound to a name that you pass on
09:31solussd,(:mykey {:mykey "some value"})
09:31clojurebot"some value"
09:31AimHereWhat the integers they evaluate to actually are doesn't matter - In clojure you'd use keywords instead
09:31clmsythanks a lot for the rich explaining guys
09:32AimHereYeah, you get this because clojure is a new and growing language. In 5 years time this would be replaced by 'RTFM, newguy'
09:33solussdi hope not. :) At least, not if I'm around!
09:34solussdhttp://www.clojurebook.com
10:14mercwithamouthso how many of you all have clojure jobs?
10:18schmirmercwithamouth: I'm currently working on clojure project at work
10:23s4mueli use clojure @ my job, i don't necessarily have a 'clojure job'
10:30francis_wolkeI have a 'clojure job'
10:36replHey guys, how do you use the function key? Example in the documentation uses it with map(i.e. map key {:foo 20 :bar 30}). And this is not working for me: (key {:foo 10})
10:37jweiss,(key (first {:this :that})
10:37clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
10:37jweiss,(key (first {:this :that}))
10:37clojurebot:this
10:37logic_progdnolen: are you responsbile for writing core.logic ?
10:37jweisskey works on map entries, not maps
10:37dnolenlogic_prog: yes
10:37logic_progdnolen: awesome, I'm working through reasonched schemer again, and would like to thank you for all your work
10:38dnolenlogic_prog: thanks!
10:38logic_progdnolen: I feel like the notion of unification is under appreciated in the programming world
10:38repljweiss: neat, going to try it that way, thanks.
10:38TEttingerjweiss: ##(#(+ % %) 1))))))))))))))))))
10:38lazybot⇒ 2
10:38logic_progdnolen: even though the algorithms have "worst case exp time", generally, if the dataset is huge, we need speialized algorithms anyway; and in practice, if the dataset is small, things just work
10:39dnolenlogic_prog: it's very useful, and yes I think core.logic is a good fit for smaller things
10:39ljosIs it possible to use the the normal clojure predicates in core.logic? I want to test if something is a string but (run* [q] (string? q) (== q "string")) doesn't work.
10:39dnolenlogic_prog: the recent expresso lib is particularly nice use case, http://github.com/clojure-numerics/expresso
10:40logic_progdnolen: ha, I'm actually re-studying core.logic precisely because of symbolic computation
10:40francis_wolkeljos: You have to return a goal for your prediate. eg #s or #f
10:40dnolenljos: it's possible to convert a predicate into a constraint but it's experimental, I don't recommend it
10:40logic_progdnolen: in particular, I'm interested in the issue of: suppose I have the following first order logic proposition with forall quantifiers -- can I assign variables to get this other proposition
10:41logic_progdnolen: so it's sorta like "finding if there exists variables that satisfy blah" which is sorta like unification
10:41ljosfrancis_wolke (== true (string? q)) does not work either.
10:41ljosdnolen: is there another way to check the type of a var at runtime, after it has been relised?
10:41dnolenljos: that's because q is a logic var, you need to project it - note this will make your program non-relational
10:41dnolen(project [q] (== true (string? q)))
10:42dnolenwhich will still blow up if q is not groun
10:42dnolenground
10:42dnolenoh sorry actually in this case it won't but of course there are cases where it will
10:42repljweiss: OK, got it. So even when I'm using hashmap like an object, it's still a collection of pairs and I need to use first to retrieve the only pair it has.
10:42francis_wolkeljos: you're attempting to unify true with string. Which isn't going to work.
10:43dnolenlogic_prog: sounds cool!
10:43francis_wolkednolen: which book would you reccomend after the reasoned schemer?
10:44jweissrepl, what is it you want? maps have many keys.
10:44ljosdnolen: Thank you.
10:45repljweiss: Yeah, I understood maps are always collections after looking at your code. I was thinking if there's only one pair, that's treated as one map entry but I was wrong.
10:46jweissrepl: if you know ahead of time that it's going to be one pair, maybe map isn't the best form. a vector of 2 items maybe
10:47jweissrepl: then you can use first and second to retrieve (or destructure)
10:47repljweiss: I see. I'll try using a vector then.
10:47jweiss,(let [[k v] [:this :that]] (list k v))
10:48clojurebot(:this :that)
10:48jweiss(let [x [:this :that] k (first x) v (second x)] (list k v))
10:48jweiss,(let [x [:this :that] k (first x) v (second x)] (list k v))
10:48clojurebot(:this :that)
10:54logic_progdnolen: I know that #u -> u#, #s -> u#, and #t -> true; but what does #f maps to? nil?
10:55dnolenfrancis_wolke: a Prolog book, either Sterling & Shapiro or Brako
10:55dnolenljos: np
10:55dnolenlogic_prog: probably #f -> false
10:56logic_progdnolen: makes sense, for some reason, I was trying "fail" instead nd getting a function
11:00repljweiss: Works MUCH better using a vector, cheers. :-)
11:03repljweiss: bad version: (reduce + (reduce concat (map vals order)))), better using val: (reduce + (map (comp val first) order))), now much better for vector: (reduce + (map second order)))
11:05jweissrepl: nice :)
11:05dnolenlogic_prog: fail is a function and so is succeed
11:05dnolenlogic_prog: same for #u and #s in TRS miniKanren
11:10jweissrepl: there may be more efficient ways to represent pairs if vector doesn't cut it perf-wise. cons cell maybe? i never see those in clojure so maybe not :)
11:13repljweiss: I'm porting dotted cons pair from common lisp actually. (a . b) is not supported in Clojure, so tried map first, now using [a b]. (a b) should work equally well in this context.
11:13jweissrepl: the (a . b) syntax isn't supported, but it has a Cons type
11:14jweiss,(class (cons 1 '(2)))
11:14clojurebotclojure.lang.Cons
11:14jweissi doubt that accessing a Cons is any faster than vector, but Cons may have less mem overhead. just guessing
11:15AimHereI do vaguely remember some talk from RHickey or someone that 2-element vectors are probably what you should use instead of pairs
11:15jweissah ok
11:15jweissthat's what I use but I never cared about performance
11:17arrdemLEIN_IRONIC_JURE? really?
11:17AimHereThat's a vague recollection though, but consing up lists doesn't seem all that idiomatic, and there's likely a more Clojuric way of doing whatever the Clisp is doing
11:18TimMcjweiss: It's not just syntax; Clojure doesn't support pairs in the general case.
11:18repljweiss: Yeah, I wanted to use cons initially. It doesn't work that well when used with reduce. conj works though: e.g. (reduce conj [] […]) => doesn't work with cons.
11:18TimMc&(cons 1 2)
11:18lazybotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long
11:18AimHere&(cons 1 '(2))
11:18lazybot⇒ (1 2)
11:18TimMcRight, but that's not (1 . 2)
11:18TimMcThat's (1 . (2))
11:19jweissi see, no pairs of atoms then
11:21TimMcarrdem: Indeed. ಠ_ಠ
11:21AimHererepl > conj takes multiple args, something like (apply (partial conj []) [...]) might cut down on function call overhead or something, but that's a very rough guess
11:21arrdemTimMc: I need an emacs macro for that face.
11:22AimHereI don't know the filthy details of what reduce or partial are doing when I call them
11:23TimMcAimHere: I don't see the beginning of this discussion, but what's wrong with into?
11:23mercwithamoutho_O
11:23AimHereTimMc, good point, that might be better still! I keep forgetting about into
11:29replTimMc: AimHere: Just tried into, it gives you a vector where concat gives you a list, and concat gives you a lazy seq. into should be very efficient because it uses conj.
11:32TimMcinto is efficient because it uses transients
11:33hyPiRionefficienter
11:34bjathat's going to be a commit message whenever I next use transients
11:38chrisrossiso, xml. there's an emit-element function, that's mostly undocumented, that only outputs to stdout. what's the standard way you guys spit xml back out to an output stream?
11:38bbloomchrisrossi: are you trying to output to somewhere other than stdout?
11:38chrisrossiyes.
11:39justin_smithchrisrossi: I don't use clojure.data.xml, but you could use with-out-str
11:39bbloomclojure has a more general mechanism for redirecting streams
11:39bbloom(doc *out*)
11:39clojurebot"; A java.io.Writer object representing standard output for print operations. Defaults to System/out, wrapped in an OutputStreamWriter"
11:39chrisrossii figure there must be a more robust serializer somewhere.
11:39chrisrossiah, interesting.
11:39chrisrossithanks.
11:39justin_smith(with-out-str (println "hi"))
11:39justin_smith,(with-out-str (println "hi"))
11:39clojurebot"hi\n"
11:39justin_smithand yeah, for more power you can use (binding [*out* ...] ...)
11:40bbloomchrisrossi: if you (source with-out-str) it will be clear. see also with-open
11:40chrisrossiyep, that's pretty easy to read code. makes sense.
12:06arrdem anyone care to comment on monger vs congomongo?
12:06arrdemtelling me to get a better K/V store is OK too.
12:09Raynesarrdem: Both of those are reasonable driver wrappers.
12:10arrdemRaynes: Ok. Examples aren't that different, but I figured I'd ask.
12:15nDuff(particularly since MongoDB isn't a K/V store at all, and using it as if it were one is probably pretty suboptimal)
12:15nDuffarrdem: ...do you _actually need_ a K/V store, or a document store?
12:18mercwithamouthredis ftw?!
12:19eggheadhttps://github.com/lantiga/exoref ?
12:19egghead:p
12:30konrwhat cool things are there to write presentations, besides impress.js?
12:30eggheadreveal.js
12:30indigobespoke.js
12:30eggheadI've also used http://slid.es
12:30beberleilatex?
12:31eggheadwhich lets you just use a little web gui for creating slides
12:31indigoIMO it's better to just use PowerPoint/Keynote/whateverthecrap and make it into a PDF
12:31eggheadindigo: so you can print it out or what?
12:32indigoegghead: That and so I can use gestures to look through it
12:32konrThanks! I've used org-mode->latex->pdf and gluing GIMP images together. Time to be modern!
12:32indigoAlso I hate how some people do a 2D presentation flow with reveal.js
12:33indigoIMO presentations are supposed to flow in a linear fashion
12:33arrdemnDuff: really what I need is an enumerable event store
12:34eggheadindigo: reaveal can work out if you just have the x axis be topics and the y axis be drill down into specifics about the topic
12:34arrdemnDuff: which I happen to be building using records in Mongo, potential scaling issues be damned.
12:34indigoI know what it's for, I just think it's confusing and unnecessary ;P
12:34indigoWhy not just lay out the presentation linearly and have bookmarks relating to topics
12:35indigoUsually when I read slides I mean to read them all, and going down down down right down down right is annoying
12:36eggheadindigo: as a presenter I don't mind it, but ya when I read reveal slides I often forget to press down
12:36indigoAlso what if I want to search for a keyword
12:36indigoI mean I could go to the general overview
12:37indigoBut still, it's a bit annoying and not user-friendly to do that
12:39indigoWhat would be cool is to have a markdown->pdf presentation engine
12:40indigoHey, there's an idea ;)
12:40jtoy&(defn myf ([a ] (myf 1 +)) ([b func] (func 1 b))) ; (myf 4)
12:40lazybotjava.lang.SecurityException: You tripped the alarm! def is bad!
12:42dmillettI'm fairly new to Clojure and would like some feedback if anyone is willing? https://github.com/dmillett/clash
12:43arrdemdmillett: have you tried throwing multi-million entry files at this? when does it fall over?
12:44arrdemdmillett: do lines have to be regular?
12:44dmillettI've tried up to 200 MB file (just a single file) so far. I had to adjust the heap settings upwards of 1+ gb in the project.clj
12:45dmillettI built it where there would some textual structure -- right now it looks for regex groups and pairs them with whatever keyset you want
12:45nDuffrkneufeld: with my #bash hat on, it'd be a lot saner for lein-try not to try to emulate clojure syntax in shell. that is, to support just lein-try org.codehaus.plexus/plexus-utils 3.0.15, no square brackets involved.
12:45nDuffrkneufeld: ...that, *or* to allow legitimate clojure syntax to be passed in within a single, quoted argv element
12:46nDuffrkneufeld: ...as in: lein try '[org.codehaus.plexus/plexus-utils "3.0.15"]'
12:46rkneufeldnDuff: It actually does support excluding square brackets or even the version
12:46nDuffrkneufeld: [] isn't only globbing in zsh -- it's quoting in bash too, it just has fallback behavior of being a noop.
12:46nDuffs/quoting/globbing/
12:46nDuffrkneufeld: ...but having corner cases where that fallback doesn't occur is pretty evil.
12:47rkneufeldrkneufeld: i don't follow what case you are talking about.
12:47nDuffrkneufeld: whenever globs don't match in bash, their default behavior is no-op.
12:47rkneufeldnDuff: yeah, it may be worth considering removing the square-bracket version all together
12:47nDuffrkneufeld: so, [123] will be delivered to the program as '[123]', *unless* the current directory contains a file named 1, a file named 2, or a file named 3, or the "nullglob" shell option is available.
12:47rkneufeldits really been nothing buth trouble.
12:47nDuffrkneufeld: I wholeheartedly agree.
12:48rkneufeld0.4.0 time :D
12:48nDuffs/available/enabled/
12:48rkneufeldI'm going to create an issue for that. I don't have time to do it right this second, but I'd love if you chimed in in support of removing that feature.
12:48rkneufeld(time to do it this second meaning I can't do the *code* portion today)
12:48jweissrkneufeld: thanks for lein-try BTW, helped a lot for my plugin, lein-runproject (which is similar but runs the :main of the project isntead of creating a repl)
12:49rkneufeldpaste of it?
12:55rkneufeldhttps://github.com/rkneufeld/lein-try/issues/16
12:57rkneufeldnDuff: I wasn't able to reproduce the exception: https://www.refheap.com/19037
13:00nDuffrkneufeld: Hmm. In my case, it isn't finding the artifact at all -- doesn't look like it's successfully looking in central, for that matter. https://www.refheap.com/9c58a2fdbbcc25da1c093a547, and hangs indefinitely.
13:05mercwithamouthis there a legitimate purpose for 'quote' ?
13:05nDuffrkneufeld: ...and lein is otherwise able to pull from both central and clojars uneventfully.
13:05nDuffmercwithamouth: for spelling it out vs the reader macro, you mean, or to have it at all?
13:05rasmusto,(eval (quote (prn "test)))
13:05clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading string>
13:06technomancymercwithamouth: no, it was added as a joke. no one noticed until now
13:06rasmusto,(eval (quote (prn "test")))
13:06clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
13:06mercwithamouthoutside of possibly writing forms that change depending on what type of form is returned???
13:06lazybotmercwithamouth: How could that be wrong?
13:06mercwithamouthtechnomancy: easter egg! you agree with me!
13:06nDuffmercwithamouth: if you didn't have quote, how would you define a list as data, without executing it?
13:07mercwithamouthnDuff: *shrugs*
13:07nDuffmercwithamouth: ...well, there's your answer.
13:07metellus,(list 1 2 3)
13:07clojurebot(1 2 3)
13:07llasrammercwithamouth: How would you quote symbols for writing macros without it?
13:08mercwithamouthllasram: dunno, i've never done that =P
13:08justin_smithhell, how would def or let work without quote
13:08mercwithamouth<- clojure newb
13:08llasrammercwithamouth: Well, there you go
13:09llasramNot the newb part -- I meant quoting as being primarily useful in Clojure for macros. In e.g. Common Lisp it's a bit more generally useful because you don't have non-evaluating data structures like vectors
13:09justin_smithI mean I guess it could be (def (symbol "foo") 0) or something so really it is a subcase of the macro case
13:10llasramjustin_smith: But you'd still need to (syntax) quote the form. Well, or I guess you would write: (list (symbol "def") (symbol "foo") 0)
13:10llasramBut... eww
13:10mercwithamouthstill very lost...i'll keep reading then come back to harass you all with more questions
13:10justin_smithllasram: yeah, seriously
13:11mercwithamouthwell no...now i see exactly how code is considered 'data'
13:11mercwithamouthliterally...
13:12eggheadso, you see that the code is data (list structures), but do you see that the data is code!
13:12egghead:p
13:13mercwithamouth,(list '+ 'x 'x)
13:13clojurebot(+ x x)
13:13mercwithamouthguess so
13:14rasmusto,'(+ x x)
13:14clojurebot(+ x x)
13:17zakwilsonCombine that with having the compiler available at runtime and it becomes very easy to write programs that write programs. Sure, eventually you get skynet, but before that you have an immensely expressive language.
13:29dobry-denI've written a program that lets me 'add-dep raynes/laser' from the command line and it conjs the closest match from clojars.org/search?q=raynes/laser into my project.clj deps.
13:31dobry-deni will turn it into a lein plugin for the fellow lazy
13:31dobry-denonce i figure out how
13:33dobry-deni will try to use it to ensnare other rubyists
13:36dobry-denzakwilson: when i first was learning clojure, the long trip to clojars was grueling
13:37mercwithamouthsigh...a lot of rubyists are coming to clojure aren't they? =( I swear i didn't realize until after i'd gotten here
13:37dobry-denclojure is the natural evolution of a rubyist
13:37dobry-denthe final form
13:37mercwithamouth*heads over to #haskell
13:38mercwithamouthdobry-den: you may be right there....i wish i gave it a try back in 2008. i ran away
13:38mercwithamouthrubyists are very enthusiastic though smug...i hope that isn't brought to the clojure crowd
13:38dobry-deni spent 6 months with scala and haskell. took copious notes. dismissed clojure without much thought because of the syntax
13:39dobry-denthen i tried clojure, got over the parens after an hour, and immediately felt like i could do something immediately.
13:39mercwithamouthdobry-den: same
13:40ToxicFrogmercwithamouth: it takes serious effort to be as smug as the Ruby community~
13:40`cbpdobry-den: did you do any lisp before? I know some people that just cant get over the parenphobia
13:40dobry-dendunno about the smug epithet. maybe if you spend too much time in a rails coredev brouhaha
13:41mercwithamouthscala is actually cool until you get to def distribute[A,B](fab: F[(A, B)]): (F[A], F[B])
13:41mercwithamouthToxicFrog: lol
13:42mercwithamouthdobry-den: you're right...let me take that back. the rails community is smug... #ruby is much better
13:43dobry-den`cbp: tryclojure.org was my first experience with lisp ~6 months ago. the breakthrough is when i realized that lisp devs don't painstakingly manage their parens.
13:43dobry-denie i discovered paredit
13:43`cbpdobry-den: so you knew emacs?
13:43mercwithamouthdobry-den: yes... paraedit is awesome...and even more so slurp and barfing...dunno if thats and emacs-lvie thing only?
13:44dobry-deni knew vim and just spent a weekend fiddling with emacs + evil-mode + nrepl
13:44mercwithamouthC-left/C-right ?
13:44coredClojure next evolution for a Rubyists
13:44coredthat doesn't sound quite right
13:44mercwithamouthhow is evil-mode by the way? I've spent a good amount of time with emacs and vim so i was fine with the emacs keybindings....i've turned vipermode on a few times though it sort of annoys me
13:45dobry-denthere's something novel about getting lost in bare-bones software with nothing but knowing how to search for help-files.
13:45jweissdobry-den: wait till you see paredit + multiple cursores :)
13:45jweiss*cursors
13:45mercwithamouthwell ruby was originally a lisp, right?
13:45dobry-denin emacs, i'd just learn one thing at a time as i needed. it. C-x C-f to open a file. got it. C-h k to see what a key just did. go tit
13:45uris77elixir is probably the next ruby, most rubyist will flock there
13:46uris77until they get bored
13:46mercwithamouthi never got bit by the multiple cursor bug with sublime..
13:46ToxicFrogdobry-den: I don't think it's just Rails; I gave up on Ruby due to the community impression well before Rails was popular (or, I think, even existed)
13:46`cbpjweiss: does Magnar have a video of that? :-D
13:46technomancymercwithamouth: maybe you're thinking of R?
13:46jweiss`cbp: indeed he does, IIRC. let me see if i can find
13:46mercwithamouthtechnomancy: no..definitely ruby
13:47dobry-denmercwithamouth: evil-mode is pretty install-and-forget-about-it for me. bare-bones emacs + evil-mode is pretty close to vim once you learn how to open a file.
13:47technomancythere's a talk where Matz says he was greatly inspired by lisp and then points to the fact that predicates end in ? and there are higher order functions, followed by vigorous hand-waving.
13:48`cbpOn that note I wanted to see his webrebels talk but I don't even know if they're releasing those videos :-(. I heard he did some serious emacs wizardry
13:48mercwithamouthok ok so it wasn't a lisp..lisp simply inspired him to create ruby.
13:48dobry-denclojure feels comfortable after 4 years of ruby. ruby's blocks pave the way to lambda functions
13:49jweiss`cbp: http://www.youtube.com/watch?v=D6h5dFyyUX0&amp;feature=player_embedded#t=174
13:49`cbpjweiss: thx
13:49jweiss`cbp: it's part of the paredit emacs rocks video (at the end)
13:49uris77javascript feels more like lisp to me than ruby.
13:50mercwithamouthjweiss: this video shows paraedit with multiple cursors?
13:50havenwoodAn aside from the Ruby manpage: If you "like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
13:50dobry-denbut javascript's dynamic scope is what makes it feel so foreign to ruby and clojure imo.
13:50jweissmercwithamouth: yeah, doesn't it?
13:50technomancyhavenwood: insert "and have never heard of Dylan" in there somewhere
13:51mercwithamouthjweiss: indeed
13:51jweissi use that all the time now
13:52jweissit's like lisp-aware search/replace :)
13:53dobry-denmercwithamouth: http://www.haskell.org/haskellwiki/Random_shuffle
13:55arrdemRaynes: so shall we or shall we not give you reputation points for every refheap link ever posted here? I'm undecided.
13:55havenwooddobry-den: i like your dep-add idea, though it'd be nice to be able to remove as well :O
13:58mdrogalistbaldrid_: ping
13:59havenwooddobry-den: something like `lein-dep --add raynes/laser` and `lein-dep --remove raynes/laser`
13:59zakwilsonI feel a lot of CL influence in some parts of Ruby.
14:02tbaldridgemdrogalis: pong
14:03mdrogalistbaldridge: 2 things. #1: You different than I pictured you. :P #2: Terrific video. You're a great teacher.
14:03mdrogalisReally easy to follow along.
14:03mdrogalisYou sound different* ^
14:03tbaldridgenice!
14:04mdrogalisIt wasn't remotely as scary a concept as I thought it'd be.
14:04tbaldridgethanks, I appreciate that.
14:04mdrogalisAnytime. Post that thing everywhere. People will watch it for sure.
14:04tbaldridgeI hope to work on the go macro one this weekend, it isn't too much more complex, just more of it.
14:05mdrogalisHow'd you get your fn to show up as a lambda?
14:05`cbpwhere is that video? or is it none of my business :-D?
14:06dobry-denhavenwood: I considered that but postponed it since it's the "go out on the internet, find the latest version of X and the artifactid incantation to copy into project.clj every time" part that slows me down
14:06tbaldridgemdrogalis: I use https://github.com/overtone/emacs-live
14:06havenwooddobry-den: look forward to trying it! :)
14:07tbaldridgeits not exactly a light emacs config, but it has some nice features I like.
14:07dobry-denhavenwood: i made an effort to use maven central as a fallback if clojars failed but maven is sort of a mess
14:08dobry-deni dont even know if im in the right place half the time i'm manually trying to find a lib on maven
14:08mdrogalis`cbp: https://www.youtube.com/watch?v=HXfDK1OYpco
14:08mdrogalistbaldridge: Pretty neat. I appreciate the knowledge!
14:09callenmdrogalis: ZOOOOOOOOMG
14:09`cbpmdrogalis: thanks
14:09callentbaldridge: Thank you for posting that!
14:09`cbptbaldridge: thanks too
14:09mdrogalistbaldridge: You diagnose non-trivial problems really fast.
14:11tbaldridgemdrogalis: practice makes perfect, most of those bugs I've hit 20 times before, perhaps I'll learn someday :-P
14:12callenoh the mistakes I am learning from with recursive data right now ;_;
14:12mdrogalisHeh,
14:14callenhere's a tip from somebody that knows: "preserve the full path to child elements zipper-style so it's easier to re-construct the tree later.
14:14callen"
14:30dobry-denAre the ribbon images broken for anyone else? https://github.com/blog/273-github-ribbons
14:31dobry-denNevermind.
14:53gf3s4muel & noplamodo: Hola guys
14:53dobry-denFor debugging purposes, I want to <pre>(pprint request-map)</pre> in the layout-html file of my Compojure app. What's an easy way to make `request-map` available for every route?
14:53gf3s4muel & noplamodo: Feel free to add me on IM and send me viagra spam: gianni@runlevel6.org
14:53dobry-denNaive approach, of course, would be to pass `request-map` into every single route
14:54llasramdobry-den: A dynamic var, bound by some middleware? Spooky action-at-a-distance, but might be appropriate here
14:59dobry-denllasram: Right now my handler.clj requires my controllers and each route passes params into a respective controller: https://github.com/danneu/clj-forum/blob/master/src/forum/handler.clj#L17 - how would i bind the request so that controllers and views can see it?
15:07llasramdobry-den: You'd add middleware around the current contents of your `app` var. Just another of function in the composition
15:15marcopolo2Is there a way to know the name of the compiled clojurescript file ahead of time?
15:15marcopolo2as in knowing it will become main.js
15:15marcopolo2Could a macro reading the project.clj work?
15:17gfredericksmarcopolo2: back when I used cljsbuild you could set the output file
15:18gfredericks,(class {(range) :foo})
15:18clojurebotclojure.lang.PersistentArrayMap
15:18gfredericks,(hash (range))
15:18dobry-denllasram: I'd have to bind it in another file just so controller namespaces can require it, right?
15:18clojurebot#<OutOfMemoryError java.lang.OutOfMemoryError: Java heap space>
15:18gfredericksoh right
15:18marcopolo2gfredericks: I mean being able to see the name of the output file within the clojurescript program
15:23llasramdobry-den: No... Look up how ring middleware works. Essentially you write a function which will recieve the request, then can directly respond, or pass that request down the chain by calling the function composing the rest of the application. That function returns with the response, the middleware returns that, and the response flows back up the stack
15:24llasramdobry-den: That means you can write a middleware function which binds the request to some dynamic var for the dynamic scope of the rest of the application
15:24llasramI'd actually be kind of surprised if there wasn't already something like that
15:28dobry-denYeah, I understand middleware superficially, and I've just written this: https://www.refheap.com/19041 - But wouldn't `req` have to be required into any namespace that wants to see it?
15:29llasramdobry-den: Oh, yes -- sorry, I misunderstood what "it" was in your question :-)
15:30llasramSo yes, you'll need to :require or otherwise reference it everywhere you want to reference it
15:32dobry-denah of course. i don't know why dynamic scope is so nebulous to me. i feel like a monkey near a monolith.
15:33mtpdynamic scope proceeds up the /call stack/, not the level-of-textual-nesting stack
15:33mtpjfyi
15:35llasrammtp: Er, yes?
15:35mtpllasram, you're not the one who found dynamic scope nebulous, i'm trying to clarify it for dobry-den
15:36dobry-denmtp: Doesnt that just mean anything that's called within (binding [x ...] <stuff>) where x is (def ^:dynamic x)
15:36mtpdobry-den, my secret is i don't actually know clojure :)
15:36mtpi just know how dynamic vs. lexical scope works
15:36mtp(in the general case)
15:36llasramdobry-den: Don't worry, you've got it
15:37dobry-denI'm unfamiliar with computer science 101 terms like 'call stack' - is why i asked
15:37bjahow might I mock or monkey patch something for testing in clojurescript?
15:37dobry-denllasram: thanks tho, this middleware did it
15:50muhoo"Your mock object is mocking you. For needing it." -- Rich Hickey
15:52etehtsea(select-keys nil [:a :b])
15:52etehtsea{}
15:52etehtseawhy this is allowed?
15:52etehtseaI don't get it
15:53mdrogalisIs it possible to add an interface to an existing Java class?
15:53callenahhh, nothing like replacing 20 lines of loop recur with 3 + 2 + 1 lines of reduce.
15:55callenmdrogalis: Java 8 is bringing interface injection. I don't know of a way around it that doesn't involve deep magic.
15:55mdrogaliscallen: Sad :(
15:55callenFunny how those Java blokes end up having to implement everything dynamic languages do anyway
15:55callendespite insisting YAGNI
15:55mdrogalisYeah
15:55callenalso I want to know how Groovy won the Script Bowl.
15:56mdrogalisWow, seriously? What order did it come in?
15:56mdrogalisI didnt hear anything about it
16:06callenmdrogalis: Java One. I don't know the order, scraping the barest minimum of details from Twitter :(
16:26muhooinstalled base. history. millions and millions of people who already know java, and groovy was the shortest path for them.
16:26muhoomet a java guy recently who tried clojure and scoffed at it ("too slow"), does all his day-job work in groovy now.
16:26callenlol.
16:27callenmuhoo: that doesn't explain why Groovy won script bowl - how is that decided?
16:27callenalso isn't Groovy substantially slower than Clojure?
16:27muhoohaven't a clue, but my blind guess is above.
16:28technomancyisn't the script bowl judged by how loud the audience cheers?
16:28muhootechnomancy: aren't most things? :-)
16:28technomancyso unfamiliarity is highly penalized
16:28tbaldridgeI'm porting PHP to Java then and entering the ScriptBowl next year then....
16:30mdrogalisHah
16:30mdrogalisWell I know they vote out the lowest scoring language
16:30mdrogalisShould have voted out Java from its own conference ;(
16:30eric_normandgroovy probably looks cool to a java guy
16:30eric_normandsame stuff but shorter
16:31mdrogalisTrue.
16:34callenI love how Scala lost just because of compilation time.
16:38mdrogalisThat seems like a pretty silly competition anyhow.
16:41nopromptdnolen: thanks for fixing that. :) after pulling everything down and getting it all set up i'm eager to dig through source. :)
16:41nopromptdnolen: (context is the (keyword :keyword) bug)
16:42nopromptit'd be nice if you could fill out the CA online. :-/
16:52callennoprompt: get my email?
16:52nopromptcallen: lemme check.
16:52callennoprompt: also add my email address that I sent it from to gchat so we can see each other on gchat/hangouts please. :)
16:53callens4muel: you too!
16:53nopromptcallen: ok. now we can share music, pictures, games, and more!
16:53callenlol. Just need a way to do the conference call tonight.
16:53nopromptcallen: it's life 2.0.
16:54callennoprompt: does the division of responsibilities seem okay?
16:55nopromptcallen: am i "CJ"
16:55callennoprompt: yeah I was basing it on the email
16:56callennoprompt: I asked you if the name was okay. I didn't know what else to call you.
16:56nopromptcallen: my name is Joel.
16:56nopromptyou hear that #clojure? my name is Joel!
16:56callenOkay, thank you. I figured cj was wrong but I was using what was at the beginning of the email address.
16:56callenThat's why I asked if it was wrong in the email.
16:57ToBeReplacedevery time i have to use chef, i want to break my monitor
16:58callenToBeReplaced: chef sucks. I'm sorry you have to use it :(
16:58dnolennoprompt: no problem. Always excited about new contributors.
16:58ToBeReplacedcallen: have you used anything you've liked?
16:59callenToBeReplaced: Fabric and Ansible.
16:59nopromptdnolen: fwiw there's a typo in devnotes/testing https://github.com/clojure/clojurescript/blob/master/devnotes/testing#L9
16:59callenre-materializing trees that were serialized into constituent objects *and* you've got two different kinds of cardinality in the "children" is a special kind of hell.
16:59dnolennoprompt: yeah I should probably just delete that file
17:00dnolennoprompt: the wiki has the correct instructions
17:00nopromptdnolen: yeah, I "discovered" that. :-P
17:01callenI need an update-in that works across embedded maps and embedded maps inside of vectors keyed by an id. How fucked am I?
17:01callen(keyed by a pk, not by "placeness" in the vector. I'm not that stupid)
17:01nopromptcallen: doesn't sound that bad.
17:02nopromptand by "that" i mean **that**
17:02callennoprompt: you would think, but the path is a vector of keywords and you don't know upfront which keywords are for fields or primary keys.
17:02callennoprompt: I've also been ass-deep in this for a long time and this is just yet another problem this Vietnam has thrown in my face.
17:03callenI'm losing patience.
17:03nopromptcallen: zippers.
17:03callennoprompt: not possible.
17:03callennoprompt: this is about going from a tree to a bag of entities in Datomic, back to a tree.
17:03callennoprompt: but nice thought. zipper'ish behavior is what I'm trying to do with the keyword path
17:04callennoprompt: also you're forgetting that zippers can't handle the multi-cardinality keyword referenced children.
17:04callennot unless I special-case the fuck out of it and then I'm back to where I started.
17:04callenthis is not a normal tree.
17:05Apage43these ain't your dad's trees
17:05nopromptsounds like a bush more than a tree.
17:05calleneither way, fucked.
17:06dnolennoprompt: http://github.com/clojure/clojurescript, fixed the README.md to link to Developer page of wiki
17:06nopromptdnolen: thanks!
17:07Apage43is it not reasonable to "normalize" the thing into a consistent form first?
17:07callenI don't think even my zipper approach will work. The path generator in the tree->bag-of-entites stuff doesn't know at the point of cross-generational linking whether it's cardinality many or one.
17:07callenApage43: the normalized form is either the bag of entities or the original tree.
17:07noprompti just wanna say. the clojure community has had an enormous positive effect on my life.
17:07Apage43yeah
17:07noprompteveryone here is awesome <3
17:09Apage43it sounds like you're saying you've got them mixed tho
17:10callenApage43: no, I'm just trying to back from the bag of entities to the original, unchanged tree format.
17:10callenApage43: using the metadata I inject at the time I create the bag of entities.
17:10Apage43ah
17:10callenI'm like 5 loop/recur forms past the point of sanity.
17:11ToBeReplacedcallen: have you considered doing it in more than one pass?
17:12callenToBeReplaced: top-level tree re-materialization is a reduce. That effectively is multiple-passes
17:12callenI'm even cheating and sorting the children by path length
17:12ToBeReplacedi mean the real answer is fix it upstream, but if i was in that spot, i might make a pass to collect data like "is this a PK level or not" and use that to simplify the algo
17:12callenso I don't have to worry about creating intermediate shim objects
17:12callenToBeReplaced: there is no upstream to fix. All the right metadata is in place.
17:13callenI'm just losing stamina and patience after having traverse a mental universe of problems from earlier parts of this problem.
17:13callenhaving to traverse*
17:13callens/objects/maps/g you get the idea.
17:13ToBeReplacedwell, something's gotta be broken, right? what you're describing is much too complex to be required
17:13callenno. it's just that complex.
17:13callenthe data model is insane and translating it to Datomic takes work.
17:14callenIt's a bullshit hybrid Semantic database + document store + EAV
17:14ToBeReplacedfair enough
17:14nopromptthat was like the experience i had this summer moving a huge mysql database to neo4j.
17:14callenI have to sanitize it into a bag of entities Datomic understands while preserving enough information to return to the bullshit semantic tree whatcha-muh-fuck-whocares thing-jigger it originated with.
17:14callennoprompt: MySQL would be simpler because the pathological cases are extreme normal form or extreme denormalization.
17:15nopromptloop/recur; futures everywhere.
17:15callenI'd prefer that to this bizarro world semantic database lkmrslgkmrtklhmsrlkyjmdkltyjkdmfglkhmdtrjhmdryop
17:15Apage43problems happen because those are not necessary roundtrippable
17:15Apage43which I guess is where the extra metadata comes in
17:15callenI have to be able to reconstitute it.
17:15callenusers won't understand the bag of entities.
17:16nopromptit took about a month to just get the migration working and about another week to make it fast.
17:16callennoprompt: I'm about 2 weeks into this.
17:16nopromptone of the more painful data migrations i can remember.
17:16callenIt's nearly working.
17:17callenIn some sense, it *is* working.
17:17callenInserts/upserts are working fine for the most part.
17:17nopromptcallen: did you break out the whiteboard yet?
17:17callenIt's the reconstitution back into the original, unmigrated form, that isn't working yet.
17:17callennoprompt: many times.
17:17callenthe problem is in my head, my sanity is just damaged atm.
17:18callenI have to write an update-in that understands map association vs. vector pk-based injection.
17:18noprompti'm curious about datomic. where does it fit in the database world?
17:18callenonce I do that, this should actually start working.
17:19callennoprompt: EAV, never lose history of state, highly efficient / low latency querying/aggregations if you're on the JVM
17:19Apage43I'm in a similar state, though for dumber reasons. Spent a long time thinking on improvements to our replication protocol, and the last couple months have involved it all getting torn apart under the weight of the existing code, and I'm just too tired of dealing with it to load the whole thing into my head any more
17:19callenavailable reads, consistent writes - roughly speaking.
17:19nopromptwhat's it closest to in terms of database types? graph? table? k/v?
17:19Apage43which sucks, since I'm not *entirely* confident it's all still correct
17:19callennoprompt: relational maps.
17:19callennoprompt: but the maps are actually EAV.
17:20callenfull schema enforcement, database functions, etc.
17:20callennoprompt: a single entity can satisfy multiple 'types' of data.
17:20callenyou define the equivalent of a table implicitly through keyword namespacing.
17:20callen:user/name :user/email :user/bcrypt-password
17:20nopromptinteresting. i wonder if i should have looked more at that before choosing neo4j on this project.
17:20callenan entity can satisfy that type and multiple otehrs.
17:20callennoprompt: it is decidedly not a graph store. I have my own reservations about neo4j but they might not be relevant to your problem.
17:21callenDatomic is an alternative to RDBMS for when you actually *care* about your data. I don't think it replaces anything else except for maybe document stores.
17:21nopromptcallen: i'm building a prep-sports application. so students attending schools, playing for football/basketball/etc teams, game stats.
17:22callenwe needed to have traversable/queryable transactions and full history of entities, so Datomic fit our problem neatly.
17:22noprompta graph store made the most sense.
17:22callennoprompt: your thing doesn't sound like a graph problem to me, but you would know better than I.
17:22Apage43I'm hesitant to use graph stores for things that aren't graph problems
17:22callen^^ precisely.
17:22nopromptcallen: trust me that's a graph problem.
17:22Apage43even if that data feels like a graph
17:22callenI've had bad experiences with premature use of neo4j before.
17:23callenyou can store adjacencies and graph meta data in entites in Datomic obviously, I don't know how efficient it would be.
17:23nopromptcallen: fwiw, i looked at the other available options excluding datomic (cause of the price tag).
17:24callenI try to avoid projects where $3k is anything other than a sneeze, but fair enough.
17:24Apage43mostly cause graph stores start to get problematic when you have too much stuff
17:24callennoprompt: I don't know if you should use Datomic or not. I don't know enough about your data.
17:24nopromptactually it was kind of funny because i've read on more than one occasion that modeling sports data is excellent fit for graph databases.
17:24callenApage43: if I *had* to store a graph I'd use something like Jiraph or Twitter's graph store.
17:25callenI don't trust of what most people that work on graph databases tell me anymore.
17:25callenmost of what*
17:25nDuffcallen: there are also shops that have real money, but have an allergy to spending it on licensing. Current employer is very cash-rich, but has a serious OSS-or-internal-or-bust streak.
17:25nopromptApage43: are you sure? because from everything i've read it sounds like they're capable of working with a tremendous amount of data. i think it's when you have too many relationships that it actually gets bad.
17:26callennDuff: we're in bio. You can't have autarky/autarchy in the bio/med field.
17:26callenit's impossible.
17:26callen$3k being a perpetual license made it an even easier decision.
17:26callennoprompt: worth considering that if it scaled that well, Twitter wouldn't have had to make their own.
17:27callenand Twitter's is just sharded adjacency lists IIRC
17:27callen"just"
17:27Apage43noprompt: yeah. That's the thing, Under a certain size you can do whatever, but after that size the "shape" of your data affects you a lot
17:27Apage43and the kind of things you want to ask
17:28callendozba: every service will evolve to the point where it becomes postgres. a service that cannot become postgres will be replaced by one that can.
17:28callenrelevant ^^ lol
17:28nDuffcallen: $3K per process? It's an interesting place to be in when software licensing costs have a significant impact on decisions about larger-boxes-vs-more-boxes, but that's more than enough to have that effect.
17:28callennDuff: ...have you looked at Datomic's pricing?
17:28callennDuff: it's $3k for 5 *peers*
17:28callenperpetual
17:28nDuffif that's 5 _transactors_, it'd be one thing.
17:28callenthat could hypothetically be a bejeezus-load of throughput.
17:29callenI don't think you understand Datomic.
17:29callenthere's only ever one transactor.
17:29nDuffI don't.
17:29callenthere's only ever going to be one transactor.
17:29nDuffI'm too scared off by the pricing.
17:29callenthere's fail-over, but there's only one transactor.
17:29Apage43(IIRC that is *concurrent* peers too, you can have them -installed- on more than 5 machines, only 5 of them can actually be *online* at once, which is actually pretty nice, since you can hot swap stuff in)
17:29nopromptApage43: foturnately, i think for what i'm doing it shouldn't be a problem. if it ends up being a bottleneck down the road, then of course you'll worry about it then.
17:29noprompt:-)
17:30Apage43yeah, I expect not
17:30callenthe transactor is limited by the queue, which has been benchmarked at 1 mm messages per second.
17:30callenstorage isn't really an issue if you know what you're doing.
17:30callen5 peers is a lot of read throughput.
17:30nDuff(or, rather, by having experience in exactly how hard it would be to get my organization to cover the pricing, having tried and failed to fight that battle elsewhere)
17:30nopromptApage43: right now it's just me developing this application. modeling sports data with mysql is *insane*. k/v doesn't make sense and neither does a document store (cause then you have to resolve relationships).
17:30noprompt*manually
17:31callennoprompt: sounds like either a relational EAV or graph to me.
17:31callenI can't say which would be better.
17:31bwreillydeveloping...with mysql is *insane*
17:31nopromptit's *not* relational
17:32callenthe distinction doesn't matter a ton in this case.
17:32callenrelational EAV meaning Datomic, the way relations work there is not like SQL DBs.
17:32callenit's more flexible than that.
17:32callenyou're storing attributes of scalar or many refs
17:33callenstoring those relationships in terms of an adjacency list graph in Datomic isn't that big of a leap.
17:33callenI just don't know that it's necessarily a good idea.
17:33noprompti'll definitely look at datomic on my next greenfield project.
17:34callenping me with questions and all that.
17:34Apage43I actually expect datomic might handle it better than some other systems, on account of the way it does local caching
17:35Apage43if you hit the same entity several times during a traversal you won't actually have to go fetch it from storage again.. probably
17:35callenI should make a graph traversal benchmark for Datomic, lol.
17:35nopromptin my case the users (my co-workers) are interested in getting more in depth statistics about players/teams. the sql queries to make some of that stuff happen are nightmarishly ugly.
17:35callenApage43: you wouldn't - it'd be cached.
17:35Apage43right
17:35callenApage43: if you can shard peers by "concern" or graph section then the LRU gets smarter.
17:35callenthat's getting into more inside baseball than is likely necessary though.
17:36jimrthyThat seems like a good place to start
17:36tbaldrid_and it should be mentioned, inserting graphs into Datomic is suuuper simple. You can actually insert an entire mesh of entities as a single transaction
17:36nopromptwhat takes 3 or 4 queries and then manual processing, is one Cypher query and minor post processing once you have the data.
17:36jimrthySorry...wrong window
17:36callentbaldridge: I've been using that faculty to handle insert/upserting documents with arbitrarily embedded children as bags of entities.
17:36tbaldridgenice
17:37callenso I can do partial overwrites of the entire hierarchy in one go
17:37noprompttbaldridge: that sounds really interesting. unfortunately i've already put months of effort into the project so that's where i'm at.
17:37callenwithout having to "think" about which parts I'm overwriting.
17:37jimrthyThat seems like a good way to start
17:37jimrthyDammit.
17:37tbaldridgenoprompt: I know, I just get excited about Datomic sometimes </bias>
17:37callentbaldridge: I'm excited about watching your deep macros video later :)
17:40noprompttbaldridge: fwiw, i did look at datomic when i started. however, considering that i work for a newspaper that's just barely getting by right now, a dataomic license is a bit out of the question. :(
17:40noprompttbaldridge is making a video?
17:40nopromptnow *that* i'm really excited about.
17:40tbaldridgenoprompt: http://www.youtube.com/watch?v=HXfDK1OYpco
17:41muhooyou can do a lot with datomic free
17:42muhooi was kind of surprised.
17:43noprompthaha i feel like paul rudd from the celery man video.
17:43callenmuhoo: yeah Datomic Free didn't seem that bad to me.
17:43noprompt"now tayne i can get in to"
17:43callenI think people are more averse to H2 than it merits.
18:12nopromptcallen: the next time you use the word "muggles" to describe a subset of programmers, see if you can't figure out a way to slip in a jungle book reference, perhaps with a mowgli or balloo reference.
18:15callenokay, so I'm changing tactics on this tree materialization problem
18:16callentop-down means a search problem generating a path across maps *and* keys
18:16callenI'm going to do bottom-up merges of nth-most children into direct parents only.
18:16callenno partial trees.
18:18callenbottom-up idea courtesy of a coworker :)
18:33gfredericksif a POST has no body, is there anything wrong with it having no content-type?
18:37amalloygfredericks: When an entity-body is included with a message, the data type of that body is determined via the header fields Content-Type and Content- Encoding.
18:37amalloyhttp://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.2
18:38amalloyso if you don't include a body, i don't think there's any reason you need an encoding; certainly post isn't special in any relevant way (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5)
18:47robinkI'm using Clojure to try to complete a challenge in one of those free online courses (this one is about cryptography). I've got an ASCII string (sadly represented as a 7-bit literal packed ASCII string of #{0 1} (with *no* MSB for an 8-bit byte, despite that all the data is 7-bit). Most likely I can (and should) how to figure out the minutia entirely by myself, but I had a couple of questions:
18:47robinkOne: is it better to store te enciphered text as a BigInt(eger), or a byte array?
18:48robinkI'm going to want to be able to perform modulo, bitwise xor and indexed manipulation of it, and while I realize you can do that with Strings, Java makes them immutable (and of course not persistent), so despite Clojure's extensive support for persistently mutating Java's String class instances, I'd like to keep it in a form that both Clojure and Java can consider "mutable" (but not actually mutable, or at least not treated that way if I'm packing the
18:48robinkciphertext into a mutable Java array)
18:50robinkThis is extremely low priority, the class and challenge are not superhard, I am neither extremely serious nor extremely committed to a study of cryptography, and my work, academic, and hobby careers will not be negatively impacted if I fail at this.
18:50robinkIn fact, I'd rather have a stronger understanding of Clojure and an only slightly improved understanding of OTPs when I'm done with this than to understand the math and theory perfectly and to have solved the problem in Python.
18:51robinkIn fact, mostly I just want to become better at handling untyped packed data directly (in any language, but in Clojure as well) without having to resort to types and classes that may be partially appropriate for what is being transformed, but not appropriate for the types of transformations I'm attempting.
18:53robinkRight now the strings are stored as an 8-bit-padded BigInteger, since I can call .xor on it (clojure.core/bit-xor doesn't operate on BigInt(eger)s, so I'm most likely not going to use it).
18:54robinkThe other thing is this is the kind of data that really really could (and probably should) be treated as a vector/list/Array.
18:54robinkJust not a String for the time being
18:57noncomi'd use either NIO buffers or byte arrays. and bit operations yeah. if you go with nios then i'd advice to look at vertigo library made by zach tellman
18:57noncomactually, immutability and all fancy clojure stuff, i see no good application for when tossing bits like that
18:58noncomdo not use bigints for that
18:58noncomthats for sure
18:58robinknoncom: Gotcha
18:58robinknoncom: They aren't great but I can run a modulo on the entire chunk as a single unit with them as BigIntegers.
18:59robinknoncom: I could probably do the same thing with a byte array, but I'd need to think about *how* (I am almost as bad at programming as I am with math)
18:59noncomwhat do you mean to run a modulo on the entire chunk?
19:00robinknoncom: i.e. with the entire cyphertext as a BigInteger, I can do (mod mybigint magicnumber) and get the remainder of a modulus operation on the entire ciphertext, rather than pieces at a time.
19:00noncomoh i see
19:01robinknoncom: I could do useful things with a modulo of each piece, and there is probably some extremely obvious way to perform what would be a (mod onebignumber mydivisor) on a byte array or something similar, but the how if it is not immediately apparent to me.
19:01noncomwell, i think that all else will be harder though. but you could convert the array/niobuffer into a bigint specifically for that operation
19:01robinknoncom: So base everything off of an array, bytestream or NIO stream?
19:02robinknoncom: Can do, I just want to make sure the few times I use Java I never mutate whatever it is I'm working on.
19:02noncomif you have the entire data at once, then no streams, just buffers
19:02robinknoncom: because if I screw up the cyphertext and can't think of how to reverse what I've done, that is not a good thing.
19:02robinknoncom: OK
19:02noncomcan you safe-copy the original text?
19:03robinknoncom: Sure, I'm happy to make copies or do COW.
19:03robinknoncom: Or make a buncha references to it.
19:03robinknoncom: Whatever's good Clojure practice and not horrible Java practice.
19:03noncomuh.. well anyway, it does not reeally come to me whats the benifit of using clojure here...
19:04noncomaside maybe from the cool vertigo lib
19:04robinknoncom: REPL, ability to easily shuttle stuff between types/classes, immutability (I get back my original work and what I'm working on if I mess something up)
19:04jtoyhow can I get the name of the current function? (str fn) adds an object id
19:04robinknoncom: and of course persistent data so I can make loads of weird changes and not exponentially increase memory usage.
19:04noncomoh i see
19:04noncomright
19:06mgaarerobink: so you have a string of 0s and 1s representing bits?
19:06jtoynot exactly but close enough : (str (resolve (quote +)))
19:07robinkmgaare: That's what I started with. I partitioned it, stuck a '0' at the beginning of every 7-bit chunk, turned it into a String, and then cast it to a BigInteger with (BigInteger. myasciibitstream 2)
19:07noncomjtoy: (str (:name (meta #'ns/fn)))
19:07robinkmgaare: a byte/character array may have been better
19:08robinkmgaare: but I want to make sure I don't mutate it or lose a handle on the original data, since I'm not holding on to the string of 7-bit-packed 1s and 0s. That's what the instructor gave us in the challenge, but it's not what I want to work with.
19:08jtoy&(str (resolve (quote +)))
19:08lazybotjava.lang.SecurityException: You tripped the alarm! resolve is bad!
19:09noncom,(str (:name (meta #'str)))
19:09clojurebot"str"
19:09robinkmgaare: I want a more direct representation, I don't want to have to think in base 2 save for doing bitwise ops, and if I succeed at transforming the two strings, I want to immediately see the results in all their ASCII-encoded glory.
19:10noncomjtoy: ^
19:10jtoynoncom: thanks!
19:10mgaarewhy are there two strings?
19:11jtoy,(str (:name (meta (quote str))))
19:11clojurebot""
19:11robinkmgaare: They are two differing strings that have been encoded by the same OTP.
19:11noncomjtoy: nono, you must use #' to take meta on a var
19:11robinkmgaare: I'm supposed to be able to suss out what the OTP XOR key is (and thus, the strings) from the differences between the two.
19:12noncom,(name (:name (meta #'meta)))
19:12clojurebot"meta"
19:12noncomhaha lisp fun
19:12robinkmgaare: Most likely I'm going to have to use statistical analysis on something, but I'm also hoping I can find a more general solution.
19:12jtoy,(name (:name (meta (symbol (quote meta))))
19:12clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
19:13jtoy,(name (:name (meta (symbol (quote meta)))))
19:13clojurebot#<NullPointerException java.lang.NullPointerException>
19:13noncom,(symbol (quote meta))
19:13clojurebotmeta
19:13jimrthy@reload
19:13jimrthy@reload
19:14robinkmgaare: I'm also happy to write sufficiently inefficient and expensive code so that the CPU gets hot for a good few hours, but I have only 4GB of memory, so I also want to be efficient in my memory usage, not overflow the stack, and generally try to make use of Clojure's persistent data structures.
19:14noncom,(name (:name (meta (var meta))))
19:14clojurebot"meta"
19:14noncomthis is you want?
19:14robinknoncom: I want that?
19:14jtoynoncom: yes
19:14rasmusto,"meta"
19:14clojurebot"meta"
19:14noncomnono jtoy's plaing with the syntax
19:14robinkAh
19:15jtoynoncom: yes, thanks :)
19:15noncomrobink: well, you sound like you need to go and make experiments right in the repl then
19:16robinknoncom: Yeah, that's what I'm about to do.
19:17robinknoncom: I also probably should have a notepad with pseudocode, mathematical expressions, Clojure, LC or functional Python so I can prove to myself that I'm doing something actually *useful*
19:17mgaarerobink: I think all you have to do is xor the two cyphertexts together
19:17robinkmgaare: I'm not sure what the xored value *means*
19:17robinkmgaare: Plus the two have to be eventually differentiated from the xored value.
19:17mgaarerobink: I think that yields the otp
19:17robinkmgaare: Seriously?
19:17robinkmgaare: Holy cow, testing.
19:18mgaareerm, no I think I'm wrong
19:18robinkmgaare: Bummer, that would have been cool.
19:18mgaarebut hey try it anyway :D
19:19mgaarebut yeah I am definitely wrong
19:20robinkI also need to figure out how to turn a BigInteger back to a String/character-array.
19:20noncomyeah, well, good luck, i gotta go sleep... :zzz
19:20robink'k
19:20robinkan xor of the two ciphertexts is still probably useful, but I am trying to figure out *how*
19:20mgaarerobink: you can do it with a reduce
19:22callen!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19:22callenbottom-up tree materialization from bottom-most children won the day!
19:22callenIt works!
19:22robinkmgaare: Ah, thanks
19:23mgaareI don't know if it's the fastest way
19:48callenshowed experienced coworker of mine the Clojure code I used to solve my tree materialization problem, he said, "wow. Clojure looks really nice!"
19:48callen#representin ;)
19:49AimHereThat's the spirit. Reel him in and catch him before he sees the java stacktraces...
19:50callenAimHere: he used to do Java and Scala. Our shop is Python. Clojure is like a glorious return home for him.
19:51callenthe Java stack traces won't scare him off
19:51callenthey certainly don't bother me anymore.
19:53Rayneslein-try is the best thing ever.
19:54Raynesrkneufeld: Pretty sure I've told you this before, but man, you're the best. When we are a) in a more reasonable country together b) I am over the age of 21, I will totally buy you a beer.
19:54RaynesThat multiple choice didn't work out quite as well as I had hoped, but you get the point.
19:54callenRaynes: I was praising him for it the other way. I'm using it in the Korma example for Clojure Cookbook.
19:54RaynesBuy him alcohol for me, please.
19:55callenIsn't he in Limey-land?
19:55Raynes*shrug*
19:56RaynesIf he is in Britain then I do not need you to buy alcohol for him, as I am of age to do so.
19:57Raynescallen: >18 year olds are far more mature in England, obviously.
19:57technomancydo they not get treated like children there?
19:57RaynesThey instantly become so the moment they cross continental boundaries into the UK areas.
19:57technomancyor are children just more mature there
20:00technomancyhttp://p.hagelb.org/mystery.gif
20:02brehautjust very drunk children
20:02brehaut(based on NZ which is also grog at 18)
20:03callenkiwis have such twee slang.
20:03brehautgrog is twee?
20:04AimHereSure it is
20:05AimHereIt might have been what gruff macho manly-men said back when they were pirates on the high seas, but now it's talk-like-a-pirate-day-style whimsical...
20:06callen^^ twoof.
20:10brehauti guess if bad beer is bud or miller, you dont need a word like grog any more
20:10technomancydoesn't grog specifically refer to a mixture of rum and water?
20:10brehautprobably
20:11brehautbut its a suitable stand in for any lowish alchohol nastiness
20:11brehautsome beverages shouldnt be allowed to be called beer.
20:12brehautthe germans were on the right track there
20:14brehaut(side rant: one of the most popular beers here claims to be an IPA. It's not even an ale)
20:14Raynesbrehaut: Beer snob.
20:14brehautRaynes: damn right
20:15Raynesbrehaut: I had a pretty craptastic beer recently.
20:15RaynesCan't remember the name at the moment.
20:15RaynesI should have immediately complained to you about it.
20:15brehautha
20:15nopromptyeah, beer is one of those things i don't fool around with. either you get it right or you don't get it all.
20:16nopromptdon't show up to my house with a sixer of some low brow beer.
20:16nkozothere is some inter-thread Queue you can use with java.nio.channels.Selector ?
20:17brehautnoprompt: surely that would be a low brau beer
20:17Raynesnoprompt: I won't show up at your house with any beer.
20:17RaynesSeeing as how the USA does not deem me appropriate to purchase it. :)
20:17nopromptRaynes: true but you can die for it.
20:18nopromptthe country that is.
20:18nopromptdie for your country.
20:18rasmustoRaynes: you're just a yuengling
20:18Raynesnoprompt: I was about to say that with you saying I can die for beer, I'm probably not going to show up at your house at all :P
20:18TEttingerI just this year became allowed to rent a car! Haven't tried, but I think the requirement is 25 years
20:18nopromptrasmusto: yuengling? is that like a mashup of young and juggling?
20:19rasmustonoprompt: it's a beer, and a pun
20:19technomancyTEttinger: it's all downhill from here till the AARP
20:19TEttingerchinese german beer, right?
20:19TEttingertechnomancy, ha I thought you said ARRP
20:19nopromptRaynes: that's probably true. who wants a free bag of oranges anyway.
20:19TEttinger&google annual roguelike release party
20:19lazybotjava.lang.RuntimeException: Unable to resolve symbol: google in this context
20:19nopromptthe AARPANET
20:19TEttinger$google annual roguelike release party
20:19lazybot[The annual roguelike release party - RogueBasin] http://roguebasin.roguelikedevelopment.org/index.php?title=The_annual_roguelike_release_party
20:20chrisrossioh man, that's good. (aarpanet)
20:31hyPiRionWhat a strange country. We can rent cars when we're 18 over here
20:32callenTEttinger: what country are you in?
20:32noonianwe can crash cars where we're 16 over here!
20:32TEttingercallen, US
20:32callenTEttinger: lol, you can rent cars before you're 25.
20:32callenTEttinger: I rented a car 3 times before I turned 25.
20:32callenyou just pay more.
20:32TEttingerTHEY LIED TO MEEEE
20:33callenyeah, they did.
20:33callensome rental companies might have different policies, but I've rented from large and small car rental companies before I was 25
20:33callenonce when I was 18, then 21, then 24
20:34callenmotorcycle rental places are a lot less likely to rent to people under 25 for good reasons, but it's not a law, just a matter of policy and what they've worked out with their insurance company.
20:34callenmost insurance companies have surcharges in their agreements with the rental places to cover people under 25 and under 21.
20:34callenyou just pay the surcharge.
20:34callenunless the rental company doesn't want to bother at all, but that's when you call a *different* company.
20:35callen'Murica. Freedom through money.
20:35callenIf you'd like any advice on how to import pallets of vodka from Russia through Tel Aviv at the age of 16, ping me.
20:47demostheneshi
20:53dnolenBronsa: ping
20:53Bronsadnolen: pong
20:53dnolenBronsa: so I think we're still using the clojure reader in CLJS in one place
20:53dnolenis clojure.tools.reader.reader-types/indexing-push-back-reader equivalent to clojure.lang.LineNumberingPushbackReader?
20:54demosthenesis clojure like haskell
20:54TEttingerdemosthenes, yes and no.
20:54Bronsadnolen: it provides the same functionalities, yes
20:54havenwooddemosthenes: in many ways
20:54dnolenk
20:56chordstarcraft
20:57muhoochord: dude, let it drop
20:57demostheneswat about starcraf
20:59chordis there a clojure game development tutorial
20:59muhoochord: http://rigsomelight.com/2013/08/12/clojurescript-core-async-dots-game.html ?
21:01chordso how the hell do I create an opengl window on linux with clojure
21:01OtherRavenchord: use lwjgl
21:01TEttingerdemosthenes: http://bestinclassblog.tumblr.com/post/21867047812/pitting-j-against-haskell-clojure is a decent comparison
21:02OtherRavenor one of the other java wrappers for openGL
21:02brehauthttp://briancarper.net/blog/520/making-an-rpg-in-clojure-part-one-of-many
21:02chordOtherRaven: NO I AM A MAN I DO THINGS FROM SCRATCH I DON'T USE BLOATED LIBRARIES
21:03dnolenBronsa: thx
21:03OtherRavenchord: lwjgl is actually very lightweight
21:03brehautchord: this is the wrong channel, you are looking for #x86asm
21:04chordI want to know how to open an opengl window in linux, I know how to do this with win32sdk and c++ in Windows
21:04chordBut since I'm assuming you guys are dumb enough to run Windows I can't gloat showing you my game if its not running under linux
21:05Bronsadnolen: you'll proabaly need a bit of more boilerplate if you're going to construct if from a io/reader
21:05Cuais this a new kind of trolling?
21:05brehautCua: sadly not new
21:05dnolenBronsa: man, getting line number with mismatched parens is SOOOOO AWESOME
21:05OtherRavenCua: I think so
21:05Bronsadnolen: heh
21:05dnolenBronsa: the error is missing a space
21:05brehautCua: been going on a couple of weeks now
21:05dnolenCaused by: clojure.lang.ExceptionInfo: EOF while reading, starting at line2065 {:column 1, :line 7529, :type :reader-exception}
21:05dnolenBronsa: ^
21:06Bronsaoh
21:06Cuasad er
21:06OtherRavenEvery channel needs a troll. It's, like, a rule somewhere.
21:06dnolenbbiab
21:07Bronsadnolen: fixed, thanks
21:08dnolenBronsa: what I have to do to communicate the file?
21:08dnolenBronsa: catch and add that information?
21:09dnolenBronsa: gotta run for a bit, but I'd like to know what the best way to communicate the file w/ the error would be in your opinion, back in 30 or so
21:11Bronsadnolen: sorry, I'm going to bed (2:40 am here); tomorrow I'll see if I can put file info in the reader-error automatically when reading from an input-stream
21:15olegonMorgawr, Clojure is a awesome language ((:
21:16Morgawrolegon: yep it is indeed
21:16olegonMy first lisp like language. Do you recommend any book?
21:16Morgawrolegon: http://clojure.org/books
21:17MorgawrI recommend the O'reilly one called "Clojure Programming"
21:17Morgawrit's really well written
21:17Morgawranyhow rushing to bed now, nn ;)
21:17olegonand this one: http://deptinfo.unice.fr/~roy/sicp.pdf?
21:19AimHereolegon, that's a classic, but be warned, it's not Clojure, so the examples won't work
21:20timvisherso is there anyway to require an ns that wasn't in the `(ns ...` form at compile time without recompiling everything?
21:20timvisherin clojurescript, I should say. :)
21:20olegonI wanna learn more about functional languages/LISP. I think it's better than studying clojure. D:
21:20olegonAgreed?
21:20AimHereWell in that case, SICP is probably as good a place to start as any
21:20timvisherbecause i have to wait 45 minutes every time I recompile and that really puts a damper on things :\
21:22timvisherolegon: would you say you're pretty hand with the maths?
21:22timvisheri found SICP difficult as I'm not so handy with them. :D
21:23AimHereThat's a point, SICP needs some familiarity with some basic calculus and whatnot
21:23AimHereAt least for some parts of it
21:25olegontimvisher, I just finished highschool, but I love programming and math, hm.
21:26timvisherolegon: then the maths may be fresher for you than they were for me when i attempted to make my way through it. i will say that whether you can make it through the book or not you should _totally_ watch the course. amazing stuff.
21:28dnolentimvisher: it won't recompile everything if you're using auto builds
21:30olegontimvisher, I understand some concepts of functional languages like immutable data, recursion, high order functions, currying, composition. I started programming in Haskell, but some concepts like functor, monads are strange for me.
21:31timvisherolegon: functional programming is easy. it's just programming without state. it's all the stuff that falls out of doing that that can be tricky and rewarding to wrap your head around. :)
21:31olegonI started a game with JavaScript using WebGL and WebSockets using a functional library called UnderscoreJS. Now, I wanna learn ClojureScript to create a game because Clojure is really a functioan language.
21:32olegonWith CLojure, I think I'll create a better design with less side effect.
21:32olegonhm
21:32timvisherdnolen: that is something i haven't tried yet. i should get me some cljsbuild auto going
21:34olegontimvisher, but I think that Clojure can be a "hard language" to make a game. How can I create a game without state? D:
21:35timvisherolegon: sounds like you should check out Land of Lisp
21:35timvisher:)
21:35olegonThere's a lot of state and events. ;~
21:35AimHereClojure can do state, there's just a few hoops to jump though
21:35timvisherbut clojure is also eminently practical and admits wholeheartedly that state is useful
21:36AimHereAnd you can always just cart the 'state' about in a function that just takes the player input and returns a function with the next game-state, if you're feeling intrepid!
21:37timvisher,,monads
21:37clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: monads in this context, compiling:(NO_SOURCE_PATH:0:0)>
21:37timvisherheh
21:38olegonI'm confused. I create a function cons in my library. It takes a object and a array and return a new array. Cons is a pure function, but I use "array = cons(value, array);"
21:38olegonIt's idiot, I think.
21:39olegonI need some state. I used cons to add a new connection (new socket) in a array of connections.
21:40nopromptAHHHHH YEAH!
21:40nopromptjust cut [garden "1.0.0"]!
21:40timvisherdnolen: every considered coming down to the Clojadelphia meetups in Philly?
21:40nopromptnow with CLJS support!
21:41nopromptand a snarky new line on the README
21:41noprompt"It is designed for stylesheet authors who are interested in what's possible when you trade a preprocessor for a programming language."
21:42nopromptlol
21:42noprompt... there are some breaking changes though.
21:51muhoonoprompt: so, garden as a replacement for, say, less?
21:52nopromptmuhoo: absolutely.
21:52nopromptmuhoo: but not totally.
21:53nopromptmuhoo: that is, it's not a preprocessor. it's a library with a compiler and a few functions.
21:53nopromptmuhoo: it's totally bullshit free.
21:54nopromptmuhoo: unfortunately, there are no third party libs for it.
21:54muhoonice, thanks
21:55Bronsadnolen: I'm pushing a commit for tools.reader that makes file-info available for reader-errors
22:02nopromptmuhoo: in short. it's awesome. it's what Sass, Less, etc. will never be until they have proper namespaces, functions, and data structures, which, lets face it, will be *never*.
22:05chordok did some research
22:05chordI need to use JOGL
22:05chordis that right?
22:09Bronsadnolen: you can update to tools.reader 0.7.8 once it hits maven, then apply http://sprunge.us/VjYU and you'll have file info in the ex-data
22:33kennylovesroasteolegon: think about your goals and not your language
22:54ivanwhere did https://github.com/evanescence/test2 go?
23:03logic_proganyone know of a decent alternative to domina?
23:16TEttingerivan: https://github.com/brandonbloom/test2
23:16ivanah, thanks
23:17TEttingerjust guessing
23:17TEttingerI don't actually know if it's the right one
23:17ivanit is
23:17ivanGoogle doesn't seem to index github in a timely manner
23:18TEttingerI used github to search for: test2 clojure
23:18ivanah
23:18TEttingerOtherRaven: Do you use LWJGL?
23:22chordinstalling jdk for linux right now
23:22chordyou guys thought I would fail at clojure
23:22chordYOU ARE WRONG
23:22KeletNah, I know you'll raise to fame and make a starcraft clone
23:22sinistersnarechord: have you been seriously chat spamming this for so long, and are finally learning to program?
23:23sinistersnareno, hes used fancy words, hes just a troll
23:23chordsinistersnare: I just finished recently reading "Learning You A Haskell"
23:24chordsinistersnare: its only now that I have free time to move onto clojure
23:24KeletWhy don't you make a starcraft clone in Haskell?
23:24brehauti just finished Harry Potter: does that make me a wizard?
23:24sinistersnareok well im done talking to you, after you trolled #haskell , i dont want part of this
23:24chordKelet: if you guys are all experts at Haskell then there is no problem in recruiting you all to help, but thats not the case
23:25sinistersnarein more quisitive news, im a clojure newbie, and am wondering if any one yall would like to help improve this article on Libgdx using Clojure https://github.com/libgdx/libgdx/wiki/Using-libgdx-with-Clojure
23:25sinistersnareon the official Libgdx wiki
23:26chordbrehaut: which kind of wizard
23:27brehautsinistersnare: have you seen brian carpers blog post (which is quite old now)
23:27TEttingerthe RPG one?
23:27brehautyeah that one
23:27TEttingerhave you seen the cyber dungeon quest article on entity systems in clojure?
23:27TEttinger$google resatori entity clojure
23:27lazybot[Clojure Entity Component System | resatori] http://resatori.com/clojure-entity-component-system
23:27brehautthat vaguely rings bells but i cant place it
23:28TEttingerit's pretty slick
23:29sinistersnarebrehaut: nope, cant seem to find it on his blog either
23:29brehautsinistersnare: http://briancarper.net/blog/520/making-an-rpg-in-clojure-part-one-of-many
23:29brehautpart one of one though
23:29chordbrehaut: so are we forming a project together to make an rpg in clojure?
23:29chordbrehaut: am I allowed in?
23:31sinistersnarebrehaut: that seems pretty cool
23:31brehautyeah
23:31brehautmodulo really old clojure stuff
23:31sinistersnaredo you have any advice on unidiomatic clojure i used with the article?
23:31brehautnot really sorry
23:31sinistersnareits ok :)
23:31brehaut(its the work day here)
23:31kennylovesroastean open rpg would rock
23:32kennylovesroastehow about little goals
23:32_scape,(map #(conj % 1) (partition 3 [0 0 0 1 1 1]))
23:32clojurebot((1 0 0 0) (1 1 1 1))
23:32_scapewhy is it adding it to the front of each seq?
23:32brehaut_scape: seqs (and lists) conj on the front, vectors conj on the end
23:32TEttinger_scape: that's the behavior of conj with seqs
23:32_scapeoh, ok
23:33_scapeshould i use rseq or reverse then?
23:33TEttinger,(map #(concat % [1]) (partition 3 [0 0 0 1 1 1]))
23:33clojurebot((0 0 0 1) (1 1 1 1))
23:33brehautmapcat
23:33kennylovesroastelispy languages are great for open environments
23:33_scapethanks
23:33_scapewhat's the reasoning for having it different?
23:34brehautactually probabnoy not mapcat. what am i saying
23:35brehaut_scape: appending to the front is the natural (and cheap) operation for lists. they are single ended, singled linked. to do other wise would require walking through the whole list
23:35brehaut_scape: vectors on the other hand are designed using a hash trei internally which makes appending to the end cheap
23:35TEttingertrie or tree?
23:35nooniansinistersnare: its a lot of java access from clojure, but the only thing that stuck out to me was the (def ..) inside (def main-screen ...)
23:35brehauttrie
23:35kennylovesroastechord: i'm interested in an rpg
23:35brehautsorry typoed
23:36TEttingernoonian: hey I was wondering if my code was wrong in there too
23:36chordkennylovesroaste: brehaut is ignoring me on rpg question
23:36kennylovesroastechord: : start off small with good ideas
23:36sinistersnarekennylovesroaste: hes a troll i think
23:36sinistersnarehes trolled #haskell too, and a couple other chans from what i hear
23:36tbaldridgekennylovesroaste: yeah, he's a troll ignore him
23:36kennylovesroastetbaldridge: : who's a troll?
23:36tbaldridgekennylovesroaste: chord
23:36_scapethx brehaut
23:36kennylovesroasteoh
23:36chordthey are taking things out of context
23:36kennylovesroastei'm mostly interested in AI
23:37TEttingerkennylovesroaste, I'm actually working on an RPG as well. it uses libGDX, which is why sinistersnare's tutorial is handy for me
23:37nDuffHmm; I've got some incompatibilities between modern cljs (1889) and 1443.
23:37kennylovesroasteand simulation
23:37sinistersnarenoonian: thats true, i think it could go in the let form
23:37kennylovesroasteTEttinger: : I don't care about grafiix
23:37kennylovesroasteTEttinger: : more AI simulation
23:37noonianTEttinger: what code is that?
23:37nDuff...well, might try to pin them down this weekend or so.
23:37sinistersnareTEttinger: :) i dont do a ton of game dev myself, but i love working with and talking about libgdx :)
23:37brehaut_scape: http://hypirion.com/musings/understanding-persistent-vector-pt-1
23:37TEttingernoonian, uh, it's very similar to sinistersnare's. let me get the repo
23:38kennylovesroastehere's the thing, graphics are such a great undertaking, that I'm more interested in cool AI techniques
23:38sinistersnarenoonian: would putting it in the let form work with the forward declaration (declare ^Stage stage) ?
23:38kennylovesroastethen move to 2d, then 3d
23:38kennylovesroastestart small
23:38kennylovesroasteas in flocking techniques, personalities, etc..
23:38nooniansinistersnare: no, but do you need that? it doesn't look like anything in that file refers to a top level stage
23:39TEttingerhttps://github.com/tommyettinger/dungeon-kingpin/blob/master/src/dk/DKGame.clj#L40 uh here's mine. total mess.
23:39kennylovesroasteclojure is about small enginges
23:39kennylovesroasteengines
23:39sinistersnareno thats a good point, noonian. thanks :)
23:39nooniansinistersnare: hehe, any time
23:39kennylovesroasteso if anybody is interested in entity graphs, i'm interested too
23:42sinistersnareok im going to bed, thanks all for your time! and the wiki is publicly editable if yall wanna make some changes, id really appreciate it!
23:42_scapelink me
23:42sinsnare|zzZZzz_scape: https://github.com/libgdx/libgdx/wiki/Using-libgdx-with-Clojure
23:42_scapethanks
23:42sinsnare|zzZZzzif you were referring to me :p
23:42chordholy shit is starting a clojure program of eclipse suppose to be this slow?
23:42chordis that normal
23:43noonianTEttinger: lots of nested defs :p
23:43Cuathis channel has no policy regarding blantant trolling?
23:43brehautCua: we have practically no ops
23:43brehautCua: just use your own ignore list
23:44Cuaokay, but I still see replies to him from other
23:44brehautyeah. sorry
23:44TEttingerwe're helpless and defenseless other than ignore lists. obviously it makes trolls feel like they have some power to make a tiny mess of channels full of smart people.
23:44scottjCua: /ignore -replies chord will help with replies that mention him
23:44_scapesinsnare|zzZZzz: yes :) i put up a tut as well, didn't know this existed! http://blog.juncoapps.com
23:44Cuasigh, okay
23:44Cuascottj: thank
23:45chordwhy are you guys all mad at me for trying to make a starcraft clone in clojure
23:45TEttingerthanks _scape
23:46sinsnare|zzZZzz_scape: oh ive seen that! i have seen a lot of libgdx clojure stuff, but i really wanted something on the official wiki so that there is a trusted and up to date source of information
23:46_scapechord: i'm with you :D
23:46_scapesinsnare|zzZZzz: i gotcha, makes sense
23:46sinsnare|zzZZzzok i actually have to go :p see yall later!
23:47noonianI wonder if that would run on android
23:47_scapei got it to
23:47nooniannice!
23:47_scaperan well too, on nexus 7 v1
23:47clojurebotexcusez-moi
23:48chord_scape: www.artillery.com
23:49_scapeis that in clojure?
23:50chordno
23:50chordbut if they can do that
23:50_scapeyea
23:51_scapei'm actually building something similar in clojure, not planning it to be as fast paced, thinking of using ring for serverside communication
23:51_scapeno dev tools though :D
23:52chord_scape so you making a starcraft clone in clojure?
23:52noonian /facepalm
23:53_scapeno, chord, but RTS and future setting-- not sure that qualifies as a 'clone' since I envision it much differently
23:54chord_scape: what path finding algorithm are you using?
23:54_scapeyet to be programmed, thinking of using fringe
23:56chord_scape: do you know what modern rts games use for path finding?
23:57_scapeusually a mix, amit's break down is rather concise
23:57chord_scape: amit what?
23:58_scapehttp://theory.stanford.edu/~amitp/GameProgramming/ nice little break down, there are a few other decent links out there as well
23:58_scapegotta split! later chord
23:59chordNO