#clojure logs

2013-10-29

00:18kendallbuchananAnyone know why "(let [my-atom (atom {})] (-> :my-atom name symbol deref))" doesn't work?
00:18kendallbuchananBasically, I'm trying to deref an atom by converting a keyword into a symbol representing the atom.
00:20rhg135deref doesnt take a symbol
00:20rhg135i think it takes an object implementing IDeref
00:21kendallbuchananAh, okay.
00:21rhg135might need to resolve the symbol
00:21kendallbuchananMakes sense.
00:22kendallbuchananThank you!
00:22rhg135np
00:24right1does anyone have spare time to waste? im working on some project euler problems for fun but i have a pretty terrible solution
00:25right1oh good! i got a solution in 2 min runtime
00:42bitemyapp`cbp: yeah, (run query connection)
00:42`cbproger
00:42bitemyapp`cbp: that returns a promise which you deref.
00:43`cbpyea :)
00:45bitemyapp`cbp: incidentally, the promise-based async API is as much a convenience as anything.
00:46bitemyapp`cbp: when the underlying semantics are asynchronous (core.async or agents) it's easier to just use a promise to synch up the results. If the API defaulted to blocking I'd just be deref'ing the promise for the user (why?) or doing something worse and more complicated to make it "blocking"
00:48bitemyappthis also lends to my growing yet already very great respect for the concurrency primitives in Clojure.
00:48bitemyappAnything less nice or less composable would've made it considerably more difficult.
04:09shoshinping what is exactly wrong with the implementation of this function?
04:09shoshin(defn sample
04:09shoshin [x {:keys [load?]
04:09shoshin :or {:load? false}}]
04:09shoshin (when load?
04:09shoshin (println "load? is true"))
04:09shoshin (println x))
04:09shoshini call (sample "12) it returns an arity exception.
04:09shoshin* (sample "12")
04:10shoshini've been trying to figure it out for quite sometime.
04:13akrajanshoshin: sample definition takes 2 arguments
04:13akrajanx and the destructured second param
04:13shoshinakrajan but i want the second one to be optional.
04:16akrajan(defn sample [x & [{:keys [load?] :or {:load? false}}]]
04:16akrajan (println "load? - " load?)
04:16akrajan (println x))
04:16akrajanshoshin: in the version i just pasted, the second argument is optional
04:17shoshinakrajan thanks! got the mistake!
04:17akrajan:-)
04:32abaranoskyhello
05:04mythzdoes 'for' and 'doseq' evaluate the entire collection before iterating it? I'm getting odd results from use of atom, e.g:
05:04mythz(def i (atom 0)) (def q (map (fn [x] (swap! i inc)) (range 10)))
05:05mythzthat creates a lazy map, but whenever I try to iterate over it with either 'for' or 'doseq' @i always evaluates to '10', e.g:
05:05mythz(for [v q] (println "v =" v ", i =" @i))
05:06mythzIs there way to iterate over the map so it only evaluates it one at a time? i.e. so i prints out: 1 2 3...
05:32broquaintI'm don't think it's possible, mythz, but I should imagine there's an equivalent way of doing what you want.
05:32broquaints/don't//
05:33mythzok that's interesting, surprised by the current behavior, I just assumed it would loop lazily
05:34broquaintPresumably one of the reasons it ought to be side-effect free :)
05:38broquaint,(def i (atom 0)) (let [q (map (fn [n] (swap! i inc)) (range))] (str (clojure.string/join " " (take 3 q)) ", @i = " @i))
05:38clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
05:38broquaintIf you run that you can see the first 32 items are consumed.
05:57mythzyeah strange, so it must be reading it in chunks?
06:53glosoliI have two maps :a {} :b {} is there some nice way to remove from :a contents that were found in :b ?
06:58scottjglosoli: clojure.set/difference
06:58glosoliit's meant to work on sets only, isn't it ?
07:00scottjby contents do you mean keys?
07:00glosoliscottj: by contents I mean other maps can be inside too
07:01glosolihmm It was incorrect of me, by contents I mean, maps
07:03glosoliTwo maps like this i.e. {{:a 1} {:b 2} {:c 3}} {{:a 2} {:b 2} {:c 3}}
07:03scottjglosoli: I think you mean {:a 1 :b 2 :c 3} no?
07:04glosoliyeah probably, got confused myself
07:05scottjglosoli: what result do you want?
07:10scottjglosoli: come up with really simple input and result maps and then maybe someone can help you
07:11glosolisec, gonna pastebin it :)
07:14glosoliscottj: the whole idea behind, is I have in memory session, which has map like this: https://www.refheap.com/20249 in some cases there might be ~15 entries in the uploaded fields (maps with file data). So the idea is, I filter out some of them (by client id). and intend to dissoc the filtered ones from
07:14glosoliscottj: is this more clear ?
07:17scottjglosoli: irc has a character limit, your message was cut at "filtered ones from"
07:18glosoliscottj: filtered ones from the original map of :uploaded-files
07:18clojurebotHuh?
07:27pyrhola
07:27pyrdoes lein 2.2.0 => 2.3.3 reportedly incur slower operations ?
07:29mercwithamouthjust curious...i saw this on stackoverflow.. '(defn plus [[^double x1 ^double y1] [^double x2 ^double y2]]
07:29mercwithamouthwhat's the deal with the ^ ?!
07:31scottjmercwithamouth: type hints, it's a performance optimization
07:31teromglosoli: so you have a list of maps in a map. maybe start first with a filtering function for your list of maps, then (remove your-filter list-of-maps) perhaps...?
07:31glosoliterom: hmm
07:31glosoliterom: As stupid as it sounds, I never heard of remove
07:32glosolithanks
07:34scottjglosoli: if you want to remove based on what's come earlier in the list then I don't think remove will help you.
07:34scottjglosoli: does this accurately describe your problem, particularly the :c 1 at the end, input {:a ({:b 1} {:b 2 :c 1} {:b 2 :c 2})}} ouput {:a ({:b 1} {:b 2 :c 1})}
07:35glosolilooks about right
07:36scottjglosoli: so you want to first entry for each :client-id? Does the resulting order matter?
07:37glosolinah result order does not matter
07:38glosolibut if the same client-id with desired id for a file was filtered out, I am intended to dissoc it
07:48mercwithamouthscottj: ahh! thanks man
07:50uruviel/join #zeromq
07:50uruviel... sorry about that!
09:36clgvmercwithamouth: in the example you menationes the type hints for primitive tyes are use less because of destructuring
10:29rafaelferreiraHey guys
10:30rafaelferreiraQuick question: is there a lib to convert from Java org.w3c.com.Node to clojure maps?
10:31BobSchackare you reading in HTML or the Node java object?
10:32BobSchackBecause there are many good libraries for reading in HTML / XML in clojure
10:34rafaelferreiraBobSchack I'm dealing with SOAP
10:34rafaelferreiraI'm actually using SAAJ, a low-level API to avoid codegen cruft
10:34rafaelferreiraMy idea was to transform a DOM tree to clean clojure maps
10:36aturleydoes anyone have a good suggestion for generating a clojure s-expression from a simple php data structure (maps, lists, strings, and numbers)?
10:36BobSchackAh unfortunately I don't have any experience with Java and Soap, sorry
10:37bjawith the change in CLJS-1933 to remove / property access, do I need to thus access the window object as js/window?
10:37rafaelferreiraThanks BobSchack
10:38rafaelferreiraSOAP is kind of immaterial to the problem. If any of the XML libs is able to convert from java's DOM I would be set.
10:38BobSchackhttps://github.com/nathell/clj-tagsoup
10:38rafaelferreiraI'll google form Clojure XML libraries.
10:38clojurebotExcuse me?
10:38BobSchack?
10:38rafaelferreiraThanks
10:39BobSchackNP
10:55bjl7Is it possible to use a zipper with post order traversal? clojure.zip/next seems to use preorder traversal. The only relevant stackoverflow says to use clojure.walk instead (not really a solution)
11:02uruvielDoes core.async have the notion of a "priority channel", i.e. what's the equivalent of a priority queue?
11:03BobSchackI believe you can set priority using alts
11:03BobSchackbut nothing on the channel itself
11:04uruvielRight so when I have a conceptual stream of messages with a priority I can't really use core.async to get them off in that order?
11:05stuartsierrauruviel: Not as such, no. But you could have multiple channels, one for each level of priority, and `alts!` on them in priority order.
11:05clgvbjl7: I thought the traversal is entirely up to you depending on how you use next, prev, left, right ...
11:06uruvielstuartsierra: ah yes, that might be sensible I guess
11:09eigenlichtwhat's the difference between clojure's lazy-seq and python's iterators?
11:10eigenlichtI know, Clojure uses lazy seqs basically everywhere, wheras python doesn't have such a focus on iterators - but still it seems to me iterators can perfectly implement lazy seqs
11:13mikerodHow do I get a primitive boolean type in Clojure? Some reason I'm not finding something that works.
11:14mikerod,(type (.booleanValue true))
11:14clojurebotjava.lang.Boolean
11:14mikerod(type ^boolean (.booleanValue true))
11:14mikerod,(type ^boolean (.booleanValue true))
11:14clojurebotjava.lang.Boolean
11:14bjl7clgv: you're probably right. I'm just going through a loop with "zip/next" at the recur and it seems to be preorder
11:14mikerodthat's not right obviously :P
11:15uvtc,(class (boolean 1))
11:15clojurebotjava.lang.Boolean
11:15mdrogalisWow. One of my EC2 nodes just disappeared out of thin air.
11:16mdrogalisHas that ever happened to anyone? Running instance shutdown and deleted.
11:16xuseryou got pawned ;)
11:16llasrammikerod: `type` and `class` take reference types, so you'll never get them return a primitive type -- it'll always autobox
11:17mikerodllasram: oh... dang
11:17mdrogalisxuser: I'd think AWS burped more than that.
11:17llasrammikerod: What are you trying to do?
11:18mikerodI have a boxed Boolean from a clojure literal, I'd like to use the primitive boolean instead in its place in one particular place
11:18mikerodfor a sort of interop
11:20llasramIs the issue that you're calling a method which has overloads for both `boolean` and `Boolean` (or `Object`), and you want to make sure the `boolean` version gets invoked?
11:36jtoyin a clojure function, so it is an implicit do if i do something like (defn hi [] (println "test") 2) ? I see that that works
11:36jtoy?
11:37coventryjtoy: Yes.
11:37coventryIf you mean that the forms in the defn body get executed in series...
11:42uvtcjtoy, you also get an implicit `do` inside a `let`.
11:44davwhere does lein deps save the jar files?
11:44coventrydav: ~/.m2/repository
11:46davcoventry: ah, thanks.
11:47davDoes anyone know if core.typed supports type classes?
11:47dnolendav: that wouldn't make sense, Clojure has protocols
11:49bbloomhttps://github.com/clojure/core.typed/wiki/User-Guide#datatypes-and-protocols
11:51davis there a protocol for operations on numeric types like + - * etc?
11:51arrdemdav: not normally. there are libraries that provide one.
12:01wakeupHi
12:01wakeupHow do I sort a list of strings in alphanumerical order?
12:02llasramwakeup: not just with `sort`?
12:02coventry,(sort '("zxyw" "abcd"))
12:02justin_smithllasram: that is ascii order
12:02clojurebot("abcd" "zxyw")
12:02justin_smithnot alnum
12:02wakeuphmm
12:02justin_smith,(sort ["a1" "0a" "zx" "Zy" "A0"])
12:02clojurebot("0a" "A0" "Zy" "a1" "zx")
12:03justin_smithnot alnum
12:03znDuffwakeup: What, *exactly*, does "alphanumerical" mean to you? Locale-specific collation order?
12:03wakeupNo byte order would suffice
12:03davdnolen / arrdem - so what would be the type of sort ?
12:04davhopefully not [Any]->[Any]
12:04znDuffwakeup: ...uhh, byte order *is* ASCII order, at least for ASCII-encoded bytes.
12:04wakeupascii order is fine, thanks.
12:04justin_smithwakeup: if you are OK with Z coming before a, regular sort works, otherwise you can pass in a custom sorting function to sort
12:05justin_smithalso note that "11" will come before "2"
12:05bbloomdav: clojure's standard library is not typable with haskell's type system :-P
12:06bbloomdav: try this in your repl: (source sort)
12:06bbloomdav: a closer approximation would be Seqable -> Seq
12:16davbbloom: :(
12:16bbloomdav: what's the sad face about?
12:16davbbloom: "clojure's standard library is not typable with haskell's type system"
12:16davbbloom: I kinda love the haskell typesystem :/
12:17bbloomdav: sure, but haskell's type system is for typing... wait for it.... haskell programs
12:17bbloomdav: if you're new to Clojure, I recommend you avoid core.typed (as cool as it is) and take some time to learn what makes Clojure unique.
12:18bbloomdav: you might have to unlearn some stuff about haskell, but there are many former or current haskell programmers in here who would be happy to compare/contrast & shed light on things
12:19davI had learned some lisp before haskell but I find lisp/clojure less readable than haskell and I get to aberations at runtime which I suspect 99% of which would be eliminated by a typecheck..
12:20davbbloom: so what makes clojure unique?
12:21bbloomdav: start here clojure.org/rationale
12:21clgv"less readable than haskell" :D
12:21bbloomthen check out some of Rich's stuff on InfoQ, and maybe pick up a book
12:22phalphalakdav: I think performance bottlenecks caused by reflection or other type related issues are rather rare… of course, it depends on the problem you are working on
12:22coventryYeah, Rich Hickey cares more about keeping things flexible so that you can get the design right (minimal and easy to follow) rather than tools. See his criticism of TDD in "Simple Made Easy" and his complete disinterest in fixing mystifying compiler errors in "Design, Composition, Performance."
12:22muhooi'm using clojure.tools.trace on a function that trampolines, but i'm getting output that ends like this https://www.refheap.com/20253
12:23indigocoventry: Oh lame... I thought people were working on those errors ;P
12:23muhoodoes trace really turn it into a huge stack? or is that just the output?
12:23davcoventry: I don't see how an optional type checker removes any flexibility since it's optional..
12:24coventryindigo: They are working on it, but it is not a huge priority. Read through a few of http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=labels+%3D+errormsgs
12:25coventrydav: I was saying that in support of bbloom's suggestion that you steer clear of core.typed for a while.
12:26xusercan lein run a single clj file? like when you java -cp clojure-1.5.1.jar clojure.main test.clj
12:27coventrymuhoo: It doesn't track the full stack, just the depth.
12:27davcoventry: gonna watch simple made easy now.
12:28pepijndevosI have so far failed misserable at installing Fedora on my iMac
12:28pepijndevosoops
12:28xuser+do
12:28bbloomdav: some portion of what rich is saying will be obvious to you as a haskell programmer, but remember the audience & try to parse out the bits that are different from haskell's philosphy
12:31justin_smithphalphalak: he doesn't mean performance problems when he says runtime abberations, he means errors - ie. ones that in a static type system would be caught before runtime
12:31phalphalakjustin_smith: i see, thanks for clarifying
12:32uvtccoventry, can you summarize the issue around disinterest in fixing mystifying compiler errors?
12:33coventryuvtc: It's just a throwaway line in that talk about what to prioritize in the development of clojure. I don't remember where in the talk he says it, I'm afraid.
12:34dnolendav: there's a #typed-clojure if you have Typed Clojure specific questions, sort is going to have pretty complicated signature. In general Clojure code is more flexible than typical Haskell code and thus the signatures tend to be somewhat sophisticated.
12:34phalphalaki was kinda shocked about what steward halloway said about static typing at euroclojure after I realized that he maybe wasn't being sarcastic anymore
12:34uvtccoventry, Ok. Thanks.
12:34clgvphalphalak: what did he say?
12:35coventryuvtc: There's like a 5% probability that I have the wrong talk, too.
12:35phalphalakclgv: "Static Typing is an academical experiment only suitable for small projects."
12:35dnolendav: as far Haskell vs. Clojure ... they share the same deep principles about how to write good software - immutability, functional programming. Things start diverging pretty quickly after that.
12:35bbloomphalphalak: are you talking about his tongue-in-cheek "how to increase job security" talk?
12:35coventryuvtc: (But I know he said it, because mystifying compiler errors have been a pain point for me, so it stood out. :-)
12:35phalphalakbbloom: we were not sure if he was still being sarcastic or not
12:35phalphalakbbloom: but yeah, this talk
12:36indigocoventry: I think it's a pain point for everyone
12:37bbloomindigo: *shrug* i'm not saying the errors couldn't be better... all i'm saying is that i've seen worse :-P
12:37indigoHaha
12:37uvtccoventry, the "Design, Composition and Performance" talk is the one where I take a break mid-way through to hear what this "Coltrane" is all about. :)
12:37indigoSame here... PHP... *shakes fist*
12:37coventryindigo: Some of them are hard to fix while preserving the value of keeping clojure simple. See the patches and discussion in http://dev.clojure.org/jira/browse/CLJ-1279 for instance. (Maybe less hard for someone more experienced than me.)
12:38indigoAh
12:38indigoBasically, compilers are hard
12:39bbloomcompilers are hard for many of the same reasons that type systems are complex ;-)
12:39bbloomcompilers are about exploiting static properties to perform translations which achieve fast performing, correct code without breaking operational semantics or dev workflows
12:39indigoLots and lots of edge cases
12:39bbloomindeed
12:40justin_smithindigo: I found the perfect metaphor for PHP today, it's a German idiom: teh wooly egg-laying milkable pig http://commons.wikimedia.org/wiki/File:Wollmilchsau.jpg
12:40bbloomespecially with an unwilling host
12:40bbloomjustin_smith: lol, i'm not sure how that applies, but it's awesome
12:40wakeupjustin_smith: No that means many uses
12:40justin_smithtoo many :)
12:40justin_smithball of mud
12:40indigoMeh... PHP doesn't have many uses
12:40wakeupjustin_smith: PHP is just a shitstorm of legendary proportions
12:40indigo(outside of webdev)
12:41justin_smithmaybe ruby was the right example - I just saw the thing and it made me think of a poorly designed programming language (throw a little of everything in there...)
12:41wakeupI thought ruby was php6?
12:41indigoRuby is Perl6
12:41indigoNode.js is php6
12:41wakeuphaha
12:42wakeupbut you guys
12:42wakeupclojure is kind of the PHP of lisps ;)
12:42coventryperl6 is perl6, but the iron is no longer hot. :-)
12:43uvtcindigo, Perl 6 is Perl 6. Ruby seems pretty Perlish though.
12:43justin_smithwakeup: php doesn't even have a parser, it just evaluates line by line
12:43justin_smithI think clojure hits a slightly higher standard than that
12:43teslanickThat's not really fair to node: php has a sprawling, inconsistent API. Node is tight and fairly consistent.
12:44indigoHaha I guess
12:44indigoAnd also Node is designed to run for a long time
12:44indigoIf you run a PHP process for a while you will get memory leaks
12:44teslanickAnd it's unreasonably hard to write HTML in node. :)
12:44teslanickIn PHP it's just a ?> away.
12:45indigowakeup: CL is the PHP of lisps
12:46TimMcjustin_smith: "Ovogena lano-lakto-porko" in Esperanto :-D
12:46phalphalakindigo: if CL is the PHP of lisps then I can't wait to get my hands on the ruby of lisps
12:46winkteslanick: it's only semi-inconsistent. It's consistent with the c libs below
12:47indigophalphalak: That's probably going to be Clojure
12:47coventryI guess hy is the de facto python of lisps.
12:47teslanickwink: There's such a thing as semi-inconsistent? Wouldn't semi-inconsistency actually be meta-inconsistency? It's inconsistent about being inconsistent.
12:48winkjustin_smith: not sure if you're just trolling, but have you seen http://git.php.net/?p=php-src.git;a=blob_plain;f=Zend/zend_language_parser.y;hb=HEAD ?
12:48justin_smithwink: perhaps I was misinformed, not trying to troll at all
12:48winkteslanick: interesting question :) I was just refuting a "seemingly random" API, it's not consistent in itself, but consistent towards its abstractions
12:49winkteslanick: like the needle/haystack argument. all string funcs are consistent, and all array ones as well - but reversed order when compared between each other
12:49justin_smithwink: what about the naming and arg order conventions - or is that all reflecting the c apis?
12:50winkjustin_smith: mostly from the c apis, yes
12:50ToxicFrogcoventry: in principle, it seems like you could get 90% of the way there by having the compiler throw ClojureCompilerError instead of whatever it throws now, and at catch time handling that differently from a "normal" exception (i.e. don't vomit the compiler's entire stack to the terminal)
12:50winkI am not saying there are NO inconsistencies, I really don't know if.
12:50ToxicFrogThe hard part is fixing all the existing throws.
12:51teslanickwink: I was mostly making a joke. It's been so long since I've programmed in PHP that I've forgotten most of the horrors contained within.
12:52winkteslanick: PHP has enough real problems, so I try to dismantle the false ones :)
12:52coventryToxicFrog: The difficulty is that at the time the ArityException is thrown, you're in a function call and have no way of determining whether the function is being called as a macro.
12:53coventryToxicFrog: You can catch it in macroexpand1 and re-wrap it in a CompilerException, and just ignore the fact that the reported arity will be wrong in many circumstances. I have been thinking of submitting a patch like that.
12:53coventryToxicFrog: You could just add a warning to the exception message "The arity may be off by two", I guess. :-)
12:55winkI was playing around with DrRacket last weekend, somehow it's neat
12:56muhookeep having to go back to the well on that: http://perevodik.net/en/posts/39/
12:57xuserwink: the repl in DrRacket is great and easy to start with
12:58teslanickmuhoo: So mean to javascript
12:58ToxicFrogcoventry: personally, I would consider the occasional incorrect arity acceptable (it's not like compilers for other languages don't often have off-by-n errors on which line the error occurred on!) if it meant the output was [location: error] rather than [location: error, 50+ lines of stack trace]
12:58winkxuser: actually I started implementing a web app, as usual :P
12:58ToxicFrogThat said, I'm speaking about compiler exceptions in general, not the macroexpand ArityException in specific.
13:00xuserwink: cool, you following the web application tutorial on racket's website?
13:02winkxuser: yeah, started with that and then expanded. it was only some sort of reading HTTP Headers from EVE Online's ingame browser.
13:02technomancywink: the racket guys bend over backwards for usability; it's really commendable
13:05xusertechnomancy: can lein run standalone clj files? like in 'java -cp clojure-1.5.1.jar clojure.main test.clj'
13:05makkalothi, is there a way to get string name of an atom, (def t (atom 1)) ?
13:05technomancyxuser: sure; `lein run -m clojure.main/main -i test.clj`
13:06technomancyxuser: you can set up an alias for that in your user profile if you use it a lot
13:06technomancymakkalot: atoms don't have names; vars do
13:06makkalottechnomancy, ok what is the way to do for vars ?
13:07xusertechnomancy: great, gonna check out how to set up the alias cause that's not any shorter than the java version ;)
13:07technomancy,(-> #'clojure.core/reduce meta :name) ; <- makkalot
13:07clojurebotreduce
13:08technomancyxuser: it's shorter if you need the project classpath
13:08makkalottechnomancy, great thanks
13:13muhoooh, dr. racket used to be dr. scheme, i remember that
13:20makkalotit seems #'obj doesn't work in clojurescript ?
13:20technomancymakkalot: correct; clojurescript lacks vars
13:20technomancypart of the reason I don't use it
13:20bbloomlol
13:20bbloomoh technomancy...
13:20makkaloti see :)
13:21bbloomi've been pushing dnolen for vars, even half-assed vars that would let #' work for the extra indirection during development
13:21bbloombut no luck yet
13:21technomancybbloom: well not the main reason, but vars are my favourite clojure feature more or less
13:21bbloomtechnomancy: i've heard you say something to that effect before, but i'm not quite sure i've heard your justification
13:22bbloomcan i prompt a rant?
13:22arrdemdis gon b gud
13:22technomancywell, philosophically the whole point vars exist is to support interactive development and reloading, which is the most important thing I look for in a language
13:23technomancyI know clojurescript supports this now, but it wasn't designed that way from the start, which rubs me the wrong way
13:23clgvare there any threading macro implementations with a fork-join-metaphor?
13:23bbloomclojurescript accomplishes the same goal with a different technique
13:23bbloomnamely: it always looks up vars by fully qualified dotted paths to mutable objects that act as namespaces
13:24technomancyI also like the neat insane hacks you can do with vars like robert-hooke
13:24bbloomhaha, fair enough
13:24technomancyand the fact that they can contain metadata is huge for tooling
13:24dnolentechnomancy: what you're saying barely makes sense. the only thing you can't do w/o vars is convenient namespace level metaprogramming. 90% of which you can accomplish via the macro + analyzer.
13:24clgvstarting with the same value, splitting up into n code paths manipulating the data differently and finally joining it with a given function/expression
13:24bbloomi've spent some time thinking about what live programming looks like with static name resolution, if it's at all even possible
13:25dnolentechnomancy: an in fact meta programming in CLJS can be even more convenient since you can get the entire compilation environment as a MAP
13:25bbloomdnolen had the seed of a great idea when talking about session w/ kovas over some drinks
13:25technomancydnolen: I took bbloom's question as a request to cover what I like about clojure vars, not a request to rant about clojurescript, which I know little about
13:25bbloomthe idea of a "notebook" being in "draft mode" is similar in many ways to the notion of compile vs run time
13:25dnolentechnomancy: yes but most of what you said just sounds inaccurate
13:26technomancybbloom: test selectors and nrepl-discover are both built on var metadata
13:26bbloomtechnomancy: cljs can do that with the namespaces atom, it holds the same metadata
13:27technomancybbloom: also I come from elisp with its weird symbol-table that's kind of a no-mans-land; the fact that vars are very first-class and act in ways you expect if you're familiar with other c.l.IDerefs is great
13:27bbloomtechnomancy: it's just decoupled from the objects themselves, b/c it's only available on one side of the environment stratification boundary
13:32TimMcDoes CLJS have dynamic scope for vars?
13:33dnolenTimMc: for those declared ^:dynamic
13:34mdrogalisRicon is on live if anyone is interested.
13:35bbloomTimMc: but you can't capture the dynamic scope with bound-fn, etc
13:43coventryWhat is Ricon?
13:44coventryNM, http://ricon.io/east.html I guess.
13:46makkalotis there a way i can write unittests for my clojurescript code ?
13:47dnolenmakkalot: https://github.com/cemerick/clojurescript.test
13:47makkalotdnolen, great thanks
13:48uvtcWhat is the purpose of the `num` function? What exactly does it coerce into a number? (I notice, for example, that it won't convert a string to a number.)
13:48mdrogalisFirst Ricon talk is pretty funny.
13:49makkalothttp://ricon.io/live.html
13:52joegallouvtc: looks like it coerces numeric primitives to java.lang.Number, and such like
13:53justin_smith,(num (/ 4 3))
13:53clojurebot4/3
13:53justin_smith(doc num)
13:53clojurebot"([x]); Coerce to Number"
13:55uvtcjustin_smith, but `(/ 4 3)`already gives me that ratio of 4/3... I'm squinting at that docstring... I guess I don't see where you'd need to use `num`.
13:55justin_smithyeah, I am trying to figure that out myself
13:55justin_smith,(source num)
13:55clojurebot#<SecurityException java.lang.SecurityException: denied>
13:56justin_smithmeh
13:56justin_smiththe source is not very revealing either
13:56justin_smith"The num coercion function boxes primitives to force generic arithmetic"
13:57justin_smithit can be used when you have an unboxed input and need to guerantee you have the general boxed version
13:57justin_smithhttp://clojure.org/java_interop
13:57uvtcjustin_smith, Mm. Thanks.
13:58justin_smithso it is the oposite of int / long etc. (which create unboxed)
13:58mdrogalisThis speaker is so intense.
13:58uvtcmdrogalis, turn down the volume.
13:58uvtc;)
13:58bjais there a way to verify the version of some library that is being used beyond lein classpath and lein deps :tree
13:58mdrogalisIt's in his voice, it ain't going away! uvtc
13:58coventrymdrogalis: It sounds a lot like datomic, actually. :-)
13:58clojurebotIt's greek to me.
13:59mdrogalisIndeed. I can't give my complete concentration to it, but vaguely it does.
13:59Bronsauvtc: justin_smith ##(double (/ 2 3))
13:59lazybot⇒ 0.6666666666666667
14:00llasrambja: What more confirmation would you want?
14:00Bronsauvtc: nevermind, I thought you were asking something else
14:00llasramYou could dump the classpath from inside your JVM
14:01bjawell, I'm trying to use clojurescript 1978, which depends on tools.reader 0.7.10
14:01justin_smithBronsa: yeah, I was just experimenting with num, ratio behavior was an acid test
14:01bjait needs a var called *alias-map*
14:01bjabut I can't find it
14:01justin_smithbut now that I know it is for boxing it all makes sense
14:01bjain my repl and clojurescript complains about not having it
14:01bjabut clearly tools.reader 0.7.10 is the only thing on my classpath and the only thing mentioned in my deps :tree
14:02bjaso I'm wondering if lein deps :tree is missing some transitive dependency
14:04Bronsabja: tried a lein clean?
14:07bjaBronsa: I have. I also tried killing my .m2 directory
14:07bjato make sure I had no random deps lying around
14:08bjaafter rerunning something that triggers lein deps, I do see a 0.7.10 entry in my .m2
14:08bjabut clojure.core/ns-publics tells me that I'm missing things from clojure.tools.reader
14:09Bronsabja: can you paste your project.clj?
14:10bjahmm
14:10makkalotis it possible sometimes not to call waches on an atom ?
14:11bjawell, I isolated the issue, and it is a transitive dependency problem. in a non-public library, we reference tools.reader
14:11bjawhen I was removing that line to make a gist
14:11bjaI found my *alias-map*
14:12shaungilchristhah just have to say cljs source maps are a thing of real beauty!
14:13coventrymakkalot: What are you trying to do?
14:13konrjust a curiosity: what do you use at work? Scrum, Kanban, PMF?
14:13apricotshi, what's the most like a Datomic but open source?
14:13mdrogalisAnyone watching Ricon: This guy's life seems *so* hard o.o
14:14makkalotcoventry, i change a value of atom and notify some other parts of application, but sometimes i don't want to notify
14:14piskettikonr: what's PMF?
14:14konrpisketti: http://programming-motherfucker.com/ :)
14:15coventrymakkalot: Compose the notification fn with something which decides when to notify.
14:15piskettikonr: aah, ok 8)
14:15piskettiThat would be optimal
14:15piskettiI saw a great t-shirt on an agile conference last year..
14:15mdrogalisapricots: Apparently what's being talked about at Ricon right now, heh
14:15piskettiIt said: "I code while you Agile"
14:16mdrogalisActually it's not open source. But they're similar.
14:16konrpisketti: awesome :)
14:17apricotsRaik 2.0?
14:18mdrogalisSomething called Keystone.
14:18makkalotcoventry, but is there a way to pass some extra info to notify fn so i can tell it not to send the notification ?
14:22coventrymakkalot: Not via the add-watch mechanism. What are you really trying to do?
14:22makkalotcoventry, i have 2 systems that notify each others, so trying to escape from infinite loop notification
14:23makkalotprobably direct atom operations are not good fit for that
14:24makkalotcoventry, when a changes i want to change b and when b changes want to change a
14:30coventrymakkalot: Rather than using watches, I would put responsibility for changing a and b in straight functions which update both states according to your rules.
14:31makkalotcoventry, yeah probably that is better way
14:36mmitchelltechnomancy: Hi. Is it possible to create a leiningen "alias" that includes a "do" for running multiple tasks? I can't get it to work, so maybe it's not support or I'm doing it wrong?
14:36hyPiRionmmitchell: sure. :aliases {"alias" ["do" "task1," "task2"]}
14:37mmitchellahh, the comma!
14:37technomancymmitchell: relevant: https://github.com/technomancy/leiningen/issues/1359
14:37technomancycoming in 2.3.4
14:37technomancywill make that less confusing
14:37mmitchelltechnomancy: awesome
14:40gtrakare cljs macros cljs-namespace aware? If-not, I'm wondering if I could do symbol resolution hacks on bbloom's backtick lib to make it so :-).
14:42dnolengtrak: they are not cljs-namespace aware. Would be a nice enhancement for CLJS to have it's own macro expander to fix this wart.
14:43dnolengtrak: eventually it'll have to happen anyway
14:44gtrakyea, I'm wondering if there's any quick-hits to be made. I miss the ability to decompose macros into functions and wrappers.
14:45gtrakbut cljs can't call the function-version in the clj, and the clj-macro can't easily see functions in the cljs, so it would just be terribly awkward.
14:47gtraklooking at the design page, though ;-)
14:47dnolengtrak: cljs not being able to call the function version is not particularly important, and the second issue is trivial, the macro can see anything the compiler has seen
14:47gtrakif you fully-qualify it?
14:47bitemyapptechnomancy: good news: chrishouser: @bitemyapp You can use the name with my blessing iff the stack trace is entirely converted to edn before any processing. :-)
14:48technomancybitemyapp: ahaha
14:48technomancydoesn't it do that already?
14:48dnolengtrak: no, the macro can just take the namespace atom from the analyzer and look it + whatever namespace you are currently in to properly resolve everything at expansion time just like Clojure
14:48technomancysurely he doesn't mean serialized to edn and then read back in again
14:48bitemyapptechnomancy: it's so strange to me that somebody like Houser has to get permission to release code, yet I'm trusted implicitly to know what I can and cannot open source at my company.
14:49technomancybitemyapp: I will never understand The Enterprise
14:49gtrakdnolen: gotcha, I knew there had to be some accessible state, somewhere.
14:49technomancy(other than NCC1701[-az])
14:49technomancyregex fail; oops
14:49arunknJust noticed something strange
14:49arunkn(println "keyword = " (str (keyword "hello")) "- kkword:" (str (keyword (keyword "hello"))))
14:50arunknprints
14:50arunknkeyword = :hello - kkword: :hello
14:50bitemyapp,(println "keyword = " (str (keyword "hello")) "- kkword:" (str (keyword (keyword "hello"))))
14:50clojurebotkeyword = :hello - kkword: :hello\n
14:50arunknin clojure
14:50bitemyappif you'd just provided a comma at the beginning we wouldn't have to take your word for it on what it prints.
14:50arunkn:hello - kkword: ::hello
14:50technomancybitemyapp: though I'm not sure how to justify a rename without putting a ton of work into it
14:50arunknin clojurescript
14:50arunknbitemyapp: thanks for the tip
14:51bitemyapptechnomancy: Me either, but I found a nice stack trace prettification (not elision, just chunking and organizing) library so there's some material that could be integrated together.
14:51bitemyappI'm mostly musing on it, my active project right now is Revise, anything OSS that I do will have to follow that.
14:51arunkn,(keyword (keyword "hello"))
14:51clojurebot:hello
14:51arrdembitemyapp: longbottom. really.
14:52bitemyapparrdem: Really.
14:52technomancybitemyapp: the one that assumes you have a 30-inch display and don't use a window manager?
14:52arunknin clojure and it returns
14:52arunkn::hello in clojurescript
14:52arrdem(inc bitemyapp)
14:52lazybot⇒ 8
14:52arunknany reason?
14:52bitemyapptechnomancy: I didn't plan to use width in the same manner, just draw inspiration from the "separation"
14:52bitemyapparunkn: the bot is for explaining things, but please don't use it as a personal REPL.
14:53arunknno, i am not. just trying to point out the weirdness I am seeing
14:53technomancybitemyapp: cool. if something happens I'll be happy to point to it from the clj-stacktrace readme
14:53bitemyapptechnomancy: I'm hoping to get a co-author on this one too, in case anybody else is equally inspired by easier to read stacktraces.
14:54bitemyappI'm with Houser and Sierra that elision isn't a good idea, but emphasis and organization can go a long way.
14:54technomancybitemyapp: pluggable elision seems like a pretty obvious win
14:54bitemyappas long as it's optional, yeah.
14:54technomancydefaults will undoubtedly be contentious
14:55technomancywouldn't be horrible to default to "I'm actively working on the clojure compiler" mode as long as "application developer" mode is just a one-liner.
14:55bitemyappI think elision can be pulled off successfully for most application development.
14:56technomancyof course you'd have to be able to swap it out at runtime
14:56bitemyappstacktrace retention and "replay" would be nice, because if you get an elided stacktrace that you think is missing something, you can just request a full replay of it.
14:56technomancyI haven't found a great solution for configuring small libs like that. the temptation is to put it in the user profile of lein, but that's pretty clearly wrong
14:56technomancyproliferating tiny config files isn't great either
14:57technomancyso far I have punted on slamhound
14:57technomancybut it has the same problem
14:57bitemyapptechnomancy: I have a pretty good pattern (imho) for this in bulwark that I have some ideas for improving upon.
14:57bitemyapp(closures || atom) ++ environment variables
14:58technomancyenv vars are super annoying for development tho
14:58technomancysince they're immutable
14:58bitemyapptechnomancy: precedence. env vars are lowest precedence.
14:58muhooweavejester's environs lib is nic3
14:58bitemyapptechnomancy: closures override atoms override env
14:59technomancywhen I use env vars I typically end up hard-coding the default dev-appropriate values into the codebase so I can change them with reloads
14:59bitemyappmuhoo: environ* - I'm a massive fan of it.
14:59technomancyeven with environ
14:59bitemyappit's more pliable than I think you're imagining.
15:00justin_smithI don't like environ because I find it helpful to run two different configs in parallel and environ uses the fs so it isn't reentrant
15:00technomancybitemyapp: I know I can go in an edit the .lein-env file and trigger a reload of environ, but it's cumbersome and error-prone
15:00justin_smithwhich means what, check out my repo twice?
15:00gtrakdnolen: looking at the macros design page, it seems the issues for a complete solution are &form and &env, and hacking the clojure-reader? Plus backends for repls?
15:00bitemyappthat's...not how you're supposed to use it :|
15:00bitemyappyou're missing that I said env vars were lowest precedence.
15:00uvtcRegarding stacktraces, would love to see nicely aligned and color-coded stacktraces...
15:01dnolengtrak: link?
15:01gtrakhttp://dev.clojure.org/display/design/Macros
15:01technomancybitemyapp: sure; I haven't used your system; just saying this is a problem with environ
15:01bitemyappyou're supposed to configure behavior by either changing the atom or creating new instances from closures.
15:01technomancybitemyapp: this is something nrepl-discover would be nice for
15:01bitemyappthe env vars are just a way to set/override defaults from the outside world.
15:02bitemyappbut the code is king, so to speak.
15:02technomancyM-x nrepl-config-set instead of hunting around for an atom somewhere with tab completion
15:02sritchiewhen you guys build apps w/ cljsbuild and generate js,
15:02sritchieis best practice to generate smaller js targets, rather than 1 big one?
15:02sritchiethis isn't a single page app -
15:02technomancybitemyapp: but having an override atom is a lot better than raw environ
15:03sritchierather, I'd have a javascript embed on one page, and a chat-like page on another html page… that sort of pattern
15:03bitemyappsritchie: I think most people do one big target + routing for nice caching, but it can make sense to split it up. It just usually isn't worth bothering with.
15:03bitemyappsritchie: I think people don't really want to have to change their templates much.
15:03sritchiegotcha
15:03sritchiewhat do you mean by routing?
15:03dnolengtrak: that design page is awful, I would not refer to it
15:03bitemyapptechnomancy: and having closures is better than only being allowed singleton global config.
15:03sritchiebitemyapp: wrt the generated js files
15:03bitemyappsritchie: client-side apps use routing to determine what logic gets triggered where.
15:04technomancybitemyapp: sounds better, but in my limited experience I haven't felt that particular pain point yet =)
15:04bitemyappsritchie: routing is how you handle having the logic for multiple pages in one file.
15:04bitemyapptechnomancy: it's amazing for testing.
15:04sritchiegotcha
15:04sritchieokay, cool
15:04sritchiebitemyapp: it's a brave new world here on the front end :)
15:04bitemyapptechnomancy: it's just cleaner/more FP, and I don't really like singleton libraries even if there are constraints making it so anyway.
15:05bitemyappI try not to presume I can imagine every possible use-case and try to provide for non-singleton use-cases modulo simplicity of the code.
15:05technomancyconceptually I am on board =)
15:05bitemyappCool.
15:05bitemyappI'll try to meditate on what sort of behavior is desirable/doable.
15:05bitemyapptechnomancy: what's the typical width of your terminals?
15:06technomancybitemyapp: 78 in X, 87 in a terminal
15:07bitemyappdamned close to 80. I wonder what my width was in Xmonad. More than that I think because I use honkin' big monitors.
15:07bitemyappI need to get one o' them 4k thing-joggers so I can pretend I live in the Matrix.
15:07technomancyyeah, that's my minimum when I'm away from home
15:07technomancywhich is ~twice a week
15:08technomancyI got to try an oculous over th eweekend
15:08bitemyappsritchie: with lein cljsbuild, did you run into this error perchance? Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: reader/*alias-map* in this context
15:08bitemyapptechnomancy: oh cool, how was that?
15:08sritchieI haven't seen that one before
15:08technomancytrippy stuff. makes me wonder how long till we have WMs with free-floating workspaces rather than fixed 1-9.
15:09technomancybitemyapp: it doesn't work that well with existing 3D exploration input
15:09justin_smithtechnomancy: map workspace to the actual architecture of your house
15:09technomancysince the mouse overlaps with te functionality of the turn sensors
15:09justin_smithreddit in the bathroom workspace, youtube in the kitchen workspace, work related stuff in the office workspace
15:09tbaldridgetechnomancy: I've heard the older models of the oculous was too low res for working with text/code. Is it any better now?
15:10technomancyjustin_smith: https://mobile.twitter.com/HardSciFiMovies/status/395187189492903936?p
15:10rasmustotbaldridge: the new one isn't available yet, is it?
15:10bitemyapptbaldridge: I think they're still on the same revision.
15:10technomancytbaldridge: it's too low-res for code if you don't have a free-floating WM
15:10rasmustotbaldridge: first gen is definitely not suited for text
15:11tbaldridgeah, I thought they had released the new version.
15:11technomancytbaldridge: if you were able to pan around your single huge workspace by moving your head, I think the current res could be suitable
15:11bitemyappIt amuses me that the 3d file explorer
15:11rasmustothey're showing it off now, but you can't get it
15:11bitemyappin Jurassic Park is ridiculed as an example of silly Hollywood, but it was a real Unix app/
15:11shaungilchristI think you could use computercraft with it and that is good enough for me
15:11winksilly as in: not really usable maybe?
15:11tbaldridgebitemyapp: yep, and it ran on SGI workstations, the most awesome machines ever made by man, IMO.
15:12rasmustotechnomancy: oculus rift can replace wobbly windows and 3d desktop cube imo
15:12technomancytbaldridge: better than symbolics machines? *gasp*
15:12technomancyrasmusto: exactly; if it were a free plane rather than distinct workspaces
15:13bitemyappif the free-floating could be made to work efficiently (minimum of motion) that could be neat
15:13sritchiebitemyapp: so, quick follow up
15:13bitemyappbut I have a hard time imagining how it could be made more efficient than Xmonad.
15:13sritchieso if everyone has some JS business,
15:13technomancybitemyapp: right; like a binding to toggle "locking" to a specific position
15:13sritchiebitemyapp: then you just need to be disciplined about your divs, I suppose?
15:13rasmustotechnomancy: i guess one of the weird things about current workspaces is that they're max-resolution at all points, and don't dynamically change based on what you're looking at
15:13technomancybitemyapp: the advantage is it could have a much larger effective surface area
15:14rasmustoI could see them using head-tracking to sort of give you a "resolution fisheye lens" for looking at details/text
15:14bitemyappsritchie: 'ish. The simplest thing to do is to have a universal singleton "content" div into whom each page is injected.
15:14technomancyrasmusto: since your brain already does that with color/detail =)
15:14sritchiebitemyapp: so, say, in form validation, you don't grab hold of some form on the wrong page
15:14bitemyappsritchie: Example of a router, I know of it from the author: https://github.com/gf3/secretary
15:14bitemyappsritchie: you use routing to avoid mis-applied logic.
15:14rasmustotechnomancy: make the technology match the brain
15:14bitemyappthe DOM only needs to be consistent insofar as you maintain an injectable container.
15:14technomancyrasmusto: you can't do that with head position alone though; you need eye tracking
15:15technomancydifficult to do both at the same time
15:15bitemyappyou do not rely on a universal DOM structure and shouldn't be misfiring logic.
15:15rasmustotechnomancy: I think carmack is shooting lasers into his eyes as we speak to try and make thing a reality
15:15technomancyrasmusto: I believe it =)
15:16rasmustopretty sure I skipped a few words in that last sentence
15:17bitemyappif I have :source-paths ["src" "src/clj"] in my Leiningen, and I have a namespace like src/clj/blah/woot/baz then blah.woot.baz without clj in front of it should work right?
15:17gf3bitemyapp, sritchie: Example of using the router with HTML5 history: https://gist.github.com/noprompt/6775563
15:17bitemyappsritchie: did you see my question about the error? I can't lein cljsbuild to work.
15:17technomancyhuh; source is available, but it only builds with visual studio: https://github.com/cybereality/Perception
15:17bitemyappgf3: thank you
15:17technomancybetter than I expected actually
15:17sritchiebitemyapp: yeah, I haven't seen that error before -
15:17bitemyappgf3: what's the Google Closure way to trigger the routing on page load?
15:17sritchieI'm on lein 2.3.3, using :plugins [[lein-cljsbuild "0.3.4"]]
15:17rasmustotechnomancy: ah, this is that game wrapper, right?
15:18technomancyrasmusto: uh no idea; I just searched and clicked on the top hit
15:18bitemyappsritchie: what version of clojurescript?
15:18technomancy=)
15:18bitemyappgf3: and have you seen this error when running lein cljsbuild? - Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: reader/*alias-map* in this context
15:18sritchie[org.clojure/clojurescript "0.0-1934"]
15:18rasmustotechnomancy: there's a file called apihijack.cpp, I think this wraps directx
15:18sritchie[org.clojure/clojure "1.5.1"]
15:18sritchiebitemyapp: okay, I'll go absorb the routing business -
15:18bitemyapp1934 seems to work, 1978 broke my stuff.
15:19bitemyappsritchie: thanks!
15:19clojurebotI don't understand.
15:19technomancyrasmusto: so probably not useful from the perspective of a WM
15:19gf3bitemyapp: I haven't seen that before, no
15:19technomancysince it probably assumes the hardware drivers are present
15:19gf3bitemyapp: re: Google Closure, is it just (.setEnabled)?
15:19rasmustoyeah, I think this is suited for wrapping existing dx games
15:19sritchiebitemyapp: so, it seems like the short of it is that the routing allows the JS to stop certain side effects from registering callbacks before certain URIs load
15:19bitemyappgf3: I dunno, I've only done pure JS.
15:19sritchie(and unregisters them when you leave those URIs)
15:19bitemyappand very little Closure.
15:19Bronsabitemyapp: make sure you are using tools.reader 0.7.10
15:20gf3bitemyapp: Yes, just confirmed, it's .setEnabled
15:20gf3http://docs.closure-library.googlecode.com/git/class_goog_history_Html5History.html
15:20bitemyappgf3: oh no, I'm asking a more generic question than that, what's the page load trigger for fire off routing?
15:20bitemyappgf3: you know, like jQuery's $.ready
15:21rasmustotechnomancy: leave it up to the community: http://hwahba.com/ibex/files/ibex-video-two.png
15:21rasmustotechnomancy: https://bitbucket.org/druidsbane/ibex/overview
15:21gf3bitemyapp: Oh shit, I dunno, I just throw stuff at the end of where I need it (e.g.: body end)
15:22rasmustonow I can watch blender demos inside of vr in a quake 3 deathmatch arena
15:22bitemyappgf3: errr. like you just call the cljs function at the end of the body in a script block to start the app?
15:23technomancyrasmusto: http://openhmd.net/
15:23gf3bitemyapp: Yeah, right at the top of your "core" module
15:24bitemyappBronsa: that fixed it, thank you!
15:28rasmustotechnomancy: ah cool. It has quaternion math in it so I assume it works well
15:42sritchiebitemyapp: did you see that last Q I had? just want to make sure I've got this down -
15:43sritchieI'm thinking of if, say, I generate similar forms in two different parts of the app
15:43sritchiebut I want to apply different validation logic to each
15:44sritchiebitemyapp: it sounds like you're suggesting using routing to basically namespace the registered callback functions I use
15:44sritchiebitemyapp: alternatively, if there were some token (or if I could get at the URI somehow), I could stick both the URI AND the event data onto my core.async channel
15:45sritchiebitemyapp: and then have each local core.async event loop filter out events that it cares about
15:45sritchiebitemyapp: is that off base?
15:50sritchieI just got this error with cljsbuild, strangely: clojure.lang.ArityException: Wrong number of args (3) passed to: reader-types$indexing-push-back-reader
15:55Bronsasritchie: *sigh*, cljs requires tools.reader 0.7.10, you have an older version on your classpath
15:56staaflsay I have a bunch of helper functions, what's a good way to nest them inside the driver func?
15:57sritchieBronsa: saw your note and updated
15:57sritchiethanks!
15:58Bronsanp
15:59gtrakstaafl: let, letfn, if you need to pass them around, a map maybe?
16:00staaflgtrak, thanks :-) letfn seems a bit unreadable to me, but maybe i'm just a rookie
16:01staafland it's a bit of a chore to paste the helper definitions into the binding vector
16:01gtrakletfn's got a specific use-case that isn't obvious at first glance. fn can take a symbol to refer to itself, and letfn will make those visible to every function in the scope.
16:01staaflsince I tend to write them separately for REPL testing, before merging into a the final function
16:02amalloystaafl: you can also just choose to not make the functions local, but put them into the namespace (private, if you like)
16:02gtrakstaafl: with let, you simply remove the de and leave the fn :-)
16:02yeoj___if i start a development web server with lein ring server should i be able to connect to it with vim-fireplace? Is there a repl there?
16:03gtrakthough you have to move the name araound
16:03yeoj___i'm having problems connecting
16:03staaflamalloy, hmm... is there an analogy to the revealing module pattern?
16:03staafli.e. you surround a bunch of definitions in a scope, and only export some of them
16:05gtrakstaafl: JS has a module pattern because JS doesn't have modules. Namespaces and defn- are enough for anything.
16:06gtrakand they're required for niceties like autocompletion. I haven't ever really passed a bag of functions around in clojure.
16:07staaflgtrak, got it, thanks
16:08noncomhi, anyone familiar with graphics2d in seesaw ?
16:10noncomif i have a BufferedImage, the screenshot taken with Robot , how do I cut a rectangle from it and paste it into a Graphics2D on my apps frame?
16:10noncomi mean, what is the best seesaw way?
16:10mdrogalisYou know what would be a great Twitter acount? @IrrelevantRichHickeyQuotes
16:16xeqi"Does anyone know how to make a line connect to a thing and stick?"
16:19mdrogalisHeh.
16:21gfredericksis there a name for (fn [f & gs] (fn [arg] (apply f (map #(% arg) gs))))?
16:22justin_smithmake the map a mapv and then it has a hidden juxt in there
16:22dobry-denztellman: In Gloss, I have a `header` that correctly encodes the body when the header byte is 0xfd, 0xfe, and 0xff. But is there a way to use the header itself as the body if it's not one of those 3 values?
16:22stuartsierragfredericks: juxt
16:22ztellmandobry-den: header->body is a function, so you can have the body be whatever you want
16:22ztellmanincluding a static value
16:23justin_smithgfredericks: (fn [f & gs] (fn [arg] (apply f ((apply juxt gs) arg))))
16:37uvtcnoncom, Sorry, no idea. Maybe post to the seesaw ML?
16:40rhg135has anybody here ever used cljs on node?
16:40noncomuvtc: well, i already figured it out :) I just use one java method call, (.drawImage ...) and seesaw example on canvas does such things too, so i think it is ok. at least if it would be smthing like (draw-image ...), it would not change much :D
16:40justin_smithnoncom: not sure what is best, but the cropping can be done with the methods of BufferedImage
16:41noncomyeah, i know java side well, i think i'll just go with it, since seesaw does not look like it has much to image editing... but i'll go look docs and source more
16:41dnolenrhg135: ohpauleez has, Bodil, and a few others - CLJS Node support in general could use some love though
16:41rhg135i'm wondering if it's possible to run a repl
16:42rhg135i already have the logic down but cba to write an ui
16:43dnolenrhg135: Bodil maintains a node-repl, https://github.com/bodil/cljs-noderepl
16:43gf3technomancy: A word of warning, I tweet mostly BS and ill-thought out jokes
16:43rhg135i saw that but i don't see how to load my code in that repl
16:44coventryShocking. I go to twitter for the solid, well-considered content. I'm saddened to see it dragged down like that.
16:44technomancygf3: I mostly take that as a given on twitter.
16:46dnolenrhg135: what do you mean load code?
16:46rhg135dnolen, i already have some code in clojurescript that works
16:47dnolenrhg135: I just don't know what you're asking.
16:47staaflhow can I pinpoint the compilation error in the REPL?
16:47staafl"Don't know how to create ISeq from: clojure.lang.Symbol" doesn't tell me much
16:48rhg135i basically want to run a repl from my code
16:49amalloystaafl: that's what the line numbers are for. although, the most common cause of that particular exception is probably using (:require [foo.bar :refer baz]) instead of (:require [foo.bar :refer [baz]])
16:49staaflamalloy, thanks. the line numbers increase every time i paste a snippet and are impossible to follow
16:50dnolenrhg135: run a CLJS REPL from the CLJS code itself? not possible.
16:51rhg135dnolen, well in the broser you can emulate it by listening for connections
16:51Jardadnolen: hi! May I disturb you a bit
16:52dnolenJarda: just ask your question if you have one :)
16:52bitemyappgf3: btw your halloween costume was a scream.
16:53gf3bitemyapp: Haaaah
16:53Jardadnolen: I tried to add source map compilation to my cljsbuild configuration, but am having problems with the paths
16:53bitemyappgf3: I loved the Fifth Element, the multi-pass thing made me giggle.
16:53gf3bitemyapp: My favourite shot: http://instagram.com/p/f-pD6TCauX/
16:53bitemyappgood lord LOL
16:54gf3Ahahahahhaa
16:55Jardadnolen: I addes :ouput-to "resources/public/js/app.js", :source-map "resources/public/js/app.js.map" and it generated the comment to app.js with resources/public/js.. in the path
16:55rhg135dnolen, also i guess running a repl would work, but could i require my file?
16:55Jardadnolen: so the browser of course didn't find as the http path would be /js/app.js.map
16:55dnolenrhg135: don't know but I would think cljs-node-repl can require files just like the Rhino one
16:56dnolenJarda: don't specify a path for :source-map, just the name of the file.
16:56Jardadnolen: I thought I did that too, then the file got generated to project root
16:57rhg135ah
16:57rhg135lemme try
16:57dnolenJarda: feel free to file a ticket then, patch welcome - I got a pretty long list of things on my plate at this point as far as patches.
16:58Jardadnolen: yeah I just saw your tweet about a new cljsbuild release so I thought I would ask if it's something I've misunderstood or a possible bug
16:58JardaI'll come up with a demo-project to attach to the issue
16:58dnolenJarda: bugs most likely, there's a lot of new stuff around source maps and people are just now seriously trying to use it.
16:58dnolenJarda: sure, but seriously look at the source code, fix it submit a patch.
16:58dnolenCLJS is not rocket science, the source maps path stuff is simple stuff.
16:59Jardadnolen: ok, I'll promise to look at it (tomorrow)
16:59bitemyappdnolen: the preferred terminology is "rocket surgery"
16:59dnolenJarda: thanks, much appreciated and I'll apply it quickly if I get something.
16:59bitemyappever taken a scalpel to a warhead? Nerve-wracking.
16:59Jardadnolen: so the correct place to look is in cljsbuild I guess?
16:59Jardaor clojurescript core
17:00justin_smithever try to troubleshoot the detonator on a brainstem?
17:00dnolenJarda: no it's a CLJS compiler issue, look into closure.clj, we'll also need to fix compiler.clj, just grep for sourceMappingURL, there are two places to change the logic.
17:01Jardadnolen: ok cool, I'll do it
17:10rhg135nope :c
17:11rhg135i may have to redo this in jvm clojure
17:11rhg135which im fine with but the startup delay is a problem for client apps
17:12rhg135also the ram usage
17:19hlship_where's the best place to discuss multi-module lein projects?
17:27stuartsierrahlship_: #despair
17:27hlship_... well, that's why I use Gradle for my big, big project.
17:28llasramgeez
17:28technomancyafaik, "multi-module" is not a well-defined term. can you be more specific?
17:28llasramhlship_: Have you tried lein-sub? https://github.com/kumarshantanu/lein-sub
17:29hlship_well we have (with tests) about 1400 source files, 280K lines of code, in about 47 (mostly, small) modules
17:29technomancyin a single codebase?
17:30hlship_yes
17:30hlship_that is, builds with a single command
17:30hyPiRionOf Clojure?
17:30hlship_each module is AOT compiled individually, and has own dependencies
17:30hlship_yes this is 99% Clojure
17:30technomancywell lein might be able to provide some support, but at that point it's going to be a band-aid for deeper architectural issues
17:30hlship_perhaps the biggest Clojure project around
17:30llasramhlship_: Let me guess -- a starship?
17:30hlship_Part of my job now is to remove and simplify a lot of unnecessary code
17:30hlship_It's a credit card switch
17:31hyPiRionAh, I was about to guess that it was the healthcare.gov system rewritten in Clojure.
17:32technomancyhyPiRion: ahaha
17:32tbaldridgehyPiRion: nah....that'd only be about 10K lines of code.
17:32hlship_No, there's necessary complexity here. A switch has to be able to freely translate between all kinds of binary data formats used by various banks.
17:32hlship_I'm actually in the middle of reworking the internals of it to use core.async.
17:32hlship_And in fact, we'll probably stick with Gradle for the meantime.
17:32hyPiRionhlship_: yeah, that was more of a joke about healthcare.gov, not your system
17:32technomancyhlship_: lein-sub, private mvn repos, and checkouts are typically the building blocks upon which you structure systems which span multiple project.clj files
17:33hlship_But I'm also spinning off some of the code as open-source and for those parts I use lein.
17:33technomancydifficult to say more without knowing specifics about what you're finding tricky
17:33hlship_But Twixt, for example, should be a number of "al la carte" modules that I'd prefer to build, version, and deploy as a unit.
17:33tbaldridgeyeah, I've worked on projects that break the software into 20 different project.clj modules that each have their own release numbers, I was pretty happy with that.
17:34sritchieany austin users?
17:34sritchieI'm seeing stackoverflowerror at (cemerick.austin/repl-env)
17:34sritchieStackOverflowError java.lang.ClassLoader.getResource (ClassLoader.java:1134)
17:34justin_smithtbaldridge: all in one repo?
17:34hlship_talbridge: I think you forgot your <sarcasm> tag
17:34tbaldridgenope, 1 repo per project
17:34justin_smithtbaldridge: I bet a lot of work went into keeping the apis between them stable then>?
17:35tbaldridgetrue modules should be modular enough that a release of one module shouldn't take a massive rewrite of all the other modules.
17:35hlship_Part of what I'm looking for in multiple projects is information sharing between the parent project.clj and the individual modules.
17:35technomancyhlship_: for a long time there was no good programmatic way to manipulate defproject forms (preserving comments, etc) making automated version bumps difficult
17:35hiredmana project object model
17:35technomancynow we have sjacket, but no one's done the plumbing to apply it to version bumps yet
17:35technomancyI don't expect it would be difficult
17:36hlship_Generally not a massive rewrite, but I want to avoid the Hibernate style versioning where you need a complex chart to guess at which versions form a compatible whole.
17:36hlship_In the Tapestry world, I'm quite happy to change the version number across all modules, including ones that have not in any way changed, just so I can use a single verison number for a consistent system.
17:36uvtcIs there a standard function to print to stderr? Or do I do: `(binding [*out* *err*] (println ...)`?
17:36hlship_And identify that all of them were built and tested together.
17:36technomancyznDuff: "if you have to get kicked in the shins, moccasins are great for that"
17:37hlship_Gradle has a kind of search path mechanism, where configuration data from a parent build script is accessible in the children.
17:37hlship_So I specify the version number in exactly one place.
17:37hlship_I also can do a lot of the shared dependency configuration at the master project level.
17:38technomancyhlship_: you can do that with shared project middleware; I think pallet uses that
17:38hiredmanhlship_: I'm not sure I follow that, if you are deploying a service the output of the build is a tarball with all dependencies ready to run, if you are building a library you depend on a bit and get what you need from maven repos dependency wise, what do you need the chart for?
17:38hlship_Interesting; I'll take a peek at their source then. Good examples are enough.
17:40hlship_hiredman: In the Hibernate world (as a terrific anti-example) when you upgrade one piece, say hibernate-search, you have to do a lot of hunting around to determine what other mix of dependencies actually work together. It's a mess.
17:40technomancysearching up for the version number sounds very iffy once it crosses git repo boundaries
17:41technomancyI would hate to encourage projects that can't be built from a fresh checkout
17:41hlship_znDuff: I hate Maven with a passion and love Gradle, though it can be occasionally infuriating.
17:42hlship_technomancy: You are correct; I would not want to coordinate version numbers across Git repos; but if I'm developing several closely related layers (such as Twixt, for example) I would prefer to have a single Git repo and single version number for the different layers that can be composed.
17:43hiredmanhlship_: well hibernate is just horrible, a lot of old style java stuff is pretty bad about versions
17:43technomancyif you are asking for project info to come from somewhere other than the codebase you're going to have to give up determinism or that
17:43hiredmanI can never figure out versions on jboss projects
17:43technomancybut inside one big repo seems reasonable
17:43hiredmanbut if it is your project you can do better
17:43hlship_technomancy: I think we're in agreement there.
17:44znDuffhlship_: I would need to spend a significant amount of time learning Groovy before I could give Gradle a genuinely fair shake.
17:44hlship_znDuff: That's a discussion for some other time/place.
17:44znDuffhlship_: ...in trying to use it thus far, it's been completely full of spooky action at a distance, where it wasn't clear from reading the code what given action a line would have.
17:45technomancya central tenet of lein is that task execution should be a basically-pure function of the codebase, the (hopefully append-only) state of the referenced repositories, and CLI input
17:45hlship_I've done everything from GNU Makefiles, Ant, Maven 1 - 3, Rake, Lein and Gradle.
17:45znDuff(and reading the bytecode Gradle generated... *shudder*)
17:45technomancythe more you diverge from pure functions, the more hidden gotchas are going to come back to bite you eventually
17:45ToBeReplacedfwiw i found that :pedantic? :abort and every-subproject-gets-its-own-project-clj to be a smooth combination
17:46hlship_For most Clojure projects, Lein is perfect. But past a certain point, Gradle is my go-to choice.
17:46ToBeReplacedthat plus lein ancient makes it easy to see when a subproject has been updated and when i've got a potentially breaking dependency mismatch
17:47technomancythis is a big controversy at work where some people want to introduce build config that would result in breaking the functional aspect of input -> artifacts
17:47technomancy(mostly due to rails)
17:47znDuffhlship_: My title is "release engineer"; I've worked on a comparable number of build systems, and gradle is actually the only one that gets me quite -that- frustrated (though I'm pretty thoroughly unhappy with Ivy right this minute).
17:48znDuff...but yes, not the place and time.
17:48hlship_Well, to each his own. I find Gradle lets me do what I need and largely gets out of the way. Also, it is actively maintained by non-lunatics, which puts it way ahead of Maven. And they eat their own dogfood.
17:50technomancyhlship_: would be interested in hearing whether you find project middleware suitable for your purposes
17:50hlship_Anyway, the thing for me to consider is if I really need coordinated version numbers. I prefer them.
17:50AlienCathello
17:50znDuffhlship_: *shrug*. Compared to Ivy, Maven is -extremely- actively maintained. They've merged a few patches I submitted just over the last few weeks.
17:50AlienCatthe counterclockwise thing
17:50technomancyit would certainly be easier with programmatic modifications to project.clj
17:50AlienCatis it supposed to work?
17:50znDuffhlship_: (...mind you, the need for those was unfortunate -- one of them was a fix for a shell injection vulnerability; *sigh*)
17:51hiredmanhlship_: so how many common lisps are in 280k of clojure?
17:51technomancybeen hoping someone would bash that out in a plugin, but maybe it's time to think about putting that into lein proper
17:51technomancyAlienCat: no, it's a trap designed to trick IDE users into using scala
17:51technomancyof course it's supposed to work
17:52technomancy~anyone
17:52clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
17:53technomancyznDuff: how do you have a shell injection vulnerability in a tool designed for arbitrary code execution?
17:53technomancygenuine curiosity =)
17:53znDufftechnomancy: it could execute code embedded in filenames.
17:54technomancyhuh, interesting
17:55technomancydifficult to imagine a scenario in which an attacker could control filenames but not bytecode to run, but better safe than sorry
17:55AlienCatwell, "Waiting for new REPL process ack timed out" does not tell you much right? I roll with that example project and debugged it and all I got was that message
17:55AlienCatJust a plain "Clojure project"
17:55technomancyAlienCat: perhaps it is a Zen message designed to communicate your lack of patience
17:57technomancygiven that the primary maintainer resides in France, the mailing list would probably be more fruitful than IRC
17:57AlienCatI do not like mailing lists :'(
17:58technomancyyou could try again at a more UTC-friendly time
17:59znDufftechnomancy: I can certainly think of cases where an attacker could control code that would be run at execution-time but not at build-time absent the vulnerability.
17:59znDufftechnomancy: ...and if you're building code to be run in a sandbox...
18:00AlienCatI live in the UTC zone, well I might give google groups a shot
18:00AlienCatwell actually, I even think counterclockwice have an own google group
18:01clowsAlienCat: http://bit.ly/16Ifijx (google groups) maybe? seems a bit old but who knows
18:01sritchiebitemyapp: what are your thoughts on distinguishing dev mode from prod with a global atom?
18:02hiredmangross
18:02sritchiewhat's the best way to do this?
18:02sritchiehiredman: here's my goal - cljsbuild is generating either gen-debug.js or gen.js
18:02sritchieand I want to include the proper one
18:02coventryznDuff: What kind of problems are you working on? Sounds interesting.
18:02technomancysritchie: prod vs dev is like browser-sniffing. check for specific feature config, not for one wide setting.
18:03AlienCatwait a minute, isn't google groups mailing lists? damn I tricked myself
18:03hiredmansritchie: carica is the config library we use at work, and I like how it works
18:03technomancycarica is great; check in dev defaults into dev-resources/config.clj and prod settings into resources/config.clj
18:03hiredmanyou have some set of default configs, which then your deployment can override by writing other configs to the classpath
18:03sritchieoh, wait, what am I doing, I've already got environ in here
18:03sritchienice
18:05cemericksritchie: taking off, feel free to file an issue if you're still seeing the stackoverflow
18:05sritchiecemerick: yeah, it happens when I try to reconnect
18:05sritchiegot a NPE in a diff setting -
18:05sritchieI can't figure out where it's coming from
18:05sritchiebut I'll keep pushing
18:06sritchietechnomancy: okay, awesome, carica is good. do you use carica and environ together?
18:06bitemyappsritchie: very gross.
18:06sritchiehaha, okay
18:06bitemyappsritchie: I use environ, no carica.
18:06znDuffcoventry: I'm at Indeed -- the job search engine. Big picture re: things we have going on, there's a blog at https://engineering.indeed.com/blog/
18:06bitemyappsritchie: configuration is actually something I've spent a lot of time perfecting, let me put together a sanitized gist so you can see what I do.
18:07sritchienice! thanks, bitemyapp
18:07coventryznDuff: Thanks.
18:08technomancysritchie: I haven't worked on anything needing more than a handful of config vars in a while; so far just environ.
18:09technomancyenviron is obviously bad if you need anything more complicated than a single level of string->string mapping
18:09sritchietechnomancy: but it seems clean to, say, use environ to flag PROD or DEV, and then have "prod" and "dev" maps w/ settings in carica, for example
18:10ToBeReplacedhm, carica is interesting -- idk when i'd use it though tbh
18:10technomancysritchie: no, I would advise against that
18:10sritchieyeah?
18:10technomancysritchie: if you use uberjars you don't need to do anything to flag prod
18:10technomancythe fact of being an uberjar means that it can't see dev-resources
18:10bitemyappsritchie: now I want you to keep in mind that this is a fairly "evolved" config that has grown organically, so it's not as simple as something in a freshly made application
18:10bitemyappsritchie: https://gist.github.com/bitemyapp/7223007
18:11technomancyif you use lein in production, you should use profiles
18:11ToBeReplacedi pass through jvm-opts to the :dev and :test profiles and pass them through on command line in production
18:11sritchiedoes lein load dev-resources after resources, always?
18:11hiredmanToBeReplaced: it is pulled out of a largish clojure app at work, it is all we use for configuration, but it is sort of of tied to how we deploy stuff using chef
18:11bitemyappsritchie: a few things to note, they're not defs, they're all functions.
18:11technomancysritchie: `lein with-profiles production trampoline run ...`
18:11sritchieyes
18:11hiredmanbut we have lots and lots and lots of configuration
18:11bitemyappsritchie: it's just a config namespace with a primary function, "get-config"
18:11technomancysritchie: dev-resources always "wins" if the dev profile is active
18:11hiredman"constants" all tend to end up in config
18:11sritchieand dev is active by default
18:11sritchieokay
18:12bitemyappsritchie: most of the fallbacks "(and ...)" are for standard dev environment stuff.
18:12sritchietechnomancy: I'm on Heroku now, and using that method
18:12sritchiebitemyapp: taking a look
18:12technomancysritchie: cool. I recently made it a lot easier to use uberjars on heroku, so check that out if you start anything new or need to futz with it.
18:12technomancythere aer a lot fewer ways to screw things up with uberjars
18:13sritchietechnomancy: interesting, checking out the getting started now
18:13bitemyappsritchie: https://gist.github.com/bitemyapp/7223050
18:13bitemyappsritchie: that's the environment file that gets sourced in the upstart init before running the jar, and the init script itself.
18:14ToBeReplacedhiredman: are the constants unique to each app/machine pair? i'm wondering when that approach is better than picking up values from a db
18:14ToBeReplacedour deployment is small, so we basically just pass things like where are the logs, where is the database, etc.
18:14sritchietechnomancy: so the default script now runs uberjar
18:14hiredmanToBeReplaced: it depends, I think you could pull it form a db, but they are static, so why?
18:14bitemyappsritchie: the java -jar is a vanilla lein uberjar.
18:15bitemyappanybody interested in deploying Clojure apps really should look at those two gists I just posted.
18:15sritchiesure, but I see Running: lein uberjar in the heroku example,
18:15bitemyappthat's a lot of how I do it.
18:15hiredmanwe've actually talked very briefly about some kind of zookeeper backend for carica
18:15bitemyapphiredman: if I used zookeeper, it would just replace the dev.env/prod.env files.
18:16hiredmanvery briefly and I doubt it will go anywhere
18:16bitemyappand then I'd add a signal to trip the memoized data and re-load.
18:16technomancysritchie: it runs uberjar if :uberjar-name is present
18:16sritchieokay, nice
18:17ToBeReplacedhiredman: yeah, we talked about using zookeeper and decided to delay b/c we don't need it, but that certainly influenced the decision to do lookup via database instead of passing in the config
18:17technomancybecause you don't want the default uberjar name (which contains the version) since that would mean changing your Procfile for every version bump
18:17sritchieyup
18:17ToBeReplacedon the flipside it kinda sucks that our whole infrastructure has a db dep on startup
18:19sritchiefor creating a production env, if you're relying on environment variables,
18:19sritchietechnomancy: is the preferred Heroku Way to keep a script in resources and source that?
18:19sritchiebefore calling java -jar
18:20technomancysritchie: not sure what you're asking
18:20technomancydon't check production config into your repo
18:20sritchiebut isn't that the carica stlye/
18:20sritchiestyle*?
18:20hiredmanno
18:21technomancysritchie: oh yeah, you can't really use carica sensibly on heroku
18:21ToBeReplacedhiredman: maybe add a note in the "Mind the Classpath" section stating that resource dirs in the :dev profile will match before resources?
18:21hiredmanwith carica we have dev/defaults checked in, and chef writes production stuff on servers in the right plae on the classpath to override defaults
18:21sritchieokay
18:21sritchietechnomancy: okay, so the idea is to set the production env variable by variable using heroku config:add,
18:21technomancywell, I mean you maybe could rig something up, but you lose the benefits of carica if everything's sourced from the env
18:22sritchieand then keep the dev environment variables on some local script that everyone sources on their dev machines
18:22hiredmanToBeReplaced: the style technomancy mentioned isn't really the style we use it in, we don't have config in :dev-resources and :resources, we just have config in :resources
18:23technomancyhiredman: but you would if you used uberjars, right? you just do that because you have a fancy tarball deploy pipeline.
18:23hiredmanproduction stuff is written by chef to a place that our launcher scripts put in the right place on the classpath to override whatever is built in to the jar
18:23technomancyoh right; actual prod secrets wouldn't go in resources/
18:23hiredmantechnomancy: speaking of fancy tarballs, danlarkin is working on a lein template which gives you a lot of safe style stuff out of the box
18:23technomancycool
18:24justin_smithI just saw this danlarkin project today: https://github.com/danlarkin/clojuredongs
18:24sritchiebitemyapp: the config looks great, thanks for the gists
18:24sritchieone more Q, for anyone using cljsbuild… if one enables the cljsbuild hooks,
18:25sritchieit's unclear how to signal which cljsbuild profile should be built
18:25sritchieon "lein compile", say
18:25bitemyappI haven't figured out how the cljsbuild profile ids work either.
18:25sritchieprobably makes more sense to just call "lein cljsbuild once prod" on heroku before java -jar
18:26technomancythe hooks are pretty "magic"; I think they're going to start documeting a more explicit approach
18:26technomancysritchie: but you can add cljsbuild to :prep-tasks to get it to run for every jar run
18:26technomancyif you don't use hooks
18:27sritchieoh, nice
18:27sritchie:prep-tasks [["cljsbuild" "once" "prod"]], for example
18:27technomancythe hooks are just "here are a bunch of common things you can add if you want to trade transparency for previty"
18:27technomancybrevity
18:30tbaldridgednolen: ping
18:31dnolentbaldridge: pong
18:31tbaldridgeI'm using reify inside a function in CLJS, if I name my namespace "main", CLJS tries to write code that does this: typeof main.main.t15920
18:31tbaldridgeThat then fails do to main.main not existing.
18:32tbaldridgethis is with 1978
18:32dnolentbaldridge: sounds a variant of the ns/shadowing issues we've had in the past
18:34dnolentbaldridge: or maybe not, looking at the reify macro I don't see anything obvious that would cause that.
18:35dnolentbaldridge: gist?
18:36tbaldridgeI even get a console warning "Use of undeclared VAR main/main"
18:36tbaldridgegist inbound...
18:36dnolentbaldridge: thx
18:37muhoojustin_smith: well at least that demonstrates the reader literal api
18:39tbaldridgednolen: https://gist.github.com/halgari/7223421
18:40justin_smithmuhoo: yeah, it actually does a good job of that
18:41dnolentbaldridge: k seems like a single segment namespace issue
18:42tbaldridgednolen: yep, changed it to main-ns.baz and it works now
18:43muhoojustin_smith: "Truly, this is what the new reader literals were for. The uuid and date stuff was just to sell it to a gullible public." <-- best comment
18:43dnolentbaldridge: http://dev.clojure.org/jira/browse/CLJS-646
18:43muhooi was surprised to look and see it's just one line of code to create a reader literal.
18:44tbaldridgednolen: lol, thanks! I'll send you all my bug reports in the future, and make you fill out the JIRA stuff :-P
18:44dnolentbaldridge: heh, lots of bugs reports in the past two of days ... the danger of making of things easy!
18:45justin_smithmuhoo: iirc where it gets messy is shadowing of that resource, making it hard for a library to provide reader literals maybe?
18:46justin_smithsome kind of merging mechanism would make it easier
18:47hiredmanjustin_smith: the reader literal already reads all the data_reader.clj's on the classpath and merges the maps
18:47hiredmanreader literal bits
18:48hiredmanhttps://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6910-L6955
18:51derfuryHey guys, so am I mistaken or do functions need to be defined "before/above" the calling function?
18:51derfuryThat seems a little strange considering it's compiled
18:51znDuffderfury: it's single-pass compilation
18:51coventry,(doc declare)
18:51clojurebot"([& names]); defs the supplied var names with no bindings, useful for making forward declarations."
18:51derfuryahhhh
18:51znDuffderfury: if it weren't that way, you wouldn't have parity between REPL usage and AOT.
18:52znDuffderfury: ...ie. things would work fine in AOT compilation and fail in the REPL. That's no fun for anyone.
18:52derfurybut I can use delare to setup the function name, and then defn the same name later on?
18:52derfuryI guess like C and .H files?
18:52znDuffderfury: Yup.
18:52derfurykk
18:52hiredmanit depends how you use the name
18:52derfuryhiredman, how so?
18:53hiredmanif you don't try and take the value of the name between declartion and definition you'll be fine
18:53derfurysick!
18:53hiredman(declare f) (def x f) (defn f [] 1) ;; not good
18:54hiredman(def x f) is taking the value f and giving the name x, but you have not given f a value yet
18:54derfuryhmmm
18:54hiredman(declare f) (def g [] f) (defn f [] 1) ;; fine
18:55hiredmanwhen the function named by g is run, it will take the value of f, but by the time (g) is run, (defn f [] 1) should have run
18:56TEttingerhiredman: defn g
18:56hiredmanright
18:56derfuryso really, there is no good way to basically keep it indifferent to the order functions are defined in ?
18:57hiredmancorrect
18:57TEttingerfunctions will kinda work
18:57TEttingerfunctions won't check the body until called
18:57coventryderfury: Why do you want to?
18:57hiredmandefing is side effectually, mutating what is effectivelly a a big map
18:57derfuryIt's mostly me hating having to keep track of what is defined first
18:58derfurytoo used to scala
18:58hiredmanright, scala/java/etc are very different because they have very distinct compilation / runtime phases
18:58derfuryI also prefer to organize my files based on things other than sequence of reference
18:58hiredmanand the compilation unit is large
18:58derfurytrue
18:58sritchiebitemyapp: typo in benv, btw
18:59hiredmanin clojure the compilation unit is a single toplevel expression
18:59derfuryI understand the trade-offs, I'm mostly just double checking, and then whining unecessarily :P
18:59sritchiebitemyapp: benv is calling into kenv
18:59sritchienot sure if that's just a byproduct of the transfer-to-gist
18:59hiredman(def x 1) is a hope compilation unit
18:59hiredmanwhole
18:59bitemyappsritchie: nah that was legit. Thanks.
19:00bitemyappsritchie: t'was an unused code path, I never fail to provide a fallback.
19:00bitemyappwhich raises the question of whether I should've even offered that code path to begin with.
19:00bitemyappThis is where I mutter darkly about type systems.
19:09sritchie:)
19:17bprdoes anyone else have issues with the cljs compiler running out of memory when generating source maps?
19:19dnolenbpr: wouldn't be surprised - but how much memory are you giving the process?
19:20bpri have :jvm-opts ["-Xmx8g"] in my project.clj
19:20bprthough i'm not sure if that affects the lein process doing the building or my code's process
19:21bpror both
19:21bpri would think that 8g would be enough?
19:21bprbtw, i'm using [org.clojure/clojurescript "0.0-1978"]
19:23justin_smithbpr: one gotcha is running out of permgen rather than heap space - just a shot in the dark, but if heap is 8g and permgen is only 32m it is still easy to run out of space because of how clojure uses classes
19:24bprah, good point
19:24justin_smithbut you should be able to see from the message whether it is permgen or heap that ran out
19:24bprit's claiming heap space is the issue
19:24bprjava.lang.OutOfMemoryError: Java heap space
19:25justin_smithI spent way too long trying to figure out why my app was crashing and dying despite high mem limits until I figured out that permgen thing
19:25justin_smithOK, so its not that then
19:26dnolenbpr: do you have stack trace showing where it failed?
19:26dnolenbpr: also some information like how big your project is would be useful to know.
19:27bprdnolen: sure: https://www.refheap.com/20272
19:27bprit's pretty small. I'll get a line count for you
19:29dnolenbpr: seems unusual for a small project
19:29dnolenbpr: also those :jvm-opts probably need a ^:replace
19:30hyPiRionno, not with latest leiningen
19:30bprdnolen: i've tried with and w/o ^:replace
19:30hyPiRionalthough it's smart to stick it in there
19:30dnolenbpr: you should also try with explicit JVM opts
19:30bprline count is 164
19:31dnolenbpr: best to watch the process to confirm that memory usage is actually exploding.
19:31coventrybpr: You should be able to figure out if whether any java process is taking 8g before it dies by looking at the output of top.
19:31dnolenbpr: the number of dependencies also matter of course
19:31dnolenbpr: as well as the level of optimizations
19:31bprtrue true
19:31bprit's just enlivee 2.0
19:31bprwhitespace
19:31lambda-stubpr: enfocus
19:31bpryes
19:32bprenfocus, lambda-stu thanks
19:32dnolenbpr: well from the stack trace it's obviously choking on source maps.
19:32bprdnolen: ok
19:33dnolenbpr: just need more information, is your project available anywhere?
19:33bprdnolen: i'll paste it
19:33bprfyi, it does build w/o source maps
19:34dnolenbpr: it simpler for me if you just publish the project to github other wise too may possibilities for mistakes
19:34bprdnolen: https://www.refheap.com/20273
19:34bprsaddly, the project is closed source :(
19:35dnolenbpr: gotcha, then not much I can do other then tell you take a look at source_map.clj, fire up YourKit and give me some ideas.
19:35bprok
19:36bprthanks. I'll post to the google group then
19:36bprI'm going to punt for now and work towards some other goals
19:36bprthanks for your time though!
19:36dnolenbpr: https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/source_map.clj#L155
19:40dnolenbpr: based on the stack trace it seems like the vectors gotten extremely large somehow - this seems unlikely to me, but maybe your dependencies are actually quite large?
19:41bprdnolen: the only cljs dependency is enfocus 2.0.0
19:41bpri'll check the dep tree on that
19:41dnolenbpr: other option would be to have the compiler report the size of the vector
19:41bprenfocus just depends on domina and jsoup
19:42dnolenbpr: also wouldn't rule out that your lein memory settings are taking
19:42lambda-studnolen: another source map q if you don't mind - the links to clojurescript files in Chrome inspector seem to be missing the file:// protocol. am I missing a configuration setting maybe?
19:42dnolenlambda-stu: as far as I can tell not needed
19:42lambda-stui.e. it looks for the cljs file in in localhost:3000/Users/...
19:43dnolenlambda-stu: this is because you are using a webserver? if so we need a patch for that.
19:43dnolenlambda-stu: a ticket already exists
19:44dnolenbpr: I just don't believe that the source map is generating a 8gig vector
19:44bpryeah, it would be fairly shocking
19:47lambda-studnolen: yep, I see it now. thanks!
19:48logic_proganyone here use clojure with hbase?
19:49dnolenbpr: building core.async now with source map with advanced, it's bigger than enfocus+domina
19:50bpryeah i would imagine it is
19:50dnolenbpr: built fine
19:50dnolene/ 1978
19:51dnolenwith 1978
19:53dnolenbpr: and core.async generates a ridiculous amount of code, so I dunno.
19:53bprk
19:53bprthanks for looking into this for me
19:53bpri appreciate it
19:53dnolenbpr: np
19:53bpri'll get more data and post it to the google group
19:54dnolenbpr: thx much
19:54sritchiebitemyapp: okay, working great: https://gist.github.com/sritchie/8e425184bd226f510425
19:54sritchieadded that too for testing
19:55dnolenbpr: just for kicks, also building with whitespace and pretty-printing, guaranteed to builded the largest source map
19:55dnolens/builded/build
19:56dnolenbpr: worked fine
19:56dnolenbpr: the final source map is 688k
19:58muhoosritchie: what's the use case for that?
19:59sritchiemuhoo: I wanted to test that (with-env {:ring-env "prod"} (dev?) => false)
19:59sritchiemuhoo: and I can't set environment properties from my emacs repl,
19:59muhooah
19:59sritchieso this was my solution/hack
20:00muhooi've been just changing .lein-env and reloading environs.core ns
20:00muhoowhich causes it to be re-read
20:01dnolentbaldridge: fixed in master http://github.com/clojure/clojurescript/commit/85ac96e3e2de4a3598c1658f7c1de6cf88734d93
20:03sritchiebitemyapp: is that a timbre logging config?
20:03sritchiemuhoo: that's what this does
20:03sritchiemuhoo: I just wanted it to reset afterware
20:03sritchieafterward
20:03muhoooh, ok, so that's why it's wrapped in a function
20:03sritchieyup
20:13iwilcoxI have a really simple clojure script I'm running just as "clojure foo.clj". It does thready stuff and I'd like to add a watchdog that restarts it, ideally from within. Am I going to get into trouble if I make the watchdog's action (load-file *file*) ?
20:18iwilcoxThe script produces output which I'm writing to a file, and the UNIXy way would probably be to use monit to check the file's timestamp and restart, but it seems ugly to restart the JVM.
20:25bpr(= "foo")
20:31sritchietechnomancy, I did have one Q for you -
20:32sritchieon Heroku, my app's slug size is pretty huge
20:32sritchiedpetrovics has the numbers, but it was a couple hundred MB, I think? with a far, far smaller uberjar size
20:33technomancysritchie: it's possible ~/.m2 snuck in?
20:33technomancycan you check with `heroku run bash`?
20:33sritchieah, interesting
20:33sritchiechecking
20:34dpetrovicsuberjar size was 35.6MB, slug size 149.1MB
20:34technomancyso the slug also includes a jdk
20:34technomancybut that's still too big
20:37dpetrovicsjust checked with heroku run bash, m2 IS in there, looks like the size is 98MB
20:37technomancyah crap, ok
20:37technomancyI will take a look
20:38dpetrovicsok thanks!
20:38ztellmanif a method with the same name is defined in two different interfaces, is there a way in deftype to denote which one I prefer?
20:38ztellmantype-hinting the return method doesn't seem to work
20:41amalloyztellman: "which one"? if it's the same name and the same type signature, they are the same method. i don't quite understand what construct you're talking about
20:41ztellmanamalloy: cons in IPersistentCollection and cons in ISeq
20:41ztellmanthey have different return types
20:41ztellmanas far as I can tell, which is being chosen at random
20:42ztellmanwhich means that my tests fail sometimes
20:42amalloyztellman: "chosen", as in...when you call it? like, your deftype impl contains code like (.cons this x)
20:42amalloyif so, you can (.cons ^ISeq this x)
20:42ztellmanamalloy: chosen as in (deftype Foo [] ISeq IPersistentCollection (cons [_ x] ...))
20:43ztellmanwhich interface is 'cons' implementing
20:44patchworkI have a lein template, and when it gets expanded all my pngs have been modified!
20:44amalloyztellman: i think the jvm only lets it choose the most-specific one. is this really deftype, or one of the deftype-family macros in potemkin or something?
20:44patchworkThey are all almost twice as large and corrupted (won't open)
20:44ztellmanamalloy: really deftype
20:44patchworkBut I am not calling the renderer on them
20:44patchworkanyone know why that would be happening?
20:44ztellmanand IPersistentCollection and ISeq are dijoint
20:45ztellmanthe former is Seqable, not ISeq
20:45ztellmandisjoint*
20:45patchworklooking through the source it doesn't seem like anything would be doing that
20:45technomancypatchwork: they are probably being turned into strings and written out as utf16 or something
20:45amalloyztellman: obviously not disjoint, because ISeq extends IPC
20:45ztellmanamalloy: ugh, missed that
20:45patchworktechnomancy: Any way to just copy them straight over?
20:45amalloyjust remove IPC from your deftype entirely
20:46patchworkit seems like that should be a simple operation in a template, but it seems everything passes through the renderer...
20:46hyPiRionpatchwork: I think you have to jump down to java Files for that
20:48ztellmanamalloy: the issue is that the deftype implements ISeq, and in some cases returns a vector from cons
20:48ztellmanwhich apparently will throw an exception in a subset of JVMs
20:49technomancypatchwork: be sure c.j.io/copy is being run on a File or InputStream
20:49technomancynot a string or reader
20:49ztellmanopenjdk 7, but not oracle jdk 7
20:49ztellmanwhich is maddening
20:49amalloyso you're implementing a seq, which when you conj onto it gives you back a non-seq? i'm not surprised that breaks
20:50amalloyISeq's interface narrows the contract of cons in order to promise that what you get back will be a seq
20:50ztellmanamalloy: yes, granted, but that's apparently undefined behavior
20:50ztellmanbecause the behavior changed between minor updates on my jdk
20:52amalloywell, i certainly don't know where to find that in the jvm spec. i know javac wouldn't let you compile your deftype
20:52amalloy(if it were written in java, of course)
20:53technomancysritchie: do you have a custom bin/build script?
20:54ztellmanamalloy: yeah, chalk it up to me not thinking it through carefully enough, it just caught me by surprise when it stopped working all of a sudden
20:54sritchietechnomancy:
20:54sritchieweb: lein with-profile production trampoline run prod remote -m paddleguru.server $PORT
20:54sritchiethat's it
20:55technomancysritchie: I thought you were using an uberjar?
20:55sritchieno, after your rec I'm converting over to an uberjar
20:56technomancyoh right, but not yet
20:56sritchienot yet
20:56technomancyok, so if you're still using lein run then you have to have m2 in your slug
20:56sritchieah, okay, yeah, of course, since lein is referencing all of those jars
20:56sritchieboom
20:56sritchiemakes sense
20:59technomancyit threw me off because I had an uberjar app with an m2, but I realized it was pushed with an old rev of the buildpack
21:01sritchiegotcha
21:01sritchieyeah, this is great
21:01sritchieit's fun coming back to clojure and seeing all of the wonderful new libraries everyone's been working on
21:02ravalsis there a good way to get multiple values out of a vector given their indices? like a variadic get?
21:02technomancy,(map [1 4 2 343 4235 22] [0 3 2])
21:02clojurebot(1 343 2)
21:02sritchie,(map ["a" "b" "c" "d"] [2 0 1])
21:02clojurebot("c" "a" "b")
21:02technomancyravals: ^
21:02mercwithamouthdoes anyone else have an issue with instarepl not starting up with light table? is there just something that i do wrong when i try to start it with new projects created with lein?
21:02ravalsoh, right, they are functions too
21:03ravalsgreat, thanks!
21:35bitemyappahh, clojurescript project stymied. Damn.
21:35ddellacostabitemyapp: ?
21:42bitemyappddellacosta: I was going to work on a clojurescript app but got shanghai'd by a higher priority.
21:42bitemyappa wee bit disappointed as that means I won't get to do some serious cljs for awhile yet.
21:44ddellacostabitemyapp: ah, gotcha, bummer. :-(
21:44bitemyappddellacosta: partly me own fault. If I make time to work on Simonides I'll get to do cljs, since that's what the frontend for that is.
21:44bitemyappToo busy :(
21:45ddellacostaah, I see. Yeah, I know what it's like...I always have more projects brewing than I have time for. *sigh*
22:25bjl7Could not locate clojure/tools — any idea where I can get it?
22:27jared314bjl7: there are many clojure.tools projects. which one?
22:28marcopolo2Client UrlCache MMF Ver 5.2
22:28marcopolo2@
22:28marcopolo2€
22:28marcopolo2(
22:28marcopolo2€
22:28marcopolo2ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
22:29mtpwath
22:29bjl7jared314: complete beginner, so all/any of them. Only just worked out that lein installs them for you if you add them as a dependency.
22:30jared314bjl7: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.clojure%22%20tools
22:31jared314bjl7: the sources are on github
22:54coventry /join crypto
22:55coventryHeh.
22:55jared314not very secret
22:57danlentzdoes anyone have handy the cl-format incantation to left pad a [binary] number with 0's?
22:57danlentzcan't for the life of me ever remember it (or remember where I last wrote it down)
22:57jared314danlentz: do you want a string result?
22:58danlentzum don't care, but sure
22:59danlentzi have (cl-format *out* "~&[~66b]~%" x)
22:59coventryclj-format is just java String/format. http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax
22:59danlentzy i mean dl-format
22:59amalloycoventry: not close
22:59danlentzfl-format rather
22:59amalloyhe wants cl-format
22:59jared314~5,'0d
22:59clojurebotTitim gan éirí ort.
22:59amalloynot clojure's format, which just delegates to String/format
23:00danlentzcl-format auto incorrect is going to kill me
23:00coventryOh, I see.
23:00danlentzjared314: that looks right, thanks
23:00jared314danlentz: ~5,'0b
23:00jared314danlentz: i don't remember which one it is
23:02danlentz (cl-format *out* "~&[~64,'0b]~%" num) works perfect. tis very much
23:03danlentztks rather
23:05danlentzi don't remember why i gave up on getting it to print a 64 bit binary number using clojure.core/format but I did so there must haver been a reason. I see that I used (format "[%1$016X] " x) for the hex representation
23:12danlentzbitwise ops are not defined for bigints?
23:13danlentzthis is yet another failure in my ongoing quixotic struggle to emulate unsigned 64bit arithmetic with clojure
23:14danlentzit just seems like there is no possible way to do it with any semblance of efficiency
23:16AimHereIs that doable in Java even?
23:16AimHereWith the semblance of efficiency, that is...
23:16danlentzeasily the most frustrating thing I've come across in clojure
23:16danlentzsorry colloquy is apparently buggy after mavericks upgrade
23:16brehautdanlentz: maybe calls for some of the sun unsafe packages?
23:16tbaldridgedanlentz: yeah, that's a limit of the JVM, not Clojure
23:17danlentzbrehaut: i didn't know about them but they sound promising!
23:17brehautsun.misc.unsafe
23:17brehauti dont know specifics
23:17danlentzare they in j2se16?
23:17clojurebotExcuse me?
23:17brehautyour guess is as good as mine
23:18yedihas anyone used the devop? (https://thedevop.com/) is it any good?
23:18danlentzI need to do unsigned 64bit manipulations to get my uuid library to produce results equal to those produced on other platforms
23:19brehauthttp://mishadoff.github.io/blog/java-magic-part-4-sun-dot-misc-dot-unsafe/
23:19cmajor7core.async: what would be a pattern to "collect events", and apply a fn (e.g. flush them to DB) on either timeout or when a certain batch size is reached?
23:19cmajor7(whichever comes first)
23:20brehautdanlentz: basically theres a direct memory access api in there
23:22danlentzyeesh. Its really ugly
23:22danlentzdear lord
23:22brehautdanlentz: thats hardly a surpruse though :/
23:25danlentzStill not certain how to even do this though. using toAddress, and getUnsafe().allocateMemory(size) and getUnsafe.putLong it seems?
23:25danlentzjesus
23:25brehautdanlentz: unsigned math in jvm is just a giant ball of hurt nomatter how you skin it
23:29danlentzok to hell with colloqy
23:30brehautdanlentz: bit odd. its been running just fine for me under mavericks (as much as colloquay is ever fine)
23:31danlentzI've gotten close with the likes of:
23:31danlentz (if (and (not (zero? offset)) (= (+ offset width) 64))
23:31danlentz (unchecked-negate (bit-shift-left (bit-and-not x 1) (dec offset)))
23:31danlentz (bit-shift-left x offset))
23:31danlentzor some such
23:32danlentzbut it always winds up being useless in some edge case or whatever
23:33danlentzwhen actually attempting to use whatever bitwise representation I've concocted
23:36danlentzother than with longs it works fine to just roll over to next size primitive ie byte-short, short->int, int->long. But the strategy breaks down of course with long as I have just realized bitwise ops on bigint are undefined
23:36brehautdanlentz: personally, id go looking for a java implementation of whatever it is you are trying to do, and just use that. let someone else rummage about in the bag of hurt
23:39danlentzheh. I think that sounds very wise... I do feal a bit defeated though as this has been my first clojure expedition (coming from common-lisp, which has 3 entirely orthogonal subsystems and complete families of operations by which one may manipulate numeric representations)
23:41brehautunderstandable
23:41danlentzlogical-bitwise, boolean-algebraic, and an unbelievably cool primitive type called "bit-vector"
23:42brehautits just unfortunate that you chose one of the few areas where the JVM is a real albatrose
23:42danlentzyeah
23:43danlentzi really want a decent uuid facility though (ie type 1, 3, 4, 5 etc)
23:43danlentzthe built in jvm UUID is from hunger
23:45danlentzThe reason I want them is that there are many ways to employ UUIDs as a kind of "computational data-structure" (as opposed to a pointer/address type)
23:45amalloydanlentz: i think there's an apache project with decent UUIDs
23:46amalloybut it's been a while, plus i may not know what counts as decent for you
23:46danlentzwhich is extremely useful in the area of graph database
23:47danlentzY I saw the apache; wasn't thrilled + the idea was to learn some clojure by writing exactly the library I wanted... :)
23:48danlentzbut you're right I'm not sure if I could have picked a more frustrating project to start with
23:50danlentzthe whole thing is kind of surprising to me as there arew so many networking protocols implemented on the jvm
23:50tbaldridgethat's kindof a reflection of what the JVM is used for.
23:51brehauttbaldridge: i think the JVM is used for many of those things in spite of it
23:51brehauttbaldridge: unsigned bytes etc are pretty important for all things networked
23:51danlentzy one would think this ground might have been trodden before..
23:52brehautdanlentz: like most quagmires it doesnt retain footprints well
23:52brehautdanlentz: the standard solution is use the next size thing up
23:52brehautworks until you run out of sizes up
23:52`cbpbitemyapp: now we have the best documented rdb community driver :-). Although it still has a long way to go to get close to the official ones :-(
23:53danlentzI saw a quote somewhere that JVM made the consious decision not to implement unsigned arithmetic brecause it was deemed to make things TOO COMPLICATED
23:53brehautyup.
23:53brehautthats what irony tastes like
23:54brehautdanlentz: i think it might finally be coming in java8
23:54danlentzjvm seems to be one of the gratest strengths and greatest weaknesses of clojure
23:55brehautits largely the former, but theres certainly some latter
23:56jared314danlentz: that depends on when clj-in-clj happens
23:57danlentzis there a viable clj-in-clj effort undereway?
23:57brehautyes-ish
23:58brehautits progressing but its not a usable target yet
23:58tbaldridgedanlentz: often more of a strength than a weakness, I find it funny that Clojure has gotten this far in what, 5 years? Ruby took a decade for people to even hear about it.
23:58tbaldridgeclj-in-clj will probably never target a platform besides JVM and JS.
23:58danlentzi assume the idea is to bootstrap it along the lines of CMUCL or CCL in the common-lisp world?
23:59brehauthttps://github.com/Bronsa/CinC
23:59tbaldridgeright now it's only aiming at one thing: making the compiler more approachable and easier to maintain.
23:59tbaldridgebrehaut: that's been replaced by the official clojure projects: https://github.com/clojure/tools.emitter.jvm