#clojure logs

2012-04-26

00:00felideonoh wait silly me
00:00devnyou* (fail)
00:00LuminousMonkeyyour around?
00:00felideonlol you using mIRC or something
00:01devnfelideon: it was meant to be a throwback, but then i made a typo... :(
00:01felideonhugod: what does t at the end of add-to-list do?
00:02hugodgood question
00:02devndid you guys see this earlier? I was picking through old sexps on the #clojure channel and I found:
00:02devn,(letfn[(!-?>[&$ &!](if(>,&!,1)(!-?>@(->>,&$,(*,&!)ref)(->,&!,dec))&$))](!-?>,1,5))
00:02clojurebot120
00:03hugodfelideon: adds it to the end of the list
00:03felideonhugod: ah
00:04felideonhugod: oh, so do i need that specific version of slime? i had just installed slime-ritz through M-x package-list-packages
00:05devnim heading to bed
00:05devnhappy clojuring all, and to all a goodnight
00:05felideondevn: nite
00:05devnho ho ho, merry [x xs]mas
00:05hugodfelideon: yep, the version ritz uses isn't the same as the version swank-clojure uses
00:05felideonwhich isn't the same as CVS head
00:06devnCVS...the wave of the *future*
00:06hugodno, I've been meaning to update ritz to use head, but haven't got round to it
00:06felideonis it really impossible to have all this coexist with regular slime?
00:06felideonah
00:07hugodit might work with cvs head, but I haven't tried recently
00:08felideonmaybe i shoould just have two emacs init files altogether
00:08felideonand rename them depending if i am going to lisp or clojir
00:09hugodor just pass an arg to emacs, -l ~/.emacs-for-cljr.el
00:10felideonwell there you go
00:10felideonhugod: what is the benefit of using ritz?
00:10felideoni think i only stumbled on it because google turned up this line "If you use slime with multiple lisps, you can isolate clojure specific setup by using ritz-connected-hook and ritz-repl-mode-hook."
00:10hugodintegrated debugger - not sure how it compares to swank-clojure now it has cdt
00:11hugodmany other minor tweaks
00:12felideonI see.
00:12felideonhugod: if i wanted to use the jack-in support
00:13felideoni have to disable all my slime configs?
00:13felideon"For "jack-in" to work, you can not have SLIME installed." define 'installed'
00:14hugodfelideon: https://gist.github.com/1934037 is most of my slime config
00:15ben_mHow do you wrap something in a var and what implications does that have?
00:15felideonhugod: oh interesting
00:15hugodfelideon: for jack-in to work, you shouldn't have slime loaded, might be a more precise statement
00:16hugodso, just make sure you don't have a (require 'slime)
00:16felideonso you with your setup, you can have a CL slime-repl and a clojure one side-by-side?
00:17hugodyes, though I haven't run CL in a few months
00:21y3dilight table has a good chance of getting funded!
00:22LuminousMonkeyWould be nice. :)
00:28technomancyhow is melpa anyway?
00:28technomancyI told that guy to write it but I haven't gotten a chance to try it
00:33ben_mIs there a command to find out where leiningen expects the .lein to be?
00:33ben_mBecause I have (use 'clojure.repl) in my user.clj, but still can't use (doc)
00:34technomancyben_m: https://github.com/technomancy/leiningen/blob/master/leiningen-core/src/leiningen/core/user.clj#L5
00:34technomancyI'm not sure user.clj was carried forward to lein2
00:34ben_mNot using lein2
00:35felideontechnomancy: do i have to download slime from marmalade to be able to slime-connect to swank-clojure?
00:39technomancyfelideon: you could prime your emacs instance by M-x clojure-jack-in first, but yeah otherwise you need a manual install
00:39technomancyben_m: it could be loading but not affecting the repl namespace; toss a println in there
00:41ben_mWhere would that println show up, using clojure-jack-in?
00:42ben_mOh, nevermind. I'm just stupid.
00:42ben_m(doc) works in the user ns (even though I get ^M for line endings), just stops working as soon as I switch ns :D
00:43technomancyyeah, that's the annoying thing about clojure.repl
00:44felideontechnomancy: I guess I meant downloading from marmalade vs from cvs head
00:44technomancyfelideon: oh yeah, stay the heck away from cvs
00:44technomancycvs in general, but especially slime's cvs
00:44technomancybrehaut: huh... I never took the time to wet the filter beforehand
00:44technomancywill have to start trying that
00:45ben_mtechnomancy, appreciate the help though :)
00:45brehauttechnomancy: i generally rinse my chemex filters before use, but i dont think it changes the taste much
00:46felideontechnomancy: well, meh. so if I want to run CL an Clojure slime repls side-by-side I need to stick with the clojure's canonized version of slime?
00:46felideons/the clojure/clojure
00:46technomancyfelideon: or you could run an older version of CL's swank server if you like
00:46technomancyI mean, yeah
00:46felideonright
00:47technomancyhttp://p.hagelb.org/slime-cvs-rant.txt
00:47felideon"but in practice most Clojure users lose interest in CL and
00:47felideondon't mind"
00:47felideonthat is yet to be seen!
00:48technomancyI didn't say everyone. =)
00:48felideontechnomancy: i dont think slime is meant for production anyway
00:48technomancyslime isn't, but swank-clojure is
00:48technomancywhich is more or less the root of the problem
00:48felideonwhy is that?
00:49felideonto connect to the remote image?
00:49technomancyright, because sometimes you don't have the luxury of figuring out how to reproduce a problem locally; you just need to figure out what's going on and fix it, possibly on the fly
00:51felideonmy compliance department would have an issue with that
00:51felideoni kid. i hate corporate america :(
00:52technomancywell, ideally it would never be necessary
00:52felideonindeed. unless the shuttle is in orbit.
00:55felideonkickstart nrepl.el or something
00:56technomancybelieve me, I would be thrilled to be able to ditch swank-clojure for nrepl.el
00:56technomancyjust waiting for some enterprising hacker to finish the job: https://github.com/technomancy/nrepl.el
00:56technomancyI can't do it myself because I hate writing functions that aren't referentially transparent
00:57wkmanireAre slime or swank abbreviations?
00:57technomancy(actually working on a blog post about that)
00:57technomancywkmanire: slime is the Superior Lisp Interaction Mode for Emacs
00:57technomancyI'm not sure about swank
00:58wkmanireIn my mind I keep thinking swanky slime.
00:58felideontechnomancy: blog post would be nice since i'm not sure what you mean
00:58wkmanireI just don't get a very pretty mental image when I hear those words.
00:59technomancyfelideon: http://p.hagelb.org/159.yml.html <- here's the draft
00:59wkmanireWhat is nrepl? Why is it better?
01:00felideontechnomancy: hmm yaml? what do you use to convert this to an HTML page?
01:00technomancyfelideon: it's just about why I'm disillusioned with elisp and why coding without immutability is such a mess
01:00technomancyfelideon: http://p.hagelb.org/Rakefile.html
01:00technomancymy 92-line blog "engine"
01:00felideontechnomancy: that's your ownt hing
01:00felideonah nice
01:01felideonproduces http://technomancy.us/ ?
01:01technomancyyeah
01:01technomancy(happy to take feedback re: the draft)
01:02felideonwhat are the four runtimes? JVM, Javascript, Python, and... .NET ?
01:02technomancyyeah
01:03technomancyI guess technically scheme too now? does that count?
01:03felideonhow stable is the .NET thing? maybe i can go back to a .NET job and not go crazy :)
01:03technomancyno idea. I don't think anyone in here uses it.
01:03technomancywkmanire: nrepl is the "canonical" clojure repl tooling backend
01:04technomancyit's better because it's actively maintained and designed with Clojure in mind
01:04technomancyswank-clojure is some guy's first Clojure project; in most places a line-by-line port of the CL version, except it's so old that when it was written atoms weren't even implemented.
01:04wkmaniretechnomancy: yikes.
01:05wkmanireThat's a hell of a first project.
01:05wkmanireWas he already a lisper?
01:05technomancyyeah, it was the same guy who wrote clojure-mode
01:05technomancywkmanire: it's amazing it still works. feels like a relic of Atlantis or something.
01:06technomancythe original author disappeared a few months after I started Clojure; I don't think anyone actually understands its internals
01:06wkmanireBut it is still the go to system for new developers I think right?
01:07wkmanireI guess it really should be replaced if there isn't anyone left who knows how to improve it.
01:07technomancyI don't recommend it to anyone who doesn't already know emacs
01:08felideonwhat do non-emacsen use?
01:08wkmanireSetting it up on linux was a piece of cake, but getting it working on windows proved to be too much trouble for my patience.
01:09technomancyfelideon: vim has historically used nailgun, but they are switching over to nrepl
01:10technomancythat's still in progress, but CCW is on nrepl and the lein2 CLI repl uses nrepl too
01:10technomancyeverything else is a rounding error
01:11technomancymaybe intellij, but I don't think their stuff is actively maintained
01:11wkmanireIs there a whole lot of work left to finish nrepl.el?
01:16felideon\o/
01:17felideon; SLIME 20100404
01:17felideonuser>
01:18wkmanirefelideon: Congrats. Now you can start!
01:18felideontechnomancy: please, for the sake of future Common Lispers, add bolding to "don't have any other versions of Slime installed;"
01:18felideonand maybe s/installed/loaded
01:19felideonintersting that clojure preserves read-case. I guess that makes it easy for java interop.
01:20felideonwkmanire: :P
01:30wkmaniredevn: You're the author of this article on namespaces?
01:45muhooomg, this whole nosql thing is hilarious. i just saw someone coming up with a great new idea-- normalizing data!
01:48wkmaniremuhoo: nosql?
01:49wkmanireJust read the wiki.
01:53muhooi think if all i wanted to do was keep my data in nice clean clojure maps and just dump them to disk in a way slightly more organized and atomic than pr-str and serializing to a flat file, i could get excited about these nosql things.
01:54muhookind of treating it like a version-controlled (in the case of couchdb), replicated file system. maybe i could get behind that.
01:54kovasbmuhoo: i could definitely get behind that
01:57muhooit's the querying that then becomes the stickler for me
01:57muhooo'
01:57wkmaniremuhoo: I haven't used this type of database yet, but personally I like the idea of a database that can't do much more than store and retrieve records.
01:57amalloymuhoo: that's a lot like how jiraph works. it was originally built as a graph database, but it has so many pluggable extension points that really it's just a generic clojure datastore now
01:58eggsbyhow might I copy all the keys and vals from one map to another?
02:00amalloy&(doc merge)
02:00lazybot⇒ "([& maps]); Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result."
02:00amalloy&(doc into)
02:00lazybot⇒ "([to from]); Returns a new coll consisting of to-coll with all of the items of from-coll conjoined."
02:00LuminousMonkeyIsn't the GAE datastore a type of NoSQL? If I was to write a GAE app, I would have to use that sort of thing?
02:00eggsbyah thank you amalloy
02:01muhoogae is a nosql thing yes
02:01muhooi don't know if you HAVE to use it, but it's there if you host on ae
02:01muhooand... i really don't grok it. it uses this weird GQL language which tries to make a nosql seem like it has sql capabilities
02:02LuminousMonkeyI was thinking about playing with Compojure on GAE, but I haven't got around to it, not using SQL still seems weird to me.
02:03muhooi'm kind of obsessed with trying to figure out what the fuss is about.
02:03muhoosimply because i get so frustrated with ORMs and ActiveRecord, maybe there's a better way
02:04wkmaniremuhoo: I get frustrated when portions of the core behaviors of applications I am working on get implemented in T-SQL.
02:04muhooouch
02:04muhooMSFT shop eh
02:05LuminousMonkeyBefore Clojure, I was playing around with RoR, outside of the typical stuff, I found ActiveRecord a pain.
02:05wkmanireUDFs galore, it's never been easier now that you can write UDFs in your CLR targeting language of choice and attach them to the db server to directly be called from your queries.
02:05LuminousMonkeyPlus, I was trying to move everything into triggers, etc, on the database, which is not the way RoR tends to do things.
02:06muhoohehe, see, i remember that when sql came out, it was supposed to be a programming language really
02:06muhooyou'd write your application in sql, all the business rules, etc., or at least that's how it was sold
02:07wkmaniremuhoo: Write a unit test for Function ProcessFeeds(), when all ProcessFeeds does is establish a connection to a database and call a stored procedure, dbo.ProceeFeeds.
02:07wkmanire:D
02:07LuminousMonkeyThat's what I thought was the best thing to do, that way use whatever frontend you like, just have all validation, etc in the database, that's what they're for.
02:08wkmanireProcess* bleh
02:08LuminousMonkeyActiveRecord wants to have all that stuff on the app end.
02:08muhoowkmanire: eek
02:09muhooand now with things like views in couchdb, it's going back to stored procedures
02:09wkmanireI think we're just having a hard time, as always, drawing the line in between different bits of functionality.
02:10madsyHm, the documentation on the -> macro is pretty vague, but I finally understand it. Is there an approach to suggest additions to the clojure documentation?
02:10muhooexcept, if saas companies like cloudant add clojure support, then those procedures could be in clojure, which'd be fun.
02:10wkmanireTheres always that blurry part where if you do some of your logic here, or some of your data persistence there then it is "easier".
02:10muhooyeah, it's a balancing act really
02:11wkmanireTo be or not to be, chewbranca or russel. That is the question.
02:12muhoomadsy: it may depend on which documentation you mean
02:12chewbrancawkmanire: oh I've decided, my damn irc client on the other hand has not
02:12LuminousMonkeyWell, it's DRY stuff isn't it? Mix of business logic in app and DB code?
02:13wkmanireLuminousMonkey: And testability.
02:13wkmanireLuminousMonkey: there really isn't a good reason to hard code your application's data model to a particular persistence method.
02:13madsymuhoo: The general documentation on clojure.org/ and the API documentaton on clojure.github.com/
02:13muhooi'd try out datomic but it requires a back-end service i don't have and don't want to sign up for. it supposedly works on postgres too, which'd be great, but it says "not for production use", which makes me wonder why.
02:14muhoomadsy: well the stuff on github can be forked, and you can do a pull request
02:14LuminousMonkeyWell, the problem is data integrity, databases are more than just a persistent datastore.
02:14madsymuhoo: Ah, thanks.
02:14muhoomadsy: some of the stuff on clojure.org is a wiki
02:14muhoobut you'd need to fill out an agreement to get permissions to edit it
02:16muhooLuminousMonkey: which, if i'm just storing clojure maps encoded as json in couchdb, i get no referential integrity
02:16ben_mIs there a reason why ring.middlewar.params returns a function that returns a response, instead of just returning a response?
02:16madsymuhoo: Yeah, I just figured that some of the more fundamental reader macros and special forms could need more examples.
02:16madsySo people like me with no Lisp background could learn it faster
02:16wkmanireLuminousMonkey: I guess from my point of view, I should be able to replace my database with a bunch of text files and my app will still run as designed.
02:17wkmanireSlower perhaps.
02:17wkmanireBut I don't lose application functionality because I changed the way I store my data.
02:17muhoomadsy: that'd be cool. also, there are some books designed for non-lispers to pick up clojure, i like clojurebook.com myself
02:17amalloymuhoo: waaaaat. does clojure accept pull requests to clojure.github.com? i really doubt it
02:17derridamadsy: check out clojuredocs.org
02:17LuminousMonkeywkmanire: Yeah, if that's a concern, then I think that's fair enough. But I don't know how often people change databases for that to be a big priority?
02:17muhooamalloy: i doubt it too, but would it hurt to make one?
02:17amalloyhttps://github.com/clojure/clojure.github.com indicates that it would be impossible anyway
02:18muhooamalloy: what then, file an issue in JIRA?
02:18LuminousMonkeywkmanire: I loath MySQL, so I'm always targetting Postgres I guess, I have the luxury of being able to know what the database will be.
02:18amalloymuhoo: no, but i think it hurts to tell someone who's interested "hey, direct your efforts here" and point at a brick wall
02:18wkmanireLuminousMonkey: The longer a software package lives (is actively being developed and used) the more likely something like that may happen becomes.
02:18muhooamalloy: oh, sorry
02:18amalloyyes, i imagine jira is the only attempt
02:18amalloyer
02:18muhoomadsy: what amalloy said
02:18amalloyavenue
02:19LuminousMonkeymuhoo: That's another thing I wonder about these NoSQL databases too, how can you do anything with integrity? Must be ways around it.
02:19wkmanireLuminousMonkey: Here's an example. I worked on an application in windows land where somebody convinced the management to make the switch from SQL 2000 to SQL 2008. :D
02:20wkmanireLuminousMonkey: Guess how different and incompatible those two database systems are? Guess how many application behaviors relied on the way SQL 2000 works? :D :D
02:20muhooLuminousMonkey: if i were doing a financial or business app, there's NFW i'd do that in anything other than postgres or equivalent
02:21muhooi want transactions, and foreign key integrity, and all that, for that kind of stuff
02:22wkmaniremuhoo: I completely agree with you, If you can use a system that can give you those comforts then definitely use them/it. I'm just illustrating my distaste for getting "fancy" in your database.
02:23LuminousMonkeymuhoo: I guess that's my point of view, internal sales app, so very important. Plus I'll never write an app that will be popular enough to need something like a NoSQL DB I would imagine.
02:23muhoowkmanire: agreed. it can get very ugly
02:25wkmanireLuminousMonkey: Out of curiosity, why don't you like MySQL? Why do you prefer postgres?
02:25muhoomadsy: sorry, i was wrong about github. clojuredocs.org seems to have a lot more action.
02:26madsymuhoo: Yeah, derida mentioned clojuredocs too. Thanks to you both.
02:27LuminousMonkeywkmanire: You know, I can't think of specifics right now, but generally Postgres is written more compliant. Triggers, and the PL/SQL stuff, etc works in Postgres.
02:28wkmanireI've read as much. MySQL used to be faster too I think, but they're basically identical on performance now right?
02:28LuminousMonkeywkmanire: MySQL seems to be more of a dumb datastore.
02:29LuminousMonkeyI think MySQL is still faster, because it sacrifices features for raw speed? Where Postgres seems to be more focused on integrity.
02:29LuminousMonkeyPlus MySQL is everywhere, harder to get hosting plans with Postgres.
02:29wkmanireThat's definitely true.
02:29muhoopostgres is ingres, isn't it?
02:30LuminousMonkeyLooks like it, evolved from Ingres
02:30muhooopen sourced ingres, which means it dates back to the mid 1970s or something
02:30wkmanireI thought Postgres was a university project.
02:31wkmanireBy berkley or some similar school.
02:31LuminousMonkeyConsulting the mighty oracle wikipedia....
02:31LuminousMonkeyhttp://en.wikipedia.org/wiki/PostgreSQL
02:31LuminousMonkeyBerkeley
02:32muhooheh "oracle wikipedia"
02:33muhooonly if it runs on mysql
02:33amalloysupport for the oracle wikipedia runs about $40,000/mo
02:33LuminousMonkeyHeh
02:34wkmanireMan, I'm hankerin' for a chilli dog.
02:35LuminousMonkeyI really did want to play with some NoSQL stuff, but unless you're going to deal with massive data, or have to use it, I don't think you need to?
02:35muhoosomething tells me that couchdb came out of the 1990s: http://guide.couchdb.org/draft/recipes.html#pagination
02:35LuminousMonkeyEven for a pretty large application, SQL seems to be just fine?
02:36muhooi'm coming at it from a different angle
02:36wkmanireLuminousMonkey: With good indexes you can quickly query millions and millions of rows of data.
02:36muhooi think there may be projects where sql is TOO much, and i could use something simpler
02:36wkmanireAt least I've done that first hand in T-SQL.
02:37wkmanireOn relatively low-end servers.
02:38muhoothe schema-less bit intrigues me more than the supposed scalability
02:38wkmanireBut on the other hand, I've also had such indexes get "eated".
02:38wkmanirethen it takes several days to query the data, or several days to rebuild the index.
02:39felideonI feel getting the clojure repl up on emacs should show the 'your kitten of death' awaits message instead.
02:39LuminousMonkeymuhoo: So it's just like playing with maps?
02:39LuminousMonkeywkmanire: Ouch.
02:39muhoothat's what it appears to be, but i'm still feeling my way through it
02:39muhoothere's a catch somewhere, i know it.
02:39muhooand i think it has to do with querying.
02:40LuminousMonkeyI've wanted to play with it, but I don't think I would use it.
02:40wkmaniremuhoo: Your data for a particular "type" can be irregular right?
02:41muhooquerying seems really verbose in these things
02:41wkmanireAs in, some "Customers" can have extra key/value pairs that others don't have?
02:41muhoowkmanire: they seem like just k-v stores
02:42amalloywkmanire: you sound like some customers are more equal than others
02:42algernonfwiw, nosql is great for structured logging: both the schema-lessness and scalability comes in handy there.
02:42wkmanireamalloy: :D
02:43muhoothey're all different though. couch is the one i've decided to dive into more deeply
02:43wkmanireamalloy: I'm bad at asking questions.
02:43LuminousMonkeymuhoo: Any particular reason why?
02:45muhoonice clojure bindings (clutch), easy to install and set up, cloudy provider (cloudant), and immutable data with versioning, +/- coin toss
02:46muhoooh, also, on local instance, you can write views in clojure :-)
02:46muhoosadly, cloudant doesn't support that though.
02:47LuminousMonkeyClojure does end up spoiling you...
02:48LuminousMonkeyThough, I really should play with OCaml, sticking with one language all the time isn't good practice.
02:57wkmanireHooray! I've succesfully CRUD'd to a CSV with clojure ... AND unit tested that it works ... AND tested it from my REPL.
02:57wkmanireI can finally get to using seesaw to build my GUI.
02:57wkmanire:D
02:58muhoowkmanire: congrats!
02:58wkmanireI'm blown away by how little code there is.
02:58muhoohehe
02:58muhoostill amazes me too :-)
02:59tomojCRUD to CSV?
02:59wkmaniretomoj: It's not as dirty as it sounds.
02:59tomojthat's like, a restful service in clojure that exports to csv files ?
02:59tomojor what
02:59wkmanireNo, nothing even half that complex.
03:00wkmanireLiterally just creating, updating and deleting addresses from a list of addresses that I'm persisting in a text file.
03:00tomojoh, of course
03:00tomojneat
03:00wkmanireI'm still learning Clojure.
03:00wkmanireMore importantly, I'm learning functional programming for the first time.
03:02wkmanireI'm gonna have me one more beer and then hit the sack.
03:02wkmanireback in a flash.
03:02rodnaphone more b
03:02rodnaph*r i've just started work!
03:03wkmanire5 minutes to 03:00 here.
03:05LuminousMonkeyExactly 12 hours from me.
03:05tomojhmm
03:06tomojI wonder if seesaw's protocols and multimethods would extend nicely to android
03:06wkmaniretomoj: That'd be neat. I like the idea of doing some mobile dev in clojure.
03:06wkmanireAlthough I suppose that is already being made possible by Clojure JS.
03:06tomojright, I was also thinking of JS...
03:06tomojbut that's nuts
03:07wkmanirenuts?
03:08tomojnot clojurescript. trying to write a UI library that encompasses swing, android, and web seems nuts
03:08LuminousMonkeyToo much of a leaky abstraction?
03:09tomojthat is my totally uninformed suspicion
03:10LuminousMonkeyI would agree, feels like it wouldn't work.
03:11wkmanireI was just talking strictly HTML5 app.
03:12tomojyeah
03:13wkmanireI think there are already externs for jQuery for Clojure JS.
03:13wkmanireI bet somebody is working on externs for jQuery mobile.
03:16wkmanireWow, seesaw looks awesome so far.
03:20tomoj(boolean (and x (or y z)))
03:20tomojis that a long way to write something short?
03:25LuminousMonkeyNot sure if you could have it shorter?
03:32wkmanireWhew, just made it through the seesaw tutorial.
03:32wkmanireI think finishing the UI for this little app will only require one more work session.
03:32wkmanire:) Time for sleep.
03:32wkmaniregoodnight folks.
03:34LuminousMonkeywkelly: Night
03:42wmealingdoes clojure.java.shell able to handle interactive processes with multiple interactions ?
03:44alexyakushevGreetings! Have anyone tried to develop a plugin for lein 2.0.0?
03:45emezeskealexyakushev: I have
03:48alexyakushevI stuck at one point... When I try to compile/run/whatever my plugin the compiler says that there is no leiningen/core.clj on the classpath
03:49wmealingessentially i wanted 'expect' for clojure.
03:49alexyakushevDocumentation says that one should not require depending on leiningen in project.clj, but I tried it anyway still without luck
03:49emezeskealexyakushev: Do you have :eval-in-leiningen true in your project.clj?
03:49alexyakushevYes
03:50emezeskeWhat does your (:require ...) look like for leiningen.core?
03:50alexyakushev(:use [leiningen [javac :only (javac)] [core :only (read-project)] [compile :only (compile)] [help :only (help-for)]])
03:51alexyakushevThe old lein (1.7.0) works fine on this plugin project
03:52emezeskealexyakushev: I don't think leiningen 2 has a leiningen.core namespace
03:52alexyakushev*Though I can't make it use clojure 1.3.0 (it always loads 1.2.1) and I'm feeling very stupid about it
03:52emezeskealexyakushev: There are leiningen.core.xyz, but no leiningen.core
03:53emezeskelein 1 uses clojure 1.2 end of story
03:53alexyakushevOh, I see now
03:54alexyakushevThank you for help! And sorry for not looking that up by myself
03:54emezeskeNo problem, when I first converted my plugin to lein 2 I needed more help than that :)
03:54emezeskeGood luck! I'm outta here.
04:26Raynesmuhoo: Your indent-buffer would be gg=G if you used evil-mode.
04:26Raynes:D
04:33muhooi used evil-mode for about a week on my transition from vim to emacs
04:33Raynesmuhoo: Any particular reason you stopped?
04:38wmealinghe's not evil ?
04:39clgvsuperman showed up ;)
04:41alexyakushevGosh I'm feeling like a complete idiot.
04:41alexyakushevWhy the function is overloaded for one and two arguments, but when I use/require the namespace with it I get only version for two arguments?
04:42alexyakushevAnd I don't see any metadata or anything that could cause it, function is defined by mere defn
04:45clgvalexyakushev: give a paste showing the source (minimal if possible) and stating the exact problem
04:45clgv~paste
04:45clojurebotpaste is https://refheap.com/
04:48alexyakushevhttps://refheap.com/paste/2372
04:48alexyakushevThis is a function from leiningen
04:49alexyakushevWhen I require it it comes to me with only one overloaded version for two arguments
04:49clgvthe definition looks fine. how do you call it?
04:50alexyakushevSimply (help-for #'foo) for example. But it doesn't matter, (doc help-for) yields help for only one overloaded version.
04:51alexyakushevBut I guess the problem is that the Leiningen version that is running differs from the one I look the source code of. But I don't know how to check that.
04:51clgvalexyakushev: I guessed that as well right now ;)
04:52alexyakushevI explicitly stated a dependency for leiningen 2.0.0 in the project.clj but who knows...
04:53clgvyou wanto use leiningen as dependency in a project? or do you want to write a plugin?
04:53alexyakushevThe latter, exactly
04:54clgvafaik, in that case you would not add it as dependency but install the leiningen version you need
04:54clgvthere is a guide on their github page
04:55alexyakushevYes, I tried without the dependency too.
04:55alexyakushevI've read the guide, but maybe I've missed something
04:56clgvI dont use lein2, yet. so I cannot test that setup
04:57alexyakushevThanks for help anyway!
04:59muhoohmm, fp is kind of nice for this kind of nested insert: https://refheap.com/paste/2373
05:02muhooRaynes: i'm pretty bilingual. when i use vi, i use vim. when i use emacs, i use emacs, not vi-in-emacs.
05:03muhooi switch back and forth between them often (emacs for development, vi for sysadmin work), so it helps to keep them straight from each other.
05:16Raynesmuhoo: Not sure that actually makes sense.
05:16Raynesmuhoo: Wouldn't it be easier to be able to use common functionality in familiar ways?
05:16RaynesMaking them completely different seems counterintuitive to making it easy to switch between the two.
05:18progowell, there are many ways to learn. Contrasting might be an effective one
05:20RaynesI'm not arguing learning.
05:22progoafter you've learned both ways, it should be easy to hop editors
05:34clangeHello Clojureists! I'm a (just now) desperate newbie. I have a function to cut lines at '=' characters: (defn cut [l] (split l #"=\s*")) that works well. But how do I apply this function to a vector of strings??
05:34lazybotclange: What are you, crazy? Of course not!
05:35Raynesclange: Can you show an example of this vector of strings?
05:35clange(def test ["one= eins" "two= zwei"])
05:36RaynesWhat is the output you're looking for?
05:36Raynes[["one" "eins"] ..]?
05:37clangeEither, or as one-dimensional vector w/ alternating single string.
05:37Raynes(map cut test) should result in what I just said.
05:37Raynes(mapcat cut test) will result in what you just described.
05:37RaynesPick your poison.
05:37clangeTHX! I struggled w/ apply ...
05:38Raynesapply would apply your function to all of the strings at once which is definitely not what you want.
05:38Raynesmap applies the function to each element of the vector in turn and accumulates the results.
05:39alexyakushevCould please someone answer the following question: if I have two namespaces with the same names on the classpath, how do I specify which one I would like to require?
05:45tomojyou mean you have two clj files on the classpath which have the same path (relative to the classpath) and define the same namespace? is there a reason you can't avoid this?
05:45muhoohow limited is noir's defpage compared to ring's defroutes?
05:45tomojdefroutes is compojure, isn't it?
05:45muhoocompojure, yes, sorry
05:47muhooi can't tell if there are any limits placed on routing or if it passes through all of compojure's capabilities
05:49tomojone strange thing to me is that defpage sets up the routes inside a global
05:49muhoothat appears to be so that you can define routes all over the place instead of having to have them in a centralized place
05:50muhooi.e. to group the functions in files a little more flexibly, afaict
05:53tomojit seems like it is more flexible to not use a global, although not usually more convenient maybe
05:53muhooit does look from the docs like he's just passing it through to compojure, which is great, but from the source i'm not sure if that's what's happening.
06:16ody1231are there any utils for navigating clojure files with emacs?
06:44madsyody1231: Could you be a bit more specific?
06:46madsyody1231: You have paredit for better control over nested parantheses. You have swank-clojure + slime + emacs for enhanced REPL navigation, but it's not trivial to set up
07:42tomojhas anyone seen weirdness with loaded-libs?
07:42tomojweirdness being missing libs
07:47clgvtomoj: erm what? guess you have to be more specific
07:47tomojI C-c C-k a file in emacs, then switch into that namespace in the repl
07:47tomoj((loaded-libs) (.name *ns*)) is nil
07:48tomojjust running (require 'my.namespace) fixes this
07:48tomojso I guess it's something to do with the way C-c C-k causes code to be loaded..
07:48tomojbut.. hmm
07:49tomojloaded-libs also doesn't include an AOT compiled namespace
07:49tomojan entry point
07:50clgvI just did call (loaded-libs) in lein repl which returns all the namespaces. but in Counterclowise's REPL (loaded-libs) returns nil as well
07:50clgv+ck
07:53laurusI have a data structure like this: [[1] [2] [3]]. How do I turn it into [1 2 3] ?
07:54Fossiflatten
07:54Fossior depends
07:54Fossiif you want it really flat or just the first level
07:54Fossithen apply concat i think
07:54laurusflatten worked, thanks! :)
07:55Fossilaurus: flatten will work on all levels
07:55tomojhow'd you get [[1] [2] [3]]?
07:55Fossigood point also :)
07:58tomojhttps://gist.github.com/68f6dcf147783fee5856
07:58tomojbad.clj prints "Not loaded!"
07:58tomojgood.clj prints "Loaded!"
07:58clgvhaha.
07:59tomojgood.clj prints "Not loaded!" with `lein run` somehow...
07:59clgvhmm maybe the send-to-repl code replaces the ns macro and only executes the content and skips the creation of a new namespace
08:01tomojwait, I'm seeing "Not loaded!" with java -cp now too
08:02clgvtomoj: maybe the whole loaded-libs is intended differently or just messed up
08:03tomojthe self-require workaround doesn't seem to work at all
08:04tomojthough this thing definitely did print "Loaded" a few attempts ago.. no clue how
08:06tomojoh
08:06tomoj(.name *ns*) is 'user
08:06fliebelNeo4j for Clojure is weird. Like, 5 different and now dead forks have existed over time.
08:07tomojright so bad.clj doesn't work with java -cp `lein classpath`
08:07clgvtomoj: I did try without (.name *ns*)
08:07tomojbut does work with lein run
08:11kijfliebel: which one would you recommend ?
08:12gfredericksfliebel: my group is using one right now
08:12fliebelkij: I have no idea. I'd pikc the most recent Borneo fork if I had to, or directly use the Java bidnings
08:12fliebelI wonder why one would use the Java binding, if it's just a REST API though.
08:12fliebelgfredericks: What are you using?
08:12gfredericksthere is an embedded option too
08:13fliebelgfredericks: Is it common to embed it?
08:13gfredericksfliebel: no clue
08:13gfredericksI think we switched to that for perf
08:13gfrederickslooks like clojurewerkz/neocons
08:14gfredericksI assume that's a neo4j library, I guess I'm not 100% positive
08:14gfredericksnot involved in that part of the project
08:15_KY_I want to use the "for" form, but I want to pass the first arg to it from a function, how can I do that?
08:15gfredericksas in (for [x (foo-bar)] ...)?
08:17fliebelgfredericks: That looks interesting. The website url is brokne though.
08:18_KY_gfredericks: (for [sth-returned-from-function] ...)
08:18fliebelI wonder if...? https://github.com/michaelklishin/neocons/blob/master/script/set_up_basic_http_auth_env_variables.sh#L4
08:19gfredericks_KY_: you need a pair inside the binding form...I don't quite understand what you're trying to do.
08:19_KY_Let's say the function returns the pair
08:20_KY_Suppose the function returns [x listx]
08:20_KY_And I want to do (for [x listx] stuff....)
08:21gfredericksbut you don't know what x is until runtime?
08:21_KY_Yes
08:21_KY_Seems to require a macro...?
08:21gfredericksthen how do you know what symbol to use in the body to refer to it?
08:21fliebel_KY_: So what is in the loop?
08:22_KY_I will pass something containing "x" in the loop as well
08:22_KY_Basically, I want to find the permutations of lists of elements, and the "for" form can do it
08:23gfredericksfor can do permutations?
08:23_KY_Yeah... for example:
08:23clgv_KY_: you should specify what shall be done and how the macro call should look like
08:23_KY_,(for [a [1 2 3] but [7 8]] (println a "." but))
08:24clojurebot(1 . 7
08:24clojurebot1 . 8
08:24_KY_,(for [a [1 2 3] but [7 8]] (println a "." b))
08:24clojurebotnil 2 . 7
08:24clojurebot2 . 8
08:24clojurebotnil nil 3 . 7
08:24clojurebot3 . 8
08:24clojurebotnil nil ...)
08:24clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: b in this context, compiling:(NO_SOURCE_PATH:0)>
08:24gfredericks_KY_: I think that's a cartesian product, not permutations
08:24mmarczykCLJS transient vector and transient hash set ready @ CLJS-170 & CLJS-207 respectively :-)
08:24_KY_It's just the same name
08:25gfredericks_KY_: I'm just making sure that you do want cartesian product, because if you actually want permutations you'd be disappointed
08:25_KY_How is permutation different?
08:25gfrederickspermutations are, given a single list, all the different ways of ordering its elements
08:26_KY_I'm picking one element out of each list with replacement
08:26_KY_Yes, and I have a list of lists
08:26gfredericksokay since you don't know the number of lists at compile time you'll either want to write a custom recursive function, or use the one in the combinatorics library
08:27gfrederickshttps://github.com/clojure/math.combinatorics/blob/master/src/main/clojure/clojure/math/combinatorics.clj#L87
08:27_KY_I see...
08:28_KY_Are you sure that's not permutations?
08:28gfredericksyes, permutations only applies to a single collection
08:28_KY_It's the cartesian product
08:28gfrederickswhereas cart-prod only makes sense for more than one collection
08:28_KY_Do you know the notation nPr in combinatorics?
08:29gfredericksit looks familiar but I can't remember what it means
08:30Frozenlock---> Cannot cast clojure.lang.LazySeq to com.serotonin.bacnet4j.service.confirmed.ConfirmedRequestService
08:30FrozenlockHow can I make sure to have an evaluated seq?
08:30gfredericks_KY_: if you ask for (permutations [1 2 3]) you'll get [[1 2 3] [1 3 2] [2 1 3] [2 3 1] [3 1 2] [3 2 1]])
08:31tomojiirc nPr counts the r-permutations of n?
08:31tomojpermutations here is the case where r = n
08:31_KY_You're right... it's the cart-prod I want...
08:31gfrederickswhereas (cartesian-product [1 2 3]) is just [[1] [2] [3]]
08:31_KY_So, "for" can do cart-prods
08:31Frozenlock(def foo (doall foo)) Is still lazy :(
08:32gfredericks_KY_: yes but only if you know the number of collections at compile-time
08:32_KY_But maybe I should call the combinatorics library
08:32_KY_Right...
08:33gfredericksFrozenlock: (doall) forces a lazy seq, but doesn't change its type
08:33gfredericksFrozenlock: your error message looks like a type issue
08:37_KY_What should I declare to use clojure.math.combinatorics?
08:46gfredericksin your ns you can (:use [clojure.math.combinatorics :only [cartesian-product]])
08:47_KY_Do I need to download it?
08:47_KY_I included that already
08:48gfredericksare you using leiningen?
08:48_KY_No... just REPL
08:49gfredericksah; I dunno then. I guess you want to download the jar but not sure where from
08:49_KY_I have install leiningen somewhere... not sure
08:49gfrederickslein is much easier for this sort of thing
08:49gfredericksyou just add the declaration to your project.clj
08:49_KY_Let me see...
08:52madsyAh, finally swank/slime works
09:03wmealingis there a way to work interactively with a sub process in clojure ? ie, multiple stdin/stdout ?
09:09tomojmultiple? you mean one per subprocess?
09:09wmealingyes, i'd like to do multiple interactions to stdin/stdout though
09:10tomojyou mean, like, print more than one line or something?
09:10tomojhttps://github.com/Raynes/conch
09:10mknoszligwmealing: you mean something like this: http://richhickey.github.com/clojure-contrib/shell-out-api.html ?
09:10lazybotNooooo, that's so out of date! Please see instead http://clojure.github.com/clojure-contrib/shell-out-api.html and try to stop linking to rich's repo.
09:11wmealingi think the clojure contrib shell is a "once off"
09:11mknoszligwmealing: i'm not sure if there's still a version in post 1.2-contrib...
09:11clgvclojure-contrib is deprecated as well. see clojure.java.shell in clojure 1.3
09:11wmealingtomoj, that conch might be what i need
09:11tomojnever used conch, but at the very least the source should be helpful
09:11_KY_Can I use lein to test-run a single file?
09:12wmealingyes.
09:12wmealingthanks tomoj, i did google.. but apparently not well enough
09:12wmealinghow did you find it ?
09:12mknoszligwmealing: oh sorry, it's been a while since i used it...
09:12_KY_Which command should I use? or start a repl?
09:12bhenryin korma is there something like a (with-db db (do …)) or do i have to put the db i want in each sql function?
09:12wmealingmknoszlig, no problem man. It is _almost_ what i needed.
09:14mknoszligwmealing: internally it uses streams, i think that's what i grabbed and adapted to my needs - but i forgot about me changing it ;)
09:15wmealingah ok
09:29_KY_I just set up lein, but "lein run" cannot run an empty project...
09:29_KY_Says "cannot find core.clj on classpath"
09:29_KY_What should I do?
09:30tmciver_KY_: you can create an empty project with 'lein new <project-name>'
09:30_KY_I created that
09:30_KY_And I'm trying to "lein run" within it
09:31tmciver_KY_: you also need ':main <some-ns>' in your project.clj
09:32tmciver_KY_: and a -main defn in that ns (I believe)
09:32mmarczykdnolen: hi, thanks for the merge
09:33_KY_-main or just main?
09:33mmarczykdnolen: with the transient stuff all in place, I've wired into to use transients -- CLJS-208
09:33tmciver_KY_: -main
09:34_KY_Thanks=)
09:34_KY_Ok it runs now...
09:34tmcivernp, cool
09:34_KY_But I want to load a specific file to debug it...
09:34tmciver_KY_: are you using emacs?
09:34_KY_No, an external editor
09:35tmciver_KY_: you can always just 'use' it from a repl and then call your functions.
09:36_KY_So I start "lein repl"?
09:36tmciver_KY_: yes
09:37_KY_Ok.. I'm trying to "load-file" but it can't find my file
09:37tmciver_KY_: how about just (use 'your.ns)?
09:38_KY_I see...
09:38_KY_So I have to include the file somewhere in project.clj?
09:38clgv_KY_: I recommend reading an introductory book on clojure or at least a tutorial article
09:38tmciver_KY_: it should be on the classpath already.
09:39_KY_clgv: which book? or article?
09:39_KY_tmciver: how do I include it in the classpath?
09:40clgv_KY_: there are several books: Programming Clojure, Practical Clojure, Clojure in Action, Clojure Programming, The Joy of Clojure.
09:40_KY_The file is already in the same directory as core.clj
09:41tmciver_KY_: is the ns in that file consistent with the file name and path?
09:42tmciver_KY_: the ns in that new file should be 'projectname.filename (assuming no hyphens).
09:44_KY_Can I have hyphens in the filename?
09:45_KY_Oh it seems to force me to use _
09:46dnolen_KY_: not in the actual name, no. replace hyphens w/ underscores.
09:46tmciver_KY_: yes
09:47_KY_clgv: the books don't talk about lein, do they?
09:48clgv_KY_: not all, I guess. "Clojure Programming" talks about it
09:49_KY_That's the new other'reilly book?
09:49_KY_That's the new o'reilly book?
09:49clgvyep. more practical oriented they say
09:50cemerick_KY_: Yes, we talk about Leiningen and Maven in the book, along with project organization, other tools, etc. http://clojurebook.com if you'd like more info, see a sample chapter, etc.
09:51fdaoudI'm sure there are leiningen tutorials on the web.. I mean, if I learned how to use it.. :)
09:52cemerickYup, there are few things that beat reading the documentation in full.
09:52clgvcemerick: where is my commission for naming your book? ;) :P
09:52fdaoudcemerick: been reading your book here and there, it's been excellent so far. great work!
09:52clgv*listing
09:52clgv:D
09:52cemerickclgv: Hah. Need to get your own amazon affiliate link poppin. ;-)
09:53cemerickfdaoud: Thanks :-) It seems to be measuring up so far.
09:53fdaoudclgv: I think there is such a thing, where you set up a reading list on amazon and if people by books from your list, you get something
09:54ody123anyone know how to navigate clojure source files in emacs?
09:54clgvfdaoud: didnt know that.
09:55mefestoody123: C-x d
09:55cemerickclgv, fdaoud: don't need to set up a reading list; just sign up as an affiliate.
09:55cemerickhttps://affiliate-program.amazon.com/ FWIW
10:00fdaoudcemerick: as an unexpected bonus, from your book I discovered the ubuntu monospace font, very nice!
10:01cemerickfdaoud: what, from picking apart the PDF?
10:02ody123mefesto: thx
10:02fdaoudcemerick: no, the epub is just a zip file and the .ttf files are in there.
10:02cemerickah
10:03fdaoudbut really I could have just gone to http://font.ubuntu.com :)
10:10_KY_So what should I include in project.clj if I want to use combinatorics?
10:13_KY_It still throws an exception saying cannot locate combinatorics.clj
10:15clgv_KY_: a dependency declaration to the library that contains the combinatorics namespace. for leiningen start with https://github.com/technomancy/leiningen/blob/master/README.md
10:19_KY_Is it like: [org.clojure/math.combinatorics]?
10:20_KY_And I can't find the version number... on the combinatorics page
10:21gfredericks`lein search combinatorics` might give you that
10:21gfredericksafter a half-hour of pondering
10:22_KY_I see... that took too long so I broke out from it...
10:22_KY_But I'll try again... =)
10:22gfredericksnormally you can search clojars for these things, but I think the core libs are deployed elsewhere and I don't know where that is
10:23gfredericksyou can also check the pom.xml in the combinatorics project
10:23gfredericksdoesn't guarantee that version is deployed somewhere but it's a good bet
10:29clgvIs there a Clojure function that returns the fullqualified symbol of a given variable?
10:30gfredericks&(resolve '+)
10:30lazybotjava.lang.SecurityException: You tripped the alarm! resolve is bad!
10:30gfrederickswait no
10:30gfredericks&`+
10:30lazybot⇒ clojure.core/+
10:30gfredericksI guess that's not a function though
10:31clgvresolve returns the variable. now I want the symbol of the variable ;)
10:31gfredericksby "variable" you mean var?
10:31noidimaybe you're looking for #' ?
10:31gfredericksno
10:32clgv#' is a shortcut for 'var - my problem is that I get a symbol and need to find its namespace
10:32gfredericks&(meta #'+)
10:32lazybot⇒ {:ns #<Namespace clojure.core>, :name +, :file "clojure/core.clj", :line 919, :arglists ([] [x] [x y] [x y & more]), :added "1.2", :inline-arities #<core$_GT_1_QMARK_ clojure.core$_GT_1_QMARK_@139955c>, :inline #<core$nary_inline$fn__3566 clojure.core$nary_inline$fn... https://refheap.com/paste/2379
10:32clgvso using resolve returns the var and I could access the ns property via interop
10:33sattvik,(map namespace ['foo 'foo/bar])
10:33clojurebot(nil "foo")
10:33sattvikclgv: Does namepsace do the trick?
10:34gfredericks,(let [{ns :ns n :name} (meta #'+)] (symbol (str ns) (name n)))
10:34clojurebotclojure.core/+
10:35clgv sattvik: I have 'bar and want to get 'foo/bar
10:35clgvwhere 'foo is the namespace in which 'bar is defined
10:35gfredericks,(->> '+ resolve meta ((juxt :ns :name)) (map str) (apply symbol))
10:35clojurebotclojure.core/+
10:35sattvikI see.
10:36gfredericksclgv: ^ that oughta work eh?
10:36clgvgfredericks: better without meta since meta is additional information.
10:37gfredericksmeta is additional information?
10:38clgvgfredericks: if you have a look at defn you'll see that the meta information is added to the variable after it was created.
10:38clgvthat was what I meant with "additional"
10:38gfredericksso it doesn't work with def I suppose?
10:39gfrederickslooks like it does
10:39gfredericksso I don't think it is specific to defn
10:39gfrederickswith def I get :ns, :name, :file, and :line
10:39clgvhmm.
10:40kephale,((symbol (apply str (rest (rest (str (var +)))))) 2 2)
10:40clojurebot2
10:41neotykdnolen: regarding CLJS-{35,161}: I'm afraid repl fix will be tough, using file protocol, all tests in crosspagechannel_test from GClosure fail :/
10:43jsabeaudryIs (js/FormData. ($ "form.myform")) the correct translation of "new FormData($('form.myform'))" ?
10:44xumingmingvi have reader something about clojure 1.4's data readers, i know what it is
10:44xumingmingvbut dont know why it is important
10:45xumingmingvcan anyone explain it a bit, what beauty can it bring?
10:46gfredericksyou can watch rich hickey talk about it on the video of his conj talk
10:49rhcgfredericks: conj talk?
10:49dnolenneotyk: is there a websockets channel? would that work?
10:50gfredericksrhc: xumingmingv: http://blip.tv/clojure/rich-hickey-keynote-5970064
10:50clgvdefmulti is not redefined when I send the file to repl again? I changed the dispatch function and this change was not reflected before a repl restart
10:50neotykdnolen: looking how server backend for browser repl is done, I would not dare to move it to WS
10:50rhcgfredericks: ah thanks
10:51neotykdnolen: also, it would only work in Chrome ;-)
10:51timvisheranyone know of a clojure test coverage tool?
10:52_KY_Can I still use clojure-contrib?
10:52_KY_I'm trying to use this but failed:
10:52dnolenneotyk: I wonder if we could provide a minimal static file server in clojure and write a script to trigger it?
10:52_KY_http://richhickey.github.com/clojure-contrib/combinatorics-api.html
10:52lazybotNooooo, that's so out of date! Please see instead http://clojure.github.com/clojure-contrib/combinatorics-api.html and try to stop linking to rich's repo.
10:52gfredericks_KY_: clojure.core.combinatorics is the new library
10:52dnolenneotyk: script/open index.html
10:52gfredericks~contrib
10:52clojurebotMonolithic 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
10:53dnolenneotyk: I'm not against moving to latest Closure but we should provide a simple solution for CLJS consumers.
10:54xumingmingvgfredericks thanks
10:54neotykdnolen: I'm on same page
10:54neotykdnolen: we have web server already, browser repl backend is minimal http server
10:55dnolenneotyk: k, if you're will to adapt that for servering index.html to support browser REPL I'm ok w/ that.
10:55dnolenneotyk: whatever we do it should be easy for tools like lein-cljsbuild to hook into.
10:55dnolengotta run.
10:59_KY_gfredericks: I'm looking at this and can't figure out what to say in project.clj
10:59MordusWhat do people use in Clojure to write SOAP clients?
10:59_KY_https://github.com/clojure/math.combinatorics/blob/master/pom.xml
11:00gfredericks_KY_: it's line 4
11:01_KY_gfredericks: but what's the string that goes before the version number?
11:02gfredericksorg.clojure/math.combinatorics
11:02gfredericksformat is group-name/artifact-name
11:02gfredericksthe group you have to get from line 8
11:02gfredericksthe artifact is line 3
11:03gfredericksif 0.0.3-SNAPSHOT doesn't work, try 0.0.2, since there's a tag for that
11:04MordusWhat do people use to write soap clients in clojure? I have a project that requires this and I'm having trouble doing it in Perl. Hoping that Clojure offers something better.
11:08clgvMordus: I didn't read about any clojure lib for SOAP but there should be plenty for Java. So you can use one of these with Clojure's good Java interop capabilities
11:08_KY_gfredericks: thanks, that works now =)
11:08gfredericks_KY_: great
11:09clgvMordus: do you need SOAP explicitely?
11:10clgvthere is a remoting lib called slacker if you only need remote procedure calls in general
11:10MordusYeah, the libraries I'm accessing only work via SOAP with x.509 certificates. I'm trying to avoid the hell that is Java, with its layers of XML configuration files in arcane formats
11:11madsyWhen I open new files from different leiningen projects, I have to restart swank for the REPL to see the compiled file. Does this have something to do with slime's CWD and the classpath set by leiningen's project.clj?
11:12clgvMordus: http://www.mail-archive.com/clojure@googlegroups.com/msg18312.html
11:12madsyUh, I didn't just restart swank, but I terminated swank *and* the slime connection
11:13Mordusclgv: Thanks, I'll take a look.
11:18TimMcI'd like to see a persistent (both meanings!) DB that provides manipulation of multiple store types under the same transaction: Queues, relational stores, caches... I think the best approach would be a shared version ID between the individual stores.
11:18raekmadsy: what do you mean by "the compiled file"?
11:20madsyraek: C-c C-k in emacs to compile and load via slime/swank
11:21madsyraek: As clojure always compiles, I guess you can omit "compile" there. It supposed to load the code via swank
11:23raekmadsy: if C-c C-k succeeds, then the definitions in that file should usable immediately
11:23raekmadsy: CWD is not used in clojure-land
11:24raek*is not widely used
11:24raeksince you can't change the CWD after the JVM has started
11:25raekmadsy: can you describe the step that does not work?
11:28madsyraek: Yeah, hold on. I'll reproduce the exact error.
11:29nDuffWhat's the idiomatic way to get from [1 2 3 4 5 6] to [[1 2] [3 4] [5 6]] (both input and output being seqable, not necessarily vectors)?
11:30nDuffahh, partition
11:31gfredericksnDuff: also look at partition-all in case you need that behavior
11:32nDuffGood to know about, thanks -- though in this case, if it's not even pairs, that's a usage error.
11:33madsyraek: Hm, now it's gone. Must have been a one time thing.
11:38bdog66l
11:38bdog66l
11:40clgv,(throw (Exception. "bla") (Exception. "blubb"))
11:40clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.Exception: bla>
11:40clgvI would expect a compiler error since only one exception belongs in there.
11:40TimMc,(throw 5)
11:40clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Throwable>
11:41TimMc,(throw (Exception. "foo") 5 6 7)
11:41clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.Exception: foo>
11:41raek,(throw)
11:41clojurebot#<NullPointerException java.lang.NullPointerException>
11:41nDuff^{} notation in my macros (annotations for a gen-class declaration) isn't showing up during macroexpand. Should I worry?
11:42raeknDuff: have you enabled *print-meta*?
11:42TimMcclgv: I suppose that since it is a compiler special, it doesn't have the arity checking by default (and someone forgot to put it in.)
11:42nDuffraek: just did so; no change in macroexpand output.
11:45clgvTimMc: yeah thats probably the reason
11:45raeknDuff: unfortunately macros have to be written to propagate metadata correctly
11:46gfredericksusing with-meta can normally get around those issues, right?
11:46raekyeah
11:46raekbut the macro author has to be aware of it
11:47gfredericksthose silly macro authors
11:47gfredericksalso fretting about the macro publishing industry
11:52dnolenibdknox: so you got to have a long chat with Sussman, eh?
11:52ibdknoxdnolen: him, Piotr Mitros, and Dave something
11:52_KY_Lein has been downloading the index for 1:30 hours =(
11:52ibdknoxI didn't catch his last name
11:53dnolenibdknox: about Light Table?
11:53gfredericks_KY_: yeah that's so weird.
11:53ibdknoxdnolen: yeah :)
11:53dnolenibdknox: sweet! I'm sure Sussman was excited about the Lisp part ;)
11:53zanesdnolen: Dave Herman?
11:53_KY_Usually it's faster?
11:54gfredericks_KY_: dunno :(
11:54gfredericksin my experience it is usually longer than you want to wait for it
11:54raek_KY_: it took about 30 minutes for me last time :(
11:54_KY_Thankfully I'm not depending on it now...
11:54_KY_So I'll just leave it running
11:54TimMcMaven Central is overloaded.
11:55gfredericksthey should set up a KickContinuer
11:55TimMcIt should use torrents. :-)
11:55ibdknoxdnolen: haha they thought it was cool. Sussman had some neat ideas, some I had actually been talking to a friend about earlier in the day
11:55gfredericksor torrents
11:55gfredericksTimMc: we can't use torrents it'll confuse politicians
11:55gfredericksgotta keep everything black and white
11:56ibdknoxdnolen: it was funny conversation all in all. Piotr and Sussman end up arguing about whethoer not MITx was going to solve all the world's problems :D
11:56dnolenibdknox: haha
12:04goodieboyI'm working with a ring web app here... anyone know the best way to get the path to "resources" so that it works locally, and when deployed to a servlet container?
12:04goodieboyI'm messing around with clojure.java.io, i *think* that's the place to be looking?
12:06gfredericksgoodieboy: I don't think that's normally an issue
12:06gfredericksI put a directory in "resources/public" and use the ring middleware
12:06gfredericksshould be on the classpath in both cases
12:07goodieboygfredericks: well i actually need a working path, when the app first inits
12:07alexyakushevCould someone please tell if lein 2.0.0 honors the :extra-classpath-dirs option? Grepping through the sources yields no occurences
12:09goodieboygfredericks: so it's way before any kind of request comes in
12:13fdaoudibdknox: Sussman as in SICP?
12:13ibdknoxfdaoud: yeah
12:13fdaoudibdknox: wow that's awesome.
12:14ibdknox:)
12:14fdaoudibdknox: how many hours do you sleep/night?
12:14fdaoudor have you found a way to extend the number of hours in a day?
12:14ibdknoxhaha
12:15ibdknoxI sleep a normal amount
12:15fdaoudor to pause the clock?
12:15zanesibdknox: Have you been in contact with the PLT folks? I bet they'd have interesting things to say about Light Table.
12:16ibdknoxzanes: nope haven't heard from them
12:16jsabeaudryIs this the idiomatic way to call Math.round : (js/Math.round 5.5) ?
12:19ibdknoxjsabeaudry: seems reasonable
12:21gfredericksgoodieboy: yeah I believe there's a resource-path function in io, which I assume you've found by now
12:26metajackIs there something like iterate that takes a no-arg function? Or is (iterate (fn [_] (f)) (f)) the best way?
12:26ibdknox,(doc repeatedly)
12:26clojurebot"([f] [n f]); Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequence of calls to it"
12:27metajacki will add taht to see also for clojuredocs :)
12:27metajackthanks!
12:51ipostelnikis there a way to update var binding so that it's visible in child threads?
12:51mcrittendenanyone here tried emacs + evil mode? I'm a vim user but lots of emacs is pretty tempting, would like to get the best of both
12:58scottj_mcrittenden: it sounds like evil is the best right now, if that fails you can try viper or vimpulse
12:59mcrittendenscottj_: have you tried it? wondering about potential pitfalls when using such a non-emacsy emacs
13:00scottj_mcrittenden: I've tried it, I don't have a list of pitfalls, there was a blog post on that recently though it was from a non-vim user perspective
13:00mcrittendenah cool i'll look for that, thanks scottj_
13:00scottj_mcrittenden: http://dnquark.com/blog/2012/02/emacs-evil-ecumenicalism/
13:01mcrittendenscottj_: AWSESOME, looks packed full of info. thanks
13:08_KY_Can all my project files share the same namespace instead of each file its own namespace?
13:10tmciver_KY_: You should really stick to one ns per file.
13:10bsteuberibdknox: did you already do some research about how to do the webview thing? I'm asking because I need something similar for another cool cljs project..
13:10_KY_Ok...
13:11ibdknoxbsteuber: a little, mostly came to the conclusion that there wasn't a solid crossplatform solution for it
13:11ibdknoxbsteuber: in my case it'll end up built custom I think
13:11bsteuberdamn, I was afraid of that ^^
13:11ibdknoxbsteuber: you can use SWT though
13:11ibdknoxbsteuber: and just have different binaries for the different platforms
13:11tmciver_KY_: if you have code that you feel should be in separate files, then it should be in separate namespaces.
13:11ibdknoxbsteuber: at the very least it'll be the same code
13:11bsteuberI wonder whether it's easier to use a webview or offer IE support *sigh*
13:12bsteuberyes also read about swt before - might be the way to go
13:13bsteuberibdknox: but for you, SWT will be a no-go?
13:13ibdknoxbsteuber: not sure yet
13:13ibdknoxbsteuber: that's a late game problem in my case :)
13:15bsteubertrue that, we're already in an alpha stage, so we can't defer that much longer :)
13:18nsxtanyone have experience using hiccup with non-dev designers?
13:20bsteubernsxt: what we did was planning the rough html structure with the designer, then generate all html with hiccups, give him the app and let him just do the css
13:20bsteuberworked very nicely
13:21bsteuberibdknox: thanks anywayx - I'll tell you in case we have any success ^^
13:21ibdknoxbsteuber: please do, I'm very interested in what you find out :)
13:22_KY_In lein REPL, how can I re-load a file when I "use" it?
13:23the-kenny(use 'foo.bar :reload) should work
13:23zamaterianor :reload-all
13:23goodieboygfredericks: oh, no i didn't see the resource-path function! I'll check that out
13:24nsxtbsteuber: pre-planning sounds like a great approach - i guess as long as the html is firmly "semantic" you don't really have much to worry about, at least in terms of designers complaining about not being able to work on the html without knowing hiccup
13:25bsteubernsxt: exactly, when you generate div's only there's not so much html stuff to worry about
13:25nsxtbsteuber: that's weavejester's approach to it, anyway... i was just wondering how hiccup would work in a team with 5+ designers
13:26bsteuberof course you could try teaching them some clojure
13:26nsxtbsteuber: haha, it's not a terrible idea, especially seeing as hiccup's syntax is mind-numbingly easy
13:27nsxtbut i'm biased, obviously.
13:27bsteuberbut even in this case, they need to know what kind of data flows in
13:27bsteubergood model-view separation is needed anyways
13:33fdaoudcemerick: Clojure Programming was The Staff Pick in this week's "New Books In Programming" from http://anynewbooks.com
13:35StepanKuzminHi all!
13:36StepanKuzminHow can I call this function — layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); — in ClojureScript? I've tried (def layer (.OSM (.Layer js/OpenLayers) "Simple OSM Map")) but it makes layer = OpenLayers.Layer().OSM("Simple OSM Map");
13:37FrozenlockI have a ISO_8859_1 encoded string (in its own class). When I use the toString method and export the results, I have some weird gibberish instead of the accented characters. Is there a way to transform it into UTF-8? Something like (export (utf8 my-string))
13:37StepanKuzminIs there any way to remove second ()?
13:38BronsaStepanKuzmin: have you tried (.OSM (.-Layer js/OpenLayers) "Simple OSM Map") ?
13:38ibdknoxStepanKuzmin: (def layer (OpenLayers.Layer.OS. "simple OSM Map")
13:39ibdknoxforgot my js/ in front
13:39StepanKuzminI'll try it
13:39ibdknoxbut that's what you want to do
13:39StepanKuzminThanks!
13:40StepanKuzminThanks! (.Layer.OSM js/OpenLayers "Simple OSM Map") works great!
13:48jweissI'm trying to have a recursive function return a map, where one of the values is a call to the recursive function. but I can't use recur this way because it's not in the tail position. I don't see how I can use an accumulator either, because the next call won't know where to insert into the accumulator.
13:49jweissi can just have it eat up the stack, because i'm pretty sure i won't blow the stack, but if there's a simple solution using recur, i'd like to do that
13:49mefestojweiss: code example?
13:50jweissmefesto: one sec
13:50jweissmefesto: https://refheap.com/paste/2383
13:51jweissthat's the stack consuming way, obviously ^
13:56mefestojweiss: perhaps make this a multi-arity function which would have the location of where to insert in the accumulator?
13:56mefestojust ate lunch so my brain isn't fully functional atm
13:56jweissmefesto: yeah, i considered that, but that adds a lot of complication vs just consuming stack :)
14:00mefestojweiss: having it nested is a requirement?
14:01jweissmefesto: yeah, the tree is going to be walked breadth first, and order is important.
14:12goodieboyanyone know if it's possible to tell "lein ring uberwar" to ignore a directory in ./resources ?
14:18dgrnbrgI'm using lein1 behind a firewall, and I've copied lein-nailgun into the .lein/plugins/ directory, but it's not showing up as a task
14:18dgrnbrgI can't find anywhere else that I need to register the plugin
14:21fdaoudgoodieboy: not sure if that's what you're looking for, but I have in project.clj, :ring { :war-exclusions [#"something-to-ignore"] }
14:24goodieboyfdaoud: oh, yeah that might do it. Thanks.
14:25cemerickfdaoud: that's cool, didn't know about then
14:25cemerickthem*
14:28samaaronwub wub
14:32amalloyjweiss: one trick you could use is to store a ##(doc delay) as the value, and force it when you need it
14:32lazybot⇒ "Macro ([& body]); Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with force or deref/@), and will cache the result and return it on all subsequent force calls. See also - realized?"
14:51fdaoudgoodieboy, cemerick: happy to help when I can :)
14:53achinI'm having trouble with dynamic variables. This form works as expected: (binding [*v* 3] (map (partial + *v*) [1 2 3])) => (4 5 6). But this breaks with a "var unbound" error: (binding [*v* 3] (map (fn [n] (+ n *v*)) [1 2 3])). What am I misunderstanding?
14:53sattvikachin: It may be because map is lazy.
14:54dnolenwow bumping against 500 folks in #clojure today :)
14:54achinsattvik: Hmm. Sure, but wouldn't *v* be looked up any time it's needed?
14:54amalloyachin: that partial evaluates *v* once, before any mapping happens
14:54amalloythe fn you write yourself looks up *v* every time it needs to add. but because map is lazy, the binding has gone out of dynamic scope before its value is used
14:55sattvikachin: If *v* has no root binding, I can see how the error would occur.
14:55achinamalloy: Aaaaah. That makes sense. I hadn't thought of the map result being evaluated out of the scope of the binding.
14:55amalloycompare to ##(binding [*v* 3] (doall (map (fn [n] (+ n *v*)) [1 2 3]))), where you make sure all elements are produced inside the dynamic scope of the binding
14:55lazybotjava.lang.SecurityException: You tripped the alarm! pop-thread-bindings is bad!
14:55amalloysiiiiigh
14:55rseniorI have hit a snag with a defrecord that has a huge lazy seq, and I can't figure out how to get the defrecord to let go, so it can be garbage collected: https://gist.github.com/8a5125e7827abfbeb8d0
14:56achinamalloy: Thanks a lot.
14:57rseniorI can wrap the lazy-seq in a thunk, put the thunk in the record instead and then the defrecord isn't holding onto the head, but i was hoping to do something from within in the function that is being passed the defrecord
14:57hiredmanrsenior: in that kind of design it cannot be gc'ed
14:58rseniorhiredman: that's my current thinking
14:58hiredmanthere is a reference in a field of the deftype, and as long as there is a reference to the deftype
14:59rseniorhiredman: right, I've tried dissocing it from the record, handling it separately, etc, no luck, was hoping there was another way
15:00nDuffHmm.
15:00hiredmanthe way is to not have a reference to the head of the seq in the instance of the type
15:01muhooon heroku, is it LEIN_BUILD_TASK or LEIN_BUILD_PHASE ?
15:01rseniormaybe I'll run with the wrapping it in a function then
15:02technomancymuhoo: LEIN_BUILD_TASK
15:02muhoothanks
15:03technomancymuhoo: as long as you have user_env_compile enabled
15:03rseniorhiredman: thanks for the response
15:03fdaouddnolen: 500 people and a very high signal-to-noise ratio too :)
15:04muhootechnomancy: i do, thanks
15:05muhoothanks for such great clojure support on heroku too. making this very pleasant.
15:05nDuffcemerick: I'm connected into a REPL in a JIRA plugin via slime; the local classloader environment is rather odd. (pomegranate/add-dependencies) appears to do the right thing, but I can't use modules so installed -- the default incanter usage in the README yields "Could not locate incanter/core__init.clrass or incanter/core.clj on classpath", for instance. Any hints or pointers on where I should start looking?
15:06cemericknDuff: what does the result of (cemerick.pomegranate/classloader-hierarchy) look like?
15:08cemerickMulti-tenant app servers and *especially* apps with their homegrown module/plugin systems are likely going to be a PITA like this until someone burns through adding support for them (either in pomegranate itself or as separate addons).
15:08technomancymuhoo: glad to hear it =)
15:09nDuffcemerick: a few clojure.lang.DynamicClassLoader instances, followed by a org.springframework.osgi.util.BundleDelegatingClassLoader
15:09cemericknDuff: can you paste a pprint or something?
15:10technomancyslime in jira; nice
15:10nDuffcemerick: https://gist.github.com/617991f31df3d12f29cc
15:11mrb_bkoh hello there
15:11cemericknDuff: can you run it again? I'd like to know if the object IDs change with different REPL invocations
15:11nDuffcemerick: yes, they're changing.
15:11cemerickall of them?
15:12nDuffthe first two are the only ones showing IDs; I'd have to play some games to see if the BundleDelegatingClassLoader's identify shifts
15:14cemericknDuff: should work: (map #(str % (System/identityHashCode %)) (cemerick.pomegranate/classloader-hierarchy))
15:14muhoo&&(letfn [(valid? [{:keys [firstname lastname]}] true)] (valid? {}))
15:14lazybotjava.lang.RuntimeException: Unable to resolve symbol: & in this context
15:14muhoo&(letfn [(valid? [{:keys [firstname lastname]}] true)] (valid? {}))
15:14lazybot⇒ true
15:14muhoothat does not seem right
15:14nDuffcemerick: only the BundleDelegatingClassLoader stays constant.
15:15cemerickHrm, that sucks.
15:16muhooibdknox: actually, that's from the noir docs ##(letfn [(valid? [{:keys [firstname lastname]}] true)] (valid? {}))
15:16lazybot⇒ true
15:16muhoooh, duh, nevermind
15:16muhooibdknox: it's a multimethod, doh
15:16Raynesibdknox: Damn it, raise money.
15:17ibdknoxRaynes: hm? :)
15:17RaynesRaise money faster.
15:17ibdknoxlol
15:17cemericknDuff: unless that's an odd artifact of SLIME, then pomegranate's add-classpath strategy needs to get smarter.
15:17ibdknoxit got a good boost today
15:17ibdknoxfrom the kickstarter newsletter I guess
15:17RaynesI think you could get this over with quickly if you offered nude pictures under the 1k+ rewards.
15:17cemerickand someone will need to write support for this BundleDelegatingCL
15:17ibdknoxlol
15:17ibdknoxI'm sure that'd work :p
15:18ibdknoxmuhoo: I didn't follow that
15:18cemericknDuff: have you used pomegranate within SLIME locally?
15:18muhooibdknox: it was me being an idiot, nm
15:18nDuffcemerick: no, I haven't. Happy to give it a try if that'd be helpful.
15:18muhooi scroll down and my question was answered already :-)
15:19cemericknDuff: Please. I don't use emacs, but I've heard good things from others that do. Maybe there's something more general we can focus on.
15:21gtuckerkelloggi'm having what is surely a stupid problem with slime and clojure-test-mode
15:21nDuff(as an aside -- the classloader environment, at least in terms of how it ends up in the oSGI sandbox used by JIRA's version-2 plugin loader, is quite different between swank and nrepl; would have stuck with the latter if it weren't for nrepl lacking any frontend with functionality equivalent to slime)
15:22gtuckerkelloggthe first time I switch from a source file to a test file using C-c t, I am not placed into clojure-test-mode. I have to M-x clojure-test-mode or else everything goes haywire
15:22cemericknDuff: well, leiningen v2 and/or Counterclockwise…but, ok. :-P
15:25nDuffcemerick: the issue doesn't reproduce outside the JIRA's OSGi-sandboxed plugin environment.
15:25cemerickoooh, osgi
15:26cemericknDuff: something like this is required in that case: https://github.com/aav/clojure.osgi
15:28nDuffcemerick: *shrug* -- I was able to escape the OSGI classloader back in nREPL (by finding the classloader that loaded the OSGi classloader's implementation class itself and walking the tree back). Was hoping to do something similarly tricksy/evil here.
15:28cemerickThat said, I know little about the issues involved. lpetit did the heavy lifting with clojure.osgi and Counterclockwise.
15:29nDuff...but the swank environment is different enough that that doesn't work verbatim.
15:29cemericknDuff: you sound like you're just the person to untangle it all ;-P
15:30nDuffDepends on how long I can hold off the folks expecting me to get Real Work done. :)
15:30lynaghkdnolen: I'm doing some cleanup/profiling of my C2 library and I've run into some interesting cljs performance tidbits. E.g., copying a seq into a JavaScript array and running doseq on that takes half as much time as running doseq directly.
15:31lynaghkdnolen: (and using forEach on the js array is ten times faster than doseq)
15:32lynaghkthis in Chrome on CLJS head with :simple optimizations.
15:32gfrederickslynaghk: presumably doseq has an advantage for large/lazy seqs?
15:32dnolenlynaghk: last point makes sense, though that should hopefully improve w/ chunking, though I don't think it'll beat forEach on array, it should be competitive.
15:34lynaghkgfredericks: how do you mean? If you need to touch everything in a finite collection, is there an advantage to using seq?
15:34dnolenlynaghk: not sure about the previous point, that seems weird.
15:34lynaghkdnolen: yeah, last point makes sense. I was surprised with the first
15:34lynaghkdnolen: https://github.com/lynaghk/profile-cljs/blob/master/src/cljs/seq_test/test.cljs
15:34gfrederickslynaghk: if it's a larger-than-memory lazy seq, you can process it efficiently without having to have it all in memory at one time, as shoving it in an array entails
15:35dnolenlynaghk: will look into it, thx!
15:35gfredericks(doseq [x (take 1000000000 (range))] ...)
15:35lynaghkgfredericks: ah, good point.
15:35gfredericksso presumable the benefit lessens and disappears beyond some threshold
15:35gfrederickspresumably*
15:36lynaghkdnolen: rad, thanks! I was considering extending C2's unify! to accept js arrays for better performance on large datasets.
15:36gfrederickslynaghk: though it'd be interesting to know if the oddity you discovered means that even for large seqs you could speed it up by chunking them into arrays piece by piece
15:37felideontechnomancy: yay
15:38lynaghkgfredericks: yeah, definitely. Feel free to send some pull requests to that repo if you come up with any tests/benchmarks. If there's interest, I might put together some infrastructure to do nicer benchmarks and look at results historically so that we can track ClojureScript performance changes.
15:39lynaghkgfredericks: especially now that we're going to have some new backends by the end of the summer = )
15:39gfredericksnew backends?
15:40lynaghkgfredericks: one of the accepted Clojure Google Summer of Code students is modular-izing ClojureScript and writing a Lua emitter
15:40gfredericksah that's what all that talk's been about
15:41lynaghkgfredericks: I'm really jazzed about it, since it basically means I'll be able to get more performant code for iOS.
15:42gfrederickswoah what if we wrote a clojure emitter for clojurescript
15:43gfredericksthat idea was about 5 times less interesting than I expected it would be
15:43muhoo&(first (System/getenv))
15:43lazybotjava.security.AccessControlException: access denied (java.lang.RuntimePermission getenv.*)
15:43lynaghkgfredericks: I'm sure someone will do that, if he doesn't. Then I'd be able to kill my clj/cljs code rewriting abomination.
15:44gfrederickslynaghk: I was thinking you could just run on rhino but maybe there would be some kind of perverse advantage
15:44muhooare java methods not composable via juxt? i.e. this is failing: ((juxt .getKey .getValue) (first (System/getenv)))
15:44gfredericksmuhoo: use memfn
15:44gfredericksmuhoo: not to mention I think key and val would do the same thing as that example?
15:44muhoooh cool
15:45muhoono it works if not juxted
15:45muhoo(.getValue (first (System/getenv))) works, (.getKey (first (System/getenv)))
15:46gfredericksyes but I mean (val (first (System/getenv))) might do the same thing
15:46muhoooh, it does, thanks. makes sense
15:47gfredericksthus (juxt key val)
15:47muhoo((juxt key val) (first (System/getenv))), easy
15:47muhooactually what i really wanted was (map (juxt key val) (System/getenv)) , and i got it now :-)
15:47gfredericksdoes seq not work on raw java maps?
15:48muhooseq does, but it produces some weird #<UnmodifiableEntry
15:48gfredericks,(seq (doto [m (new java.util.HashMap)] (set m 1 2) (set m 5 6)))
15:48clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: m in this context, compiling:(NO_SOURCE_PATH:0)>
15:48gfredericksokay I don't know how to use doto apparently
15:49lynaghk,(seq (doto (java.util.HashMap.) (set 1 2) (set 5 6)))
15:49clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: core$set>
15:49muhooit's ok, (pprint (map (juxt key val) (System/getenv))) ftw
15:50lynaghk,(seq (doto (java.util.HashMap.) (.put 1 2) (.put 5 6)))
15:50clojurebot(#<Entry 1=2> #<Entry 5=6>)
15:50gfredericks,(map vec (doto (java.util.HashMap.) (.put 1 2) (.put 5 6)))
15:50clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unable to convert: class java.util.HashMap$Entry to Object[]>
15:50gfredericksweird error
15:53daniel_can i easily convert upper or lower case chars to the other case? \p -> \P
15:53daniel_i know i can do it with clojure.string/capitalize but this leaves me with a one letter string
15:53gfredericksyou can combine that with first at least; don't know if there's anything easier for chars
15:54daniel_ok, will just do that for now
15:54joegallo,(Character/toUpperCase \u)
15:54clojurebot\U
15:54gfredericksjoegallo: I was just about to look through the javadocs for something like that :)
15:57TimMc,(= \u0131 \i)
15:57clojurebotfalse
15:57TimMc,(= (Character/toUpperCase \u0131) (Character/toUpperCase \i))
15:57clojurebottrue
15:58gfredericksTimMc: uh oh computing is broke
15:58gfredericks,(println \u0131)
15:58clojurebotı
15:58gfredericksa headless i
16:02muhoois there any way in noir to get a handle on the, um, handler? so i can run route functions from the repl?
16:03muhoohmm, wait i see atoms noir-routes, etc. good
16:03muhoosweet
16:03antares_muhoo: you also can imitate requests with noir test helpers
16:07daniel_im having trouble with my 64 bit longs: https://gist.github.com/2502570
16:07daniel_only fails when the generated number is 64 bits long
16:08daniel_\r is the black rook on a chess board, so far corner
16:08dnolenlynaghk: accepting arrays probably an optimization worth doing anyhow.
16:09jodarohere is one of my favorite comments of the day
16:09jodaro/ Complete code duplicate from above because java \
16:09jodarocan't do pragmas
16:09jodaroyeah, pal, and you couldn't think of any other way to do it, huh?
16:09dnolenlynaghk: yeah I think Raphael will be tuning for LuaJIT performance, but I'm sure many of those choices will translate for regular Lua as well.
16:09lynaghkdnolen: yeah; it shouldn't be too difficult to do anyway.
16:09sattvikdaniel_: What are using to convert the string to a number?
16:10gfredericksjodaro: what are pragmas?
16:10dnolengfredericks: no sure if you followed along my conversation with rhickey yesterday - definitely seems like proper numerics is something worth thinking about if someone wants to take it on.
16:10gfredericksdnolen: cool I didn't see that -- that was in #clojure?
16:10lynaghkdnolen: Hmm. I wonder how JITless Lua compares with JavaScript on iOS anyway.
16:10jodaroi guess he wanted compile time stuff
16:10jodarono idea
16:11dnolengfredericks: http://clojure-log.n01se.net/date/2012-04-25.html#11:47
16:11jodarooriginal author is long gone, messing up someone elses code now
16:11gfredericksdnolen: cool thanks; I just got on the clojure dev list so I'll send out a note asking for confluence-page-create-rights
16:11dnolenlynaghk: JavaScriptCore is pretty fast.
16:11gfredericksdnolen: I'm in between jobs for the next 10 days or so so I might have a good amount of attention for it
16:11daniel_sattvik: java.long.Long/parseLong
16:12daniel_,(java.lang.Long/parseLong "10001")
16:12clojurebot10001
16:13daniel_,(java.lang.Long/parseLong "1000000000000000000000000000000000000000000000000000000000000000")
16:13clojurebot#<NumberFormatException java.lang.NumberFormatException: For input string: "1000000000000000000000000000000000000000000000000000000000000000">
16:13daniel_,(java.lang.Long/parseLong "100000000000000000000000000000000000000000000000000000000000000")
16:13clojurebot#<NumberFormatException java.lang.NumberFormatException: For input string: "100000000000000000000000000000000000000000000000000000000000000">
16:13daniel_hmmm
16:13daniel_,(java.lang.Long/parseLong "100000000000000000000000000000000000000000000000000000000")
16:13clojurebot#<NumberFormatException java.lang.NumberFormatException: For input string: "100000000000000000000000000000000000000000000000000000000">
16:13daniel_seems to be when it starts with 1
16:13daniel_,(java.lang.Long/parseLong "0100000000000000000000000000000000000000000000000000000000")
16:13clojurebot#<NumberFormatException java.lang.NumberFormatException: For input string: "0100000000000000000000000000000000000000000000000000000000">
16:13daniel_nope, im clueless
16:14dnolenhey OpenJDK 7 out for OS X
16:14metellusthat number is too big
16:15metelluslong is <= 2^63-1, which ~= 10^19
16:15gfredericksmetellus: I think he's trying to parse a binary number
16:15gfredericksthus the initial 0
16:15antares_dnolen: 7u4 final for OS X? is it official or just another preview update?
16:16dnolenantares_: http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u4-downloads-1591156.html
16:16sattvikdaniel_: Yeah, I think the problem is that it's too big. Longs are signed. I think Java is thinking you are tryint pass +2^64, which is outside of the valid range.
16:16daniel_i see metellus
16:17daniel_i need to represent a bitboard for a chess engine, perhaps long isnt the right choice
16:17daniel_,(java.lang.Long/parseLong "100000000000000000000000000000000000000000000000000000000000000" 2)
16:17clojurebot4611686018427387904
16:17daniel_i actually have a radix of 2, so it works then
16:17daniel_but still fails at the 64th digit
16:18sattvikdaniel_: java.util.BitSet?
16:18daniel_,(java.lang.Long/parseLong "1000000000000000000000000000000000000000000000000000000000000000" 2)
16:18clojurebot#<NumberFormatException java.lang.NumberFormatException: For input string: "1000000000000000000000000000000000000000000000000000000000000000">
16:18TimMcdaniel_: The chess engine constrains you to this choice of data structure?
16:18dgrnbrgdaniel_: you could use a primitive vector of longs
16:18antares_dnolen: oh, awesome
16:18daniel_TimMc: no, i dont have any constraints...just trying to find the best representation
16:18Chousukekeep it simple at first
16:19Chousukewrite functions to update and access the positions on the board, so you can change the internal representation later
16:19daniel_but a bitboard representation makes generating moves a lot easier and faster on 64 bit machines, its fairly common
16:19gfrederickschess engines are traditionally done pretty low level I think
16:19gfrederickslike C
16:19daniel_sattvik: i'll look into that
16:19TimMcdaniel_: Worry about speed later.
16:20TimMcdaniel_: Build a solid API around the abstraction of a board, then screw with the internals later.
16:20sattvikdaniel_: Well, you can use a long, but you won't be able to use parseLong (unless you take the two's complement of the number and append a -). You can manipulate a long directly using Clojure's bit-twiddling functions.
16:20Chousukeyou should be able to write an interface that doesn't care if you use a bitset or a vector of vectors of objects as the representation.
16:21daniel_TimMc: i think the representation of the board is a pretty fundamental decision, cant think how id create a solid API without having this decided
16:21bhenryhow can i get the value of an html multi select element as a list or vector that can be passed to a remote as a list or vector
16:21gfredericksdaniel_: do you need to parse binary strings at runtime, or are you just putting them in your source for compile-time-handling?
16:21bhenryping ibdknox
16:21ibdknoxbhenry: pong
16:21dgrnbrgdaniel_: you can make the board interacted with via a protocol
16:21dgrnbrgand then you can plug in different board implementations later
16:22Chousukedaniel_: I would start by thinking about what operations you need to provide to manipulate pieces on a board rather than bits in the board representation
16:22bhenryibdknox: i've got a call to jayq/val on a multi select element but it gives me an array which seems to create a problem when passing it to the remote.
16:22daniel_Chousuke: that depends on the representation, for example in a bitboard representation you can represent a pawn move by shifting the bits along 8 bits (goes forward one rank)
16:23Chousukedaniel_: you can provide lower-level functions later when you're done with your prototype
16:23rplevykibit people, someone copy this for Clojure: https://codeclimate.com/
16:23ibdknoxbhenry: there's a js->clj function in core
16:23rplevyor has someone already?
16:23Chousukedaniel_: yeah but you don't need to expose that detail to the user
16:23bhenryaha! i thought so. i'll give it a shot.
16:23Chousukedaniel_: you can give them just a "move-forward" function
16:24daniel_Chousuke: right, i see what you saying
16:24daniel_i'd probably have functions like pawn-moves knight-moves...
16:25daniel_the idea with the bit board is i can generate all the pawn moves by shifting the bits by 8, then do a bitwise and on all the other boards to find out if i've captured and pieces or if it's blocked by my own pieces
16:25Chousukeif you really need performance, you can use macros to eg. compile a vector of moves into a series of bit shifts and optimise. But still, I don't think you need to *start* with that :P
16:26daniel_dgrnbrg: like this? https://github.com/zmyrgel/tursas/blob/master/src/tursas/move.clj
16:26dgrnbrgdaniel_: yes, something like that
16:26dgrnbrgonce you know your API, you can always just swap out implementations
16:27daniel_they have chosen a 0x88 representation instead of a bitboard
16:27dgrnbrg(for testing, though, I recommend you avoid protocols--they make development hard)
16:27dgrnbrgjust keep them in mind and use them afterwards
16:27daniel_ok
16:27Chousukejust start with functions. you can add protocols later
16:27dgrnbrgthe best situation is that you develop the system 10x faster due to clojure's interactivity
16:27daniel_thats good to know
16:27dgrnbrgand then it's really slow to run, and you optimize it very quickly
16:28dgrnbrgdaniel_: the specific thing that sucks w/ protocols is that they don't play nicely w/ redefinition in an interactive setting, like a repl
16:30Chousukein Clojure itself protocols seem to be used mostly as an implementation-level tool, and the actual user-facing API consists of normal functions that use the protocol methods.
16:30OwenOuhi i am trying to follow the tutorial here in Heroku on connecting a clojure app postgresql, https://devcenter.heroku.com/articles/clojure-web-application
16:30OwenOubut i am getting this error: user=> (require '[clojure.java.jdbc :as sql])
16:30OwenOunil
16:30OwenOu(sql/with-connection (System/getenv "DATABASE_URL")
16:30OwenOu (sql/create-table :testing [:data :text]))
16:30OwenOuIllegalArgumentException protocol = socket host = null sun.net.spi.DefaultProxySelector.select (DefaultProxySelector.java:151)
16:30Raynestechnomancy: ^
16:31OwenOucould anyone help me a bit? thanks
16:31technomancyOwenOu: do you have the DATABASE_URL environment variable set?
16:31OwenOuyes
16:31OwenOuuser=> (System/getenv "DATABASE_URL")
16:31OwenOu"postgresql:///shouter"
16:31mefestois lein-cljsbuild known to work with lein2?
16:31OwenOuis this the right url to connect to it?
16:32technomancyOwenOu: I think it's "postgres://" instead of "postgresql://"
16:32technomancy(which is kind of dumb that jdbc cares)
16:32technomancymefesto: yeah
16:33rplevykibit / Clojure version of codeclimate -> code deodorant?
16:34rplevyor maybe patchouli , because no one wants their code to smell like a Phish show
16:34OwenOutechnomancy : same problem though: (sql/with-connection (System/getenv "DATABASE_URL")
16:34OwenOu (sql/create-table :testing [:data :text]))
16:34OwenOuIllegalArgumentException protocol = socket host = null sun.net.spi.DefaultProxySelector.select (DefaultProxySelector.java:151)
16:34OwenOuuser=> (System/getenv "DATABASE_URL")
16:34OwenOu"postgres:///shouter"
16:35dabdif i want to generate html in clojure should i go with enlive or hiccup?
16:35bhenryibdknox: still stuck at this https://gist.github.com/8a0063cd28d55e0f1799
16:35RaynesOr mustache.
16:36technomancyOwenOu: hm... maybe you need to be more specific: "postgres://localhost:5432/shouter"
16:36oskarthI like hiccup, but I think both are fine
16:36Raynesdabd: Any of these things are acceptable. Use whatever you like more and is appropriate for your application. If you've got designers doing the designing, separating HTML and code might be appropriate and thus enlive or mustache would be a good choice.
16:36technomancyOwenOu: I've seen it fill in the defaults if they are absent in some cases, but I guess it doesn't always?
16:37OwenOutechnomancy: you are right, it has to be explicit
16:37technomancyOwenOu: thanks for the heads-up; I'll be sure that's reflected in the article
16:37bhenryibdknox: side note, that fields->map function works on another form that's all text fields.
16:37ibdknoxbhenry: what is g if you log pr-str it to the console?
16:38bhenryi'll check. do you mean (.log js/console (pr-str g))?
16:38OwenOutechnomancy: you're welcome, thanks for your help :)
16:39dabdRaynes: I want to generate simple html files (tables) from clojure data structures
16:39RaynesThen hiccup is likely your best option.
16:39bhenryibdknox: same {:grpname "MEFAManager", :grpsubs ["[object Object]"]}
16:39dabdok thx
16:40ibdknoxbhenry: hm and what does it print without the js->clj?
16:41bhenryibdknox: {:grpname "Test", :grpsubs #<Array ["[object Object]"]>}
16:41ibdknoxthat's interesting
16:42ibdknoxbhenry: $("sdofij").val() is returning the string "[object Object]"
16:42mefestodoh
16:42mefestoi guess it helps if i use the right file extension for cljs files :)
16:43ibdknoxbhenry: are you sure the values are being set to what you expect?
16:43ibdknoxbhenry: I believe that is doing the right thing
16:43bhenryi don't know. basically i want to get the option values of the multiselect as some collection of strings that can be passed to the remote.
16:44bhenryibdknox: another side note http://i.imgur.com/YjLhY.png this hangs my cljs repl
16:44ibdknoxbhenry: yeah, the compiler doesn't handle redefs of core functions well
16:44ibdknoxbhenry: name it something else
16:45bhenrywhich core function am i redefing?
16:45bhenrysubs is a function?
16:47bhenryaaaahhaha. sheesh
16:52dnolenbhenry: ibdknox: that's fixed in master
16:52dnolennot sure when stuartsierra will cut the next release.
16:52ibdknoxdnolen: :)
16:52ibdknoxdnolen: I've been working against master
16:53ibdknoxdnolen: been good so far
16:53dnolenibdknox: we're trying not to break things :)
17:00muhoowhat could i be doing wrong, in noir, where (server/load-views "src/projectname/views") isn't loading src/project/name/views/user.clj ?
17:00bhenryibdknox: thanks for the help. i introduced a breaking change. you were right about the values being set wrong.
17:01ibdknoxmuhoo: if there's a compile error
17:01ibdknoxbhenry: np
17:01muhooi don't see any
17:01muhooif i manually (require 'projectname.views.user :reload) it compiles just fine
17:02muhooand then i can do load-views and everything shows up fine
17:02muhooin (pprint @noir.core/noir-routes)
17:02ibdknoxmuhoo: reloading might be hiding compile errors, specifically ordering issues
17:02muhooah, ok
17:03ibdknoxthat's bitten me at the repl a few times with Clojure in general
17:04yoklovhm, how large can JS integers be before they stop acting like integers?
17:04muhooslamhound to the rescue :-)
17:05mefestowhat is all this var CLOSURE_NO_DEPS = true; for and is it only needed for :whitespace optimization level in cljsbuild ?
17:05yoklovaha, 32
17:05yoklovi guess
17:06emezeskemefesto: I'm not sure I can explain it much better than https://github.com/emezeske/lein-cljsbuild/blob/master/example-projects/simple/src-clj/example/views.clj#L4
17:07mefestoemezeske: ahh thanks
17:07mefestoi know you've heard it before but lein-cljsbuild is quite awesome :)
17:08emezeskemefesto: Thanks!
17:14daniel_sattvik: why does parseLong fail on the 64 char string?
17:15fdaoudnow that's a funny nick
17:16dnolenyoklov: JS has 53bit integer.
17:17sattvikdaniel_: Imagine longs are signed 8-bit values, the biggest long you could get is 0111111. If you try to parse 10000000, that's outside of its range.
17:19daniel_i see, but you said i could use longs, but not parseLong
17:19yoklovdnolen: but bitwise operations only work on 32 bit integers, right?
17:19sattvikI believe that would be most negative value you could get. To give it "1000 0000", that would be the equivalent of -256.
17:21dnolenyoklov: ah yeah, they'll get converted it looks like
17:22daniel_why cant java have unsigned longs? :'(
17:22yoklovdaniel_: i'm pretty sure all its numbers are signed
17:22sattvikSo, to get the value of "1000 0000", you actually would have to use "-111 1111".
17:24sattvikNow, you can use a plain old long, but you'll need to use the low-level bit functionality, such as set-bit and test-bit.
17:25daniel_either way, it adds an annoying layer of complexity
17:25sattvikHonestly, though, I think you're getting caught up too much in trying to twiddle bits.
17:25daniel_how does the two's compliment effect bitwise operations i will want to do on it
17:26daniel_i am but what choice is there when Java doesn't have unsigned longs
17:26sattvikAs far as things like bit-set go, it doesn't know anything about the signed vs. unsigned. It's just bits.
17:28daniel_i wouldnt know how to use either bit-set or two's compliment atm, so i need to go away and try to understand them
17:28yoklovdaniel_: why do you want to represent this as bits then?
17:28yoklovusually the only reason to do that is when its either convenient or familiar
17:29yoklovor prohibitively slow
17:29daniel_so i can do bitwise operations to easily calculate capturing moves or off-the-board
17:29daniel_yoklov: i thought it would be convenient, i didnt see this problem
17:29yoklovare you sure that it's easier than the alternative?
17:30daniel_other representations would be less convenient in some other ways
17:30samaaronwhere middlewares essentially just modify incoming request maps in a chain
17:30samaaronand also similarly for outgoing responses
17:30samaaroni.e. all incoming requests flow through all middlewares
17:30samaaronand all all outgoing responses similarly flow through the whole outgoing middleware chain
17:31yoklovdaniel_: well, whenever i've ported c bit-twiddling code to java its mostly worked, but i've needed to use the >>> (unsigned right shift) operator (unfamiliar what this called in clojure/what the default behavior of bit-shift-right is)
17:32samaaronoops - ignore me please
17:32yoklovand if there's a spot in particular which doesn't work, i'd do (problem-spot >>> 0)
17:32_KY_How can I select which function to run in "lein test"?
17:33technomancy_KY_: `lein help tutorial` and look for "test selectors"
17:33yoklovdaniel_: ah, looks like clojure has no equivalent of >>>. shame
17:33yoklovhttp://dev.clojure.org/jira/browse/CLJ-827
17:36mefestoare there multiple ways to access a javascript objects properties in cljs?
17:36mefestoi saw something about (.-prop obj)
17:36mebaran151hey, quick map destructuring question: I'd like to make a keyword arg fn where I'd like to bind one special key to a local var and pass the rest as a map to my function body
17:37mebaran151possible?
17:37yoklovmefesto: (.-prop obj), and (. obj -prop) both work
17:37joegalloyoklov: of course, you can put it together pretty easily in a tiny mixed java & clojure library
17:37mefestoyoklov: thanks
17:37joegallobut it would be really nice to have that applied to clojure one day... :(
17:37yoklovmefesto: (also, if it's locally bound, obj.prop happens to work)
17:37yoklovbut that's just a quirk i guess.
17:38mefestois there a clojure equivalent for (bean obj) in cljs?
17:38yoklovmefesto: what would that do in cljs?
17:39mefestoyoklov: take the js obj and return a map of the props using keywords
17:39daniel_the problem is with parseLong i suppose, im trying to use a vector like [\r \n \b ... ] to generate the bitboard
17:39mefesto(bean jsobj) => (:prop jsobj)
17:39yoklovmefesto: js->clj is it, i think
17:40daniel_i wanted to avoid defining the initial bitboard (for all 12 pieces/colour) and generate it from one vector
17:40mefestoyoklov: cool thanks :)
17:40yoklovmefesto: you might want (js->clj obj :keywordize-keys true)
17:41daniel_i end up with a string "rnbqkbnrpppppppp...." and then i map 1 or 0 to the string depending on if the character matches for the piece
17:42daniel_nevermind, i'll end this crappy evening of longs and resume tomorrow
17:43FullmoonCan anyone recommend a non-trivial (echo, …) network server written in clojure to look at?
17:46technomancyFullmoon: you could try mire. it's a little dated, but it's a simple MUD.
17:48kurtharrigerdoes the new clojure 1.4 require syntax not support :rename ? I'm trying (:require [clojure-hbase.core :refer [with-table] :rename {get hb-get}) but this doesn't seem to work, thought the idea was that :use could be entirely obsolete
17:50technomancy:rename is kind of redundant with :require; just give it an alias
17:50technomancy:as hb, then hb/get instead of hb-get
17:51sattviktechnomancy: I'm trying to use the emacs-clojure-vagrant from the Seajure site, but it seems like it's not finding Jark. Is there a more up-to-date setup available?
17:52technomancysattvik: not yet, but I'm thinking of porting it to vmfest
17:53Fullmoontechnomancy: Mire?
17:53technomancyhttps://github.com/technomancy/mire <- the sample app from the peepcode screencast
17:54Fullmoontechnomancy: Yeah, I saw the screencast :)
17:54technomancyoh, cool
17:54kurtharrigerI decided I don't like using :as for for local project files as it makes moving functions between namespaces more difficult since I need to go change usages not just ns declaration... I'm okay with them for external dependencies but still prefer being explicit about which functions I'm importing
17:54Fullmoontechnomancy: Very land of lispy
17:55technomancyFullmoon: yeah, should have added a drunken wizard =)
17:55Fullmoontechnomancy: Looks nice, I'll have a look, totally forgot about it
17:56sattviktechnomancy: OK, thanks. I'll see what I can do with what I have. I'm new to vagrant, but I think I can work out most of the details out from here.
17:57technomancysattvik: just comment out the jark lines and you should be fine
18:04ritre\part
18:04mefestois this the idiomatic way in cljs? https://refheap.com/paste/2386
18:04mefesto^ line 11
18:04mefesto(.-SUBMIT events/EventType)
18:19yoklovmefesto: to be honest, the idiomatic way would likely be to use a wrapper around the closure libs
18:19wkmanireHowdy folks.
18:20yoklovor to abstract it a bit further before actually doing things, i guess
18:20yoklovi just use the dom. the closure libraries are weird
18:28emezeskeyoklov: I just use jayq
18:28emezeskeyoklov: It's much less boilerplatey than goog stuff I think
18:28yoklovemezeske: i sometimes use jayq
18:30yoklovemezeske: it's not complete though and i get little annoyed when I have to call a method on it or something
18:30wkmanireI'm really impressed by seesaw so far.
18:30wkmanireI don't think I've ever used a GUI library that was easier than this.
18:34emezeskeyoklov: Yeah, the incompleteness bugs me for sure
18:35emezeskeyoklov: I keep meaning to fork it and bring it up to 100%
18:36yoklovemezeske: yeah, the thought's crossed my mind on a few occasions. or at least to fix things like (on) so it handles its arguments the same as jquery does
18:36yoklovjquery has a somewhat large api though.
18:37wkmanireyoklov: Large, with some redundancies.
18:37yoklovwkmanire: certainly
18:37wkmanireAlthough I think in 1.7.1 they addressed some of that with .on for binding events.
18:40emezeskeyoklov: I'd like to fix at least the really silly things, like having attr but no remove-attr :)
18:41yoklovemezeske: yeah, it's that sort of stuff that bugged me
18:42yoklovbut as soon as I considered doing that the sheer size of jquery would daunt me
18:43ibdknoxyoklov: emezeske: jayq has on: https://github.com/ibdknox/jayq/blob/master/src/jayq/core.cljs#L186
18:43yoklovibdknox: yeah, but it handles its arguments differently than jquery itself
18:44yoklovthats what i mean, at least
18:44yoklovmeant*
18:44ibdknoxoh I thought I actually made it so all the common cases fell through
18:44ibdknoxI've not used on much
18:44ibdknoxso I dunno
18:45yoklovyeah, if you only give it an event and a handler it fails iirc
18:46ibdknoxtaking a cursory look that *should* work
18:46ibdknoxin any case, I would love pull requests for completeness :D
18:47yoklovif sel and data are missing, they're supposed to be treated as null
18:47yoklovas it is, i think ->selector gets the handler, and data and handler become null
18:47emezeskeibdknox: You might just get such a pull request :)
18:48ibdknoxyoklov: ->selector will just pass it through
18:49ibdknoxyoklov: and unless jquery went out of it's way to fuck it up, those nulls should be interpreted as a lack of those args
18:49ibdknoxso theoretically it'd work :D
18:49yoklovibdknox: hm, i see what you're saying
18:49yoklovibdknox: yeah i think that it really doesn't work though
18:49ibdknoxwell that's annoying
18:49ibdknoxso much for my being clever
18:49ibdknox:)
18:50nDuffcemerick: it's an ugly awful hack, but I'm able to escape the OSGi environment sufficient to allow pomegranate to do its thing.
18:50nDuff(actually, it's not _that_ ugly, comparatively speaking; the nrepl form was worse)
18:54yoklovibdknox: hm, you know, it really looks like it should work looking at the jquery source… I don't know, maybe my bug was elsewhere and I just attributed it to that? hm
18:54cemericknDuff: what did you need to do?
18:56ibdknoxyoklov: I claim ignorance
19:09mebaran151hey dakrone, does clj-http support the HTTP patch method?
19:09yoklovHm, waht's the syntax for number literals with different bases?
19:10dakronemebaran151: it doesn't, I had never heard of the PATCH method until now :P
19:11dakronemebaran151: huh, something I'll have to look at adding
19:11mebaran151here's the RFC: http://tools.ietf.org/html/rfc5789
19:11TimMcWhy not allow arbitrary verbs? :-)
19:13dakronemebaran151: out of curiosity, what API/website uses this?
19:13mebaran151dakrone: Salesforce API
19:13dakronemebaran151: interesting
19:14dakronemebaran151: do you have a way to work around it until PATCH is added? (using POST or something?)
19:14mebaran151for some reason they don't use put :/
19:15mebaran151the assumption of the API is that you drive it through curl, which seems kind of crazy to me
19:15septominsome google apis use patch also
19:15septominhttps://developers.google.com/drive/v1/reference/files/patch
19:16dakroneI'll work on adding it
19:17mebaran151oh this looks nasty: apparently Apache HttpClient doesn't even support it
19:18dakroneyea, you have to extend it yourself: http://www.mail-archive.com/httpclient-users@hc.apache.org/msg04246.html
19:19brehautthat code sums up java so well
19:19TimMcoh god what
19:20brehauttwo ways to get a string, and magic implemented somewhere else
19:21TimMcThe static final override just... wtf.
19:21brehautTimMc: for bonus though, getMethod doesnt even reference it
19:22mebaran151Salesforce has an official workaround wherein you do some weird overrides
19:23hiredmancurl is how big бизнес does rest
19:23mebaran151I was hoping to stay in clj-http land :)
19:24hiredmanactually it might work with clj-http-lite
19:24hiredmansince for URLConnection you can set the method as a string name
19:25dakronehiredman: "one of: GET POST HEAD OPTIONS PUT DELETE TRACE are legal"
19:25hiredmanoh, well damne
19:27mebaran151why is the PATCH method such a bastard child?
19:27mebaran151heh
19:32mebaran151I'm definitely confused why Salesforce is so gungho about using the PATCH method as well
19:43amalloygithub likes you to use PATCH for some of their APIs
19:43amalloybut i believe they accept POSTs since a lot of clients won't do PATCH
19:43yoklovso, i wanted to ask about this: does anybody have any ideas about how I can manage state better in cljs? when I made my game for ludum dare, threading the entire game state through every function wasn't really doing it for me
19:44yoklovor really, how to manage something like the state of a game in a functional language
19:44mebaran151Salesforce really pushes you to use SOAP, but compiling a WSDL seems so archaic with what is actually a really nice Rest API
19:44brehautyoklov: depending on your needs, you probably want either an atom closed over by the stateful functions, or a state monad
19:44mebaran151all you ever want to do in Salesforce is push objects into the system or get other objects that you then do some computation on so it works well, if only for the patch method :/
19:45brehautyoklov: although a state monad is probably going to introduce unacceptable function calling overheads in a game [caveat: i have no idea how goog closure would be able to optimise that]
19:46yoklovbrehaut: google closure mostly tends to do obvious optimizations
19:47brehautyoklov: from memory the clojure monad lib uses a dynamic vars to track the current monad functions
19:47yoklovhm
19:47brehautand the state monad adds about 3 function calls for every one function in monad
19:48brehautone of which (m-bind) is indirecting through the dynamic var
19:49yoklovthe most performance intensive part of games is typically just the rendering, and i can probably unpack everything I need before the rendering starts to happen
19:49mebaran151brehaut: I don't think algo.monads uses dynamic vars
19:50mebaran151a quick grep of the source didn't reveal any binding magic
19:51mebaran151but monads in clojure are funcall heavy
19:52yoklovhm
19:53ben_mYou could use the new tagged datatype reader macro thing to make monads prettier, I suppose?
19:53ben_mOr just write a (do ..) macro.
19:54yoklovben_m: the syntax isn't really my concern
19:54brehautmebaran151: the dynamic stuff is handled by with-symbol-macros from https://github.com/clojure/tools.macro/blob/master/src/main/clojure/clojure/tools/macro.clj#L232-235 which (from a quick look) does appear to use binding
19:54mebaran151ah I stand corrected
19:54brehauthttps://github.com/clojure/algo.monads/blob/master/src/main/clojure/clojure/algo/monads.clj#L161-171
19:54mebaran151yeah I looked through: I often think of monads as the rich man dynamic vars
19:54mebaran151I didn't realize how right I was
19:55brehautthats some complicated macro soup
19:55mebaran151brehaut: yeah it's unclear if the binding is compile time or runtime
19:55brehautmebaran151: in haskell they arent; they use the type system to evaluate the implementation statically, but we dont (yet) have return type polymorphism and static analysis in clojure
19:56amalloybrehaut: symbol-macros only use bindings at compile-time
19:56brehautah well. thats clever then
19:57mebaran151the funcall overhead is a little nasty though
19:57mebaran151and you get stacktraces, that compared to Haskell, can be hard to follow
19:57brehauthaha hasnt haskell only recently got stack traces?
19:57mebaran151I mean error messages :)
19:58brehautoh right, yes
19:58amalloyyeah, i can't think of any reason monads would need a dynamic var at runtime, since the m-bind etc functions are only meaningful in lexical scope
20:04mebaran151dakrone: with regard to the patch method, it looks like from your src, all I would have to do is (def proxy-patch-with-body (make-proxy-method-with-body :patch)) and then wire it up in request method
20:05mebaran151is there any reason why you wouldn't just change the case expression to condp and pass unknown symbols directly to proxy-method-with-body directly
20:06mebaran151then you could get support for even stranger verbs like MOVE, COPY, PROPFIND to a limited degree
20:13mebaran151what's the best way to import an external git project that you'd like to keep up to date into a project?
20:13mebaran151*lein project
20:14technomancymebaran151: try checkout dependencies
20:14technomancydescribed in the readme
20:14anierotechnomancy: no need for https://github.com/tobyhede/lein-git-deps ?
20:14mebaran151thanks
20:17technomancyaniero: yeah, I'd strongly recommend against that approach
20:17anieroohh, you're talking about the /checkouts dir?
20:17technomancyyeah
20:17anierocool
20:18technomancycheckouts augment existing dependency declarations rather than replacing them
20:24mebaran151cool
20:35wkmanireIs there anything for seesaw that will let me load my UI from a text file? Like XML for instance.
20:35yoklovwkmanire: it wraps swing, which doesn't do that (afaik), so it's doubtful
20:36amalloys/xml/clojure => yes?
20:36wkmanireamalloy: Yeah, I guess there really isn't much of a difference is there.
20:37wkmanireIn that regard.
20:39mebaran151wkmanire: you could also play with JavaFX 2.0
20:40mebaran151it has its own little XML style language for Java, though you'd have to do a little bit of Java wrapping
20:42wkmaniremebaran151: Interesting, but I'm building a tiny little thing as part of my Clojure studies.
20:43mebaran151oh then seesaw is by far the most straightforward: I use it to put together little gui's in the office
20:43wkmanireI'll just stick to "hard-coding" the UI. I say hard-coding, but as amalloy remind me, since clojure code is also data, storing the UI as an XML document doesn't really have an advantage over storing it as Clojure code.
20:43wkmanirereminded*
20:44yoklovespecially now with the extensible reader
21:16cjfriszJust in case you ever wondered....factorial of 500000 is a big enough number to make an emacs buffer really mad
21:16septomincemerick: something wrong with http://www.clojureatlas.com/org.clojure:clojure:1.4.0?guest=t
21:17cemerickbah
21:17wmealing_sleepcjfrisz, heh.
21:18cemerickseptomin: will be back momentarily
21:19cemerickseptomin: should be good now
21:19cemerickthanks for the heads-up
21:20septominwfm, thanks
21:20dreishTrying to find what used to be clojure.contrib.repl-utils/show and having a hard time googling it. Anyone know where it lives now?
21:46TimMcdreish: A combination of places, actually.
21:47TimMcBut none of them are really as good as the original.
21:47dreishJust the show function?
21:47TimMc~contrib
21:47clojurebotMonolithic 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
21:47TimMc"Migrated to clojure.repl and clojure.java.javadoc. show functionality similar to clojure.reflect/reflect."
21:48dreishAh, I see. Thanks.
21:50faitswulff_I have a shaky background in Ruby - I'm quite new to programming - but if I wanted to learn clojure, where should I start?
21:54wkmanirefaitswulff_: I'm currently learning it too.
21:54wkmanireThis is a great place to be.
21:54tomojthe "programming clojure" book is pretty good I think
21:55wkmanirefaitswulff_: It's actually advantagous, in my opinion, that you're new to programming and already exploring functional programming.
21:56faitswulff_tomoj: Thanks! I'll look into it. Can you recommend any free online resources?
21:56wkmanirefaitswulff_: It's been a real fight for me to stop trying to solve problems imperatively.
21:56FrozenlockIs there a trick to handle lazy seqs? I always try everything in the repl, but lazy are evaluated before they get printed. As a result, I often export files, only to realize too late it's written "clojure.lang.LazySeq@d2208dd" in them. :(
21:56tomojfaitswulff_: I don't think of any, other than this channel..
21:56faitswulff_tomoj: Okay. I'll get the book, then.
21:56amalloyfaitswulff_: you might like 4clojure
21:57faitswulff_wkmanire: I don't know what that means...but sounds good!
21:57tomojthat I don't think of any is very bad evidence that there aren't any
21:57cemerickfaitswulff_: Perhaps consider http://clojurebook.com. </biased>
21:57wkmanirefaitswulff_: Ruby is an imperative language. The way you use it to solve problems can be greatly different than the way you would use Clojure to solve those same problems.
21:57faitswulff_amalloy: Awesome, thanks!
21:57wkmanirefaitswulff_: cemerick authored a book I'm currently reading from.
21:58faitswulff_cemerick: I'm guessing you wrote...yep haha
21:58wkmanireIt's really good and a few others in the channel indicated it for me as well.
21:58wkmanireother than cemerick.
21:58cjfriszIf anyone saw the "Improving Constant-space Tail Call Support in Clojure" video via Youtube/Planet Clojure, I'm the presenter in the video
21:59cjfriszI just posted my code on Github if anyone is interested: https://github.com/cjfrisz/clojure-tco
21:59faitswulff_wkmanire: That's exactly why I'm interested in learning it - it's a different way of problemsolving
21:59metellusFrozenlock: maybe doseq or doall
21:59ibdknoxfaitswulff_: a fantastically awesome one ;)
22:00faitswulff_ibdknox: :)
22:00yoklovcjfrisz: you do CPS conversion?
22:00cemerickcjfrisz: I have that vid queued. Cheers for kicking up some dust. ;-)
22:00faitswulff_Well, I'm going to head out because this coffee shop is closing, but it was extremely informative! Thank you, guys!
22:00cjfriszyoklov: I indeed do CPS conversion
22:01yoklovcjfrisz: how big is the performance hit
22:01yoklov?
22:01wkmanireFrozenlock: I'm just taking a guess, but you could probably realize some of your lazy-seqs in the REPL for testing.
22:01yoklovcjfrisz: not that i'm criticizing you, it's super awesome, i'm just curious
22:01cjfriszyoklov: I'm seeing about 1.5x to 2x execution time from standard Clojure where it can finish the computation
22:02Frozenlockwkmanire: that's the problem... I don't see that they are lazy when I test in the repl.
22:02yoklovthat's actually not as bad as i would have expected
22:02cjfriszyoklov: I'm not particularly pleased with it yet, but the version I posted is very naive, and I have a lot of smart PL/compilers people who were at the talk and gave me advice
22:02wkmanireFrozenlock: The doc strings usually tell you if a function is lazy or not.
22:03cjfriszNext step is to add some smarter thunkification
22:06wkmanirechewbranca: Which client are you using?
22:06chewbrancawkmanire: Smuxi
22:07wkmanireI see you're still having trouble with your nick.
22:07chewbrancabecause it works on ubuntu with znc, had issues with passwords on xchat
22:07chewbrancayeah rather annoying, it defaults to using your system user account as the backup name.......
22:10anierois there good straightforward guide for getting cljs working? i'm getting missing requests for "deps.js", trying to use jayq, and it doesnt seem to be working
22:16amalloycjfrisz: in the video you mention scala's automatic self-TCO and don't know why clojure doesn't do it. the reason is that if it's automatic and "magic", you could easily write code that you think is a tail-call but ends up consuming stack because you did something wrong. a misplaced recur refuses to compile
22:16cjfriszamalloy: That makes sense
22:17amalloyif java got real TCO, i wouldn't be surprised to see clojure get implicit TCO as well, but until then it's explicit and that's tbh kinda nice
22:18alexbaranoskyonce you get used to recur, it is pretty simple to use, and like amalloy said, it has the benefit of not being "magic"
22:18cjfriszamalloy: If it were Scheme, I would reason that there's a lot more chance for rebinding names to different things, so it would be harder to guarantee that a name goes where you think it does.
22:18cjfriszBut Clojure is a little stricter on mutation than Scheme
22:19cjfriszamalloy alexbaranosky: I agree that the story for *self* tail-calls isn't egregious in Clojure with recur. It's just a matter that you don't get fully general tail-call optimization.
22:19cjfriszWhich is something that Schemers and MLers get spoiled on and is worth trying to implement.
22:32kovasbemezeske: I'm trying to use cljsbuild 0.1.8 .. what does it mean when the browser gives a 404 on "deps.js" ?
22:33LuminousMonkeyWhoops
22:34wmealing_sleepother than the obvious file not found ?
22:34kovasblol
22:34kovasbIm looking for a place in my code that would specify such a file..
22:35kovasbnot finding one
22:35kovasbso I'm guess it is generated by the compiler somehow
22:36wmealingi've done zero in clojurescript, sorry about that.
22:37kovasbits pretty rough
22:37kovasbi can't seem to find a build system that works
22:38wmealinglein deps ?
22:38kovasbno, u need to compile the clojurescript
22:38kovasbhence cljsbuild
22:38wmealingah
22:39wmealingdo you do something like this: http://jeditoolkit.com/2012/03/17/clojurescripting-intro.html
22:40kovasbI've done quite a bit of clojuresript
22:40kovasbalready..
22:40kovasbits just weird quirks that are making my head explode
22:41mefestomy head is exploding right now
22:41kovasblike, old versions of libraries getting compiled, after I've upgraded the dependencies
22:41mefestocan't seem to use goog.dom.query :-\
22:41yoklovemezeske: yeah, what _is_ the deal with deps.js?
22:41kovasbnathan is like, I'm outta here
22:41mefestoyoklov: heh i asked the samething earlier today
22:42yoklovi've just ignored it
22:42yoklovit happened around when i started using cljs head
22:43kovasbdoes anyone know if the files in .lein-XX get involved in the compiler?
22:43mefestoyoklov: i think this is the answer: https://github.com/emezeske/lein-cljsbuild/blob/master/example-projects/simple/src-clj/example/views.clj
22:43mefesto^ regarding deps.js
22:43kovasbnice
22:43kovasbgood find
22:43kovasbgoodbye whitespace..
22:44yoklovwait, so if we don't do that it happens?
22:44yoklovthat is… stupid.
22:45yoklovdoesn't cljs use a single file anyway?
22:45yoklovor at least, does anybodys not?
22:45mefestoyoklov: yeah when you compile in simple or advanced mode
22:45yokloverr
22:45kovasbi'd rather have multiple files
22:45kovasbmakes debugging easier
22:45yoklovno opts, simple opts, or advanced
22:46yoklovit's still all one file for me
22:46mefestoyoklov: yeah you're right. whitespace mode just requires that extra CLOSURE_NO_DEPS declaration
22:47kovasbanyone know what option makes it give multiple files?
22:47yoklovkovasb: i dont think there is one
22:47emezeskekovasb, yoklov, mefesto: So, if you set :optimizations and :output-to to nil, the default multiple-output-files mode is used
22:47emezeskeIf you just omit those options, lein-cljsbuild provides defaults
22:47mefestoah
22:48kovasbsweet, i will try that
22:48emezeskeWhen you turn on :whitespace optimizations, the optimizer is careful to not change any behavior, even the deps.js behavior (which is kind of silly)
22:48yoklovemezeske: how do i include it in my html if i don't specify an optput location
22:48emezeskekovasb: You don't want to do that, probably
22:48yoklovoh
22:48yoklovwhy not?
22:48emezeskeyoklov: Just set CLOSURE_NO_DEPS to false, and you're done
22:48yoklovmultiple files sounds nice
22:49yoklovnot having to debug a 20k+ behemoth
22:49emezeskeWell, I guess if you really want that, that's the way to do it
22:49kovasbemezeske: i want multiple files since this stale library problem is driving me crazy
22:49emezeskeOkay, yeah, try setting {:output-to nil :output-dir "my/dir}
22:49yoklovstale library problem?
22:50kovasbemezeske: somehow when I pull in new versions of my cljs library, the old ones are getting compiled.. (this is with cljs-noir, trying cljsbuild now to see if it goes away)
22:50mefestoanyone able to use goog.dom/query ?
22:50yoklovmefesto: try just importing goog.dom
22:50kovasbmefesto: i just use query..
22:50emezeskekovasb: Why do you need multiple output files though?
22:50mefestoyoklov: i have but i get an error on my js console
22:50kovasb*jquery
22:51kovasbemezeske: so i can quickly see which one got compiled
22:51mefestochrome's js console
22:51yoklovi think i've had to do that before to get subpackages
22:51emezeskekovasb: I see.
22:51yoklovhm
22:52kovasbemezeske: do any of the .lein directories get put on the compilation path?
22:52kovasbemezeske: one of my suspicions is that versions of files hang out in there and then get picked up by the compiler
22:53emezeskekovasb: Not that I'm aware of
22:53kovasbok
22:57kovasbemezeske: build spec here: http://pastebin.com/qWDWSCiv
23:00emezeskekovasb: I'm not certain, but I think you might want to set :optimizations nil as well
23:01mefestois there anything obviously wrong with this code? https://refheap.com/paste/2390
23:02mefestoeverything works except for the call to (dom/query "p") on line 18
23:02kovasbemezeske: I got it to work, but with a different set of options
23:02kovasbhttp://pastebin.com/hkgra8nN
23:03emezeskemefesto: Where does dom/query come from? I think that's maybe a third party addition to the google closure library that you don't have installed
23:03kovasbemezeske: I think I have an example of the ghost lib problem in this last compile
23:03mefestoemezeske: http://closure-library.googlecode.com/svn/docs/namespace_goog_dom.html
23:04mefestoall the other goog.dom functions work
23:04emezeskemefesto: I wonder when query was added to goog.dom? The latest tagged clojurescript compiler uses a very old version of the library
23:04emezeskekovasb: I don't think I fully understand what you mean by ghost lib problem
23:05mefestoemezeske: ah maybe that's it
23:06mefestodamn, i really want that :)
23:07mefestoemezeske: do you know if they plan to update that soon?
23:07emezeskemefesto: I believe it's up-to-date in HEAD
23:07emezeskemefesto: So whenever they do the next release
23:10mefestoemezeske: sorry for the silly question, im a total clojurescript newb, but does lein-cljsbuild use my install of CLOJURESCRIPT_HOME for it's work or does it bundle it's own clojurescript?
23:11anieroshould i be creating a deps.js in my cljs app?
23:12emezeskemefesto: Don't worry about asking silly questions. It depends on the latest tagged clojurescript release, and uses that. (So, it is pretty much bundled)
23:12emezeskeaniero: Probably you want to do something like this: https://github.com/emezeske/lein-cljsbuild/blob/master/example-projects/simple/src-clj/example/views.clj#L11
23:13emezeskeaniero: See the CLOSURE_NO_DEPS thingie
23:13muhooi *almost* understand what this means, but not quite; java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.IDeref
23:13mefestoaniero: <script>var CLOSURE_NO_DEPS=true;</script>
23:13muhooi was passing in a proper bound variable (i thought), created with def. what does it want, an atom?
23:14anieroahhh, thanks!
23:14muhooi also tried passing in #'something that way. it hated that too.
23:15anieroawesome, thanks. and i got jayq's document-ready to work too
23:20yoklovmuhoo: did you def it like (def foo)?
23:20yoklovor should it have a value and everything
23:21muhooyes
23:21muhoo(def foo {}) , then i called this thing with foo, got that error, called it with #'foo, got same error
23:21yoklovwell, somehow an unbound var is getting involved
23:21yoklovhm
23:21muhoomacro
23:21yoklovmybe there's a bug in the code you're calling?
23:21muhooit's a macro, i'll have to look at it more closely
23:22muhoothe code i'm calling is a macro, that is
23:22TimMcdreish: Here's some show-like stuff I'm playing with: https://github.com/timmc/handy/blob/master/src/org/timmc/handy/repl.clj
23:23muhooTimMc: that's very neat! i'd gotten only as far as this: https://refheap.com/paste/2391
23:23dreishTimMc: That looks nice. Looks like reflect just needs a wrapper like that to format the output.
23:24TimMchttps://refheap.com/paste/2392
23:27yoklovhaha: "finds some string in the mire of the loaded classpath"
23:30muhooyeah, i just wanted to see if something was loaded or not, and what version of it, before deciding whether i needed to add it to my deps
23:30kovasbwhew got my thing to work finally
23:30kovasbonce u go cljsbuild u don't go back
23:31emezeskekovasb: That's great to hear!
23:31kovasbemezeske: i have no idea what the problem was before, but I'm willing to attribute it to having multiple things trying to build the project
23:32anieroemezeske: any tips for debugging the :notify-command ?
23:32aniero["growlnotify" "-m"] just dumps a help message
23:32anieroand using ["echo"] prints a blank line
23:34emezeskeaniero: I don't actually work on a Mac, so I can't be too much help with growlnotify
23:34emezeskeaniero: I'd check into the man page for it (if it has one)
23:34TimMc$findfn #'long 'long
23:34lazybot[]
23:34TimMc$findfn #'long "long"
23:35lazybot[]
23:36anieroemezeske: aha, figured it out -- the example.project.clj file is missing the "%" argument, e.g. :notify-command ["growlnotify" "-m" "%"]
23:36anieroemezeske: or ["echo" "%" :beep true]
23:37mefestofor cljsbuild, the example shows in the project.clj that you can specify libs like :libs ["closure/library/third_party/closure"] ... where are these files? are they bundled and available on the classpath?
23:37emezeskeaniero: Oh, is that how it works? :)
23:37anieromefesto: i *think* those are files (that support the goog.exports stuff) that you have locally in your project
23:38emezeskemefesto: They will be pulled from anywhere on the classpath I beleive
23:38anieroemezeske: the pull request had the "%" in the config entry
23:38emezeskeaniero: Yeah, you're right. Shows how much I've used it!
23:38anierocljsbuild auto plus this notification thing is great!
23:39emezeske:)
23:39anieromeans i don't have to switch over to my terminal all the time
23:39emezeskeYeah, that is cool
23:40emezeskeaniero: I fixed the docs, thanks for catching that
23:41anierocool, yw
23:49mefestoemezeske: looks like goog.dom.query is defined in a third party library like you (or someone else?) said. it's in closure/library/third_party/closure/goog/dojo/dom/query.js ... how can i be sure that im including this file in my lein-cljsbuild project?
23:49mefestodoes :libs ["closure/library/third_party/closure"] include all files under that directory?