#clojure logs

2012-05-07

00:10technomancyI have some cljs code where I try to call a constructor that takes an object, and I'm passing it a map. it gets compiled to a cljs.core.ObjMap.fromObject call, which bombs on "Error: No property strobj on this GObject StLabel"
00:10technomancyany idea what's going on there?
00:18RaynesDear ladies and gentleman of the night's watch: if you've ever tried typing a let on refheap and have any idea what I'm saying when I talk about an indentation bug, you'll be pleased to hear that it is now fixed. Carry on.
00:19devntechnomancy: sounds familiar -- maybe you're requires for goog.* something or other?
00:20devntechnomancy: it reminds me of a problem requiring goog.string and/or goog.string.StringBuffer
00:20technomancyI'm not using any goog classes on purpose here
00:21devntechnomancy: that's all i had handy, but it reminded me of when I took StringBuffer out of the mix because it seemed to be working fine without it, but chouser ran into trouble
00:21devn(in core.cljs)
00:26mmarczyktechnomancy: wild guess -- if that constructors loops over the properties of the object it is passed and assumes they correspond to its own properties of some sort, it could end up trying to set its nonexistent strobj property when passed an ObjMap
00:29mmarczyktechnomancy: I'm assuming by "passing it a map" you mean doing something like (Foo. {"asdf" 1}) in place of (Foo. (js-object "asdf" 1)) -- that simply won't work -- you'll need to write a map->obj function and perform a conversion *or* use js-object as above (the version which takes arguments is only available on master, though -- (doto (js-object) (aset ...)) in releases) *or* rely on ObjMap's strobj by extracting it from the map
00:29mmarczyk(hacky, kludgey, to be avoided etc.)
00:29mmarczyktechnomancy: (btw, removing (.-strobj some-obj-map) kludges from TwitterBuzz made it quite a lot faster)
00:30yoklovmmarczyk: you mean js-obj, right?
00:30technomancyyeah, I was just trying an explicit strobj call
00:30technomancyit looks like that does the trick
00:30mmarczykyoklov: technomancy: yeah, thanks
00:30technomancyI don't care about speed here
00:31mmarczyktechnomancy: incidentally, are you doing gnome gui scripting in cljs? :-)
00:31technomancymmarczyk: trying to =)
00:31mmarczyktechnomancy: cooooool 8-)
00:31technomancymmarczyk: yeah, it's the first use I've had for Clojurescript
00:33mmarczyktechnomancy: any chance at all you might consider blogging about the experience?
00:33mmarczyktechnomancy: I've been thinking about writing some X-related stuff in cljs, could use a nice intro :-)
00:33technomancymmarczyk: I'll definitely post about it if I get it working
00:34mmarczyktechnomancy: looking forward to it!
00:34yoklovit's easy to forget that javascript is a scripting language for so many things, can't wait to see where people using it for non-browser stuff goes
00:34technomancygnome 3 has some problems, but it's the first "mainstream" desktop that "gets it" as far as user-level extensions
00:34technomancy(FSVO mainstream)
00:35muhooum, is there a select form element in noir?
00:36muhoooh, nm, i see, it's all in hiccup
00:36muhooi think
00:37mmarczykreally? well that's encouraging, might actually try it then
00:38technomancyI'm hoping as a first step to port devilspie to clojurescript
00:38mmarczykI shouldn't be bothered much with any UI issues, I'll be replacing the WM first thing... but I hardly expected any benefit
00:38technomancyif that goes well possibly porting xmonad-type behaviour
00:38technomancyshouldn't be too difficult; xmonad is only 1200 LOC =)
00:39mmarczyk:-)
00:39muhooah, it's called "drop-down", not select
00:40mmarczykI was actually trying to decide whether I'd want to implement a WM in CLJS... on the one hand, that would be simply very cool and probably the most convenient WM configuration experience for me, on the other, I'd lose my no. 1 occasion to use Haskell :-P
00:40yoklovhaha, i'm always upset when i have to touch my xmonad config
00:40technomancythe lack of runtime eval reeeeeeally sucks when writing something with dotfiles
00:40yoklovi always upset haskell's compiler
00:41mmarczykwell, I'm mostly bothered by Cabal
00:42yoklovoh, definitely
00:42meiji11I'm trying to create & manipulate a PersistentQueue in the REPL, but it just spits back a PersistentQueue object, when it should return a popped item. what is going on..
00:43yoklovbut i feel like whenever i write a new function i manage to piss off the type system
00:43mmarczyk:-)
00:43yoklovmeiji11: pop returns the new queue, peek returns the top item
00:44yokloverr, wait, maybe first?
00:45yoklovboth work
00:46Raynesmmarczyk: Cabal is the best thing ever.
00:47RaynesObviously.
00:47technomancyRaynes: I thought mix was
00:47RaynesMix is just leiningen 3.
00:47technomancyhaha
00:52mmarczykRaynes: if you believe only members of the Cabal should be allowed to build largish projects in Haskell, whereas the uninitiated should be prevented from doing so in such a way that they think they are being helped
00:55meiji11yoklov: right, just like with vectors.. duh. thanks.
00:57yoklovmeiji11: yup, no problem!
01:11technomancymmarczyk: what I've got so far, if you're curious: http://p.hagelb.org/syme.cljs.html
01:11technomancythe individual functions work if I call them on their own, but put together as an extension for some reason it doesn't click
01:13mmarczyklooks very cool nevertheless
01:13mmarczykwhat compilation options are you using?
01:13mmarczykalso, release or master cljs?
01:38ivanWindows users without SLIME/Swank might be interested in the new and improved https://github.com/alandipert/clj-swingrepl
01:38ivan(thanks to conhost being unusable)
03:08mrphoebsHi guys, I'm n00b. I'm trying to integrate clojure into a java project. I'm using the "gen-class" function to generate classes. In the :methods vector how do I write the signature of a method whose return type is a list of strings eg ":method [ methodname [] <????> ]"
03:08mrphoebsI'm a n00b*
03:13hoeck1mrphoebs: you need to use weird jvm array type literal, see http://stackoverflow.com/questions/2398478/declare-array-as-return-type-in-gen-class-method-declaration-in-clojure
03:14mrphoebsThanks @hoeck1 that helps
03:15hoeck1mrphoebs: your're welcome :)
03:29jondotanyone here doing both clojure and erlang?
03:38Raynesjondot: I've done some Elixir, which is... at least an Erlang derivative.
03:39jondotRaynes, that's also interesting. i'm kinda wondering if to get into erlang. how mature is elixir?
03:42Raynesjondot: Admittedly not very. It's still in the "everything can change" state.
03:42RaynesIt's a fun language though. I know that the language author at least as some code in production in his company.
03:42Rayneshas*
03:45jondoti see
03:56ivanhow do I use require inside a function/macro? I keep getting "RuntimeException: No such namespace: "
03:56ivando I have to poke at namespaces manually?
04:00ivanI'm trying to write a function for my REPL :init that loads some libraries and does things
04:01emezeskeivan: (defn f [] (require 'clojure.string))
04:01emezeskeivan: I'm pretty sure that works
04:02ivanI'm using :as, maybe that breaks things?
04:02ivanuser=> (defn f [] (require 'cljs.repl) (repl/repl))
04:02ivanCompilerException java.lang.RuntimeException: No such namespace: repl, compiling:(NO_SOURCE_PATH:12)
04:03emezeskeNo, :as is fine
04:03ivanoh, I see what I did wrong above, let me try again
04:04ivanuser=> (defn f [] (require '[cljs.repl :as repl]) (repl/repl (rhino/repl-env) :warn-on-undeclared true))
04:04ivanCompilerException java.lang.RuntimeException: No such namespace: repl, compiling:(NO_SOURCE_PATH:23)
04:04emezeskeWhat is rhino/ ? Do you require that namespace?
04:05ivanyeah, I did; omitted in my paste
04:05emezeskeWell, this works fine for me: (defn f [] (require '[clojure.string :as s]) (s/blank? ""))
04:06emezeskeSo I'd be suspicious of the rhino/ before I was suspiciuos of the repl/
04:06emezeskeErr, it says repl
04:06emezeskeNM
04:06ivanuser=> (defn x [] (require '[clojure.string :as s]) (s/blank? ""))
04:06ivanCompilerException java.lang.RuntimeException: No such namespace: s, compiling:(NO_SOURCE_PATH:4)
04:07samrat1what's the best way to run a single .clj file? (not a project, but just a script)
04:07emezeskeivan: I'm running against clojure 1.4, not sure if that makes a difference?
04:07ivansame. maybe my REPL env is messed up
04:07emezeskeivan: I dunno, but that seems very weird. Wish I could help more, but I'm stumped! :)
04:08ivantotally vanilla Clojure 1.3.0 REPL started with java -jar: user=> (defn x [] (require '[clojure.string :as s]) (s/blank? ""))
04:08ivanCompilerException java.lang.RuntimeException: No such namespace: s, compiling:(NO_SOURCE_PATH:1)
04:10emezeskeivan: Yeah, I restarted my REPL and saw that
04:11emezeskeivan: I must have run f with just the require one time
04:11ivanyep
04:11emezeskedon't listen to me! ^_^
04:12emezeskeivan: So I think in your situation you might need to use (resolve)
04:12emezeskeivan: Or maybe just use all fully-qualified names
04:12ivanfully-qualified names don't work either inside the function
04:12ivanI'll check out resolve, thanks
04:13emezeskeivan: This works on a fresh REPL for me: (defn f [] (require '[clojure.string]) ((resolve 'clojure.string/blank?) ""))
04:13ivancool, thanks
04:13emezeskegood luck, sir, I'm outta here! :)
04:17ivanthat works because clojure.string/blank? is available without requiring :)
04:18ivan__ivan: damn i keep looking at the bottom window of limechat and seeing 'myself' talking....
04:18ivanI found a defmacro locally-using on the mailing list
04:19ivanivan__: I see myself joining channels I'm already in
04:19ivan__heh
04:22ivanI wonder if I can do a different horrible thing: spawn a thread that requires the libraries that take 10 seconds to load
04:25ivan__ivan: seems like a good idea, although i have no idea how loading works in clojure
04:25ivan__i would assume it would work though
04:27ivanOn OSes with fork, it would be cool to automatically create zygote REPLs with everything loaded, then fork them when the user wants a REPL
04:27ivan(I hope the JVM will not complain)
04:33ivanis there some way to feed forms into an already-running REPL, so that the (require) is at run outside of a function?
04:34ivanalright, I'm just going to make a different :init for CLJS :)
04:40michaelr525hey
04:52ivananyone else see EvaluatorException unterminated comment (goog/deps.js#1) with ClojureScript and Closure Library trunk?
04:52ivanseems that Rhino can't handle files that end with a /* block comment */
05:29ivanfiled a Closure Library bug, hopefully they'll remove the block comment making Rhino break
05:31calvadosis there clojure lib works with couchbase ?
05:33forsakendaemonI've just used clj-http...
05:46robertstuttafordi'm struggling with Korma. "CannotAcquireResourceException A ResourcePool could not acquire a resource from its primary factory or source." the details i've given to defdb work 100% with MySQLWorkbench
05:46robertstuttafordwhat can i try?
05:49hoeck1robertstuttaford: does a plain JDBC connection work?
05:50kralnamaste
05:50robertstuttafordi've no idea. apologies, but i also have no idea how to try that. not a java person
05:50robertstuttafordfound some code to try...
05:51michaelr525maybe try connecting with squirelsql, it's a java (jdbc) client to test your connection details under jdbc
06:01robertstuttafordstraight jdbc works; i can query data
06:05robertstuttafordbut when i switch back to korma and attempt a (select) i get the CannotAcquireResourceException
06:07hoeck1robertstuttaford: never used korma too, the CannotAcquireResourceException originates from the resource pool used by korma, c3p0
06:07robertstuttafordi hate problems like this. takes the wind out of my sails :-|
06:08hoeck1robertstuttaford: there should be some additional info or a wrapped exception,maybe paste the full stacktrace of your exception somewhere
06:08hoeck1robertstuttaford: I know, I know :)
06:10robertstuttafordok, i used ccw's print-full-exception
06:10robertstuttafordwrapped exception is "Connections could not be acquired from the underlying database!"
06:10robertstuttafordi'm using precisely the same hash passed to jdbc directly and it's giving me this
06:14michaelr525maybe wrong driver?
06:15robertstuttafordi added (database nameofdatabase) to each (defentity) and now it works
06:15robertstuttaforddocs say it automatically uses the last provided defdb, i guess not in my case!
06:16michaelr525oh
06:16robertstuttafordi think i'm also struggling with understanding what changes when i send the whole .clj file to ccw's repl
06:17robertstuttafordwell, i'm up and away now :) -phew- thanks hoeck1 and michaelr525 for your help
06:21michaelr525something that annoys me is the one-compile-error-a-time thing
06:22michaelr525i'd rather have a list of all errors
06:47michaelr525err
06:48michaelr525any way in webnoir to get the part after "/n/" in a url like this: "http://localhost/n/10/20/30&quot;? What comes after "/n/" can vary in the number of URI element.
06:49michaelr525for example it can also be
06:49michaelr525"http://localhost/n/1/2/3/4/5/6/7/8/8&quot;
06:56clgvmichaelr525: since that cant be a fixed route you probably have to catch all routes matching a given prefix and parse the rest yourself
06:56faust45hi guys
06:56faust45have a question
06:56clgvmichaelr525: or is there regexp support?
06:57faust45how i can include to my project this lib http://commons.apache.org/fileupload/apidocs/index.html
06:57clgvfaust45: you should just ask it ;)
06:57faust45 [org.apache.commons/fileupload "1.2.1"]
06:57faust45not working
06:58clgvfaust45: these are in the maven repo: http://search.maven.org/#search|ga|1|fileupload
06:58faust45sorry i don't familiar with java libs
06:58faust45so how i can use http://search.maven.org/#search%7Cga%7C1%7Cfileupload
06:58clgvfaust45: hence [commons-fileupload "1.2.2"] should work
06:59faust45clgv: yes looks good ) thanks
07:00cemerickam I right that js-obj was broken until a couple of days ago?
07:00faust45clgv: but which name space i need to use in :import section ?
07:00clgvfaust45: the javanamespace plus classname
07:01faust45clgv: (org.apache.commons.fileupload ServletFileUpload) ?
07:01clgvfaust45: yeah, looks good if the class exists ^^
07:02faust45clgv: thanks
07:11michaelr525clgv: yeah regex did it :)
07:12michaelr525thanks
07:12clgvmichaelr525: how does it look like now?
07:12michaelr525(defpage node [:get ["/n/:path" :path #".*"]] {:keys [path]}
07:12michaelr525hairy :)
07:13clgvah ok. so it's supported within the routes :)
07:13michaelr525yup
07:14michaelr525i could also get it like this: (defpage node "/n/*" [& path]
07:15michaelr525but then path was a list with a vector inside it
07:16clgvmichaelr525: humm (defpage node "/n/*" [& path] ..) should get only the vector in 'path
07:16clgvargs that I meant: (defpage node "/n/*" [path] ..)
07:19robertstuttafordwith korma, is it possible to define a has-one with a conditional to use when querying it? eg, say i have document has-many versions. i want to document has-one current-version and define the query for how to get just one version
07:19robertstuttafordkinda like active-record does it
07:42faust45how i can import javax.servlet.http.HttpServletRequest in my app?
07:44clgvfaust45: the class?
07:44faust45clgv: yes
07:44clgvclgv: like the other java class before - it's always the same scheme
07:44clgv faust45: (:import javax.servlet.http.HttpServletRequest)
07:45faust45clgv: but (javax.servlet.http HttpServletRequest) not working
07:45faust45ClassNotFoundException
07:45clgvfaust45: so either the namespace is false or you need a library for that class
07:45faust45clgv: did you know with lib?
07:46clgvno idea
07:47michaelr525faust45: what are you trying to do?
07:48faust45michaelr525: simple web server with handle file uploading
07:49michaelr525why aren't you using something like webnoir/ring/compojure?
07:49michaelr525the class you are looking for seems to come with a servlet container: http://www.jarfinder.com/index.php/java/info/javax.servlet.http.HttpServletRequest
07:50faust45michaelr525: just what make this by hands
07:51michaelr525if you are using leiningen you can try to add jetty to your project.clj
07:51michaelr525otherwise just throw it's jar in your classpath
07:51faust45michaelr525: but how i can include my project http://www.jarfinder.com/index.php/java/info/javax.servlet.http.HttpServletRequest ?
07:53michaelr525are you using leiningen?
07:55michaelr525faust45: check this https://github.com/mmcgrana/ring/blob/master/ring-jetty-adapter/project.clj
07:56michaelr525or this: https://github.com/mmcgrana/ring/blob/master/ring-servlet/project.clj
08:02faust45michaelr525: thanks!
08:03robertstuttafordany folks using korma here?
08:05Borkdudecemerick: I have a student with the same macbook air, he downloaded eclipse, installed leiningen+ccw, worked fine. I copied his entire eclipse folder to my machine
08:06robertstuttafordfor some reason a (with thing) for a has-many association is coming up with [] instead of actual rows
08:06Borkdudecemerick: keep getting those wonky errors… https://gist.github.com/2627392 <- could it be a system global thing that is in the way and if so, where should I look? any clues?
08:06robertstuttafordusing dry-run shows me sql that, when used in mysql console, works
08:07cemerickBorkdude: Try using the known-good eclipse from a dummy user account.
08:08cemerickThe errors you've gotten have changed, with presumably no clear reason. I've never seen any of them, and don't have any good theories at the moment.
08:08Borkdudecemerick: will try that
08:17Borkdudecemerick: it works under a dummy account!!
08:17Borkdudecemerick: now I still have to find out what could be troubling lein/ccw
08:17cemerickBorkdude: well, you're getting closer :-)
08:18cemerickTry a new eclipse workspace (not in the dummy account)
08:23Borkdudehave tried that, but will try again later, gtg now again (work)
08:23Borkdudecemerick: tnx so far
08:31Borkdudegot a few minutes left
08:31Borkdudecemerick: no luck in new workspace with the known-good one, it must be something in my settings, global jars, or smth?
08:32Borkdudecemerick: could it be smith in my .m2 dir?
08:32Borkdudecemerick: known-good one + new workspace under my normal user account that is
08:34cemerickI can't imagine .m2 being involved.
08:35cemerickBorkdude: In *your* copy of eclipse, uninstall all of ccw and the lein plugin. The re-install.
08:35cemerickI'd almost hope that that wouldn't work. :-P
08:35Borkdudecemerick: tried it several times….
08:35Borkdudeit must be something in my home environment, but what...
08:37Borkdudegtg now again
08:46mmarczykhas anybody encountered a "No such var: useful.utils/Adjoin" exception (apparently originating in protobuf.core, which does indeed refer to that protocol in this way) when using clojure-protobuf? it's driving me crazy atm :-(
08:50clgvmmarczyk: is using a previous release an option? maybe it's an inconsistent snapshot?
08:55mmarczykclgv: hm, it might be an option
08:57mmarczykclgv: it's 0.6.0-beta16 though... also, the only version of useful on the classpath is the one depended on by protobuf. so, no idea what's going on :-/
09:02kzarI've been messing around with clojurescript one via inferior-lisp in Emacs and I've found that sometimes the repl gets in weird state whereby every time I try to eval something it just hangs until I abort. (It seems to happen when I've messed up somehow, problem is I can never seem to recover without killing the process and firing it up again.)
09:03kzarAlso I've found the result of what I eval at the repl isn't always returned
09:07mattfredwillAnyone have any experience using clojure for (Simple) 3d game dev?
09:07kzar(If I eval 1 it's not returned to the repl, if I eval (+ 1 1) 2 _is_ returned.)
09:09mattfredwillclojure-games.org seems a little light on content so I'm wondering if its just a dead site or if clojure game dev is a bad idea
09:15jwr7The lack of a complete, stable and current Redis client library for Clojure is becoming a problem...
09:16jwr7There is redis-clojure (recently brought back from the dead), clj-redis and accession, none of which are complete. I don't even know where to contribute :-)
09:35robertstuttafordcemerick: friend looks awesome! how plug-n-play is it for doing something like supporting a local-database signin along with facebook and twitter?
09:35babilenHow can I test if a map is present in a collection? (Something like "(contains? [{:foo "bar"}] {:foo "bar"}) → true)
09:36cemerickrobertstuttaford: once there's a library offering an oauth workflow for friend, then…very plug and play :-P
09:36cemerickI'm idly evaluating the options in the oauth area this week.
09:36rhcbabilen: maybe (== (select-keys my-map (keys smaller-map)) smaller-map)
09:36robertstuttafordok, great. i want to use friend to secure my rest json api
09:36fliebelbabilen: Like any value, using.. some unexpected name, like ony? or something, can;t remember
09:36robertstuttafordbut the userbase already has direct and facebook accounts in it
09:38fliebelbabilen: http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/some
09:38cemerickrobertstuttaford: yup, definitely working on it.
09:38robertstuttafordawesomesauce!
09:38cemerickCurrently considering using scribe for the guts of the oauth impl.
09:38fliebel&(some #{{:a 1}} [1 2 {:a 1} {:a 2}])
09:38lazybot⇒ {:a 1}
09:38babilenfliebel: Yeah, I found some, but I find it ... well ... ugly. Just wanted to see if there is a better solution. (fsvo better)
09:39robertstuttafordi've been reading the book non-stop. i can vaguely remember roughing out a design for some upcoming work in clojure in a dream last night. i might be a little too interested in clojure :)
09:39babilenfliebel: Thanks a lot! :) (/me thinks that contains? should work for that (just like it should work for lists, but meh))
09:40fliebelyea, it should..
09:40fliebel&(contains? [{:a 1} {:a 2}] {:a 1})
09:40lazybot⇒ false
09:41babilen&(contains? '(1 2 3) 1)
09:41lazybot⇒ false
09:41babilen*shrug*
09:42fliebelhuh
09:42cemerickrobertstuttaford: I'm glad you're liking it. :-) Nothing wrong with enthusiasm, of course
09:43jwr7cemerick: your book is good. It's among the top-2 clojure books (alongside "The Joy of Clojure"). I should know, I own all Clojure books published so far :-)
09:44fliebelwhy on earth would that be...
09:45cemerickjwr7: Thanks :-D
09:45foxdonutjwr7: do you have programming clojure 2nd edition? if so, what do you think of it?
09:36kzar,(.contains '(1 2 3 "babilen") 1)
09:36clojurebottrue
09:37dnolenxb
09:37dnolenoops
09:37jwr7foxdonut: I read the first edition, never looked closely at the second one. The first one was too basic for me, I couldn't find much in it. Also, I didn't like the choice of examples (a build system ...).
09:37fliebelkzar: ?
09:38fliebelOk, so contains? only tests for indexed things, like vectors, maps, etc.
09:38fliebelruturns false otherwise
09:38fliebel&(contains? [:a :b :c] 2)
09:38lazybot⇒ true
09:38babilencontains? is, well, horribly named
09:38fliebelyea
09:38kzarfliebel: contains? is for the key not value, so (contains? ["a" "b"] 0) would return true but (contains? ["a" "b"] 10) would return false
09:38kzar,(contains? {:a 1} :a)
09:38clojurebottrue
09:39dnolenjwr7: yeah the 1st edition of PC dates itself :)
09:39fliebelkzar: Yea, I figured that our, but what does the java method you use?
09:40kzarfliebel: I can't tell you so much about it, I just remembered it's often what you want instead
09:40fliebelI avoided contains? for so lang, I forgot why I avoided it.
09:40babilenI will probably never use it again :)
09:42kzarbabilen: Yea I feel something like contains-key? and contains-value? would be better names
09:42babilen+1
09:42fliebelwow, you can use it to test the length of a string? ##(contains? "abc" 5)
09:42lazybot⇒ false
09:42fliebelkzar: That's what the underlying java methods are called.
09:42fliebelhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L698
09:43kzarfliebel: "... fools seldom differ." eh?
09:43fliebelkzar: Not familiar with that saying?
09:43robertstuttafordit's better than patrick :-)
09:55echo-areaHad anyone ever seen "java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn" for expression (count {"k3" 467})?
09:55echo-areaWhat could be the reason?
09:56echo-areaIt's Clojure 1.2
09:56echo-areaIs that a known bug?
09:58fliebelecho-area: Are you sure it's that?
09:58fliebelI mean, if you enter that at the repl, it gives the same error?
09:58echo-areaYes, I'm 100% sure. I can't believe it.
09:58jcromartie,(count {"k3" 467})
09:58clojurebot1
09:59mmarczykdnolen: hi! CLJS-241 looks extremely promising :-)
09:59fliebel,*clojure-version*
09:59clojurebot{:interim true, :major 1, :minor 4, :incremental 0, :qualifier "master"}
09:59echo-areaI'm using storm.
09:59vijaykiranecho-area: I can't reproduce it ..
09:59echo-areaWell, I can't reproduce it in the repl too.
09:59jcromartieecho-area: I think you're mistaken
09:59echo-areaBut I compiled a uberjar and it can't pass that.
09:59echo-areajcromartie: I wish I could have made any mistake.
10:00fliebelecho-area: What happens when your replace the count with prn ?
10:00jcromartieit's gotta be a loading issue or something else
10:00echo-areajcromartie: I've spent ~2 hours on this and finally tracked down to here.
10:00jcromartieecho-area: what is the full stack trace?
10:01jcromartieand if it *is* that code that's failing, then count is somehow scoped to an integer… (def count 1) (let [count …] …) etc. , but I wouldn't head down that path quite yet
10:03echo-areahttp://pastebin.com/9s0fPEJF
10:05echo-areaYou can see that the first failure comes from (println (count (keys {"k3" 467})))
10:06echo-areaIt's a literal map, but runs very strangely
10:08echo-areaHmm, putting that expr outside the definition of `add-keywords' won't result in an error
10:10dmi3yHi, everyone. I just wrote a small Clojure app which uses clj-http and htmlunit. I was surprised that the standalone jar of it ended up weighting ~13M. Is there a way I can trim it down?
10:10echo-areaWhy, it looks that the problem is along with the destruction.
10:10echo-areaIf I don't use destruction but use (first ...) and (second ...), there won't be any error.
10:11gf3_ato: Ping?
10:12kzarWith js/setTimeout in Clojurescript is it safe to recurse?
10:13xeqiecho-area: you're shadowing count in the destructoring
10:13echo-areaOh, why didn't I notice that. What a PIIIITTTTYYY... :'(
10:14dakronedmi3y: if you aren't using any of the json stuff, you can exclude cheshire from clj-http and trim it down a little
10:14echo-areaForgot that Clojure is a Lisp-1....
10:15dmi3ydakrone: thanks
10:15echo-areaxeqi: Thanks for pointing me that!
10:19robertstuttafordkorma. have resource has-many resource-version. when selecting resource with resource-version, resource-version comes back as an empty vector. executing the dry-run sql manually correctly returns results for resource-version. what could i be doing wrong?
10:22bubimirHow can I combine macros with type hints? For instance, why doesn't something like (defmacro get-first-byte [^bytes bs] `(aget ~bs 0)) help me avoid reflection?
10:23nDuffbubimir: you can put (with-meta) in your macro output
10:24nDuffbubimir: ...re: why what you first tried doesn't work, the reader applies metadata directly to the macro definition, which doesn't get propagated when the macro is expanded
10:24nDuff(if my own understanding is correct)
10:24bubimirType hints are just metadata? (I'm new. :)
10:24nDuffbubimir: correct.
10:25bubimirThanks! I'll look into that.
10:25nDuffbubimir: see also http://stackoverflow.com/questions/7754429/clojure-defmacro-loses-metadata
10:26bubimirAhh, great! That helps lots.
10:31robertstuttaforddoes korma do any pluralisation of association names?
10:32robertstuttafordweird. if i stop telling the base model which fields to return, then the (with resource-version) starts working
10:33robertstuttafordibdknox: ping
10:39bubimirIs "bytes" not a class name? I can use it as a hint (^bytes), but don't know how to use it with something like vary-meta. Clojure says "unable to resolve classname". When I ack for a (class <a byte array>), I get a strange "[B".
10:39robertstuttafordmy korma issue: https://gist.github.com/2628135
10:40clgvbubimir: tag that "[B". thats java's strange naming^^
10:41TimMc&(.getCanonicalName (class (byte-array [])))
10:41lazybot⇒ "byte[]"
10:41TimMc&(.getName (class (byte-array [])))
10:41lazybot⇒ "[B"
10:42bubimirclgv and TimMc: Thanks! Using just "[B" seems to do the trick.
10:42foxdonutrobertstuttaford: what if you have (fields :id :title :resource_version.version) ?
10:43robertstuttafordfoxdonut: it complains that resource_version isn't in the table list for the query
10:43robertstuttafordrightly so resource has-MANY resource-version
10:43pyninjawhen I do (in-ns 'my.name.space), and then (use 'another.name.space), it says "java.lang.Exception: Unable to resolve symbol: use in this context". what am I doing wrong?
10:44clgvpyninja: thats because you went in a non-existing namespace which then was created on the fly but no (refer-clojure) was executed in it
10:45robertstuttafordjust updated the gist to show the dry-runs for each case
10:45nDuffpyninja: ...any particular reason for using (in-ns) rather than (ns) there?
10:46echo-areaBye folks!
10:46djpowellhmm - i can't do jira...
10:46djpowellhow do you mark something 'ready to test'
10:46robertstuttafordfoxdonut: i'm not going nuts, it should work the way i think it should, right?
10:46foxdonutrobertstuttaford: what if you have (with resource_version ...) *before* (fields :id :title :resource_version.version) ?
10:47pyninjaclgv: hm, but it should exist. it works fine if I do (use 'my.name.space) with the same namespace
10:47clgvpyninja: it exists after you did 'use since 'use is loading it ;)
10:47pyninjanDuff: i want to get inside an existing namespace, not declare a new one
10:47robertstuttafordfoxdonut: that works. why?
10:47kzardnolen: Is it safe to recurse with js/setTimeout? I wrote some code in a similar way to the example that you showed me but it slows down after a while
10:47pyninjaclgv: no, if I start a new repl it still works
10:48nDuffpyninja: if you use (ns) with an existing namespace, it does just that.
10:48clgvpyninja: 'use loads namespaces 'in-ns does not
10:48robertstuttafordfoxdonut: just figured it out, i think. :id wasn't in my field list before
10:48pyninjaclgv: i declared the namespace in a file
10:48pyninjawait, what does in-ns do then?
10:48foxdonutrobertstuttaford: I just started looking at korma last night, so I'm no expert. But, looking at the docs, I'm guessing that the (with ...) coming first tells korma to join, and *then* (fields :resource_version.version) works.
10:49clgvswitch to that ns and create it if it does not exist, i.e. was not loaded
10:49robertstuttafordi think korma relies on me to ensure that the join columns are present in the fields lists
10:51foxdonutrobertstuttaford: I'm guessing that the order matters.
10:51pyninjaclgv, nDuff: ns doesn't seem to work for me in that way either: https://gist.github.com/44014b4285e8f5400970
10:52clgvpyninja: do a (require 'my.ns) and then (in-ns 'my-ns)
10:53clgvpyninja: a IDE can support you there ;)
10:53pyninjaclgv: ah, now I see! thanks
10:54clgvpyninja: fyi use = require + refer
11:05robertstuttafordnewbie question: https://gist.github.com/2628257
11:08clgvrobertstuttaford: ##(update-in [:resource_version 0] :version {:resource_version [{:version 351}], :id 1, :title "Partition"})
11:08lazybotjava.lang.UnsupportedOperationException: nth not supported on this type: Keyword
11:08clgvoops
11:08clgvrobertstuttaford: ##(update-in {:resource_version [{:version 351}], :id 1, :title "Partition"} [:resource_version 0] :version)
11:08lazybot⇒ {:title "Partition", :id 1, :resource_version [351]}
11:08robertstuttafordupdate-in, thank you!
11:08clgvah not entirely.
11:09clgv##(update-in {:resource_version [{:version 351}], :id 1, :title "Partition"} [:resource_version] (comp :version first))
11:09lazybot⇒ {:title "Partition", :id 1, :resource_version 351}
11:10robertstuttafordthank you clgv
11:13robertstuttafordcan i use update_in to remove an element entirely?
11:13robertstuttafordso in this case, i want to remove :id
11:13S11001001robertstuttaford: no, use dissoc
11:14clgvrobertstuttaford: use dissoc or select-keys
11:14robertstuttafordgotcha
11:15nDuffHmm.\
11:15robertstuttafordthis is more of a style question. i have (map #(update-in …) (korma query)). i could just wrap this all with another (map #(dissoc :id …)
11:15TimMcrobertstuttaford: You can combine update-in with dissoc.
11:15robertstuttafordi guess i could put both #() into a comp as the function that maps?
11:17robertstuttafordthis works: (map (comp #(update-in % [:resource_version] (comp :version first)) #(dissoc % :id)) (…korma…))
11:18S11001001nDuff: ns is set during module loading, not execution
11:19faust45can anyone suggest mime http parse lib?
11:25nDuffHmm. I have a module in which I'm setting a value to an atom; however, when a new module requires the old one, that atom appears to get re-def'd over
11:26nDuff(the resulting object has not just a different value [reinitialized to nil], but also a different memory location)
11:29mmarczyknDuff: check if there's a :reload / :reload-all option on any of your requires and consider using defonce for the atom
11:40nDuffmmarczyk: no :reloads present, but using defonce does the Right Thing; thanks!
11:56dnolenlynaghk: ooh, is profile-cljs runnable?
11:57kzarcool my clojurescript drum machine is coming along
11:59Borkdudefinally, solved….
12:06ambrosebsI'm trying to build my own version of clojure, but I can't seem to change the artifact name
12:06ambrosebsis there some convention I need to follow?
12:09johnkpaulis there an equivalent to javascript's arguments.callee in clojure?
12:09johnkpaulor something like recur but without being in the tail position
12:09johnkpaulI have an let bound function that I am trying to make call itself
12:09brainproxydnolen: is the idea with string-print in clojurescript that it prints a string with a newline automatically appended, or should it print the string as-is (i.e. no newline on the end)?
12:10brainproxydnolen: the reasons I ask is that in nodejs.cljs that ships with clojurescript, string-print is pointing to node's sys.puts
12:10brainproxybut sys.puts is long since deprecated
12:11brainproxyand i'm wondering whether to point string-print instead to console.log (which appends a newline) or process.stdout.write (which doesn't append a newline)
12:11foxdonutjohnkpaul: do you mean something like (fn foo [] (foo)) ?
12:11dnolenbrainproxy: don't know that bit very well - but feel free to submit a ticket that suggests a fix.
12:11dnolenbrainproxy: as just let us know which lib to call.
12:11johnkpaulfoxdonut: yes
12:12johnkpaulI keep getting unable to resolve symbol: foo in this context
12:12dnolenjohnkpaul: in Clojure or ClojureScript?
12:12johnkpaulclojure
12:12foxdonutjohnkpaul: paste code in gist?
12:12johnkpaul:) decided that I need to learn clojure first
12:13dnolenjohnkpaul: nice! :)
12:13johnkpaulsure foxdonut, one second
12:13johnkpaulfoxdonut: https://gist.github.com/9a675e94ef72b901210b
12:13johnkpaulworking through 4clojure.com
12:13foxdonutjohnkpaul: try (fn fib [x] ...) instead
12:13ambrosebsnvm, I fixed my problem building clojure
12:14johnkpaulah, great, thanks foxdonut!
12:14johnkpaulfound a different problem, but one that makes sense
12:14johnkpauldamn needing all of those base cases
12:14foxdonutjohnkpaul: you're welcome
12:27lynaghkdnolen: yep.
12:27lynaghkit's pretty janky right now, and there aren't any visualizations
12:27dnolenlynaghk: hmm having trouble getting it to work, when I try to open public/index.html I get a bunch of error about missing JS files.
12:27lynaghkalso if you want to reset the timings, you'll have to open up the js console and remove the localstoage key yourself
12:27lynaghkdid you run ./make.sh
12:28dnolenlynaghk: oops no
12:28lynaghkalso your webserver needs to follow symlinks (I use the "serve" rubygem)
12:28lynaghkdnolen: readme, bro! =P
12:29dnolenlynaghk: yeah the ./make.sh wasn't highlighted as code so I missed it while scanning :)
12:30dnolenlynaghk: k, I get a list of nils :)
12:31lynaghkdnolen: in the viewer? Hmm.
12:32dnolenlynaghk: oh I'm getting a microbenchmarks/seqs.js missing error in run.html
12:34lynaghkdnolen: that's through a symlink: how are you running the page?
12:34dnolenlynaghk: should that have been generated for me?
12:34dnolenlynaghk: just open public/index.html
12:34dnolenlynaghk: I guess I should open it via local web server?
12:35lynaghkI just tried it via file:// and it worked fine
12:35lynaghklet me clone and start from scratch.
12:37dnolenlynaghk: hmm I don't have a microbenchmarks folder, what creates that/
12:37dnolen?
12:39brainproxydnolen: figured it out w/ ref to the cljs repl.. string-print is for printing strings w/o newline appended, println appends \n
12:39lynaghkahh, forgot to check that in.
12:40brainproxyI'll submit an issue once I see how it works out w/ how I've set it up in ncljs's nodejs.js
12:40brainproxy*nodejs.cljs
12:40lynaghkdnolen: fix pushed, sorry about that. I have a bad habit of adding "pubilc/" to .gitignore and then adding a bunch of symlinks into public.
12:40dnolenbrainproxy: cool, thx
12:42dnolenlynaghk: cool! got it working, how do I reset the data? localStorage.clear()?
12:43lynaghkdnolen: awesome! you can reset with: localStorage.removeItem("timings")
12:43lynaghkdnolen: I'll add a button to the viewer later and then some datavis stuff. Going hiking today, so it'll be closer to Wednesday
12:43dnolenlynaghk: so I see a list of nils + count up + map inc
12:44lynaghkthe nils should be timings. hmm.
12:44lynaghkwhat's in localStorage["timings"]?
12:45dnolenlynaghk: to a bit more clear, I see a list of nils at the very top of page
12:45dnolenthen map inc (6 5 5)
12:46lynaghkoh, so timings are working fine. Are you seeing the source code?
12:46dnolener count up (6 5 5)
12:46dnolenlynaghk: yes
12:47dnolenlynaghk: in anycase, neat thanks for starting this. Will be very useful.
12:48lynaghkdnolen: oh, I see those nils too. Looks like something is throwing in empty objects
12:49lynaghkI'll figure it out and fixup. This isn't ready yet anyway; github giving away my secrets. =P
12:50lynaghkdnolen: yeah, ideally there'd be more infrastructure and persistence so we can actually compare different cljs compiler or cljs library revisions.
12:51dnolenlynaghk: haha
12:51dnolenlynaghk: yes I'm keen for a community contributed set of benchmarks is all
12:52dnolenlynaghk: a lot of what we do right now is ad hoc stuff at the command line
12:52lynaghkdnolen: well feel free to throw some more in and send me a pull request. The format is pretty general
12:52clojurebotAlles klar
12:53lynaghkdnolen: I was planning on having an optional :tags kwarg to the profile cmd so that once we have a ton of different microbenchmarks it'd be easy to search
12:54lynaghkgotta go hiking, catch you later dnolen.
12:54dnolenlynaghk: later
12:55Raynes"MUST. GO. HIKING."
13:12jasonkolbhey everyone... pretty new to Clojure and I'm struggling with the syntax for something I'm trying to port from Java, hoping someone can give me a pointer
13:13jasonkolb(let [result (@id->result id)]
13:13jasonkolb (cleanup id)
13:13jasonkolb (log-debug "Returning DRPC result for " function " " args " at " (System/currentTimeMillis))
13:13jasonkolb (if (instance? DRPCExecutionException result)
13:13jasonkolb (throw result)
13:13jasonkolb (let [strResult
13:13jasonkolb (.toString
13:13jasonkolb (.decode( result )
13:13jasonkolb (.newDecoder (defaultCharset Charset)
13:13jasonkolb )
13:13jasonkolb )
13:13jasonkolb ]
13:13jasonkolb strResult
13:13jasonkolb )
13:13clgv jasonkolb: first, use a paste next time. ~paste
13:14clgv~paste
13:14clojurebotpaste is http://refheap.com
13:14jasonkolboops, sorry about that
13:14clgvsecondly, you should state your problem ;)
13:15mrakanaI don't understand definline. How exactly does it differ from a regular macro? When should I use it? If I want to create an alias for a function, is using definline better than just doing (def alias some-func)?
13:16mrakanaUsing alias instead of some-func after (def alias some-func) seems to slow down things considerably.
13:16clgvmrakana: it's expanded if you call it directly but passed as a function if used as a parameter
13:16foxdonutjasonkolb: can you paste the Java code you are trying to port?
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-1
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-2
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-3
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-4
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-5
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-6
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-7
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-8
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-9
13:17jasonkolbhttps://www.refheap.com/paste/2630#L-10
13:17jasonkolb(let [strResult
13:17jasonkolb (.toString
13:17jasonkolb (.decode( result )
13:17jasonkolb (.newDecoder (defaultCharset Charset)
13:17jasonkolb )
13:17jasonkolb )
13:17foxdonutare you serious?
13:17S11001001er...
13:17jasonkolbwas trying to do the right thing there with the paste from refheap
13:17antares_jasonkolb: just paste a URL, not the content
13:17foxdonutone link is enough :)
13:18S11001001str not tostring
13:18jasonkolbgotcha... my bad
13:18foxdonutjasonkolb: please paste your original Java code in refheap and put one link here
13:19jasonkolbok, java code is at https://www.refheap.com/paste/2631
13:20mrakanaclgv: I see. So it's something between a function and a macro. It also allows regular ^type hinting unlike a macro.
13:20muhooquestion about dynamic bindings: i do a (binding [*foo* :bar] (somefunc)). that somefunc calls down a stack that eventually has stuff that does (:use [bar.baz :only [*foo*]]) in it. which *foo* gets used down in there? the one i bound or the original one?
13:21muhooi should say: the one bound with binding or the one use'd in the ns decl?
13:22S11001001muhoo: bindings don't exist in the ns mappings, so the latter
13:22S11001001that is, you use a var, not a particular binding of it
13:22muhoodamn.
13:23cmcbridejasonkolb: to call a static method in clojure you do (defaultCharset/Charset)
13:23muhoook, thanks. i'll have to find another strategy then.
13:23foxdonutjasonkolb: perhaps (-> (.newDecoder (Charset/defaultCharset)) (.decode result) str)
13:24foxdonutjasonkolb: or perhaps (-> (Charset/defaultCharset) (.newDecoder) (.decode result) str)
13:24jasonkolbthanks foxdonut, I'll give that a try
13:24antares_jasonkolb: https://www.refheap.com/paste/2633
13:26foxdonutantares_: cool, didn't know you could use .something bare
13:27foxdonutantares_: but why doesn't .something work with map?
13:27foxdonutis it a macro-related thing?
13:28antares_foxdonut: it does if there is a method you are calling on IPersistentMap
13:28antares_.something is a Java method call
13:28foxdonutantares_: I mean why does (-> 5 .toString) work but (map .toString [4 2]) doesn't?
13:28jasonkolbthat worked beautifully thanks foxdonut & antares_
13:29antares_foxdonut: because .toString is not a function, it's a special form
13:29foxdonutantares_: oic, and -> takes forms, while map takes a function, right..
13:29foxdonutjasonkolb: you're welcome
13:30antares_foxdonut: -> is a macro, it takes anything that can be evaluated at compile time
13:30antares_while map takes a function
13:31foxdonutantares_: I understand now.. thanks for the explanation
13:56technomancyso Leiningen honors the $CLASSPATH environment variable, but I have only ever heard of people using this by accident
13:56technomancywould anyone be horrified if we just dropped it entirely?
13:56technomancyyou can still customize lein's classpath with pomegranate and the .lein-classpath file
13:57joegalloi would not be horrified, i think $CLASSPATH is basically a horrible idea.
13:58joegallobut, then again, that probably means i'm not the target audience for $CLASSPATH ;)
13:58technomancymotion passes
13:58Borkdudetechnomancy: would this seem logical to you? is the profiles.clj not ok maybe? https://groups.google.com/forum/?fromgroups#!topic/clojuredev-users/-SnAC7g-vpI
14:00fliebeltechnomancy: I used it once, when i did some naughty things with dependencies that where not in maven.
14:00technomancyBorkdude: the swank-clojure version is wrong, but that's the only issue
14:01technomancyoh shiiiiiiit--I got the new groups interface forced on me =(
14:01Borkdudetechnomancy: wrong as in?
14:01technomancyBorkdude: that version only works with lein1
14:02technomancyyou want lein-swank 1.4.2
14:02Borkdudeapparently the eclipse leiningen plugin is based on lein2
14:03technomancyfliebel: another good reason to get rid of it! =)
14:04fliebeltechnomancy: Hah, only if you find a better alternative to RxTx.
14:05technomancypretty sure that's been converted since samaaron switched to lein?
14:07fliebeltechnomancy: What do you mean? Sam did package a version of the thing, but with only half of the native deps.
14:08technomancyI wasn't following it too closely; could have missed some of the details
14:08Borkdudehmm, some other plugin must ruin leiningen/eclipse, when I change it to {:user {:plugins []}} it works
14:08technomancyanyway, preview4 will have an equivalent of mvn install:install-file
14:08Borkdudenot if I change swank-clojure to 1.4.2 though
14:09technomancynot swank-clojure, lein-swank
14:10Borkdudeah fuck yes
14:11gtrakdoes there exist a good library for file operations?
14:12gtraksomething as handy as python's os.walk?
14:13technomancyno idea what that does, but it sounds somewhat like file-seq
14:13technomancy(doc file-seq)
14:13technomancy,(doc file-seq)
14:13ieureYes.
14:13clojurebot"([dir]); A tree seq on java.io.Files"
14:13clojurebot"([dir]); A tree seq on java.io.Files"
14:13technomancyoops
14:13gtrakah, nice
14:15ibdknoxgtrak: checkout fs by raynes
14:15ibdknoxgtrak: https://github.com/Raynes/fs
14:15ibdknoxfor more features
14:15gtrakah, neat
14:16Borkdudeok, with lein-swank 1.4.2 it now works correctly, so some other thing must have caused the error then
14:17gtrakibdknox, that's very useful, thanks
14:17uvtcUpdated my "brief beginner's guide" to use Lein 2 and Clojure 1.4.
14:17uvtchttp://www.unexpected-vortices.com/clojure/brief-beginners-guide/
14:17XPheriorCan anyone point me towards an understanding on how to use lazy-seq without blowing the stack? Doesn't seem like you can recur from inside of that function, obviously.
14:18amalloyXPherior: mostly it Just Works
14:19XPherioramalloy: I must be doing something horribly wrong. Let me show you an example of what I tried, one sec.
14:19amalloy$google stackoverflow dbyrne prime sieve clojure
14:19lazybot[recursion - Recursive function causing a stack overflow - Stack ...] http://stackoverflow.com/questions/2946764/recursive-function-causing-a-stack-overflow
14:19amalloyis a good answer about the most common cause of problems
14:21XPheriorhttps://gist.github.com/2629447
14:21Borkdudelein-noir 1.2.0 also seems to break it
14:21XPheriorI've seen that question by the way, amalloy
14:21amalloyokay. your gist will never blow the stack
14:22foxdonutIn a new Clojure project with an SQL database, what do people use to create the database schema? I've tried clojure.data.jdbc and lobos, both work but neither seems ideal. Would be nice to define the schema in code and have a safe "create schema only if it doesn't already exist" function to call on startup.
14:22XPherioramalloy: Wait. I swear it did last night. I mean, that was a quick rewrite.. But that was basically it.
14:23foxdonutOr should I just write the DDL in SQL, execute it on the database, and be done with it?
14:23technomancyfoxdonut: I recommend writing it using SQL
14:23TimMctechnomancy: How do you run the SQL?
14:23xeqifoxdonut: thats still an open area for clojure
14:23technomancyTimMc: finding a link; hang on
14:23XPherioramalloy: I guess I'm wrong. I'm not sure why it wasn't working last night. Thanks anyhow
14:23amalloy&(letfn [(inf-nums-from [n]  "A sequence of n to infinity."  (lazy-seq (cons n (inf-nums-from (inc n)))))] (nth (inf-nums-from 0) 500000))
14:23lazybotjava.lang.RuntimeException: Unable to resolve symbol:    in this context
14:23TimMcI don't want to be in the business of SQL-parsing.
14:24technomancyfoxdonut: I'm not sure how polished this is, but this seems like the right approach: https://github.com/weavejester/ragtime
14:24amalloy&(letfn [(inf-nums-from [n] (lazy-seq (cons n (inf-nums-from (inc n)))))] (nth (inf-nums-from 0) 500000))
14:24lazybotjava.lang.RuntimeException: Unable to resolve symbol:   in this context
14:24amalloywat. some copy-paste issue, i guess
14:24XPheriorYeah
14:24XPherior&(letfn [(inf-nums-from [n] (lazy-seq (cons n (inf-nums-from (inc n)))))] (nth (inf-nums-from 0) 500000))
14:24lazybotjava.lang.RuntimeException: Unable to resolve symbol: � in this context
14:25XPheriorHmmkay, I'm stumped.
14:25amalloythere's probably a non-breaking space character in there somewhere
14:26muhoofoxdonut: try korma?
14:26solussdusing lein-marginalia, when I run 'lein marg' I get: an exception: Caused by: java.lang.IllegalAccessError: escape-html does not exist, every time. any ideas? The trace isn't very helpful- nothing in my code at least. :)
14:26ieureHas anyone gotten clj-logging-config / tools.logging to, like, actually work?
14:26foxdonuttechnomancy: thanks for the pointers, I'll have a closer look at Ragtime. I guess also just running the SQL on the database remains a decent solution.
14:27ieureBecause no matter how I configure it, I don't seem to get anything but a NOPLogger.
14:27foxdonutmuhoo: my understanding is korma doesn't support DDL
14:27technomancyfoxdonut: most existing solutions try to do too much
14:28ieuree.x. (use 'clj-logging-config.log4j) (set-loggers! :root {:level :debug :out :console}) (log/debug "test")
14:28ieure-> I get nothing
14:28technomancyI don't think trying to pretend you can seamlessly switch migration code between different SQL implementations is ever going to work
14:29TimMctechnomancy: This still doesn't answer the question of how to take a SQL file full of DDL statements and shove it into a DB.
14:30technomancyTimMc: did you see the ragtime link?
14:30foxdonuttechnomancy: I agree. It also depends on what you are doing, e.g. maintaining an application in production vs. distributing a standalone example that "just works on startup", etc.
14:30TimMctechnomancy: I've seen it in the past...
14:31duck1123solussd: the recent version of hiccup renamed escape-html to h
14:31TimMctechnomancy: Are you recommending that I split up my SQL schema file into a series of ragtime migrations? :-/
14:31duck1123escape-html is now in hiccup.util IIRC
14:31solussdduck1123: thanks!
14:32technomancyTimMc: honestly I haven't used a relational database in years, so I can't say whether ragtime covers all the bases. but it's on the right track compared to something like activerecord
14:32XPheriorOne more question. I saw Rich's talk about Simplicity at the Rails Conference.. I just don't understand why ORM's are complex. Maybe I've been doing it too long that I'm ignoring something
14:33solussdduck1123: now I wonder why marginalia isn't depending on the correct version of hiccup. :/
14:33TimMctechnomancy: The specific issue I'm dealing with is that JDBC does not seem to have a way to take a SQL *script* and run it.
14:33TimMcIt can only take one DDL command at a time, as far as I've seen.
14:33technomancyTimMc: oh, I see. so the problem is that of delimiting commands?
14:33TimMcright
14:34TimMcAnd every suggestion I've seen on the web so far is: Parse it yourself.
14:34TimMcEW.
14:34foxdonuttechnomancy, TimMc: FWIW what we use now in a production Java app, is we have a series of plain SQL files and a tool that runs them in order. So we can modify the schema by adding a new file and the tool figures out which ones haven't been run yet. There is value in that IMHO.
14:34amalloysomeone asked about that a month or two ago. i think the suggestion was "split-at ; lololol hope you don't have any semicolons in your data"
14:35foxdonutTimMc: and yes the tool allows for multiple statements within a single file.
14:35duck1123I seem to remember hearing that lein was going to get something akin to mvn's dependency:tree. Is that a plugin I'm missing, or is it best to just use mvn for now?
14:35Borkdudeuvtc: tnx for your link, will read it later
14:35uvtcBorkdude, sure, y/w
14:35uvtcibdknox, thanks for the tip about Raynes/fs. Looks handy.
14:36technomancyamalloy: couldn't you just make up a delimiter?
14:36amalloyduck1123: lein2 deps :tree
14:36uvtcThough, I'm curious to know how I'm even able to use it...
14:36uvtcI'm using lein 2, and have specified that one of my dependencies is org.clojure/clojure "1.4.0".
14:36uvtcBut fs appears to depend upon Clojure 1.3.0.
14:36Borkdudeuvtc: gouda… is a city from Holland, but your name doesn't seem Dutch to me
14:36gtrakif you specify a dep in your project.clj, it'll override a transitive dep
14:36gtrakuvtc, ^
14:36amalloyuvtc: dependency versions are basically mild preferences :P
14:37uvtcgtrak, "transitive dep"?
14:37gtrakyes, in maven-jargon, a dependency pulled in by a dependency
14:38amalloytechnomancy: you could, although probably none exists that can't technically be a part of the SQL statement
14:38foxdonuttechnomancy, amalloy, TimMc: if it's just executing several SQL statements in a single SQL file with JDBC, one option is Spring: https://www.refheap.com/paste/2634
14:38uvtcgtrak, Ah. I see. Thanks. And thanks, amalloy. I'd have guessed that lein would pull in Clojure 1.3.0 into my local repository, but then maybe it wouldn't be used.
14:39technomancyamalloy: !
14:39gtrakspeaking of which, why does lein need a lib/ folder at all? maven doesn't. I guess it's convenient though.
14:39technomancygtrak: lein2 doesn't
14:39amalloyTimMc: what about having a migrations directory, with each file a separate statement?
14:39gtrakah, neat
14:39amalloyheh, that's the one i was thinking of too, technomancy
14:40technomancygtrak: it was initially there for compatibility with existing tooling which has since thankfully been abandoned
14:40Borkdudeamalloy: lein2 reps :tree only shows a tree, but doesn't pull in reps?
14:40technomancyamalloy: big fan of the ol' page break
14:40Borkdudedeps
14:40Borkdudefucking spelling correction, haven't found how I can turn it off by default
14:40foxdonuttechnomancy: anyway, perhaps Ragtime will be a good fit for what I need. I'll try it out. Thanks again.
14:40amalloyiunno
14:40technomancyBorkdude: it can't show the tree without walking the deps, which fetches them
14:40uvtcBorkdude, gouda, as in, the cheese. Also, it kinda' sounds like italian "gooda' docs, capiche?" (oh man)
14:41Borkdudeuvtc: Gouda is the city where the cheese is from, some 50 km from here
14:41gtraktechnomancy, deleting code is one of my favorite things, I understand :-)
14:49TimMcfoxdonut: Is XML really needed to make JDBC do that?
14:54foxdonutTimMc: no, you could certainly do it in code instead. I was just offering the possibility of using JDBC to execute multiple SQL statements within a single file -- because I've had that frustration before and a home-grown solution with strange delimiters etc. isn't very nice.
14:56achinAm I doing something wrong, or does the repl in lein 2.0.0-preview3 only give you the top frame of a stacktrace?
14:56nDuffIf I call (keys some-map) and (vals some-map), is it guaranteed that these will be serialized in the same order for all Clojure's map implementations?
14:57technomancynDuff: it's guaranteed the order will be the same on the same map object
14:57technomancyit's not guaranteed across serialization boundaries iirc
14:57nDuff*nod*, thanks
14:57ivanachin: that's how the normal REPL works too, no? (pst) prints the stack trace
14:58achinivan: Maybe I'm remembering wrong, but I thought it printed out more than the last frame.
15:02TimMcachin: (pst) is the way to go, but (.printStackTrace *e) will give you the whole (ugly) thing.
15:02achinTimMc, ivan: Thanks.
15:05amalloynDuff: it's guaranteed, and so you can rely upon it, but in my experience code that relies on it can generally be rewritten in a nicer way
15:08TimMcfoxdonut: Cool, I'll check that out!
15:10halarnold2000&(+ 1 2)
15:10lazybot⇒ 3
15:10ivanhow do I load my own deps.js file in a ClojureScript REPL?
15:10ivanor perhaps before I start the REPL
15:15foxdonutTimMc: FWIW, the docs are here: http://static.springsource.org/spring/docs/current/spring-framework-reference/html/jdbc.html#d0e25689 and the Java API is here: http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/jdbc/datasource/init/package-summary.html
15:15foxdonut(it's Java so the links are really verbose ;)
15:17creeseHow do I do multi-line docstrings?
15:17RaynesHit return.
15:18uvtccreese, You can have newlines in your docstrings.
15:23S11001001uvtc: C
15:24uvtcS11001001, C?
15:24S11001001uvtc: for further evidence, eval ("hello, " "world") in python
15:25Wild_Catuvtc: yeah, in Python, string literals are collapsed together, meaning you can write your strings as multiline by using parens.
15:26Wild_Cat("hello" "world") == "helloworld"
15:26S11001001just like C
15:26uvtcOh, right. :) "like C"
15:26muhoohas someone already written something that'll turn a flat list like {:foo.bar.baz 1, foo.bar.baz.quux 2} into a tree like {:foo {:bar {:baz 1 {:quux 2}}}} ?
15:26Wild_Catand thanks to implicit line continuations, you can use parens to spread your string over multiple lines
15:27Wild_Cathowever, note that ("hello " <newline> "world") == "hello world", not "hello \nworld"
15:29uvtcWild_Cat, S11001001 : still though, as soon as I saw that Clojure strings could span multiple lines, I thought, "hey, wait a minute, why can't I do that in Python?"
15:29Wild_Catuvtc: agreed, it is a weird choice to SyntaxError, especially when the parser supports triple-quoted strings.
15:30Wild_CatOTOH, one thing I sorely miss in Clojure: Python's raw strings.
15:31Wild_Cat(it had me, in fact, running back to Python screaming last time I attempted to use Clojure, because it turned out there were a lot of literal backslashes in the stuff I had to do)
15:31creeseI want to refer to java methods in documentation. I know in Ruby its class#method. What is best practice for java?
15:32TimMc&(str #"\backslash")
15:32lazybot⇒ "\\backslash"
15:32TimMcWild_Cat: ^ :-P
15:32Wild_CatTimMc: isn't that a regex?
15:33TimMcYeah, but then I extract the pattern string from it.
15:33Wild_Cat(or is that a new Clojure 1.4 thing I've missed?)
15:33Bronsaneat
15:33TimMcIt's a dirty trick.
15:33Wild_Cat&(str #"\hello(")
15:33lazybotjava.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 1\hello( ^
15:33TimMcI don't guarantee that it works on all inputs...
15:33Wild_CatTimMc: yeah, that's what I thought ;)
15:33Wild_Catit only works when your string is actually a valid regex
15:34TimMc&(str #"\Q\h\E")
15:34lazybot⇒ "\\Q\\h\\E"
15:35uvtccreese, y'know, I'm not sure I've ever seen any other notation than the one you mention. It's been a while since I've looked at the PickAxe. You use the dot for instance methods, right?
15:35creeseI want to know what it is for java. Ruby, I know.
15:36creeseRuby is # for instance :: for class, I think, but neither is Ruby syntax.
15:36uvtccreese, Whoops. right right.
15:36raekI think . is more common in Java-land, but the javadoc syntax uses #, IIRC
15:37duck1123creese: does this help? http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see
15:37Wild_CatTimMc: okay, so it works when your string is sort-of something that looks like a valid regex? Or do Java regexes auto-escape backslashes that aren't followed by a correct escaping char?
15:38creeseduck1123: thanks
15:39amalloymuhoo: that is an impossible desire to fulfill, because baz cannot be both an integer and a map
15:42TimMcWild_Cat: \Q and \E pairs allow raw stuff inside Java Patterns.
15:42TimMcAnyway, yes -- we should have raw strings.
15:42Wild_Cat&(str #"\Qhello(\E")
15:42lazybot⇒ "\\Qhello(\\E"
15:42Wild_CatI see.
15:42Wild_Catstill, yeah. Thanks.
15:43TimMc&(java.util.regex.Pattern/quote "foo") ;; IIRC
15:43lazybot⇒ "\\Qfoo\\E"
15:43jwr7Is there a Clojure-1.3/1.4 compatible continuation of clojure.contrib.lazy-xml? clojure.data.xml has a different interface and does not parse some of my files.
15:47ivandnolen_: I've loaded my own deps.js into the rhino REPL via rhino/-eval, but when I do something like (ns mystuff (:require [cw.env :as env])) that form returns `nil`; then doing (env/someFunc) results in org.mozilla.javascript.EcmaError: ReferenceError: "cw" is not defined.
15:47ivanhow should I debug that?
15:49dnolen_ivan: as far as I know, an ns form doesn't actually trigger loading of anything.
15:49muhooamalloy: or something like that {:baz [1 {:quux 2}]}, etc
15:50ivandnolen_: thanks, I guess have more work to do
15:50jwr7I have to say, the migration from Clojure 1.2+monolithic contrib to anything newer is a major disaster. I still haven't finished the work on our codebase. I hope nothing like this ever happens again.
15:50dnolen_ivan: I could be wrong about that of course. But I think ns forms get converted into goog.provide and goog.require
15:51canweriotnowhas anyone else had issues with `lein repl` ignoring project.clj and not loading the project into the repl session?
15:51dnolen_ivan: in the browser those will work
15:51ivanokay
15:51amalloymuhoo: you also complect string-parsing with map-building; either task on its own is simple (and easy), and the two can be composed without any real trouble
15:51dnolen_ivan: but normally we are generating a single file, so goog.provide and goog.require get eliminated.
15:51muhoojwr7: indeed, the problem with batteries included, is when the batteries go stale and start leaking acid all over the place
15:51dnolen_ivan: that said, the lack of a require and load at the REPL kinda stinks. Would be nice if someone worked on that.
15:52muhooamalloy: ahhm, so splitting the strings into vectors does indeed get me more than halfway there, thanks
15:52ivandnolen_: thanks, now I know it's missing
15:53canweriotnowI guess it might be a versioning thing? It *used* to load the project just fine, and now it doesn't.
15:53muhoothen a little assoc-in and i'm probably good
15:53jwr7muhoo: Well, I'm fine with change, but not too much at once. Changing Clojure and splitting monolithic contrib into modules would be fine, but some libraries were effectively abandoned and replaced with ones with a completely different API, functionality and problems.
15:54amalloy&((fn [paths] (reduce (fn [m [path value]] (assoc-in m `(~@path ::self) value)) {} paths)) '([(:foo :bar :baz) 1], [(:foo :bar :baz :quux) 2]))
15:54lazybot⇒ {:foo {:bar {:baz {:quux {:clojure.core/self 2}, :clojure.core/self 1}}}}
15:54amalloymuhoo: this is the other half, more or less
15:58muhooooh, macro quoting, nice
15:58TimMcjwr7: The maintenance of the old libs was an illusion.
16:00beffbernardI'm dynamically building a string with the intention of evaluating it later.. but I'm not having any luck.. "userevents.thrift.TList$_Fields/values" where TList is a generated Thrift class and _Fields is a java Enum
16:01jwr7TimMc: yes, I realize that -- and I think overall this was a good decision. But I'm not happy about the fact that a) it was done together with the switch to 1.3 and b) some libs (lazy-xml in my case) were replaced with something different. As I write this I'm trying to find out why data.xml fails when parsing some XML documents...
16:02beffbernardSo my desired output is I want to call the values method on _Fields
16:02muhoowhen it comes to xml, i've had good luck with necessary-evil
16:02jwr7muhoo: I like the name already
16:03muhoojwr7: https://github.com/brehaut/necessary-evil
16:04jwr7muhoo: ...but it's not what I need. I need a lazy XML parser, capable of dealing with huge data files. Ah well. I'll stop complaining now and go back to yak shaving.
16:04muhoogranted, i was dealing with RPC's, not files.
16:05muhoohave fun. i'll take a break from dealing with openid :-) fun for everyone.
16:12uvtcmuhoo, I like your comment about battery acid leaking out. Might have to quote you sometime. :)
16:14uvtcOh, just missed him.
16:14uvtc$mail muhoo I like your comment about battery acid leaking out. Might have to quote you sometime. :)
16:14lazybotMessage saved.
16:20RaynesI get chils when people use that feature.
16:20Rayneschills even
16:21uvtcRaynes, I noted its use here: http://www.unexpected-vortices.com/clojure/brief-beginners-guide/getting-help.html .
16:22uvtcIf you've got any other choice lazybot tips, I'm all ears. :)
16:23amalloyis it worth noting how to coerce lazybot into giving a snarky answer??
16:23lazybotamalloy: What are you, crazy? Of course not!
16:23gtrakis there a way to make emacs not hang when I do something stupid? like printing a file-seq of thousands of files?
16:23uvtclazybot, tell me your secrets!
16:23uvtclazybot is a tough nut to crack.
16:24Raynesuvtc: It also has a timer.
16:24uvtcA timer you say?
16:24Raynes$timer 0 0 5 Hi, uvtc
16:24lazybotTimer added.
16:25lazybotHi, uvtc
16:25uvtcEgads!
16:25jwr7gtrak: not that I know of. I once waited 2 days.
16:25RaynesThat doesn't always work properly, unfortunately.
16:25RaynesIt sometimes gets times all wonky and amalloy is too lazy to fix it.
16:25uvtcRaynes, what are the first two integers for?
16:25gtrakjwr7, that's absurd :-)
16:25Rayneshours, days, seconds.
16:25jwr7gtrak: it's all relative and depends on the value of your unsaved changes :-)
16:25amalloy...days
16:26RaynesBahahahaha
16:26RaynesMinutes.
16:26RaynesSorry, preoccupied.
16:26gtrakjwr7, maybe we need to make a slime-proxy
16:26Raynesamalloy: Maybe that's why the times are screwed up, minutes are days.
16:26raekRaynes: been using java.util.Date recently :-)
16:26gtrakswank-proxy, rather
16:27jwr7Unfortunately, these days most editors suck badly. Just try opening a 500MB XML file -- both Emacs and vim will take ages. With my 16 cores and 24GB of RAM I can't really see why.
16:28gtrakalgorithms
16:28felideonjwr7: emacs is nice enough to warn you!
16:28felideon(dunno about vim)
16:28jwr7It recently took me a couple of minutes just to remove a trailing comma in a broken JSON file in vim. The file was 100MB or so. That's just sad.
16:28jwr7felideon: yeah, unless you dump something in the repl :-/
16:29felideonah right
16:29felideonC-c C-c a few times, q q q, pray.
16:33amalloyrefusing to edit a 500MB text file is probably a protection for your sanity. nothing good can come of doing that
16:33babilenIs there a way in which I can use maps as keys in maps? (and get their values back? (e.g. (get {:a 1} {{:a 1} 0}))) Or do I have to use something else as key and "somehow" look up that identifier for every map that I want to use as key?
16:37amalloythat works fine. you're passing the args to get in the wrong order
16:40babilenamalloy: Wonderful (doh!) -- Guess I take a break now :)
16:43S11001001unfortunately clojure maps only work with strings, keywords, and typeglob references, of course
16:43S11001001and integers < 28 bits
16:44michaelr525hello
16:45ivanS11001001: would be funny if people didn't have such low expectations
16:47amalloyS11001001: is that the state of things in CL or something? i don't recognize the language you're referring to
16:48TimMcamalloy: What's wrong with editing giant files?
16:49ivansome hex editors are good at editing giant files, they can even insert
16:49S11001001amalloy: perl5 hashes only support strings; CL hashtables support anything supported by eq, eql, equal, or equalp
16:49TimMcivan: Oooh, good call.
16:50gtrakis teco good at large files?
16:50S11001001and php silly arrays support strings and numbers, and I think objects (compared and hashed by stringification, because that's what php *would* do)
16:51Wild_CatS11001001: don't be so sure. PHP doesn't compare strings by stringification. :p
16:51Wild_Cat(if they sort of look like numbers)
16:53S11001001I'm glad I don't remember the exact details
16:53S11001001php arrays are the worst things
16:53jonaskoelkerhow the ... do you guys parse stuff?
16:53jonaskoelker[sorry if I'm butting in]
16:54Wild_CatPHP everything appears to have been carefully designed so as to be the worst possible design *and* implementation of the task at hand.
16:54jonaskoelkerWild_Cat: tell me more about the train wreck I've managed to avoid, please :)
16:55Wild_Catjonaskoelker: eevee did it better than I can ever hope to: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
16:55ivangtrak: don't know, but HxD (Windows) is
16:55ivanhaven't looked at others
16:56jonaskoelkerS11001001: so in pythonese, str(myob) == repr(myob) or else (myob == myob) == False ?
16:57S11001001jonaskoelker: no, I mean at the silly-array level; basic equality is a whole other mess
16:57Wild_Catjonaskoelker: but the string thing comes down to this: if you're trying to compare two strings together and they look like numbers, PHP will parse them as numbers and compare the results, even if the conversion overflows. Meaning that if you compare 2 strings that are 2 huge, but different, numbers (bigger than can fit in a ... I think it's a 32-bit int), they can compare as equal.
16:58Wild_Cat...all of this without a single error message, warning or anything else.
16:58jonaskoelker:O
16:58jonaskoelkerteh fuque...
16:59LauJensenlol. I can't seem to find any corner of the internet where PHP shortcomings aren't discussed
17:00TimMcThese are the stories the tribe tells its young in order to warn them from making the same mistakes.
17:02jonaskoelker"... and, reading between the lines, non-programs ..." :-)
17:02jonaskoelkerI guess those don't not-crash
17:03brehautim sure someone has a fast templating library that is halfway between enlive and hiccup, but i cant remember what its called
17:03Wild_CatI suppose the point here was that it was initially a templating language, not the application programming language people perverted it as.
17:03Raynesbrehaut: tinsel
17:04brehautaha thanks
17:17dnolen_benchmark illustrating the benefit of the property + bit and implementation of satisfies? http://jsperf.com/direct-vs-chain/4
17:22TimMcWild_Cat: And that is why my PL prof at NEU impressed upon us the importance of realizing when one is writing a nascent programming language.
17:24ForSparePartsHey, how do you guys debug?
17:24jonaskoelkerloudly, swearingly
17:24ForSparePartsI'm working in IDEA with La Clojure right now, and it won't stop on breakpoints...
17:25ForSparePartsjanskoelker: (well, of course)
17:25jonaskoelker=)
17:25jonaskoelkerI have yet to write anything not printf-debuggable
17:25jlongsterdnolen_: vaguely related, if you ever want to see how well your js is JITed in Firefox, here's a cool addon: https://addons.mozilla.org/en-US/firefox/addon/jit-inspector/
17:26emezeskeForSpareParts, jonaskoelker: Yeah, println is my debug tool of choice
17:26TimMc(doto ... (println))
17:27TimMc&(+ (doto 5 (println)) 6)
17:27lazybot⇒ 5 11
17:27gtrakhow would I get the substring of a string after the point where a regex matches?
17:27gtrakgetting the offset of the match would do the trick
17:28gtrakah, I see there's a lastIndexOf method on String
17:28jonaskoelkerjust about any character sequence is a method on String =)
17:30ForSparePartsemezeske: hm. I used to do print debugging, but I liked using breakpoints so much more...
17:31emezeskeForSpareParts: of course, to each his own
17:32technomancyI think for breakpoints you need either swank or counterclockwise
17:32dnolen_jlongster: not related - but do you ever run the FF jsshell directly?
17:32technomancyor maybe debug-repl works in other contexts?
17:34jlongsterdnolen_: no, I use node for command line js, though I wish spidermonkey was used more!
17:34dnolen_mmarczyk: ping
17:35dnolen_jlongster: asking because I'm convinced the jsshell they distribute with the nightlies is not actually the latest js engine build.
17:35muhoouvtc: heh, enjoy.
17:36jlongsterdnolen_: how come? I'm not sure what its used for in the whole toolchain.
17:36muhoo[A
17:37michaelr525I have an uberjar jar which runs for an hour or a few and then stops for unknown reason without printing any exception...
17:38michaelr525Sounds familiar to anyone?
17:39technomancymichaelr525: it runs for an hour when generating the uberjar or running via java -jar?
17:39michaelr525java -jar
17:40technomancyoh, no idea then; sorry
17:40michaelr525:)
17:40michaelr525will have to fill it with printlns i guess\
17:41nickmbaileyo893
17:42nickmbaileyoops, wrong channel
17:45jonaskoelkerwhat do you guys use for generating parsers?
17:52dnolen_jlongster: it's crazy slow
17:52dnolen_jlongster: the js engine actually in the nightly seems fast
17:54jlongsterdnolen_: hm, just looking at the docs for building the shell, and it has the --disable-optimize flag? It might be missing lots of optimizations, possibly even JIT?
17:55wkmanireHowdy folks.
17:55dnolen_jlongster: :P
17:55dnolen_jlongster: that doesn't make much sense to me.
17:56jlongsterdnolen_: that's a very cursory glance :)
17:56jlongsterif you're really interested, I can poke some of the people who work on it
17:56dnolen_jlongster: that would be sweet!
17:57jlongsterdnolen_: ok, I'll let you know what they say
17:57dnolen_jlongster: we do a lot of sanity checking / perf testing at the command line
18:01jlongsterdnolen_: did you build jsshell yourself?
18:02dnolen_jlongster: I did not, though I could do that.
18:02jlongsterjust curious, so I give them some context
18:02jlongsterso you checked out a built version from Mozilla's hg repo?
18:02dnolen_jlongster: I just thought the prebuilt shells might be simpler since that's what Brendan directed me towards.
18:02jlongsteryeah, makes sense
18:02dnolen_jlongster: the nightlies directory has prebuilt binaries I just grabbed a zip.
18:03jlongsterdnolen_: do you have the URL handy so that I can show them exactly which one your using?
18:03jlongsterI'm not too familiar with it
18:04dnolen_jlongster: got it off ftp from here, ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk
18:11jlongsterdnolen_: are you running it with the flags "-m -n -a" ?
18:11jlongsterjust relaying messages at this point, I don't have it handy to see what those are
18:11jlongsteroh, -m enables JaegarMonkey and -n enables type inference
18:12dnolen_jlongster: excellent that did the trick very helpful!
18:12jlongsterwoot!
18:13dnolen_jlongster: this is great, thanks much.
18:13gtrakhmm, this is unexpected, I guess because I'm used to java. how do I get a keySeq (the result from calling keys on a map) into a set efficiently, so I can perform an intersection on it?
18:13jlongsternp! glad I could help. They said it should become the default at some point
18:17gtrakI guess into #{} might be alright
18:19gtrakactually that's freaky-fast
18:22gtrakintersecting 9k string keys from 2 maps takes 28 ms
18:22gtrakthe result is 9k, rather
18:22tacomanwhat do you guys use for auto-completion of Clojure in Emacs?
18:22ForSparePartsWould you guys mind looking at my attempt at a binary search tree?
18:22ForSparePartshttp://pastebin.com/iu0s6XrY
18:23ForSparePartsadding crashes, it says it can't cast a long as an IFn
18:23ForSparePartsand I have no idea why
18:24emezeskeForSpareParts: Your if statement tries to call val as a function
18:24ForSparePartsOH
18:24ForSparePartsOh, fuck, I see it now, thank you.
18:25emezeskeForSpareParts: very common mistake coming from an infix background.
18:25ForSparePartsThanks, that's a confidence booster : )
18:27emezeske:)
18:27ForSparePartsOK, so I fixed that -- now I've got "ArityException Wrong number of args (0) passed to: PersistentHashMap"
18:27clojurebotatacontrol cap ad0 | grep serial | awk '{print $3}'
18:28ForSparePartsI don't know where to look exactly -- it doesn't give me a line number. But I would have expected that to be caused by something like (:keyword), right?
18:29emezeskeForSpareParts: That's the error you'd see if you tried to e.g. ({:foo 42}) I think.
18:30emezeskeForSpareParts: You might want to look for extra parens around things (hint)
18:31ForSparePartsAh, ok.
18:33TimMcThe wonderful thing about abstractions is that there are so many to choose from: https://www.refheap.com/paste/2640
18:33TimMcIterator not being Iterable is one of the more baffling things I have encountered in Java.
18:33amalloyTimMc: iterables are supposed to be iterable multiple times
18:34amalloyiterators are mutable, use-once
18:34ForSparePartsemezeske: So, I've narrowed it down to something that happens after I recurse, which should mean that the problem is with (make-bst val)
18:34ForSparePartsbut I can't get rid of those parens, I need them to make it a function call, right?
18:34technomancyamalloy: so really the fact that iterators exist in the first place is the WTF =)
18:34TimMcamalloy: I suppose in that case I should direct my bafflement at for loops not supporting Iterator
18:35amalloyForSpareParts: too many parens
18:35amalloythe one on line 11 is extraneous
18:36ForSparePartsHuh, ok. Thanks.
18:36amalloy(aside: is something still "extraneous" if it's breaking things? or does that word imply that it isn't causing a problem?)
18:36ForSparePartsWhy is that? I thought that the entire function body had to be in parens?
18:37amalloyparens always mean "call this as a function/macro"
18:37amalloythe function body tends to have parens around it, because you want to call something as a function
18:37amalloybut you can't just put more in
18:37antares_dakrone: hey
18:37ForSparePartsI'd say your use of "extraneous" was spot on. It means something is unneeded or extra, but it could be causing a problem as well.
18:37ForSparePartsAlso, that makes sense. Thank you.
18:39ynnivis there any sample code using noir or compojure and websockets?
18:40weavejesterynniv: Compojure is for HTTP routes, rather than websockets.
18:41kovasb_ynniv: https://github.com/andrewvc/noir-async
18:41ynnivI have a compojure app that I would like to add a websocket route to
18:41weavejesterynniv: I believe there's some code in Aleph for web sockets
18:43ynnivyes, the code that I have seen ends up using aleph
18:46ynnivI've probably gotten lost in the abstractions. Can I use my existing compojure routes with aleph?
18:53weavejesterynniv: Hm… Maybe… Compojure is a routing libary built around Ring, but it might also work with Aleph, since it looks like the only difference is in the way the response is returned.
18:54ynnivsanity check: (noir (compojure (ring (jetty))))?
18:54ynnivand it looks like aleph is ring-like
18:54ynnivso (noir-async (compojure (aleph (netty))))?
18:54weavejesterYes. But websockets are not HTTP, and therefor not Ring.
18:54ynnivcorrect
18:54weavejesterYou effectively need Ring for your HTTP stuff, and Aleph for your websocket stuff.
18:55weavejesterOr noir-async might handle that for you.
18:55ynnivin the best case, I would have a server that fulfilled HTTP requests with ring and WebSockets with something else
18:55ibdknoxaleph + compojure or noir works just fine
18:55weavejesterIt looks like there are wrap-ring-handler and wrap-aleph-handler for converting back and forth
18:56weavejesterSo you can convert between the two protocols depending on the route.
18:56ynnivyes. but ring/jetty cannot handle websockets
18:56ynnivso I need to swap that part with something else
18:56ibdknoxring is not tied to jetty
18:56ibdknoxaleph = netty
18:57ynnivyes, but can ring wrap netty and do ws?
18:57ynnivfrom what I can tell, aleph is ring applied to netty and ws
18:59weavejesterynniv: It looks like there is middleware to convert back and forth between the Aleph style and Ring.
18:59weavejesterhttps://github.com/ztellman/aleph/wiki/HTTP
19:00weavejesterLet me see if I can come up with a small example....
19:01jonaskoelkerhave anyone done any parsing in clojure?
19:02brehautyes, but any advice i have is now out of date
19:02jonaskoelker:|
19:02jonaskoelkerknow of any good parser generators?
19:03ynnivi last used https://github.com/joshua-choi/fnparse
19:03ynnivthe output was kind of slow, but that might have been an artifact of a poor grammar
19:04brehautlast i looked fnparse was not compatible with clj 1.3+
19:04antares_jonaskoelker: I am afraid all clojure-specific parser generators are a bit out of date. I used Ragel and ANTLR to produce a Java parser that produces Clojure data structures, it was pretty straightforward.
19:04weavejesterHm, actually an example might mean I'll need to try a few things out first...
19:04brehauttheres parsley
19:04ynnivbrehaut: that wouldn't surprise me (clj 1.3)
19:05jonaskoelkerbrehaut: I can confirm that incompatibility
19:05jonaskoelkerantares_: can you share the code?
19:06ynnivweavejester: My compojure routes are ultimately a ring handler, correct? Perhaps it is as simple as wrapping those routes and adding my WebSocket route.
19:06antares_jonaskoelker: here is one: https://github.com/michaelklishin/crawlista/blob/master/src/rl/clojurewerkz/crawlista/robots/Parser.rl
19:07weavejesterynniv: Effectively yes. I just don't know if you can use GET etc. with Aleph or if you need to create a handler function manually.
19:07ynnivok. It's a place to start
19:07antares_jonaskoelker: I wouldn't call it a great example of a Ragel parser but it demonstrates how you can easily build Clojure data structures in a Java parser. I prefer ANTLR to Ragel because it has ANTLWorks (a small IDE)
19:09jonaskoelkerantares_: yeah, I think I'll go with ANTLR, though the documentation seems sparse -.- ; but thanks, I'll study the building of clojure data in java
19:10ynnivUnrelated, the velocity of the clojure community is amazing. I'm still wary of the JVM (exceptions, tail calls, bloat), but it's difficult to ignore the energy of the community.
19:12jonaskoelkerI find it a non-hassle to use loop/recur, fwiw
19:12jonaskoelkerhow's exceptions and bloat a problem in your eyes?
19:12jonaskoelkerbloat = huge memory consumption?
19:13ynnivyes. I can run racket on a 64MB embedded ARM
19:13jonaskoelkerracket?
19:13ynnivand every time I see a stack trace I die a little
19:13ynnivmzscheme
19:13jonaskoelkerah
19:13jonaskoelkeroh yeah
19:13ynnivbut stack traces are often the only useful part of an exception
19:13jonaskoelkerjava.foo.indirectMethodOne -> java.foo.indirectMethodTwo -> java.bar.deepNestingThree -> ...
19:13ynnivyou really need handlers to do something useful when odd things happen
19:14jonaskoelker~= callbacks?
19:14clojurebotNo entiendo
19:14technomancyleiningen runs on a beaglebox =)
19:14jonaskoelker(I'm new/intermediate to lisp; is `handler' a ... keywordish?)
19:15ynnivhow much RAM?
19:15clj_guest_002so javascript has it's document model; is there anyway in java to create GUIs with something like that
19:15antares_jonaskoelker: I happen to have 2 books from ANTLR author, one of them on ANTLR :)
19:15clj_guest_002rather than stacking guilayout on top of guilayouts ?
19:15technomancyynniv: not sure. 64MB might be enough for leiningen, but not if it needs to share with the OS =)
19:15jonaskoelkerantares_: lucky you. Can you fax it? =)
19:15ynnivwell, there wasn't a whole lot of room for racket either :)
19:16ynnivbut it compiled and ran on a soft-float system
19:16technomancyynniv: but UTF-16 suuuuucks; it's true
19:16antares_jonaskoelker: I can give you a link to it :) http://pragprog.com/book/tpantlr/the-definitive-antlr-reference
19:16technomancyit's better than not having the language specify an encoding (cough; ruby), but it's bad.
19:17ynnivjonaskoelker: try http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html
19:17jonaskoelkerantares_: but it's like (iterate dec *account-balance*) :-(
19:18ynnivinstead of being a backstop for an unwinding stack, they let you change state and resume
19:18antares_jonaskoelker: `handler` is OK to use but if you want a local name to use for a handler fn, f (for function) is quite common
19:18antares_jonaskoelker: there are alternative ways to acquire it, lets put it that way. I do not encourage them but it's ultimately up to you :)
19:21jonaskoelkerhm; I should probably read up on CL's condition system. I hear good things about it
19:23ynnivit's one of the few things missing from clojure
19:23technomancyynniv: it's been implemented
19:23jonaskoelkerthat and a parser generator =)
19:23technomancybut nobody uses it
19:24ynnivtechnomancy: do you have more info?
19:24jonaskoelkerneocons??
19:24lazybotjonaskoelker: Definitely not.
19:24jonaskoelker-.-
19:25technomancyynniv: it's called error-kit
19:25foxdonutweavejester: was looking at Ragtime earlier. Quick question: although all the pieces are already there, there doesn't seem to be a single point of entry to run a series of migrations but checking the database to see which ones have already been executed. Am I missing something?
19:25foxdonuttechnomancy: you were right, Ragtime is a nice option.
19:25technomancygood! =)
19:26weavejesterfoxdonut: I believe that's the "apply-new" strategy.
19:27jonaskoelker(into 'bed /me)
19:27weavejesterfoxdonut: So: (migrate-all migrations strategy/apply-new)
19:28foxdonutweavejester: as my 5-year-old daughter would say, "sweeeet!" Thank you!
19:28weavejesterfoxdonut: Take a look at: https://github.com/weavejester/ragtime/blob/master/ragtime.core/src/ragtime/strategy.clj
19:29weavejesterfoxdonut: That lists the three different ways migrations can be applied. If you can think of any more, let me know :)
19:29foxdonutweavejester: excellent. I'm pretty sure apply-new is what I'm looking for. thanks again--much appreciated.
19:32foxdonutweavejester: the other part I am having trouble with, but this is likely my not knowing clojure syntax for protocols.. how do I do (def db (ragtime.sql.database.SqlDatabase. {:classname .. :subprotocol ..})) instead of each parameter as separate args?
19:32foxdonutalso I can't seem to be able to require or use SqlDatabase to use (SqlDatabase. ...), only able to use fully qualified name
19:33weavejesterfoxdonut: If you're using Clojure 1.3 or above, records create two functions: ->SqlDatabase and map->SqlDatabase
19:34weavejesterfoxdonut: You'd want (map->SqlDatabase {:classname … :subprotocol …})
19:35weavejesterfoxdonut: Only the ->Record or map->Record functions are created with the namespace. If you want to use the record as a class, e.g. using Record., then you need to import it. But ->Record or map->Record should probably be preferred.
19:35ynnivtechnomancy: I think that I saw error-kit before. Not sure if I forgot about it because it doesn't get much use, or because most of my exceptions come out of Java libs.
19:35foxdonutweavejester: nice, let me try it out..
19:40foxdonutweavejester: the protocol syntax works, but the apply-new strategy doesn't seem to work as I expect.. meaning if I call it on every webapp startup, first time it runs the migrations, the second time I expect it not to try to run them again.. but it runs them again and fails with "table already exists"
19:43foxdonutweavejester: perhaps an error on my part.. here's what I'm trying: https://www.refheap.com/paste/2643
19:45weavejesterfoxdonut: Hm...
19:45weavejesterfoxdonut: What does the content of the ragtime_migrations table look like?
19:46foxdonutweavejester: create-bookmark-table|1336433877972
19:47weavejesterfoxdonut: What happens if you call (applied-migrations sql-db) ?
19:48symboleDoes Clojure have a set of unit tests for its conrrency abstractions?
19:48foxdonutweavejester: bookmarksite.server=> (applied-migrations sql-db) => (nil)
19:50weavejesterfoxdonut: Try calling (remember-migration migration-create-bookmark-table)
19:51weavejesterfoxdonut: Ragtime's a work in progress, so it's not as smooth as it could be.
19:51foxdonutweavejester: no problem, I understand, and I appreciate your help
19:51foxdonutweavejester: that last returns {"create-bookmark-table" {:id "create-bookmark-table", :up #<config$create_bookmark_table bookmarksite.database.config$create_bookmark_table@1909385>, :down #<config$drop_bookmark_table bookmarksite.database.config$drop_bookmark_table@12ca580>}}
19:52weavejesterOh, I meant, try calling it before running (create-schema-if-necessary)
19:52foxdonutoic, ok let me try
19:52weavejesterfoxdonut: It registers the function as a known migration
19:54foxdonutweavejester: indeed that fixes the problem
19:54weavejesterfoxdonut: I had some plans for a defmigration that would make things easier, adding the :id and remember-migration in automatically.
19:55foxdonutweavejester: nice.. any reason why migrate-all wouldn't imply to remember each migration?
19:56weavejesterfoxdonut: It does, but I think the order is a little wrong.
19:57foxdonutweavejester: hmm, I think I see what you mean..
19:59weavejesterfoxdonut: It calls remember-migration each time migrate is called, but I think migrate-all should register all the migrations before it starts to apply them.
19:59weavejesterfoxdonut: Like: (doseq [m migrations] (remember-migration m))
20:00foxdonutweavejester: right, otherwise the strategy decides whether to run migrate, before the migration is registered
20:01weavejesterfoxdonut: Exactly. It's a bug, I think.
20:01foxdonutweavejester: would you like me to try the change, test it, send you a pull request?
20:01weavejesterfoxdonut: Please do
20:02foxdonutweavejester: ok, will do. again, thanks for your help, I appreciate it!
20:02technomancyweavejester: sorry I dropped the ball on that whole ragtime thing
20:02weavejesterfoxdonut: No problem! Sorry about the rough state of ragtime. I haven't yet gotten onto migrations in my app, so I've yet to work on it recently!
20:02technomancymight end up back on clojars soon; will see if we can give it a spin there
20:03weavejestertechnomancy: Hum? I haven't looked at it recently either, so no need to apologise!
20:03dabdwhat is the functional idiom for taking numbers from a list [1 2 7 10 5 4] while the sum of those elements is inferior to a given value? I'm trying to use take-while but i cannot figure how to keep the sum without using atom
20:04amalloy&(doc reductions)
20:04lazybot⇒ "([f coll] [f init coll]); Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init."
20:04hiredmaninferior? you mean less than?
20:04foxdonutweavejester: as technomancy said earlier today, the other migration libs seem to try to do too much, and I agree, yours is the cleanest one
20:06foxdonutweavejester: gotta run now to put the kids to bed-- I'll be in touch.
20:06weavejesterfoxdonut: Glad you like it :)
20:07amalloy&(map second (rest (take-while (fn [[sum num]] (< sum 21)) (reductions (fn [[sum num] x] [(+ sum x) x]) [0 0] [1 2 7 10 5 4])))) ;; dabd?
20:07lazybot⇒ (1 2 7 10)
20:07foxdonutbest part of clojure! all these libraries that are devoid of cruft.
20:08emezeskeamalloy: I'm so glad that you keep reminding me about reductions... There are so many places where it makes for simple solutions
20:09dabdamalloy: thanks. reductions seems useful
20:29rhcdo let bodies have an implict do?
20:29nDuffrhc: yes
20:33rhcnDuff: thanks
20:34rhcthese "Evaluation aborted" errors are driving me nuts, can't figure out where the crash is occuring
20:34muhoohehe, i find i'm using (vector ) and (hash-map) instead of {} and [] so that i don't end up matching up crap at the end of functions that look like javascript,i.e. ]}])])
20:34FrozenlockI have a problem here... I just moved from Win7 to Ubuntu, and (.getHostAddress (java.net.InetAddress/getLocalHost)) doesn't work in the same way. I was expecting to get my machine IP (the one given by my router), but instead got 127.0.0.1
20:34muhoo)))) is cleeeener
20:35emezeskemuhoo: you're not using a paredit mode of some sort?
20:35TimMcmuhoo: Terrible.
20:38muhoowhat drives me nuts about paredit is no freedom of choice. if i want to fix or edit stuff, it doesn't let me
20:38FrozenlockAny advice on how to obtain my machine IP from clojure?
20:39muhooor if i screw up and put a ( in the wrong place, it puts a ) and won't let me delete it.
20:39beffbernardmuhoo: C-u del
20:40muhoohm, must try, thanks
20:40amalloymy problem with cars is if i accidentally turn them upside down they're too heavy to flip over, so i just walk everywhere
20:40beffbernardC-q ( to insert paren
20:40emezeskemuhoo: I dunno about emacs, but I use paredit in vim and it's very easy to tell it "I know what the hell I'm doing, so let me"
20:41amalloyit's not really quite the right analogy, but my point is paredit actually gives you faster/better ways to fix your problems, so the fact that it prevents (or makes difficult) the slow ways is not really a sticking point
20:42beffbernardamalloy: After paredit, I can never see C-k in the same light again
20:42beffbernard:*(
20:42amalloyeh?
20:43beffbernardI miss C-k in any other mode
20:43wei_hi, is there a way to change the agent state in its error-handler? I want to store the error in the agent state without calling send or send-off, which won't work since the agent is already failed
20:43amalloybeffbernard: C-M-k
20:43amalloyworks in most modes
20:43beffbernard:O
20:45beffbernardamalloy: not quite the same
20:45amalloyno
20:45beffbernardalmost like M-d in java-mode
20:45amalloybut it gets you the balanced pairs, which is the important part IME
20:45clojurebotYou don't have to tell me twice.
20:46amalloyi rarely really care about C-k except as a lazier way to type C-M-k a few times
20:47muhooi tend to do C-M-space, then C-w
20:47beffbernardI used to use C-k constantly… it's like a shotgun approach.. it was almost faster if I accidently deleted a few things I didn't want and retype them
20:47muhooon mine, C-k is kill line, i use that in just about every mode
20:48gfredericksamalloy: glad I saw that. I just learned about C-M-k
20:48muhooor "D" if i happen to be in vim.
20:49beffbernardso who else is trying these commands?
20:49beffbernardthese are gold
20:50beffbernardmuhoo +1 for C-M-space
20:50amalloybeffbernard: hit it a few more times to highlight more sexps
20:53mebaran151anybody know a good wsdl web services api for Clojure?
20:54beffbernardyeah I noticed that
20:54beffbernardgood stuff
20:54muhooC-M-space C-x C-x, in particular
20:55muhoo"where the hell does this form end???"
20:55amalloyi dunno, i just use C-M-f
20:55amalloymucking with point and mark for that seems like wasted effort
20:57beffbernardTyping C-M all the time can't be too healthy
20:57amalloysurely you have caps-lock mapped to ctl, though. it's not really that bad as long as you're not moving your pinky way down there
20:58muhootechnomancy: my daughter and her friends are obsessed with moustaches for some reason. so i printed this out for her: http://bace.s3.amazonaws.com/moustache-obsession.jpg
20:59beffbernardYes, I do. it's the thumb stretch for meta that's annoying me.
20:59beffbernardAlso mac keyboards have meta in a real awkward spot
21:00muhoobeffbernard: getcha one of these then: http://upload.wikimedia.org/wikipedia/commons/4/47/Space-cadet.jpg
21:00muhooeven has a "like" and "unlike" key for using facebook
21:01gfredericksgreek? top?
21:02gfredericksoh greek. I see.
21:02beffbernardholy crap, that's old
21:02gfredericksoh a macro key for clojure
21:02amalloyoh, yeah. on the rare occasions i use a mac i swap meta/cmd
21:02beffbernardhaha waht's a rub out?
21:03beffbernardmuhoo: ^
21:03amalloybeffbernard: delete/backspace. the terminology was still in flux back then
21:04beffbernardfancy
21:04amalloy(and actually so was the technology. some non-erasable media, like punched cards, you would write a "rub out" after the character you wanted to erase
21:05beffbernardimmutable if you will
21:05Bretzkytypematrix is the beset imo
21:06beffbernardamalloy: that's pretty interesting; I would not have know that otherwise
21:07amalloyall hearsay, of course; i'm not old enough to have lived through those days
21:11creeseHaving an issue with a jar. Main takes a number as an argument. Works fine form the REPL, but when I try to run the uberjar, I get
21:11creeseja
21:12creesejava.lang.String cannot be cast to java.lang.Number (presumably because on the command line the number is now text)
21:12beffbernard,(doc read-string)
21:12clojurebot"([s]); Reads one object from the string s"
21:13creeseso I need to assume its a string? will it still work from the repl or do I need to deploy two versions now?
21:13beffbernardI'm assuming you are calling your main method right?
21:14beffbernardIf so, the args will be strings
21:14creesewhy does it work from the repl without read-string then?
21:15beffbernardyou're passing an int in the repl
21:17brainproxyanyone here know if it's possible to specify the JIT type (i.e. client or server) when firing up the JVM from c++ with JNI_CreateJavaVM?
21:18brainproxythe code I have to do that does accept options for the vm, but barfs when I try passing -server or -client as an option... having trouble hunting down the answer
21:25muhooi think i'm seeing the benefit of using this nosql stuff. instead of the real core of the app being in sql, i'm writing it in clojure instead
21:26muhooif i used an sql back-end, i'd end up writing most of the business end of it *in* sql.
21:33emezeskemuhoo: I don't think there's any reason you couldn't do that with sql
21:33emezeskemuhoo: AFAIK, the nosql benefits are mostly performance/scalability related
21:41muhoothat, and also the db's are schemaless
21:42emezeskeWell, you could always just create a key/value table in a sql database and throw blobs of data in the value column
21:42emezeskeNot that I recommend that, of course :)
21:42muhooi could do that, and i've seen that (like how android uses sqlite), but old habits die hard ;-)
21:43muhoothis has really stretched my brain, it's been very difficult. but i'm seeing some benefit now.
21:43emezeskeI was just pointing out that nosql is (in my mind) more for performance characteristics than being easier to program
21:43muhootrue
21:44emezeskeAlso, it has some big drawbacks if you happen to be dealing with data that is, in fact, relational
21:44technomancymuhoo: that's hilarious; love it
21:44muhootechnomancy: you're welcome :-)
21:44muhooactually, thank you for that great graphic
21:44muhoodid you draw it?
21:44technomancymy brother-in-law made it
21:44muhoohe's good.
21:45technomancyhe does game scene art; hoping to move into concept art
21:46technomancyalso did the Pindah logo: https://github.com/mirah/pindah
21:47muhoonice, alien basketball
22:11FrozenlockI've made a function to get my IP on Ubuntu (normal InetAddress/getLocalHost doesn't work on this OS. Well it works, but not as I was expecting). Any suggestions? It seems really big for such a trivial task: http://pastebin.com/JpSR5SN3
22:13jweissanyone ever have lein run *really* slowly, and get a thread dump showing it's stuck at leiningen.util.file$delete_file_recursively.doInvoke? seems to be recursively deleting files, but my hard drive activity is pretty much zero. cpu at 100% lein 1.7.1
22:14jweissi have had it do this for 30+ seconds, but now it's been several minutes, my project is not that big, <100 files including source and libs.
22:39technomancyjweiss: that sounds like a bug we had in 1.7.0, but it should be fixed in 1.7.1
22:40technomancydo you have a lot of .class files?
22:41jweisstechnomancy: i have 1381. i don't know if that's a lot, it includes all the deps' classes
22:42technomancykind of a lot, yeah =\
22:42technomancya bug in 1.7.0 caused there to be a GC forced in between deleting each file
22:42jweisstechnomancy: huh, i ran lein upgrade earlier, and saw it download 1.7.1, but i still have 1.7.0
22:42technomancyah... odd
22:42jweisslet me try that again :)
22:43jweissoh no wait, that was on my laptop. sorry, bad memory on my part :)
22:44technomancycool
22:44jweissworks better now, thanks technomancy
22:47technomancygreat
22:49jweissis 1300 classes really a lot? considering every function in every lib that gets loaded (both anonymous and named) has a class, that doesn't seem like a lot at all.
22:51tomojthat's the slow clean bug?
22:52tomoj(missed the question)
22:52jweisstomoj: yep
22:52jweissnow compiling seems fairly slow
22:53jweisstakes about 45 seconds to recreate those 1300 classes, seems like javac would be much faster, but i probably can't compare javac to the clojure compiler :)
22:54jweisswhat makes me suspicious that the compiling is not going as fast as it could, is the 5% cpu utilization.
22:55jweissit seems to be all disk activity, but there's no way the disk should take 45 seconds to write 6.5mb of class files.
23:05echo-areaDoes anyone here use aleph (https://github.com/ztellman/aleph)? The compilation of code using it is _very_ slow. Am I doing something wrong?
23:09echo-areaAnd the java compiling process uses more than 200 MB memory
23:25tomojI've noticed slowdowns from aleph too
23:26tomojno clue why
23:28echo-areaI guess something is causing the java process using very large memory usage
23:28echo-areaand that slows down the compilation
23:57felideonwhat are the rules of hyphen motion in clojure, with regards to ? and predicate functions
23:58felideonlong-predicate-name?
23:58felideonor long-predicate-name-?