2013-01-12
| 00:00 | bpr | M-, will bring you back to where you were before doing M-. |
| 00:02 | tmciver | Those are nice. Now if only I could remember to use them. |
| 00:17 | technomancy | nrepl's M-. is kinda broken since you can't do it on a fresh buffer |
| 00:18 | technomancy | who-calls would be nice, but swank's implementation was not very good |
| 00:18 | headshot | technomancy: upgraded to sun jdk 1.7.0_147, and things seem to work now, i was using sun jdk 1.6.0 |
| 00:18 | frozenlock | I miss swank-clojure C-c I :) |
| 00:19 | technomancy | headshot: weird, 1.6 should work fine |
| 00:20 | technomancy | frozenlock: I have a WIP to port that |
| 00:21 | headshot | at any rate, this is the bomb. thanks. |
| 00:21 | frozenlock | ٩(^‿^)۶ |
| 00:22 | headshot | now see if i can get it to work on osx |
| 00:22 | technomancy | frozenlock: https://github.com/technomancy/javert |
| 00:22 | frozenlock | "Nothing to see here yet. Move along." |
| 00:22 | technomancy | frozenlock: no nice client-side UI for it, but operates over stdout |
| 00:23 | technomancy | oops |
| 00:23 | technomancy | pushed |
| 00:23 | technomancy | https://github.com/technomancy/javert/blob/master/src/inspector/javert.clj |
| 00:27 | xeqi | anyone have nrepl's tab completion working for .clj buffers? |
| 00:27 | xeqi | only works at the repl for me atm |
| 00:30 | xeqi | hmm, M-tab works |
| 00:30 | xeqi | nm, looks like thats how it is suppose to be from the readme |
| 00:31 | frozenlock | technomancy: I shall meditate on this. Usually I was just jumping on bean everything I needed to see something. |
| 00:33 | bpr | frozenlock: what was swank-clojure's C-c I? |
| 00:34 | tomoj | bpr: this is `C-c I clojure.lang.ISeq`: https://www.refheap.com/paste/5f0da2122eaba374846108061 |
| 00:35 | tomoj | supposedly it's navigable, though that never worked for me |
| 00:43 | bbloom | tomoj: thanks again for the help with the reducers stuff. it paid off :-) |
| 00:44 | bbloom | tomoj: the transducers stuff is all polished up and available in this file https://github.com/brandonbloom/fipp/blob/master/src/bbloom/fipp/transduce.clj |
| 00:48 | frozenlock | Could someone explain to me what's the difference between macroexpand and macroexpand-1? They seem to do the same thing... |
| 00:48 | tmciver | macroexpand-1 only does one level of macro expanding. |
| 00:49 | frozenlock | Oh! And I have only have one level... I see... |
| 00:49 | frozenlock | Thanks :) |
| 00:49 | tmciver | np |
| 00:50 | bbloom | ,(macroexpand '(-> a b c d)) |
| 00:50 | bbloom | ,(macroexpand-1 '(-> a b c d)) |
| 00:50 | clojurebot | (d (clojure.core/-> (clojure.core/-> a b) c)) |
| 00:50 | clojurebot | (clojure.core/-> (clojure.core/-> a b) c d) |
| 00:50 | bbloom | ,(clojure.walk/macroexpand-all '(-> x f y z)) |
| 00:50 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.walk> |
| 00:50 | bbloom | &(clojure.walk/macroexpand-all '(-> a b c d)) |
| 00:50 | lazybot | ⇒ (d (c (b a))) |
| 00:50 | bbloom | (> lazybot clojurebot) |
| 00:51 | bbloom | frozenlock: i think the threading macro is the easiest illustration ^^ |
| 00:52 | tpope | I think it's the worst example ever |
| 00:52 | tpope | especially if you're trying to explain -> |
| 00:58 | technomancy | what HTTP response code would you use for a resource that's not ready yet? |
| 00:58 | technomancy | 202? |
| 00:58 | bbloom | tpope: well it demonstrates that macroexpand doesn't walk into subforms, only the first form |
| 00:59 | headshot | technomancy: 1.1, yeah |
| 01:01 | amalloy | an easier example is probably something like ##((juxt macroexpand-1 macroexpand) '(with-in-str "foo" (read)))) |
| 01:01 | lazybot | ⇒ [(clojure.core/with-open [s__4498__auto__ (clojure.core/-> (java.io.StringReader. "foo") clojure.lang.LineNumberingPushbackReader.)] (clojure.core/binding [clojure.core/*in* s__4498__auto__] (read))) (let* [s__4498__auto__ (clojure.core/-> (java.io.StringReader.... https://www.refheap.com/paste/8408 |
| 01:01 | amalloy | but i had a surprisingly hard time finding a clojure.core macro whose macroexpand is non-trivially different from its macroexpand-1 |
| 01:03 | tpope | amalloy: that's a little better yeah |
| 01:04 | Sgeo | Oh dear god is someone using clojure.walk/macroexpand-all? |
| 01:26 | dsyang | hey all, my friend and I have decided to buckle up and learn clojure this coming semester in our free time |
| 01:28 | dsyang | it looks like clojure 1.5 is just about to be released, though so I'm not sure if we should use clojure 1.5-RC1 because it's about to be the stable version or stick with 1.4 |
| 01:28 | dsyang | thoughts? |
| 01:29 | tomoj | I'd go with 1.5.0-RC1, personally |
| 01:29 | tomoj | I don't know what would break if anything |
| 01:32 | dsyang | tomoj: thanks! Are there any major features that would change how we would write code? I looked through the changelog on git but honestly the terms don't make sense (yet) |
| 01:33 | dsyang | tomoj: It'd suck to learn one it one way from the books/tutorials online only to learn we should write it another way with 1.5 |
| 01:34 | technomancy | dsyang: everything in 1.5 is additive |
| 01:34 | technomancy | but the changes are very small |
| 01:34 | technomancy | as long as you avoid stuff written for 1.2 you'll be fine |
| 01:36 | dsyang | haha that shouldn't be too hard, unless 1.2 was just written a few months ago and development has been blazing fast :P |
| 01:36 | technomancy | well google really sucks at recency |
| 01:36 | technomancy | it will give you lots of out-of-date blagh posts |
| 01:37 | brainproxy | dsyang: the Clojure Programming book is great, btw |
| 01:39 | dsyang | technomancy: yea I've begun to notice the dates on all the posts... too bad SIO doesn't consider dates |
| 01:40 | dsyang | SEO* |
| 01:41 | dsyang | brainproxy: thanks for the tip! Any specific reason why it's so great or is it one of those everything-about-it-is-great |
| 01:41 | brainproxy | dsyang: it's the best O'Reilly book I've ever read |
| 01:42 | brainproxy | my coworker and I decided to take the Clojure plunge last May |
| 01:42 | brainproxy | we (carefully) worked through the book and all the examples in just under 4 weeks, and came away feeling confident that we had a decent grasp of how to start using the language |
| 01:44 | dsyang | Nice |
| 01:44 | brainproxy | it didn't turn us into clj ninjas, but was a great learning tool and I still refer back to it from time to time |
| 01:45 | dsyang | If you don't mind me asking, what kind of programming background did you guys have going into the book? |
| 01:45 | brainproxy | two pretty different backgrounds |
| 01:45 | brainproxy | for me: JavaScript, some Python and Ruby |
| 01:46 | dsyang | My friend and I are coming at it well-versed at ML-like functional languages but have had not lisp and very little JVM experience |
| 01:46 | brainproxy | for him: C/C++ freak, strong Java experience |
| 01:47 | brainproxy | neither of us had much functional experience, properly speaking, though I was already favoring a functional style in my JS/coffee programming |
| 01:48 | brainproxy | I had almost zero Java experience before jumping into Clojure, and it hasn't been that bad |
| 01:48 | brainproxy | certainly Leiningen shields you from having to deal with a lot of the Java tooling stuff, e.g. Maven |
| 01:49 | dsyang | nice, yea I took a look at http://jrheard.tumblr.com/post/40024238467/getting-started-with-clojure earlier |
| 01:50 | dsyang | sounds like clojure has some good tooling support |
| 01:50 | brainproxy | that post is okay, though getting started w/ lein can be easier than he suggests |
| 01:50 | brainproxy | i mean "even easier" |
| 01:50 | dsyang | oh? |
| 01:50 | brainproxy | http://news.ycombinator.com/item?id=5028165 |
| 01:51 | brainproxy | if you're on linux/mac, just wget or curl the master script |
| 01:51 | brainproxy | make it +x and on your path |
| 01:51 | brainproxy | then when you run it the first time, it will bootstrap itself |
| 01:51 | dsyang | woah |
| 01:51 | brainproxy | as long as you have Java installed already, you're good to go |
| 01:52 | dsyang | nice thanks for that link! |
| 01:52 | brainproxy | sure thing |
| 01:53 | dsyang | you guys didn't have to use IDEs right? I mean, I've heard clojure doesn't need them, but not sure is it easier with IDEs |
| 01:53 | brainproxy | what editor do you use currently? |
| 01:55 | brainproxy | there is a good plugin for Eclipse called "counterclockwise", but a lot of devs find they get by just fine with Emacs or vim |
| 01:56 | dsyang | emacs |
| 01:56 | hiredman | http://chart.apis.google.com/chart?chxl=0:|0|138|276|414|552|690|828|1:|Other+%E2%80%94+10%25|Clooj+%E2%80%94+3%25|Command-line+REPL+%E2%80%94+26%25|Vim+%2B+vimclojure+%E2%80%94+23%25|Textmate+%2B+textmate-clojure+%E2%80%94+3%25|NetBeans+%2B+Enclojure+%E2%80%94+1%25|IntelliJ+%2B+La+Clojure+%E2%80%94+11%25|Emacs+%2B+SLIME+%E2%80%94+52%25|Emacs+%2B+inferior-lisp+%E2%80%94+6%25|Eclipse+%2B+Counterclockwise+%E2%80%94+18%25&chxs=0,000000,1 |
| 01:56 | dsyang | no SLIME though |
| 01:56 | brainproxy | I'm getting a lot of mileage out of Emacs 24 (http://emacsformacosx.com/) together with the "clojure-mode" and "paredit" |
| 01:57 | dsyang | yea I'm using emacs 24 too |
| 01:57 | hiredman | http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/ from the state of clojure 2012 survey |
| 01:57 | dsyang | just spent all day rewriting my .emacs to not use emacs-prelude |
| 01:57 | brainproxy | dsyang: you don't by chance happen to be using bbatsov's "prelude" for Emacs 24? |
| 01:57 | dsyang | hiredman: your link is giving me a 404 :( |
| 01:58 | dsyang | that's what I was using yes |
| 01:58 | brainproxy | dsyang: then you're good to go |
| 01:58 | brainproxy | bbatsov/prelude has clojure-mode and the rest of the goodies you need already included |
| 01:58 | hiredman | dsyang: which one? if it is the long one then most likely whatever your url clicker is isn't recognizing the whole url |
| 01:58 | brainproxy | hiredman: any chance you could run that link through bit.ly? |
| 01:58 | dsyang | the long one, I'll try again |
| 01:59 | hiredman | brainproxy: just go to cemericks post if you can't be bothered to copy and paste the whole url |
| 01:59 | hiredman | everything is there |
| 01:59 | brainproxy | hiredman: sure, it's just my IRC client makes it cumbersome to copy/paste long things that span multiple lines |
| 01:59 | brainproxy | but I'm on the post now |
| 02:00 | hiredman | 5NS |
| 02:00 | hiredman | pardon me |
| 02:00 | dsyang | brainproxy: I _was_ using prelude, but it had too much stuff I didn't need and didn't understand so I took it out and added in just the stuff I wanted |
| 02:01 | brainproxy | dsyang: i see, well the main things you want are clojure-mode and paredit |
| 02:01 | dsyang | clojure-mode I have, what's paraedit? |
| 02:01 | brainproxy | dsyang: http://emacswiki.org/emacs/ParEdit |
| 02:02 | brainproxy | http://www.emacswiki.org/emacs/PareditCheatsheet |
| 02:02 | dsyang | ah right, my b |
| 02:05 | dsyang | what are y'alls thoughts on SLIME? |
| 02:05 | bpr | dsyang: all you really need to do to get emacs working is follow the instructions here: https://github.com/kingtim/nrepl.el |
| 02:06 | bpr | (after setting up leiningen) |
| 02:06 | brainproxy | the general consensus seems to be that nREPL is the future |
| 02:06 | brainproxy | i'm still using lein-swank and swank-clojure to good effect (which makes use of SLIME as embedded in clojure-mode) |
| 02:07 | bpr | dsyang: if you choose to use nrepl.el take note of: https://github.com/kingtim/nrepl.el/issues/187 |
| 02:09 | Raynes | brainproxy: Get that festering infection out of your emacs immediately. |
| 02:10 | dsyang | bpr: thanks for the heads up, I think i will go with nrepl, am I correct in that networked repls like this are used so clojure doesn't have to restart java everytime you want to evaluate something? |
| 02:10 | Raynes | dsyang: It's so you can have a REPL inside of Emacs, over a network, etc. |
| 02:10 | Raynes | But yes, you don't have to restart every time. |
| 02:10 | bpr | essentially. Lisps typically have a REPL-oriented development flow |
| 02:11 | dsyang | ah I see |
| 02:11 | Raynes | bpr: That issue looks to be fixed. |
| 02:11 | bpr | keeping the REPL workflow is the primary motivation for nrepl/slime/etc. |
| 02:11 | bpr | Raynes: on master |
| 02:11 | Raynes | bpr: Yes. I use master. |
| 02:11 | bpr | i don't believe it has been released to marmalade yet |
| 02:11 | bpr | ah |
| 02:11 | Raynes | Everybody should use master. Master is great. |
| 02:12 | Raynes | :p |
| 02:12 | bbloom | life without a repl isn't worth living... |
| 02:12 | bpr | ^ |
| 02:12 | frozenlock | ^ |
| 02:12 | bbloom | how do i teach one of the bots to occasionally say that? |
| 02:12 | Raynes | bbloom: If you ever find yourself without a REPL, I promise to end it quickly. |
| 02:12 | dsyang | moreso than other REPL-enabled languages? I know when I write python I figure out the function calls in a REPL then write code |
| 02:12 | brainproxy | Raynes: i tried nREPL a few times in recent months, it felt clumsy to me compared to the experience w/ the swank stuff |
| 02:12 | bbloom | Raynes: you're starting to scary me buddy |
| 02:12 | bbloom | scare* |
| 02:13 | Raynes | dsyang: Clojure (and most Lisps) are designed in such a way that you can generally write your whole program in a repl if you want. |
| 02:13 | Raynes | ;) |
| 02:13 | bpr | dsyang: yes. it's commonly the case that you can write an entire program/feature without shutting down the program |
| 02:14 | Sgeo | This makes me feel bad for trying to like Racket |
| 02:14 | Sgeo | DrRacket is a bit too much... "restart it if you want to change the code" |
| 02:14 | brainproxy | why? |
| 02:14 | clojurebot | why not? |
| 02:15 | Sgeo | And Geiser (for Emacs) sort of mollifies this I guess, but even there, exceptions are fatal |
| 02:15 | bpr | here's a cool demo of what a repl can enable: https://www.youtube.com/watch?v=MTxNnYfWHOw |
| 02:15 | Sgeo | (like in Clojure, but unlike CL) |
| 02:15 | bpr | though that's about clojurescript rather than clojure... similar enough |
| 02:15 | bbloom | i prefer to restart my repl right before any major code push. i generally don't restart it when i'm working locally, but if i move around namespaces or make a lot of changes, and i want to push to a public repo. then i restart the repl to make sure that the code that's actually in the files loads correctly |
| 02:15 | bbloom | often, i don't even restart my repl when i do that, i just open a second repl and verify there |
| 02:16 | brainproxy | i find I use the REPL to spot-test the functions I've defined in disk-backed .clj files |
| 02:16 | Raynes | Good heavens, so many new changes in nrepl.el! |
| 02:16 | frozenlock | bpr: And now my last productive drop for the night is gone. -_- |
| 02:16 | Raynes | I haven't updated in ages, so this is exciting. |
| 02:16 | brainproxy | that is, I have lein-ring auto-reloading my namespaces |
| 02:16 | bpr | frozenlock: haha |
| 02:17 | brainproxy | and the REPL server is embedded in my web app |
| 02:17 | frozenlock | Wait.. is this where the clojure conj videos are? Blip didn't change since last year. |
| 02:18 | dsyang | wow. Thanks for all the great info guys! |
| 02:18 | brainproxy | nowadays though I'm starting to put more and more functions inside Datomic |
| 02:18 | bpr | frozenlock: it looks like it is. though i'm not involved with posting clojure vids |
| 02:18 | dsyang | especially the clojure/emacs stuff |
| 02:18 | brainproxy | which introduces ... other issus |
| 02:18 | brainproxy | but sure it fun :D |
| 02:18 | brainproxy | *is |
| 02:18 | dsyang | what about clojure/vim integration? I ask because my friend that I'm working with is a vim-gal |
| 02:18 | frozenlock | brainproxy: is datomic open source yet? :) |
| 02:18 | brainproxy | frozenlock: no... wish it was, maybe one day |
| 02:18 | bpr | i guess the new vim hottness is foreplay |
| 02:19 | Raynes | dsyang: vim-foreplay. |
| 02:20 | tpope | ;) |
| 02:20 | Raynes | And for the sake of the universe and all things holy, don't make any jokes to her about it being called foreplay. She'll never forgive tpope. |
| 02:20 | brainproxy | anyone using vim-foreplay together with angular-strap? |
| 02:20 | tpope | I'm going to rename it |
| 02:21 | dsyang | hahaha |
| 02:21 | dsyang | no worries, thats one thing I'm not going to mention |
| 02:22 | jlewis | i'm curious, do you vim-foreplay users have a way to keep execution output around in a buffer somehow? |
| 02:22 | tpope | I spent like weeks fretting over the name, then picked foreplay.vim as a last minute impulse |
| 02:22 | ToxicFrog | Why did you pick that? |
| 02:22 | jlewis | even though it's way better of a vim plugin than vim-clojure, i do miss having an extra buffer for the output. |
| 02:22 | tpope | jlewis: I've got a solution like 80% of the way there |
| 02:22 | jlewis | ooh, that's exciting! |
| 02:22 | tpope | jlewis: there's a github issue for it. feel free to chime in |
| 02:23 | tpope | ToxicFrog: foREPLay |
| 02:23 | jlewis | i'll check it out |
| 02:23 | ToxicFrog | oh |
| 02:23 | tpope | 2am grep repl /usr/share/dict/words |
| 02:23 | tpope | HOLY SHIT THAT'S PERFECT |
| 02:23 | tpope | commit, push |
| 02:23 | brainproxy | :D |
| 02:24 | tpope | fireplace.vim was my working name |
| 02:24 | tpope | because foreplay isn't in /usr/share/dict/words on os x |
| 02:25 | dsyang | shame on os x |
| 02:25 | Raynes | tpope: Fireplace is nice, dude. Why did you use foreplay? |
| 02:26 | tpope | you know how your judgement starts to get weird around 2am? |
| 02:26 | tpope | maybe that's just me |
| 02:26 | Raynes | No. I wrote laser entirely at 2AM. |
| 02:26 | Raynes | I never do anything unless it is 2AM. |
| 02:26 | tpope | well I can still code at 2am |
| 02:27 | tpope | also, change 2am to wakeup time + 16 hours |
| 02:27 | tpope | 18 hours |
| 02:27 | dsyang | I think I've committed more between the hours of 2-6AM than 9-5... |
| 02:28 | Raynes | https://github.com/Raynes/laser/graphs/punch-card |
| 02:29 | tpope | https://github.com/tpope/vim-foreplay/graphs/punch-card *shrug* |
| 02:30 | tpope | not sure how useful that is, I rebase like nobody's business |
| 02:32 | bbloom | https://github.com/brandonbloom/fipp/graphs/punch-card <-- also got a nice 2am spike |
| 02:32 | bbloom | i like this comparing sleep habits game, it makes me feel slightly more like a human |
| 02:36 | dsyang | Speaking about sleep habits, I need to fix mine before school starts. Thanks for all the help guys! |
| 02:36 | bbloom | i'm sure somebody over in #haskell can lul you to sleep with a lecture about monads |
| 02:37 | dsyang | bbloom: won't help, I'd be fascinated |
| 02:55 | bpr | tomoj: SLIME/clojure-swank's C-c I is indeed very neat! |
| 02:57 | bpr | tomoj: do you happen to know what the name of the emacs function that implements that is? |
| 03:13 | amalloy | bpr: C-h k C-c I, tada |
| 03:14 | bpr | amalloy: i don't have slime installed... was trying to avoid installing it |
| 03:22 | amalloy | bpr: http://common-lisp.net/project/slime/doc/html/Inspector.html is on the first page of google results for `emacs "C-c I"` |
| 03:22 | bpr | haha |
| 03:22 | bpr | touche! |
| 03:22 | bpr | thanks :) |
| 03:23 | frozenlock | https://www.youtube.com/watch?v=xyGggdg31mc 40min... to learn that the code will be proprietary :( |
| 05:06 | tomoj | https://www.refheap.com/paste/66b52069e8fd888cf3f32d457 |
| 05:08 | bbloom | tomoj: hmm interesting. what are you using that for? |
| 05:10 | tomoj | mostly experimenting with it for ring client middleware |
| 05:14 | tomoj | but I also imagine e.g. writing combinators for reaching into a dominion game state |
| 05:17 | tomoj | sometimes I think about improper combinators and wonder if I just want factjor instead |
| 05:17 | bbloom | tomoj: cool. i'm interested to see how it turns out! i really like the idea of working with "paths" in the style of update-in, get-in, assoc-in |
| 05:17 | bbloom | which i assume is pretty much all you're doing internally |
| 05:18 | bbloom | it's a surprisingly effective strategy that has some of that magic feel when i first groked the utility of file systems as a programming model |
| 05:19 | bbloom | i hope that you get some cool results! i'm off to bed |
| 06:29 | juxovec | hi, is there anything like Acid-state (http://acid-state.seize.it/) for clojure? |
| 06:30 | juxovec | I mean some kind of "database" which seems like normal data structure, where I can do all functions map, filter and so on but is serialized to HDD automatically |
| 06:35 | sandbags | anyone know of a documentation app for the iPad that has the Clojure reference stuff in it? |
| 06:35 | sandbags | i have a web link to the clojure docs pages but it's not ideal for searching/browsing |
| 06:36 | aperiodic | why not load up the cheat sheet? that seem like it'd be more than handy enough |
| 06:36 | sandbags | meh |
| 06:36 | sandbags | it's okay |
| 06:37 | sandbags | but it'd be nice to have something optimised for doc browsing |
| 08:24 | gmontou | Can anyone recommend a good emacs color theme? |
| 08:33 | Raynes | gmontou: I use tomorrow-night. |
| 08:33 | Raynes | gmontou: Solarized is also nice. |
| 08:54 | hyPiRion | I use solarized light and find it delicious |
| 08:54 | hyPiRion | Though I'm a "I use white instead of dark"-kind of develpoer |
| 08:56 | babilen | gmontou: I've settled on wombat (on emacs, i tend to use molokai with vim), but there are plenty and you should try a few. |
| 09:06 | scottj | babilen: tried my wombat+ for emacs? |
| 09:07 | scottj | babilen: http://jaderholm.com/color-themes/color-theme-wombat+.el if you're interested |
| 09:07 | babilen | scottj: No, I did not. But I /very/ rarely use emacs these days. Either way: Where can I find it? And what is "+" about it? |
| 09:07 | babilen | merci |
| 09:07 | scottj | babilen: just a lot more faces than other wombat themes |
| 09:08 | babilen | scottj: Is it on elpa? |
| 09:08 | scottj | babilen: yeah it's an old version but good enough |
| 09:12 | hyPiRion | Oh, seems like Halloway pushed up Clojure RC2 just now. |
| 09:13 | hyPiRion | 1.5 that is. |
| 09:21 | babilen | hyPiRion: I don't see it on maven.org -- where did you find it? changelog somewhere? |
| 09:21 | hyPiRion | babilen: Oh, on github |
| 09:22 | babilen | Ah, right :) |
| 09:22 | sandbags | tpope: ping |
| 09:32 | hyPiRion | heh |
| 10:21 | tpope | sandbags: pong |
| 10:46 | sandbags | tpope: hi there ... wanted to talk about foreplay.vim if you've a minute? |
| 10:48 | bluebat | ,(+ 1 1) |
| 10:48 | clojurebot | 2 |
| 10:49 | tpope | sandbags: shoot |
| 10:50 | sandbags | tpope: so, first q... should it work okay with MacVim? |
| 10:50 | tpope | yes |
| 10:50 | sandbags | good start... okay so i updated to the latest MacVim last night, then followed the install instructions for foreplay with pathogen |
| 10:51 | sandbags | started lein repl in my project then opened a .clj file, used :Connect which seemed to work, but :cq seemed to blow MacVim up |
| 10:51 | tpope | blow up how? |
| 10:51 | sandbags | however it died without the usual OSX crash reporter... MacVim just vanished |
| 10:51 | sandbags | not sure if you use OSX, but there was no diagnostic report in ~/Library/Logs/Diagnostic Reports either |
| 10:52 | sandbags | although, apparently, Vim may log things somewhere else... but i've struggled to figure out where so far |
| 10:53 | tpope | try from the command line. symlink mvim to vim, then run that vim |
| 10:53 | tpope | you'll at least clearly see a crash |
| 10:54 | sandbags | not sure i follow... symlink mvim -> vim right? Does that change how mvim works? |
| 10:54 | tpope | it makes it spawn in the terminal |
| 10:54 | sandbags | gotcha |
| 10:56 | sandbags | okay so it still dies, but there's nothing printed to the console |
| 10:56 | tpope | does it look identical to what happens with ;q? |
| 10:56 | tpope | wait, what command are you running? |
| 10:56 | sandbags | ";q?" is a vim command? sorry i'm not a Vim expert |
| 10:57 | tpope | :q is how you exit vim |
| 10:57 | sandbags | ah the ; was what confused me |
| 10:57 | tpope | : not ; |
| 10:57 | sandbags | yes it's as if i had quit |
| 10:57 | sandbags | with :q |
| 10:57 | tpope | so what are you typing, exactly? |
| 10:58 | sandbags | ":cq" have I done something daft... i thought that was the command to execute stuff in the repl |
| 10:58 | tpope | no colon |
| 10:58 | tpope | :cq exits vim |
| 10:58 | sandbags | ah damnit |
| 10:58 | sandbags | yes of course, there's no ":" in your instructions |
| 10:58 | sandbags | brain fault |
| 10:58 | sandbags | sorry about that |
| 11:01 | sandbags | okay, working now ... of :cq i didn't put together that it would do the same as :q ... feel daft now :) |
| 11:02 | tpope | that's an unfortunate coincidence |
| 11:02 | tpope | :cq is how you quit with a nonzero exit status |
| 11:02 | sandbags | ah |
| 11:04 | sandbags | so Eval% is working great, the cq console is a bit baffling so far ... do i need to read up on Vim "q:" to understand it? |
| 11:05 | tpope | yeah |
| 11:05 | tpope | or start with cqp |
| 11:07 | sandbags | thx |
| 11:41 | technomancy | nrepl.el has as many open issues as leiningen, yikes |
| 12:00 | dbushenko | cemerick, hi! have you a minute? one question about Clojure Programming |
| 12:01 | dbushenko | is anyone here? |
| 12:03 | cemerick | dbushenko: shoot |
| 12:05 | dbushenko | great! |
| 12:05 | dbushenko | I'm helping in translating Clojure Programming to russian |
| 12:05 | dbushenko | and have the follwing misunderstanding: |
| 12:06 | dbushenko | p.21, sentence: "Vars are defined in Clojure using the def special form, which only ever acts within the current namespace." |
| 12:06 | dbushenko | well, as I see it, everything what is defined in Clojure, is immutable |
| 12:06 | dbushenko | so the symbol which I define with def is immutable, not variable |
| 12:06 | dbushenko | isn't it? |
| 12:07 | cemerick | dbushenko: namespaces are mutable |
| 12:08 | cemerick | What def does is intern (a.k.a. map) a symbol to a var within *ns* |
| 12:08 | dbushenko | so what is "var" in general? |
| 12:08 | cemerick | dbushenko: re: translation: are you working with O'Reilly? |
| 12:09 | dbushenko | no, the translator is working. I'm just helping him, correcting mistakes and so on |
| 12:09 | cemerick | dbushenko: A var is one of Clojure's reference types; it defines a stable, global identity. |
| 12:09 | cemerick | ah |
| 12:09 | dbushenko | so what about def? does it really define a var? |
| 12:10 | cemerick | Yes, that is its purpose. |
| 12:12 | dbushenko | hmmm... thanks... I have to read the documentation more precisely |
| 12:12 | cemerick | dbushenko: vars are covered in depth in...chapter 4 IIRC |
| 12:13 | dbushenko | aha, I see. but the differ from reference types such as ref or atom |
| 12:14 | dbushenko | they can be rebound, but not changed, aren't they? |
| 12:17 | cemerick | dbushenko: each reference type has its own particular change semantics |
| 12:17 | cemerick | vars can be redefined "forcibly" (via def) or atomically modified (via alter-var-root) or modified in a thread-local way (binding) |
| 12:19 | dbushenko | so when I define (def a 1), "a" is really a variable? |
| 12:21 | borkdude | dbushenko variable as in subject to change, yes |
| 12:22 | dbushenko | there is some global misunderstanding, I think. We don't use def-ed vars as variables, say in Java |
| 12:22 | dbushenko | we don't change them, we just read them |
| 12:23 | dbushenko | that's why I'm trying to understand whether I can call them "variables" at all |
| 12:23 | dbushenko | since they are (usually) immutable |
| 12:26 | AdmiralBumbleBee | variable implies it could be mutated |
| 12:26 | AdmiralBumbleBee | not that it _must_ be |
| 12:27 | AdmiralBumbleBee | and for that matter, it simply means a value in modern parlance |
| 12:29 | dbushenko | AdmiralBumbleBee, so you think, def-ed vars -- are "variables" in the meaning that they could be mutated? |
| 12:30 | cemerick | dbushenko: you shouldn't ever use the word for 'variable' to refer to any clojure reference type |
| 12:30 | cemerick | 'variable' implies unrestricted arbitrary mutation |
| 12:31 | dbushenko | yeah! that's what I really wanted to hear from you! thanks! |
| 12:31 | AdmiralBumbleBee | dbushenko: in clojure world, no |
| 12:31 | AdmiralBumbleBee | since a var is something specific |
| 12:32 | AdmiralBumbleBee | I thought I was in another channel |
| 12:32 | cemerick | 'var' is a technical term, and should probably be used literally |
| 12:34 | dbushenko | cemerick, great, thanks for your explanations! :-) |
| 12:49 | dbushenko | does clojure have any "operator" or all are functions? |
| 12:51 | borkdude | dbushenko clojure has primitives |
| 12:51 | borkdude | dbushenko like let, fn, def etc, they are built-ins |
| 12:52 | dbushenko | but I can redefine them |
| 12:52 | borkdude | dbushenko and a lot of core functions like + delegate to thing in RT.java |
| 12:53 | borkdude | dbushenko you can't redefine primitives like let, but you can redefine vars, even in clojure.core |
| 12:53 | dbushenko | well, looks like all of them are defined with "defn" |
| 12:53 | dbushenko | even "defmacro" |
| 12:53 | borkdude | dbushenko I mean you can't redefine def itself, but you can redefine what is deffed |
| 12:56 | borkdude | dbushenko with primitive, I actually meant the special forms here: http://clojure.org/special_forms |
| 12:57 | dbushenko | looks like you are right |
| 12:58 | dbushenko | but they aren't operators, they are special forms |
| 13:08 | jmorton | Does anyone have suggestions for a good problem to solve (after finishing the koans and project euler)? |
| 13:10 | ravster | hello all |
| 13:10 | dbushenko | try implementing a multithreading version of the 'find' utility. this is nice to see Clojure power in action |
| 13:11 | jmorton | dbushenko: ah, good idea… thanks :) |
| 13:12 | dbushenko | jmorton, btw, ping me if you will get a comparable with 'find' performance |
| 13:12 | dbushenko | I could reach the performance of my version of find only ten times slower than the original :-( |
| 13:14 | jmorton | alrighty, I'll see what I can come up with today and tomorrow… I'll ping you via github if that's okay |
| 13:14 | dbushenko | great! |
| 13:29 | hiteki | hi |
| 13:49 | thearthur | lein new is failing for me today complaining about missing dependency lein-newnew |
| 13:49 | thearthur | but only today? not yesterday? |
| 13:50 | thearthur | $ lein new hello Could not find artifact lein-newnew:lein-newnew:jar:0.3.7 |
| 13:51 | thearthur | (lein2 that is) |
| 13:55 | thearthur | nvermind, found the liein issue on this :) |
| 14:03 | lunamystry | Hello, I am new to clojure and emacs and I am trying to quickly get going with the brepl . |
| 14:04 | lunamystry | I am actually looking for something like lein cljsbuild auto |
| 14:04 | lunamystry | through the brepl though |
| 14:05 | lunamystry | for some reason lein cljsbuild once/auto just slows my system down and I can't run anything else when its busy running |
| 14:15 | ivan | lunamystry: you might want to nice -n 19 the thing, Closure Compiler uses all your cores |
| 14:31 | lunamystry | I will try it now ivan, I just realised that ClojureScript up and running recommends Oracle's jdk over openjdk so I just installed that |
| 14:32 | ivan | I can't imagine it making a difference for ClojureScript |
| 14:45 | pppaul | i'm using lein ring, and when i do `ctrl + c` i still have a program running in the background... |
| 14:46 | pppaul | how am i supposed to go about killing my server? |
| 14:47 | lunamystry | @ivan thank you for your suggestion. It seems to have worked. |
| 14:48 | lunamystry | I have firefox and lein cljsbuild auto running and clementine running. THIS could not happen before |
| 14:48 | weavejester | pppaul: ctrl-c should kill it. Which operating system are you using? |
| 14:50 | pppaul | ubuntu |
| 14:51 | pppaul | ubuntu 12.10 |
| 14:52 | weavejester | pppaul: Odd. Java processes should handle interrupts okay. |
| 14:52 | weavejester | pppaul: Have you set a :destroy function that might be taking a while? |
| 14:54 | pppaul | no :destory |
| 14:54 | pppaul | no :init |
| 14:55 | pppaul | maybe i should use those |
| 14:55 | weavejester | pppaul: Any background threads that might have been started which would cause the app to hang? |
| 14:56 | pppaul | rabbitmq thread |
| 14:57 | weavejester | pppaul: Maybe that's the issue |
| 14:57 | pppaul | ok, i'll look into it (have to fix that code anyway since it's maxing out my cpu) |
| 14:57 | pppaul | the :destory should kill that thread, i'm guessing |
| 14:58 | pppaul | any special stuff about :destroy? |
| 15:03 | yogthos | weavejester: ping? :) |
| 15:03 | weavejester | yogthos: what's up? |
| 15:04 | yogthos | weavejester: I was thinking when defining routes, you often end up doing something like (GET "/foo" [bar baz] (handle bar baz)) |
| 15:04 | weavejester | yogthos: That's true |
| 15:04 | callen | why does DropWizard have so much...crap? |
| 15:04 | yogthos | weavejester: would it make sense to allow defining routes by doing (GET "/foo" handle) and use whatever the function defines as the destructuring |
| 15:05 | yogthos | I imagine that would involve a bit of macro magic :) |
| 15:05 | weavejester | yogthos: It's an interesting idea |
| 15:06 | weavejester | yogthos: I'd need to think about it. |
| 15:06 | yogthos | weavejester: seems like it shouldn't clash with any existing functionality |
| 15:07 | weavejester | yogthos: It does add an new syntax though |
| 15:07 | yogthos | weavejester: yeah it's a bit different from all the other definitions where it's params then body |
| 15:08 | weavejester | yogthos: And you can already do something like (defn handle [{{:keys [bar baz]} :params}] …) |
| 15:08 | weavejester | yogthos: and then (GET "/foo" [] handle) |
| 15:08 | yogthos | weavejester: yeah I guess that isn't too bad, and more idiomatic |
| 15:09 | yogthos | weavejester: was just an idea :) |
| 15:09 | weavejester | yogthos: Ideas are good |
| 15:09 | weavejester | yogthos: There's certainly room for improvement |
| 15:10 | yogthos | weavejester: I think it's always good not to rush features in, once people start using something it's impossible to get rid of :) |
| 15:10 | headshot | *cough* rails |
| 15:10 | yogthos | :P |
| 15:10 | weavejester | yogthos: That's my thought too. However, if you have an ecosystem made out of small libraries, you can always create a new library to try something out |
| 15:11 | yogthos | the worst thing is when features start interacting in funny ways and then you have the extra mental overhead of keeping track of what does what |
| 15:11 | weavejester | Which reminds me about a pull request to Ring someone posted. |
| 15:11 | yogthos | weavejester: what'd they add? |
| 15:11 | weavejester | yogthos: https://github.com/ring-clojure/ring/pull/36 |
| 15:11 | weavejester | No description |
| 15:12 | yogthos | yeah first thing I noticed :) |
| 15:12 | weavejester | Going to recommend they try it out in a library first. |
| 15:12 | yogthos | yup |
| 15:13 | yogthos | looks like middleware for supporting locales |
| 15:13 | yogthos | at least it comes with tests, that's a bonus |
| 15:18 | muhoo | if you kick off a future to do something for side-effects (i.e. sending an email), how long does java keep it around before gc'ing it? |
| 15:19 | muhoo | the result in this case could be a fairly portly object |
| 15:21 | callen | muhoo: implementation/tuning specific |
| 15:22 | callen | muhoo: I'm not trying to be an asshole, you need to be specific. |
| 15:22 | muhoo | well, what i'm curious about is, if "forever, so don't do that" is the correct answer |
| 15:25 | gfredericks | so when I `lein trampoline cljsbuild repl-listen` I get a "listening on port 9000" message and then a report that clojure can't find cljsbuild/repl/listen.clj on the classpath o_O |
| 15:26 | gfredericks | I feel kind of crazy because I swear this worked yesterday |
| 15:33 | JulioBarros | Having problems getting dependencies for cemerick's friend. Am getting "Get Authorization Required" when fetching guice. Any ideas? |
| 15:46 | muhoo | JulioBarros, maven central problem? google maven archive problem? |
| 15:47 | muhoo | guice smells like a google thing |
| 15:47 | JulioBarros | muhoo: I don't know where the issue is. |
| 15:47 | muhoo | gfredericks: try without tramoline? |
| 15:49 | muhoo | JulioBarros: my guess would be that whatever website is hosting guice is screwed up |
| 15:50 | muhoo | trampoline often gives me "can't find foo on classspath" errors. i'm kind of used to just beting on it until it works, or just not using trampoline if i'm in a hurry |
| 15:51 | ravster | I have a map that returns a list. I"m trying to do an unquote-splice to get all the elements of the list out of the list, but am getting unbound-fn errors. what am I doing wrong? |
| 15:52 | xeqi | JulioBarros: I also get that after clearing my ~/.m cache. looks like someone messed up the guice-maven repo |
| 15:53 | xeqi | hopefully it'll get fixed sometime, but I don't hold my breath for it to happen today |
| 15:53 | JulioBarros | xeqi: Do you have a workaround? The friend project.clj has some comments but am not sure what to do about it. |
| 15:53 | hiredman | we've had really bad experiences at work with the guice maven artifacts |
| 15:53 | hiredman | e.g. multiple mirrors serving slightly different artifacts, etc |
| 15:54 | JulioBarros | ; the openid4java artifact refers to a now-disappeared guice repo that |
| 15:54 | JulioBarros | ; was previously hosted via google code svn :X |
| 15:54 | JulioBarros | hiredman: yeah the project file has this comment - |
| 15:55 | JulioBarros | right above the dependency that I believe is failing ... :( |
| 15:55 | xeqi | for my project just using workflows/interactive-form I can add :exclusions [com.google.code.guice/guice] and the tests pass |
| 15:55 | xeqi | but since the comment refers to openid, I think anything in that workflow namespace might not |
| 15:56 | callen | technomancy: I see your coworkers read logs. |
| 15:57 | muhoo | cemerick was going to split openid out at some point |
| 15:58 | xeqi | ah, I see the latest project.clj added a different repo for guice |
| 15:58 | xeqi | I think that was suppose to be released as 0.1.3 soon |
| 15:59 | xeqi | JulioBarros: I would expect something like https://www.refheap.com/paste/8472 to work fine |
| 16:00 | xeqi | with the exclusions and explicit guice dependency |
| 16:00 | JulioBarros | xeqi: Actually yes, I just tried that and it works for me. Thanks! |
| 16:27 | e_svedang | does anyone know if clojure.tools.trace/dotrace works in Clojure 1.4 ? |
| 16:58 | jjl` | hi all, i'm trying to implement an oauth server. does anyone have any experience with libraries that could assist? |
| 17:35 | kd4joa | does anyone know if it is possible to use slime with clojure-mode 2.x in emacs? if not, how do I go back to 1.x after upgrading using package.el? |
| 17:43 | technomancy | kd4joa: you can do it; just install slime-repl from marmalade, launch a swank-clojure server, and run M-x slime-connect |
| 17:44 | kd4joa | I've got that working, but can't interact with the repl from a clojure-mode buffer (C-c C-k doesn't exist, C-x C-e complains about a missing variable) |
| 17:44 | technomancy | kd4joa: oh, you'll also need to enable slime-mode inside clojure-mode |
| 17:45 | kd4joa | ah yes. of course. thanks! I missed that |
| 17:46 | technomancy | should probably document that somewhere |
| 17:50 | kd4joa | no problem. I should have know that. |
| 18:25 | tbaldrid_ | is there a way to pprint records without having them print out as hashmaps |
| 18:25 | tbaldrid_ | ? |
| 18:26 | hyPiRion | tbaldrid_: You can define a print-method for them |
| 18:26 | tomoj | but pprint won't use print-method by default, will it? |
| 18:26 | tbaldrid_ | yeah the only thing is that I have about 20 of them. |
| 18:26 | tbaldrid_ | println prints them correctly |
| 18:27 | hyPiRion | oh right |
| 18:27 | bbloom | tbaldrid_: give my new library a try! https://github.com/brandonbloom/fipp |
| 18:27 | tbaldrid_ | lol, I was just at the github page |
| 18:27 | tbaldrid_ | I'm about to give it a try |
| 18:27 | tomoj | I still don't even know how to extend pprint dispatch |
| 18:28 | bbloom | published it yesterday and @puredanger asked for records, so i added them. only took me 5 minutes |
| 18:28 | bbloom | tomoj: yeah, it's a pain |
| 18:28 | hiredman | bbloom: ooooh |
| 18:28 | bbloom | my lib is much easier to extend, but i haven't fully documented how nor have i completed the extensibility story that i really want to have |
| 18:28 | bbloom | but i'll take simple defmethod patches in the meantime |
| 18:29 | bbloom | hiredman: oh yeah, you were interested in that lib :-) check it out! |
| 18:30 | bbloom | tbaldrid_: you can see how easy it is to patch by looking at edn.clj |
| 18:30 | bbloom | and let me know how it works out for you |
| 18:37 | tbaldrid_ | bbloom: it works great! but I have fairly long class names, where should I go to either a) remove the namespace from the classnames, or b) indent by only 2-4 chars? |
| 18:37 | bbloom | tbaldrid_: https://github.com/brandonbloom/fipp/blob/master/src/bbloom/fipp/edn.clj#L32 |
| 18:37 | bbloom | instead of :align, you can use :nest 2 |
| 18:38 | bbloom | you can just defmethod over it for now |
| 18:39 | ibdknox | bbloom: have you tried this in CLJS at all? :) |
| 18:40 | ivan | bbloom: thank you for printing \n even on Windows, please resist the \r\n infidels |
| 18:41 | bbloom | ibdknox: no, but it shouldn't be hard to port. although i do depend on reducers and finger-trees |
| 18:41 | ibdknox | I thought someone added reducers to cljs |
| 18:41 | bbloom | ibdknox: edn.clj is the only really jvm specific stuff because the defmethods are the java interface names |
| 18:41 | bbloom | ibdknox: maybe they did, i just didn't look yet |
| 18:42 | bbloom | ivan: i'm a show-whitespace sort of guy. the windows users can deal with it. |
| 18:42 | ivan | typo https://github.com/brandonbloom/fipp/blob/master/src/bbloom/fipp/printer.clj#L97 |
| 18:42 | ibdknox | bbloom: yeah they did: https://github.com/clojure/clojurescript/blob/master/src/cljs/clojure/core/reducers.cljs :) |
| 18:43 | bbloom | ivan: fixed |
| 18:44 | tomoj | is it unsafe to (init-proxy (get-proxy-class bases) mappings) ? |
| 18:44 | tomoj | since this skips some stuff that proxy does |
| 18:44 | bbloom | ibdknox: nice. and it looks like wagjo ported finger-tree |
| 18:44 | tomoj | like e.g. "remember the class to prevent it from disappearing before use".. |
| 18:45 | bbloom | ibdknox: the algorithm needed a double-list (2-3 finger tree) for the pruning bounded buffer |
| 18:45 | tbaldrid_ | bbloom: cool stuff, I re-implemented IRecord's print for my uses, and it works like a charm |
| 18:45 | bbloom | awesome! |
| 18:46 | bbloom | i hope to be able to make it more configurable without having to copy paste & edit method definitions |
| 18:46 | tomoj | could you maybe restrict the print length and level based on the computed layout? |
| 18:46 | bbloom | my plan is to allow namespaced node types, so you could have ::edn/break or something that would be a nest or align based on your preferences |
| 18:47 | hiredman | tomoj: there were issues where the class generated by proxy would get gc'ed before it was used |
| 18:47 | bbloom | tomoj: print length meaning number of items printed in a collection? |
| 18:47 | tomoj | yeah, and level the depth |
| 18:48 | tomoj | it seems like desirable values for *print-length* and *print-level* tend to vary for varying data, but maybe if you can decide when to bail out based on looking at where the stuff would render, you can avoid fiddling with their values |
| 18:49 | bbloom | ibdknox: i'm trying to avoid manually porting all my libs to cljs, instead im trying to just isolate the jvm code. i'm working on a big cljs project, but doing 99% of the development on the JVM and just sending data to the client to do rendering. my only fear is that perf or file size will be a surprise in the browser, but other than that, it's been really pleasant to have this tiny kernel in the browser and be able to do all my work server side. i |
| 18:49 | bbloom | think i'll be able to even do the opposite, where the browser mirror's it's data back to the server and then broadcasts it back down to other browsers for simultaneous multibrowser testing :-) |
| 18:49 | bbloom | tomoj: yeah, i don't have print-length or print-level yet, unfortunately |
| 18:49 | bbloom | they weren't covered in the literature, although they should be straightforward extensions |
| 18:49 | tomoj | well, they kind of suck anyway |
| 18:50 | bbloom | i was just so mentally exhausted from parsing all that monad mumbo jumbo :-) |
| 18:50 | tomoj | for example, *print-length* 10 might be good for vectors of small ints, but for vectors of huge maps.. |
| 18:50 | ibdknox | bbloom: sounds like some neat stuff |
| 18:50 | tomoj | or for a cycle of length 2 |
| 18:50 | tomoj | though, nothing we can do about that unless we define a cycle seq type, I guess |
| 18:51 | bbloom | tomoj: again, i decided to punt on those options until i had some time to think about the extensibility and configuration story |
| 18:51 | bbloom | if i can help it, i'd like to avoid a big bag of dynamic vars |
| 18:52 | bbloom | i'd rather have a small map of expansions that get merged in before execution, so that bits and pieces can be customized easily |
| 18:52 | tomoj | yeah |
| 18:53 | tomoj | hiredman: so if you don't use proxy, you'll maybe experience those issues? |
| 18:58 | bbloom | it's those damn interfaces in clojure core that are driving me nuts! i wish they were protocols |
| 18:58 | bbloom | they make compat really hard, since you have to extend interfaces at deftype time |
| 19:04 | bbloom | they also make the extend function practically useless, and that's a real shame, b/c extend is awesome |
| 19:07 | hiredman | I think hugod was working on a macro that would take an interface and use it as a the basic of protocol (instead of generating one) |
| 19:08 | hiredman | which would not completely solve that, but would be a place to start in "protocolizing" a lot of core |
| 19:14 | ivan | huh what |
| 19:14 | ivan | user> (require '[bbloom.fipp.edn :refer (pprint) :rename {pprint fipp}]) |
| 19:14 | ivan | IllegalAccessError consl does not exist clojure.core/refer (core.clj:3839) |
| 19:16 | ivan | no doubt I'm having some major PEBKAC and should go sleep |
| 19:18 | yedi | anyone know of any music analysis software/libraries |
| 19:18 | ivan | oh, this is what I get for running data.finger-tree master with its lack of consl |
| 19:23 | bbloom | ivan: ah |
| 19:23 | bbloom | yeah, that confused me. the released version has consl but it was renamed to conjl |
| 19:23 | bbloom | ivan: is there a reason your on master? |
| 19:23 | ivan | no good reason |
| 19:24 | bbloom | ivan: heh well then it's not a problem :-) |
| 19:35 | a|i | does clojure play well on app engine? |
| 19:37 | technomancy | bbloom: are you trying to subtly imply that part of the point of fipp is that it doesn't use cl-format? =) |
| 19:38 | technomancy | also, I have a project called ffip, so I keep reading it as that |
| 19:38 | bbloom | technomancy: the real motivation was that i wanted a custom pretty printer for a particular data pattern i had and i had NO FUCKING CLUE how to get pprint-dispatch or cl-format to do what i want |
| 19:39 | bbloom | technomancy: heh, sorry about the name similarity :-) |
| 19:39 | bbloom | also, i wanted to pretty print CSS too :-P |
| 19:39 | technomancy | it happens =) |
| 19:40 | bbloom | and man, it's nice to not have to wait for a pprint of a large structure |
| 19:40 | bbloom | sometimes, i'd pprint something and then 3 seconds later ^c and add a (take 5) :-P |
| 19:40 | bbloom | or a (select-keys ... |
| 19:41 | bbloom | now i get output immediately and my ^c lets me scroll up and see the first few lines |
| 19:45 | a|i | which web framework in clojure is the most full featue one? |
| 19:46 | a|i | this question i out of date: http://stackoverflow.com/questions/3325033/comparison-of-clojure-web-frameworks |
| 19:46 | bbloom | a|i: i think you'll find that the clojure community considers "full featured" to be a miss feature |
| 19:46 | bbloom | er misfeature* |
| 19:46 | a|i | bbloom: why? |
| 19:46 | a|i | bbloom: why do I have to create my own user system? |
| 19:47 | bbloom | a|i: you don't |
| 19:47 | bbloom | here's a popular one: https://github.com/cemerick/friend |
| 19:47 | a|i | bbloom: by full feature I meant something with good plugin support. |
| 19:48 | bbloom | a|i: the standard Ring stack has strong middleware support |
| 19:49 | a|i | bbloom: is noir built on top of ring? |
| 19:49 | bbloom | a|i: as far as i know, everything in the clojure web world is built on ring |
| 19:49 | bbloom | a|i: it's like ruby's Rack or python's WSGI |
| 19:50 | a|i | bbloom: but that doesn't necessarily mean that I can us friend user system with noir, does it? |
| 19:50 | a|i | use* |
| 19:51 | bbloom | a|i: i'm not the expert on this topic. maybe you should summon Raynes :-) |
| 19:52 | ibdknox | ali: you can use friend with noir, but it's not easy. You should look into http://www.luminusweb.net/ as a starting point |
| 19:53 | bbloom | ibdknox: i think that's a pipe in his name, which is tricky :-P |
| 19:53 | ibdknox | oh |
| 19:53 | ibdknox | sneaky |
| 19:53 | technomancy | calling friend a "user system" is a bit of a stretch |
| 19:53 | ibdknox | a|i: ^ |
| 19:53 | a|i | ibdknox: got your message though :) |
| 19:54 | bbloom | ibdknox: we can't even handle ell, eye, and pipe. allow me to reiterate my complaint about fancy type setting in CS papers! |
| 19:54 | a|i | ibdknox: I'm new to clojure, coming from rails. just wondering if there is en equivalent of rails to ruby in clojure. |
| 19:54 | ibdknox | a|i: intentionally not |
| 19:54 | ibdknox | bbloom: lol |
| 19:55 | technomancy | I actually had a really easy time bootstrapping a compojure app on top of GitHub oauth for handling users: https://github.com/technomancy/syme/blob/master/src/syme/web.clj#L75 |
| 19:55 | a|i | ibdknox: why intentionally? why is that microframeworks are good neough? |
| 19:55 | bbloom | a|i: and i don't think that there is an equivalent of rails in *any other language* it's a pretty special framework in terms of breadth, perscriptiveness, popularity, etc |
| 19:55 | bbloom | a|i: honestly, if you need to build a CRUD app in a hurry, rails is very likely the right tool for the job |
| 19:55 | a|i | bbloom: sure, but django in python at least tries to be a rails. |
| 19:55 | technomancy | doesn't django predate rails public release? |
| 19:55 | bbloom | technomancy: i believe it does, heh |
| 19:56 | a|i | bbloom: my only choice at the moment is app engine. and I can only use python, jvm or go. |
| 19:56 | algernon | I found that composing smaller libraries allowed me to be far more productive, than working within the constraints of a huge framework. |
| 19:57 | algernon | (but maybe I just didn't 'get' rails) |
| 19:58 | bbloom | algernon: for me, it was a matter of expediency. with rails, you don't think about the "right way" for your particular use case. all use cases are CRUD. you just do whatever the most popular thing is at the time and you'll get an MVP out the door quickly. and, if you're lucky, it will be defacto modular enough to decompose it later |
| 19:59 | bbloom | a|i: what are you building? |
| 19:59 | bbloom | need to know your requirements to make a recommendation |
| 19:59 | dcjackson | Is there a way to get Leiningen to NOT complain about things like: Could not find artifact postgresql:postgresql:pom:9.2-1002.jdbc4 in central (http://repo1.maven.org/maven2) |
| 19:59 | bbloom | app engine seems like an odd *requirement* |
| 19:59 | a|i | bbloom: why odd? |
| 20:00 | bbloom | why appengine? |
| 20:00 | a|i | bbloom: it's an area profile website. |
| 20:00 | technomancy | dcjackson: latest version shouldn't do that |
| 20:00 | a|i | bbloom: it's cheaper to start off. |
| 20:01 | dcjackson | Ok, I will upgrade to that.... |
| 20:01 | technomancy | a|i: last I checked app engine doesn't allow for threads, so a lot of the interesting stuff about clojure just doesn't work |
| 20:01 | technomancy | but don't listen to me; I work for a competitor =) |
| 20:01 | a|i | technomancy: I'm open to comptetitors :0 |
| 20:01 | a|i | :) |
| 20:01 | bbloom | he's talking about heroku :-P |
| 20:01 | ecmendenhall | technomancy: thanks for sharing that oauth example. That's…surprisingly easy! |
| 20:02 | bbloom | technomancy: i'll say it so you don't have to, heh |
| 20:02 | a|i | heroku is really nice, I wish it was cheaper for starters. |
| 20:02 | callen | technomancy: who do I send happy-grams to at Heroku for fixing my account? |
| 20:03 | bbloom | callen: i accept all happy-grams on behalf of all parties |
| 20:03 | callen | bbloom: you deserve nuhzink! |
| 20:04 | callen | I actually just switched to using Heroku after using manually dev-ops'd VPSs and Dedis for years. |
| 20:04 | dcjackson | technomancy: Upgrading to RC1 did in fact stop to warnings. Thanks! |
| 20:06 | technomancy | dcjackson: cool |
| 20:06 | technomancy | callen: heh; what happened? |
| 20:06 | callen | technomancy: I have an account from back when you guys only did Rails. years ago. Two accounts actually. Both HTTP500'd whenever I'd try to log in. |
| 20:07 | callen | technomancy: sometime after Christmas, somebody noticed my failing/desperate attempts to log in and fixed the code. |
| 20:07 | technomancy | callen: straight up fixed the code without a support issue opened or anything? |
| 20:07 | callen | so I tried Heroku for the first time with a non-rails-app and I'm actually switching my stuff over. |
| 20:07 | technomancy | heh; fantastic =D |
| 20:07 | callen | technomancy: well both accounts stopped HTTP 500'ing on login. so yeah, I guess. |
| 20:08 | callen | technomancy: don't you guys get an email/message whenever your app throws a 500? |
| 20:08 | callen | I do... |
| 20:08 | callen | no support ticket or anything, although I did try pinging you in IRC. |
| 20:08 | technomancy | it was probably related to the remediation for the rails security issue I bet |
| 20:09 | callen | technomancy: I have a hard time seeing how a broken legacy account is related to that rails security issue. Do you guys just ignore your dashboard app until something is wrong? :P |
| 20:09 | brainproxy | how can I print the value of exec-path inside emacs? |
| 20:10 | technomancy | the 500 errors get logged, but we typically don't have support guys looking into them unprompted |
| 20:10 | technomancy | but people might have been paying extra attention to legacy rails apps this past week for security reasons |
| 20:11 | technomancy | hard to say without knowing what was broken |
| 20:34 | tuor | Hi. I'm learning clojure, using emacs, leiningen, and nrepl. What's the best way get dependencies I add in project.clj reflected in the repl? |
| 20:35 | ChongLi | have you tried nrepl-restart |
| 20:35 | ChongLi | ? |
| 20:36 | ChongLi | M-x nrepl-restart |
| 20:37 | tuor | Thanks. I tried that unsuccessfully yesterday, but now that I think about it, I had another problem in my project.clj that I didn't discover until later. |
| 20:37 | tuor | I am trying it now. |
| 20:46 | tuor | It worked after I did "lein deps" in the shell and then nrepl-restart. |
| 20:46 | ChongLi | nice |
| 20:46 | tuor | Thanks! |
| 20:46 | ChongLi | no problem! |
| 21:19 | bpr | technomancy: I'm working on porting your swank-clojure inspect command over to nrepl. Any thoughts on what you would change/do differently? |
| 21:23 | tomoj | &(map class [(reify) (reify) (reify)]) |
| 21:23 | lazybot | ⇒ (sandbox8277$eval30037$reify__30038 sandbox8277$eval30037$reify__30040 sandbox8277$eval30037$reify__30042) |
| 21:23 | tomoj | &(map class (repeatedly 3 #(reify))) |
| 21:24 | lazybot | ⇒ (sandbox8277$eval30053$fn$reify__30055 sandbox8277$eval30053$fn$reify__30055 sandbox8277$eval30053$fn$reify__30055) |
| 21:24 | clojurebot | map is *LAZY* |
| 21:24 | bbloom | clojurebot needs his bolts tightened |
| 21:24 | tomoj | is there a way to get an instance of a _new_ anonymous class for use with extend? |
| 21:25 | tomoj | I'm guessing what I'm trying to do is deeply wrong |
| 21:26 | bbloom | hmm maybe? why do you want to do that? |
| 21:27 | bpr | can the jvm even do anonymous *classes*? |
| 21:27 | tomoj | well, not really anonymous, just anonymous from the clojure perspective |
| 21:28 | Deece_ | Is there a function that lists the Java interfaces satisfied by an object? |
| 21:28 | tomoj | I have 4 protocols, each with one function. if you implement the first two, the implementation of the third can be derived from the first two. otherwise, you are free to pick and choose |
| 21:28 | bbloom | tomoj: this worked for me https://www.refheap.com/paste/8481 |
| 21:28 | tomoj | I don't want to create a deftype for every possible combination |
| 21:28 | tomoj | yeah, that works |
| 21:28 | tomoj | the problem is that if you put the '(reify) inside a function, it seems auto-memoized |
| 21:29 | tomoj | note my example above |
| 21:29 | bpr | Deece_: try ancestors |
| 21:29 | bbloom | tomoj: i don't think it's memoized, such much as it is generated at macro expansion time |
| 21:29 | tomoj | &(let [r #(reify)] (identical? r r)) |
| 21:29 | lazybot | ⇒ true |
| 21:29 | tomoj | oh, I see |
| 21:30 | bbloom | horror of horrors: you could (eval '(reify)) |
| 21:30 | tomoj | hah |
| 21:30 | bbloom | but i think you might be better of rethinking your approach :-P |
| 21:30 | tomoj | yes.. "deeply wrong" :( |
| 21:31 | bpr | Deece_: there's also parents if you only want to see the immediate super-types |
| 21:31 | Deece_ | bpr: (ancestors []) returns nil. I'm just tring to better understand the way Clojure uses java interfaces under the cover to implement polymorphism; it'd be good if i could use the REPL to see all the interfaces an object implements. For example, that [] is an instance of clojure.lang.IPersistentStack |
| 21:31 | tomoj | I have a macro that works fine, but the function version is tricky |
| 21:31 | bpr | &(ancestors (type [])) |
| 21:31 | lazybot | ⇒ #{clojure.lang.ILookup clojure.lang.IMeta clojure.lang.APersistentVector java.util.List clojure.lang.IPersistentStack clojure.lang.IEditableCollection java.lang.Runnable clojure.lang.IHashEq java.lang.Comparable clojure.lang.Sequential clojure.lang.IPersistentCo... https://www.refheap.com/paste/8482 |
| 21:31 | bbloom | tomoj: the substitutable/derivable implementations thing is an interesting problem, why not just use extend and select-keys ? |
| 21:31 | Deece_ | bpr: perfect! thanks. |
| 21:32 | bpr | np |
| 21:32 | tomoj | I'm using extend, but what type do I extend? |
| 21:32 | tomoj | (extend (eval '(reify)) ...) would work, like you said |
| 21:33 | bbloom | why do you have dynamically generated types at runtime? |
| 21:33 | tomoj | er, well (let [x (eval `(reify))] (extend (class x) ...)) |
| 21:33 | bbloom | reify isn't dynamically generating a type, it's instantiating one |
| 21:33 | bbloom | reify is statically generating a type.... dynamically at compile time :-P |
| 21:34 | tomoj | well I have 4 protocols, so max 16 combinations (each type either implementing or not implementing each protocol) |
| 21:34 | tomoj | originally I was manually writing a deftype for each combination |
| 21:35 | bbloom | do you need a reified type? or would a map and multimethods do fine? |
| 21:39 | tomoj | I don't even see why I need multimethods |
| 21:39 | bbloom | do you need polymorphic dispatch at all? |
| 21:39 | tomoj | {:p1 f1 :p2 f2 :p3 f3 :p4 f4} should work fine afaict |
| 21:40 | bbloom | i'm trying to rewind/replay your decision to create concrete types |
| 21:40 | bbloom | i don't know anything about your use case |
| 21:41 | dnolen | bbloom: btw, looking forward to hanging out at Clojure/West! |
| 21:42 | bbloom | dnolen: yeah, should be fun! it's my first conference speaking gig, so i'm extra excited |
| 21:43 | TimMc | Deece_: And generally you'll want to use class instead of type -- type also includes :type metadata. |
| 21:43 | amalloy | bbloom: this whole idea looks nuts |
| 21:43 | amalloy | er, tomoj |
| 21:44 | brainproxy | man, don't know why I waited so long to look into ack-and-a-half, very helpful for refactoring |
| 21:45 | amalloy | $google ack-and-a-half |
| 21:45 | amalloy | oh yes, i think Raynes said he broke $google |
| 21:46 | tomoj | amalloy: what's the whole idea? using reify+extend? |
| 21:46 | tomoj | working with things which implement (nearly) arbitrary subsets of 4 related protocols? |
| 21:47 | amalloy | mostly reify+extend, i think |
| 21:47 | tomoj | oh, yeah |
| 21:47 | bbloom | tomoj: if you really do have exactly 4 protocols and you don't need open extension, then may i suggest a hash-map or a cond block? :-) |
| 21:48 | bbloom | amalloy & brainproxy: upgrade to the_silver_searcher sooo nice |
| 21:48 | tomoj | yeah, porting to hash-maps now |
| 21:48 | tomoj | thanks |
| 21:48 | amalloy | no thanks. find+grep for me till the day i die |
| 21:52 | brainproxy | bbloom: will look into it |
| 21:52 | tpope | I hate ack |
| 21:52 | bbloom | why? |
| 21:52 | clojurebot | why is the ram gone is <reply>I blame UTF-16. http://www.tumblr.com/tagged/but-why-is-the-ram-gone |
| 21:52 | tpope | because it's whitelist based |
| 21:53 | tpope | and you have no clue that it's not searching certain files |
| 21:53 | bbloom | tpope: ah, i forgot about that. i fixed that a long time ago, you can add --text to your ackrc |
| 21:53 | bbloom | poof problem solved: anything that `file` would report as text, ack will search |
| 21:56 | tpope | well that solves one problem |
| 21:57 | bbloom | what else? :-) |
| 21:58 | tpope | well basically, 90% of my searches are inside vim, inside a git repo |
| 21:58 | tpope | and for that, git grep wins |
| 21:58 | tpope | I don't get any of the benifits of ack there |
| 21:59 | brainproxy | bbloom: nice, there's also an ag.el based on ack-and-a-half, trying it out now |
| 21:59 | tpope | I just get the burden of maintaining a config file |
| 21:59 | bbloom | tpope: i kinda do wish it just searched anything that git tracked |
| 22:00 | tpope | git grep does |
| 22:01 | bbloom | for some reason i've only ever used that to search back in time |
| 22:01 | bbloom | i forget why tho |
| 22:01 | kd4joa | can anyone help me understand why I'm getting this when running "lein midje"? java.io.FileNotFoundException: Could not locate bultitude/core__init.class or bultitude/core.clj |
| 22:01 | kd4joa | (it's been a really bad weekend for clojure dev tools) |
| 22:02 | TimMc | Is bultitude a midje dependency, or one of yours? |
| 22:02 | kd4joa | it's not one of mine |
| 22:02 | kd4joa | I've never heard of it |
| 22:03 | TimMc | OK, so presumably midje is trying to pull it in. |
| 22:03 | kd4joa | it is a midje dependency |
| 22:04 | brainproxy | bbloom: ag.el is working nicely, and the_silver_search is super fast, wow! |
| 22:05 | bbloom | yeah, craaazzy fast |
| 22:05 | bbloom | even faster, but requires a cron job: http://code.google.com/p/codesearch/issues/list |
| 22:05 | bbloom | use that if you have a huge static code base to reference |
| 22:05 | TimMc | kd4joa: Are you using lein 1 or lein 2? |
| 22:05 | bbloom | although the indexer is fast enough to be run quasi-ineractively |
| 22:05 | bpr | kd4joa: what version of leiningen are you using? |
| 22:06 | brainproxy | nah, most of my projects either don't have that many files or have lots of relatively small files |
| 22:06 | brainproxy | ag is going to be nice addition the toolbelt, for sure |
| 22:06 | kd4joa | Leiningen 2.0.0-RC1 |
| 22:08 | bbloom | yeah that codesearch thing was made by googlers for googlers :-P |
| 22:09 | TimMc | kd4joa: What version of lein-midje are you using |
| 22:11 | TimMc | $latest lein-midje |
| 22:11 | lazybot | [lein-midje "3.0-alpha2"] -- https://clojars.org/lein-midje |
| 22:11 | kd4joa | lein-midje 2.0.4 |
| 22:13 | TimMc | "Could not locate clj/core__init.class or clj/core.clj on classpath" |
| 22:13 | TimMc | Interesting... |
| 22:14 | TimMc | Oh, nvm -- that's a problem with my project. |
| 22:18 | TimMc | OK, reproduced. |
| 22:18 | TimMc | alex_baranosky: Have you tried the lein midje plugin with lein 2.x RC1? |
| 22:19 | TimMc | alex_baranosky: It seems to be failing to find bultitude on the classpath. |
| 22:19 | alex_baranosky | TimMc: I'm out of the loop re: diem development lately. Brian's done a metric ton of work recently |
| 22:20 | TimMc | ok |
| 22:20 | TimMc | but you're on IRC, and he's not! |
| 22:21 | alex_baranosky | send a message to the midge google group, maybe? |
| 22:22 | TimMc | It's probably a leiningen problem. technomancy, any known issues with lein2 RCs and classpaths for plugins? |
| 22:27 | TimMc | kd4joa: Try going back to lein 2.0.0-preview10 -- seems to work for me. |
| 22:27 | TimMc | pass that to lein upgrade |
| 22:29 | kd4joa | thanks. I'll give it a try |
| 22:31 | kd4joa | TimMc: that worked. thanks again |
| 22:32 | TimMc | kd4joa: You may wish to file a bug on leiningen's issue tracker on github. |
| 22:34 | technomancy | bpr: I extracted swank-clojure inspect into its own lib here: https://github.com/technomancy/javert |
| 22:34 | technomancy | TimMc: nothing known yet |
| 22:34 | technomancy | bultitude is included in the standalone self-install jar though |
| 22:34 | TimMc | Hmm, interesting. |
| 22:34 | technomancy | so it's not even possible for it to not be available to plugins |
| 22:36 | technomancy | it could be midje isn't able to add it to the in-project classpath though |
| 22:37 | technomancy | if it's a bug in leiningen I'll hold off on an announcement |
| 22:37 | kd4joa | technomancy: should I file an issue in github? |
| 22:38 | bpr | technomancy: cool |
| 22:38 | TimMc | I've got some time to help debug, if you want to point me at anything. |
| 22:40 | technomancy | given that it's trying to require bultitude and it looks like it's not attempting to put bultitude on the classpath I'd guess it's a bug in lein midje |
| 22:40 | technomancy | but I don't know anything about midje |
| 22:40 | TimMc | Hmm... so it may have been accidentally working before. :-) |
| 22:52 | bbloom | hmm i wonder if nrepl has anyway to know the terminal width |
| 22:53 | bbloom | sometimes i make my terminal pretty wide and it would be nice if fipp respected that :-) |
| 22:56 | TimMc | kd4joa, technomancy: lein-midje is at fault; needs to inject bultitude into the classpath |
| 22:57 | kd4joa | TimMc: got it. I'll submit the Github issue there then. |
| 22:57 | kd4joa | TimMc: thanks again for the help. I've had a very rough weekend with clojure dev tools. |
| 22:58 | TimMc | It looks like lein stopped leaking bultitude into the project classpath sometime recently. |
| 23:04 | devn | I want to write a range that does \a..\z |
| 23:04 | devn | any ideas? |
| 23:04 | bpr | &(map char (range 32 58)) ... i think |
| 23:04 | lazybot | ⇒ (\space \! \" \# \$ \% \& \' \( \) \* \+ \, \- \. \/ \0 \1 \2 \3 \4 \5 \6 \7 \8 \9) |
| 23:04 | bpr | well, close |
| 23:04 | devn | nono |
| 23:04 | devn | im talking about a library |
| 23:04 | amalloy | ~google raynes mutt clojure |
| 23:04 | clojurebot | First, out of 4 results is: |
| 23:04 | clojurebot | #clojure log - Apr 10 2010 |
| 23:04 | clojurebot | http://clojure-log.n01se.net/date/2010-04-10.html |
| 23:04 | devn | that detects the class of the arguments |
| 23:05 | amalloy | well, whatever. you can find it from there |
| 23:05 | devn | so something like defmulti maybe? |
| 23:05 | devn | amalloy: is that for me> |
| 23:05 | devn | ? |
| 23:05 | amalloy | indeed |
| 23:05 | devn | amalloy: damn you! |
| 23:06 | devn | you beat me to it! |
| 23:06 | amalloy | hm? |
| 23:06 | clojurebot | benchmarking is https://github.com/hugoduncan/criterium |
| 23:06 | devn | https://github.com/amalloy/mutt |
| 23:06 | amalloy | well |
| 23:06 | devn | i haven't read it yet, but that sounds about right |
| 23:06 | amalloy | Raynes wrote it first. his implementation was so awful i forked and fixed it for him, though |
| 23:06 | devn | a more dynamic range |
| 23:06 | devn | either way, cool, and thank you |
| 23:06 | amalloy | it's his project, even if all the code is mine |
| 23:06 | amalloy | you're welcome |
| 23:06 | devn | sweet sweet ranges |
| 23:06 | devn | <3 |
| 23:07 | Raynes | amalloy: My code wasn't awful you fucker. |
| 23:07 | devn | haha |
| 23:07 | bpr | lol |
| 23:08 | amalloy | read the diff and say that again |
| 23:08 | Raynes | You write it differently and I liked your implementation better. Asshole. |
| 23:08 | amalloy | (i haven't read the diff recently but it was proabbly awful) |
| 23:08 | devn | I think morphin/mutt is a really great way to show people what you can do in clojure without much work |
| 23:08 | devn | does the range in morphin give up chunked-seq? |
| 23:08 | Raynes | amalloy: The first implementation I did was hilariously broken if you remember right. You helped me fix that and I considered suicide. |
| 23:08 | devn | (in the original implementation) |
| 23:08 | Raynes | I don't think either if the impls did chunked seqs. |
| 23:09 | devn | why not? it's already written, why not just dispatch to clojure.core/range if you have args that are [Long, Long] |
| 23:09 | devn | or Long, Long, Long |
| 23:09 | amalloy | i think Raynes was hoping to position it as a replacement for range |
| 23:09 | bbloom | didn't know about morphin, was considering making something like that at one point! cool stuff |
| 23:09 | Raynes | I haven't looked at that code in a 100 years. |
| 23:09 | TimMc | I was somewhat annoyed when I discovered that (range \a \z) didn't just work. |
| 23:10 | amalloy | because of what TimMc says |
| 23:10 | devn | same |
| 23:10 | bbloom | Raynes: not exactly a good day to joke about suicide |
| 23:10 | TimMc | ,(range \a \z \u0001) |
| 23:10 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number> |
| 23:10 | TimMc | bbloom: Oh, something in the news? |
| 23:10 | bbloom | TimMc: http://news.ycombinator.com/ |
| 23:10 | TimMc | I mean, suicide is always a touchy subject to joke about... |
| 23:10 | devn | i dont think an enhancement to clojure that allows for \u0001 \u0004 or something would be a big deal |
| 23:10 | Raynes | TimMc, amalloy, devn: We wrote morphin/mutt as a proof of concept and I put a page on Jira that Stuart Halloway told me to put up but nobody cares remotely about ranges apparently. |
| 23:10 | devn | i think it would be accepted |
| 23:10 | Raynes | bbloom: Uh, okay. |
| 23:11 | devn | Raynes: fuck that. |
| 23:11 | Raynes | bbloom: I'll go tell the internet to be careful what they say for the next couple of weeks. |
| 23:11 | devn | i care about ranges. ranges are used all over god's creation in clojure |
| 23:11 | amalloy | "oh of course X would be accepted to clojure/core" - false for all X |
| 23:11 | Raynes | Seriously, I have no sensibilities. I apologize for it. |
| 23:11 | TimMc | bbloom: Apparently I live under a rock. |
| 23:11 | hiredman | amalloy: :) |
| 23:11 | Raynes | devn: Feel free to bring it up again on clojure-dev. Maybe somebody will care. |
| 23:12 | devn | amalloy: hiredman: maybe we just need to put some money in a pot and hire lobbyists? |
| 23:12 | Raynes | I'd still like to see polymorphic ranges. |
| 23:12 | Raynes | In clojure itself. |
| 23:12 | Raynes | Not necessarily our implementations, but still. |
| 23:12 | bbloom | Raynes: i'd vote for that |
| 23:12 | bbloom | i've wanted char ranges a few times |
| 23:12 | Raynes | I mean, morphin is great and all, but nobody is going to use a lib for that stuff. |
| 23:12 | Raynes | Nor should they have to. |
| 23:14 | devn | My email to clojure-dev is going to be: |
| 23:14 | devn | Subject: Polymorphic Range |
| 23:14 | devn | Body: Well, why not? |
| 23:14 | hiredman | *crickets* |
| 23:14 | devn | im not looking for a laugh, just feedback |
| 23:15 | devn | do i need to spell this out? |
| 23:15 | bbloom | devn: why not: http://blogs.msdn.com/b/ericgu/archive/2004/01/12/57985.aspx |
| 23:15 | bbloom | every feature starts with minus 100 points |
| 23:15 | devn | the quickest way to lose your argument is to oversell your point |
| 23:15 | bbloom | i'd say character ranges are only like plus 30 points :-) |
| 23:16 | devn | i don't think i need to create a new wiki or something nutty to sell it. character ranges would be nice. why not? |
| 23:17 | bbloom | despite the minus 100 points, it does seem rather harmless :-P heh |
| 23:17 | hiredman | I think bbloom's idea of features starting in the negative is a pretty good explanation of why "why not" doesn't work |
| 23:17 | devn | nothing gets a score unless people discuss it. "why not?" seems like a good starting point for a conversation |
| 23:18 | Raynes | devn: I have a whole page on confluence about polymorphic ranges. Feel free to also spruce it up if you like, it was written ages ago and, get this, IIRC I'm the only person who has ever actually looked at it despite the fact that Stuart told me that is what I should do to get polymorphic ranges considered for Clojure. ;) |
| 23:18 | bbloom | hiredman: i take no credit for that idea, that was beaten into my head at microsoft because i spent so much time beating it into other people's heads to avoid perpetuating the bloated software thing |
| 23:18 | devn | wtf |
| 23:18 | bbloom | Raynes: yeah, i feel like design pages are where good ideas go to die |
| 23:19 | bbloom | i think implementations and traction are the only things that get respect outside of a rich hickey decree |
| 23:19 | devn | if only polymorphic ranges were useful to datomic... |
| 23:20 | devn | meh, i don't think it needs to be a core thing |
| 23:20 | devn | i think a library is just fine |
| 23:20 | bbloom | can anyone think of any other types of ranges besides numbers and characters? |
| 23:20 | hiredman | bbloom: if it has a impl and traction there is generally not a lot of effort to get it in to core |
| 23:20 | Raynes | devn, bbloom: I did an implementation of character ranges first and submitted it, but it got turned down because it wasn't as long as the range function's definition and wasn't polymorphic, which is why mutt/morphin exists. |
| 23:20 | devn | but it still gets me going every time i hear someone say they've made a design page for something and received absolutely 0 feedback |
| 23:20 | devn | i like it as a library tbqh |
| 23:20 | devn | that's why i asked |
| 23:20 | devn | i was going to write...a library! :) |
| 23:21 | Raynes | Yeah, I don't think a single person has ever used this library ever. |
| 23:21 | hiredman | *shrug* there is no interest in the design |
| 23:21 | devn | hiredman: what do you mena? |
| 23:21 | bbloom | would be nice if we had a wikipage for libraries that exist as better versions of stuff from code |
| 23:21 | devn | mean* |
| 23:21 | bbloom | core* |
| 23:21 | Raynes | He means nobody cares about my stuff. ;) |
| 23:22 | bbloom | hell, i have 3 projects alone that would go on that wiki |
| 23:22 | hiredman | devn: if there is no interest in the design you get 0 comments |
| 23:22 | hiredman | the feature expression wiki page has a large trail of comments |
| 23:22 | bbloom | hiredman: & devn: sometimes you need to advertise your design page tho |
| 23:22 | clojurebot | hiredman is slightly retarded |
| 23:22 | Raynes | lol |
| 23:22 | bbloom | ok seriously clojurebot? wtf lol |
| 23:22 | devn | bbloom: that's true |
| 23:23 | bbloom | i made a few wiki pages that had zero comments until i directed attention to them |
| 23:23 | devn | bbloom: people who get angry about not getting feedback are the same dudes who post once on clojure-dev and never remind anyone |
| 23:23 | bbloom | but i tried pretty hard to avoid being too bothersome about them |
| 23:23 | devn | yeah, well, be bothersome |
| 23:23 | bbloom | also, it can be hard to ask for feedback intelligently |
| 23:24 | bbloom | you need to have an understanding of the problem, the solution, the political ecosystem, and the psychology of it all |
| 23:24 | devn | meh... i think the only problem im hearing is that everyone is too sheepish to request feedback with anything louder than a whisper |
| 23:24 | bbloom | then you need to be able to articulate all that well :-) |
| 23:24 | devn | which sounds like *our* problem, and not rich or stu or some other scapegoat |
| 23:24 | bbloom | devn: the issue with encouraging people to speak up is that a lot of people genuinely have NO FUCKING IDEA what they are doing as designers |
| 23:25 | bbloom | i still want to know: what other types would you extend the Rangable protocol to? |
| 23:25 | technomancy | what if someone just made a nice pomegratate wrapper that made it really easy to add a lib with no restarts or nonsense |
| 23:25 | technomancy | just route around the damage |
| 23:25 | devn | bbloom: keywords! lol |
| 23:25 | Raynes | I never advertised it because I don't want to explain why we should have polymorphic version ranges. |
| 23:25 | technomancy | I guess you would need ns+ to really make it "like being in core" |
| 23:26 | Raynes | If I have to explain why it's a good thing, it isn't worth it. |
| 23:26 | Raynes | I figured it was fairly obvious. |
| 23:26 | technomancy | but ns+ is great and we should have it anyway |
| 23:26 | Raynes | But I don't care enough to explain it if it isn't. |
| 23:26 | bbloom | devn: i realize that you're joking, but for anyone else listening: that's a terrible idea :-P keywords are interned |
| 23:26 | devn | :) |
| 23:27 | xeqi | technomancy: ns+ ? |
| 23:27 | technomancy | xeqi: https://code.google.com/p/clj-nstools/ |
| 23:28 | technomancy | (ns my.ns (:like base.ns)) |
| 23:28 | bbloom | i think that only having 2 use cases is insufficient to design the Rangeable protocol |
| 23:28 | technomancy | xeqi: comes close to democratizing namespaces in terms of allowing other namespaces to be "core-like" |
| 23:28 | technomancy | in that their stuff is easy to make available everywhere |
| 23:28 | technomancy | I've been a long-time fan |
| 23:29 | devn | technomancy: what is the purpose of democratizing namespaces? |
| 23:29 | bbloom | especially because after? probably should be part of some kind of partial-order protocol :-) |
| 23:30 | technomancy | devn: so we don't have to have this conversation every time someone wants to make useful functionality conveniently accessible? |
| 23:30 | Raynes | bbloom: I agree, which is why I didn't bother doing polymorphic ranges with my first patch. |
| 23:30 | devn | technomancy: the means to conveniently accessible are still a problem |
| 23:30 | technomancy | there are two advantages to getting something in core. 0) you don't have to add a lib, and 1) you don't have to add an explicit require |
| 23:30 | Raynes | bbloom: Stuart said it should be polymorphic but nobody has yet to tell me of something else that is rangeable. |
| 23:31 | technomancy | devn: a repl-ready pomegranate wrapper would address 0) and ns+ addresses 1) |
| 23:32 | technomancy | right? because when you're considering a library, it has to add N points of value in order to get you to put up with the hassle of pulling in something new |
| 23:32 | devn | technomancy: so what is the impediment? |
| 23:32 | technomancy | so if you reduce N then you reduce the penalty for adding more libs and make it less important to get things into core |
| 23:33 | technomancy | devn: personally, the things that make me hesitant are having to restart the repl and having to add :require everywhere |
| 23:33 | technomancy | maybe with other people it's different |
| 23:33 | technomancy | that's backwards: when you reduce the penalty for adding libs you reduce N but whatever |
| 23:34 | devn | technomancy: there is a different solution though, no? |
| 23:34 | bbloom | Raynes: devn: entertainingly: |
| 23:34 | bbloom | Prelude Data.Ix> range ((), ()) |
| 23:34 | bbloom | [()] |
| 23:34 | bbloom | Prelude Data.Ix> range (True, False) |
| 23:34 | bbloom | [] |
| 23:34 | bbloom | Prelude Data.Ix> range (False, True) |
| 23:34 | technomancy | anyway, try to think about the reason you want to get it into core; maybe there are other ways to achieve the same goal |
| 23:34 | bbloom | [False,True] |
| 23:34 | technomancy | ways that don't involve jira |
| 23:34 | devn | my friend who hasn't been programming all that long mentioned something earlier that stuck with me |
| 23:34 | bbloom | apparently haskell considers booleans to be instances of Ix, which is basically rangable and apparently false == 0 |
| 23:34 | devn | i think about the clojure web programming situation right now |
| 23:35 | devn | and he mentioned how rails forces you into a box, but by "box" he meant, you have *some kind* of consistency |
| 23:35 | devn | like "application.rb", or whatever |
| 23:35 | devn | you know where it lives because you've seen 100 projects just like it |
| 23:35 | bbloom | technomancy: anytime you can bipass jira, you win |
| 23:36 | Raynes | Jira had to be the stupidest thing clojure/core ever did. |
| 23:36 | bbloom | i wonder if that's rich's true motivation: it's like an automatic minus 100 to suggest a feature... you need to use jira! |
| 23:36 | technomancy | bbloom: the math adds up |
| 23:36 | devn | i think the problem we have in clojure has nothing to do with democratizing namepsaces, and everything to do with how shitty clojars is, and how desperate we all are for some kind of rational way to share groups of dependecies |
| 23:36 | devn | if we truly value this "libraries over frameworks" thing, then we still need to find consistency |
| 23:36 | Raynes | https://github.com/yogthos/luminus |
| 23:37 | devn | so when you go to src/luminus/* |
| 23:37 | Raynes | yogthos|away: Thank you so very much for using a different design for the website. I was twitching at the old one. |
| 23:38 | devn | which file do you expect to contain routes? |
| 23:38 | Raynes | *shrug* |
| 23:38 | technomancy | Raynes: inc |
| 23:38 | devn | that's a serious problem we have |
| 23:38 | Raynes | I don't think you and I have the same kinds of problems, devn. |
| 23:38 | Raynes | :P |
| 23:38 | technomancy | devn: it should be in :main |
| 23:38 | technomancy | seriously; I have never considered that a problem |
| 23:38 | Raynes | I put routes in views/ |
| 23:38 | devn | here's my main point |
| 23:38 | Raynes | And models in /models |
| 23:38 | devn | hear me out here |
| 23:38 | Raynes | Er, models/ |
| 23:38 | Raynes | And startup stuff in server.clj |
| 23:39 | Raynes | I'm consistent. |
| 23:39 | technomancy | just start in :main and M-. your way through the project |
| 23:39 | technomancy | navigation is easy |
| 23:39 | xeqi | wheres the messaging queue go? |
| 23:39 | Raynes | Nowhere. |
| 23:39 | technomancy | xeqi: nowhere in rails too = |
| 23:39 | technomancy | =) |
| 23:40 | yogthos | Raynes: haha yeah it was pretty fugly :P |
| 23:40 | devn | listen: you can talk about how easy it is for you, but if you want clojure to grow, i think we need to figure out some kind of common structure. we can say "libraries over frameworks" but ultimately, someone who isn't you is going to have to pick up your shitty legacy code and go to work. |
| 23:40 | devn | and if they have no fucking clue how you organized the project, that's a problem. |
| 23:41 | devn | i consult, and every project is different, but they're *similar" |
| 23:41 | devn | in clojure, nothing is the same |
| 23:41 | devn | it's annoying |
| 23:41 | devn | and it costs money |
| 23:41 | yogthos | Raynes: all credit goes to this guy :) http://www.laliluna.de/ |
| 23:41 | bbloom | i don't buy this idea that everything is the same even among rails projects, lol |
| 23:41 | Foxboron | devn: i believe there is a little github project to try get a common style guide for CLojure |
| 23:41 | devn | bbloom: it's not the *same* |
| 23:41 | headshot | devn, any scala? |
| 23:42 | devn | but it's way closer to similar than compojure and lib-noir |
| 23:42 | devn | way way way closer |
| 23:42 | Raynes | devn: Careful, you're starting to sound like antares. :p |
| 23:42 | devn | headshot: no |
| 23:43 | Raynes | Wait, no, you already sound like him, implying that we have shitty code. |
| 23:43 | Raynes | :p |
| 23:43 | devn | seriously though. think about it. i don't care if we say "fuck frameworks" but there are trade offs, and i think consistency is definitely one of them |
| 23:43 | Raynes | I would expect that if my code were too bad amalloy would have sent me a pull request by now. |
| 23:43 | devn | it matters for businesses who want to use clojure |
| 23:43 | devn | and we should pay more attention to it |
| 23:43 | yogthos | devn: the convention I'm going with for routes is to put routes under routes.blah namespaces |
| 23:43 | Raynes | He is really my net at the bottom of the trapeze. |
| 23:44 | yogthos | devn: then handler will reference them in all-routes |
| 23:44 | devn | yogthos: yeah, it's just that there appears to be no common convention for that in clojure |
| 23:44 | devn | which i think is a real problem |
| 23:44 | devn | everyone uses compojure and lib-noir and yadda yadda, and congratulations, we don't use a framework |
| 23:44 | devn | but we have common depencies |
| 23:44 | yogthos | devn: well if one template/framework gets popular it will become the convention I think |
| 23:45 | devn | so let's try and come up with *something* that we all agree is sane |
| 23:45 | devn | and use that for organizing our web projects |
| 23:45 | yogthos | callen convinced me to go with the routes/views separation |
| 23:45 | Raynes | This conversation has more snark than technomancy at a Scala party. |
| 23:45 | devn | heh |
| 23:45 | yogthos | where views have stuff like layouts, and routes contain routes for specific workflows |
| 23:46 | yogthos | haha |
| 23:46 | devn | yogthos: so like...let's get people to buy into some kind of general guidelines for project organization |
| 23:46 | devn | because ive touched a few clojure codebases lately that were not my own |
| 23:46 | devn | people moved on, etc. |
| 23:46 | yogthos | a lot of motivation for luminus is to make something that's more or less standard and gets all the boilerplate out of the way |
| 23:46 | devn | and in every case, these guys had these wildly imaginative ideas about how to organize projects |
| 23:47 | devn | that is a *problem* |
| 23:47 | yogthos | haha |
| 23:47 | devn | i dont want to spend 3 days figuring out how the hell a project is structured while im trying to deliver value |
| 23:47 | yogthos | my main concern with project organization is that stuff should be compartmentalized |
| 23:47 | devn | that's a waste of my time, and my client's time |
| 23:48 | yogthos | I find that's generally a problem I run into with java projects :) |
| 23:48 | yogthos | diving into twisted mazes of classes and interfaces all alike |
| 23:50 | yogthos | but yeah back to the original point, I don't there's any way to get everybody to just agree on one standard easily |
| 23:50 | yogthos | it's just going to have happen naturally as people gravitate towards some conventions |
| 23:56 | bbloom | devn: luckily, clojure namespaces are DAGs, not full graphs |
| 23:56 | bbloom | much easier to traverse when analyzing code |
| 23:56 | bpr | technomancy: javert is nearly exactly what i did. lol |
| 23:58 | yogthos | bbloom: it's going to be nice when LT gets support for loading up related functions :) |