2012-10-01
| 00:11 | tomoj | (= (__ 4) [[1 1 0 0] [0 1 1 0] [0 0 1 1]]) |
| 00:14 | tomoj | (fn [n] (map #(into (vec %) (repeat (- n (count %)) 0)) (butlast (take-while (partial not-every? zero?) (map (partial map +) (iterate (partial cons 0) [1 1]) (repeat (repeat n 0))))))) |
| 00:14 | tomoj | D: |
| 00:16 | tomoj | well, that take-while is stupid, but still, gotta be a better way |
| 00:16 | xeqi | tomoj: is that a 4clojure problem? |
| 00:16 | tomoj | not that I know of |
| 00:39 | Raynes | tomoj: Good lord, sir. |
| 00:41 | tomoj | (fn [n] (let [zeros (vec (repeat n 0))] (map #(assoc zeros % 1 (inc %) 1) (range (dec n))))) |
| 00:41 | tomoj | hmm |
| 01:51 | mindbender1 | tomoj: (fn [n] (let [_ n] [[1 1 0 0] [0 1 1 0] [0 0 1 1]])) |
| 02:05 | spoon16 | anyone with experience configuring noir + nginx |
| 02:16 | emezeske | spoon16: What's your question? |
| 02:25 | spoon16 | emezeske: I'm looking for an example that describes nginx + jetty configuration to host and run a noir app |
| 02:26 | spoon16 | noir uses ring which has a jetty adapter which just runs an embedded instance of jetty, I suppose I'm not familiar enough with the nginx + jetty stack in general to know how to get started given a noir app that I have running locally |
| 02:29 | tomoj | mindbender1: hah |
| 02:29 | mindbender1 | tomoj: so simple.. why stress myself |
| 02:32 | emezeske | spoon16: I don't think there's much about the nginx config that would be jetty-specific |
| 02:33 | emezeske | spoon16: Probably proxy_pass dynamic requests to the noir app, and have nginx serve the static files |
| 02:33 | emezeske | spoon16: serve them directly, I mean |
| 02:34 | spoon16 | yeah, that's what I was thinking… is there any reason that I would want to setup jetty separately or should I just use the embedded version that the noir app will start up? |
| 02:35 | emezeske | I think it's fine to use the embedded version, but I'm not an expert on that. |
| 02:37 | emezeske | Probably only need to do otherwise if there's some specific tuning you need to do |
| 02:41 | spoon16 | emezeske: was just reading your latest blog post did you try to interop with clojurescript and a common js library like jquery? |
| 02:41 | spoon16 | I see jayq |
| 02:41 | emezeske | Yep, I use jQuery very heavily, along with Twitter's Bootstrap plugins and a few other things |
| 02:43 | spoon16 | you should put up the source |
| 02:43 | emezeske | To what? |
| 02:44 | spoon16 | to School Seating Charts |
| 02:44 | emezeske | I am kind of trying to make money on it, I think I'll refrain |
| 02:45 | spoon16 | I figured… it's an interesting idea |
| 02:45 | emezeske | On the one hand, I would love to make it open source |
| 02:45 | amalloy | emezeske: just add 10M LOC and you can charge for a support contract |
| 02:46 | emezeske | But on the other hand, it would take someone 10 minutes to have their own app running :) |
| 02:46 | emezeske | amalloy: Hahaha... I'd have to switch to Java to pull off 10M LOC |
| 02:47 | spoon16 | just abstract out the algorithm, replace it with one that puts all the talkers together as close to the exit as possible |
| 02:47 | emezeske | Touche... it might work |
| 02:47 | spoon16 | emezeske: good blog post |
| 02:48 | emezeske | Thanks. I need to do the next one in the series... I've been lazy. |
| 02:48 | emezeske | Soon... Soon. |
| 02:50 | john2x | is there an equivalent to Python's dir() function? to list all the properties, etc of an object.. |
| 02:54 | emezeske | john2x: http://stackoverflow.com/questions/5821286/how-can-i-get-the-methods-of-a-java-class-from-clojure |
| 02:54 | emezeske | john2x: Maybe? |
| 03:01 | ori-l | john2x: what are you trying to do? |
| 03:02 | john2x | thanks emezeske. I think that'll do.. ori-l, I'm using a Java library with no docs (afaict), I'm trying to figure out what its objects are.. |
| 03:03 | ori-l | ah, right. ok then :) |
| 03:17 | john2x | noob question, how do I include clojure-contrib in lein project.clj? |
| 03:17 | the-kenny | monolithic contrib is outdated, which part do you need? |
| 03:21 | the-kenny | http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go might be helpful to decide which library you need :-) |
| 03:23 | the-kenny | then just Google for the package name for example clojure.data.codec and you'll usually find the entry for leiningens dependency key in the read me |
| 03:24 | the-kenny | excuse the strange formulation, I'm on mobile |
| 03:27 | tomoj | also, "http://search.maven.org/#search\%7Cga\%7C1\%7C%s" |
| 03:27 | tomoj | since new contrib libraries are often in maven central |
| 03:27 | tomoj | (the %s is where your query should go) |
| 03:28 | tomoj | (and the other % may need to be unescaped) |
| 03:33 | kral | namaste |
| 03:39 | grayzone | hi to all: how do I add classpath to the local lein project? |
| 03:39 | grayzone | there are other ways besides addurl manual or copy the jar in the lib project or creating local maven repository? |
| 03:49 | grayzone | the option : :extra-classpath-dirs ["........"] is correct or maybe deprecated for add classpath to lein project? |
| 03:56 | tomoj | I think it is deprecated |
| 03:57 | tomoj | google for "extra-classpath-dirs lein 2" |
| 04:09 | tomoj | is the SF meetup planned? |
| 04:10 | otfrom | morning |
| 04:10 | otfrom | anyone here at Strata in London? |
| 04:13 | Lajjla | otfrom, do you play StarCraft? |
| 04:14 | otfrom | nope |
| 04:14 | arrdem | SC1 or SC2 |
| 04:14 | samphippen | hello friends |
| 04:14 | samphippen | who else is at strata :) |
| 04:16 | samphippen | I also play starcraft |
| 04:17 | justicefries | i wish I was at strata |
| 04:31 | wei_ | clojurescript question: how would I make goog.ui.Popup extend MyCustomPopupBase instead of goog.ui.PopupBase? |
| 05:26 | mtd | samphippen: wish I was at strata too -- right around the corner on Old Broad Street but no ticket! Enjoy... |
| 05:33 | mindbender1 | in clojure we have have procedural fns vs compositional fns |
| 05:35 | steven123 | greetings, can anybody help me with init bindings in the repl? I've created a stackoverflow question: http://stackoverflow.com/questions/12663624/why-cant-clojure-repl-print-doc-binding-be-changed-in-clojure-repl |
| 05:58 | steven123 | can anybody help me with init bindings in the repl? I've created a stackoverflow question: http://stackoverflow.com/questions/12663624/why-cant-clojure-repl-print-doc-binding-be-changed-in-clojure-repl |
| 06:14 | steven123 | can anybody help me with init bindings in the repl? I've created a stackoverflow question: http://stackoverflow.com/questions/12663624/why-cant-clojure-repl-print-doc-binding-be-changed-in-clojure-repl |
| 08:48 | augustl | any ideas on how I can disable logging in test runs somehow? Using clojure.tools.logging now, tried adding a log4j-test.properties and setting {:jvm-opts ["-Dlog4j.configuration=log4j-test.properties"]} in project.clj, that didn't work though |
| 08:50 | augustl | alternatively, anyone know about a test framework for clojure with output that automatically handles logging, groups log output with relevant test cases, etc? ;) |
| 08:52 | augustl | hmm, a resources/log4j.properties containing "log4j.rootLogger=OFF" doesn't work either, I'm probably doing it wrong |
| 08:54 | ssedano | Hi, is there any vim plugin for ctags? I mean to add the functions list |
| 09:08 | Moses_ | Hi, anyone know of an open source web app that uses friend? I can't seem to wrap my head around friend, so I'm looking for a good example of how its used. |
| 09:11 | cemerick | Moses_: Look at the mock-app namespace for a comprehensive…mock app: https://github.com/cemerick/friend/blob/master/test/test_friend/mock_app.clj |
| 09:12 | Moses_ | Wow, thank you, both for the help and for the awesome library! |
| 09:12 | ro_st | i'm really stuck. how do i resolve this? java.lang.ClassNotFoundException: org.apache.http.entity.mime.MultipartEntity |
| 09:13 | ro_st | using clj-http on osx with oracle's jdk 7 u7 |
| 09:14 | ohpauleez | ro_st: Hmm, I've used the same library on the same jdk with the same os |
| 09:15 | ro_st | driving me nuts |
| 09:15 | ro_st | hi btw :-) |
| 09:16 | ro_st | looking at https://clojars.org/clj-http i see it needs http://search.maven.org/#artifactdetails%7Corg.apache.httpcomponents%7Chttpmime%7C4.2.1%7Cjar and i have that in my .m2 |
| 09:17 | ohpauleez | yeah, so weird, it should just be in you .m2 and work |
| 09:17 | ro_st | i get this stack trace on the (ns) that brings clj-http in |
| 09:17 | ohpauleez | hello! |
| 09:21 | ro_st | i should probably use clj-http 0.5.5 and not use 0.1.3 -eyebrow- |
| 09:24 | lotia | greetings all |
| 09:25 | wingy | is there a good way to read yaml files from clojure? |
| 09:25 | ro_st | aside from https://github.com/lancepantz/clj-yaml, you mean? |
| 09:26 | ro_st | ohpauleez: have you mucked with pushState in cljs yet? |
| 09:27 | Lajjla | ro_st, do you play STarCraft? |
| 09:28 | wingy | Lajjla: i do |
| 09:28 | wingy | 2 :) |
| 09:28 | lotia | is it better to simply download the incanter installer or to use lein |
| 09:28 | ro_st | Lajjla: i used to. |
| 09:31 | wingy | donno if i should use clj or node.js for the backend :/ |
| 09:31 | wingy | love clj the lang but love the node ecosystem |
| 09:31 | ro_st | clojure. |
| 09:31 | Lajjla | wingy, I knew it |
| 09:31 | Lajjla | you all do. |
| 09:31 | lotia | wingy: as opposed to lein? |
| 09:31 | ro_st | i'd much rather be able to understand my code |
| 09:32 | wingy | lotia: yeah |
| 09:32 | wingy | one thing that drove me back to node.js was that i thought i would use a lot of JS |
| 09:32 | wingy | thick clients thin servers |
| 09:33 | ro_st | sunk cost fallacy |
| 09:33 | wingy | but it has showed that it is the opposite .. thin clients thick servers |
| 09:33 | ro_st | you always have a choice for the future :-) |
| 09:33 | wingy | the servers are doing everything and serving the HTML to the clients .. in this way we can use cheap mobile phones but have the greatest experience |
| 09:33 | ro_st | remember what uncle Rich said? simple vs easy. do you want ease, or simplicity? |
| 09:33 | wingy | hm yeah |
| 09:33 | wingy | but i hate java? |
| 09:34 | wingy | or jvm |
| 09:34 | wingy | its slow! |
| 09:34 | ro_st | how much time do you spend deploying your code, and how much time do you spend reasoning about your code and writing it? |
| 09:34 | ro_st | which do you want to optimise for? |
| 09:34 | wingy | the latter! |
| 09:35 | wingy | ah .. you sucker .. you are sucking me into clj again |
| 09:35 | wingy | but thats why i asked the question here .. wanted some feedback |
| 09:35 | ro_st | -grin- |
| 09:36 | ro_st | the jvm is slow. but being able to see your entire solution on a single screenful of code is worth it |
| 09:37 | wingy | ro_st: yeah hate js |
| 09:37 | cemerick | "the jvm is slow" is a meaningless statement |
| 09:37 | wingy | if you could choose |
| 09:37 | unic0rn | it's not that slow, but people rarely tend to optimize their code and profile it properly |
| 09:37 | wingy | would you like clj on its own platform rather than jvm? |
| 09:37 | ro_st | cemerick, unic0rn: when compared to node.js start up time on the command line, it's slow |
| 09:37 | ro_st | which is wingy's particular contention |
| 09:38 | cemerick | Clojure is never "on its own platform". |
| 09:38 | wingy | ro_st: true |
| 09:38 | unic0rn | startup time is meaningless :) |
| 09:38 | ro_st | unic0rn: correct, if you work around it - repl, code-reloading, etc |
| 09:38 | unic0rn | honestly, i wonder how much it would change if all the main api would be stored in separate class files instead of a jar archive |
| 09:39 | unic0rn | could be worth checking |
| 09:39 | ro_st | hey, i don't mind. i use flatland/drip and ssd. it's not slow for me |
| 09:39 | wingy | im using BAAS like ApiGee App Services |
| 09:40 | wingy | anyone having experiences with BAASes? |
| 09:40 | wingy | kinvey, parse, stackmob, apigee |
| 09:40 | ro_st | not i |
| 09:41 | ohpauleez | As someone who has previously inherited a node.js system, don't do it |
| 09:41 | wingy | ohpauleez: dont do node? |
| 09:41 | ohpauleez | it was fine at a small scale - local dev proxy server. But when scaled up to handle real app interaction it became a nightmare |
| 09:42 | ohpauleez | it was difficult to reason about, difficult to debug |
| 09:42 | ohpauleez | multi-node setup to handle more scale is not as easy as "spinning another instance up" |
| 09:42 | wingy | ohpauleez: im using heroku |
| 09:42 | wingy | ps:scale web=3 |
| 09:42 | wingy | :) |
| 09:43 | ro_st | *laughs @ cemerick's tweet* |
| 09:43 | ohpauleez | heroku will fix the latter, but not the former |
| 09:43 | cemerick | whoa, add in some mongo, and you'll be web-scale in no time :-P |
| 09:43 | ohpauleez | hahaha |
| 09:43 | ohpauleez | fwiw, I've started down the path of CLJS on node for scripting apps - and so far it's been positive |
| 09:44 | ro_st | wingy: heroku does clojure just fine |
| 09:44 | wingy | is there a good data validator on clj? |
| 09:44 | ohpauleez | that said, I much rather just use the JVM straight |
| 09:44 | ro_st | wingy: two. valip and validateur. valip is clj/s thanks to cemerick. validateur is clj only |
| 09:44 | wingy | spitting out error messages so i can create the html if the form is invalid? |
| 09:44 | wingy | ok |
| 09:45 | cemerick | ro_st: that fork of valip is definitely experimental. Now that I have a handle on cljx, it'll be a lot easier in a lot of ways. |
| 09:45 | ohpauleez | if you need more convincing you can "handle the load" look at Ring+Jetty's benchmark numbers. If you want to ease the development CLJ+CLJS is mind-blowing |
| 09:46 | ro_st | cemerick: you're using cljx? how are you finding that? |
| 09:46 | cemerick | ro_st: pretty good so far, especially once I wrote an nREPL middleware for it. |
| 09:46 | wingy | i might go over to clj |
| 09:46 | wingy | i just dont believe in js |
| 09:46 | ohpauleez | cemerick: I'm going to shoot you an email about cljx re: kibit shortcomings. I meant to get around to it this weekend |
| 09:46 | ro_st | i've been using cljsbuild's crossovers (which work wonderfully) |
| 09:47 | cemerick | (which I'll be releasing once I have a good name for it) |
| 09:47 | ro_st | wingy: js ain't going away |
| 09:47 | cemerick | Crossovers are good too. I use both. |
| 09:47 | wingy | ro_st: yeah thats the sad news |
| 09:47 | ro_st | ah, so why cljx then? what does it do for you that co's don't? |
| 09:47 | wingy | ro_st: but im not doing much js on frontend |
| 09:47 | pjstadig | cemerick: thanks for the support :) |
| 09:48 | cemerick | ohpauleez: shoot away. FWIW, Jonas is on clojure-tools too. Hopefully I can get Kevin on there so we'll have a quorum. |
| 09:48 | cemerick | pjstadig: np :-) |
| 09:48 | cemerick | Now it wants a patch. Whack away, I guess. :-P |
| 09:49 | ohpauleez | ahh I'm going to climb with Kevin later today, I'll mention it to him |
| 09:49 | cemerick | ohpauleez: Excellent. I just submitted my first PR for cljx, so we'll see how that goes. ;-) |
| 09:49 | ohpauleez | ro_st: With cljx, you can conditionally load things |
| 09:49 | ohpauleez | like the difference in string operations, etc |
| 09:50 | ro_st | i got around that by (essentially) reimplementing clj and cljs versions using the same namespaces |
| 09:50 | wingy | is anyone here using datomic for production? |
| 09:50 | cemerick | ro_st: sorry, didn't see your message. The biggest win from cljx is that you can intermix cljs and clj code, and have one be transformed into the other. |
| 09:50 | augustl | are there any logging libraries for clojure where I can create my own instance of a logger somehow? Really disliking the magic log4j.properties stuff. A namespace called myapp.logger that defines "error", "warning" etc would have been nice. Suggestions? |
| 09:50 | ro_st | and each side looks in different places for that ns |
| 09:51 | ro_st | augustl: we're using logback |
| 09:51 | cemerick | e.g. (try (foo) (catch IllegalArgumentException e (bar e))) can be turned into (try (foo) (catch js/Error e (bar e))) |
| 09:51 | augustl | ro_st: looking it up, thanks |
| 09:51 | ro_st | cemerick: that's really handy. i'll have to spelunk in c2's code to see it in action, i guess |
| 09:51 | ro_st | wingy: we are |
| 09:51 | ro_st | using datomic in production, that is |
| 09:52 | ro_st | it's awesome |
| 09:52 | wingy | ro_st: advantages/disadvantages? |
| 09:52 | ro_st | transforming existing data is a bit of a pain |
| 09:52 | ro_st | you can't alter schema on existing data |
| 09:53 | wingy | i c |
| 09:53 | ro_st | let me correct that; we intend to use it in production. we aren't live yet. we're using it in closed- beta right now, where we can happily delete and rebuild databases |
| 09:53 | ro_st | which is what we do |
| 09:54 | augustl | ro_st: my biggest hurdle was groking datalog and how to "model" various situations. Ended up not using it (short on time etc) |
| 09:54 | ro_st | but the querying stuff is just sublime |
| 09:55 | ro_st | augustl: i know. it's a big unlearning. we're still decomposing some of the first queries we wrote due to the in-process nature of the peer |
| 09:55 | ro_st | no need to glom everything together any more |
| 09:55 | ro_st | truly refreshing! |
| 09:56 | wingy | clj is the most popular lisp i guess |
| 09:56 | ro_st | i don't understand why people would want to use anything else. |
| 09:57 | ro_st | and i've used everything else. |
| 09:57 | wingy | :) |
| 09:57 | wingy | eg? |
| 09:57 | clojurebot | Haha! The survey mentioned in the comments to Yegge's last post has a "favorite language" question, but Clojure is not an option. |
| 09:57 | ro_st | php js actionscript c# python ruby obj-c |
| 09:58 | ro_st | and the tiniest bit of java |
| 09:58 | wingy | html template engine allowing me to write HTML? |
| 09:59 | ro_st | enlive for clj, enfocus for cljs (a clone of enlive tailored to being in a live dom) |
| 09:59 | ro_st | both support plain html templates |
| 09:59 | ro_st | although we've quickly realised that hiccup has it's uses too. especially for crudmin stuff |
| 10:00 | ro_st | its* |
| 10:01 | wingy | its good that im not that new to clj … will speed up the conversion |
| 10:01 | ro_st | i can understand having to continue to work on existing codebases. we all have legacy code. but for new stuff? i wouldn't choose anything else. |
| 10:02 | wingy | im building something new and its getting larger .. js is a pain |
| 10:03 | ro_st | aye |
| 10:04 | wingy | thats the reason why everyone else is making abstrations like coffee and livescript! |
| 10:04 | wingy | because js is just too ugly |
| 10:05 | ro_st | if you're going to go through all that effort, might as well go all the way :-) |
| 10:05 | wingy | yeah |
| 10:05 | wingy | let me share a thought i have btw |
| 10:06 | augustl | wingy: Google Closure Tools, do it! |
| 10:06 | augustl | ref js is a pain |
| 10:07 | ro_st | ref js? |
| 10:08 | jrajav | javascript might be ugly on the outside, but coffeescript is ugly on the inside |
| 10:09 | wingy | so in the beginning it was clear to me that putting all the heavy stuff on the browsers was the way to go (sproutcore, extjs, emberjs etc). that would mean a lot of JS since probably 90 percent of the app would be on the clients .. but now im using jQuery Mobile and noticed that it is far better for performance/development to put most of the stuff back in the servers since it can make fast calculations and render the finnished html and jus |
| 10:09 | wingy | serve it to the browsers .. even the worse performance mobile phone can use my app since it just has to make an ajax request and display the HTML .. this makes me writing 90% of the code on the server why im thinking about clojure |
| 10:09 | augustl | ro_st: "referring to" |
| 10:09 | augustl | wingy: html doesn't have to perform better than JavaScript. As with everything, it depends. |
| 10:10 | augustl | wingy: what does the browser do when it receives HTML? First it has to parse it, then it creates DOM elements. With a JavaScript app, you don't have to parse HTML, you just create the DOM elements. |
| 10:10 | bhenry | have i lost my mind or did github recently change the clojure source code highlighter colors? |
| 10:10 | wingy | if we have thin cients/thick servers architecture it means that the future devices could be cheap and we dont have to upgrade them every year since we can just add more performance to the backend and the app would perform better .. rather than having 1 billion people buying new devices |
| 10:11 | jrajav | augustl: So parsing and interpreting JS is a no-cost operation suddenly? |
| 10:11 | wingy | eg. a device would be merely a screen .. the screen shot is sent to the device (aka monitor) if we assume the internet is blazing fast |
| 10:12 | paultag | (not like the startup time on cpython or java) |
| 10:12 | wingy | the server is the performance hardware .. the devices is just a portal .. you get this vision? |
| 10:12 | augustl | jrajav: ouch ;) |
| 10:13 | wingy | even when we play game it would be like this .. the device just put the rendered screenshots on screen .. like VNC |
| 10:14 | wingy | any thoughts? |
| 10:14 | augustl | who pays for the servers? ;) |
| 10:14 | wingy | yeah but of course they would pay for my app :) |
| 10:14 | wingy | in someway |
| 10:14 | jrajav | Oh god don't push server-side rendering for games please |
| 10:15 | ohpauleez | wingy: I'd spend more time looking at your quality attributes, functional and nonfunctional requirements, and the components/connectors/styles that get you those things. Then dig through reference architectures, compose accordingly and build up. - It sounds more like you're just choosing technology and seeing what sticks. You would be better served for seeking out value and realizing it with technology |
| 10:15 | jrajav | As a speedrunner and high-action game enthusiast I will never forgive you |
| 10:15 | wingy | :) |
| 10:16 | wingy | i just feel that this whole browser/js thing going on isn't ideal .. a spec is released .. then wait 5 years before it gets to all browsers .. even then they are all not the same so you need abstractions |
| 10:17 | augustl | wingy: what I like about the web is that it worked on an iPad from day 1 |
| 10:17 | wingy | or .. I could just render html in servers and throw them out to clients .. i upgrade the servers .. they all benefit from it |
| 10:17 | wingy | augustl: it will still do |
| 10:18 | wingy | some focuses on thick clients .. some on thin clients .. im starting to rethink why not the latter |
| 10:18 | wingy | seems solving a lot of problems |
| 10:18 | wingy | compatibility issues..performance issues |
| 10:18 | wingy | then you cache the html and you have no cost operations! |
| 10:19 | ohpauleez | Also, the power of any network is at the edge. The ability to have powerful computation on the client (especially the portables) opens up a world of possibilities for cooperative/peer/ubiquitous computing. Additionally - JS Tracing JITs (as found in V8) out perform most other scripting languages (excluding LuaJIT) including PyPy, Python, Ruby, etc |
| 10:19 | wingy | jquery mobile is good for the latter .. the js part is just for basic displaying stuff (I dont have to write) |
| 10:19 | ohpauleez | that said, you need to do whatever is right for your application, again, my previous point. |
| 10:20 | wingy | of course |
| 10:23 | wingy | i want simple |
| 10:23 | wingy | not easy! |
| 10:23 | wingy | THAT i know |
| 10:23 | ro_st | wingy, ultimately you need a mix of the two. medium server, medium client |
| 10:23 | wingy | ok lets imagine |
| 10:25 | wingy | internet speed is instant .. that means your server could be the only brain for all devices that act like portals only .. if internet speed is instant that would mean huge benefits like you upgrade the server and 1B people get increased performance |
| 10:25 | wingy | this means that internet speed is the vital factor here |
| 10:25 | wingy | the only one, what do you think? |
| 10:25 | casion | it's also a factor that's completely out of your control |
| 10:26 | wingy | casion: why i said imagine |
| 10:26 | ohpauleez | wingy, this thought experiment is an exercise pushing you in the wrong direction |
| 10:26 | casion | wingy: imagining irrelevant things does not make them relevant |
| 10:26 | casion | now it's irrelevant AND imaginary |
| 10:27 | wingy | uhm .. well, we always start somewhere :) |
| 10:27 | wingy | ro_st: would you agree in the scenario you would only need thin clients since all the hardwork is done on the servers |
| 10:28 | ohpauleez | wingy: That is *also* a thought experiment in the wrong direction |
| 10:28 | casion | wingy: what you descrcibe already exists, it's called a 'display' |
| 10:29 | wingy | casion: clearly i aint talking about displays here :) |
| 10:29 | ro_st | wingy: yes. but i prefer to work with the geography, not the map |
| 10:29 | casion | it seems like you clearly are to me |
| 10:29 | cemerick | wingy: AFAICT, everything you've talked about is entirely divorced from a concrete job to be done |
| 10:30 | casion | since all this imaginary thin client does is display things generated by the server |
| 10:30 | cemerick | This makes it nigh impossible to reason about tradeoffs between solutions. |
| 10:30 | ohpauleez | What are you trying to build? To what degree does it need to do those things? What other problems exist? How can I pull those problems apart to their core pieces? Now - what am I trying to build and to what degree? |
| 10:30 | ohpauleez | cemerick: Thank you! |
| 10:30 | ro_st | it goes back to what ohpauleez said. what are *your* particular constraints? |
| 10:31 | wingy | you guys are cool .. just that i think we are seing things from different perspective .. this has to do with concrete stuff .. like i just discovered that for my app its better to have most of the logic on server side |
| 10:32 | wingy | it has impact on how my app will be formed .. put it on server or client? just that one is crucial |
| 10:32 | ohpauleez | let's talk about your constraints, trade-offs, quality attributes you need to it, functional requirements you need to hit, architecture styles that work in those areas, components and connectors that compose to achieve your quality attributes, and start digging through reference architectures to see what we come up with. Then we can analyze trade-offs again, find what we're missing, pull the remaining problems apart, and build u |
| 10:32 | ohpauleez | solution. |
| 10:33 | wingy | yepp |
| 10:33 | ohpauleez | need to have* |
| 10:33 | TimMc | ohpauleez: "and build u" |
| 10:34 | wingy | need every client to perform well .. i realized this would boil down to less JS on client .. heavy calculations on server |
| 10:34 | casion | I almost envy you guys who even have the option of server or client sided processing |
| 10:34 | wingy | clients just like portals displaying the rendered html |
| 10:35 | ohpauleez | and build up a solution** |
| 10:35 | ohpauleez | wingy: What does "perform well |
| 10:35 | ohpauleez | mean |
| 10:36 | wingy | for each product in my app i need to create the form elements |
| 10:36 | ohpauleez | (thanks TimMc ) |
| 10:37 | wingy | putting this parsing/building on clients made them take some secs before being able to display the form |
| 10:37 | ro_st | ohpauleez: you need to tell him what your hourly rate is before you start, so there are no surprises later -grin- |
| 10:37 | casion | wingy: so you have a client that takes a set of server-generated data that is interpreted and displayed |
| 10:37 | ohpauleez | ro_st: haha |
| 10:38 | casion | pretty sure that's simple a display :| |
| 10:38 | wingy | casion: so i took it one step further |
| 10:38 | cemerick | wingy: If all you're doing is shipping around form data, then it doesn't matter where the "work" is done. There's not much work there to begin with. |
| 10:38 | wingy | having it rendered the html with the form |
| 10:38 | wingy | and the client just put it on dom |
| 10:38 | casion | you could even take this mythic beast and beam a wireless signal to it and have entertainment streamed to people's homes |
| 10:39 | casion | wouldn't that be amazing |
| 10:39 | ro_st | casion: i'm not sure, but are you being sarcastic right now? -grin- |
| 10:40 | casion | me!? never |
| 10:40 | ohpauleez | wingy: Here's a better idea - |
| 10:41 | ohpauleez | you put all your HTML snippets on a CDN, you stream data (in Clojure/EDN) to your client, your client build out the dom swaps with the snippets and BAM, you're done. The JS (from CLJS) that does this is also on a CDN. |
| 10:41 | ohpauleez | the first render is done server side |
| 10:41 | ohpauleez | which is also optimized for the most important traffic |
| 10:42 | ohpauleez | (we'll say… SEO purposes) |
| 10:42 | ro_st | and mobile. |
| 10:42 | abalone | profiling some code... using java VisualVM ... i just ran something at the repl and it says Sunday.rmi.transport.tcp.TCPTransport$connectionHandler.run() is taking 77% of the time. what is it doing? all my code is doing is processing a string inefficiently... |
| 10:42 | ohpauleez | boom, and boom |
| 10:42 | abalone | s/Sunday/sun |
| 10:45 | ohpauleez | I'm going to call it - cooperative partial renders (because everything needs a good name). You can steal the idea :) |
| 10:45 | abalone | um. 77% of the time but only 4 invocations. |
| 10:45 | abalone | erm. it's still running. I think it's going to explode. |
| 10:46 | ohpauleez | abalone: I'm not sure, but usually run() calls are for threads. So it could just be sitting idle in thread. What has the most CPU time? |
| 10:47 | abalone | according to "self time" run() has over 2 minutes of time now |
| 10:47 | abalone | it's melting! |
| 10:47 | casion | abalone: there's a few SO posts about that |
| 10:48 | casion | most of them seem resovled |
| 10:51 | wingy | could someone point me to a good guide for setting up my clj server? |
| 10:55 | ttimvisher | hi all |
| 10:56 | ttimvisher | anything inteligient i can do to debug why lein1 can't find an artifact in central that's there according to the site? |
| 10:56 | ttimvisher | specifically jackson-core-asl 1.8 and up |
| 10:56 | ttimvisher | ? |
| 11:01 | cemerick | ttimvisher: Central has been having issues around some artifacts for days now. :-( |
| 11:02 | ttimvisher | cemerick: thanks |
| 11:02 | marcel23 | I keep getting a "Check :dependencies and :repositories for typos." error... is that what you guys were just talking about? |
| 11:02 | marcel23 | |
| 11:02 | cemerick | marcel23: Yes; there's a thread on the Clojure ML about it, too. |
| 11:03 | marcel23 | oh thanks! |
| 11:06 | wingy | what IDE/editor are you using? |
| 11:06 | wingy | for clj |
| 11:06 | wingy | ah |
| 11:06 | wingy | emacs |
| 11:08 | ohpauleez | wingy: There is support for nearly every editor |
| 11:09 | casion | not that you'd want to use most editors |
| 11:09 | unic0rn | not that emacs can be called an editor. it's just pain in the ... |
| 11:10 | casion | emacs is the best! |
| 11:10 | unic0rn | vim ftw |
| 11:10 | wingy | what do you think about light table? |
| 11:10 | unic0rn | :P |
| 11:10 | casion | unic0rn: outside of #clojure… sure |
| 11:10 | TimMc | unic0rn: Vim works too. You're not going to get an editor war started in here easily. |
| 11:10 | unic0rn | TimMc: not even trying to. just throwing in a little bit of humour, that's all |
| 11:11 | TimMc | OK. |
| 11:11 | casion | I'm trying |
| 11:11 | casion | unic0rn stop being uncooperative |
| 11:11 | unic0rn | you fail |
| 11:11 | unic0rn | :P |
| 11:12 | ohpauleez | "Clojure - the language that ended all editor wars" |
| 11:12 | casion | I use emacs. vim, textwrangler and eclipes |
| 11:12 | casion | obviously none of them very well since I can't fucking type |
| 11:13 | abalone | (inc casion) ; http://stackoverflow.com/questions/7205612/does-filtering-classes-for-cpu-profiling-work-in-java-visualvm |
| 11:13 | lazybot | ⇒ 0 |
| 11:13 | zoldar | casion: nevethless, you're insisting on a otaku keyboard layout ;) |
| 11:13 | wingy | wow simple to install lein |
| 11:13 | wingy | wget https://raw.github.com/technomancy/leiningen/preview/bin/lein && chmod 766 ./lein && lein |
| 11:14 | casion | zoldar: eh? |
| 11:14 | wingy | another thing why clojure is also i know i will get top programmers |
| 11:14 | casion | zoldar: I have 3 layouts printed on my caps :) |
| 11:14 | zoldar | casion: http://elitekeyboards.com/products.php?sub=leopold,tenkeyless&pid=fc200rtabn |
| 11:14 | casion | zoldar: I'm aware, I'm typing on a filco at, with a leopold about 2 feet from me |
| 11:14 | casion | ;) |
| 11:14 | unic0rn | btw, since we're at editors, http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released |
| 11:14 | unic0rn | pretty nice thing |
| 11:15 | nDuff | wingy: As a counterpoint -- you could find yourself stuck between getting great people who are too expensive, vs affordable hobbyists who are thrilled to have a chance to learn on the job but _are_ learning on the job. |
| 11:15 | casion | it'd be neat to see sublime get reasonable clojure support |
| 11:15 | zoldar | casion: eheh, sorry then, dodgy attempt to make fun |
| 11:16 | casion | zoldar: ah, I just didn't get what you were trying to say initially :) |
| 11:16 | zoldar | casion: I've got a filco brown btw |
| 11:16 | casion | zoldar: majestouch II with blues for me |
| 11:16 | casion | I collect mechs :D have around 40 of them atm |
| 11:16 | zoldar | ok, enough keybaord porn |
| 11:16 | casion | I collect switches in general actually |
| 11:17 | wingy | nDuff: sure |
| 11:17 | wingy | are clj programmers always expensive? |
| 11:17 | zoldar | casion: 40.. nice, I barely afforded to buy one |
| 11:18 | wingy | but i would love to have one expensive dev than 2 mediocre |
| 11:18 | casion | zoldar: everyone has their obsessions I guess, mine just happen to be relatively.. uhh, weird |
| 11:18 | voland62_2 | Hi. If I have this: (def my-num (atom 23)) how can I swap! it to new value (100 for ex.)? |
| 11:18 | zoldar | and still, it was a second-hand (albeit in mint condition) grabbed on geekhack |
| 11:18 | casion | zoldar: that's actually where I got my main filco from |
| 11:20 | casion | then i replaced all the switches to the mx1a-e1nw and changed all the springs to much higher force |
| 11:20 | casion | redrilled the pcb on it as well |
| 11:22 | zoldar | sounds serious, I just bought it to see what all the fuss is about - unfortunately I don't type much on it recently. Doing most of my work in front of laptop. Either way, I've tried to use it one late evening and woke up wife. She wasn't amused... |
| 11:26 | casion | zoldar: hehe, we have a closed door rule. If you're typing, there's at least 1 closed door between you and anyone else in the house |
| 11:27 | casion | at home I use model M, with tactile leafs on it, so it's the king of loud and obnoxious |
| 11:27 | unic0rn | so noone can see that in free time you're coding in perl, because they would call you a pervert? :P |
| 11:27 | zoldar | casion: I imagine |
| 11:28 | jcromartie | this is kind of weird |
| 11:28 | casion | unic0rn: the 2 programmers in my family just make fun of me for using clojure :( |
| 11:28 | jcromartie | casion: aww |
| 11:28 | jcromartie | ,(clojure.set/subset? #{1} #{1}) |
| 11:28 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.set> |
| 11:28 | jcromartie | oh right |
| 11:28 | unic0rn | no programmers in my family, luckily |
| 11:28 | jcromartie | ,(do (require 'clojure.set) (clojure.set/subset? #{1} #{1})) |
| 11:28 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.set> |
| 11:28 | jcromartie | yeah OK |
| 11:29 | jcromartie | anyway, #{1} is not a subset of #{1}, which is I guess correct strictly speaking |
| 11:29 | jcromartie | but is surprising when it comes up in your running code |
| 11:29 | casion | unic0rn: my brother does, and an uncle in law who I see very often… both use java primarily |
| 11:29 | jcromartie | casion: what do they use? make fun of them for that |
| 11:29 | jcromartie | ah there we go |
| 11:30 | casion | it's a bit of the ignorant 'If you're going to use java, just use java' nonsens |
| 11:31 | gfredericks | jcromartie: #{1} is a subset of #{1} according to the standard mathematical definition |
| 11:31 | jcromartie | oh then |
| 11:31 | ttimvisher | people having maven problems might want to check into mirrors: http://maven.apache.org/guides/mini/guide-mirror-settings.html |
| 11:31 | unic0rn | pick a simple task to get coded in java in 2-4 hours, challenge them, finish it in half an hour, problem solved |
| 11:31 | jcromartie | gfredericks: then clojure.set/subset? is wrong |
| 11:31 | gfredericks | jcromartie: well as long as the docs say exactly what it does |
| 11:31 | gfredericks | ,(doc clojure.set/subset?) |
| 11:31 | clojurebot | Cool story bro. |
| 11:31 | gfredericks | &(doc clojure.set/subset?) |
| 11:31 | lazybot | ⇒ "([set1 set2]); Is set1 a subset of set2?" |
| 11:31 | jcromartie | :P |
| 11:32 | gfredericks | &(clojure.set/subset? #{1} #{1}) |
| 11:32 | lazybot | ⇒ true |
| 11:32 | jcromartie | weird |
| 11:32 | gfredericks | jcromartie: looks right |
| 11:32 | arrdem | yay! clojure is sane! |
| 11:32 | gfredericks | (inc clojure) |
| 11:32 | lazybot | ⇒ 9 |
| 11:32 | jcromartie | what the heck… oh I see |
| 11:32 | jcromartie | &(clojure.set/subset? [1] [1]) |
| 11:32 | lazybot | ⇒ false |
| 11:32 | jcromartie | &(clojure.set/subset? [1] [1 2]) |
| 11:32 | lazybot | ⇒ true |
| 11:33 | gfredericks | I'm not sure the behavior for vectors is defined |
| 11:33 | jcromartie | :P maybe it would help if I were using sets |
| 11:33 | gfredericks | I'm rather surprised it even does something |
| 11:36 | zoldar | well, in general it uses length comparison and (every? v1 v2) |
| 11:36 | gfredericks | ah ha |
| 11:36 | gfredericks | so it oughta crash on lists |
| 11:36 | gfredericks | &(clojure.set/subset? '(1) '(1 2)) |
| 11:36 | lazybot | ⇒ false |
| 11:38 | wingy | why is hiccup from this user [org.clojars.pntblnk/hiccup "2.0.0-alpha1"] and not from the https://github.com/weavejester/hiccup |
| 11:40 | gfredericks | wingy: is that the only hiccup? |
| 11:40 | cemerick | There are many forks, only one is canonical. |
| 11:40 | gfredericks | people push their own versions of libs to clojars all the time |
| 11:40 | wingy | ok |
| 11:40 | gfredericks | I don't have breakfast in the morning until I've forked a clojure lib and pushed it to clojars |
| 11:40 | gfredericks | keeps me alert |
| 11:41 | wingy | it was the first hit |
| 11:41 | wingy | https://clojars.org/hiccup |
| 11:41 | cemerick | clojars does not sort is search results |
| 11:43 | gfredericks | I thought it sorted by most recent push |
| 11:43 | gfredericks | which means heavily forked libs will usually show not-the-canonical-one |
| 11:43 | cemerick | s/results/results in a useful way |
| 11:43 | gfredericks | figuring out what's canonical wouldn't be a trivial thing |
| 11:44 | zoldar | that sometimes annoying, when I have to hunt the canonical version an a forking timeline... or I'm just crap at using github right |
| 11:44 | cemerick | Usage is a good bet. See ClojureSphere. |
| 11:44 | arrdem | yeah... especially because some things like fnparse the accursed are abandonware with several forks of varying quality |
| 11:49 | wingy | so good to be back on clj |
| 11:51 | zoldar | gfredericks: my wrong. I was looking at source here: https://github.com/richhickey/clojure/blob/f769f5650edc782245089ac021d39d0acbcd490d/src/clj/clojure/set.clj#L142 , when the relevant line in a recent source looks like here: (every? #(contains? set2 %) set1) |
| 11:55 | cemerick | I thought lazybot was warning on any linkage to richhickey github URLs? |
| 11:58 | marcel23 | so I'm using a mirror for central for in my project clj and set LEIN_SNAPSHOTS_IN_RELEASE=1 but I still can't get my project to run. anyone have any ideas or links or anything? sorry i'm a complete noob at this dependency management stuff. |
| 11:59 | zoldar | mystery solved: https://github.com/clojure/clojure/commit/3acb6ee7ec5c295ae14de861d03a5efd115a5968 |
| 12:01 | uvtc | wingy , zoldar : I keep a list of links to the canonical Clojars pages for given projects at http://www.unexpected-vortices.com/clojure/dining-car.html . |
| 12:02 | uvtc | Well, for some small number of projects anyway. |
| 12:04 | zoldar | uvtc: nice, I've seen a couple stuch lists, like http://www.clojure-toolbox.com/ |
| 12:05 | wingy | uvtc: thx |
| 12:05 | uvtc | wingy: y/w |
| 12:06 | uvtc | zoldar: right. The other 2 that I know of are the toolbox and clojuresphere. |
| 12:14 | dnolen | JS compile target space is heating up http://www.typescriptlang.org, Microsoft offering |
| 12:15 | wingy | so if you use compojure you dont need to use ring directly right? |
| 12:15 | wingy | no need for [ring "1.1.6"] in project.clj? |
| 12:17 | scriptor | dnolen: doesn't seem to be giving me any type errors |
| 12:25 | wingy | https://github.com/weavejester/compojure/wiki/Getting-Started |
| 12:25 | jcromartie | wingy: Compojure will import Ring itself |
| 12:25 | wingy | jcromartie: yeah |
| 12:28 | jcromartie | wingy: but I import ring itself for other purposes |
| 12:28 | wingy | okay |
| 12:34 | dnolen | TypeScript is actually pretty interesting - gradual typing goes mainstream? TypeScript lets you declare types for any JS lib. |
| 12:37 | ohpauleez | dnolen: Definitely seems interesting - it's fascinating to watch the work being done in gradual typing |
| 12:45 | wingy | http://www.zdnet.com/microsoft-takes-the-wraps-off-typescript-a-superset-of-javascript-7000004993/ |
| 13:03 | wingy | does this mean we all go over to M$? |
| 13:04 | unic0rn | who sane codes in javascript anyway? |
| 13:09 | cemerick | replaca: we need pprint in cljs, stat! ;-) |
| 13:11 | wingy | how is session handled in compojure/ring? |
| 13:11 | marcel123 | im really sorry to not shut up about this but does anyone know how to fix the dependency artifact problems im having? I've tried using mirrors, removing dependencies, everything, and I can't get this to work :( here's my project.clj and profiles.clj: https://www.refheap.com/paste/5411 |
| 13:11 | wingy | https://github.com/weavejester/compojure/wiki/Sessions |
| 13:11 | marcel123 | it's just really depressing waking up and not being able to get my project to run when i was fine yesturday |
| 13:13 | cemerick | marcel123: I'll bet lein deps works just fine if you pull out the clj-aws-s3 dep? |
| 13:13 | cemerick | (get rid of all the mirrors, etc) |
| 13:14 | wingy | is there a lib for using redis as session storage https://github.com/ring-clojure/ring/wiki/Sessions |
| 13:14 | marcel123 | cemerick: wow you're right, thanks so much! I thought I tried removing everything one by one but I guess not. |
| 13:15 | cemerick | marcel123: it's an ongoing issue with Maven central. |
| 13:16 | cemerick | See http://groups.google.com/group/leiningen/browse_thread/thread/e484d2d52ed30b12 and http://groups.google.com/group/leiningen/browse_thread/thread/d71eebbb152c627b |
| 13:17 | marcel123 | cemerick: ok great, glad it's not just me, thanks for those |
| 13:23 | emezeske | Anyone know the $command to do a google search in this channel? |
| 13:24 | scriptor | $google clojure |
| 13:24 | lazybot | [Clojure - home] http://clojure.org/ |
| 13:27 | emezeske | scriptor: thanks! |
| 13:27 | emezeske | I guess I might have tried that... :) |
| 13:43 | wingy | data manipulation is far more better in clj than js |
| 13:47 | wingy | could somebody tell me how to use session https://github.com/ring-clojure/ring/wiki/Sessions in compojure app? |
| 13:49 | wingy | this is my current app https://www.refheap.com/paste/5412 |
| 13:53 | abalone | is this correct: creating and accessing *many* small maps will be slower than creating and accessing the same number of vectors ? |
| 13:53 | scriptor | how small? |
| 13:54 | emezeske | $google ring session redis |
| 13:54 | lazybot | [wuzhe/clj-redis-session · GitHub] https://github.com/wuzhe/clj-redis-session |
| 13:54 | emezeske | wingy: ^ |
| 13:55 | abalone | scriptor: maps of four elements |
| 13:55 | wingy | emezeske: thx! |
| 13:56 | wingy | emezeske: which clj-redis should i use? |
| 13:59 | amalloy | abalone: i don't think there's enough information to answer the question |
| 13:59 | emezeske | wingy: Is there more than one project named clj-redis? |
| 13:59 | wingy | emezeske: https://clojars.org/search?q=clj-redis |
| 13:59 | abalone | amalloy: what other information is needed? |
| 14:00 | emezeske | wingy: The canonical version of a JAR is the one where the group ID matches the name, e.g. clj-redis/clj-redis |
| 14:00 | amalloy | cemerick: iirc he only warns about richhickey.github.com, not github.com/richhickey |
| 14:00 | emezeske | wingy: That's usually abbreviated to just clj-redis |
| 14:00 | emezeske | wingy: So, the one at the bottom (by mmcgrana) is the canonical one |
| 14:00 | wingy | emezeske: ok thx |
| 14:01 | wingy | a little bit outdated |
| 14:01 | wingy | hope it didnt need bug fixes |
| 14:01 | amalloy | abalone: well, what it means to "create and access" them, and how the maps and vectors are similar and different. but really, i think the difference will be small enough you should choose whichever makes more semantic sense in your problem |
| 14:02 | emezeske | wingy: Well, I don't know that the canonical version is the most up to date |
| 14:03 | emezeske | wingy: You can always check http://www.clojuresphere.com/?query=clj-redis |
| 14:03 | abalone | amalloy: oh. there's no sharing between these little maps and they're all created "from scratch" like {:a 1 :b \2 :c 3 :d -4} |
| 14:03 | emezeske | wingy: Looks like mmcgrana's version is the most widely used, FWIW |
| 14:03 | wingy | emezeske: ok |
| 14:04 | abalone | amalloy: and this is in cljs (not clj) |
| 14:04 | cemerick | amalloy: surely someone knows how to fix that? |
| 14:04 | abalone | amalloy: maybe i should also ask if there are performance gotchas in cljs that are different from clj |
| 14:05 | amalloy | cemerick: sure, i wrote the regex myself, back in the day |
| 14:05 | wingy | what is the simplest way doing layouting using hiccup .. that is having a layout (head scripts) and then render different body documents inside of it |
| 14:05 | abalone | amalloy: like keywords become strings and then whoops you're suddenly comparing strings in js |
| 14:05 | cemerick | amalloy: oh, it's a plugin? I figured it was just a command to set up a new watch pattern or something. |
| 14:06 | emezeske | wingy: That might be a job for a middleware. |
| 14:06 | amalloy | cemerick: i wrote it pretty brittle-ly, i'm afraid |
| 14:06 | amalloy | his config file has a map of regexes to replacements/responses |
| 14:08 | TimMc | That's why god invented |. |
| 14:10 | emezeske | TimMc: God invented the one-eyed expressionless emoticon? |
| 14:11 | TimMc | No, the alternation operator. |
| 14:11 | cemerick | I thought it was cyclops. |
| 14:11 | cemerick | Better known as |• |
| 14:12 | TimMc | richhickey[.]github[.]com|github[.]com/richhickey |
| 14:12 | wingy | the worse part comparing to node.js is lack of doc |
| 14:12 | casion | the worst part of what? |
| 14:13 | amalloy | TimMc: it's brittle because it's in a config file, not because it's using regexes :P |
| 14:14 | amalloy | actual current map-entry: [#".*(https?://)richhickey(.github.com/\S*).*" "Nooooo, that's so out of date! Please see instead $1clojure$2 and try to stop linking to rich's repo."] |
| 14:14 | TimMc | Oh right, it does replacement. |
| 14:14 | amalloy | i would happily accept a change if someone can find a way to get that to also chide you for linking to contrib; currently he just points to the clojure/clojure-contrib repo as if that were useful |
| 14:15 | amalloy | also, haha, i seem to have assumed rich would never write anything but clojure; if someone links to his datomic repo i bet lazybot gets up in arms |
| 14:16 | cemerick | I thought the same thing about edn, bu it looks like he doesn't have any active repos himself anymore. |
| 14:17 | pandeiro | cemerick: do you know what would be the most efficient way to enter an attachment that is a javax.mail.internet.MimeBodyPart into CouchDB with clutch? |
| 14:18 | amalloy | oh right, datomic isn't on github because it's not open |
| 14:20 | cemerick | pandeiro: if you can find a byte array or inputstream, that'd be it |
| 14:20 | pandeiro | cemerick: i can get those, but for some reason clutch just hangs when i try with input-stream... i can see data has entered the database by its size in futon but no attachments appear in the doc |
| 14:21 | pandeiro | i am wondering if the .getSize method doesn't correspond with the :data-length param clutch/put-attachment is expecting? |
| 14:26 | jcromartie | stink bugs must die |
| 14:28 | Hodapp | jcromartie: why? |
| 14:31 | jcromartie | Hodapp: you obviously don't live the mid-Eastern US |
| 14:31 | jcromartie | they are crawling all over my walls and desk and computer |
| 14:31 | jcromartie | in my cables and bags, printer, etc. |
| 14:33 | TimMc | jcromartie: Brown Marmorated Stink Bug? |
| 14:33 | jcromartie | the one and only |
| 14:33 | TimMc | Gotta find a recipe for those. |
| 14:33 | jcromartie | tacos! |
| 14:34 | TimMc | My dad is helping some company evaluate phermomone traps for BMSBs. |
| 14:35 | Hodapp | jcromartie: I'm in Cinci... |
| 14:36 | jcromartie | TimMc: I wish them the best of luck |
| 14:36 | Hodapp | jcromartie: so I still see them around plenty. |
| 14:37 | jcromartie | if by "plenty" you mean hundreds a day in your home |
| 14:37 | jcromartie | then I can sympathize :) |
| 14:37 | jcromartie | otherwise you guys still have it easy |
| 14:38 | Hodapp | If hundreds a day are making it into the home I have to wonder about the construction quality... |
| 14:38 | callen | best clojure book, go: |
| 14:38 | scriptor | for what level? |
| 14:39 | callen | (for someone who knows some Lisp, and no Java, and can only tinker in Clojure (~50 solutions in 4Clojure)) |
| 14:39 | casion | for what background? |
| 14:39 | callen | Common Lisper |
| 14:39 | casion | joy of clojure probably then |
| 14:39 | callen | I know a fair chunk of Python too. |
| 14:39 | Raynes | callen: Programming Clojure |
| 14:39 | scriptor | callen: you can read the first chapter of Programming Clojure and see if it's not too basic for you |
| 14:39 | callen | Raynes: incidentally, I already own Halloway's book |
| 14:39 | jcromartie | http://www.mediabistro.com/fishbowldc/gasp-u-s-newss-bedard-has-what_b21462 |
| 14:39 | scriptor | *first chapter for free |
| 14:39 | callen | scriptor: it was. I got bored, haha. |
| 14:39 | casion | programming clojure is also awesome |
| 14:39 | Raynes | callen: I meant Clojure Programming. |
| 14:40 | scriptor | ah, then definitely joy of clojure |
| 14:40 | jcromartie | I have been browsing Clojure Programming, it's good |
| 14:40 | callen | I'll get Clojure Programming on my kindle account then. |
| 14:40 | callen | I'll see about Joy of Clojure too, that one sounds like it explains more of what's actually different/unique. |
| 14:40 | callen | Thank you all! |
| 14:41 | callen | Raynes: btw, loved your comments on that grove.io thread, although you got eviscerated for it. |
| 14:41 | scriptor | callen: whoops, I meant you can read Clojure Programming's first chapter online for free |
| 14:41 | Raynes | callen: By only one guy. |
| 14:41 | callen | Raynes: I actually got hellbanned from HN in that thread for disagreeing with pbiggar (the guy who went after you) |
| 14:41 | Raynes | callen: I got backed up by countless others. |
| 14:41 | Hodapp | HN? |
| 14:41 | callen | Hodapp: Hacker News |
| 14:41 | Hodapp | ahhhh |
| 14:42 | Raynes | Yeah, I replied just once to him and realized he was off his rocker, callen. Let everyone else call him stupid. |
| 14:42 | callen | Raynes: except he took my 2,000 karma account with him :( |
| 14:42 | callen | Raynes: but yes, you're right. |
| 14:43 | callen | Lessoned learned though, don't argue with a YC founder on HN. |
| 14:43 | callen | Lesson* |
| 14:43 | TimMc | What did you do, insult his mother? |
| 14:43 | Sgeo | Banned for what? |
| 14:44 | callen | TimMc: I said he was shilling on behalf of founder unaccountability. |
| 14:44 | TimMc | That's a little more than disagreeing. |
| 14:44 | callen | He was pretty transparent about it. |
| 14:44 | dnolen | hmm, a good idea for a new contrib - a pure Clojure reader that can move at it's own pace separate from Clojure's \cc ibdknox |
| 14:44 | Raynes | callen: I feel kinda sorry for his users. Not sure I'd want to use anything written by such a hostile fellow. |
| 14:45 | callen | Raynes: well lesson learned, don't use CircleCI |
| 14:45 | technomancy | dnolen: what about sjacket? |
| 14:46 | Raynes | TimMc: Well, all I said was that Leah Culver was beginning to appear from the outside to be a bit unreliable (seeing as how every nearly every single project she has ever worked on has been shut down after n months or acquired and shut down in the same timeframe), and the fellow called me more derogatory names than I knew existed. |
| 14:46 | callen | Raynes: I saw that shake library recently, is your conch more flexible? |
| 14:46 | dnolen | technomancy: yeah I was thinking that, does it already have line+column support? |
| 14:46 | technomancy | dnolen: I think so; not sure |
| 14:48 | jcromartie | Raynes: you're just trying to keep women out of tech! :) |
| 14:48 | Raynes | callen: I've actually written my own port of the Python sh library inside of conch (see the sh branch) that I'll be releasing as soon as I work the kinks out. Shake seems like a quick release prototype thing and does some pretty silly stuff. |
| 14:48 | Raynes | jcromartie: Yeah, man, that's gotta be it. |
| 14:48 | TimMc | Raynes: Yours had better not look like (xargs -0). |
| 14:49 | callen | Raynes: I'll keep an eye on it, thank you. |
| 14:49 | Raynes | callen: Also, conch has conch.core which is lower-level than anything else on the market. Once the sh thing is done, it'll probably be the best thing around all around for shelling out. |
| 14:49 | technomancy | Raynes: it's always fun to watch when HN's veneer of objectivity breaks down |
| 14:49 | jcromartie | lol @ -0 |
| 14:50 | callen | technomancy: they're not interested in objectivity, they're interested in HUSTLE and PIVOTING and MICROPRENEURSHIP! |
| 14:50 | TimMc | jcromartie: Yeah, I left a comment on the blog post announcing Shake, but I didn't get a reply. |
| 14:50 | technomancy | callen: https://twitter.com/mattknox/statuses/197781664179560449 |
| 14:50 | jcromartie | Shake was doomed from the start |
| 14:50 | Raynes | TimMc: I stopped reading when I saw "indexes the PATH" |
| 14:50 | callen | technomancy: perfection. that's hilarious. |
| 14:51 | Hodapp | I have an urge to play buzzword bingo now. |
| 14:51 | Raynes | TimMc: https://www.refheap.com/paste/f0954d5a3f0bfb49d719e7bf5 is a simple example I've got handy. |
| 14:51 | Raynes | TimMc: There are also lexical versions of 'programs'. |
| 14:51 | Raynes | This is a piping example, btw. |
| 14:52 | jcromartie | wow this is an awesome logo https://boundary.com/ |
| 14:52 | jcromartie | https://twitter.com/shit_hn_says |
| 14:53 | Raynes | TimMc: It just occurred to me that it isn't parallel right this second, which is probably the last thing I need to tie up before releasing it. |
| 14:53 | TimMc | jcromartie: Immediately reminded me of last.fm's logo. |
| 14:53 | casion | TimMc: soundcloud you mean? |
| 14:54 | TimMc | casion: No, last.fm. |
| 14:55 | TimMc | Raynes: I like the general idea of sh, anyway. |
| 14:55 | casion | Ah, I thought that little cloud thing was their logo |
| 14:55 | TimMc | Oh, hah. |
| 14:55 | TimMc | Raynes: One (big) step closer to Clojure Shell. |
| 14:55 | casion | I didn't even realize that scribble in the upper left was supposed to be a word |
| 14:56 | TimMc | casion: It teeters on the brink of illegibility. |
| 14:56 | casion | TimMc: it has all the hallmarks of being a successful startup, the only qualifier left is collapsing in 3 months |
| 15:00 | wingy | where is the doc on how to add a middleware in compojure? |
| 15:02 | callen | jcromartie: This twitter account is a goldmine: "You can't do concurrency with threads." |
| 15:20 | wingy | :@ |
| 15:20 | wingy | before im going to kill myself |
| 15:20 | wingy | i need to know how to add a middleware to a compojure app |
| 15:22 | dnolen | wingy: look at how compojure works - there's hardly any code - https://github.com/weavejester/compojure/blob/master/src/compojure/handler.clj#L16 |
| 15:23 | jcromartie | wingy: I'm happy to discuss middleware :) I am a big fan |
| 15:23 | wingy | jcromartie: dicuss what? |
| 15:23 | jcromartie | middleware |
| 15:24 | wingy | what is there to discuss? |
| 15:24 | jcromartie | were you not just saying "i need to know how to add a middleware to a compojure app" |
| 15:25 | wingy | jcromartie: yeah |
| 15:25 | cemerick | classic |
| 15:26 | wingy | dnolen: thx for the link it helped a lot |
| 15:26 | cemerick | dnolen: sjacket mostly makes it so you don't have to care about line and column numbers |
| 15:26 | wingy | best doc is still reading the source code |
| 15:27 | xeqi | wingy: (def app-with-middleware (-> app middleware1 middleware2); ie: (-> app compojure.handler/site) or (-> app wrap-keyword-params wrap-params etc) |
| 15:27 | cemerick | outrageously bleeding edge, tho |
| 15:27 | dnolen | cemerick: yeah I don't really think it doesn't what I want. I want a community supported version of the Clojure reader that provides extension points to support both Clojure & ClojureScript. |
| 15:27 | jcromartie | O_o |
| 15:27 | dnolen | cemerick: it seems less and less likely that rhickey will be convinced to add column support to the Clojure reader. |
| 15:27 | Sgeo | Why community supported? |
| 15:28 | Sgeo | Why not just ... do something to handle the use case that #+ and #- does in CL? |
| 15:28 | Sgeo | column support? |
| 15:28 | cemerick | dnolen: is this for source maps? |
| 15:29 | dnolen | cemerick: any tool that needs it, Light Table uses a patched version of Clojure which is sad. |
| 15:30 | dnolen | cemerick: but yes |
| 15:31 | dnolen | cemerick: this actually something Eric Thorsen wanted for Enclojure ages ago as well. |
| 15:31 | cemerick | yeah, I remember |
| 15:31 | TimMc | Sgeo: Notice the lack of :col ##(keys (meta #'+)) |
| 15:31 | lazybot | ⇒ (:ns :name :file :line :arglists :added :inline-arities :inline :doc) |
| 15:32 | TimMc | but the presence of :line |
| 15:32 | Sgeo | Ah. And this is of particular interest for Clojurescript? |
| 15:32 | Sgeo | Or just a general want? |
| 15:32 | cemerick | dnolen: sjacket does have a `column` fn, so you could probably parse, walk the zipper adding that value as :column meta to each list, and output to sexprs. |
| 15:32 | amalloy | Sgeo: for any tools that manipulate source code |
| 15:32 | Sgeo | Ah |
| 15:33 | Sgeo | And I still don't see a good reason for arglists to be on the var |
| 15:33 | dnolen | cemerick: sjacket just does too much. super fast reader that does exactly what Clojure's reader does with extension points. No other stuff. |
| 15:33 | Sgeo | Rather than on the fn |
| 15:33 | cemerick | fair |
| 15:34 | cemerick | dnolen: Although, I'd settle for a super-fast reader *without* column numbers at this point. :-P |
| 15:34 | TimMc | Sgeo: You know how Java compiler errors say -----------------^ ? That's a good use of column info. |
| 15:34 | dnolen | cemerick: heh, you mean for CLJS |
| 15:34 | cemerick | dnolen: Don't scare me, I haven't benched that yet. Clojure's is pokey enough. |
| 15:35 | dnolen | cemerick: huh, I guess you've used it on particularly large jobs? |
| 15:35 | amalloy | Sgeo: functions are noticeably more lightweight without a slot for metadata, is one thing |
| 15:36 | amalloy | personally i'd love functions to contain arglists in their meta, but the other decision seems reasonable too |
| 15:36 | cemerick | dnolen: yeah, it falls down pretty badly compared to just about any other serialization mechanism. |
| 15:36 | Sgeo | Until you want to know the arglists of an anonymous fn |
| 15:36 | Sgeo | Or use the arglists in a HOF for stuff |
| 15:38 | Sgeo | Hmm, is Compojure just about routing, or is there more to it than that? |
| 15:39 | jcromartie | Sgeo: pretty much, and the api/site middleware |
| 15:40 | cemerick | Sgeo: Mostly that, and some good default middleware stacks for api services and front-end apps. |
| 15:40 | jcromartie | *jinx* |
| 15:41 | jcromartie | I really like Ring (which Compojure, and any other Clojure web lbi builds on) |
| 15:41 | jcromartie | lib |
| 15:41 | jcromartie | it's like Rack, but fast |
| 15:41 | jcromartie | and functional |
| 15:41 | Sgeo | And what is Noir? Mutation-inducing macros to make things slightly more convenient? |
| 15:42 | jcromartie | you got it |
| 15:43 | Sgeo | Although I guess compojure's defroutes technically induces mutation, but I don't have a problem with that |
| 15:43 | jcromartie | no, not really |
| 15:43 | jcromartie | defroutes gives you a var in your namespace |
| 15:43 | jcromartie | defpage does not |
| 15:44 | jcromartie | and defroutes leaves it up to you to use that var |
| 15:44 | jcromartie | defpage does not |
| 15:44 | Sgeo | Is making a var not a mutation? |
| 15:44 | jcromartie | no |
| 15:44 | emezeske | defpage actually mutates the value contained in an atom each time it appears |
| 15:44 | emezeske | defroutes just creates a new var, it doesn't mutate an existing one |
| 15:44 | jcromartie | well you could call establishing a var mutating the namespace, perhaps |
| 15:44 | jcromartie | but defpage wires it up in the background |
| 15:44 | Sgeo | I did say "technically" |
| 15:44 | jcromartie | :) |
| 15:45 | jcromartie | but you don't have to use that |
| 15:45 | jcromartie | I don't… I just say (def foo (routes …)) |
| 15:45 | jcromartie | I usually have a var for my plain routes and another var with all of the middlware attached |
| 15:46 | Sgeo | I believe Yesod (a Haskell web framework) actually takes a textual description of the routes and compiles it? |
| 15:46 | amalloy | jcromartie: that seems oddly specific. surely you have routes with different middlewares |
| 15:47 | jcromartie | amalloy: sometimes |
| 15:47 | jcromartie | amalloy: e.g., I'll have "api-routes", and "api" with middleware |
| 15:49 | dnolen | cemerick: sounds like you're enjoying CLJS :) |
| 15:49 | jcromartie | it just keeps the route definition simple |
| 15:50 | cemerick | dnolen: The core, definitely. Things get wobblier the further out you go. ;-) |
| 15:50 | cemerick | I have an nREPL middleware finished that applies the same cljx transforms to code loaded through the REPL as are performed via the plugin, and that's made a world of difference. |
| 15:51 | cemerick | Still need a name for that one. :-P |
| 15:51 | emezeske | "ClojureScript: Things get wobblier the further out you go." -- cemerick |
| 15:51 | emezeske | I'm using that. |
| 15:51 | cemerick | lol |
| 15:52 | Sgeo | With destructuring, I keep forgetting that it's variable first, then key |
| 15:52 | Sgeo | Unless doing something like :keys |
| 15:52 | cemerick | I'm sure being so tied to a REPL-based workflow made things more painful in the beginning than if I were still used to e.g. python or ruby, but a lot of the rough edges are sanded off. |
| 15:54 | cemerick | Now I'm down to annoyances around e.g. no real environment, protocol/interface name mismatches, satisfies?/instance? in the same area, and then the DOM misery. |
| 15:54 | cemerick | Over which cljs has no control, of course. |
| 15:55 | amalloy | Sgeo: if you think about it though, that's the only way it could work |
| 15:55 | Sgeo | amalloy, because of things like :keys? |
| 15:56 | amalloy | nah, you could survive with {[a b c] :keys} if the order were swapped |
| 15:56 | Sgeo | Oh, good point |
| 15:57 | amalloy | it's because (let [{foo :k, bar :k} m]) makes sense, but (let [{:k foo, :k bar} m]) isn't a legal form |
| 15:58 | Sgeo | Ah |
| 16:01 | Sgeo | Oh hey, Ring sessions allow for storing session data encrypted as a cookie but doesn't enforce it |
| 16:04 | dnolen | cemerick: protocol/interfaces yeah, though the interfaces in Clojure drive me crazy now after CLJS. satisfies?/instance? probably worth seeing if making them work similarly doesn't degrade perf too much. |
| 16:04 | dnolen | cemerick: and yes CLJS REPL dev could use a *lot* more love. |
| 16:04 | cemerick | Between crossovers and cljx, I can work around the protocol stuffs. |
| 16:05 | ohpauleez | inc on all of those |
| 16:05 | cemerick | dnolen: I think the REPL story is pretty well ironed out, given piggieback. |
| 16:05 | cemerick | Anyone that disagrees, I'm happy to take feature requests. :-) |
| 16:06 | ohpauleez | cemerick: I really need to get piggyback well integrated (adding it to my TODO list right now) |
| 16:06 | cemerick | ohpauleez: should be two lines in your project.clj and any nREPL client. |
| 16:06 | ohpauleez | perfect |
| 16:07 | cemerick | Especially now that Brenton fixed the REPL environment issue, all is mostly well with the world. |
| 16:07 | dnolen | cemerick: yeah I still haven't played with nREPL yet. |
| 16:08 | dnolen | cemerick: I meant REPL details like auto analyzing files when starting up so the REPL has relevant info - fixing the various edge cases where JS errors takes brower REPL session, etc. |
| 16:10 | cemerick | ah |
| 16:10 | cemerick | dnolen: I mostly have no idea what you just said. :-P |
| 16:11 | hiredman | cemerick: analyze files at startup to provide doc for cljs files in the repl |
| 16:11 | cemerick | The next biggest win across the board will be a completion/introspection middleware, so that the same requests from clients will work with a cljs flavour of the same. |
| 16:11 | dnolen | cemerick: I just mean that CLJS repl holds a lot of information normally held in metadata on vars, I'd like to see CLJS repls take advantage of that. |
| 16:11 | clojurebot | then its perfect. but of course, there are a lot of other parts too that changes. so after I make assoc :show, is there a problem I make again (def data (assoc data :list ...) |
| 16:11 | cemerick | ah, ok |
| 16:12 | dnolen | cemerick: and sorry I don't mean CLJS REPL - cljs.analyzer/namespaces atom rather |
| 16:12 | cemerick | well, it all hangs together from a user standpoint |
| 16:13 | dnolen | cemerick: debugging macros in CLJS is pure punishment |
| 16:13 | dnolen | stuff like that |
| 16:14 | cemerick | Yeah, I've gotten a taste of that already. |
| 16:15 | jjido | clojurebot can talk? |
| 16:15 | cemerick | There should be a "do we not suck yet?" page that is all qualitative :-P |
| 16:18 | gfredericks | clojurebot: can you talk??? |
| 16:18 | lazybot | gfredericks: How could that be wrong? |
| 16:18 | clojurebot | Huh? |
| 16:26 | TimMc | ,(symbol (apply str (map char (repeat 2 2r111111)))) |
| 16:26 | clojurebot | ?? |
| 16:26 | lazybot | clojurebot: What are you, crazy? Of course not! |
| 16:26 | clojurebot | RickInGA: of course :-) *everything* is in Clojure |
| 16:26 | TimMc | \o/ |
| 16:27 | ivan | ,"??" |
| 16:27 | clojurebot | "??" |
| 16:27 | TimMc | I win. |
| 16:27 | TimMc | 3-bot volley. |
| 16:27 | ivan | hah |
| 16:28 | TimMc | clojurebot: of course not is <reply> are you sure?? |
| 16:28 | lazybot | TimMc: Uh, no. Why would you even ask? |
| 16:28 | clojurebot | RickInGA: of course :-) *everything* is in Clojure |
| 16:29 | Sgeo | Uh |
| 16:29 | Sgeo | Is clojurebot replying to someone who isn't here? |
| 16:29 | TimMc | Not exactly, no. |
| 16:30 | Sgeo | So what's with RickInGA? |
| 16:30 | TimMc | The random annoyance^Wfactoid engine picked up "of course" and decided it referred to a factoid that it accidentally picked up earlier. |
| 16:31 | Sgeo | Ah |
| 16:31 | TimMc | The damn bot is set to think that one in every X messages is directed to it. |
| 16:31 | Sgeo | literal clojurebot: What are you, crazy? Of course not! |
| 16:31 | TimMc | Sgeo: clojurebot != bucket |
| 16:33 | jjido | clojurebot: then its perfect. but of course, there are a lot of other parts too that changes. so after I make assoc :show, is there a problem I make again |
| 16:33 | clojurebot | Roger. |
| 16:34 | jjido | that was not a bot was it? |
| 16:35 | amalloy | TimMc: Sgeo has been told that but doesn't seem to have internalized it yet |
| 16:35 | Sgeo | I could have sworn that literal worked once, though |
| 16:35 | amalloy | if so, it was a coincidence |
| 16:39 | emezeske | dnolen: I added auto reloading of macro namespaces in lein-cljsbuild. That demoted the punishment of debugging macros from "cat o' nine tails" to "wooden paddle" or so, at least for me. |
| 16:39 | dnolen | emezeske: haha |
| 16:47 | Frozenlock | I found a little article about clojure and the system tray, but I was wondering if there was something new since then (2008?!) http://briancarper.net/blog/398/qt4-in-lisp |
| 16:47 | Frozenlock | I just want to add a system tray icon to a seesaw application. |
| 16:48 | Sgeo | Seesaw uses Swing, doesn't it? |
| 16:48 | scottj | dnolen: was your core.logic unsession talk (showed up on youtube today I think) a repeat of a previous talk? |
| 16:48 | Sgeo | Might be better to look for a Swing way to do a system tray icon |
| 16:48 | dnolen | scottj: nope, first time I've given that one. |
| 16:48 | scottj | dnolen: awesome! I'll enjoy watching it |
| 16:49 | Frozenlock | Sgeo: It does indeed. I'll check it, thanks! |
| 16:49 | dnolen | scottj: it's less about using than explaining how the whole thing actually works |
| 16:51 | thorbjornDX | is there a difference in using (for [a blah :let [foo bar]]) over (for [a blah] (let [foo bar]))? |
| 16:51 | TimMc | jjido: That is a bot repeating back something it heard in the channel for no good reason. |
| 16:51 | TimMc | jjido: And you just made it learn a new factoid, unfortunately. |
| 16:52 | Sgeo | thorbjornDX, you can put stuff after for's :let while still in the for form |
| 16:53 | Sgeo | ,(for [a (range 2) :let [b (inc a)] c (range b) [a b c]) |
| 16:53 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: )> |
| 16:53 | Sgeo | ,(for [a (range 2) :let [b (inc a)] c (range b)] [a b c]) |
| 16:53 | clojurebot | ([0 1 0] [1 2 0] [1 2 1]) |
| 16:53 | Sgeo | erm, hmm? |
| 16:54 | thorbjornDX | Sgeo: I didn't think the for's :let would actually do a for-like binding |
| 16:54 | thorbjornDX | ,(for [a (range 2) b (range a) c (range b)] [a b c]) |
| 16:54 | clojurebot | () |
| 16:55 | Sgeo | Even when a is 1, (range 1) can only be 0, and range 0 is empty |
| 16:55 | Sgeo | So I understand what's going on |
| 16:55 | thorbjornDX | ,(for [a (range 2) b (range (inc a)) c (range b)] [a b c]) |
| 16:55 | clojurebot | ([1 1 0]) |
| 16:56 | mpan | oh that's a pretty cool shorthand |
| 16:56 | Sgeo | The equivalent to my prior :let should be |
| 16:56 | Sgeo | ,(for [a (range 2) c (range (inc a))] [a (inc a) c]) |
| 16:56 | clojurebot | ([0 1 0] [1 2 0] [1 2 1]) |
| 16:57 | thorbjornDX | Sgeo: so that would be the same as doing a let binding within after the for binding: (let [b (inc a)]), correct? b, has no effect on the looping itself |
| 16:58 | Sgeo | thorbjornDX, right, except with :let you can refer to the bound variables later on within the for's whatchamacallit, whereas you can't do that with let |
| 16:59 | thorbjornDX | Sgeo: okay, so I should use :let when I want to make my for-loop more clear, and use another let binding when I don't need access to those seqs in the for |
| 17:06 | thorbjornDX | oh, I found a handy way to use maps and vector destructuring (idk how common this is): ##(let [k :a] (let [[a b c] (k {:a ['foo 'bar 'baz] :b [2 3 4]})] [a b c])) |
| 17:06 | lazybot | ⇒ [foo bar baz] |
| 17:08 | brainproxy | if the body of doseq involves forms that will return futures, are those futures guaranteed to finish their computations before doseq returns? |
| 17:09 | hiredman | brainproxy: of course not |
| 17:09 | hiredman | a doseq doesn't return anything |
| 17:10 | jjido | hiredman: what it returns is not really the issue is it? |
| 17:11 | brainproxy | hiredman: okay, just a sanity check :) |
| 17:11 | hiredman | jjido: brainproxy says "if the body of doseq involves forms that will return futures" |
| 17:12 | jjido | good point |
| 17:13 | jjido | rather confused statement |
| 17:14 | brainproxy | okay, i meant i have a case where the body in my doseq would return a future when considered in itself |
| 17:14 | brainproxy | but I understand doseq itself doesn't return those things |
| 17:14 | TimMc | brainproxy: You're saying you want to join on all those futures, then? |
| 17:15 | brainproxy | no, i just need to make sure they all finish their computations before moving on, so I can alter the body so that the part that returns the future is prefixed with @ |
| 17:15 | hiredman | brainproxy: that is pretty silly |
| 17:16 | jcromartie | (time (doseq [_ (range 10)] (future (Thread/sleep 100)))) |
| 17:16 | jcromartie | &(time (doseq [_ (range 10)] (future (Thread/sleep 100)))) |
| 17:16 | lazybot | java.lang.SecurityException: You tripped the alarm! future-call is bad! |
| 17:16 | jcromartie | oh |
| 17:16 | jcromartie | ,(time (doseq [_ (range 10)] (future (Thread/sleep 100)))) |
| 17:16 | clojurebot | #<SecurityException java.lang.SecurityException: no threads please> |
| 17:16 | jcromartie | bah |
| 17:16 | hiredman | you will serially step through a seq, spinning computations off on another thread, but blocking the main thread until it completes |
| 17:16 | jcromartie | anyway, in my local repl that takes 1ms |
| 17:17 | brainproxy | yeah, okay, maybe there is a better way... i was borrowing a helper func from the day-of-datomic samples |
| 17:17 | brainproxy | and was looking to adapt it in a simple way to get me what I wanted |
| 17:19 | jcromartie | brainproxy: what about pmap |
| 17:19 | jcromartie | i.e. (doall (pmap some-fn some-seq)) |
| 17:19 | jcromartie | if it's for side effects |
| 17:20 | brainproxy | cool |
| 17:23 | jcromartie | what's that HOF that is like ((_ f g) x) and returns [(f x) (g x)] |
| 17:23 | raek | jcromartie: juxt |
| 17:23 | jcromartie | thanks |
| 17:27 | jcromartie | *usually* totally not worth it: parallel filter |
| 17:27 | jcromartie | in fact, every time I add a "p" to my program it gets slower :P |
| 17:28 | jcromartie | is this totally stupid? https://gist.github.com/3814519 |
| 17:28 | jcromartie | oh duh |
| 17:28 | jcromartie | never mind |
| 17:30 | muhoo | heh |
| 17:40 | Urthwhyte | Is there a good writeup on the changes records have gone through from 1.2->1.4? |
| 17:40 | Urthwhyte | I suppose the mailing lists would have a good history? |
| 17:47 | hammer | is anyone putting reports from clojure unit tests in a maven site? |
| 17:47 | jcromartie | I am really really pleased with the performance of this Clojure JSON API just running on Jetty |
| 17:47 | jcromartie | 1000 requests per second |
| 17:47 | jcromartie | doing various filtering |
| 17:48 | jcromartie | 3K/sec for methods return aggregates over the model that the API exposes |
| 17:48 | jcromartie | (i.e. less I/O) |
| 17:50 | jcromartie | it's not astronomical or anything but compared to what I'm used to :P |
| 17:53 | Frozenlock | Uh that weird.. "new TrayIcon(createImage("images/bulb.gif", "tray icon"))" I would have guessed becomes something like: "(java.awt.TrayIcon. (createImage. "images/bulb.gif") "tray icon")" But obviously 'createImage' isn't a method I can apply directly to a string. How does it translate in clojure? |
| 17:53 | Sgeo | I don't understand https://github.com/clojure-liberator/liberator |
| 17:53 | Sgeo | The Routing web requests example |
| 17:53 | brainproxy | Sgeo: yeah, it's a little weird at first |
| 17:53 | Sgeo | How is it using the ANY macro without it being named in the ns form? |
| 17:55 | Apage43 | Frozenlock: "createImage" is not a constructor there |
| 17:55 | Apage43 | it's a method on whatever the enclosing class is |
| 17:55 | brainproxy | Sgeo: hmm, could be a typo, or maybe w/in the body of routes the ANY symbol is bound |
| 17:57 | brainproxy | Sgeo: seems like a mistake |
| 17:57 | Apage43 | Frozenlock: this what you're porting? http://docs.oracle.com/javase/tutorial/displayCode.html?code=http://docs.oracle.com/javase/tutorial/uiswing/examples/misc/TrayIconDemoProject/src/misc/TrayIconDemo.java |
| 17:57 | Apage43 | The createImage method is at the bottom |
| 17:57 | Frozenlock | Yes |
| 17:57 | brainproxy | Sgeo: the author should have indicated ANY in the :use |
| 17:57 | Frozenlock | Ahh I see |
| 17:58 | Frozenlock | I was looking at the API of TrayIcon and wondering what was up. Thanks! |
| 17:58 | Sgeo | brainproxy, how do you edit Clojure code? |
| 17:58 | Sgeo | Emacs, or what? |
| 17:58 | brainproxy | emacs ftw :) |
| 17:59 | Apage43 | (defn createimage [path description] (javax.swing.ImageIcon. (resource path) description)) |
| 17:59 | Sgeo | nREPL.el? |
| 17:59 | clojurebot | nrepl.el is srsbsns |
| 17:59 | Apage43 | er, where resource is in clojure.java.io |
| 17:59 | Apage43 | http://clojuredocs.org/clojure_core/clojure.java.io/resource |
| 17:59 | brainproxy | Sgeo: still using lein-swank |
| 17:59 | brainproxy | but will switch over to nrepl eventually i suppose |
| 18:00 | brainproxy | but currently lein-swank is working fine for me |
| 18:00 | Sgeo | I just wish nrepl.el and paredit provided menus |
| 18:00 | Sgeo | Help transition in to using the things |
| 18:01 | brainproxy | paredit cheat sheet helps.. some |
| 18:01 | brainproxy | as in ruby rack? |
| 18:02 | Sgeo | Yes |
| 18:02 | Frozenlock | Apage43: Will make good use of it, thanks a lot :) |
| 18:05 | zoldar | am I missing something obvious or does this function completely ignore some of its' arguments, like "uniqueness" ? https://github.com/michaelklishin/neocons/blob/master/src/clojure/clojurewerkz/neocons/rest/paths.clj#L64 |
| 18:07 | Sgeo | zoldar, uniqueness is used |
| 18:08 | Sgeo | Look at the let [request-body |
| 18:09 | Sgeo | Hmm |
| 18:09 | zoldar | Sgeo: not in "shortest-between". Or I am blind... |
| 18:09 | Sgeo | ,(let [{:as map} [[:a 1] [:b 2]]] map) |
| 18:09 | clojurebot | [[:a 1] [:b 2]] |
| 18:10 | jcromartie | why does clojure.xml/parse seem to fail miserably on a 11K document |
| 18:11 | Sgeo | zoldar, looks like copy/paste :/ |
| 18:11 | jcromartie | I'll use jsoup |
| 18:20 | Sgeo | Suppose I want to do long-polling in a Compojure application |
| 18:20 | Sgeo | One route will presumably be for the request that the browser makes |
| 18:20 | jcromartie | is "lein search" broken |
| 18:20 | Sgeo | How do I communicate with ... hmm |
| 18:21 | Sgeo | How do I communicate between that request and whatever will fulfill it (say, a different request0 |
| 18:21 | weavejester | Sgeo: You could block a response on a promise. |
| 18:22 | weavejester | Sgeo: But you might want to use a server designed for asynchronous I/O, like Aleph |
| 18:22 | wingy | light table is the best thing after sliced bread |
| 18:22 | Sgeo | I guess my question is largely because I recently tried to do something similar in PHP, and ended up using a file |
| 18:22 | Sgeo | Although a socket might be a better way to go in the PHP case? |
| 18:28 | weavejester | Sgeo: It really depends on how many users you're expecting... |
| 18:29 | Sgeo | Probably not very many, but... I wish design decisions didn't always come down to that |
| 18:29 | weavejester | Sgeo: For a small number of users, you could use a BlockingQueue |
| 18:29 | weavejester | Sgeo: http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/BlockingQueue.html |
| 18:29 | emezeske | Sgeo: You wish design decisions didn't come down to the real world? :P |
| 18:30 | Sgeo | Is this sort of thing the use case for Immutant? |
| 18:30 | Sgeo | Apparently it offers a messaging thing? |
| 18:30 | weavejester | Sgeo: Well, you really just need something like (defonce queue (LinkedBlockingQueue.)) |
| 18:31 | weavejester | Sgeo: And then (.poll queue 60 TimeUnit/SECONDS) |
| 18:31 | weavejester | Sgeo: In your "listener" route |
| 18:32 | Sgeo | I guess I'm too used to thinking in PHP terms |
| 18:32 | weavejester | Sgeo: And (.add queue "message") in your "sender" route |
| 18:33 | Sgeo | Where a file is executed once and then the environment is discarded, no global sharing. If I understand PHP correctly |
| 18:33 | weavejester | Sgeo: That'll use up 1 thread per user, which is not too efficient, but will scale to a few hundred simultaneous users (or however big your thread pool is) |
| 18:33 | weavejester | Sgeo: In Clojure the environment sticks around |
| 18:33 | weavejester | Sgeo: Though if you have a load-balanced environment obviously you'd have to rethink things |
| 18:34 | zoldar | If I'm going to make a pull request on github for a bugfix, should I file an issue first? |
| 18:35 | zoldar | (sorry for off-topic |
| 18:35 | weavejester | zoldar: Not necessarily, but it depends on the scope of the pull request. |
| 18:35 | weavejester | zoldar: If it's a simple bug fix, then IMO there's not usually a huge point in having a separate issue |
| 18:35 | zoldar | weavejester: that's a minor fix of what seems to be a copy/paste error |
| 18:35 | weavejester | zoldar: If, however, you're adding in a new feature, you might want to talk to the repo owner first through an issue |
| 18:36 | weavejester | zoldar: Just send a pull request then |
| 18:36 | zoldar | thanks |
| 18:36 | weavejester | The only time it matters, IMO, is if you're going to create a large feature without talking to the repo owner first. |
| 18:36 | hiredman | if it is for clojure or a clojure contrib project, they do not accept pull requests |
| 18:37 | zoldar | it's for neocons |
| 18:37 | weavejester | Good point, hiredman |
| 18:38 | hiredman | https://github.com/clojure/clojure/pull/6 |
| 18:40 | amalloy | hah, i haven't looked at that one since he followed up |
| 18:42 | Sgeo | Is Noir useful without defpage? Would Noir fans dislike the notion of not using defpage? |
| 18:44 | Frozenlock | Would there be something to replace it? |
| 18:44 | emezeske | Sgeo: IMHO if you are thinking about using Noir without defpage, you should just use raw Compojure. |
| 18:46 | Sgeo | http://en.wikibooks.org/wiki/Compojure/Getting_Started looks obsolete, no Lein? |
| 18:47 | emezeske | Sgeo: Much more up to date: https://github.com/weavejester/compojure/wiki/Getting-Started |
| 18:47 | brehaut | Sgeo: how about going to the horses mouth: https://github.com/weavejester/compojure/wiki/Getting-Started |
| 18:47 | brehaut | oh. lol |
| 18:49 | Sgeo | Why is Hiccup's html a macro? |
| 18:49 | Sgeo | And not a function? |
| 18:50 | emezeske | Sgeo: It does a bunch of precompiling to make things fast |
| 18:51 | Sgeo | If I do (def some-vector [:html [:head [:title "Blah]] [:body "Hi"]]) (html some-vector) |
| 18:51 | Sgeo | Will it emit based on the vector, or do something weird? |
| 18:51 | Sgeo | Oh, I forgot a ] |
| 18:51 | Sgeo | No I didn't |
| 18:52 | Sgeo | I wish I could quickload in the REPL |
| 18:52 | Frozenlock | You can't live without a REPL |
| 18:52 | zoldar | does that look like a correct pull request? https://github.com/michaelklishin/neocons/pull/10 |
| 18:53 | weavejester | Sgeo: The html macro pre-compiles the code |
| 18:54 | weavejester | Sgeo: So, for instance (html [:a {:href x} x]) gets turned into (str "<a href=\" x "\">" x "</a>") |
| 18:55 | amalloy | weavejester: that second instance of x should be (html x), shouldn't it? |
| 18:56 | weavejester | amalloy: Oh yep, true |
| 18:58 | Sgeo | ,(let [{:as map} [:a 1 :b 2]] map) |
| 18:59 | clojurebot | [:a 1 :b 2] |
| 18:59 | Sgeo | ,(let [{:keys [a b]} [:a 1 :b 2]] [b a]) |
| 18:59 | clojurebot | [nil nil] |
| 18:59 | Sgeo | So how exactly does & {:keys [...]} in an fn arglist work? |
| 19:00 | amalloy | ~def destructure |
| 19:01 | amalloy | in particular https://github.com/clojure/clojure/blob/f128af9d36dfcb268b6e9ea63676cf254c0f1c40/src/clj/clojure/core.clj#L3434 |
| 19:04 | Apage43 | Incidentally you can macroexpand destructured things |
| 19:04 | Frozenlock | Sgeo: You might want to use [&[:keys [a b]]], so you will be able to pass a map directly. |
| 19:04 | Frozenlock | er [&[{:keys [a b]}]] |
| 19:04 | Apage43 | ,(macroexpand '(let [{:keys [a b]} somemap] [a b])) |
| 19:04 | clojurebot | (let* [map__84 somemap map__84 (if (clojure.core/seq? map__84) (clojure.core/apply clojure.core/hash-map map__84) map__84) b ...] [a b]) |
| 19:05 | pqnelson | OK, I have a quick stupid question :( |
| 19:05 | pqnelson | When would one use #'stuff? |
| 19:05 | amalloy | Apage43: easier to just call destructure, really |
| 19:05 | amalloy | &(destructure '[{:keys [a b]} somemap]) |
| 19:05 | lazybot | ⇒ [map__56095 somemap map__56095 (if (clojure.core/seq? map__56095) (clojure.core/apply clojure.core/hash-map map__56095) map__56095) b (clojure.core/get map__56095 :b) a (clojure.core/get map__56095 :a)] |
| 19:06 | pqnelson | When referring to a function in the ambient namespace, right? |
| 19:06 | pqnelson | Right. |
| 19:08 | Sgeo | How does defpage work with middleware? |
| 19:11 | zoldar | I have external dependency from github which I want to use using 'checkouts' directory. However, the same version library is available from clojars and it seems to take precedence. Is there any way to make it use the version from checkouts? |
| 19:13 | Sgeo | Learning Compojure seems to require learning Ring |
| 19:13 | clojurebot | compojure is a concise web framework inspired by Sinatra |
| 19:13 | weavejester | Sgeo: Right. Compojure is just a routing library for Ring |
| 19:13 | emezeske | Sgeo: Doing web development in Clojure requires learning Ring. |
| 19:14 | Sgeo | Doesn't Aleph do something that is almost like Ring but not quite? |
| 19:14 | weavejester | Aleph can act like a Ring handler, but can also do more things. |
| 19:14 | weavejester | So it's effectively superset of Ring. |
| 19:14 | Sgeo | Hm |
| 19:15 | casion | what is ring? |
| 19:16 | weavejester | casion: A way of representing a web application in Clojure using maps and functions. |
| 19:16 | xeqi | casion: https://github.com/ring-clojure/ring |
| 19:16 | casion | xeqi: I'm there, but that doesn't really explain it very well to someone who has very little knowledge of web dev |
| 19:17 | xeqi | ah, then think representing http in clojure |
| 19:17 | casion | perhaps my question is over my own head in that case? |
| 19:17 | casion | ahh |
| 19:18 | casion | ok, thanks weavejester and xeqi :) |
| 19:18 | weavejester | casion: A web server is something that takes in a HTTP request, and returns a HTTP response, right? |
| 19:18 | casion | weavejester: that'd be my understanding, yes |
| 19:18 | weavejester | casion: In Ring the request and response are represented by maps, and the server that turns a request into a response is a function. |
| 19:19 | weavejester | casion: At it's simplest: (fn [request] {:status 200, :headers {}, :body "Hello World"}) |
| 19:19 | xeqi | pqnelson: I use #' when wanting to work around private, or when I want to be able to reload a file defing that var and have it change the usage immediately |
| 19:19 | casion | that is remarkably logical |
| 19:20 | weavejester | Isn't it? :) |
| 19:20 | casion | weavejester: that was a wonderful explanation |
| 19:21 | weavejester | It's a very simple abstraction, but very very powerful |
| 19:21 | casion | that is just ridiculously simple |
| 19:22 | casion | I would have never avoided web dev so much if I knew of something like this years ago |
| 19:22 | Frozenlock | Clojure wasn't there years ago :P |
| 19:23 | Frozenlock | Well not 'that' many years ago. |
| 19:23 | Sgeo | Why don't compojure.handler/api and compojure.handler/site use wrap-head? |
| 19:23 | pqnelson | xeqi: really, it'll cause a file to reload immediately? Nifty, |
| 19:23 | pqnelson | thanks :) |
| 19:23 | xeqi | pqnelson: no |
| 19:23 | Sgeo | It seems like wrap-head is generally a good idea, how can you call yourself an HTTP server without it? |
| 19:23 | weavejester | Sgeo: Because GET routes already account for HEAD. |
| 19:23 | Sgeo | Oh |
| 19:24 | pqnelson | xeqi: I misread, my error :S Thanks again :) |
| 19:24 | weavejester | Sgeo: https://github.com/weavejester/compojure/blob/master/src/compojure/core.clj#L25 |
| 19:25 | weavejester | Sgeo: Although that logic could probably be completely moved into wrap-head... |
| 19:25 | thorbjornDX | there has to be a cleaner way to do this, suggestions?: ##(map #(apply (fn [a & b] (if b [a (first b)] [(dec a) a])) %) (partition-all 2 (range 1 16))) |
| 19:25 | lazybot | ⇒ ([1 2] [3 4] [5 6] [7 8] [9 10] [11 12] [13 14] [14 15]) |
| 19:25 | weavejester | Sgeo: But wrap-head post-dates it. |
| 19:25 | xeqi | pqnelson: an example of what I meant is a web server using #'routes, then if the var is changed, by say reloading the file, then new requests use the new binding |
| 19:27 | Frozenlock | #(for [i (range 1 16) :let [y (+ i 1)]] [i y]) |
| 19:27 | Frozenlock | &(for [i (range 1 16) :let [y (+ i 1)]] [i y]) |
| 19:27 | lazybot | ⇒ ([1 2] [2 3] [3 4] [4 5] [5 6] [6 7] [7 8] [8 9] [9 10] [10 11] [11 12] [12 13] [13 14] [14 15] [15 16]) |
| 19:27 | Frozenlock | Oh crap |
| 19:27 | Frozenlock | &(for [i (range 1 16 2) :let [y (+ i 1)]] [i y]) |
| 19:27 | lazybot | ⇒ ([1 2] [3 4] [5 6] [7 8] [9 10] [11 12] [13 14] [15 16]) |
| 19:27 | pqnelson | xeqi: oh, I think I Understand. That's actually relevant to my |
| 19:27 | pqnelson | problem, thanks :D |
| 19:28 | thorbjornDX | Frozenlock: what if I don't want the 16 on the end? I would only like to use values in (range 1 16), and I am OK if there is overlap, but I want to minimize it. Which is why I don't use #(partition 2 2 %) |
| 19:29 | TimMc | partition |
| 19:29 | hiredman | ~partition |
| 19:29 | clojurebot | partition is probably not what you want; see partition-all. |
| 19:29 | TimMc | &(partition-all 2 (range 1 16)) |
| 19:29 | lazybot | ⇒ ((1 2) (3 4) (5 6) (7 8) (9 10) (11 12) (13 14) (15)) |
| 19:30 | TimMc | stupid enter key |
| 19:31 | thorbjornDX | TimMc: can I do this? ##(partition 2 2 [(second (reverse (range 1 16)))] (range 1 16)) |
| 19:31 | lazybot | ⇒ ((1 2) (3 4) (5 6) (7 8) (9 10) (11 12) (13 14) (15 14)) |
| 19:32 | TimMc | Oh, now I see the overlap thing. |
| 19:32 | Sgeo | What's wrong with partition? |
| 19:33 | thorbjornDX | Sgeo: it's close, but I'm trying to get the last element correct |
| 19:33 | Sgeo | I mean, in general, that the bot says "partition is probably not what you want" |
| 19:34 | TimMc | Sgeo: I disagree with whoever wrote that factoid. |
| 19:34 | amalloy | &(partition 2 [1 2 3]) |
| 19:34 | lazybot | ⇒ ((1 2)) |
| 19:34 | TimMc | thorbjornDX: So, you want 1..4 to produce [[1 2] [3 4]], and 1..5 to produce [[1 2] [3 4] [4 5]]? |
| 19:34 | thorbjornDX | TimMc: correct, thanks for clarifying it, haha |
| 19:34 | Sgeo | &(partition-all 2 [1 2 3]) |
| 19:34 | lazybot | ⇒ ((1 2) (3)) |
| 19:35 | TimMc | I sense an if statement in your future. |
| 19:35 | thorbjornDX | TimMc: roger that. Should I write a function and pass it to partition-by? |
| 19:35 | thorbjornDX | or I guess I can map/apply it to the sequence |
| 19:36 | TimMc | Nothing so complicated. |
| 19:36 | TimMc | Oh! These aren't just going to be numbers, you have some input seq? |
| 19:37 | thorbjornDX | TimMc: they will be numbers. I'm literally using range :) |
| 19:37 | thorbjornDX | I'm probably over-complicating things, though. |
| 19:38 | TimMc | (fn weird-shit [n] (if (even? n) (partition 2 (range 1 (inc n))) (concat (weird-shit (dec n)) [(dec n) n]))) |
| 19:39 | thorbjornDX | will give it a shot, sorry for weird questions :) |
| 19:39 | TimMc | Oops, almost. |
| 19:39 | TimMc | ,((fn weird-shit [n] (if (even? n) (partition 2 (range 1 (inc n))) (concat (weird-shit (dec n)) [[(dec n) n]]))) 15) |
| 19:39 | clojurebot | ((1 2) (3 4) (5 6) (7 8) (9 10) ...) |
| 19:39 | TimMc | &((fn weird-shit [n] (if (even? n) (partition 2 (range 1 (inc n))) (concat (weird-shit (dec n)) [[(dec n) n]]))) 15) ;; lazybot is better with this |
| 19:39 | lazybot | ⇒ ((1 2) (3 4) (5 6) (7 8) (9 10) (11 12) (13 14) [14 15]) |
| 19:39 | TimMc | &((fn weird-shit [n] (if (even? n) (partition 2 (range 1 (inc n))) (concat (weird-shit (dec n)) [[(dec n) n]]))) 16) |
| 19:39 | lazybot | ⇒ ((1 2) (3 4) (5 6) (7 8) (9 10) (11 12) (13 14) (15 16)) |
| 19:40 | thorbjornDX | TimMc: awesome, thanks for the code |
| 19:41 | TimMc | So, WTF are you doing with that? |
| 19:42 | thorbjornDX | TimMc: exercising hardware |
| 19:42 | thorbjornDX | TimMc: er, s/exercising/testing |
| 19:42 | thorbjornDX | TimMc: s/hardware/ICs |
| 19:46 | nightfly_ | How can I get string representation of a symbol (ie 'example -> "example") |
| 19:48 | stain | ,(name 'example) |
| 19:48 | clojurebot | "example" |
| 19:49 | stain | str would also work :) |
| 19:49 | thorbjornDX | ,(name :key) ; is a bit different though |
| 19:49 | clojurebot | "key" |
| 19:49 | thorbjornDX | ,(str :key) |
| 19:49 | clojurebot | ":key" |
| 19:49 | stain | yeah.. so good to remember the (name) |
| 19:50 | xeqi | ,(name 'clojure.string/join) |
| 19:50 | clojurebot | "join" |
| 19:51 | Sgeo | o.O |
| 19:51 | nightfly_ | stain: Cool, thank you |
| 19:51 | Sgeo | vars that hold fns can be used as an fn |
| 19:53 | wingy | could we have a vote .. midje or clojure.test? |
| 19:54 | stain | never tried midje.. is it good? It means 'waist' in my mother tongue.. |
| 19:55 | emezeske | I use both. Midje is harder to learn, but can be very concise. (In some cases, of course, being too concise can be a drawback...) |
| 19:55 | xeqi | I use clojure.test cause its builtin |
| 19:56 | technomancy | clojure.test is pretty good |
| 19:57 | wingy | emezeske: if you were about to choose one of them which one would you use? |
| 19:58 | hiredman | I wouldn't call it good, but is the bare minimum, which is all you want |
| 20:00 | technomancy | well I guess the thrown? implementation is kind of the canonical "how to go overboard with macros" example |
| 20:00 | technomancy | but compared to midje... |
| 20:01 | emezeske | wingy: Personally I would use midje if I was going to do tons of mocking and stuff. |
| 20:01 | emezeske | wingy: Nobody seems to agree with me though, so you might want to ignore me. :P |
| 20:01 | hiredman | you can just fill a file up with asserts |
| 20:01 | hiredman | run it by loading the file and looking for exceptions |
| 20:03 | xeqi | test.generative is fun if you can think of properties |
| 20:03 | stain | I am in love with Midje already, just reading the tutorial |
| 20:03 | hiredman | => is just silly |
| 20:05 | wingy | quite cool actually |
| 20:06 | emezeske | wingy: I think the warning about midje that maybe isn't broadcast loudly enough is that inside a (fact), you are not really writing Clojure code anymore |
| 20:06 | emezeske | wingy: You are writing midje code |
| 20:06 | emezeske | wingy: And that should at least terrify you a little bit |
| 20:06 | wingy | https://gist.github.com/3100734 |
| 20:06 | stain | it comes with the checkers like (roughly 52) and "irrelevant" |
| 20:06 | wingy | which one is to prefer? |
| 20:06 | wingy | i think midje wins there |
| 20:08 | wingy | dont you think? |
| 20:08 | amalloy | emezeske: i don't care for midje myself, but what you just said is a valid complaint about any macro |
| 20:08 | stain | yeah, being able to test partial facts about collections are often large parts of my unit tests. But I can see the problem - what if I now want to check that the content type just include the string "json" ignoring case? |
| 20:08 | arohner | amalloy: sure, but some macros abuse things far far more than normal |
| 20:09 | wingy | yeah shouldn't macros be used for cases like this? |
| 20:09 | wingy | making approripate DSLs to help out dev |
| 20:09 | stain | right - unit testing should be a good case for making a DSL |
| 20:10 | stain | but both approaches do that - it's just that Midje has taken some additional freedoms and rethought how to do it rather than go the junit style |
| 20:11 | TimMc | thorbjornDX: I guess that's allowed. :-) |
| 20:11 | sexpGirl | which unit testing "thing" can I use if I want to run some unit tests written in Clojure, testing Clojure code, from inside Emacs / nrepl.el ? Is there some integration at all ? (like failing tests showing in red or something) |
| 20:11 | technomancy | sexpGirl: clojure-test-mode works with slime but hasn't been ported to nrepl.el yet |
| 20:11 | hiredman | swank-clojure and clojure.test would do that |
| 20:12 | wingy | ill just stick with clojure.test for now |
| 20:13 | emezeske | amalloy: That's true. I guess it's just a matter of degree -- more of the forms you pass to midje are munged by the macro than, say, defn. |
| 20:14 | sexpGirl | technomancy: oh I see... Have you any plan of porting it to nrepl.el? (is it something people are even asking for?) |
| 20:14 | technomancy | sexpGirl: it's on my list |
| 20:14 | technomancy | but my list is ... long. |
| 20:14 | sexpGirl | technomancy: eh eh ; ) |
| 20:15 | xeqi | sexpGirl: I've been using test-ns or test-var in the repl w/ nrepl.el |
| 20:16 | xeqi | hoping someone gets to clojure-test-mode |
| 20:16 | hiredman | nrepl.el still seems to have lots of very rough edges |
| 20:16 | technomancy | yeah I had to fall back to slime last week to use the inspector |
| 20:17 | xeqi | can't wait to see http://clojure-conj.org/speakers/duncan.html |
| 20:17 | hiredman | I have issues with reader literals |
| 20:18 | hiredman | where if x is a form that can be read, but then the printed representation cannot be read, it all explodes |
| 20:18 | hiredman | so there is some of double reading going on |
| 20:19 | sexpGirl | What is a stack frame compared to a stack trace? |
| 20:19 | emezeske | sexpGirl: A stack trace is a list of stack frames |
| 20:19 | wingy | there is a good link for beginners explaining the difference between collections and sequences .. anyone knows which one i mean? |
| 20:20 | sexpGirl | emezeske: ah gotcha, thanks. |
| 20:33 | thorbjornDX | TimMc: if only hardware were functionally pure |
| 20:35 | emezeske | thorbjornDX: I have a space heater. Does that count as functionally pure? :D |
| 20:39 | holo | just a random comment: lein exec wont run lein deps beforehand if there are new dependencies |
| 20:39 | thorbjornDX | emezeske: close enough for me |
| 20:40 | XPherior | Can anyone show me an example of reading lines from stdin until nil is received? |
| 20:40 | thorbjornDX | emezeske: a space heater isn't stateless though |
| 20:42 | emezeske | thorbjornDX: Who knows? The processor (heating coil) takes no input and produces no output. It just converts energy to heat. :) |
| 20:42 | mpan | xpherior: get a reader, get the line-seq of the reader, take-while the seq |
| 20:43 | XPherior | mpan: Okay. I had a feeling it was something around that. Thanks. :) |
| 20:43 | mpan | what do you mean by nil, though? |
| 20:43 | XPherior | You know how in like a Ruby program, you can read from the console while there's more values (C-d hasn't been hit)? |
| 20:44 | mpan | pretty sure an EOF would just end the seq |
| 20:44 | mpan | not give nil |
| 20:44 | XPherior | EOF from the console is what I mean, rather. Thanks. |
| 20:44 | XPherior | Yeah, that's just as well |
| 20:44 | mpan | try just going over the whole line-seq |
| 20:44 | mpan | pretty sure it just ends on EOF |
| 20:44 | mpan | so you may not even need the take-while |
| 20:45 | XPherior | Lemme have a go. |
| 20:46 | XPherior | Whenever I type something from the console and hit return, nothing happens |
| 20:47 | XPherior | Like it wants to keep reading from the seq, even when I Ctl-D |
| 20:47 | mpan | wait, are you using lein? |
| 20:47 | XPherior | Yeah |
| 20:47 | mpan | wasn't there something about lein not cooperating with stdin? |
| 20:47 | XPherior | Dah crap, they didnt fix that yet? |
| 20:47 | mpan | I have no idea; let me check |
| 20:47 | XPherior | Yeeeeah, I read that and filtered it out |
| 20:47 | XPherior | :) |
| 20:48 | mpan | https://github.com/technomancy/leiningen/issues/169 suggests it wasn't fixed |
| 20:48 | technomancy | it's a bug in the JVM |
| 20:48 | mpan | try lein trampoline |
| 20:48 | mpan | idk if that will help but it does take lein out of the equation, right? |
| 20:48 | XPherior | Ah, technomancy. What do you think of the JVM in general? Was mounting Clojure on it a good idea? |
| 20:49 | XPherior | Yeah, mpan. It didn't work, but good try. :) |
| 20:49 | technomancy | the JVM is an amazing mix of excellent engineering and stupidity |
| 20:49 | technomancy | luckily you can mostly route around the damage |
| 20:49 | Hodapp | hah |
| 20:49 | XPherior | Haha. |
| 20:49 | technomancy | cf. java.util.Date, the java command-line launcher, and the subprocess API |
| 20:50 | technomancy | although now java.util.Date has infected clojure via reader literals =( |
| 20:50 | technomancy | you can work around it, but you're hosed by default |
| 20:50 | XPherior | Fantasic. :/ |
| 20:50 | XPherior | Have you ever met Rich? |
| 20:51 | technomancy | sure |
| 20:51 | technomancy | I tried to talk him out of making the reader return j.u.Date |
| 20:51 | technomancy | but apparently Datomic couldn't wait for jdk8 |
| 20:51 | XPherior | That's pretty cool. I'd like to meet him someday. |
| 20:51 | XPherior | Certainly going to be a while for that, yeah. |
| 20:52 | mpan | wait, how do you make the reader return a date? |
| 20:52 | emezeske | XPherior: Just show up to a clojure conference. Rich is very approachable (if a bit busy) :) |
| 20:52 | technomancy | mpan: #inst I believe. I try not to think too much about it. |
| 20:53 | XPherior | emezeske: Yeah, I hope it make it to one soon. Just finishing school. Conferences are kind of expensive. |
| 20:53 | technomancy | my theory is that j.u.Date was the part of the JVM that they had the interns write |
| 20:54 | XPherior | Interns working on the JVM. Eeek. |
| 20:54 | technomancy | the other explanation was that it was implemented by professionals, which is even more depressing |
| 20:54 | emezeske | XPherior: True. I think they usually offer a student discount, at least. :) |
| 20:54 | XPherior | I should catch it before this May then. :) |
| 20:55 | Frozenlock | What's wrong with util.date? |
| 20:55 | Frozenlock | (I've never used it) |
| 20:55 | XPherior | Clojure has made me really marketable for places that care about code quality. |
| 20:55 | mpan | xpherior: well I got it to work in the repl |
| 20:56 | mpan | and the mailing list said the repl was where the bug didn't show up |
| 20:56 | mpan | so that makes me think trampoline should work, too? |
| 20:56 | XPherior | mpan: Yeah I just did too. Maybe I derped. |
| 20:56 | mpan | I'm really not sure |
| 20:56 | XPherior | Okay, yeah I did something really dumb. It works now. |
| 20:56 | XPherior | Thanks for sanity checking that. |
| 20:56 | mpan | so for future reference |
| 20:56 | mpan | when I need stdin |
| 20:57 | XPherior | Trampoline that bad boy. |
| 20:57 | mpan | would the repl inside ccw inside eclipse work? |
| 20:57 | mpan | that's just nrepl with a fancy wrapper, right? |
| 20:57 | XPherior | I've no idea. |
| 21:06 | mpan | is there a nice solution for when the most obvious name for a function is too many words long? |
| 21:07 | emezeske | mpan how many words is too long? |
| 21:07 | mpan | "make weighted exponential ranked generation strategy function" :( |
| 21:07 | casion | mpan: intitialism and docstring! |
| 21:08 | mpan | casion: initialism how? |
| 21:08 | casion | the good ole mwergsfunc |
| 21:08 | mpan | :( |
| 21:08 | mpan | I was hoping not to lose meaning |
| 21:08 | casion | you don't know mwergs? |
| 21:08 | emezeske | mpan: Well, off the bat, I'd say that strategy and function are kind of superfluous |
| 21:09 | mpan | I mean, I've abbreviated it, but that doesn't help enough |
| 21:09 | casion | mpan: in my experience as long as you follow language convention and be consistent, you can get away with al ot |
| 21:09 | emezeske | mpan: If a W.E.R.G. is a common term in your domain, it's a reasonable thing to abbreviate IMO |
| 21:10 | mpan | sadly, I'm the one who has to maintain this codebase for the next 30 hours |
| 21:10 | mpan | and no, I'm making this up as I go along |
| 21:10 | mpan | because that's what the assignment wants |
| 21:10 | casion | mpan: my approach would be to abbreviate nouns, and intitialize adjectives usually |
| 21:11 | casion | within convention |
| 21:11 | mpan | all right |
| 21:11 | mpan | thanks |
| 21:11 | mpan | I suppose it's no big deal if my identifiers suck |
| 21:11 | mpan | just need to get it working |
| 21:11 | casion | do you have a similar function that's not weighted? |
| 21:11 | mpan | I could |
| 21:12 | casion | of so, then you can just use W to differentiate between the 2 |
| 21:12 | casion | and that becomes obvious |
| 21:12 | mpan | I just happen to know this is a good strategy function from trial and error from last assignment |
| 21:12 | casion | is there a non-exponential version? |
| 21:12 | casion | if not, then exponential is redundant to mention |
| 21:13 | casion | having the word 'generation' in a function name is usually redundant as well |
| 21:14 | mpan | sorry, generation here means generations (noun) of a population |
| 21:14 | mpan | also, I should fix redundant inputs |
| 21:15 | casion | I would think most of the overtly descriptive aspects could be contained in the docstring |
| 21:15 | casion | but I don't know how far people usually take that in clojure |
| 21:20 | devth | given [[1 2] [3 4]] and ["a" "b"], how could i obtain [[1 2 "a"] [3 4 "b"]]? |
| 21:20 | mpan | conj them |
| 21:21 | mpan | or rather, conj the elems of the 2nd vec into the elems of the 1st vec |
| 21:21 | gfredericks | ,(map conj [[1 2] [3 4]] ["a" "b"]) |
| 21:21 | clojurebot | ([1 2 "a"] [3 4 "b"]) |
| 21:21 | devth | ah, nice. thank you. |
| 21:22 | devth | first time i've used map with multiple colls. i was trying to solve this with into and merge. |
| 21:23 | casion | hmm |
| 21:23 | casion | ,(map into [[1 2] [3 4]] ["a" "b"]) |
| 21:23 | clojurebot | ([1 2 \a] [3 4 \b]) |
| 21:23 | casion | doesn't into use conj? |
| 21:24 | casion | why is it giving characters instead of strings? |
| 21:24 | gfredericks | it treats the "a" like a collection |
| 21:24 | casion | ah |
| 21:24 | gfredericks | so you get ##(reduce into [1 2] "a") |
| 21:24 | lazybot | java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Character |
| 21:24 | gfredericks | or not |
| 21:24 | casion | I get it |
| 21:24 | casion | I keep getting tricked by that behaviour |
| 21:25 | metellus | ,(map into [[1 2] [3 4]] "ab") |
| 21:25 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Character> |
| 21:25 | metellus | ,(map into [[1 2] [3 4]] ["ab"]) |
| 21:25 | clojurebot | ([1 2 \a \b]) |
| 21:25 | amalloy | gfredericks: you get (into [1 2] "a") |
| 21:25 | amalloy | or (reduce conj [1 2] "a") |
| 21:26 | gfredericks | &(into [1 2] "a") |
| 21:26 | lazybot | ⇒ [1 2 \a] |
| 21:26 | gfredericks | does what I'd expect |
| 21:26 | amalloy | right. but not what you asked for in your reduce |
| 21:26 | gfredericks | ah ha right |
| 21:26 | amalloy | you asked for (reduce into {1 2] "a"). obviously (reduce f init coll) is not the same as (f init coll) |
| 21:27 | gfredericks | amalloy: thanks for sorting me out as always |
| 21:28 | casion | assuming the second collection wasn't a string in this case, would into or conj be more preferred? |
| 21:28 | casion | wow |
| 21:28 | casion | ok, I'm going to go sit down and turn off my brain for a bit then. |
| 21:28 | gfredericks | &(sort-by amalloy [:gfredericks :casion]) |
| 21:28 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: amalloy in this context |
| 21:30 | casion | I can't even fathom why I thought that was a reasonable question :| |
| 21:32 | dgrnbrg | hello clojurians! |
| 21:33 | dgrnbrg | i am having a strange issue: I have added leinjacker as a dependency to a plugin project i'm working on, but when I use the plugin, I get a compilation error in the project that there is no such var for the leinjacker function I'm trying to use |
| 21:33 | cemerick | Every date implementation is bugged. Some are just more bugged than others. |
| 21:34 | dgrnbrg | are there are issues or difficulties I should be aware of when using plugin libraries in other plugins? |
| 21:36 | amalloy | cemerick: once we get all humans everywhere to agree that the nanosecond is the only useful unit of time it will all be much easier |
| 21:40 | cemerick | amalloy: and then you meet someone doing time dilation experiments or something |
| 21:47 | technomancy | UTC for life bros |
| 21:50 | dgrnbrg | technomancy: any idea why, if I am developing a plugin that depends on a library in its dependencies, and then I do a "lein install" of that plugin, that when I try to use the plugin, leiningen dies with the error that a var from the depended-on library can't be found? |
| 21:51 | emezeske_ | dgrnbrg: Maybe another of your plugins depends on a newer version of that library that doesn't have said var? |
| 21:51 | dgrnbrg | I'm depending on the newest version of the library :/ |
| 21:51 | technomancy | dgrnbrg: maybe a version range is interfering? try lein-pedantic? |
| 21:52 | cemerick | I hope lein-pedantic is on deck for inclusion in lein. ;-) |
| 21:52 | technomancy | definitely |
| 21:52 | technomancy | what about inclusion in pomegranate? =) |
| 21:53 | dgrnbrg | technomancy: I installed lein-pedantic, but got no warnings |
| 21:54 | dgrnbrg | is there a plugin to visualize the transitive closure of the plugin dependencies? |
| 21:54 | cemerick | technomancy: I would, but pomegranate needs to be use-case agnostic. pedantic is opinionated (in a good way IMO), but I don't want to cut off others applying other policies, completely different strategies, etc. |
| 21:55 | technomancy | cemerick: yeah, it wouldn't make sense to turn off by default; I just mean being able to implement it without resorting to hooks would be nice |
| 21:55 | technomancy | *turn on by default |
| 21:56 | dgrnbrg | now, when I try to run "lein vimclojure", I'm seeing leiningen die with "No value supplied for key: [:add-classpath? true]" |
| 21:56 | dgrnbrg | what does that mean? I assume that I have an uneven list->map somewhere? |
| 21:57 | aperiodic | looks like a kwargs fn whose args aren't being sufficiently flattened |
| 21:57 | dgrnbrg | is there a way to get leiningen to show me a stack trace instead of just the error msg? |
| 21:58 | dgrnbrg | ah, i see |
| 21:59 | technomancy | dgrnbrg: running from master or using DEBUG=y on preview10 will get you a trace |
| 22:01 | mpan | I have maps with different structure within my tree, but zippers don't care, right? |
| 22:01 | mpan | as long as I satisfy the required behavior? |
| 22:01 | jimduey | For those interested in monads and/or core.logic. I just put up some branches on my core.logic fork that shows miniKanren implemented with different monads. |
| 22:01 | mpan | and I can replace nonterminals with terminals and vice-versa? |
| 22:01 | jimduey | https://github.com/jduey/core.logic |
| 22:02 | jimduey | The branches are: sequence-monad, cont-m, lazy-cont and fork-join |
| 22:02 | jimduey | It's interesting to look at the diffs between the branches to see what had to change. |
| 22:04 | dgrnbrg | This is just crazy: my leiningen plugin A lists B in its :dependencies. When I try to run A, it says that there is no var B/foo. When I add B to the :plugins of the project from which I'm running A, then everything works |
| 22:04 | dgrnbrg | But B is a dependency of A, so it should already be available! |
| 22:05 | technomancy | dgrnbrg: try temporarily moving :plugins to :dependencies and running `lein deps :tree` |
| 22:06 | dgrnbrg | technomancy: it says that plugin A has library B as a dependency! |
| 22:06 | dgrnbrg | which is not what happens when I actually run it :( |
| 22:06 | amalloy | it gets an old version probably |
| 22:07 | dgrnbrg | all the versions are up-to-date |
| 22:08 | technomancy | don't know what to say. the jar in ~/.m2/repository claiming to be version X of library B does not have the var you're looking for. |
| 22:09 | dgrnbrg | I know…it's driving me insane :) |
| 22:09 | technomancy | try opening the jar in emacs? |
| 22:09 | technomancy | or your editor of choice |
| 22:09 | dgrnbrg | I'm going back through every step of the process |
| 22:09 | dgrnbrg | to confirm what's going on |
| 22:09 | mindbender1 | how can I access clojure queues? |
| 22:12 | dgrnbrg | technomancy: I see something strange--library B is leinjacker, and I depend on 0.3.0. When I move all the plugins into dependencies and run lein deps :tree, I only see leinjacker 0.3.0. But when I delete leinjacker from my m2 and run my plugin again, I see leinjacker 0.2.0 gets downloaded, even though none of my dependencies use it |
| 22:12 | dgrnbrg | and leinjacker 0.2.0 is missing the thing I need; but I don't understand who's forcing the downgrade |
| 22:16 | dgrnbrg | oh man, that's weird… I set a fixed version on my plugin, and then lein pedantic triggered an error on a clojure version conflict between the test project and a different dependency (none of which were my actual conflicting library), and then when I fixed that, the issue with the missing var dissappeared |
| 22:16 | dgrnbrg | wat |
| 22:18 | dgrnbrg | that's definitely the issue--somehow it's deciding to use an old version of leinjacker, even though I can't find any plugins that require the older version…unless they're in my profiles.clj! |
| 22:19 | dgrnbrg | how am I supposed to debug this kind of thing in the future? Or how can I help others not get stuck into this trap? |
| 22:19 | dgrnbrg | or should I just start using version ranges like "[1.0.2,)" instead of "1.0.2"? |
| 22:23 | mpan | is there a convenient way to bind x to a and y to b, or vice versa, depending on the truth value of c? |
| 22:25 | dgrnbrg | mpan: (let [[a b] (if c [x y] [y x])] ...) |
| 22:25 | mpan | dgrnbrg: oh cool! thanks! |
| 22:26 | mindbender1 | "PersistentQueue is indeed one of Clojure's more closely guarded secrets." - Michal Marczyk |
| 22:29 | jcromartie | something just occurred to me: websites are absolutely not hierarchical |
| 22:30 | jcromartie | (writing a crawler) |
| 22:30 | mpan | they can be made to be, though |
| 22:31 | mpan | if you define implicit "distance" according to first encounter and kill all the "backward" links |
| 22:36 | xeqi | dgrnbrg: so you ran lein-pedantic on your plugin project and it gave an error, and fixing that fixed your issue with lein-jacker? |
| 22:36 | amalloy | mpan: that's just acyclic, not hierarchical |
| 22:36 | dgrnbrg | xeqi: unfortunately, no |
| 22:36 | dgrnbrg | I added lein-pedantic to my profile and it gave me no warnings |
| 22:36 | dgrnbrg | I randomly decided to try using a minimum version range rather than a soft version range |
| 22:37 | dgrnbrg | then lein pendadatic found a conflict with clojure versions in another set of unrelated libs |
| 22:37 | xeqi | heh, thats weird |
| 22:37 | dgrnbrg | that fixed the original issue |
| 22:38 | dgrnbrg | does lein pedantic also run on plugins? |
| 22:38 | dgrnbrg | because that's where my error was |
| 22:38 | mpan | wait, have I got the wrong definition? is there more to hierarchical than just being able to get "levels"? |
| 22:38 | xeqi | no, being a plugin itself, lein has to setup and grab the plugins before it hooks in |
| 22:39 | mpan | amalloy: well, I suppose there's potentially a ton of incomparable stuff :/ and maybe it's not a good idea to just call those "the same level as the origin node" |
| 22:40 | dgrnbrg | xeqi: perhaps there could be an associated task like "lein pedantic-plugins", to help debug this kind of issue? |
| 22:40 | dgrnbrg | it could just replace the dependencies with the plugins (given the enabled profiles), and then do its thing |
| 22:41 | dgrnbrg | I think |
| 22:41 | xeqi | hmm, thats not a bad idea to explore |
| 22:43 | xeqi | as for how to help prevent this for others, I don't think theres any good recommendations, plugin dev is still kinda open ended |
| 22:43 | xeqi | making an issue on lein-pedantic for the check plugins stuff to play with later |
| 22:54 | dgrnbrg | xeqi: I am working on this command, but I can't find pedantic 0.0.2 in clojars |
| 22:57 | xeqi | dgrnbrg: https://clojars.org/repo/pedantic/pedantic/0.0.2/ - hmm, its there. are you getting this as part of a fork of lein-pedantic? |
| 22:57 | dgrnbrg | xeqi: I think i am just ruining my clojure config on my laptop tonight |
| 22:57 | xeqi | haha |
| 22:57 | dgrnbrg | i will send you a pull request to have a stored discussion |
| 22:59 | dgrnbrg | alright, I've sent you a pull request |
| 23:04 | jcromartie | whenever I'm stuck with a function or algorithm: off to the REPL! |
| 23:10 | xeqi | dgrnbrg: had to move it a bit to be a task, but looks like it works from some quick testing |
| 23:10 | dgrnbrg | wtf…I am eval-in-project with my project map that has a new dependency added to it, but then i get a class not found error as if the dependency was just ignored |
| 23:11 | dgrnbrg | xeqi: cool, i couldn't figure that out, and i am full of pain and suffering due to today's plugin woes |
| 23:11 | dgrnbrg | i can't wait to apply it to my config |
| 23:11 | dgrnbrg | and see all the awfulness i've made |
| 23:21 | xeqi | dgrnbrg, technomancy: hmm, I'm tempted to make this a higher order task thing; lein plugins-deps deps :tree seems useful too |
| 23:21 | dgrnbrg | that would be so awesome! |
| 23:21 | dgrnbrg | maybe call it plugins->deps? |
| 23:23 | xeqi | sure, was a quick one off typing |
| 23:26 | xeqi | ,(ns some->ns) |
| 23:26 | clojurebot | nil |
| 23:26 | xeqi | ... is that a legal namespace name? |
| 23:33 | dgrnbrg | hmm, maybe not... |
| 23:33 | dgrnbrg | :( |
| 23:41 | xeqi | dgrnbrg: well, it wouldn't work for a cli anyways |
| 23:41 | xeqi | always pipeing out somewhere |