#clojure logs

2011-11-25

00:07hhutchcan anybody remind me how to use javascript's this in clojurescript? somebody wrote a macro or something but for the life of me I can't find it again
00:13hhutchah, found it, this-as
01:12ben_mHi everyone :) I'm trying to use lwjgl with Clojure, but I can't seem to get everything working. I included lwjgl in project.clj (clojars), but when I try to actually import lwjgl, I get ClassNotFound errors
01:13amalloyyou're importing the wrong class, probably
01:13amalloy$google lwjgl javadoc
01:13lazybot[LWJGL javadoc] http://lwjgl.org/javadoc/
01:13ben_mAppears to be correct :/
01:14amalloyben_m: so what does your import look like?
01:14alexbaranoskyI think I just got the lein-midje plugin to work with lazytest!
01:15alexbaranoskylein midje --lazytest
01:15ben_mWait a second, just realized I probably can't use imports the same way in the ns macro as I do in the (import) function, checking ...
01:15amalloyyou can, actually
01:17ben_mNow I get an UnsatisfiedLinkError, pasting source...
01:17ben_mActually, I can take everything out but "(:import (org.lwjgl.opengl Display DisplayMode GL11))"
01:17ben_mOnly relevant part I suppose
01:18amalloyuhhhhh, missing a native library maybe? not really my area anymore
01:19ben_mNo idea ... I'll just continue googling, thanks anyways though!
01:38ben_mMhh, do I need anything else to use :native-dependencies in leiningen?
03:51ben_mIs there a nice way call a series of static methods without having to repeat the Class everytime?
03:51ben_mAs in (GL11/foo) (GL11/bar) (GL11/cake 1 2)
03:56amalloyno. you can write a simple macro for it, though
03:56Chousukeprobably not, but if you do it often, it's easy to write a macro
03:56Chousukeyou could probably use doto and the . form somehow, too
03:56amalloyChousuke: no, actually
03:57amalloy&(Integer/valueOf "10")
03:57lazybot⇒ 10
03:57amalloy&(let [x Integer] (.valueOf x "10"))
03:57lazybotjava.lang.IllegalArgumentException: No matching method found: valueOf for class java.lang.Class
03:57ChousukeI didn't mean like that.
03:57amalloythat's what doto is going to expand to, so...?
03:58Chousukeoh right it does the let internally.
03:58ben_mAh, too bad
03:58ChousukeWhy not just (-> Integer (. (foo)) ...) or something?
03:58Chousukedoes that work
03:59amalloyChousuke: works for the first call
03:59ChousukeI guess you'd need something like doto-> :P
03:59amalloy(defmacro static-calls [c & calls] (cons `do (for [arglist calls] `(. ~c ~@arglist)))) is probably enoguh?
04:00ben_mSmart, thanks :)
04:00ChousukeI really don't remember the . syntax anymore
04:00amalloyit's handy to have the primitive . available for macros
04:00Chousukeyeah it is
04:01ben_mThat static-calls macro should be in clojure-contrib :D
04:01Chousukethere's little use for generating sugared forms in macros.
04:01amalloyblech. clojure-contrib should not contain "everything useful someone might ever need but could build themselves in thirty seconds"
04:02Blktgood morning everyone
04:02amalloyhowever, what you can do, and i do encourage, is create your own utilities library, put it on clojars, and then use it from your own prijects
04:02ben_mMorning :)
04:02Chousukesometimes it's less trouble to just rewrite the same piece of code whenever you need it.
04:03ben_mProbably yeah :)
04:05amalloyfor a single function that's sometimes true
04:06amalloybut really you'll have a lot of functions you want in several places. hence, a library on clojars
08:04Guest68196hello all - again a noob question from someone with lisp-2 background concerning workflow. let say i have a data structure where i have functions. and at the client side i traverse this structure and from time to time call some of the functions. then i change the implementation of one of this functions, in lisp-2 i could have just reevaluated this function and call it over the structure...
08:04Guest68196...again and get the desired result. now - in lisp-1 i'm not sure how to do that without the need to reload everything in my datastructure before seeing the changes i did to that concerned function. an example follows:
08:04Guest68196(defn x [] "hi")
08:04Guest68196(def f (ref x))
08:04Guest68196(defn y [] (@f))
08:06Guest68196now - if i change x to print "bye" instead of "hi" - is there any possibility to call y and see the changes without reloading f? (in real world f is pretty big and timeconsuming to create)
08:06raekGuest68196: yes. instead of storing the then current value of x in the data structure, store the var x: #'x
08:07raekwhen you call a var, it will delegate the call to its current value
08:07raek(def m {:f #'x})
08:08raekwhen you call (:f m), it will always use the most recent definition of x
08:09raekalso, not this: in (defn y [] (x)) the most recent definition of x will always be used
08:09raek*note this
08:09Guest68196raek - now it works - thank you a lot! now i'll have to reread the section about vars... didn't got that from the first reading.
08:10raeka var is a cell that holds a value. it is the thing that changes when you reevaluate a def form.
08:17Guest68196now i found the relevant documentation, ty again, raek!
09:09malkomalkowhen using anon functions #(), I'm getting 'Wrong number of args (2)' when used as my reduce function.. this only happens if I don't use %2 in my anonymous function.. is there a way with anon functions to just take some of the params you need without receiving that error message?
09:12raekmalkomalko: yes, use the full fn form
09:12raek(fn [x y] ...only use one of x and y here...)
09:13raekalso, why are you using reduce when you are ignoring one of the args?
09:13malkomalkogoing through a 4clojure example
09:18malkomalkoi can use the anonymous form and just throw away the variable with do I guess.. ok thanks for the help
09:38radswhen I try to open a REPL with vimclojure using MacVim (\sr), vim freezes. however, if I try it with vim in the shell, it works fine. anyone know why?
09:41gmcnultyhi, can anybody here help me with an bit of code that I think is holding the head of a sequence?
09:43bhenrypost your question and we'll find out
09:44gmcnultyok, so I have a piece of code to split a sequence of strings into files of roughly x-size, the code is at http://pastebin.com/5Bw7S2Hj
09:44gmcnultyso when I call split-file with 4 args (so it only returns the first split) my memory profile is fine
09:45gmcnultybut when I call it with the 3 args, my memory goes up until everything runs very slowly (not swapping, just hit jvm xmx)
09:45gmcnultywhen the first split finishes, memory usage goes down again and cpu runs fine until end of 2nd split etc
09:46gmcnultyso I'm convinced the head is being held in this bit of code:
09:46gmcnulty(defn split-file
09:46gmcnulty ([path strs split-size]
09:46gmcnulty (loop [ss (seq strs), part 0]
09:46gmcnulty (when-let [more (split-file path ss split-size part)]
09:46gmcnulty (recur more (inc part)))))
09:46gmcnultyI'm using clojure 1.3.0
09:47radsnevermind, my problem with vimclojure was that my MacVim.app was symlinked to an old version rather than the latest one from homebrew
10:23gmcnultyhm, so if nobody can help me with my head holding seq. issue, can anybody link me somewhere that I can learn to debug it?
10:48bhenrygmcnulty: perhaps you can put a doc string and/or a sample of input?
11:07gmcnultybhenry: http://pastebin.com/7Az7cXGa
11:07gmcnultyhow's that look?
11:10bhenrygmcnulty: i'll check it out in a bit
11:39ljosAny one have any good ideas for how I could replace a random child in a zipper?
11:43ljosOr, what I want to do is replace a random node in a tree. I have been using a zipper right now to iterate through it. The tree is represented by a list.
12:23antoineBhello, what are the 7 core "macro"?
12:23antoineBset, if, ...
12:24tolstoyantoineB: http://clojure.org/special_forms ?
12:27antoineBthanks tolstoy , but i remember there were 7, and all other macro are built with them
12:30tolstoyantoineB: According to Paul Graham, they're: quote atom eq car cdr cons cond.
12:30tolstoyhttp://lib.store.yahoo.net/lib/paulgraham/jmc.ps
12:46antoineBthanks tolstoy but your first link seems to be what i want
12:46tolstoyHeh. Okay.
12:52TimMcBecause of Clojure's logo, I finally got off my ass and downloaded the SICP textbooks + lectures. :-)
12:52TimMc(and am using them)
12:52ejacksonTimMc: good stuff dude.
12:53TimMcI was explaining to someone about the yin-yang aspect of the logo and how I thought it was a reference to the eval-apply thing on SICP's cover.
12:58TimMc"Computer science in some sense isn't real. [...] Computer science deals with idealized components. [...] We don't have to worry about tolerance. And that means that in building a large program, thaere's not all that much difference between what I can build and what I can imagine. [...] The constraints on large software systems are the limitations of our own minds."
12:58TimMc*fantastic* stuff
13:00ejacksonyeah... until that vastness lays waste tracts of your mind :P
13:01ejacksonit is like the abys that peers back
13:43pmooserI don't suppose anyone here happens to be a marginalia expert?
14:27pmooserMarginalia's parser seems rather fragile … I'm finding that I'm frequently breaking it, but don't understand the marg code quite well enough to usefully debug it.
14:27pmooserIt's also possible that I'm doing particularly crazy things …
14:56reiddraperany ideas on debugging something where the only output is: ClassCastException [trace missing]
15:02pmooserDo you know offhand why the stack trace is being omitted ?
15:02reiddrapernope, that's part of why i'm confused
15:03pmooserI ask because there's a condition under which hotspot will cause stack traces to be omitted from exceptions, and there's a JVM option to disable it.
15:03pmooserIf you google for OmitStackTraceInFastThrow, you can find that information.
15:03pmooserI've seen that issue in our production java apps, but I'm not sure it's likely to happen if you're just interactively developing something.
15:03reiddraperfwiw, this is "just" lein repl
15:03pmooserDoes the exception at least tell you what is being cast to what ?
15:04reiddraperno, that's the whole of the output
15:04reiddraperhowever I've changed something and now I can at least get:
15:04reiddraperClassCastException clojure.lang.Keyword cannot be cast to java.util.Map$Entry clojure.lang.APersistentMap$KeySeq.first (APersistentMap.java:132)
15:05pmooserThere you go, so at least you know what is being cast to what …
15:05reiddraperI have an idea of which of my clojure code could be the entry-point to that, but it doesn't make sense to me
15:06pmooserWhen does this occur - just at the repl ?
15:06pmooserOr are you compiling a larger file ?
15:06reiddraperyes, haven't tried it any other way
15:06reiddraperrepl
15:06pmooserSo what's the code that causes this ?
15:07pmooseri.e., what are you entering into the repl
15:07reiddraperpmooser: here's the program https://gist.github.com/2c9e46d5bd26f0779a48
15:07reiddraperand at the repl i type
15:09reiddraperhttps://gist.github.com/2c9e46d5bd26f0779a48#file_repl.clj
15:09pmooserI can compile that code fine
15:09pmooserOk, looking at your repl thing
15:11reiddraperpmooser: it seems to be this line in `conj`: (assoc adds k now)
15:12reiddraperor rather, it at least doesn't through an exception if i construct a LWW type by just calling (LWW. {} {}) there
15:12reiddrapers/through/throw
15:13pmooserHmm … I'm getting a weird error from my slime repl when I try to conj onto your thing
15:13pmooserbut that doesn't tell us anything interesting unfortunately
15:14reiddraperpmooser: thanks for helping btw
15:14pmooserNo problem, I don't mind trying at least
15:16reiddraperso if I just make this call: (assoc adds k :foo)
15:16reiddraperbefore the LWW constructor, it does not throw an exception
15:18pmooserhmmm
15:19reiddraperbut if I just replace L36 in that gist with "adds", no exception either
15:20fliebelWhich parts of Java doe Clojure need to run?
15:22pmooserI'm having a hard time even testing this, reid, due to some peculiarity of my repl environment
15:22pmooserEven evaluating simple expressions creating LWWs in my repl is hanging with an error
15:23pmooserIt may be that I'm having a more general deftype issue or something
15:23pmooserbut i don't think it's particular to your code
15:23pmooser(my errors are not, that is)
15:24reiddraperpmooser: clojure 1.3.0?
15:24reiddraperthat's what i'm using fwiw
15:24pmooserYeah, 1.3.0
15:27pmooserI did not realize you could do what you are doing with java.util.Set there.
15:28reiddraperpmooser: maybe you can't :), haha
15:28pmooserYeah, I'm not sure what the semantics of it would be.
15:28pmooserI know in deftype you can provide overrides of methods on Object
15:29pmooserBut I have no idea what it means if you pass in arbitrary classes (as opposed to interfaces or protocols)
15:29reiddraperwell as i understand, java.util.Set is a java interface, not a class
15:29reiddraperso that's why it *should* work
15:29reiddraperpmooser: http://docs.oracle.com/javase/1.5.0/docs/api/java/util/class-use/Set.html
15:29pmooserSorry, you're absolutely right
15:30reiddrapernp
15:30pmooserI was thinking HashSet
15:31pmooserI'm still trying to figure out what precisely about your definition is freaking out my repl
15:33reiddraperpmooser: i can add you in the whole github project if you want to just try lein repl in the root dir
15:35pmooserI'm going to have to leave the cafe I am in shortly, but I am trying a few other things …
15:35reiddraperok, I appreciate your help either way :)
15:36pmooserThe definition of seq is what is freaking out my repl
15:36pmooserI'm not sure why yet
15:37reiddraperpmooser: aha, that might be the problem actually!
15:37pmooserYeah, I'm looking at your code for minus-deletes now
15:38pmooserDid you find an underlying issue ?
15:38reiddraperi think, one moment
15:38reiddraperyes, so the (keys minus-deletes...) call should just be (minus-deletes)
15:39reiddraperand I'm guessing that maybe seq gets called on the obj trying to print it at the repl, or something
15:39reiddraperso the cons call was fine, and if nothing got added to the set, seq would just return nil
15:39pmooserSo does it work for you now then ?
15:40reiddraperit seems so
15:40reiddraperthanks again for your help pmooser
15:40pmooserYes, it looks like it fixed it for me as well
15:40pmooserGlad to be of assistance, and sorry again for the false alarm about java.util.Set
15:41pmooserSee you later !
15:41reiddraperyou too, thanks
16:03technomancywoo; got a patch together for http://dev.clojure.org/jira/browse/CLJ-879
16:04technomancyman, is there a way to turn off jira's stupid "hey bro, looks like you just posted a comment! here it is in case you forgot: [...]" emails?
16:05AWizzArdOne can configure the email settings of Jira.
16:05AWizzArdIn my first install I was informed about every event, which meant a trillion of mails per time unit.
16:08technomancythis is a feature whose only use case applies to chronic amnesiacs.
16:08technomancythat's taking accessibility to a whole new level, I guess.
16:10AWizzArdThis is partly meant for people who use their email client as the UI for Jira, and who also comment or open issues via email.
16:11technomancyfor your _own_ comments though? I dunno.
16:11AWizzArdMaybe to comment your comments… (:
16:12AWizzArdtechnomancy: please have a look at your private query windows.
16:19devntechnomancy: i don't get jira email
16:20technomancydevn: are you sure you didn't just dev/null it one day in a fit of rage and forget about it? =)
16:20devntechnomancy: i was actually just wondering whether or not I did that. :)
16:22devntechnomancy: but no, I'm pretty certain I didn't do a giant purge of subscriptions in the last couple years -- I've been pretty jucicious ever since The Great Junk Inbox of 2007
16:30choffsteinHey all. I have a quick question. Is there a function similar to ->, but instead of threading a value into different functions, it threads a function across multiple values? So, for example, let's say I have (defn adder [x] (fn [y] (fn [z] (+ x y z)))), instead of calling (((adder 1) 2) 3), I can call (??? adder 1 2 3) ?
16:34hiredmanso, like, reduce?
16:34choffstein…no
16:35choffsteinWell … maybe
16:35choffsteinBasically, I have a function that keeps returning functions
16:35choffsteinThat I want to pass values into
16:35hiredman,(reduce #(%1 %2) (fn [a] (fn [b] (fn [c] (+ a b c)))) [1 2 3])
16:35clojurebot6
16:36dakronechoffstein: auto-currying?
16:36dakronesort of
16:36choffsteinYeah, sort of
16:37choffstein(this is more of an intellectual curiosity more than anything)
16:47choffsteinI guess I could just take that reduce and turn it into a simple macro, huh hiredman?
16:57choffsteinOkay, I'm horrible with macros. Any idea why this works: (defn auto-curry [fn & args] (reduce #(%1 %2) fn args)) (auto-curry adder 1 2 3), but this doesn't: (defmacro auto-curry [fn & args] `(reduce #(%1 %2) fn args)) (auto-curry adder 1 2 3).
16:58amalloychoffstein: you forgot some ~ thingies
16:58choffstein…stupid, stupid, stupid
16:58amalloyprobably ~fn ~@args
16:58choffsteinright. no, just forgot to add that into IRC. Have that in my code.
16:58amalloyokay
16:59amalloyso f here is expected to be a curried function already, and you're applying it by "uncurrying" it?
16:59choffsteinI thought ~@ spliced the array. With reduce, I think I want to keep the args as an array
16:59amalloyyes, so you do. i was just noticing that
17:00choffsteinYeah. Basically, instead of calling (((curried-fn 1) 2) 3) I can called (uncurry curried-fn 1 2 3) or something like that
17:00amalloyso let me guess, you're getting an exception about casting a non-function to a function?
17:00choffsteinYou're a genius ;)
17:00amalloyreplace ~args with ~(vec args)
17:01choffstein...
17:01choffsteinThat worked
17:01amalloythe problem is that the macro's return value is executed as code, and & args prints as a seq, ie (x y z)
17:01amalloyif you want it to print as a collection, you need it to look like [x y z]
17:01choffsteinOohhh
17:02choffsteinSo, style question here: what would be preferred: making this a macro or just a function?
17:02amalloyfunction for sure
17:02amalloyyou could consider making a macro to create a curried function from a normal function, but there's no need for a macro just to call reduce
17:03choffsteinSo, it seems to me like -> could be implemented as a recursive function. Why implement it as a macr?
17:04amalloyyour premise is false
17:04hiredmanhow could you implement it as a function?
17:04hiredman,(-> [a (range 10)] (for a))
17:04clojurebot(0 1 2 3 4 ...)
17:05choffstein...right
17:05choffsteinjust kidding.
17:05choffsteinI forgot about the nicety that not all the functions are partials.
17:05hiredmanhuh?
17:06choffsteinSorry -- in my mind I was thinking ->>, not ->
17:06hiredman,(->> a (for [a (range 10)]))
17:06clojurebot(0 1 2 3 4 ...)
17:06hiredmanhow could you rewrite either as a function?
17:06choffsteinRight. You can't.
17:08choffsteinI was just thinking if you had a list of partial functions that you just needed to apply a value to, you could implement it as some sort of recursive function
17:08choffsteinbut that's not what -> or ->> does
17:09choffstein(don't mind me -- I'm just being an idiot)
17:11amalloyso choffstein, just for fun here's a primitive not-very-good macro to create a curried function from a normal one: https://gist.github.com/1394517
17:11choffsteinCool. I'll take a look. Thanks :)
17:18amalloyoh god. i never should have mentioned xmlns on clojure-dev, apparently. people are going nuts
18:01miltondsilvadoes recursiveness(specially from multiple points) complects data structure creation(trees) with their manipulation?
18:09lucianmiltondsilva: i'm sure one could define an API for manipulating cyclic graphs
18:12miltondsilvaare you a mind reader? :P actually I'm doing some work on that.. but I'm not sure it will become an API... still how do you link cyclic graphs with my question?
18:12miltondsilvaa full API*
18:16miltondsilvaon interesting idea I still didn't explore much but seem interesting is defining most graph operations with the aid of core.logic... maybe define graphs as relations and then define some set of constrains e.g. a path-> constrain 1 : begins on node S and ends on T, constrain2 : no repeated nodes
18:23drkshello. how to get convert '(\a \b \c) to "abc"?
18:23duck1123(apply str
18:24drksthanks. how does that work though? I assumed I would get '("a" "b" "c")
18:25amalloythat would be (map str
18:25duck1123(apply str '(\a \b \c)) is the same as (str \a \b \c)
18:25drksright, not thinking clearly
18:52tolstoyI'm running autodoc standalone in the root of my lein project, but it keeps giving me class not found exceptions for the files it clearly found. Anyone know what's up?
18:55tolstoyAlas, I've never been able to get autodoc to work in any context. Can't even install it under current clojure (1.3) and lein (1.6.2).
18:55cgray`is something like https://gist.github.com/1394690 in a standard clojure library?
19:03amalloycgray`: looks like a special case of clojure.walk/prewalk-replace
19:05amalloy(prewalk-replace #(if (do-update? %) (how-to-update %) %) root). or if you want to pull in the `useful` library, you can write (prewalk-replace (to-fix do-update? how-to-update) root)
19:07cgray`amalloy: cool, it's a useful little function, so i thought i'd see if it's there... it doesn't surprise me that it is :)
19:08cgray`amalloy: from the docstring to prewalk-replace, it's a bit hard to see that your function would work, but it clearly does
19:10cgray`amalloy: i guess it's really more like prewalk than prewalk-replace
19:10amalloyit just replaces x at each layer with (f x). i gave it an f that says: "if you should change it, then change it, otherwise leave it alone"
19:11amalloywhich is what you're doing, except that you don't walk the replaced element
19:11cgray`amalloy: yep, i get that. the fact that it talks about a map rather than a fn is what was throwing me off.
19:12amalloyhaha wow, so it does
19:12amalloythat is a terrible docstring
19:13cgray`well you meant clojure.walk/prewalk :)
19:15amalloyyeah. does it actually work with prewalk-replace? it doesn't seem like it should
19:15cgray`no, prewalk-replace has a contains?
19:19amalloyincidentally, prewalk-replace would be better written as (prewalk (fn [x] (smap x x)) form). shorter, clearer, and faster
19:38tolstoyIs autodoc even currently maintained? Marginalia works great, but it's not so good at a simple API doc.
19:51drkshow well does clojure work with slime? is this a commonly used environment?
19:51cgray`drks: it works well once you get it set up.
19:53cgray`i find the setup the easiest with emacs 24, so if you don't have that yet, you might want to upgrade
19:53amalloydrks: clojure works quite well with slime, though not as well as some other lisps (eg CL)
19:54eriderworks with vim too ;0
19:55amalloyfor example we don't get slime-who-calls, and you don't have as many options after an exception as CL does after a condition
19:56cgray`is there any work on getting locals in the stacktraces? that would be my number one wishlist feature...
19:57amalloycgray`: i think that's probably something that will get into one of the "less lean" builds that rich was talking about at the conj. but hugod and gjahad surely know more than i do; maybe one of them's already done it
19:59mark1Is there an update-in that works with multiple [k & ks]?
19:59mark1Something like https://gist.github.com/1394768?
20:00cgray`mark1: (-> entity (update-in foo bar) (update-in baz quux)))
20:01mark1cgray`: Ahh, seems obvious now!
20:01mark1Thanks!
20:33seancorfieldis there a "modern" equivalent to clojure.contrib.repl-utils/show?
20:33amalloyseancorfield: the slime inspector!
20:33amalloyC-c I (capital i), then an expression
20:35seancorfieldwhat about for someone using a regular repl?
20:35amalloy*shrug* afaik show was not ported to 1.3. you can write a barebones version fairly quickly with reflection
20:36drksamalloy sorry was away. in what way doesn't it work as well with it as CL?
20:36seancorfield'kthx
20:37drksanything else besides slime-who-calls and exceptions
20:37amalloyi'm not going to exhaustively list every feature that slime-cl has
20:37amalloyi don't even use CL, i just happen to know it has some better toys than we do
20:38drksok. I'm just curious are there any technical reasons clojure doesn't have these
20:38drksor it's just a matter of them not being implemented yet
20:38amalloyit's just work to implement them swank-side. some of them are basically impossible on the jvm, like condition restarts
20:57seancorfieldclojure.reflect/reflect looks like a good replacement for c.c.repl-utils/show, no?
21:00amalloydunno, i've never looked at it. if it does what you want, you don't need my approval to use it :)
21:01seancorfieldarohner: i'm trying to use lein-test-out 0.1.1 but it doesn't seem to be working... what's the latest version of lein it's been tested with?
21:02arohnerseancorfield: oh, it's been a while. Probably lein 1.4.2
21:03seancorfieldah, ok, i'm on lein 1.6.2... i think it worked with lein 1.5.x but i can't remember when i last tried it...
21:03arohnerseancorfield: I actually need it to work too, soon. I'll see if I can get it working next week
21:03arohnerand I'm happy to take patches if you get it working sooner
21:04seancorfieldi'll see what the priorities are at world singles next week...
21:04seancorfieldi have a high priority ticket around a new type of profile search but if i get that out of the way early on, i may have time to jump on lein-test-out next week
21:05seancorfieldi'll clone it and bump the priority of the ticket (at world singles) for integrating our clojure unit tests with hudson etc
21:20drksis there a function like + that can sum chars or should I write my own? (char+ \0 1) => \1
21:23amalloyi doubt if you want to sum chars. you probably want to add ints to them
21:24amalloyanyway, the answer is that java wishes you wouldn't treat characters as numbers, so if you want to you have to convert to int first: ##(+ (int \0) 1)
21:24lazybot⇒ 49
21:24amalloy&(char (+ (int \0) 1))
21:24lazybot⇒ \1
21:30drksthanks
21:43seancorfieldarohner: looks like something changed in eval-in-project and that's what has broken test-out
21:49seancorfieldarohner: i have it generating junit XML again (yay!) but i haven't figured out how to use that with ant's junit report task (which means i'm about back where i was with test-out and lein 1.5.x so that's "ok")
21:51lonsteinfiddling with clojurescript, cljsc compiles my src but in the browser it errors that subvec is undefined...
21:52lonsteinare portions of clojure.core unimplemented?
21:59seancorfieldarohner: sent you a pull request - not sure if it preserves the original semantics but it seems to "work"... i now need to do more work on my end to get the output transformed by ant (i think!)
21:59seancorfieldlonstein: right, not all of clojure.core is implemented yet
22:00lonsteinseancorfield: yeah, ok. skimming the src/. drat.
22:06lonsteinI suppose I could rewrite it in terms of take
22:19seancorfieldif you have a CA on file, you could write subvec and contribute it :)
23:20lonsteinrewrote it in terms of split-at... also figured out a bit of interop. nice.
23:23amalloyi just put together a quick cljs subvec, but i don't actually know how to run cljs to test it. seancorfield, lonstein: any pointers?
23:25Raynesamalloy: https://github.com/clojure/clojurescript/wiki/Quick-Start
23:30amalloythanks. nice to see it works without a hitch now; last time i tried it wasn't working on openjdk yet
23:57amalloywhat about running cljs tests? ./script/test churns for a while and then exits without printing anything, even if i add (assert false) to cljs.core-test