#clojure log - Apr 10 2014

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:36 mehwork: in 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?

0:37 beamso: run java at the command line to install a java runtime

0:37 if you've got java installed already, look at what you've got your JAVA_HOME variable set to

0:37 i have mine set to the output of /usr/libexec/java_home

0:40 mehwork: thanks, it says i need to install a jdk

0:40 ddellacosta: is it still recommended to *not* install leiningen via homebrew?

0:41 I thought most folks were saying not to

0:41 beamso: not that i've heard

0:41 ddellacosta: hmm

0:41 mehwork: should i get jdk 7 or 8

0:41 beamso: get jdk 8

0:41 maybe the latest 7 release too

0:42 what was meant to be the issue with installing leiningen via homebrew?

0:42 technomancy: ddellacosta: I have a low view of homebrew but I don't know of any lein-specific problems, just poor quality control in general.

0:42 gwz: hey, if I have four integers, is there a fast way to add them to a list or something and get the max value

0:43 ddellacosta: technomancy: okay, wasn't sure if there was an "official" perspective on that or not, thanks

0:43 technomancy: early on they didn't really bother reading the packaging instructions and goofed up a few things

0:43 ddellacosta: gwz: I don't know what the performance is like on max but

0:43 ,(max 1 2 3 4)

0:43 clojurebot: 4

0:43 technomancy: speaking ex cathedra, if you're going to use a package manager, stick with apt-get or nix =P

0:44 ddellacosta: technomancy: gotcha. :-)

0:44 technomancy: well, I think the basic install is just fine, and seems like one should let lein handle its updates itself

0:45 mehwork: ^ something to think about if you are not averse to installing lein outside of homebrew.

0:45 technomancy: ddellacosta: yeah, I don't really see the point in any case other than just the brew command being shorter to type

0:45 it's not like they do any security checks or anything

0:46 beamso: homebrew does tell me that it's been updated :/

0:47 kenrestivo: technomancy: ex cathedra? lein is a religion now, like emacs?

0:47 pope phil?

0:47 technomancy: Pope Philip I

0:48 johnwalker: hyPiRion: how do you create those diagrams on your blog? they're beautiful

1:22 gwz: hey, 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

1:22 is there a reason for that

1:23 beamso: are you printing something during execution?

1:24 gwz: no

1:24 maybe hm

2:39 magopian: hello, I'm having an issue with "lein try": I'm trying "lein try enlive", but it doesn't seem to load enlive at all

2:39 here's what I added to my ~/.lein/profiles.clj to activate lein-try: {:user {:plugins [[lein-try "0.4.1"]]}}

2:40 beamso: that file looks okay from here

2:41 magopian: I tried it yesterday, and it was working fine

2:41 and today, it's not loading anything

2:41 beamso: 'loading'?

2:41 magopian: (talking about lein-try)

2:42 yeah, sorry, i'm just starting with clojure stuff, i don't have the good vocabulary yet ;)

2:42 here's what I'm trying: https://friendpaste.com/5fbZsNoe6VDwV60dmipGZk

2:43 beamso: try (use 'net.cgrand.enlive-html)

2:43 magopian: ah, much better beamso :)

2:44 so it was not lein-try not working, it's just my poor skills getting in the way, sorry for the noise :/

2:44 beamso: not a problem.

2:48 magopian: enlive looks awesome, and so different from any templating engine i've used before

3:11 ddellacosta: beamso, magopian: fyi would recommend using require, not use

3:12 beamso: okay. why?

3:13 TEttinger: use pulls everything into the current ns and can cause conflicts

3:13 beamso: okay

3:14 TEttinger: like (use 'clojure.string) will be a problem since it overrides clojure.core/replace

3:14 ddellacosta: beamso: better to do (:require [some.namespace :as sn]) or [some.namespace :refer [var1 var2]]

3:14 TEttinger: not always, you of course can still use "use" if you know the conflicts won't be an issue, it's just not recommended

3:15 magopian: TEttinger: duly noted

3:16 so i should use require and provide a shortcut name?

3:16 TEttinger: yeah, especially for clojure.string

3:16 ddellacosta: magopian: 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?]]

3:17 TEttinger: that's good too

3:17 magopian: and here there's yet another way to do it: https://github.com/cgrand/enlive/wiki/Getting-started#html-source

3:17 (ns x (:use net.cgrand.enlive-html))

3:17 ddellacosta: strings a good example of a namespace that it is bad to use "use" on--you'll replace replace with replace. <-- love that sentence

3:18 magopian: haha

3:18 ddellacosta: magopian: that enlive example is exactly what we are saying not to do.

3:18 TEttinger: I gotta say as an aside -- JVM regexes are really good. I'm always amazed at the things you can do.

3:18 ddellacosta: magopian: that is equivalent to calling (use 'foo), only in a file: (ns x (:use foo))

3:18 TEttinger: s/\pP/!!!/

3:19 ddellacosta: indeed

3:20 magopian: ddellacosta: thanks for the explanation

3:20 the thing with require however is that you have to prepend all the functions with the namespace

3:20 ddellacosta: magopian: 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

3:21 magopian: I haven't read much on clojure yet, but thanks for the pointer ;)

3:21 ddellacosta: magopian: 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.

3:21 beamso: magopian: i don't think you have to prepend all the functions with the namespace with require

3:21 magopian: (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 ;)

3:22 beamso: i think you can do a (require [library.name :refer :all])

3:22 ddellacosta: magopian: 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)

3:23 beamso: i kinda like the prepend because i can remember where the functions come from

3:23 ddellacosta: beamso: you can :refer :all, but that kind of defeats the purpose...

3:23 magopian: i 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)

3:23 ddellacosta: magopian: it takes some time to get used to, just be patient with yourself and you'll find it easier. :-)

3:23 magopian: thanks for the pointers ddellacosta i'll read that asap

3:24 ddellacosta: a few years ago I was wondering why only a small number of developers where using FP instead

3:24 and so many where using imperative

3:24 imperative/oop

3:24 but now i know: fp (and simplicity) is hard

3:25 beamso: i think it's more a) what they learned early b) what was easier to hire for

3:25 ddellacosta: magopian: 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.

3:25 beamso: yeah

3:25 magopian: ddellacosta: it's not only getting used to, i believe

3:25 i truly find it much more heavy on the brain to think in fp

3:25 the end result is more concise, better, cleaner

3:26 and may be more readable (once you get used to it)

3:26 ddellacosta: magopian: 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?

3:26 magopian: but to get to the end result is really really hard

3:26 ddellacosta: *encapsulated

3:26 magopian: ddellacosta: sadly, the average developer doesn't care about state that much in his daily work

3:27 ddellacosta: magopian: except when they are debugging late at night...

3:27 magopian: it'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)

3:27 ddellacosta: that's what i'm talking about: the _average_ developer doesn't care about state in his _daily_ work ;)

3:27 ddellacosta: magopian: don't worry about English, lots of non-natives and your English is fine anyways. :-)

3:27 magopian: ha, fair enough.

3:28 magopian: some will feel the pain when they need to debug it, but it's only from time to time

3:28 sjy: there is a paul graham essay that says something like "OO is popular because it allows you to build enterprise software by accretion"

3:28 ddellacosta: sjy: that kind of makes sense, yeah

3:28 sjy: i personally tried to teach myself programming for years and OO massively held me back

3:28 magopian: as 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

3:28 ddellacosta: sjy: especially the Java model of OO

3:28 sjy: i felt like i was stupid because i didn't understand why everything should be a class

3:28 ddellacosta: sjy: agreed...

3:29 sjy: and it wasn't until i did a first year haskell course and a bunch of python scripting that i really 'got' programming

3:29 magopian: but it's not hard on the brain, you don't have to think about your code very hard and very long

3:29 ddellacosta: sicp (at least, the first chapter, haven't finished it yet) really was what put me over the edge

3:29 magopian: you're not productive, and debugging is a pain, but it's kinda easy in your everyday life

3:29 ddellacosta: I suppose

3:30 OO is easy up to a point

3:30 sjy: magopian: i don't really agree with that (and i write OO code in my day job)

3:30 magopian: working in FP i really feel like you have to think hard about everything, how to abstract, how to bind things together...

3:30 ddellacosta: but to write it well it's really reaally hard

3:30 I think Haskell does OO better than OO, honestly

3:30 sjy: i find it incredibly burdensome to navigate through huge enterprisey OO hierarchies

3:30 magopian: sjy: it's burdensome, not hard

3:30 it's a pain, not hard

3:30 sjy: and i have trouble keeping track of things because any feature requires me to touch a million different files

3:31 magopian: again, it's a pain, not hard :)

3:31 sjy: not sure how much of that is because of shitty design though

3:31 ddellacosta: I think that the point is that keeping that cognitive load is what makes it hard though, magopian

3:31 sjy: there probably exist nightmarishly complex fp projects

3:31 magopian: ddellacosta: that could be a definition of "hard", i agree

3:32 what I find hard is function composition, passing around, higher order functions and the suc

3:32 such

3:32 (and enlive in that case feels hard, at least to me, but again, i'm just a beginner;)

3:32 sjy: true. 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

3:33 magopian: enlive looks so much better as a templating engine than the one i'm using daily (django templates)

3:33 but it's so much more complex to grok

3:34 when 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

3:34 I 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

3:36 sjy: django is pretty nice :)

3:36 magopian: it's my day job ;)

3:36 sjy: i got to use it in my old day job. now i work on asp.net web apps :(

3:36 magopian: aouch

3:38 sjy: i'm just checkout out enlive now. have you done much with it yet?

3:38 magopian: nope, nothing at all

3:38 sjy: i'd be interested to know why you say it looks much better as a templating engine

3:39 magopian: just reading and trying / playing around with the "getting started" and the like (have a look at https://github.com/swannodette/enlive-tutorial/)

3:39 no DSL!

3:39 (and i'm not even talking about the old PHP way, put code and html in the same file)

3:39 sjy: even 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

3:39 magopian: you take the html files from your designer, and BAM, you use them

3:39 no fiddling

3:40 you need a RWD site? Just download the bootstrap example page, and voilà, use it

3:40 ddellacosta: I'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.

3:41 but it's pretty good all of that aside. Unfortunately, it's kind of slow

3:41 magopian: no cutting/splitting your templates, no modifying it... (only in the source code i mean)

3:41 sjy: hmm, the idea of having pure html templates is pretty nice

3:41 magopian: ddellacosta: ah, very good to have that kind of feedback, and being slow is a main drawback sometimes

3:42 ddellacosta: these 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)

3:42 magopian: Om is from swannodette right?

3:42 it looks awesome also

3:42 using some kind of shadow dom

3:43 (haven't played with clojurescript yet, but i'd like to)

3:44 i'm not that fond of client-side :) (or client facing at all, i'm a backend developer)

3:44 sjy: ddellacosta: what kind of work do you use enlive for? do you work for yourself?

3:45 ddellacosta: sjy: 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

3:46 sjy: cool! do you work remotely?

3:47 i'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))

3:47 beamso: sjy: where are you in australia?

3:47 sjy: perth

3:48 beamso: <-- melbourne

3:49 sjy: cool :) i'm heading over to melbs soon actually

3:49 have you worked elsewhere in australia?

3:49 beamso: i know that thoughtworks uses clojure and they have offices in both perth and melbourne

3:49 i've only worked in melbourne

3:49 sjy: cool tech stuff doesn't seem to be as (geographically) concentrated here as it is in the US

3:50 insamniac: the cult of thoughtworks

3:50 beamso: ioof advertised yesterday for a developer and they use clojure

3:50 IceD^`: US situation is total disaster ;)

3:51 sjy: IceD^`: yeah? i got the impression it was a pretty good place to be, employment-wise, for developers

3:51 not so much for every other industry

3:51 beamso: thoughtworks isn't great?

3:51 insamniac: I just find it funny that they refer to themselves as thoughtworkers.

3:52 IceD^`: my prev job was forcing me to move to valley

3:52 beamso: sjy: melbourne isn't bad but i think sydney is better

3:52 IceD^`: I liked working for them, but to avoid moving to usa/SV - decided to get another one

3:53 sjy: beamso: it seems to be pretty common for australians to think that other australian cities are cooler than theirs :P

3:53 especially 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

3:54 beamso: it's more that some of the bigger/more software-oriented places are in sydney

3:54 sjy: melbourne and perth seem much nicer than sydney in terms of rent and getting around without a car

3:54 or with a car for that matter

3:54 beamso: sure, melbourne has rea but sydney has google, atlassian etc.

3:56 sjy: ddellacosta: did you have any interest/experience/qualifications in law before you started working there? :)

3:56 ddellacosta: sjy: nope, just Clojure. :-)

3:56 sjy: the legal part is interesting though, I've learned a lot (and have a lot more to learn)

3:57 sjy: yeah! i actually studied law, but the industry is kind of horrifying, which is why i'm a developer instead

3:58 (also because i got rejected from the few non-horrifying jobs i applied for)_

3:59 ddellacosta: sjy: I get the feeling that law is a great field to be in...if you're not a lawyer. :-)

3:59 sjy: what do you mean? it's an even worse field to be in if you're a client :P

3:59 ddellacosta: sjy: or rather, if you aren't competing with other lawyers for gigs at the big law firms

3:59 sjy: I just mean in terms of being employed in the industry, such as it is

3:59 sjy: at least in the states, tough for new lawyers

4:00 sjy: ah 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

4:01 since they're invariably a cost centre

4:01 but i guess law industry != law firms

4:08 ddellacosta: sjy: 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.

4:13 sjy: ddellacosta: 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 ;)

4:13 ddellacosta: sjy: true, true...haha

4:50 luxbock: style 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

4:51 in 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

4:51 or should I just make them regular functions

4:52 beamso: thinking in an OO-way, i'd have said bad practice

4:52 luxbock: alright

5:51 magopian: is 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?

5:51 i've read a few "getting started" small wiki pages, but it's very light

5:54 scottj: magopian: there is a book, "web development with clojure"

5:58 magopian: scottj: ah, good, thanks: http://pragprog.com/book/dswdcloj/web-development-with-clojure ?

5:58 scottj: magopian: yes

5:59 magopian: it looks very recent, that's nice

6:02 thanks for the pointer scottj ;)

6:02 scottj: magopian: 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.

6:03 magopian: sure

6:03 i have to get past my aversion for java

6:03 vijaykiran: scottj: a bit "old" but should give a bit of overview - http://vijaykiran.com/2012/01/web-application-development-with-clojure-part-1/

6:03 magopian: it keeps getting in the way of me picturing myself in a few years programming clojure instead of python ;)

6:04 vijaykiran: magopian: I wonder how far you can go with Clojure, being happily ignorant of Java

6:04 magopian: well, for starter, you need jetty as soon as you want to display a page

6:05 and jetty is _heavy_

6:05 (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 ;)

6:05 but i'll get past it, no worries ;)

6:05 vijaykiran: oh - you think Jetty is _heavy_ - which is considered light-as-a-feather compared to *cough*jboss*cough*

6:12 magopian: vijaykiran: well, i'm only comparing to what I know of already ;) (like gunicorn)

6:13 clgv: magopian: huh why? you can let jetty run and see the updates as you redefine functions you work on

6:13 magopian: clgv: that's what i'm talking about: i'll get over it

6:14 it'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

6:14 and 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 ;)

6:15 Anderkent: I don't know if 'hate all my ram' was a typo, but either way it's awesome and I'm stealing it

6:15 clgv: magopian: what I meant is you just start it once for your repl dev session and then work with it

6:16 magopian: well maybe you should http://downloadmoreram.com/ ;) SCNR :D

6:16 magopian: clgv: 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

6:16 Anderkent: ah, yeah, it was a typo ;)

6:17 Anderkent: clgv: I'm working on a 2GB windows 7 laptop with full disk encryption doing java development #client-company-policy

6:17 because we love when tabbing to your browser takes 10s+

6:17 #thatswap

6:18 magopian: Anderkent: wow, can't you get a real job? it must be a nightmare working there!

6:18 Anderkent: (I actually end up reading code in vim instead if I don't have to do rebuilds)

6:18 nah, it's just one client, others are better

6:19 clgv: Anderkent: well that sucks. isnt that a good reason to justify hardware upgrades for more productivity?

6:20 Anderkent: corporations, 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

6:21 AmandaC: sounds like a giant can of NOPE

6:21 clgv: Anderkent: woa they must be developing The Next Big Thing™

6:47 hyPiRion: $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.

6:47 lazybot: Message saved.

7:18 magopian: vijaykiran: 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)

7:25 vijaykiran: magopian: :) sorry for shameless-self-promotion

7:40 mercwithamouth: any tips for reading larger functions in lisp?

7:43 scottj: a comfortable chair :)

7:43 mercwithamouth: lol

7:44 vijaykiran: hammock

7:44 llasram: Avoid code with large functions?

7:44 mercwithamouth: inside out?

7:44 magopian: vijaykiran: it's awesome, thanks for having "self promoted" you ;)

7:45 vijaykiran: mercwithamouth: it is inside out - even for smaller functions

7:46 mercwithamouth: if you can "refactor" while reading - giving names to intermediate "blocks" will help - I guess

7:46 mercwithamouth: and there's always SO - http://stackoverflow.com/questions/1894209/how-to-read-mentally-lisp-clojure-code :)

7:46 mercwithamouth: http://stackoverflow.com/questions/1894209/how-to-read-mentally-lisp-clojure-code <-- like his example. functions like that scare me

7:46 vijaykiran: ah :)

7:47 mercwithamouth: lol beat you =)

7:48 vijaykiran: mercwithamouth: in this case let+if looks very imperative

7:49 mercwithamouth: hrmm i suppose there's no other way than to write a lot more lisp

7:50 vijaykiran: mercwithamouth: mentally phasing out the ()s helps

7:50 mercwithamouth: yes, that's the shortcut :)

7:50 hyPiRion: vijaykiran: The general advice is to write more lisp. But really, concat is a prime example on how to NOT write Clojure code

7:51 Most of the clojure.core code is hard to comprehend for efficiency reasons

7:52 mercwithamouth: hyPiRion: well thats good to know =P

7:53 hyPiRion: Oh, I ponged wrong person

7:53 mercwithamouth: 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

7:54 llasram: I think it's just dandy!

7:54 * llasram is full of lies

7:54 llasram: It 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

7:54 mercwithamouth: hyPiRion: 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

8:04 magopian: mercwithamouth: what i sometimes find difficult is that people don't explain how they're solving the problem

8:04 if 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

8:05 (i mean, you can understand it... once you understand it's not using a "common" solution)

8:06 mercwithamouth: magopian: ahh..very true. perhaps i should try to solve it in python then come back

8:06 the concept is foreign to me all together

8:06 magopian: ah, then it's even more difficult

8:06 but even in python, you can solve it using different approaches

8:07 if you could read french, i would point you to a blog post i wrote on the subject (well, sort of ;)

8:07 the "easy" approach is to just use a board

8:07 and iterate on the board positions (x and y) and count the number of neighbours for each position

8:08 another 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)

8:09 (the game of life is all about number of neighbours ;)

8:10 mercwithamouth: hrmm

8:11 i'll take a closer look at it over the next day or so

8:22 Anderkent: brew install gimp

8:22 afgaerthyft

8:23 I eagerly await next generation OS'es where the window I'm looking at will automatically get focus

8:25 vijaykiran: Anderkent: perhaps all you need is a small script coupled with opengaze :)

8:25 Anderkent: wait, would that actually work?

8:27 vijaykiran: Anderkent: didn't try - but it could

8:30 Anderkent: if you are on windows there's "gazemouse" http://www.gazegroup.org/downloads

8:36 Anderkent: hm, 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 ;(

8:38 cymen_: Man...

8:38 I'm reading this om tutorial: https://github.com/swannodette/om/wiki/Basic-Tutorial

8:38 And I gotta say the whole thing with the repl connected to the js app running in the browser ...

8:38 mindboggling.

8:38 Anderkent: in a good way, though?

8:39 cymen_: Not sure yet, still looks like a magic trick.

8:39 Anderkent: not any different than running a repl connected to a live clojure app; would that be mind bogglignt oo?

8:39 cymen_: Actually, yes.

8:40 Anderkent: well, 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

8:40 cymen_: All these techniques for evaluating and compiling on the fly and changing the state of an app I find totally weird.

8:41 I guess if I understood how it works under the hood a little more I would feel more comfortable. :)

8:41 beamso: i find it kinda awesome

8:41 Anderkent: hym, but why would you want to restart things if you don't have to

8:41 yeah i guess knowing how it works helps; you know when you can safely swap things out and when it's risky

8:41 cymen_: 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

8:41 beamso: even silly stuff like developing on ring and not having to reload .wars. madness.

8:41 vijaykiran: Anderkent: try https://github.com/OpenGazer/OpenGazer

8:41 Anderkent: but as long as you're nicely pure you can redefine all you want! :D

8:42 vijaykiran: last commit 3 years ago? Not too promising ;(

8:42 vijaykiran: Anderkent: well - not having commits is not necessarily a bad thing :)

8:43 Anderkent: how so?

8:44 cymen_: Does anybody know why application state contents for om have to be associative data structures and cannot be lists?

8:45 vijaykiran: Anderkent: 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

8:46 Anderkent: cymen_: 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

8:46 clojurebot: Pardon?

8:47 Anderkent: haven't actually tried it

8:47 cymen_: Anderkent: But why?

8:47 Anderkent: why what?

8:49 hyPiRion: how?

8:49 clojurebot: with style and grace

8:50 CookedGryphon: I'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?

8:51 or ideally, something that will do "ab$%" => "ab_DOLLAR_PERCENT"

8:51 or something like that

8:52 cymen_: Why aren't lists allowed for anything that will descend them?

8:52 Anderkent: because you can't index a list

8:53 if 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)

8:55 adie: CookedGryphon: you could use java interop org.apache.commons.lang3.StringEscapeUtilsc

8:55 CookedGryphon: you could use java interop org.apache.commons.lang3.StringEscapeUtils

8:55 Anderkent: I'm almost positive I was a function that would take a symbol(name?) and return the java-escaped name for it

8:55 but can't find it now -.-

8:55 hyPiRion: Anderkent: munge?

8:56 It's not designed for escaping stuff though

8:56 ,(munge "hello-world!")

8:56 clojurebot: "hello_world_BANG_"

8:56 hyPiRion: ,(munge "abab<?$½\"_")

8:56 clojurebot: "abab_LT__QMARK_$½_DOUBLEQUOTE__"

8:56 Anderkent: CookedGryphon: ^

8:56 oh

8:56 it doesn't do $

8:56 that sucks :P

8:56 llasram: Why would it?

8:57 Anderkent: yeah i guess it's a legal character in a class name

8:57 llasram: `$` is a valid character in JVM class names

8:57 :-)

8:57 CookedGryphon: and it doesn't do space either

8:57 nice try though

8:57 Anderkent: because it would be convenient for this use case!

8:57 llasram: hah

8:57 CookedGryphon: I don't think any of the stringexscape utils do what I want either

8:58 Anderkent: CookedGryphon: write it as a lib. It's not that hard I think: http://stackoverflow.com/questions/2812072/allowed-characters-for-css-identifiers

8:58 CookedGryphon: it's a pity you can't look up the unique names of unicode code points

8:59 Anderkent: other than googling 'unicode 0x1443' you mean?

8:59 oh, programmatically. right.

8:59 CookedGryphon: :P

8:59 right

8:59 Anderkent: well, build a big map!

8:59 :P

8:59 llasram: You can...

9:00 Or was that sarcasm?

9:00 * llasram smacks his sarcasm detector

9:00 Anderkent: and then 'class="c_c__UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_"

9:00 llasram: Damn thing is on the fritz again

9:00 Anderkent: llasram: how?

9:01 ha

9:01 codepoint.getName()

9:01 that was easy

9:03 CookedGryphon: oh yeah

9:03 Anderkent: ,(Character/getName 0x1443)

9:03 clojurebot: #<CompilerException java.lang.IllegalArgumentException: No matching method: getName, compiling:(NO_SOURCE_PATH:0:0)>

9:03 Anderkent: bah

9:03 llasram: Huh. Are both lazybot and clojurebot running Java 6 still?

9:03 Anderkent: seems so

9:03 CookedGryphon: except... it contains spaces and punctuation :P

9:03 so now I have to escape what that returns

9:03 Anderkent: CookedGryphon: just run .getName on all of those!

9:03 it's .getName all the way down

9:04 CookedGryphon: yeah, I'll just go write a function which iterates until it's a valid css name

9:04 great idea!

9:04 llasram: hah


9:05 hyPiRion: heh.

9:05 ,(munge "!!!")

9:05 clojurebot: "_BANG__BANG__BANG_"

9:06 hyPiRion: might as well make gensym generator and redefine all the css names

9:07 CookedGryphon: I'm tempted to just map them all to a generated symbol....

9:09 minikomi: ,(munge ”_BANG__BANG__BANG_”)

9:09 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: ”_BANG__BANG__BANG_” in this context, compiling:(NO_SOURCE_PATH:0:0)>

9:09 Anderkent: those fancy double quotes. Oh, mac auto-format you.

9:10 beamso: what mac app does the auto format?

9:10 minikomi: #2swag4repl

9:10 Anderkent: not sure about irc, but outlook keeps doing it to me

9:10 tbaldridge: well there's your problem :-P

9:10 Anderkent: or used to until I managed to find the option

9:10 minikomi: I’m using colloquy

9:10 tbaldridge: actually, come to think of it, only MS apps have ever done that to me.

9:11 Anderkent: fair enough, i actually haven't used many MS apps :P

9:11 minikomi: .. the quotes in this font are actually exactly the same. weird.

9:11 hyPiRion: tbaldridge: emacs changes " to `` and '' in latex-mode :p

9:27 BobSchack: schack683g10&Cat!

9:31 ssideris: is that a password?

9:32 BobSchack: yeah my irc client stole my focus oh well

9:32 hyPiRion: it _was_ a password, I guess

9:34 welder: how often has your password been schackattack?

9:36 BobSchack: A while, just for one account, and it's already changed :)

10:11 CookedGryphon: Anderkent, llasram, getName has turned into a very nice solution, thanks for your suggestions

10:14 Anderkent: really? I'm curious to see that

10:14 also your lib is now java 7 only

10:14 also, you released is as a lib, right?

10:26 cymen_: What does the error "Unsupported binding form" mean?

10:27 Anderkent: cymen_: context?

10:28 cymen_: uh still trying that om tutorial.. clojure.lang.ExceptionInfo: Unsupported binding form: (dom/li nil (display-name contact)) at line 26 ...

10:28 Anderkent: usually it means you forgot to add in a binding form (like {name :key} or [args])

10:29 post more code, it's probably the token before the (dom/li)

10:29 cymen_: Yeah, I had an extra set of parens around the type in a reify

10:29 (reify (om/IRender ...

10:30 cbp: cymen_: maybe you need a map instead of nil

10:30 cymen_: It is really too hard to figure out such simple errors. :/

10:30 cbp: or just dont add nill?

10:30 Anderkent: oh. not sure why extra parens would cause that, probably something about how it expands

10:30 cbp: if it's not that then it's probably due to that function display-name

10:30 Anderkent: cbp: are you just guessing? li is not a binding form

10:31 cbp: I am =D

10:31 Oh sorry I misread the error

10:31 Need a paste!

10:32 Anderkent: he already fixed it (cymen_> Yeah, I had an extra set of parens around the type in a reify)

10:32 cbp: I realy need some cofee.. sorry

10:33 nbeloglazov: Is it right that code compiled with clojure 1.6 won't run in clojure 1.5.1? Or I'm doing something wrong?

10:33 Anderkent: nbeloglazov: 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:34 might just not work if the internals changed, I guess

10:34 nbeloglazov: Compiled - AOT-ed against 1.6.

10:34 Anderkent: but in general AOT is only supposed to work with exactly the same classes, I think

10:36 nbeloglazov: Hm, is there general best practice of how to develop library that uses AOT and should work with different clojure versions?

10:36 Anderkent: I 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:36 that's assuming you want AOT for a java api

10:37 Frozenlock: Any recommendation for bin-packing / stock-cutting in clojure? (or java). I found optaPlanner, but was wondering if there's anything else.

10:37 Anderkent: nbeloglazov: see for example https://github.com/sritchie/carbonite/blob/master/src/jvm/carbonite/JavaBridge.java

10:38 stuartsierra: In general, AOT-compiled Clojure is not compatible across Clojure versions. However since about 1.4 the changes have been small.

10:41 TEttinger: Frozenlock, I haven't tried it but https://github.com/reborg/binpack is in clojure

10:41 cymen_: What's AOT?

10:41 TEttinger: ahead of time (compilation)

10:41 CookedGryphon: Ahead Of Time (compilation)

10:41 jinx

10:41 TEttinger: indeed

10:43 Frozenlock: TEttinger: thanks. This one is only 1D?

10:46 TEttinger: Frozenlock, I'm not any more familiar with the bin packing problem than wikipedia tells me

10:46 Frozenlock: I'm not much more knowledgeable myself. Thanks ;-)

11:54 cymen_: Can somebody explain this error to me: https://www.refheap.com/35acca127e6740acc7fa33844

11:55 justin_smith: something unbound was in call position somewhere

11:55 so a symbol not pointing to any value was expected to be a function

11:55 cymen_: This is the offending code part: https://www.refheap.com/c5086387303e9ffa3fc319169

11:55 justin_smith: (recor)

11:55 that is your error

11:55 Anderkent: so it is

11:56 good eye!

11:56 justin_smith: as you may expect, recor is unbound :)

11:56 Anderkent: also wow talk about shitty error messages :P

11:56 cymen_: *sigh*

11:56 teaching a man to fish and everything...is there any way to debug this?

11:56 gfredericks: jvm-clojure is much better in that regard

11:56 ,(recor 1 2 3)

11:56 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: recor in this context, compiling:(NO_SOURCE_PATH:0:0)>

11:57 justin_smith: cymen_: programming is hard for us dyslexics, I do phonetic and letter transposition errors all the fucking time

11:57 gfredericks: I'm not sure what about cljs makes that difficult to detect

11:57 Anderkent: ,(do (def recor) (recor 1 2 3))

11:57 clojurebot: #<IllegalStateException java.lang.IllegalStateException: Attempting to call unbound fn: #'sandbox/recor>

11:57 jonasen: Anderkent: you would probably have seen which symbol was undefined in the dev tools using source maps

11:57 gtrak: justin_smith: oh man, props :-). I had a dyslexic roommate. He was *very* hard-working.

11:57 justin_smith: cymen_: 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:57 cymen_: jonasen: mind elaborating on that?

11:58 Anderkent: justin_smith: yeah it's a huge pain if you mistype say keyword names

11:58 justin_smith: right, because that doesn't even throw any sensible error

11:58 Anderkent: it can cause a bug 20 lines away because nil came up instead of what you wanted

11:58 justin_smith: you just get a nil on lookup

11:58 right

11:58 cymen_: indeed, I once completely messed up the map in my project.clj and got no error whatsoever just weird results

11:59 jonasen: cymen_: (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:59 cymen_: I didn't do anything to set them up but I do get line numbers with the errors.

12:00 Is that what you mean?

12:00 justin_smith: chrome will actually show you the cljs source

12:00 at the appropriate line

12:00 jonasen: cymen_: do you see cljs or js?

12:00 Anderkent: cymen_: you should see your cljs code in the scripts tab

12:00 man, so many people saying the same thing

12:00 justin_smith: heh

12:01 it's the chorus of programming wisdom

12:01 jonasen: Anderkent: we're eager to help. That's a good thing I guess :)

12:01 cymen_: I do see my code in the Sources tab, yes.

12:01 whodidthis: what about when you println something and it shows the println fn from cljs.core, any way to fix that

12:01 cymen_: The error is three lines away from the recor, though. :)

12:03 Anderkent: wait, if I (defn foo! ...) and (defn foo_BANG_ ...) and then AOT

12:03 seangrove: bbloom: Probably up your alley http://acko.net/blog/shadow-dom/

12:03 Particularly the conclusion

12:03 "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:03 justin_smith: Anderkent: foo_BANG_ should be illegal as a first arg to def

12:03 gfredericks: ,(fn foo_BANG_ [])

12:03 clojurebot: #<sandbox$eval72$foo_BANG___73 sandbox$eval72$foo_BANG___73@1c06877>

12:04 gfredericks: ,(def foo_BANG_ "illegal?")

12:04 clojurebot: #'sandbox/foo_BANG_

12:04 Anderkent: 'should'

12:04 justin_smith: yeah, I didn't mean that it is...

12:04 seangrove: I'm not 100% on board with that, but it's similar the my thinking at this point

12:04 Anderkent: https://www.refheap.com/74590 funz

12:05 yotsov: Is 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:05 bbloom: seangrove: the shadow dom ppl have their hearts in the right place

12:05 seangrove: yotsov: No, it's not possible currently

12:05 bbloom: seangrove: but the solution is not MORE crap in browsers, it's less

12:05 yotsov: seangrove: thanks

12:05 bbloom: seangrove: ask dnolen_ to rant about the shadow dom sometime

12:05 he said to me "now that i understand it, it's clear that they are insane"

12:06 justin_smith: yotsov: 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:06 yotsov: justin_smith: I see, thanks

12:06 seangrove: bbloom: Yeah, I've heard a few rants on it at this point

12:07 cymen_: isn't shadow dom the idea behind react and dnolen the guy who ported it to cljs? :)

12:07 bbloom: cymen_: absolutely not

12:07 the shadow dom is exceptionally complex

12:07 justin_smith: cymen_: different implementation of the same vague concept I think

12:07 react does it much better

12:07 dnolen_: justin_smith: pretty much unrelated

12:07 justin_smith: oh, ok

12:07 seangrove: cymen_: I'd like to quote you on that ;)

12:07 dnolen_: Shadow DOM is the incidental complexity of trying to embed widgets into a Document Object Model

12:08 cymen_: don't quote me when I talk shit

12:08 so...almost never

12:08 dnolen_: React treats the DOM as it should be, an implementation detail

12:08 cymen_: dnolen_: I'm not sure what your abstract or concrete concepts of widgets or DOMs are and cannot understand that sentence :)

12:09 bbloom: at this point, i'm only interested in W3C projects that further enable ignoring the W3C

12:09 justin_smith: dnolen_: 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:09 dnolen_: cymen_: widgets are traditional object oriented widgets - DOM has nothing to do with that at all

12:09 seangrove: bbloom: Fantastic

12:10 cymen_: dnolen_: So a widget is something like a textbox and a DOM is an XMLish representation of a document?

12:10 bbloom: ie 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:10 next, i want a damn bytecode VM :-P

12:11 gfredericks: "DBV is a damn bytecode vm written in JavaScript"

12:11 cymen_: bbloom: There are Java Applets, there is Flash..what more could you want? :)

12:11 dnolen_: 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:12 cymen_: DOM is a specific view/event abstraction around web browsers

12:12 Shadow DOM tries to live inside that abstraction ... badly

12:15 cymen_: What is the intention of Shadow DOM?

12:15 I mean the DOM already has UI widgets, right?

12:15 gtrak: dnolen_: 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:15 bbloom: cymen_: to undo the damage done by the poor (ie no) isolation model provided by dom elements

12:15 dnolen_: gtrak: nope

12:15 gtrak: would break the web

12:16 seangrove: dnolen_: Well, they could just expose lower-level render primitives, etc. and that'd be enough for React to breath a lot more freely

12:16 bbloom: seangrove: the tricky bit is the etc

12:16 seangrove: why hasn't canvas taken off for UIs? b/c that etc is hard.

12:16 :-)

12:16 seangrove: bbloom: Nah, was less than 4 characters

12:16 cymen_: bbloom: Isolation of what from what?

12:17 bbloom: each other

12:17 styles

12:17 behavior

12:17 security

12:17 gtrak: bbloom: yea.. but we can pick and choose now, potentially.

12:17 instead of flatly abandoning everything like canvas

12:18 or flash

12:18 seangrove: bbloom: 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:18 bbloom: seangrove: and then they proceed to implement a bunch of stupid OOP crap

12:18 hurray

12:18 seangrove: bbloom: Yeah, that was going to be my next lament

12:19 But it's google, whaddya expect? They have a culture, it fits in.

12:19 justin_smith: "let's replace js with python guys"

12:20 bbloom: heh, but that's the shit ppl really think

12:20 justin_smith: yeah, it's sad

12:20 bbloom: "javascript is the problem, let's put ruby in there!"

12:20 um, no... javascript is A problem

12:20 THE problem are stupid suggestions like that one

12:20 and the standards body that has their own stupid suggestions

12:21 gtrak: bbloom: this is why I love clojure.

12:21 rasmusto: if only I would have learned python as my first language...

12:21 gtrak: we'll just do the thing you're trying to do better.

12:21 seangrove: It's a psychotic world that's grown to hold (one of) the most important app delivery platforms and is heavily entrenched

12:21 gtrak: you can still do whatever you want.

12:21 justin_smith: rasmusto: are you saying you have a masochistic streak?

12:23 rasmusto: justin_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:23 justin_smith: gtrak: if you mean clojure is powerful enough to make something sane that targets whatever nonsense they come up with next, yeah

12:23 gtrak: rasmusto: i think it's a fine first language, unless you know ahead of time you'll want something better.

12:23 then scheme it up

12:24 justin_smith: (inc scheme)

12:24 lazybot: ⇒ 1

12:24 justin_smith: best first language evar

12:24 gtrak: justin_smith: yep :-), sometimes doing bad things better makes you win.

12:24 rasmusto: I taught myself clojure by doing scheme homework in it

12:24 those problems seemed much more meaningful than the java junk I got

12:25 gtrak: there's definitely something to be said for having any gratification at all when you're a newb.

12:25 and python/js/ruby can give you that better, if it's what you need.

12:25 ambrosebs: what's the best way to get in touch with the instaparse devs?

12:26 justin_smith: rasmusto: 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:26 ddellacosta: ambrosebs: I think email

12:26 justin_smith: rasmusto: I think that by that metric java performs pretty poorly, but scheme and of course clojure do very well

12:26 ambrosebs: ddellacosta: seems like it

12:26 gtrak: justin_smith: I want my code to be incompressible.

12:27 justin_smith: hah

12:27 gtrak: thus truly random.

12:27 ddellacosta: ambrosebs: as far as Mark

12:27 rasmusto: justin_smith: I like that. But now I have to go check the SnR of my clojure code :o

12:27 gtrak: justin_smith: but I'm serious :-)

12:28 justin_smith: gtrak: cat /dev/urandom > wtf.o; ld wtf.o wtf

12:28 gtrak: million monkeys

12:28 Frozenlock: ugh.... 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:28 gtrak: is the unit of measure

12:29 justin_smith: rasmusto: 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:29 just not so much that the redundance starts masking the task at hand, of course

12:30 rasmusto: justin_smith: oh, so the measure of code readability isn't whether or not a function uses a thread-last macro? (jokes)

12:30 justin_smith: heh

12:30 with some A/B testing we could probably start to quantify said ratios, but just thinking of the concept helps

12:41 Frozenlo`: 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:42 Doing (.main org.optaplanner.examples.cloudbalancing.app.CloudBalancingHelloWorld) just gives me a 'no matching field' error.

12:42 Anderkent: Frozenlo`: main is presumably a static method, so it will be (org.optaplanner.examples.cloudbalancing.app.CloudBalancingHelloWorld/main)

12:43 (otherwise you're calling the .main method on the Class instance for o.o.e.c.a.CBHW

12:43 Frozenlo`: Anderkent: That was the first thing I tried... CompilerException java.lang.NoSuchFieldException: main, compiling:(/tmp/form-init5170518960142646801.clj:1:9)

12:44 hiredman: static main methods tend to take arrays of strings

12:45 Anderkent: hiredman: wouldn't that be a reflection error though?

12:50 Frozenlo`: Anderkent: hiredman: (org.optaplanner.examples.cloudbalancing.app.CloudBalancingHelloWorld/main (into-array [""])) Seems to give me a different error. Step in the right direction :-)

12:55 seangrove: Damnit, emacs macros always give me trouble

12:55 err, emacs' regexp

12:56 rasmusto: %s/emacs/vim :>

12:56 Frozenlo`: What? ////// you ////dont like ////emasc /////regexp? :-p

12:56 * rasmusto escapes himself

12:57 rasmusto: can't you just shell out to perl and call it good? :p

12:58 Frozenlock: seangrove: Just in case you don't know, there's M-x re-builder.

12:58 seangrove: Frozenlock: Ah, forgot about that, thanks

12:59 Turned out not to be emacs' fault, something about find-grep-dired, so presumably something I was passingly incorrectly to grep

13:03 abaker: gtrak: you should join the party in the stardog-clj repo ;)

13:03 gtrak: heh, sure :-)

13:03 haven't played with stardog yet. revelytix hasn't done rdf in a while :-)

13:04 abaker: yeah, my condolences on that one

13:04 next little side project when not doing NASA work is stardog.cljs, taking the existing stardog.js and building the apis around that

13:04 gtrak: you should totally talk to paul if you haven't already

13:05 abaker: oh we are, he and I collaborated on stardog-clj

13:05 gtrak: he wants to reimplement some mulgara algos in cljs

13:06 abaker: nice, I'll have to ping him on the cljs topics

13:06 gtrak: abaker: also, if you haven't noticed. I'm *extremely* excited about the CLJS future :-).

13:07 abaker: we'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:07 gtrak: i did notice!

13:08 gtrak: 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:10 rasmusto: will (into {} (map foo someseq)) realize all of that seq? (I assume yes)

13:14 Bronsa: rasmusto: yes

13:14 rasmusto: Bronsa: thank you

13:15 TimMc: rasmusto: clojure.core/into eagerly consumes whatever collection you hand it.

13:16 rasmusto: TimMc: is this because reduce is eager?

13:18 Natalia1: holaa


13:19 :P

13:20 TimMc: rasmusto: I suppose so, yes.

13:20 Natalia1: jajajaja

13:20 no se pasen

13:20 jajaja

13:21 rasmusto: ~guards

13:21 clojurebot: SEIZE HIM!

13:21 Natalia1: :P

13:21 rasmusto: Natalia1: hello

13:21 bbloom: rasmusto: dammit. don't engage

13:21 Natalia1: Holaa !!

13:21 rasmusto

13:21 :)

13:22 rasmusto: bbloom: I'm an optimist I guess

13:22 Natalia1: queee habla español

13:22 ??

13:22 lazybot: Natalia1: Definitely not.

13:22 clojurebot: ? is !

13:23 bbloom: ~!

13:23 clojurebot: BOT FIGHT!!!!!111

13:23 bbloom: heh

13:26 magopian: wow, did you guys see https://github.com/cgrand/enliven?

13:26 the successor to enlive?

13:27 i don't remember who i was talking with this morning saying that enlive was kinda slow, it seems this one solves the problem

13:28 Natalia1: jmk



13:29 bbloom: technomancy: you around? ^^^

13:29 clgv: ,(def foo.bar 42)

13:29 clojurebot: #'sandbox/foo.bar

13:29 clgv: ,foo.bar

13:29 clojurebot: #<CompilerException java.lang.ClassNotFoundException: foo.bar, compiling:(NO_SOURCE_PATH:0:0)>

13:29 technomancy: Natalia1: no habla

13:30 rasmusto: ,#'foo.bar

13:30 clojurebot: #'sandbox/foo.bar

13:30 Natalia2: HM

13:30 K

13:30 HELLO oubiwann

13:31 oubiwann: technomancy: thanks ;-)

13:31 clgv: just wanted to test if that dot is a problem

13:31 technomancy: hopefully a ban won't be necessary

13:31 bbloom: haha bot 1 quit and suddently bot 2 showed up

13:32 technomancy: thanks

13:32 rasmusto: (inc @technomancy)

13:32 lazybot: ⇒ 1

13:32 bbloom: $karma technomancy

13:32 lazybot: technomancy has karma 105.

13:33 bbloom: $karma @technomancy

13:33 lazybot: @technomancy has karma 1.

13:33 bbloom: technomancy: sheesh, you're fucking karma rich my friend

13:33 cbp: $karma bbloom

13:33 lazybot: bbloom has karma 30.

13:33 bbloom: i'm but a humble karma begger

13:33 Natalia1: kgholaa

13:33 pueden hablar español

13:34 plisss

13:34 bbloom: technomancy: give it another go? :-/

13:37 tbaldridge: i started to think about compiling in eclj, but i need to do an automated cps/trampoline transform first

13:38 tbaldridge: 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:38 they use types, i intend to try to use abstract interpretation

13:38 wish me luck :-)

13:40 Natalia1: please speak spanish :'(

13:40 pleaseeee

13:41 fbernier: hola?

13:41 brunov: Yo ablo español

13:41 hablo

13:41 perdón

13:41 Natalia1: hay gracias

13:41 alfin

13:41 AL FIN


13:42 BRUNOV:-[

13:42 hola

13:43 shoepie_: i'm looking for help changing the keys of a map

13:43 clgv: shoepie_: that probably involves reduce-kv ;)

13:44 shoepie_: 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:45 technomancy: Natalia1: this is an english channel

13:45 clgv: Natalia1: please stop your nonsense

13:45 technomancy: if you continue with your harassment I'll ban you

13:45 clgv: shoepie_: but maybe you should state your problem completely

13:45 cbp: shoepie_: reduce-kv or (zipmap (map f (keys m)) (vals m))

13:46 bbloom: technomancy: you're totally the good cop. i'd just go around handing out bans like candy

13:46 technomancy: hell, i might even ban myself

13:46 technomancy: bbloom: would rather avoid a /msg firestorm

13:47 bbloom: technomancy: surely a /ban + /ignore macro would do the trick

13:47 tbaldridge: "Oh we're doing good cop, bad cop? I thought we were doing bad cop, bad cop"

13:47 technomancy: bbloom: I need to get better with host masks, last time someone kept nick-hopping

13:47 gfredericks: does lein uberjar have a mechanism for excluding files from particular deps?

13:48 * bbloom dreams of some magic spam solution involving some kinda of crypto contract

13:48 gfredericks: or some sort of conflict resolution?

13:48 Natalia1: pleaseeeEEEEEEEEEEEEEEEEEEEE

13:48 brunov: technomancy: kick her. I offered help in Spanish in private and she doesn't have any questions

13:49 she's just trolling

13:49 clgv: :(

13:49 Raynes: Gotta love when your channel gets to 800 people.

13:49 Frozenlock: trolling on #clojure? That's a thing?

13:49 rasmusto: $google translate jurar

13:49 lazybot: [Jurar en inglés | Traductor español a inglés | English to Spanish ...] http://www.spanishdict.com/translate/jurar

13:49 Raynes: Yes.

13:49 Natalia1: SPEAKTALK

13:49 Raynes: No language is immune to popularity.

13:50 And popularity invariably brings degenerates. :\

13:50 gfredericks: I see :uberjar-merge-with

13:50 technomancy: brunov: thanks for the info

13:50 clgv: Raynes: 800 is popular already? ;) :D

13:50 Raynes: For an IRC channel? sure.

13:50 clgv: ah well that might be true^^

13:51 brunov: technomancy: no problem

13:51 rasmusto: wait, I thought everyone had a vps persisting irssi...

13:55 question 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:56 clgv: rasmusto: two-level hierarchy of maps seems ok to me

13:56 rasmusto: I haven't used namespaced keywords all that much, so this might not fit their use-case

13:56 shoepie_: clgv: thanks, reduce-kv was exactly what i needed

13:56 justin_smith: rasmusto: 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:56 rasmusto: clgv: at most it would be 3-4 levels of hierarch

13:57 clgv: rasmusto: I think namespaced keywords are intended for so to say "private attributes" in a map

13:57 shoepie_: great :D

13:58 rasmusto: okay, 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:01 gfredericks: does anybody know anything about a META-INF/services/java/sql/Driver.class file or similar?

14:01 this 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:03 gozala: tbaldridge: got a few moments ? I would like to ask something about core.async

14:03 tbaldridge: gozala: sure

14:03 gfredericks: is this a problem with uberjars in general?

14:04 and despite all of leiningen's uberjar-entry-customization options it doesn't seem possible to specify which dep to get a file from

14:04 technomancy: gfredericks: iirc uberjar stuff is on a first-wins basis

14:04 so move it to the top of :dependencies maybe?

14:04 gfredericks: technomancy: oh interesting

14:06 technomancy: half-haxy but it works I guess

14:13 rasmusto: ,(reduce (fn [m kvs] (assoc-in m (butlast kvs) (last kvs))) {} [[:a :b :c 1] [:b :e :f 3]]) ; nest some vecs

14:13 clojurebot: {:b {:e {:f 3}}, :a {:b {:c 1}}}

14:38 bbloom: tbaldridge: 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:38 fucking computer science man.

14:38 time to add .eclj to my vim file extensions ;-)

14:41 * rasmusto is excited for a yet-unknown reason by reading those comments

14:42 bbloom: rasmusto: i'm attempting some pretty crazy shit :-)

14:45 rasmusto: bbloom: you had me at "vim file extensions"

14:45 bbloom: hehe .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:46 rasmusto: gotcha. Are you just converting raw clojure to CPS?

14:46 bbloom: rasmusto: i have a variant of clojure that supports delimited continuations

14:46 the goal is to be able to *selectively* transform to CPS in a way that only uses trampolining if necessary

14:47 most code should compile to direct style wherever possible

14:47 brunov: gfredericks: to avoid that clobbering in a pure-Java project I had to use the mvn-shade plugin

14:47 rasmusto: hm. do you have an example of a function that would benefit from a CPS transform?

14:47 I know of CPS by name/basic premise only

14:48 brunov: gfredericks: 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:48 bbloom: rasmusto: CPS has two meanings really. 1 is you pass the continuation like a callback argument, the other is that you do something like:

14:48 (doc trampoline)

14:48 clojurebot: "([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:48 bbloom: rasmusto: the most commonly cited reasons for CPS would be to get tail call optimization, which many consider a goal in itself

14:49 i think that's a nice-to-have in 99% of programs

14:49 rasmusto: right, I think I knew about the tco motivation

14:49 bbloom: but i want to do this: http://lampwww.epfl.ch/~rompf/pldi2014.pdf

14:49 and this: http://math.andrej.com/eff/

14:50 rasmusto: bbloom: so your brainsplosion was: you don't have to work forwards, you just have to work backwards and see what happened?

14:50 stuartsierra: bbloom: JIT macros?

14:50 rasmusto: (batman)

14:50 bbloom: stuartsierra: it's pretty awesome.

14:51 rasmusto: the brainsplosion was that a CPS transform can be automatically derived from an interpreter with reified delimited continuations

14:51 gtrak: going on the reading list :-)

14:51 bbloom: rasmusto: at least, i think it can. i have no evidence of this, but i'm like 90% certain

14:51 gfredericks: brunov: oh interesting; I'm curious how adaptable this is to leiningen

14:51 bbloom: stuartsierra: the idea is that you can hook a function & inject code in to the compiler

14:51 rasmusto: bbloom: interesting. Thanks for the reading material :)

14:51 bbloom: stuartsierra: in a sensible, composable way

14:52 brunov: gfredericks: 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:53 gfredericks: brunov: do you know if these sorts of files are normally naively-concattable?

14:53 bbloom: stuartsierra: rasmusto: I want to have my expressivity cake and eat the performance too :-)

14:55 * gfredericks just learned what the cake eating-having idiom literally means

14:58 brunov: gfredericks: 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:58 clojurebot: Ack. Ack.

14:58 gfredericks: clojurebot: Yes. The file name?

14:58 clojurebot: Titim gan éirí ort.

14:58 gfredericks: clojurebot: gfredericks: Yes. The file name?

14:58 clojurebot: gfredericks: 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:58 seangrove: Wow, there's a W3C WebApps F2F meeting https://www.w3.org/wiki/Webapps/April2014Meeting

14:58 gfredericks: clojurebot: you are a weirdo

14:58 seangrove: I wonder what'll come out of that

14:58 clojurebot: I don't understand.

14:59 llasram: clojurebot: clojurebot is a weirdo

14:59 clojurebot: Ack. Ack.

14:59 johnnybl_: 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:59 gfredericks: brunov: oh interesting -- thanks!

14:59 brunov: gfredericks: np

14:59 amalloy: johnnybl_: it exists on OracleConnection just like any other method

15:00 johnnybl_: That's what I thought also but I am getting a reflection error.

15:00 justin_smith: johnnybl_: warning, or error?

15:00 johnnybl_: (ancestors oracle.jdbc.driver.T4CConnection)

15:00 #{ 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:01 error

15:01 justin_smith: can you paste the error somewhere so we can see it?

15:01 amalloy: johnnybl_: so, you can see that java.sql.Connection is not in that list

15:01 attempting to call methods as if it were a java.sql.Connection will thus fail

15:02 johnnybl_: sec let me check api I believe OracleConnection has the same method.

15:03 my fault looks like 12c updated jdbc to use isUsable... Dumb mistake thank for pointing out the obvious!

15:13 miseria: "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:46 gtrak: booted 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:47 bbloom: gtrak: what's java got to do with it? wouldn't it be clojure.clr ?

15:47 also, C# is a much more adventurous language than java. it's got some pretty neat shit in there these days

15:48 gtrak: right, that's what I mean. One of the big motivators to use clojure is because java hurts so much, C# is nicer.

15:48 monodevelop seemed pretty neat at first glance.

15:49 so, in my first question, I meant clojure-clr.

15:50 you probably wouldn't want to build a physics engine in it, but.. you could do neat stuff.

16:01 I guess clojure.core projects will never use cljx

16:02 tbaldridge: gtrak: once feature expressions come out cljx won't matter as much.

16:02 but of course we have to wait until that happens...

16:04 gtrak: yea, 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:25 malyn: gtrak: You might want to look at play-clj; seems like a better fit than monogame..? https://github.com/oakes/play-clj

16:56 bbloom: the 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:05 mrb_bk: yo yo

18:05 oh whoops wrong window

18:05 yo yo anyway :-p

18:05 bbloom: hi

18:05 bbloom: mrb_bk: hey man, what's up?

18:05 mrb_bk: dnolen_: nice podcast, enjoyed it

18:06 bbloom: oh yeah, i scrubbed through the podcast for 10 min or so. what i heard was good stuff as usual ;-)

18:06 mrb_bk: i learned a lot about react/om that i wasn't familiar with

18:10 bbloom: tpope: i'd like to do something slightly crazy w/ fireplace & i was wondering if you could point me in the right direction

18:13 tpope: i basically want to replace all instances of "clojure.core" with my own substitute namespace name depending on the current file extension

18:16 tpope: 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:17 mrb_bk: bbloom: whoah eclj looks insane

18:18 bbloom: mrb_bk: it has not even begun to be as insane as planned yet

18:18 locally, i'm making progress on the metacircular interpreter

18:18 mrb_bk: i can only imagine

18:18 bbloom: :-)

18:18 mrb_bk: very cool

18:19 looking forward to seeing progress

18:20 bbloom: mrb_bk: cool. i'll keep you posted

18:25 mrb_bk: https://www.youtube.com/watch?v=IHP7P_HlcBk

18:42 dbasch: any idea why this is throwing html exceptions? https://www.refheap.com/74678

18:45 dnolen_: mrb_bk: thanks!

18:46 mrb_bk: dnolen_: looking forward to next week

18:46 sell any tickets yet? :-p

18:46 dnolen_: mrb_bk: yep

18:47 we'll keep promoting it, we really can't have too many people here anyway :)

18:48 mrb_bk: awesome

18:48 dnolen_: bbloom: heading home for the night - gnight!!

18:49 amalloy: dbasch: 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:49 dbasch: amalloy: but if I request anything else, I get a 404 exception rendered as html

18:50 amalloy: even this does it: https://www.refheap.com/74680

18:51 amalloy: I’m running lein ring server-headless

18:51 amalloy: uhh, are you sure? you might have some stale code or something, because that last one looks pretty normal

18:51 dbasch: lein clean ; lein ring server-headless

18:52 amalloy: if so, be more clear about what's actually going wrong; i don't understand what "throwing html exceptions" means

18:52 dbasch: amalloy: I mean, I don’t expect to see html-formatted exceptions in a curl request

18:52 gfredericks: reiddraper: should I consider it a bug that (vector gen min max) generates vectors of size between min/max regardless of the size parameter?

18:52 we were using it to generate bounded strings via (vector some-char 0 254) and it just makes giant strings all the time

18:52 I can figure out a workaround but was wondering if this was a problem or not

18:53 amalloy: by the way, you can use `lein do clean, ring server-headless`

18:53 avoid paying the startup time any more often than you have to :P

18:54 dbasch: amalloy: sure, everything helps

18:54 amalloy: still, I want to return only json, never html

18:54 amalloy: but i dunno what to do about your problem. perhaps someone else has more knowledge/time

18:54 dbasch: amalloy: doing everything in the documentation here: https://github.com/weavejester/lein-ring

18:55 reiddraper: gfredericks: that's the current behavior, yeah, since i think it just uses gen/choose under the hood, which also ignores size

18:55 gfredericks: right

18:55 dbasch: amalloy: thanks anyway

18:55 reiddraper: gfredericks: 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:55 gfredericks: reiddraper: we do know it -- this is the 3-arg version of vector

18:55 so max-size is one of the args, right?

18:56 max-elements rather

18:56 reiddraper: gfredericks: 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:56 gfredericks: this is confusing because i'm overloading the word size...

18:56 gfredericks: right

18:56 so max-elements and max-size are different things

18:56 hiredman: dbasch: the ring lein plugin may inject various bits of middleware at dev time

18:56 reiddraper: let's use count to mean the legnth of the vector

18:57 gfredericks: k

18:57 and size is the input parameter next to rnd

18:57 dbasch: hiredman: btw, these are jetty stacktraces

18:57 reiddraper: gfredericks: and size to mean the parameter to the actual generator, which is currently ignored when using arity-3 vector and choose

18:57 hiredman: dbasch: *shrug*

18:57 gfredericks: reiddraper: so we can at generation-time pick a count proportional to (+ min-elements size)

18:57 reiddraper: gfredericks: 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:58 hiredman: dbasch: if you really want to see what it will look like in production deployed to your container, then deploy it to your container

18:58 dbasch: hiredman: I do, and it looks the same

18:58 reiddraper: gfredericks: what if we do (gen/choose 0 2500) and then only ever use a max-size of 100?

18:58 dbasch: hiredman: I can’t get rid of html stacktraces from jetty

18:59 hiredman: dbasch: right, so that must be a jetty issue, so I would check the jetty docs

18:59 reiddraper: gfredericks: 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:59 gfredericks: reiddraper: 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:59 ignoring the possibility of overruning max-elements there

19:00 dbasch: hiredman: lein ring uberjar creates a deployment of jetty that doesn’t seem to be configurable, or I cannot find how

19:00 hiredman: dbasch: lein ring uberjar doesn't contain jetty

19:01 oh, uberjar

19:01 reiddraper: gfredericks: 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:01 hiredman: blench, use uberwar and jetty-runner

19:02 gfredericks: reiddraper: oh I think I see what you're saying

19:02 okay gotta spaghetti I'll ponder that

19:02 thanks

19:02 reiddraper: gfredericks: np, later

19:02 gfredericks: i do have some ideas on it i'll run by you later

19:02 dbasch: hiredman: I think that may be the solution

19:03 hiredman: best idea so far

19:07 hiredman: doing 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:16 dbasch: hiredman: uberwar packs a web.xml file that I need to modify

19:17 technomancy: configuring with xml =(

19:17 dbasch: hiredman: I find it hard to believe that nobody has run into this while building an api with compojure

19:17 hiredman: dbasch: lein has some project.clj things you can use to fiddle with files as they get packaged up

19:18 technomancy: or you could just ... use clojure functions

19:18 hiredman: hard to say if it would work with uberwar

19:18 dbasch: hiredman: “:web-xml - web.xml file to use in place of auto-generated version (relative to project root).”

19:18 hiredman: dbasch: well, there you go

19:18 dbasch: that’s from the uberwar doc

19:19 hiredman: I can fix it, but it’s weird that I have to go that deep to create a pure json api

19:20 hiredman: dbasch: most people would most like has add middleware to handle exceptions and turn them in to json whatever

19:20 technomancy: dbasch: you don't have to, you're just working around hidden assumptions in lein-ring

19:21 hiredman: technomancy: which assumptions?

19:21 dbasch: hiredman: 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:23 hiredman: technomancy: which assumptions?

19:24 technomancy: hiredman: lein-ring seems to be providing its own entry point that you can't see

19:24 blr: hey, anyone happen to know if phillip lord is ever on here, or is anyone usig tawny-owl in production?

19:24 hiredman: technomancy: 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:26 technomancy: hiredman: I've used it briefly, but then stopped when I realized it was getting in the way without providing any value.

19:26 hiredman: *eyeroll*

19:26 bbloom: i've made a change to nrepl.. how do i get lein to use it?

19:26 hiredman: I should fork it, they way it works is terrible though

19:28 https://github.com/weavejester/lein-ring/issues/53

19:28 https://github.com/weavejester/lein-ring/issues/52

19:37 technomancy: blr: he's often on as ordunswung (or something vaguely like that) but not right now

19:38 blr: technomancy: ah thanks for that.. might actually have a concrete usecase for clojure at work with tawny-owl

19:38 which thrills me to no end

19:39 might try emailing him

19:40 technomancy: using the new erlang release yet? nice to have maps I would think

19:41 technomancy: blr: looking forward to it but haven't gotten a chance to try it yet

20:27 alew: hiredman: what's wrong with deploying an uberjar?

20:34 hiredman: alew: it is way less flexible then deploying a war to a container

20:35 deploying a way to a container I can do things like set the contextpath, and deploy multiple apps to the same process

20:35 you can do similar things with a fonting proxy and complicated rewrite rules

20:36 but you can just deploy a war and use jetty runner

21:05 tpope: bbloom: you mean a textual replace on everything that goes out, or just replace all the hardcoded versions?

21:06 bbloom: tpope: 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:07 tpope: nah output channel sounds terrible

21:07 bbloom: tpope: 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:08 tpope: first, i'm trying to add a key/value pair to the eval messages

21:08 tpope: bbloom: that has a simple answer: scriptease.vim's :Runtime

21:08 bbloom: tpope: you think of everything.

21:08 * bbloom installs it

21:09 gfredericks: bbloom: did you just install emacs into your vim?

21:09 bbloom: gfredericks: i think i got peanut butter in my jelly

21:11 tpope: you could make a dictionary of extension -> namespace and then just do g:core_ns[expand('%:e')]

21:11 that's the simplest solution I can think of

21:11 I assume you're just playing, not trying to get anything merged in

21:13 bbloom: tpope: ok, that's helpful. don't need this merged in anytime soon

21:13 tpope: the cider-nrepl middleware is (unsurprisingly) super emacsy

21:14 I know eval is terrible and all but when every editor plugin needs its own middleware everybody loses

21:14 bbloom: tpope: do i have to :Runtime a list of files, or can i somehow do the whole of fireplace?

21:15 tpope: you can give :Runtime .../vim-fireplace/{plugin,autoload}/**/*.vim I think

21:15 bbloom: too many file names :-(

21:15 tpope: fireplace is the only plugin this seriously burns me on so I haven't tried too hard to slove that problem yet

21:16 blr: tpope: are you still doing rubby stuff, or have you completely defected now?

21:17 tpope: huh well lucky for you there's only three files that matter

21:17 bbloom: tpope: yup no big deal

21:17 tpope: blr I actually recently took a short term ruby gig just to pay the bills

21:18 3 years into this consulting thing and I still take clients largely on a whim

21:20 bbloom: tpope: i'm a year in to that, it's pretty nice

21:27 Platz: /win size 30

21:27 irssi needs to trip input

21:28 trim

21:29 bbloom: tpope: i'm trying to pass an option from Eval to s:nrepl_eval

21:29 is there a good way to inspect values while i'm working in there?

21:30 tpope: PP is scriptease's pretty print

21:30 bbloom: :Runtime has already saved me an hour of time, thanks

21:31 tpope: may as well at least skim :h scriptease

21:31 bbloom: tpope: oh i was trying simple msg things & nothing was printing. PP works great. ok i'll RTFM on scriptease

21:36 guns: Is there a way to know if a thread is waiting on an object's monitor?

21:39 ooh, I bet I could extract the private lock counter from the object

21:47 bbloom: tpope: ok awesome. i've got this mostly working! thanks

21:51 tpope: 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:56 tpope: yeah I guess. we're missing an abstraction

21:56 be advised I'm very skeptical

21:58 in fact it's taking great restraint not telling you where to "stick it"

21:59 bbloom: tpope: haha, but you've enabled much awesomeness! i've got .eclj files now loading with nrep

21:59 i can eval forms from vim in the same JVM using my interpreter interoping with clj code perfectly

22:00 some 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:00 tpope: thanks!

22:04 tpope: is the missing abstraction an interface of sorts for the various generated snippets of code?

22:04 tpope: yeah

22:04 I started exploring that for cljs but ended up able to kick it down the road

22:04 bbloom: luckily, eclj is much much closer to clj

22:05 they both run on the same host & communicate freely

22:05 tpope: also I was hoping to delegate a bunch of this to nrepl ops

22:05 but cider-nrepl was a bit of a let down

22:05 bbloom: seems sensible, i had to do this: http://dev.clojure.org/jira/browse/NREPL-50

22:26 ddellaco_: is there a way to include something inside of /test for one project in /test for another?

22:26 shriphani: hi. has anyone played with scatter plots in incanter before ? I was wondering how to place labels on individual points - google isn't helping :)

22:27 beamso: ddellaco_: i've seen that in maven

22:27 ddellaco_: beamso: now you're just being mean

23:26 ssqq: If clojure has any function just like elisp 'unintern'?

23:27 bbloom: ssqq: just guessing: ##(doc ns-unmap)

23:27 lazybot: java.lang.SecurityException: You tripped the alarm! ns-unmap is bad!

23:27 ssqq: When I use 'clojure.string to current namespace, I want ignore the warning of replace 'reverse' and 'replace'

23:28 bbloom: (doc ns-unmap)

23:28 clojurebot: "([ns sym]); Removes the mappings for the symbol from the namespace."

23:28 bbloom: ssqq: oh, for that use :require-clojure :exclude

23:28 ssqq: bbloom: thanks

23:28 bbloom: ssqq: don't use ns-unmap there, see (doc ns)

23:28 ssqq: although it's common for ppl to import clojure.string :as s

23:29 (ns my-ns (:require [clojure.core :as s]))

23:29 then you can use s/reverse etc

23:31 ssqq: bbloom: thanks, How to get all symbols in current namespace?

23:39 guns: ssqq: (ns-publics *ns*)

23:44 ssqq: guns: I found (take 100 (ns-interns 'clojure.core)) could get it.

23:44 guns: ssqq: Oh I misunderstood you

23:45 ssqq: guns: you are welcome

23:50 akhudek: what could cause an object to lose a protocol implementation assigned to it via extend-type?

Logging service provided by n01se.net