#clojure logs

2012-08-31

00:02cemerickI'm going to have to write one hella rant after this site is built.
00:02cemerick:-)
00:02brehautexcellent
00:04cjfriszOh, macros...
00:13nsxt_cemerick: what sort of site are you building?
00:15cemericknsxt_: One of the web variety. :-)
00:16nsxt_cemerick: aww, fine... understood. :)
00:16uvtcI hear it may reside somewhere on the internet.
00:16cemericknsxt_: hopefully you'll know all about it soon enough.
00:17nsxt_cemerick: is it related to your work with clojureatlas?
00:17cemericknah
00:17nsxt_(p.s. just in case you don't get enough thank yous for that, here's a hearty pitch)
00:17cemerickaw, thanks :-)
00:19wmealing_ive heard of those internet websites.. they are the future.
00:20cjfriszI hear the internet is on computers now
00:21amalloyi think they're being replaced by cloud websites
00:24Raynesamalloy: How do they get those sites all the way up there?
00:24uvtcCloud-based with a chance of Raynes.
00:26wmealing_*groan*
00:31cbarenoob question:
00:31cbareIf I have a bunch of functions. They either return false or a result. I want to apply them sequentially and return the first non-false result.
00:32cbareIs there a construct for that already?
00:32tos9,(doc dropwhile)
00:32casion(first (drop-while
00:32clojurebotTitim gan ?ir? ort.
00:36cbaresomething like this? (first (drop-while #(% my-input) [f g h ... ]))
00:36uvtcI am so spoiled by the Clojure cheatsheet. Wonderful.
00:36casionuvtc: do you know of a 1.4 cheat sheet with popup docs like http://jafingerhut.github.com/cheatsheet-clj-1.3/cheatsheet-tiptip-no-cdocs-summary.html
00:36tomoj&((some-fn :foo :bar :baz) {:bar false :baz 3})
00:36lazybot⇒ 3
00:37uvtc~cheatsheet
00:37clojurebotCheatsheets with tooltips can be found at http://jafingerhut.github.com/ .
00:37uvtc:)
00:37casionthis is 1.3 though
00:37uvtcThanks, casion .
00:37uvtcOh.
00:37tomojcbare: so ((some-fn f g h) my-input) or ((apply some-fn [f g h]) my-input)
00:38casionI didnt even know about mapv until yesterday because I rely on that too much haha
00:38uvtccasion: No, I only know of the one at clojure.org and the jafingerhut ones with the tooltips.
00:38casionuvtc: I guess I'll look into how jafingerhut put together the 1.3 ones
00:38casionand see if I can make 1.4
00:39uvtcThe tab-completion in the repl also helps.
00:40amalloysome-fn makes me so sad. anyone want to guess what ((some-fn = >) 5 10) returns?
00:40cbaredo the functions you give to some-fn have to be predicates? Or can they return composite values?
00:42casionamalloy: why is that confusing? (= 5) is true
00:43Scriptoramalloy: isn't it just a short-hand way to write an or expression?
00:43Scriptoras long as any of the predicates returns true, it does
00:43amalloycasion: because (or (= 5) (> 5) (= 10) (> 10)) is a much less generally-useful function than (or (= 5 10) (> 5 10))
00:44amalloyand it's much easier to get the former behavior from a some-fn that behaves like the latter, than it is to get the latter from a some-fn that behaves like the former
00:44uvtcI thought you're only supposed to pass single-arg predicates to some-fn. So, it looks odd with `=` in there.
00:45amalloyuvtc: yes, that is the existing behavior of some-fn, which i am arguing is useless
00:49casionamalloy: would you wish it to process pairs or capture all arguments
00:49amalloyhuh?
00:50casionlike ((some-fn > ) 5 6 7) would be (> 5 6 7) or (or (> 5 6) (>6 7))
00:50casionobviously they are the same in that context
00:51amalloynone of those, they don't make any sense
00:52amalloyfor one function arg, some-fn as it is now is perfectly fine
00:52uvtcamalloy: Not exactly sure what behaviour you'd like to see.
00:53amalloy((some-fn f g h) a b c) (or (f a b c) (g a b c) (h a b c))
00:55amalloyie, for N function args and M "value" args, it should be like an 'or with N clauses, each calling an M-arg function with all the values
00:57amalloyand the existing behavior is not useful at all. the second example on http://clojuredocs.org/clojure_core/clojure.core/some-fn (which you mentioned to me that you added, uvtc) could easily be (some (some-fn even? #(< % 10)) [1 2 3])
00:58amalloyliterally all the current handling of multiple args ever saves you is the characters (some []), whereas my proposed handling could actually make operations simpler
00:58Raynesamalloy: But is it web scale?
00:59wmealing_ಠ_ಠ
01:01cbarefor what it's worth, some-fn seems to do what I wanted, thanks tomoj!
01:15casionamalloy: doesnt juxt do what you want?
01:15casion(or (juxt f g h) a b c))
01:15casioner, missed a set of parens
01:15amalloyno
01:15amalloybut it's not far, i suppose
01:16amalloy(some identity ((juxt f g h) a b c))?
01:17casion((juxt f g h) a b c) returns [(f a b c) (g a b c) (h a bc )] which is what I thought you were after?
01:17casionI think I may be mis understanding
01:17amalloyyou seem to be attempting to apply 'or in a way that does not work
01:18amalloywhich is why i replaced it with some identity
01:18casionah, I see
01:21jebberjebIn idomatic clojure, are there some guidelines for when to use macros?
01:22jebberjebMaybe that's not the right way to articulate this...
01:22jebberjebwhen should I use macros:)
01:26casionbranching macros in clojure still confuse me at times :|, the idea of 'when' or 'and' or 'or' etc.. returning a non-boolean value refuses to stick
01:28amalloyjebberjeb: when you need to evaluate something in a new or non-standard context
01:29amalloyeg, (let [x 1] x) is a macro that evaluates its body, x in a context where there is a local named x bound to 1
01:29amalloy(when foo bar) is a macro that evaluates its body, bar, only when foo is not truthy
01:34tomojcljs has :import now too :)
02:32ivanis there any kind of client authentication mechanism for nREPL?
02:35ivanI guess I could combine openssl s_client and a netty listener that checks the client's cert
03:03bloudermilkI've been reading online and I can't seem to find a definitive answer: Are circular dependencies in Clojure a bad idea? Specifically, I'm trying to work with directed graphs
03:04amalloya circular reference is not possible in an immutable data structure
03:05amalloyso you can't really have a circular dependency in the object graph
03:06amalloyinstead, usually you'd have pointers to "labels", rather than to objects themselves: {'a {:data 4, :edges #{'b}}, 'b {:data 10, :edges #{'a}}}, for example
03:20bloudermilkamalloy: Thank you, this makes sense
03:21bloudermilkamalloy: What about with transients?
03:21amalloynot relevant
03:23kralnamaste
03:24bloudermilkamalloy: noted
03:24augustlamalloy: never thought about the impssibility of circular refs before, that's awesome
03:25bloudermilkamalloy: Not even with refs?
03:25bloudermilkimmutable data is blowing my mind
03:25amalloy*shrug* you can have refs point to each other, but you won't be able to get an immutable snapshot of the data structure, so it's pretty worthless
03:27bloudermilkamalloy: Indeed, it seems like the wrong thing to do. Other than labels, how else would one maintain an efficient circular data structure?
03:27bloudermilkOr are labels not horrible inefficient...
03:27bloudermilk*horribly
03:29amalloystep 1: make it work. step 2: make it fast. (step 1.5 is usually realizing that most of it doesn't need to be optimally super-duper-extra-fast)
03:30bloudermilkamalloy: duly noted
03:34jdjDon Knuth: "Premature optimization is the root of all evil (or at least most of it) in programming."
03:35bloudermilkI feel compelled for some reason as I learn Clojure (my first FP language) to understand how to properly model data
03:36bloudermilkComing from a classical OO mutable runtime
03:36RaynesIt's weird how people think of OOP as the 'old' and 'classic' way of doing things. :p
03:38bloudermilkRaynes: Weird, no (people that started with "classical" were taught that). Unfortunate, yes
03:48seancorfieldWhen I learned programming, OO was very fringe and FP was more center stage in academia. I liked FP a lot. Then I had to learn OO when it went mainstream. Ugh. Glad FP is back in vogue :)
03:49seancorfieldBut a strong OO background is certainly an obstacle to learning effective FP. Unfortunately.
03:50amalloyseancorfield: i disagree. a "strong" background in any kind of programming is an advantage in learning another kind
03:50amalloya shallow, lengthy background in OO is more what i'd call a disadvantage in learning FP
03:51seancorfieldTaking away assignment and loop variables has a fairly debilitating effect on an OO programmer since they spend all their time poking at data hidden in boxes to make it change...
03:51Zentropeseancorfield: I work daily spelunking a code base (I didn't write) in which "inheritance" is the main way the original authors avoided code duplication.
03:51seancorfieldamalloy: perhaps "a strongly entrenched OO background" then?
03:52seancorfieldMost "Java Programmers" these days are "strongly entrenched" rather than having a "strong" background in the way you mean...
03:52amalloy*shrug* clojure was my first functional language. it's more about attitude: do you see the new ideas/rules of FP as restrictions or as interesting challenges
03:52seancorfieldZentrope: sorry for your pain :(
03:52seancorfieldamalloy: I think it also depends on how you view OO and OO languages :)
03:53amalloyi loved em for sure. didn't know anything else. reinvented java whenever i had to work in C
03:53Zentropeseancorfield: *shrug* It's just interesting to see all the pitfalls lined up right there before me. Smart authors. They did all the _right_ things. But, somehow.... ;)
03:54amalloybut i'm not really making any general points, i guess
03:54seancorfieldWhen Haskell appeared, I really thought that might be the turning point, and FP would go mainstream... having seen SASL, Miranda, ML, and many others not get much traction.
03:55seancorfieldI'm glad we're finally seeing FP being taken seriously and problems with OO being admitted...
03:55amalloywell, their freenode room is twice as big as ours still
03:56amalloywhich is obviously the only interesting metric of language momentum
03:56seancorfieldHaskell? I used to hang out there but since I didn't get to write Haskell for a living, I kinda lost interest :)
03:57seancorfieldThe Haskell community are certainly passionate :)
03:57seancorfieldI'm very happy that I get to write Clojure for a living!
03:57amalloyhaskell is pretty amazing as a language. i enjoy dabbling in it, but clojure is so great that i don't really have the motivation to really dive in
03:58naegis something similiar to this possible in clojure (and performant)? http://stackoverflow.com/questions/4261332/optimization-chance-for-following-bit-operations
03:59amalloynaeg: having spent two seconds glancing at that question, i am confident that you (or indeed i) will write bad code somewhere else in the program that costs way more speed than the speedup you could get from using shifts there
04:00naegamalloy: but the algorithm seems so neat?
04:00seancorfieldif memory was not so constrained, no one would bother packing data in and out of bit patterns like that tho...
04:00naegit doesn't have to be as performant as in C or ASM, about a msec is okay (that's what I'm having with this solution: https://gist.github.com/3520562)
04:02naegbut it is possible to create a int64 (maybe from java?) and then do shift operations on it?
04:04seancorfieldJava has bitwise operations, yes
04:04Apage43mrm
04:04Apage43trying to do a rate-limiting wrapper that blocks if the wrapped fn is being called too fast
04:05Apage43right now I'm using an agent make the callers "get in line", but feels ugly that the fn is running in a different thread than the caller, and that would probably subtly break some stuff that expects that not to happen
04:06amalloyfunny. i've written rate-limited twice, and both times chose something different than blocking
04:06Apage43I saw the one in useful :). For this I'm rate limiting requests to an HTTP API.
04:07seancorfieldnaeg: and, yes, Clojure has various bit-twiddling functions too, if you really want to go there...
04:08Apage43so if I'm calling it too fast I just want to wait, since I do need the result
04:16naegseancorfield: I guess I will. The algorithm is neat and not that complex
04:17naeg(just to compare it to my other solution, will probably use the other one anyway)
05:28gtuckerkellogghow can one run all midje tests for a namespace from the REPL?
05:28noidiafaik, midje runs the facts as soon as they are evaluated
05:29noidiso try (require 'my.ns :reload)
05:29noidior something like that
05:30gtuckerkelloggso there's nothing in midje like clojure.test's (run-tests 'your.namespace) ?
05:30gtuckerkelloggwow. in so many other ways, midje is superior.
05:31amalloyjust...put your midje tests inside a deftest
05:31amalloyi'm not a big fan of midje, but i don't see why it should diplicate functionality that it can reuse instead
05:32gtuckerkellogggood point
05:32gtuckerkelloggi'll do just that
05:33gtuckerkelloggamalloy, what don't you like about midje?
05:34amalloyi don't dislike anything concrete; i'm sure it's fine. the heavy emphasis on tdd styles isn't to my taste. i do think mocking is overused, but that's probably related to tdd
05:40Raynesamalloy: From what I can tell, midje is an excellent way to test things in creative ways without a lot of code.
05:40RaynesI think a lot of things are quite a bit overly complex.
05:41RaynesSee 'around' and other crap like that.
05:41RaynesGives me a headache.
05:41gtuckerkelloggi just miss being able to run the whole namespace of tests from the repl
05:41pyykkisRaynes: +1
05:43pyykkisif something, test framework should be simple and explicit. I find clojure.test being just that (and I used to be a fan of rspec). We'll, i guess it's a matter of taste
05:54algernongtuckerkellogg: (require 'my.ns :reload), as noidi said should do just that.
06:02gtuckerkelloggthanks
06:33borkdudehmm, I have an enlive template that is based on an html5 file, basically I just want to show the file
06:33borkdudebut it leaves the doctype out
06:34borkdudethis is my template:
06:34borkdude(enlive/deftemplate welcome-page
06:34borkdude "public/index.html"
06:34borkdude [])
06:34borkdudewhat could be the problem?
06:34vijaykiranborkdude: https://github.com/cgrand/enlive/issues/15 related ?
06:35borkdudevijaykiran that's it, tnx
07:10CheironHi, what does this mean? IllegalArgumentException No value supplied for key: true clojure.lang.PersistentHashMap.createWithCheck (PersistentHashMap.java:89)
07:12borkdude,{true}
07:12clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Map literal must contain an even number of forms>
07:12borkdude,(hash-map true)
07:12clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No value supplied for key: true>
07:12borkdude,(hash-map true 1)
07:12clojurebot{true 1}
07:13hyPiRion,(assoc {} true)
07:13clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: core$assoc>
07:13borkdudeso it means exactly what is says, no value supplied for key: true :)
07:13borkdudedunno about the createWithCheck thing though
07:31RaynesCheiron: It usually means you're trying to create a map without enough key and value pairs.
07:32RaynesEr, without one part of a pair.
07:32RaynesAs demonstrated above.
07:32naegsomeone used common crawl with clojure already? http://commoncrawl.org/
07:32Cheironeye c. still unable to locate the line. Anything wrong with (def ^{:private true :doc ".....:} ttl 20000)
07:34borkdude".....: -> "…." I presume?
07:35Cheironyes, i mean it is a string
07:37borkdudeseem ok tom e
07:37borkdudeseems ok to me
07:38RaynesIt wont be a literal map, Cheiron.
07:38RaynesIt'll be code that creates a map, like borkdude's hash-map call.
07:43Cheironso this line isn't the suspect? (def ^{:private true :doc "....."} ttl 20000)
07:44Cheironi'm trying to require a file
07:44Cheironbut the only message i got is: IllegalArgumentException No value supplied for key: true clojure.lang.PersistentHashMap.createWithCheck (PersistentHashMap.java:89)
07:44Cheironi'm unable to locate the suspected map
07:46CheironI found it !! how stupid i am
08:45jao`nick jao
09:32@rhickeyclueless lein user q: lein repl fails if your code doesn't compile?
09:33@rhickeyis there a way around that?
09:33chouserthat probably depends on whether you're aot'ing or not.
09:34@rhickeyI'm not asking for anything specific
09:34@rhickeydoes :main entry trigger that?
09:34clgvrhickey: yes. if there is none it starts in namespace 'user
09:35chouserAh, probably
09:35@rhickeyseems to
09:35clgvthe same behavior when you do lein repl outside a project
09:35chouserso with no :main, lein repl succeeds and drops you in 'user even if none of your code compiles.
09:36clgvchouser: no. as far as I experienced, there is no compilation. you will have to require the namespaces you want to use from 'user namespace
09:52chouserHow can I tell pprint to print metadata?
09:54clgvchouser: set *print-dup* to true
09:54chouserpprint seems to ignore both *print-dup* and *print-meta*
09:55clgvthen you probably cant
09:56chouserwow. really?
09:56clgvhumm just checkoing the source. it writes directly to *out*
10:06advirolHi, I want to read the release announcement for Clojure 1.4 but as it seems, I cannot read it without logging in with a Google account.
10:06advirolDoes s.o. have any idea for a solution? I would suggest to use open forums that don't require to login.
10:08nDuffs/groups/group/
10:08advirolhm, perhaps I made a mistake.
10:08advirolI verify that
10:10@rhickeygroup is public readable, but if you are logged into google already it tries to log you in to groups
10:10nDuffadvirol: I just pulled it up from a private-mode browser with a clear cookie set
10:10nDuffs/clear/empty/
10:11advirolyes, you're right. my mistake was that i had been logged in and groups wanted to verify my account.
10:11wmealing_there was issues with either oauth or openid, i can't remember.. but i know there was a problem with one of them
10:11wmealing_is one preferred over the other ?
10:11advirolnow since i completely logged out, i have access. just forget about it. ;)
10:11clgvadvirol: the changes are also up on github
10:12advirolalright, even better. thx all
10:13nDuffrhickey: Is it expected that a delay throwing an exception should work when it's called again? A corner case where that doesn't behave as-expected (has locals cleared on rerun) came up yesterday; I don't know that anyone has come up with a clear enough reproducer to file a ticket yet, though hyPiRion was working on it.
10:13wmealing_or am i looking at this whole issue sideways ?
10:16hyPiRionnDuff: I filed a ticket
10:16hyPiRionnDuff: http://dev.clojure.org/jira/browse/CLJ-1053
10:19nDuffhyPiRion: Ahh -- great; thanks!
10:21nDuff...and that's much clearer about what's going on.
10:23hyPiRionYeah, it bothered me last night, so I did some testing and tried to figure out what the problem was.
10:25hyPiRionIt is a rather strange case.
11:12kralAre there any good example of clojure + clojurescript on github or similar site?
11:14shaungilchristhttp://clojurescriptone.com/ (bare in mind it expects lein1.6 to follow the tutorial)
11:14jsabeaudrykral, http://github.com/ibdknox/overtoneCljs this one is not bad
11:15jsabeaudrykral, the key to clojurescript in my opinion is lein-cljsbuild, makes it really simple no need to install anything etc
11:17xeqi+1 for lein-cljsbuild
11:18xeqican't think of any recent open source projects showing everything togeter
11:18`fogus(inc jsabeaudry)
11:18lazybot⇒ 1
11:19xeqibesies that overtone one
11:21shaungilchristis anyone else using the notion of .cljx ala c2?
11:35@rhickeywhat are people using for Clojure data Content-Type?
11:37`fogusapplication/clojure here
11:38nDuffDoesn't there need to be an x- in there for things that aren't standardized yet?
11:40`fogusHmm, probably
11:44metajackx- is deprecated now
11:44ohpauleezrhickey: application/clojure here as well
11:44metajackhttp://tools.ietf.org/html/rfc6648
11:45`fogusI guess I was ahead of times (for once)
11:46@rhickeylooks like clj-http {:as :auto} checks for that as well
11:48alpheusIs there something like clojure.java.io/copy that can read from a java.io.InputStream and write to a byte array?
11:52antares_awayalpheus: you probably can read data into a byte buffer and turn that into a byte array
11:59alpheuscopy's "Output may be an OutputStream, Writer, or File." Can I make an OutputStream that's a byte buffer?
12:00alpheusI should probably tell you my actual problem instead of asking about possible solutions.
12:00mmitchellis there any version of clojure that allows you to throw with a string only? (throw "my error")
12:01alpheusas opposed to (throw (Throwable. "my error"))?
12:01mmitchellalpheus: yes
12:01mmitchell,(throw "boom")
12:01clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Throwable>
12:02mmitchell,*clojure-version*
12:02clojurebot{:interim true, :major 1, :minor 4, :incremental 0, :qualifier "master"}
12:04hyPiRionmmitchell: Well, it allows you to throw with a string only. Like, technically.
12:06duck1123you might want to check out slingshot. it has a fn called throw+
12:06nbeloglazov$clojuredocs copy
12:06lazybotincanter.processing/copy-pixels: http://clojuredocs.org/v/3256; incanter.core/copy: http://clojuredocs.org/v/2853; clojure.java.io/copy: http://clojuredocs.org/v/2139; clojure.contrib.io/copy: http://clojuredocs.org/v/491; clojure.contrib.duck-streams/copy: http://clojuredocs.org/v/254
12:07nbeloglazov$javadoc java.io.ByteArrayOutputStream
12:07lazybothttp://docs.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputStream.html
12:07nbeloglazovalpheus: use ByteArrayOutputStream
12:07lotiahow would i redirect System/SetOut ans System/SetErr in clojure?
12:09bosieanyone in here using cascalog?
12:13technomancyI realize it's an artificial distinction, but I wonder if the application/clojure content-type would be appropriate for data structures not intended for evaluation while text/clojure might be appropriate otherwise
12:13technomancyerr--s/not//
12:26duck1123why would you write clojure code/data you don't intend to be evaluated?
12:27hyPiRionduck1123: There's a difference between evaluating and reading, ##(doc *read-eval*)
12:27lazybotjava.lang.SecurityException: You tripped the alarm! *read-eval* is bad!
12:27hyPiRion,(doc *read-eval*)
12:27clojurebot"; When set to logical false, the EvalReader (#=(...)) is disabled in the read/load in the thread-local binding. Example: (binding [*read-eval* false] (read-string \"#=(eval (def x 3))\")) Defaults to true"
12:29xeqifetch uses "application/clojure" https://github.com/ibdknox/fetch/blob/master/src/noir/fetch/remotes.clj#L25
12:29xeqithough only on server responses :\
13:05acheng,(java.lang.ProcessBuilder. "ls")
13:05clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching ctor found for class java.lang.ProcessBuilder>
13:07xeqi,(java.lang.ProcessBuilder. ["ls"])
13:07clojurebot#<ProcessBuilder java.lang.ProcessBuilder@1248de38>
13:07achengxeqi: thanks!
13:11xeqiacheng: might take a look at https://github.com/Raynes/conch
13:13acheng(inc xeqi)
13:13lazybot⇒ 2
13:46pbostromI'm looking for ways to debug a Java app with Clojure, anyone have experience with this? a search through the ML mentions a few options, like https://github.com/djpowell/liverepl or https://github.com/wirde/swank-inject, wondering if one is better than the other
13:50shawnlewisIs there any way to merge namespaces (that I don't control)? For example I'd like to create a namespace that contains all of clj-time's sub-namespaces (clj-time.core clj-time.local clj-time.coerce clj-time.format)
13:51shawnlewisas well as a few additional functions of my own
13:51S11001001shawnlewis: not a good way
13:54shawnlewisIn Python you can access a module's imports via chaining. Like module.importedmodule.func
13:55shawnlewisWalking the child namespaces and def'ing their symbols in the parent would be pretty bad huh?
13:56S11001001shawnlewis: it's highly error-prone
13:56hyPiRionshawnlewis: And the metadata would be gone, too.
13:56emezeskeHow do you deal with name conflicts?
13:57hyPiRionUnless you're tricking it somehow.
13:57mindbender1cemerick: on piggieback README, the line after ## Rhino ClojureScript Environment (default) is not clear. Mind having a look?
13:57S11001001dynamics, macros, redefinitions
13:58S11001001as for that bit of Python, I'd call that a misfeature, as it makes what libs you happen to import into a module part of the public api of that module, unless you __all__ them away, which is tedious
13:58emezeskeshawnlewis: What is your goal? To save typing in your requires?
13:59emezeskeS11001001: Well, in Python everything is always public, but I think it's generally understood that some things are obviously bad to poke around in
13:59shawnlewisemezeske: Yeah I feel like every time I need clj-time I end up needing 3 out for 4 of its submodules, I also don't like having to think about which function belongs to which submodule
14:01emezeskeshawnlewis: How many functions from clj-time do you find yourself using? If it's not many, you could write your own utility api on top of them and just use that
14:02emezeskeshawnlewis: If you try to combine namespaces programatically, a new release of clj-time could break everything by merely adding a new private function to some namespace that conflicts with another namespace
14:02shawnlewisemezeske: that's true but I was hoping there might be a simpler way
14:02shawnlewisemezeske: well i could have my super-namespace die if there are conflicts
14:03pandeirocan i basically drop in nrepl.el and use nrepl-jack-in the same way i was using slime/swank?
14:03emezeskeshawnlewis: Well you wouldn't have any other choice but to die
14:03shawnlewisemezeske: oh i said you said private function. either way I think dying is appropriate
14:04shawnlewis*i see you said
14:04emezeskeshawnlewis: Dying is not just appropriate, it's all you could reasonably do
14:04emezeskeshawnlewis: Unless your code is going to go through the whole AST and rename conflicting functions everywhere
14:05shawnlewisyup
14:06emezeskeshawnlewis: If you really, *really* want to do something like this, you could have a macro that, using a whitelist, builds proxy functions in one namespace for all the public functions from clj-time.* namespaces
14:06emezeskeWhich is basically just a somewhat automated version of writing your own simplified wrapper API
14:07shawnlewisemezeske: right
14:08shawnlewisI guess I was thinking (use) might have an option to also expose the referred functions to callers
14:08SegFaultAX|work2My 4clojure solutions keeps timing out for no reason. :(
14:09shawnlewisie: my mental model was that (use) was equivalent to doing "from module import *" in python, but that's not the case
14:09shawnlewisi'm not saying there's anything wrong here. just figuring out how stuff works
14:09hyPiRionpandeiro: I just did
14:10hyPiRionAt least for me, the transition was frightenly simple.
14:12pandeirohyPiRion: seems too good to be true, as much as i struggled with swank
14:12pandeirobut it's working fine so far
14:13cemerickmindbender1: not clear how?
14:14cemerick(it's basically a repeat of the interaction described in the cljs tutorial)
14:14mindbender1cemerick: there's an opening bracket that was not closed.
14:14mindbender1that confused me a bit
14:14Gnosis-it doesn't seem like I can throw+ inside the catch of a try+ block
14:15Gnosis-,try+
14:15cemerickmindbender1: sorry, where? I'm not seeing it.
14:15clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: try+ in this context, compiling:(NO_SOURCE_PATH:0)>
14:15mindbender1cemerick: immediately after ## Rhino ClojureScript Environment (default)
14:15Gnosis-,(refer 'slingshot.slingshot)
14:15clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.Exception: No namespace: slingshot.slingshot>
14:15cemerickoh, just in the text prior to the console interaction
14:16mindbender1yess
14:16cemerickSure, will fix.
14:16mindbender1ok thanks
14:16hyPiRionpandeiro: Yeah, I'm kind of wondering when it will blow up on me.
14:16cemerickmindbender1: fixed; though it doesn't really change the process, etc.
14:17mindbender1cemerick: yeah I sensed so.. just that I kept looking for a closing bracket
14:17Gnosis-is it possible to re-throw an exception in slingshot?
14:17mindbender1cemerick: thanks for fixing
14:18pandeirohyPiRion: we are both traumatized
14:18dnolenrhickey: any thoughts about the column tracking metadata patch for the Clojure reader? Is there some more rationale you want to see around that patch, or is it simply not on the table?
14:18technomancyGnosis-: sure
14:20Gnosis-technomancy: if I have (throw+ (assoc e :test true)) in a catch block, the original exception gets thrown (before the assoc)
14:20Frozenlo`Is there a way to check if two functions are identical? Something like (= #(print "Hook!") #(print "Hook!"))
14:21technomancyFrozenlo`: sort of, if you use serializable-fn
14:21pandeirois there any reason against running a small-time webapp via emacs/nrepl to be able to hot-patch and whatnot? is that a big risk?
14:22technomancyGnosis-: huh, sounds like a bug in slingshot. you should be able to do it with ex-info though
14:22Frozenlo`technomancy: this? https://github.com/technomancy/serializable-fn
14:22technomancy(throw (vary-ex e assoc :test true))
14:22technomancyFrozenlo`: that's the one
14:22Frozenlo`Thanks, looking now!
14:23technomancypandeiro: you should launch it with a proper daemonization tool and launch an nrepl server from the inside.
14:23technomancyupdate-ex is probably better than vary-ex
14:24pandeirotechnomancy: what would be the tradeoffs there? more stability? automatic restarting?
14:24xeqipandeiro: and make sure to restrict access, perhaps using https://github.com/cemerick/drawbridge as shown in https://devcenter.heroku.com/articles/debugging-clojure
14:24technomancy(update-ex e assoc :test true) -> (ex-info (.getMessage e) (assoc (ex-data e) :test true))
14:24pandeiroxeqi: great thanks
14:24technomancypandeiro: yeah, and the more conventional it is the more likely you are to remember how to do it when you have to come back to it two years later
14:25technomancyupstart-style init scripts are nice for that
14:26technomancydepends on your definition of "small-time" I guess; if you're the only one using it then launching it out of a repl in tmux is fine =)
14:26pandeirotechnomancy: me and a few people, but it would be nice to learn 'the right way to do it'
14:26pandeirothanks
14:27Frozenlocktechnomancy: That's really nice! Will this work with cljs also?
14:27technomancyFrozenlock: I doubt it
14:27SegFaultAX|work2amalloy: Are you the 4clojure administrator?
14:27amalloyyes
14:27Gnosis-technomancy: regular throw _does_ work inside the catch block of a try+ :)
14:28Gnosis-so how do I wrap a map inside it? make a Stone object?
14:28technomancyGnosis-: I recommend ex-info
14:28Gnosis-technomancy: okay, thanks
14:29Gnosis-how do I report this bug?
14:29SegFaultAX|work2amalloy: I'm trying to submit an answer to a question, but it times out almost every single time. When it does actually run my solution it works instantly, but sometimes it takes a while for it to even start the first test so by the time it gets to the last one it times out.
14:29SegFaultAX|work2amalloy: Is the problem my code or 4clojure, do you think?
14:29amalloy4clojure. the sandboxer handles some things (mostly java interop) pretty badly
14:30SegFaultAX|work2amalloy: There is no interop in this solution. Would you mind taking a look?
14:30amalloysure
14:30SegFaultAX|work2Problem 73: https://www.refheap.com/paste/4774
14:31SegFaultAX|work2amalloy: I didn't think I was being too abusive. But I'm still learning. :)
14:31amalloySegFaultAX|work2: when i paste that into 4clojure, it succeeds instantly
14:32SegFaultAX|work2amalloy: Hmm, lemme retry.
14:32SegFaultAX|work2amalloy: Yea it just spins for me then times out.
14:32scriptorit hangs for me too
14:32amalloyhm. pressed submit again, and this time it's stuck
14:32SegFaultAX|work2Even if it's not idiomatic Clojure, is my solution awful?
14:33amalloyno, looks pretty good to me
14:33scriptordefinitely a problem with 4clojure here, I tried it with "2" and it also hangs for a bit
14:35amalloywell, i can restart it. it's not using much cpu or ram though
14:36amalloytry now
14:36SegFaultAX|work2amalloy: That did it.
14:36SegFaultAX|work2amalloy: Thanks so much!
14:37SegFaultAX|work2amalloy: I'm getting close http://www.4clojure.com/user/segfaultax
14:38jweissi'd like to update a file within a zipfile within a zipfile. This is turning out to be surprisingly difficult. is there anything out there to help beyond the java.util.zip classes?
14:38eggsbyseancorfield: is there any way to send auth credentials with clj-soap?
14:43hyPiRionAh, and now my solution to the reversi worked as well.
14:47seancorfieldeggsby: i don't use clj-soap so i don't know, sorry
14:52Gnosis-technomancy: it turns out I was using slingshot 0.8.0; I upgraded to 0.10.3, and now I get this error at the REPL: ClassNotFoundException slingshot.Stone java.net.URLClassLoader$1.run (URLClassLoader.java:217)
14:54eggsbyah seancorfield: https://github.com/seancorfield/clj-soap this a different person? :p
14:54eggsbyno worries, just dropping down to the java :)
14:57hyPiRionah, nrepl killed my paredit. Whenever I del over any paren/bracket, it's getting killed.
14:58Gnosis-technomancy: sorry, please disregard; I needed to do 'lein clean'
14:59amalloyheh. lispers are baffling. "dangit, i press delete and a character disappears. my text editor is broken!"
15:00uvtchehehe
15:01xeqitechnomancy: know anything about when the next nrepl.el release is? I'd love a fix for kingtim/nrepl.el#84
15:02technomancyxeqi: haven't heard much discussion about that, no
15:02technomancyare you on the nrepl.el mailing list? could raise it there.
15:02xeqisomehow I'm managed to not join that yet
15:02xeqiguess its time
15:04amalloyhuh, i wonder why lazybot didn't post a link to that issue when you mentioned it
15:04xeqiI thought the same thing
15:04xeqiwasn't sure if it was channel restricted
15:04xeqior if the "." messed it up
15:05amalloyi looked through the source, neither seems to be the case
15:05hyPiRionIs there some hook someone has created to fix the issue?
15:05xeqixeqi/lein-pendantic#2
15:05hyPiRion(for the nrepl/paredit thing)
15:05xeqi&"I'm not broken"
15:05lazybot⇒ "I'm not broken"
15:05amalloy4clojure/4clojure#5
15:05lazybotCSS and HTML Layout -- https://github.com/4clojure/4clojure/issues/5 is closed
15:05scriptormaybe lazybot ignores closed issues?
15:05clojurebotCool story bro.
15:06scriptoroh, well never mind
15:06xeqioh, I misspelled my own repo :\
15:06technomancywhoa; what happened to http://www.opalang.org/
15:07llasramSoooo shiiiiny
15:07technomancyllasram: but but
15:07technomancythe only reason I cared the slightest bit about opa was ocaml
15:08technomancyand they replaced every mention of it with node
15:08llasramhttp://opalang.org/faq.xmlt still talks about OCaml as primary implementation language
15:08ohpauleeztechnomancy: 1.7m of funding will do that
15:08amalloytechnomancy: i think it's april first in the southern hemisphere
15:09ohpauleez"JS Framework" is a easy way to raise a bunch of money
15:09ohpauleezamalloy: Normandy, France
15:09technomancyohpauleez: yeah, especially when you add "enterprise" to it
15:09hoover_dammIntel needs to release javascript optimization to the intel microcode
15:09ohpauleeztechnomancy: "enterprise" alone is an extra 150K
15:09amalloyeastern hemisphere, then. i think it's a viable joke regardless of technicalities
15:10scriptorkinda reminds me how racket-lang has no mention of "lisp" on the home page
15:11amalloyah, i think lazybot's regex doesn't accept . in repo names, even though it tries to
15:13ohpauleeztechnomancy: The one mention of OCaml exists in the job descriptions. "The compiler is written in OCaml"
15:13ohpauleezI love when french companies use OCaml
15:13ohpauleezit feels so french
15:13SegFaultAX|work2When did MongoDB and Node.js become *the* Javascript stack?
15:14ohpauleezSegFaultAX|work2: three years ago?
15:14ohpauleezmaybe two
15:15technomancywhat on earth is "supported technologies" on that page supposed to mean? if you don't look closely it looks like they're saying google, twitter, and facebook use their stuff
15:15SegFaultAX|work2Well that makes me sad, then. Two significantly subpar technologies comprise *the* js stack. :(
15:16ohpauleezSegFaultAX|work2: Yes… it's like Asimov's "Foundation" is taking hold
15:17ohpauleezMay we be the instruments of a brighter future
15:17SegFaultAX|work2I guess 3 significantly subpar technologies, if you include Javascript itself.
15:17achenghm. added [conch "0.3.1"] to my project.clj, ran lein deps, added [conch :as sh] to my clj file's :require clause in the call to ns.... when loading file i get FileNotFound for conch__init.class on classpath
15:17SgeoWhat does being shackled to the JVM count as?
15:17achengsame result after getting a new clojure jack in session.
15:18ohpauleezSgeo: Who's shackled? You can sort of run Clojure on JS, JVM, Scheme, Python, Lua, and soon barebones via C
15:18ohpauleezAlso, it's funny the company kept its name: MLstate
15:18ohpauleezkudos
15:19xeqiacheng: (:require [conch.core :as sh])
15:19SegFaultAX|work2What's wrong with the JVM? It's a reasonably stable and performant virtual machine.
15:19achengah. of course
15:19achengalthough i still get the error
15:20achengoh nevermind
15:20SgeoIt suggests a model that might not be ideal, and the best performance is done by staying close to the model: Protocols vs generic functions
15:21achengxeqi: thanks again
15:21ohpauleezI've been keeping a close eye on Rust, which has me pretty excited
15:23dnolenSgeo: what language do you use that has generic methods as generic as Clojure's yet faster?
15:25Sgeodnolen, I guess I don't know enough to make the comparison, but Common Lisp can be pretty fast, and I think it might be possible to build a Clojure-like generic system fairly thinly over CLOS
15:25dnolenSgeo: CLOS isn't as generic, based on your argument you could probably do the same for Clojure. Are you going to be the one to do it?
15:27SgeoBuilding Clojure on top of Common Lisp?
15:27dnolenSgeo: no build faster generic methods for Clojure.
15:28SgeoJava doesn't have anything similar to CLOS, I think
15:28dnolenSgeo: ...
15:28Sgeo...although, I have a thought
15:29SgeoMy Clojure-style generics on CLOS plan was kind of single-dispatch, actually
15:30SgeoWhat is going on with all these ping timeouts?
15:30CheironHi, how to import this enum in clojure code? http://hector-client.github.com/hector//source/content/API/core/1.0-1/me/prettyprint/hector/api/beans/AbstractComposite.ComponentEquality.html
15:30_tcaSgeo: notice: linode
15:30emezeskeSgeo: Are you writing your own programming language?
15:31Sgeoemezeske, I'm starting to think I should eventually
15:31emezeskeSgeo: I was going to suggest that.
15:33ohpauleezSgeo: You should also give The Art of the Metaobject Protocol a read, and give the CLJS source code a read through
15:36Cheironto import http://hector-client.github.com/hector//source/content/API/core/1.0-1/me/prettyprint/hector/api/beans/AbstractComposite.ComponentEquality.html (import '......AbstractComposite$ComponentEquality)
15:36Cheironbut to use the constants?
15:36Cheiron*but how
15:43pepijndevosHow do I get a recent google closure library?
15:44ohpauleezpepijndevos: You're looking for the inclusion of the third-party pieces?
15:44pepijndevosohpauleez: just a more recent version than what comes with cljsbuild
15:44xeqi&(java.math.RoundingMode/DOWN)
15:44lazybot⇒ #<RoundingMode DOWN>
15:44pepijndevosor… as far as i understand the clojurescript stack at all
15:45ohpauleezpepijndevos: cljs includes a very very recent version, not more than a few months old
15:45pepijndevosohpauleez: https://groups.google.com/forum/#!topic/clojure/gG24Shh8wDg
15:45xeqiCheiron: I'd expect (AbstractComposite$ComponentEquality/EQUAL)
15:46juhu_chapaHi all! Is there any way to pass params to a future?
15:46ohpauleezAh gotcha. So you just need to pack up a jar yourself or nab a recent version from here: https://clojars.org/search?q=closure
15:46pepijndevosjuhu_chapa: try future-call
15:46ohpauleezI maintain my own local version, as I use the HTML5 stuff and some of the third-party stuff in prod apps
15:47pepijndevosohpauleez: oohing on clojars seems > 2035
15:47pepijndevos*nothing
15:48ohpauleezpacking up your own custom jar isn't hard, just annoying
15:48pepijndevosohpauleez: Can I have yours? Or… maybe I should just go with the seamless field
15:49seancorfieldeggsby: i forked clj-soap thinking i could get it running on clojure 1.4 in a project i'm using at work but it didn't have the right features for what i needed... the original is here https://bitbucket.org/taka2ru/clj-soap
15:49juhu_chapapepijndevos: future-call accept a function with no-params :(
15:49juhu_chapapepijndevos: maybe an agent is the right choice
15:50pepijndevosmaybe...
15:50Sgeojuhu_chapa, make the function a closure?
15:50ohpauleezpepijndevos: in my experience, if you can revert to something already in the goog-jar without too much trouble or loss of functionality, you should. If not for Occam's razor, than to just to make life easier and move on in the solution space
15:50seancorfieldeggsby: i ended up publishing a new version (snapshot) that works with 1.4.0 / lein2 but that's as far as I got: https://clojars.org/org.clojars.seancorfield/clj-soap
15:51Sgeo,(let [a 5 f #(+ % a)] (f 6))
15:51pepijndevosohpauleez: right, will do.
15:51clojurebot11
15:52eggsbyah seancorfield, ya i'm having to drop straight down to apache axis2 myself
15:52seancorfieldi ended up dropping down to apache axis too... version 1 due to constraints on the middleware container i'm running my clojure code in...
15:52seancorfieldonce it was wrapped in clojure code, it was fairly painless to use :)
15:53eggsbyis there a special syntax to access nested classes via clojure?
15:53juhu_chapaSgeo: :O
15:53pepijndevoseggsby: dollar, I believe
15:53eggsbyah, thank you pepijndevos
15:54eggsbywas driving me bonkers that nrepl wasn't autocompleting it and org.package.EnclosingClass.NestedClass wasn't working
16:04gtrak`Raynes: hey, I saw your fork of ring-cors, is there advantage to it from the parent?
16:05nbeloglazovI'm moving to repl.el from swank. I added it my load-path and require'd. Try to nrepl-jack-in, it start server, but *nrepl* buffer stays black. No input hint like "user =>" and when I press enter it says "Wrong type argument: integer-or-marker-p, nil".
16:07ohpauleezgtrak`: A look at the network info on github suggests that there are some decent improvements in the flatland version
16:08ohpauleezhttps://github.com/flatland/ring-cors/network
16:08gtrak`yea, I saw that, good enough for me I guess :-)
16:34nbeloglazovDoes somebody uses nrepl.el with emacs 23? Does it work with latest nrepl.el? It seems to be broken for 23. Can somebody check?
16:35technomancyI know it's primarily developed using 24
16:35RaynesProbably easier to just use 24.
16:35RaynesIt's officially released now, so you shouldn't have to compile from source or anything.
16:36nbeloglazovRaynes: seems not for ubuntu 10.04 :(
16:37technomancyyou can use nix
16:37nbeloglazovSo better to put this "only 24" to README
16:38tanzoniteblacknbeloglazov: https://launchpad.net/~cassou/+archive/emacs has an emacs24 build for lucid, I think
16:38nbeloglazovtanzoniteblack: thanks
16:39tanzoniteblackthe "emacs-snapshot" package is an emacs24 build available for lucid from that ppa, doesn't look like the "emacs24" stable package supports lucid though
16:41technomancyit used to say it supported 24 only, then someone who used 23 said that should be removed because it worked for him, but that was a few weeks ago
16:42nbeloglazovCommit that broke it was made 10 days ago (I think it broke).
16:42tanzoniteblackas of 2 weeks ago or so, the version on elpa worked in 23
16:43nbeloglazovhttps://github.com/kingtim/nrepl.el/commit/958b042fd9ba7c17eb968709a47685dadaa809b4
16:43nbeloglazovcompletion-at-point-functions was introduced in 24
16:47holohi
16:48holoi have a function called "ANY" in my code. i need to know to which library it belongs. is there a search engine for this kind of stuff?
16:49tanzoniteblackusing the backtick (`) you can get the full form of a function
16:49tanzoniteblack,`(defn)
16:49clojurebot(clojure.core/defn)
16:49lnostdalmove the cursor 'any' and press M-. this will take you to the definition of that function
16:49lnostdalpress M-, to go back to where you where
16:51mattmossgit status
16:52mattmossoops
16:52holotanzoniteblack, lnostdal, this is a function that is possibly not even installed in my system, so i was thinking about a public code repository search engine
16:52technomancythat'd be a neat feature to add to clojuresphere
16:53technomancysome kind of hoogle port
16:54ivaraasenclojuresphere gives me an application error
16:54ivaraasenstrange
16:55technomancymemory quota exceeded =\
16:56ivaraasen:/
16:57holothat hoogle thingy would be cool
16:57nbeloglazovI tried search few minutes ago there. May be it's related
16:57ivaraasenset up donations and I'll contribute towards extra dynos :)
16:57technomancyjkkramer: mind if I collab myself in to fix it?
16:57technomancyholo: it wouldn't be as cool as in haskell since we don't have type signatures
16:58technomancyprobably just a config issue
16:58xeqiwe have $findfn
16:58technomancyyeah, it's not using trampoline
16:59jkkramertechnomancy: sure go for it
17:00jkkramerclojuresphere needs some love
17:00technomancyI wonder if I should have it emit a warning in the buildpack if you use run without trampoline
17:00technomancyjkkramer: do you have anything specific you've been wanting to do with it?
17:00jkkramerthe main issue I ran into is that github stopped providing a way to get all clojure projects
17:01technomancyoh, you needed the v2 api?
17:01technomancyin practice how many things on github weren't accessible via clojars?
17:01jkkramerlast I checked, none of the API stuff allowed a query for "repo language = clojure"
17:02nbeloglazovUpdated to emacs 24. nrepl.el works fine. Indeed seems to be broken on 23.
17:02jkkramerthere were a number of projects on github but not clojars, I believe -- e.g., non-lib projects
17:03technomancyjkkramer: hm; yeah that's a drag
17:03technomancyjkkramer: still, libraries are where clojuresphere is most useful
17:04technomancywow, lots of juicy TODOs in here =)
17:04jkkramertechnomancy: yeah. being clojars-centric would still be useful. I'll see about refreshing it this weekend, maybe get things automated
17:04technomancyjkkramer: maybe we'll take a look at this for a future seajure meeting
17:04technomancyit's a really fun problem
17:04jkkramerit was fun to work on, when I had access to the data I needed
17:05technomancylein now warns when you try to deploy a project without description, url, or license
17:05technomancyso the quality of the data on clojars should improve over time
17:05jkkramercool
17:06technomancyplus leiningen-core is a library now, so you can easily calculate transitive deps given a project.clj file
17:06jkkrameranother nagging issue was malformed project.clj files, or ones that expected to be eval'd. it could use more robustness there
17:06technomancywell there you go =)
17:07technomancywhat's "experiment with long-running threads on heroku" from the todo mean?
17:08technomancyjkkramer: how's the one-file raw map approach working for you?
17:09technomancyI was thinking jiraph or neo4j might be a good fit for this problem
17:09technomancybut I appreciate the simplicity of the approach you're currently using =)
17:12jkkramertechnomancy: re long-running threads - I was wondering whether a thread could be spun off on the web dyno to refresh the graph. Normally you'd have a cron job or worker dyno do that sort of thing, I think(?)
17:12technomancyoh, and it has to be in-process since you don't have any way to persist state
17:12technomancyif you were using neo4j you could manually initiate `heroku run lein run -m clojuresphere.refresh` or use the scheduler addon
17:12holoxeqi, that's a really nice addition, that "findfn", but what i want is rather more simple than that. just a search by function name pattern, even if it returned 10 libraries, it would be a good result
17:13technomancyholo: for the record, ANY comes from compojure
17:13technomancyholo: but you're right that it would be a cool thing to have
17:13technomancyjkkramer: you could do that with an executor if you needed it in-process
17:13holotechnomancy, hahaha, thanks for the brain database :)
17:14technomancyjkkramer: I deployed a fix for the out-of-memory error
17:15jkkramertechnomancy: right. Since it was a hobby hack, I had a limited threshold for new tech, so tried to keep it simple
17:15jkkramertechnomancy: awesome thanks
17:15technomancyjkkramer: we poked a bit at neo4j at a past seajure meeting
17:16technomancywould you want to go in that direction if we ended up hacking it at a meeting?
17:17jkkramertechnomancy: sure, any and all improvements welcome. neo4j has been on my list of things to learn for a while
17:19technomancyjkkramer: considering "hard to find" was the main complaint about clojure libs in cemerick's survey I think clojuresphere is a pretty important project
17:21emezesketechnomancy: Without clojuresphere, there's no good way to ask "what's the de facto library for X" except in IRC :)
17:22shaungilchristI was honestly unaware of it til just now hah. this is great
17:22technomancyemezeske: yes, and nothing will ever come close to the wonderfulness of this channel =)
17:22jkkramereven clojuresphere can't always decide what the de facto lib is, though
17:23technomancysure; there's only so far you can go with an algorithmic approach, but it scales like nobody's business
17:23jkkramere.g., when a lib changes hands, or a fork becomes the new standard even though it's not popular yet
17:23emezeskejkkramer: That's definitely true, but it sure could help
17:23jkkramermaybe it could incorporate some user input/feedback
17:23emezeskejkkramer: With a bit of human intuition to make sense of the data
17:23jkkramerupvotes, vouching, "mark as de facto" or something
17:23technomancyjkkramer: yeah, there's no recency decay factored in yet, is there?
17:24technomancywhoa, compojure 0.6.3
17:24jkkramertechnomancy: don't think so. even then, just because a project hasn't been updated recently, doesn't mean it's inactive. it might just be bug-free :)
17:24jkkramerit hasn't been updated in a long time
17:25technomancyyeah, but a dependency from an active project should count for more
17:26technomancyIMO anyway
17:26jkkramerit should count for something, for sure
17:26andersfmaybe even measure recent commits, number of persons involved etc
17:27jkkramerget some machine learning in there
17:27technomancyget bradford cross on the phone
17:27andersfjkkramer: any plans of performing a reindex anytime soon? :)
17:28jkkrameri'll do one tonight. got put on the back burner when I found the github harvester stopped working
17:28jkkramerso…github won't be very accurate but at least clojars will
17:30advirolhttp://www.youtube.com/?v=djytP2ls5Eg
17:30advirolsry
18:00SegFaultAX|work2amalloy: I like your solution to #77
18:01SegFaultAX|work2amalloy: On 4clojure, that is.
18:01FrozenlockI've added mouse support to zyzanie, for those interested in adding shortcuts in their cljs app. https://github.com/Frozenlock/zyzanie
18:02amalloyheh, thanks. group-by frequencies solves pretty much the whole problem
18:02SegFaultAX|work2amalloy: Yup, it's similiar to my solution.
18:02SegFaultAX|work2(defn anagrams [words] (into #{} (map set (filter #(< 1 (count %)) (vals (group-by frequencies words))))))
18:02SegFaultAX|work2amalloy: When I saw that you also used group-by freq I was like "damn, I was hoping I was being slick with that"
18:04kjellskiis there a function in clojure that could be called collect-by? a function that lets you provide an f that creates a new bucket for each new return value and collects contents of coll by these values?
18:04amalloy&(doc group-by)
18:04lazybot⇒ "([f coll]); Returns a map of the elements of coll keyed by the result of f on each element. The value at each key will be a vector of the corresponding elements, in the order they appeared in coll."
18:05kjellskiamalloy: -.- sometimes my brain even hurts itself... ^^ thanks!
18:05SegFaultAX|work2kjellski: It's funny because we were literally talking about a 4clojure solution that uses it not 1 minute before you joined the chan.
18:06kjellskiSegFaultAX|work2: problem 50 ?
18:06kjellski^^
18:06SegFaultAX|work2amalloy: I really want to get more comfortable using composition in Clojure. In Haskell, (.) flows very nicelly. For some reason I just don't think about it as much yet in Clojure.
18:06SegFaultAX|work2I'm getting there, though.
18:07amalloywell, it doesn't flow as nicely as haskell
18:07SegFaultAX|work2It flows fine. It's just slightly more part of the normal syntax, ya know?
18:07gtrak`every time I try to use comp, I end up thinking -> is better
18:07SegFaultAX|work2That and ($) are just part of idiomatic Haskell expressions.
18:08SegFaultAX|work2gtrak`: -> and ->> aren't really reusable though, are they? I mean composition actually produces a new function where as -> just threads a value through successive forms.
18:09andersfkjellski: #77
18:09andersfkjellski: sorry for spoiling :>
18:09gtrak`,(#(-> % inc inc) 2)
18:09clojurebot4
18:10SegFaultAX|work2andersf: That example is too trivial to be useful.
18:10andersfpweh
18:10SegFaultAX|work2,(let [double-inc (comp inc inc)] (double-inc 2))
18:10clojurebot4
18:11SegFaultAX|work2I guess the point is I don't yet associate composition with threading. Or rather, I don't think "should this use function composition or the threading operator?" They have different uses in my mind, perhaps wrongly so.
18:12gtrak`there's a bit fewer stack frames with threading when you can use it, that's probably not significant though
18:13SegFaultAX|work2gtrak`: Like, 1 fewer, right?
18:14gtrak`yes, I suppose so :-)
18:15gtrak`it feels like the same intent for me, but I find comp more awkward to use in practice, plus the left/right distinction
18:15arrdemwhy not k-1 for k composed functions? naively if I'm going to thread the return value of a function through k others I sequentially create stack frames for all K functions and eval from the top down
18:16SegFaultAX|work2arrdem: The extra frame comes from the function returned by comp
18:17arrdem,(let [x (fn [a] (inc a)) y inc z inc] (x (y (z 1))))
18:17clojurebot4
18:17SegFaultAX|work2arrdem: Eg h = (f . g) then we have 3 stack frames right? h g f
18:17gtrak`plus the composition is at run-time, so there's the cost of the closure
18:17gtrak`whenever it decides to get allocated
18:17arrdempush three frames pluss the let...
18:17arrdemthen reduce down
18:18rufoa,(contains? (transient #{:foo}) :foo)
18:18clojurebotfalse
18:18rufoa^ is this intended behaviour? note that 'get' works on transient maps, 'nth' on transient vectors, 'count' on all transient structures etc
18:18gtrak`so, (let [a (comp...)] ...) is worse than (def a (comp...))
18:18amalloySegFaultAX|work2: haskell's tail calls surely mean that h = f . g doesn't consume three stack frames, right?
18:18SegFaultAX|work2amalloy: But this isn't haskell.
18:19SegFaultAX|work2If tails calls can be eliminated, then it can happen in place, sure.
18:20SegFaultAX|work2rufoa: That's strange indeed. I'd be curious to know why that failed.
18:20rufoaSegFaultAX|work2: https://github.com/clojure/clojure/pull/12 this perhaps?
18:21rufoai'm not familiar with the internals of clojure but it seems like the same issue
18:23surmaHey guys. I just did `(let [w1 w2 w3 :as words] (split line #"\s+") ...)` and words is bound to an vector longer than 3 items. How can I idiomatically bind the resulting vector?
18:24tomojrufoa: http://dev.clojure.org/jira/browse/CLJ-700
18:24gtrak`surma: i think there must be a typo somewhere
18:24SegFaultAX|work2,(let [[a b c & more] [:a :b :c :d :e :f]] (a b c more))
18:24clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Wrong number of args passed to keyword: :a>
18:24SegFaultAX|work2,(let [[a b c & more] [:a :b :c :d :e :f]] [a b c more])
18:24clojurebot[:a :b :c (:d :e :f)]
18:24rufoathanks tomoj, didn't notice that
18:25SegFaultAX|work2surma: ^ Like that?
18:25gtrak`,(let [[w1 w2 w3 :as words] (split line #"\s+" "hello how are you doing?")] words)
18:25clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: split in this context, compiling:(NO_SOURCE_PATH:0)>
18:26gtrak`,(let [[w1 w2 w3 :as words] (clojure.string/split line #"\s+" "hello how are you doing?")] words)
18:26clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: line in this context, compiling:(NO_SOURCE_PATH:0)>
18:26surma,(let [[w1 w2 w3 :as words] (clojure.string/split "hello how are you doing?" #"\s+")] words)
18:26clojurebot["hello" "how" "are" "you" "doing?"]
18:27surmaI want words to be ["hello" "how" "are"]
18:27gtrak`surma: doesn't work that way
18:27surmagtrak`: figured as much ^^
18:27gtrak`,(macroexpand-1 '(let [[w1 w2 w3 :as words] (clojure.string/split "hello how are you doing?" #"\s+")] words))
18:27clojurebot(let* [vec__168 (clojure.string/split "hello how are you doing?" #"\s+") w1 (clojure.core/nth vec__168 0 nil) w2 ...] words)
18:27emezeske,(let [[w1 w2 w3 :as words] (clojure.string/split "hello how are you doing?" #"\s+")] (take 3 words))
18:27clojurebot("hello" "how" "are")
18:28gtrak`this is the expansion: (let* [vec__2006 (clojure.string/split "hello how are you doing?" #"\s+") w1 (clojure.core/nth vec__2006 0 nil) w2 (clojure.core/nth vec__2006 1 nil) w3 (clojure.core/nth vec__2006 2 nil) words vec__2006] words)
18:28SegFaultAX|work2surma: What are you trying to do?
18:28gtrak`you can see words is bound to the result of split
18:29gtrak`you can make a custom macro, or you can do [w1 w2 w3] or take 3.
18:29surmaSegFaultAX|work2: Nothing really. I'm just playing around with ":as". Learning Clojure ;)
18:30surmagtrak`: Okay. That's all I wanted to know. Thanks for the expansion. Gonna remember that in the future ;)
18:30gtrak`np
18:31SegFaultAX|work2Does loop..recur generate a trampoline internally?
18:32gtrak`SegFaultAX|work2: I just took a quick peek, it looks like loop generates one of these: http://asm.ow2.org/asm33/javadoc/user/org/objectweb/asm/Label.html so that should be a clue
18:33gtrak`doc says 'Labels are used for jump, goto, and switch instructions'
18:35gtrak`and in recur, there's a line, gen.goTo(loopLabel)
18:36gtrak`the compiler keeps the labels on a var stack, so that determines the recur target (I wonder if I could hack that ;-)
18:38thorbjornDXis it normal to cringe at python code after learning about a lisp?
18:39vilonisyes, which is strange because python code seemod so elegent before
18:40technomancyit's not technically required, but, you know...
18:40hoover_dammeventually you stop cringing at things and learn to just accept them as is
18:40thorbjornDXvilonis: I find myself thinking a helper 'function' that uses [].append is ugly
18:40nDuff...soooo many places where a bit of nil punning, or a let, or real lambdas, or somesuch would save me extra lines.
18:41thorbjornDXhoover_damm: Yeah, I know that python/perl are good languages, and have their places
18:41thorbjornDXnDuff: yeah, I definitely hit the limits of lambdas today
18:41tanzoniteblackhttp://programmablelife.blogspot.com/2012/08/conways-game-of-life-in-clojure.html has a section at the bottom, where the clojure example is almost identically written in "un-idiomatic python", I find that's what my Python looks like quite a lot now a days
18:42hoover_dammthorbjornDX, :) I'm just an old Sysadmin who's never stopped evolving from shell into ruby into python into lisp into clojure.
18:42hoover_dammthorbjornDX, it's just another tool to help :) win
18:42hoover_dammone that I rather like
18:42thorbjornDXnDuff: and that helper function that I was doing had one of the notorious 'm = reobj.match(blah); if m is not None: l.append(m.groupdict())'
18:43thorbjornDXhoover_damm: I really want to incorporate some clj into my work, but I'm not quite there :p
18:44hoover_dammthorbjornDX, I found the absolute best way. Infrastructure management
18:44technomancyhoover_damm: pallet?
18:44hoover_dammnah
18:44hoover_dammnot cm
18:44hoover_dammnor cmdb
18:44nDuff...oh -- the other thing I really wanted today was partial
18:44technomancywhat are those?
18:44thorbjornDXinfrastructure management... hmm
18:45thorbjornDXhoover_damm: can you give me an example?
18:46emezeskenDuff: functools has partial
18:46hoover_dammtechnomancy, one of my clients runs on multiple infrastructure providers. We've taken on some burdons of our own that make our life fun. But to start just a lame restful/dashboard interface that you can query all the available servers, their status, credentials... reinstall it, manage provisioning status
18:46technomancygotcha
18:46hoover_dammtechnomancy, i've reviewed many systems and basically they all end up opinionated
18:47hoover_dammfor us it starts with just basic ubuntu and being able to catalog and search our infra and have it pull data from 3rd party api endpoints
18:47hoover_dammsome own data collection as well for what you cannot get via api
18:48hoover_dammand when your spending 500k on infrastructure a month people want it pretty ... yeah
18:49hoover_dammand between currently 3 providers (1 virtual, 1 paas, 1 metal hosting)
18:50nDuffemezeske: Yes, but this was actually in a case where idiomatic Python was object-oriented, not functional.
18:50emezeskenDuff: I'm just saying, if you want partial, you can have it
18:51nDuff...so, what I _really_ wanted was an easy way to create a subclass of an object with a default value for a constructor argument...
18:51thorbjornDXnDuff: can't you use a metaclass for that?
18:52nDuffCould, but anything more than 2 lines is too much code for too little benefit here. This was "sure would be convenient if..." thing.
18:52thorbjornDXnDuff: fairNuff
18:56dnolencan now decode SourceMapV3 http://github.com/clojure/clojurescript/blob/source-map/src/clj/cljs/sourcemap.clj
18:56emezeskenDuff: lambda *args: MyClass(42, *args)
18:57dnolennext step preserve line / col info for every emitted symbol and merge w/ this and create new source map.
18:57emezeskednolen: high five!
18:57tanzoniteblacknDuff: you mean like this http://pastebin.com/c7gEQChX ?
18:57dnolenso maybe we can show off stepping in Chrome for Strange Loop?
18:57emezeskednolen: That's such a big deal
18:57dnolenand all you hard core CLJSers can finally get a little bit of help w/ your simple & advanced compiled code
18:59tanzoniteblacknDuff: http://paste.ubuntu.com/1178754/ is that better? I don't want to dump a bit of Python code here
18:59nDuff*nod*. I don't actually remember what I was doing at the time when "damn, this would be easier with a partial" went through my head
18:59nDuffso I couldn't say with certainty whether that's an exact fit or not.
19:00nDuffIt _is_ a fairly compelling argument that I've gotten pretty far out of #python headspace, though.
19:00thorbjornDXi need to use *args more often
19:02tanzoniteblacknDuff: I have more of a problem of getting out of the python mind-set and into the clojure one; but considering how functional my python tends to be, it's less painful to do that then it is to code in Java
19:05FrozenlockI'm trying to run himera, but I run into this: Error: problem requiring leiningen.js hook Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/js__init.class or leiningen/js.clj on classpath:
19:05FrozenlockBut I can see the 'missing' file, it's there!
19:06gtrak`I don't miss python really, clojure's more dynamic, transparent, and faster once you get past the initial learning.
19:07gtrak`I can jump into the source and have a good idea of what it's doing
19:15Gnosis-technomancy: I wrote a workaround macro for the slingshot bug we were talking about: https://www.refheap.com/paste/4783
19:16Gnosis-I'm not sure it's useful to you or anyone but me, though
19:30unlinkIs there a more concise expression for this: (split-with (comp (partial = method) :method) xs)
19:32hyPiRionunlink: Method is a local, right?
19:32hyPiRion/s/Method/method
19:32unlinkhyPiRion: yes, it is let-bound.
19:32emezeskeunlink: Maybe (split-with #(= % :method) xs) ?
19:33hyPiRionemezeske: You mean (split-with #(= method (:method %)) xs), right?
19:33unlinkNo, using an anonymous lambda it would be (split-with #(= method (:method %)) xs)
19:33hyPiRionIt's essentialy the same
19:33emezeskeOh, I misread the original, sorry
19:34xeqi(split-with #(-> % :method (= method)) xs) ?
19:34xeqinot that it changes much
19:34unlinkI was hoping for something similarly concise to: break ((== method) . _method)
19:34hyPiRionDo you need both parts?
19:35unlinkYes.
19:37hyPiRionWell, the closest other thing I can think of is (group-by :method xs), but it's more of a filter/remove thing.
19:38unlinkRight, I like that too.
19:39unlinkThanks.
20:00kjellskiis there a debug let? that prints all definitions? or something similar.... ?
20:03emezeskekjellski: I don't know the answer to your question, but there is a hack that I use occasionally to see things in a let:
20:03emezeske,(let [a 1 b 2 _ (println a b) c 3] (+ a b c)])
20:03clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: ]>
20:03emezeske,(let [a 1 b 2 _ (println a b) c 3] (+ a b c))
20:03clojurebot1 2
20:04clojurebot6
20:09hyPiRionI usually redefine prn to (fn prn [a] (clojure.core/prn a) a) - it's rather nifty for debugging.
20:10hyPiRionSo my way would be (let [a (prn 1) b (prn 2) c (prn 3)] (+ a b c))
20:10hyPiRionThough I don't know if it's idiomatic - it's something I've dragged along from common lisp.
20:21djanatynI'm having a lot of trouble getting clojure working on windows
20:22casionmore information would be nice
20:22djanatynI'm using clojure mode version 1.11.5, emacs 24, and Leiningen 2.0.0-preview10 on Java 1.6.0_11 Java HotSpot(TM) Client VM
20:23djanatynsorry, was getting versions before I explained my issue :)
20:23djanatynso, so far I've got lein working nicely, but I'm having issues with clojure-jack-in. when I try to connect I get this error:
20:24djanatyn(error "Could not start swank server: '$SHELL' is not recognized as an internal or external command, operable program, or batch file")
20:24djanatynI'm using eshell, due to some restrictions on the computer I'm using
20:25hyPiRiondjanatyn: Are you able to run "M-x shell" without issues?
20:25djanatynnope, command prompt disabled :(
20:26djanatynthis is a school loaned laptop, and they have a few things locked down to prevent mischief.
20:26djanatynis enabling the command prompt necessary to get clojure-mode working?
20:28xeqiyou could try `lein swank` from the project and M-x slime-connect
20:28djanatynah, I see what's up. clojure-swank-command is set to "echo \"lein jack-in %s\" | $SHELL -l"
20:30djanatyn...and also lein doesn't have swank. what is the preferred way to add plugins with lein 2?
20:31xeqifor swank, add {:user {:plugins [[lein-swank "1.4.4"]]}} to ~/.lein/profiles.clj
20:31hyPiRion.lein/profiles.clj I believe.
20:31djanatynsorry, just did :) I'll try googling next time before asking
20:32RaynesConsider using nrepl.el instead of swank and SLIME.
20:32Raynesswank-clojure is deprecated.
20:34djanatynthanks Raynes! I installed nrepl and everything is working fine
20:34kd4joaswank clojure is still more stable than nrepl at this point. I'm sticking with it for now, but you are right nrepl is supposed to be the favored
20:34kd4joaI'll keep checking out nrepl and will make the move when it stops crashing so much
20:35djanatynumm, hmm. perhaps I said that too soon.
20:36kd4joagive it a try and see how it works for you
20:37kd4joamost of the time it works great for me, but I've had a couple instances where it freaked out on me
20:38kd4joaand it is the tool that it sounds like people are going to spend their time on
20:38hyPiRionAs long as you don't use paredit, you should be relatively fine. But it's pretty awesome at killing paredit's keybindings.
20:40djanatynD: I love using paredit
20:41djanatynalso, I'm getting this error when I try to compile a file with C-c C-k: clojure.lang.LispReader$ReaderException: java.lang.RuntimeException: EOF while reading string
20:42hyPiRionI'm using bodil's hack to get over it while waiting for a new version: https://github.com/bodil/emacs.d/blob/master/bodil-lisp.el#L55
20:43djanatynah, looks like someone else had the same error 3 days ago, and they released a new version of nrepl with a fix
20:44brainproxygood tutorial for learning how to use YourKit in combo w/ clojure and Eclipse
20:44brainproxy?
20:50arrdemcan someone point out what's wrong with the IO in this gist? for some reason it (read)s without end. https://gist.github.com/3561992
21:00arrdemnvm got it
21:00djanatynwhat was it?
21:01arrdemsomething with the way lein was bootstrapping the program. If I just `clj <foo.clj>` it works fine
21:02arrdemprobably a bug in my project.clj, but I don't really care since this is a script anyway.
21:06dansalmoHow can I split a sequence like '(\b \o "F" \: \h \o) at the \:? I tried (split-with (partial = \: '(\b \o "F" \: \h \o) ) but it gives a '() split result.
21:07dansalmo(partial = \:)
21:09djanatynalright, thanks guys! I've got nrepl and emacs set up, and I'll be able to use clojure at my school and in my stats class :)
21:16kd4joastats class? very cool. what kind of stats class and how are you going to use it?
21:17Rayneskd4joa: What do you mean by 'crashing so much'?
21:17kd4joait gets into the situation where when I switch to the nrepl buffer it throws an exception as soon as I switch to it
21:17kd4joathat's been the biggest problem
21:18RaynesOh. The word 'crashing' confused me.
21:18RaynesI thought you meant Emacs was actually crashing.
21:18kd4joasorry. that was kind of a generic expression
21:18kd4joaI should have been more specific
21:19RaynesBut yeah, I imagine all those little issues will be fixed soon.
21:19RaynesFor every nrepl issue, there are 15 that a new user coming to Clojure has with SLIME.
21:19RaynesSo I'm optimistic.
21:19kd4joaI'm sure they will since it's getting so much attention
21:19kd4joayeah I am too. I do remember the pain of getting SLIME working
21:20casiongetting slime working is pretty easy with 24
21:20casionat least it was for me
21:20RaynesYeah, an ancient version of SLIME.
21:20RaynesThat clojure-jack-in hacks into .emacs.d for you.
21:20RaynesThat is 15 different kinds of disgusting.
21:21casionthat is true
21:21casionbut it works for the most part :)
21:26gtuckerkelloggdos nrepl.el have something analogous to slime-compile-defun yet?
21:27RaynesWhat does that do?
21:27gtuckerkelloggit compiles the top level form
21:27gtuckerkelloggI have it attached to C-c C-c
21:28gtuckerkellogg(or maybe that's how it comes in slime)
21:28Raynesgtuckerkellogg: C-M-x
21:28Raynesgtuckerkellogg: nrepl readme has a list of commands.
21:28Raynesnrepl.el readme, that is.
21:31gtuckerkelloggTnanks Raynes :)
21:31gtuckerkelloggi apprently missed that one.
21:32gtuckerkelloggI was really happy to see output of evals in a clojure buffer are now sent to the repl
21:33djanatynhmm, nrepl's auto-complete is really slow
21:33djanatynI'm using ac-nrepl, which I found on marmalade. how do most people using nrepl handle auto completion?
21:35djanatynooh, never mind. I wasn't actually using ac-nrepl, and now it's a lot faster.
21:38xeqikd4joa: for reference, theres an issue for that at https://github.com/kingtim/nrepl.el/issues/86
21:50FrozenlockWhy does lein throw an error when trying to run himera? Apparently it has something to do with leiningen.js (not on classpath?!) I'm pretty sure it has to do with this --> :hooks [leiningen.js]
21:50Frozenlock(from https://github.com/fogus/himera/blob/master/project.clj)
21:52holohi
21:54cjfriszMan... I really want nrepl-jack-in to do stack traces like swank-clojure
21:54cjfriszI really like everything else about it, but the stack trace handling kills me
21:54djanatynhmm. does anyone know where I'm supposed to put incanter.jar?
21:55djanatynI tried installing it with lein, but apparently there's a mongodb jar it can't find
21:56djanatynalso, I think the incanter blog with all the howtos is down :(
22:07hugodcjfrisz: ritz-nrepl does that
22:11Rayneshugod: Why is your stuff not going into nrepl proper?
22:12hugodRaynes: because it adds a ton of stuff, and means you use two jvm processes
22:12RaynesBleh
22:13hugodit also shares common code with the swank version of ritz
22:15hugodRaynes: so the answer is, it was easier to do like that. I have nothing against putting parts of into nrepl/nrepl.el
22:21gtuckerkelloggdjanatyn :(
22:28cjfriszhugod: Is it a pain to install?
22:28cjfriszThe github page made it sound like a pain
22:30jasonjcknamalloy: have your patches for reducers been comitted yet?
22:31amalloyno
22:31jasonjcknamalloy: k, i'll revisit mine when yours are in
22:32jasonjckni was busy for a while, but i guess you've been blocked on rhickey and I didn't miss too much
22:32jasonjckni'm on the contributors list merely by signing the agreement, i guess my work here is done ;) jk
22:46SegFaultAX|work2I want to filter a map to only keys where the values match a given predicate, what's the best way to do that?
22:55technomancyjkkramer: I have clojuresphere working with clojure 1.4 and the latest compojure stack
22:56jkkramertechnomancy: whoa cool. I was just sitting down to see about refreshing the data
22:56technomancyI punted on the github section though
22:58technomancyjkkramer: have you seen drawbridge?
22:58technomancyI could add this in too: https://devcenter.heroku.com/articles/debugging-clojure
23:00jkkramertechnomancy: I've seen it. I've generally shied away from plugging a repl into a live site but no harm in having the option I suppose
23:01technomancyjkkramer: actually probably not much point right now since there's basically no difference between dev and production
23:02tmciverSegFaultAX|work2: how about (into {} (filter your-val-pred your-map))
23:03technomancyjkkramer: sent a pull request for my modernize branch
23:03technomancyyou may want to do your refresh first since I haven't tested the switch to tentacles
23:03tmciverSegFaultAX|work2: your-val-pred would have to call (val %) at some point.
23:07technomancyjkkramer: if we're going to swap the storage out for another backend that might make sense to do first, don't you think?
23:07jkkramertechnomancy: merged. going to futz with the github code anyway before refrsh
23:07technomancyok, cool
23:08technomancyI figure a different backend would probably be fairly high-impact; the kind of thing you'd want to do sooner rather than later?
23:08jkkramerI wonder how accurate this is… https://api.github.com/legacy/repos/search/project.clj?language=clojure. can't search for empty keyword, and it doesn't say what it searches
23:08clj_newb_3802so I've written an app in clojurescript, because I hate the java graphics api
23:09clj_newb_3802now my question: is there a way to bundle this application as a desktop applicatino somehow?
23:09technomancyjkkramer: it's not very big
23:09technomancyoh, it's paginated
23:09technomancyhm
23:09jkkramertechnomancy: possibly yeah. Have to wrap my head around the code & data again. it's been a while
23:09jkkramerright
23:12jkkramersearching for clojure yields 88 pages of projects… https://api.github.com/legacy/repos/search/clojure?language=clojure&amp;start_page=88. That seems to be the best to be gotten through the API
23:12technomancynice
23:41cjfriszI love ripping out my own code
23:41cjfriszSo much fun
23:50john2xhmm, how do I call a function which is (defn)'d after the function calling it?
23:51tmciverjohn2x: declare? ##(doc declare)
23:51lazybot⇒ "Macro ([& names]); defs the supplied var names with no bindings, useful for making forward declarations."
23:52john2xah thanks!