2012-02-27
| 00:17 | Raynes | callen: Raynes made refheap. |
| 00:17 | Raynes | You were correct. |
| 00:17 | callen | Raynes: I'm 1 for 2 then. About the same as my grades in school then. |
| 00:24 | shaolynn | So I've created a project based on noir-async (https://github.com/andrewvc/noir-async), but I'm having trouble running it with "lein ring server" |
| 00:25 | shaolynn | I keep getting the following error: |
| 00:25 | shaolynn | java.lang.IllegalArgumentException: No implementation of method: :consumer of protocol: #'lamina.core.channel/ChannelProtocol found for class: nil |
| 00:25 | shaolynn | "lein run" works fine, but I'd like to compile it into a war and deploy it to AWS beanstalk |
| 00:31 | shaolynn | Ok, let me rephrase that - what's the best way to deploy a noir-async (https://github.com/andrewvc/noir-async) project to AWS beanstalk? |
| 00:56 | shaolynn | Ok, so I'm able to compile a war file, and it runs on my local tomcat server, but for some reason I get only 404s. |
| 00:56 | shaolynn | here's my server.clj: |
| 00:56 | shaolynn | https://gist.github.com/1921781 |
| 00:56 | shaolynn | any advice? |
| 01:03 | devn | (doseq [f list-of-files] (for [parsed-and-filtered (scrape-html-file f)] (swap! an-atom conj (:key-from a-map)))) |
| 01:04 | devn | this feels wrong... |
| 01:05 | bbloom | use in-to {} ?? |
| 01:05 | lazybot | bbloom: What are you, crazy? Of course not! |
| 01:06 | bbloom | *sigh* thanks lazybot |
| 01:06 | devn | i think ive spent too much time in imperative land lately |
| 01:08 | bbloom | actually, i have no clue whatsoever what that line you pasted is trying to do :-P |
| 01:18 | Raynes | I see an atom. |
| 01:18 | Raynes | I assume the worst. |
| 01:18 | devn | bahaha |
| 01:19 | devn | cut me some slack. i've been off on a farm somewhere for the last 6 months or something |
| 01:20 | devn | Raynes: I'm scraping a a log that is HTML. I extract the nodes I want and put them into a map {:nick "fred" :content "heyo!"} |
| 01:21 | devn | the issue is that sometimes :nick is nil because it is a continuation of the previous thing "fred" said |
| 01:21 | callen | devn: are you using clojure.xml or tree-seq? |
| 01:21 | devn | so I'd like to populate the next nil with the current nickname |
| 01:21 | devn | callen: neither, enlive |
| 01:21 | callen | that'll do. |
| 01:22 | callen | pretty good idea. :) |
| 01:22 | Raynes | devn: I don't understand why you need an atom for this. I guess I'd have to see the rest of the code. |
| 01:22 | devn | so my thinking is: as I walk through the html file i constantly am setting the atom to be the current nickname, and when i encounter a nil, i assoc that |
| 01:24 | ibdknox | anyone know if there's a way in lein to prevent .class files from being generated for a specific namespace? |
| 01:26 | bbloom | devn: treat your walk over the html file as a lazy sequence traversal |
| 01:26 | bbloom | then use reduce to compose your map |
| 01:27 | devn | Raynes: it's something like: (map parse-nodes logfile) => ({:nick "fred" :content "hello"}, {:nick nil :content "and good morning!"}, ...) |
| 01:28 | devn | meh, im just being confusing by not showing code, but ive made a big mess |
| 01:28 | devn | i need to make some commits |
| 01:29 | Raynes | I guess I just don't understand the concept of side effects anymore. Even my I/O is pure these days. ;P |
| 01:29 | devn | lol |
| 01:30 | callen | I'm not sure if I want to trade Raynes or not. |
| 01:30 | Raynes | Movie time. |
| 01:32 | humbleZ | test |
| 01:33 | callen | humbleZ: icles |
| 01:41 | spoon16 | why are many things in https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc/internal.clj named with a * suffix? |
| 02:03 | humbleZ | does anyone know of any other resources like the clojure-koans? |
| 02:05 | shaolynn | I'm having trouble deploying a noir app to a tomcat server. Is there a more specific IRC that I should try, or is this my best bet? |
| 02:05 | amalloy | humbleZ: 4clojure? |
| 02:06 | amalloy | you could try #noir, but this is probably your best bet |
| 02:06 | shaolynn | thx amalloy! I'll check it out |
| 02:06 | humbleZ | thanks ammoloy, will take a look |
| 02:12 | devn | how can I turn this: ({:nickname "Chouser", :content "Hm. Not exactly packed in here. Anyone paying attention?"} {:nickname "rhickey", :content "hi"} {:nickname "Chouser", :content "hi!"} {:nickname nil, :content "I'm still just reading the docs, but I have a quick question."}) into a seq of maps where the nils are replaced with the last non-nil nickname? |
| 02:13 | devn | so {:nickname nil ...} becomes {:nickname "Chouser" ...} |
| 02:13 | devn | (btw chouser sorry for all the nick hilights;) |
| 02:14 | shaolynn | Fuck - when I google my error message, the top result is my unanswered question on this IRC from earlier tonight D: |
| 02:16 | devn | shaolynn: what message? |
| 02:16 | shaolynn | The main issue is that I'm having trouble deploying a .war to a tomcat server |
| 02:17 | shaolynn | The specific message that I was searching for was this: |
| 02:17 | shaolynn | java.lang.IllegalArgumentException: No implementation of method: :consumer of protocol: #'lamina.core.channel/ChannelProtocol found for class: nil |
| 02:17 | shaolynn | when I run "lein ring server" |
| 02:18 | shaolynn | I can run the app just fine with just "lein run", but when I run "lein ring uberwar" and run the war on a tomcat server, All I get are 404 pages. |
| 02:18 | shaolynn | Right, I tried that with no luck. |
| 02:20 | devn | shaolynn: fwiw i know that ztellman is in the middle of a pretty big rewrite, not sure which version you're running, he has a clj-1.3 branch and a perf branch |
| 02:20 | aperiodic | ~contrib |
| 02:20 | clojurebot | Monolithic clojure.contrib has been split up in favor of smaller, actually-maintained libs. Transition notes here: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go |
| 02:20 | devn | one of them is 32 commits ahead of master, the other is 83 |
| 02:20 | shaolynn | thx devn, I'll check it out |
| 02:21 | shaolynn | I'm currently using noir-async "0.1.2" |
| 02:21 | devn | shaolynn: np, if all else fails (and it might), then id suggest looking at A) projects that rely on lamina to see if anyone is doing something similar to you, and B) asking on the clojure mailing list |
| 02:21 | ibdknox | tomcat is a server, I'm not sure how something like aleph could interoperate with that |
| 02:21 | devn | shaolynn: either way, if you can provide steps to reproduce and you ping the mailing list, I can almost guarantee you'll get a response |
| 02:22 | shaolynn | devn: I'll be sure to do that, thx :) |
| 02:24 | devn | ibdknox: can i trouble you with what im thinking must be a noob question? |
| 02:24 | devn | ({:foo "ABC, :bar "baz"}, {: |
| 02:24 | devn | grr |
| 02:25 | devn | ({:foo "abc", :bar "baz"}, {:foo nil, :bar "another"}, {:foo nil, :bar "and more"}) |
| 02:27 | bbloom | devn: let me know if i understand what you're asking for |
| 02:27 | devn | I'd like to keep the value of foo around, so the next nil value I find can be changed to "abc" over and over again, so the above becomes ({:foo "abc", :bar "baz"}, {:foo "abc", :bar "another"}, {:foo "abc", :bar "and more"}) |
| 02:27 | bbloom | you have a table, represented as a list of maps |
| 02:27 | bbloom | the table is represented with a sort of excel "fill down" for nil values |
| 02:27 | devn | precisely |
| 02:27 | bbloom | and you want to fill in the nil with the non nil above it? |
| 02:28 | bbloom | i'll take a crack at that :-P |
| 02:29 | devn | yes, it's late and ive been doing some ridiculous stuff. i highly doubt i need anything like a ref or an atom, it seems like partition or something might be just fine, or maybe I could just have a seq like: ("foo" nil nil "bar" nil "baz" nil nil nil) => ("foo" "foo" "foo" "bar" "bar" "baz" "baz" "baz" "baz") |
| 02:29 | devn | and then zipmap with the seq of values? |
| 02:29 | duck1123 | using a ref or atom was going to be my suggestion |
| 02:29 | ibdknox | filter to get the first non-nil value, map (fn [cur] (update-in cur [:foo] #(or % my-backup-foo))) |
| 02:30 | devn | yeah, that seems wrong, but maybe not |
| 02:30 | bbloom | no need for a ref or atom at all |
| 02:30 | ibdknox | alternatively you could use reduce |
| 02:30 | devn | yeah i was looking at that, i guess i can conceive of how it's possible, but im not sure how to roll my own reduce fn to achieve my goal here |
| 02:30 | bbloom | (defn fill-down |
| 02:30 | bbloom | ([rows] (fill-down rows {})) |
| 02:30 | bbloom | ([rows values] |
| 02:30 | bbloom | ...)) |
| 02:30 | bbloom | start with that |
| 02:31 | bbloom | write it recursively from there |
| 02:31 | devn | that's good thinkin', mister. |
| 02:31 | bbloom | values is a map of current values |
| 02:31 | ibdknox | what's wrong with the filter/map solution? |
| 02:31 | devn | ibdknox: im not grokking, sorry |
| 02:31 | bbloom | nothing |
| 02:32 | devn | i was busy typing and didnt give it a full "think" |
| 02:33 | devn | &(filter #(not (nil? (:foo %))) ({:foo "bar"} {:foo nil})) |
| 02:33 | lazybot | ⇒ () |
| 02:33 | duck1123 | if you have [{:foo "A"} {:foo nil} {:foo "B"} {:foo nil} {:foo nil}] should it be [{:foo "A"} {:foo "A"} {:foo "B"} {:foo "B"} {:foo "B"}] |
| 02:33 | ibdknox | ,(let [vals [{:foo "cool"} {:foo nil} {:foo "blah"}] fill (first (filter :foo vals)) final (map (fn [cur] (update-in cur [:foo] #(or % fill))) vals)] final) |
| 02:33 | clojurebot | ({:foo "cool"} {:foo {:foo "cool"}} {:foo "blah"}) |
| 02:33 | ibdknox | hm |
| 02:33 | devn | duck1123: yes |
| 02:34 | ibdknox | ,(let [vals [{:foo "cool"} {:foo nil} {:foo "blah"}] fill (:foo (first (filter :foo vals))) final (map (fn [cur] (update-in cur [:foo] #(or % fill))) vals)] final) |
| 02:34 | clojurebot | ({:foo "cool"} {:foo "cool"} {:foo "blah"}) |
| 02:34 | ibdknox | tada |
| 02:35 | devn | thanks ibdknox |
| 02:35 | devn | thanks duck1123 bbloom as well |
| 02:35 | devn | bbloom: i do sort of like the recursive variadic thing though |
| 02:36 | devn | ibdknox: in other news im sad to admit that I didn't know you could (filter :foo vals) like that |
| 02:37 | ibdknox | :) |
| 02:39 | bbloom | ah, i assumed you wanted it to work for multiple columns |
| 02:39 | devn | ibdknox: that is annoying in how nice it is. i was doing some pretty horrible stuff |
| 02:39 | bbloom | columns / fields… whatever |
| 02:39 | ibdknox | the multiple column solution isn't much different |
| 02:40 | bbloom | yeah, but i was starting with that which was harder & i'm not as fast as you ;-) |
| 02:40 | devn | ibdknox: let me ask you a crazy question: what was your thought process to arrive at that solution? |
| 02:41 | devn | i found myself all of a sudden back in imperative land, i was looking at stateful stuff, acting like a fool |
| 02:41 | devn | i was thinking i'd do some sort of (partition 2 1 ({:foo 1 :bar 2} {:foo nil :bar 3})) sort of thing |
| 02:42 | devn | and then for each group I would propagate :foo's value forward |
| 02:43 | devn | but that started to feel ridiculous because of all the comparison i needed to do, so i was thinking id just store it in an atom or a ref, but that felt horribly, horribly wrong |
| 02:43 | amalloy | ibdknox's solution looks like it grabs the first non-nil ever and fills all subsequent nils, regardless if something comes in the middle. not really what you wanted |
| 02:43 | ibdknox | ah didn't know that |
| 02:44 | devn | amalloy: here i am congratulating him, shaking the man's hand, but yeah, you're right |
| 02:44 | ibdknox | reduce is the simple solution then |
| 02:44 | devn | damnit. |
| 02:45 | amalloy | i think it works a lot better with reductions, really. easier *and* lazier |
| 02:46 | bbloom | break the problem down |
| 02:46 | bbloom | if you process the rows linearly, you don't actually need to look further back than the previous row |
| 02:48 | bbloom | (defn fill-from [row from] |
| 02:48 | bbloom | (into {} (map (fn [[k v]] [k (or v (k from))]) (seq row)))) |
| 02:48 | bbloom | (fill-from {:x 1 :y nil :z 3} {:x :a :y :b :z :c}) |
| 02:48 | amalloy | devn: https://gist.github.com/1922332, for example |
| 02:49 | devn | amalloy: reductions comes up now for the 3rd time in 24 hours. I had never even used it prior to yesterday when we were chatting about 4clojure golf. |
| 02:50 | amalloy | on the other hand, why not just get a set of logs that don't have this stupid nickname omission |
| 02:50 | clojurebot | No entiendo |
| 02:50 | devn | amalloy: because i know of no one who has logs that go back to the first day chouser joined the channel |
| 02:50 | bbloom | ooo reductions is cool. |
| 02:51 | devn | amalloy: and i want to make a markov chain for rhickey, and he's never on irc anymore. :( |
| 02:51 | amalloy | haha |
| 02:51 | devn | "This is orthogonal." |
| 02:51 | amalloy | devn, the secret master-mind between @FakeRichHickey |
| 02:52 | amalloy | bbloom: this kinda feels like an abuse of reductions, but i guess i don't really have a feel for how it's "intended" to be used |
| 02:53 | bbloom | amalloy: well it's a clever way to get access to "prev" |
| 02:53 | devn | I have a coworker who is working on generative knots, algebraic knots |
| 02:53 | devn | He was looking for exactly what reductions offers the other day |
| 02:54 | devn | bbloom: well said |
| 02:55 | devn | it feels like there should be a way to unroll and name history, no? |
| 02:56 | bbloom | if you combine my fill-from |
| 02:56 | bbloom | (defn fill-from [row from] (into {} (map (fn [[k v]] [k (or v (k from))]) (seq row)))) |
| 02:56 | devn | sort of like scheduling with at-at in overtone |
| 02:56 | bbloom | and that use of reductions: |
| 02:56 | bbloom | (rest (reductions (fn [prev next] (fill-from next prev)) {} '({:x 1 :y 2} {:x nil :y 3} {:x 4 :y nil}))) |
| 02:56 | bbloom | you get multi-column filling ({:x 1, :y 2} {:x 1, :y 3} {:x 4, :y 3}) |
| 02:56 | devn | like (at (- t (now)) (:foo m)) |
| 02:57 | bbloom | i'm sure there is a cleaner way to implement fill-from.... |
| 02:57 | devn | or (at (- (transformations 3) (now)) (:foo m))) |
| 02:58 | bbloom | ah, you can omit the "(seq" |
| 02:58 | devn | amalloy: btw, didn't get the chance, but thanks for the help there. much appreciated. |
| 02:58 | bbloom | is there some kind of easier way to map over a map? |
| 02:58 | amalloy | i wish i could understand other people's solutions to the really-hard problems on 4clojure. i feel like there's a lot of interesting approaches to learn there that all go over my head |
| 02:59 | amalloy | which i guess is what we get for encouraging brevity |
| 03:00 | devn | amalloy: this problem is part of bringing walton back from the dead, i have roughly 18,000 examples of clojure code from IRC alone. I need to start running expressions and subexpressions from pastebins etc. in clojail and amass a truly epic list of examples |
| 03:01 | devn | the plan from there is to allow people to rate a few different aspects of a given example: idiomatic? 3/5, concise? 4/5, etc. |
| 03:01 | devn | and finally, id like to roll the "winners" into clojuredocs automatically |
| 03:02 | devn | amalloy: i have a feeling there is a lot of opportunity to do something similar with all of the data 4clojure has amassed |
| 03:05 | aperiodic | amalloy: your solution to one of the early 4clojure problems (i think reversing a sequence) that employed into blew my mind |
| 03:05 | callen | now I want to look it up. |
| 03:05 | amalloy | haha. i was not the first to come up with that |
| 03:05 | amalloy | man, that was the really early days of 4clojure |
| 03:05 | amalloy | almost a year ago, now! |
| 03:05 | aperiodic | amalloy: i felt like i was hot shit cause i had some haskell-ish 5-line solution |
| 03:06 | callen | aperiodic: you mean into () |
| 03:06 | aperiodic | callen: yeah |
| 03:06 | callen | aperiodic: I've come up with some good ones in the past couple days :) |
| 03:06 | callen | aperiodic: you should follow me on 4clojure! |
| 03:06 | callen | aperiodic: and I'll follow you. |
| 03:07 | aperiodic | callen: sure! maybe it'll give me motivation to do more of them ;) |
| 03:07 | callen | aperiodic: my account name is bitemyapp |
| 03:07 | bbloom | so i'm attempting something that is far above my skill level…. but so far it's going relatively well |
| 03:07 | callen | bbloom: vut? |
| 03:07 | bbloom | I am building a clojurescript macro for defining dom trees |
| 03:08 | callen | aperiodic: what's your account name and how do I find you? |
| 03:08 | devn | (inc callen) |
| 03:08 | lazybot | ⇒ 1 |
| 03:08 | devn | [for sayign vut] |
| 03:08 | aperiodic | callen: mine is same as this one |
| 03:08 | devn | saying* |
| 03:08 | callen | amalloy: how do I follow people that aren't in the top users list? |
| 03:08 | bbloom | and the macro uses the clojurescript compiler's analyze function to figure out what to data bind to by looking for calls to deref |
| 03:08 | amalloy | https://4clojure.com/user/aperiodic |
| 03:09 | aperiodic | amalloy: that's the one |
| 03:09 | callen | amalloy: thank you thank you, would you consider making a more obvious link to something like "my profile" so people can know it off the bat? |
| 03:09 | callen | aperiodic: hey, I've even gotten more done than you. Wanna race? |
| 03:09 | aperiodic | i don't think i've seen this user page before |
| 03:10 | callen | I definitely haven't, there's no obvious link to it anywhere. |
| 03:10 | devn | follow me if you'd like |
| 03:10 | callen | it's useful though. |
| 03:10 | callen | devn: done! |
| 03:10 | callen | devn: you're further ahead of me :) |
| 03:10 | amalloy | yeah, now that following (the only user-based action anyone ever takes) is possible from the user-list, the links to profiles aren't very prominent |
| 03:10 | amalloy | but you can also just look at the list of all users instead of the top 100 |
| 03:11 | callen | I wasn't able to easily find that list |
| 03:11 | callen | nor was it obvious how to search by username |
| 03:11 | callen | amalloy: this is on github right? |
| 03:11 | callen | right. |
| 03:11 | callen | h/o |
| 03:11 | aperiodic | callen: i'm not one for speed, myself. i will try to fit doing some in to my daily routine, though, in a token effort to outstrip you |
| 03:11 | callen | aperiodic: I will load up on coffee |
| 03:11 | aperiodic | would probably be a good way to get the brain working in the morning |
| 03:12 | callen | aperiodic: mayhaps. I keep hearing about writers experimenting with trying to get some words written just as the day has begun. |
| 03:12 | devn | callen: beat me! |
| 03:13 | callen | I don't know if I can catch up to you, you have like double the questions on me :( |
| 03:13 | devn | aperiodic: it's sort of the exact opposite for me honestly. sometimes i get a little...how shall i say this...obsessed with finding a more elegant solution |
| 03:13 | callen | devn: 80 to my 45. It'd be a helluva haul. |
| 03:13 | bbloom | 4clojure is fun, but i found that it seems to jump around a bit |
| 03:13 | bbloom | skipping ahead |
| 03:13 | devn | if i get focused on it in the morning sometimes im at work and cant think about anything else |
| 03:13 | callen | bbloom: aye. |
| 03:13 | aperiodic | devn: you get nerd-sniped |
| 03:14 | bbloom | when you finish some "elementary" problems, it basically jumps you to medium |
| 03:14 | bbloom | i keep going back to the problem list and clicking the first one :-P |
| 03:14 | bbloom | (after sorting by difficulty) |
| 03:14 | devn | difficulty is just flat out wrong for some of the problems in there |
| 03:15 | devn | "elementary" my left foot -- honestly some of those categories should be changed so people new to clojure dont go: "holy shit, i can't even solve this elementary problem" |
| 03:16 | amalloy | bbloom: eh? the default sort order is pretty good IMO. sorts mostly by "number of times solved" IIRC |
| 03:16 | amalloy | on the assumption that easier problems are solved most often |
| 03:16 | bbloom | either way — the issue is the "now try" links presented to you when you solve one |
| 03:17 | amalloy | oh yeah, i bet those aren't nearly as smart |
| 03:17 | devn | *nod*, sometimes they just keep calling you back to a problem you don't want to work on anymore |
| 03:18 | devn | amalloy: maybe 4clojure should not try to class problems and do something like project euler does |
| 03:18 | devn | new problems are new. old problems are old. number of times solved is the default sort order. suggestions are made based on the next problem you havent solved which has the highest number of people who have successfully solved it. |
| 03:19 | devn | mainly im advocating 4clojure drop the "easy, elementary, medium, hard" thing |
| 03:20 | devn | i run a meetup group and people freak out a little bit when it says it's easy and they can't figure it out. it's sort of discouraging to newbs IMO. |
| 03:20 | bbloom | devn: agreed. i was kinda saddened when i struggled on an "easy" |
| 03:21 | bbloom | i thought i'd at least get to mediums before panicing :-) |
| 03:22 | devn | yeah, bbloom -- you're not the first person, trust me. someone who is new to clojure and starts getting their parens in order hits an easy problem on 4clojure and suddenly feels like: "oh my god, there's no way I'll ever be good at this." |
| 03:22 | devn | it's sort of the exact opposite of what the site was designed to do |
| 03:22 | bbloom | the problem for me is i don't know the std lib |
| 03:22 | bbloom | would really like to see more links to the docs |
| 03:22 | bbloom | or relevant doc strings already in the right margin |
| 03:23 | bbloom | i'm pretty good at thinking recursively and solving the problems |
| 03:23 | bbloom | but sometimes i just write waaaay more code than i have to b/c i have no idea what tools are available to me |
| 03:23 | devn | bbloom: docs in general need improvement. tooling around docs, etc. people are talking about predicate dispatch for google summer of code. |
| 03:23 | devn | we should be getting people in school to make the docs awesome. |
| 03:23 | bbloom | predicate dispatch? |
| 03:23 | callen | devn: I sort by solve numbers, but there are still some jumps in difficulty, but not as severe as difficulty sorting. |
| 03:23 | AimHere | bbloom > Real lispers can solve ALL their programming problems just using lambda and nothing else ;) |
| 03:24 | callen | we're doing Church Numbers again? |
| 03:24 | devn | haha |
| 03:24 | bbloom | AimHere: Yeah, you *can* but that doesn't mean you want to :-P |
| 03:24 | aperiodic | anyone who brings that up should be forced to use a turing tarpit for a week |
| 03:24 | devn | callen: i think it's more natural for someone just starting on the site to sort by difficulty |
| 03:24 | devn | either way, difficulty sorting is fucked, pardon my french |
| 03:25 | devn | it's a category that just doesn't need to be there |
| 03:25 | callen | I learned pretty quickly that it wasn't a good idea. |
| 03:25 | callen | I have experience with Euler, so I gravitated towards that anyway. |
| 03:25 | devn | callen: im a masochist, what can i say? |
| 03:25 | callen | I'm working on the interleave one right now. |
| 03:25 | callen | scouring the API for something that will inspire me. |
| 03:26 | devn | callen: if you want a fun challenge I enjoyed http://www.4clojure.com/problem/solutions/128 recently |
| 03:27 | devn | callen: honestly, pop open core.clj and just read the whole damned thing like 3-5 times. |
| 03:27 | callen | devn: no, don't mess with my mojo, I'm still an idiot and struggling with elementary/easy problems. |
| 03:27 | devn | then set.clj, zip.clj |
| 03:27 | callen | I'm not sure if that's cheating or not. |
| 03:27 | devn | it's absolutely not cheating. it's learning. :) |
| 03:29 | devn | callen: sometimes you can hunt in core.clj for subtle references to your problem, for instance: it must result in a lazy sequence |
| 03:29 | bbloom | like i just did "Last Element" |
| 03:29 | devn | you can regex across core.clj for lazy-seq and get a nice private tour of lazy-seq usage as a result |
| 03:30 | bbloom | i knew about "rest" but didn't know about "next" which returns nil instead of '() |
| 03:30 | bbloom | amalloy's solution was like cheating :-P |
| 03:30 | amalloy | haha is that one (comp peek vec)? |
| 03:30 | bbloom | i mean looking at ti was like cheating |
| 03:30 | devn | heh, but maybe yours was easy to read? understand? |
| 03:31 | bbloom | well clearly (comp first reverse) is easy |
| 03:31 | bbloom | but inefficient |
| 03:31 | devn | amalloy has absolutely terrorized me ever since I started doing 4clojure problems |
| 03:31 | devn | i finish one, his is better |
| 03:31 | devn | such is life |
| 03:31 | bbloom | i had (fn [xs] (let [x (first xs) |
| 03:31 | bbloom | xs (rest xs)] |
| 03:31 | bbloom | (if (empty? xs) |
| 03:31 | bbloom | x |
| 03:31 | bbloom | (recur xs)))) |
| 03:32 | bbloom | but next & if-let simplifies that greatly |
| 03:32 | bbloom | and i didnt need to let x at all |
| 03:32 | devn | you could destructure also |
| 03:33 | bbloom | ah, destructuring returns nil instead of '() |
| 03:33 | bbloom | gotcha. |
| 03:33 | muhoo | nom nom nom! java hungry! java want ALL my swap and ram! om nom nom! |
| 03:33 | devn | (fn [x [f & r]] ...) or something |
| 03:33 | devn | muhoo: heh |
| 03:34 | bbloom | muhoo: I assume that means destructuring is ram hungry? haha |
| 03:34 | muhoo | nothing to do with destructuring, just in general running clojure |
| 03:35 | bbloom | the price you pay for so many damn extra maps, vectors, and functions being generated all over the place :-/ |
| 03:35 | muhoo | i was so happy when i figured out (defn foo [& {:keys [bar baz]}] .. though |
| 03:35 | devn | muhoo: i have an old gist...1 sec |
| 03:36 | muhoo | in general destructuring is one of those generally-useful things i'll use everywhere, like when i first learnd python and first discovered list comprehensions |
| 03:38 | devn | muhoo: https://gist.github.com/439139 |
| 03:39 | devn | err not that one |
| 03:39 | devn | this one: https://gist.github.com/438897 |
| 03:39 | bbloom | yeah, destructuring is awesome |
| 03:39 | bbloom | although i wish there was nicer syntax for map destructuring |
| 03:39 | bbloom | the :keys thing seems weird to me |
| 03:39 | bbloom | i wonder why not use the #{} set reader syntax? |
| 03:39 | devn | because a map isn't a set? |
| 03:40 | devn | bbloom: honestly, you could go back in the irc logs and read exactly why |
| 03:40 | devn | map destructuring was discussed at length a couple of years ago IIRC |
| 03:41 | bbloom | but the keys to extract are a set ;-) |
| 03:41 | bbloom | i have no idea how you'd begin to find that in the logs |
| 03:41 | bbloom | googling for it produces a TON of results from the logs |
| 03:42 | devn | bbloom: go to n01se.net, click the clojure logs link, and use the search in there, google "map destructuring" |
| 03:43 | devn | http://clojure-log.n01se.net/date/2008-04-23.html |
| 03:43 | bbloom | yeah… i did that |
| 03:43 | bbloom | 10 pages of results |
| 03:43 | bbloom | lol |
| 03:44 | devn | so read from 2008 on, get manly about it -- those are logs of your forefathers chatting about map destructuring, sonny |
| 03:44 | devn | :D |
| 03:44 | devn | rich and chouser at length talking about it -- if you want to get at the root of why things are the way they are, those logs are what you're actually looking for |
| 03:45 | bbloom | found it |
| 03:45 | bbloom | thanks |
| 03:46 | devn | np. it's pretty awesome those logs are around. there aren't too many languages you can read that give you as much insight as the #clojure logs do |
| 03:46 | devn | at least in terms of language design |
| 03:46 | callen | the first time I came in here, hickey helped me. |
| 03:46 | callen | :) |
| 03:47 | devn | i think i already said this tonight, but I wish he'd hang out in here more often, then again maybe it's for the best that he doesn't. this channel had like 25-50 people in it and it was mostly composed of LtU afficionados. |
| 03:48 | bbloom | heh.. apparently rich's first suggestion chouser's first implementation used sets for destructuring |
| 03:48 | bbloom | i don't feel so dumb ;-) |
| 03:48 | devn | these days not so much -- and that's a good thing, but it seems like a terrible burden to always be on the hook like that |
| 03:48 | devn | bbloom: haha |
| 03:48 | devn | (inc bbloom) |
| 03:48 | lazybot | ⇒ 1 |
| 03:49 | callen | (inc devn) |
| 03:49 | lazybot | ⇒ 2 |
| 03:49 | callen | just for spreading the love. |
| 03:52 | bbloom | i'm not sure i really follow why the ruled out sets tho... |
| 03:52 | bbloom | it seems like it ruled out the :as keyword |
| 03:53 | bbloom | b/c the set is already constructed before the macro sees it |
| 03:53 | bbloom | i guess that's it then... |
| 03:53 | bbloom | it's a shame b/c i reaaaaaally like CoffeeScript's destructuring |
| 03:54 | bbloom | http://coffeescript.org/#destructuring |
| 03:54 | bbloom | oh well |
| 03:56 | devn | bbloom: work through the source for let |
| 03:56 | devn | bbloom: coffeescript shmoffeescript :) |
| 03:57 | bbloom | can't help it — started building my startup before clojurescript existed :-P coffeescript was a really good call |
| 03:57 | devn | bbloom: it's a lot of sugar with some really useful bits IMO |
| 03:58 | bbloom | that's what's great about it: it's basically a 1:1 mapping |
| 03:58 | bbloom | a lot less typing and a lot less silly mistakes |
| 03:58 | bbloom | if you have to write js, you might as well write coffee :-P |
| 03:58 | devn | but! does it do dead code elimination? :) |
| 03:59 | devn | js apps grow and grow and grow and grow and...you get the picture |
| 03:59 | bbloom | we don't have any dead code ;-) modulo a forgotten utility function or two and the unused parts of jquery |
| 03:59 | devn | clojurescript kills needless cruft by default |
| 04:00 | Raynes | Luckily I don't have to write much of it. |
| 04:00 | bbloom | nothing stops you from using the google compiler on coffeescript |
| 04:00 | ibdknox | I'm uploading my video :) |
| 04:00 | ibdknox | supposedly 2mins left |
| 04:00 | devn | bbloom: im talking about advanced mode compilation |
| 04:00 | Raynes | ibdknox: What video? |
| 04:00 | bbloom | we used to run advanced compilation on our coffee |
| 04:01 | ibdknox | Raynes: I built bret victor's live-editable game in CLJS |
| 04:01 | bbloom | but it wasn't worth the trouble b/c it only saved 4 or 5% |
| 04:01 | devn | bbloom: you can minify your coffeescript, you won't get an iota of benefit in advanced mode |
| 04:01 | bbloom | after gzipping, it was inconsequential |
| 04:01 | bbloom | b/c we dont have a lot of external libs |
| 04:01 | devn | bbloom: read more about what advanced mode does -- i struggle to believe your source was annotated for advanced mode compilation |
| 04:02 | bbloom | i used to work at Google… I used closure before it was publically available ;-) |
| 04:02 | bbloom | the problem is that jquery DWARFS our codebase |
| 04:02 | devn | bbloom: so you annotated constructors and all of that business in coffeescript? |
| 04:02 | bbloom | so even if we spent a ton of time panstakingly annotating, it wasn't providing more than a few kb of savings |
| 04:03 | devn | bbloom: fair enough |
| 04:03 | bbloom | i mostly avoid coffeescript's class construct.... |
| 04:04 | bbloom | advanced optimizations make a *ton* of sense for cljs |
| 04:04 | bbloom | and i totally support the decision to build on top of the closure compiler |
| 04:04 | bbloom | it was a great call |
| 04:04 | bbloom | but i don't advocate the closure compiler for *most* people writing rich js client apps |
| 04:04 | ibdknox | I wouldn't either. |
| 04:05 | ibdknox | http://www.chris-granger.com/ |
| 04:05 | ibdknox | CLJS video there ^ |
| 04:05 | ibdknox | rather, post pointing to it. Direct link: http://www.youtube.com/watch?v=7XUWpze_A_s&feature=youtu.be |
| 04:06 | accel | suppose I am writing a OSX app store app in (1) clojure and (2) opengl [thus no clojurescript]; what is the best target language to compile my clojure code to? |
| 04:06 | accel | I'm thinking objective-C/C, but I don't know if there is something with better matching of clojure primitives (concurrency / persistent data structures) |
| 04:07 | bbloom | ibdknox: that is super cool. |
| 04:07 | ibdknox | did you get to the projection thing? |
| 04:07 | devn | ibdknox: i want your .emacs.d |
| 04:07 | ibdknox | that's by far the coolest |
| 04:07 | bbloom | still watching |
| 04:07 | devn | ibdknox: how the hell did you get that in a split buffer? |
| 04:07 | ibdknox | devn: that's a webpage :p |
| 04:07 | devn | w3m? |
| 04:08 | ibdknox | I use vim ;) |
| 04:08 | devn | okay, then i want your .vimrc |
| 04:08 | devn | now. |
| 04:08 | devn | :) |
| 04:08 | bbloom | w00t fellow vimmer :-) |
| 04:08 | bbloom | whooaaaa that projection is bad ass. |
| 04:08 | devn | i use both. i like my SLIME, but I use vim at work, emacs and home. that's sort of my default. |
| 04:08 | accel | I use vim too |
| 04:08 | accel | where is this m agical screen shot? |
| 04:09 | Raynes | ibdknox: Did you ever figure out the new vimclojure haskell nrepl stuff? |
| 04:09 | ibdknox | no |
| 04:09 | Raynes | Damn it. |
| 04:09 | ibdknox | I know nothing about haskell. I didn't even try :p |
| 04:09 | Raynes | Is he allergic to docs? |
| 04:09 | ibdknox | lol |
| 04:09 | ibdknox | I don't think it's ready for "the public" quite yet |
| 04:09 | Raynes | He commits "Basic gradle building of Haskell stuff" as if anybody in the world actually uses gradle. |
| 04:10 | Raynes | Or, I guess knows *how* to use gradle. |
| 04:10 | ibdknox | lol |
| 04:10 | bbloom | hmm interesting… games tend to have (loop render update input) like a REPL |
| 04:10 | accel | anyone have sample code for: this is a piece of clojure code, that using only java libraries, pumps out a sine curve? (for playing a basic pitch) |
| 04:10 | bbloom | so redefining functions that are used on the next frame is neat |
| 04:10 | devn | ibdknox: that video is awesome. |
| 04:11 | bbloom | i'm trying to make a dom-building library that intelligently re-renders subtrees when functions are redefined |
| 04:11 | bbloom | hence why i needed to implement Var in cljs, so I could use add-watch :-) |
| 04:11 | ibdknox | haha neat |
| 04:11 | callen | man. Clojure fanatics have it bad. |
| 04:11 | bbloom | ? |
| 04:11 | callen | mainline people have to write Java to support their favorite language, cljs people have to write JS to support their favorite language. |
| 04:12 | callen | at least Java people mostly get to write Java to support Java. |
| 04:12 | bbloom | heh |
| 04:12 | Raynes | I… have no idea what you just said. |
| 04:12 | callen | Raynes: I have a harder time wrapping my head around (lazy-seq ...) than you do, surely you can tease it out! |
| 04:12 | ibdknox | now that I can compile cljs on the fly... no more js ;) |
| 04:13 | bbloom | http://vimeo.com/36579366 vimeo i skinda borked css right now |
| 04:14 | ibdknox | I wonder if I'm the first to have replicated his thing |
| 04:14 | ibdknox | also I want to know how he got the graphics for braid |
| 04:14 | bbloom | dude, super nice work on that thing, very cool |
| 04:15 | devn | ibdknox: the artist for braid made his slides :) |
| 04:15 | devn | btw ibdknox WHY'D YOU HAVE TO POST VIDEO IN HERE? I LIKE TEXT AND IMAGES. |
| 04:16 | ibdknox | hah |
| 04:16 | callen | devn: how many kidneys? |
| 04:16 | ibdknox | that guy is retarded |
| 04:16 | ibdknox | that thread made me sad |
| 04:16 | ibdknox | lol |
| 04:16 | devn | it makes me happy. it recovered quickly |
| 04:16 | ibdknox | his loss |
| 04:16 | devn | it's not like the ken wesson threads of old |
| 04:16 | devn | those would rage on for a week |
| 04:17 | ibdknox | heh yeah |
| 04:17 | callen | devn: ken wesson threads? |
| 04:18 | accel | what does sconv do in clojure? |
| 04:18 | ibdknox | alright guys. Way past my bedtime :) |
| 04:18 | devn | same |
| 04:18 | devn | night all |
| 04:18 | Raynes | Lightweights. |
| 04:19 | ibdknox | :p |
| 04:20 | ibdknox | Raynes: did you watch the video? |
| 04:20 | Raynes | Nope. |
| 04:20 | ibdknox | unfortunately we can no longer be friends then |
| 04:20 | ibdknox | ~guards |
| 04:20 | clojurebot | SEIZE HIM! |
| 04:21 | Raynes | I'm sure gonna miss you. |
| 04:21 | ibdknox | haha |
| 04:21 | ibdknox | G'nite! |
| 04:21 | Raynes | Night |
| 04:43 | gtuckerkellogg | just tried my first lein. Works fine except for the shell-wrapper, which throws an exception |
| 04:44 | gtuckerkellogg | it complains "Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main" |
| 04:45 | gtuckerkellogg | but i'm using (I believe) tha main in my project namespace |
| 04:45 | gtuckerkellogg | i clearly don't understand lein |
| 04:59 | gtuckerkellogg | anyone out there? |
| 05:01 | Dyresen | Who knows? |
| 05:01 | Dyresen | Nasa has found planets that can be habitable though. |
| 05:04 | gtuckerkellogg | excellent |
| 05:10 | ljos | Hi - I remeber reading about a distributed programming platform written in clojure, but I cannot remember the name or where I read it. Any tips? |
| 05:12 | echo-area | ljos: Storm? |
| 05:16 | ljos | echo-area: I don't think that was it. They where claiming something about not using eval, and the code written for storm looks a bit differnt than what i remember. |
| 05:17 | vijaykiran | ljos: avout ? |
| 05:17 | vijaykiran | oh wait that's distributed state |
| 05:19 | ljos | I was just a bit interested in that platform I read about, but it is not that important, what I need is a simple way to distribute load over multiple machines. Any recommendations? |
| 05:27 | ljos | I was looking at ZeroMQ, but if there exists something that is native Clojure I would like that better. |
| 05:31 | lucian | there are lots of things for java |
| 05:32 | lucian | like hadoop and such |
| 05:43 | ljos | Hadoop seems a bit overkill for my use. |
| 05:49 | lucian | there are lots of other similar things too |
| 05:50 | lucian | i'm having trouble understanding why this doesn't terminat with n >= 4 https://gist.github.com/1923053 |
| 05:52 | bohl | Hello everyone, this is my first attempt at writing a servlet in clojure. My starting point is yogthos / clojure-maven-examples, which does not work out of the box. After removing dependency on broken "json" maven package, I'm still getting "error opening zip file" for clojure-contrib-1.1.0.jar, which was imported by maven, on tomcat startup. Is there either a working servlet example, or where to get a functional clojure-contrib-1.1.0.j |
| 05:52 | ljos | lucian: that is why I am asking for recommendations :P |
| 05:53 | lucian | ljos: for some tasks, Cassandra could be a simpler replacement |
| 05:57 | ljos | lucian: the database? I don't want a database. What I want is an easy way to set up distributing computational load over several machines. Basically I want to pass some data to another process on another machine that does part of the calculation. |
| 05:58 | lucian | since Cassandra has map-reduce, it could do that, but only for some tasks as i said |
| 05:59 | lucian | i don't know of an established java thing other than hadoop |
| 05:59 | lucian | try #java or something? |
| 06:00 | lucian | actually there's cajo http://java.net/projects/cajo/pages/Home |
| 06:01 | ljos | lucian: I would prefer that it is in Clojure though. |
| 06:05 | raek | bohl: the "error opening zip file" error sounds like the downloaded jar got corrupted. try removing the .m2 directory in your home |
| 06:05 | raek | bohl: there is a library for interfacing with servlet based servers: ring |
| 06:06 | raek | it eliminates the need to generate a custom class that implements the servlet interface and lets you program handler functions purely in clojure |
| 06:06 | raek | https://github.com/mmcgrana/ring |
| 06:07 | raek | this describes the basic concepts: https://github.com/mmcgrana/ring/blob/master/SPEC |
| 06:08 | raek | bohl: anything that uses clojure-contrib is basically outdated |
| 06:08 | raek | and clojure 1.1 is pretty old by now |
| 06:09 | raek | bohl: the json library that used to be in contrib is now its own project (and should work fine): https://github.com/clojure/data.json |
| 06:09 | raek | [org.clojure/data.json "0.1.2"] |
| 06:10 | raek | (I also assume you know what Leiningen is. If not, don't do anything until you have checked it out.) |
| 06:11 | ljos | lucian: btw, your problem. It is because the list doesn't grow. So if l is supposed to be longer then 3 it never grows to that size. |
| 06:12 | ljos | lucian: when n is 3 it creates this list: (1 3 1), and n = 4 this list (1 4 1) |
| 06:12 | lucian | ljos: right, good point |
| 06:25 | yesudeep | That video about Inventing on Principle by Bret Victor was perhaps the most awesome talk I have heard. Thank you for sharing it here. I like moving pictures. Thank you! |
| 06:26 | yesudeep | @ bbloom |
| 06:27 | G0SUB | yesudeep |
| 06:27 | yesudeep | hey G0SUB =) |
| 06:35 | G0SUB | yesudeep, howdy! |
| 06:36 | yesudeep | G0SUB: doing great bro. =) |
| 06:36 | G0SUB | yesudeep, cool. what brings you to #clojure? have you been playing with it? |
| 06:36 | yesudeep | G0SUB: yep. i have just begun playing with it. =) |
| 06:37 | G0SUB | yesudeep, awesome. |
| 06:37 | yesudeep | I find clojurescript extremely fascinating. |
| 06:37 | bohl | raek: thanks |
| 06:38 | G0SUB | yesudeep, indeed, it is. |
| 06:41 | gtuckerkellogg | a simple "hello world" drawn directly from the Leiningen tutorial works find, but for some stupidity of mind I can't get the :shell-wrapper behaving |
| 06:41 | gtuckerkellogg | stupidity of *mine* that is. |
| 06:54 | lucian | ljos: heh, it was a simple case of using partition 2 1 instead :) thanks |
| 07:26 | y3di | does notp and p imply p? |
| 07:27 | gtuckerkellogg | i am still stumped |
| 07:33 | raek | y3di: yes. not-p and p implies anything. http://en.wikipedia.org/wiki/Principle_of_explosion |
| 07:35 | y3di | thats what i figured, just sounds weird when said aloud to me. |
| 07:44 | timonv_ | y3di its simple, notp and p cannot hold, it produces a falsum, so anything can be true |
| 07:48 | bohl | None of the "ring" examples from github use maven, does anyone know how to produce a .war file from them? |
| 08:19 | raek | bohl: you can use the "lein-ring" Leiningen plugin to generate WAR files |
| 08:20 | raek | bohl: the majority of Clojure projects use Leiningen as the build tool (which uses Maven internally for dependencies) |
| 08:46 | tsdh | Wasn't there a seq function which is a shorthand for [(filter p coll) (remove p coll)], or did I just dream it? |
| 08:47 | raek | in the old contrib, yes |
| 08:47 | raek | (I think it was called "separate") |
| 08:48 | raek | you can use (juxt filter remove) instead |
| 08:48 | tsdh | raek: Oh, yes. I use juxt far too seldomly anyway. :-) |
| 08:53 | mdeboard | &(docs juxt) |
| 08:53 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: docs in this context |
| 08:54 | mdeboard | &(doc juxt) |
| 08:54 | lazybot | ⇒ "([f] [f g] [f g h] [f g h & fs]); Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]" |
| 08:54 | mdeboard | huh. I think I got juxt and comp confused :\ |
| 09:28 | michaelr525 | hello! |
| 09:59 | arkh | I'm not able to do a 'lein uberjar' with a dummy project and I followed the instructions in the leiningen tutorial. Error is "Exception in thread "main" java.lang.RuntimeException: No such var: clojure.core/genclass" |
| 10:00 | arkh | I declared a :main in my project.clj, a :genclass in my asdf.core namespace and defined a -main function |
| 10:00 | arkh | lein version comes back with "Leiningen 1.6.1.1 on Java 1.6.0_26 Java HotSpot(TM) Client VM" |
| 10:02 | tsdh | arkh: Hm, there's indeed no clojure.core/genclass but only a clojure.core/gen-class... |
| 10:04 | arkh | tsdh: omg - you're awesome. I had that as a typo ... I changed :genclass to :gen-class and now it's happy. Thank you. |
| 10:06 | tsdh | arkh: :-) |
| 10:07 | babilen | arkh: btw -- Your leiningen is slightly outdated and you might want to install the current version. That can be done with "lein upgrade" (if you installed it manually) or via your package manager (if you use Debian). |
| 10:08 | arkh | babilen: thanks for the heads up |
| 10:32 | lnostdal | seems agents "picks up" thread local bindings |
| 10:33 | lnostdal | ..is there some option or something that makes it not do that? |
| 10:45 | r4vi | is there a march clojure-nyc meet? I'm going to be in town 15-20th and nothing shown on the meetup page yet. |
| 10:47 | dnolen | r4vi: not that I'm aware of, I think the folks that normally organize it are pretty swamped w/ work. |
| 10:48 | benares_98 | would upgrading leiningen also update clojure to 1.3.0? |
| 10:50 | TimMc | benares_98:Depends what you mean. |
| 10:51 | TimMc | lein repl outsid eof a project uses lein's own clojure dependency, but inside a project you can use whatever you want |
| 10:51 | TimMc | also, lein 1.x or lein 2? |
| 10:51 | benares_98 | that's what I meant, thanks |
| 10:59 | mdeboard | I guess I don't get clojure packaging quite yet... I'm trying to import a module I wrote last night into another project, but getting an ExceptionInInitialization error. I tried both `(use 'icarus.core)` and :require'ing it in the ns definition, but either way I get an exception (the latter gives me a NoClassDefFound error). Can anyone spot what I'm doing wrong? https://github.com/mattdeboard/Icarus/blob/master/src/i |
| 10:59 | mdeboard | carus/core.clj |
| 10:59 | mdeboard | https://github.com/mattdeboard/Icarus/blob/master/src/icarus/core.clj |
| 11:00 | TimMc | mdeboard: I think the error is going to be foudn in your relying project. |
| 11:01 | mdeboard | Really? Weird... |
| 11:01 | mdeboard | Why do you say this |
| 11:01 | TimMc | Because the lib itself looks fine. |
| 11:01 | mdeboard | Darn |
| 11:02 | TimMc | Also, I've gotten the errors you describe when I've messed up dependencies on other projects. |
| 11:02 | mdeboard | I can (use) and (require) korma just fine in the same thing so idgi |
| 11:02 | mdeboard | 100% at a loss |
| 11:02 | TimMc | mdeboard: Have you saved your project.clj file to disk? |
| 11:02 | TimMc | (Distressingly frequent failure mode.) |
| 11:03 | mdeboard | TimMc: Indeed I have |
| 11:03 | TimMc | Does `lein classpath` include the icarus jar? |
| 11:03 | mdeboard | TimMc: It does indeed |
| 11:04 | TimMc | How about (loaded-libs) from inside the REPL? |
| 11:04 | mdeboard | Not in there |
| 11:04 | TimMc | (Although maybe that depends on require having been used) |
| 11:05 | mdeboard | Everything -- including dependency of Icarus, clojure-solr -- is loaded except Icarus. |
| 11:05 | TimMc | Fascinating. |
| 11:07 | mdeboard | new and exotic ways of screwing something up |
| 11:07 | TimMc | It's going to be something stupid. |
| 11:07 | mdeboard | yeah |
| 11:09 | TimMc | Mmm, I think you have the error wrong. |
| 11:09 | mdeboard | orly |
| 11:10 | mdeboard | http://ubuntuone.com/3iEmF8XJV8UBYPz93lpYE3 is the error |
| 11:10 | TimMc | https://refheap.com/paste/869 |
| 11:10 | TimMc | Oh, stupid SLIME. |
| 11:11 | mdeboard | need more hand-holding toward the problem |
| 11:13 | mdeboard | is it the filter collision? |
| 11:14 | TimMc | Ah! Could be. |
| 11:14 | TimMc | You're not excluding clojure.core/filter from refer, and it is a multimethod that is causing the problem... |
| 11:19 | ibdknox|away | dnolen: as requested http://news.ycombinator.com/item?id=3639441 |
| 11:19 | dnolen | sweet! |
| 11:21 | ibdknox|away | for those interested, I wrote one of bret victor's demoes in cljs. The video is only 5 mins and I think it might be one of the coolest things I've worked on. :) Check it out! |
| 11:22 | TimMc | mdeboard: require gives a different error in Clojure 1.2.1 and 1.3.0 |
| 11:23 | TimMc | ibdknox|away: THat looks fantastic. |
| 11:23 | ibdknox | TimMc: it's so cool |
| 11:23 | ibdknox | the projection thing is ridiculous |
| 11:23 | dnolen | ibdknox: dude, that is AWESOME |
| 11:23 | mdeboard | ibdknox: Can you re-link please |
| 11:24 | ibdknox | mdeboard: hm? |
| 11:24 | mdeboard | ibdknox: To the HN submission |
| 11:24 | mdeboard | closed emacs and lost it |
| 11:24 | ibdknox | http://news.ycombinator.com/item?id=3639441 |
| 11:24 | mdeboard | TimMc: Renamed filter and it works fine now |
| 11:26 | TimMc | ibdknox: Holy shit. |
| 11:27 | ibdknox | hehe |
| 11:27 | ibdknox | :D |
| 11:27 | ibdknox | like I said, definitely one of the coolest things I've worked on. :) |
| 11:32 | y3di | chris ganger on his game! |
| 11:32 | mdeboard | literally |
| 11:33 | jimduey | ibdknox: nice work. |
| 11:33 | TimMc | ibdknox: Can you edit the code while the piece is moving? (Theoretically.) |
| 11:33 | jweiss_ | is there a straightforward way to get the namespaced qualified symbol for a var? |
| 11:33 | ibdknox | TimMc: yes |
| 11:33 | TimMc | sweeet |
| 11:34 | ibdknox | TimMc: I had him originally moving by himself back and forth |
| 11:34 | y3di | ibdknox: how long have you been working on it? |
| 11:34 | ibdknox | I did it yesterday |
| 11:34 | rlb | ibdknox: what was the link again? (erc crashed) |
| 11:34 | ibdknox | took about 7-8ish hours? |
| 11:34 | ibdknox | http://news.ycombinator.com/item?id=3639441 |
| 11:34 | rlb | thx |
| 11:34 | y3di | so beast... gj |
| 11:35 | ibdknox | most of my time was spent dealing with some stupid AOT issue |
| 11:35 | ibdknox | it would've been faster |
| 11:36 | dnolen | ibdknox: yeah that sounds weird, does lein run trigger that? |
| 11:36 | jonasen | Exception in thread "main" java.io.FileNotFoundException: Could not locate crate/macros__init.class or crate/macros.clj on classpath: , compiling:(box.clj:22) |
| 11:36 | ibdknox | dnolen: I dunno, basically it would work the first time and not anytime after that |
| 11:36 | jonasen | ^^ I get this when running "lein run" on cljs-live |
| 11:37 | ibdknox | jonasen: one second, I forgot I had those as checkouts |
| 11:37 | jonasen | ibdknox: ok |
| 11:37 | TimMc | ibdknox: Posted to reddit: http://www.reddit.com/r/programming/comments/q88yc/connecting_to_your_creation_as_illustrated_by_a/ |
| 11:39 | ibdknox | dnolen: I dunno, but it seems that if .classes exist for the compiler, it no longer works |
| 11:40 | ibdknox | TimMc: cool :) |
| 11:40 | dnolen | ibdknox: me hates AOT, it's a massive pain to debug |
| 11:40 | mdeboard | ibdknox: I got the error jonasen has as well |
| 11:40 | ibdknox | mdeboard: jonasen: pull |
| 11:40 | TimMc | BANG |
| 11:41 | mdeboard | lol |
| 11:41 | mdeboard | I thought about typing that but wanted to make sure it worked :P |
| 11:42 | ibdknox | well |
| 11:42 | ibdknox | technically you can't rebuild the cljs with that |
| 11:42 | ibdknox | it took a modifed version of monet to make this work |
| 11:42 | ibdknox | the core cljs that runs it |
| 11:42 | TimMc | clojurebot: pull is <reply>*BANG* |
| 11:42 | clojurebot | In Ordnung |
| 11:42 | ibdknox | I'll clean up my changes to monet a little later and push it |
| 11:45 | ibdknox | mdeboard: it work? |
| 11:45 | mdeboard | ibdknox: Yeah was just playing with it, that's awesome |
| 11:45 | ibdknox | good :) |
| 11:46 | mdeboard | I can always rely on you to make me wonder why I'm such an underachiever |
| 11:46 | mdeboard | :P |
| 11:46 | ibdknox | lol |
| 11:46 | ibdknox | technomancy: is there some way to prevent lein from creating .class files on run? |
| 11:48 | gtrak`` | ,(Long/maxValue) |
| 11:48 | clojurebot | #<CompilerException java.lang.NoSuchFieldException: maxValue, compiling:(NO_SOURCE_PATH:0)> |
| 11:48 | ibdknox | I'm glad I didn't end up trying to put it up live |
| 11:49 | ibdknox | HN likes it and it would've been toast by now |
| 11:51 | dnolen | ibdknox: it's a pretty stunning demo. nice looking ClojureScript too. |
| 11:51 | clojurebot | Gabh mo leithscéal? |
| 11:51 | ibdknox | dnolen: eh, I'm sure I did some really gross things |
| 11:51 | dnolen | ibdknox: heh well I didn't see anything too offensive on the first pass :) |
| 11:51 | tmciver | ibdknox: I tried your code as well. Not sure what I'm doing wrong but I get a "can't recur here" error: https://refheap.com/paste/870 |
| 11:52 | ibdknox | tmciver: rm -rf classes/cljs/ |
| 11:52 | ibdknox | I'll add the error text to the Readme |
| 11:53 | tmciver | ibdknox: that did it. Thanks. |
| 11:54 | tscheibl | ibdknox: just out of interest, did you know of https://github.com/teropa/hiccups when you started "crate"? .. I stumbled over crate when I was taking a look at waltz |
| 11:55 | lucian | ibdknox: that's really awesome |
| 11:55 | ibdknox | tscheibl: yes, it goes to an html string, which doesn't let me do all the cool things I can do.. like embed jQuery objects and such |
| 11:55 | ibdknox | tscheibl: also, pinot was first :) |
| 11:55 | tscheibl | ibdknox: ah, ok... that's a good reason :) |
| 11:57 | gtrak`` | ibdknox: oo pretty |
| 11:57 | ibdknox | apparently redit people don't like it |
| 11:57 | ibdknox | wonder why |
| 11:59 | beffbernard | Can someone repost the link? I wanna see too :( |
| 11:59 | Bronsa | ibdknox: how to draw new blocks? |
| 11:59 | ibdknox | Bronsa: click on the canvas once it has focus |
| 11:59 | ibdknox | beffbernard: http://news.ycombinator.com/item?id=3639441 |
| 11:59 | Bronsa | tried that, it's not working |
| 11:59 | Bronsa | maybe it's vimperator |
| 11:59 | ibdknox | ah, could be |
| 11:59 | ibdknox | I only tried it in Chrome |
| 12:00 | ibdknox | since it needs some pretty ridiculous JS horsepower |
| 12:00 | gtrak`` | do you keep track of all the state to get the jump trajectory? |
| 12:01 | tmciver | ibdknox: yeah, I'm on FF and clicking to add bricks does not work for me. |
| 12:01 | Bronsa | heh, workds fine on chromium, doesnt on firefox |
| 12:01 | Bronsa | *works |
| 12:01 | ibdknox | I'll add that to the readme lol |
| 12:01 | Bronsa | lol |
| 12:01 | ibdknox | gtrak``: the last 100 ticks |
| 12:01 | gtrak`` | nice |
| 12:13 | ibdknox | off to real work :( |
| 12:13 | mdeboard | GOOD RIDDANCE |
| 12:14 | gtrak`` | haha |
| 12:21 | wiseen | is there a better way to do : `(foo ... ~@(when x [x])) - where x is a value or nil and I don't want nil and the result should be expanded only when not nil - wrapping x in list seems hackish so maybe there is a better way ? |
| 12:30 | tscheibl | ,(flatten (seq {:a 1 :b 2})) |
| 12:30 | clojurebot | (:a 1 :b 2) |
| 12:36 | tscheibl | ,(let [m {:a 1 :b {:x 42}}] (interleave (keys m) (vals m))) |
| 12:36 | clojurebot | (:a 1 :b {:x 42}) |
| 12:36 | tscheibl | the interleave version is 10 times faster |
| 12:37 | Scriptor | you're not flattening it, though |
| 12:38 | Scriptor | are nested hashes supposed to stay as hashes? |
| 12:38 | tscheibl | I just want to flatten with depth 1 |
| 12:38 | tscheibl | ,(flatten (seq {:a 1 :b {:x 42}})) |
| 12:38 | clojurebot | (:a 1 :b {:x 42}) |
| 12:38 | tscheibl | see it's the same |
| 12:39 | tscheibl | I must use something like that when I wrap functions with keyword arguments... because apply does not support hashmaps |
| 12:41 | TimMc | tscheibl: Just write mapply |
| 12:41 | TimMc | You really don't want flatten for this, it will screw you over. |
| 12:42 | tscheibl | mapply? |
| 12:42 | TimMc | &(flatten (seq {:a [1 2], :b 3})) |
| 12:42 | lazybot | ⇒ (:a 1 2 :b 3) |
| 12:42 | TimMc | tscheibl: Yeah, apply that takes a map as a last param. |
| 12:42 | Scriptor | tscheibl: map apply |
| 12:42 | tscheibl | TimMc: yep.. but that's not part of clojure core ..? |
| 12:43 | Scriptor | tscheibl: right, just write it yourself |
| 12:43 | tscheibl | :) |
| 12:43 | tscheibl | ,(let [m {:a 1 :b {:x 42}}] (interleave (keys m) (vals m))) |
| 12:43 | clojurebot | (:a 1 :b {:x 42}) |
| 12:43 | tscheibl | like that |
| 12:43 | tscheibl | ..or is there something better? |
| 12:43 | TimMc | clojurebot: mapply is (defn mapply [f & args] (apply f (apply concat (butlast args) (last args)))) |
| 12:43 | clojurebot | Ik begrijp |
| 12:44 | TimMc | then (mapply f a b c some-map) works like apply and some vector or list |
| 12:47 | tscheibl | TimMc: righty... concat does the trick :) |
| 12:58 | technomancy | ibdknox|away: so with your video |
| 12:58 | technomancy | once you get the turtle in there |
| 12:58 | mdeboard | Jesus am I an idiot or is korma like a grillion times easier to use than SQLAlchemy |
| 12:58 | technomancy | you need to be able to define the bounciness of the turtle as a function of gravity and the target height |
| 12:58 | technomancy | I was disappointed that he didn't do that in the video |
| 13:09 | ibdknox | technomancy: lol |
| 13:10 | ibdknox | ok, I'm officially annoyed by HNs voting ring bullshit |
| 13:10 | ibdknox | technomancy: I'll try harder next time ;) |
| 13:11 | ibdknox | mdeboard: it's a lot easier ;) |
| 13:11 | technomancy | ibdknox: no, I mean that's what annoyed me about the original |
| 13:11 | ibdknox | oh |
| 13:12 | ibdknox | ah I see, I misread that |
| 13:14 | dnolen | ibdknox: yeah it's kinda annoying that's kicked in for such a cool post |
| 13:15 | dnolen | back to the usual boring HN crap |
| 13:19 | ibdknox | dnolen: yeah :( |
| 13:19 | ibdknox | oh well, a fair number of people saw it I think |
| 13:19 | ibdknox | :) |
| 13:19 | dnolen | ibdknox: yeah 80 points in 2 hours is pretty good |
| 13:28 | oakwise | ring voting? |
| 13:28 | gfredericks | if I run jruby and it calls a clojure lib, is it expected that the clojure code would use a different classloader than the jruby? |
| 13:29 | TimMc | oakwise: Presumably some sort of protection against groups of people always voting for each other's links in order to game the system. |
| 13:30 | hiredman | gfredericks: it can |
| 13:30 | oakwise | ah, the clojure cabal eh? |
| 13:31 | TimMc | Yeah, I imagine it is easy for it to misfire on things that are interesting to well-defined subsets of the userbase. |
| 13:31 | gfredericks | hiredman: k, thanks |
| 13:41 | gtrak`` | what does the voting ring do to the post? |
| 13:42 | ibdknox | it destroys the rank of the post |
| 13:42 | ibdknox | basically subtracts n-ranking points from the post |
| 13:42 | ibdknox | usually it's almost immediate removal from the front page |
| 13:43 | ibdknox | It stayed on there for a little bit |
| 13:43 | ibdknox | but now it's off |
| 13:43 | TimMc | How can you tell it is activated? |
| 13:43 | ibdknox | you don't go from #2 to #28 in 5 mins |
| 13:43 | TimMc | got it |
| 13:43 | gtrak`` | oh, lame, maybe I shouldn't vote for your stuff next time :-) |
| 13:43 | ibdknox | I'm not sure how to fix it really |
| 13:43 | ibdknox | I post stuff about Clojure mostly, and Clojure people are going to vote on it |
| 13:43 | ibdknox | the mechanism is busted |
| 13:44 | ibdknox | basically I'll just have to get one of you guys to post it for me next time :) |
| 13:44 | gtrak`` | we could have a reverse voting ring, don't vote for it until enough others have seen it? |
| 13:45 | hagna | so I'd like to call a protected method in clojure 1.3; maybe wall-hack-method would help, but where is it? |
| 13:45 | ibdknox | well |
| 13:45 | ibdknox | that should've been the case here |
| 13:45 | ibdknox | it had 80 before it got bumped |
| 13:46 | ibdknox | not sure what more was necessary to prove it wasn't artificially put up there |
| 13:46 | ibdknox | I might email PG and ask |
| 13:46 | mdeboard | ibdknox: Just finished up a module to reconcile our database (using Korma) and our Solr index, since we've got a problem with docs not being deleted reliably |
| 13:47 | mdeboard | overshare |
| 13:47 | ibdknox | sweet |
| 13:51 | y3di | ibdknox: you converted someone to clojure! |
| 13:54 | ibdknox | y3di: haha, Noir has actually gotten a fair number of people :) |
| 13:58 | ibdknox | does reddit just have really terrible eventual consistency? |
| 13:59 | arkh | that's how you get scalability and reliability, right? ; ) |
| 13:59 | gtrak`` | lol, why 17 down votes? |
| 13:59 | gtrak`` | haters? |
| 14:00 | TimMc | gtrak``: Could also be ghost votes. |
| 14:00 | TimMc | Ghost-banned users get their votes cancelled out by incrementing both values. :-P |
| 14:00 | gtrak`` | ah |
| 14:01 | ibdknox | that's annoying |
| 14:02 | TimMc | And then there are people who downvote instead of clicking "hide" because they are idiots (and also have the "hide things I've seen" feature enabled) |
| 14:02 | m0smith` | hello? |
| 14:02 | clojurebot | BUENOS DING DONG DIDDLY DIOS, fRaUline m0smith` |
| 14:02 | gtrak`` | i was wondering what was so offensive about it :-) |
| 14:02 | ibdknox | gtrak``: me too |
| 14:03 | arkh | I'd like to count the number of items in a list - what's a clojure-y way to do that? ["one" "two" "two" "three" "three" "three"] as {"one" 1, "two" 2, "three" 3} |
| 14:03 | m0smith` | ibdknox: I am giving noir a try and I have a question |
| 14:03 | ibdknox | arkh: ##(doc frequencies) |
| 14:03 | lazybot | ⇒ "([coll]); Returns a map from distinct items in coll to the number of times they appear." |
| 14:03 | arkh | ibdknox: thank you |
| 14:03 | ibdknox | m0smith`: sup? |
| 14:03 | TimMc | ibdknox: Really popular posts usually settle down to about 80%, middling ones to about 66%. |
| 14:04 | ibdknox | TimMc: I see. At least it doesn't have the damn voting ring nonsense ;) |
| 14:04 | m0smith` | ibdknox: I have several checkboxkes with the same name and I was expecting a vector of the checked values, instead I only get one. Is that expected? |
| 14:04 | TimMc | ibdknox: Oh, I'm sure there's some of that too. Reddit is very private about their anti-cheating algorithms, of course. |
| 14:04 | ibdknox | m0smith`: name="blah[]" |
| 14:05 | ibdknox | TimMc: hah, I guess that would make sense :) |
| 14:05 | m0smith` | <input name="blah[]" value="one"> <input name="blah[]" value="two">? |
| 14:06 | ibdknox | I think so |
| 14:06 | m0smith` | hmm |
| 14:06 | ibdknox | actually.. I may not add the nested-params middleware |
| 14:06 | ibdknox | let me check |
| 14:07 | ibdknox | m0smith`: yeah it's there |
| 14:08 | ibdknox | m0smith`: https://github.com/mmcgrana/ring/blob/master/ring-core/src/ring/middleware/nested_params.clj#L48 |
| 14:09 | m0smith` | ibdknox: that explains it. I am still trying to get familiar with the stack |
| 14:09 | ibdknox | m0smith`: no worries |
| 14:09 | ibdknox | m0smith`: btw there's a #Noir |
| 14:09 | ibdknox | err #noir |
| 14:09 | ibdknox | not sure if IRC is case-sensitive |
| 14:10 | m0smith` | ibdknox: thanks I will keep that in mind |
| 14:10 | TimMc | ibdknox: Same thing. |
| 14:10 | ibdknox | k |
| 14:10 | TimMc | I wonder what locale it uses for casefolding. :-P |
| 14:11 | TimMc | /join #noır |
| 14:11 | TimMc | (Turkish dotless i) |
| 14:11 | ibdknox | haha |
| 14:12 | mdeboard | y3di: Nah he didn't convert me, but Korma definitely makes it easy to sneak some Clojure into our source repos :) |
| 14:13 | y3di | i was referring to jisaacstone on hn |
| 14:13 | mdeboard | oic |
| 14:17 | ibdknox | I was kinda hoping bret vector might comment |
| 14:17 | y3di | maybe he will |
| 14:17 | zmaril | What's datomic mean? |
| 14:17 | y3di | DAT OMIC |
| 14:17 | y3di | idk sorry |
| 14:19 | mdeboard | zmaril: Context? |
| 14:19 | ibdknox | did you mean Diatomic? |
| 14:20 | amalloy | no, rhickey is increasing the mystery by tweeting a single non-word without explanation |
| 14:20 | ibdknox | if you did that's a molecule made of two atoms :p |
| 14:20 | zmaril | Yep, twitter |
| 14:20 | TimMc | cat on keyboard |
| 14:20 | mdeboard | d'atomique |
| 14:21 | mdeboard | fragrance for geeks, by rich hickey |
| 14:21 | ibdknox | lol |
| 14:21 | TimMc | >_< |
| 14:21 | Bronsa | lol |
| 14:21 | zmaril | What if he really meant to say diatomic and is stuck with datomic now |
| 14:21 | zmaril | I guess that is the hazard of single word tweets. |
| 14:22 | mdeboard | Similar thing happen when he misspelled complex as "complect" |
| 14:22 | mdeboard | j/k j/k |
| 14:22 | TimMc | lulz |
| 14:22 | ibdknox | datomic isn't a very good name if that's what it is :/ |
| 14:22 | ibdknox | lol |
| 14:22 | zmaril | It's pronounced with a silent d |
| 14:32 | benares_98 | data atomic? |
| 14:32 | ibdknox | still a bad name :p |
| 14:33 | mdeboard | Extremely atomic and incredibly atomic? |
| 14:33 | mdeboard | I got nothing, also, how did this conversation get started? |
| 14:33 | mdeboard | where did he see datomic |
| 14:34 | joly | there's apparently a "Coming soon" page at http://datomic.com |
| 14:34 | mdeboard | oh nm |
| 14:34 | ibdknox | most likely some sort of distributed proessing thing |
| 14:34 | dnolen | stuartsierra: so is there anything that triggers cutting CLJS releases? :) |
| 14:34 | stuartsierra | dnolen: ME triggers a CLJS release |
| 14:34 | dnolen | stuartsierra: hah |
| 14:34 | mdeboard | http://www.networksolutions.com/whois-search/datomic.com I'm a creeper |
| 14:35 | ibdknox | mdeboard: already been there ;) |
| 14:35 | TimMc | Are we playing Alternate Reality Games now? |
| 14:36 | ibdknox | well that rules out some product teaching clojure stuff :) |
| 14:37 | redinger | ibdknox: That's all you! |
| 14:37 | redinger | :) |
| 14:37 | ibdknox | haha |
| 14:37 | ibdknox | redinger: need more time :) |
| 14:38 | ibdknox | I'm excited to see what it is. My money's on some form of distributed processing thing.. a more general purpose wolframalpha like service or something |
| 14:40 | TimMc | Or integration with external transactions? |
| 14:41 | TimMc | or some sort of functional database system (like Accumulo) |
| 14:41 | ibdknox | I was thinking it likely related to avout somehow |
| 14:42 | pipeline | just by the by |
| 14:42 | pipeline | the newest mathematica has some WA integration |
| 14:42 | ibdknox | the new wolframalpha stuff is really cool |
| 14:43 | ibdknox | uploading a sound file and getting an analysis of it and all |
| 14:43 | mdeboard | neat |
| 14:45 | ibdknox | dnolen: what's this deps.cljs thing? |
| 14:45 | dnolen | ibdknox: I don't know anything about that. To be honest I'm less familiar with the tooling aspects of the CLJS compiler |
| 14:47 | y3di | wow yur post is not longer on the front page ibdknox |
| 14:47 | ibdknox | y3di: voting ringed about an hour ago :( |
| 14:47 | ibdknox | it would've been up there for a while based on its velocity |
| 14:48 | y3di | what does it mean that voting ringed |
| 14:48 | mdeboard | ^ |
| 14:49 | ibdknox | HN has some anti-cheating detection that determines if someone is trying to game the system. Unfortunately its pretty simplistic and will often mark things incorrectly. I write about clojure and so clojure people vote on it consistently |
| 14:50 | ibdknox | causing it to get flagged because the same people are voting on it |
| 14:50 | mdeboard | ibdknox: You need to get some node.js and mongodb articles in |
| 14:50 | ibdknox | lol |
| 14:50 | mdeboard | everybody'll upvote that shit |
| 14:50 | ibdknox | especially since node is my favorite thing in the world ;) |
| 14:51 | ibdknox | though I guess I do keep competing in the nodeknockout... |
| 14:51 | antares_ | ibdknox: hi. Is this a good place for korma and noir questions? |
| 14:51 | ibdknox | #noir is probably better |
| 14:52 | amalloy | ibdknox: i did my part, by not getting to the article in time to vote for it |
| 14:52 | ibdknox | haha |
| 14:53 | dnolen | ibdknox: sadly you've been superseded by more important news - Tower.js, Rails in JS |
| 14:53 | ibdknox | dnolen: that pained me |
| 14:53 | emezeske | I flagged it with all 7 of my accounts, to confuse the anti-cheat detection |
| 14:53 | ibdknox | of all the things |
| 14:53 | ibdknox | haha coffee makes that code look so ugly too |
| 14:54 | ibdknox | emezeske: lol |
| 14:54 | emezeske | ^_^ |
| 15:03 | jcrossley3 | wow, the bar for "database-agnostic" seems so much lower now: http://towerjs.org |
| 15:04 | mdeboard | How do you lower the bar on binary fact? it's either agnostic or not |
| 15:05 | TimMc | nah |
| 15:05 | TimMc | Stuff always leaks through the "abstraction barrier". |
| 15:05 | mdeboard | I reckon |
| 15:05 | TimMc | "Oops, MySQL doesn't support milli-precision timestamps." |
| 15:06 | mdeboard | or full UTF-8 support |
| 15:06 | TimMc | "Huh, why does this same query run really fast on MySQL but really slow on SQLite?" |
| 15:06 | TimMc | etc. |
| 15:07 | ibdknox | there is no such thing as database-agnostic |
| 15:07 | ibdknox | lol |
| 15:07 | hiredman | database oblivious |
| 15:07 | mdeboard | lol |
| 15:09 | ibdknox | well that sucks. live-cljs counts as a JS project |
| 15:10 | jcrossley3 | hiredman: :) |
| 15:10 | ibdknox | I wish there was a way to explicitly set that in github |
| 15:11 | clj_newb | Hi, to generate and parse small xml (less that 1000 chars) will clojure.xml do? |
| 15:12 | clj_newb | to generate using emit eg |
| 15:13 | TimMc | ibdknox: You could be sneaky and move all the JS to ./vendor |
| 15:14 | TimMc | ibdknox: They really should be scaling their counts, though. |
| 15:14 | ibdknox | I guess it's somewhat of a hard thing to be deterministic about |
| 15:18 | `fogus | ibdknox: Marginalia is a JS project too. :-) |
| 15:18 | ibdknox | `fogus: haha, is it really mostly JS? |
| 15:18 | TimMc | `fogus: That's ridiculous. Syntax-highlighter? |
| 15:19 | amalloy | haha, scaling their counts? you mean like, "well ten lines of lisp probably took more thinking than a thousand lines of JS"? |
| 15:19 | ibdknox | amalloy: hahaha |
| 15:19 | ibdknox | that would be awesome |
| 15:19 | ibdknox | by that metric, I've written a lot of software :D |
| 15:19 | TimMc | amalloy: s/took more thinking than/expresses as much as/, yes |
| 15:20 | `fogus | TimMc: Yep |
| 15:20 | ibdknox | ah it's got jquery and all in it too |
| 15:20 | TimMc | `fogus: In that case you really *do* have a reason to move the highlighter JS to ./vendor, where it won't be counted. |
| 15:20 | `fogus | I will do that one day yes |
| 15:20 | `fogus | Ptaches welcomed. :p |
| 15:20 | `fogus | Patches even . |
| 15:21 | ibdknox | `fogus: I know you were a big fan of Bret Victor video, did you play with the live-cljs thing yet? :) |
| 15:21 | Raynes | If I want to avoid the whole "ur project is js lololol cuz jquery" stuff, I write a script to pull down my js deps. |
| 15:21 | Raynes | Also, what the hell. Why is it acceptable to download and put js libraries in repos? |
| 15:22 | Raynes | Every other decent language has some sort of dependency management solution. |
| 15:22 | `fogus | ibdknox: I have not looked at it deeply yet. I watched the video however and am till stunned. Fantastic work man! |
| 15:23 | ibdknox | :) |
| 15:24 | `fogus | Raynes: It's retro dontchaknow? |
| 15:24 | Raynes | :p |
| 15:24 | `fogus | My source control is a rotating pile of floppies... not that you have any idea what those are ;-) |
| 15:25 | ibdknox | `fogus: I actually use tape |
| 15:26 | Raynes | `fogus: I actually do. :> |
| 15:26 | Raynes | I had a computer with one of those drives. |
| 15:26 | ibdknox | the actually floppy ones? |
| 15:26 | Raynes | Yes. |
| 15:27 | ibdknox | we used to have a commador 64 |
| 15:27 | ibdknox | played the original ultima on that thing haha |
| 15:27 | Bronsa | my pc still has a working floppy reader |
| 15:30 | ibdknox | hm, I need to come up with some good summer of code projects |
| 15:39 | dnolen | ibdknox: please do! |
| 15:40 | mdeboard | ibdknox: 1). delicious clone, in clojure |
| 15:40 | ibdknox | :p |
| 15:40 | mdeboard | 2). pyclojure |
| 15:40 | Raynes | I don't understand book mark sync sites. |
| 15:40 | ibdknox | it seems like something related to what I just did would be really fun for someone |
| 15:40 | Raynes | I don't even bookmark things these days -- I send them to evernote. |
| 15:40 | mdeboard | 3). clojurepy |
| 15:40 | Raynes | That's basically all I use evernote for. |
| 15:41 | Raynes | I'd support clojurepy. |
| 15:41 | Raynes | As a matter of fact, I'd down right endorse it and contribute. |
| 15:41 | ibdknox | clojurepy? Clojure that compiles to Python? |
| 15:41 | mdeboard | ibdknox: Also yes a multiplayer game where you manipulate code to "move your guy" (or whatever mechanic) would be amazing |
| 15:41 | mdeboard | ibdknox: Sure |
| 15:41 | ibdknox | cool |
| 15:41 | mdeboard | (sarcasm) |
| 15:41 | ibdknox | eh, lots of people are interested in other targets now |
| 15:41 | clj_newb | Hi, (str "blah\ "\"/>") outputs \"/> unsupported character, is the \" not a valid scape character |
| 15:42 | amalloy | you have a space after the first \ |
| 15:42 | clj_newb | sorry I meant |
| 15:43 | clj_newb | Hi, (str "blah" string_var "\"/>") outputs \"/> unsupported character, is the \" not a valid scape character |
| 15:43 | Raynes | I want Clojure on Parrot. |
| 15:43 | amalloy | no it doesn't. that code cannot produce that error message |
| 15:44 | clj_newb | ok, I will review my string_var then |
| 15:44 | amalloy | &(let [string_var "test"] (str "blah" string_var "\"/>")) |
| 15:44 | lazybot | ⇒ "blahtest\"/>" |
| 15:44 | clj_newb | thank you amalloy, the problem must be somewhere else |
| 15:48 | phillc | hey guys. i have a service which fires off around 3 tasks serially. ie download an image from a url, crop it, identify EXIF data. i can do each and every task easily with java |
| 15:48 | phillc | i have this service implemented in nodejs and having nice experience with it |
| 15:49 | phillc | for academic purposes i'd like to do the same thing in clojure.. so if in nodejs i do these things async, what would be the answer in clojure? |
| 15:50 | clj_newb | &(let [string_var "var"] (str "a\"" string_var "\"/>")) |
| 15:50 | lazybot | ⇒ "a\"var\"/>" |
| 16:08 | TimMc | phillc: Is async important? Just spawn more threads. |
| 16:09 | TimMc | If you're worried about heavy, slow traffic -- Clojure has closures too. :-) |
| 16:09 | phillc | well its important in a sense, i'd just like to learn what would be the common idiom with clojure |
| 16:12 | stuartsierra | phillc: futures |
| 16:20 | technomancy | nathanmarz: how's lein-scalac working out for you? |
| 16:24 | cemerick | ibdknox|away: well done with noir; you have won the HN quorum handily :-) |
| 16:25 | Raynes | cemerick: I've totally got commits in there too. My ego is hungry -- feed it. |
| 16:27 | cemerick | noir would be *nowhere* without you, Raynes |
| 16:27 | Raynes | It's true. |
| 16:29 | ibdknox | cemerick: hm? :) |
| 16:29 | phillc | technomancy, is lein-scalac good replacement for sbt? |
| 16:30 | technomancy | phillc: depends on your needs =) |
| 16:30 | cemerick | ibdknox: http://news.ycombinator.com/item?id=3640241 |
| 16:30 | phillc | technomancy, i need my sanity back. |
| 16:30 | technomancy | it doesn't do any incremental compilation, so I understand that would rule it out for some use cases since the scalac compiler is very slow |
| 16:30 | ibdknox | cemerick: haha I see |
| 16:30 | phillc | screw incremental compilation.. i need something maintainble, simple. |
| 16:30 | cemerick | it was 5/5 for noir, so I had to add a fair-and-balanced comment. :-P |
| 16:30 | technomancy | phillc: give it a try then =) |
| 16:31 | phillc | technomancy, definitly will! |
| 16:31 | technomancy | I should note that I haven't actually used it for anything but the 5-line example file checked into the tests |
| 16:32 | ibdknox | cemerick: all paid advertising. ;) |
| 16:34 | simard | what was the website with clojure problems to solve ? |
| 16:34 | phillc | cemerick, loving the TOC on your new book. makes tons of sense for experienced developers |
| 16:35 | cemerick | phillc: glad it looks good to you. Yup, was aiming for the intersection of experienced devs + clojure noobs. |
| 16:36 | cemerick | i.e. no bullshit, but accessible. |
| 16:36 | aperiodic | simard: 4clojure |
| 16:37 | phillc | looks like it, even code build and organization is given attention, which is one of the things i look at first in new languages (often doesn't get that attention) |
| 16:37 | phillc | rough cuts is complete? should i take that or wait for april? |
| 16:38 | ibdknox | cemerick: added my own thoughts there :) |
| 16:38 | accel | what is mini-kanren, and why is it awesome enough for core.logic to implement it (from the sounds of it, mini-kanren sounds like a toy, not a full fledged standard) |
| 16:38 | Raynes | amalloy: You need to register thewebsitewiththeclojureproblems.com and point it at 4clojure. |
| 16:39 | accel | I have a recommendation for 4clojure. The input is a DNA strand. The output is the protein it induces + folds into. |
| 16:41 | ibdknox | hah |
| 16:41 | ibdknox | apparently my implementation is more general than Bret's was |
| 16:41 | clj_newb | Hi, there is something I cannot work out what is wrong with this code http://pastebin.com/aQs2GnAf it works in repl but not when compiling nor running with lein |
| 16:42 | cemerick | phillc: Yeah, if you buy now, you'll be reading our final draft. Only differences between it and the published version will be super-minor edits and nicer illustrations. |
| 16:42 | clj_newb | any idea? |
| 16:42 | phillc | cemerick, great, thanks |
| 16:43 | TimMc | accel: Done, and I golfed it down to 10954823598 characters! |
| 16:44 | ibdknox | lol |
| 16:47 | raek | clj_newb: you are missing a double quote |
| 16:47 | raek | it shouldn't work in the repl |
| 16:48 | raek | ,(let [cookie "abc"] (str "<logout cookie=\" cookie "\"/>")) |
| 16:48 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unsupported character: \"/>> |
| 16:48 | raek | ,(let [cookie "abc"] (str "<logout cookie=\"" cookie "\"/>")) |
| 16:48 | clojurebot | "<logout cookie=\"abc\"/>" |
| 16:49 | raek | clj_newb: replace cookie=\" with cookie=\"" |
| 16:49 | raek | clj_newb: an editor with syntax highlighting will help you catch errors like these |
| 16:54 | gtrak`` | datomic, pods possibly? |
| 16:55 | ibdknox | gtrak``: it's a product |
| 16:55 | mdeboard | Does clojure.xml/emit-element require the value of :content keyword to only be another struct? or am I doing it wrong or what? |
| 16:55 | gtrak`` | ah |
| 16:55 | TimMc | datomic: A data structure for multi-thread concurrency in JS. |
| 16:55 | ibdknox | lol |
| 16:55 | TimMc | </troll> |
| 16:55 | mdeboard | &(struct element :field {:name "city"} "Indianapolis") |
| 16:55 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: element in this context |
| 16:56 | mdeboard | &(struct clojure.xml/element :field {:name "city"} "Indianapolis") |
| 16:56 | lazybot | ⇒ {:tag :field, :attrs {:name "city"}, :content "Indianapolis"} |
| 16:56 | cemerick | TimMc: should have left off the end-tag to see what chaos ensued. |
| 16:56 | mdeboard | &(clojure.xml/emit-element (struct clojure.xml/element :field {:name "city"} "Indianapolis")) |
| 16:56 | lazybot | java.lang.NullPointerException |
| 16:56 | mdeboard | Why |
| 16:56 | mdeboard | Does that happen |
| 16:56 | ibdknox | cemerick: TimMc: I had my pitchfork ready. |
| 16:57 | mdeboard | Not clear where in https://github.com/clojure/clojure/blob/master/src/clj/clojure/xml.clj#L95 that error would be generated |
| 16:57 | Raynes | $max |
| 16:57 | lazybot | The most users ever in #clojure is 376 |
| 16:57 | Raynes | He lies. |
| 16:58 | cemerick | That's wrong. |
| 16:58 | cemerick | Raynes: bash that up to 401, unless you know it's been higher. |
| 16:58 | Raynes | amalloy: ^ You know, that plugin has been broken for at least 8 months. |
| 16:58 | cemerick | oh, 404 now :-P |
| 16:58 | TimMc | ~max |
| 16:58 | clojurebot | excusez-moi |
| 16:58 | mdeboard | &(doc doseq) |
| 16:58 | lazybot | ⇒ "Macro ([seq-exprs & body]); Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by \"for\". Does not retain the head of the sequence. Returns nil." |
| 16:59 | TimMc | clojurebot: max is <reply>Most users ever in #clojure: 404 |
| 16:59 | clojurebot | Alles klar |
| 16:59 | TimMc | ~max |
| 16:59 | mdeboard | &(clojure.xml/emit-element (struct clojure.xml/element :field {:name "city"} '("Indianapolis"))) |
| 16:59 | clojurebot | Most users ever in #clojure: 404 |
| 16:59 | lazybot | ⇒ <field name='city'> Indianapolis </field> nil |
| 16:59 | mdeboard | ff |
| 16:59 | TimMc | There, now it is correct and yet nicely ambiguous. |
| 16:59 | mdeboard | 16:57 <mdeboard> &(clojure.xml/emit-element (struct clojure.xml/element :field {:name "city"} '(20))) |
| 16:59 | mdeboard | &(clojure.xml/emit-element (struct clojure.xml/element :field {:name "city"} '(20))) |
| 16:59 | lazybot | java.lang.NullPointerException |
| 16:59 | mdeboard | :-\ |
| 17:00 | TimMc | mdeboard: Funky. |
| 17:00 | Raynes | cemerick: It's supposed to keep track of the number of users to measure the highest. Unfortunately, it's teh broke. |
| 17:00 | cemerick | indeed. |
| 17:00 | amalloy | isn't struct supposed to be making a map? you gave it one key/value pair, and then a value floating off by itself |
| 17:00 | wiseen | is there a equivalent macro in core.match to this : https://gist.github.com/1927369 |
| 17:00 | mdeboard | &(emit-element 20) |
| 17:00 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: emit-element in this context |
| 17:01 | mdeboard | amalloy: This is of course just a small snippet of a large struct map mapping my Solr schema |
| 17:01 | amalloy | but it's not a map |
| 17:01 | mdeboard | Dunno, I'm trying to fllow the example here http://clojuredocs.org/clojure_core/clojure.xml/element if I'm doing it wrong I'm all ears :P |
| 17:02 | mdeboard | Trying to figure out how it works, is all. |
| 17:04 | amalloy | well structs are...dreadful and old. so a lot of people (eg, me) don't really know how to use them |
| 17:05 | ibdknox | I didn't even know clojure had structs.. |
| 17:06 | amalloy | they're like records, but from the jurassic |
| 17:07 | clj_newb | is there any other option to make mdeboard example with no struct? wondering |
| 17:07 | amalloy | well, don't use clojure.xml |
| 17:08 | amalloy | use org.clojure/data.xml instead, which thank god has an official release now |
| 17:09 | clj_newb | didn't know about it, thank you! |
| 17:19 | bguthrie | Hi all. I'm trying to use Clojure to execute a shell process, and as part of that I'd like to hook up the input stream of the process to something so I can read from it asynchronously periodically. Any tips? |
| 17:20 | bguthrie | I can't use the default Clojure shell fn because it's synchronous, which is nice but doesn't help me much. |
| 17:21 | emezeske | bguthrie: Most likely, you'll want to look at the "sh" source, and use that as a basis |
| 17:21 | emezeske | bguthrie: With a little java-interop to get the out and err streams where you want them |
| 17:22 | ibdknox | bguthrie: https://github.com/raynes/conch |
| 17:22 | emezeske | Or, somebody could suggest a way better solution |
| 17:23 | ibdknox | :) |
| 17:23 | bguthrie | Haha |
| 17:43 | clj_newb | the leiningen dependency in the web does not work for me, which is it? |
| 17:44 | clj_newb | done |
| 17:50 | technomancy | clj_newb: parse error |
| 17:59 | cemerick | amalloy: that gzip middleware should optionally memoize gzipped static resources… |
| 18:01 | ibdknox | which gzip middleware? |
| 18:01 | amalloy | yuck. make another middleware for that if you desperately need to avoid disk accesses. but really just using Not Modified responses liberally should solve most of the problem |
| 18:01 | Raynes | ibdknox: You are like my PR guy or something. |
| 18:01 | ibdknox | Raynes: I try. |
| 18:01 | Raynes | It's like you just sit there and recommend my projects. |
| 18:04 | cemerick | ibdknox: https://github.com/amalloy/ring-gzip-middleware |
| 18:04 | aperiodic | oh god, the nickcolors are slightly different now |
| 18:04 | aperiodic | i'm not gonna recognize *anyone* |
| 18:06 | cemerick | amalloy: sure, ok. If you're loading static resources from the classpath though, looking for a resource isn't just a stat. |
| 18:11 | emezeske | aperiodic: yeah, that's the worst! |
| 18:15 | mdeboard | amalloy: Thanks re: data.xml |
| 18:15 | amalloy | that's true enough. but if you skip the step of looking around and just serve up a memoized tarball, you can't really handle it if the resources change out from under you |
| 18:17 | mdeboard | amalloy: What's the official release # though? I see a 'data.xml-0.0.3' tag in the github repo |
| 18:17 | amalloy | yep |
| 18:21 | gtrak`` | doesn't the mmap'd file and disk cache take care of it for you? |
| 18:22 | cemerick | amalloy: when would static resources on the classpath change in production? |
| 18:22 | amalloy | *shrug* serving up a log file as a web resource? just an example off the top of my head |
| 18:23 | hiredman | *static* |
| 18:23 | cemerick | gtrak``: I'm over-optimizing. :-P |
| 18:23 | cemerick | right, you'd want to be careful about applying the memoizing middleware around the right part of your routes. |
| 18:23 | gtrak`` | does mmap-ing not work within a jar? |
| 18:24 | cemerick | who knows |
| 18:24 | cemerick | or, I should say, outside of an implementation detail, no. |
| 18:25 | stuartsierra | mdeboard: http://search.maven.org/#search%7Cga%7C1%7Cclojure%20data.xml |
| 18:25 | mdeboard | stuartsierra: Thanks sir |
| 18:25 | gtrak`` | cemerick: let's write an OS in clojure then :-) |
| 18:29 | mdeboard | christ i think i own every book on clojure and still suck |
| 18:29 | mdeboard | Clearly all the books are bad |
| 18:30 | gtrak`` | I've been feeling like I need a good lisp book to not suck as much, maybe "On Lisp" |
| 18:31 | amalloy | that book. there are some sentences i wish i could just cuddle up with next to the fire |
| 18:32 | mdeboard | Joy of Clojure and Practical CLojure are both good, I'm just dumb |
| 18:32 | gtrak`` | what's missing for you to be good? |
| 18:33 | mdeboard | experience & hours |
| 18:33 | gtrak`` | err, i mean in terms of clojure? |
| 18:33 | mdeboard | only 9,990 left |
| 18:33 | mdeboard | time |
| 18:33 | gtrak`` | I find I reimplement a lot of things that exist |
| 18:34 | mdeboard | I like how almost the entire comment section of the HN post for cemerick's book is about which clojure web library is best |
| 18:35 | mdeboard | ok, almost half. |
| 18:37 | brehaut | half of all programming is probably web programming, so not a huge surprise ;) |
| 18:39 | gtrak`` | brehaut: I got my site on hiccup, it's nice, but stringtemplate is soooo much faster |
| 18:40 | gtrak`` | not to-the-eye noticeable, but benchmark-wise :-). If I memoize static pages it's better than before. |
| 18:40 | brehaut | gtrak``: interesting. i'm curious how enlive compares |
| 18:40 | brehaut | gtrak``: i run my site in an embeded jetty behind an nginx with huge proxy caching ;) |
| 18:41 | brehaut | it doesnt really matter how slow the rendering is either, but i'd be curious about comparisons. |
| 18:41 | gtrak`` | yea, I'm just messing around, nothing so serious, but I was thinking of writing a macro do make them at compile-time if they're truly static |
| 18:41 | brehaut | gtrak``: you might find tinsel possibly interesting? |
| 18:41 | dsantiago | brehaut: I was just gonna say… :) |
| 18:42 | brehaut | https://github.com/davidsantiago/tinsel |
| 18:42 | gtrak`` | oh :-) perfect |
| 18:42 | brehaut | indeed :) |
| 18:43 | gtrak`` | the other thing is, clojure's reader sucks for pasted snippets, I might have to drop back to stringtemplate for that |
| 18:43 | gtrak`` | not fully, but just to have a snippets map |
| 18:43 | brehaut | i dont understand what you mean sorry |
| 18:44 | gtrak`` | like, this is a pain to write in a .clj, I have to escape all the quotes: https://gist.github.com/1927948 |
| 18:44 | gtrak`` | and getting hiccup to generate it also looked painful |
| 18:44 | brehaut | dsantiago: i didnt notice that you had benchmarks in the tinsel docs, thats great |
| 18:45 | dsantiago | brehaut: Yeah, the linked benchmarks actually include Enlive as well, but I haven't updated those benchmarks in a long time. |
| 18:46 | brehaut | dsantiago: how did enlive compare? |
| 18:46 | dsantiago | brehaut: Last time I ran it, not that well. |
| 18:46 | gtrak`` | dsantiago: tinsel looks much more well-conceived than what I was contemplating |
| 18:47 | dsantiago | gtrak``: Thanks. It's been pretty solid for me, but I don't know of anyone else using it. |
| 18:47 | brehaut | dsantiago: interesting, thanks |
| 18:49 | gtrak`` | I did some profiling with hiccup, and a lot of the time was spent in MultiFn, do you know what that's about? |
| 18:49 | gtrak`` | it claims to do some compilation, so maybe it wasn't hiccup causing the slowdown but something else |
| 18:50 | dsantiago | It does do compilation, but it can't always apply those optimizations. |
| 18:50 | dsantiago | If it can't figure out statically what something is going to be, it has to insert code to run it and convert it to a string at runtime. |
| 18:50 | gtrak`` | i did have one doseq in there, was it string concatenation maybe? |
| 18:52 | dsantiago | brehaut: So I just re-ran it, and keeping in mind this is on clojure 1.1 still and I didn't update the Enlive version from 1.0.0-SNAPSHOT, what tinsel does in about 2 msecs, Enlive does in about 50. |
| 18:53 | brehaut | dsantiago: huh. ouch |
| 18:53 | dsantiago | Or more, actually. There's several tests. |
| 18:54 | brehaut | dsantiago: how old is tinsel‽ 1.1 was quite a while ago |
| 18:55 | dsantiago | brehaut: It's about a year old. |
| 18:56 | dsantiago | I haven't updated it only because, well, it works for me, I'm not sure what else to add, and I haven't had any bugs in my own work or reported to me. |
| 18:56 | dsantiago | Haven't moved my stuff to 1.3 yet though. |
| 18:58 | dsantiago | Clojure 1.3 seems to work just by changing the dep in project.clj. |
| 18:58 | dsantiago | Assuming you don't try to rebind the option vars. |
| 18:59 | dsantiago | Better fix that. |
| 19:00 | tmciver | dsantiago: tinsel looks interesting. It looks similar to enlive, yes? |
| 19:00 | dsantiago | tmciver: Yep. It's like Enlive but works on HTML or Hiccup input, and it doesn't have the vector-based CSS-like syntax. |
| 19:00 | dsantiago | Lets you write your own ways of selecting and modifying the nodes of the HTML tree instead. |
| 19:01 | tmciver | I've been looking at enlive recently to do some html->xml transformations; is that something tinsel could do as well? |
| 19:02 | dsantiago | tmciver: I'm not sure what you mean by an html->xml transformation. |
| 19:02 | tmciver | dsantiago: like XSLT |
| 19:03 | dsantiago | tmciver: You want to read in HTML and then print out equivalent XML? Or you want to do transformations on it? |
| 19:03 | tmciver | read in some html, pull out specific content, use that to create some xml |
| 19:03 | tmciver | dsantiago: transformations. |
| 19:04 | mdeboard | I can confirm that clojure.data.xml emits xml |
| 19:05 | tmciver | hiccup could also be used directly to produce arbitrary xml. |
| 19:05 | dsantiago | tmciver: I'm not sure if tinsel is a good fit for that. Tinsel does everything it can at compile time, it's optimized for fast rendering. If these input files are going to be different every time, you wont' get any advantage. |
| 19:05 | dsantiago | Probably a disadvantage, in fact. |
| 19:05 | tmciver | dsantiago: Yeah, that's why I was asking. A quick look at the readme seemed to indicate that. |
| 19:05 | tmciver | dsantiago: still, tinsel looks very cool. |
| 19:06 | dsantiago | tmciver: Thanks! |
| 19:06 | mdeboard | Oh, didn't realize people were talking about XML |
| 19:14 | cemerick | There's been so much clojure on HN today, the trough of disillusionment must be near. |
| 19:14 | Scriptor | trough of disillusionment? |
| 19:15 | ibdknox | cemerick: in general there's been a lot lately |
| 19:15 | cemerick | Scriptor: https://en.wikipedia.org/wiki/Hype_cycle |
| 19:15 | cemerick | ibdknox: yeah, and watching #clojure on twitter has been interesting |
| 19:16 | Scriptor | nah, I think it's just a minor fluctuation |
| 19:16 | cemerick | "all the cool kidz are using clojure, I need to get on that", etc. |
| 19:16 | Scriptor | node's trough is coming soon |
| 19:16 | technomancy | if it hasn't already hit |
| 19:17 | cemerick | technomancy: stop with the wishful thinking |
| 19:17 | Scriptor | as a nyc resident, I can assure you it has not |
| 19:18 | ibdknox | people are realizing slowly that they're creating maintenance disasters |
| 19:19 | cemerick | if you assume node is the new php, then it's got a *lot* of headroom |
| 19:19 | technomancy | what we need to do is figure a way to channel the large upcoming node-rescue-project consulting market into clojurescript. |
| 19:19 | ibdknox | ooo |
| 19:19 | ibdknox | consulting money sounds good |
| 19:19 | ibdknox | ;) |
| 19:19 | technomancy | ibdknox: all I ask is a 5% commission for coming up with the idea |
| 19:19 | ibdknox | cemerick: I think it's a little different of a situation |
| 19:20 | hiredman | uh, eitherway you are still using js |
| 19:20 | Scriptor | it's closer to what rails was like |
| 19:20 | hiredman | I think you'd do better replacing node with anything on the jvm |
| 19:20 | Scriptor | someone should make rhinode |
| 19:20 | technomancy | hiredman: maybe a gradual transition with rhino or something |
| 19:20 | y3di | wow ibdknox: that ringing shit is mad whack.. your submission could have gotten so much visibility |
| 19:20 | hiredman | I bet even groovy would out perform it |
| 19:21 | ibdknox | y3di: yeah, based on its reception on Reddit, probably would've been in the 20k range |
| 19:23 | ibdknox | I'm mostly sad that it didn't seem to generate any interesting discussion |
| 19:23 | ibdknox | though I was surprised to find out that my implementation is probably more robust than his demo's. I had assumed he built something similar |
| 19:24 | ibdknox | I kinda hoped he would've said something too, but oh well :) |
| 19:25 | cemerick | ibdknox: I'm crudely assuming similar skill levels of new entrants. |
| 19:26 | ibdknox | cemerick: I think the barrier is much higher for node than it ever was for PHP |
| 19:26 | cemerick | javascript is the minimum entrance requirement for software development; just imagine all the HTML/js/css jockeys now building server-side |
| 19:26 | technomancy | PHP had every shared host in the world supporting it |
| 19:26 | ibdknox | installing node, until recently, was not easy |
| 19:27 | ibdknox | doing templating is *far* simpler in php |
| 19:27 | ibdknox | running php was stupid easy with things like mamp and xamp |
| 19:27 | cemerick | I'll be happy to be totally wrong. |
| 19:27 | ibdknox | I just don't think it'll be *as* bad lol |
| 19:27 | Scriptor | it's also much easier to grasp in your head, every time your page is requested the script runs and whatever you echo() is what you see |
| 19:27 | Scriptor | none of that callback nonsense |
| 19:28 | ibdknox | yeah, PHP is about as simple as it gets for websites |
| 19:28 | Scriptor | I don't think the people behind node are beginner programmers, for the most part |
| 19:28 | ibdknox | it's also a maintenance disaster, but at least it's easy ;) |
| 19:28 | ibdknox | I can't say much |
| 19:28 | ibdknox | I built a lot of php programs |
| 19:30 | ibdknox | I'd like to think we've learned a lot since then |
| 19:30 | Scriptor | heh, I just attended a talk by a tumblr guy |
| 19:30 | Scriptor | from what he said, at least they haven't |
| 19:33 | callen | Scriptor: I think the people behind Node went PHP => Rails => Node.js and never learned about evented programming until they discovered Node. |
| 19:34 | callen | Scriptor: further, I'm not sure any of them, save for Dahl himself, are aware Erlang exists or what CPS is. |
| 19:34 | brehaut | ibdknox: given how much HTML templating is still using greenspun string bashers, id say we havent learnt enough since then |
| 19:34 | ibdknox | brehaut: haha fair enough |
| 19:34 | muhoo | callen: this |
| 19:35 | callen | brehaut: sometimes a separation of concerns and lack of power is desirable. Can't teach the designers Clojure. |
| 19:35 | ibdknox | I'm not entirely sure that's true |
| 19:35 | callen | They just need to know where the data is going to go and build up a framework around that. |
| 19:35 | brehaut | this again? geez |
| 19:35 | Scriptor | callen: hah, exactly, I wonder how much the lack of an idea of what CPS is is muddling the whole issue with Coffeescript and other efforts trying to find ways to "straighten out" async style code |
| 19:35 | callen | you're the one that bashed string-injection templating :) |
| 19:35 | ibdknox | it's pretty brute force |
| 19:36 | ibdknox | I have a hard time believing that's the best solution to the problem |
| 19:36 | callen | the best solution is to have a team of ubermensch who can both code and design |
| 19:36 | callen | then your approach is perfectly acceptable |
| 19:36 | callen | meanwhile back on planet Earth, we have designers who cannot code and mechanisms for enabling them to work smoothly with the engineers is desirable. |
| 19:36 | ibdknox | I don't think I've seen a great approach yet to be honest |
| 19:36 | callen | the easiest way to do that, that I'm aware, is Rails/Django style separation of concerns |
| 19:36 | muhoo | ibdknox: is there a link to your cljs implementation of that talk? |
| 19:37 | callen | not necessarily MVC, but templates that are independent of logic. |
| 19:37 | ibdknox | muhoo: hm? like on github? https://github.com/ibdknox/live-cljs |
| 19:37 | ibdknox | muhoo: the full text is on http://www.chris-granger.com |
| 19:38 | ibdknox | the easiest way that exists today, sure |
| 19:38 | ibdknox | rather, that is mainstream and exists today |
| 19:38 | ibdknox | moreover, why not have the designers hand you PSDs if it's that big of a deal? |
| 19:39 | callen | ibdknox: miserable way to work, some of them are "web designers" and their job is to make CSS that is cross-browser compatible. |
| 19:39 | ibdknox | I did it for a couple years, it was a fantastic way to work |
| 19:39 | callen | ibdknox: there are varying levels of expertise in said designers, some are only good for PSDs, some can do some basic HTML and CSS, some are CSS wizards, some can even slap jQuery around a bit. |
| 19:39 | ibdknox | never had to fix any dumb html :) |
| 19:39 | muhoo | ibdknox: yes, thanks |
| 19:39 | callen | ibdknox: I'm personally incapable of producing CSS blank-slate from a design. |
| 19:40 | callen | ibdknox: if you can tell me how to develop such skills, I'd be grateful. |
| 19:40 | brehaut | ibdknox: nah, you only have to fix your own dumb html ;) |
| 19:40 | ibdknox | callen: take a picture of a site and recreate it :) It's simply a matter of doing |
| 19:40 | ibdknox | but no one said it had to be you. |
| 19:40 | ibdknox | I can't program a rocket |
| 19:40 | ibdknox | probably never will |
| 19:41 | mdeboard | YOu wouldn't download a rocket, would you |
| 19:41 | devn | my clojure completion is not working in my source buffer, but it works in my slime buffer, any ideas? |
| 19:41 | ibdknox | I think the best setup I had was when I was backend guy, I had a front end guy and we had designers feeding us psds |
| 19:41 | ibdknox | we built shit so quickly |
| 19:42 | ibdknox | brehaut: me? dumb html? pfft... never :p |
| 19:42 | brehaut | lol |
| 19:42 | ibdknox | speaking of.. I need to fix my damn horizontal scrollbar |
| 19:42 | ibdknox | forgot about that |
| 19:44 | devn | anyone have any ideas for discovering what is/isnt triggering when I hit tab or M-tab? |
| 19:45 | emezeske | I'm of the opinion that if someone "can't code", they shouldn't be writing HTML or CSS, as those are both coding |
| 19:45 | ibdknox | emezeske: I've been of that opinion as well |
| 19:46 | harrison | that sounds right |
| 19:46 | harrison | i haven't done those two things |
| 19:47 | brehaut | and even if they are able to produce HTML, i dont really want them worrying about data models (or having to translate my datamodel into some half arsed intermediate form just for the template to consume) |
| 19:47 | harrison | but writing web pages is coding, however demeaning it may be |
| 19:47 | harrison | compared to raytracing |
| 19:48 | emezeske | To me, it's easy to make a boring task like writing HTML interesting: just always try to be coming up with the most awesome way possible to do it |
| 19:48 | ibdknox | I've built all sorts of stuff, worked at many levels of the stack. I don't generally believe that any branch of software is easier/harder than any other |
| 19:48 | harrison | you sound like a coder |
| 19:49 | harrison | i said "demeaning" not "trivial" |
| 19:49 | emezeske | ibdknox: Same here! It's all as hard as you make it (and you should try to make it hard!) ^_^ |
| 19:49 | emezeske | harrison: Why would it be demeaning? |
| 19:49 | harrison | i wasn't serious |
| 19:50 | harrison | no offense intended |
| 19:50 | emezeske | None taken! I just didn't pick up the /s :P |
| 19:51 | harrison | sarcasterisk needed |
| 19:51 | harrison | actually, i am not proud that i haven't done web coding |
| 19:51 | harrison | not ashamed but not proud |
| 19:51 | harrison | it might come in ahndy |
| 19:51 | harrison | if this internet thing becomes the next popular sensation |
| 19:52 | harrison | andy |
| 19:52 | harrison | handy |
| 19:52 | ibdknox | lol |
| 19:52 | ibdknox | all apps will be webapps ;) |
| 20:00 | devn | sorry to bother, but i cannot figure out why emacs wont do completion in the buffer -- could anyone with working emacs completion in their source buffers jump to a source buffer of clojure and C-h k TAB and let me know what it is bound to? |
| 20:00 | mdeboard | devn: Did you M-x clojure-jack-in / |
| 20:00 | clojurebot | I don't understand. |
| 20:00 | devn | mdeboard: yes |
| 20:00 | amalloy | it's bound to reindent, surely |
| 20:00 | amalloy | use M-/ or C-c TAB, iirc |
| 20:00 | amalloy | or autocomplete-mode |
| 20:02 | devn | amalloy: just install the autocomplete-mode? |
| 20:02 | amalloy | i like it, but it's not for everyone |
| 20:02 | devn | amalloy: M-/ is my hippie expand, C-c TAB didn't work |
| 20:03 | amalloy | C-c TAB is bound to slime-complete-symbol, for me |
| 20:03 | devn | amalloy: is the package all i need, or do I need something else? what about ac-slime? is that what im looking for by any chance? |
| 20:03 | lancepantz | devn: hippy expand? |
| 20:03 | amalloy | *shrug* depends what you want |
| 20:04 | amalloy | i just use autocomplete and it's fine. ac-slime seems like unnecessary complexity but some people like it |
| 20:04 | lancepantz | i use ac-slime |
| 20:04 | devn | lancepantz: http://www.emacswiki.org/emacs/HippieExpand |
| 20:04 | lancepantz | i like it |
| 20:04 | lancepantz | but i don't know the api as good as you amalloy |
| 20:04 | devn | amalloy: you just solved my problem. i just didnt know what the damned function was to complete the symbol at point -- I can bind slime-complete-symbol |
| 20:04 | clojurebot | No entiendo |
| 20:05 | devn | but i think id be interested to try ac-slime |
| 20:05 | mdeboard | lol, love coderwall's clojure achievement logo http://cdn.coderwall.com/assets/badges/narwhal3-3a1b9493a5dc3575952340f0b740c9ea.png |
| 20:05 | lancepantz | mdeboard: i know, why a narwhal? |
| 20:05 | mdeboard | Why NOT a narwhal |
| 20:05 | lancepantz | i hope that doesn't stick |
| 20:06 | ibdknox | I'm confused by that site |
| 20:06 | ibdknox | I signed up to see what it is |
| 20:06 | lancepantz | i think we should get like a dragon or something |
| 20:06 | devn | the expansion of the site is sort of a bummer |
| 20:06 | mdeboard | I mean, why did they make Python's animal a sna-- oh |
| 20:06 | mdeboard | a dragon, lol |
| 20:06 | devn | i like the idea of coder achievements, but not a platform for viewing other people's achievements |
| 20:06 | mdeboard | A flaming penis with missiles and swords |
| 20:06 | brehaut | narwhales are pretty awesome |
| 20:06 | mdeboard | ^ |
| 20:07 | brehaut | unicorns of the sea |
| 20:07 | lancepantz | actually, the perfect logo for clojure would be a spork |
| 20:07 | Scriptor | or werewolf |
| 20:08 | lancepantz | maybe a wizard, or does scheme get that? |
| 20:09 | Raynes | lancepantz: There should be a 'friends with lancepantz' achievement. |
| 20:10 | Raynes | Everybody gets it. |
| 20:10 | lancepantz | ofcourse they would! :D |
| 20:10 | Scriptor | man, lein still won't work with git-bash |
| 20:10 | Scriptor | and cmd's autocomplete is just...astonishingly bad |
| 20:13 | Scriptor | ooh, but clojure-jack-in works now |
| 20:23 | callen | what's the general pattern or idiom for examining intermediate values in the execution of a function? |
| 20:24 | callen | normally in Python I'd be able to leave an ipdb line in there, or set a breakpoint |
| 20:24 | callen | I'm bouncing between a buffer and a repl and I'm not sure how to pause execution and see what's going on. |
| 20:26 | technomancy | callen: in swank? |
| 20:26 | callen | technomancy: da. |
| 20:26 | technomancy | callen: just insert (swank.core/break) |
| 20:26 | callen | right now I'm leaving println's in the code... |
| 20:26 | callen | technomancy: I'll give that a whirl, thanks. |
| 20:27 | callen | technomancy: break just seems to throw an exception, how do I examine values? |
| 20:27 | technomancy | you can also turn on slime's tracing if you want all args/return values in the repl |
| 20:28 | technomancy | callen: while the debugger window is open, the repl should switch to an in-context repl that has access to locals |
| 20:28 | callen | technomancy: the REPL is just waiting on me to resolve the exception. |
| 20:28 | callen | technomancy: how do I turn on slime's tracing? |
| 20:28 | technomancy | are you sure the repl is waiting? |
| 20:28 | technomancy | it might just not be prompting you |
| 20:28 | callen | wait weird, it's not prompting me |
| 20:28 | technomancy | slime tracing is C-c C-t or something like that |
| 20:28 | callen | but it seems to be working. |
| 20:29 | callen | technomancy: well the REPL seems to be working, I'll have to figure out slime traicng. |
| 20:29 | callen | technomancy: thank you. |
| 20:29 | callen | tracing* |
| 20:30 | weavejester | I've never actually tried the slime debugger |
| 20:30 | Scriptor | in sldb, why does expanding an entry in the backtrace always say "no locals"? What's considered a local? |
| 20:31 | technomancy | Scriptor: I think you have to have a call to swank.core/break for it to be able to emit locals |
| 20:31 | technomancy | Scriptor: in general slime has lots of features designed for CL that don't necessarily make sense in Clojure though |
| 20:32 | Scriptor | hmm, makes sense |
| 20:32 | technomancy | weavejester: swank.core/break can get you a long way. I've only needed CDT once, (for a bug in Clojure itself) but I was really glad to have it when I did. |
| 20:33 | weavejester | technomancy: Do you know if there's any emacs plugins for toggling a (swank.core/break) line? |
| 20:33 | Scriptor | can I put (swank.core/break) anywhere inside an expression or does it have to be on its own "line"? |
| 20:33 | Scriptor | would (foo (if a b c) (swank.core/break) other-arg) work? |
| 20:34 | technomancy | Scriptor: I think it evals to nil |
| 20:34 | technomancy | weavejester: pretty sure there is'nt |
| 20:35 | Scriptor | hmm, damn, the problem I have with breakpoints in lisp is that code is often nested like that, rather than line-oriented as in imperative languages |
| 20:39 | callen | technomancy: https://refheap.com/paste/874 this is what my backtraces in Slime look like |
| 20:39 | callen | technomancy: I enabled tracing on my function, no dice. |
| 20:40 | technomancy | tracing prints to the repl buffer, not the debugger |
| 20:40 | callen | sure, so why are my backtraces borked? |
| 20:41 | callen | I need to see the locals :( |
| 20:41 | weavejester | Rich Hickey's latest tweet is enigmatic. |
| 20:41 | callen | weavejester: do you know what he means by Datomic? |
| 20:41 | brehaut | weavejester: i was thinking inscrutable |
| 20:41 | ibdknox | hah |
| 20:41 | Scriptor | mysterious |
| 20:42 | weavejester | callen: Well, he just tweeted "a new kind of database" |
| 20:42 | weavejester | So, my guess would be some kind of persistent distributed data store. |
| 20:42 | ibdknox | I know someone who is likely a direct competitor if I'm correct about what he's making |
| 20:42 | callen | right, wondering if Datomic or something is what he's talking about. |
| 20:42 | Scriptor | would it be atomic in reference to clojure's atoms or just atomicity in db's in general? |
| 20:42 | weavejester | callen: I figure it must be. Datomic sounds like a database. |
| 20:43 | callen | has anyone had a problem in slime with all of their backtrace frames being [No locals]? |
| 20:44 | brehaut | is he going to tweet like this till his clojure/west keynote do you think? |
| 20:44 | Scriptor | callen: yea, I just asked about it |
| 20:44 | Scriptor | apparently you need to use swank.core/break |
| 20:44 | weavejester | brehaut: I guess so :) |
| 20:44 | weavejester | I figure it'll be something like a persistent Erlang, or at least fill in some of the same areas. |
| 20:44 | Scriptor | for a particular frame to show its locals |
| 20:46 | callen | yeah but I'm still getting that. |
| 20:46 | callen | with swank.core/break |
| 20:46 | Scriptor | hmm |
| 20:46 | callen | oh bugger all, it just started working. |
| 20:46 | Scriptor | haha |
| 20:46 | callen | let me repeat what I did. |
| 20:46 | BostX | hi all |
| 20:47 | callen | I think I know what's happening |
| 20:47 | callen | it's trying to evaluate values, and the eval is triggering more exceptions |
| 20:47 | BostX | I have a call of static java method: |
| 20:47 | Scriptor | so, is there any way in clojure to do something like (foo (first-arg) (no-arg-breakpoint) (second-arg)) |
| 20:47 | BostX | ,(. java.net.URLEncoder encode "bar & baz" "UTF-8") |
| 20:47 | clojurebot | "bar+%26+baz" |
| 20:47 | BostX | And I'd like to do: |
| 20:47 | BostX | ,(defn foo [x] (. java.net.URLEncoder x "bar & baz" "UTF-8")) |
| 20:47 | clojurebot | #<Exception java.lang.Exception: SANBOX DENIED> |
| 20:47 | BostX | ,(foo encode) |
| 20:47 | clojurebot | #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: foo in this context, compiling:(NO_SOURCE_PATH:0)> |
| 20:48 | BostX | but it does not work. does anyone know why? |
| 20:51 | amalloy | Scriptor: no |
| 20:51 | mdeboard | I have discovered the (very very very nsfw) reason why Clojure's achievement picture on codewall.com is a narwhal. (Seriously, this is NSFW, and probably nsfyou if you have any kind of taste or the slightest shred of maturity) https://www.strongspace.com/postfarm/public/postfarm/uploads-2.0/u/umwli.jpg |
| 20:51 | clojurebot | c'est bon! |
| 20:51 | mdeboard | Please don't ban me. |
| 20:51 | amalloy | well, now clojurebot has that in his database |
| 20:51 | Scriptor | clojurebot approves |
| 20:52 | Scriptor | amalloy: any chance at all of this happening, or whether it's even possible, or not a dumb idea? |
| 20:52 | amalloy | is not possible. you need a different approach |
| 20:53 | amalloy | eg, (breakpoint-after-arg 1 (foo (first-arg) (second-arg))) |
| 20:55 | Scriptor | maybe |
| 21:06 | sgarrett | Hello again #clojure. I'm working on recreating a simple pong program to clojure that I wrote in java. When using java classes like "java.util.Random" is there an idiomatic way to use them without the "new" keyword? Seems like using new a bunch in clojure isn't proper implementation. |
| 21:07 | weavejester | sgarrett: Add a "." to the end, e.g. (Integer. "10") |
| 21:07 | weavejester | &(Integer. "10") |
| 21:07 | lazybot | ⇒ 10 |
| 21:07 | weavejester | &(new Integer "10") |
| 21:07 | lazybot | ⇒ 10 |
| 21:07 | brehaut | ,(apropos 'rand) |
| 21:08 | clojurebot | (rand rand-int rand-nth) |
| 21:11 | sgarrett | weavejester: Thanks. :) |
| 21:16 | amalloy | &(macroexpand '(Integer. 10)) ;; just to emphasize |
| 21:16 | lazybot | ⇒ (new Integer 10) |
| 21:26 | echo-area | ljos: Did you find the project yesterday |
| 21:26 | echo-area | ljos: What's it? |
| 21:27 | TimMc | ~NSFW |
| 21:27 | clojurebot | I don't understand. |
| 21:28 | TimMc | mdeboard: I'm really not sure why that has anything to do with anything other than narwhal porn. |
| 21:42 | gtrak | brehaut, ibdknox, https://gist.github.com/1928815 did I do a bad thing just now? |
| 21:44 | TimMc | gtrak: Kinky. |
| 21:45 | TimMc | When I see ((eval b)) I know I'm in for a good time. |
| 21:45 | brehaut | lol |
| 21:45 | gtrak | I'm still teething on the macros |
| 21:45 | brehaut | you've gone further down the hiccup rabbit hole than i have sorry |
| 21:45 | gtrak | well, the defpartial originally is from noir |
| 21:47 | gtrak | but that's just defining a function with a prerendered hiccup html as its return value, which can then be composed with more defpartials, in theory |
| 21:47 | gtrak | if you know it'll be static... I suppose it saves some cpu? |
| 21:47 | TimMc | and I/O, maybe? |
| 21:47 | gtrak | yea |
| 21:48 | gtrak | since you can pass in any sexps |
| 21:48 | brehaut | i wonder if its a complicated way of doing a memoize? |
| 21:48 | gtrak | it is |
| 21:49 | callen | https://refheap.com/paste/875 this more or less exemplifies the brain damage I have re: clojure. |
| 21:49 | gtrak | though it moves it to compile-time, those lines are blurry |
| 21:49 | callen | the first solution obviously being mine. |
| 21:50 | gtrak | brehaut, though string literals referenced by code don't live on heap, right? |
| 21:50 | brehaut | gtrak: way deeper java than i can answer |
| 21:51 | gtrak | at least in java source code, literals are automatically interned into permgen |
| 21:51 | brehaut | oh right. interesting |
| 21:52 | gtrak | but yea, memoize was the first thing I did, this is pretty much a restricted compile-time memoize |
| 21:52 | brehaut | sure. totally reasonable. enlive does something like that i think |
| 21:53 | TimMc | callen: That's how you learn! Initial flush of victory, huge bucket of cold water. |
| 21:53 | callen | TimMc: I knew my solution was going to be massive, the problem I guess is that I don't yet think in idioms like partial and mapcat. |
| 21:53 | gtrak | is there any way to avoid the eval? I did a lot of trial and error. |
| 21:53 | callen | TimMc: I was particularly irritated this time because mapcat briefly occurred to me. |
| 21:55 | TimMc | callen: I probably would have done (fn [s r] (for [x s, y (repeat r x)] y)) |
| 21:55 | TimMc | which of course is a perfect case for mapcat |
| 21:55 | brehaut | gtrak: i think if you want a form computed at compile time you probably do want an eval? |
| 21:56 | TimMc | callen: ...and now that I check, that's exactly what I did! |
| 21:56 | callen | TimMc: what's your account name on 4clj? I need to add you. |
| 21:56 | TimMc | callen: TimMc |
| 21:56 | Scriptor | hmm, vars created with def don't count as local bindings? |
| 21:57 | gtrak | I was trying to do it inline like ~(fn-partial [] ~@body) in place of value, but that was all sorts of broken |
| 21:57 | TimMc | My solutions are a mix from rather early on in my Clojure "career" and fairly recent ones. |
| 21:57 | callen | TimMc: thx. |
| 21:57 | callen | understood. |
| 21:57 | callen | I'm a past the earliest of questions, so I think it will be instructive. |
| 21:57 | TimMc | Scriptor: vars are disjoint with locals |
| 21:58 | Scriptor | got it |
| 21:58 | TimMc | locals are like... registers or something. |
| 21:58 | TimMc | compiler can do all sorts of fancy footwork with those |
| 21:59 | Scriptor | how are vars treated? |
| 22:00 | brehaut | they are global to a namespace |
| 22:01 | TimMc | vars are globally named mutable cells that the compiler knows about |
| 22:02 | TimMc | So when you do (count foo), the compiler knows that count is #'clojure.core/count, a var -- and will go and look at the metadata on the var for optimizations. |
| 22:23 | gtrak | brehaut, there's gotta be a general static-fn macro like that, no? |
| 22:23 | brehaut | gtrak: no idea sorry |
| 23:01 | zcaudate | ibdknox|aw |
| 23:01 | zcaudate | would anybody have an rss feed of this channel? |
| 23:03 | zcaudate | i know there is a log @ noise.net but i want to follow the conversation on my iphone |
| 23:07 | gtrak | rss feed of irc? |
| 23:18 | TimMc | that's a new one |
| 23:21 | choffstein | Anyone use AquaMacs? I find it to sometimes be incredibly slow. Trying to do a swank.core/break and pull up the inspector on any variable can take an absurd amount of time... I don't know if that is just me, or that is more common... |
| 23:21 | ibdknox|away | I think the general word of wisdom is to stay away from aquamacs |
| 23:21 | ibdknox|away | but I'm a vim guy... soo... |
| 23:22 | choffstein | fair enough |
| 23:22 | amalloy | anyone using aquamacs is on their own |
| 23:22 | callen | choffstein: you don't want to go there. Just get "Emacs for OS X", you'll be able to google it just fine. |
| 23:22 | choffstein | Yeah. I've got it. |
| 23:23 | choffstein | AquaMacs just allowed me to stay in this beautiful, crippled land where I can still have a file dialogue ;0 |
| 23:23 | choffstein | ;) |
| 23:23 | callen | choffstein: you should learn to use Emacs. |
| 23:24 | choffstein | Well, then I shall. |
| 23:24 | rlb | I thought that emacs brought up a file dialog if you used the menus... |
| 23:25 | gtrak | menus-disabled is the way to go |
| 23:25 | rlb | hmm, maybe not (at least not with emacs23-lucid) |
| 23:25 | technomancy | best to pretend they don't exist; they're kind of embarassing |
| 23:25 | rlb | maybe emacs23-gtk does (dunno -- or care much) |
| 23:25 | choffstein | This is a pretty random question, but maybe someone has a good answer. One of my biggest gripes with clojure is when I want to poke around with a new library, my process is to create a new lein project, add the dep, perform a lein deps, then do a lein repl. Then I have to delete the temp project. That just seems like a lot of wasted effort. Does anyone have a better way to go about it? |
| 23:26 | gtrak | create one project, and don't delete it? |
| 23:26 | rlb | choffstein: if you do go without the dialogs, I recommend enabling/learning iswitchb-mode. |
| 23:26 | technomancy | choffstein: you could just check out the project itself |
| 23:26 | technomancy | or keep a scratch project around |
| 23:26 | technomancy | this will be easier in lein2 with pomegranate |
| 23:26 | technomancy | (if you're not tired of hearing me say that yet, you will be soon) |
| 23:27 | callen | I'm at about 50% of the way there. |
| 23:27 | choffstein | Haha. Yeah ... those seem like horrible solutions, to be quite frank. |
| 23:27 | callen | technomancy: you're an excellent propagandist though. |
| 23:27 | choffstein | But I'll keep my eye on lein2 |
| 23:27 | callen | iswitchb-mode is lordly. |
| 23:27 | technomancy | yeah, ideally you shouldn't even have to restart your project |
| 23:27 | callen | live and die by my ido-mode and iswitchb-mode |
| 23:28 | technomancy | callen: I thought ido is a superset of iswitchb? |
| 23:28 | gtrak | technomancy, that would be great |
| 23:28 | callen | technomancy: aye, but I use iswitchb for my buffers. |
| 23:28 | callen | you don't have to. |
| 23:35 | technomancy | haha; the build tool for F# is called fake |
| 23:35 | ibdknox|away | wow |
| 23:35 | ibdknox|away | I just got this email |
| 23:35 | technomancy | and it apparently has two orders of magnitude more LOC than leiningen? http://www.ohloh.net/p/fake-fsharp |
| 23:35 | ibdknox|away | Hi Chris, We (also) want to convert our small Django based system to just static pages and the DB contains 3 year worth of employee records which we want to try to dynamically migrate to google spreadsheets. Would you be interested in taking this up? |
| 23:35 | ibdknox|away | I feel like I'm getting trolled. |
| 23:36 | Scriptor | that was one issue I had with naming a build took in pharen |
| 23:36 | Scriptor | funny to see F# didn't give a damn |
| 23:36 | callen | technomancy: 165k LOC?! |
| 23:36 | callen | technomancy: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGH |
| 23:36 | technomancy | callen: it's got to be a bug in how they're measuring it |
| 23:36 | technomancy | I don't think that's actually possible |
| 23:37 | aperiodic | it also says that 65k of those lines were added in the last month |
| 23:37 | callen | technomancy: I'm pulling it now to measure it myself. |
| 23:37 | callen | no earthly way it could be that big. |
| 23:39 | callen | cloc says 84k |
| 23:39 | muhoo | what's this codewall people are talking about? |
| 23:39 | muhoo | i went to codewall.com and it apparently is some .NET security software |
| 23:39 | Scriptor | F#'s build tool |
| 23:39 | Scriptor | oh |
| 23:39 | ibdknox | muhoo: coderwall |
| 23:39 | muhoo | ah |
| 23:39 | technomancy | callen: still; disturbing |
| 23:40 | callen | technomancy: I don't actually trust that number. |
| 23:40 | callen | technomancy: I'm resolving it now. |
| 23:40 | muhoo | funny. "Unlock achievements". why must everything be a game? |
| 23:40 | muhoo | post a new project on github and get a powerup |
| 23:41 | callen | technomancy: nope, it's mis-including package lists and the dependencies. |
| 23:41 | technomancy | muhoo: oh man, once you get triple shot it changes everything |
| 23:41 | callen | technomancy: it's only 1314 lines of code. |
| 23:41 | callen | it doesn't do a whole helluva lot IIRC |
| 23:41 | technomancy | ok, that's more like it |
| 23:42 | callen | there's a lot of XML and shit too |
| 23:42 | callen | it's a pretty ugly project IMHO, but it's not that big either. |
| 23:42 | callen | this was a healthy reminder of why I abandoned the .NET world early in my career. |
| 23:42 | technomancy | I like the idea of ocaml with libraries and concurrency |
| 23:42 | callen | whenever you need the fax and only the fax, just call callen. |
| 23:43 | technomancy | but then again, part of the draw of ocaml is that it doesn't use a VM |
| 23:43 | callen | right, which is why I find the fascination with F# puzzling. |
| 23:43 | callen | the only reason I looked into OCaml was because it wasn't on a VM. |
| 23:43 | technomancy | I mean, the draw of ocaml for Clojure users |
| 23:43 | technomancy | I have no idea how C# users think |
| 23:44 | callen | who knows. I try not to remember those days. |
| 23:45 | callen | I spent most of my time in C# muttering to myself about how much I hated it. |
| 23:45 | callen | muhoo: coderwall.com |
| 23:46 | technomancy | if coding were really like a game you'd have to unlock stuff like ido-mode and the slime inspector |
| 23:47 | callen | astute. |
| 23:48 | talios | woo - seems I've gained a few coderwall achievements since I last looked :) http://coderwall.com/talios |
| 23:49 | Scriptor | ah, nice, expedited access with twitter access |
| 23:49 | Scriptor | having a twitter I don't actually use comes in handy once again |
| 23:50 | technomancy | I'm still annoyed that coderwall accused me of having an original C++ project |
| 23:50 | technomancy | because I uploaded znc rather than forking it. |
| 23:53 | callen | technomancy: didn't you want the option of eliminating the timestamps from the replay? |
| 23:53 | technomancy | callen: I thought it would be easy to get them collapsed into erc's timestamps where it only shows them once per minute |
| 23:54 | technomancy | but I realized that's nontrivial since those are generated internally to erc |
| 23:54 | callen | right, as is the case with most IRC clients. |
| 23:54 | callen | you can't fake it unless you have a cooperative web client or custom script that subsumes the output. |
| 23:56 | callen | technomancy: I was planning on writing not because of that particular annoyance, but because I wanted a foundation to build things like hubot on top of, and because I want to be able to stash IRC history in a common accessible database that multiple services/bots could utilize. |
| 23:56 | callen | writing it* |
| 23:56 | technomancy | callen: did you take a look at subrosa? |
| 23:57 | callen | technomancy: yeah, not really sure how to hook into it. |
| 23:57 | technomancy | right... especially when you're getting started there's this weird dynamic where it's easier in some ways to start from scratch than build on an existing codebase |
| 23:58 | callen | technomancy: it has a bunch of shims for common-case IRC-usage type stuff but I don't see anything fundamental like what I would need. |
| 23:58 | callen | technomancy: that |
| 23:58 | callen | that's precisely the problem. I'm too nubcakes. |
| 23:58 | technomancy | like it's quantitatively more work to start from scratch |
| 23:58 | technomancy | but it's easier work in a way |
| 23:58 | callen | this wouldn't be a problem in a language I was comfortable with, obv. |
| 23:58 | callen | Clojure does a tip-top job of making me feel like a moron though, so there it is. |
| 23:59 | accel | I have written a clojure app with crappy algorithms, and it's about 100x slower than it needs to be. I don't know where the bottlenecks are. What is the equivalent of gprof but for clojure? |
| 23:59 | callen | I found his hooks setup, I could...try using that. I don't see any examples though. |