#clojure logs

2012-04-18

00:13jonas11235guys, what is the right to way to execute a function asynchronously in clojure?
00:13jonas11235I don't have a state to use an agent
00:13jonas11235and I don't have a value to read back to use a future
00:13technomancyjonas11235: nothing wrong with a java.lang.Thread
00:14technomancy(.start (Thread. my-fn))
00:14technomancyfor fire-and-forget
00:16jonas11235technomancy: I thought that was some abstraction like (spawn fn), ok, I will use a thread (yes, I avoid them as maximum as I can)
00:16jonas11235technomancy: [as much as I can]
00:16technomancyjonas11235: you can use a thread pool if you need it to be bounded
00:16technomancyI don't know how off the top of my head; often it's easier to abuse futures unfortunately
00:17jonas11235technomancy: but if I don't deref the future, it will be executed?
00:17technomancyit will, yeah
00:17jonas11235technomancy: (future fn) nice :)
00:17technomancyactually it's a macro, so you need to call it: (future (my-fn))
00:18jonas11235technomancy: I don't want to mess with threads and thread pool
00:18jonas11235technomancy: ty :)
00:18technomancysure
00:20jedahuweird, simply requiring cljs.repl.rhino in the same file as cljs.repl.browser causes some rhino stuff to be run when (repl <browser-repl-env>) is called, needless to say, it breaks things
00:22ibdknoxnote to self: this kickstarter things is unbelievably stressful lol
00:22ibdknoxI'm not sure I'd do it again
00:23technomancyall you need to do is have fewer people interested in it; problem solved
00:23brehautibdknox: it was the php request that pushed it over the top right?
00:23ibdknoxlol
00:23ibdknoxI actually looked to see if there even was a php parser
00:23ibdknoxand there is!
00:23brehauthaha
00:23ibdknoxI was surprised
00:23brehautis it crazy making
00:24technomancythere are some things no amount of money should be able to buy
00:24ibdknoxhaha
00:24ibdknoxit's true
00:24brehautdamn right
00:24technomancylike ibdknox's dignity =)
00:24brehautvbscript support as well
00:24ibdknoxI shit you not
00:24ibdknoxI had someone email me about classic ASP support
00:25brehautat my old job i very nearly wrote a VBScript to JScript cross compiler
00:25technomancywell right now there's this schrodinger's cat effect; since it hasn't been observed, the waveform hasn't collapsed, and everyone's imagining that their favourite cat is alive and well inside light table.
00:26ibdknoxhaha
00:26brehautibdknox: brainfuck would be easy to support
00:26ibdknoxoh man
00:27ibdknoxI could totally do that one ;)
00:27brehautyes :)
00:27brehauteven just for fun
00:27brehauteaster egg styles
00:27ibdknoxsomeone suggested lol code
00:27technomancycome on man, I want Piet support
00:27brehauthaha if you go down the DMM route, we'll be here all day :P
00:27kovasbi would like to code in cellular automata rule 110
00:28kovasbshould be pretty easy to support
00:28ibdknoxI wrote Ook support for VS ;)
00:28technomancycan you support my hardware turing tape implementation that attaches over RS-232?
00:28brehautibdknox: thats awesome
00:28antares_is it a really bad idea to implement certain protocol functions for nil?
00:29ibdknoxtechnomancy: lol there were several request for VHDL
00:29brehautcrap, im far to close to diving down the irregular webcomic back catalog
00:29antares_I am facing a (Java interop) situation where I need to either extend some conversion protocols for nil, or write a macro that will eliminate repetitive nil checks
00:30brehauttechnomancy: this is all your fault!
00:30antares_ibdknox: is there a light table irc room? I have a question
00:30ibdknox#lighttable
00:31amalloyantares_: no, it's totally reasonable to extend protocols to nil
00:31antares_amalloy: aha. Thanks.
00:31amalloyfor example, in cljs where all the core interfaces are protocols, you see something like (extend-protocol Collection nil (conj [this x] (list x)))
00:34antares_amalloy: and in JVM Clojure this case is handled w/o protocols because conj is implemented in Java?
00:34amalloyyeah
00:35cmajor7what is a recommended way to work with byte buffers? I see: https://github.com/geoffsalmon/bytebuffer => is there anything in core that I missed?
00:35antares_cmajor7: there is https://github.com/ztellman/gloss and momentum has many useful bits, too (although not extracted into a separate lib)
00:37cmajor7antares_: cool. I see it also uses a ByteBuffer underneeth e.g. (let [~buf (ByteBuffer/allocate ~size)] …
00:43tolstoyDoing schema validation, and need to provide a Source[] parameter. Is there a way to convince java that an array is the appropriate type?
00:44amalloy&(into-array Number [1 4.5])
00:44lazybot⇒ #<Number[] [Ljava.lang.Number;@319df1>
00:46tolstoyAh! Thanks! Phew.
00:59brehautbah! stupid muttable django middlewares
00:59brehautmutable even
01:50laurusIs there an easy way to make, say, an Nx2 "matrix" of zeroes?
01:51raeklaurus: as a vector of vectors of numbers?
01:51laurusYes :)
01:52raekI'd use for and vec:
01:52raek&(vec (for [r (range 10)] (vec (for [c (range 2)] 0))9)
01:52lazybotjava.lang.RuntimeException: EOF while reading, starting at line 1
01:52raek&(vec (for [r (range 10)] (vec (for [c (range 2)] 0))))
01:52lazybot⇒ [[0 0] [0 0] [0 0] [0 0] [0 0] [0 0] [0 0] [0 0] [0 0] [0 0]]
01:53laurusraek, wow, that's really interesting.
01:53amalloy&(partition 2 (range 20)) ;; another option if you don't care about vectors
01:53lazybot⇒ ((0 1) (2 3) (4 5) (6 7) (8 9) (10 11) (12 13) (14 15) (16 17) (18 19))
01:54xeqi&(take 10 (constantly (range 2)))
01:54lazybotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.core$constantly$fn__3656
01:54bbloom&(map vec (partition 2 (range 20)))
01:54lazybot⇒ ([0 1] [2 3] [4 5] [6 7] [8 9] [10 11] [12 13] [14 15] [16 17] [18 19])
01:54bbloomif you do care about vectors :-)
01:54laurusWow, you are all so good!
01:54amalloy,*clojure-version*
01:54eggsby:)
01:54clojurebot{:interim true, :major 1, :minor 4, :incremental 0, :qualifier "master"}
01:54amalloy,(mapv vec (partition 2 (range 20)))
01:54clojurebot[[0 1] [2 3] [4 5] [6 7] [8 9] ...]
01:55ibdknoxcheater :p
01:55bbloom:-)
01:55amalloyi prefer golfer
01:55ibdknoxhaha
01:55laurusWhat if I want to make them all 0?
01:56amalloyhiredman: is clojurebot on a snapshot of 1.4? if so, any reason we can't update him to the release version?
01:56jkkramer,(vec (repeat 10 [0 0]))
01:56clojurebot[[0 0] [0 0] [0 0] [0 0] [0 0] ...]
01:57laurusThanks jkkramer.
01:59amalloy,(mapv vec (take 10 (partition 2 (range 2 0 0))) ;; ...
01:59clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
01:59amalloyinterestingly, if you give range a step of 0 it tries to count down instead of up, so you have to start at the higher number
02:02bbloomamalloy: wouldn't (range start stop 0) just be the same as (repeat start) ?
02:03amalloybbloom: yeah, it's obviously a bad implementation; i was trying to keep consistent with my partition/range as a joke
02:03bbloomgotcha
02:03bbloom::whoosh::
02:10michaelr525hello!!
02:11mrnex2010in compojure i dont know how to catch GET params (like a = 1 in www.com/?a=1 ) how can i do that or at least see the current url the user is at?
02:19devnibdknox: you around?
02:27devn+500 to light table.
02:29RaynesII sure wish I had $500 to give.
02:29devnI don't, but I did it anyway.
02:29RaynesYeah, when I say I don't I mean I literally don't have $500 at all to my name.
02:30kovasbmaybe you should do a kickstarter :)
02:30devnlol
02:30RaynesBahahaha.
02:30RaynesI totally should. I could raise money and pipe it to Chris.
02:31devnwe gotta get chris to develop mode
02:31kovasbf that just make something people want
02:31devnfruit roll ups?
02:31Rayneskovasb: I don't feel like taking nude selfpics.
02:31kovasblol
02:31kovasbi know, capitalism is degrading
02:34devnnude selfpics
02:34devnno words,
02:34devnwords.*
02:34Raynesdevn: Have you been to LA?
02:35devnRaynes: a long time ago
02:36Raynesdevn: https://photos-5.dropbox.com/i/o/UFHe3hr1AB2CTr7hQAl44kc82fnjd27-5oXjL0VH9ho/23745600/1334818800/5b9cce4/IMAG0146.jpg Santa Monica is great.
02:37devnbig sur!
02:45tufflaxI hate these kinds of lines (even though it's not ONE line). What do you guys do about them? http://pastebin.com/MSDB0Rbi
02:47bbloomassign names to intermediate values?
02:47bbloomusing let
02:47Raynestufflax: There are better ways to structure that code, not the least of which is to factor it into smaller pieces.
02:52tufflaxRaynes: Yeah, maybe that's what I'll do. bbloom: Hm, it's not that easy. The second for uses the enviroment of the first, and so on.
02:54michaelr525how to exit the repl? :)
02:54antares_michaelr525: Ctrl + D
02:54tufflaxRaynes did you have some more alternatives? I'm all ears, because, as I said, I really hate 'em. :)
02:55michaelr525antares_: thanks
02:55bbloomtufflax: more context is needed to refactor properly
02:59michaelr525so how should I name constants?
03:02amalloytufflax: you can also combine the inner filter/for into a single for
03:02tufflaxoh yeah, thanks
03:02bbloommichaelr525: there isn't really such a thing as a constant ;-)
03:03bbloommichaelr525: the same way you name any symbol is fine
03:03fhdI have two values, and I want to put them into a map, but only if they're non-nil. e.g. I have [foo bar] and I want {:foo foo :bar bar}, but only if both are non-nil. I could just make that map and filter nil values out, but there must be a better way, eh?
03:03tufflaxI think I'll pick this up tomorrow again, getting tired.
03:04amalloy(for [a sigma, :let [v (eclose ...)] :when v] [a v])
03:05michaelr525bbloom: well, i named it *something-something* and it complained that I should specify dynamic or change the name
03:05amalloymichaelr525: yeah, *foo* is the one thing you don't want to do for constants
03:05tufflaxamalloy thanks
03:05bbloommichaelr525: the *earmuffs* imply dynamic scoping
03:05amalloythose scream "unlike everything else, this is not a constant"
03:05michaelr525haha
03:06amalloysome people (common-lisp converts?) like to use +some-const+, but we just kinda look at them funny
03:06bbloommichaelr525: you should also avoid unnecessary constants. no sense defining a bunch of ENUM_VALUE = 4 sorts of things, when you could use a :keyword
03:09michaelr525i'm have a constant which holds a name of directory such as *tmp-dir*
03:09bbloomoddly enough, that might be a valid reason for the earmuffs :-)
03:10bbloomhttp://info.rjmetrics.com/blog/bid/51652/Lexical-vs-Dynamic-Scope-in-Clojure
03:10bbloomthat constant very well could be a configuration value, & it's common to use dynamic vars for configuration
03:11michaelr525hmm ok thanks
03:11bbloombut, in general, clojure favors immutability
03:11bbloomso (def tmp-dir "/tmp") is totally A-OK
03:12bbloomthere are a number of ways to change that immutable, but they are somewhat advanced. other than simply redefining a new value over it, of course
03:13bbloomif you wanted to let clients of your library override the configuration, then you could make the variable "dynamic" like so:
03:13bbloom(def ^:dynamic *tmp-dir* "/tmp")
03:13bbloomthen people can use 'binding to set it on a per-thread basis
03:13michaelr525cool
03:15bbloom(binding [your-ns/*tmp-dir* (str "/tmp/" (.getName (Thread/currentThread)))] my-client-code-here)
03:16michaelr525thank you!
03:29kralnamaste
04:08muhoogawd, i'm spoiled. i just had to do some js, and was reaching for an immutable dissoc
04:09bbloommuhoo: http://documentcloud.github.com/underscore/#without
04:10muhoobbloom: neat, thanks!
05:06bohllein newbie here. "lein deps" result in error "clj-record:clj-record:jar:1.1.2-SNAPSHOT not found". Can't find it in mvnrepository.com, what do?
05:13bohlfound it, needs version 1.1.1
05:45ivanhttps://github.com/brentonashworth/one <- on Ubuntu 12.04, lein 1.7.1, clean ~/.m2, the 'Getting started' result in FileNotFoundException Could not locate cljs/closure__init.class or cljs/closure.clj on classpath: clojure.lang.RT.load (RT.java:430)
05:45ivanI would guess as to what went wrong, but I have no idea how dependency resolution works
05:48ivanjava -showversion is OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu2) / OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
05:49ivanfortunately I am not particularly invested in this working! bbl.
05:50BeLucid_How is Leiningen pronounced? Like lennon - gin ? Or some other way?
05:51vijaykiranQ: How do you pronounce Leiningen?
05:51vijaykiranA: It's LINE-ing-en. ['laɪnɪŋən]
05:51vijaykiranBeLucid_: https://github.com/technomancy/leiningen FAQ :)
05:53BeLucid_thanks!
05:54BeLucid_that's kind of an awkward pronunciation for American English
05:54BeLucid_very consonant heavy
05:54BeLucid_but got it
06:41FullmoonHow can I change a map with a function that takes [key val], and returns a new value for this key?
06:41clgvFullmoon: assoc?
06:42clgvFullmoon: wait, you probably mean update-in
06:42Fullmoonclgv: That was it, thank you!
06:43clgvFullmoon: that one only gets the value but not the key ##(update-in {:a 10 :b 20} [:a] inc)
06:43lazybot⇒ {:a 11, :b 20}
06:43Fullmoonclgv: Ah I see
06:59stonebuilder./show 1
07:00fliebelWrong screen window? Wow, that adds a whole new dimension.
07:00fliebelrm -rf
07:00fliebelwoops
07:38clgvfliebel: you forgot /
07:38clgv;)
07:38clgvand maybe an additional sudo :P
08:38laurusHow do I simply access an attribute of a Java object in Clojure, without using a getter function?
08:38clgvlaurus: if it is public, yo can accces it via (.attr obj)
08:39samaaronin 1.4: (.-foo myObj)
08:39tomojif there is a getter of the same name, is there a workaround other than reflection?
08:39tomojoh, upgrade to 1.4 :)
08:39samaaron(although i've never used it, I just remember reading the changelog)
08:39laurusThanks!
08:58laurusHow can I use a named argument?
08:58laurusJust :nameofarg valueofarg ?
08:59achinlaurus: This post is a little old, but it still works. http://stackoverflow.com/questions/3337888/clojure-named-arguments
09:00laurusachin, the problem is that this is an already existing function.
09:00laurusI'm using clojure-py, and this Python function accepts keyword arguments ;)
09:00achinlaurus: What's the function's signature?
09:00michaelr525what's the short cut for filter-not-nil?
09:00michaelr525(filter #(not(nil?
09:00michaelr525I mean
09:01llasrammichaelr525: (remove nil? ...)
09:01llasram?
09:01laurusachin, it is:
09:01laurusnumpy.array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0, maskna=None, ownmaskna=False)
09:01achinmichaelr525: (remove nil? col)?
09:02llasramlaurus: Wow, clojure-py. Cool. I think you're very much in "early adopter" territory though :-)
09:02laurusllasram, oh yeah.
09:02laurus;)
09:02laurusachin, any ideas?
09:03achinlaurus: Sorry, I'm not too familiar with clojure-py. I did notice this, though. https://github.com/halgari/clojure-py/issues/71
09:03laurusachin, oh great! Let me try that.
09:04laurusWow, that actually worked.
09:04laurusThanks a lot for finding that for me!
09:04achinlaurus: Awesome. No worries.
09:04laurusI'm amazed by how well clojure-py works given that it's in such an early stage.
09:05michaelr525thanks
09:05michaelr525works as expected :)
09:58neotykGood morning everyone!
10:01mdeboardhi
10:01neotyknoir question: how do I add file-info middleware to it, so static resources get served with proper content-type?
10:17achintechnomancy: I'm trying to upgrade my plugin to 2.x and am having trouble understanding what to do with :dev-dependencies. Do I put them in the :plugins profile?
10:21fdaoudachin: "move from :dev-dependencies to :dependencies in the :dev profile"
10:22achinfdaoud: This is for migrating Leiningen plugins them selves, too?
10:23achinfdaoud: I've upgraded lein projects before, but not lein plugin projects.
10:23fdaoudachin: I missed that you were talking specifically about plugins. Sorry about that.
10:24achinfdaoud: No worries.
10:34technomancyachin: if you need to introduce a dependency into the project for your plugin to work, you should call update-in on the project arg before you pass it to eval-in-project
10:34technomancysee the example of lein-swank: https://github.com/technomancy/swank-clojure/blob/master/lein-swank/src/leiningen/swank.clj#L59
10:36ejlo .(conj (pop [1 2]) 3)
10:37Bronsa,(conj (pop [1 2]) 3)
10:37ejloclojurescript evaluates this to [1 2]
10:37clojurebot[1 3]
10:37ejlothx
10:37ejloI think there is a bug in pop for PersistentVector
10:41dnolenmmarczyk: hmm I think your changes may have broken the browser REPL.
10:41dnolenmmarczyk: I should have checked before applying, but when changing anything around net, dom, repl, we need to make sure browser REPL still works.
10:45dnolenejlo: please open a ticket in JIRA for that.
10:45ejlook
10:45dnolenejlo: http://dev.clojure.org/jira/browse/CLJS
10:51rplevydid read-lines from duck-streams end up in any library? I can't seem to find it.
10:52drewrrplevy: wasn't it just a combo of clojure.java.io/reader and line-seq?
10:52rplevyexcept it closes the reader, right?
10:53drewrdunno I never used it
10:54rplevyit was like line-seq, except for automatically closing the reader when you have read everything in
10:56drewrI guess with-open/reader/line-seq still doesn't seem too ugly to me
10:57rplevyyeah I guess so, a little more verbose :)
11:04jtoycan you guys recommend a word stemming library for clojure?
11:08technomancyverbosity at the cost of avoiding a resource leak
11:08rplevyhmm yeah
11:10achintechnomancy: I don't need to introduce a project dependency through my plugin. My plugin has midje tests, so I just want to figure out how to update that in my project.clj.
11:11rplevyachin: :profiles {:dev {:dependencies [[midje "1.3.2-alpha1"]]}}
11:12rplevyachin: :plugins [[lein-midje "2.0.0-SNAPSHOT"]]
11:13achinrplevy: Yeah, that's how I did it with my project, but I'm updating a plugin project — lein-mustache.
11:13achinrplevy: https://github.com/achin/lein-mustache/blob/master/project.clj
11:13rplevyis it different for plugins?
11:14achinrplevy: lein-precate and the wiki docs suggested that it was.
11:14Lajjlahttp://pastebin.com/qDLmivBz is this clojure?
11:15rplevyif you are using Clojure 1.4, for some reason including Midje causes the clojure version to stay at 1.3 (no other lib dependencies have this problem that I have seen, so it must be a bug in Midje) for this reason my midje dependency is [[midje "1.3.2-alpha1" :exclusions [org.clojure/clojure]]] which works
11:30rplevyLajla: yup
11:31Lajlarplevy, so it works and does what it's supposed to do?
11:31LajlaLike (tens-fill 0 3 3 3) basically gives a 3x3x3 matrix of 0's?
11:32clgvLajla: why dont you just execute it?
11:33LajlaBecause I don't have clojure on this machine.
11:33rplevyjust download lein and type lein repl
11:33Lajlahttp://tryclj.com/I tried this, but it bugs out on me
11:33clgvLajla: the code is buggy. recur is only called with 1 argument
11:34LajlaOh yeah
11:34Lajlamisplaced paren
11:34Lajlarplevy, you assume that I am on a computer that is my own and people appreciate me installing stuff on.
11:35clgvseems to work then
11:35LajlaSchweet
11:35Lajlabad style or whatever?
11:35clgvLajla: well leiningen can be installed without any admin/root rights.
11:36LajlaOne assumes, it's still not my computer.
11:36S11001001Lajla: do you work as a developer?
11:37LajlaEhhh, I do some freelance PHP and Javascript a lot, that's it.
11:37LajlaBut I am second only to the microsoft chief software architect in terms of programming skills
11:37clgvLajla: well you have a user account on it^^
11:38LajlaAlright, I'll look into how it works
11:39LajlaWell yeah, this is a win 7 machine with no cygwin, which I'm also not going to install without her permission or wake her up for asking that, so oh well
11:40Lajlait's not a big problem, I got all your guys as my team of genetically engineered monkeys to tell me if it works
11:44otfromcemerick: I was wondering if there was something simple I was missing if I wanted to have a user be automatically logged in when they register as a user using friend.
11:45S11001001Lajla: just complain loudly that clojure sucks because it can't do X, if you are wondering how to do X in clojure :)
11:45clgvLajla: well you dont need cygwin for leiningen. just download that lein.bat ;)
11:46cemerickotfrom: If you characterize your registration-related route as a friend workflow, then that becomes fairly simple.
11:47cemerickThough, *any* handler can return a response with the session's ::friend/identity set.
11:47LajlaS11001001, what do you mean?
11:47LajlaI know how to do X in clojure, I just did.
11:47cemerickotfrom: I have yet to extract some convenience fns for doing stuff like this from one of my apps. That'll all come through with the su capabilities, etc.
11:48LajlaI simply saw a discussion last night about how to make a Nx2 matrix of zeros and I was some-what confused by many of the methods proposed and wondered what was wrong with the 'standard' appraoch but it seemed to work fine in clojure
11:48LajlaI was wondering if perhaps recur didn't like it if you supplied an apply-chain as one of its arguments, but apparently that's fine.
11:53otfromcemerick: cool thx
12:11dnolensweet datomic exposes index API, some fun in store for core.logic
12:14dnolenibdknox: not bad 1/4 of the way there in less than 24 hours?
12:14ibdknoxdnolen: Likely means it won't happen
12:14ibdknoxdnolen: you really only get one wave of hype
12:15ibdknoxwe'll see though. I've adjusted some things based on feedback
12:15ibdknoxunfortunately kickstarter doesn't make that easy
12:15muhookickstarter is goos for $20k, i dunno about $200k
12:15dnolenibdknox: well you've got 44 days, some ideas have legs ...
12:16muhooif you need $200k, that might put it up into VC strata
12:17scottjmuhoo: there was a kickstarter that raised 4 million recently
12:18RickInGAibdknox is their a way to coordinate a 2nd wave?
12:18scottjanother cool demo :)
12:18clgvscottj: that what I wanted to say as well ;)
12:19ibdknoxmuhoo: I did it primarily because the masses cried out for it :) It's been an interesting experiment, but I definitely don't think it fits software well
12:19muhooscottj: wow, did not know that. that's fairly insane.
12:19ibdknoxmaybe a game because that hits a much broader audience
12:20muhoowhat's the average donation size on kickstarter? $20? $50?
12:21muhooscottj: ah, i see http://www.macrumors.com/2012/04/17/iphone-compatible-pebble-wristwatch-tallies-nearly-4-million-in-kickstarter-presales/
12:22scottjhas it only been high on HN/reddit? maybe reach out to slashdot/infoq/jsjabber
12:22the-kennymuhoo: The 4M is really insane as they raised that much in under a week.
12:22the-kenny30 days to go.
12:23muhooaverage donatino size $143 on that one
12:23muhoo&(/ 3800000 26500)
12:23lazybot⇒ 7600/53
12:23muhoofoey
12:23muhoo&(/ 3800000 26500.0)
12:23lazybot⇒ 143.39622641509433
12:23RickInGAibdknox is the graphics you did for the game editor planned as part of light table?
12:23ibdknoxhaha
12:24ibdknoxRickInGA: what do you mean exactly?
12:24RickInGAyour clojurescript game editor that you did after bret victor's presentation... is that part of light table?
12:25RickInGAthe light table video seemed like it was all about text
12:26ibdknoxRickInGA: it's something that can just be added as a plugin, so I think you'll probably see it at some point :)
12:27devnibdknox: does the estimated delivery of Aug 2012 on kickstarter reflect the date at which "earliest" user testing is expected to begin?
12:27muhooso you'd need like 4000 pre-orders at $50 a license? that doesnt' seem impossible.
12:27ibdknoxdevn: yeah
12:28muhoodevn: sounds like if you're giddy enough to open your wallet, it'll happpen :-)
12:29devnmuhoo: already did :)
12:30devnI'm voting for the future. I'd like to upgrade my 1970s editor to a 1980s editor. ;)
12:30nDuffibdknox: ...will the folks who opened their wallet for the old $50 reward (w/o early access) get the new one (with early access included)?
12:30ibdknoxyes
12:31RickInGAhah, this post starts of by mentioning light table... he doesn't like it, but some of the commentors do http://poincare101.herokuapp.com/post/18
12:31nDuffDoes a subseq of a sorted-map hold a reference to the original map from which it's taken?
12:32ibdknoxRickInGA: fortunately he has no idea what he's talking about :)
12:34RickInGAibdknox your demo was clojure (which I think is really cool), do you also have any js pieces built? (which lots of people use)
12:34ibdknoxRickInGA: only very early messing around kind of stuff. I have to start over, since the prototype wasn't built with longevity in mind
12:36ibdknoxRickInGA: I'll do everything for Clojure first though
12:36ibdknoxI can execute on that very quickly
12:37ibdknoxwhich allows me to work out the kinks in things before I get to the harder language side of things
12:37RickInGAibdknox: that makes sense... still from a funding perspective, there are a lot more js people than there are clj people... wonder what their default editor is. (notepad can't be the standard)
12:38ibdknoxsublime, textmate, vim, emacs
12:38ibdknoxone of those
12:39bsteubermaybe you can "fake" a js demo
12:50bohlWhy can't I see the output of println after creating uberjar and running with java -jar? I see it when I do lein run..
12:52timvisherhi all
12:52timvisherhow can i add a local jar file to my leiningen project?
12:52timvisheri tried dropping it into the libs directory but that doesn't seem to work
12:52technomancyclojurebot: repeatability?
12:52clojurebotrepeatability is crucial for builds, see https://github.com/technomancy/leiningen/wiki/Repeatability
12:52gfredericksbohl: does the program do anything? I think the diff between uberjar and lein run is that you have to make sure the main class gets generated
12:53technomancytimvisher: it's covered on that wiki page ^
12:53timvishertechnomancy: that's what i was looking for! :)
12:53timvisherthanks
12:53bohlgfredericks: yes the program runs, I can show the output in a JOptionPane
12:53gfredericksbohl: oh then I have no idea
12:55bsteuberbohl: maybe the println is called from another thread? then *stdout* is not bound to the terminal
12:56timvishertechnomancy: so it's looking like i need to get it installed in a repo in order to reference it? i'm writing some throwaway code and i just want to experiment with an api, which is why i was trying to avoid that
12:56technomancytimvisher: for throwaway code you might try lein-localrepo
12:56bohlbsteuber: how to make sure *stdout* is bound to the right thing, then?
12:57eggsbyhow can I use (require [... :as ...]) in the repl?
12:57timvishercool
12:57timvisheri'll go with that route
12:57bsteuberbohl: call (alter-var-root *out* (constantly *out*)) from the main thread
12:57technomancyI just hesitate to recommend that in public since people want to abuse it for real projects
13:03fdaoudeggsby: I think it's (require '(clojure [string :as s]))
13:05bsteubereggsby: or just (require '[clojure.string :as str])
13:06bsteuberso the only difference is you nee to quote the symbols
13:06bsteuber*need
13:06eggsbyya bsteuber I found that out
13:07eggsbyI had to go (require ['my-lib.core :as 'whatever])
13:07eggsbywhy is it that I need to quote those in the repl, but not in a clj file?
13:07eggsbyor I guess I don't quote them inside the ns macro?
13:09timvisherany way for me to examine my classpath at the repl?
13:11Scriptoribdknox: new pricing scheme for backers, nice!
13:11ibdknoxScriptor: :) Unfortunately kickstarter is terrible for reacting to feedback.
13:13Scriptorhah, figures, still plenty of days to go
13:16jodaroibdknox: will it collapse the new stuff for backers of the same rate but that backed before you changed it?
13:16ibdknoxjodaro: absolutely
13:16jodaroi.e. there are two $50 levels now
13:17ibdknoxedited that into the announcement
13:17ibdknoxI'm not sure what people see
13:17jodarorad
13:17ibdknoxKickstarter needs a lot of usability help
13:17jodarowhen i go to the page there are two $50 levels
13:18jodaromaybe you can start a meta kickstarter project to fix that
13:18jodaroyo dawg, i heard you liked kickstarter so i kickstarted ....
13:21ibdknoxjodaro: lol
13:21ibdknoxjodaro: yeah, there will be two until everyone moves from the old one - I can't delete or modify them in any way if there's a single person on it.
13:22jodarook
13:22TimMcibdknox: That's terrible. Can you hide one?
13:22ibdknoxTimMc: no :(
13:22TimMcUgh.
13:22ibdknoxLike I said, I'm growing to hate this platform
13:22ibdknoximmensely
13:23jodarooh i get it
13:23jodarook i moved mine
13:25bsteuberguess they make that to protect people from decreasing rewards
13:26bsteubertimvisher: (System/getProperty "java.class.path")
13:27bsteubereggsby: yes not having to quote is a convenience of the ns macro
13:27timvisherbsteuber: thanks
13:28bsteuberibdknox: nice new comment by a guy: "That new 15$ license = you've made me a supporter even though I don't know how to code :)"
13:29fdaoudbsteuber: link?
13:35bsteuberfdaoud: http://www.kickstarter.com/projects/306316578/light-table/comments top one
13:36fdaoudbsteuber: thanks.
13:36eggsbyya with how much money flows through kickstarter
13:36eggsbyyou'd think they'd have their stuff together
13:38bsteuberlet's kickstart a kickstart-competitor with better software and fairer rates ;-)
13:38eggsbyhow can I change the radix of a number in clojure?
13:39jodaroibdknox: erlang support.
13:39RaynesElixir!
13:39jodaroyeah i was just going to say
13:40jodaroRaynes can do the elixir stuff
13:40RaynesHeh
13:40jodaroelix0r
13:40ibdknoxhaha
13:40jaeneggsby: wasn't that NrX?
13:40RickInGAhttp://pksunkara.github.com/semicolon/
13:41ibdknoxdone ;)
13:41ibdknoxI added the ability to type a semi-colon
13:43eggsbyoh cool jaen
13:43eggsbyso you can go 2r1100 to get 10r12
13:43jaenyeah, that's a pretty nice literal
13:43eggsbybut how can I take '12' and turn it into base 2?
13:44TimMc&(Long/toString 12 2)
13:44lazybot⇒ "1100"
13:44RickInGAwow
13:45eggsbythanks TimMc
13:45eggsbygood ol' java
13:50nathanmarztechnomancy: yo, saw your question on twitter
13:53nathanmarztechnomancy: the ultimate goal is actually to use Kryo to do the serialization
13:53technomancynathanmarz: I think something like this has the potential to be included in Clojure as part of the "dynamicity knobs" mentioned at the last conj
13:54technomancywhich is why it works with the reader
13:54nathanmarzyea, the problem with the reader is that you can't stick arbitrary objects in there
13:54technomancywell
13:55technomancyyou can, but it's hideous
13:55technomancyhttps://github.com/technomancy/die-roboter/blob/master/src/die/roboter.clj#L78
13:55nathanmarzyou mean essentially encoding the entire closure as "source code" to be evaled on the deserialization side?
13:56technomancyyeah... not saying it's a good idea =)
13:56nathanmarzah... why didn't i think of that
13:56nathanmarzwhat i'm doing is pretty hideous too
13:57nathanmarzit would be cool to have this baked into the language
13:57wkmanireHowdy folks.
13:58technomancynathanmarz: right, I think dynamicity knobs would make that work, since you would want it off by default for space reasons
13:58nathanmarzthis approach does have some limitations though, not sure if rich et al would be ok with that
13:59nathanmarzcan you refresh my memory on the "dynamicity knobs"?
13:59wkmanireJust did my first bit of unit testing with Clojure.
13:59wkmanireLein sure did make it easy.
13:59technomancynathanmarz: 1.4 added the ability to elide metadata, allowing for more lightweight builds of Clojure (for android, etc)
14:00technomancynathanmarz: but the plan is to let it go the other way as well; for debug purposes you should be able to enable extra dynamicity that would be prohibitively expensive for production
14:00technomancynathanmarz: arguably the ability to disable locals clearing falls under that
14:00nathanmarzah right
14:01wkmanireI think two more weeks of this and I'll be ready to start messing with noir.
14:01wkmanire:)
14:02mmarczykdnolen: http://dev.clojure.org/jira/browse/CLJS-184
14:03mmarczykdnolen: sorry for the trouble, can't believe I missed that
14:06the-kennyIs there a timeframe when ClojureScript will get 1.4's reader literals?
14:08dnolenmmarczyk: great! thanks, applied to master.
14:09mmarczykdnolen: thanks!
14:09dnolenthe-kenny: whenever someone comes up with a patch we'll happily apply it.
14:10the-kennydnolen: Let's see if I can find some time for this :)
14:11the-kennydnolen: I was thinking about submitting a simple patch to add `int', `long' etc. to ClojureScript. Just to make porting of code easier
14:12the-kenny(not really "porting", cross-compilation)
14:14dnolenthe-kenny: yes that simplify things - what do you think those fns should do?
14:15arohnerI have (ref #{:a :b :c}). What's the cleanest way to disj N items from it, inside a transaction?
14:15clojurebotTitim gan éirí ort.
14:15the-kennydnolen: That's what kept me from starting right then. I'm not really fluent with numerical stuff in javascript
14:15the-kennyint might just call .toFixed(), like integer? does for comparison
14:16dnolenthe-kenny: toFixed converts to string
14:16the-kennywhoops
14:16dnolenthe-kenny: it works for integer?
14:17pjstadigarohner: set/difference?
14:18arohnerpjstadig: oh, interesting. I don't know which items to take, I just want the first N items, if there are at least N
14:18the-kennydnolen: There are also some Closure classes regarding numbers. I think there's one for integer too
14:18dnolenthe-kenny: maybe, http://stackoverflow.com/questions/596467/how-do-i-convert-a-float-to-an-int-in-javascript
14:19the-kennydnolen: Yup, that's what I've done for my project. Replacing int with Math/floor
14:19mmarczykarohner: (alter! r #(apply disj % (take n %))) ?
14:19fdaoudibdknox: I just don't want to be backer #666.
14:19bsteuberibdknox: maybe some kickstarter admin can help you update things
14:20ibdknoxbsteuber: already sent mail
14:20arohnermmarczyk: pjstadig: thanks
14:20RickInGAbsteuber you are safe, 669 right now
14:22dnolenthe-kenny: where do you see something in Closure?
14:22TimMc673
14:23the-kennydnolen: https://closure-library.googlecode.com/svn/docs/class_goog_math_Integer.html
14:23the-kennyHaven't had a look at it
14:23dnolenthe-kenny: that yucky, a custom Integer type
14:23dnolenthat's
14:25dnolenthe-kenny: I think the approach specified by the StackOverflow answer is worth pursuing - especially the one that simulates truncate.
14:27the-kennydnolen: Yeah, that looks good. Should `long' simply do the same as `int'?
14:28TimMcIt does in Clojure, so why not? :-P
14:28the-kennyhaha
14:28dnolenthe-kenny: yep, feel free to open JIRA ticket and patch.
14:31bsteuberibdknox: in case they can help you, you might want to make it even more regular - like adding beta to the 80$ option and have t-shirt-options everywhere
14:31bsteuberhope you can outsource all t-shirt-trouble to some printing company :)
14:32dgrnbrgI want to start using clojurescript--I know very, very little about javascript, the dom, and browsers, and nothing about ajax, but I'm an expert in clojure
14:32dgrnbrgwhere should I start?
14:37nickikls
14:37nickikIm using lein2 for the first time. Does this work for other people?
14:37nickikhttp://paste.lisp.org/display/129027
14:39technomancynickik: yeah, it works here. what are you seeing?
14:40nickiktechnomancy: nothing
14:40nickikdosnt output anything
14:40technomancyok?
14:41technomancyare you expecting to see something?
14:41nickiktechnomancy: where should the parsely jar be?
14:41technomancynickik: ~/.m2/repository/net/cgrand/parsely
14:42technomancybut you shouldn't care about that
14:42technomancyif you're thinking about jar files then an abstraction has broken down somewhere
14:42nickikYes normaly not but if it isnt there anywhere it cant possibly work, can it?
14:43dnolendgrnbrg: there's not really a good starting place, here the mailing list are your best bet.
14:43dnolendgrnbrg: my one piece of advice - lein-cljsbuild
14:44raeknickik: are you looking for the lib/ directory? lein2 doesn't copy the jars there anymore
14:44fdaoudibdknox: when did you post light table on kickstarter?
14:45nickikit seems to be working
14:45ibdknoxfdaoud: yesterday around 4 I think
14:46dgrnbrgibdknox: I am extremely excited about light table--not only have I funded it and promoted it to my friends and coworkers, but I'm trying to get my company to join on for $10k
14:46ibdknoxdgrnbrg: thanks for the support! :)
14:46clojurebotHuh?
14:47nickikibdknow: When you talk about supporting Clojure, do you mean Clojure or/and ClojureScript?
14:47ibdknoxyeah, it'll be both
14:47dgrnbrgibdknox: also, I don't know if you'll be hiring a team, but if you are, I've got experience in compiler tools design :)
14:47ibdknoxThe goal is to develop it in itself, so I'll need both :)
14:48ibdknoxdgrnbrg: I'll definitely keep that in mind :) We'll have to see what happens though
14:48fdaoudibdknox: although I know it is just a drop in the ocean, I've contributed to the project AND NOT to the t-shirt headache of shipping to Canada :)
14:48ibdknoxhaha
14:48ibdknoxthanks :D
14:48ibdknoxI ended up adding more of them, but I'm still a little worried about that being a time sink
14:48TimMcSubmitted to /r/javascript, they should get excited aobut this.
14:48nsxt_Looking to finally get my hands dirty with my first application... anyone have experience with both slimv and vimclojure? I'm curious to know how they stack up.
14:49dgrnbrgnsxt_: I use vimclojure along with vimparedit, and together my environment is a dream (and pretty easy to set up)
14:50nsxt_dgrnbrg: thanks. I tried slimv a year ago when I was working with CL, and I remember the experience being a little frustrating.
14:51aperiodici use slimv, and would say the same thing as dgrnbrg about my setup ;)
14:51dgrnbrgparedit mode is important (and easy to set up)
14:51aperiodiccomes for free with slimv
14:51nsxt_paredit is pretty slick. dd and it preserves trailing braces... phew.
14:52dgrnbrgnsxt_: if you use lein, you can get ibdknox's lein-nailgun (or a new one that just came out called tarsier), and then you just need to install the vimclojure/ngclient yourself
14:53nsxt_dgrnbrg: great, thanks, will give it a shot.
14:54dgrnbrgif you need links/help, msg me
14:54aperiodicnsxt_: if you give slimv another shot, use sjl's fork that's tuned for clojure: https://bitbucket.org/sjl/slimv/overview
14:55nsxt_ah, mr. steve losh is behind that... :)
14:56nsxt_though i guess he just merged in vimclojure's files.
14:57aperiodicpretty much
15:01beffbernardI have a question of naming namespaces. Singular or plural?
15:04emezeskebeffbernard: Have an example case? Offhand, I see far more singular namespace names, FWIW.
15:05beffbernarduserevents.model vs. userevents.models
15:06emezeskeWell, my personal convention is to name collections of things plurally, e.g. (get items 42) rather than (get item 42)
15:07emezeskeSo if you view a namespace as a collection of things... plural? :)
15:07beffbernardemezeske: plural sounds better in my head me thinks
15:07emezeskeMaybe there's some better wisdom about that, though, I don't know.
15:10technomancyIMO always using singular is more consistent
15:11technomancyI don't think it makes sense to always use plural, and if you use both you'll end up in the tarpit of converting between the two
15:11emezesketechnomancy: Are you referring to namespace names, or things in general?
15:11technomancyI guess naming in general
15:12emezeskeI like being able to do (for [item items] ...), it seems very natural to me
15:12technomancyemezeske: oh yeah, naming collections that way makes sense
15:12technomancyI'm thinking more about API endpoints
15:12technomancyrather than locals
15:12emezeskeAh, yeah, consistency is much more important there
15:13emezeskeI love a good API, where I can guess the name of a function based on convention
15:14emezeskeI guess going all-singular would make that easier
15:15technomancyI guess I was thinking more about rest APIs and the weirdness around auto-pluralization that rails uses
15:16emezeskeOh, god, that
15:17emezeske"Is it /indices or /indexes ?"
15:17technomancy"/boxen"
15:18emezeskehttp://www.futilitycloset.com/2012/04/07/the-arbitrary-english-language/
15:40zzachUsing (clj-logging-config.log4j/set-logger! ...) (from github.com/malcolmsparks/clj-logging-config), is it possible to configure it in a manner that all Java exception messages go to a file (like using a log4j.properties file containing the lines log4j.rootLogger=DEBUG, A1 and log4j.appender.A1=org.apache.log4j.FileAppender ) and not to the console?
15:44raekzzach: if it turns out that clj-logging-config does not provide a way you can use java.lang.Thread.setDefaultUncaughtExceptionHandler
15:52sjlnsxt_: aperiodic: It's mostly just a merge of Vimclojure files, but I did write custom folding for .clj files that works pretty well
15:53sjlnsxt_: aperiodic: and there are some other tweaks too, like adding some of the macros from common libraries to the syntax file (like defsynth from overtone, defpage from noir, etc)
15:55nsxt_sjl: off-topic but thank you so much for gundo.
15:55sjlnsxt_: hah, no problem
16:04jamiiIs this a bug?
16:04jamiiuser=> (match [(list 1 2)] [([& _] :seq)] :matched)
16:04jamiinil
16:04jamiiuser=> (match [(list 1 2)] [([_ & _] :seq)] :matched)
16:04jamii:matched
16:05dnolenjamii: core.match has lots of bugs and not enough patches
16:05dnolenjamii: seq pattern matching going to way of the dodo, but I've been busy with other things.
16:06jamiidnolen: ok
16:08dnolenjamii: similar bugs exist for map patterns & vector patterns & AOT edge cases. they will be addressed one day - sooner if I get patches.
16:08jamiidnolen: I may do that once this bloom stuff is working
16:08jamiidnolen: I do miss proper pattern matching
16:08dnolenjamii: that would be awesome and much appreciated.
16:09jamiidnolen: I already have a few hacks around stuff https://github.com/jamii/mist/blob/master/src/mist/strict.clj
16:10jamiidnolen: I would like to support matching on types/records
16:31the-kennyIs the process of submitting a patch to clojurescript documented somewhere?
16:42the-kennydnolen: Well, ClojureScript already has `fix' which does exactly what `int' should do. fix is private.
16:42carllercheI started using jvm7 and now when I run lein javac i get "warning: [options] bootstrap class path not set in conjunction with -source 1.5"
16:43gfredericksint would tempt you into thinking you're using an integer :/
16:44the-kennygfredericks: Not having `int' and `long
16:44the-kennywhoops
16:44the-kennyis very annoying when deadling with code written for both targets
16:44the-kenny*dealing
16:44gfredericksshould code written for both targets be doing low-level numeric stuff?
16:45the-kennyI used `int' mostly for dropping decimal places
16:46gfredericksyeah; I'm sure it's fine; I'm just pickier than most about being sloppy with numerics
16:46gfredericksthe whole JS platform makes me cringe for that reason :/
16:47gfredericksI guess dropping decimal places is safe; int is just a misleading name for that action; but like you said shared code and such
16:47gfredericksboo js
16:49yoklovnot having integers isn't that bad
16:49yoklovunless they're huge i never run into an issue with it
16:49technomancydepends what you're doing
16:49gfredericksI've used JS bigint libraries a number of times
16:49gfrederickspre-cljs it's ugly as a pile of poo
16:50technomancycurrency calculations done with floats are a huge source of bugs from people who don't know any better
16:50gfrederickstechnomancy: yeah that too
16:50gfrederickswe've got a project where I would've been much more comfortable with rationals
16:50gfredericksheck with rationals you can stop thinking in cents as well
16:50yoklovyeah, if you're dealing with money you definitely need non-js numerics
16:51bradwrightgfredericks: not to entirely pimp our own wares, but we wrote a library for dealing with arbitrary precision integers in JS
16:51bradwrighthttps://github.com/smarkets/decnum
16:51bradwrightIt stores them as integers internally
16:51bradwrightPrecisely because JS numbers suck
16:51gfredericksbradwright: gclosure has bigints; at this point I'd rather just get cljs bootstrapped than look at any js libs
16:51hiredmans/numbers//
16:51bradwrightheh
16:52gfrederickshiredman: ?
16:52kurtharrigerhow does the require refer thing work in clojure 1.4? I thought it was basically same as use :only
16:52hiredmanjs is a horrible language
16:52kurtharrigerfor example (require '[clojure.repl :refer [doc]]) doc remains undefined
16:52gfredericksI'll drink to that
16:52kurtharrigeram I not using it correctly?
16:52TimMcBetter than PHP!
16:53TimMc,(require '[clojure.repl :refer [doc]])
16:53clojurebotnil
16:53TimMc,(doc doc)
16:53clojurebot"([name]); Prints documentation for a var or special form given its name"
16:53kurtharrigeroh wait my slime connection is still 1.3
16:53kurtharrigerhmm
16:53gfredericksTimMc: at least PHP has a fuzzier monopoly
16:53TimMcOh, but it probably already has doc...
16:55jaenTimMc: nothing is worse than PHP; I'm reading that PHP bashing post right now ; d
16:55jaenbut I don't think that JS is THAT bad
16:55kurtharrigerdoh, I thought I had resolved this but I guess not leiningen repl is starting 1.3 not 1.4 even though my project file is updated
16:56aaelonyDoes anyone have experience with Docjure to read Excel files? Running into a strange error. Please see https://refheap.com/paste/2221. Help appreciated..
16:59rplevyaaelony: this is my first time hearing about docjure so I haven't tried it, but I love the name. It's like clojure, except its a library for reading docs, pretty clever.
16:59rplevy;)
17:00aaelonyrplevy: it's pretty cool. Found my mistake as well. Using ->> works but I had typed ->
17:00bradwrightSo is the Stuart Holloway book any good? Or is there another book I should read to learn Clojure (or perhaps something else that isn't a book)?
17:02devinusare there any other readers than #uuid and #inst yet?
17:06S11001001rplevy is a big liar
17:06kovasb_bradwright: that was my first, I liked it. Joy Of Clojure is a bit newer and more in depth. All the books tend to be a bit behind the latest ecosystem developments
17:06kovasb_devinus: adding your own should be relatively easy
17:06rplevyS11001001: lol
17:06devinuskovasb_: yeah, i was just wondering if there were any more builtin ones
17:07devinus#uri would be pretty hawt
17:07kovasb_devinus: i think that's it for right now. Expect more later for sure
17:07bradwrightkovasb_: I heard Joy of Clojure wasn't really for beginners though
17:07devinusbradwright: it's not, but it's a must have
17:07bradwrightkovasb_: for background, I'm a good Python/JS programmer, but not really done much functional stuff
17:08devinusi recommend Programming Clojure
17:08devinusthen maybe Practical Clojure if you're not comfortable yet
17:08raekbradwright: http://stackoverflow.com/questions/2578837/comparing-clojure-books
17:08brehautbradwright: clojurebook.com is aimed squarely at java/py/ruby programmers wanting to get into clojure
17:08kovasb_bradwright: depends on definition of "beginner".. if you understand programming languages well it might be better
17:08rplevyhow about the O'Reilley cemerick book
17:08rplevyshould be out any day now
17:09gfredericksis that the second O'Reilly clojure book?
17:09rplevynope the first
17:09gfrederickshrm
17:09cemerickgfredericks: There can be only one. :-) http://clojurebook.com
17:09bradwrightThey'd need a new animal :)
17:09raekbradwright: also, there is a second edition of Programming Clojure nowadays (you might find reviews that tell you that the first version is outdated)
17:10gfredericksso in the original cljs talk that rich gave, when he mentioned that the Clojure book and Closure book both have birds on the cover, that was cemerick's in-progress book, or a made-up book?
17:11nDuffbradwright: I'm +1 on the Joy of Clojure suggestion; I don't think it's as not-for-beginners as some sources may suggest.
17:11nDuffbradwright: ...but even if that _were_ true, it's good to get an overview of the high-level practices and concepts up-front, even if you end up using another resource for intermediate learning.
17:13bradwrightCool thanks for the detailed feedback everyone
17:14kovasb_or you can just read the clojure.core source :)
17:14gfredericksoh but that's bad clojure most of the time
17:14bradwrightNot quite there yet… hence the book recommendations
17:14gfredericksor non-idiomatic rather
17:19dnolenthe-kenny: yeah, int and long should probably just call fix
17:24dnolenyoklov: did you get my email about giving PHMs a try in your projects if you get a chance?
17:24yoklovyeah, i've been trying to make it work, actually
17:24dnolenyoklov: problems?
17:25yoklovi can't seem to get lein-checkout to work with it
17:25yoklovits not using the updated cljs files
17:25dnolenyoklov: you need to set both classpaths I think, one to clj one to cljs
17:25yoklovoh, okay
17:29yoklovheh, that'd be cool. maybe lower the barrier of entry for javascript coders
17:29kovasb_dnolen: finally got my himera.next thing working this week
17:30dnolenyoklov: yeah, and pretty easy to do
17:30dnolenkovasb_: nice, what does it do differently
17:30dnolen?
17:31kovasb_dnolen: the returned values can have arbitrary rendering rules
17:31dnolenkovasb_: ah nice!
17:31kovasb_based on the meta data
17:31devinusoh man
17:31kovasb_or tagged literals
17:31devinusa #currency reader would be hawt
17:31kovasb_yeah
17:31devinus#currency "45$US"
17:32kovasb_also you can save and re-enter the "sessions"
17:32kovasb_since the session itself is a datastructure
17:32technomancyI wonder if you could do #$ 0.45
17:32technomancyprobably not as the inaccuracy is introduced before your custom reader gets it
17:32kovasb_(well, the file loading uploading part i need to implement next)
17:33technomancy#€ 1.23, #£ 92.13
17:33kovasb_devinus: you need to namespace all your custom tagged literals unfortunately
17:33devinustechnomancy: why do that when you can just use the ISO codes from java.util.currency ?
17:33technomancyit's too bad the M suffix makes people think of millions
17:33kovasb_i wish there was a way to "use" them so u can just use short names
17:34technomancydevinus: because I heart unicode so much!
17:34devinuskovasb_: oh wow that sucks :(
17:34kovasb_devinus: yeah, it makes using them directly in code a pain
17:34devinusso i'd have to do #devinshappyfuntimereaders/currency ? :(
17:34kovasb_though u can have really short namespaces
17:34kovasb_I'm using 2 or 3 letter ones
17:34devinusi plan to make a little package
17:35devinuswith a bunch of these sweet readers
17:35kovasb_or, you can have helper functions which then return the longer namespace things
17:35devinuscurrency, URI's....
17:35devinusgotta think of some more
17:35devinusbasically look at Rebol for inspiration :)
17:35kovasb_widgets :)
17:35kovasb_graphics :)
17:36technomancyI wonder if any languages have actual URI literal literals
17:36devinusXML literals?
17:36devinus#tag "<img></img>"
17:36hiredman:(
17:37kovasb_i definitely want tagged literals for various programming langauges
17:37kovasb_including the clojure-based ones, but also others
17:37ambroffoin #riemann
17:38kovasb_#polyglot/javascript "foo.bar()" etc
17:38cemerickreader literals have potential, but XML/URI/etc literals are frightening notions.
17:38technomancycemerick: I think Scala has proven that XML literals were a mistake, but why do you say the same about URIs?
17:38kovasb_its not totally clear what an xml literal would evaluate to
17:38cemericktechnomancy: anything worth its salt uses cents/pence/etc, so currency with integers would be great.
17:40technomancycemerick: there's no unicode char for pence though =)
17:41cemericktechnomancy: URIs are incredibly complicated. AFAICT, no one understands them fully.
17:41devinusxpath reader!!!
17:41technomancycemerick: no one understands dates fully, but that didn't stop them =(
17:41cemericktechnomancy: #p, then?
17:46technomancyI've heard that Scala's XML literals have primarily invoked feelings of regret, but what are the specific complaints about them?
17:47zii-primeis there a better way to say (every? identity coll) than that?
17:47technomancyzii-prime: there's an open ticket for letting you just say (every? coll)
17:48zii-primetechnomancy: oh hey. ...um, where can I find those?
17:48S11001001zii-prime: where did coll come from?
17:48technomancyzii-prime: somewhere in jira; I don't know the number off the top of my head and I try to avoid jira if I can
17:49zii-primeS11001001: ... it's an example
17:50S11001001zii-prime: it depends, because sometimes you can get away with calling keep instead of map
17:50S11001001(keep f xs) is like (map f xs) but drops nils
17:54nDufftechnomancy: XQuery has XML literals, and they work well there
17:54zii-primeS11001001: oh. the fn is (defn +'' [& vecs] ‹(every? identity vecs) and (vec (apply map + vecs))›); keep won't help; I'm just checking returning nil if any arg is nil
17:55S11001001I see
18:00seancorfieldworld singles is now running on clojure 1.4.0 in production - yay!
18:01technomancygood first step, but we shouldn't rest until all the :use calls are excised!
18:13austinhDo most people install Slime via leiningen/swank-clojure?
18:18gfrederickstechnomancy: is :use officially deprecated now?
18:19gfrederickss/technomancy: // ; no reason to bother him particularly about that
18:19technomancygfredericks: no
18:19RaynesDoes it matter?
18:19gfredericksRaynes: I expect so or else we should never officially deprecate anything
18:20technomancyhttps://mobile.twitter.com/janeonacalliope/status/15465958310
18:31cemericktechnomancy: Stuart and McKellen in Waiting for Godot? Whoa.
19:06seancorfieldtechnomancy: we're already working on removing :use from our code and using :require :refer as appropriate - definitely allowing some code cleanup!
19:06technomancy(mostly kidding)
19:08aaelonytechnomancy: what's the argument against :use?
19:09RaynesThat it is unnecessary now, mostly.
19:09aaelony I see. Is there a link to read up on ?
19:09RaynesThe argument for making it unnecessary was "Why do we have both use and require? Why can't require just do what use does too?"
19:09aaelonynice :)
19:09technomancyit's confusing for newbies to have more concepts to learn
19:10technomancyunnecessary complexity
19:10technomancyplus it has bad defaults (without :only)
19:10aaelonycool
19:10aaelonyso s/:use/:require/g ?
19:10technomancyclojurebot: ns macro?
19:10clojurebotTitim gan éirí ort.
19:10technomancyclojurebot: the ns macro?
19:10clojurebotGabh mo leithscéal?
19:11technomancyclojurebot: ns?
19:11clojurebotns is unfortunately more complicated than it needs to be, but http://blog.8thlight.com/articles/2010/12/6/clojure-libs-and-namespaces-require-use-import-and-ns may be helpful.
19:11technomancyshould get trptcolin to update that re: 1.4
19:52austinhAnyone know why slime-selector won't take me to the REPL, unless the REPL is already visible?
19:53austinhSays, "slime-selector: Symbol's value as variable is void: slime-selector-other-window"
19:59amalloyjust use C-c C-z?
20:00austinhamalloy: What is C-c C-z bound to in your setup?
20:01amalloyslime-switch-to-output-buffer
20:01austinhamalloy: Thanks. That appears to be bound in my clojure buffers, but not globally.
20:02amalloyyeah, i think clojure-mode binds it in its hook
20:02austinhI'm accustomed to using 'C-c s r', but that'll work.
20:07meet_me_at_tarjahey y'all
20:11meet_me_at_tarjahas anyone one worked on/played with clojure 1.4 yet?
20:11meet_me_at_tarjai just saw it released today on hacker news
20:12RaynesIt actually released yesterday or the day before.
20:12RaynesBut yeah, lots of people are using it.
20:13RaynesIt's mostly (totally?) compatible with 1.3, so anybody on that can pretty much just change version numbers.
20:13trilispI don't know but when you clone the git repo at the repl says that is version 1.5-SNAPSHOT
20:13meet_me_at_tarjanice, I'm pretty psyched for mapv
20:13RaynesYeah, because that's the git repo and not a release.
20:14Raynesmeet_me_at_tarja: Why?
20:14trilispI'm a newbie with clojure
20:14meet_me_at_tarjawhy they blue hair raynes?
20:14seancorfieldmeet_me_at_tarja: yeah, we have mapv / filterv / reduce-kv in production as of today
20:14seancorfieldtrilisp: welcome to clojure!
20:14meet_me_at_tarja@sean, i'm really excited
20:14trilispthank you guys! and gals!
20:14RaynesI'm not blue haired at the moment.
20:14seancorfieldmeet_me_at_tarja: so, yes, we have clojure 1.4 in production
20:14meet_me_at_tarjai've needed those tools for some algorithms
20:15seancorfieldwe've been testing against 1.4 builds for ages so it was an easy migration for us
20:15Raynesseancorfield: What are you using mapv and friends for?
20:15technomancyI'm surprised that mapv was considered more useful than map-map
20:16seancorfieldonce it was released a few days back, we started cleaning up ns macros and replacing (vec (map ...)) with (mapv ...)
20:16seancorfieldand (vec (filter ...)) with (filterv ...)
20:16RaynesI guess I've just never seen code where someone did that.
20:16seancorfieldonly found a couple of places where reduce-kv helped up (where we had reduce over a map)
20:17technomancyseems like it could be used instead of doall+map too
20:17technomancywhich is not necessarily a good thing
20:17Raynestechnomancy: Could and will.
20:18meet_me_at_tarjaoh, so mapv is just (vec (map ...)?
20:18RaynesNot really.
20:18RaynesOh.
20:18RaynesI guess it is.
20:18RaynesI figured the source code was more complex than it actually is.
20:18meet_me_at_tarjai guess i need to see the source code, but thats ulitmately two linear scans
20:19meet_me_at_tarjaand wouldn't do anything to lower my time complexity constants
20:19RaynesIt isn't calling vec on it.
20:19RaynesIt is reducing the collection into a transient vector.
20:19seancorfieldmapv is the more efficicent way to run map over a sequence and get back a vector
20:20seancorfieldheh, looking at the source i'm not even sure it is more efficicent
20:21seancorfieldwith a single coll, i guess it is?
20:22mdeboardjust got cemerick's book hot off the presses
20:22cemerickmdeboard: enjoy! :-D
20:22RaynesIf you call mapv on more than one collection, it just does (into [] (map ...))
20:22trilispI've been following an excelent tutorial creating a blog with clojure, I want to incorporate clojurescript, any sugestion of the best way to do it? the tutorial uses enlive
20:24mdeboardcemerick: Oh I'm not going to read it, I'm just putting it on my bookshelf to fool everyone into thinking I know what I'm talking about
20:24mdeboard:P
20:26meet_me_at_tarjawhether or not I use a mapv, filterv, etc, will have to come down to the results of running a jvisualvm test
20:27seancorfieldgot my copy of cemerick book on the 6th... ebooks rock :)
20:28RaynesI got mine before cemerick even thought about writing it. Reviewers get hardcore swag.
20:28seancorfieldtrilisp: not sure if it'll help you but i blogged a couple of examples of using clojurescript in simple situations: http://corfield.org/search/clojurescript
20:29seancorfieldadmittedly those links use FW/1 which is a very simple MVC web framework built on Enlive and Ring
20:29seancorfieldbut the basics of how to get clojurescript built should port over to whatever you're working on
20:34_atoxb
20:35trilispseancorfield: thank you very much I will check it out right away
20:38yoklovping ibdknox: how can I make jayq with advanced optimizations? (it worked with noir-cljs, doesn't work without)
20:38ibdknox:externs ["externs/jquery.js"] in compiler options
20:38yoklovah
20:40trilispI plan to extend the tutorial improving the html and adding clojurescript and cssgen
20:40RickInGAIf I am writing instructions for general consumption, should I tell people to install lein 1.7 or 2.0?
20:41technomancyRickInGA: general consumption of your library?
20:41RickInGAtechnomancy: I am trying to put together some getting started stuff for clojurescript
20:41RickInGAbut rule 1 for all clojure documentation should be install lein!
20:42technomancyhm; I don't know enough about cljs to say
20:42technomancybut it's pretty fast-changing afaict, so lein2 is probably fine for that
20:43technomancyyou don't have lots of existing compatibility concerns that might keep newbies on lein1 for general JVM clojure stuff
20:43RickInGAah, ok
20:44technomancy(this is coming from someone who hasn't used clojurescript)
20:44RickInGAso brand new = lein 2, using clj but not cljs will probably be on 1.7
20:45RickInGAI don't know much about it myself, but I am trying to leave a trail behind as I find my way
20:50technomancyconsider contributing to official documentation where possible
20:50technomancyso that mistakes and out-of-date info can be fixed in the future without your intervention
20:51RickInGAtechnomancy: will do. I am going to put some thoughts together in an organized fashion, and then see if the cljs people want it, or if I can just use it as a reference to suggest enhancements to what ever format they would prefer
20:52austinhSo, as somebody starting out on Clojure today, should I install Leiningen 2?
20:53technomancyaustinh: honestly I'm not sure in general. it's more internally consistent and powerful, but there are still plugins and documentation out there that haven't been updated yet
20:53technomancydepends on what you're doing and how much patience you have for tracking down out-of-date info
20:53austinhtechnomancy: Ok, that makes sense.
20:53RickInGAthe clojure community has some remarkable people doing amazing things, I am going to see what I can do to make theri work understandable to people closer to my level
20:54technomancyaustinh: all the major plugins have been upgraded, but I don't have a good feel for how many fringe plugins are still incompatible
20:55austinhtechnomancy: I'll give it a go.
20:55technomancyaustinh: if you do run into issues, I'm all ears
21:05yoklovRickInGA, awesome, theres nowhere near enough information on it
21:06yoklovi've been figuring it out mostly with guessing and stealing from working examples haha
21:09RickInGAyoklov: yeah, I think a lof of us are in the same boat.
21:10RickInGAI figure if I can come up with a systematic way to learn for myself, it will be useful for others too
21:12yoklovI feel like I've gotten a pretty decent handle on how to do what I need to, but that basically amounts to creating new projects, compiling, opening repls, and upgrading to the next most bleeding-edge version of cljs
21:12yoklovi don't do any client-server stuff
21:12yoklovand what i know how to do is very ad-hoc
21:13RickInGAI have played around with the html5 canvas, drawing rectangles, showing text and showing images, noting meaningful, but good for documenting :)
21:14yoklovhaha, I've been playing with the canvas too
21:14yoklovlots of fun in cljs
21:15RickInGAyeah, if you can figure out when you are dealing with html, when with js and when with cljs. that is the hardest part
21:15yoklovhm, I don't know if I see a big distinction between javascript-world and html-world but that might just be because both are familiar
21:17yoklovboth are annoying right now, to be honest. i feel like clojure's interop idioms don't apply as cleanly to javascript where you need to build/mutate objects for various apis
21:18RickInGAhave you done anythin with V8 or node from cljs?
21:19yoklovnope, considered using node via cljs to run the script I use to serve my dev. directory locally, but gave up and just used js when it seemed more difficult than it was worse
21:19yoklovworth*
21:22yoklovas far as I can tell you can't even really get a node repl yet
21:23yoklovso I think that that's especially bleeding edge
22:18xcvClojurescript question: has a best-practice consensus emerged about how to do the MVC (e.g. Backbone.js) pattern in a clojurescript-idiomatic way? I ask because my company is making a web app with a few 500+ line js MVC systems and am wondering how I would go about reimplementing them in clojurescript sometime in the future.
22:21xcvThat is, the Backbone.js pattern is quite stateful and I expect that a more functional approach would be taken by clojurians, and was wondering whether there were some good examples of a thoughtfully-implemented non-trivial clojurescript system out there that you know of.
22:26yoklovafaik (though someone else might know of one) there's nothing really like that out there. clojurescript's pretty young
22:33xcvwill be interesting to see how those large-scale patterns turn out
22:36seancorfieldyou might want to look at clojurescript one and see how it manages things (although it's a bit impenetrable if you ask me)
22:36seancorfieldbut then i might find backbone impenetrable too
22:36cmajor7is there an updated clojure read beyond "http://java.ociweb.com/mark/clojure/article.html&quot; besides the paper books? thx
22:40seancorfieldcmajor7: is there some specific area you're interested in?
22:41cmajor7seancorfield: I really enjoyed Mark's tutorial, but it is a bit outdated and wanted to have another resource to go over
22:43cmajor7clojure API docs are solid, but it is not very helpful just to go one by one.. without a supporting skeleton (e.g. such as Mark's tutorial)
22:46yoklovcmajor7, your best bet is probably a paper book
22:46yoklove.g. http://www.clojurebook.com/
22:47yoklovit's a bummer that tutorial is out of date though
22:47cemerickcmajor7: It sounds like you might find this helpful: http://clojureatlas.com (disclaimer: I'm the creator)
22:48cemerickFYI, a major refresh of that is going out tomorrow or Friday (to include Clojure 1.3 + 1.4, various other improvements, etc)
22:54cmajor7yoklov: thx for the link. I looked at http://stackoverflow.com/questions/2578837/comparing-clojure-books and am thinking on getting: http://pragprog.com/book/shcloj2/programming-clojure
22:55cmajor7cemerick: very cool, thx. is there a way to see some examples and "why would I use X", or is it coming?
22:56dnolenyoklov: thx for the PHM report
22:57dnolenyoklov: out of curiosity, why was 200ms the goal?
22:57cemerickcmajor7: The "why would I use X" is generally answered by the concepts a fn is related to.
22:58cemerickExamples are tough. There's clojuredocs.org, though that's a little spotty (and not particularly in line with the hand-curated thing I'm trying to go for).
22:58yoklovdnolen: yeah, it was
22:59devnclojurebook...like facebook, but for clojurians
22:59yoklovdnolen: it's pretty a pretty hopeless goal though, given that the code isn't really optimized at all
22:59dnolenyoklov: how long was it taking before PHM?
23:00yoklovdnolen: well over a second, i can give you a better number in a sec
23:00gfrederickshas "clojerks" been suggested as a name for clojure people?
23:01dnolenyoklov: were the maps small, but lots of updates?
23:01hiredmangfredericks: the name is taken
23:01gfredericksby the portland user group?
23:02yoklovdnolen: over a few hundred elements
23:02dnolenyoklov: oh, ok pretty big actually.
23:02hiredmanthe usage I am thinking of predates the portland user group
23:02gfredericksthen I am too young and/or naive
23:03hiredmanoh no, it is not a generally known group, I don't think I should talk about it
23:03yoklovdnolen: yeah, they were sets of [xpos ypos]
23:05cemerickdevn: that's creepy enough to be interesting :-P
23:05dnolenyoklov: gotcha.
23:07yoklovdnolen: as I said, its unoptimized code. before the change an iteration took about 1-2 seconds
23:07yoklovnow about 600ms
23:08dnolenyoklov: I'm not sure if hash maps in CLJS can ever reach plain js objects
23:08yoklovdnolen: yeah, I wouldn't expect them to
23:08dnolenyoklov: one big issue I think is lack of hashCode caching for strings.
23:09dnolenyoklov: unfortunate since PHMs are so fast in CLJS
23:09dnolener I mean CLJ
23:09yoklovdnolen: interesting, hadn't considered the cost of the hash function
23:10dnolenyoklov: hashCode caching could speed up collection perf of CLJS objects quite a bit, but not native ones.
23:12dnolenmmarczyk: do you think you could do some benchmarking of the various map implementations with a smaller set of keys? say 8 & 4?
23:13dnolenit also makes me wonder if representing keywords and symbols as strings was such a hot idea ...
23:13devncmajor7: i know this maybe isn't so helpful, but FWIW I own a copy of every single clojure book to date. i havent read all of programming clojure (prag) or clojure programming (oreilly) yet, but they all seem to sort of complement eachother nicely
23:15yoklovdnolen: yeah, and the sets in hex have around 400 elements
23:15dnolenyoklov: w/ PHM does profiling point out any hotspots?
23:18yoklovdnolen: hold on, i'll let you know. Gonna be tough to say for sure without doing advanced compilation
23:18yoklovand if i did i wouldn't be able to tell what was being slow
23:19dnolenyoklov: true but should still be able to get a likely ballpark with simple optimizations.
23:19dnolenyoklov: oh, make sure to set :static-fns true in your compilation options, I added that.
23:20yoklovoh
23:20achengis it true that clojure.data.xml should not be used yet since build.clojure.org is still at JDK 1.5 ?
23:20acheng(hello by the way :-P)
23:20cmajor7devn: seems that programming clojure (prag => 2nd edition) is the "freshest" one, and I am sure Stuart and Aaron won't disappoint. I usually don't read tech books cover to cover, but since there is no real one place to turn, besides Mark's article, to get a deep clojure feel, I think this might be one of the few I would finish..
23:21yoklovdnolen: what does that do? something having to do with the closure compiler?
23:21dnolenyoklov: no, it enables the direct / direct arity invocations
23:21acheng(some context: I just used clojure.data.xml to read in something and lost two attributes: xmlns:i and xmlns ... but they seem important to some other system of mine)
23:22yoklovdnolen: oh, okay, that makes sense
23:22dnolenyoklov: I decided it was a bad thing to have those on by default - messes w/ interactive development.
23:22devncmajor7: what's your background programming-wise?
23:23dnolenyoklov: btw, I showed of your Argh! at the NYC Clojure Meetup, people were impressed!
23:25cmajor7devn: usual suspects java, groovy, scala, c, erlang and friends
23:25Lajladnolen, why do you hate me, my most prodigal son?
23:25yoklovdnolen: that's awesome!
23:25dnolenyoklov: well it's very cool demo - it's nice to see the CLJS produces good code for your render loop.
23:25devncmajor7: i didnt read the link you posted above comparing books, but based on what you just told me, the joy of clojure is a fantastic companion to any of the books that are out there
23:26drewrdnolen: https://github.com/drewr/clojurescript/commit/c0ac588ca2245562acb11065128e0079b771ddfc
23:26achengoh. found a patch to clojure.data.xml by Carlo Sciolla on March 27, 2012 for adding support for namespaces both ways (parse/emit).
23:27devncmajor7: the joy of clojure is a really wonderful read and so much of it is generally applicable that you'll get a lot out of it I think
23:27dnolendrewr: cool, but I'm not sure what that error is about at all. master is stable.
23:28yoklovdnolen: i'm glad! though it's not particularly pretty code, too many variables to pass around, i end up having the choice between set!ing a bunch of vars at the beginning and having an enormous imperative-style 'render' function
23:28yoklovbut it's nice that performant code is totally within reach
23:28cmajor7devn: "The Joy of Clojure", noted, thx
23:29devncmajor7: np
23:29dnolenyoklov: yes, it's very exciting - and certainly important to me.
23:30dnolenyoklov: I think it's important that anything you would do in JS can be done in CLJS
23:30yoklovdnolen: obviously, otherwise it would be nearly impossible to attract anyone to cljs
23:30dnolenyoklov: plus it's eating your own dogfood, if we produce slow code - we can't implement better data structures w/o leaving the language.
23:30dnolenyoklov: agreed.
23:37yoklovdnolen: nothing stands out at me regarding hot spots for phm, actually now that I look at it, it seems that the seqs are really what's slowing down this code more than anything else.
23:37dnolenyoklov: k good to know!
23:37dnolenyoklov: chunked seqs not too far off I think.
23:39yoklovdnolen: that's awesome, it'll be nice when idiomatic clj code can be somewhat fast cljs code
23:41dnolenyoklov: I don't we'll ever really compete with loop/recur + arrays for raw perf - but we coudl definitely do a lot better.
23:43dnolenyoklov: it's a space I find pretty interesting. How much can we contain the absolutely perf critical portions of our application.
23:43yoklovdnolen: it definitely has been something i've been thinking about more lately
23:44yoklovwhere i can use maps/sets/seqs vs where i need arrays, haha
23:45dnolenyoklov: there's too little writing about this stuff - would be fun to read some posts about it.
23:45yoklovdnolen: and in my experience most web applications don't need that much speed
23:46dnolenyoklov: especially about languages that give you trap doors like CLJ/CLJS
23:47dnolenyoklov: yeah irrelevant for most web apps - that why I enjoy reading about FP & Games. That's a hard problem.
23:47yoklovdnolen: right, not very many other languages give you that flexability. often you just have the implicit option of "interop with c"
23:47yoklovdnolen: fp and games is quite hard, especially in terms of performance
23:48technomancyreplaca: is it intentional that pprint doesn't honor *flush-on-newline*?
23:48dnolenyoklov: definitely - tho I've been curious about someone doing a very fast matrix math DSL for LISP
23:49dnolenyoklov: macros, no function calls.
23:49yoklovdnolen: thats very interesting
23:50yoklovdnolen: macros for performance always seemed sort of obvious, but then when it comes to actually doing it, much more difficult
23:50dnolenyoklov: I feel like this is what Jim Blinn was talking about with C++ template programming for graphics.
23:52yoklovdnolen: its definitely terrifying territory
23:53dnolenyoklov: haha
23:54dnolenyoklov: could be very cool tho - only a hunch - but you could get fast code you just would never write in JS.
23:54yoklovdnolen: though, that actually gives me some good ideas of how i might be able to make argh's rendering code a bit cleaner
23:54dnolenand it could still be functional.
23:55echo-areaIs it possible to write an iteration as fast as Java equivalent?
23:56echo-areaIf possible, how?
23:56dnolenecho-area: loop/recur
23:56yoklovdnolen: hm, is definitely something worth thinking about, and would be interesting in terms of things cljs can do that js can't
23:56dnolenyoklov: if it could be demonstrated, even a simple version it would be a very neat blog post.
23:56echo-areadnolen: But that's almost 5 times as slow as Java counterpart
23:56dnolenecho-area: it is not.
23:57dnolenecho-area: loop/recur generates the same bytecode as a for loop
23:59dnolenecho-area: if you're seeing a perf hit, you may be operating on boxed numbers.
23:59echo-areadnolen: A moment, I'm preparing to show you what I did