#clojure logs

2014-04-10

00:36mehworkin osx mavericks, i ran "brew install leiningen" but when i run lein it says "No java runtime installed". What's the right way to get it?
00:37beamsorun java at the command line to install a java runtime
00:37beamsoif you've got java installed already, look at what you've got your JAVA_HOME variable set to
00:37beamsoi have mine set to the output of /usr/libexec/java_home
00:40mehworkthanks, it says i need to install a jdk
00:40ddellacostais it still recommended to *not* install leiningen via homebrew?
00:41ddellacostaI thought most folks were saying not to
00:41beamsonot that i've heard
00:41ddellacostahmm
00:41mehworkshould i get jdk 7 or 8
00:41beamsoget jdk 8
00:41beamsomaybe the latest 7 release too
00:42beamsowhat was meant to be the issue with installing leiningen via homebrew?
00:42technomancyddellacosta: I have a low view of homebrew but I don't know of any lein-specific problems, just poor quality control in general.
00:42gwzhey, if I have four integers, is there a fast way to add them to a list or something and get the max value
00:43ddellacostatechnomancy: okay, wasn't sure if there was an "official" perspective on that or not, thanks
00:43technomancyearly on they didn't really bother reading the packaging instructions and goofed up a few things
00:43ddellacostagwz: I don't know what the performance is like on max but
00:43ddellacosta,(max 1 2 3 4)
00:43clojurebot4
00:43technomancyspeaking ex cathedra, if you're going to use a package manager, stick with apt-get or nix =P
00:44ddellacostatechnomancy: gotcha. :-)
00:44ddellacostatechnomancy: well, I think the basic install is just fine, and seems like one should let lein handle its updates itself
00:45ddellacostamehwork: ^ something to think about if you are not averse to installing lein outside of homebrew.
00:45technomancyddellacosta: yeah, I don't really see the point in any case other than just the brew command being shorter to type
00:45technomancyit's not like they do any security checks or anything
00:46beamsohomebrew does tell me that it's been updated :/
00:47kenrestivotechnomancy: ex cathedra? lein is a religion now, like emacs?
00:47kenrestivopope phil?
00:47technomancyPope Philip I
00:48johnwalkerhyPiRion: how do you create those diagrams on your blog? they're beautiful
01:22gwzhey, when I execute my program, I get a lot of these lines, #'user/startRow #'user/startRow #'user/startRow #'user/startRow #'user/startCol #'user/startCol #'user/startCol #'user/startCol
01:22gwzis there a reason for that
01:23beamsoare you printing something during execution?
01:24gwzno
01:24gwzmaybe hm
02:39magopianhello, I'm having an issue with "lein try": I'm trying "lein try enlive", but it doesn't seem to load enlive at all
02:39magopianhere's what I added to my ~/.lein/profiles.clj to activate lein-try: {:user {:plugins [[lein-try "0.4.1"]]}}
02:40beamsothat file looks okay from here
02:41magopianI tried it yesterday, and it was working fine
02:41magopianand today, it's not loading anything
02:41beamso'loading'?
02:41magopian(talking about lein-try)
02:42magopianyeah, sorry, i'm just starting with clojure stuff, i don't have the good vocabulary yet ;)
02:42magopianhere's what I'm trying: https://friendpaste.com/5fbZsNoe6VDwV60dmipGZk
02:43beamsotry (use 'net.cgrand.enlive-html)
02:43magopianah, much better beamso :)
02:44magopianso it was not lein-try not working, it's just my poor skills getting in the way, sorry for the noise :/
02:44beamsonot a problem.
02:48magopianenlive looks awesome, and so different from any templating engine i've used before
03:11ddellacostabeamso, magopian: fyi would recommend using require, not use
03:12beamsookay. why?
03:13TEttingeruse pulls everything into the current ns and can cause conflicts
03:13beamsookay
03:14TEttingerlike (use 'clojure.string) will be a problem since it overrides clojure.core/replace
03:14ddellacostabeamso: better to do (:require [some.namespace :as sn]) or [some.namespace :refer [var1 var2]]
03:14TEttingernot always, you of course can still use "use" if you know the conflicts won't be an issue, it's just not recommended
03:15magopianTEttinger: duly noted
03:16magopianso i should use require and provide a shortcut name?
03:16TEttingeryeah, especially for clojure.string
03:16ddellacostamagopian: that's what I usually do, unless I'm using a few specific vars from a namespace. For example, with string sometimes I'll use [clojure.string :refer [blank?]]
03:17TEttingerthat's good too
03:17magopianand here there's yet another way to do it: https://github.com/cgrand/enlive/wiki/Getting-started#html-source
03:17magopian(ns x (:use net.cgrand.enlive-html))
03:17ddellacostastrings a good example of a namespace that it is bad to use "use" on--you'll replace replace with replace. <-- love that sentence
03:18magopianhaha
03:18ddellacostamagopian: that enlive example is exactly what we are saying not to do.
03:18TEttingerI gotta say as an aside -- JVM regexes are really good. I'm always amazed at the things you can do.
03:18ddellacostamagopian: that is equivalent to calling (use 'foo), only in a file: (ns x (:use foo))
03:18TEttingers/\pP/!!!/
03:19ddellacostaindeed
03:20magopianddellacosta: thanks for the explanation
03:20magopianthe thing with require however is that you have to prepend all the functions with the namespace
03:20ddellacostamagopian: np. FYI, if you haven't read it I recommend this article, goes into depth: http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html
03:21magopianI haven't read much on clojure yet, but thanks for the pointer ;)
03:21ddellacostamagopian: again, you can also refer to specific names. It's more work, but it's about not clobbering your working namespace--safety. It's a good habit to get into.
03:21beamsomagopian: i don't think you have to prepend all the functions with the namespace with require
03:21magopian(i keep "try to start learning clojure" every few months, and each time i find myself lagging behind what i'd like to learn, and eventually droping it... and coming back at it a few months later ;)
03:22beamsoi think you can do a (require [library.name :refer :all])
03:22ddellacostamagopian: in the repl, playing around, it's fine--but again there are problems with that if you are trying to keep an environment consistent (in which case it's worth reading this: http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded)
03:23beamsoi kinda like the prepend because i can remember where the functions come from
03:23ddellacostabeamso: you can :refer :all, but that kind of defeats the purpose...
03:23magopiani find clojure (and fp in general) so good, and so much "the thing we should all do", but at the same time, it's so difficult on the brain (on mine at least)
03:23ddellacostamagopian: it takes some time to get used to, just be patient with yourself and you'll find it easier. :-)
03:23magopianthanks for the pointers ddellacosta i'll read that asap
03:24magopianddellacosta: a few years ago I was wondering why only a small number of developers where using FP instead
03:24magopianand so many where using imperative
03:24magopianimperative/oop
03:24magopianbut now i know: fp (and simplicity) is hard
03:25beamsoi think it's more a) what they learned early b) what was easier to hire for
03:25ddellacostamagopian: yeah, worthwhile questions to ask. I don't think the answers are so simple...but definitely a big part of it is just that it's easy to get used to something and stick with it.
03:25ddellacostabeamso: yeah
03:25magopianddellacosta: it's not only getting used to, i believe
03:25magopiani truly find it much more heavy on the brain to think in fp
03:25magopianthe end result is more concise, better, cleaner
03:26magopianand may be more readable (once you get used to it)
03:26ddellacostamagopian: well, assuming you are familiar with OO--was that simple to think about when you started? And is it simple to think about when you are trying to wrap your head around encapsulate state changing all over the place?
03:26magopianbut to get to the end result is really really hard
03:26ddellacosta*encapsulated
03:26magopianddellacosta: sadly, the average developer doesn't care about state that much in his daily work
03:27ddellacostamagopian: except when they are debugging late at night...
03:27magopianit's a pain, it's error prone, but it's not "hard" (not sure i'm using the correct word here, sorry, i'm not an english native)
03:27magopianddellacosta: that's what i'm talking about: the _average_ developer doesn't care about state in his _daily_ work ;)
03:27ddellacostamagopian: don't worry about English, lots of non-natives and your English is fine anyways. :-)
03:27ddellacostamagopian: ha, fair enough.
03:28magopiansome will feel the pain when they need to debug it, but it's only from time to time
03:28sjythere is a paul graham essay that says something like "OO is popular because it allows you to build enterprise software by accretion"
03:28ddellacostasjy: that kind of makes sense, yeah
03:28sjyi personally tried to teach myself programming for years and OO massively held me back
03:28magopianas an average developer, you just throw some lines of code together until something more or less works, and then add loads of "if" everywhere to repair it when it breaks
03:28ddellacostasjy: especially the Java model of OO
03:28sjyi felt like i was stupid because i didn't understand why everything should be a class
03:28ddellacostasjy: agreed...
03:29sjyand it wasn't until i did a first year haskell course and a bunch of python scripting that i really 'got' programming
03:29magopianbut it's not hard on the brain, you don't have to think about your code very hard and very long
03:29ddellacostasicp (at least, the first chapter, haven't finished it yet) really was what put me over the edge
03:29magopianyou're not productive, and debugging is a pain, but it's kinda easy in your everyday life
03:29ddellacostaI suppose
03:30ddellacostaOO is easy up to a point
03:30sjymagopian: i don't really agree with that (and i write OO code in my day job)
03:30magopianworking in FP i really feel like you have to think hard about everything, how to abstract, how to bind things together...
03:30ddellacostabut to write it well it's really reaally hard
03:30ddellacostaI think Haskell does OO better than OO, honestly
03:30sjyi find it incredibly burdensome to navigate through huge enterprisey OO hierarchies
03:30magopiansjy: it's burdensome, not hard
03:30magopianit's a pain, not hard
03:30sjyand i have trouble keeping track of things because any feature requires me to touch a million different files
03:31magopianagain, it's a pain, not hard :)
03:31sjynot sure how much of that is because of shitty design though
03:31ddellacostaI think that the point is that keeping that cognitive load is what makes it hard though, magopian
03:31sjythere probably exist nightmarishly complex fp projects
03:31magopianddellacosta: that could be a definition of "hard", i agree
03:32magopianwhat I find hard is function composition, passing around, higher order functions and the suc
03:32magopiansuch
03:32magopian(and enlive in that case feels hard, at least to me, but again, i'm just a beginner;)
03:32sjytrue. i'm probably biased because i was exposed to all of that stuff in math courses before i tried to use it to write software
03:33magopianenlive looks so much better as a templating engine than the one i'm using daily (django templates)
03:33magopianbut it's so much more complex to grok
03:34magopianwhen I design a template, I just use the (very) simple DSL, then follow the inheritance path by looking at the template it's "extend"ing, and on and on
03:34magopianI even have tools (the django debug toolbar) that gives me the list of templates used on a page, and the context for each of those template
03:36sjydjango is pretty nice :)
03:36magopianit's my day job ;)
03:36sjyi got to use it in my old day job. now i work on asp.net web apps :(
03:36magopianaouch
03:38sjyi'm just checkout out enlive now. have you done much with it yet?
03:38magopiannope, nothing at all
03:38sjyi'd be interested to know why you say it looks much better as a templating engine
03:39magopianjust reading and trying / playing around with the "getting started" and the like (have a look at https://github.com/swannodette/enlive-tutorial/)
03:39magopianno DSL!
03:39magopian(and i'm not even talking about the old PHP way, put code and html in the same file)
03:39sjyeven though jinja2 is pretty ugly, i think there's something to be said for not straying too far away from html when you're doing web development
03:39magopianyou take the html files from your designer, and BAM, you use them
03:39magopianno fiddling
03:40magopianyou need a RWD site? Just download the bootstrap example page, and voilà, use it
03:40ddellacostaI've used enlive a lot. My main complaint with it is all the macros with tons of confusing arguments. And the simple case of taking in a chunk of html and spitting out a data structure is not simple to do at first.
03:41ddellacostabut it's pretty good all of that aside. Unfortunately, it's kind of slow
03:41magopianno cutting/splitting your templates, no modifying it... (only in the source code i mean)
03:41sjyhmm, the idea of having pure html templates is pretty nice
03:41magopianddellacosta: ah, very good to have that kind of feedback, and being slow is a main drawback sometimes
03:42ddellacostathese days everything I'm working on is client-side, and there Om is killer (and there is an enlive-like lib for Om too, called kioo I think)
03:42magopianOm is from swannodette right?
03:42magopianit looks awesome also
03:42magopianusing some kind of shadow dom
03:43magopian(haven't played with clojurescript yet, but i'd like to)
03:44magopiani'm not that fond of client-side :) (or client facing at all, i'm a backend developer)
03:44sjyddellacosta: what kind of work do you use enlive for? do you work for yourself?
03:45ddellacostasjy: no, work for these guys: https://diligenceengine.com Our system is all Clojure/ClojureScript. We have moved from enlive back-end templating to a front-end in Om/Sablono (hiccup-style). But of course we still use basic enlive stuff for the low-level templating
03:46sjycool! do you work remotely?
03:47sjyi'd love to work for a company that used cool technology like clojure but there don't seem to be many of them outside the bay area (and i'm in australia))
03:47beamsosjy: where are you in australia?
03:47sjyperth
03:48beamso<-- melbourne
03:49sjycool :) i'm heading over to melbs soon actually
03:49sjyhave you worked elsewhere in australia?
03:49beamsoi know that thoughtworks uses clojure and they have offices in both perth and melbourne
03:49beamsoi've only worked in melbourne
03:49sjycool tech stuff doesn't seem to be as (geographically) concentrated here as it is in the US
03:50insamniacthe cult of thoughtworks
03:50beamsoioof advertised yesterday for a developer and they use clojure
03:50IceD^`US situation is total disaster ;)
03:51sjyIceD^`: yeah? i got the impression it was a pretty good place to be, employment-wise, for developers
03:51sjynot so much for every other industry
03:51beamsothoughtworks isn't great?
03:51insamniacI just find it funny that they refer to themselves as thoughtworkers.
03:52IceD^`my prev job was forcing me to move to valley
03:52beamsosjy: melbourne isn't bad but i think sydney is better
03:52IceD^`I liked working for them, but to avoid moving to usa/SV - decided to get another one
03:53sjybeamso: it seems to be pretty common for australians to think that other australian cities are cooler than theirs :P
03:53sjyespecially in perth. i like it here but i'd also like to try living in another city for a while to see what it's like
03:54beamsoit's more that some of the bigger/more software-oriented places are in sydney
03:54sjymelbourne and perth seem much nicer than sydney in terms of rent and getting around without a car
03:54sjyor with a car for that matter
03:54beamsosure, melbourne has rea but sydney has google, atlassian etc.
03:56sjyddellacosta: did you have any interest/experience/qualifications in law before you started working there? :)
03:56ddellacostasjy: nope, just Clojure. :-)
03:56ddellacostasjy: the legal part is interesting though, I've learned a lot (and have a lot more to learn)
03:57sjyyeah! i actually studied law, but the industry is kind of horrifying, which is why i'm a developer instead
03:58sjy(also because i got rejected from the few non-horrifying jobs i applied for)_
03:59ddellacostasjy: I get the feeling that law is a great field to be in...if you're not a lawyer. :-)
03:59sjywhat do you mean? it's an even worse field to be in if you're a client :P
03:59ddellacostasjy: or rather, if you aren't competing with other lawyers for gigs at the big law firms
03:59ddellacostasjy: I just mean in terms of being employed in the industry, such as it is
03:59ddellacostasjy: at least in the states, tough for new lawyers
04:00sjyah okay. i used to work in a law firm, the impression i got was that the non-lawyers don't have to work such long hours, but they get paid much less than lawyers and don't get treated with much respect
04:01sjysince they're invariably a cost centre
04:01sjybut i guess law industry != law firms
04:08ddellacostasjy: yeah, sorry I was just thinking in general about myself, being a non-lawyer in the legal field. But no doubt you're right about other non-lawyers...probably sucks.
04:13sjyddellacosta: and you're only making it harder for fresh graduates to find soul-crushing work locked in a basement for 15 hours doing doc review ;)
04:13ddellacostasjy: true, true...haha
04:50luxbockstyle question: I have three types of records that implement a common protocol and share certain functions together, but then there are certain functions which only make sense for one of the records
04:51luxbockin this case, would it be bad style to include those functions that are only used for a certain record type in the protocol as well, so that everything would be grouped together
04:51luxbockor should I just make them regular functions
04:52beamsothinking in an OO-way, i'd have said bad practice
04:52luxbockalright
05:51magopianis there a "sample website" or tutorial or something a bit "complete" that I could read/follow to get an understanding of what web development with clojure looks like for real?
05:51magopiani've read a few "getting started" small wiki pages, but it's very light
05:54scottjmagopian: there is a book, "web development with clojure"
05:58magopianscottj: ah, good, thanks: http://pragprog.com/book/dswdcloj/web-development-with-clojure ?
05:58scottjmagopian: yes
05:59magopianit looks very recent, that's nice
06:02magopianthanks for the pointer scottj ;)
06:02scottjmagopian: np, I haven't read it but I've heard good things about it, and I like the publisher, and for the recency and ebook price it's hard to beat.
06:03magopiansure
06:03magopiani have to get past my aversion for java
06:03vijaykiranscottj: a bit "old" but should give a bit of overview - http://vijaykiran.com/2012/01/web-application-development-with-clojure-part-1/
06:03magopianit keeps getting in the way of me picturing myself in a few years programming clojure instead of python ;)
06:04vijaykiranmagopian: I wonder how far you can go with Clojure, being happily ignorant of Java
06:04magopianwell, for starter, you need jetty as soon as you want to display a page
06:05magopianand jetty is _heavy_
06:05magopian(and just having to wait 10 seconds before lein repl displays anything is kind of a bummer to me being used to have something instantly ;)
06:05magopianbut i'll get past it, no worries ;)
06:05vijaykiranoh - you think Jetty is _heavy_ - which is considered light-as-a-feather compared to *cough*jboss*cough*
06:12magopianvijaykiran: well, i'm only comparing to what I know of already ;) (like gunicorn)
06:13clgvmagopian: huh why? you can let jetty run and see the updates as you redefine functions you work on
06:13magopianclgv: that's what i'm talking about: i'll get over it
06:14magopianit's not that bad, it's just some aversion against a part of my life where I was a java developer and not liking it that much, using eclipse which hate all my ram and kept crashing on me and stuff like that
06:14magopianand then discovering python and all its beautiful ecosystem, and living happilly ever after (until i met with clojure, and rich hickey's videos and all the sort, and now willing to go down the rabbit hole ;)
06:15AnderkentI don't know if 'hate all my ram' was a typo, but either way it's awesome and I'm stealing it
06:15clgvmagopian: what I meant is you just start it once for your repl dev session and then work with it
06:16clgvmagopian: well maybe you should http://downloadmoreram.com/ ;) SCNR :D
06:16magopianclgv: yup, i'm talking about the same thing: i'll get over the fact that it's slow and heavy when you launch it, because afterwards you just forget it
06:16magopianAnderkent: ah, yeah, it was a typo ;)
06:17Anderkentclgv: I'm working on a 2GB windows 7 laptop with full disk encryption doing java development #client-company-policy
06:17Anderkentbecause we love when tabbing to your browser takes 10s+
06:17Anderkent#thatswap
06:18magopianAnderkent: wow, can't you get a real job? it must be a nightmare working there!
06:18Anderkent(I actually end up reading code in vim instead if I don't have to do rebuilds)
06:18Anderkentnah, it's just one client, others are better
06:19clgvAnderkent: well that sucks. isnt that a good reason to justify hardware upgrades for more productivity?
06:20Anderkentcorporations, you can't reason with them :) I have a nice shiny macbook pro to do my usual development on, but clients security policy requires we work on their hardware :P
06:21AmandaCsounds like a giant can of NOPE
06:21clgvAnderkent: woa they must be developing The Next Big Thing™
06:47hyPiRion$mail johnwalker I use Graphviz to generate the images, and the code emitting Graphviz markup is "just" a fancy print function. I'll open source it in mid/late June.
06:47lazybotMessage saved.
07:18magopianvijaykiran: i just realised that the link you gave was written by you: thanks! It looks really nice, and it's awesome that it's talking about enlive (i'm playing with it at the moment and would like to use it some more)
07:25vijaykiranmagopian: :) sorry for shameless-self-promotion
07:40mercwithamouthany tips for reading larger functions in lisp?
07:43scottja comfortable chair :)
07:43mercwithamouthlol
07:44vijaykiranhammock
07:44llasramAvoid code with large functions?
07:44mercwithamouthinside out?
07:44magopianvijaykiran: it's awesome, thanks for having "self promoted" you ;)
07:45vijaykiranmercwithamouth: it is inside out - even for smaller functions
07:46vijaykiranmercwithamouth: if you can "refactor" while reading - giving names to intermediate "blocks" will help - I guess
07:46vijaykiranmercwithamouth: and there's always SO - http://stackoverflow.com/questions/1894209/how-to-read-mentally-lisp-clojure-code :)
07:46mercwithamouthhttp://stackoverflow.com/questions/1894209/how-to-read-mentally-lisp-clojure-code <-- like his example. functions like that scare me
07:46vijaykiranah :)
07:47mercwithamouthlol beat you =)
07:48vijaykiranmercwithamouth: in this case let+if looks very imperative
07:49mercwithamouthhrmm i suppose there's no other way than to write a lot more lisp
07:50vijaykiranmercwithamouth: mentally phasing out the ()s helps
07:50vijaykiranmercwithamouth: yes, that's the shortcut :)
07:50hyPiRionvijaykiran: The general advice is to write more lisp. But really, concat is a prime example on how to NOT write Clojure code
07:51hyPiRionMost of the clojure.core code is hard to comprehend for efficiency reasons
07:52mercwithamouthhyPiRion: well thats good to know =P
07:53hyPiRionOh, I ponged wrong person
07:53hyPiRionmercwithamouth: Just know that I consider e.g. concat incredibly hard to read, and I don't think I know any Clojure programmer which thinks it is easy to comprehend
07:54llasramI think it's just dandy!
07:54llasramIt does a ton of things backwards from how I'd recommend one write for readability. To be fair some of that is (probably) because the more-readable forms haven't been defined yet
07:54mercwithamouthhyPiRion: gotcha...very difficult. i'm looking at the game of life example in programming clojure right now...thats what made me stop and take a break
08:04magopianmercwithamouth: what i sometimes find difficult is that people don't explain how they're solving the problem
08:04magopianif you're used to solve the game of life with a board and squares and so on, you can't understand a piece of code that only deals with neighbours, and not board at all
08:05magopian(i mean, you can understand it... once you understand it's not using a "common" solution)
08:06mercwithamouthmagopian: ahh..very true. perhaps i should try to solve it in python then come back
08:06mercwithamouththe concept is foreign to me all together
08:06magopianah, then it's even more difficult
08:06magopianbut even in python, you can solve it using different approaches
08:07magopianif you could read french, i would point you to a blog post i wrote on the subject (well, sort of ;)
08:07magopianthe "easy" approach is to just use a board
08:07magopianand iterate on the board positions (x and y) and count the number of neighbours for each position
08:08magopiananother one is to drop the board altogether, and only deal with neighbours (when you initialize the game, you don't initialize cells on a board, you just initialize number of neighbours)
08:09magopian(the game of life is all about number of neighbours ;)
08:10mercwithamouthhrmm
08:11mercwithamouthi'll take a closer look at it over the next day or so
08:22Anderkentbrew install gimp
08:22Anderkentafgaerthyft
08:23AnderkentI eagerly await next generation OS'es where the window I'm looking at will automatically get focus
08:25vijaykiranAnderkent: perhaps all you need is a small script coupled with opengaze :)
08:25Anderkentwait, would that actually work?
08:27vijaykiranAnderkent: didn't try - but it could
08:30vijaykiranAnderkent: if you are on windows there's "gazemouse" http://www.gazegroup.org/downloads
08:36Anderkenthm, so there's opengaze and opengazer, are they the same thing? opengaze's home page seems down and their mailing list is full of spam ;(
08:38cymen_Man...
08:38cymen_I'm reading this om tutorial: https://github.com/swannodette/om/wiki/Basic-Tutorial
08:38cymen_And I gotta say the whole thing with the repl connected to the js app running in the browser ...
08:38cymen_mindboggling.
08:38Anderkentin a good way, though?
08:39cymen_Not sure yet, still looks like a magic trick.
08:39Anderkentnot any different than running a repl connected to a live clojure app; would that be mind bogglignt oo?
08:39cymen_Actually, yes.
08:40Anderkentwell, it's super useful and I'm very happy we bundled a http repl endpoint with our last webapp, makes debugging prod so much easier :P
08:40cymen_All these techniques for evaluating and compiling on the fly and changing the state of an app I find totally weird.
08:41cymen_I guess if I understood how it works under the hood a little more I would feel more comfortable. :)
08:41beamsoi find it kinda awesome
08:41Anderkenthym, but why would you want to restart things if you don't have to
08:41Anderkentyeah i guess knowing how it works helps; you know when you can safely swap things out and when it's risky
08:41cymen_But right now I just keep wondering about things like "what is the application state" "which program is currently in control" "who is processing these events" and stuff like that
08:41beamsoeven silly stuff like developing on ring and not having to reload .wars. madness.
08:41vijaykiranAnderkent: try https://github.com/OpenGazer/OpenGazer
08:41Anderkentbut as long as you're nicely pure you can redefine all you want! :D
08:42Anderkentvijaykiran: last commit 3 years ago? Not too promising ;(
08:42vijaykiranAnderkent: well - not having commits is not necessarily a bad thing :)
08:43Anderkenthow so?
08:44cymen_Does anybody know why application state contents for om have to be associative data structures and cannot be lists?
08:45vijaykiranAnderkent: it might mean it is "super-stable" - well It is interesting enough for me too - so I'll see if I can get the cocoa-gazer thing running
08:46Anderkentcymen_: I think you could put a list into the app state, but only at the 'leaf' level - i.e. you know nothing will try to descend into it
08:46clojurebotPardon?
08:47Anderkenthaven't actually tried it
08:47cymen_Anderkent: But why?
08:47Anderkentwhy what?
08:49hyPiRionhow?
08:49clojurebotwith style and grace
08:50CookedGryphonI'm trying to make css-safe html class names from arbitrary strings. Can anyone point me at an escaping library that will do that, or at least something that will let me map unicode code points over the string?
08:51CookedGryphonor ideally, something that will do "ab$%" => "ab_DOLLAR_PERCENT"
08:51CookedGryphonor something like that
08:52cymen_Why aren't lists allowed for anything that will descend them?
08:52Anderkentbecause you can't index a list
08:53Anderkentif you have a component that says 'oh I want [:contents :messages 5 :title]' that only works if everything inside is associative (i.e. a map or a vector)
08:55adieCookedGryphon: you could use java interop org.apache.commons.lang3.StringEscapeUtilsc
08:55adieCookedGryphon: you could use java interop org.apache.commons.lang3.StringEscapeUtils
08:55AnderkentI'm almost positive I was a function that would take a symbol(name?) and return the java-escaped name for it
08:55Anderkentbut can't find it now -.-
08:55hyPiRionAnderkent: munge?
08:56hyPiRionIt's not designed for escaping stuff though
08:56hyPiRion,(munge "hello-world!")
08:56clojurebot"hello_world_BANG_"
08:56hyPiRion,(munge "abab<?$½\"_")
08:56clojurebot"abab_LT__QMARK_$½_DOUBLEQUOTE__"
08:56AnderkentCookedGryphon: ^
08:56Anderkentoh
08:56Anderkentit doesn't do $
08:56Anderkentthat sucks :P
08:56llasramWhy would it?
08:57Anderkentyeah i guess it's a legal character in a class name
08:57llasram`$` is a valid character in JVM class names
08:57llasram:-)
08:57CookedGryphonand it doesn't do space either
08:57CookedGryphonnice try though
08:57Anderkentbecause it would be convenient for this use case!
08:57llasramhah
08:57CookedGryphonI don't think any of the stringexscape utils do what I want either
08:58AnderkentCookedGryphon: write it as a lib. It's not that hard I think: http://stackoverflow.com/questions/2812072/allowed-characters-for-css-identifiers
08:58CookedGryphonit's a pity you can't look up the unique names of unicode code points
08:59Anderkentother than googling 'unicode 0x1443' you mean?
08:59Anderkentoh, programmatically. right.
08:59CookedGryphon:P
08:59CookedGryphonright
08:59Anderkentwell, build a big map!
08:59Anderkent:P
08:59llasramYou can...
09:00llasramOr was that sarcasm?
09:00Anderkentand then 'class="c_c__UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_"
09:00llasramDamn thing is on the fritz again
09:00Anderkentllasram: how?
09:01Anderkentha
09:01Anderkentcodepoint.getName()
09:01Anderkentthat was easy
09:03CookedGryphonoh yeah
09:03Anderkent,(Character/getName 0x1443)
09:03clojurebot#<CompilerException java.lang.IllegalArgumentException: No matching method: getName, compiling:(NO_SOURCE_PATH:0:0)>
09:03Anderkentbah
09:03llasramHuh. Are both lazybot and clojurebot running Java 6 still?
09:03Anderkentseems so
09:03CookedGryphonexcept... it contains spaces and punctuation :P
09:03CookedGryphonso now I have to escape what that returns
09:03AnderkentCookedGryphon: just run .getName on all of those!
09:03Anderkentit's .getName all the way down
09:04CookedGryphonyeah, I'll just go write a function which iterates until it's a valid css name
09:04CookedGryphongreat idea!
09:04llasramhah
09:04minikomiUNDERSCORE_UNDERSCORE_UNDERSCORE...
09:05hyPiRionheh.
09:05hyPiRion,(munge "!!!")
09:05clojurebot"_BANG__BANG__BANG_"
09:06hyPiRionmight as well make gensym generator and redefine all the css names
09:07CookedGryphonI'm tempted to just map them all to a generated symbol....
09:09minikomi,(munge ”_BANG__BANG__BANG_”)
09:09clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: ”_BANG__BANG__BANG_” in this context, compiling:(NO_SOURCE_PATH:0:0)>
09:09Anderkentthose fancy double quotes. Oh, mac auto-format you.
09:10beamsowhat mac app does the auto format?
09:10minikomi#2swag4repl
09:10Anderkentnot sure about irc, but outlook keeps doing it to me
09:10tbaldridgewell there's your problem :-P
09:10Anderkentor used to until I managed to find the option
09:10minikomiI’m using colloquy
09:10tbaldridgeactually, come to think of it, only MS apps have ever done that to me.
09:11Anderkentfair enough, i actually haven't used many MS apps :P
09:11minikomi.. the quotes in this font are actually exactly the same. weird.
09:11hyPiRiontbaldridge: emacs changes " to `` and '' in latex-mode :p
09:27BobSchackschack683g10&Cat!
09:31ssiderisis that a password?
09:32BobSchackyeah my irc client stole my focus oh well
09:32hyPiRionit _was_ a password, I guess
09:34welderhow often has your password been schackattack?
09:36BobSchackA while, just for one account, and it's already changed :)
10:11CookedGryphonAnderkent, llasram, getName has turned into a very nice solution, thanks for your suggestions
10:14Anderkentreally? I'm curious to see that
10:14Anderkentalso your lib is now java 7 only
10:14Anderkentalso, you released is as a lib, right?
10:26cymen_What does the error "Unsupported binding form" mean?
10:27Anderkentcymen_: context?
10:28cymen_uh still trying that om tutorial.. clojure.lang.ExceptionInfo: Unsupported binding form: (dom/li nil (display-name contact)) at line 26 ...
10:28Anderkentusually it means you forgot to add in a binding form (like {name :key} or [args])
10:29Anderkentpost more code, it's probably the token before the (dom/li)
10:29cymen_Yeah, I had an extra set of parens around the type in a reify
10:29cymen_(reify (om/IRender ...
10:30cbpcymen_: maybe you need a map instead of nil
10:30cymen_It is really too hard to figure out such simple errors. :/
10:30cbpor just dont add nill?
10:30Anderkentoh. not sure why extra parens would cause that, probably something about how it expands
10:30cbpif it's not that then it's probably due to that function display-name
10:30Anderkentcbp: are you just guessing? li is not a binding form
10:31cbpI am =D
10:31cbpOh sorry I misread the error
10:31cbpNeed a paste!
10:32Anderkenthe already fixed it (cymen_> Yeah, I had an extra set of parens around the type in a reify)
10:32cbpI realy need some cofee.. sorry
10:33nbeloglazovIs it right that code compiled with clojure 1.6 won't run in clojure 1.5.1? Or I'm doing something wrong?
10:33Anderkentnbeloglazov: uh, depends on what you mean by 'compiled'. Code written for clojure 1.6 *might* work with 1.5.1 if it doesnt use any new functions. Code AOT-ed against clojure 1.6... I don't actually know, it might be the same
10:34Anderkentmight just not work if the internals changed, I guess
10:34nbeloglazovCompiled - AOT-ed against 1.6.
10:34Anderkentbut in general AOT is only supposed to work with exactly the same classes, I think
10:36nbeloglazovHm, is there general best practice of how to develop library that uses AOT and should work with different clojure versions?
10:36AnderkentI think the usual thing to do if you need java classes but want to target multiple clojure versions is to write a small java wrapper
10:36Anderkentthat's assuming you want AOT for a java api
10:37FrozenlockAny recommendation for bin-packing / stock-cutting in clojure? (or java). I found optaPlanner, but was wondering if there's anything else.
10:37Anderkentnbeloglazov: see for example https://github.com/sritchie/carbonite/blob/master/src/jvm/carbonite/JavaBridge.java
10:38stuartsierraIn general, AOT-compiled Clojure is not compatible across Clojure versions. However since about 1.4 the changes have been small.
10:41TEttingerFrozenlock, I haven't tried it but https://github.com/reborg/binpack is in clojure
10:41cymen_What's AOT?
10:41TEttingerahead of time (compilation)
10:41CookedGryphonAhead Of Time (compilation)
10:41CookedGryphonjinx
10:41TEttingerindeed
10:43FrozenlockTEttinger: thanks. This one is only 1D?
10:46TEttingerFrozenlock, I'm not any more familiar with the bin packing problem than wikipedia tells me
10:46FrozenlockI'm not much more knowledgeable myself. Thanks ;-)
11:54cymen_Can somebody explain this error to me: https://www.refheap.com/35acca127e6740acc7fa33844
11:55justin_smithsomething unbound was in call position somewhere
11:55justin_smithso a symbol not pointing to any value was expected to be a function
11:55cymen_This is the offending code part: https://www.refheap.com/c5086387303e9ffa3fc319169
11:55justin_smith(recor)
11:55justin_smiththat is your error
11:55Anderkentso it is
11:56Anderkentgood eye!
11:56justin_smithas you may expect, recor is unbound :)
11:56Anderkentalso wow talk about shitty error messages :P
11:56cymen_*sigh*
11:56cymen_teaching a man to fish and everything...is there any way to debug this?
11:56gfredericksjvm-clojure is much better in that regard
11:56gfredericks,(recor 1 2 3)
11:56clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: recor in this context, compiling:(NO_SOURCE_PATH:0:0)>
11:57justin_smithcymen_: programming is hard for us dyslexics, I do phonetic and letter transposition errors all the fucking time
11:57gfredericksI'm not sure what about cljs makes that difficult to detect
11:57Anderkent,(do (def recor) (recor 1 2 3))
11:57clojurebot#<IllegalStateException java.lang.IllegalStateException: Attempting to call unbound fn: #'sandbox/recor>
11:57jonasenAnderkent: you would probably have seen which symbol was undefined in the dev tools using source maps
11:57gtrakjustin_smith: oh man, props :-). I had a dyslexic roommate. He was *very* hard-working.
11:57justin_smithcymen_: well, I saw "cannot call method 'call' of undefined", then that was my clue to look for symbols that are likely typos of something bound
11:57cymen_jonasen: mind elaborating on that?
11:58Anderkentjustin_smith: yeah it's a huge pain if you mistype say keyword names
11:58justin_smithright, because that doesn't even throw any sensible error
11:58Anderkentit can cause a bug 20 lines away because nil came up instead of what you wanted
11:58justin_smithyou just get a nil on lookup
11:58justin_smithright
11:58cymen_indeed, I once completely messed up the map in my project.clj and got no error whatsoever just weird results
11:59jonasencymen_: (using chrome) right click -> inspect element -> click on the error -> read the cljs source which generated the error. If you have source maps set up
11:59cymen_I didn't do anything to set them up but I do get line numbers with the errors.
12:00cymen_Is that what you mean?
12:00justin_smithchrome will actually show you the cljs source
12:00justin_smithat the appropriate line
12:00jonasencymen_: do you see cljs or js?
12:00Anderkentcymen_: you should see your cljs code in the scripts tab
12:00Anderkentman, so many people saying the same thing
12:00justin_smithheh
12:01justin_smithit's the chorus of programming wisdom
12:01jonasenAnderkent: we're eager to help. That's a good thing I guess :)
12:01cymen_I do see my code in the Sources tab, yes.
12:01whodidthiswhat about when you println something and it shows the println fn from cljs.core, any way to fix that
12:01cymen_The error is three lines away from the recor, though. :)
12:03Anderkentwait, if I (defn foo! ...) and (defn foo_BANG_ ...) and then AOT
12:03seangrovebbloom: Probably up your alley http://acko.net/blog/shadow-dom/
12:03seangroveParticularly the conclusion
12:03seangrove"View and render trees are supposed to be simple and transparent data structures, the model for and result of layout. This is why absolute positioning is a performance win for mobile: it avoids creating invisible dynamic constraints between things that rarely change. Styles are orthogonal to that, they merely define the shape, not where it goes."
12:03justin_smithAnderkent: foo_BANG_ should be illegal as a first arg to def
12:03gfredericks,(fn foo_BANG_ [])
12:03clojurebot#<sandbox$eval72$foo_BANG___73 sandbox$eval72$foo_BANG___73@1c06877>
12:04gfredericks,(def foo_BANG_ "illegal?")
12:04clojurebot#'sandbox/foo_BANG_
12:04Anderkent'should'
12:04justin_smithyeah, I didn't mean that it is...
12:04seangroveI'm not 100% on board with that, but it's similar the my thinking at this point
12:04Anderkenthttps://www.refheap.com/74590 funz
12:05yotsovIs it possible to write a cljs app, which, once compiled to js/html, can receive a text input and execute it as cljs code? It sounds to me like at present it is impossible due to how the cljs compiler works...
12:05bbloomseangrove: the shadow dom ppl have their hearts in the right place
12:05seangroveyotsov: No, it's not possible currently
12:05bbloomseangrove: but the solution is not MORE crap in browsers, it's less
12:05yotsovseangrove: thanks
12:05bbloomseangrove: ask dnolen_ to rant about the shadow dom sometime
12:05bbloomhe said to me "now that i understand it, it's clear that they are insane"
12:06justin_smithyotsov: it can be done if you send it to the backend for translation (see cljsfiddle http://cljsfiddle.net/fiddle/jonase.async but yeah cljs is not self hosting
12:06yotsovjustin_smith: I see, thanks
12:06seangrovebbloom: Yeah, I've heard a few rants on it at this point
12:07cymen_isn't shadow dom the idea behind react and dnolen the guy who ported it to cljs? :)
12:07bbloomcymen_: absolutely not
12:07bbloomthe shadow dom is exceptionally complex
12:07justin_smithcymen_: different implementation of the same vague concept I think
12:07justin_smithreact does it much better
12:07dnolen_justin_smith: pretty much unrelated
12:07justin_smithoh, ok
12:07seangrovecymen_: I'd like to quote you on that ;)
12:07dnolen_Shadow DOM is the incidental complexity of trying to embed widgets into a Document Object Model
12:08cymen_don't quote me when I talk shit
12:08cymen_so...almost never
12:08dnolen_React treats the DOM as it should be, an implementation detail
12:08cymen_dnolen_: I'm not sure what your abstract or concrete concepts of widgets or DOMs are and cannot understand that sentence :)
12:09bbloomat this point, i'm only interested in W3C projects that further enable ignoring the W3C
12:09justin_smithdnolen_: I guess my perception of similarity was both being data structures with a special relationship to the DOM, but that's a thin thread I guess
12:09dnolen_cymen_: widgets are traditional object oriented widgets - DOM has nothing to do with that at all
12:09seangrovebbloom: Fantastic
12:10cymen_dnolen_: So a widget is something like a textbox and a DOM is an XMLish representation of a document?
12:10bbloomie webgl. a very safe and uninteresting design which carries forward many of the out dated designs of GL... but whatever, it means i can render games in the damn browser finally
12:10bbloomnext, i want a damn bytecode VM :-P
12:11gfredericks"DBV is a damn bytecode vm written in JavaScript"
12:11cymen_bbloom: There are Java Applets, there is Flash..what more could you want? :)
12:11dnolen_cymen_: widgets are the various kinds of identifiable reusable user interface objects that can implemented on top of whatever view/event abstraction you have available
12:12dnolen_cymen_: DOM is a specific view/event abstraction around web browsers
12:12dnolen_Shadow DOM tries to live inside that abstraction ... badly
12:15cymen_What is the intention of Shadow DOM?
12:15cymen_I mean the DOM already has UI widgets, right?
12:15gtrakdnolen_: do you think react or a similar approach might get browser buy-in in the future? :-). I hope we could get rid of DOM (since I don't want to learn it in the first place).
12:15bbloomcymen_: to undo the damage done by the poor (ie no) isolation model provided by dom elements
12:15dnolen_gtrak: nope
12:15dnolen_gtrak: would break the web
12:16seangrovednolen_: Well, they could just expose lower-level render primitives, etc. and that'd be enough for React to breath a lot more freely
12:16bbloomseangrove: the tricky bit is the etc
12:16bbloomseangrove: why hasn't canvas taken off for UIs? b/c that etc is hard.
12:16bbloom:-)
12:16seangrovebbloom: Nah, was less than 4 characters
12:16cymen_bbloom: Isolation of what from what?
12:17bbloomeach other
12:17bbloomstyles
12:17bbloombehavior
12:17bbloomsecurity
12:17gtrakbbloom: yea.. but we can pick and choose now, potentially.
12:17gtrakinstead of flatly abandoning everything like canvas
12:18gtrakor flash
12:18seangrovebbloom: True, it's tricky. We'll see what happens. Google closure is clearly in the "fuck it, we'll build everything ourselves" camp. http://closure-library.googlecode.com/git-history/0148f7ecaa1be5b645fabe7338b9579ed2f951c8/closure/goog/demos/index.html
12:18bbloomseangrove: and then they proceed to implement a bunch of stupid OOP crap
12:18bbloomhurray
12:18seangrovebbloom: Yeah, that was going to be my next lament
12:19seangroveBut it's google, whaddya expect? They have a culture, it fits in.
12:19justin_smith"let's replace js with python guys"
12:20bbloomheh, but that's the shit ppl really think
12:20justin_smithyeah, it's sad
12:20bbloom"javascript is the problem, let's put ruby in there!"
12:20bbloomum, no... javascript is A problem
12:20bbloomTHE problem are stupid suggestions like that one
12:20bbloomand the standards body that has their own stupid suggestions
12:21gtrakbbloom: this is why I love clojure.
12:21rasmustoif only I would have learned python as my first language...
12:21gtrakwe'll just do the thing you're trying to do better.
12:21seangroveIt's a psychotic world that's grown to hold (one of) the most important app delivery platforms and is heavily entrenched
12:21gtrakyou can still do whatever you want.
12:21justin_smithrasmusto: are you saying you have a masochistic streak?
12:23rasmustojustin_smith: dunno. I was taught matlab first, then moved straight to enterprise java (tm). Didn't really start programming until I did embedded C for robotics
12:23justin_smithgtrak: if you mean clojure is powerful enough to make something sane that targets whatever nonsense they come up with next, yeah
12:23gtrakrasmusto: i think it's a fine first language, unless you know ahead of time you'll want something better.
12:23gtrakthen scheme it up
12:24justin_smith(inc scheme)
12:24lazybot⇒ 1
12:24justin_smithbest first language evar
12:24gtrakjustin_smith: yep :-), sometimes doing bad things better makes you win.
12:24rasmustoI taught myself clojure by doing scheme homework in it
12:24rasmustothose problems seemed much more meaningful than the java junk I got
12:25gtrakthere's definitely something to be said for having any gratification at all when you're a newb.
12:25gtrakand python/js/ruby can give you that better, if it's what you need.
12:25ambrosebswhat's the best way to get in touch with the instaparse devs?
12:26justin_smithrasmusto: I look at it in terms of information theory - what ratio of the code on the page provides information about the problem and its domain
12:26ddellacostaambrosebs: I think email
12:26justin_smithrasmusto: I think that by that metric java performs pretty poorly, but scheme and of course clojure do very well
12:26ambrosebsddellacosta: seems like it
12:26gtrakjustin_smith: I want my code to be incompressible.
12:27justin_smithhah
12:27gtrakthus truly random.
12:27ddellacostaambrosebs: as far as Mark
12:27rasmustojustin_smith: I like that. But now I have to go check the SnR of my clojure code :o
12:27gtrakjustin_smith: but I'm serious :-)
12:28justin_smithgtrak: cat /dev/urandom > wtf.o; ld wtf.o wtf
12:28gtrakmillion monkeys
12:28Frozenlockugh.... my repl offers me some autocomplete fields, such as org.somelibrary.someclass/somefield. But when I press enter, I get this: CompilerException java.lang.RuntimeException: Unable to find static field: somefield in class org.somelibrary.someclass o_O
12:28gtrakis the unit of measure
12:29justin_smithrasmusto: it's kind of a rule of thumb to me. Also it helps me find a balance between terseness and inscrutability - a certain amount of redundancy, if it helps gaurantee communication from author to reader, is desirable
12:29justin_smithjust not so much that the redundance starts masking the task at hand, of course
12:30rasmustojustin_smith: oh, so the measure of code readability isn't whether or not a function uses a thread-last macro? (jokes)
12:30justin_smithheh
12:30justin_smithwith some A/B testing we could probably start to quantify said ratios, but just thinking of the concept helps
12:41Frozenlo`How can I call CloudBalancingHelloWorld from the repl? https://docs.jboss.org/drools/release/6.0.1.Final/optaplanner-docs/html/quickStart.html#cloudBalancingTutorial (section 2.1.4)
12:42Frozenlo`Doing (.main org.optaplanner.examples.cloudbalancing.app.CloudBalancingHelloWorld) just gives me a 'no matching field' error.
12:42AnderkentFrozenlo`: main is presumably a static method, so it will be (org.optaplanner.examples.cloudbalancing.app.CloudBalancingHelloWorld/main)
12:43Anderkent(otherwise you're calling the .main method on the Class instance for o.o.e.c.a.CBHW
12:43Frozenlo`Anderkent: That was the first thing I tried... CompilerException java.lang.NoSuchFieldException: main, compiling:(/tmp/form-init5170518960142646801.clj:1:9)
12:44hiredmanstatic main methods tend to take arrays of strings
12:45Anderkenthiredman: wouldn't that be a reflection error though?
12:50Frozenlo`Anderkent: hiredman: (org.optaplanner.examples.cloudbalancing.app.CloudBalancingHelloWorld/main (into-array [""])) Seems to give me a different error. Step in the right direction :-)
12:55seangroveDamnit, emacs macros always give me trouble
12:55seangroveerr, emacs' regexp
12:56rasmusto%s/emacs/vim :>
12:56Frozenlo`What? ////// you ////dont like ////emasc /////regexp? :-p
12:57rasmustocan't you just shell out to perl and call it good? :p
12:58Frozenlockseangrove: Just in case you don't know, there's M-x re-builder.
12:58seangroveFrozenlock: Ah, forgot about that, thanks
12:59seangroveTurned out not to be emacs' fault, something about find-grep-dired, so presumably something I was passingly incorrectly to grep
13:03abakergtrak: you should join the party in the stardog-clj repo ;)
13:03gtrakheh, sure :-)
13:03gtrakhaven't played with stardog yet. revelytix hasn't done rdf in a while :-)
13:04abakeryeah, my condolences on that one
13:04abakernext little side project when not doing NASA work is stardog.cljs, taking the existing stardog.js and building the apis around that
13:04gtrakyou should totally talk to paul if you haven't already
13:05abakeroh we are, he and I collaborated on stardog-clj
13:05gtrakhe wants to reimplement some mulgara algos in cljs
13:06abakernice, I'll have to ping him on the cljs topics
13:06gtrakabaker: also, if you haven't noticed. I'm *extremely* excited about the CLJS future :-).
13:07abakerwe're just wrapping up the core capabilities on stardog-clj, letting you easily deal with RDF without having to do things like, deal with Sesame APIs at all
13:07abakergtrak: i did notice!
13:08abakergtrak: we've been doing a ton of, get data into Stardog, exploit it with some reasoning and SPARQL, and then render viz in JS, I'd really like to start doing that in CLJS
13:10rasmustowill (into {} (map foo someseq)) realize all of that seq? (I assume yes)
13:14Bronsarasmusto: yes
13:14rasmustoBronsa: thank you
13:15TimMcrasmusto: clojure.core/into eagerly consumes whatever collection you hand it.
13:16rasmustoTimMc: is this because reduce is eager?
13:18Natalia1holaa
13:19Natalia1HALOOOOO
13:19Natalia1:P
13:20TimMcrasmusto: I suppose so, yes.
13:20Natalia1jajajaja
13:20Natalia1no se pasen
13:20Natalia1jajaja
13:21rasmusto~guards
13:21clojurebotSEIZE HIM!
13:21Natalia1:P
13:21rasmustoNatalia1: hello
13:21bbloomrasmusto: dammit. don't engage
13:21Natalia1Holaa !!
13:21Natalia1rasmusto
13:21Natalia1:)
13:22rasmustobbloom: I'm an optimist I guess
13:22Natalia1queee habla español
13:22Natalia1??
13:22lazybotNatalia1: Definitely not.
13:22clojurebot? is !
13:23bbloom~!
13:23clojurebotBOT FIGHT!!!!!111
13:23bbloomheh
13:26magopianwow, did you guys see https://github.com/cgrand/enliven?
13:26magopianthe successor to enlive?
13:27magopiani don't remember who i was talking with this morning saying that enlive was kinda slow, it seems this one solves the problem
13:28Natalia1jmk
13:28Natalia1HOLAAAAA
13:29Natalia1ESTOY ABURRIDA HAY ALGUIEN AQUII
13:29bbloomtechnomancy: you around? ^^^
13:29clgv,(def foo.bar 42)
13:29clojurebot#'sandbox/foo.bar
13:29clgv,foo.bar
13:29clojurebot#<CompilerException java.lang.ClassNotFoundException: foo.bar, compiling:(NO_SOURCE_PATH:0:0)>
13:29technomancyNatalia1: no habla
13:30rasmusto,#'foo.bar
13:30clojurebot#'sandbox/foo.bar
13:30Natalia2HM
13:30Natalia2K
13:30Natalia2HELLO oubiwann
13:31oubiwanntechnomancy: thanks ;-)
13:31clgvjust wanted to test if that dot is a problem
13:31@technomancyhopefully a ban won't be necessary
13:31bbloomhaha bot 1 quit and suddently bot 2 showed up
13:32bbloomtechnomancy: thanks
13:32rasmusto(inc @technomancy)
13:32lazybot⇒ 1
13:32bbloom$karma technomancy
13:32lazybottechnomancy has karma 105.
13:33bbloom$karma @technomancy
13:33lazybot@technomancy has karma 1.
13:33bbloomtechnomancy: sheesh, you're fucking karma rich my friend
13:33cbp$karma bbloom
13:33lazybotbbloom has karma 30.
13:33bbloomi'm but a humble karma begger
13:33Natalia1kgholaa
13:33Natalia1pueden hablar español
13:34Natalia1plisss
13:34bbloomtechnomancy: give it another go? :-/
13:37bbloomtbaldridge: i started to think about compiling in eclj, but i need to do an automated cps/trampoline transform first
13:38bbloomtbaldridge: and that will perform crazy slowly, so i've got to figure out how to do a "selective" transform ah la scala's delimc support
13:38bbloomthey use types, i intend to try to use abstract interpretation
13:38bbloomwish me luck :-)
13:40Natalia1please speak spanish :'(
13:40Natalia1pleaseeee
13:41fbernierhola?
13:41brunovYo ablo español
13:41brunovhablo
13:41brunovperdón
13:41Natalia1hay gracias
13:41Natalia1alfin
13:41Natalia1AL FIN
13:41Natalia1CONSIGO A ALGUIEN QUE HABLE ESPAÑOL
13:42Natalia1BRUNOV:-[
13:42Natalia1hola
13:43shoepie_i'm looking for help changing the keys of a map
13:43clgvshoepie_: that probably involves reduce-kv ;)
13:44shoepie_clgv: ooo, that sounds promising. thanks, i didnt want a full solution, just where to start. i couldnt find a function that seemed right
13:44Natalia1PLEASEE SPEAK SPANISH
13:45@technomancyNatalia1: this is an english channel
13:45clgvNatalia1: please stop your nonsense
13:45@technomancyif you continue with your harassment I'll ban you
13:45clgvshoepie_: but maybe you should state your problem completely
13:45cbpshoepie_: reduce-kv or (zipmap (map f (keys m)) (vals m))
13:46bbloomtechnomancy: you're totally the good cop. i'd just go around handing out bans like candy
13:46bbloomtechnomancy: hell, i might even ban myself
13:46@technomancybbloom: would rather avoid a /msg firestorm
13:47bbloomtechnomancy: surely a /ban + /ignore macro would do the trick
13:47tbaldridge"Oh we're doing good cop, bad cop? I thought we were doing bad cop, bad cop"
13:47@technomancybbloom: I need to get better with host masks, last time someone kept nick-hopping
13:47gfredericksdoes lein uberjar have a mechanism for excluding files from particular deps?
13:48gfredericksor some sort of conflict resolution?
13:48Natalia1pleaseeeEEEEEEEEEEEEEEEEEEEE
13:48brunovtechnomancy: kick her. I offered help in Spanish in private and she doesn't have any questions
13:49brunovshe's just trolling
13:49clgv:(
13:49RaynesGotta love when your channel gets to 800 people.
13:49Frozenlocktrolling on #clojure? That's a thing?
13:49rasmusto$google translate jurar
13:49lazybot[Jurar en inglés | Traductor español a inglés | English to Spanish ...] http://www.spanishdict.com/translate/jurar
13:49RaynesYes.
13:49Natalia1SPEAKTALK
13:49RaynesNo language is immune to popularity.
13:50RaynesAnd popularity invariably brings degenerates. :\
13:50gfredericksI see :uberjar-merge-with
13:50@technomancybrunov: thanks for the info
13:50clgvRaynes: 800 is popular already? ;) :D
13:50RaynesFor an IRC channel? sure.
13:50clgvah well that might be true^^
13:51brunovtechnomancy: no problem
13:51rasmustowait, I thought everyone had a vps persisting irssi...
13:55rasmustoquestion about maps/nesting: how should I split up a single map into different sections? {:a/a 1 :a/b 2 :b/a 3 :b/b 4} or {:a {:a 1 :b 2} :b {:a 3 :b 4}}, I assume the latter, but can anyone make a case for less nesting?
13:56clgvrasmusto: two-level hierarchy of maps seems ok to me
13:56rasmustoI haven't used namespaced keywords all that much, so this might not fit their use-case
13:56shoepie_clgv: thanks, reduce-kv was exactly what i needed
13:56justin_smithrasmusto: case against less nesting: it turns what could be composition of selectors into composition of keyword name parts. The former is better because simpler.
13:56rasmustoclgv: at most it would be 3-4 levels of hierarch
13:57clgvrasmusto: I think namespaced keywords are intended for so to say "private attributes" in a map
13:57clgvshoepie_: great :D
13:58rasmustookay, I think nesting makes sense then. I should only be dealing with vals from one two of these sub-maps at a time, and I'd rather not do a filter on those namespaced keywords, thanks all
14:01gfredericksdoes anybody know anything about a META-INF/services/java/sql/Driver.class file or similar?
14:01gfredericksthis seems to be something that comes with jdbc driver jars? but if you have multiple drivers and use an uberjar then one clobbers the other?
14:03gozalatbaldridge: got a few moments ? I would like to ask something about core.async
14:03tbaldridgegozala: sure
14:03gfredericksis this a problem with uberjars in general?
14:04gfredericksand despite all of leiningen's uberjar-entry-customization options it doesn't seem possible to specify which dep to get a file from
14:04technomancygfredericks: iirc uberjar stuff is on a first-wins basis
14:04technomancyso move it to the top of :dependencies maybe?
14:04gfrederickstechnomancy: oh interesting
14:06gfrederickstechnomancy: half-haxy but it works I guess
14:13rasmusto,(reduce (fn [m kvs] (assoc-in m (butlast kvs) (last kvs))) {} [[:a :b :c 1] [:b :e :f 3]]) ; nest some vecs
14:13clojurebot{:b {:e {:f 3}}, :a {:b {:c 1}}}
14:38bbloomtbaldridge: holy brainsplosion batman! i don't need to manually implement a CPS transform. I can simply port the interpreter from thunking CPS to direct style & then hook the eval function to inspect it's continuation & poof, i can *derive* the cps transform from the metacircular interpreter
14:38bbloomfucking computer science man.
14:38bbloomtime to add .eclj to my vim file extensions ;-)
14:42bbloomrasmusto: i'm attempting some pretty crazy shit :-)
14:45rasmustobbloom: you had me at "vim file extensions"
14:45bbloomhehe .eclj just sets vim in to clojure mode so that i can separate files that use my language extensions vs those that don't
14:46rasmustogotcha. Are you just converting raw clojure to CPS?
14:46bbloomrasmusto: i have a variant of clojure that supports delimited continuations
14:46bbloomthe goal is to be able to *selectively* transform to CPS in a way that only uses trampolining if necessary
14:47bbloommost code should compile to direct style wherever possible
14:47brunovgfredericks: to avoid that clobbering in a pure-Java project I had to use the mvn-shade plugin
14:47rasmustohm. do you have an example of a function that would benefit from a CPS transform?
14:47rasmustoI know of CPS by name/basic premise only
14:48brunovgfredericks: https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html, in resource transformers, the ServicesResourceTransformer will merge all META-INF/services/* files in a single dir in the resulting uberjar
14:48bbloomrasmusto: CPS has two meanings really. 1 is you pass the continuation like a callback argument, the other is that you do something like:
14:48bbloom(doc trampoline)
14:48clojurebot"([f] [f & args]); trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with supplied args, if any. If f returns a fn, calls that fn with no arguments, and continues to repeat, until the return value is not a fn, then returns that non-fn value. Note that if you want to return a fn as a final value, you must wrap it in some data structure and unpack it after trampoline returns."
14:48bbloomrasmusto: the most commonly cited reasons for CPS would be to get tail call optimization, which many consider a goal in itself
14:49bbloomi think that's a nice-to-have in 99% of programs
14:49rasmustoright, I think I knew about the tco motivation
14:49bbloombut i want to do this: http://lampwww.epfl.ch/~rompf/pldi2014.pdf
14:49bbloomand this: http://math.andrej.com/eff/
14:50rasmustobbloom: so your brainsplosion was: you don't have to work forwards, you just have to work backwards and see what happened?
14:50stuartsierrabbloom: JIT macros?
14:50rasmusto(batman)
14:50bbloomstuartsierra: it's pretty awesome.
14:51bbloomrasmusto: the brainsplosion was that a CPS transform can be automatically derived from an interpreter with reified delimited continuations
14:51gtrakgoing on the reading list :-)
14:51bbloomrasmusto: at least, i think it can. i have no evidence of this, but i'm like 90% certain
14:51gfredericksbrunov: oh interesting; I'm curious how adaptable this is to leiningen
14:51bbloomstuartsierra: the idea is that you can hook a function & inject code in to the compiler
14:51rasmustobbloom: interesting. Thanks for the reading material :)
14:51bbloomstuartsierra: in a sensible, composable way
14:52brunovgfredericks: me too, I haven't had the (mis)fortune of having to use it in a clojure project. In that Java project we used maven so it was just a matter of sacrificing a goat and producing the right XML incantations.
14:53gfredericksbrunov: do you know if these sorts of files are normally naively-concattable?
14:53bbloomstuartsierra: rasmusto: I want to have my expressivity cake and eat the performance too :-)
14:58brunovgfredericks: Yes. The file name is the interface to implement, and the content is a newline-separated list of the names of the concrete implementations
14:58clojurebotAck. Ack.
14:58gfredericksclojurebot: Yes. The file name?
14:58clojurebotTitim gan éirí ort.
14:58gfredericksclojurebot: gfredericks: Yes. The file name?
14:58clojurebotgfredericks: Yes. The file name is the interface to implement, and the content is a newline-separated list of the names of the concrete implementations
14:58seangroveWow, there's a W3C WebApps F2F meeting https://www.w3.org/wiki/Webapps/April2014Meeting
14:58gfredericksclojurebot: you are a weirdo
14:58seangroveI wonder what'll come out of that
14:58clojurebotI don't understand.
14:59llasramclojurebot: clojurebot is a weirdo
14:59clojurebotAck. Ack.
14:59johnnybl_How do you call a method on a classes ancestor? I have an OracleConnection and would like to call isValid on it which is defined in java.sql.Connection?
14:59gfredericksbrunov: oh interesting -- thanks!
14:59brunovgfredericks: np
14:59amalloyjohnnybl_: it exists on OracleConnection just like any other method
15:00johnnybl_That's what I thought also but I am getting a reflection error.
15:00justin_smithjohnnybl_: warning, or error?
15:00johnnybl_(ancestors oracle.jdbc.driver.T4CConnection)
15:00johnnybl_#{ oracle.jdbc.internal.OracleConnection oracle.jdbc.OracleConnectionWrapper java.sql.Wrapper oracle.jdbc.OracleConnection oracle.sql.ClobDBAccess oracle.jdbc.driver.OracleConnection oracle.sql.BfileDBAccess oracle.sql.BlobDBAccess oracle.jdbc.internal.ACProxyable oracle.jdbc.driver.PhysicalConnection java.lang.Object java.lang.AutoCloseable oracle.jdbc.internal.ClientDataSupport}
15:01johnnybl_error
15:01justin_smithcan you paste the error somewhere so we can see it?
15:01amalloyjohnnybl_: so, you can see that java.sql.Connection is not in that list
15:01amalloyattempting to call methods as if it were a java.sql.Connection will thus fail
15:02johnnybl_sec let me check api I believe OracleConnection has the same method.
15:03johnnybl_my fault looks like 12c updated jdbc to use isUsable... Dumb mistake thank for pointing out the obvious!
15:13miseria"hay ladrones tan ladrones que acusan a otros ladrones de ladrones y los mandan a capturar o asesinar legalmente 'democracia?'" bienvenidos: http://castroruben.com *temo_a_un_ser_sin_rival*
15:46gtrakbooted up monogame this morning, curious if anyone's tried to use clojure with it :-). or is C# so much more practical than java that it's not worth it.
15:47bbloomgtrak: what's java got to do with it? wouldn't it be clojure.clr ?
15:47bbloomalso, C# is a much more adventurous language than java. it's got some pretty neat shit in there these days
15:48gtrakright, that's what I mean. One of the big motivators to use clojure is because java hurts so much, C# is nicer.
15:48gtrakmonodevelop seemed pretty neat at first glance.
15:49gtrakso, in my first question, I meant clojure-clr.
15:50gtrakyou probably wouldn't want to build a physics engine in it, but.. you could do neat stuff.
16:01gtrakI guess clojure.core projects will never use cljx
16:02tbaldridgegtrak: once feature expressions come out cljx won't matter as much.
16:02tbaldridgebut of course we have to wait until that happens...
16:04gtrakyea, I'm just looking at XNA/monogame to help explain game-dev to a friend, but now I know clojure so well.. gears are turning :-).
16:25malyngtrak: You might want to look at play-clj; seems like a better fit than monogame..? https://github.com/oakes/play-clj
16:56bbloomthe only time i ever need to create a circular namespace dependency is when i have to implement java interfaces b/c you need to do it as part of the deftype or defrecord :-(
18:05mrb_bkyo yo
18:05mrb_bkoh whoops wrong window
18:05mrb_bkyo yo anyway :-p
18:05mrb_bkbbloom: hi
18:05bbloommrb_bk: hey man, what's up?
18:05mrb_bkdnolen_: nice podcast, enjoyed it
18:06bbloomoh yeah, i scrubbed through the podcast for 10 min or so. what i heard was good stuff as usual ;-)
18:06mrb_bki learned a lot about react/om that i wasn't familiar with
18:10bbloomtpope: i'd like to do something slightly crazy w/ fireplace & i was wondering if you could point me in the right direction
18:13bbloomtpope: i basically want to replace all instances of "clojure.core" with my own substitute namespace name depending on the current file extension
18:16bbloomtpope: thanks to you, i've become hopelessly dependent on sensible tooling, and all progress on eclj will halt unless i can make fireplace work :-)
18:17mrb_bkbbloom: whoah eclj looks insane
18:18bbloommrb_bk: it has not even begun to be as insane as planned yet
18:18bbloomlocally, i'm making progress on the metacircular interpreter
18:18mrb_bki can only imagine
18:18bbloom:-)
18:18mrb_bkvery cool
18:19mrb_bklooking forward to seeing progress
18:20bbloommrb_bk: cool. i'll keep you posted
18:25mrb_bkhttps://www.youtube.com/watch?v=IHP7P_HlcBk
18:42dbaschany idea why this is throwing html exceptions? https://www.refheap.com/74678
18:45dnolen_mrb_bk: thanks!
18:46mrb_bkdnolen_: looking forward to next week
18:46mrb_bksell any tickets yet? :-p
18:46dnolen_mrb_bk: yep
18:47dnolen_we'll keep promoting it, we really can't have too many people here anyway :)
18:48mrb_bkawesome
18:48mrb_bkdnolen_: bbloom: heading home for the night - gnight!!
18:49amalloydbasch: the body and response things looks a little dubious - you might be rendering that entire {:status 200 :body "test"} as a json map, rather than just the body
18:49dbaschamalloy: but if I request anything else, I get a 404 exception rendered as html
18:50dbaschamalloy: even this does it: https://www.refheap.com/74680
18:51dbaschamalloy: I’m running lein ring server-headless
18:51amalloyuhh, are you sure? you might have some stale code or something, because that last one looks pretty normal
18:51dbaschlein clean ; lein ring server-headless
18:52amalloyif so, be more clear about what's actually going wrong; i don't understand what "throwing html exceptions" means
18:52dbaschamalloy: I mean, I don’t expect to see html-formatted exceptions in a curl request
18:52gfredericksreiddraper: should I consider it a bug that (vector gen min max) generates vectors of size between min/max regardless of the size parameter?
18:52gfrederickswe were using it to generate bounded strings via (vector some-char 0 254) and it just makes giant strings all the time
18:52gfredericksI can figure out a workaround but was wondering if this was a problem or not
18:53amalloyby the way, you can use `lein do clean, ring server-headless`
18:53amalloyavoid paying the startup time any more often than you have to :P
18:54dbaschamalloy: sure, everything helps
18:54dbaschamalloy: still, I want to return only json, never html
18:54amalloybut i dunno what to do about your problem. perhaps someone else has more knowledge/time
18:54dbaschamalloy: doing everything in the documentation here: https://github.com/weavejester/lein-ring
18:55reiddrapergfredericks: that's the current behavior, yeah, since i think it just uses gen/choose under the hood, which also ignores size
18:55gfredericksright
18:55dbaschamalloy: thanks anyway
18:55reiddrapergfredericks: since we don't know ahead of time what the max size will be, i'm not sure how we'd use the size param, but thats not saying there isn't something better we could do
18:55gfredericksreiddraper: we do know it -- this is the 3-arg version of vector
18:55gfredericksso max-size is one of the args, right?
18:56gfredericksmax-elements rather
18:56reiddrapergfredericks: sorry, i meant at the time we create teh generator we don't know what the max-size when we _test_ it will be
18:56reiddrapergfredericks: this is confusing because i'm overloading the word size...
18:56gfredericksright
18:56gfredericksso max-elements and max-size are different things
18:56hiredmandbasch: the ring lein plugin may inject various bits of middleware at dev time
18:56reiddraperlet's use count to mean the legnth of the vector
18:57gfredericksk
18:57gfredericksand size is the input parameter next to rnd
18:57dbaschhiredman: btw, these are jetty stacktraces
18:57reiddrapergfredericks: and size to mean the parameter to the actual generator, which is currently ignored when using arity-3 vector and choose
18:57hiredmandbasch: *shrug*
18:57gfredericksreiddraper: so we can at generation-time pick a count proportional to (+ min-elements size)
18:57reiddrapergfredericks: so when we create gen/choose or gen/vector/3, we dont' know what sizes values we'll be called with, so we can't use that range to control growth
18:58hiredmandbasch: if you really want to see what it will look like in production deployed to your container, then deploy it to your container
18:58dbaschhiredman: I do, and it looks the same
18:58reiddrapergfredericks: what if we do (gen/choose 0 2500) and then only ever use a max-size of 100?
18:58dbaschhiredman: I can’t get rid of html stacktraces from jetty
18:59hiredmandbasch: right, so that must be a jetty issue, so I would check the jetty docs
18:59reiddrapergfredericks: we need to make sure the max-size we'll be called with during a test will expose the full range of the generator, or at least i think we want that
18:59gfredericksreiddraper: I'm not seeing a problem here; couldn't this be (gen/bind gen/nat (fn [count-bump] (let [count (+ min-elements count-bump)] ...)))
18:59gfredericksignoring the possibility of overruning max-elements there
19:00dbaschhiredman: lein ring uberjar creates a deployment of jetty that doesn’t seem to be configurable, or I cannot find how
19:00hiredmandbasch: lein ring uberjar doesn't contain jetty
19:01hiredmanoh, uberjar
19:01reiddrapergfredericks: gen/nat actually hsa the same problem now, we don't use the full Integer range at the moment. right now gen/nat is bounded by the size, which defaults to only 200
19:01hiredmanblench, use uberwar and jetty-runner
19:02gfredericksreiddraper: oh I think I see what you're saying
19:02gfredericksokay gotta spaghetti I'll ponder that
19:02gfredericksthanks
19:02reiddrapergfredericks: np, later
19:02reiddrapergfredericks: i do have some ideas on it i'll run by you later
19:02dbaschhiredman: I think that may be the solution
19:03dbaschhiredman: best idea so far
19:07hiredmandoing web stuff as an uberjar with a -main that boots jetty is on my big list of sad silly things that otherwise respectible seeming people do
19:16dbaschhiredman: uberwar packs a web.xml file that I need to modify
19:17technomancyconfiguring with xml =(
19:17dbaschhiredman: I find it hard to believe that nobody has run into this while building an api with compojure
19:17hiredmandbasch: lein has some project.clj things you can use to fiddle with files as they get packaged up
19:18technomancyor you could just ... use clojure functions
19:18hiredmanhard to say if it would work with uberwar
19:18dbaschhiredman: “:web-xml - web.xml file to use in place of auto-generated version (relative to project root).”
19:18hiredmandbasch: well, there you go
19:18dbaschthat’s from the uberwar doc
19:19dbaschhiredman: I can fix it, but it’s weird that I have to go that deep to create a pure json api
19:20hiredmandbasch: most people would most like has add middleware to handle exceptions and turn them in to json whatever
19:20technomancydbasch: you don't have to, you're just working around hidden assumptions in lein-ring
19:21hiredmantechnomancy: which assumptions?
19:21dbaschhiredman: yeah, I should have an outer wrapper that’s just a try-catch block that logs whatever and sends a 500 error wrapped as json
19:23hiredmantechnomancy: which assumptions?
19:24technomancyhiredman: lein-ring seems to be providing its own entry point that you can't see
19:24blrhey, anyone happen to know if phillip lord is ever on here, or is anyone usig tawny-owl in production?
19:24hiredmantechnomancy: on what basis do you say that? it takes a ring handler, what do you mean by entry point? have you ever used lein ring?
19:26technomancyhiredman: I've used it briefly, but then stopped when I realized it was getting in the way without providing any value.
19:26hiredman*eyeroll*
19:26bbloomi've made a change to nrepl.. how do i get lein to use it?
19:26hiredmanI should fork it, they way it works is terrible though
19:28hiredmanhttps://github.com/weavejester/lein-ring/issues/53
19:28hiredmanhttps://github.com/weavejester/lein-ring/issues/52
19:37technomancyblr: he's often on as ordunswung (or something vaguely like that) but not right now
19:38blrtechnomancy: ah thanks for that.. might actually have a concrete usecase for clojure at work with tawny-owl
19:38blrwhich thrills me to no end
19:39blrmight try emailing him
19:40blrtechnomancy: using the new erlang release yet? nice to have maps I would think
19:41technomancyblr: looking forward to it but haven't gotten a chance to try it yet
20:27alewhiredman: what's wrong with deploying an uberjar?
20:34hiredmanalew: it is way less flexible then deploying a war to a container
20:35hiredmandeploying a way to a container I can do things like set the contextpath, and deploy multiple apps to the same process
20:35hiredmanyou can do similar things with a fonting proxy and complicated rewrite rules
20:36hiredmanbut you can just deploy a war and use jetty runner
21:05tpopebbloom: you mean a textual replace on everything that goes out, or just replace all the hardcoded versions?
21:06bbloomtpope: i didn't consider just a find/replace on the output channel... i was going to replace all the hard coded strings w/ a variable
21:07tpopenah output channel sounds terrible
21:07bbloomtpope: i need like a "how the fuck to work on viml code" lesson. b/c restarting vim every time i change anything isn't a sensible approach
21:08bbloomtpope: first, i'm trying to add a key/value pair to the eval messages
21:08tpopebbloom: that has a simple answer: scriptease.vim's :Runtime
21:08bbloomtpope: you think of everything.
21:09gfredericksbbloom: did you just install emacs into your vim?
21:09bbloomgfredericks: i think i got peanut butter in my jelly
21:11tpopeyou could make a dictionary of extension -> namespace and then just do g:core_ns[expand('%:e')]
21:11tpopethat's the simplest solution I can think of
21:11tpopeI assume you're just playing, not trying to get anything merged in
21:13bbloomtpope: ok, that's helpful. don't need this merged in anytime soon
21:13tpopethe cider-nrepl middleware is (unsurprisingly) super emacsy
21:14tpopeI know eval is terrible and all but when every editor plugin needs its own middleware everybody loses
21:14bbloomtpope: do i have to :Runtime a list of files, or can i somehow do the whole of fireplace?
21:15tpopeyou can give :Runtime .../vim-fireplace/{plugin,autoload}/**/*.vim I think
21:15bbloomtoo many file names :-(
21:15tpopefireplace is the only plugin this seriously burns me on so I haven't tried too hard to slove that problem yet
21:16blrtpope: are you still doing rubby stuff, or have you completely defected now?
21:17tpopehuh well lucky for you there's only three files that matter
21:17bbloomtpope: yup no big deal
21:17tpopeblr I actually recently took a short term ruby gig just to pay the bills
21:18tpope3 years into this consulting thing and I still take clients largely on a whim
21:20bbloomtpope: i'm a year in to that, it's pretty nice
21:27Platz /win size 30
21:27Platzirssi needs to trip input
21:28Platztrim
21:29bbloomtpope: i'm trying to pass an option from Eval to s:nrepl_eval
21:29bbloomis there a good way to inspect values while i'm working in there?
21:30tpopePP is scriptease's pretty print
21:30bbloom:Runtime has already saved me an hour of time, thanks
21:31tpopemay as well at least skim :h scriptease
21:31bbloomtpope: oh i was trying simple msg things & nothing was printing. PP works great. ok i'll RTFM on scriptease
21:36gunsIs there a way to know if a thread is waiting on an object's monitor?
21:39gunsooh, I bet I could extract the private lock counter from the object
21:47bbloomtpope: ok awesome. i've got this mostly working! thanks
21:51bbloomtpope: if i wanted to do a more production-quality version of this, i assume i should create a buffer level variable. is there a good place to stick that sort of initialization?
21:56tpopeyeah I guess. we're missing an abstraction
21:56tpopebe advised I'm very skeptical
21:58tpopein fact it's taking great restraint not telling you where to "stick it"
21:59bbloomtpope: haha, but you've enabled much awesomeness! i've got .eclj files now loading with nrep
21:59bbloomi can eval forms from vim in the same JVM using my interpreter interoping with clj code perfectly
22:00bbloomsome minor tweaks, and i won't be able to tell the difference between .clj and .eclj files except when i break the interpreter lol
22:00bbloomtpope: thanks!
22:04bbloomtpope: is the missing abstraction an interface of sorts for the various generated snippets of code?
22:04tpopeyeah
22:04tpopeI started exploring that for cljs but ended up able to kick it down the road
22:04bbloomluckily, eclj is much much closer to clj
22:05bbloomthey both run on the same host & communicate freely
22:05tpopealso I was hoping to delegate a bunch of this to nrepl ops
22:05tpopebut cider-nrepl was a bit of a let down
22:05bbloomseems sensible, i had to do this: http://dev.clojure.org/jira/browse/NREPL-50
22:26ddellaco_is there a way to include something inside of /test for one project in /test for another?
22:26shriphanihi. has anyone played with scatter plots in incanter before ? I was wondering how to place labels on individual points - google isn't helping :)
22:27beamsoddellaco_: i've seen that in maven
22:27ddellaco_beamso: now you're just being mean
23:26ssqqIf clojure has any function just like elisp 'unintern'?
23:27bbloomssqq: just guessing: ##(doc ns-unmap)
23:27lazybotjava.lang.SecurityException: You tripped the alarm! ns-unmap is bad!
23:27ssqqWhen I use 'clojure.string to current namespace, I want ignore the warning of replace 'reverse' and 'replace'
23:28bbloom(doc ns-unmap)
23:28clojurebot"([ns sym]); Removes the mappings for the symbol from the namespace."
23:28bbloomssqq: oh, for that use :require-clojure :exclude
23:28ssqqbbloom: thanks
23:28bbloomssqq: don't use ns-unmap there, see (doc ns)
23:28bbloomssqq: although it's common for ppl to import clojure.string :as s
23:29bbloom(ns my-ns (:require [clojure.core :as s]))
23:29bbloomthen you can use s/reverse etc
23:31ssqqbbloom: thanks, How to get all symbols in current namespace?
23:39gunsssqq: (ns-publics *ns*)
23:44ssqqguns: I found (take 100 (ns-interns 'clojure.core)) could get it.
23:44gunsssqq: Oh I misunderstood you
23:45ssqqguns: you are welcome
23:50akhudekwhat could cause an object to lose a protocol implementation assigned to it via extend-type?