#clojure logs

2013-02-24

00:01arrdemTimMc: how to explod on error? TypeError?
00:02nightfly#lisp can be pretty vicious about off-topic conversation
00:03frozenlockto be fair #lisp can be pretty vicious about on-topic conversation too.
00:12frozenlockAny 'eval-in-ns' functions?
00:16gfredericksfrozenlock: lots somewhere; (binding [*ns*] (eval thing)) should work
00:20frozenlockOh wow, way simpler than what I was expecting..
00:40yediwhat non blocking database solutions exist in clojure?
00:40ChongLiyedi: hmm?
00:42ChongLiwhy not put the call in an agent?
00:46ChongLior a future for that matter
00:52yediChongLi: looks like i have more things to learn
00:57ChongLiit's the "old" way of doing things
00:57ChongLiput a blocking call in a green thread to be run on a thread pool at a later time
01:04yediold in what sense?
01:05ChongLiold in the sense that it's different from the "new" way of doing things with callbacks and an event loop
01:05ChongLiI guess the event loop is pretty old too
01:06ChongLiit's just in fashion right now thanks to javascript not having threads
01:06ChongLi(and the popularity of node)
01:06nightflyDoesn't it also not require context switching in the kernel?
01:07ChongLiI wasn't aware of that requirement
01:08ChongLiI was just speaking in terms of the semantics the programmer deals with
01:22SgeoCallbacks and event loop can be hidden with nice syntax to look like/be green threads
01:22SgeoDepending on the language'
01:34muhooi thought java used native threads, not green threads?
01:35muhootop and ps sure seem to indicate that
01:36ChongLimuhoo: it does
01:36muhooyep, looks like (future ...) does indeed launch a process
01:36arrdemherm... so how can I make (vector) non-lazy?
01:37RaynesVectors aren't lazy.
01:37muhooarrdem: doall?
01:38arrdemRaynes was vindicated, I forgot to C-c C-l
01:44arrdemTimMc: https://www.refheap.com/paste/11734
01:44arrdemthat was fun.. bedtime now.
02:01nonubyis there something like conj that ignores nil e.g. (conj2 [] 1 2 3 nil 4) -> [1 2 3 4]
02:02ChongLinonuby: you could filter on identity first
02:02ChongLi,(filter identity [1 2 3 nil 4])
02:02clojurebot(1 2 3 4)
02:07nonubyhttps://www.refheap.com/paste/11738 - doesnt quite feel idiomatic
02:09ChongLiit does not appear to be
02:10nonubyany suggestions?
02:10ChongLiI'm not quite sure what you're trying to accomplish over all
02:10ChongLisome sort of rule-based dispatch?
02:10nonubycreate an array of warning
02:11nonubywarnings
02:11ChongLiright, but why do you need that?
02:12nonubyso I display in the html - hand off to view logic in hiccup to render out
02:12ChongLiah ok
02:12ChongLiso you're doing some form validation and want to display a list of warnings based on the user's specifications?
02:13nonubyyes, basically, when we display details of a villa we use the previously captured user specification to highlight when the choosen villa might not be optimal (based on dates, bedrooms etc.)
02:14ChongLihave you looked at using a form validation library?
02:16ChongLior perhaps you already have a big application and you're adding to it?
02:16nonubythis is tiny app at the moment, no i have not looked into any validation libraries
02:16nonubydo you suggest any?
02:17ChongLifirst one that comes to mind is sandbar
02:17ChongLithough it has a few other features as well
02:17nonubythanks
02:18ChongLibe sure to check the form-validation documentation
02:18ChongLiit has some nice macros to make building validators easier
02:18ChongLione of the key reasons you want to use something like this is to create open, extensible validators
02:19ChongLiputting everything into one monolithic function with a big long chain of ifs/whens/cond etc. is much harder to work with
02:19nonubywill thinking that over, thanks
02:19cliftonanyone know where clojure.contrib.io/read-lines went?
02:22Raynesclojure.core
02:22RaynesI think?
02:22Raynes$source read-lines
02:22lazybotSource not found.
02:22RaynesGuess not.
02:23cliftonit appears to have vanished
02:23ChongLiwhat's the difference between that and read-line
02:23ChongLi?
02:23RaynesIt reads more than one line.
02:23ChongLibesides the obvious I mean :)
02:23Raynes(line-seq (clojure.java.io/reader (clojure.java.io/file "somefile.txt")))
02:23Raynesclifton: ^ pretty sure this does the same thing.
02:24cliftonyeah
02:24cliftonjust saw line-seq on stackoverflow
02:24cliftongoodbye convenience function -- i guess
02:24cliftonthanks Raynes
02:24ChongLia lazy sequence from a file?
02:24ChongLihow does that deal with closing the file handle?
02:25RaynesIt doesn't.
02:25Raynes(with-open [reader (clojure.java.io/reader (clojure.java.io/file "foo"))] (line-seq reader))
02:25ChongLiah ok, that's what I figured
02:26RaynesThat is lazy though so you have to do all of your work and realize the seq inside of the scope of with-open, otherwise you'll be doing the reading after the file is closed.
02:26ChongLiit does have the benefit of you only needing to realize the lines you need for your work though
02:41sirvalianceOk, I am back again out of frustration. How in the world do you delete/remove a cookie within a handler with ring/compojure/noir ?
02:41sirvalianceIt should be stupidly easy.
02:41sirvalianceSet the headers
02:42sirvalianceI am using compojure and ring to store session data in a cookie. Logouts should delete that cookie. I cannot figure out how to delete that cookie
02:43sirvalianceI feel dumb. Mind you, I have plenty of wine in my system right now.
02:43sirvalianceBut I have scoured the ring/compojure/noir api docs to no avail
04:46meegoflHi, need little help with changing a value in a bit complex set
04:46meegofli defined this : (def tbl (ref {:key1 [1 2] :key2 [3 4]}))
04:46meegofland i want to change the value first item in tbl :key1
04:47meegoflshould be somthing like: (dosync (alter (tbl :key1) assoc 0 9))
04:47meegoflbut it throws error: ClassCastException clojure.lang.PersistentVector cannot be cast to clojure.lang.Ref clojure.core/alter (core.clj:2190)
05:18borkdudemeegofl (dosync (alter tbl assoc-in [:key1 0] 9))
05:30meegoflborkdude: Thanks!
05:30borkdudemeegofl np. any reason why you're not using an atom?
05:30borkdudemeegofl refs are for when you need coördination
05:35meegoflborkdude: Thanks, that seems useful but doesn't recall it was mentioned in our lectures...
05:35borkdudemeegofl what lectures?
05:36meegoflborkdude: i'm doing a project as part of functional programming course
05:36borkdudemeegofl I use Clojure in education, so it's interesting to see how others do it
05:36borkdudemeegofl is there a link or smth to the course website?
05:38meegoflborkdude: it's in highlearn system but i may send you the ppt's it about 5MB
05:38borkdudemeegofl cool. michielborkent@gmail.com
05:45meegoflborkdude: Sent
05:47borkdudemeegofl tnx :)
05:50borkdudemeegofl are you in Israel?
05:50meegoflborkdude: yep
05:54borkdudemeegofl nice slides, tnx
05:54borkdudemeegofl do you also have exercises etc
05:56meegoflborkdude: There are some example files with simple clojure code and there is no exercises
05:56meegoflborkdude: there is no exam also just one project instead
05:56borkdudemeegofl interesting. what kind of project, a web app
05:56borkdude?
05:57meegoflborkdude: Basically you can choose from some ideas (in lecture 3 i think) and suggest your own
05:57meegoflborkdude: most students (as us) choose to implement simple database (kinda of SQL)
05:58borkdudemeegofl ah ok. it's nice to see the adoption of clojure in education here and there
05:59meegoflborkdude: It's actually a nice language with some strong features but haven't seen or heard of it anywhere until University...
06:01borkdudemeegofl it's a relatively young language
06:01borkdudemeegofl in the form of one of the oldest languages (lisp)
06:46pepijndevosThe syntax for defmulti has changed. Example: (defmulti name dispatch-fn :default dispatch-value)
06:47pepijndevosBut the online docs say (defmulti name docstring? attr-map? dispatch-fn & options)
06:48pepijndevosas does my repl
06:53pepijndevosI have no idea what dispatch-values is, and where I'm supposed to put the argument vector, if at all.
07:10clojure-newbhey guys.. I'm stuck trying to use assoc-in or update-in to turn '{:k1 "stuff" :k2 ["1" "2"]}' into '{:k1 "stuff" :k2 ["1" "2" "3"]}' is that the way I should be looking to do it ?
07:10xbatwhat should i use for complex number maths, please? there used to be something in contrib, but i can't see what replaced it...
07:17xbatwell, seems i'm going to have to implement them myself
07:17xbatis http://stackoverflow.com/questions/11824815/fast-complex-number-arithmetic-in-clojure
07:17xbatstill a good way to go?
07:17xbat(i only need very basic arithmetic, just surprised it hasn't been done yet)
07:28meegoflHey, i've got a wierd problem
07:28meegoflhttp://pastebin.com/XT7TDr1S
07:29meegofli'm going to a table using a key twice each time key from different value
07:29meegofli compare the keys and they are the same but once i get the right value and once i get nil
07:29meegoflCan anyone please take a look? Thanks...
07:32ambrosebs&(+ 1)
07:32lazybot⇒ 1
07:32ambrosebs&(-> '{:k1 "stuff" :k2 ["1" "2"]} (update-in [:k2] conj "3"))
07:32lazybot⇒ {:k1 "stuff", :k2 ["1" "2" "3"]}
07:32ambrosebsclojure-newb: ^^
07:33clojure-newbambrosebs: thx
07:33clojure-newbdamn, easy as that :-)
07:33ambrosebsBut only conj onto a vector(!)
07:33clojure-newbok thx for the heads up
07:34ambrosebsnp
08:25h455m0hi
08:33mindbender1what is the cost of this pattern, how does it really work? (defn foo [-fn] (fn [baz] (-fn baz)))
08:35mindbender1I know it's based on closures< first class fns, and higher order logic concepts
08:36jjidomindbender1: what does it do?
08:36mindbender1but how can one know when to use it
08:38mindbender1jjido: it takes a fn and return a fn
08:38jjidoit is compose isn't it?
08:40mindbender1I'm not sure if to call it that
08:43mindbender1jjido: ((fn [x] x) ((fn [y] y) 2)) I would hope this is composition
08:51johnmn3g'day
08:51h455m0good day sir
08:52johnmn3I'm just starting out with clojurescript. I'm familiar with java interop, but just now trying to figure out how to do javascript interop
08:52h455m0my head hurts ... why is it, that, to understand recursion, one has to first understand recursion?
08:53johnmn3Like here: http://closure-library.googlecode.com/svn/docs/class_goog_math_Integer.html, How do I do toString on a number?
08:53johnmn3I'd think (.toString 123)
08:53h455m0would make sense to me
08:53johnmn3oh
08:53johnmn3I'd think (.toString 123 2)
08:53johnmn3wait
08:54johnmn3no
08:54h455m0why the 2?
08:54johnmn3the radix
08:54johnmn3toString(opt_radix) ? string
08:56h455m0hm ... i have no diea
08:58johnmn3do i have to require goog.math.Integer first?
09:13kmicujohnmn3: (.toString (js/Number. 123) 2)
09:14meegoflHow do i add values (keys vals) to (def tbl (ref array-map))?
09:14meegoflone at a time
09:16kmicuor (map #(.toString %) (take 5 (range)))
09:17kmicuone at a time?
09:34h455m0kmicu: not sure what you are trying to do?
09:34kmiculol ;)
09:36kmicumeegofl: sth wrong with (dosync (alter tbl conj [k v]))?
09:39pepijndevosHow can I best create a SQL table with korma/clojure/jdbc?
09:40hcumberd`pepijndevos: ddl?
09:40pepijndevoshcumberd`: ?
09:41pepijndevosah
09:41hcumberd`pepijndevos: there are clojure wrapper, but the most simple way is just to create them by plain ddl
09:42hcumberd`data definition language
09:42hcumberd`create table,...
09:54johnmn3kmicu: thanks
09:55johnmn3kmicu: how would I go about change 123 into base 2?
09:55johnmn3with java I would use: (defn to2 [n] (Integer/toString n 2))
09:56johnmn3and google closure has: toString(opt_radix)
09:57johnmn3oh, js/Number did that
09:57johnmn3my bad
09:57johnmn3problemo, elsolvedo
09:57johnmn3but I'd still like to know how to drop into google-closure interop
10:01kmicugoogle-closure-library?
10:02kmicuImport some goog.x namespace and use regular js interop.
10:02johnmn3ok, will try
10:03johnmn3been trying but I'm just doing something wrong
10:03johnmn3no worries, I'll figure it out. I think you gave me the right hints.
10:05kmicujohnmn3: https://github.com/levand/domina/blob/master/src/cljs/domina/events.cljs
10:05kmicuHere you have a real example about GClosure Library interop...
10:06johnmn3much obliged
10:14clojure-newbhey guys, I'm having trouble getting distinct items out of a sequence of vectors as described in : https://www.refheap.com/paste/11746, can anyone help ?
10:17johnmn3how do you require a library in clojurescript outside of an ns form?
10:18pepijndevosjohnmn3: I thin the NS form generates some closure compiler directives. so… I think you just don't
10:18kmicuIn REPL or in a cljs file?
10:18johnmn3in the repl
10:18johnmn3okay
10:19kmicuNamespace must be defined before loaded in repl x]
10:20johnmn3okay
10:20kmicuIt's not nice, but in-ns form can't crate new namespace.
10:20johnmn3(goog.string/parseInt "10010001" 2) does not return what I expect
10:21johnmn3In java: (Integer/parseInt "10010001" 2) => 145
10:22johnmn3goog.string/parseInt returns "10010001"
10:22johnmn3or 10010001, rather
10:22abp,(distinct (concat [1] [1 2 3]))
10:22clojurebot(1 2 3)
10:22abpclojure-newb: ^
10:23johnmn3looks like maybe base conversion from javascript is hard
10:23johnmn3from 2 in javascript, I mean
10:24kmicujohnmn3: this is only parsing function
10:25kmicuDo you want convert to another base?
10:25johnmn3from 2 to 10
10:27kmicujohnmn3: "This is a wrapper for the built-in parseInt function that will only parse numbers as base 10 or base 16"
10:27johnmn3then it says: See https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseInt
10:28johnmn3The following examples all return 15:
10:28johnmn3parseInt("1111", 2);
10:28johnmn3but it doesn't work
10:29johnmn3at least, goog.string/parseInt doesnt
10:29meegoflif i have an array-map, how can i get the key of a value i have from that map?
10:32johnmn3ahah! (js/parseInt "10010001" 2)
10:32johnmn3kmicu: ^
10:32johnmn3your hints led me in the right direction, thanks.
10:33kmicuForgot about global space... ;)
10:47kmicuclojure-newb: Why do you want to switch from maps to vectors?
10:47clojure-newbkmicu: because I'm reading the data in from separated value file info vector and want to perform this step before I process any further
10:48clojure-newb*into
10:50kmicuAnd order of elements is important? You want to have new get-distinct-items?
10:51clojure-newbkmicu: yes it is important that I group on the correct element (nth 1) and that (nth 2) tells me how complete the item it
10:52kmicuOrder is not needed to group by correct element ;)
10:53clojure-newboh right…. I think you mean do I want the result in the same order ?
10:53clojure-newbin that case yes
10:53clojure-newbsorry… had trouble with understanding that
10:55hyPiRiongfredericks: sweet!
11:05gfrederickswhy would (Foo. ...) succeed when (map->Foo {...}) throws a "Can't remove struct key" exception?
11:07gfredericksapparently because the argument is a PersistentStructMap o_O
11:09gfredericksoh that must be what enlive uses
11:09gfredericksyay enlive
11:11clojure-newbhmm, confused… some progress getting distinct on values as at : https://www.refheap.com/paste/11748, but I am getting mysterious (at least to me) answers
11:12clojure-newbsorry, that link should have been : https://www.refheap.com/paste/11749
11:14gfredericksmuch nicer :)
11:15clojure-newboh.. typo.. forget it, I'm an idiot :-(
11:17yogthosRaynes: hey you around? :)
11:24gfredericksis it a bug for data.xml to emit content with emit-str but write nothing with emit?
11:25gfredericksI must be crazy because emit-str just uses the string-writer
11:50frozenlockWhat would be the best way to trigger an event when a java object changes?
11:55tgoossensfrozenlock: any object? or an object that you are going to design yourself (in which case you could use subscriber / observer pattern)
11:55frozenlockAny object
11:55tgoossensok
11:56AndChat-8064hi, guys, how to debug with nrepl? I tried ritz, but it's not quite satisfactory. For example, when I enabled nrepl-break-on-exception, I cannot disable it and it continues to pop up annoying stack traces for unrelevant exceptions. Also, it looks like the ac-nrepl is incompatible with ritz as it hangs mysteriously.
11:57AndChat-8064I just need a debugger with breakpoint and capability to examine current context.
11:57tgoossensfrozenlock: a tedious way of doing this (in java) is mocking it, another even more tedious way is editing to bytecode engineer it with asm
11:58frozenlockewww
11:58tgoossens:p
11:58tgoossensand with mock i mean
11:59dcolishI was hoping someone has insight on how I can resolve this error: https://gist.github.com/dcolish/5024561. I am just getting into clojure and I wanted to try something similar to haskell's `fn $ flip`.
11:59frozenlockI take that's not a usual need... perhaps I should try to find another way of doing things.
11:59tgoossenswhat is it exactly you want to achieve?
11:59tgoossensif the object changes internally
11:59tgoossenscaused by external (method call), internal , or both effects
12:00da-ztgoossens: can one periodically check the hash code of an object and compare it with a previous value ?
12:00tgoossenshmm
12:00tgoossensthat's not so such a bad idea
12:00tgoossensbut
12:01tgoossensthen you cannot be sure that you are notified for every change
12:01frozenlockIt's a change caused by an event on the network.
12:01alandipertdcolish: unfortunately you can't apply constructors like you do on line 10
12:01dcolishah that is a shame
12:01tgoossensmaybe you should track those events ?
12:02frozenlockbleh.. the point of using the java library was to avoid dealing with this messy stuff :P
12:02tgoossenshehe
12:03tgoossensjust asking, have you tried mockito already?
12:04frozenlockI did not
12:04tgoossensok
12:04tgoossensbecause with that, you might be able to do it :p
12:04tgoossensits a bit tedious so you might want to look for something different
12:05tgoossensthe idea of hashcodes is not such a bad idea, maybe you can dig in on that a bit
12:05tgoossensor
12:06tgoossensmaybe you can use reflection
12:06dcolishalandipert: Its interesting that when I bring the BufferedReader ctor to a higher scope I can use it in composition https://gist.github.com/dcolish/5024597
12:07frozenlockReally not worth the trouble. If I can't find an easy way, I'll just wing it. I must keep myself from adding too much code :)
12:07alandipertdcolish: yup! nothing stopping you from making an anonymous function around it at the lower scope either
12:07frozenlockI am however looking into the mockito wrappers.
12:07tgoossensi have another idea
12:08dcolishalandipert: actually I tried that and it didnt work
12:08frozenlockDo tell.
12:08alandipertdcolish: e.g. (apply #(BufferedReader. % 10240))
12:08dcolishhmm
12:08alandipertdcolish: well, no need for apply there even
12:08tgoossensfrozenlock: if you are looking at mockite: then "mock(ClassName.class, new Answer(){ // this is what you can use } ")
12:08dcolishok so i need a reader macro
12:08tgoossensin answer you get all the information about
12:08tgoossenswhat method was called
12:08tgoossenswhat arguments it has
12:09tgoossensand what the original method was (which you can still invoke if you like)
12:09tgoossensabout my other idea
12:09tgoossensI remember working on a small project
12:09arkh,(map (fn [x] (concat x '(3 4))) '(1 2))
12:09clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>
12:09tgoossenswhere I needed to be notified if some operation happened (like addition, array add ,..)
12:10tgoossensA idea we came up with was
12:10tgoossensthe idea of breakpoints
12:10tgoossensgoogling with this information
12:10tgoossenshttp://stackoverflow.com/questions/1709929/is-there-a-way-in-the-eclipse-debugger-to-be-notified-when-the-state-of-a-java-o
12:10tgoossensthis might just help you
12:10tgoossens(but its not going to be easy :p )
12:10frozenlockLooking now, thanks!
12:11arkhI'm sorry for the silly question but can anybody tell me why my previous map statement doesn't work?
12:11tgoossensif eclipse can do it
12:11tgoossensthen you can
12:11tgoossensbecause eclipse is written in java
12:12da-ztgoossens: problem is, eclipse runs a debugger in that case
12:12tgoossensda-z: hmmyes, in my project that was not an issue but in this case
12:13tgoossensyou probably want to say like
12:13dcolishif I crash the clojure compiler, is that considered a bug I should report or does it depend?
12:13tgoossensnotifyme(somerandomexistingobject)
12:14tgoossensbleh
12:16dcolishwell regardless, it seems that anonymous fn is dropping the BufferedReader type for sample$eval8$stream__9, even with hinting
12:17arkh,(map #(concat % '(3 4)) '(1 2))
12:17clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>
12:17arkh^ ?
12:26arkh,(concat (first {:a 1 :b 2}) (second {:a 1 :b 2}))
12:26clojurebot(:a 1 :b 2)
12:26arkh,(map #(vector (first %) (second %)) {:a 1 :b 2 :c 3})
12:26clojurebot([:a 1] [:c 3] [:b 2])
12:26arkh,(map #(concat (first %) (second %)) {:a 1 :b 2 :c 3})
12:27clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword>
12:27arkhugh - that's so dumb. I wish I knew what I was missing
12:28gfredericksarkh: your first bit of code ends up calling ##(concat 1 '(3 4))
12:28lazybotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long
12:29gfredericksit's not clear what you're trying to do
12:31arkhgfredericks: it's been a while since I've used clojure - what I'm trying to do is use a map with a function I've defined previously but it gives the error: ArityException Wrong number of args (0) passed to: core$seq clojure.lang.AFn.throwArity (AFn.java:437)
12:32arkhin this instance and in the ones above it seems like I can successfully use maps only sometimes
12:33arkh'concat' was a placeholder function I was trying to demonstrate with
12:33gfredericksif you use the function map with a map as the second argument, then the map is viewed as a sequence of key-value pairs
12:33gfredericks,(seq {:a 1 :b 2 :c 3})
12:33clojurebot([:a 1] [:c 3] [:b 2])
12:34arkh,(let [f (fn [x] (concat x 1))] (map f '(a b c)))
12:35clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol>
12:35arkhwhy would the above fail?
12:35gfrederickswell for one you're passing 1 to concat
12:35gfredericksconcat takes sequences and concatenates them
12:35gfredericks1 is not a sequence
12:35arkhsorry
12:35arkh,(let [f (fn [x] (concat x '(1)))] (map f '(a b c)))
12:35clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol>
12:36gfredericksnow (and before) you're passing 'a to concat
12:36gfrederickswhich is also not a sequence
12:36arkhI thought I was passing a length 1 list
12:36gfredericksthe second argument '(1) is a length one list
12:36gfredericksthe first argument is 'a which is a symbol
12:37arkhoh ...
12:37arkh,(let [f (fn [x] (concat (seq x) '(1)))] (map f '(a b c)))
12:37clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol>
12:38gfredericksyou want it to be a single element list?
12:38gfrederickslike '(a)?
12:38arkhyes
12:38gfredericksuse list instead of seq there
12:38arkhahhh .. that works
12:39arkhgfredericks: thank you so much
12:39pellishi guys. i'm looking for interesting pragmatic things to study within clojure. I've played with compojure and lein, but now looking for more. (emphasis - non theoretical lispy stuff)
12:39marcellus1pellis: incanter?
12:40pellismarcellus1: I'm not that academic either to go with R/incanter, unfortunately... but do go on
12:40marcellus1pellis: clj-webdriver is fun
12:41arcatanovertone can be fun if you're into that kind of stuff
12:41pellisyup, looks nice. how about processing for clojure? i understand processing always gets a port to a language and it's interesting to see how more readable it is than the original Java impl.
12:44da-zanyone familiar with laser templates to give me a hand ?
12:46arcatanpellis: core.logic seems pretty cool to me, too, but i guess you might consider it pretty theoretical/academic
12:48pelliswell, not so much. I'm kinda looking for things I can explore, that I am already familiar with, and most of the stuff I'm familiar with comes from the Web in the form of Ruby, Node, Java, etc. It makes a good learning aid this way.
12:49pellisI started with compojure and ring to make a good comparison with sinatra and rack, which was an enjoyable project.
12:50pellisI tried finding some good image processing libraries unique to clojure out there, but it always ended up lacking and I was forced to shell to imagemagick
12:52xeqi~anyone
12: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 ..."
13:14pepijndevoscan korma handle timestamps? specifically, assert if a thing is between x and y
13:16sjlHow can I get a null byte char in clojure?
13:16sjl\0 is the number 0 (ascii 48)
13:17pepijndevosmaybe just (char 0)
13:18pepijndevosthere are several thing like \newline and such, but not \null apparently
13:18sjlah, yeah, that works
13:18sjlthanks
13:18pepijndevosI would have expected \null to work :(
13:19sjlyeah, same here
13:21TimMc,(int \)
13:21clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
13:23sjlYeah I noticed that null bytes print as a bare backslash at the repl
13:23sjl,(char 0)
13:23clojurebot\
13:23sjl,(char 13)
13:23clojurebot\return
13:24TimMcApparently my NUL character didn't make it all the way to clojurebot.
13:24sjloh nice, CR does have a literal even though it's not mentioned in the docs
13:24sjlwait what
13:25sjl,(prn-str (char 0))
13:25clojurebot"\\
13:25TimMc&(filter #(< 2 (->> % pr-str count)) (map char (range 0 256)))
13:25lazybot⇒ (\backspace \tab \newline \formfeed \return \space)
13:26sjl(char 0) is fine for me
13:26sjlfrom http://clojure.org/reader : Characters - preceded by a backslash: \c. \newline, \space and \tab yield the corresponding characters.
13:42yedican someone help me out with this: https://gist.github.com/yedi/5024984
13:43yedii try to create a partial map function and thread a list of maps through it, am i doing it incorrectly
13:47rlanderHas anyone used Clojurescript with a language other than Clojure on the backend?
13:49rlanderI'm about to rewrite the frontend of an app, a mess of jQuery spaghetti. I want to use Clojurescript, but I won't be able to touch the backend. So I was wondering whether there's any advantage in Clojurescript without a Clojure backend.
13:50pellisquestion about performance against scala or jruby - why is clojure so fast? given that it is as dynamic as jruby?
13:52alandipertrlander: i have, and i vote go for it
13:53pepijndevosCan I make an INSERT … SELECT with korma?
13:53rlanderalandipert: Cool! How'd you structure the project?
13:53rlanderalandipert: I mean, did you develop the clojurescript front end as a separate project from the backend?
13:54alandipertrlander: yes it's a standalone lein project using lein-cljsbuild that speaks to a PHP backend
13:56alandipertpellis: for numeric performance, primarily because it doesn't automatically box numbers, thus unlocking a higher degree of JVM optimization
13:57pellisalandipert: i see, how about working with strings?
13:57alandipertpellis: scala numerics fast compared to jruby for same reason afaik
13:57alandipertpellis: yes another aspect of interop/perf is that clj strings are jvm strings without decoration
13:58alandipertpellis: (err, java.lang.String strings)
13:58pellisaha. thats interesting
13:58rlanderalandipert: so, just to be clear, the php backend speaks rest and sends no html, correct?
13:58alandipertrlander: that is correct, JSON
13:58pellisim guessing jruby is RString
13:58rlanderalandipert: Thanks. I was looking for some kind of validation that this is not a crazy proposition, and now I have it.
13:58alandipertrlander: we actually have an RPC layer called wigwam that does things like preserve/bubble exceptions
13:59alandipertrlander: https://github.com/tailrecursion/wigwam
13:59alandipertrlander: specifically https://github.com/tailrecursion/wigwam#the-rest-of-wigwam but those ideas port to other server-sides, which we are working on
14:01rlanderalandipert: wigwam looks a bit like webmachine (which is what I have on the backend). Thanks for the links.
14:01alandipertrlander: sure, happy computing!
14:07wei_what set of libraries do you use these days to replace webnoir?
14:09yediis there any scenario where binding a partial fn to a var and using that var would be different than just using the partial-fn without it being defined?
14:09yedithis threading example seems to show some random discrepency: https://gist.github.com/yedi/5024984
14:13wei_this post answered my question: http://yogthos.net/blog/33
14:13alandipertyedi: that partial is evaluated after -> does stuff
14:14wei_thanks for maintaining ilib-noir, yogthos
14:14alandipertyedi: so it's creating something like (partial <threaded value> map ...)
14:14yogthoswei_: no problem :)
14:14yediohhh
14:15yedialandipert: i think i understand now
14:15wei_the compojure-template task was key to getting started quickly
14:15yogthoswei_: I've been working on http://www.luminusweb.net/ lately
14:16yogthoswei_: it's got a lot more structured approach to making templates and I've been aggregating documentation there as well
14:17wei_cool, I'll check it out
14:17yogthoswei_: excellent, also any feedback and suggestions are appreciated :)
14:23arrdemTimMc: last night's bored hack is slowly evolving into an arithmatic type system implementation. what have you done to me?
14:45TimMchaha
14:45TimMc*muahaha
14:46TimMcMake sure to check out the other Clojure type systems before you get too far into your own.
15:00arrdemthe fun part is that if I can cleanly define the domain of a predicate as a set the entire set-relational type system I'm creating here falls into place eligantly
15:00arrdemfeels a lot like what I've read about Haskell's type system.
15:28JoshIncanybody here implement Business intelligence; analysis, graphs, dashboards and reports provide important mechanisms for performance evaluation and exploitation of information?
15:29JoshIncabout daily data captured from municipal systems (Accounting, Tax, Education, Health, etc.). After the data is validated and processed, we need to exploit them, or transform a mountain of data into useful information that can assist the government in its day-to-day.
15:32wei_using compojure, where's the best place to put the one-time database connection code?
15:32arrdemwei_: typically you will have it in server.clj as part of your init setup
15:34arrdemTimMc: so why isn't this sort of thing in clojure.core? it seems dead easy now that I'm trying to do it.
15:35clojure-newbhi… where can I find dissoc-in for clojure 1.4 ? surprised to not find it :-)
15:38arrdemclojure-newb: http://stackoverflow.com/questions/14488150/how-to-write-a-dissoc-in-command-for-clojure
15:38clojure-newbarrdem: oh… core.incubator, coming in 1.5 ?
15:40arrdemclojure-newb: I would just use the dissoc-in defined there since it isn't in core yet.
15:40arrdemthrow it in an "msc.clj" file and :require it in where you need it.
15:40clojure-newbarrdem: thx for heads up
15:41arrdemclojure-newb: well.. it looks like you could just add core.incubator to your project dependancies and use it that way..
15:42arrdemI'd suggest that approach.
15:42clojure-newbyeah, I'd rather
15:42arrdemtechnomancy or someone, is core.incubator dead?
15:45TimMcarrdem: Why not in core? Well, probably for philosophical reasons.
15:45TimMcBesides the desire to keep clojure.core small, Rich probably wouldn't like the pseudotypes stuff.
15:47gilliesis there an easy way to write json (mocks for testing) instead of doing "{\"foo\":\"bar\"}"
15:47gilliesi was thinking maybe a json writing macro, but not sure if thats the way to go
15:48TimMcA macro would be bad.
15:48TimMcCheshire is a god lib for generating JSON.
15:49alandipertmaybe a tagged literal?
15:49gilliesi want to actually write it by hand though in this example
15:49gilliesnot just generate it from clojure data structures
15:49TimMcThat seems counter to your original question.
15:50gilliesit counters the macro suggestion
15:50gilliesbut i explicitly said i wasn't sure thats what i wanted
15:51gilliesthe actual problem is that when i parse json it converts the key data to strings not keywords
15:51gilliesi bet theres an option in chesire i can set to change that though
15:54gilliesaaah
15:54gilliesin README theres an example
15:54gilliesderp
16:06ravsterhello all
16:10tgoossensAny ideas for a clojure meetup. I'm organising one in belgium (for the first time). I think that an introductory session to the basics is already a good starting point
16:12S11001001tgoossens: depends on your clojurian/non-clojurian ratio
16:12tgoossensreading the reactions
16:13tgoossensi have the impression that there will be mainly people interested in clojure but not really active in clojure
16:13tgoossensso i guess
16:13tgoossensthat they expect something to tell them "what clojure could mean to them"
16:13TimMctgoossens: Get Sam Aaron to do an Overtone talk, that'll do it.
16:14tgoossenstimmc: unfortunately he lives in the uk :)
16:16TimMcClose enough.
16:16arrdemtgoossens: live webcast?
16:17arrdemtelepresent presentations are possible after all..
16:17tgoossensarrdem: that maybe something to consider. Strange I did not think of that ...
16:17arrdemtgoossens: just eliminates a lot of hassle with travel and soforth.
16:20arrdemin retrospect whitespace-mode is a bad idea.. my indentation OCD only gets worse...
16:27gillies&(#=)
16:27lazybotjava.lang.IllegalStateException: clojure.lang.LispReader$ReaderException: EvalReader not allowed when *read-eval* is false.
16:27gillies&(doc #=)
16:27lazybotjava.lang.IllegalStateException: clojure.lang.LispReader$ReaderException: EvalReader not allowed when *read-eval* is false.
16:28arrdem,(doc =)
16:28clojurebot"([x] [x y] [x y & more]); Equality. Returns true if x equals y, false if not. Same as Java x.equals(y) except it also works for nil, and compares numbers and collections in a type-independent manner. Clojure's immutable data structures define equals() (and thus =) as a value, not an identity, comparison."
16:28gillieswhats the diff between #= and =?
16:29tgoossensarrdem: a screencast might be something interesting for later iterations of the meetup. But a bit risky for the first iteration I believe :)
16:30arrdem,(doc =?)
16:30clojurebotExcuse me?
16:30arrdemtgoossens: depends on who your speaker is.
16:30arrdemI agree that in-person would be preferred, but if you get someone awesome a live remote presentation could be OK
16:31tgoossensi'll be sure to discuss it with my co-organisators ;-)
16:42muhoo,(map (juxt type identity) (let [x 1] `[~x x 'x '~x ~'x]))
16:42clojurebot([java.lang.Long 1] [clojure.lang.Symbol sandbox/x] [clojure.lang.Cons (quote sandbox/x)] [clojure.lang.Cons (quote 1)] [clojure.lang.Symbol x])
16:42muhoook, why Cons?
16:45arrdemwhat the...
16:46arrdemmuhoo: oh.. the pair (quote 1) is a cons list
16:46muhooOIC, it's an expression (quote 1), and i guess that's a cons cell, really, a list of 2 items.
16:47muhoointerestingly my repl prints it as '1 not (quote 1), so it was a mystery
16:50TimMcgillies: #= is special reader syntax that you shouldn't use. = is just a function.
16:51TimMcOr rather, clojure.core/= is a var that contains the equality function.
16:51gilliesTimMc: i had to use it when i was doing a case statement
16:51TimMcInteresting usage.
16:51TimMcWhat did you have to create?
16:52gillies(case (class {:foo "bar"}) #=clojure.lang.PersistentArrayMap "blah" )
16:52gilliesjust using class name won't work
16:52alex_baranoskyhas anyone come up with a script to harness Emacs for reformat Clojure files?
16:53TimMcgillies: Ah, classes. You are aware that maps won't always have the same class?
16:53gilliesfml
16:53gilliesheh
16:54TimMcYou may not want case.
16:54arrdemalex_baranosky: http://stackoverflow.com/questions/11423566/how-do-i-intelligently-re-indent-clojure-in-emacs
16:54arrdem~google
16:54clojurebotGabh mo leithscéal?
16:54arrdemdamnit.
16:54clojurebotHuh?
16:54gillies~wtf
16:54clojurebotHuh?
16:54metellus~google
16:54clojurebotexcusez-moi
16:54arrdem~gourds
16:54clojurebotSQUEEZE HIM!
16:55alex_baranoskyarrdem: what I want is a way to harness Emacs from a script
16:55gilliesheh
16:55alex_baranoskyand reformat a list of file by name
16:57arrdemalex_baranosky: your best bet is probably an emacs lisp script to open buffers, envoke the reformat functions and then flush them.
16:57alex_baranoskyis there any easy way to call Emacs functions from the command line?
16:57arrdemno.
16:57alex_baranoskylame
16:57joegalloalex_baranosky: --batch
16:58arrdemokay fine emacs -f <code>
16:58joegallowhich is to say, yes.
16:58alex_baranoskyjoegallo: nice. thanks, investigating
16:58arrdemjoegallo: why would you ever want --eval, -f, or --batch?
16:58alex_baranoskybasically I have script that gives me all the changed files on a feature branch. BEofre pulling into master I want to reformat them using Emacs.
16:58arrdemjust seems like a terrible idea.
16:59joegalloarrdem: i have a powerful elisp interpreter right here -- why shouldn't i use it for interpreting elisp?
16:59joegalloalex_baranosky: consider http://www.gnu.org/software/emacs/manual/html_node/elisp/Batch-Mode.html an interesting starting point
17:01joegallofwiw, the use i've seen is somewhat similar to your use case alex_baranosky, as a pre-commit hook to make sure clojure code is formatted per clojure-mode
17:03alex_baranoskyjoegallo: yeah that's essentially what we're going for. I am making a script that takes all changed files on a feature brach, slam hounds them, reformats them and then checks them with kinit and eastwood. Then we run that before pulling into master, so we don't have to waste time on fiddling with namespaces and formatting while doing development
17:03alex_baranoskykibit*
17:04joegallogodspeed, if it works out well, that's probably something worth writing a blog post about ;)
17:05alex_baranoskyjoegallo: good idea about the blog post
17:05ryanfwow, clojure's built-in map is surprisingly complicated
17:11meegoflHi
17:11meegoflI need help with annoying weird problem
17:11meegoflhttp://pastebin.com/pXtAUVzj
17:12meegoflin SelectFromTable i call a function ListRecordsMatchConditions
17:12meegofli print the return value in the ListRecordsMatchConditions and get proper result
17:12meegoflbut the print on the calling function is nil
17:17frenchypmeegofl: could it be that you are printing the returned-value from (when setOperation ..) and that it is nil?
17:19meegoflfrenchyp: hmm... got a point
17:20meegoflfrenchyp: checking this now, 10x!
17:20frenchypif you are expecting to return tempList, you are going to need to re-design this function
17:20frenchypcool
17:22frenchypalso, I don't think you need the nil on line 25, you can just remove it
17:28alex_baranoskyjoegallo: I got it to work actually, except for one issue, the reformatting is messing up the code. I owner if I need to manually switch to clojure-mode for .clj files so it will format correctly
17:37joegalloodd -- have you tried explicitly requiring clojure-mode?
17:38joegalloi dunno how ours does it, it's just always worked... i didn't write it
17:43alex_baranoskyjoegallo: if I explicitly call (lisp-mode) I get a much better formatting(but still wrong of course). With that as my proof of concept I tried to call (clojure-mode) but for this I get this error: "Symbol's function definition is void: clojure-mode"
17:47alex_baranoskythis is what I have so far: https://www.refheap.com/paste/11765
17:51Raynesalex_baranosky: There is a Bash language setting.
17:51Raynes:p
17:51alex_baranosky:P
17:52alex_baranoskyRaynes: I am mere inches from getting this to work
17:56alandipertalex_baranosky: have you considered writing in clojure and using pprint/code-dispatch?
17:56alandiperti've never used code-dispatch myself though so i don't know how it compares to clojure-mode
17:57meegoflhow can i perform compare like < > on 2 strings?
17:57alex_baranoskyalandipert: I haven't even thought of the idea until you mentioned it
17:57meegofllike (> "c" "b")
17:57alex_baranoskyI'm also not sure how print will compare to clojure-mode
17:59RaynesWell...
17:59RaynesYou can get the integer representation of characters by doing ##(int \c)
17:59lazybot⇒ 99
17:59RaynesSo I imagine you could compare those integers.
18:00metellus,(compare "c" "b")
18:00clojurebot1
18:00metellusis that what you want?
18:00RaynesI assumed he actually wanted < and >.
18:02meegoflRaynes: 10x but is there a way (maybe import from java / clojure.string) to do it on strings?
18:03Raynescompare
18:03RaynesWhat metellus just did is what you want.
18:03Raynes&(compare "a" "b")
18:03lazybot⇒ -1
18:03Raynes&(compare "b" "b")
18:03lazybot⇒ 0
18:03Raynes&(compare "b" "a")
18:03lazybot⇒ 1
18:04meegoflRaynes: got it! 10x!
18:04RaynesNegative number = less than, 0 = equal to, positive number = greater than.
18:12teromHmm, I'm trying to override a method with proxy. This method gets called in the base class constructor. It seems that the base class constructor calls the base class method, not the method defined in proxy. Is this a limitation of proxy or a bug?
18:18Natchanyone on OSX that could tell me the result of (subs (System/getProperty "os.name") 0 3) ?
18:18ibdknox"Mac"
18:19Natchibdknox: thank you
18:22TimMcI just wrote a little library function to do paging calculations: https://www.refheap.com/paste/11770 (given a total and current page, tell you whether there's a next page, what the last page index is, etc.)
18:22TimMcAre there any other properties it should compute?
18:36joegalloalex_baranosky: i think you need to (require 'clojure-mode)
18:36joegallootherwise it wouldn't be defined...
18:37RaynesTimMc: That seems large for paging calculations.
18:54johnmn3feb 20th New York CLUG:
18:54johnmn3David Bergman will demo his ClojureScript wrapper for the cross-target mobile platform Titanium, which allows developers to write native mobile apps for iPhone, Android, Blackberry in Clojure.
18:54johnmn3where can I get to that wrapper?
19:09devthis there a function that wraps another fn foo, making "foo" behave as identity?
19:10devthreasoning: run foo for its side-effects (e.g. swap!) but still make it useful for (comp bar foo)
19:22TimMcRaynes: It's intended to support a paging widget on a web page.
19:32teromI made a gist of my problem with proxy: https://gist.github.com/tmatinla/5026427 - from the doc for proxy ("creates a instance of a proxy class") I would think that the overridden method would be taken into account in constructor, but it is not...
19:36alandipertterom: does it in java?
19:36alandipertterom: i vaguely remember seeing that somewhere as a java no-no
19:36alandipertterom: calling overridable methods in a constructor, that is
19:37teromalandipert: it does, see the gist
19:40teromalandipert: yeah, it's probably bad practice, in my case it's some library code (Apache HttpClient to be specific) that needs to be overridden to plugin some special behaviour
19:41teromI would have hoped not to write Java code for that, but in this case it's not a big problem (or maybe I can use gen-class instead of proxy if that's not too tedious). I was just wondering if this behaviour with proxy is correct...
19:46qizwizconsider me a newbie to clojure (though I've played with other lisps). I'm going through 4clojure koans. On #19 (http://www.4clojure.com/problem/19#prob-title), the answer I came up with was #(first (reverse %))
19:47qizwizwith some help from stackoverflow. The question I have is what does '#(' mean?
19:47ryanfwhat's the best testing setup for clojure? lazytest?
19:47ryanfor does everyone just use clojure.test?
19:48ryanfI'm most interested in having the tests run automatically on file modification, and then I'm also kind of interested in bdd-style syntax if available
19:48qizwizI've searched sharp-paren, hash-paren, pound-paren.
19:48teromqizwiz: it's a shorthand for anonymous function
19:48qizwizah!
19:48qizwizthank you
19:49alandipertryanf: midje may float your boat, i think it does that stuff https://github.com/marick/Midje
19:50ryanfcool, thanks for the tip
19:50alandipertterom: you're at the point where i'd personally give up write java stub
19:51alandipert*and write
19:51qizwizand now i've found it here: http://clojure.org/reader
19:51qizwizthanks
19:51teromalandipert: yeah, that seems the easiest way
20:03Raynesryanf: https://github.com/Raynes/laser/blob/master/test/me/raynes/laser_test.clj is a simple midje example.
20:04ryanfcool, thanks. seems like pretty nice syntax
20:08arrdemwould anyone use static typechecking for pseudotypes? I'm just contemplating the evil I must commit to implement such checking and questioning its worth.
20:09Raynesryanf: My tests look a little funky because I'm testing higher order functions and thus have to call the functions that the functions return (and thus I end up with ((foo x) bar) => y in a lot of places).
20:29ryanfcan anyone think of a reason that I would sometimes get "CompilerException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Character" for this code:
20:29ryanfhttps://gist.github.com/rf-/76ff8e83d0038f42cb49
20:29ryanfoh never mind
20:29ryanfI am a huge idiot
20:35ZerkerI saw a comic once, which outlined the "Idiot test": a) Grab a coworker, b) explain to them what your code is doing, step by step, c) loudly proclaim "I'm an idiot!" and proceed to fix your program.
20:35ZerkerDon't worry, we've all been there :)
20:47RaynesWelp. Just released https://github.com/Raynes/laser 1.0.0
20:48TimMcschweet
20:48TimMcMaybe I'll try using it for my new gallery website.
20:48TimMcI've got it set up pretty nicely with Enlive right now.
20:48TimMcOh hey, thoughts on two different if-let+ macro implementations? https://www.refheap.com/paste/11773
20:49TimMcOne wraps the else-clause in a thunk and emits multiple calls for the multiple else locations, the other just spits out the else-expression in its entirety for each else clause.
20:49TimMc*else-expression in a thunk
20:59ryanfI feel like there must be a more idiomatic way of doing this?
20:59ryanf(assoc world :players (conj (world :players) player))
21:00warzwith ring, i have some middleware that checks for an access token header, and if it doesn't exist it returns an http error. right now, i wrap the entire handler with this middleware, so all requests are subject to those constraints.
21:01warzbut in reality id like this to be more opt-in on a per route handler basis
21:01warzis that possible? like wrap a single handler with a middleware?
21:01Raynesryanf: (update-in word [:players] conj player)
21:01Raynesryanf: Except I meant world, but you get the point.
21:01ryanfRaynes: !! thanks
21:01weavejesterwarz: Yes, that's the whole point of Compojure - it's handlers all the way down.
21:02TimMcRaynes: The examples in the Laser readme would probably benefit from a note about alternating selectors and transformers.
21:03RaynesTimMc: Pull request! :D
21:05TimMcmaaaybe
21:06TimMcOh, I can just edit right in the browser, yeah?
21:06RaynesYep.
21:06RaynesGithub <3
21:18RaynesTimMc: o/
21:19akhudekI'm running into some trouble with clojurescripts advanced compilation. There is a missing extern, but I'm having trouble tracking down what it is. Is there any trick to debugging these types of errors?
21:20RaynesYeah, source maps I think. Which we do not have.
21:20akhudek:-(
21:36TimMc"Merge made by octopus." fills my heart with glee.
21:36cliftonwatching a Guy Steele talk from 2009. Clojure's list type, by default, is a 64-ary tree?
21:36headshotclifton: url?
21:37cliftonhttp://vimeo.com/6624203
21:37cliftonhe only mentions clojure toward the very end
21:37TimMcclifton: Vectors are 32-way trees, but I think all lists are linked lists.
21:38cliftonyeah, i assumed all lists were linkedlists ala lisp
21:38cliftonand i know vectors are 32-ary trees currently, so i assume he was talking about vectors and not lists, but in the slide it does say list
21:42TimMcYou could do some archaeology in the Clojure source control. Maybe lists used to be implemented with trees.
21:43TimMcHowever, I'd think that lists have an implicit contract that if you don't hold onto the head, the head can be GC'd.
21:43TimMcI could be wrong, but I imagine any other behavior would surprise quite a few folks.
21:46cliftonwell, you're definitely right, that is a fundamental property of lists
21:46cliftongiven that calling last on a list is in linear time, ill just assume he was talking about vectors
21:46cliftonfast forward to 56m in the link
21:47cliftonmade me scratch my head
21:47TimMcCan't do videos at the moment.
21:51headshotclifton, thanks, looks like an intersting watch
21:52cliftonyeah it's a really fascinating talk, i had to pause a few of the slides to fully parse all the operations, but hey, that's the advantage of watching lectures online
21:52headshotyeah "pause" is invaluable
21:56Sgeo_What talk?
21:56ivan<clifton> http://vimeo.com/6624203
21:56cliftonption: EOF while reading>
21:56clifton17:51 < bendlas> ,(unchecked-multiply (Long. 0xcafebabe) 0xcafebabe)
21:56clifton17:51 < clojurebot> #<ArithmeticException java.lang.ArithmeticException: integer overflow>
21:56clifton17:52 < hiredman> bendlas: unchecked math only works on primitives
21:56clifton17:52 < bendlas> this is a bug, right?
21:56clifton17:52 < amalloy> ,(unchecked-multiply (unchecked-int 0xcafebabe) (unchecked-int 0xcafebabe))
21:56clifton17:52 < clojurebot> 790811295510209796
21:56clifton17:52 < bendlas> so unchecked multiply defaulting to checked multiply when faced with boxed values is a feature?
21:56clifton17:53 < TimMc> That's surprising and unexpected behavior.
21:56clifton17:53 < Frozenlock> Is there some css and compojure functions to pretty-print clojure code in a webpage? (with colors and all that sweet stuff)
21:56clifton17:54 < hiredman> bendlas: I doubt anyone has bothered to care because most people who want one want the other
21:56ivanclifton: might want to kill your client, could take a while to send all that
22:15headshothehe, i love his comment on Fortress
22:15cliftonwhich one?
22:16jcromartiewhy would I want to use clojure.data.xml over clojure.xml
22:16headshotabout heavy use of operator overloading, and hoping for tasteful use
22:17cliftonsome part of me wonders why his team wouldnt be better spent extending haskell
22:17jcromartie(for reading XML into a Clojure data structure)