#clojure logs

2012-05-03

00:00xeqiwei_: (map #(when (agent-error %) (System/exit 1)) agents) ?
00:01xeqior doseq since map is lazy
00:02wei_xeql: thanks. should I use another agent to run this periodically?
00:03xeqiyou could look at #(doc set-error-handler!) if it should happen all the time
00:04xeqihmm, what is it for inline bot commands?
00:07brehaut##
00:08brehautfoo ##(inc 1) bar
00:08lazybot⇒ 2
00:16wei_,(doc set-error-handler!)
00:16clojurebot"([a handler-fn]); Sets the error-handler of agent a to handler-fn. If an action being run by the agent throws an exception or doesn't pass the validator fn, handler-fn will be called with two arguments: the agent and the exception."
00:18wmealingi didnt know about that, thanks.
00:27emezeskeAny midje experts in here know how to deal with prerequisite functinos that take a variable number of arguments?
00:37leo2007last time I tried swank-clojure which is about 1 year ago it doesn't have CDT support. How to demonstrate the CDT feature in the new swank-clojure?
00:43sritchieibdknox, qq
00:43sritchieif you were a man who used vimclojure, but had your memory wiped out --
00:44sritchiewhere would you go to rediscover the installation process?
00:47jayunit100how does "recur" know what the "recursion point" is in absence of a "loop" ?
00:47sritchiejayunit100: it jumps up to the function definition
00:47sritchieat the same arity
00:48jayunit100oh ok
00:48jayunit100so it looks to the nearest function definition.
00:48jayunit100or the one which it is immediately nested inside of .
00:49jayunit100hmmm one more question... Could not locate clojure/contrib/lazy_seqs__init.class?
00:50RaynesThat is completely impossible to diagnose without more information.
00:50RaynesWhat are you doing that causes that?
00:50jayunit100ah nevermind. i thought it was always in the cp. forgot you have to add it.
00:50jayunit100raynes: yup... my bad... contrib is external. dug
00:51RaynesYou shouldn't be using that anyways.
00:51jayunit100contrib ?
00:51Rayneshttp://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
00:51jayunit100hmmm oh ok . i was looking for the prime # generator
00:52jayunit100clojure.contrib.lazy-seqs was killed off ?
00:52Raynesjayunit100: As of Clojure 1.3, monolithic contrib was split into a number of independent libraries (https://github.com/clojure). Some pieces of it that were inconsequential disappeared.
00:53jayunit100raynes: yup prob got rid of lazy primes. oh well thanks
00:53jayunit100night night gotta go sleepy
00:57wmealingi guess you could always move it forward in your own lib
01:23sritchiedoes anyone know how to access the previous statement in vimclojure, at the nailgun repl?
01:34wei_sritchie: Ctrl Up, i believe
01:34wei_you have to be in insert mode
01:35sritchiewei_: nice, thanks
01:48wei_i'm trying to reify a java interface, in which onMessage should dispatch an event to an agent. what's the best way to implement this? I've tried (defn make-handler [msg-fn] (reify IOCallback (on [_ msg] (msg-fn msg)))) but when I have multiple agents, each with their own socket, the messages aren't getting routed to the right agent.
02:42leo2007is the clojure api doc http://clojure.github.com/clojure/ built from its doc-strings?
02:52wmealingit does look like it
03:03creesehaving trouble with atoms. I want to assoc into an empty hash I have the keys and vals as a list
03:04creese(apply assoc {} (interleave (keys (get-hash seuss)) (vals (get-hash ))))
03:04creesegives, {\c #{"cat"}, \a #{"cat" "hat"}, \t #{"cat" "hat"}, \h #{"hat"}}, this is what I want
03:05creesewhat is correct format for swap! so I can update the atom?
03:08creeseI'm trying (swap! dictionary (apply assoc (interleave (keys (get-hash seuss)) (vals (get-hash seuss))))), but this isn't quite it.
03:10leo2007wmealing: thanks
03:10amalloyhuh? the stuff you've glossed over makes your question difficult to understand
03:10amalloyit sounds like you probably just want (swap! dictionary into (get-hash seuss))
03:11creeseI didn't know you could put the hash in there directly
03:11amalloy(swap! a f x) => sets a to (f @a x)
03:12amalloyto merge two maps, you can use merge, or into, or any number of things. apply/assoc/interleave is usually not the best way
03:13amalloyif you wanted to do it that way, you could do (swap! dictionary #(apply assoc % (interleave ...)))
03:14amalloyor, equivalently, (swap! dictionary (partial apply assoc) (interleave ...))
03:15creese(swap! dictionary into (get-hash seuss)) does what I want
03:15creesethanks
04:15leo2007there is no equivalent of the hyperspec for common lisp, right?
04:30faust45is it clear to use agents to handle http req in async way?
04:39tomojfaust45: have you looked at aleph?
04:39faust45tomoj: no
04:39tomojhttps://github.com/ztellman/aleph/wiki/HTTP
04:40faust45tomoj: thanks will take a look
04:41tomojagents may work for your needs, dunno, but aleph is what I use for async http
04:41tomojbit complicated maybe since you need to learn lamina too
04:41tomojfor that, http://www.infoq.com/presentations/Event-Driven-Programming-in-Clojure
04:42tomojis a good high level presentation
05:07devnhttp://www.youtube.com/watch?v=4eivzaGgnFw&feature=relmfu
05:09leo2007folks, clojure for android, is it realistic now?
05:09leo2007In a business sense.
05:10devnleo2007: i dont think so yet, but im by no means an authority on that topic
05:10devnleo2007: there's some active work being done on that front though
05:11leo2007devn: where to find out?
05:13devnleo2007: http://groups.google.com/group/clojure-android/browse_thread/thread/05bc8bc4fa145e67/9c828a4946877b47?show_docid=9c828a4946877b47
05:13leo2007didn't know there is a dedicated ml. Thanks.
05:15devnleo2007: happy to help. happy clojuring. :)
05:16leo2007any business/startups using clojurescript?
05:47_KY_Under "lein run", the core.clj module cannot read from *in*, how to fix that?
05:56_KY_How can I run the project after compiling it in lein?
05:58vijaykiran_KY_: if you have a main class and created uberjar, you can use java -jar *jar-name.jar*
05:59_KY_I tried to run the main class
05:59_KY_But it doesn't work...
05:59_KY_Don't know why
06:02_KY_I tried uberjar it says cannot locate main class
06:04pooya72_KY_: have you followed the steps in the tutorial? http://stackoverflow.com/questions/10240100/clojure-lein-package-into-jar/10244187#10244187
06:08_KY_Thanks... succeeded =)
06:08pooya72_KY_: yes!
06:08_KY_So.. when I run it compiled, it can read *in*
06:08_KY_But not when running under lein
06:10pooya72i don't see why it shouldn't work under lein
06:11pooya72you mean the repl or lein run?
06:27leo2007is idempotent a word?
06:28bradwrightyes
06:28bradwrighthttp://en.wikipedia.org/wiki/Idempotence
06:29leo2007thanks
06:58leo2007if I type '#(whatever %1) in the repl, it gives me (fn* [p1__2469#] (whatever p1__2469#))
06:59leo2007but to use slime's macro expansion to get the same results?
06:59leo2007I only have: #(whatever %)
07:00leo2007Is this because macroexpand-all is not yet implemented?
07:13beffbernardMorning
07:19pooya72beffbernard:Morning
07:27cshellmorning :)
07:44y3didid the clojurewest vids ever go up?
07:53creesetrying to print the value of a var inside a let, but its complaining about lazy sequences, how can I force those?
08:04_KY_pooya72: when I do "lein run", my code does a "read" but the input is frozen...
08:04pooya72creese: Force evaluation: doseq dorun doall
08:04_KY_Seems that *in* is re-directed somewhere else
08:04creese _ (doall (println (words-by-letter)))
08:04creesedoesn't work, where do I put it?
08:06pooya72creese: http://clojuredocs.org/clojure_core/clojure.core/doall
08:08pooya72_KY_: I don't know, I think I have to look at the code. But I'm a noob, so don't know how much I can help.
08:08_KY_Have you tried "read" under lein run?
08:08_KY_See if your setup work =)
08:09_KY_The code is just a simple (read)
08:09pooya72_KY_:
08:09pooya72_KY_: ok
08:09michaelr525padLeft in clojure?
08:10solussd_If I want to have my webserver reply to a GET at an arbitrary URL with a file download, can I simply return (slurp "path/to/file")? it seems to work with text, but not images
08:15cemericksolussd_: try returning (java.io.File. "path/to/file")
08:16cemerickThough you should use an existing static resource handler for that, so you're not accidentially serving files like e.g. "/etc/passwd" :-)
08:17solussd_cemerick: that worked. Can you tell me why? :)
08:18solussd_cemerick: I provide a link that doesn't contain the filename, e.g. http://<servername>/filesubmissions/<uuid>/file, and that looks up the filepath and serves it. :)
08:19cemericksolussd_: oh, I see. I presume you're using compojure?
08:20solussd_cemerick: noir
08:20cemericksure, which uses compojure underneath
08:20solussd_yup
08:20cemerickI believe that's where the automatic Content-Type handling and such is done.
08:21cemerickUnless the files you're serving have no extension, in which case you should need to set the content type yourself.
08:21sandGorgoncemerick, shouldnt that be handled by something like nginx in front of the actual app ?
08:21_KY_How can I do (read) from a string?
08:21solussd_using Noir with Enlive, clojurescript+jayq for client-side, fetch for ajax (or acacs I guess), Korma for db, and Lobos for migrations. All works quite well together
08:21cemerick_KY_: read-string
08:22cemericksandGorgon: well, not if there isn't a direct mapping between the URI and the file to be served
08:22solussd_cemerick: i explicitely set the content-type using (noir.response/content-type <type> <stream>)
08:22cemerickIn any case, it's *tons* simpler to not have to mess with nginx or apache or lighttpd, or…
08:22_KY_Ahh that works =)
08:23solussd_jetty seems performant. I like. :)
08:23cemerickGood enough for almost everything.
08:23sandGorgoncemerick, even if there is not, shouldnt the app should just do a redirect to the actual file path and let nginx serve it ?
08:23cemerickOnce it's not, you're probably better off using a CDN
08:24cemericksandGorgon: but for what purpose?
08:24fdaoudsolussd_: "acacs" --that's funny :)
08:24sandGorgoncemerick, ur comment about a CDN supersedes that anyway ;)
08:24cemerick:-)
08:25cemerickhardly anyone needs whatever performance benefits nginx et al. provide, or a CDN for that matter
08:25cemerickThose that do…use them. :-)
08:26solussd_fdaoud: yeah, it makes a lot of sense. No point in serializing clojure to XML- clojure is its own serialization format. (code is data! yay!)
08:26fdaoudindeed
08:26pooya72_KY_: I tried this (example 2) in lein run: http://clojuredocs.org/clojure_core/clojure.core/read and it worked
08:27solussd_I convinced the right people at work to let me do a couple of the projects in the pipeline in clojure. So far, so good. Nice to write clojure at work. :)
08:28robertstuttafordcemerick: awesome! thanks for posting the video. quick question. i'm unable to download the video from youtube (for watching later). any clue why?
08:28cemerickrobertstuttaford: dunno; is that supposed to be possible in general?
08:29_KY_pooya72: why not try example 1?
08:29_KY_I have problem when reading from standard input ... it freezes
08:29cemerickright, so: I posted an introductory 'Starting Clojure' screencast yesterday: http://cemerick.com/2012/05/02/starting-clojure/
08:29robertstuttafordyes. here in south africa, our connectivity isn't that fast so i download 'casts to watch so i don't have to wait for buffering
08:30robertstuttafordbut for some reason when i download i only get a 1.7mb blob and then that's it
08:30robertstuttafordhow big is your source vid ? :)
08:30cemerickrobertstuttaford: I think it was ~300MB, but I have no idea what youtube does to it
08:31pooya72cemerick: thanks for the video :)
08:32cemerickrobertstuttaford: how are you getting a download link?
08:33robertstuttafordusing DownThemAll for firefox; it sniffs out the url that flash player requests
08:34cemerickah
08:34clgvis there a predicate placed replace function in clojure where the replacement is determined by a given function?
08:35pooya72_KY_: because i assumed there was no way to get user feedback. so I assumed it wouldn't work in lein run.
08:35_KY_Did it work?
08:36cemerickclgv: you mean for string/regex replacements?
08:36clgvsomething like: (replace coll vector? #(map inc %))
08:36_KY_Any one else know why (read) fails to work under "lien run"?
08:36pooya72_KY_: No, and not in lein run, but works in uberjar. Ask technomancy, or the mailing list.
08:36_KY_Same here...
08:36_KY_I have to uberjar it
08:37clgvcemerick: no. for items in collectionc
08:38pooya72_KY_: try lein trampoline run
08:38pooya72_KY_: it worked for me
08:38pooya72_KY_: read up on it here: https://groups.google.com/group/clojure/browse_thread/thread/a720fbb471edc040/09521c4b02c86f30?lnk=gst&amp;q=trampoline
08:38cemerickclgv: Not AFAIK.
08:39clgvcemerick: so everyone is composing this common task for themselves right now?
08:39cemerickWhen necessary, yeah.
08:39clgvok
08:41_KY_But "lein trampoline run" just gave me some java help
08:45pooya72_KY_: really? it worked for me. given the example in clojure docs for (read)
08:46_KY_It prints the java usage information
08:50robertstuttafordis there an incantation for the repl that automatically adds closing parens upon typing an opening one?
08:50cemerickrobertstuttaford: where is your REPL?
08:51mdeboardI always found paredit to be kind of hard to get used to
08:52mdeboardParen highlighting has been enough for me so far
08:52robertstuttafordum, lein repl
08:53robertstuttafordright now it's either there or whatever it is la-clojure in intellij is giving me
08:53rnikadoes clojure have a function like Scheme's for-each? Apply a function to each item in a sequence? (for-each prn '(1 2 3))
08:53robertstuttafordrnika: that's map, surely?
08:53kephaleor doseq
08:54rnikabut map builds up a result, I don't need one.
08:54robertstuttaforddoseq, yes
08:55ssedano1Hi, is redis-clojure the most up-to-date client?
08:55robertstuttafordwhat's the largest production deployment (in users) of clojure that anyone knows of?
08:56vijaykiranrobertstuttaford: http://getprismatic.com/ is built in clojure AFAIK
08:58cemerickrobertstuttaford: paredit-style editing in a terminal is probably not going to happen
08:58cemerickIf you're not fond of IntelliJ's REPL, counterclockwise's is very nice IMO. (Of course, I'm biased.)
08:59cemerickrobertstuttaford: also: http://dev.clojure.org/display/community/Clojure+Success+Stories
08:59robertstuttafordah brilliant @ success stories
08:59robertstuttafordi'll check the eclipse plugin
08:59robertstuttafordi get a bad taste in my mouth whenever i see eclipse. i blame flex/flash builder
09:00nDuffrobertstuttaford: ...I don't see Dell in the success stories page, but they're using it too (monitoring/statistics analysis infrastructure within the SaaS division)
09:01cemerickrobertstuttaford: a particularly bad citizen, it's true
09:01mdeboardPrismatic is built with clj but they've got a relatively tiny user base
09:07robertstuttafordsimple.com too!
09:07robertstuttafordhttp://www.quora.com/Whos-using-Clojure-in-production
09:08hhutchrobertstuttaford: Comcast also (I don't work there I just know it to be true)
09:10leo2007shit even after a year, lein still fails: http://paste.pound-python.org/show/20624/
09:10clgvleo2007: windows?
09:11leo2007I use rcirc on GNU Emacs 24.0.96.1 (Mac OS X 10.6.8)
09:12leo2007when in invoked lein, it downloaded the jar in current directory and somehow failed to copy it to ~/.lein/self-installs
09:12leo2007s/in/I/
09:19ejloIs it possible to print the emitted js code from a cljs REPL?
09:23uvtcUsing lein 2, while running `lein repl`, I see that I can run `-main` from from the repl like so: `(-main)`. However, the if I update my src/foo/core.clj file, how do I reload it in the repl?
09:24vijaykiranuvtc: (use 'foo.core :reload)
09:24uvtcThanks, vijaykiran!
09:31_KY_Is there something wrong with my installation if "lein trampoline run" gives me the java usage info?
09:34vijaykiran_KY_: what's the output you are getting ?
09:34vijaykirancan you paste your project.clj somewhere ?
09:34_KY_Usage: java [-options] class [args...]
09:34_KY_(To execute a class)
09:34_KY_Or java [-options] -jar jarfile [args...]
09:34_KY_(To execute a jar file)
09:34_KY_All the java usage help...
09:35_KY_https://refheap.com/paste/2523
09:37michaelr525err something strange is going on here
09:39michaelr525meh defn instead of def and a cryptic error message
09:40michaelr525IllegalArgumentException Parameter declaration str should be a vector clojure.core/assert-valid-fdecl (core.clj:6465)
09:40michaelr525
09:40cshelldakrone: Nice clj-http library
09:40michaelr525google saved the day again
09:40clgvmichaelr525: erm, what do you do?
09:41_KY_"Lein run" works fine but "lein trampoline run" gives me java usage =(
09:42michaelr525clgv: i wrote this (defn base-path (str home-dir "/images"))
09:42michaelr525instead of (def
09:42S11001001&(doc constantly)
09:42lazybot⇒ "([x]); Returns a function that takes any number of arguments and returns x."
09:42chaceshould be (def :)
09:42clgvah kk
09:42vijaykiran_KY_: which version of lein are you using ?
09:43fdaoudmichaelr525: I did something like that once and it took me a good hour to figure it out :(
09:43_KY_Leiningen 1.7.1 on Java 1.7.0_03 Java HotSpot(TM) Client VM
09:44chacewhat am I missing here: (-> (list :a) zip/seq-zip zip/down zip/remove) ? gives me a null pointer exception, while [:a] vector-zip ... works.
09:45chaceI would expect it to return the empty parent node
09:45chacedoesn't work on deeper levels either
09:45vijaykiran_KY_: which OS ?
09:45vijaykirantrampoline seems to run this : https://github.com/technomancy/leiningen/blob/master/bin/lein#L203
09:46_KY_cygwin
09:47_KY_Cygwin under winXP 32bit
09:48robertstuttafordcygwin is old and pretty unusable these days. _KY_, why not grab virtualbox and spin up ubuntu lucid in there and use putty to ssh into the vm instead?
09:49vijaykiran_KY_: I guess as a work around - you can just run the jar directly. Seems like a bug with cygwin + lein trampoline
09:49_KY_Yeah.. you remind me install ubuntu... =)
09:50_KY_Right... uberjar works already
09:50_KY_But I'm thinking "lein run" may be more convenient during development
09:50vijaykiranif you are trampolining that's not much of a help anyway
09:51_KY_Does NetBean use lein or maven?
09:51_KY_Why not?
09:52vijaykiranNetbeans has support for Maven, I didn't use lein + netbeans
09:54clgv_KY_: why dont you use leiningen natively under windows?
09:55_KY_Can I do that?
09:55vijaykiranthere's lein.bat
09:55S11001001_KY_: even more convenient is just to spawn your main call in your development repl
09:55felideonthere's also linux ^_^
09:55clgvyeah. last time I checked windows was supported by leiningen ^^
09:56_KY_S11001001: you mean don't use lein at all?
09:56S11001001_KY_: you don't need lein run to test your app; you can just load the module with your main function in the repl, and call it
09:57S11001001_KY_: that way you can continue to make changes to your running program, notwithstanding extant stack frames and data incompatibilities, but the benefit is well worth the occasional restart instead of the constant restarting
09:58S11001001restart cycles are for other development environments; it's not the lisp way
09:59_KY_I see...
09:59_KY_Now "lein run" works in windows, but I still can't do "lein trampoline run"
10:00_KY_"Error: Could not find or load main class and" (sic)
10:02_KY_Also, I can't start the REPL and then change directory to my project...
10:02S11001001what repl is that?
10:02_KY_The clojure REPL
10:02S11001001lein repl starts in the project
10:02S11001001swank starts in the project
10:03S11001001java -cp `cd proj && lein classpath` clojure.main --repl starts wherever you want
10:03S11001001what particular clojure repl doesn't start in the project?
10:05_KY_Fine... lein repl fits my requirements
10:09felideonS11001001: why'd you 'switch' to clojure?
10:10S11001001felideon: immutable data, lazy sequences, a lisp (and emacs-centric like one), got a job in it
10:11S11001001felideon: why?
10:12felideonS11001001: just remember you from #lisp :)
10:12S11001001yeah
10:12felideonS11001001: oh, congrats on job :)
10:12S11001001I did a big weblocks project for a client and got extremely frustrated with explicit state management; it was a mess
10:13felideonthat's a problem with weblocks, though, no? not that i've ever used it.
10:14S11001001it's a problem with having your views reflect your state, and your controllers alter your state, and not having automatic relationships between them
10:15felideonright, i guess my point is that that is not a problem with Lisp, but with the framework you went with.
10:15felideoncorrect me if I'm wrong, though
10:17felideonwe can -> /q though :)
10:18dnolenfelideon: I think it would be a problem in any language w/o good state management.
10:19felideonI guess I'm not understanding 'state management' at the language level. are you talking about immmutability, laziness, et al?
10:19S11001001I like writing functions
10:20S11001001the CL community doesn't lend itself to doing that for everything
10:20qerubHello.
10:20S11001001if you stay in your own little world, using your own little okasakis, sure, all's well
10:21felideonokasakis?
10:21S11001001"purely functional data structures" :)
10:22felideonah
10:27felideonI guess as I learn Clojure I will be enligthened. :)
10:28mdeboardembiggened
10:31gfrederickslearning clojure requires a noble spirit
10:33dgrnbrg,(symbol (name (ns-name *ns*)) 'my-symbol)
10:33clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.String>
10:33dgrnbrg,(symbol (name (ns-name *ns*)) "my-symbol")
10:33clojurebotsandbox/my-symbol
10:34dgrnbrg,'hi
10:34clojurebothi
10:34bhenryping ibdknox: i need to bug you again. briefly.
10:34dgrnbrg,`~(symbol "my-symbol")
10:34clojurebotmy-symbol
10:34bhenrycan i use (in) from korma with just a vector or list?
10:34dgrnbrgHow can I take a string and get the namespace-qualified symbol?
10:35dgrnbrgthe first thing I did works, but it seems weird to use name, ns-name, and symbol--it seems like there should be a simpler way
10:35bhenryibdknox: i have tried a few different syntaxes and can't quite figure it out
10:35Bronsa,(symbol (str *ns*) "symbol)
10:35clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading string>
10:35Bronsa,(symbol (str *ns*) "symbol")
10:35clojurebotsandbox/symbol
10:36dgrnbrgBronsa: thanks!
10:44TimMcIs there a way to add something to Lein 1.x's classpath? I have a project I'd like to have available from the REPL.
10:45mefestois there a way to have leiningen create checksum files when performing a `lein install` for a project?
10:48jakemccTimMc: would the checkouts directory feature do what you want? http://jakemccrary.com/blog/2012/03/28/working-on-multiple-clojure-projects-at-once/
10:49TimMcjakemcc: No, it's a REPL util project. I've implemented a replacement for contrib's "show", and I'd like it to be available in all my REPLs.
10:49TimMcI *could* write a plugin whose sole purpose is to bring in this utility...
10:51antares_TimMc: you can specify multiple source locations
10:52TimMc?
11:06boodleOk, silly ? but why is this false? https://refheap.com/paste/2525
11:06gfredericksboodle: contains doesn't do what you think it does
11:06gfrederickscontains? is a n00b trap
11:06gfredericks&(doc contains?)
11:06lazybot⇒ "([coll key]); Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or... https://refheap.com/paste/2526
11:07boodlegfredericks: so really for keys to collections, not contents per se
11:07gfredericksboodle: exactly
11:07boodlek ty
11:08gfredericks&(some #{58} '(58 59 60 61 62 66 69 71 72 73 78))
11:08lazybot⇒ 58
11:08TimMcHmm, can anyone point me to some class in the Java or Clojure std lib where there is a method override with a narrowing return type or a widening param type?
11:10S11001001nope
11:10gfredericksnobody can
11:11TimMcI'm trying to test out this reflection lib I'm writing. :-/
11:12TimMcI just realized that my approach to getting all inherited methods is flawed, since I'm not shadowing out overriden methods.
11:14stephenjbis a "unable to resolve symbol" a scope problem?
11:14stephenjbtrying to do a noir example getting that error
11:15pandeirowhy does ring's run-jetty fn need the handler arg to be var-quoted?
11:16gfrederickspandeiro: I don't think it needs it
11:16gfredericksprobably has something to do with reloading
11:16pandeirogfredericks: ah
11:16gfredericksthe extra level of indirection makes sure that when the var is rebound it sees the change
11:16pandeironoticed noir's template does it and cemerick's screencast has it var-quoted too, so that's why. thanks
11:17TimMcgfredericks: Err, yes. A coworker points out that you can't override with a widening param type, only a widening exception type.
11:17TimMc*narrowing, gah
11:17TimMcI am so confused.
11:17gfredericksTimMc: huh? did I say something about your issue?
11:17TimMc"nobody can"
11:17gfredericksah right
11:18gfredericksI was just kinda making fun of S11001001's response
11:18TimMcAh, OK!
11:18gfredericksI don't actually know much about it :)
11:18gfredericksbut glad I was right!
11:18mfexpandeiro, re #' see http://groups.google.com/group/clojure/browse_thread/thread/d52bbda3ff0967c8/254a918b9ffe92b9?lnk=gst&amp;q=run-jetty#
11:18pandeiromfex: cheers
11:20S11001001that's what I said :)
11:21_KY_How come clojure has no "append" for lists?
11:21gfredericks&(doc concat)
11:21lazybot⇒ "([] [x] [x y] [x y & zs]); Returns a lazy seq representing the concatenation of the elements in the supplied colls."
11:21S11001001&(doc assoc)
11:21lazybot⇒ "([map key val] [map key val & kvs]); assoc[iate]. When applied to a map, returns a new map of the same (hashed/sorted) type, that contains the mapping of key(s) to val(s). When applied to a vector, returns a new vector that contains val at index. Note - index must be <= (count vector)."
11:21S11001001pick which is weirder
11:45jonaskoelkeris there something like map-values which transforms {k v} to {k (f v)} (for all kv in that map)?
11:45gfredericksI bet flatland/useful has something like that
11:46jonaskoelkerflatland/useful?
11:46gfrederickshttps://github.com/flatland/useful/blob/develop/src/useful/map.clj#L47
11:48mfexjonaskoelker, also (zipmap (keys m) (map f (vals m)))
12:01pandeirowhy doesn't slime allow an already defined var to be redefined?
12:04mdeboardpandeiro: because vars are static
12:34pandeiromdeboard: you mean in slime or in clojure? the stock clojure repl allows it
12:43dnolennDuff: protocols fn don't support &
12:45clgvdnolen: there should be an error message for '& in protocol function arguments - since it doesnt do what almost everyone supposes
12:45dnolenclgv: probably, but somebody needs to make a patch for that.
12:46clgvdnolen: and that somebody needs to have the CA signed...
12:47dnolenclgv: no better time than now.
12:47clgvit's only possible via traditional mail?
12:49jweissany emacs experts know how to add another keyword to clojure-font-lock-keywords?
12:50dnolenclgv: yep
12:53beffbernardjweiss: in clojure-mode.el just look for (defconst clojure-font-lock-keywords …) then add there
12:53jweissbeffbernard: yeah, i was hoping to add a line to my own emacs.d file, not try to changed a packaged file :)
12:53jweissbut i assume "defconst" means what i think it means in elisp.
12:55beffbernardjweiss: not knowing what sort of effort is involved, just bust out the list of regexes out so you can append to it from outside
12:56beffbernardthen submit the patch
12:56jweisswhile i am asking sort of obscure questions, i am trying to run autodoc from leiningen, and use the :namespaces-to-document option. but no matter what i put there, it causes the tool to just skip everything. i tried a vector of strings, a single string with comma-separated ns's, a vector of quoted namespaces, a vector of namespaces. nothing worked.
12:56jweissbeffbernard: right, a bit too much work just to see a single macro name highlighted :)
12:57beffbernardjweiss: they aren't highlighted already?
12:57jweissbeffbernard: the built in ones are, i want it to highlight one of mine :)
12:57beffbernardTry downloading the latest clojure-mode.el
12:58beffbernardfrom technomancy I believe
12:58beffbernardI'm pretty sure it does highlight macros
12:58jweissbeffbernard: how is that possible without slime? clojure-mode has no way to know what is a macro.
12:58dnolennDuff: extend-type is macro, the & in the sig is unrelated to the fact that protocol fns don't support &
12:59beffbernardjweiss: let me see
12:59technomancyit doesn't highlight macros specially
12:59technomancyamalloy_ would know more about adding forms to the highlighting; he implemneted that
13:00nDuffdnolen: ...not in the signature, but in the example usage.
13:01nDuff...shortening a bit, the docs include as an example: (extend-type MyType Foo (baz ([x] ...) ([x y & zs] ...)))
13:01dnolennDuff: yeah that's misleading should be [x y ...]
13:05jamiiuser=> (defn var [] (Var. (swap! next-id + 1)))
13:05jamii#'user/var
13:05jamiiuser=> (var)
13:05jamiiCompilerException java.lang.NullPointerException, compiling:(NO_SOURCE_PATH:20)
13:05jamiiuser=> (Var. (swap! next-id + 1))
13:05jamii#user.Var{:id 4}
13:05jamiiuser=> (var)
13:05jamiiCompilerException java.lang.NullPointerException, compiling:(NO_SOURCE_PATH:22)
13:06jamiium....
13:06jamiiAm I just being dense or is that weird?
13:06beffbernardweavejester: ping
13:06gfredericksjamii: you want it to make a new var for you?
13:06gfredericksor a better error message?
13:06jamiigfredericks: not a clojure var
13:06jamii(defrecord Var [id])
13:07jamiiI don't understand why calling the function gives a NullPointerException but calling its body works fine
13:07gfredericksjamii: did you (defn var ...) somewhere?
13:07jamiigfredericks: ^^^
13:08gfredericksjamii: why would (defrecord Var [id]) allow you to call (var)?
13:08gfredericksthey are spelt different
13:08jamiiThat was a multiline paste, did you only get part of it?
13:08gfredericksoh yeah
13:08gfredericksuse refheap.com
13:08dnolenjamii: var is a special form, you cannot redef it.
13:08hiredmanalso, since (var ...) is a clojure special form you can never call something named var like that
13:09gfredericksjamii: what dnolen and hiredman just said is what I was getting to
13:10jamiiOh 'var' is a function which I defined but '(var ...)' is a special form.
13:10jamiiI wondered about keywords but I thought it was ok at first because
13:10jamiiuser=> var
13:10jamii#<user$var user$var@329f14c3>
13:10jamiiThanks
13:11gfredericksjamii: the compiler short-circuits if it sees a special form at the front of a list, no matter what you've def'd anywhere
13:11jamiigfredericks: Yep, that confused me for a while.
13:15nDuffmefesto: ...by the way, I didn't read you as suggesting everyone define their own EOF, but doing the (def EOF (Object.)) thing seems unnecessary when we have ::EOF
13:21TimMcnDuff: (Object.) is a better sentinal because it is *impossible* for another non-`identical?` copy to appear in a data stream.
13:24gfredericksTimMc: and statically typed languages are better because it is *impossible* to call a function with the wrong type
13:24the-kennyIt's really annoying when the functions of the same protocols differ for Clojure and Clojurescript.
13:24the-kenny(Example: ILookup: valAt vs -lookup
13:25dnolenthe-kenny: except Clojure on the JVM isn't built on protocols - it's built on Java Interfaces.
13:25the-kennydnolen: Yeah, I know
13:26the-kennydnolen: I just think the implementations should match as much as possible. I'm currently cross-compiling a "big" codebase and want to replace a defrecord with a custom defprotocol overriding ILookup, Indexed and some other stuff
13:27gfredericksTimMc: (just trolling)
13:27TimMcgfredericks: (I know)
13:27TimMcI'm more awake now.
13:27dnolenthe-kenny: it would be nice, but I think many of the decisions in CLJS are about getting Clojure "right".
13:28dnolenthe-kenny: you might want to take a look at the library cljx that lynaghk` created
13:29lynaghk`dnolen, the-kenny: right now there aren't any rewrites for protocol implementation names, though I'd like to have that functionality in the future. I'm not sure if it's possible using the core.logic rules or if there will need to be another matching system.
13:30the-kennydnolen: Thanks, I will
13:30the-kennydnolen: Oh btw. your familiar with Closure? My team ran into a few problems with data-attributes at a hackathon last weekend
13:31dnolenlynaghk`: btw, I think I've got the foundation for big improvements across the board for ClojureScript.
13:31dnolenthe-kenny: I don't use the Closure much, pretty much all my CLJS work is on the compiler
13:31lynaghk`dnolen: wooooo! I spent four hours sketching out a profiling system yesterday, btw.
13:32dnolenlynaghk`: nice we really need a comprehensive set of benchmarks to track performance / regressions
13:32lynaghk`dnolen: I will try to get it polished up and out the door in a usable state early next week.
13:32the-kennydnolen: Hm ok, nevermind then. Closure was just silently discarding calls to set attributes with a data-prefix
13:32dnolenlynaghk`: with pretty graphs in C2 I hope ;)
13:32lynaghk`dnolen: definitely
13:32dnolenlynaghk`: SWEET
13:33lynaghk`dnolen: what would the architecture look like, by the way? I sort of punted on long-term data storage and comparison across cljs revisions. Right now you tag bodies of code in cljs or js and it stores the results in localStorage
13:33dnolenthe-kenny: like a bug in Closure?
13:33lynaghk`so you can reload the browser a few times to do multiple runs, then open up "viewer.html" and see the output.
13:33the-kennydnolen: Yeah. We didn't have the time to track it down, but it was REALLY annoying
13:34the-kenny(We used jquery as a quick hack)
13:34dnolenthe-kenny: strange - I'd like to move to a newer version of Closure (we're almost a year out of date) but someone needs to provide a comprehensive fix for browser REPL.
13:35dnolenthe-kenny: reproducible bug reports always welcome.
13:35dnolenlynaghk`: why not just dump a Clojure data structure to a file that can be loaded?
13:35the-kennyI'm pretty sure it was a Closure Bug. Might be documented behavior, we didn't check
13:35lynaghk`dnolen: any interest in tag-teaming a talk/session on clj/cljs interfaces at StrataConf in October NYC, btw?
13:36lynaghk`dnolen: too annoying to try and dump a file from the browser. What's in localstorage is just an array of maps though, so it wouldn't be too difficult to add new keys and serialize for more serious analysis if needed
13:37mdeboardemacsexpertsexchange.com
13:37dnolenlynaghk`: haha, I'm not sure I could talk that much about CLJ/CLJS interfaces (if by that you mean UI)
13:37dnolenlynaghk`: true, I'm just thinking it would be nice to be able to share performance profiles somehow ...
13:37the-kennydnolen: What's broken in browser REPL?
13:37clojurebotyou mean clojure.main
13:38dnolenthe-kenny: http://dev.clojure.org/jira/browse/CLJS-35, http://dev.clojure.org/jira/browse/CLJS-161
13:38dnolenthe-kenny: I mean we're not going to move to a newer version of Closure until these tickets get resolved.
13:39the-kennyah
13:39lynaghk`dnolen: I'm sure you could talk about the expressiveness of Clojure, power of declarative programming, &c. &c. I've got a few full-stack clojure/clojurescript projects that strataconf folks would probably eat up.
13:39dnolenlynaghk`: I'm up for it!
13:39lynaghk`dnolen: boss. I'll throw something together this evening and send it your way. Maybe we can skype or phonecall sometime tomorrow?
13:40dnolenlynaghk`: sounds good.
13:41lynaghk`dnolen: we could submit a tutorial, or if you think we could round up jashkenas, mbostock, and hadley maybe we could do a straightup panel.
13:44dnolenlynaghk`: that could be fun!
13:45pandeirois it possible to write a function that could used to 'autoload' a set of dependencies' vars into the current slime ns?
13:46hiredmanrequire?
13:46the-kennyJust send a require call trough the repl
13:46pandeirohiredman: to be able to use them unqualified?
13:46the-kennyuse, then.
13:47pandeiroyeah (defn load-deps [] (use 'foo)) doesn't work, should it?
13:49pandeirogah dunno why it wasnt working before, nm
14:05_KY_I want to read a clojure object from a string using "read-string" and know where the object ends within the string, any clue?
14:06technomancy_KY_: maybe call subs on the string?
14:07_KY_But sometimes the clojure object changes its appearance
14:07_KY_For example, with "quote" and [1,2,3,4] ==> [1 2 3 4]
14:08robertstuttafordcemerick: LOVING this cast
14:08S11001001_KY_: make your own pushbackreader, pass it to read, and see what's left in the stream after read returns
14:08robertstuttafordconter clockwise rocks. sold.
14:09cemerickrobertstuttaford: glad it's working for you :-)
14:10robertstuttafordi just love how little code you're writing
14:10robertstuttafordcompared to gclosure (sure, different sorts of things, of course), it's miles apart
14:10_KY_Does counterclockwise use lein?
14:10antares__KY_: it does
14:10robertstuttafordit doesn't need to, from what i can tell
14:10antares_at least there is an option to use lein from withing ccw
14:11cemerickit's an optional thing; the beta support plugin is solid though
14:11cemerickyou can use maven or manage everything manually if you're a masochist, I suppose
14:11_KY_S11001001: so I push back my string to a stream...?
14:13nDuffTimMc: certainly, but I'm not sure that protecting people from themselves when they're purposely bypassing safety mechanisms (in this case, namespacing) is a concept I can get behind.
14:13TimMcnDuff: What's the context on this, then? I can envision accidental collisions.
14:14nDuffTimMc: for ::EOF (in this case, :com.mefisto.wabbitmq/EOF)?
14:15robertstuttafordthe ccw leiningen support. is it an eclipse plugin in the marketplace?
14:16TimMcnDuff: I mean, what is the nature of the data being streamed?
14:21TimMcAlso, is there any possibility of attack? Do you always control the nature of the data flowing through the system, or can a third party choose it?
14:22TimMcReally, my main concern is cognitive load -- if you use a proper sentinal, you don't have to think about any of this.
14:22gfredericks(inc TimMc)
14:22lazybot⇒ 5
14:24TimMcThe only downside I know of to (Object.) is that it doesn't support serialization. I think a randomly generated string could be an effective sentinal, a la MIME boundaries.
14:24mefestoTimMc: it would be used in the context of a BlockingQueue (as the terminator) so this value wouldn't be serialized
14:25mefestoI think either approach would work. (Object.) is just the way I've always done it
14:25_KY_How can I create an instance of this: http: ? docs.oracle.com/javase/6/docs/api/java/io/PushbackReader.html ?
14:25nDuffTimMc: Makes sense. In my particular use case, the data will always be packaged by my own code even if it originally came from elsewhere, but that's not necessarily universally guaranteed.
14:25gfredericks_KY_: (java.io.PushbackReader. ...)
14:26_KY_http://docs.oracle.com/javase/6/docs/api/java/io/PushbackReader.html ?
14:26TimMcnDuff: I hear you on that.
14:26gfredericks(deftype Sentinal [name])
14:27TimMcheh
14:27TimMcI don't think it's bad to use ::EOF in your own code, when you control the data. I just object to it being used as a default in a lib.
14:28sattvikibdknox: Just noticed yout got a 10K supporter: nice.
14:28achenghi :) if I have a string that contains the name of a variable (like "foo") can my code redefine the root binding of the variable? the following doesn't seem to work for me: (def (symbol "foo") 5)
14:28nDuffHmm. If the library is extensible enough that others could implement its protocols, you'd need to export the sentinel object, and be open to exactly the same form of attack...
14:28nDuff...though that doesn't really apply in the immediate case.
14:28ibdknoxsattvik: yeah, an interesting one at that. :)
14:29gfredericksacheng: I think what you're trying to do is change the root binding of a var
14:29gfredericksso you need to get the var
14:29ibdknoxsattvik: I don't want to make an official announcement til I talk with them first
14:29S11001001_KY_: pushbackreader is required for a read call, and stringreader adapts a string to the reader interface with position-state
14:29ibdknoxI know of a few others that should come in soonish as well
14:30gfredericksacheng: for day-to-day things that is a messy and ill-advised thing to do
14:30_KY_S11001001: do I need to create a Reader instance first?
14:30sattvikibdknox: Sounds great. I'm considering whether or not to up my contribution. It seems like you have a good chance of making your 200K.
14:31S11001001_KY_: er, yeah?
14:31ibdknoxsattvik: it seems pretty likely, yeah :)
14:31_KY_Oh, you mean create a StringReader and feed it to PushbackReader?
14:32achenggfredericks: but I wants it! :-P I'm trying to create an interactive web test framework. if the code discovers that some html element locator is obsolete, I want it to help the tester discover a working locator so tests can continue.... and redefining the var for all running code would work for my case
14:32gtrakibdknox do you talk about dealing with side-effects in lighttable yet? I'm curious about it
14:33_KY_Sounds very complicated....
14:33S11001001it's really not
14:33gfredericksacheng: yeah if you're doing something meta like that it's probably justifiable. Check out the ns-resolve function
14:33achengok
14:33S11001001however, you will probably want to create a unit test for your function that asserts that the post-expression whitespace consumption is exactly what you mean
14:34S11001001(see READ and READ-PRESERVING-WHITESPACE in the Common Lisp spec for an explanation)
14:35dnolenibdknox: wow!
14:36_KY_How exactly to create a PushbackReader?
14:36TimMc_KY_: gfredericks showed you, above
14:36ibdknoxgtrak: nope, my thought is that the normal caveats that apply to a repl apply here as well. But I have some neat ideas about how that could be taken care of in a relatively clean and simple way
14:36ibdknoxdnolen: :)
14:36TimMc14:16 < gfredericks> _KY_: (java.io.PushbackReader. ...)
14:37_KY_So I create a new Reader inside that?
14:38TimMcOr pass it one.
14:38TimMc(PushbackReader. foo) where foo is another Reader
14:38achenggfredericks: hmm... def does not like its first argument to be a return value from ns-resolve
14:39robertstuttafordhow do i get ccw/eclipse to complete ([{ for me?
14:39ibdknoxgtrak: one way I was thinking about handling it was through a cool way of saying something is mocked in that context
14:39gtrakibdknox: yea, it's interesting, pure functions are easy
14:40gtrakhadn't thought about mocks, that could make sense and encourage a good programming style anyway
14:40ibdknoxgtrak: to be honest, while the "coolest" I think that'll be one of the least valuable feature across all the languages.
14:41ibdknoxjust wait til you see the demo I have for the week before :)
14:41gtrakbefore the kickstarter deadline? :-)
14:42ibdknoxyeah
14:42ibdknoxit involves that verbose snake language ;)
14:42gtrakexciting
14:42gtrakpython you mean
14:43ibdknoxyeah
14:43mdeboardibdknox: Well you know how to raise money, aiming for Python
14:44ibdknoxmdeboard: the goal is two-fold: prove that it works for a "real" language (the masses are dumb :p) and hit a larger audience
14:44_KY_Shouldn't I write (new java.io.PushbackReader)?
14:44mdeboardYeah nothing wrong with that
14:44robertstuttafordnot dumb, ignorant :)
14:44ibdknoxhaha fair enough
14:44robertstuttaforddon't know many stupid python developers
14:45gtrakactually python is still a hard sell to the masses
14:45mdeboardrobertstuttaford: Come over my way, I'll introduceyou.
14:45robertstuttaford-grin-
14:45robertstuttafordhaving said that, i only know like one or two and they're total polyglots
14:45ibdknoxgtrak: Java would've been the best, also one of the hardest
14:45ibdknoxand probably the least valuable really
14:45ibdknoxthe python crowd will be much more receptive to these sorts of things
14:46gtrakdynamic langs are much more amenable to being dealt with in terms of text
14:47sattvikYeah, Light Table would have an awfully hard time competing with the likes of Eclipse for Java.
14:47ibdknoxyep
14:47ibdknoxnot worth it :)
14:51felideonno point anymore!
14:51pooya72ibdknox: wouldn't a week before the deadline be to close to the deadline? for the python demo...
14:51ibdknoxpooya72: based on previous kickstarters, no
14:51ibdknoxmost people decide within a week whether or not it'll be worth it
14:52felideon(i kid, i have no nrepl.el fork)
14:52ibdknoxthe key is for me to get it to as many people as I possibly can. If the demo is cool enough, that should happen somewhat on its own
14:52pandeiroibdknox: do you have any trick for finding syntax errors when using noir's automatic view ns loading?
14:53ibdknoxpandeiro: you usually get a stack on the first load
14:53pandeiroi am getting 'Parameter declaration hiccup.core/html should be a vector' but no lead where in my views it is
14:53ibdknoxpandeiro: if you just save the file again and refresh you should see the trace
14:53pooya72ibdknox: yeah, good luck with it! glad you did the market research...
14:54ibdknoxpandeiro: do you have a defpartial without a [] in it?
14:54ibdknoxpandeiro: that's what that probably means
14:54pandeiroibdknox: nice
14:55pandeiroahh no i was trying to use defpartial with multiple arities
14:55pandeiroyou can't do that? :)
14:56ibdknoxah, no, unfortunately it's not that smart
14:56pandeiroi also noticed recently defpartial also can't have a docstring... am i crazy for wanting to do that?
14:57ibdknoxpandeiro: not at all, I think there's a magic macro somewhere that gives you the base stuff for creating your own specialized functions, but never looked into it - that might make a nice, relatively simple contribution to noir :)
14:58pandeiroibdknox: awesome, i think that might be within my patching abilities :)
14:58robertstuttaforderk. how do i remove a parens with paredit-strict?
14:58robertstuttafordit won't let me kill one
14:58gtrakI always use M-s for that
14:58dnolen_mmarczyk: did you see my notes about satisfies?
14:59carllercherobertstuttaford: unbalanced??
14:59lazybotcarllerche: Definitely not.
15:00robertstuttafordnot unbalanced. thanks gtrak
15:00TimMcah, splice?
15:01achengrobertstuttaford: if unbalanced and in emacs with paredit, you can set the mark, highlight, then cut.
15:01gtrakyea, that's like pretty much all I know how to use at this point :-), M-s and C-Right and C-Left
15:01TimMcgtrak: M-x paredit-convolute-sexp
15:01TimMcLearn it. Live it. Love it.
15:01robertstuttafordum. i'm using eclipse
15:01carllerchegtrak: what i did to learn paredit was read the docs for every emacs function that started w/ paredit-*
15:02gtrakcarllerche: yea, I tried to learn emacs top-down once, haha, doesn't work for me
15:04gtrakconvolute sexp? wtf is that
15:04TimMcHard to describe. Basically, it allows you to turn a nested expression inside out.
15:04gtrakha
15:05TimMcgtrak: If your point is at the beginning of line 12, here: https://refheap.com/paste/666#L-12 ... then that command puts the let outside the for.
15:05gtrakI see, so I could be somewhere within a sexp and decide I need a 'let', just type it and convolute?
15:06TimMcSure, that could work. I've only used it where the nesting is already backwards. :-)
15:06gtrakthat is pretty nice
15:06amalloyconvolute is the best, man
15:06amalloy(fn [x] (let [y] ...)) => (let [y] (fn [x] ...))
15:07amalloyoh, TimMc already showed that. links are no fun to click on
15:07gtrakI bet there are some gymnast paredit users out there
15:08achenghm. so how can I either change the root binding of a var or reset! an atom if all I have is a string that contains the name of it? neither of these work for me... (def (ns-resolve *ns* (symbol "foo")) new-value) .... (reset! (atom (ns-resolve *ns (symbol "foo"))) new-value)
15:09gtrakthe name of it being the var bound to it?
15:09amalloythat sounds a lot like a thing you shouldn't really want to do. why do you have a string representing a var you don't know what it is?
15:09achengsee 18:22
15:10amalloyi wasn't here and am not in your time zone anyway...?
15:10achengI'm trying to create an interactive
15:10acheng web test framework. if the code discovers that some html element
15:10acheng locator is obsolete, I want it to help the tester discover a working
15:10acheng locator so tests can continue.... and redefining the var for all
15:10acheng running code would work for my case
15:11amalloyi dunno. still sounds like a bad idea to me, but the function you want is alter-var-root
15:12achengwhat is the better idea?
15:12amalloyi don't really understand what you're trying to do, so feel free to ignore my vague prejudices
15:15achengthis is for when a test that is driving a web browser tries something like (enter-text element-locator "hello") and the value for element-locator is now incorrect since some developer changed the web page a bit... my framework would pause the test and let the tester poke around and find the new locator... the alternative (which the rest of the selenium world lives with) is that the test dies, you get a stack trace, the browser and the
15:15achengpage are gone and the tester has to manually get to the same point in a new browser before he can poke around
15:18acheng(did i just kill the ambiance?) :-P
15:20_KY_PushbackReader can only unread an integer, doesn't accept a Clojure string, what's wrong?
15:22TimMcacheng: Sounds like a condition system.
15:23achengTimMc: sure. once the tester knows the right value to use for element-locator, is there something better i should do instead of just changing the root binding for all running threads to use?
15:25achengright now these locators are vars (instead of items in a map) so that the tester has symbol completion in emacs when hand-editing tests
15:26TimMcSounds like you want something threadsafe, though.
15:26_KY_Ok.. I figured I have to use (char-array)... problem solved
15:26achengwhy threadsafe? these locators are basically supposed to be correct constants for all threads to use as constants.
15:27solussd__does clojure 1.4 still depend on java 1.5 ?
15:27achengthe rest of the selenium world has x % of all their tests fail simply because some element locator was wrong.
15:27jonaskoelkerwhat's the go-to parser generator for clojure?
15:30achengTimMc: so if i have 5 threads and 3 of them pause because of the same incorrect element locator, i can fix the locator for all threads and tell each one to try their currently failed test step again. thread safe doesn't quite sound like the right thing for my use case
15:30antares_solussd__: clojure 1.4 should still support Java 5 as far as I know
15:31solussd__excellent. I thought I remembered reading somewhere it targeted 1.6, but maybe not.
15:31solussd__
15:31TimMcacheng: Hmm, you might be able to get away with that. :-)
15:32TimMcacheng: I wonder if you can work a watcher in there somewhere.
15:32achengTimMc: yes, but if there is a better way that doesn't go against people's instincts, then i shouldld consider it. hm... watcher...
15:32dnolen_jonaskoelker: not sure if there's a goto lib for that. https://github.com/richard-lyman/amotoen looked promising but hasn't been updated in 4 months.
15:34hiredman /win 15
15:35hiredmanpardon me
15:35_KY_S11001001: thanks, your solution is ingeneous =)
15:36S11001001_KY_: you're welcome, and congrats on implementing the generalization of read-string
15:41fdaoudibdknox: I showed LT to a friend of mine and he said, "meh." Can't win 'em all, I guess. BUT he thought it was really cool that you met Sussman. Go figure :)
15:42fdaoudwhat does ibdknox mean, by the way?
15:42achengTimMc: I think I'll be ok without a watcher. All threads should use the new value and they don't need to know that it's new. (But if it sounds like I'm missing something, I'm all ears)
15:52felideonfdaoud: I said 'meh' until I tried setting up a Clojure environment. :D
15:52pandeirois it possible to expand a sequence into separate forms?
15:53amalloyif i've understood the question, pandeiro, no
15:53pandeiroamalloy: and i also can't do something like (apply fn [params body]) right?
15:54mefestonDuff: ping
15:54raekpandeiro: you can rewrite the expression in arbitrary ways using a macro
15:55LicenserI am so torn apart, I have a project in clojure that compile to node.js but the whole compiling to node is a horrible (especially since the environment I deploy it is very restricitive) thing and node's stuff isn't fun either (gazillion callbacks). So I am pondering of rewriting the code in erlang but then agian it is often so beautiful to write in clojure -.-
15:55fdaoudfelideon: depends on the environment you tried to set up..?
15:55pandeiroraek: yeah i thought about destructuring but there could be a variable number of items in the seq, not sure how to do it
15:57raekpandeiro: can you show an example of what your input is and what the desired result is?
15:57raekbut yes, you cannot apply special forms and macros
15:58felideonfdaoud: slime+emacs with an existing slime config
15:58emezeskeLicenser: What's so hard about compiling clojurescript to node?
15:59gtrakhow can you reference the 'class' of a record without importing it?
15:59felideonfdaoud: granted, I had no idea who Chris Granger was and it was just a blog post. when I saw he was serious and had a track record then my interest was piqued.
15:59pandeiroraek: i am thinking about how to get all of fn/defn's argument parsing goodness (multiple arities, docstrings, meta) with a custom function defining macro
15:59fdaoudfelideon: ah. I set up vimclojure using https://github.com/daveray/vimclojure-easy, nice.
16:00nDuffmefesto: pong
16:00Licenseremezeske that error messages are cryptic, the code is close impossible to debug if something goes wrong in runtime, and it seems node.js programmers get payed per callback function not per hour
16:00Licenseralso bundeling all the required libraries with the project is a hackery
16:00emezeskeLicenser: Oh, so it's not compiling that's the problem, it's after that
16:00raekpandeiro: so you want something like (my-defn <whatever>) to be equivalent to, say, (def (some-operation (fn <whatever>)))?
16:00Licenseremezeske unless somethign goes wrong during the compilation :)
16:01dnolen_Licenser: you could submit a patch to add source mapping to ClojureScript ;) then you could debug your running node.js app w/ a browser
16:01amalloypandeiro: clojure.tools.macro/name-with-attributes
16:02dnolen_Licenser: also you could adapt cjfrisz TCO code to do gen callbacks automatically.
16:02Licenserdnolen_ I would if I had 42 hour days!
16:03Licenserbut I first would patch in something like line number/file names in compiler errors :P
16:03dnolen_Licenser: that's what source mapping does.
16:03Licenserthere is nothing like searching 42 (the number isn't made up :P) source files for a syntax error
16:04gtraklikewise, how do you extend a protocol to a record in another namespace?
16:05Licenserdnolen_ doesn't source mapping applie to run time code?
16:05dnolen_Licenser: yes, are you talking about ClojureScript compile time errors?
16:05Licenserdnolen_ both
16:06LicenserException in thread "main" java.lang.IllegalArgumentException: let requires an even number of forms in binding vector <- for example
16:06Licenserit would really be cool to see where :P
16:06dnolen_Licenser: patch
16:07Licenserthere we are with the time problem again
16:07dnolen_Licenser: if you use CLJS master, I've included file + line number for some common mistakes.
16:07Licenseroh that is cool
16:07mefestonDuff: been playing around with a few ideas. could i get your opinion on something?
16:07dnolen_Licenser: you're probably wasting more time hunting errors.
16:08Licenserheh there you might be right
16:08danielmaybe someone here can help me with this http://stackoverflow.com/questions/10435310/ray-attacks-on-a-bitboard
16:09Licenserbut the compile time errors are just very frustrating not time consuming :) paredit / compiling often is a good way to protect against them most of the time
16:09dnolen_Licenser: so you can subject yourself to those frustrations over and over again or do something about it.
16:10Licenserdnolen_ I hate to admit but you are right about that
16:10emezeskeLicenser: So your options are cljs on node, or erlang, but not just regular old clojure?
16:10Licenserdevn that is a good plan
16:11gfredericksdoes implementing the rules of chess in core.logic sound totally insane?
16:11devnheh
16:11devngfredericks: not really
16:12gfredericksokay.
16:12Licenseremezeske I am working on something for SmartOS (the hypervisor part) and I don't want to demand extra dependencies. cljs was my first pick since a lot of the libraries there are already written in node, also I don't require extra dependencies safe for packing a directory with some additional libs. Erlang would be a choice since I write some other parts of the code in erlang already and also OTP applications bundle in a senfcontained manner -
16:12Licenser not forcing any kind of dependencies
16:12fdaoud gfredericks: "N-Queens problem? Too easy!"
16:12gtrakhmm, it seems rather warty that have you to java-import a record to extend a protocol to it
16:13devngfredericks: http://www.fraber.de/games/chess/
16:13gfredericksfdaoud: I'm interested in running chess backwards
16:13fdaoudgfredericks: "mate check! .... .... ... e4 to pawn."
16:13daniellol
16:14gfredericksfdaoud: I'd like to be able to concoct bizarre positions and ask the computer if they are possible to reach
16:14fdaoudgfredericks: oic, that's interesting
16:15amalloygtrak: you have to java-import a record to do anything at all to it, so...
16:15emezeskeLicenser: I see. One thing I'd throw out there is "lein uberjar"; AFAIK it makes a totally self-contained thing that you can just run with java. Maybe not feasible for your situation, though.
16:15gfrederickse.g., I wonder if it's possible to swap the positions of the two sets of pawns
16:15Licenseremezeske yea true, but it still requires me to deploy java with it
16:15gtrakamalloy: well we have factory functions now
16:16Licenseralso clojure combines the disadvantages of erlang and clojurescript /in this case/ (as silly as it sounds) it brings some advantages over clojurescript too true
16:16gtrakyou just need to require the ns to use the factory function
16:16gfredericksgtrak: would you like if (defrecord Foo []) included a (def Foo-type Foo)?
16:16gfredericks(would that work?)
16:17fdaoudgfredericks: cool, so to test your solution, any given problem from a chess book that refers to a game that really took place, should work with your program.
16:17gtraksomething like that, or just maybe (def Foo Foo)?
16:18gfredericksfdaoud: yep; and certain situations you can prove to be impossible should not work, in some manner or another
16:18gfredericksgtrak: oh hmmmmmmm; that looks real weird but maybe would work.
16:18dnolen_Licenser: http://dev.clojure.org/jira/browse/CLJS-237
16:18gfredericksprobably would screw a lot of things up though
16:18gtrakI just get annoyed it screws up my M-. nav to use java imports
16:19gtrakplus it's just gross
16:19dnolen_Licenser: looking more closely it looks like *ns* is not being communicated to the various macros.
16:20LicenserOi
16:24gfredericksI'm not sure I get why the conde clauses are considered to have a "head" and a "tail"
16:24gfrederickswhat makes the head different from the remaining parts?
16:25dnolen_gfredericks: it makes a difference when using conda|u
16:25gfredericksdnolen_: but not conde?
16:26dnolen_gfredericks: yes, makes little difference there.
16:26gfredericksare conda|u part of minikanren? I'm now wondering why the reasoned schemer makes the distinction
16:26dnolen_gfredericks: it does
16:26dnolen_gfredericks: conda|u are described in TRS
16:26gfredericksokay; sense has been made; thx
16:34Raynesibdknox: Dude! You're 30 thousand away.
16:34RaynesIf you don't make it at this point, the world is not fair.
16:35dnolen_Licenser: fixing now
16:35ibdknoxRaynes: it's very unlikely it doesn't :)
16:35Raynesibdknox: Someone pledged 10k!
16:36ibdknoxyeah, hopefully I'll announce them tomorrow :)
16:36fdaoudRaynes: if he reaches $200,005 and stops there, I'm reducing my contrib by $10 at the last second.
16:36Raynesfdaoud: lulz
16:36dnolen_Licenser: BOOM, https://github.com/clojure/clojurescript/commit/29b85c289feaac6b4feca91e24d08cdc88ea7da1
16:37Licenserdnolen_ sweet :) you are great and I feel ashamed
16:37dnolen_Licenser: make sure you use Clojure 1.4.0 in your project
16:40TimMcgfredericks: There are also "implausible" situations -- board positions that are reachable if the two players cooperate, but will never happen because they involve one or both players opening themselves to attack.
16:41TimMcSo you'll want to implement a crude chess AI in core.logic as well.
16:41gfredericksTimMc: those I'm not interested in distinguishing from reachable
16:41gfrederickssince there's no firm definition there
16:42TimMcSo, as long as no one moves into check or whatever?
16:42gfredericksany legal sequence of moves, right
16:42TimMcDoes chess allow passing on a turn?
16:42gfredericksprogramming chess involves a lot of edge cases :/ a move can almost always be represented as a pair of squares
16:42gfredericksTimMc: nope
16:42gfredericks$google chess zugzwang
16:42lazybot[Zugzwang - Wikipedia, the free encyclopedia] http://en.wikipedia.org/wiki/Zugzwang
16:43TimMcYou could probably explain that term to me before WIkipedia loads.
16:43gfredericksit is a position where you'd prefer passing if that were legal
16:43technomancyI've been wanting to finish up a go implementation since clojurewest
16:44gfredericksI bet go rules are a lot simpler than chess rules
16:44TimMchella yes
16:44TimMcYou can play Crosscram instead. :-P https://github.com/baznex/crosscram
16:45TimMcSome of us at BAZNEX have been writing bots to compete at that game.
16:45fdaoudgfredericks: zugzwang, that's interesting.
16:46gfredericksfdaoud: the Trebuchet shown in that article is what I think of as the canonical example
16:47gfredericksmaybe just because it's easy to remember
16:49gtrakwhen we say local extension of protocols, does that mean only for your namespace, or for all code that you call from your namespace as well?
16:52technomancygfredericks: the cool thing about nearly any board game is that it's just a reduce of the board state over a seq of moves
16:52technomancywhich helps a lot for calculating possible move trees, etc
16:53gfrederickstechnomancy: it's determining legality that gets hairy
16:53technomancytotes
16:53technomancyI guess with ko you have to keep one past board state when calculating the legality of a move
16:53gfredericksmostly it's a few weird moves and also the logic of check
16:54technomancyplus you have to have access to the past move to detect two successive passes for endgame
16:54gfrederickstechnomancy: is this go? or something called "ko" that I haven't heard of?
16:54technomancyko is one of the rules of go
16:55technomancyhttp://en.wikipedia.org/wiki/Go_(game)#The_ko_rule
16:55Raynesamalloy is better than me at Go. :(
16:55gfredericksxmonad will not let me select that link
16:55RaynesHe forced me to play him several games at the Conj. I
16:55Rayneslost all of them.
16:56gfredericksI guess I can google it
16:56RaynesI went to my room and cried into a pillow.
16:56technomancygfredericks: xmonad or your irc client?
16:56gfrederickstechnomancy: something between xmonad and urxvt
16:56amalloyyou did that every night, though. i just tried to cheer you up afterwards with go
16:56RaynesHis IRC client unless xmonad took away his mouse.
16:56gfredericksI cannot select anything in the urxvt window
16:56technomancygfredericks: are you using urxvt-perls?
16:56mmarczykdnolen_: yeah, I've seen your comments -- will try and act on them too :-)
16:56technomancygfredericks: highly recommended
16:56gfrederickstechnomancy: is that a debian package?
16:57technomancygfredericks: I'd link you to the github page, but you know... chicken/egg
16:57fdaoudRaynes: and while you cried, amalloy ate a pint of bacon in victory.
16:57amalloytechnomancy: i think a lot of board games are a reduce of the board over a seq of moves...except most games have one or two niggling exceptions that ruin everything
16:57technomancygfredericks: url-select in particular
16:57technomancyamalloy: yeah, I think you can handle most exceptions by putting metadata on the board
16:58gfrederickstechnomancy: k cool thx for the tip
16:58gfredericksthe chess FEN notation has a few extra pieces of information to capture the niggling exceptions
16:58amalloymetadata doesn't feel right, since most cases will need the metadata every time; i'd rather reduce over a map, one of whose keys is the board
16:58gfrederickse.g., who is allowed to castle
16:59gfredericksamalloy: that's how I'm doing it. a position has a board
16:59technomancyamalloy: the cool thing about reducing over the board is that if the board's big enough then pprinting it is all you need for display
16:59technomancyvery convenient in the repl
17:02gfrederickstechnomancy: probably a lot of the niggling things aren't typically displayed
17:03technomancygfredericks: they certainly aren't in a physical game =)
17:03technomancywell, captured pieces would be actually; hmm
17:04gfredericksin chess those aren't relevant
17:07devngfredericks: im jealous of your xmonad
17:07gfredericksit's buggy
17:07devnwha!?
17:08gfredericksI wouldn't uninstall it though
17:08dnolen_mmarczyk: excellent
17:08gfredericksdevn: there there now, I'm sure it's not technically the proven xmonad which is buggy
17:08devni have never crashed xmonad, but ive seen it behave weird depending on the kind of window and/or get crazy when i tricked out my config with all manner of layouts
17:08technomancyxmonad has no bugs. ghc has proven this.
17:09devnlol
17:09gfredericksdevn: if you have used xmonad then why are you jealous of mine?
17:09devnbecause im on OSX
17:09mmarczykdnolen_: your changes to satisfies? rock, btw
17:09mmarczykdnolen_: the WIP patch rebased onto current master w/ added bool-expr hint actually seems like a perf regression when compared to master :-/
17:10dnolen_mmarczyk: yeah the hasOwnProperty test was a terrible idea and I take full responsibility :)
17:10gfredericksdevn: I'm about to be given a mac at the new job; will look into installing linux on it and installing a tux sticker over the apple logo
17:10mmarczykdnolen_: :-)
17:11devngfredericks: ha :)
17:12technomancygfredericks: I was using xmonad/debian on a vbox on a macbook for a few days and I could never get over having meta in the wrong place
17:12gfrederickstechnomancy: you could not rebind the keys?
17:13technomancyI couldn't figure out how to do it in OS X, but you could probably do it just inside the VM
17:13technomancyI guess you can retrain your thumb if it's the only machine you're using though
17:13mmarczykdnolen_: so if I understand correctly, the next step is to change protocol methods to do the bit-and thing like satisfies? does? the consumer-facing wrappers (seq, first etc.) already do nothing except nil check & delegate
17:13gfredericksthat would not be the case
17:13hiredmanmy brain rebels against the idea of getting a non-apple laptop, then I think I just need emacs and a browser, then I remeber I am using a bluetooth headset to listen to music, and the back and forward buttons on the headset "just work" and wonder how many hours that would take
17:14lynaghk`technomancy: you seem to hack the hardware a lot. Any interest in taking a month or two sabbatical from work to CNC the ultimate laptop out of bamboo + eInk?
17:14dnolen_mmarczyk: I don't think protocol methods can benefit.
17:14gfrederickshiredman: gotta pick your battles; can't be an idealist about everything
17:14technomancylynaghk`: you should have caught be before I got a new laptop yesterday =)
17:14dnolen_mmarczyk: next steps are just reviewing which things are better implemented by following RT.java's lead.
17:15mmarczykdnolen_: well currently (seq ...) calls actually seem to take a hit
17:15mmarczykdnolen_: (seq ...) being just (when coll (-seq coll))
17:15hiredmangfredericks: and listening to daft punk on a wireless headset is the most futuristic thing in the world
17:15lynaghk`technomancy: this one would be a year or two out anyway.
17:16lynaghk`technomancy: bamboo + aluminium + eInk. Kickstarter will flip its shit =P
17:16technomancyrenewable!
17:16mmarczykdnolen_: but yeah, I'll try benchmarking the RT-like reimpl of first & a few other fns
17:17TimMcOnly if it is farmed bamboo.
17:17TimMcIsn't China running out of the stuff?
17:17lynaghk`TimMC: each bamboo will be lovingly raised at urban farms in PDX. They will have names.
17:18TimMc:-)
17:18TimMclynaghk`: Has to have the same screen as the XO-1
17:18emezeskelynaghk`: Can I visit the bamboo farm? I want to see where the bamboos are raised
17:18dnolen_mmarczyk: look at RT.java seq
17:18TimMcI've never seen anything else like it.
17:19dnolen_mmarczyk: if we have a seq we don't need to call -seq
17:19mmarczykdnolen_: right, of course
17:20dnolen_mmarczyk: so many code paths will get lighter if we have satisfies? competitive with JS instanceof
17:20mmarczykdnolen_: sounds exciting :-)
17:20lynaghk`emezeske: frequent visitors scare the bamboo! We have fairly-traded team of old Asiatic men that nurture them.
17:20dnolen_mmarczyk: under advanced compilation we can store all the known protocols into partitions of 32
17:21emezeskelynaghk`: hahaha :)
17:21dnolen_mmarczyk: types will store a int value for each partition they belong to.
17:21mmarczykdnolen_: I see what you mean
17:21mmarczykdnolen_: ok, I'll work that into the next patch
17:22jodarofree range organic bamboo?
17:22mmarczykok, need to dash for now, will be back with some new code soon
17:37jodaroheh
17:38jodarothere are no listings on functionaljobs.com
17:38amalloyjodaro: they forgot to make the page mutable
17:38jodaroheh
17:39jodaroi was considering posting one there
17:39jodaroi can't decide if no other listings is good or bad for that, though
17:40jodaroalso, a little bit of pickled ginger with a dab of wasabi that just happens to have some of my sriracha and soy sauce concoction on it ...
17:43madsyStupid question: Why doesn't lazy-seq work together with recur? Clojure tells me that it's not a tail call when it is at the tail position :)
17:44madsyI assume I'm supposed to using actual recursion (by function name), but I'm confused over the semantics vs the syntax.
17:45hiredmanlazy-seq wraps the body in a thunk (0-arg fn) which means recur won't work
17:46TimMc&(lazy-seq (recur))
17:46lazybotExecution Timed Out!
17:50amalloymadsy: you could use lazy-loop: https://github.com/flatland/useful/blob/develop/src/useful/seq.clj#L106
17:54lynaghk`dnolen: @krees from Periscopic just signed on to our lil' party.
17:55lynaghk`er, dnolen_.
17:55Chousukemadsy: if you have a function that constructs a lazy sequence recursively, then you don't need recur for the recursion (and it wouldn't work anyway, since recur is not lazy)
17:55dnolen_lynaghk`: cool!
17:56dnolen_lynaghk`: you know all the cool datavis folks I see :)
17:56lynaghk`dnolen_: do you work with jashkenas? you should invite him---I haven't emailed him yet
17:56Chousukemadsy: that's because if you're using lazy-seq right, calling the function does nothing but return an object representing the rest of the sequence.
17:56dnolen_lynaghk`: I do is there a specific idea behind this panel thing you want to put together?
17:57lynaghk`dnolen_: I'd like to keep it a little closer to the ground w.r.t. actionable tech for people who will be listening
17:58lynaghk`dnolen_: I'm all about big ideas, but I like to be able to have something to bring home and play with at the end of a talk. Personally, I'd be interested hearing about the intersection of data/programming with storytelling and journalism
17:58madsyChousuke: Yep, thanks :)
17:58Chousukemadsy: so when it looks like you're "looping" due to the recursive call you're actually not because no work is done until the thing that the function returns is evaluated
17:59gfredericksis the core.logic API documented anywhere, or do I just look through the source file?
17:59madsyYeah, recur turns into iteration which does't stop until it takes a non-recursive branch. While lazy-seq only does a recursive call based on the realization of the seq.
18:00Chousukeyes, and by the time the evaluation happens the original call has already returned
18:00Raynesgfredericks: In dnolen_'s head, most likely.
18:00Chousukeso there is no stack growth issue
18:04gfrederickscan logic variables represent numbers?
18:05dnolen_gfredericks: very poorly, you want cKanren
18:06dnolen_gfredericks: which isn't for representing numbers relationally.
18:06gfrederickshmm. well I probably don't have to.
18:09rmunnI think what I'm having is a Java issue rather than a Clojure issue per se, but when I do "lein2 run" on my Clojure+SWT project, I get an error: Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
18:09rmunnMy project.clj specifies both [org.eclipse/swt-gtk-linux-x86_64 "3.5.2"] and [org.eclipse/swt-gtk-linux-x86 "3.5.2"] so I should have both 32-bit and 64-bit libraries available
18:10rmunnAny idea why it's not selecting the 64-bit library? This only seems to happen intermittently -- sometimes it runs correctly -- and I haven't been able to pin down a pattern as to when it selects the 32-bit or the 64-bit library. I certainly haven't been changing my project.clj in between invocations of "lein2 run"!
18:10dnolen_rmunn: did you try removing the other one?
18:10dnolen_rmunn: why do you need to specify both?
18:11hiredmanrmunn: most likely both jars define the same classes, so depending on the order they end up in the classpath it loads one or the other
18:11rmunnI was hoping to build a single version of the program that could run on both 32 and 64 bit machines. Am I going about that the wrong way?
18:12hiredmanit's really a swt issue, they may just expect you to build a 32bit and 64bit version of your library
18:13technomancyrmunn: what you want is possible, it's just an issue with the way your dependencies are packaged
18:13technomancythe native support for Leiningen is not well-documented unfortunately
18:15rmunntechnomancy: Any idea how I should be specifying this? I grok Lisp a little bit, but my Java experience is almost non-existent so far.
18:19gtrakmaybe use whatever dependency makes sense for the dev-dependency and then do some packaging tricks at the end?
18:21rmunnOkay, now I'm *really* confused. I just removed the 32-bit dependency lines out of my project.clj (so it now specifies only [org.eclipse/swt-gtk-linux-x86_64 "3.5.2"]) and I'm still getting the same "Cannot load 32-bit SWT libraries on 64-bit JVM" error. Weird.
18:22technomancyrmunn: I'm not 100% sure that the native bits will be removed correctly when a dependency is removed; try an explicit lein clean?
18:22RaynesI'd also like to point out that Swing is pretty approachable since https://github.com/daveray/seesaw.
18:23rmunnNope -- "lein2 clean" followed by "lein2 run" with only the x86_64 libraries in :dependencies is still erroring. This is utterly bizarre.
18:24rmunnI wish I could use Seesaw, but it doesn't yet work with SWT, and Swing just looks too ugly for me to want to inflict its UI on my users. (If I ever get this project finished, that is.)
18:24RaynesSWT isn't ugly? :o
18:24RaynesSwing has a lot of different look and feels that might help.
18:25rmunnAt least it looks native, which I haven't found to be the case even with Swing's allegedly "native" look & feel.
18:25RaynesFair enough, I forgot that SWT used native stuff.
18:25RaynesToo bad they suck at maven.
18:26rmunnMy target audience (if that's the right term) for this project is naive users, who don't care about the internals of the computer but just want to use it as a tool to get work done. So the less distracting I can make my UI (and the more similar I can make it to the other programs they've already learned), the better.
18:27cmcbrideI thought swing could mock a native UI http://www.exampledepot.com/egs/javax.swing/LookFeelNative.html
18:27Raynes"..which I haven't found to be the case even with Swing's allegedly "native" look & feel."
18:28rmunnRaynes: Exactly. I tried the native look and feel, and it didn't look a thing like the rest of the windows on my screen. (Ubuntu Precise with Unity, though I expect most of my users will be running Windows).
18:29RaynesUbuntu with unity looks like shit anyways, so doesn't it fit right in? :P
18:29rmunnI should probably check what Swing's native L&F looks like on Windows before I commit too heavily to SWT, of course.
18:30rmunnRaynes: No kidding. I'd love to go back to GNOME 2, but I do have to support users who will be on Unity, so I'd better use it myself so I know how to answer their "How do I do this task that used to be so simple?" questions...
18:30gtrakmaybe try the qt bindings
18:30gtrakjambi
18:30RaynesYeah, I understand. I'm certainly not criticizing you. Just being silly. :)
18:31RaynesJambi makes REPL development a pain in the ass.
18:31rmunnRaynes: I didn't take it as criticism... though since you couldn't see the big grin on my face as I wrote that, I can see how you could have taken it that way. :-)
18:32rmunnAnyway, back on topic:
18:32rmunntechnomancy: Does Leiningen have a --debug flag that I could use to see more output as I run "lein2 run"?
18:33rmunn"lein2 version" prints "Leiningen 2.0.0-preview3 on Java 1.6.0_24 OpenJDK 64-Bit Server VM", in case you're wondering
18:34rmunnTrying "lein run" (version 1.7.1) instead of "lein2 run" gives me the same java.lang.UnsatisfiedLinkError, too.
18:35rmunnI think I'm going to give up for the day and see if I have any bright ideas in the morning.
18:35gtrakrmunn: if you want to package your own dependency, you can, using maven, not sure if they messed up somehow
18:35rmunnIs this IRC channel logged anywhere, BTW? I'd like to see if anyone comes up with the solution while I'm gone
18:36hiredman~logs
18:36clojurebotlogs is http://clojure-log.n01se.net/
18:36rmunnhiredman: thx
18:36Raynesrmunn: http://www.raynes.me/logs/irc.freenode.net/clojure/
18:36RaynesThese are more greppable.
18:37rmunnRaynes: thanks also.
18:41ieuretechnomancy, Known issue that Clojure 1.3 / contrib 1.1.0 / lein 1.7.1 / lein-swank 1.4.4. don't play well together?
18:42ieureRunning `lein swank' produces Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V
18:42ieureIf you remove contrib from :dependencies it works fine
18:42technomancyieure: yeah, monolithic contrib is hell of deprecated
18:42technomancyclojurebot: contrib?
18:42clojurebotMonolithic clojure.contrib has been split up in favor of smaller, actually-maintained libs. Transition notes here: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
18:42technomancyieure: any particular namespace you're interested in?
18:42ieuretechnomancy, Logging.
18:43technomancyclojurebot: google clojure.tools.logging
18:43clojurebotFirst, out of 21000 results is:
18:43clojurebotclojure/tools.logging · GitHub
18:43clojurebothttps://github.com/clojure/tools.logging
18:43ieureSucks. I heard it was getting broken up but it's non-obvious from googling
18:43technomancyieure: bingo
18:43ieureYeah, I see it now.
18:43technomancyyeah, it's definitely an annoyance, but the old contrib was the Wrong Thing
18:44technomancyold misleading docs are the bane of any high-churn young language
18:46rmunntechnomancy: Yeah, one of my biggest problems in learning clojure has been figuring out on my own where half the stuff is. I'd love more in-depth docs on Leiningen, for example. Not that that's a hint or anything. ;-)
18:47jodaroieure: this was helpful to me re logging
18:47jodarohttp://corfield.org/blog/post.cfm/clojure-and-log4j
18:47technomancyrmunn: what specifically about leiningen? have you read through `lein help tutorial`?
18:47ieureThis has been the single most helpful piece of leiningen documentation: https://github.com/technomancy/leiningen/blob/preview/sample.project.clj
18:48ieureEverything else has been very straightforward.
18:48technomancyieure: also available via `lein help sample` fwiw
18:48ieureBut finding explanations of what stuff can go in project.clj is kind of a pain.
18:48ieureOkay.
18:49technomancyieure: you mean the comments in the sample are too terse, or it's hard to guess what they're called?
18:49hiredmans/log4j/logback/ of course
18:49ieuretechnomancy, No, the sample is fine. Locating the sample is not.
18:50ieureLooks like the situation has improved lately.
18:50technomancyyeah, we should probably mention `lein help sample` in more places
18:50ieureSearch for "leiningen project.clj options" takes you right there.
18:50technomancyyou're probably more likely to refer to it if you don't have to context-switch out of your terminal in some cases
18:53rmunntechnomancy: Missed seeing the tutorial somehow *blush*, so most of my questions will probably be answered there.
18:53technomancyrmunn: open to suggestions on how to make it more obvious if you have any
18:55technomancyieure: actually even just "project.clj" in "I'm feeling lucky" is enough; cool
18:55rmunntechnomancy: The only suggestion I have right now is that lein's way of documenting command-line arguments looks really odd to someone coming to Clojure from another language. It wasn't until I got used to seeing Clojure function definitions that I understood what that "Arguments: ([project-name] [template project-name & args])" line in "lein help new" meant.
18:57ieuretechnomancy, Yeah, I feel like when I have looked in the past I have tried more specific things which return less relevant results.
18:58rmunnOh, and another suggestion. I run "lein help new" and see "Subtasks available: default, template, plugin". This makes me think that "lein help new default" will tell me about the general project template, while "lein help new template" will tell me about the meta-template system. But "lein help new default" gives "Wrong number of arguments to help task", which is unhelpful to a Clojure newbie.
18:59rmunnAnyway, it's almost 6:00 PM here and I should be heading home. So I just wanted to close with thanks for making such a useful tool.
19:01technomancyieure: yeah in general I'm the last person to suggest blindly following google results due to the magnitude of harm that causes with swank
19:02technomancyjust nice that it is improving on this particular metric
19:02technomancyrmunn: yeah, we need to make subtask help work better. that stuff is pretty new
19:03technomancyrmunn: for the args in general though I think following Clojure's conventions for arglists etc makes the most sense. Leiningen's audience by definition needs to know some level of Clojure
19:05gfredericksclojure prereqs: clojure
19:05gfredericks^ this is what is meant by "clojure in clojure"
19:09gfredericks(run* [q] (fresh [x] (== {q 12} {:foo x})))
19:09gfredericks=> ()
19:09gfredericksso logic variables can only be map values?
19:13hiredmangfredericks: that seems kind of odd
19:13gfredericksI was imagining some fuzzy performance justifications for it
19:14hiredmanoh, but actually that makes sense
19:14gfredericksperhaps the concrete-keys case is much more trivial to implement/reason-about
19:15hiredmangfredericks: I don't think what you want there is possible
19:15gfredericksI also considered that but haven't thought of why that might be
19:15gfredericksmy special case ought to be possible, right?
19:15hiredmanbecause the two maps cannot be unified
19:16hiredmanthere is no sort of "toe hold" of similarity to work with
19:17hiredmanI suggest using tuples or calling seq on your maps (to make a seq of tuples)
19:19gfredericksthis wasn't part of a larger thing; I didn't know maps/sets were used, so I was seeing what you could do with them
19:20hiredmanso map is like an ordered set of pairs
19:20hiredmanso the unifier can't tell from {q 12} and {:foo 1} that they are unifiable
19:21gfredericksoh sets are funny too: (run* [q] (fresh [x] (== #{q x} #{4 5})))
19:21hiredman#{[q 12]} #{[:foo 1]}
19:21gfredericks=> (5)
19:21hiredmanit make just call seq on sets (which seems like a bad idea)
19:21hiredmanmay
19:22gfredericksthat would certainly explain that result
19:47hiredmangfredericks: thinking about it it seems like you could unify maps like that, if you unifier could return multiple unifications, but I'm not sure
19:49gfredericksnot knowing much at all about the implementation, it seems odd in the context of core.logic that the unifier can't
19:49hiredmanwhich is not a feature I've seen in a unifier (not that I've seen many)
19:49gfredericksbut perhaps not
19:50hiredmanbut there maybe other tradeoffs for that kind of thing, makes unifying maps much less exact
19:51gfredericksan unacceptably-awfully-performant way to do it would be given two maps, fail if different sizes; then (doseq [m1' (permutations m1)] (== m1' m2))
19:52gfredericksreplace doseq with the logic version :)
19:52hiredmanyeah, you'd get a possibly much larger search tree
19:52gfredericksI only just started on logic programming a week ago.
19:53gfredericksthinking about it, there might be a decent-performing way to get those semantics...
19:54hiredmanit's neat, I played with core.logic a little a few times, but writing the datalog (outside of core.logic) really made the nature of the thing clear, searching a tree
19:55gfredericksI feel like I understand the components well enough, but doing anything non-contrived with them has been not easy
19:57gfrederickse.g., I feel like I ought to be able to write a program which, given a positive integer, returns s-expressions involving only + and *
19:58gfredericksI'm not sure if you can work with numbers that way in core.logic though
20:07FrozenlockI'm playing around with Incanter and notice that some functions use FileOutputStream (seemingly bypassing any binding attempt on *out*). Is there a way to redirect the stream?
20:39FrozenlockHow does one redifine a function from another namespace?
20:40Frozenlock*redefine
20:40gfredericksalter-var-root
20:40FrozenlockI'll try that immediately, thanks :)
20:41ibdknoxtechnomancy: does lein2 not respect ^{:skip-aot true}?
20:42dnolenmmarczyk: I wouldn't bother w/ benchmarking Rhino for this stuff. Rhino is indicative of JS performance circa early 2000s.
20:42technomancyibdknox: not as far as I know
20:42technomancyI mean, if it doesn't, it's a big
20:42technomancybug
20:43ibdknoxhm, I just switched and I'm getting the aot'd compiler mess again :(
20:43mmarczykdnolen: yeah, guess so; just replied to your comment to the effect that I'll be doing some benchmarks on node
20:45mmarczykdnolen: btw, did you have time to look at the 232 & 234 patches? + 225 is a bug fix, I think
20:46dnolenmmarczyk: 232 & 234 I'd rather not apply until the satisfies stuff gets sorted out. It'll only slow things down.
20:47mmarczykdnolen: well, depends on the use case -- the linear helpers actually roll over to the "direct" impl which the current default does not do
20:47mmarczykdnolen: oh, sorry, reduce might actually do that
20:48mmarczykdnolen: but anyway, that's fair enough
20:50dnolenmmarczyk: any call to satisfies? slows down many code paths
20:55wei_I'm having trouble configuring log4j for a java library I'm using - it seems to always send messages to (and clutter up) the console, when I'd like to suppress them or send them to a file. any ideas on configuration? I'm using clojure.tools.logging and clj-logging-config.
20:55cshellwhat's in your log4j.properties?
20:58mmarczykdnolen: so do you think the satisfies?-based versions can be made to be faster than extend-type default ?
20:58wei_clj-logging-config does the job of a properties file I believe, and I have (set-loggers! :root {:level :error :out "/tmp/errors.log"}). going to try additivity: false so my included library doesn't inherit any settings..
20:59dgrnbrgHow do I determine is a symbol is namespace qualified?
20:59mmarczyk&(namespace 'foo)
20:59lazybot⇒ nil
21:00leo2007lein help does not show swank as a task? do I need to install a plugin for that?
21:00dnolenmmarczyk: what do you mean?
21:02weavejesterleo2007: Yep, there's a plugin called… swank-clojure I think...
21:03weavejesterleo2007: Oh, the plugin itself is called lein-swank
21:03weavejesterleo2007: https://github.com/technomancy/swank-clojure
21:03mmarczykdnolen: well, if a protocol doesn't have a default impl, then either every type which it might make sense to call the related functions on should implement it (ICounted on LazySeq, say -- breaking the currently stated contract of ICounted, which of course could be changed) or the client-facing function needs a satisfies? check to see if it should delegate to -method or use some default approach
21:04leo2007weavejester: thanks, I just found it on clojars, lein-swank. I got swank running already but was using something swank-clojure installed in .lein/bin
21:05dnolenmmarczyk: protocol dispatch will never be as fast as a bit test via satisfies?
21:05dnolenmmarczyk: we need to move tests above dispatching via protocols.
21:07dreishSo is there just no longer any reasonable way to do low-level unchecked int (not long) math, like for computing a hashcode?
21:08mmarczykdnolen: protocol dispatch now is a property lookup, which on failure is followed by a bunch of fallback property lookups (on the protocol method object), right?
21:08dnolenmmarczyk: null check + property existence check
21:08leo2007I tried 'lein plugin install lein-swank 1.1.0' and it cannot find the pkg.
21:08mmarczykdnolen: right.
21:09leo2007I then tried lein plugin install leiningen/lein-swank 1.1.0, which seems to be downloading everything from some repo.
21:09dnolenmmarczyk: and you have to call the protocol fn
21:09dnolenmmarczyk: satifies? is an inlined macro
21:11leo2007could someone tell me the command line to install lein-swank?
21:12gtuckerkelloggHas anyone here worked on the clojure entries for the Shootout computer language benchmarks?
21:13mmarczykdnolen: so, if I understand correctly, you'd like to remove that whole "check if I'm applicable" business from protocol methods?
21:13dreishOops, nevermind. I found them. Of course, I should have grepped the Clojure clj source for "hashCode" to see if there was an example.
21:13gtuckerkelloggI haven't looked at the entries in detail, but was surprised to see that the Clojure entries, when compared to Java, used more code. That just seemed impossible
21:14gtuckerkelloggor on average about as much code
21:15dreishgtuckerkellogg: Heavily optimized code can end up being lengthy. I think that tends to be true in any Lisp.
21:16dnolenmmarczyk: I'm not talk about changing anything related to protocols
21:16dnolentalking
21:17dnolenmmarczyk: except for tracking them for efficient calls to satisfies?
21:17gtuckerkelloggdreish, understood. But the performance was on average 4x slower than Java, and in once case 12x slower than Java.
21:18gtuckerkelloggmaybe the shootout entries are just funky
21:18dreishOr Clojure is still incrementally approaching the ideal.
21:19gtuckerkelloggor that
21:19mmarczykdnolen: ok, so that buys us not calling -seq on stuff if it's already a seq -- though such a call would presumably always return `this` -- at a cost of whatever it costs to call satisfies?, which will become a (possibly minor?) perf hit for things like -seq on non-seq seqables?
21:20dnolenmmarczyk: it allows us to adopt the code style in RT.java which is very perf-centric and highly optimizable by JS engines.
21:29dnolenmmarczyk: there's an incredible amount of overhead in the code paths now.
21:30cemericktechnomancy: sweet writeup! Will RT that tomorrow.
21:30dnolenmmarczyk: for example, I've been looking at optimizing rest fns by emitting arrays directly for rest calls.
21:30dnolenmmarczyk: so for 1e6, going through JS arguments object takes 4ms or so.
21:31dnolenmmarczyk: if we emit an array I saw around ~20ms
21:31dnolenmmarczyk: calling first on the array sends timing to ~300ms
21:31dnolenmmarczyk: that's unnacceptale
21:31dnolenunacceptable
21:31mmarczykdnolen: um wait, 4ms w/ arguments, 20ms w/ array?
21:32dnolenmmarczyk: no performance right now is like >2s
21:32sritchiednolen: what's a good spot to look for cljs benchmarks?
21:32dnolensritchie: there's no good spot yet.
21:33sritchiesomeone else at twitter asked me -- I told him "smoking fast"
21:33mmarczykdnolen: oh, so did you mean 4ms for handwritten JS w/ arguments, 20ms for CLJS w/ array, 2s right now?
21:33dnolensritchie: the persistent data structures yes, idiomatic Clojure not tyet.
21:33dnolenmmarczyk: something like that
21:33mmarczykdnolen: oh man, that is horrible
21:34mmarczykdnolen: I mean the current state of affairs, that 20ms array version needs to happen asap
21:35mmarczykdnolen: so how do you envision the code path for (first arr) ?
21:36mmarczykor would it be an ArraySeq
21:36dnolenmmarczyk: cheap satisfies, ArraySeq is already seq, direct call first.
21:37dnolenmmarczyk: this is the whole point about fast satisfies? we can just duplicate rhickey's genious work on RT.java
21:39mmarczykdnolen: well, switching to your impl of first (from the comment on the ticket) does result in a perf win on a list -- although I'm talking Rhino again :-(
21:40mmarczykdnolen: so then first on non-seqs will always take a hit and the hope would be that this can be very minor?
21:42dnolen mmarczyk: first on non-seqs take a hit in Clojure little difference.
21:43dnolenmmarczyk: and only on first, subsequent calls fast
21:43mmarczykdnolen: right
21:44mmarczykdnolen: that hit is like 25% though, but yeah, first call only
21:44dnolenmmarczyk: 25% is nothing when you're traversing anything but the smallest vectors
21:44mmarczykdnolen: true
21:44dnolenmmarczyk: and I'm skeptical it's 25% on V8 or SpiderMonkey or JavaScriptCore
21:45mmarczykdnolen: ok, so maybe a branch / patch converting stuff to the "RT.java style" w/ no modifications to satisfies? would be useful
21:47mmarczykdnolen: because actually the best perf for first on an ISeq I've seen is with the recent master + your impl of first
21:48dnolenmmarczyk: yep, I'm nearly positive adopting RT.java style will results in massive performance boost across the board w/ a fast satisfies?
21:49mmarczykdnolen: that might be "macroifiable", (defn first [coll] (proto-call :proto ISeq :arg coll :method -first :fallback (let [s (seq coll)] (when s (-first s))))) (w/ the obvious impl of proto-call, possibly w/o the keywords)
21:50mmarczyk(macroizable? hm)
21:51dnolenmmarczyk: no macros :)
21:51mmarczykdnolen: oh come on :-P
21:51mmarczykdnolen: ;-) of course, but out of curiosity -- why?
21:52dnolenmmarczyk: it just cleverness with little gain. All the different code paths will be slightly different.
21:52mmarczykdnolen: ok, guess you might be right
21:53mmarczykdnolen: *if* they turn out to be the same though I'll be sure to revisit this issue :-)
21:53mmarczykdnolen: ok, another thing -- satisfies? itself
21:54dnolenmmarczyk: even so, I'll probably say no to any macros for this stuff. the code paths will be generally small - the code should be clear - macros add nothing.
21:56mmarczykdnolen: so I guess we can store the proto mask on the instances themselves -- which will guarantee the bits are set for inlined methods, but not for protocols the type has been extended to after an instance was created
21:57mmarczykdnolen: or put it on the prototype
21:58dnolenmmarczyk: we can deal with extend-type later
21:58dnolenmmarczyk: let's just focus on making core fast for the time being.
21:58mmarczykdnolen: ok
21:58mmarczykdnolen: satisfies? keeps the slower checks anyway, so it's not as if this could break things
21:58dnolenmmarczyk: yep! :)
21:58mmarczykdnolen: :-)
21:59mmarczykdnolen: so we've got a cljs$lang$protocol_mask$ property on Clojure type instances
21:59mmarczykdnolen: (always -- even if set to 0)
21:59dnolenmmarczyk: we should think ahead just a bit - advanced optimization, there will be more than one mask
22:00mmarczykdnolen: so now satisfies? gets that, does a bit-and against the statically looked-up bit
22:01mmarczykdnolen: sure, as long as this is for core protocols, that's not a problem at all
22:01dnolenmmarczyk: cljs$lang$protocol_mask$partition0?
22:02mmarczykdnolen: sounds good :-)
22:02mmarczykdnolen: actually it's not a problem even if it's not only for core protocols
22:03mmarczykdnolen: the proto -> bit maps could be held in an atom -- new ones added there when new (defprotocol ...) is encountered or (extend-type SomeUnknownProtocol ...) (if that's even possible? but I guess it probably is now with declare?)
22:04dnolenmmarczyk: leats avoid atoms for now.
22:04dnolenmmarczyk: lets deal with extend-type later :)
22:04mmarczykdnolen: and of course the straightforward approach (best for now?) is to (def map1 ...) (def map2 ...) etc. in core.clj
22:04mmarczykdnolen: at any rate, should be easy to extend in this direction
22:05mmarczykdnolen: but what I wanted to get to: ultimately, satisfies? would use it by looking up the correct partition (statically determined, of course) and doing the bit-and
22:05dnolenmmarczyk: yep
22:05mmarczykdnolen: so you think that's going to be faster than the native property lookup?
22:06dnolenmmarczyk: satisifies? currently looks up the prototype chain - slow
22:06dnolenmmarczyk: it's not a property look up on instances
22:07mmarczykdnolen: right
22:08mmarczykdnolen: it's 1 step away on success, more on failure -- but on failure we're going to do those checks anyway
22:08mmarczykdnolen: hm, I think it's 1 step?
22:12dnolenmmarczyk: in generaly failure will not be common.
22:12dnolenmmarczyk: (seq 1) is silly
22:12mmarczykdnolen: sure, I'm not worried about that
22:13mmarczykdnolen: but if I understand correctly, on success we're going to look up a property one step away in the chain, right?
22:14mmarczyk^find the property would be better wording, I guess
22:14dnolenmmarczyk: property lookup is fast, going up the prototype chain is not
22:14dnolenfoo.clj$core$ISeqable$ test needs to go up the prototype chain, it's not in the instance
22:15dnolenmmarczyk: quick tests, bit test is like <10ms, prototype chain lookup >100ms
22:16mmarczykdnolen: foo.meth != null with meth attached to foo.prototype ?
22:16mmarczykdnolen: for the > 100 ms timing?
22:17dnolenmmarczyk: yes w/ null test
22:17mmarczykdnolen: ok
22:18mmarczykdnolen: well, that's very interesting, thanks
22:18mmarczykdnolen: I've got a much more complete picture now
22:19mmarczykdnolen: and I guess the bit-and check should be wrapped in bool-expr?
22:20mmarczykdnolen: (I'm switching to node for timings *right now*, btw -- satisfies? w/ bit-and is noticeably slower on Rhino, which it shouldn't be given this result)
22:21dnolenmmarczyk: wrapping bool-expr probably, though it's yucky
22:22dnolenmmarczyk: i would ignore Rhino perf results on this stuff - it's based on my understand of modern JS engines.
22:22okaygolferyo(doc pmap)
22:22clojurebot"([f coll] [f coll & colls]); Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result unless required. Only useful for computationally intensive functions where the time of f dominates the coordination overhead."
22:23mmarczykdnolen: did you have a moment to look at the WIP patch, btw? just curious if you think that version of satisfies? looks about right
22:23leo2007is collection always finite?
22:24mmarczykdnolen: yeah, it's easy enough to test things on Node -- will do that from now on
22:25dnolenmmarczyk: will do in a bit.
22:26mmarczykdnolen: cool
22:29mmarczykdnolen: ok, so I guess I'll go and implement this stuff -- partitioned bit masks for protocols, a version of satisfies? to go with them, RT.java-style ops (all that should avoid something like the extra call to seq in first)
22:29mmarczykdnolen: and get some perf tests done in node
22:30mmarczykdnolen: thank you for a very enlightening discussion!
22:45cemerickreplaca: Looking at lein-autodoc; would you be interested in a pull req that brings it up to spec for use with lein2?
22:46cemerickAnd, if so, do you want/need to keep lein1 compatibility (either flexibly, or perhaps the impls should split based on lein version)?
22:53jweissanyone here know how to use autodoc? i can't get the standalone to run at all (errors out with classes missing from classpath). The lein plugin will run, but i want to specify :namespaces-to-document, but it won't accept anything. it will either document all the namespaces, or none.
23:17njdirkwhich signature is more idiomatic in providing a HTML body alternative to plain text (message subject body) -- forking clj-aws SES support: (html-message subject body) (message subject body :as-html)
23:17dnolendreish: there's unchecked-add-int
23:18dreishYes, I found it by grepping for hashCode in clojure/src/clj/. Thanks, though.
23:18dnolendreish: also gtuckerkellogg left but test.benchmark for fast implementation of alioth benchmarks that are competitive w/ java that aren't overly verbose.
23:19dreishInteresting. They're not the ones that are listed at alioth?
23:22mdeboardIs there a better/safer way of reloading swank when I add packages to the classpath besides killing the *swank* buffer and running clojure-jack-in again?
23:22dnolendreish: they are not, the current crop @ alioth benchmarks are not very good.
23:23dnolendreish: in the end I think the results will be pretty uninteresting - identical perf to Java for the most part.
23:23technomancymdeboard: you could theoretically add the dependency using pomegranate, but nobody's plumbed through a nice interface to that via swank yet
23:24technomancymdeboard: but you can just re-run M-x clojure-jack-in; it'll kill the old swank for you
23:24mdeboardtechnomancy: Ahhh ok @ killing old one.
23:25mdeboardDoesn't seem like Eclipse has great handling of that either based off cemerick's screencast
23:26technomancypomegranate is still very new
23:31cemerickwhat would such an interface look like at all?
23:31cemerickmdeboard, technomancy ^^
23:31cemerickI suppose adding a dep to project.clj could be picked up and added to the running classpath automatically? *shudder*
23:31mdeboardNo, don't mean like that.
23:32technomancycemerick: possibly some interplay between leiningen and the subprocess?
23:32technomancyso you don't need leiningen-core as a dep of the project
23:32technomancybut a first-run implementation would just dump lein-core in :deps in a profile
23:32mdeboardI just meant a simple reload command tbh :P F5 equivalent
23:32technomancy(leiningen.core.injected/recalculate-deps)
23:32cemerickpomegranate nREPL middleware? :-O
23:32technomancysure =)
23:33cemerickan here I thought I was trolling ;-)
23:33mdeboardtrolls trolling trolls
23:33cemerickUnsurprisingly, I'm probably the most skeptical person in the room re: add-dependency
23:34mdeboardI agree that automatically detecing changes and reloading automatically is cringeworthy
23:36mdeboarde.g. http://ipython.org/ipython-doc/dev/api/generated/IPython.lib.deepreload.html?highlight=reload#IPython.lib.deepreload.reload
23:37cemerickoh yeah
23:37cemerickI've broken teeth on python's module reloading in the past.
23:38cemerick"Nah, you don't want reload, you want *deep* reload."
23:38technomancy"whoa; that's deep"
23:39mdeboardSorry that Python is too advanced for you troglodytes
23:39mdeboard:P
23:39mdeboard(kidding, obviously I hope)
23:39cemerickheh
23:40cemerickpoor python
23:41cemerickA friend of mine was telling me earlier how his company will simply never move to python 3. Period. They'll end up in Clojure or JRuby before that happens, apparently.
23:41mdeboardI like Python a lot. I write a lot of what I hope is idiomatic/"Pythonic" Python. It does what it does really well. Has some warts and stuff but nothing too awful. Sometimes it's not the right tool for the job though.
23:43muhoopython was my favorite language for about 7 years. until i found clojure. now i found i simply can't go back, even if i wanted to.
23:43mdeboardcemerick: Where did (pprint) come from at about 30:00 in your screencast? I've got lein-pprint in my profile.clj but it's not recognized
23:44mdeboardoh, different things I guess.
23:46cemerickmdeboard: that's clojure.pprint/pprint — which I should have required in, since it'd only be present within the namespace when the REPL is involved.
23:46cemericklein-pprint is a plugin that will pretty-print the project map after all middleware, hooks, etc. are applied.
23:49mdeboardoic
23:51LuminousMonkeyAnyone got the seven languages in seven weeks from PragProg? Worth getting?
23:56mdeboardOne component of our stack at work where I really miss clojure is parsing XML out into dictionaries.