#clojure log - Dec 29 2012

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

0:00 bbloom: tpope: i have a very deep map in an editor and it's kinda funny to hold j and watch the cursor slow down as the tree depth increases

0:00 presumably that stops getting slower at 100 levels or something

0:01 tpope: bbloom: just like scrolling through a buffer?

0:01 bbloom: yeah

0:02 tpope: I've seen the syntax highlighting get pretty slow just browsing clojure.core

0:02 bbloom: i assume it has to do with brace matching

0:02 yup

0:04 tpope: yeah that's my guess too

0:04 I don't know what state the static runtime files are in

0:05 I think guns annoyed meikel even more than I did

0:06 bbloom: heh. creation is messy

0:31 technomancy: bbloom: https://github.com/trptcolin/reply/issues/94 <- looks like it's fixed

0:32 bbloom: technomancy: awesome! thanks to you and trptcolin

0:32 Raynes: technomancy: You should rewrite clojars with laser.

0:33 It's super important to everybody on Mars.

0:33 technomancy: Raynes: including Ziggy Stardust?

0:33 Raynes: Especially him.

0:33 technomancy: I'll get right on it.

0:33 I actually started yak-shaving an elisp interface to github issues

0:34 but I got foiled by the fact that the elisp equivalent to tentacles uses a port of CLOS and doesn't support pagination

0:34 by "a port of CLOS" I mean "a very annoying port of CLOS"

0:34 callen: technomancy: you could make a little clojure daemon that talked to a dumb text-mode interface in elisp.

0:35 technomancy: callen: yeah, or there's already a ruby gem for it I could shell out to

0:35 callen: technomancy: if you want to be unfun. I can see heroku is infecting your brain.

0:35 technomancy: callen: if it were I'd be using the ruby lib =P

0:35 callen: technomancy: it's been your plot all along to replace clojuredocs with another Ruby app, hasn't it?

0:36 ~guards

0:36 technomancy: anyway the github API lib is by the guy who maintains Magit, so you know it's going to be decent

0:36 callen: $guards

0:36 lazybot: SEIZE HIM!

0:36 callen: I designed a little helper for magit.

0:36 technomancy: http://blog.bitemyapp.com/2012/03/05/magit-cheat-sheet.html

0:36 hyPiRion: $gourds

0:36 oh no.

0:37 technomancy: nice

0:37 a friend of mine did the screencast, but that was in like 08 or so

0:37 callen: technomancy: I made it so I could quick-check the cheat sheet and refer to it when teaching people.

0:37 technomancy: callen: I was looking for a specific command and was all "where is this?" and then I realized, oh yeah, this is qwerty.

0:37 callen: technomancy: I've been trying to be the Johnny Appleseed of converting people to Emacs+Magit+Clojure

0:38 technomancy: delicious

0:38 * technomancy scoops himself a bowl of magitsauce

0:38 Raynes: ~gourds

0:39 y u no clojurebot

0:39 hyPiRion: Raynes: exactly the problem

0:39 callen: technomancy: I've actually been considering expanding that cheat-sheet to include more commands as my appreciation of magit has improved.

0:39 technomancy: callen: dvorak edition plz

0:39 * callen laughing_elf_man.jpg

0:39 Raynes: callen: That cheat sheet is awesome. You're a good person for this one particular thing.

0:40 Also, ew, dvorak.

0:40 qwerty plx

0:40 callen: Dvorak is for aspies >:<

0:40 Raynes: Aspies don't exist anymore.

0:40 callen: Raynes: you'll change your mind soon enough.

0:40 Raynes: $google aspergers is no longer a diagnosis

0:40 lazybot: [It's official: 'Asperger's syndrome' is no longer a thing] http://io9.com/5965524/its-official-aspergers-syndrome-is-no-longer-a-thing

0:41 technomancy: poof--everyone who had asperger's has vanished

0:41 callen: hoo, he's a muggle.

0:41 wingy: datomic users i need u .. how do i query schema attribute definitions?

0:41 technomancy: so I don't actually use clojure-test-mode's jump-between-test-and-src

0:41 can someone tell me if I should merge this? https://github.com/technomancy/clojure-mode/pull/105

0:42 Raynes: technomancy: Indeed.

0:42 callen: technomancy: go for maximum open source troll and kick it back to him saying you want unit tests proving the PR works.

0:42 technomancy: integration tests!

0:43 callen: unit, functional, integration, sexual, whatever.

0:43 technomancy: I'm sending 'em after you if anyone comes complaining

0:43 bbloom: technomancy: you might actually be capable of answer this question for me: http://stackoverflow.com/questions/14079002/topological-order-for-a-dependency-subgraph

0:43 callen: technomancy: send them after Raynes.

0:43 I'm the one that said to ask for tests.

0:44 Raynes: I write tests.

0:44 Sometimes.

0:44 technomancy: bbloom: I'm just riding the wave of aether; I didn't get to write any of the fun algorithmic dependency graph code in lein =\

0:44 hyPiRion: I don't like to call them tests

0:44 guardrails is a more suitable name

0:44 callen: Raynes: I write tests when I'm about to frame somebody for breaking something.

0:44 bbloom: technomancy: blast.

0:45 callen: hyPiRion: you call them guardrails because TDD is like driving a car by banging into the guard rails the whole way home.

0:45 bbloom: technomancy: would you have any guidance where in aether to look?

0:45 Raynes: callen: Oh man, I love that description of tdd.

0:45 callen: If I did TDD, I would never get any actual code written. I can't think that far ahead.

0:45 technomancy: bbloom: actually I'm even wimpier than that; I use the clojure wrapper around aether.

0:46 cemerick or xeqi might know

0:46 bbloom: technomancy: damn you and your pragmatism

0:46 technomancy: bbloom: no code is better than no code

0:46 bbloom: i'm on sabbatical, i don't have any need to be pragmatic!

0:46 hyPiRion: callen: Well, I don't do TDD though. I just write guardrails to ensure I've not put up some off-by-one error or something similar in my code

0:47 callen: hyPiRion: I do the same thing, but that's not TDD.

0:47 bbloom: i've been manually toposorting, but now i have about 15 passes and it's getting to the point that i've got comments that document the ordering just for my own sanity, lol

0:47 callen: hyPiRion: I was simply launching off your comment so I could instigate a 5 minutes of hate.

0:47 hyPiRion: It's not for testing the semantics, it's for testing that I haven't made a small fuckup

0:47 heh

0:47 callen: Raynes: there's am infamous anecdote where a relatively famous TDD/agile 'consultant' attempted to use TDD to implement a sudoku solver in Ruby. After a couple months and like 10 blog posts he utterly failed to implement a working solver.

0:48 Raynes: callen: You or someone told me of this.

0:48 tpope: I want names

0:48 callen: Raynes: it's *particularly* funny because Norvig had a little "dynamic programming" tutorial for writing a sudoku solver in Python up on his site for the last decade.

0:48 Raynes: Wasn't it something to do with the Lisp guy turned Python guy?

0:48 Yes, Norvig.

0:48 callen: Raynes: aka director of research at Google

0:48 Raynes: his background was in AI, he was why I learned CL.

0:49 hyPiRion: callen, Raynes: http://xprogramming.com/xpmag/sudoku5

0:49 bbloom: tl;dr version: http://ravimohan.blogspot.com/2007/04/learning-from-sudoku-solvers.html

0:49 Raynes: How much work do I have to do in your class, professor Allen?

0:49 callen: Raynes: what?

0:50 Raynes: whoosh

0:50 tpope: ron jeffries

0:50 callen: Raynes: obviously whoosh but please explain?

0:50 bbloom: yeah, his series of sudoku articles is like watching the ravings of a mad man

0:50 Raynes: callen: You just gave me a brief history lesson.

0:51 bbloom: compare to dnolen's solver: https://gist.github.com/3217582

0:51 Raynes: you should read norvig's book

0:51 norvig is awesome

0:51 Raynes: No I should not.

0:51 callen: christ @ dnolen's solver

0:51 bbloom: Raynes: http://aima.cs.berkeley.edu/

0:51 Raynes: I've got a very long list of books I should read.

0:52 bbloom: that AI book should be on everyone's list :-)

0:52 Raynes: I haven't read a book since I read The Joy of Clojure.

0:52 bbloom: callen: yeah, it's pretty awesome

0:53 callen: Raynes: re: history lesson - I'm like that IRL too.

0:53 Raynes: You can't be nearly as obnoxious in real life as you are on IRC. Surely someone would have punched you in the face and broken your hands thus preventing you from typing.

0:53 callen: yogthos: (var ...) wrappers for handlers/apps in luminus, how does that compare with #'? Any conscious decision there?

0:53 Raynes: <3

0:54 callen: Raynes: I run tech at a startup, I'm every bit as obnoxious as you imagine.

0:54 yogthos: callen: hey uhm I didn't really consider one over the other, is there pros cons?

0:54 bbloom: callen: as a fellow obnoxious fellow, may i suggest being slightly less proud of it

0:54 callen: yogthos: that's what I was asking you!

0:55 bbloom: only half serious, I'm a very warm and pleasant person IRL, but I do tend to come off as a bit of a know-it-all because I really like sharing things like that exposition about Norvig.

0:55 Raynes: callen: I think that (var ..) might make more immediate sense to someone new to Clojure, which is what luminus is designed for.

0:55 callen: bbloom: I'm from the midwest, I'm not capable of being an asshole to anyone's face.

0:55 Raynes: yogthos: ^

0:55 yogthos: Raynes: oh that'll do it?

0:55 callen: Raynes: that's mostly what I was pondering. I was doing it the 'clever' way.

0:56 Raynes: yogthos: ?

0:56 does not compute

0:56 bbloom: callen: I'm from NY, so I'm quite capable of being an asshole to anyone's face.... let me assure you, from a place of experience, being a proud asshole has significant career implications

0:56 yogthos: Raynes: thought you meant ^ in relation to var vs #' :)

0:56 dnolen: bbloom: callen: and it even looks like some sudoku problems are competitive w/ CiaoProlog which has a big head start on all-distinct constraints :)

0:56 Raynes: bbloom: It has come to my attention that you are incapable of ever being wrong.

0:57 callen: since when is clojure.org Wikispaces?

0:57 dnolen: bbloom: callen: haven't even really taken the CLP optimization stuff seriously yet.

0:57 Raynes: callen: Since forever.

0:57 callen: dnolen: yeah well, bravo man. I'm going to abusing that gist as Pro-Clojure propaganda.

0:57 bbloom: Raynes: i'm wrong plenty, but just for *very short periods of time*. one thing i've needed to learn to do is to let people gloat for longer when i admit that they are right

0:58 callen: dnolen: ala: http://www.youtube.com/watch?v=WyvbFMGmImg

0:58 Raynes: bbloom: I've tried to have arguments with you. Mostly just get tired and give up.

0:58 :p

0:58 callen: oh he must be my clone then.

0:58 bbloom: Raynes: oh, that has nothing to do with me being right or wrong... that's stamina baby.

0:59 callen: Yeah I'm indefatigable too. Learned it from my parents.

0:59 yogthos: callen: ah so looks like #' is just a shortcut for var

0:59 callen: yogthos: yeah, stick with var

1:00 bbloom: i literally have practiced this series of phrases: "oh, i had not considered X. you are correct about Y. i was incorrect about Z. thank you for making point X. you have changed my opinion from Z to Y"

1:00 callen: yogthos: the django scaffolding is heavily commented inline for the sake of pedagogy. I think something similar (maybe slightly less verbose) would be really nice for Luminus.

1:00 bbloom: LW?

1:00 yogthos: callen: yeah that's not a bad idea

1:00 bbloom: callen: i have no idea what that acronym means

1:00 jkkramer: #' is more common in the wild than var for what it's worth

1:00 yogthos: callen: useful AND eduactional :)

1:01 dnolen: callen: it's a neat example, but hopefully we come up w/ some more real world useful constraint problems.

1:01 callen: jkkramer: I don't think #' as long as it comes with an explanation.

1:01 yogthos: jkkramer: so might as well switch it to look idiomatic and put that it just makes a var in a comment then :)

1:01 Raynes: callen: We are apparently fine together as long as we don't talk about templating.

1:01 callen: yogthos: I just said the same thing, haha.

1:01 Raynes: I ended up settling on a compromise for that anyway.

1:01 Raynes: callen: Also, you told somebody that laser focuses more on tree traversal and such than enlive. What did you mean?

1:02 I plan to support real css selectors in a future version.

1:02 callen: Raynes: you're not, AFAICT, focusing on diving into the thick of it with CSS selectors.

1:02 Raynes: As a function.

1:02 callen: Raynes: well that's fine but you had me read your code not your mind.

1:02 you asked me to read the laser code. All I know is what I saw.

1:02 so then I became the resident laser expert whenever you were gone, which is unfortunate because I'll never use it.

1:03 I can pass the baton to somebody else if they want to be Raynes' parrot.

1:03 Raynes: callen: I... didn't mean anything by that.

1:03 It's fine that you said that.

1:03 I was just saying.

1:03 You can be the resident laser expert while I'm away. I was just curious on what you meant.

1:03 Thanks for saying it is simpler than enlive though.

1:03 callen: Raynes: I didn't take any offense, I was just clearing up the reasons for what I said.

1:04 Raynes: I'm going to write a great big fun tutorial for it like I did for tentacles soon. Something Enlive does not have.

1:04 dnolen: Speaking of which, you wrote an enlive tutorial once. You should look at laser some time and see what you think.

1:04 yogthos: Raynes: cool stuff :)

1:04 callen: technically dnolen has a tutorial from awhile back.

1:04 it's comprehensive.

1:04 Raynes: I never liked his tutorial very much.

1:04 callen: it's the one I did to understand Enlive.

1:05 dnolen: Raynes: my brain is so saturated w/ Clojure projects I'm not sure I can look at anything more :) instead I just chat on #clojure.

1:05 Raynes: I unfortunately came away from that tutorial more confused than when I started.

1:05 I don't think it was necessarily because of his writing or anything.

1:05 It was just that Enlive was such a weird concept and strangely implemented.

1:05 dnolen: Raynes: I will try to check it out more closely. The repo description looked interesting.

1:06 Raynes: dnolen: Excellent. Also, yes, my head hurts frequently with the pain of a zillion parentheses beating at its edges.

1:06 yogthos: Raynes: yeah enlive is... different ;) I can definitely grok laser a lot easier :)

1:08 Raynes: yogthos: Great to hear, that's what I'm going for.

1:08 callen: yogthos: what are you using bultitude for anyway?

1:09 The problem with Enlive is that some really smart people who don't remember what feeling confused feels like wrote it.

1:09 yogthos: I get that it has something to do with namespaces, beyond that, don't know the speicifics.

1:09 yogthos: callen: to resolve if wrap-reload is present

1:09 Raynes: I was originally just going to rewrite parts of Enlive, but gave up after about 5 minutes of browsing the source code.

1:09 yogthos: callen: so if you run in dev profile stuff reloads magically :)

1:10 callen: Raynes: i kno rite.

1:10 dnolen: Raynes: my favorite part about your repo is it says Enlive is too big at 800 LOC.

1:10 * callen laughs hard

1:10 Raynes: dnolen: It's actually over 900 loc. I need to point that out.

1:10 ibdknox: lol

1:11 callen: dnolen: Clojurians have high standards for low amounts of code.

1:11 ibdknox: you can do a lot in 1000 lines of Clojure

1:11 callen: low quantities.

1:11 yogthos: indeed

1:11 I was talking about that with a friend at work the other day, back when we did java 100 lines meant you were just getting warmed up :)

1:11 now 100 lines is a heck of a lot of code :P

1:12 callen: yogthos: to be fair, Java code is kinda sparse.

1:12 } is a line.

1:12 yogthos: callen: true, but it's also very inexpressive :)

1:12 callen: which compounds the problem

1:12 callen: no doubt, just trying to be intellectually honest :)

1:12 dnolen: case in point, I was telling people it would take 500-600 lines of Clojure to do source map merging. 174.

1:12 I did waste a week on it though.

1:12 callen: dnolen: wait does that mean source maps is working in CLJS now?

1:12 Raynes: Whoa?

1:12 dnolen: callen: no, just talking about the logic for merging source maps.

1:13 Raynes: Aw.

1:13 callen: dammit.

1:13 Raynes: I might actually use cljs if it had source maps.

1:13 Right now I'd much rather burn the servers it is hosted on.

1:13 dnolen: callen: emitter needs to be fixed, probably a couple of weeks of work.

1:13 callen: waiting on 1.5.0 to merge source-map branch, and waiting on blind to become a contrib.

1:13 bbloom: dnolen: we'll definite need to get together and pair on it or something in february

1:14 callen: bbloom: are you in NYC?

1:14 bbloom: will be in feb

1:14 dnolen: bbloom: yeah!

1:15 callen: why are the cool people always on the opposite coast of me?

1:15 when I was in NYC, I didn't know any nice people :|

1:16 bbloom: callen: i'm in seattle now, so you can take solace in the fact that your coast is 1 brandon unit cooler for at least a little while

1:16 yogthos: oh btw just remembered this exists :) https://github.com/liquidz/misaki

1:16 Raynes: bbloom: Yeah, but I'm moving to the west coast in a month. I'll replace you ten-fold.

1:16 yogthos: kinda hiccupy

1:17 callen: bbloom: I'm in the bay area with a few other clojurians. Only corfield is really active with the community though.

1:17 bbloom: Raynes: it's true. you're like at least 2^10 brandon units

1:17 Raynes: Nice of you to recognize my level of awesome.

1:17 * Raynes files his nails.

1:18 callen: yogthos: is :gen-class for bultitude or something else?

1:18 yogthos: callen: it's for it to be runnable, when you make a jar or a war there needs to be java byte code to run

1:18 Raynes: What does gen-class have to do with bultitude?

1:18 yogthos: nothing at all :)

1:18 callen: I don't know, I'm asking know-nothing questions so I can identify what needs documented.

1:19 Raynes: Didn't think so.

1:19 callen: there's a lot of room for cargo cult in the luminus template still and I'm trying to figure out what I need to add comments for.

1:19 tpope: nyc :)

1:19 callen: yogthos: you don't need it outside of the server namespace, right?

1:19 yogthos: callen: nope, it propagates

1:19 callen: which also means that you never ever want to use it in a library :)

1:20 or it'll statically link everything and going to be dependent on that version of java/clojure

1:20 Raynes: I guess I should actually look at luminus one day.

1:21 yogthos: Raynes: :)

1:21 Raynes: yogthos would hate me if I did a code review.

1:21 He submitted like 30 lines of code to lib-noir and got like 10 comments.

1:21 yogthos: Raynes: lol you should, it's nice to have a second pair of eyes on it ;)

1:21 Raynes: I've suddenly become amalloy.

1:21 yogthos: Raynes: I know you'll hate all the trailing spaces though :P

1:22 callen: yogthos: is there some reason you need gen-class that lein uberjar doesn't take care of?

1:22 Raynes: yogthos: What editor do you use? You screwed up indentation all over the place but I didn't care enough to ask you to fix it.

1:22 yogthos: Raynes: eclipse (shame) :P

1:22 callen: oh that's why your whitespace makes no fucking sense

1:22 it's those middle-of-nowhere misclicks

1:22 yogthos: :)

1:22 Raynes: Hahaha

1:23 yogthos: I use the paredit mode in ccw, but yeah it spits some interesting stuff out sometimes ;)

1:23 Raynes: yogthos: I wanted you to put the request middleware in noir.request.

1:23 callen: yogthos: uberjar vs. gen-class? Anything I'm missing there?

1:23 Raynes: Not just the *request* var, :p

1:23 yogthos: Raynes: ah lol next refactor :)

1:23 Raynes: although I kinda like having all middleware in one spot too

1:23 Raynes: yogthos: Yeah, but you don't.

1:23 yogthos: stateful sessions, cookies, etc.

1:23 All of those are separate.

1:24 yogthos: callen: I think you need gen-class for uberjar to work

1:24 Raynes: Validation too.

1:24 callen: yogthos: these questions are so that the docs can be more cogent.

1:24 yogthos: Raynes: yeah that's a good point actually

1:24 Raynes: come to think of it that's how the rest of it is structured too :)

1:25 Raynes: I'll clean it up

1:26 Raynes: yogthos: Regarding indentation, https://github.com/noir-clojure/lib-noir/blob/master/src/noir/util/middleware.clj#L70 is what I was talking about. Each argument should be lined up together. Of course, cemerick disagrees and thinks everything should be indented precisely like this (because he uses Eclipse, obviously). It isn't a huge deal though, so don't worry about fixing it if this is how Eclipse inden

1:26 ts it. No sense in having to manually indent it just to please my sensibilities.

1:27 I could fix it in Emacs if I really cared with a few keystrokes.

1:27 But if I didn't berate you about something, I'd have nothing to live for.

1:27 yogthos: Raynes: yeah I hate that about ccw, it indents those wrong

1:27 Raynes: haha

1:27 Raynes: now I'm holding out for LT :)

1:27 ibdknox: damn right!

1:27 and shit I missed dnolen

1:27 yogthos: hehe

1:28 Raynes: ibdknox, yogthos: Codemirror is amazingly correct with Clojure indentation.

1:28 * callen harrumphs and hugs his precioussssss Emacs

1:28 ibdknox: I've been fixing it

1:28 Raynes: It can even reindent regions of text for you!

1:28 ibdknox: I've fixed it a bit myself, IIRC.

1:28 yogthos: ibdknox: good to hear, what about paredit mode though? :)

1:28 ibdknox: it's like a drug once you start using it :)

1:29 ibdknox: if someone looked at subpar and made it faster...

1:29 * ibdknox looks innocent

1:29 Raynes: I'm surprised nobody has done it yet.

1:29 Bergle_1: noob question.. what is subpar ?

1:29 Raynes: $google subpar codemirror

1:29 lazybot: [Subpar for CodeMirror to get paredit / strict mode (Feature request ...] https://github.com/Kodowa/Light-Table-Playground/issues/223

1:29 ibdknox: me too actually

1:29 Bergle_1: ahh nice

1:30 Raynes: Light table's code editor is a separate entirely independant project from light table. Codemirror is open source and well designed with a smart, nice maintainer.

1:30 It's also the editor on refheap.

1:30 callen: oh that's why the editor on refheap is so nice.

1:30 yogthos: yeah codemirror is fantastic stuff

1:30 Raynes: It's easy to extend. It's probably the most like Emacs of all the javascript editors in that it is super easy to extend, in fact.

1:31 ibdknox: it's getting better

1:31 Raynes: And the lexers are written in a real language instead of bloody XML.

1:31 yogthos: lol it's such a tragedy they dropped scheme syntax in js back in the day

1:31 ibdknox: I contracted him to do some really really good stuff for it

1:31 yogthos: what could've been :)

1:31 Raynes: I hate sublime text 2 more every day.

1:31 ibdknox: like separating the text model

1:31 Raynes: ibdknox: You've paid him to work on it? Do you know how awesome that makes you?

1:32 ibdknox: :)

1:32 Raynes: What stuff is he going to do, or is it top secret?

1:32 * n_b holds out for vim keybindings

1:33 Raynes: It has those.

1:33 To some extent.

1:33 yogthos: callen: mmm docs! :)

1:33 Raynes: callen: Yey, you like refheap's editor? :D

1:33 n_b: the problem with 'to some extent' is that it messes with muscle memory

1:33 bbloom: no one can ever get vim bindings right

1:33 Raynes: n_b: I use evil-mode in Emacs. I wish there was something like it for every editor.

1:33 bbloom: I think evil-mode does.

1:33 callen: yogthos: I'm not a machine like some people, but I do have a measure of passion for documentation.

1:34 Raynes: evil-mode is an amazing work of Emacs art.

1:34 bbloom: Raynes: i am extremely skeptical.... but maybe someday ill try it

1:34 Raynes: Do it.

1:34 bbloom: vim-foreplay means i dont have to bother :-P

1:34 callen: Raynes: yeah Refheap's editor is the only pastebin that hasn't utterly pissed me off when fiddling with Clojure code

1:34 yogthos: callen: that works out, I'm kinda bad about documenting :P

1:34 callen: Raynes: it's no Emacs, but I don't expect it to be.

1:34 Raynes: I like the default styling and theme too.

1:34 bbloom: i have NO IDEA what caliber any paste bin's text editor is

1:34 i have never ever done anything other than paste into one

1:35 you guys actually edit stuff in your browser, ever?

1:35 n_b: inc bbloom

1:35 Raynes: callen: Yeah, it has lots of little goodies as keyboard shortcuts and stuff. Like shift+tab reindents selected text.

1:35 callen: bbloom: I tinker inside of them when demo'ing sometimes.

1:35 Raynes: bbloom: I've done it once and thanked God I had added codemirror to refheap.

1:35 n_b: only thing I edit in browser is tiny markdown edits

1:35 Raynes: callen: The theme is tomorrow-night. I wrote a theme based on it for both codemirror and pygments, so they differ only slightly most of the time.

1:35 n_b: anything else is unbearable and ends up with jjd2wi and such all over

1:36 bbloom: anyway, ibdknox knows that i'm going to report about 398563853 vim binding bugs whenever i get around to trying light table for something significant :-)

1:36 ibdknox: bbloom: pfft, I built an IDE in a browser ;)

1:36 Raynes: Unfortunately can't make the code in the editor look exactly the same as the pasted code, but it's close enough.

1:36 ibdknox: oh good :p

1:36 Raynes: My codemirror tomorrow-night theme is now included with light table cause ibdknox loves me.

1:36 bbloom: ibdknox: and then you promptly boxed it up in an osx frame

1:36 ibdknox: yeah

1:36 fucking keybindings

1:36 that was the main problem actually

1:36 callen: yogthos: common.clj seems okay, but I'm going to admit upfront that while I've seen it a lot, I hate that nomenclature.

1:37 Raynes: ibdknox: Congrats on building a web-app-pretending-to-be-native that doesn't suck. Like that new inky thing.

1:37 callen: yogthos: I prefer to have a common function inside of a file named views.clj

1:37 Raynes: any thoughts here?

1:37 ibdknox: Raynes: inky sucks?

1:37 yogthos: callen: haha yeah I'm pretty much inheriting that from noir :)

1:37 callen: I find common.clj to be a bit generic for something that's explicitly about views/templating

1:37 I don't see anything wrong with views/common though.

1:37 ibdknox: views/common was my fault ;)

1:37 Raynes: callen: I put common stuff in common.clj in refheap.

1:38 yogthos: haha

1:38 Raynes: Not sure what you're saying is bad.

1:38 callen: okay so one point of order

1:38 ibdknox: you often have multiple layouts, so a single common function didn't work for me

1:38 callen: hrm, yeah, one moment.

1:38 Raynes: callen: I have views/common.clj. You mean just a random common.clj sitting at the top-level of the directory hierarchy?

1:38 callen: Raynes: yes I'm checking the final template right now.

1:39 yogthos: if we're going to refactor that the time is now :P

1:39 callen: yogthos: okay yes it's at the top level

1:39 yogthos: so I'm going to ask for a refactor, I'll propose a few ideas

1:39 Raynes: ibdknox: Inky is slow and screams web app in my face. It also totally doesn't work on OS X for me. I'm going to keep an eye on it though because the guy who made it made some of my favorite childhood video games (Crash Bandicoot 1 and 2).

1:39 callen: yogthos: views directory, common.clj file, views.clj file at the top level...

1:39 ibdknox: Raynes: oh cool. Crash was awesome

1:39 callen: yogthos: any opinions?

1:40 Raynes: dude. I loved Crash Bandicoot.

1:40 n_b: and the guy who did ITA

1:40 callen: Raynes: the death animations were hilarious.

1:40 Raynes: callen: Yeah man, it rocked.

1:40 n_b: which is cooler, depending on your viewpoint/love of platformers

1:40 yogthos: callen: hmm it feels a bit different with compojure, because it's all around routes now as opposed to views

1:40 Raynes: ibdknox: Note that it does work well on Windows for me. Still slow and too web appy, but it actually works and works pretty well for a pre-alpha sort of thing.

1:41 ibdknox: what does pre-alpha mean?

1:41 callen: yogthos: you can put it that way if you want, but there's always going to HTML or something generating HTML somewhere

1:41 ibdknox: lol

1:41 callen: yogthos: you're not going to have "logic-less" anything with Hiccup, which is fine, but the nomenclature here would be views as opposed to templates.

1:41 Raynes: ibdknox: Means he didn't mean for it to get out in the open yet.

1:41 yogthos: callen: but I guess conceptually it's sort of the same thing, so maybe views/ is not bad

1:41 n_b: compojure is the new hotness right?

1:41 ibdknox: Raynes: ah

1:41 Raynes: ibdknox: So it's pretty much supposed to be completely broken. :p

1:41 callen: yogthos: if it's code generating the HTML frontend and there's no templates they're the views.

1:41 n_b: Building my first Clojure web-app tomorrow, wasn't sure whether noir or compojure was the way to go

1:41 Raynes: n_b: It isn't new, but it's what we recommend now.

1:41 n_b: I saw Noir was deprecated but batteries aspect is appealing

1:42 callen: yogthos: I like views/common.clj, is that what you're thinking of?

1:42 yogthos: callen: ok sure

1:42 Raynes: n_b: Noir is deprecated. Go Compojure and lib-noir (if lib-noir contains things you want, which it likely does).

1:42 callen: n_b: use luminus!

1:42 Raynes: n_b: Check out luminus.

1:42 callen: yogthos: want a PR, or do you want to do it?

1:42 Raynes: yogthos is here and can answer questions about it if necessary.

1:42 yogthos: callen: then maybe can refactor the handler to get rid of the home view from it and move it to views/home.cj

1:42 callen: home.clj that is

1:42 callen: yogthos: that would be supremely ideal.

1:42 yogthos: that's how I structured my independent template I made a week or two ago.

1:43 yogthos: callen: ok this is taking shape, handler will have all the base routes for serving static content and not-found and then all the actual page routes will live in namespaces underviews

1:43 callen: yogthos: seems to make sense to me.

1:43 yogthos: n_b: http://luminusweb.net

1:44 n_b: Checking it out

1:44 yogthos: callen: awesome, want to do a pull? :P

1:44 callen: a PR?

1:44 yeah I can, h/o

1:44 yogthos: sweet

1:44 Raynes: Okay guys. /me is vanishing for a while

1:44 Nice discussions. I <3 you all.

1:44 yogthos: g'night ;)

1:45 n_b: oh, and if I wanted to run tasks on a schedule, uberjar up a clojure app and run that via cron?

1:45 Deece: Does anyone else use VimClojure? I have my nailgun server running, but it seems to have stopped working in vim - if I run :sr I get "pattern not found: client"

1:45 Raynes: I'm not going to bed. Playing Far Cry 2. It is Friday after all.

1:45 n_b: Deece: Did you try restarting ng-server?

1:45 ibdknox: Raynes: that's prime working time!

1:45 yogthos: n_b: yeah that's probably the easiest, or you can put a while loop in your main with a Thread/sleep

1:45 callen: Raynes: Have fun

1:45 ibdknox: Raynes: you must be some kid or something... playing games hah ;)

1:45 callen: ibdknox: yeah it is for me too. My prime time is from about 8 or 9 pm until 4 am.

1:46 ibdknox: hey I play vidya too :(

1:46 n_b: yogthos: Sounds like a solid architectural decision

1:46 yogthos: lol speaking of games anybody play sc2 around here? :)

1:46 n_b: What could go wrong?

1:46 ibdknox: I was just giving him a hard time

1:46 yogthos: n_b: :P

1:46 callen: yogthos: ...yes...I'm so awful at it though.

1:46 ibdknox: I knows it.

1:46 ibdknox: yogthos: used to

1:46 callen: yogthos: I was gold league when I played.

1:46 ibdknox: got bored with it

1:46 yogthos: I go on and off with it :)

1:46 callen: gold is not bad, I'm down to that now playing randoms :)

1:46 Raynes: ibdknox: Dude. I've written a wrapper for a markdown parser, a replacement for enlive, helped yogthos merge lib-luminus with lib-noir, and merged pull requests on tentacles this week.

1:46 ibdknox: I don't seem to enjoy competitive games much anymore

1:47 Raynes: Off my back.

1:47 callen: yogthos: okay, what's the future of the models directory?

1:47 yogthos: Raynes: you're a machine dude :P

1:47 ibdknox: Raynes: FINE.

1:47 callen: yogthos: that's partly why I never ranked up, I avoided fighting randos and mostly practiced with friends.

1:47 yogthos: callen: could axe it from the base template, since db templates will add it anyways

1:47 Deece: n_b: yep, it's running and i can telnet to the nailgun server.

1:47 callen: yogthos: k, killing it in this PR.

1:47 yogthos: callen: I tend to play teams 3v3s is my thing :)

1:47 abaranosky: Raynes: are you bragging ? ;)

1:48 n_b: Deece: It gets stuck sometimes - what happens if you kill your vim session, restart ng, then reopen vim?

1:48 ibdknox: I think 0.3 might be an experience focused released

1:48 Raynes: abaranosky: Don't have to brag when you're obviously this awesome.

1:48 Okay, leaving for real this time.

1:48 latrs

1:48 ibdknox: abaranosky: I'm about to shoot an email to the list

1:48 abaranosky: Raynes: nice :D

1:48 ibdknox: great

1:49 yogthos: ciao

1:49 ibdknox: Everyone currently in here, abaranosky is going to take over Korma and make it awesome :D

1:49 yogthos: oh awesome news :)

1:49 abaranosky: I may be dating myself, but Age of Empires 2 is the only video game I ever play

1:49 callen: abaranosky: oh ho ho, ibdknox made it official. Does this mean I can bug the ever-loving shit out of you now?

1:49 yogthos: I've been doing rts since dune 2 :)


1:49 ibdknox: abaranosky: dude

1:50 abaranosky: I played so much AoE

1:50 callen: AoE2 was one of the best RTSs.

1:50 abaranosky: callen: yes

1:50 yogthos: aoe2 was pretty fun

1:50 abaranosky: we play at work almost everyday

1:50 callen: abaranosky: #1: can you get the many-to-many from incubator mature and into core?

1:50 abaranosky: I used to play years ago, then they got me back into it

1:51 callen: I find AoE2 is better for casual playing with coworkers and friends than SC or SC2

1:51 StarCraft is too blood-thirsty.

1:51 abaranosky: callen: my plan is to approach the easy things first, and cull the giant pile of issues and pull requests

1:51 callen: abaranosky: as thou wilt, just making my hearts desires known.

1:51 abaranosky: callen: alongt he way think about what the best way to handle some of the more interesting changes

1:51 Deece: n_b: My vim seems to be connecting to the ng server now, but i still get odd errors. if i run :sr, I see "pattern not found: usr"

1:51 yogthos: callen: btw you also have to update the handler.clj to reference the views now ;)

1:52 n_b: let me boot up ng, sec

1:52 callen: yogthos: yeah yeah, I'm using the retarded github editor, sorry, h/o

1:52 too lazy to use my fork.

1:52 n_b: ohh

1:52 yogthos: lol

1:52 abaranosky: callen: plus I'm still gettin gmore familiar with things

1:52 n_b: you're not hitting leader

1:52 callen: I'll use my fork after I finish the handler fix.

1:52 n_b: Deece: What's your <LocalLeader> set to?

1:53 abaranosky: callen: if you're interested in something please do make it known on the relevant issue on the project GitHub (if you haven't already)

1:53 tpope: vimclojure D:

1:53 Deece: n_b: I think it might not be set.

1:54 callen: abaranosky: given how I've been spamming yogthos tonight, that may not be a great idea.

1:54 tpope: I don't wanna be "that guy," but foreplay.vim will totally save you a ton of headache

1:54 n_b: tpope: tbh I still haven't switched. Not in lov e with the way the REPL works in foreplay

1:54 callen: I don't wanna be "that yak", but you should be using Emacs anyway.

1:54 n_b: (popcorn)

1:55 Deece: callen: maybe so, but my muscle memory is what it is ;)

1:55 yogthos: callen: lol

1:55 n_b: Deece: let mapleader = "," then try ,sr in normal mode

1:56 yogthos: callen: ok I might as well add home.clj

1:56 tpope: I'm of course open to ideas, as long as that idea isn't copy what vimclojure does

1:57 Deece: I'm gonna give foreplay a go - vimclojure was working before after meticulous setup and now it's just broken -_-

1:57 callen: I suddenly have the perverse impulse to be exhibitionist and show a non-Emacs user my dotfiles repo.

1:57 n_b: I agree the vc way is terribly flawed and ultimately unfixable, but the manner in which I work meshes with it more than using the command-line

1:58 since I end up using it as a scratchpad buffer with (comment) and do a bunch of terrible stuff

1:58 tpope: scratchpad buffer with vimclojure?

1:58 or with foreplay?

1:58 n_b: with vc

1:59 tpope: you can totally edit scratch.clj in foreplay

1:59 that's bbloom's preferred method

1:59 n_b: er, I mean I use the repl as my scratchpad and a REPL

1:59 callen: yogthos: k, I have the remotes set for my fork. Are you doing the home.clj refactor?

1:59 n_b: it's a dumb way of working, but it's how I got started with 4clojure and the habit has yet to be broken

1:59 ibdknox: I dunno that you want to mimic bbloom, I'm fairly certain he's legit crazy. ;)

1:59 callen: yogthos: I have some alternative thoughts there, possibly.

2:00 yogthos: callen: yeah it's in progress :)

2:00 callen: what you thinkng?

2:00 callen: yogthos: it might be sacrilege, but I have controllers.clj that call out to the views. Any route-specific logic is handled in the controller.

2:01 tpope: n_b: I mean you can use scratch.clj as a makeshift repl. press cpp on the forms you want to eval

2:01 yogthos: callen: that's sort of what handler does already though no?

2:01 callen: yogthos: I think so.

2:01 Deece: well foreplay just worked out of the box after half a hour of trying to fix vimclojure so

2:01 tpope: i am indebted

2:01 n_b: tpope: I understand that, know I should switch, and just have yet to make the jump

2:01 callen: yogthos: part of this is me reconciling in my head my template with yours.

2:01 yogthos: callen: it's pretty small as is, I'm not sure it's worth adding another namespace with only a few functions

2:01 callen: yogthos: no no, I agree. If that's your intent for handler that makes sense.

2:02 tpope: well that's your prerogative

2:02 callen: yogthos: handlers as far as nomenclature goes will come with less mental baggage than controllers.

2:02 yogthos: callen: I'm thinking handler takes care of the core application, and then each view has its routes and those get included in all-routes

2:02 callen: okay that's the part I'm confused by

2:02 why would the views know anything about the routes?

2:02 tpope: Deece: number one reason I wrote foreplay was that vimclojure was way too fickle

2:02 callen: AFAIK views would just be functions called by handlers, pointed to by server.clj

2:03 yogthos: callen: I'm thinking that you'd want to keep related stuff together, for example say you have auth view

2:03 callen: so you'd have registration, login, logout, etc

2:03 callen: all of those are related, so I'd make auth-routes for them and keep them in that namespace

2:03 callen: yogthos: my point is keeping views isolated from server.clj/routes

2:03 yogthos: those only point to controllers/handlers

2:03 views are only utilized by controllers/handlers.

2:04 so sure, you might have views/auth.clj

2:04 which has a login page, a profile page, whatever

2:04 but the routes/server.clj know nothing of it, only the handlers/controllers concern themselves with it.

2:04 yogthos: callen: but then you'll end up jumping between that and the handler a lot as you add remove them when you're developing

2:05 callen: I don't see it, myself, as I've worked like this for many years.

2:05 yogthos: so you'd keep all the routes in the handler?

2:05 callen: lets clarify what is meant by routes.

2:05 when I think route, I think (GET "/" [] index)

2:06 yogthos: right

2:06 callen: index is pointed to by that route.

2:06 yogthos: our entry points the client calls

2:06 callen: you wouldn't necessarily keep everything in the handler forever and ever

2:06 you could scale that up to be a controllers or handlers folder, but a single file should fine for an example template.

2:06 hopefully the views directory example is enough to teach the newbie how to do that themselves later.

2:07 but initially the logic (manipulate session, get data, whatever) would live in the handlers and they would interchangably manipulate and utilize the views.

2:07 if they aren't doing anything, so to speak, then I have a hard time imagining why the handlers exist at all.

2:07 at that point you want to conflate views/handlers to eliminate the redundancy.

2:07 yogthos: callen: well that's why I'm kind of thinking just a single handler

2:07 callen: depends on what you ahve in mind. I like to keep them separate.

2:07 so that views can be more easily reused.

2:07 yogthos: callen: which takes care of the middleware

2:08 callen: and then you keep views+controllers and their routes together

2:08 callen: yogthos: that's just it, I'm talking more like controllers that invoke views and inject data and call the models. Those could live in the handlers just fine.

2:09 yogthos: now some simpler/flat things could end up passing through directly to a view if it's logic-less or close to it

2:09 yogthos: but any custom logic I would envision living in handlers.clj or a controllers.clj

2:09 yogthos: callen: I'd keep those as close to the view as possible

2:09 callen: handler.clj that is.

2:10 yogthos: I guess what I'm saying is I imagined views/ containing things like common/layout, not (defn home )

2:10 yogthos: callen: I find the controllers tend to be pretty lightweight and it's often helpful to see both the rendered view and the controller together right

2:10 callen: yogthos: I could definitely see that.

2:10 ibdknox: yogthos: callen: my argument against controllers in Noir: https://groups.google.com/forum/#!msg/clj-noir/FxipsTEhVtM/nDH3JH48LFAJ

2:11 callen: ibdknox: you're almost addressing a different matter that's aimed at fat models.

2:11 ibdknox: I'm in favor of fat models.

2:11 yogthos: let me introduce a word that will help clarify.

2:12 yogthos: when you say views, you're thinking of what I would call a controller or handler. You're using views like the Django people.

2:12 yogthos: when I was saying views, I was thinking of the layout functions that use hiccup.

2:13 yogthos: callen: right yeah

2:13 callen: yogthos: which is fine, and I like what ibdknox and you are saying about not having island-functionality that lives on its own but is mixed in with the routes for no reason.

2:14 yogthos: basically you want to close the loop I think

2:14 everything thing that pertains to a particular workflow needs to be in one place

2:14 callen: I think that's what I want yes, let me propose this

2:14 handlers loads the stuff in viewws.

2:15 top level of views/ is files of functions that are being invoked by the handlers

2:15 stuff like GET, POST, etc in home.clj

2:15 yogthos: what would you think of separating layouts though?

2:15 yogthos: I'm envisioning something like a layouts.clj with a (defn common ...)

2:16 yogthos: callen: heh basically flip the current naming scheme? :)

2:16 callen: common would build on base, and you could respin new layouts on top of base accordingly, but the "logic" would be in either the model or the view.

2:16 yogthos: that's part of it, yes.

2:16 yogthos: callen: but common often has other stuff in it too

2:16 Raynes: yogthos: People actually use controllers in Clojure?

2:16 callen: yogthos: well let me take a look.

2:16 yogthos: Raynes: I haven't seen it ;)

2:17 Raynes: I still don't understand what a controller is. Every time I think I've got it right, someone tells me "No, it's supposed to be..." leading me to believe that nobody really knows what they're for./

2:17 yogthos: callen: for example you might put headers, footers, stuff that's used across all pages basically

2:17 callen: yogthos: yes that's what I'm proposing live in layouts.

2:17 yogthos: Raynes: essentially a service :)

2:17 callen: yogthos: everything presentation.

2:18 yogthos: callen: well common presentation right

2:18 Raynes: Damn it, I'll never get anywhere in this game if I compulsively alt+return out of it.

2:18 yogthos: Raynes: lol

2:18 callen: yogthos: I guess but I still am squicked-out by common.clj

2:18 yogthos: callen: well when it's views/common.clj it's more descriptive ;)

2:19 callen: yogthos: not really, views is logic + pages, not layout

2:19 yogthos: it'd be more descriptive, IMHO, as layout.clj or something.

2:19 yogthos: a noobie is not going to have a damned clue what common.clj is.

2:19 yogthos: callen: well it's that whole definition of views ;)

2:19 callen: no you've got two things you're conflating here

2:19 that's my point

2:19 one thing is view functions like home

2:19 one is layouts like (defn layout ...) and header, footer

2:20 that need to be clearly delineated for new people to understand what's going on

2:20 it's highly irregular the way the Clojure community has been doing that stuff up to this point.

2:20 It only worked in Clojure because Noir aggressively used defpartial

2:21 yogthos: callen: I don't know that defpartial has been the main reason

2:21 callen: I only used it from the layout myself, and then made everything into functions

2:21 callen: maybe so but I felt like defpage/defpartial were enabling people to skim over it and it made it more obvious what was going on.

2:21 yogthos: callen: you only need to generate html in one spot

2:21 ibdknox: that was the intent of defpage and defpartial

2:22 using just functions it's harder to parse

2:22 callen: yogthos: I'm not really talking about breaking stuff apart, I'm talking about using clearer nomenclature than common.clj

2:22 yogthos: callen: basically a page has up to 3 components to it, the thing the browser renders, the service which browser calls and the routes

2:22 callen: ib thank you, yes.

2:22 ibdknox: ^^

2:22 yogthos: my point is that you've already got a layout function the home view is calling

2:23 yogthos: callen: yeah so I mean I'm not stronlgy opposed to layouts.clj instead

2:23 callen: yogthos: do you want me to just do it up real quick so you can see what I'm talking about?

2:23 yogthos: callen: yeah might be a good idea :)

2:23 callen: yogthos: it'll be a partial port of what I'd been doing in my template-thingy.

2:23 kk, h/o

2:23 yogthos: callen: structure it the way you envision it and we'll look it over, lol probably faster than talking about it :)

2:24 callen: think so. we'll see.

2:24 I just don't like sending PRs that people might interpret as aggressive.

2:26 yogthos: another matter, models/ was plural, views/ is plural. handler is not. Are we reserving plurals for directories?

2:27 or is it specific to the nature of the thing contained?

2:27 yogthos: callen: yeah that seems reasonable, directories plural namespaces singular

2:27 callen: sounds good.

2:27 yogthos: I'm just going to go ahead and tromp all over home.clj to make my point clear, sorry.

2:28 yogthos: callen: sure thing :)

2:28 callen: this is also exposing a bit of a problem with the current templating, since it's done at file level, any time you have the same file in multiple profiles, all have to be kept in sync

2:29 callen: breaking stuff up a bit more might address that

2:29 callen: we'll find out.

2:29 yogthos: I'm a devotee of the "make a mess, clean it up" methodology.

2:29 rather than tiptoe'ing.

2:29 I find it's a good way to learn too.

2:29 yogthos: callen: yeah same

2:29 callen: a lot of the time you have to implement the thing to understand it

2:29 callen: yogthos: http://folklore.org/StoryView.py?story=Make_a_Mess,_Clean_it_Up!.txt

2:29 yogthos: callen: and refactoring is easy :)

2:30 ah folklore, so many good stories there :)

2:31 callen: yogthos: I had a friend who is a programmer and startup kid too, he once told me the thing he most valued about me was that I was a walking trove of hacker lore.

2:31 yogthos: you cannot begin to imagine how much this disappointed me.

2:32 yogthos: callen: ha

2:32 callen: I did not come to the bay area after years of dreaming about it and reading about the hackers of yore just so I could be a storyteller.

2:33 yogthos: callen: that's the exciting part about clojure, there's so much new stuff to make :)

2:34 callen: yogthos: the bootstrap stuff needs fixed up a bit.

2:34 yogthos: I'm trying to decide if I wanna be the guy. I don't actually like bootstrap.

2:35 yogthos: callen: it seems popular nowadays :)

2:35 callen: I know I know

2:35 yogthos: callen: which js framework is the one you like?

2:35 callen: I'll put in a stub for you to consider using if you want, copy-pasta'd from my template.

2:35 yogthos: JS is a separate matter, I can explain sometime if you want. let me see if I can wrap this commit up.

2:36 yogthos: callen: yeah I mean the whole plan is pluggable stuff, so bootstrap's just one option :)

2:36 callen: yogthos: I know, I'm not in opposition to that, I'm just saying that the current bootstrap template is a little wonky and won't work out of the box AFAIK

2:37 I'm fixing it, I think. testing a hypothesis.

2:37 yogthos: callen: ah gotcha :)

2:37 callen: yogthos: I was griping about disliking bootstrap because it forces the use of un-semantic markup and I resent having to fix something I don't like

2:37 yogthos: tl;dr kvetching

2:38 yogthos: callen: ah hehe understandable

2:38 callen: yogthos: your use of into is problematic.

2:38 ,(into [:body] [:div [:div "blah"]])

2:38 yogthos: callen: is there a better way?

2:38 callen: ,(into [:body] '([:div [:div "blah"]]))

2:38 god dammit bot.

2:38 yogthos: lol

2:38 callen: &(into [:body] [:div [:div "blah"]])

2:38 lazybot: ⇒ [:body :div [:div "blah"]]

2:39 callen: &(into [:body] '([:div [:div "blah"]]))

2:39 lazybot: ⇒ [:body [:div [:div "blah"]]]

2:39 yogthos: right

2:39 but it takes & body right

2:39 so its should always get a top level list

2:39 layout I mean

2:39 callen: yogthos: is that in fact the expectation? i'd been doing direct inlining.

2:40 I hadn't been listifying sub-content

2:40 and instead passing the same vector stuff around.

2:40 yogthos: callen: well my idea was that layout is the top level wrapper for the page

2:40 callen: that'll change quickly in a growing webapp, but it'll make a good default base.

2:40 yogthos: callen: all the content gets passed into it and it adds headers, footers, and all that jazz

2:40 callen: yogthos: some yes, some no. there will be siblings after enough time.

2:41 and a sufficiently complicated app.

2:41 yogthos: callen: yup

2:41 callen: for example in the sqlite template there's a base-layout and layout

2:41 callen: yogthos: point being, they see hiccup syntax.

2:41 yogthos: base-layout is more barebones

2:41 callen: yogthos: they're going to think they're supposed to pass [:div ...] not '([:div ...])

2:41 the (into ...) breaks that naive assumption.

2:42 into can be used, but you need to be aware of how it violates user expectations.

2:42 yogthos: well the layout function works as you expect

2:42 callen: and document accordingly.

2:42 yogthos: yeah I'd just put a note around it

2:42 in the end you want it to be convenient to use too

2:42 callen: uh, sure but I'm saying that the common in the non-bootstrap and the bootstrap based templates are going to have different behaviors.

2:43 yogthos: ah yeah

2:43 callen: yogthos: I'll do it my way, you can see and decide for yourself.

2:43 yogthos: ok sure thing :)

2:44 callen: this might be a little messy, apologies ahead of time.

2:44 yogthos: no prob

2:47 callen: yogthos: why is the sqlite plugin common different from the default one?

2:47 yogthos: callen: ah I rolled in authentication example into that one

2:47 callen: yogthos: I actually think you should delete the sqlite plugin until the duplication and the other stuff gets resolved a bit better, also models are hammered out.

2:47 yogthos: callen: so there's a login/logout, etc

2:47 callen: it's getting a bit busy.

2:47 I get what you mean though.

2:48 I'll see if my changes are going to break the sqlite template. I think it was early for this though.

2:48 yogthos: likely :)

2:48 callen: ah, no, it won't.

2:48 yogthos: but that's alright

2:48 callen: because it has its own handler.

2:48 if I'm understanding correctly.

2:48 yogthos: yeah it does

2:48 callen: it's largely self-contained and should be fine.

2:49 Iuno. I'll just do the commit.

2:49 yogthos: we'll refactor it after

2:50 callen: yeah I'm bothered by the duplication in sqlite/, we'll see how this PR strikes you.

2:50 yogthos: callen: a lot of the stuff in sqlite is kinda new and specific to it though, there might not be a clean way around that

2:51 callen: for most plugins there shouldn't be much duplication, since they presumably provide distinct functionality

2:51 callen: yogthos: maybe, maybe not. We'll see. The problem is cross-cutting dependencies.

2:51 yogthos: callen: yeah, have to see how it goes, one option is to read the templates in and actually work with them as structured data

2:52 callen: but that seems like a lot of work, and I'd rather avoid it if possible ;)

2:52 callen: yogthos: likewise.

2:53 yogthos: it's posted.

2:53 yogthos: ok cool

2:53 callen: yogthos: I'm going to back to hacking on my own app and porting stuff to it from Luminus. Let me know if you accept the PR and post a new jar.

2:54 yogthos: ok sounds good

2:54 I'll have to do a bit of testing first though make sure we didn't break too much, so I'll probably post it tomorrow morning ;)

2:54 let me look over it now though

2:55 callen: yogthos: sounds sensible to me.

2:55 yogthos: callen: does hiccup autoexpand stuff?

2:56 callen: if you give [:body '([:div "foo])] to it

2:56 callen: yogthos: k, what you're describing is why I got rid of into

2:56 yogthos: callen: yeah if hiccup already does that then into is kinda superfluous :)

2:57 callen: yogthos: I meant something else, h/o

2:59 yogthos: garbwell.server=> (html [:body '([:div "foo"])])

2:59 "<body><div>foo</div></body>"

2:59 yogthos: callen: yeah so no need for into

2:59 callen: only thing I'd change would be to create separate home routes in the home namespace

3:00 callen: yeah I saw the comment, I'm pnondering it.

3:00 I h

3:00 yogthos: (defroutes home-routes (GET "/" [] (home-page))) then (def all-routes [home/home-routes app-routes])

3:00 callen: goes back to the idea that all the relevant stuff is in one place

3:01 callen: oh I see what you're doing there.

3:01 yogthos: basically I think a namespace should represent a workflow or a user story if you like ;)

3:01 callen: yogthos: that makes sense, but it's not really views/ anymore, no?

3:01 yogthos: you identify a particular set of tasks, make a namespace for them and go nuts, and that keeps stuff organized

3:01 callen: sort of :)

3:01 callen: I'm not sure if there's cleaner terminology

3:02 pages?

3:02 callen: you're describing app namespaces

3:02 in some sense

3:02 like django apps

3:02 yogthos: yeah

3:02 callen: project/app/models project/app/views

3:02 yogthos: I find my project template to be unambiguous and simple, but I can see what you're getting at with that.

3:02 yogthos: similar idea

3:03 once it grows you don't want to be poking around

3:03 callen: yogthos: I'll tell you right now though, what django tried with ensapsulated and reusable apps didn't really work out. You're opening up a front on a new war if you really want to do this.

3:03 yogthos: it's especially important when you come back to some code later

3:03 callen: I like the notion of locality though.

3:03 so that you don't have to grasp about for where something lives.

3:03 yogthos: yeah exactly what I'm going for with that

3:04 callen: now that I understand, I could respin my pages in those terms.

3:04 yogthos: I think we might want to sleep on this a bit :)

3:04 callen: yogthos: I'm going to be up for awhile.

3:04 I have a lot of work to do yet, tonight.

3:04 yogthos: sounds like we're mostly agreeing, just need to clean up a little bit and we're golden

3:05 I gotta hit the sack here :)

3:05 callen: I think so. There are some specifics to the nomenclature and routes handling that makes me a little queasy. I'll give it some thought.

3:05 yogthos: cheers.

3:05 yogthos: callen: you too, thanks for brainstorming :)

3:05 callen: likewise.

3:05 yogthos: callen: we'll nail this tomorrow for sure :)

3:06 callen: sounds exciting. If you catch me after I hit the gym tomorrow I might be a little less hyperactive :P

3:06 yogthos: callen: haha alrighty :)

3:06 callen: cya tomorrow

3:06 callen: gooood night

3:06 yogthos: g'night

3:55 bbloom: ibdknox: i'm legit crazy? for using a scratch file? or just in general?

4:00 callen: bbloom: wat

4:00 bbloom: [22:50:54] <ibdknox> I dunno that you want to mimic bbloom, I'm fairly certain he's legit crazy. ;)

4:01 callen: oh. that's fairly random.

4:01 bbloom: anybody that uses vim is crazy anyway.

4:02 bbloom: thank you.

4:05 callen: bbloom: do you use vim?

4:05 bbloom: yes

4:05 callen: bbloom: I'm so sorry.

4:06 $5 says the vim clojure community loses more people to LT than Emacs does.

4:06 ibdknox: what say you?

4:06 * bbloom couldn't give a shit

4:06 callen: bbloom: yes but I want a new toy to beat vim users over the head with.

4:06 >:)

4:06 * Bergle_1 thinks anyone using clojure is better than them using anything else ;)

4:07 callen: Bergle_1: true, but they aren't in here.

4:07 * Bergle_1 gives callen a nice new chew toy... no slobber.

4:07 * callen grins happily and gnaws on his chew toy

4:07 * callen *SQUEAK SQUEAK*...*SQUEAK*

4:17 ibdknox: bbloom: I was talking total nonsense

4:17 bbloom: scratch buffers are the way to go

4:18 bbloom: i do 90% of my work in a scratch buffer

4:18 ibdknox: LT is based on that concept

4:18 I have some neat ideas for adding transient areas to a file

4:18 bbloom: if i move something to a non scratch buffer, there's a 75% chance i'm about to git commit in a second :-)

4:30 ibdknox: what does "transient area" mean

4:37 Raynes: bbloom: Probably fancy speak for mini scratch buffer.

4:37 bbloom: Raynes: i assumed, but i was curious to hear his ideas

4:39 Raynes: ibdknox: You're a pretty cool cat. Using the old style mac keyboards in the lighttable.com background.

4:46 tomoj: are core.logic's conda/condu of equivalent power to prolog's cut?

5:08 borkdude: goat moaning

5:09 zilti: sheep morning

5:12 tomoj: huh..

5:13 the huge (comment) block in clojure.math.combinatorics above the ns decl seems to cause trouble in slime

5:13 since I guess clojure.core is not referred

5:40 amalloy: tomoj: i think slime assumes the ns form is the first one

5:40 tomoj: I wonder if it warrants a patch

5:41 I just copied #'combinations instead..

5:42 I suppose it is never acceptable for an IReduce impl to call f1 inside swap!

5:43 well, maybe for some crazy reducer, I dunno

5:47 zilti: This gives me an "Unreadable form" exception, but I don't see why: https://www.refheap.com/paste/7917

5:48 bbloom: zilti: do a binary search

5:48 tomoj: the Delays

5:49 zilti: Ah, oh yes. Damn. Something goes wrong when serializing that stuff...

5:56 thorwil: there's a tlog.dispatch.route/static-slugs and i thought i could just access it in tlog.render.html with its qualified name. but i get a no such var

5:57 trying to require tlog.dispatch.route in tlog.render.html leads to a Cyclic load dependency exception

5:57 i'm confused

6:16 callen: Bwahaha, broke it. CompilerException java.lang.OutOfMemoryError: Java heap space

6:20 Sgeo: I'm reading what iirc is miniKanren Scheme code

6:20 It doesn't use the define shortcut for defining named functions

6:20 Rather it does the full (define blah (lambda ...

6:41 callen: Sgeo: Schemers are digital monks.

7:35 ,(+ 1 2)

7:35 &(+ 1 2)

7:35 lazybot: ⇒ 3

7:36 Ember-: amazing skills!

7:36 ;P

7:36 callen: Ember-: no, I was trying to check which bot works.

7:36 Ember-: hehe

7:36 &true

7:36 lazybot: ⇒ true

7:36 kmicu: ,1

7:36 Ember-: he said it is true, I believe you

7:37 kmicu: , 1

7:37 why, bot, why

7:37 callen: &(->> [1 2] first (+ 2) (* 3))

7:37 lazybot: ⇒ 9

7:37 callen: &1

7:37 lazybot: ⇒ 1

7:42 Ember-: &(nth ((fn [] (map first (iterate (fn [[a b]] [b (+ a b)]) [0N 1N])))) 250)

7:42 lazybot: ⇒ 7896325826131730509282738943634332893686268675876375N

7:46 callen: &(nth ((fn [] (map first (iterate (fn [[a b]] [b (* a b)]) [1N 2N])))) 250)

7:46 lazybot: Execution Timed Out!

7:47 Ember-: heh

7:47 grows kinda large numbers doesn't it? :)

7:50 callen: Ember-: I had to know.

7:50 Ember-: if you really want fast growing, just use the ackermann function.

8:23 zilti: Is there a special function to get a subset of a map? As in, hand it a map and a list of keys, and get a new map with those keys extracted.

8:24 (get-subset {:a 1 :b 2 :c 3 :d 4} [:a :b]) => {:a 1 :b 2}

8:24 lantiga: select-keys

8:24 zilti: Thanks!

8:25 callen: zilti: you know find-fn works right?

8:25 zilti: find-fn?

8:26 callen: $findfn

8:26 $findfn 1 2

8:26 I forget the syntax, h/o

8:26 lazybot: [clojure.core/cond clojure.core/dosync clojure.core/import clojure.core/prn clojure.core/refer-clojure clojure.core/print clojure.core/newline clojure.core/comment clojure.core/or clojure.core/load clojure.core/await clojure.core/declare clojure.core/println clo... https://www.refheap.com/paste/7918

8:26 [clojure.core/unchecked-inc-int clojure.core/unchecked-inc clojure.core/inc clojure.core/inc']

8:26 tomoj: :)

8:26 callen: oh son of a bitch.

8:26 $findfn [1 2 3 4 5] 2

8:27 lazybot: [clojure.core/second clojure.core/fnext]

8:27 tomoj: wtf is clojure.core/await

8:27 callen: zilti: ^^

8:27 tomoj: oh

8:27 interesting@

8:27 zilti: callen: :)

8:27 callen: zilti: don't smile at me, smile at the bot author

8:28 why is everyone on IRC impressed with the fact that I can google and read?

8:28 tomoj: &(= (println 1) 2)

8:28 lazybot: ⇒ 1 false

8:28 zilti: or at the bot

8:28 tomoj: I don't get it

8:28 zilti: & :)

8:28 lazybot: java.lang.RuntimeException: Invalid token: :

8:28 zilti: :(

8:28 callen: ...

8:28 &({:a 1} :a)

8:28 lazybot: ⇒ 1

8:29 tomoj: actually very few of those make sense to me

8:29 &(= (cond 1) 2)

8:29 lazybot: java.lang.IllegalArgumentException: cond requires an even number of forms

8:29 tomoj: guess I don't fully understand the syntax of find-fn

8:30 zilti: I wonder how findfn works. Must be quite some code and brain behind it.

8:30 callen: so, I'm watching Parks and Recreation. The actors keep making eye contact with the camera. It's really bothering me.

8:30 zilti: Or brute-force.

8:30 callen: zilti: it's brute force.

8:30 borkdude: zilti https://github.com/Raynes/findfn

8:30 callen: zilti: first rule of programming, your first and last tries are always brute force.

8:30 last rule of programming, your middle try is also brute force

8:31 zilti: lol

8:31 borkdude: $findfn (range) 0

8:31 lazybot: java.lang.OutOfMemoryError: Java heap space

8:31 borkdude: =)

8:31 zilti: Now you did it. Our second bot is dead.

8:31 callen: everybody gotta be a smart ass.

8:32 $findfn [1 2 3 4 5] 3

8:32 zilti: &(println "I'm still alive")

8:32 lazybot: ⇒ I'm still alive nil

8:32 zilti: phew

8:32 lazybot: []

8:32 callen: really? no third? PSH BACK TO COMMON LISP


8:32 tomoj: can't seem to get findarg to work

8:33 callen: it's not a real lisp unless I can caddddadadr.

8:33 tomoj: oh it's backwards

8:33 $help findarg

8:33 lazybot: tomoj: (findarg map % [1 2 3] [2 3 4]) ;=> inc

8:34 tomoj: oh!

8:34 it's calling all the macros as functions I bet

8:34 no, that doesn't make any sense

8:36 borkdude: $findfn "help" "pleh"

8:36 lazybot: [clojure.string/reverse]

8:36 borkdude: yay

8:37 callen: $findarg reduce % [1 2 3] 2

8:38 lazybot: []

8:38 callen: $findarg reduce % [1 2 3] 6

8:38 borkdude: $findarg reduce % [1 2 3] -4

8:38 lazybot: []

8:39 []

8:39 callen: feel like I'm missing something here.

8:39 $findarg map % [1 2 3] [2 3 4]

8:39 lazybot: []

8:39 borkdude: hmzmzmz

8:39 callen: okay yes, definitely not doing it right.

8:40 $(findarg map % [1 2 3] [2 3 4])

8:40 borkdude: $findarg reduce [1 2 3] [2 3 4]

8:40 callen: ...

8:41 lazybot: []

8:41 borkdude: $(print "dude")

8:41 &(findarg map % [1 2 3] [2 3 4])

8:41 lazybot: java.lang.RuntimeException: Unable to resolve symbol: findarg in this context

8:41 callen: (╯°□°)╯︵ ┻━┻)

8:42 borkdude: there definitely should be a bot faq

8:42 what bot does what

8:42 callen: borkdude: ¯\(°_o)/¯

8:43 Ember-: callen: too much booze?

8:43 zilti: callen: Two knifes?

8:43 borkdude: callen my compliments for your ascii art

8:43 zilti: The throwing-table one is awesome

8:43 The second one looks like a dude with two knifes who just loses an eye

8:44 callen: he's shrugging.

8:51 zilti: awesome. select-keys made my day.

8:54 callen: zilti: communist lies, findfn made your day.

8:56 tomoj: why did it take me years to set *print-level*

8:56 why

8:56 Bergle_1: ask callen he has answers ;)

8:56 * Bergle_1 ducks.

8:56 tomoj: not like I didn't know it was there

8:57 I guess I just enjoyed killing my jvm when I accidentally eval'd something huge

8:58 Bronsa: bbloom: ping

9:00 callen: Bergle_1: what did I do?

9:00 Bergle_1: "[23:21] <callen> why is everyone on IRC impressed with the fact that I can google and read" i like to fish :)

9:03 callen: Bergle_1: I was teasing zilti :(

9:04 Bergle_1: i know :)

9:04 tomoj: huh, you can't use :rename with :as

9:04 I mean, you can use them together but they don't work together

9:05 .. in the way that I hoped

9:05 guess that's obvious, you need a refer

9:15 Raynes: thanks for laser. I love it already. just had to get past the current selector verbosity and take a quick spin

9:16 callen: tomoj: what do you like about it over enlive?

9:16 tomoj: I haven't ever gotten very familiar with enlive

9:16 laser seems comparatively transparent

9:17 callen: just wondering

9:18 tomoj: of course I will want to define an enlive-like selector thing

9:18 which could be a major source of opacity to enlive..

9:18 callen: nah.

9:18 tomoj: I like hickory, but that's somewhat minor

9:22 mostly I just got what I wanted done with laser and hadn't yet with enlive, but I hadn't really started with enlive, so it's unclear whether I like it over enlive

9:26 callen: okay

9:27 borkdude: tomoj I have two questions. How do I transform this enlive template to laser? https://www.refheap.com/paste/7919 And how would I do it in Enlive, without the Hiccup impureness?

9:32 callen: borkdude: Hiccup...impure?

9:33 borkdude: callen you could do everything with an enlive template, without using hiccup to generate the a tags

9:33 callen "impure" as in, not purely enlive

9:34 callen: borkdude: jsyk, <a></a> -> the a means 'anchor'.

9:35 borkdude: callen I know

9:35 bosie: has someone a good resource of explanation of why the AST in clojure is such an important detail/better than in other non-lisp languages?

9:35 i re-read the explanation in Clojure Programming but fear i require more

9:35 borkdude: bosie macro's

9:35 callen: borkdude: no apostrophe

9:36 bosie: borkdude: sure, but i am wondering about the how thats done

9:36 borkdude: callen tnx, I do that all the time...

9:36 bosie: borkdude: the clojure programming book has an ast in a java program and the same in clojure. except it is literally the same it seems

9:36 callen: borkdude: apostrophe means two things: contracted is or possession.

9:36 borkdude: callen I also know that

9:36 callen: bosie: you're reading too much into something you don't really understand, just keep reading.

9:36 tomoj: well, you'd put <a> into your template

9:37 borkdude: ^

9:37 in enlive

9:37 callen: bosie: yes, the syntax / AST in Clojure is important, no you don't need to know why yet.

9:37 bosie: ok

9:37 tomoj: I don't have time right now to work out how to translate to laser

9:37 bosie: callen: and 'when' would be that time? ;)

9:38 callen: bosie: when you learn macros, you'll get why it's so nice.

9:38 bosie: ok

9:38 borkdude: callen it's just that in Dutch we use 's sometimes

9:38 callen for plural, like hobby's

9:38 callen and pyjama's

9:38 callen: borkdude: that's not a thing in English.

9:38 bosie: thanks again callen


9:39 =)

9:39 callen: borkdude: hey the vodka is my job.

9:39 speaking of, I'm nearly out (◕︵◕)

9:39 bosie: borkdude: no. get us some of that primo dutch weed

9:40 chouser: I don't think you guys are talking about the AST

9:40 Sorry if I'm being too pedantic, but s-exprs are not the AST. Macros are about s-exprs.

9:41 callen: just when I thought I'd put the conversation to bed.

9:41 chouser: you get to burp the baby this time.

9:42 borkdude: chouser you wrote the joy, so you can explain what bosie is reading the best ;)

9:42 chouser: He's not reading Joy, so all I can do is make snarky comments.

9:42 bosie: chouser: but i bought the Joy ;)

9:43 chouser: Ah, well that's good. I'd be happy to explain any references to AST you find in there.

9:43 borkdude: chouser bosie huh, why did I read that then, it must be the holidays

9:43 callen: bosie: what chapter/section were you talking about?

9:43 bosie: borkdude: because i am reading Programming Clojure atm. I just bought the meap of joy way back and never got to read it ;)

9:44 callen: bosie: okay, two different books

9:44 bosie: callen: in PC its chapter 1, page 10

9:44 callen: yes

9:44 borkdude: bosie ah, I think the joy has excellent macro explanation, so read both ;)

9:44 callen: bosie: are you talking about Programming Clojure or Clojure Programming?

9:44 bosie: callen: ah sorry

9:44 callen: Joy *after* PC

9:44 bosie: callen: Clojure Programming

9:44 callen: bosie: don't apologize, tell me which

9:44 okay

9:44 borkdude: bosie "the clojure programming book" isn't "Programming Clojure"

9:44 bosie: i know

9:44 callen: borkdude: yes we've gotten that far

9:44 bosie: page/section/chapter?

9:45 bosie: callen: 10/homoiconicity/1

9:45 callen: kk, h/o

9:46 bosie: chouser: thanks for the offer

9:47 callen: sigh, god dammit, I was right.

9:47 chouser: the section he was talking about was in fact about s-exprs

9:48 chouser: pedantry generally isn't useful when we're talking about somebody reading the first chapter of a beginner's programming book, which I guessed him to be in the middle of and that's why I told him not to worry about it.

9:48 chouser: I guess I can apologize a second time for the pedantry.

9:48 callen: chouser: I'm just providing data for your calibrator.

9:48 chouser: ok

10:41 bawr: callen: I disagree. It makes sense to make people learn stuff properly from the get-go.

11:08 luxbock: has anyone here used clojure in org-babel with nrepl (Emacs)?

11:15 atyz: hey guys, if anyone is familiar with korma? I'm busy trying to build models, problem is those models have relationships with others. i've run into a problem where it won't let me redeclare an entity in the different models. so i suppose this leaves me with the choice of creating a new file to contain all the relationships between them. however this doesn't feel quite right. is there a "standard" for this type of situation?

11:16 gfredericks: redeclare an entity in the different models?

11:17 atyz: ahh but i have those models called from a routes file. so i'm getting an error that that one of the entities is already declared

11:17 oh sorry

11:18 umm one of my models (A) has (defentity a) and (defentity a (belongs-to b), now i'm trying to do (defentity a) in model b

11:18 gfredericks: for each model you should only have a single defentity

11:19 and you ought to be able to work out whatever you need within that constraint

11:19 I can't stick around, hopefully somebody else can help you sort it out

11:20 atyz: ah, that would mean including the other model inside it

11:20 which isn't something i really wanted to do

11:20 it seems.. big

11:21 ah no worries, thanks anyway

11:21 zilti: atyz: I'm working on a library for greater flexibility for such things, you might want to take a look at it? https://www.github.com/zilti/tetrisql

11:25 atyz: zilti: this looks more like a db migration tool

11:26 zilti: atyz: It's meant to be a library to handle korma's entities more dynamically.

11:26 I'm not even aware of what a db migration tool is meant to di

11:26 *do

11:28 atyz: *looks again*

11:28 zilti: It's my first serious library so maybe I've missed my goal

11:29 atyz: nono, it probably does exactly what you think, i may have just missed the point

11:29 i'm new to clojure

11:36 jaju: Hi guys - need some help in debugging a situation. Am trying to use compojure with ring-java-servlet in an existing web application, but see some errors I can't seem to debug.

11:37 #clojure-web is quiet - so, thought I could ask here.

11:47 bpr: how feasible is modifying clojure-test-mode.el to work with nrepl (via nrepl.el of course)?

11:47 would i be better off just re-writing?

12:04 mmitchell: i was in here a few days ago and got a nice answer from someone about compojure routes, I forgot to write down the solution! My question was: how can I dispatch a route on a single query parameter?

12:06 tmciver: mmitchell: like (GET "user/:user" [] get-user-fn)?

12:06 luxbock: I'm looking at the source for interleave. can anyone explain why this line is needed (when (every? identity ss) on line 13

12:06 http://clojuredocs.org/clojure_core/clojure.core/interleave#source

12:06 mmitchell: tmciver: actually, I meant to say query string parameter

12:06 borkdude: mmitchell if you must, you can always read the logs http://clojure-log.n01se.net/

12:07 mmitchell: tmciver: like: /xyz?param1=a&param2=b -- so in that case, I'd want to dispatch if param2 = b etc..

12:07 borkdude: cool thanks!

12:08 chouser: luxbock: that terminates the return sequence as soon as any of the inputs are exhausted.

12:08 luxbock: ah right

12:09 mmitchell: tmciver: here we go: http://clojure-log.n01se.net/date/2012-12-20.html#09:47

12:09 but, the problem is that I don't have a "default route", I just want to pass through to the next route that might match

12:09 chouser: luxbock: without that test, the return sequence would never end at all. nils forever.

12:11 mmitchell: tmciver: maybe i could inspect the param in middleware, then change the request path so that it works with standard path route matching?

12:11 luxbock: yeah got it, thanks

12:11 chouser: np

12:12 TimMc: tmciver: A Christmas-themed render from my raytracer: http://i.imgur.com/ZYPHD.png

12:13 (I finally added the ability to use colored lights.)

12:13 tmciver: TimMc: Nice, looks high-res.

12:14 mmitchell: I'm not sure I understand why you can't use normal routes. Can't you just do (GET "/xyz" [] your-fn) and then do the destructuring in your-fn?

12:15 TimMc: on vaca this past week?

12:16 mmitchell: tmciver: oh yeah, i'm thinking about this incorrectly!

12:17 tmciver: mmitchell: yeah, the wrap-params middleware makes that easy.

12:17 mmitchell: tmciver: cool yep, and we're using that

12:18 TimMc: tmciver: Yep.

12:18 I'm in the middle of nowhere, Ohio.

12:18 tmciver: Ohio, that's a state, right?

12:18 :)

12:19 What's in Ohio?

12:20 TimMc: Wife's family (father's side.)

12:29 thorwil: how can i work around that a var defined in namespace A is not available to a namespace B, where B is required by A?

12:30 TimMc: thorwil: Because the var is private?

12:30 Oh, nvm -- circular dependency?

12:31 Ralt: thorwil: pass an argument to the B function you call within A

12:31 thorwil: TimMc: not private. it would be a circular dependency, if i tried to require A in B

12:32 Ralt: hu wait

12:32 just use binding

12:32 thorwil: Ralt: i would, if that wouldn't mean passing that argument through another ns in between

12:34 * thorwil studies http://clojuredocs.org/clojure_core/clojure.core/binding

12:35 Ralt: thorwil: http://java.ociweb.com/mark/clojure/article.html#Vars

12:35 moogatronic: trying to get 'lein midge' working, running lein-midje 2.0.3, and latest leiningen2 from git, seeing: Could not locate bultitude/core__init.class or bultitude/core.clj on classpath. Any suggestions?

12:39 TimMc: thorwil: Combine the namespaces or split out a third ns.

12:40 pmaes: moogatronic: What is your namespace of your test and where is the file located? Make sure those two correspond. I had the same problem and forgot to replicate the directory structure exactly.

12:41 thorwil: Ralt, TimMc: i guess i can declare a var in B and then define it in A. kinda thinking backwards

12:45 technomancy: moogatronic: sounds like the bootstrap of the lein checkout went wrong; try removing .lein-classpath and checking the "Building" section of the readme

12:45 moogatronic: pmaes: hmm.. It looks like they correspond, if clojure.test works, should midje also work?

12:46 technomancy: oh, disregard that if it's just midje that's broken

12:46 moogatronic: technomancy: Actually I just updated lein, and rebuilt the .lein-classpath and it still seems to report the bultitude thing

12:47 technomancy: well that's the great thing about clojure.test; it pretty much always works =)

12:47 moogatronic: I'll try clojure.test real quick. I typically use clojure.test anyway, but wanted to play with midje for fun.

12:48 pmaes: moogatronic: I'm sorry, I'm not sure, I'm new to clojure. I know my issue was that I forgot a 'test' subdirectory, seemingly causing the core.clj test to be confused with the actual core.clj I wanted to test.

12:49 moogatronic: pmaes: no worries. I do have the proper namespace / file naming / etc.

12:49 clojure.test works.. .. hmm..

12:55 adding bultitude 0.2.0 as a dependency fixes it of course -- is this something that is supposed to be added?

12:55 (to the project.clj)

12:58 TimMc: thorwil: I don't think you can do that. If you declare it in B, it will be B/foo, not A/foo.

13:00 bpr: technomancy: i'm thinking of modifying clojure-test-mode.el to work with nrepl.el ... Is that feasible or is slime/swank different enough from nrepl that it would basically require a re-write?

13:00 n_b: tpope: This might be better for #vim, but is there a way to keep the command line window for foreplay open after evaluating a form?

13:03 zilti: When I'm connected to an application-embedded nREPL, can I "get into" that application's name spaces and modify them, and if so, how? Is it enough to change *ns*?

13:09 ppppaul: hey guys

13:09 could i get some datomic help #datomic

13:10 really simple problem and i can't find examples on google so easily

13:11 loliveira: is there any good parser like flex/bison in clojure?

13:13 ppppaul: hulp

13:15 zilti: in-ns seems not to be enough

13:16 moogatronic: (in-ns 'this.is.my.namespace)

13:16 works for me

13:19 borkdude: zilti in-ns doesn't load the namespace

13:19 technomancy: bpr: someone actually already did that

13:20 bpr: I haven't tested it thoroughly yet though

13:20 zilti: borkdude: (load) seems to do what I need.

13:21 nah. It doesn't.

13:21 technomancy: (doto 'my.ns require in-ns)

13:22 zilti: Ok, it was a typo, with load and in-ns I get what I want.

13:22 bpr: technomancy: ah ok. is the code available anywhere?

13:23 technomancy: bpr: it's merged into master

13:24 bpr: o

13:26 tpope: n_b: negative. it probably wouldn't be *that* hard to rig up. but then it would probably feel weird that you could only see the output from the most recent command

13:27 n_b: tpope: OK, that's what I thought after poking around in the help for command-line and saw how output is handled - thanks for the prompt response!

13:28 tpope: n_b: it would probably be more natural to do for the cqp prompt instead

13:29 I might try that

13:32 mccraig_: technomancy: nrepl.el appears to be hanging my emacs whilst executing long running forms… is that expected ?

13:33 (assuming you are a good person to ask based on your name in nrepl.el)

13:37 technomancy: mccraig_: it's supposed to be async

13:37 but I havent' been following its development closely

13:45 tpope: n_b: you can try cqP on the cqP branch. I'm not sure it's worth merging in

13:50 llasram: mccraig_: I haven't looked at the code, but my experience is that although evaluation operations are/should be async, (a) multiple operations form a queue rather than execute in parallel, and (b) ac-nrepl blocks

13:50 mccraig_: So if you kick off something long running, then do something which causes autocomplete to kick in, emacs blocks

13:54 mccraig_: llasram: yeah, that matches the symptoms… i don't recall slime having the problem so presumably slime executes ops in parallel, or ac-slime was non-blocking

14:04 dnolen: core.logic 0.8.0-beta4 going out

14:04 technomancy: oh, yeah the auto-complete stuff for nrepl is finicky

14:05 never used it but a lot of people report problems that go away when they take it out

14:05 dnolen: and maybe some deep (hopefully fun) documentation/tutorial for core.logic is in the works ...

14:22 borkdude: when you want to host a 4clojure instance on a server (for whatever reason), what is the recommended policy https://github.com/flatland/clojail/blob/master/example.policy ?

14:26 catgen: uhmmm, is there any vim support for clojure?

14:28 borkdude: catgen since no-one else is answering: yes, there is, I think it's called VimClojure http://www.vim.org/scripts/script.php?script_id=2501

14:29 catgen but I'm not a vim user, so I'm not going to google any other info you can find yourself =)

14:29 catgen: haha, thanks :)

14:29 tpope: also foreplay.vim

14:29 seangrove: vim?

14:29 clojurebot: Gesundheit!

14:29 seangrove: foreplay?

14:29 Can anyone teach clojurebot things?

14:30 Or only a restricted few?

14:31 borkdude: is there something like pop/push for changing directories in bash?

14:32 like I'm in dir a, I'm cd-ing to dir b, but then want to get back to a again

14:32 seangrove: '..'?

14:32 tpope: cd -

14:32 ivan: borkdude: pushd, popd

14:32 tpope: it's not a stack though, just a toggle

14:32 if you want a stack, read up on pushd/popd

14:32 borkdude: ivan tpope tnx!

14:33 n_b: tpope: Was in transit, will check that out and see how it goes

14:34 tpope: n_b: k, lmk

14:34 borkdude: tpope cd - is also very handy, didn't know that

14:47 TimMc: Undocumented, I believe.

14:51 * gfredericks needs a book to want

14:52 TimMc: gfredericks: Engineering a Safer World

14:54 seangrove: Hrm, my mind is blanking

14:54 If I want to have a map with multiple keys pointing to the same data, what structure is that?

14:55 borkdude: hm, trying to run 4clojure locally, but when loading the data (load-data.sh) I get this weird error https://www.refheap.com/paste/7921

14:55 gfredericks: well if it's all values, that's just a map

14:55 seangrove: gfredericks: Yeah, just values

14:55 gfredericks: borkdude: that's a weird class for it to want

14:55 seangrove: But I don't want to store multiple copies of the values in the map

14:56 TimMc: seangrove: Since they're references, no worries.

14:56 gfredericks: seangrove: (assoc m :foo x :bar x :baz x :blammo x) -- what's wrong with that approach

14:56 like TimMc said

14:56 TimMc: Unless you want the val at :x to magically change with the val at :y.

14:56 seangrove: Hrm, what if x is a map?

14:56 TimMc: So what?

14:56 seangrove: TimMc: Yes, I'd like that ;)

14:57 Well, I'll back up

14:57 gfredericks: so you want (assoc m :baz z) to change the :foo :bar and :blammo keys as well?

14:57 seangrove: I have a few fairly big maps (big for js runtimes) that need to be returned for multiple keys (think a person's email, or their phone number, or address, etc.)

14:57 Given any of those keys, I'd like to return that fairly big map

14:58 I'd also like to only update the map once, and have all the other keys point to the new data

14:59 TimMc: seangrove: That assoc that gfredericks provided does that.

14:59 borkdude: ,(let [x {:foo 1}] {:a x :b x}) ;; I guess clojure only has one instance of x right?

14:59 clojurebot: {:a {:foo 1}, :b {:foo 1}}

14:59 gfredericks: TimMc: not the last bit

14:59 borkdude: yes

15:00 seangrove: It's not a huge deal and I can get away without it right this moment, but I thought if there's some standard data structure for this, I might as well do it now

15:00 gfredericks: it sounds like a fun one to build

15:00 but a weird one to want

15:00 borkdude: close over an atom with a map in it?

15:01 TimMc: seangrove: Sometimes multiple keys will point to the same val, and sometimes not?

15:01 gfredericks: you don't have to do it statefully

15:01 it sounds like he wants equivalence classes of keys

15:01 borkdude: gfredericks ah right, you can still do it functionally

15:01 seangrove: Yeah, something like {[:foo :bar :baz] {...} [:baboom] {...}}

15:02 gfredericks: (deftype StickyMap [m key-classes] ...)

15:02 seangrove: Where passing in either :foo, :bar, or :baz would return the first map there

15:02 gfredericks: seangrove: do the key-classes ever change?

15:03 devn: http://imgur.com/G8fMu <-new logo for datomic

15:03 seangrove: gfredericks: What do you mean?

15:03 gfredericks: devn: wth is rhickey's arm doing there

15:03 TimMc: gfredericks: That's another way of looking at my question, right?

15:03 seangrove: devn: Very freaky

15:04 devn: gfredericks: he's levitating

15:04 ...or something

15:04 gfredericks: seangrove: do the keysets change at runtime? I.e., would you ever say "okay now I'm moving the :foo key over to the group with :baboom in it"?

15:04 TimMc: probably...

15:05 seangrove: They would change at runtime, yes

15:05 At startup, they're empty

15:05 gfredericks: hrm

15:06 seangrove: I suppose I could play with making it

15:06 gfredericks: I'm wondering what would be the API for changing them

15:06 reflections79: anyone out there worked with clojurescript + push state in the past?

15:06 seangrove: gfredericks: No worries

15:07 I'll come back ot it later, sounds like it's not super common anyway

15:07 reflections79: i'm attempting to access pushState with little success

15:07 https://gist.github.com/c9c2fe05606de72f5a59

15:07 gfredericks: Extra Credit: Build a StickyVector

15:08 seangrove: reflections79: One second, I'll take a look

15:08 reflections79: thank you!

15:10 tomoj: sticky?

15:10 gfredericks: why does the clojure repl not print stacktraces? do people hate them?

15:12 n_b: Error messages in Clojure are poor because Rich Hickey doesn't make mistakes and hence has never seen them

15:14 * gfredericks just wrote a whole paragraph to a coworker explaining "IllegalArgumentException Key must be integer" which comes up when you accidentally call a vector as a function

15:15 seangrove: reflections79: How do this work: (.pushState (aget js/window "history") nil nil "https://localhost:8000/me")

15:16 gfredericks: what's the workflow for improving error messages? 1 jira issue per message?

15:17 reflections79: seangrove: i'll give it a try

15:17 thanks!

15:17 seangrove: No problem

15:17 Similar, maybe easier to read: (-> (.-history js/window) (.pushState nil nil "https://localhost:8000/me"))

15:18 borkdude: gfredericks what would be an improvement to that error message?

15:18 gfredericks: appending "Perhaps you didn't mean to call a vector as a function?"

15:18 reflections79: seangrove: that works great

15:18 thank you much

15:19 seangrove: No problem reflections79

15:20 borkdude: gfredericks don't you think a global reference of exception message and possible explanations would be more useful?

15:21 seangrove: borkdude: I think that's the same thing

15:21 Just pulled into the exception message directly

15:21 borkdude: seangrove a reference could be more elaborate than an exception message

15:22 seangrove giving examples of how to reproduce the exception etc

15:22 seangrove: Ideally, both, I would think

15:23 Or, just ruminating, both in a "training-wheels" mode for clojure

15:23 Where the tooling and runtime will try to help you out as much as possible, give you links, suggestions, etc. And when you turn it off, it assumes you know what you're doing

15:24 borkdude: seangrove a special version of clojure: educlojure? ;)

15:24 seangrove: Could be pretty cool

15:24 gfredericks: X can't be cast to IFn could also use a helpful hint

15:25 given that I expect in only 0.007% of cases was somebody conciously interested in casting something to an IFn

15:25 borkdude: gfredericks yes, a very common one

15:25 gfredericks: "...alright, and then on this line I'm going to cast it to an IFn! What could go wrong?"

15:27 wat. this agda paper says that functions are not allowed to crash _and_ they have to terminate

15:27 is agda not turing-complete?

15:27 borkdude: gfredericks I think not, because it doesn't allow infinite recursion

15:28 * gfredericks wonders what exactly are the limits of usefulness of a reasonable turing-incomplete language

15:28 borkdude: gfredericks total functional programming languages aren't turing complete in general

15:29 gfredericks: total == always-halting?

15:30 borkdude: gfredericks http://en.wikipedia.org/wiki/Total_functional_programming

15:30 gfredericks: why do people put up with languages that have reified "fixity"

15:30 I think at that point you need to give up and start using lisp.

15:31 does scala have fixity?

15:31 borkdude: gfredericks maybe "not Turing-complete" doesn't have to be a bad thing - maybe you can do very stupid things with a Turing machine you don't even want ;)

15:32 gfredericks: that's why I thought it was an interesting question

15:32 surely turing-incomplete means that it can't do some set of things, but it's not obvious that that set has to have useful things in it

15:33 holy crickey

15:34 "any algorithm for which an asymptotic upper bound can be calculated can be trivially transformed into a provably-terminating function by using the upper bound as an extra argument decremented on each iteration or recursion."

15:36 * gfredericks feels like he's been missing out on something

15:37 pjstadig: yeah, where have non-crashing, guaranteed terminating programs been all my life?

15:37 dbushenko: :-D

15:37 borkdude: gfredericks it feels like a trick to me, like the IO Monad… just satisfy the termination constraint by using a decrementing counter :P

15:38 pjstadig: gfredericks: what paper are you reading? I was just reading up on region-based memory management

15:38 mthvedt: i think windows 9x had guaranteed terminating programs

15:38 but they used the always-crashing technique, not non-crashing

15:41 borkdude: gfredericks I bet Haskell won't be good enough anymore after reading about this? ;)

15:41 pjstadig: i guess being turing incomplete means that agda can never be implemented in itself?

15:41 or maybe it can be implemented in itself, but you couldn't implement, like, Java or something

15:42 or simulate Java, or whatever

15:42 assume i know what i'm talking about

15:43 borkdude: pjstadig it just means that every program written in Agda has to be provably executed in a finite amount of steps

15:44 pjstadig: borkdude: but it also means that there are some computable functions that it cannot compute

15:46 borkdude: pjstadig are some computable functions taking forever?

15:47 pjstadig: turing complete means that you can simulate a turning machine, and a turing machine has been proven to be able to compute any computable function

15:48 being turing incomplete means that there are some computable functions that you cannot compute

15:48 borkdude: pjstadig my question was, can some computable functions take forever?

15:48 pjstadig: but like gfredericks said "who needs those functions anyway"

15:48 mthvedt: borkdude: i think computable implies finite termination

15:49 pjstadig: borkdude: i don't know, but it doesn't seem relevant

15:49 mthvedt: are there any examples of useful functions that cannot be proven to terminate?

15:49 gfredericks: sorry guys I dropped out for a minute

15:49 pjstadig: i guess if non-terminating functions were not computable, then designing a language that guarantees termination would not make that language turing incomplete

15:49 gfredericks: pjstadig: http://www.cse.chalmers.se/~ulfn/papers/afp08/tutorial.pdf

15:50 borkdude: pjstadig it seems relevant, because I would like an example of a computable function that isn't computable in a total functional programming language

15:50 mthvedt: pjstadig: for any language that guarantees termination, there exists computable functions that cannot be expressed in such a language

15:50 pjstadig: borkdude: what does it mean to say that a total functional programming language is turing incomplete

15:50 ?

15:50 mthvedt: then you can make language n+1 to handle that computable function, but there will always be another

15:50 borkdude: pjstadig it is turing incomplete because it doesn;t allow some forms of recursion

15:51 pjstadig: ok

15:51 i'm not sure if/when i said that a total functional language was turing incomplete because it disallows non-terminating functions

15:51 gfredericks: mthvedt: does this parallel the incompleteness theorem?

15:52 borkdude: turing complete isn't a guarantee for a nice language, turing incomplete isn't a guarantee for a sucky language, hence, it says basically nothing

15:52 devn: gfredericks: is this an improvement? http://imgur.com/oPxw0

15:52 egghead: i'd say that one of the computeable things is to compute forever

15:52 gfredericks: borkdude: yesterday I would've bet $50 that turing incomplete guaranteed a sucky language

15:52 pjstadig: it says that there are some computable functions which your turing incomplete language cannot compute

15:52 i never said it made the language sucky

15:53 mthvedt: gfredericks: i don't know, but it wouldn't surprise me

15:53 borkdude: pjstadig if there are some, give me one

15:53 pjstadig I'm just really curious =)

15:53 pjstadig: borkdude: i'm stating something which is definitionally true

15:53 gfredericks: mthvedt: same kind of structure; given a system, there's an X you can't prove. You can make a new system with X as an axiom, but then there's an X'

15:53 pjstadig: i don't have a particular example

15:53 mthvedt: yup

15:53 gfredericks: I guess that parallels the uncountability proof as well

15:54 the set of things you might want to compute happens to be uncountable

15:54 so everything's related :)

15:54 pjstadig: borkdude: i would be interested in an example, too :)

15:54 egghead: this chat is reminding me of GEB

15:54 mthvedt: i never studied formal logic, but i know a lot of those variety of non-constructibility take off of the incompleteness theorems

15:54 gfredericks: devn: you are an odd man.

15:54 mthvedt: non-constructibility proofs

15:54 including non-computability

15:54 gfredericks: egghead: not nearly enough punning

15:56 I'm gonna start a company where the only interview question involves summarizing the incompleteness theorem and the halting problem theorem. We'll never get anything done.

15:56 is the name "Busy Beavers" taken?

15:56 borkdude: gfredericks if you can keep the people from the bank eternally busy, your company will survive

15:57 gfredericks: busybeavers.com is taken. I'm not going to go look at what's there.

15:57 borkdude: gfredericks lol

15:57 seangrove: ,(zipmap [:a :b :c :d :e] ((constantly {}))) ;; how should I be doing this?

15:57 clojurebot: {}

15:58 gfredericks: TimMc: is this book really worth 460 pages of my time? Was it life-changing?

15:58 I'm not a guy with a pile of time.

15:58 seangrove: with less parens

15:58 borkdude: gfredericks btw, I started reading "The Annotated Turing", but I bet you've already read it

15:58 gfredericks: if your clojure code doesn't work, delete parens until it does

15:58 borkdude: I haven't

15:58 dnolen: borkdude: how would you write an Agda program that animates Conway's game of life indefintiely?

15:58 pjstadig: gfredericks: "Institute of Cybernetics" I want to work there

15:59 gfredericks: dnolen: remove the word "indefinitely" and allow the user to specify 10**1000 steps :)

15:59 dnolen: gfredericks: yes but that's the point - it can't be done. You have to specify some time T which may be hihgly undesirable.

15:59 gfredericks: dnolen: is it undesirable in this case?

16:00 seangrove: ,(zipmap [:a :b :c :d :e] (repeat {})) ;; how should I be doing this?

16:00 clojurebot: {:e {}, :d {}, :c {}, :b {}, :a {}}

16:00 seangrove: There we go

16:00 dnolen: gfredericks: uh, that's one example of pretty much every program anyone actually uses on their desktop.

16:00 pjstadig: you just specify an upper bound that outlasts the universe

16:00 nothing is non-terminating

16:00 gfredericks: dnolen: ^ exactly

16:02 dnolen: pjstadig: I suspect there may trouble specifying that in Agda, but I don't know Agda and I'd like to see that.

16:02 borkdude: dnolen I don't know enough about Agda really, but I've seen you can define infinite datastructures. Maybe GoL can be expressed like an infinite data structure.

16:02 dnolen: I find the lack of results for game of life Agda on Google - unpromising

16:02 pjstadig: dnolen: neither do i, gfredericks is our expert :)

16:02 gfredericks: :P

16:03 dysinger keeps tweeting about it

16:03 pjstadig: how long is 2^64 seconds?

16:03 dnolen: Agda just recently was got a algorithm for typing records. I'm staying away.

16:03 pjstadig: seems like you could run a program for a really long time

16:04 egghead: hey dnolen does core.logic have condi and conda too?

16:04 gfredericks: from the TFP wiki article: "Some classes of algorithms without a theoretical upper bound, but which have a practical upper bound (for example, some heuristic-based algorithms) can be programmed to "give up" after so many recursions, also ensuring termination."

16:04 egghead: condi is conde

16:04 dnolen: egghead: there is only condi. conde *is* condi. conda exists.

16:04 egghead: :O

16:04 clojurebot: Gabh mo leithscéal?

16:04 gfredericks: it has conda and condu as well

16:05 dnolen: gfredericks: yeah sounds like literring your program w/ Y2K bugs.

16:05 egghead: got a copy of reasoned schemer last week, been working through it w/ core.logic

16:05 the pattern matching stuff is original to core.logic ?

16:05 gfredericks: more like ##(format "Y%dK" (rand-int 1000000000)) bugs

16:05 lazybot: ⇒ "Y802326776K"

16:05 gfredericks: egghead: yep

16:05 borkdude: dnolen Is a game loop considered computable in the world of computability? I guess it is?

16:06 gfredericks: there's a lot of core.logic not in TRS

16:06 dnolen: my bottom line for PLs, if you can't write video games in it - it's probably crap.

16:06 pjstadig: dnolen: hehe

16:06 gfredericks: borkdude: is this book mostly interesting for history?

16:07 pjstadig: dnolen: is that like some corrolary to Turing completeness...video game completness?

16:07 dnolen: pjstadig: haha

16:07 borkdude: gfredericks I don't know, I recently started reading it. It takes of with some mathematical foundations, like several orders of infinity (alephs)

16:07 pjstadig: let's formalize it and call it "Doom completeness"

16:08 if you cannot write Doom in your programming language, then it is Doom incomplete

16:08 dnolen: haha

16:08 gfredericks: I think that will hinge on the meaning of "cannot"

16:08 borkdude: gfredericks I like the style so far, I think it mixes history with theory, I like that

16:08 lol

16:08 gfredericks: borkdude: I've read a _lot_ of infinity porn :/

16:09 pjstadig: dnolen: maybe a better approach is "if nobody has written Doom in your programming language..."

16:09 borkdude: "This language has been proven to be Pacman complete. TODO: prove Doom completeness".

16:10 bbloom: Bronsa: i'm here now

16:10 seangrove: Damnit, I can't believe javascript has nothing in the language to tell you about memory usage

16:11 * gfredericks can

16:11 dnolen: egghead: in general core.logic offers a lot more than what is presented in The Reasoned Schemer.

16:12 egghead: it also rolls the various miniKanren implementation into one. If we get alphaKanren in, it'll be all of them.

16:16 gfredericks: am I using clojure-mode wrong such that it doesn't create new semicolons when I newline inside a comment block?

16:18 dnolen: well lookey here, re: Agda

16:18 you can write non-terminating programs in Agda it seems http://www.cs.swan.ac.uk/~csetzer/slides/goeteborg2009AgdaIntensiveMeeting.pdf

16:19 gfredericks: you can write impure functions in haskell too :)

16:19 but maybe this isn't done via cheating

16:20 Set must be the set of all finite types?

16:21 er...the type of finite types...

16:21 * gfredericks really doesn't know what he's talking about

16:21 dnolen: anyways looks like they're likely to figure this stuff around 2030

16:22 * dnolen goes back to Clojure

16:22 gfredericks: why do they write code in non-monospace fonts :(

16:23 tufflax: Is there a function that checks if a seq is a prefix och another seq? Like (prefix "clo" "clojure") => true

16:23 bbloom: gfredericks: for the same evil reasons they use fancy symbols instead of ascii: they hate us.

16:23 borkdude: gfredericks the trick might be called codata, but really I have never used Agda and don't know much about it either ;)

16:24 tufflax: of*

16:24 gfredericks: ,((fn prefix [a b] (every? (partial apply =) (map list a b))) "clo" "clojure")

16:24 clojurebot: true

16:24 bbloom: tufflax: for strings, you can use java itnerop to .startsWith, or use a regex

16:24 gfredericks: ,((fn prefix [a b] (every? (partial apply =) (map list a b))) "clo" "brojure")

16:24 clojurebot: false

16:25 bbloom: tufflax: or do what gfredericks does for more generality

16:25 tufflax: yeah ok, thanks

16:25 gfredericks: well

16:25 I guess mine isn't correct

16:25 given that

16:25 ,((fn prefix [a b] (every? (partial apply =) (map list a b))) "clojure" "clo")

16:25 clojurebot: true

16:25 gfredericks: that should be false I imagine

16:25 tufflax: ;)

16:25 bbloom: dnolen: i don't know much about Agda, is it destine to be the next Haskell?

16:26 gfredericks: bbloom: _I'm_ the agda expert here

16:26 bbloom: gfredericks: ok, then make with the explaining :-)

16:26 gfredericks: I don't know.

16:27 I've only been reading about this for an hour or so why should I have an opinion.

16:27 bbloom: haha ok then

16:27 you did call yourself an expert

16:27 gfredericks: relatively

16:28 bbloom: the idea that a total functional programming language can potentially do useful things was a surprise to me

16:35 borkdude: good night all

16:36 seangrove: Nested atoms - a bad idea, amirite?

16:37 bbloom: seangrove: you mean an atom in an atom? or an atom with a keypath that points to a location within the first atom?

16:37 because i was literally just thinking about the latter....

16:37 seangrove: An atom within an atom

16:38 bbloom: seangrove: ah. ok well i dunno, that's not *necessarily* a bad idea

16:38 but it means that the thing inside your atom loses some properties of a value, such as being serializable

16:39 seangrove: Ah, yes

16:39 bbloom: it might be better to replace the nested atom with a name or an id pointing to a value in a map somewhere else

16:39 seangrove: I'm mainly using it for the watchers in cljs right now

16:39 And just about to do what you suggested, more or less

16:39 gfredericks: seangrove: I think I had an atom in an atom in cljs at least once

16:39 but I didn't feel good about it

16:40 bbloom: i think the question is this: can you reasonably assign a name to a value? (a symbol, a keyword, a number, a string, whatever)

16:40 if yes, then avoid using atoms

16:41 at the top level, when you have a whole db in a single atom, then you've got a name for it myapp.core/db

16:41 but you wouldn't make myapp.core/user-123 :-)

16:43 seangrove: bbloom: slightly confused about your example

16:44 "If yes, then avoid using atoms", but then you do give a name to /db

16:44 And wrap it in an atom

16:44 bbloom: seangrove: the point i am making is that an atom is two things: it's an "identity" in hickey's model of state and time and it's a mutable reference cell

16:44 seangrove: got it

16:45 bbloom: if you can supply your own identity, ie "user-123", then you don't has (as much) need for a mutable reference cell

16:45 so avoid using one :-)

16:45 seangrove: I'm slightly worried about the overhead of swapping atoms frequently - say, a few times a second - with small-to-medium amounts of data (potentially with a few watchers, each of which will get the old and new data), in cljs

16:46 I think that's more or less how datomic is done for vastly larger data sets though, so maybe I'm worrying about nothing

16:46 I suppose the biggest cause for concern is that v8 and friends aren't going to get anywhere near the jvm

16:46 bbloom: seangrove: if there is no contention, and of course there is none in single threaded javascript, swapping is extremely fast

16:47 and i think that v8 actually can get quite near the jvm in some cases

16:49 seangrove: bbloom: I'll implement it and see how it goes then. We're working within gmail, which is already slow and assumes it doesn't have to be considerate to anyone else

16:49 Eventually I'll probably have to find a way to cut up every single step of our app to operate in < 16ms chunks

16:50 bbloom: heh, yeah i do not envy anyone writing a plugin to somebody else's web app

16:50 and i especially don't envy anyone doing it to a web app without a plugin system!

16:51 seangrove: bbloom: We've been kicking around the idea of a cljs email frontend (probably using gmail as the only backend) business webapp, with plugins in mind

16:52 bbloom: seangrove: you have absolutely no idea what you'd be getting yourself into....

16:52 seangrove: bbloom: Heh, well, we have a vague, vague idea. We've talked to some of the others who've done it

16:53 bbloom: thinkfuse's web app was practically an email client, despite not explicitly being one. the amount of work that went into dealing with seemingly simple things like rendering html email without blowing up the layout was astronomical

16:54 seangrove: Well, it's not anything we'll do in the short term

16:54 I'll want to prove out a lot of other things before we take on a huge task like that

17:02 gfredericks: TimMc: I went with http://www.amazon.com/Elliptic-Tales-Curves-Counting-Number/dp/0691151199/

17:20 timvisher: hey all

17:21 Bronsa: bbloom: yeah, sorry, i'm here too

17:21 timvisher: is there any way to discover what the value was that offended a pre-condition?

17:21 Bronsa: anyway, I've thought about it and I don't think it really makes sense to get namespace aliasing for tagged literals

17:22 since the namespaces used in tagged literals may not exist

17:28 gfredericks: timvisher: I don't think there's a built-in way. easy to write a function wrapper that catches assertion errors and re-throws an ex-info with the args

17:30 timvisher: gfredericks: wow. :(

17:30 i guess there'd be no easy way to do that. You wouldn't want to throw a message that contained an infinite seq or something like that

17:30 but i was hoping for something more clever than that :\

17:32 hmm. that really seems to throw a damper on my enthusiasm for pre and post-conditions, because the prospect of failure at a distance is pretty high. If I wrote a wrapper function, for instance, at the top level of my apis then i wouldn't have access to the arguments at the cause, would I?

17:38 tufflax: I have a file with (ns my-ns), but when I check *ns* in the file it returns "user" when I run it via lein. Why?

17:39 technomancy: timvisher: there are ways to safely print possibly-infinite seqs

17:39 zilti: timvisher: Maybe this could help? https://github.com/clojure/tools.trace

17:39 technomancy: tufflax: because *ns* is bound in the entry point of clojure

17:40 tufflax: technomancy, ok

17:41 bbloom: Bronsa: hm that makes sense.... i guess that's why keyword alias resolution only happens for ::

17:41 you'd need like ## or something

17:41 Bronsa: yeah

17:47 timvisher: technomancy: simple function call? any link?

17:48 zilti: looks interesting!

17:48 zilti: timvisher: It's like a "call stack trace with argument- and return-values"

17:49 timvisher: But if you're unlucky it can "break" the function call.

17:50 timvisher: zilti: nice :)

17:58 technomancy: timvisher: (binding [*print-length* 100] (pr-str (range)))


18:02 timvisher: technomancy: sweet!

18:02 thanks!

18:14 weavejester: Hi folks

18:14 gfredericks: hello mister jester

18:14 weavejester: A slight off-topic question...

18:14 devn: technomancy: that only works in the REPL though right?

18:14 gfredericks: weavejester: romney

18:14 weavejester: Has anyone heard of a multi-user REPL

18:14 gfredericks: would emacs give you that?

18:14 weavejester: I'm thinking for teaching purposes

18:14 dnolen: k core.logic is about to go fully lazy

18:15 gfredericks: dnolen: like just switching the defaults? or is it a lot deeper than that?

18:15 weavejester: I guess I'd like to avoid emacs. It's a great editor, but I'm not sure I want to teach someone emacs *and* programming at the same time :)

18:16 aperiodic: when i've been teaching tmux + lein repl has been pretty serviceable

18:16 dnolen: gfredericks: the issue was that we were communicating occurs-check via binding*

18:16 er `binding`, it's now a field, so we can just go back to being fully lazy

18:16 gfredericks: ah ha

18:16 Raynes: weavejester: I don't think there is anything interesting other than for Emacs at the moment.

18:16 AimHere: You could just teach someone the basic notepad move-cursor-about-save-load stuff

18:16 gfredericks: dnolen: there was a lazy version of run already, wasn't there?

18:16 bbloom: i noticed that the implementation of split-with literally calls take and drop, so it traverses the sequence twice.... but it's actually a surprisingly difficult problem to preserve laziness for both the take and the drop and reuse the traversal between the two

18:17 Raynes: weavejester: ibdknox claims to have interesting ideas for that sort of thing in light table eventually.

18:17 dnolen: gfredericks: it shouldn't make any difference to anyone except for people like myself running benchmarks

18:17 weavejester: Raynes: That would be interesting

18:17 dnolen: gfredericks: there was, but that was a hack and you couldn't set occurs-check

18:17 gfredericks: bbloom: I brought that up like a year ago and virtually everybody else thought it would be an overoptimization to do anything different

18:17 weavejester: aperiodic: tmux might be an idea

18:18 bbloom: gfredericks: it's actually really complex to do something better....

18:18 gfredericks: I'm trying to see why

18:18 bbloom: gfredericks: i'm not proposing changing it, just thought it was interesting

18:18 well, right now, it's lazy in both terms. if you do split-at and then only look at the second part of the vector, it will only traverse once

18:18 gfredericks: dnolen: I dunno, I think newcomers expect laziness and it's weird when you have to switch from run* to run for an infinite resultset

18:19 bbloom: so if you wanted to be truly lazy, you need to not traverse EITHER half until somebody tries to traverse it... and then you want to preserve that traversal

18:19 you'd need a lazy seq object of some sort that can share state with the other one

18:19 pretty interesting how such a small thing can be so complex...

18:19 dnolen: gfredericks: I'm not sure what you mean

18:19 gfredericks: bbloom: the point being to make sure that the function isn't called twice for any given element?

18:20 dnolen: gfredericks: run* just means try to find all solutions

18:20 gfredericks: dnolen: if run* were lazy, then you could effectively ignore run and just use take with run*

18:20 dnolen: gfredericks: well you can do that now if you like, but I think it's nice to have bound as part of the api

18:21 gfredericks: so you like (take n (run* ...)) go for it :)

18:21 bbloom: gfredericks: preserving laziness would mean that the second half needs to be deferred until the first half is evaluated. regardless of which half you use to evaluate it! and then only doing it once... it's tricky :-)

18:21 gfredericks: but it doesn't matter... probably should use finger trees or something instead if you need fast indexed access

18:21 gfredericks: dnolen: you can do that now? I thought it diverges

18:21 dnolen: gfredericks: btw, how did that core.logic meetup actually go? it's cool that you put that all together

18:21 gfredericks: yes that's what I'm fixing right now.

18:22 gfredericks: dnolen: it was great fun; I enjoyed it much more than doing a straight talk

18:22 60-90 minutes of 15-20 guys just hacking at exercise problems

18:22 I talked for 20 or 25 at first to present it

18:22 s/present/introduce/

18:22 it was awesome that 4clojure was so easily adapted

18:23 those guys made some great code

18:24 bbloom: yeah, now that I get my head back into it I suppose it did turn into a shared state thing; I bet you could do it pretty easily by just closing over a shared sequence

18:25 dnolen: gfredericks: that's great to hear, so people had fun w/ it?

18:25 gfredericks: I'm sad that core.logic FD code was so buggy around the time you were putting it all together.

18:25 gfredericks: (let [shared (map (juxt identity f) coll)] [(map first (take-while second shared)) (map first (drop-while second shared))])

18:25 bbloom: ^ zat work?

18:25 dnolen: done, http://github.com/clojure/core.logic/commit/3be00503588772c5ababd35f037a967fb00036e2

18:26 gfredericks: dnolen: I found that bug when I had a fun geometric idea I wanted to show; but yeah people had a lot of fun with it; the organizer said it was one of their best meetups

18:27 I could have made the 4clojure experience a bit smoother; there are a couple things that made it a bit ornery; but I was there to explain it so it wasn't too terrible

18:27 I feel sorry for whoever's been working on them in isolation since

18:28 I wonder how many people gave up without being able to figure out _.0 => _0

18:29 dnolen: gfredericks: that's great!

18:29 heh

18:30 bbloom: gfredericks: *shrug* i stopped thinking about it and went back to the more pressing issues :-)

18:31 gfredericks: bbloom: :P

18:31 bbloom: basically, i needed remove-nth and realized that was a dumb idea, so spent a few seconds thinking about javascript's splice function, realized that was a dumb idea too, and swapped out my vector with a sorted-map of id -> value and then life was good and went back to work :-)

18:31 gfredericks: bbloom: how does a sorted-map let you remove-nth efficiently?

18:31 technomancy: weavejester: someone said they were going to write a multi-user repl in this channel literally yesterday

18:32 bbloom: gfredericks: it doesn't. it replaces remove-nth with remove-by-id

18:32 dissoc

18:32 gfredericks: bbloom: ah

18:33 technomancy: weavejester: it wasn't this, but this is also interesting: https://github.com/jamii/concerto

18:33 tmux is definitely as good as the current state of the art gets

18:33 weavejester: technomancy: I took a look at that one

18:34 I'm not completely convinced I'd start by teaching someone Clojure as a first language

18:34 It needs a bit too much knowledge about the JVM

18:35 technomancy: yeah, it looks like nothing beats racket when it comes to existing teaching materials

18:35 gfredericks: let's build hostless-clojure!

18:35 technomancy: luckily you can do a lot in racket without learning horrible procedural antipatterns

18:38 bpr: technomancy: I'm using the clojure-test-mode on master, and it seems to work well, fyi (with clojure-mode from master and nrepl v.0.1.5)

18:40 amalloy: technomancy, weavejester: you mean https://github.com/munrepl/server

18:40 technomancy: amalloy: that's the one; thanks

18:40 literally a day old

18:41 weavejester: That's interesting

18:41 clojurebot: No entiendo

18:42 technomancy: weavejester: what's your take on concerto?

18:42 weavejester: technomancy: I haven't yet played around with it, but the source code looked a little rough.

18:46 I like the use of aleph and lamina to handle multi user commands

18:47 I have this idea for a REPL where each person gets a different colour prompt, but operates on the same environment

18:49 technomancy: nrepl already supports multiple users

18:49 it's just a matter of displaying feedback from other users

18:49 should be a nice fit for middleware

18:50 AimHere: Either that or interactive corewars. Winner is the guy who breaks the other two guy's repls

18:50 technomancy: AimHere: too easy =)

18:50 repls are fragile

18:50 you could build up defenses though

18:50 a self-healing repl

18:50 hmmm

18:51 Sgeo: weavejester, how about a CodeNomic?

18:51 technomancy: AimHere: actually if you had some restrictions (rate limiting, thread limits, etc) that could be a lot of fun

18:51 Sgeo: Where each person can run code independently in a little sandbox-y thing, and people can propose code to vote for to effect the whole system

18:51 weavejester: Sgeo: A what?

18:51 Sgeo: You vote on system-wide changes

18:51 And the code that manages that voting is, itself, code

18:51 That can be changed

18:51 etc

18:52 AimHere: weavejester> Nomic is some game where all players vote on the rules of the game, including the voting system

18:52 weavejester: Sgeo: Interesting idea

18:52 AimHere: weavejester, I don't think there's been an actual finished game of Nomic in history

18:52 weavejester: AimHere: Oh, I've heard of that

18:52 amalloy: (inc AimHere)

18:52 lazybot: ⇒ 1

18:53 Sgeo: AimHere, why would anyone want to "finish" a game of nomic?

18:53 AimHere: Well the idea would be to win it, before everyone gives up and gets bored

18:53 Sgeo: There have been nomics that have been won

18:53 Although the one I'm thinking of has rules such that winning doesn't end it

18:53 AimHere: Really?

18:53 Sgeo: It's been running since 1993

18:54 http://agoranomic.org/

18:54 I'm sure you could do a finite duration nomic though. Not sure if Suber's initial ruleset is geared to finite duration or not

18:55 There's also BlogNomic, which does a sort of theming thing. Everytime someone wins, the themed rules are repealed, winner decides new theme and is sort of an imperial ruler

18:55 So the rules never get too complex

18:55 http://blognomic.com/

18:55 jlewis: i think there should be a law about the inevitability of a group of bored programmers to start talking about nomic

18:55 it's just so tempting

18:56 Sgeo: RishoNomic is long dead

18:56 Does that count as being finished?

18:56 * AimHere predicts a github-based nomic in the next 2 years, if there isn't one already

18:57 Sgeo: http://waxbanks.typepad.com/blog/2010/03/all-in-game-nomic-and-self-interest.html

18:57 * Sgeo goes to read that

18:57 AimHere: Sgeo, well most nomics seem to just peter out through lack of interest, as far as I can tell

18:58 Sgeo: AimHere, Agora has periods of disinterest and interest

19:51 devn: i wonder what a game of nomic in datomic would look like

20:17 n_b: So I have some Java source I'd like to call out to from my Clojure code - do I just drop the whole com.one.thousand.long.package.name structure into the src/ dir of my lein project?

20:18 gfredericks: probably not

20:18 you might have to compile it independently

20:19 maybe there's lein support somehow or a plugin, but I would be surprised if any tactic like that just worked

20:19 n_b: Ah

20:19 This should be fun...

20:20 gfredericks: it's worth a try though :) I've never considered the situation

20:20 heck I might try it miself

20:20 amalloy: it really is (almost) as easy as that

20:20 just steal from https://github.com/flatland/clojure-protobuf/blob/develop

20:20 set the :java-source-paths in project.clj, and dump your java in there

20:22 gfredericks: amalloy: I hadn't seen this project before; I'm curious why you can't do everything at runtime

20:22 also does that import line in the example need a quote?

20:23 amalloy: gfredericks: you mean all in clojure?

20:23 gfredericks: amalloy: that too

20:23 n_b: amalloy: That worked! You are the savior of my Hackathon project

20:23 amalloy: well, when ninjudd started the project deftype didn't exist yet

20:23 gfredericks: amalloy: that is a good reason.

20:23 n_b: just spent hours trying to fix issues with JRuby and decided to give it a try with Clojure

20:24 gfredericks: ruby was not made for the jvm :(

20:24 amalloy: and we want to wrap the java classes that protoc generates, so at least some of it has to happen not-at-runtime

20:24 n_b: I can't wait til they have to deal with refinements

20:24 and by can't wait, mean "feel sorry for them"

20:24 amalloy: n_b: because what ruby really needs is more action-at-a-distance

20:25 gfredericks: amalloy: it's what developers want! it's tasty! it "just works"!

20:25 principle of least surprise or something

20:26 amalloy: speaking of least surprise, i read about the difference between proc and lambda the other day. talk about a surprise

20:27 gfredericks: all that complexity just so things can be dottable

20:27 amalloy: dottable?

20:27 gfredericks: yeah; foo.bar

20:27 methods

20:28 methods are the difference between procs and lambdas

20:28 amalloy: not the only difference

20:28 i was actually referring to how "return" behaves inside a proc

20:28 Sgeo: Oh god Ruby

20:28 gfredericks: that's what I mean

20:28 Sgeo: ?

20:28 gfredericks: methods:blocks::lambdas:procs

20:28 yes of course we have four different non-functions to make up for our lack of functions

20:29 Sgeo: You know what would be nice? If Smalltalk overtook Ruby

20:29 bbloom: amalloy: yeah proc and lambda are entertaining... but it actually makes sense in the world of ruby... it's a reasonably elegant solution to a problem you shouldn't have in the first place :-)

20:29 Sgeo: Ruby is a Smalltalk-like system poisoned by ugly syntax

20:29 And changes

20:30 Although Smalltalk also has a similar culture of monkey-patching I think

20:30 If method names were namespaced I would be happy

20:30 bbloom: you could so something similar with dynamic variables and continuations in a scheme world. i forget which is which (proc vs lambda) but one of them would bind 'return to a continuation and the other wouldn't

20:31 Sgeo: Oh, I still want to port Racket's for/fold to Clojure

20:31 bbloom: similar to return, yield, continue, break, etc all that could be continuations as well

20:31 gfredericks: Sgeo: what it is?

20:31 bbloom: but ruby hard codes them

20:31 Sgeo: gfredericks, syntax sugar around reduce, basically

20:32 bbloom: Sgeo: maybe you should refheap up some examples of what it would look like in clojure

20:32 Sgeo: don't even need to implement it yet, just curious to see what the usage would look like

20:33 amalloy: for/fold looks like it would be very easy to write

20:34 Sgeo: ....I just forgot what comment syntax is in... ok, got it

20:35 amalloy: well, maybe not

20:35 gfredericks: it's ; or #_ or the new clojure heredoc comment syntax ;-*;__

20:36 amalloy: gfredericks: omg that really works!!1

20:36 gfredericks: my emacs still doesn't make it easy for me to do multiline semicolon comments :(

20:37 I'm all manually "RET SEMICOLON SEMICOLON SPACE" continue typing

20:37 amalloy: gfredericks: whaaaat. set the region and then M-;, right?

20:37 gfredericks: amalloy: heck I don't know anything about emacs

20:37 amalloy: M-; is a funny command "comment-do-what-i-mean"

20:38 gfredericks: I think gnome-terminal might be catching the M-

20:38 well it does something

20:39 currently M-; seems to do what M-m does

20:39 oh wait there it did something different

20:39 amalloy: this might be useful

20:40 not what I wanted but better than the current approach

20:40 Sgeo: https://www.refheap.com/paste/7925

20:40 I don't know if I got that right

20:41 bbloom: dnolen: ping

20:41 dnolen: bbloom: pong

20:42 bbloom: dnolen: i still really want some small bits and pieces of reified vars in cljs... what do i need to do to get you to seriously consider such patches? :-)

20:42 Sgeo: Does my example make sense?

20:42 The first vector defines accumulator(s), second vector is like the vector in a for form?

20:43 dnolen: bbloom: just not interested in considering it at all, maybe post bootstrapping

20:43 amalloy: gfredericks: you could also try: ; type type type type type, no RET at all, type type type...done, M-q

20:43 Sgeo: (Although actually that's closer to Racket's for*/fold. for/fold doesn't do nested loops with multiple things in the thing

20:44 bbloom: dnolen: all i want is the 'var special form to create a Var object which is deref-able. it's actually quite easy to accomplish and doesn't even modify the binding macro in anyway

20:44 dnolen: all it would do is when it sees #'foo it would turn that into (Var. 'user/foo (fn [] user/foo))

20:44 devn: Anyone know how to make datomic pick up the fact that I've required clojure.string :as s. I'm trying to call split within a datomic :where clause and it complains that it doesn't know about the namespace s.

20:45 bbloom: dnolen: given (deftype [sym deref])

20:45 dnolen: maybe add in a 'meta too :-)

20:45 that'd be it!

20:45 actually, probably not even meta

20:45 gfredericks: amalloy: oh I bet that would work; it just feels so wrong to not RET

20:45 I'm afraid if I don't RET all of a sudden notepad will pop up and I'll have to use that

20:45 amalloy: gfredericks: i think if you set auto-fill-mode it would RET for you

20:46 bbloom: dnolen: it literally would have ZERO impact on any code that doesn't use (var x) or #'x

20:46 gfredericks: ooh there's something to google

20:46 bbloom: dnolen: thoughts on that?

20:46 amalloy: yeh, it does

20:46 dnolen: bbloom: implementing reified var semantics piece meal seems half-baked.

20:46 bbloom: dnolen: well, you won't let me get fully baked :-)

20:46 dnolen: bbloom: also you're the only one that ever asks for this - so I'm not convinced there's any reason to do it as of yet.

20:47 bbloom: dnolen: i ask for them b/c i'm using them in my fork

20:47 dnolen: and they work fine :-P

20:47 dnolen: bbloom: I could be wrong about that, of course and you could start a dev ML thread - but I think you have a specific use case in mind that others don't share.

20:47 justincampbell: im new to clojure, and id like to just play around with some code, but more than a repl

20:47 ideally with vim and the makeprg

20:48 i tried setting up cake but when i cake run it just exits silently

20:48 does it make sense to use lein for exploration code?

20:48 bosie: justincampbell: yes!

20:48 justincampbell: (coming from ruby if that helps)

20:48 bosie: justincampbell: i come fromr ruby, i read a clj book. i use leiningen

20:48 bbloom: dnolen: i'm getting close to something that i can release, but it's useless if everyone needs to use my cljs fork :-(

20:48 bosie: justincampbell: the advantage for leiningen (+ its repl) is also the dependency management. definitely go for leiningen

20:49 devn: nevermind, guess it just needed to be the fully qualified name: clojure.string/split instead of s/split

20:49 justincampbell: bosie: thanks!

20:49 bosie: justincampbell: setting up vimclojure is a cake too

20:49 justincampbell: bosie: im upgrading to 2.x right now

20:49 yeah i did that last night

20:49 gfredericks: amalloy: well now I know more things. Thanks.

20:49 dnolen: bbloom: so demonstrate why you think it's a great idea :) And talk about it, I still have no concrete idea what you're going to use this for.

20:49 bosie: justincampbell: though i switched to intellij :(

20:49 dnolen: bbloom: and by talk I mean on a blog w/ code examples, non-trivial usage etc.

20:51 Sgeo: I guess I should be thinking about how I'd implement for*/fold?

20:52 bbloom: dnolen: *sigh* it's gonna be easier to just finish my thing with my forked cljs & then demonstrate that and my use case will become obvious.... i guess i better get back to work then

20:52 Sgeo: ...come to think of it, it heavily reminds me of loop/recur

20:54 dnolen: bbloom: a simple nice use case is all that's required. I can't imagine your fork has significant changes for this to work, right?

20:54 bbloom: no, it's a pretty small set of changes

20:55 dnolen: bbloom: my concern is that your descriptions have been a bit abstract - it'd be easier to understand if there was a concrete - here's this pain point in CLJS programs that this could alleviate.

20:56 Sgeo: amalloy, if I have a macro that expands to (let [it <stuff>] ...body provided to macro...)

20:57 Within the body, is "anaphor" a good term to describe "it"?

20:57 amalloy: sounds fine to me

20:58 Sgeo: Ok, thanks. Going to rant on my Tumblr now. Rant/feature suggestion

20:58 bbloom: dnolen: i'll get concrete as in code soon, but the main reason i've been abstract is b/c i've been iterating *a lot*. however, every single iteration of my scene graph project has a common element: you can assign dynamically scoped names to sub-views or sub-models.

20:58 bosie: bbloom: pardon, scene graph project?

20:59 bbloom: bosie: it started as a GUI toolkit, but now the GUI parts are a plugin to a more general scene graph :-)

20:59 dcb: devn: I think you are correct; functions within queries have to be fully qualified. see https://groups.google.com/forum/?fromgroups=#!searchin/datomic/fully$20qualified/datomic/IdtjQCp7vfs/NjtIl1-MAycJ

21:00 bbloom: and the HTML/CLJS parts are a plugin to the GUI toolkit! heh

21:00 bosie: bbloom: oh. i didn't know 'scene graph' is the name of a data structure

21:00 Sgeo: (tl;dr: I think allowing (let [somenamespace/something blah] ...) is useful)

21:01 bbloom: bosie: it's not a particular data structure, it's just the general name for the data structure behind a simulation

21:01 bosie: k

21:01 bbloom: bosie: in my case, it's a tree of maps

21:02 bosie: bbloom: hmm. reading a bit on wiki, would the same be used for something like google earth?

21:03 bbloom: bosie: practically any modern graphical system uses some kind of scene graph

21:03 bosie: bbloom: fair enough

21:04 justincampbell: if i make a new lein project, how do i run the file in core?

21:04 bbloom: bosie: there are two general rendering strategies: "immediate" and "retained". in the former, it's procedural, you draw things by mutating some drawing target. in a retained system, you general built on top of some immediate system, you have a scene graph and some immediate mode renderer

21:04 justincampbell: lein run says no :main defined, and if i do :main myprojectname it says it cannot find it

21:07 gfredericks: :main should be the namespace name

21:07 maybe myprojectname.core ?

21:08 marcelus: I'm trying to inject some html into a goog.ui.Dialog object with cljs and I keep getting back what looks to be a vector [object Object] when ever I click the link that activates the dialog. here is a gist of the two files: https://gist.github.com/c2e1380e10faa59e6bdb

21:08 Sgeo: And like an idiot I try out my Clojure code in the C++ section of IdeOne

21:08 marcelus: Any clues as to what the problem is?

21:08 gfredericks: Sgeo: it didn't compile?

21:09 marcelus: I think that's JS's normal toString for an arbitrary object

21:09 i.e., not a vector

21:09 marcelus: hmm

21:10 Sgeo: Ok Chrome is really pisisng me off with its tendency to crash whenever I close a popup

21:10 bbloom: Sgeo: sounds like a bad plugin.

21:10 marcelus: I was thinking that it was just returning a string representation of a clojure data structure

21:10 bbloom: s/plugin/extension/

21:11 dnolen: marcel: what is the type of :body

21:11 when calling `create-dialog`

21:11 marcelus: ^

21:12 marcelus: well the server is returning html so the idea is to pull in a string (or the html if possible) in order to load it into the dialog

21:13 now I'm not so familliar with clojure so I might have fouled that all up but that is the intention here

21:13 dnolen: marcelus: but Ajax requests are async - so it looks like you're returning a request object, not the value from the server.

21:14 f is just the request object it looks like

21:16 justincampbell: Compiling fpoo.core Exception in thread "main" java.lang.ClassNotFoundException: fpoo.core

21:16 gfredericks: lein new fpoo, in project.clj i add :main fpoo.core, lein run, it says

21:16 gfredericks: sorry those are backwards

21:18 marcelus: hmm

21:19 dnolen: do you know of a way to print the type of a binding to the browser console?

21:19 gfredericks: justincampbell: you'll need a function in that namespace called -main as well

21:20 you can also use lein run with the -m option to specify arbitrary functions to call; that would let you avoid the :main option as well

21:20 dnolen: marcelus: (.log js/console foo)

21:20 Sgeo: ,`do

21:20 dnolen: marcelus: https://gist.github.com/65ee1280c5c725ae9214

21:20 clojurebot: do

21:20 Sgeo: ,`let

21:20 clojurebot: clojure.core/let

21:20 Sgeo: hm

21:20 If the reader can tell the difference..

21:20 dnolen: marcelus: you want something like this ^, I've included some formatting tips :) code untested

21:20 Sgeo: Wait, I guess it can't

21:21 `(blah do let for recur loop)

21:21 ,`(blah do let for recur loop)

21:21 clojurebot: (sandbox/blah do clojure.core/let clojure.core/for recur ...)

21:22 gfredericks: ,`let*

21:22 clojurebot: let*

21:22 gfredericks: ,`[let let* fn fn* loop loop*]

21:22 clojurebot: [clojure.core/let let* clojure.core/fn fn* clojure.core/loop ...]

21:23 marcelus: let me give it a shot

21:27 Sgeo: My entire post may be worthless :(

21:28 Are there any cases where anaphoric macros are very useful, and they can't just be turned into a non-anaphoric macro that accepts a symbol as a name for the thing?

21:29 * gfredericks has never heard of one

21:29 Sgeo: Even reset could be written as something that asks for a name to give shift

21:29 I think

21:32 * marcelus wonders if cljs repls can be made to work over the internet

21:32 amalloy: Sgeo: i don't think that's a very useful point of view. any macro can be turned into just a function, if you require the user to...write more stuff. that doesn't mean macros aren't useful. what about loop, for example? if it were a macro instead of a special form, it would anaphorically introduce a function named "recur"

21:33 but rewriting it to require a name for recur makes it pretty useless

21:33 gfredericks: marcelus: google himera

21:34 tpope: I felt so betrayed when I discovered fn and let and the like weren't actually special forms

21:34 you lied to me, Clojure Programming!

21:37 gfredericks: it was for your own good.

21:37 (that was also a lie, but it was for your own good)

21:38 devn: http://www.flickr.com/photos/conj/8223169413/in/photostream <--do you know this man? He was at the conj this year (obviously) but I can't remember his name.

21:39 gfredericks: devn: oh that's rich hickey, the discoverer of Clojure

21:39 * devn facepalms

21:39 marcelus: ^_^

21:40 gfredericks: that photo makes me imagine that there was a long line of people for taking photos with rich

21:40 devn: there wasn't

21:40 marcelus: I can so picture devn making an "I should have know that!" face.

21:40 bbloom: heh "discoverer"

21:41 devn: marcelus: do we know one another?

21:41 Sgeo: amalloy, anyone else interested: v

21:41 oops

21:41 http://sgeo.tumblr.com/post/39178562890/namespaced-anaphors-in-clojure

21:41 marcelus: no we do not most likely.

21:41 tpope: devn: first you forget rich, now marcelus? :(

21:42 marcelus: tpope: stop trying to mess with devn's mind. :D

21:43 gfredericks: devn: I met one of you bendyfolks at strangeloop

21:44 marcelus: hmm it seems like clojurescript doesnt generate an implicit argument for functions that are to be used as callbacks

21:44 well at least that is what the warnings I am getting suggest

21:44 devn: gfredericks: probably chris wilson

21:44 gfredericks: devn: yep

21:44 dnolen: marcelus: that doesn't make sense.

21:47 marcelus: he ran away

21:48 xeqi: maybe he closed emacs.. but who would do that

21:49 * gfredericks closes emacs every two weeks when it crashes

21:49 * Sgeo wonders if he should post on Reddit

21:49 n_b: I have a Java object to which I want to do something like (defn [obj & args] (-> (apply (.invoke obj) args) (.getResult)) but I'm not having much luck and think I'm approaching it in the wrong way

21:51 gfredericks: n_b: so you don't know what method you're going to call until runtime?

21:51 n_b: args have variable arity

21:51 gfredericks: given you don't know the length of args until runtime

21:54 n_b: Oh

21:54 No, I do

21:54 This works just as well as the fancy version: (defn call [cl srv mthd arr] (. cl getResult (.invoke cl srv mthd arr)))

21:54 seangrove: How can I apply dissoc with a seq of keys with swap!ing an atom?

21:54 n_b: I overthought it

21:54 seangrove: ,(let [ex (atom {:a 10 :b 5 :c 0}) to-remove (map first (take 2 (sort @ex)))] (swap! ex dissoc to-remove) (count (keys @ex)))

21:54 clojurebot: 3

21:55 seangrove: I can just write a little function, but seeing if there's nice syntax for it

21:55 amalloy: (apply swap! ...)

21:56 seangrove: Ahem

21:56 * seangrove wonders why he was treating swap! like a special form

21:56 bbloom: seangrove: confusion with set! ?

21:56 seangrove: Thanks amalloy :)

21:58 bbloom: Could be it I suppose. I'll look at the source of some of this stuff

21:58 * seangrove wishes M-. worked in nrepl when using cljs

22:05 marcelus: the himera page should be linked on the clojurescript github page

22:06 I had run into it before today but forgot it existed.

22:07 gfredericks: why? anybody starting out in clojurescript should be expected to think "Oh, I should google for 'Himera' just in case there are any interesting and relevant results."

22:08 hiredman: marcelus: have you seen the various nrepl clojurescript options? himera is dated

22:08 marcelus: have not

22:09 i happen to be using dotcloud so I would be thrilled if I could rig a browser connected repl over that

22:09 hiredman: marcelus: https://github.com/cemerick/piggieback

22:10 marcelus: I know its possible to run clojure on that service as they allow jvm but i've had issues running php in interactive mode with it

22:11 hiredman: browser connected repl?

22:11 most people mean "a repl that evaluates code in the context of a browsers js runtime" by that, is that what you mean?

22:12 marcelus: yea

22:12 hiredman: so how does dotcloud figure in to that?

22:12 marcelus: basically you can evaluate cljs and stuff happens in the browser window

22:12 well ive only ever seen this done on the same machine

22:13 hiredman: right

22:13 marcelus: I hate dealing with configuring servers so for the project im working on i use dotcloud instead

22:13 just rsync code over to it and run

22:13 like heroku without the git dependency

22:14 hiredman: sure, but none of that explains how dotcloud figures in to your browser connected repl

22:14 you don't want to install the cljs compiler locally?

22:15 marcelus: no I dont want to bother with installing the webserver, and mysql locally

22:15 though I probably will tomorrow

22:16 i'm just wondering if anyone has ever configured something like brepl to work over a service like it

22:37 hiredman: https://gist.github.com/c2e1380e10faa59e6bdb might you know why I keep getting this Uncaught TypeError: Object [object Object] has no method 'call' in the generated js?

22:38 [1]tufflax: Are there functions like slurp and spit but for binary files? Or what is the easiest way to do something like that?

22:39 gfredericks: you want byte arrays?

22:39 marcelus: The xhrio object definitely has the data I want coming back. however when the js goes to execute my callback it gives that error method.

22:39 [1]tufflax: I want to download and mp3 from the web and save to disk

22:39 tufflax: an*

22:42 gfredericks, so yeah, maybe byte arrays would to it

22:43 gfredericks: if flatland doesn't have a good lib for that I'll be disappointed

22:46 technomancy: tufflax: you can call copy on an input-stream from a URL

22:46 java.io.copy

22:51 ynniv: is there a def that only sets a value if it wasn't already defined?

22:54 bbloom: defonce

22:56 ynniv: bbloom: most excellent

22:59 tufflax: technomancy, ah nice! thanks

23:12 bbloom: what can cause exceptions to say [trace missing] ?

23:18 marcellus1: f

23:18 bbloom: Unable to resolve symbol: f in this context

23:19 marcellus1: haha wrong window, woops!

23:19 Raynes: dsantiago: You around?

23:30 * Sgeo vaguely wonders if Racket's hygienic macros could actually be ported to Clojure

23:30 technomancy: Sgeo: someone has done it

23:30 Sgeo: technomancy, o.O

23:31 technomancy: but nobody uses it because the person who ported it can't stop going on about how great they are and how horrible non-hygenic macros ore

23:31 are

23:31 it's really tiresome

23:31 Sgeo: :/

23:31 Hygienic macros are better when you don't need non-hygiene, I guess, but...

23:31 marcelus: :(

23:32 Sgeo: Also non-hygiene is easier to understand IMO

23:32 technomancy: I dunno; auto-gensym solves every problem I've ever encountered or heard about with non-hygenic macros.

23:32 bbloom: technomancy: auto-gensym + namespace resolution

23:32 that last part is very important :-)

23:32 Sgeo: I think Racket-like hygienic macros might be useful for very simple templatey cases

23:32 More convenient

23:33 technomancy: bbloom: right; auto-qualification

23:33 Sgeo: Also for porting Racket macros >.>

23:33 Such as for*/fold

23:34 Every Lisp and its mother uses #' to mean something else

23:35 technomancy: Sgeo: elisp uses it to mean "hey everyone, I'm a CL programmer who either doesn't understand that this doesn't do anything in elisp or wants to vaguely protest that fact."

23:36 is anyone using the new clojure-test-mode with nrepl.el? wondering if that is pretty stable at this point

23:43 ynniv: hmm, does anyone know how to specify multiple acceptable classes in enlive?

23:43 seems like it might require code

23:46 ah, nice, you can specify alternatives using sets

Logging service provided by n01se.net