2013-01-20
| 00:05 | ChongLi | anyone here use evil-mode seamlessly and successfully? |
| 00:05 | ChongLi | I tried it for a bit and it broke my brain |
| 00:09 | ChongLi | I got really confused about which regular emacs bindings are available in which mode |
| 00:09 | ChongLi | especially with paredit |
| 00:09 | ChongLi | which seems to operate differently in normal mode vs insert mode |
| 00:16 | amalloy | ludston, mattmoss: re pi factorial: http://en.wikipedia.org/wiki/Gamma_function |
| 00:18 | amalloy | gamma(pi + 1) is about 7.188, apparently, so i'm gonna say that's pi factorial |
| 00:23 | technomancy | heyyyyy look at that: https://github.com/technomancy/leiningen/tree/2.0.0 |
| 00:24 | ChongLi | nice work! |
| 00:25 | ChongLi | hmmm |
| 00:26 | ChongLi | the one on the AUR is outdated |
| 00:26 | ChongLi | lsat updated 2012-07-22 |
| 00:26 | technomancy | yeah, typically I recommend installing by hand |
| 00:26 | ChongLi | I probably ought to do the same with clojure |
| 00:26 | technomancy | nah |
| 00:26 | technomancy | just skip clojure entirely |
| 00:27 | ChongLi | no I mean let lein install clojure |
| 00:27 | technomancy | oh right, yep |
| 00:27 | ChongLi | instead of using the one in arch community |
| 00:27 | mmarczyk | technomancy: whoa, great! congrats :-) |
| 00:27 | technomancy | I should update the nix recipe |
| 00:27 | technomancy | mmarczyk: thanks |
| 00:27 | technomancy | feels good to have it out |
| 00:28 | gdev | i've opened a beer to celebrate =D |
| 00:28 | ChongLi | I've heard openjdk7 is not recommended with clojure; why is that? |
| 00:29 | ChongLi | is it just performance? |
| 00:29 | technomancy | ChongLi: openjdk7 is highly recommended for clojure |
| 00:29 | amalloy | ChongLi: i've never heard that. 7 works fine, as does openjdk |
| 00:29 | ChongLi | oh ok |
| 00:29 | ChongLi | I guess I heard wrong |
| 00:30 | amalloy | the only incompatibilities i've heard of are some occasionaly problems with 64-bit jvms on macos |
| 00:30 | ChongLi | well the mac platform is really weird |
| 00:30 | amalloy | and that was like a year ago, so who knows now |
| 00:30 | technomancy | there are some people with left-over hate for openjdk from way back in the day when it lagged behind the sun one |
| 00:30 | technomancy | but that was a long time ago |
| 00:31 | ChongLi | I like openjdk because it's free software :) |
| 00:31 | technomancy | other acceptable reasons include because you hate Oracle, or also because you hate Sun. |
| 00:31 | ChongLi | well, I didn't mind sun so much |
| 00:31 | ChongLi | but I hate oracle |
| 00:32 | ChongLi | sun did some nice stuff right up until they were bought by oracle |
| 00:32 | ChongLi | who then sent the community scrambling to fork everything |
| 00:37 | technomancy | you could also just hate Larry Ellison |
| 00:37 | technomancy | or you could hate patent trolls in general |
| 00:37 | technomancy | lots of good reasons |
| 00:37 | ChongLi | or patents in general |
| 00:37 | ChongLi | haha |
| 00:38 | ChongLi | I've never been able to make up my mind whether to hate the players or the game |
| 00:40 | ChongLi | anyone have the michael bolin closure book from oreilly? |
| 00:41 | ChongLi | wondering how good it is |
| 00:42 | ChongLi | it seems a lot of languages that compile to javascript can really benefit from closure and its compiler |
| 00:45 | tomoj | why would I get "java.lang.ClassNotFoundException: swank.swank" from `lein ring server` but not from a swank repl? |
| 00:46 | tomoj | hmm.. moving the dep on swank-clojure from :dev :dependencies to just normal :dependencies fixed it |
| 00:49 | gdev | glad we could be your rubberduck |
| 00:50 | ChongLi | gdev: where'd that term come from? |
| 00:51 | gdev | ChongLi: I read about it in a pragmatic programmers book |
| 00:51 | ChongLi | ah here we go |
| 00:51 | ChongLi | http://en.wikipedia.org/wiki/Rubber_duck_debugging |
| 00:51 | ChongLi | hahaha |
| 00:53 | gdev | the rubber duck I use at work is a sticky note on my desk with a duck drawn on it that says "re-write it in clojure" |
| 00:53 | ChongLi | hahaha |
| 00:54 | ChongLi | that is great |
| 00:54 | ChongLi | that's basically the solution to all problems: "it's written in the wrong language!" |
| 00:58 | gdev | yeah but it's hard selling that idea in a place that requires all new hires to get java certification within the first 6 months |
| 00:59 | ChongLi | that's their loss |
| 00:59 | gdev | learning clojure and studying for the scjp has been interesting though |
| 00:59 | ChongLi | still, learning clojure can make you a better java programmer |
| 00:59 | ChongLi | learning any language that changes how you think can help |
| 01:00 | gdev | yes, thank goodness i followed the "learn a new language ever year" advice from the pragmatic book |
| 01:00 | ChongLi | java can be really hard to improve on though; particularly in situations what enforce rigid requirements on architecture |
| 01:09 | gdev | Yeah I know, I worked on a project that used struts and spring and flex, etc. is there a such thing as framework creep? |
| 01:28 | ChongLi | oh yes |
| 01:29 | ChongLi | part of the clojure philosophy is to use small, composable libraries instead of big monolithic frameworks |
| 01:42 | luxbock | why doesn't (map ffirst (partition 3 (range 9))) work? |
| 01:43 | luxbock | ,(map ffirst (partition (range 9))) |
| 01:43 | clojurebot | #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core$partition> |
| 01:43 | luxbock | err |
| 01:43 | luxbock | ,(map ffirst (partition 3 (range 9))) |
| 01:43 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long> |
| 01:44 | cark | ,(map first (partition 2 (range 9))) |
| 01:44 | clojurebot | (0 2 4 6) |
| 01:45 | ChongLi | ,(ffirst (partition 3 (range 9))) |
| 01:45 | clojurebot | 0 |
| 01:45 | ChongLi | to map ffirst you'd need another layer of nesting |
| 01:45 | luxbock | ahh doh, I'm dumb |
| 01:46 | ChongLi | ,(map ffirst (partition 3 (partition 3 (range 81)))) |
| 01:46 | clojurebot | (0 9 18 27 36 ...) |
| 02:17 | seangrove | $seen emezeske |
| 02:17 | seangrove | Ah, no lazybot |
| 02:19 | seangrove | Damnit, can't run the tests for lein-cljsbuild |
| 02:19 | seangrove | Must be missing something basic |
| 03:08 | jaimef | /me hunts for what is required to get (use 'clojure.contrib.json) to work without a file not found exception. classpath points right to clojure-contrib.jar. repl won't find it however |
| 03:08 | jaimef | |
| 03:08 | jaimef | /me hunts for what is required to get (use 'clojure.contrib.json) to work without a file not found exception. classpath points right to clojure-contrib.jar. repl won't find it however |
| 03:08 | jaimef | |
| 03:08 | jaimef | hmm |
| 03:08 | dnolen | jaimef: clojure.contrib is deprecated |
| 03:08 | jaimef | http://clojuredocs.org/clojure_contrib/clojure.contrib.json/read-json is this not accurate then? |
| 03:09 | dnolen | jaimef: use data.json or cheshire https://github.com/dakrone/cheshire |
| 03:10 | dnolen | jaimef: just avoid clojure.contrib namespace projects, those days are long gone. |
| 03:11 | jaimef | thanks |
| 03:13 | jaimef | so is there an easy way to require it from the repl? |
| 03:36 | muhoo | this seems goofy. isn't there already some function in aleph/lamina that does this? https://www.refheap.com/paste/8805 |
| 03:59 | luxbock | ,(reduce #(+ (* %1 2) (- (int %2) 48)) 0 "11111111") |
| 03:59 | clojurebot | 255 |
| 04:00 | luxbock | ,(int "11111111") |
| 04:00 | clojurebot | #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Character> |
| 04:00 | luxbock | can someone explain this? |
| 04:01 | luxbock | isn in this function? |
| 04:01 | luxbock | errr |
| 04:01 | luxbock | isn't %2 assigned to "11111111"? |
| 04:02 | azkane | the string becomes \1\1\1... i guess |
| 04:03 | luxbock | oh right |
| 04:04 | luxbock | what's the proper way to convert a string representation of a number into an integer? so "42" becomes 42? |
| 04:04 | luxbock | Integer/parseInt? |
| 04:05 | hyPiRion | luxbock: correct |
| 04:05 | hyPiRion | ,(Integer/parseInt "11111111) |
| 04:05 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading string> |
| 04:05 | hyPiRion | ,(Integer/parseInt "11111111") |
| 04:05 | clojurebot | 11111111 |
| 04:06 | hyPiRion | ,(Integer/parseInt "11111111" 2) |
| 04:06 | clojurebot | 255 |
| 04:17 | muhoo | pi * 1337% = 42 |
| 04:19 | ejackson | :) |
| 04:20 | muhoo | hmm, is there a way to get a lamina channel to act like a straight-up fifo? |
| 04:20 | muhoo | with a maximum size? |
| 04:24 | amalloy | yes, instead of (def l (lamina/channel)), (def l (atom (clojure.lang.PersistentQueue/EMPTY)) |
| 04:24 | bbloom | tpope: is there a key sequence for macroexpand ? |
| 04:29 | hyPiRion | clojure.lang.PersistentQueue/EMPTY isn't a function, by the way. It's an empty queue. |
| 04:29 | hyPiRion | ,(conj clojure.lang.PersistentQueue/EMPTY 1 2 3) |
| 04:29 | clojurebot | #<PersistentQueue clojure.lang.PersistentQueue@6b58d153> |
| 04:34 | muhoo | amalloy: heh, basically, don't use lamina? nice. |
| 04:35 | amalloy | muhoo: if you need one that's bounded, and ejects old entries if it gets full, you can use https://github.com/amalloy/ring-buffer |
| 04:36 | muhoo | i was cache/fifo-cache-factory, actually. thought i'd retool this to use lamina, but realized, i'm not sure it'd be any faster or simpler |
| 05:38 | zxq9 | What is the recent status of Clojure on Android? I'm only finding (apparently) slow/dead projects and some faint buzz from the end of 2011. Anything new or was this abandonned? |
| 05:40 | AimHere | Rich was making noises about it around the middle of this year |
| 05:42 | zby_home_ | I've got a problem with sessions in ring: https://gist.github.com/4577752 |
| 05:42 | zxq9 | Did "noise" ever translate into a platform option? I'm loathe to develop a code base in Java. |
| 05:43 | zby_home_ | possibly an obvious thing - I've just started learning clojure |
| 05:43 | zby_home_ | but its driving me crazy |
| 06:01 | amalloy | zby_home_: that's not evidence of a problem. it's just a bunch of code: no output, no idea what you expected to happen or why you think it didn't |
| 06:25 | zby_home_ | amalloy - I've put a comment there |
| 06:25 | zby_home_ | the idea is to save referer to the session |
| 06:26 | zby_home_ | but it is always {:x nil} in the output |
| 06:44 | pure_loulou | gfredericks thx for the code you gave me,it helped me |
| 08:50 | borkdude | I'm taking a further look into Markdown, clojure highlighting etc - one thing I notice from clojure-doc.org is that this setup doesn't allow for tables, so you have to revert to writing html? What do people use for tables in Markdown in general? |
| 08:50 | borkdude | it seems to be a missing feature |
| 08:52 | jaen | borkdude: tables aren't really standard markdown; some parsers implement markup of them, but generally you unfortunately have to write html for that |
| 09:14 | jmibanez | quick q: i understand new is a special form. is it possible to call new with a var pointing to a class instead of the actual class? |
| 09:14 | jmibanez | i.e. can i do (def my-var SomeClass) … then (new my-var) ? |
| 09:15 | jmibanez | i've tried it and it doesn't work as is. i'm looking for a better alternative |
| 09:15 | jmibanez | i'm about to resort to writing a macro to get what i need done |
| 09:17 | hyPiRion | ,(macroexpand '(new foobar)) |
| 09:17 | clojurebot | (new foobar) |
| 09:17 | antares_ | jmibanez: no, that's not possible |
| 09:17 | jmibanez | antares_: yeah, figured as much |
| 09:18 | jmibanez | which means i need to rewrite something to use case / cond instead of lookup via map. oh well. |
| 09:22 | raek | jmibanez: you can use some reflection classes that are included in Clojure |
| 09:23 | raek | (it is possible) |
| 09:23 | jmibanez | raek: too heavyweight. i bit the bullet and just rewrote my creation function to use case instead. it's a few cases, so no big |
| 09:24 | raek | https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Reflector.java#L150 |
| 09:24 | raek | heavyweight? |
| 09:24 | raek | (Reflector/invokeConstructor <Class object goes here> 1 2 3) |
| 09:25 | raek | equivalent to (SomeClass. 1 2 3) |
| 09:31 | jmibanez | raek: in terms of performance, maybe? |
| 09:31 | jmibanez | raek: and the case version is easier to read |
| 09:31 | jmibanez | if a bit repetitive |
| 09:51 | zilti | Is there a way to tell Leiningen the "systemPath" of a dependency entry? |
| 10:16 | Anderkent | zilti: you mean using a jar from the filesystem instead of the repo? |
| 10:18 | zilti | Anderkent: There's that systemPath tag for a maven dependency tag, but it seems like it's not possible to use that in Leiningen. |
| 10:20 | Thallasios_Xelon | hello :) |
| 10:20 | Thallasios_Xelon | i am looking for a way to make jar from counterclockwise ,any tutorial to read? |
| 10:20 | Thallasios_Xelon | i tried the official and stuck |
| 10:21 | Anderkent | zilti: yeah I don't think that option exists. |
| 10:22 | Anderkent | Thallasios_Xelon: I don't think it's any different with CCW than standard eclipse |
| 10:22 | Thallasios_Xelon | i have never made a jar before :) |
| 10:23 | Anderkent | Thallasios_Xelon: in the eclipse top menu, go File -> Epxport -> Java/JAR file |
| 10:24 | Anderkent | then you need to select stuff you want to include |
| 10:24 | Thallasios_Xelon | i want to make a runable jar |
| 10:25 | TimMc | technomancy: Now that the lein preview is released, how do I get my bin/lein2 script back onto the releases channel? |
| 10:26 | Thallasios_Xelon | thx Anderkent i will read eclipse documentation |
| 10:26 | Anderkent | Thallasios_Xelon: you can also just run `lein jar` in the command line :) |
| 10:27 | ticking | I wonder how useful it would be if there was a lazy file seq, that closed the file once all the data had been read |
| 10:28 | Thallasios_Xelon | do you know how much slower are the immutable data? |
| 10:28 | tpope | bbloom: that's kind of what cqq is for. I could add a special mapping for it, but I don't want to rush to add 200 special mappings |
| 10:30 | duck1123 | ticking: if i recall, the problem was determining when the file was consumed |
| 10:31 | ticking | duck1123: you mean in case it is a stream? yeah that is kind of a problem. It's just so sad to have to choose between doall and a dangling open ^^ |
| 10:33 | duck1123 | Yeah, you have to just keep your with-open high enough that you can use the whole stream |
| 10:33 | duck1123 | I know it's been discussed at length before |
| 10:33 | ticking | duck1123: I'll check the logs to get some insight, thanks ^^ |
| 10:44 | ne1 | hi - is there a performant way to modify nested values in a map (eg changing strings to dates after parsing back from json) - clojure.walk/postwalk works, but doesn't seem all that quick |
| 10:53 | TimMc | ne1: Does your JSON lib allow you to do custom decoding? |
| 10:54 | ne1 | TimMc: I'm using cheshire - looks like it supports custom encoding, but not custom decoding |
| 10:54 | TimMc | And postwalk is slow? |
| 10:55 | TimMc | I recently wrote a tree-walking library, but I don't know if it would be any faster. You'd almost certainly get more speed out of writing your own structure-specific traverser. |
| 10:56 | ne1 | it seems to be significantly slower to do a postwalk identity on the structure than the original parsing |
| 10:58 | TimMc | A combination of for, into, map, and update-in would almost certainly be the fastest way to do this. |
| 11:05 | ne1 | ok, thanks |
| 11:06 | TimMc | The slower speed of a generic tree-walker comes from not being able to skip irrelevant things. |
| 11:08 | Bronsa | wtf. |
| 11:08 | Bronsa | PersistentVector doesn't implement Counted |
| 11:09 | Bronsa | ,(time (dotimes [_ 1e8] (count '[foo bar baz]))) |
| 11:09 | clojurebot | "Elapsed time: 671.36448 msecs" |
| 11:09 | Bronsa | ,(time (dotimes [_ 1e8] (.count '[foo bar baz]))) |
| 11:09 | clojurebot | "Elapsed time: 196.25403 msecs" |
| 11:13 | hyPiRion | $google CLJ-1084 |
| 11:13 | hyPiRion | oh, where's lazybot when you need him |
| 11:13 | hyPiRion | or her |
| 11:13 | hyPiRion | http://dev.clojure.org/jira/browse/CLJ-1084 |
| 11:15 | Bronsa | hyPiRion: PersistentVector itself should implement Counted, not only PersistentVector$ChunkedSeq |
| 11:16 | Bronsa | well, performance-wise there would be no difference, but it'd be more correct |
| 11:16 | hyPiRion | Yeah |
| 11:19 | Bronsa | oh, wait |
| 11:19 | Bronsa | ,(counted? [1]) |
| 11:19 | clojurebot | true |
| 11:19 | Bronsa | so PersistentVector does implement Counted |
| 11:21 | Bronsa | yeah, Indexed extends Counted |
| 11:27 | hyPiRion | ,(counted? (vec (range 1e7))) |
| 11:27 | hyPiRion | ,(counted? (vec (range 1e4))) |
| 11:28 | hyPiRion | clojurebot: Did I kill you or something? |
| 11:28 | clojurebot | spear: ...so -- if you're doing something where you can take advantage of having Clojure's STM available instead of locking, and will be running on lots of cores, Clojure is a good fit. Otherwise, if you're performance-bound, probably not. |
| 11:53 | hyPiRion | Oh yeah |
| 11:53 | hyPiRion | `lein upgrade 2.0.0` everyone :D |
| 11:54 | gfredericks | `lein upgrade` worked for me |
| 11:54 | hyPiRion | yeah, but it's better for those who's on RC1 with a broken upgrade command |
| 11:55 | gfredericks | "0.3.0-1.0.2b4" is quite a version string |
| 11:55 | gfredericks | does that suggest a forked project? |
| 11:56 | hyPiRion | no clue |
| 11:57 | hyPiRion | I only understand a.b.c-RC/alpha/beta/SHA |
| 11:57 | hyPiRion | (and snapshot) |
| 13:02 | nopolabs | I'm looking clojure code to read to get a sense of the language. I'm coming from a java perspective, but would like examples that are idiomatic clojure. Any recommendations? |
| 13:03 | hyPiRion | nopolabs: Work with 4clojure and follow some of the top users |
| 13:12 | Raynes | hyPiRion: wha |
| 13:12 | Raynes | hyPiRion: 4Clojure is not the place to look for idiomatic Clojure. |
| 13:12 | Raynes | Code, golf, dude. |
| 13:14 | nopolabs | I have to agree, 4clojure is too introductory, that part I've done, not I want to see how clojure is really used. |
| 13:15 | Raynes | It isn't the introductory part that is the problem, it's the fact that people vie for the shortest solutions which absolutely does not equate to the most idiomatic. |
| 13:37 | dnolen | nopolabs: get a good Clojure book, look at mature highly dependend on projects - Ring/Compojure/Lein etc |
| 13:40 | antares_ | nopolabs: leiningen, clojurewerkz.org projects, compojure, REPLy |
| 13:42 | antares_ | nopolabs: also, projects under http://github.com/ptaoussanis/ |
| 13:49 | rodnaph_ | anyone know the current status of clojurescript source maps? |
| 13:54 | rodnaph_ | dnolen: i saw you tweet about clojurescript source maps in chrome a few months ago - what's the current status? |
| 13:54 | labria | hey guys |
| 13:55 | labria | I want to submit a pull request with a update to lein to homebrew, but I'm not sure: make 2.0.0 the main version, or to leave 1.7.1 as the main and make 2.0.0 the "devel" version |
| 13:56 | labria | What's the state of adoption on lein2? |
| 14:01 | hyPiRion | Raynes: Huh, I always tried to approach it in the most idiomatic way. |
| 14:01 | hyPiRion | Can't see why people would like to show their golfing skills if they can show elegance instead. |
| 14:02 | rodnaph_ | labria: (total absence of actual facts but...) i swear i heard technomancy on a podcast a few weeks ago saying "most" users were on lein2 now. |
| 14:03 | labria | rodnaph_: thanks |
| 14:03 | hyPiRion | labria: More or less everyone is on lein 2, so I'd love to see 2.0.0 as main version |
| 14:09 | labria | Pull request sent, https://github.com/mxcl/homebrew/pull/17212 if anyone interested |
| 14:16 | labria | Aaaaand accepted into upstream |
| 14:16 | labria | https://github.com/mxcl/homebrew/commit/7b5a5591cd7c2cce0217367abd1a74f5d70098a2 |
| 14:17 | hyPiRion | sweet |
| 14:18 | labria | This must be some kind of olimpic record |
| 14:21 | labria | err, olympic |
| 14:43 | yedi | anyone know of non-trivial apps using cljs besides prismatic (open source is a big plus) |
| 14:45 | progo | light table is one I recall? |
| 14:45 | ibdknox | progo: correct |
| 14:57 | yedi | ibdknox: lighttable won't be opensource right? |
| 14:57 | ibdknox | it will |
| 14:57 | yedi | oh sweet, is the repo already public? |
| 14:58 | ibdknox | not yet, it's not quite stable enough |
| 14:58 | Raynes | I just stole ibdknox's laptop for a few hours. |
| 14:58 | Raynes | Took the source. |
| 14:58 | ibdknox | lol |
| 14:58 | Raynes | He doesn't know it. |
| 14:58 | Raynes | Oh, wait... |
| 14:58 | DigitalJack | For those here that use emacs, do you use it in the client/server mode? |
| 14:58 | dnolen | rodnaph: there's a lot more to do but I'm kind of waiting for 1.5.0 to get released to move forward |
| 14:59 | Raynes | dnolen: So you're working on source maps, right? |
| 14:59 | Raynes | In cljs. |
| 14:59 | dnolen | rodnaph: also I would like to see tools.reader in contrib so I can add column info to symbols |
| 14:59 | dnolen | Raynes: yes |
| 14:59 | Raynes | dnolen: Anyone ever tell you that you're a good person? |
| 14:59 | dnolen | Raynes: though I haven't done much lately because of the above |
| 14:59 | Raynes | Yeah, I understand. |
| 15:00 | Raynes | Looks like lots of cool stuff leads up to it. |
| 15:00 | dnolen | Raynes: heh thanks, we're close. If the two above items get sorted out, probably a couple of weeks of work on emission |
| 15:00 | dnolen | Raynes: oh, man I want source maps sooo bad. And clearly so does everyone else :) |
| 15:00 | borkdude | what are source maps? |
| 15:00 | yedi | ibdknox: i'll be interested to see how you organized/structured LT's cljs portion |
| 15:00 | Raynes | dnolen: Am I right that CoffeeScript doesn't even have source maps? I think we're winning. |
| 15:00 | ibdknox | yedi: the whole thing is CLJS actually :) |
| 15:00 | muhoo | a hard schlep, i bet |
| 15:00 | dnolen | borkdude: debugging CLJS directly in the browser |
| 15:01 | ibdknox | yedi: this will give you some idea: http://www.chris-granger.com/2012/12/11/anatomy-of-a-knockout/ |
| 15:01 | borkdude | dnolen ah… cool |
| 15:01 | dnolen | Raynes: yes CoffeeScript doesn't have soure maps |
| 15:01 | ibdknox | yedi: I'm going to write the next part this week hopefully |
| 15:01 | dnolen | Raynes: and even if it did they aren't solving the merge source map problem |
| 15:01 | dnolen | Raynes: which I've already done |
| 15:01 | Anderkent | What's an elegant way of going from list of pairs to lookup tables from the first element to the pair and the second element to the pair? Can't get it in an elegant way. |
| 15:01 | dnolen | so you can debug from CLJS all the way through advanced compilation |
| 15:02 | yedi | ibdknox: oh sweet, thanks |
| 15:02 | Anderkent | ah wait I think I have it |
| 15:03 | Raynes | Anderkent: Why not use maps? |
| 15:04 | Anderkent | Raynes: I am. Just can't get the construction function right -.- |
| 15:05 | Raynes | &(into {} [[:a :b] [:c :d]]) |
| 15:05 | lazybot | ⇒ {:a :b, :c :d} |
| 15:05 | Raynes | Would also work with lists. |
| 15:05 | Anderkent | except keys may be duplicate |
| 15:05 | Anderkent | so I want a set of pairs as the value |
| 15:05 | Anderkent | sorry, forgot that :) |
| 15:08 | amalloy | Raynes: would not work with lists |
| 15:08 | amalloy | you'd need to map vec |
| 15:09 | Raynes | amalloy: I meant '([] ..) |
| 15:09 | Raynes | But yeah. |
| 15:10 | amalloy | Anderkent: you already have a list of pairs. asking for a set of pairs as output doesn't make sense. what do you want the output to look like? |
| 15:10 | Raynes | I assumed he meant a set of values. |
| 15:10 | Anderkent | https://www.refheap.com/paste/8815 this is my current monstrosity.. |
| 15:10 | Raynes | [[:a :b] [:a :c]] -> {:a #{:b :c}} |
| 15:10 | tmciver | Anderkent: sounds like you might want to use group-by somehow. |
| 15:11 | amalloy | ugh, no group-by |
| 15:11 | aav | is it guaranteed that conj/disj for a set will take constant time? |
| 15:11 | amalloy | (apply merge-with into (for [[k v] pairs] [k #{v}])) |
| 15:12 | yedi | ibdknox: the ending is such a tease, haha |
| 15:12 | yedi | ibdknox: can't wait for the next post |
| 15:12 | ibdknox | bwahaha |
| 15:13 | Anderkent | amalloy: thanks |
| 15:13 | Raynes | ibdknox: When is the next lt release? You told me but I forgotses. |
| 15:13 | seangrove | lazybot: you alive? |
| 15:13 | Raynes | $kill |
| 15:13 | lazybot | KILL IT WITH FIRE! |
| 15:13 | Raynes | I fixed it earlier. |
| 15:13 | seangrove | $seen Raynes |
| 15:13 | lazybot | Raynes was last seen talking on #clojure 4 seconds and 809 milliseconds ago. |
| 15:14 | seangrove | $seen emezeske |
| 15:14 | lazybot | emezeske was last seen quitting 4 weeks and 4 days ago. |
| 15:14 | seangrove | Thanks Raynes |
| 15:14 | seangrove | Hrm, that's not a good sign though |
| 15:14 | Raynes | Wow. |
| 15:14 | Raynes | That's concerning. |
| 15:14 | Raynes | :| |
| 15:15 | seangrove | So when trying to run the tests for lein-cljsbuild (so I can get a patch merged) via `lein test`, I get this error: java.io.FileNotFoundException: Could not locate midje/sweet__init.class or midje/sweet.clj on classpath |
| 15:15 | tmciver | amalloy: why not group-by? ##(group-by (fn [[k v]] k) [[:a :b] [:c :d] [:a :e]]) |
| 15:15 | lazybot | ⇒ {:a [[:a :b] [:a :e]], :c [[:c :d]]} |
| 15:15 | seangrove | This is the project.clj: https://github.com/sgrove/lein-cljsbuild/blob/master/plugin/project.clj |
| 15:16 | seangrove | Shouldn't midje be on the classpath with that project.clj? |
| 15:16 | amalloy | because going from group-by's output to the desired result is just as hard as going from the original input :P |
| 15:16 | dnolen | seangrove: emezeske watches the clojure & clojure-dev mailing lists, might want to ping him there. |
| 15:16 | tmciver | amalloy: hmm, I thought group-by's output was the desired output. |
| 15:17 | Anderkent | tmciver: should be set of values not vector - duplicates |
| 15:17 | tmciver | Anderkent: ah |
| 15:17 | amalloy | also, (fn [[k v]] k) is just first |
| 15:19 | ibdknox | Raynes: I was thinking beginning of feb, but since I added a few big things in, it might be end of feb |
| 15:20 | Anderkent | amalloy: your proposition seems to work once I make it (for [[k v] pairs {k #{v}}) - maps instead of vectors. Thanks! |
| 15:20 | amalloy | oh sure, sorry |
| 15:21 | amalloy | went into my into/for autopilot |
| 15:30 | brainproxy | technomancy: congrats on the 2.0.0 release, and many many many thanks for your hard work |
| 15:39 | borkdude | what do people using markdown for writing books use for cross referencing… nothing? |
| 15:46 | technomancy | brainproxy: thanks; glad it's helpful |
| 15:46 | technomancy | wow weird; it's the top story on hacker news |
| 15:49 | borkdude | technomancy yeah :) |
| 16:00 | hyPiRion | technomancy: Seems like the publicity pushed Leiningen over 2k faves. Wohoo! |
| 16:01 | technomancy | hyPiRion: only 200 to go to beat emacs starter kit, heh |
| 16:02 | technomancy | but I am still super confused about how starring vs watching works in github now |
| 16:02 | technomancy | I don' think I've ever starred anything since they switched things up |
| 16:03 | bruceadams | watching turns on emails. starring doesn't do very much. |
| 16:03 | hyPiRion | starring autocompletes in search fields |
| 16:05 | xeqi | star = publically vote for this project ; watch = I'm actually interested |
| 16:05 | Raynes | star = utterly useless |
| 16:06 | Raynes | watch = utterly useless unless you want an email about every single thing that happens in the repo, including the author farting. |
| 16:06 | brehaut | star = measurement contest |
| 16:06 | pjstadig | star = keep it in a list of projects so i can see what is happening with it |
| 16:06 | pjstadig | watch = get e-mails when people do PR's etc |
| 16:10 | bbloom | Raynes: i've been finding that stars yield a somewhat interesting feed |
| 16:10 | bbloom | it's pretty hard to scan |
| 16:11 | bbloom | but otherwise, it's worth skimming every few days to see what projects are up to |
| 16:18 | seangrove | Harumph |
| 16:18 | seangrove | I'd personally rather see cljs CI integrated with Sauce Labs than testling |
| 16:19 | seangrove | And I'm sure having worked there years ago and having built a considerable amount of the system in no way biases my perception |
| 16:19 | xeqi | seangrove: what are you using for cljs tests? |
| 16:20 | seangrove | xeqi: Nothing for now. I tried for two days a month ago to get it running, couldn't get it to work at all, and no help on the mailing list |
| 16:20 | seangrove | I may revisit it soon now that the release is almost ready and I have a better idea what I'm doing with cljs now |
| 16:32 | DigitalJack | I'm giving emacs a spin after being away for a few years.. I'm struggling with nrepl.el and getting nrepl-jack-in to work with a project. Any suggestions for debugging my setup? (emacs 24.2, osx 10.8, lein 2.0.0) |
| 16:35 | DigitalJack | I've been able to start a repl from the command line via "lein repl" and connect nrepl.el to the running repl. I'm wondering if it's a path issue. |
| 16:39 | frozenlock | DigitalJack: IIRC, you need to be in the same path as your project.clj before running nrepl-jack-in. |
| 16:40 | frozenlock | Nope, I was wrong. |
| 16:42 | DigitalJack | frozenlock: I'll see if I can figure out how to set a breakpoint or otherwise examine the environment. |
| 16:43 | warz | hm, if im in a lein repl, and i started a web server, how do i kill it? on windows, ctrl-c doesn't seem to do anything. |
| 16:44 | hyPiRion | Ctrl-D ? |
| 16:45 | warz | doesn't work either |
| 16:49 | frozenlock | warz: (server/stop my-server) ? |
| 16:50 | frozenlock | Or rather, the `stop' function on your server symbol |
| 16:50 | warz | input is blocked. i started a ring web server, and its blocking repl input now. i had to kill the java process. |
| 16:51 | brehaut | warz: :join? false |
| 16:51 | brehaut | in your ring options map |
| 16:52 | brehaut | oh wait, you are using lein ring. i have no idea then |
| 17:03 | maio | any heroku+clojure expert here? :) I would like to run DB migrations (clojure code) during build/deploy. any idea how to do that? |
| 17:05 | technomancy | maio: if you include an executable bin/build script it will be run instead of the standard `lein compile :all` |
| 17:05 | technomancy | you can put migrations in there |
| 17:05 | pjstadig | maio: i'm biased about https://github.com/pjstadig/migratus |
| 17:05 | ChongLi | damn, who thought structured clone was a good idea? |
| 17:05 | ChongLi | damn web workers :( |
| 17:06 | ChongLi | why can't they give us shared access to immutable data structures? |
| 17:06 | pjstadig | maio: but it depends on your use case, and if you have something small you can do what clojars does https://github.com/ato/clojars-web/blob/master/src/clojars/db/migrate.clj |
| 17:08 | pjstadig | oh you were just looking for the mechanism |
| 17:09 | technomancy | pjstadig: do you use downward migrations at work? |
| 17:09 | technomancy | just curious |
| 17:09 | maio | pjstadig: ah nice to see you here :) I have been looking at several migration tools yesterday - migratus included :) |
| 17:09 | pjstadig | technomancy: i'm not a fan of them |
| 17:09 | pjstadig | we write them, but i doubt they're tested enough |
| 17:09 | pjstadig | or at all |
| 17:10 | technomancy | pjstadig: seems like most people (who have actually tried them) aren't fans |
| 17:10 | pjstadig | they might work if you're more disciplined about actually testing deploy failure scenarios |
| 17:10 | maio | pjstadig: then I decided to practice Clojure little bit and wrote simple&stupid implementation https://gist.github.com/4575985 |
| 17:10 | maio | technomancy: thanks. I will try that |
| 17:11 | maio | I'm writing rollback scripts but I never had to use them so I'll probably stop doing that :) |
| 17:12 | pjstadig | maio: nice! |
| 17:12 | pjstadig | if migratus can be helpful i'd be pleased, but if something simple works, then stick with it |
| 17:13 | pjstadig | i'm a fan of not introducing complexity unless/until it's necessary |
| 17:15 | maio | this is my first real Clojure code and I will just use it for toy project for now. I could use something more sophisticated later on I guess :) |
| 17:15 | pjstadig | i've been hacking on this today https://github.com/pjstadig/clojurescript/tree/elisp |
| 17:18 | bbloom | pjstadig: is that a clojurescript to elisp transpiler? |
| 17:18 | pjstadig | yup |
| 17:18 | bbloom | pjstadig: heh. cool. what's the status? |
| 17:18 | brehaut | thats both cool and terrifying |
| 17:18 | maio | clojure -> emacs lisp? :) cool! |
| 17:19 | pjstadig | compiles def, fn, multi-arity functions, variadic functions, set!, try/catch, loop, recur |
| 17:19 | pjstadig | doesn't do deftype or defrecord yet |
| 17:19 | bbloom | neat |
| 17:19 | pjstadig | but deftype and defrecord are going to be tougher |
| 17:19 | pjstadig | oh it does letfn too, which was a bit tricky |
| 17:20 | maio | pjstadig: is there some real usecase that you have? or do you just hack it for fun now? |
| 17:21 | bbloom | pjstadig: have you needed to change the analyzer at all? or just core & compiler.clj ? |
| 17:21 | pjstadig | just core & compiler so far |
| 17:21 | pjstadig | maio: um, mostly for fun i guess, it would be cool to use clojure and persistent datastructures when writing emacs scripts |
| 17:22 | bbloom | pjstadig: please keep some notes on your experience & share them w/ the dev mailing list. there's a bunch of folks interested in making the clojurescript compiler be more amenable to additional backends |
| 17:23 | pjstadig | sure |
| 17:23 | pjstadig | though there are definitely some issues, elisp is mostly cheating |
| 17:23 | pjstadig | it was more about removing code than adding code |
| 17:24 | pjstadig | and i've done all the low hanging fruit :) |
| 17:24 | pjstadig | next are deftype and defrecord |
| 17:27 | Raynes | bbloom: I may or may not have used you as an example without asking first in that "cljs is hard to contribute to" thread. I apologize. |
| 17:30 | bbloom | Raynes: my skin is thicker than most because my ego is disproportionately and unjustifiably large |
| 17:30 | Raynes | bbloom: Well, I used you as a good example. |
| 17:30 | bbloom | Raynes: thanks for helping justify my ego :-P |
| 17:31 | bbloom | but yeah, apologizing would have been the right thing to do if i were pretty much anyone else... heh so thanks :-) |
| 17:34 | warz | where does leiningen store project dependencies? i see that it downloads them, but where do they go? |
| 17:34 | bbloom | warz: lein doesn't do it itself, it delegates to some maven ecosystem tools... they put that stuff in ~/.m2 |
| 17:41 | bbloom | i think i need to start a new rallying cry: "death to def". i hate any macro that "installs" something like defmethod |
| 17:42 | bbloom | it sucks for all the same reasons i hate programs that "install" things.... i'm not granted a cleanup burden and an ambiguous state |
| 17:42 | bbloom | and then there's sort of the opposite problem for defonce |
| 17:44 | Anderkent | subseq doesnt return a sorted collection? Why? |
| 17:49 | borkdude | I tried org-mode and a clojure code fragment, with minted (pygments) as the highlighter. This works well for org-mode -> latex, but in org-mode -> html there is no highlighting. is there someone here who got this working? |
| 17:50 | bbloom | Anderkent: not sure... the sorted interface has a seqFrom method... might not be straightforward to implement that on a seq already produced via seqFrom on something else |
| 17:52 | bbloom | Anderkent: subseq returns a seq, not a collection, that's why |
| 17:52 | bbloom | Anderkent: you'd need a per type sub-thing |
| 17:52 | bbloom | like subvec or submap or subset |
| 17:52 | bbloom | subseq always returns an ISeq, which isn't sorted |
| 17:53 | bbloom | unfortunately, it may be impossible to implement submap or subset without access to the internals of the underlying type |
| 17:53 | Anderkent | gah. w/e, I'll just do drop-while and promise it's sorted :) |
| 17:54 | bbloom | Anderkent: it's an interesting thought tho to provide submap and subset |
| 17:54 | bbloom | but that's why :-) |
| 17:58 | amalloy | bbloom: even with access to the internals submap and subset are hard to produce |
| 17:59 | amalloy | subseq is fine because it just takes a slice out of a well-balanced tree and turns it into a seq; how do you get that slice and still guarantee performant modifications to it? |
| 18:02 | emezeske | technomancy: There used to be a leiningen.core.eval/*prepping?* -- did the need for that go away at some point? |
| 18:11 | jballanc | what's the suggested way to manage different deployment environments for a Ring app? Do people use RING_ENV? |
| 18:16 | akhudek | jballanc: I just have a dev mode that is toggled via a command line parameters (I start jetty via the jetty adapter, not lein-ring) |
| 18:17 | jballanc | hmm...I'm using Leiningen, so I could stick it in the deployment descriptor and use the immutant registry |
| 18:17 | jballanc | ...just seems like that's a bit fragile |
| 18:18 | akhudek | jballanc: if you are starting things from lein, you could perhaps use lein profiles to do it |
| 18:19 | jballanc | hmmm...that's not a bad idea... |
| 18:38 | Wraithan | So avoiding the HTML DSLs out there, is fleet the standard for html templating or are there others that are more prefered? |
| 18:38 | brehaut | i dont think fleet is any kind of standard |
| 18:39 | brehaut | various moustache implementations have more traction |
| 18:39 | brehaut | and i dont know if you include enlive etc in HTML DSLs |
| 18:39 | clojurebot | Excuse me? |
| 18:40 | brehaut | clojurebot: nobody asked you |
| 18:40 | clojurebot | excusez-moi |
| 18:40 | jballanc | heh...clojurebot has a sense of humor |
| 18:40 | brehaut | he does |
| 18:40 | SrPx | o.o |
| 18:40 | brehaut | ~botslap |
| 18:40 | clojurebot | It's greek to me. |
| 18:40 | jballanc | ~botsnack |
| 18:40 | clojurebot | Thanks, but I prefer chocolate |
| 18:40 | brehaut | ~botsmack |
| 18:40 | clojurebot | clojurebot evades successfully! |
| 18:40 | jballanc | ~chocolat |
| 18:40 | clojurebot | Excuse me? |
| 18:40 | jballanc | ~chocolate |
| 18:40 | clojurebot | Cool story bro. |
| 18:41 | jballanc | sometimes I think I prefer lazybot |
| 18:41 | brehaut | Wraithan: theres also a django style library under development if your predilection go that way |
| 18:41 | Wraithan | brehaut: yeah, that is DSL |
| 18:41 | brehaut | the line between DSL and API is blurry and strange |
| 18:41 | Wraithan | brehaut: you don't write any html itself, you write clojure and it generates html, that is a DSL imo |
| 18:41 | amalloy | also mostly useless |
| 18:42 | brehaut | Wraithan: that is completely untrue WRT to enlive |
| 18:42 | amalloy | (the line) |
| 18:42 | brehaut | amalloy: indeed |
| 18:42 | Wraithan | brehaut: from reading their readme on their repo it looks like pure DSL to me, guess I could be wrong |
| 18:42 | brehaut | Wraithan: yes, you are wrong |
| 18:43 | brehaut | Wraithan: enlive transforms existing HTML documents. all your HTML is written in pure HTML |
| 18:43 | Wraithan | ah |
| 18:43 | Wraithan | that sounds terrible |
| 18:43 | Wraithan | haha |
| 18:43 | Wraithan | I misread how it worked. |
| 18:43 | bbloom | amalloy: it's a good point. but you don't necessarily need performant modification, maybe only to preserve the performance characteristics of lookup |
| 18:43 | amalloy | bbloom: if you just want to look things up, you don't need a submap at all |
| 18:43 | brehaut | Wraithan: its docs are opaque when you dont already know enlive |
| 18:44 | brehaut | Wraithan: but it is a great model for working with html |
| 18:45 | brehaut | Wraithan: if you wish to use a greenspun templating language, there are plenty of those around however. you can use many of the ones for Java etc too |
| 18:45 | bbloom | amalloy: *shrug* i haven't really thought about this much at all, i only thought as far as why it doesn't exist :-P that's all he asked, heh |
| 18:46 | bbloom | or rather why subseq is not sorted, and the answer to that is that subseq != submap or subset.... the question of why those don't exist is a whole other matter :-) |
| 18:50 | weavejester | Wraithan: There is also Clostache and Stencil for moustache templating |
| 18:50 | weavejester | Wraithan: Comb for erb-like templating |
| 18:50 | Wraithan | Think I am going to use clabango |
| 18:50 | weavejester | Wraithan: And laser for enlive-like HTML insertion |
| 18:50 | Wraithan | it is cloest to django/jinja2 which I know |
| 18:51 | brehaut | theres also https://github.com/sjl/dram for django style |
| 18:51 | weavejester | I hadn't come across clabango before. Or dram |
| 18:51 | weavejester | Oh, but dram says do not use |
| 18:51 | Wraithan | yeah, lol |
| 18:53 | brehaut | [smartarse comment here] |
| 18:54 | weavejester | Added Clabango to clojure-toolbox |
| 18:55 | brehaut | clojure toolbox has gotten quite large since i last looked |
| 18:56 | brehaut | weavejester: http://www.luminusweb.net might fit under web framworks too |
| 18:56 | weavejester | Oh yeah, I keep forgetting that |
| 18:59 | brehaut | the template languages list is getting absurd :P |
| 18:59 | brehaut | likewise SQL abstractions |
| 19:00 | brehaut | weavejester: is clojureql still a thing? |
| 19:00 | weavejester | brehaut: docs updated 18 days ago |
| 19:00 | brehaut | huh well there you go |
| 19:01 | weavejester | dependency on Clojure 1.4.0 |
| 19:01 | brehaut | well thats good to see. i had the impression it had died a sad death |
| 19:03 | amalloy | nothing sadder than a guy with a hole clean through his abdomen insisting he's not dead, brehaut |
| 19:03 | brehaut | lol |
| 19:11 | weavejester | BTW, if anyone has any suggestions for libraries for clojure toolbox, let me know |
| 19:11 | brehaut | weavejester: if you want a 'stupid crap that shouldnt have been invented but now i have to support anyway' category, ive got a lib for you |
| 19:12 | hiredman | dnolen: (logic/run [q] (logic/fresh [a b c])) is throwing and exception during macroexpansion for me with the beta4 to the lastest rc of core.logic |
| 19:12 | Raynes | necessary-evil |
| 19:12 | Raynes | brehaut is a one trick pony |
| 19:12 | brehaut | thats right |
| 19:12 | weavejester | brehaut: If you don't want people finding it, then maybe it should be left off the toolbox. :) |
| 19:12 | dnolen | hiredman: run* or run n, there is no run like that. |
| 19:12 | Raynes | weavejester: You're missing https://github.com/kumarshantanu/basil under templating. |
| 19:12 | brehaut | weavejester: well, its xml-rpc i dont want people finding |
| 19:13 | hiredman | dnolen: is that a change? |
| 19:13 | Raynes | weavejester: Missing https://github.com/davidsantiago/hickory under html parsers. |
| 19:13 | edtsech | weavejester: foreplay.vim (Vim Integration) |
| 19:13 | Raynes | weavejester: Irclj is not an IRC bot, it is an IRC client library. |
| 19:13 | dnolen | hiredman: no there was never a run w/ no integer arg. |
| 19:13 | hiredman | oh, no |
| 19:13 | hiredman | hmmm |
| 19:13 | edtsech | weavejester: https://github.com/tpope/vim-foreplay |
| 19:13 | hiredman | well, run* there says wrong number of args passed to bind* |
| 19:15 | hiredman | my guess is because the macro expansion of bind* is doing ~@g-rest and g-rest must be nil |
| 19:16 | Raynes | weavejester: immutant is missing from wherever you'd put something like it. |
| 19:17 | weavejester | Raynes: Hmm, what would you call immutant? |
| 19:17 | Raynes | Confusing. |
| 19:18 | weavejester | Hah |
| 19:18 | Raynes | Honestly have no clue. |
| 19:18 | Raynes | Maybe add an "Application Servers" section or something. |
| 19:18 | weavejester | Yeah, though "application servers" isn't a very descriptive category... |
| 19:19 | Raynes | Which is probably why I still have trouble understanding what immutant is. |
| 19:19 | weavejester | I'll put Immutant in when I figure out a good category :) |
| 19:19 | hiredman | dnolen: I must have had some bad repl state left around, restarting it got rind of the bind* exception |
| 19:20 | weavejester | Maybe "JBoss Server" |
| 19:20 | Raynes | weavejester: Do you have 'fs'? |
| 19:21 | Raynes | You do not. |
| 19:21 | Raynes | https://github.com/Raynes/fs |
| 19:21 | weavejester | No, but I thought I did |
| 19:21 | Raynes | https://github.com/Raynes/clavatar for gravatar stuff, maybe. |
| 19:21 | Raynes | https://github.com/Raynes/tentacles for Github API interaction. |
| 19:22 | Raynes | https://github.com/Raynes/bultitude for finding namespaces. |
| 19:22 | weavejester | Those are all pretty unique libraries :) |
| 19:23 | amalloy | you need a section for "Raynes libraries" |
| 19:23 | amalloy | then they're easy to categorize |
| 19:23 | weavejester | Haha |
| 19:23 | Raynes | weavejester: Are you looking specifically for common task sort of things? |
| 19:23 | Raynes | Or do you mean "Wow, what category do I put those under." |
| 19:23 | dnolen | hiredman: good to hear |
| 19:24 | weavejester | Well, hm, bultitude could go with tools.namespace in a namespaces section |
| 19:24 | weavejester | Raynes: The latter |
| 19:24 | Raynes | Got it. |
| 19:24 | weavejester | Raynes: I don't want to create a lot of one-entry categories |
| 19:24 | Raynes | There is a new file system events library that is better than mine, but I can't think of what it is called. |
| 19:24 | weavejester | But sometimes I have to :) |
| 19:25 | algernon | Raynes: ojo? |
| 19:25 | Raynes | Yeah, I think so. |
| 19:26 | Raynes | It seems like a weird implementation, but it uses native java 7 stuff so it is automagically better than mine. |
| 19:26 | Raynes | weavejester: You could group https://github.com/drakerlabs/ojo and https://github.com/Raynes/filevents |
| 19:27 | weavejester | Raynes: I have a Filesystem Watcher category, which is kinda what they are |
| 19:28 | Raynes | weavejester: https://github.com/technomancy/serializable-fn, https://github.com/Raynes/innuendo, https://github.com/Raynes/ororo, |
| 19:28 | Raynes | weavejester: Also, sorry for throwing all my own projects at you. Just easy to remember those. :p |
| 19:29 | weavejester | Raynes: Nothing to apologize for! It's what I want :) |
| 19:29 | akhudek | oooh, serializable functions! |
| 19:29 | Raynes | akhudek: Indeed. clojail uses them extensively. |
| 19:29 | akhudek | Looks like something I could use. :-) |
| 19:29 | Raynes | akhudek: It isn't perfect, but it works well for certain things. |
| 19:31 | weavejester | Raynes: What does clojail use them for? |
| 19:33 | weavejester | Hm, I could have a category like "Web Service Clients" or "Web API clients" for libraries that interact with web APIs |
| 19:48 | weavejester | technomancy: ping |
| 19:52 | tomoj | ^:higher-order is just for humans? |
| 19:55 | TimMc | tomoj: Probably? I've not seen that used before... |
| 19:55 | JosephFritzll | how to make a gay fuck a woman? |
| 19:55 | JosephFritzll | shit her into cunt |
| 19:55 | TimMc | It could be designed for some tool or other. |
| 19:57 | TimMc | weavejester: Haha, you *did* add necessary-evil! |
| 19:57 | brehaut | lol |
| 19:57 | weavejester | TimMc: Well, if someone wanted XML-RPC... |
| 19:58 | tomoj | TimMc: I mean on leiningen tasks |
| 19:59 | TimMc | Oh, wouldn't know. |
| 20:06 | yedi | http://shenfeng.me/async-clojure-http-client.html |
| 20:10 | gdev | why another clojure http client? |
| 20:11 | weavejester | It looks like an easier async HTTP clinet |
| 20:11 | gdev | is it thread safe? |
| 20:11 | weavejester | Or client, even, if I could spell |
| 20:12 | weavejester | gdev: Presumably. Async stuff usually is, because it relies on a queue of events. |
| 20:13 | gdev | was it designed with server side in mind? |
| 20:13 | weavejester | gdev: Why would that matter? |
| 20:14 | weavejester | I mean, HTTP async clients are usually for server use |
| 20:14 | weavejester | But I can't think of any inherent difference between client and server in this case. |
| 20:14 | gdev | to make sure keep-alive is done right |
| 20:14 | weavejester | gdev: keep-alive in what sense? |
| 20:17 | TimMc | gdev: It sounds like you're just repeating stuff you're reading on that page... |
| 20:18 | gdev | yeah I was hoping someone could explain what those three highlights meant, but alas |
| 20:19 | JosephFritzll | how to make a gay fuck a woman? |
| 20:19 | JosephFritzll | shit her into cunt |
| 20:19 | gdev | well that was unexpected |
| 20:19 | JosephFritzll | gdev i know |
| 20:20 | weavejester | gdev: Well, clj-http is thread safe, so I'm not sure why that's a bonus. It's kinda something I'd expect from a HTTP lib |
| 20:21 | gdev | weavejester: I know, it's kind of funny that under "why another http client" it doesn't list any unique things |
| 20:22 | weavejester | gdev: I'd be interested in knowing how it handles persistent connections (presumably what it means by keep-alive done right) |
| 20:22 | weavejester | In clj-http, you can setup a connection pool… which come to think of it, I should really be using for a project I'm working on. |
| 20:26 | JosephFritzll | What is difference between nigger and barrel of shit? |
| 20:26 | JosephFritzll | its the barrel |
| 20:27 | brainproxy | JosephFritzll: that's inappropriate for this channel, seems to me |
| 20:27 | JosephFritzll | brainproxy i know |
| 20:27 | JosephFritzll | thats why im posting this |
| 20:27 | gdev | how do you mute someone? |
| 20:27 | JosephFritzll | gdev dont do this :( |
| 20:27 | brainproxy | gdev: someone w/ op access needs to do it |
| 20:28 | gdev | nevermind, figured it out |
| 20:29 | gdev | mr fritz, first person on my ignore list |
| 20:29 | JosephFritzll | gdev ur mother biitch |
| 20:29 | gdev | now, back on topic, http clients |
| 20:29 | brainproxy | jcowan, Chouser and rhickey are only nicks w/ op access |
| 20:29 | brainproxy | and none of them are around |
| 20:30 | Sgeo | Is Chousuke someone else? |
| 20:31 | scottj | Sgeo: yes |
| 20:32 | JosephFritzll | How to repeat holocaust? |
| 20:32 | JosephFritzll | need answer, fast, thanks in advance |
| 20:34 | JosephFritzll | Hodapp :) |
| 20:39 | TimMc | Hodapp: Just ignore. |
| 20:40 | Hodapp | TimMc: I didn't see his earlier lines, hence the quizzical look... |
| 20:43 | bbloom | gdev: i didn't even know i had an ignore list (although i assumed). +1 thanks |
| 20:48 | gdev | bbloom: =D glad I could help |
| 20:56 | TimMc | Raynes: I'm reading about vim text objects. It's an interesting take on the same editing problem that Emacs modes are used to solve. |
| 20:56 | bbloom | TimMc: text objects are crazy useful |
| 20:56 | bbloom | it's also why i don't bother with vim-parenedit or anything |
| 20:57 | bbloom | want to replace the contents of some parenthesis? cip |
| 20:57 | bbloom | er i mean ci) |
| 20:57 | bbloom | my fingers know it so much better than my brain |
| 20:58 | bbloom | want to replace the parens too? ca) |
| 20:58 | tpope | cib |
| 20:58 | technomancy | weavejester: pong |
| 20:58 | tpope | b stands for barentheses |
| 20:58 | weavejester | technomancy: Oh hi |
| 20:58 | technomancy | tomoj: ^:higher-order is for humans, yeah |
| 20:58 | bbloom | tpope: more likely "brackets" :-P |
| 20:58 | bbloom | tpope: i prefer to be explicit in case there are [ or { or whatnot |
| 20:58 | bbloom | but i guess i should learn to use b |
| 20:59 | bbloom | seems that b is the same as ( hmmm |
| 20:59 | tpope | it doesn't stand for brackets |
| 20:59 | tpope | barentheses, like I said |
| 20:59 | mthvedt | i prefer to use bar edit for those |
| 20:59 | bbloom | as i just discovered haha |
| 20:59 | weavejester | technomancy: I was wondering if Leiningen had any capability to only allow packages from a specific set of signatures |
| 20:59 | bbloom | mthvedt: heh. |
| 20:59 | technomancy | weavejester: not yet, but it's planned |
| 21:00 | weavejester | technomancy: Ah, thanks for the info |
| 21:00 | technomancy | so far all it can do is walk your deps tree and tell you for each thing whether it's signed or not |
| 21:00 | weavejester | technomancy: What command's that? |
| 21:00 | technomancy | that'd be `lein deps :verify` |
| 21:01 | weavejester | technomancy: Thanks |
| 21:01 | technomancy | I wonder if GitHub will still give me stats for my downloads or whether they're lost forever |
| 21:02 | weavejester | technomancy: Do you think it might be worth keeping a public page (https) of keys from prominant libraries/authors? |
| 21:02 | bbloom | technomancy: i tried tweeterizing at them, but apparently that won't bring back the traffic graph |
| 21:03 | xeqi | weavejester, technomancy: wonder if clojars should have say who its signed by (if anyone) |
| 21:03 | technomancy | weavejester: I think the existing public key servers might be enough for that, but showing the key fingerprint on the clojars profile page might be nice for cross-referencing |
| 21:04 | xeqi | is there a webpage for the trust server keys showing who has signed it? |
| 21:05 | technomancy | xeqi: http://keys.gnupg.net/pks/lookup?search=hagelberg&op=vindex |
| 21:06 | technomancy | huh; apparently I generated a key pair in 2005... that must have been right after reading Cryptonomicon. |
| 21:06 | TimMc | I need to find a guide on creating and managing GnuPG keys. |
| 21:07 | technomancy | I thought we linked to one somewhere from the lein docs, but I realize that discussion may have happened when I was delirious with illness. |
| 21:07 | TimMc | I see people say things like "I expire my encryption subkey every year but have no expiry on my signature subkey" and I have no idea what that means in practice. |
| 21:08 | TimMc | I understand RSA but not GPG. |
| 21:08 | technomancy | RSA is an algorithm |
| 21:08 | jaimef | you sign with one, and sign the one you use to encrypt, and revoke the one you use for encrypting. |
| 21:08 | technomancy | RSA:GPG::h246:mp4 |
| 21:09 | TimMc | technomancy: Yeah, and GPG is basically a wrapper around different algorithms, and I'd be using RSA. |
| 21:10 | jaimef | pki + your local key encrypted with rsa/others |
| 21:10 | TimMc | What I'm saying is that I understand what the two subkeys are for, but I don't know how they map to GPG keyfiles, etc. |
| 21:14 | technomancy | TimMc: start with `gpg --gen-key` |
| 21:15 | technomancy | `lein help deploying` will show you how to use that key to encrypt your clojars creds |
| 21:15 | technomancy | and it'll automatically use your key to sign artifacts upon deploying |
| 21:15 | TimMc | What expiry do I use? |
| 21:15 | technomancy | I recommend a year or two |
| 21:16 | TimMc | And before my signing key expires, I have to create a new one, sign it, and distribute it? |
| 21:16 | technomancy | yeah, that's the idea |
| 21:16 | Wraithan | So is there something I could do so my template files are lazy loaded? https://github.com/wraithan/leech-tracker/blob/master/src/leech_tracker/handler.clj |
| 21:17 | TimMc | technomancy: Does the encryption subkey get used ever? (with software signing keys) |
| 21:17 | TimMc | That is, is there a reason to/to not expire it? |
| 21:17 | technomancy | I'm not sure; I don't think you need to worry about it. |
| 21:18 | TimMc | And in practice, how the hell do you remember to refresh your keys? I hate things that need to be done yearly or even less often and don't have built-in reminders... |
| 21:18 | brehaut | TimMc: see also governments and anything to do with taxes |
| 21:19 | TimMc | brehaut: I *hear* about taxes every year, way before they're due. :-) |
| 21:19 | technomancy | so just refresh your keys when you do you taxes; problem solved |
| 21:19 | technomancy | =) |
| 21:19 | TimMc | haha |
| 21:19 | brehaut | TimMc: I live in fear that i have missed some important tax paying deadline and am in the red with the tax department |
| 21:20 | TimMc | I guess I should set my keys to expire in 2 years + 3 months, and roll them over every 2 years. |
| 21:21 | technomancy | TimMc: emacs has really good gpg integration; if you visit a file ending in ".gpg" it will ask for your passphrase and transparently encrypt/decrypt |
| 21:25 | TimMc | And is it smart enough to avoid saving the decrypted contents to a backup file? :-) |
| 21:27 | TimMc | I always worry about that with tools that helpfully offer to decrypt stuff in memory. |
| 21:28 | TimMc | (Having all-but-/boot encryption means having to worry far less about such things.) |
| 21:31 | warz | im having a hard time deciding what i want to try to make as my first attempt at a clojure app. |
| 21:31 | warz | beyond the simple stuff, and in-repl adventures |
| 21:31 | warz | i was thinking, an irc client maybe |
| 21:31 | warz | thats pretty universal |
| 21:33 | gdev | or a media player |
| 21:33 | TimMc | Other classics: Text editor, photo gallery, mail client (*shudder*). |
| 21:33 | gdev | I was thinking of writing a media player that played .clj files |
| 21:33 | gdev | you could hear your source code |
| 21:34 | xumingmingv | play .clj files sounds interesting ;) |
| 21:34 | warz | or just have it read your code, while layered over samples of other songs pulled from soundcloud or something. |
| 21:37 | gdev | I was thinking more of the characters in the file "plucking" a certain note. if all the notes in the list are harmonic then it won't sound like garbage |
| 21:38 | gdev | unless it encounters something non idiomatic, then it sounds like a piano crashing down the stairs |
| 21:38 | gdev | audible style checker of sorts |
| 21:40 | TimMc | I tried to cat core.clk to /dev/audio, but it seems to be missing. |
| 21:41 | metellus | try /dev/dsp |
| 21:43 | TimMc | No such. |
| 21:46 | TimMc | cat repos/clojure/src/clj/clojure/core.clj | aplay |
| 21:46 | TimMc | Well, that was a rather disturbing song. |
| 21:47 | warz | lol |
| 21:48 | TimMc | AFn.java is kinda cool. |
| 21:53 | TimMc | Holy cow, my Windows partition sounds better than some of the techno I've heard... |
| 21:53 | ivan | NTFS wubs |
| 21:53 | brehaut | lol |
| 21:53 | brehaut | TimMc: parellel invention of dubstep |
| 21:53 | TimMc | This is disturbingly good. |
| 21:54 | TimMc | bip bip bip bip biddle biddle bippa dip |
| 21:54 | brehaut | WUB WUB WUB |
| 21:55 | TimMc | helicopter interlude |
| 21:55 | brehaut | speed metal sample glitched up |
| 21:56 | TimMc | I just discovered another downside to encrypting one's hard drive. |
| 21:56 | gdev | cd /bin : cat * | aplay |
| 21:57 | gdev | the dog is barking at my laptop now, adds to the ambiance |
| 22:00 | TimMc | If I released an MP3 of an unencrypted home partition, I wonder how hard it would be for someone to read my files. :-) |
| 22:02 | gdev | hmmm, that would be interesting |
| 22:04 | gdev | can you set the number of channels when you record it? |
| 22:04 | gdev | manpage says you can. that seems to change the sound a bit, so they would have to know that |
| 22:05 | gdev | also you could play with the sampling rate as well |
| 22:08 | TimMc | aplay --channels 3 is freaky |
| 22:08 | warz | wish i were on linux, heh |
| 22:09 | muhoo | warz: only a vm away |
| 22:09 | gdev | the license for most linux distros aren't that expensive |
| 22:10 | warz | that is true, heh. i tried the other way around, earlier this week. i tried to make ubuntu my desktop OS, and run Windows on a VM. |
| 22:10 | warz | couldn't stick with it, though. |
| 22:10 | muhoo | i used the sound of an ext2 partition in a song |
| 22:11 | gdev | cat * | aplay --channels=3 --format=A_LAW --vumeter=stereo |
| 22:11 | gdev | mind=blown |
| 22:13 | muhoo | http://archive.org/download/KenRestivoInternetArchivePart1/mydisk.ogg |
| 22:14 | gdev | well aplay is cool, but my implementation would definitely sound less like skrillex demos and more like a harp being attacked by a pogo stick |
| 22:15 | TimMc | shut up and take my money |
| 22:15 | muhoo | that was the sample, i thimk the track it ended up in was http://archive.org/download/KenRestivoInternetArchivePart1/552-0.2.3.ogg |
| 22:17 | gdev | i like mydisk.ogg better |
| 22:17 | gdev | it's catchier |
| 22:18 | gdev | i've been playing with overtone this week, I'm sure there's something in there that could get me started |
| 22:18 | TimMc | overtone is ridiculously fun to play with |
| 22:20 | gdev | I could just make it so that your source code is the DSL. Parens could be mapped to drum kicks, operaters to high hats, macros mapped to the "wtf boom.wav" |
| 22:21 | gdev | you could hear your code recurring |
| 22:23 | TimMc | There's an old bit of computing lore wherein (IIRC) a speaker was hooked up to a computer's CPU, and the programmers could hear what parts of the program the computer was executing. Interesting tracing technique. |
| 22:26 | xumingmingv | Is it possible to hear some bug out of its sound ;) (If the source code sounds too terrible) |
| 22:26 | muhoo | a program is rather like a composotion to me |
| 22:27 | gdev | well the same way we have "code smells" after a while you could have "code sounds" |
| 22:27 | gdev | "that function sounded too long, might have to break it up into sub-melodies" |
| 22:28 | gdev | "this http client needs more cowbell" |
| 22:28 | muhoo | get into paralellism and concurrency and you have counterpoint |
| 22:29 | xumingmingv | haha |
| 22:29 | gdev | yeah, I wonder what threadsafe code sounds like |
| 22:31 | gdev | whoah, I can see your thoughts |
| 22:31 | muhoo | the whole concept of immutability seems like using a nondestructive DAW |
| 22:31 | muhoo | "all the old takes are still there" |
| 22:32 | gdev | then the taxi pulls away with your records |
| 22:34 | gdev | hrm, wonder if I can turn my project into a full on synesteshia api |
| 22:41 | gdev | i like how 4clojure links an insanely hard problem after you solve one that required you to type in "1" |
| 22:46 | TimMc | Yeah, not sure why the order of problems is so bizarre sometimes. |
| 22:54 | aphyr | Anyone know where clojure.contrib.reflect went? clojure.reflect doesn't have any of the useful stuff for reading private fields, etc. |
| 22:55 | TimMc | wall-hacks? |
| 22:56 | aphyr | Ah, right, thanks |
| 22:57 | TimMc | muhoo: Here's a chunk of my Windows partition that had some interesting sounds, notably right near the beginning: http://dl.dropbox.com/u/5819239/win_skip-900kiB_count-2000kiB.ogg |
| 23:04 | WuHoUnited | does someobdy know why the following throws an excption |
| 23:04 | WuHoUnited | (defn rotate-char [rotation char] |
| 23:04 | WuHoUnited | (let [offset (int \a) |
| 23:04 | WuHoUnited | base (- (int char) offset) |
| 23:04 | WuHoUnited | newbase (mod (+ rotation base) 26)] |
| 23:04 | WuHoUnited | (char (+ offset newbase)))) |
| 23:04 | WuHoUnited | (rotate-char 13 \a) |
| 23:04 | WuHoUnited | while what should be identical, |
| 23:04 | WuHoUnited | (defn rotate-char [rotation char] |
| 23:04 | WuHoUnited | (let [offset (int \a) |
| 23:04 | WuHoUnited | base (- (int char) offset) |
| 23:04 | WuHoUnited | newbase (mod (+ rotation base) 26)] |
| 23:04 | WuHoUnited | (char (+ offset newbase)))) |
| 23:04 | WuHoUnited | (rotate-char 13 \a) |
| 23:04 | WuHoUnited | does not. (the only difference is whether the final char is called inside or outside the function) |
| 23:04 | WuHoUnited | that wasn't supposed to copy/paste like that. -_- |
| 23:06 | warz | hm, im trying to decide if i want ubuntu with unity, or to install ubuntu server and then install gnome or something. |
| 23:07 | WuHoUnited | oh whoops |
| 23:07 | WuHoUnited | i see what i did wrong |
| 23:08 | WuHoUnited | shadowed the definition of cahr |
| 23:20 | TimMc | WuHoUnited: In the future, please use a pastebin (such as refheap.com). |
| 23:48 | tomoj | is there a zipper-like data structure for a cycle which just supports left and right? |
| 23:48 | tomoj | is there a simpler representation? |
| 23:52 | TimMc | A cycle? |