#clojure log - Apr 05 2013

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

0:12 mmitchell: gfredericks: i finally got it, and dang it's ugly! But this actually does what I want: https://www.refheap.com/paste/13283

0:12 if you change the "(is (= (subtract 1 2) 100)" to "(is (= (add 1 2) 100)" you'll see the error message in the REPL

2:16 mjc`: whoa. the full ramifications of laziness just hit me.

2:16 my program exited before all my side effects happened

2:17 arrdem: that can happen... isn't it cool?

2:18 mjc`: very

2:51 arrdem: how long has the clojure in scheme project been running?

2:51 I just found it...

2:51 and I'm in awe

2:53 almost a year... man I'm glad I found this.

3:06 anyone still awake care to comment on MIT vs EPL? I just read the EPL text and don't see any major differences.

3:06 akhudek: arrdem: last I read it, if you modify an EPL program you are required to release the source, though you can freely link to it or use it as a library without doing anything

3:07 arrdem: akhudek: ah that makes more sense.

3:07 akhudek: e.g. it's more like lgpl

3:07 arrdem: I just noted that the commercialization clauses were equivalent

3:08 akhudek: however the onus for enforcing compliance lies with the original author, correct?

3:08 or and "Contributor" I suppose

3:10 akhudek: that's true of all licenses

3:12 arrdem: okay thanks for the info! I just started reading some GPL3 code and realized that I should remedy my ignorance of the different F/OSS license terms

3:12 akhudek: it's worth knowing about!

3:12 easy to run into incompatibilities

3:13 esp. with GPL

3:13 arrdem: ah copyleft...

3:14 devn: RE: EPL -- I sometimes find the notices at the top of source files which say "You must not remove this notice, or any other, from this software." to be wildly annoying

3:14 It's like ceremonious code bloat

3:14 arrdem: meh... TBH tho if you didn't put it at the top I'd forget about the license when I'm just reading source

3:14 besides. bytes are cheap and the compiler(s) throw all that away anyhow

3:15 devn: arrdem: If you add an additional 10 lines to every file in your project, I find that annoying. I'm not worried about a performance issue or something.

3:16 And frankly I'm not "worried" about 10 lines in every file, but I do find it annoying. That should count for something. I can't be alone.

3:17 I think in general it plants the seed that you should think for a bit about whether you want to contribute to a project.

3:17 Legalese in my source code? Not unless I'm working on an application that deals specifically with law.

3:18 It's subtly stifling. This is the reason people ask about the EPL: "Wait, can I do the stuff I want to do?"

3:18 akhudek: devn: unfortunately there is no way around legalese. Anyone writing software needs to understand the basics.

3:18 augustl: I agree, I find license preambles in source code very annoying

3:18 devn: The EPL doesn't have the same reputation as MIT, GPL, or BSD. Some people are license mavens. I'm not one of them.

3:19 We talk about "clean code" and "DRY" and all of this stuff, but we are open to adding a giant comment block to our source files.

3:20 It's on the verge of, well, ridiculous.

3:20 ridiculosity

3:20 arrdem: giant? a five line 80chr prefix isn't bad... my ranting comments are known to do much worse XP

3:21 devn: arrdem: comments are a disease in general IMHO. In any event, now we're starting to talk about style. Licences ought not cramp our style.

3:22 arrdem: I jest, but you could consider license function metadata sadly

3:23 devn: heh, honestly I wish leiningen removed the default of EPL for licenses

3:23 arrdem: makes sense right? :doc, :added :author :license

3:23 devn: I think it adds this air of "official" to things which sometimes have no business being considered official

3:24 akhudek: devn: agree with that, shouldn't be opinionated about licenses

3:24 arrdem: devn: I think this is the only project I've done the prefix thing in and published..

3:24 https://github.com/arrdem/SimpleVM#disclaimer

3:24 devn: "official" often gives off a vibe that turns the intrepid into scared sheep.

3:25 akhudek: and speaking of lein, lein-pedantic really should be a standard part of lein

3:25 devn: i will give a "meh" to that

3:25 because ive never seen it actually help me

3:25 akhudek: It's so easy to get undefined behavor on larger projects.

3:25 devn: i use it, but ive never been like "whoa! that shit is messed up!"

3:26 arrdem: that's cool...

3:26 devn: questions arive for me akhudek: How big is "larger"?

3:26 arise*

3:26 Is the need for pedantic a sign of a project doing more than it ought to? Etc.

3:26 akhudek: devn: The most recent personal case I've seen was with a 20+ dep project

3:27 devn: akhudek: the domain matters I think

3:27 I'm guessing it was http or dom-related?

3:27 web-related?

3:27 akhudek: devn: yep

3:27 arrdem: that's... more clojure than I've ever seen in one place before.

3:28 s/seen/heard of/

3:28 devn: that stuff is ridiculous. i'll agree with you there i guess, but i guess i wonder if pedantic is treating a symptom rather than the problem

3:28 can we curate more as a community to try and prevent the need for pedantic?

3:29 akhudek: lein deps :tree | wc gives 108 lines

3:29 arrdem: devn: the only library issues I've encountered are noir and fnparse

3:29 akhudek: devn: it's pretty hard in general with the pace that libraries evolve

3:29 arrdem: both of which are deprecated and that isn't stated clearly

3:29 devn: akhudek: i feel like that's kind of a lie

3:30 akhudek: devn: what is?

3:30 arrdem: akhudek: keeping up with lib devel

3:30 devn: the assertion that no one could possibly keep up with some common set of "edge" "templates" for working dependencies

3:30 it could even be automated

3:30 pedantic is mechanical

3:31 akhudek: the trouble is that each library needs to keep it's dependencies up to date

3:31 and make sure that new versions don't break things

3:31 things like lein-outdated are a pretty good tool

3:31 devn: akhudek: but like...tests

3:31 don't people protect themselves at all from the weather outside?

3:31 akhudek: devn: yes, lots of those would be good too :)

3:32 devn: akhudek: im just saying, depending on what you're working on, there are certain pragmatic levels of attention that should be paid to these sorts of things

3:32 and in some cases I find pedantic to be a complete waste of my time

3:33 It's like: "Here, do this! (PS: I can't tell you whether it matters or not)"

3:33 akhudek: devn: the only thing worse than not knowing if a fix will work is having depedendencies randomly shuffle on you!

3:33 devn: So every time I change a dependency I'm supposed to run some other task to check whether or not I'm still blessed by the Holy Dependency Management System

3:34 That just seems like a weak ass workflow

3:34 akhudek: devn: it checks automatically, you don't usually run into many errors

3:35 devn: akhudek: I've seen people reorder 3 things in their project.clj and all of a sudden things magically change. I get grossed out by that. But again, back to my original criticism: I've never, not a single time, actually been like "Thank God for lein-pedantic!"

3:35 It literally has never been something I've needed, and I have dozens of commits and time spent editing my project.clj to heed pedantic's warnings.

3:36 At a certain point I think it's natural to question whether or not this is actually valuable to me.

3:36 I'm not obsessed with staying on edge.

3:36 akhudek: devn: I don't get it, how else would you solve the reordering problem you mentioned?

3:37 devn: akhudek: what I meant is: lein-pedantic is like "okay, cool!" if you reorder deps

3:37 which is like... uhh, okay...

3:38 if we're talking pedantry, why not try every permutation of deps to come up with the least amount of issues?

3:39 akhudek: devn: order really has nothing to do with it, it's more that updates can cause issues. Everyone updates their libraries, they may not even be aware of issues due to caching and the like. Then they go to deploy and suddenly things are not working.

3:39 devn: if i have enough time to tinker with my project.clj for 20 minutes, i have enough time to let it try 5! times to give me a good solution

3:40 akhudek: i will shut up because i don't think i'm going to be able to give a solution to this problem

3:40 but i feel like pedantic is a bandage and it doesn't address the real issue

3:40 which is why i am strongly opposed to it being something lein includes by default

3:40 MasseR: Wait what, it matters in what order you put dependencies in lein?

3:41 devn: MasseR: I've seen lein-pedantic give different results for different orders, yes, I believe that's the case.

3:41 which is like-- WAT

3:41 I believe Jim Crossley pointed this out in his demo of Immutant at Clojure/conj

3:42 MasseR: Hmm... Doesn't lein use maven internally? So maven is dependent on order..?

3:42 akhudek: MasseR: I've possibly even seen lein exhibit nondeterministic behaviour in what versions of libraries it uses between runs.

3:42 arrdem: devn: while I agree with you in theory, if we don't trust library maintainers to stay up to date, then something like pendantic makes perfect sense because you want to be able to discern when you aren't up to date & warn

3:42 devn: He was like: "So, lein-pedantic complains... but if you put this dep here and that dep there, and add this exclusion, voila!"

3:42 * arrdem cringes

3:42 akhudek: MasseR: the basic problem is if you have two libraries, A and B, that both depend on C, but A depends on C v1 while B depends on Cv2, what happens when you include both A and B as dependencies?

3:43 MasseR: do you get C v1 or C v2?

3:43 devn: in any case, I don't know of any better way to solve the problem right now, but I do like knowing about the problem :-)

3:43 been bitten by it too many times

3:43 devn: IMO the Answer is: Handle testing your system in a way that doesn't desperately rely on lein-pedantic to tell you about a problem.

3:44 If you're relying on lein-pedantic to help you keep your app stable, you're Doing It Wrong.

3:44 MasseR: akhudek: Agreed, but imo as long as they are not exclusive, do a choice and stick to it

3:44 akhudek: devn: tests certainly go a long way, though nobody write perfect tests

3:44 devn: Who in their right mind runs lein-pedantic, fixes their deps, and sleeps easy with no tests around their app and how it's supposed to behave?

3:44 MasseR: "Hey, I need v1 or v2, and I seem to have v1 installed, that dependency is then ok"

3:45 devn: It seems absolutely ridiculous to suggest that lein-pedantic is this wonderful catch-all tool for a lack of testing and quality in software.

3:45 "Does my shit work? y/N"

3:45 akhudek: devn: never said it was a substitute for testing, just another test itself

3:46 devn: akhudek: im just getting animated about it

3:46 akhudek: ok, feel free to continue then :D

3:46 devn: because im not a testing freak or trying to set file permissions with a magnet and a pin

3:46 BUT, I think we need to be real about what pedantic's role actually is

3:46 it should be a diagnostic tool

3:47 when your tests fail, you might look at it

3:47 but i don't think it has the kind of weight people seem to give it

3:47 muhoo: um, pedantic is a dependency-resolution tool, AFAICT

3:47 devn: muhoo: in response to?

3:48 mjc: the github generation

3:48 muhoo: it's not a testing tool, doesn't try to be one, and i've never heard anyone refer to it as one or try to use it as one

3:48 devn: heh

3:48 muhoo: so how does it fit into people's workflows?

3:50 muhoo: i dunno too many people, so i can't say. in MY workflow i use it as a dependency resolution tool

3:50 plus "lein deps :tree" also

3:50 devn: because I seem to hear some nagging voices that insist you use it, but they don't really tell you when and how they use it. In any event, I feel like it's kind of how Rich said something like: There wasn't any notice at the top of your file that managing memory was on you.

3:50 This implicit problem with dependency resolution needs a better solution than some plugin that 1/3rd of the community knows about and uses.

3:51 muhoo: dependency resolution is a mess, in my experience, even with great tools like lein, pomegranate, and pedantic

3:51 arrdem: more than that... there needs to be a better guide to clojure at large

3:51 I mean I never knew about lein deps :tree before this discussion

3:51 devn: muhoo: sensible defaults are better than a myriad of optional plugins

3:51 arrdem: and half the community is still writing (use)

3:52 muhoo: clojure is a young language; the docs definitely could use improvement. so could the tools.

3:52 arrdem: young being... five years I think?

3:52 devn: muhoo: im not telling you this like: "HOW DARE YOU?" -- I'm just saying I think the *right* thing to do would be to provide these plguins a la carte, but to also provide some kind of sane way of enabling some smart dep resolution stuff within lein

3:52 muhoo: they're moving in the right direction AFAICT. as for docs, write some up and help, maybe?

3:52 arrdem: yes, how old is python? java? c++?

3:53 how old is ruby? shit, how old is CL?

3:53 arrdem: ppft CL still doesn't have a real dep manager

3:53 quicklisp has shit on lein

3:53 devn: muhoo: you're being defensive. i don't think he was trying to point his finger at the age of clojure

3:53 and by telling you you're being defensive i suppose i'm being aggressive, sorry :)

3:54 muhoo: if you want better docs, i have to say, the best way to get them is to write them

3:54 ejackson: ,gaurds

3:54 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: gaurds in this context, compiling:(NO_SOURCE_PATH:0:0)>

3:54 ejackson: ,guards

3:54 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: guards in this context, compiling:(NO_SOURCE_PATH:0:0)>

3:54 ejackson: bah

3:54 arrdem: muhoo: I've only been coding for five years and I considered python to be "young and hip" when I started so it's funny to me to contemplate a five year old language as still developing as I'm thinking about doing one in a few days

3:55 devn: muhoo: easy to say in an irc channel full of people who spent the time reading source and learning things the hard way

3:55 arrdem: in fact I think Raynes is the only person here younger than me..

3:55 muhoo: man, i'm not sure what to say then. that's what i do; if the docs suck, i either just write notes for myself, or if i'm feeling community-oriented, submit a patch for someone else's docs, or write up a blog post or something.

3:56 devn: i love me some clojurian positivity, but damnit folks, we all need to just hug one another and admit that the docs suck and the traces are garbage

3:56 we need to be able to be that honest with ourselves

3:56 or we're in rough shape

3:56 arrdem: lol

3:56 * devn hugs you

3:56 muhoo: heh

3:57 arrdem: yeah... I guess I'll just man up and start working on Factual/fnparse

3:57 muhoo: look, i think the most helpful thing to do when docs suck, is to write better docs.

3:57 devn: muhoo: yeah dude, of course

3:57 but that's like saying: hey guys, you know what would be better than nothing? something.

3:57 *brain melts*

3:58 arrdem: devn: now now you're sounding snarky again

3:58 devn: :X

3:58 good thing i didnt hit enter on the next line

3:59 arrdem: heh

3:59 muhoo: fyi, this is what my dependencies looked like for a web project in clj: https://www.refheap.com/paste/13140

3:59 devn: but no, i have to say one last thing while i'm ranting: the clojure.org site is maintained via roughly the same broke-ass method that clojure is maintained.

4:00 arrdem: devn: hah bitch about the community docs sites first

4:00 clojuredocs.org?

4:00 1.3.0?

4:00 hah

4:00 devn: the community should just have tea party day where we scrape all of the content from clojure.org, DDoS clojure.org, and build something that's community owned

4:00 arrdem: the issue I have is that clojure-doc.org isn't freaking searchable

4:01 devn: Needing a CA and a special handshake to modify broken docs on clojure.org? Fuck the what?

4:01 arrdem: it even refers to clojuredocs.org for function specifics

4:01 muhoo: didn't someone create a community-oriented, more-easily-mainteined alternative clojure docs site?

4:01 * devn stomps his feet and then hugs all of you once again

4:01 arrdem: muhoo: link if you have one 'cause I've never heard of it.

4:01 devn: muhoo: indeed they did. Several people have done this now.

4:02 The Lisp Curse is alive and well.

4:02 everyone, quick, do your own thing!

4:02 arrdem: (inc devn)

4:02 lazybot: ⇒ 5

4:02 arrdem: devn: it isn't a language, it's a tool for replicating other peoples work better!

4:02 akhudek: yes, confusingly called http://clojure-doc.org/

4:02 arrdem: -________________________-

4:03 akhudek: there is also http://clojure.github.com/ that many people don't know about

4:03 devn: "Hello gentles and ladies, I have written a series of tutorials and half of a book. I realize this exists in 17 other places, but those were outdated, so instead of contributing I chose to make a name for myself by being badass and doing All The Things."

4:04 "Please, contribute to this version of the same material. I am confident with your support we can win!"

4:04 arrdem: akhudek: those are the best docs I've found even if I have to use Google to search em

4:04 devn: speaking of stupid documentation sites

4:04 muhoo: linux has been like this for like 20 years now.

4:04 devn: I have http://getclojure.org up

4:04 It's kind of cool I geuss

4:04 guess*

4:05 akhudek: I guess clojuredocs.org is more of an api site, clojure-doc.org seems like a good effort

4:05 devn: getclojure.org: it's like hoogle, but without any thought put into it.

4:05 arrdem: devn: bug: if I just click search I get nothing

4:05 devn: arrdem: yeah, it's way buggy and lame, but if you want examples of functions it'll give you a back rub

4:06 arrdem: akhudek: clojure-doc.org needs about 100 pages of clojure.core/* copy added tho

4:06 devn: it drives me a little bit insane that clojuredocs.org and clojure-doc.org exist simultaneously

4:06 arrdem: devn: that's awesome... it's just that the n00bs we get here don't even know how to use google to figure out what the right function is

4:07 devn: consequently I find core api docs more valuable since they let you find the tools to solve your problem

4:07 devn: arrdem: word. i think of this as a supplement to the core docs.

4:07 typing in "let" for instance: lots of cool destructuring examples hidden in there

4:07 im going to add ratings so people can tag stuff as idiomatic etc/

4:07 * arrdem is still in shock at the things one can do with destructuring

4:08 arrdem: oh well I suppose I can start racking up pull requests committing to clojure-doc

4:08 devn: i parsed and ran all of clojuredocs.org in the sandbox that produces these examples as well

4:08 so there should be lots of good examples in here

4:08 just need to eek them out

4:08 arrdem: being able to up and down vote examples would be really slick..

4:08 devn: arrdem: commit to getclojure! help me add ambrose' analyze to it

4:09 a sort of hoogle-esque search engine

4:09 arrdem: devn: I'll throw it on the heap with my school work and plethora of side projects

4:09 I've kinda wanted to do a search engine for a while now...

4:09 devn: arrdem: "effective badgering" is the name of my game

4:09 arrdem: haha

4:10 devn: arrdem: I'm using elastic search on this

4:10 I could use your help writing a better analyzer and tokenizer

4:10 muhoo: that's a neat site.

4:10 devn: so things like -> and what-not work without quotes maybe?

4:10 muhoo: looks like it does aprpopos or find-doc

4:10 ,(find-doc #"lazy")

4:10 clojurebot: -------------------------\nclojure.core/concat\n([] [x] [x y] [x y & zs])\n Returns a lazy seq representing the concatenation of the elements in the supplied colls.\n-------------------------\nclojure.core/cycle\n([coll])\n Returns a lazy (infinite!) sequence of repetitions of the items in coll.\n-------------------------\nclojure.core/distinct\n([coll])\n Returns a lazy sequence of the element...

4:10 arrdem: ,(doc) please... at least that doesn't fuck up the formatting

4:10 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: core$eval37$fn--38$fn--39$fn--40$my-doc>

4:11 arrdem: clojurebot: f off

4:11 oh that was a regex search

4:11 cute

4:11 (dec arrdem)

4:11 lazybot: You can't adjust your own karma.

4:11 devn: muhoo: i wrote getclojure. it slurps up 5 years of clojure irc logs and runs all of the valid looking sexps through a sandbox

4:11 it captures output and value

4:11 muhoo: ,(doc find-doc)

4:11 clojurebot: "([re-string-or-pattern]); Prints documentation for any var whose documentation or name contains a match for re-string-or-pattern"

4:11 Sonderblade: arrdem: many clojure functions have generic "ungoogleable" names like get and apply, also try googling for the api for clojure maps and sets, its impossible to find a list of functions that applies to them

4:11 clojurebot: for is not used often enough.

4:11 arrdem: muhoo: that's cool, I didn't realize it

4:11 devn: getclojure has ~40k examples on it

4:11 muhoo: devn: really? very nice!

4:12 * muhoo bookmarks

4:12 * arrdem adds to his deft.el link heap

4:12 muhoo: stackoverflow is ramping up pretty well with clojure answers too.

4:12 often my google searches take me there

4:12 devn: yeah agreed

4:12 i love clojure because i can actually parse random sexps from all over the internet

4:12 and run them in a semi-safe way using clojail

4:13 muhoo: there is always folklore in every language/field/technology. how to capture it is an interesting problem. i like the getclojure approach, kind of a cross between a google search and a repl

4:14 i do really like the stackoverflow approach though.

4:15 there's voting, and well-worded answers. yeah, if you attached voting to getclojure, it could be a good answer to the problem of "how do we capture all this folklore and have it accessbile?"

4:15 devn: muhoo: lots of ideas for getlcojure: id like to do analysis using ambrose' analyze library to provide more metadata, and then id like to provide a custom query syntax

4:16 so you can do a query like this: (map * [...]) => {...}

4:16 muhoo: there is somethign that does that already

4:16 devn: err something like that

4:16 muhoo: raynes wrote it

4:16 devn: find-fn?

4:16 muhoo: yep

4:16 devn: yeah, but this is a bit different

4:16 Raynes: No he didn't.

4:16 devn: it would be a search across the examples

4:16 arrdem: devn: it'd be interesting to see this extended to libraries.. see the Lisp Curse we are overburdened with lib search & identification tools but we need a good one

4:16 devn: amalloy did it right?

4:16 Raynes: He helped.

4:16 muhoo: Raynes: i thought you did? huh, maybe it was a flatland thing

4:17 devn: arrdem: then was my next thing... codeq.

4:17 Raynes: It was someone else whose name I can't remember.

4:17 Not really muhoo.

4:17 The guy who wrote it doesn't hang out here anymore.

4:17 I just turned it into a library.

4:17 arrdem: devn: you may be able to make me stick around then XP

4:17 devn: i imported all of the top-rated libraries into codeq. I'd like to try to analysis on expressions and fns in all of those libraries

4:17 Raynes: And amalloy_ helped the guy who originally wrote it.

4:17 devn: and then provide them as searchable examples as well

4:17 muhoo: Raynes: oh, it is in your github account so i thought it was yours, sorry

4:17 Raynes: muhoo: Heh, nothing to apologize for.

4:18 I'm just making sure credit isn't given to me where it isn't deserved. <3

4:18 arrdem: devn: it'd be really interesting to provide some sort of "hotness" metric on libraries based off of clojars data

4:18 muhoo: fair enough.

4:18 * devn high fives Raynes for maintaining a ton of Clojure libraries

4:18 * Raynes receives the high five, processes, and returns.

4:18 * arrdem queries the return atom

4:18 devn: arrdem: oh that's coming. I have that one a local branch at the moment. Still thinking about it. Also, tomorrow my plan is to use pedestal to do the backend for getclojure.

4:19 muhoo: if you make a reducer for hi-fives you can do them in parallel

4:19 devn: getclojure is getting nasty in that it does like 4 things in one code base. it needs some splitting.

4:19 * arrdem goes back to writing a simple physics toolkit instead of doing physics homework

4:19 devn: lol

4:19 that's how I failed out of college

4:20 "nevermind class, time to write more code..."

4:21 arrdem: ,(doc cos)

4:21 clojurebot: excusez-moi

4:21 devn: Math/cos

4:21 arrdem: ,(doc Math/cos)

4:21 clojurebot: No entiendo

4:21 muhoo: ,(Math/cos 22)

4:21 clojurebot: -0.9999608263946371

4:21 devn: that's java

4:21 so doc won't work

4:21 arrdem: ah clojure.lang wrapper over java.lang

4:22 devn: just java interop

4:22 ,(Integer/parseInt "999")

4:22 clojurebot: 999

4:22 devn: same deal

4:22 i wish i had more energy, but i need to go to bed so I can make your getclojure dreams come true tomorrow.

4:23 ping me if you have ideas or want to help out

4:23 contributions are very welcome. refactors, code reviews, etc. all welcome

4:23 muhoo: link to the repo?

4:23 devn: i also have a sweet new comp that a designer friend did for me, so it should look 9x sexier soon

4:24 https://github.com/devn/getclojure/

4:24 pardon my mess. there are some gross, large commits, unused code, lots of stuff that should be extracted, so seriously, go nuts, help me out

4:25 arrdem: devn: you'll get sick of my "commit early commit often" and "branch like a motherfucker" style fast

4:25 muhoo: that's what private branches and "merge --squash" are for :-P

4:25 arrdem: muhoo speaks the truth

4:25 devn: arrdem: nah, that's how I always role on projects, just not on projects where i sometimes have work that spans multiple weeks due to my time and availability

4:26 roll*

4:26 im very happy to have topic branches and lots of small commits

4:26 that's how it ought to be done

4:26 so, no, not annoying, absolutely what i'd prefer

4:26 arrdem: devn: mmkay. no promises you are now the ... 6th? project on the stack.

4:27 more classes and "work" whatever that is

4:27 devn: arrdem: dude, you gotta do what you gotta do, but this project is cooler than your other projects ;)

4:27 lots of ideas to explore

4:27 arrdem: devn: https://github.com/arrdem/sad I beg to differ

4:28 I friggin generate runnable code from bnf. come at me br0

4:28 devn: okay, gold star

4:28 arrdem: can haz inc plz?

4:28 devn: im suspending you for radically wonderful behavior

4:28 arrdem: XD

4:28 devn: (inc arrdem)

4:28 lazybot: ⇒ 2

4:28 arrdem: w00t

4:29 devn: cool that it uses fnparse underneath

4:29 muhoo: heh, private branches and squash http://bace.s3.amazonaws.com/fucked2.jpg

4:29 devn: for big branches i like just rebuilding a release branch from merged commits

4:30 err s/branches/projects

4:30 arrdem: muhoo: wat

4:30 muhoo: "ugh" is a perfectly acceptable commit comment... in a private branch

4:30 devn: haha

4:30 * arrdem curses 'cause his playlist ended

4:30 devn: i have like 12 commits on getclojure "Fucking Heroku..Work!"

4:30 or somesuch

4:31 also git commit -m ":fire"

4:31 err :fire:

4:31 always good for bad commits

4:31 it's like cursing without the cursing

4:32 arrdem: haha where's that github stats project on profanity per language...

4:33 profanity per time zulu could be cool too

4:33 devn: heh

4:33 i bet python programmers win

4:33 i don't know why, but i just feel it in my bones

4:34 muhoo: http://www.vidarholen.net/contents/wordcount/

4:34 devn: okay, bed time for real now, but muhoo and arrdem and Raynes -- getclojure, ya'all. help me make something that makes people cry tears of joy for lambda jam

4:35 arrdem: devn: later bro. I should hit the sack too...

4:35 am I allowed to use bro in here? I can't tell and it's 4am...

4:35 devn: dont call me bro, call me sis

4:35 need to avoid the brogrammer culture at all costs

4:36 arrdem: devn: thinkslate.com is down

4:36 devn: heh, oh right, i own that domain too

4:37 arrdem: ill put a picture of something super cool on there

4:37 arrdem: devn: I mean I just went to stalk you and realized you had a dead link on github

4:37 devn: like i did with: http://www.letmypeoplegolf.com

4:37 arrdem: figured I'd mention it

4:37 devn: letmypeoplegolf is maybe my best work to date

4:39 (hint: moses has a golf club instead of a gnarled staff)

4:39 (hint 2: that's a celine dion midi)

4:39 (hint 3: yes, i'm insane)

4:42 muhoo: that site is so 1995

4:42 hmm, no 1997. animated gifs, midi music. dude, you need a hit counter!

4:42 arrdem: we're all mad here. now get to bed.

4:43 muhoo: and flashing text

4:43 arrdem: what's the tag... <marque>?

4:43 for scrolling text?

5:09 p_l: arrdem: marquee, I think

5:09 arrdem: p_l: that's the one.

5:53 tomoj: clojure.core.rrb-vector.debug/dbg-vec is brilliant

6:00 arrdem: would any of you be interested in an ARM powered ultrabook with 8 hour or more battery life?

6:02 borkdude: arrdem who isn't interested in that

6:02 p_l: arrdem: if it had a) sensible firmware (something along the lines of OpenFirmware? EFI, I guess, could work too) b) sensible GPU c) enough cores and memory bandwidth to not annoy me with slowness ;P

6:03 arrdem: Since the RPi broke on the scene I've been trying to answer why there isn't a 15" laptop version

6:03 and of late I've been kicking around the idea of doing a startup to sell exactly that

6:03 I mean we're all nerds here and the business concept docs are pretty clear that I expect Linux-familiar devs to be the first buyers

6:03 p_l: arrdem: ARM, with exception of recent windows efforts, leads to very... one-off products

6:04 also, I want normal X11 support

6:04 arrdem: lol

6:05 idk... I'm sure you and anyone else in this chan could boot whatever they wanted on it

6:05 the real question is what constitutes a "sane defaults" environment

6:06 p_l: arrdem: "sane defaults" would be "actually having a firmware useful outside of embedded one-off products that won't crap on me just because the only thing it can do is read/write flash memory and talk over serial

6:07 so in case of, let's say, corrupted kernel (or actually wanting a simple way to change kernel) I can fix stuff without digging for serial link :)

6:07 arrdem: hum...

6:08 p_l: at least you could "make" vendors include a dump of openfirmware device tree instead of compiling in hardcoded memory addresses and parameters into kernel that fit only the device you have :>

6:08 tl;dr - first you need to actually define a platform, ARM doesn't give you one ;)

6:09 arrdem: p_l: I'm toying with the idea of simply being a raspbery pi compatable

6:10 which is funny 'cause 30 years ago someone here started selling IBM compats

6:10 p_l: arrdem: raspberry compatible would mean "slow"

6:11 arrdem: the biggest win of RPi was the included proprietary bootloader that understood enough that it made hard to brick the device

6:12 but I don't know if they offer any features to make, for example, a kernel that will boot both on RPi and another device without adding a ton of boilerplate that basically forms another firmware layer

6:12 funnily enough, Win8 arm devices actually have that fixed, by including ACPI and EFI

6:13 * p_l is a bit annoyed after meddling in internals of his old phone ;P

6:15 arrdem: you don't say XP

6:16 p_l: arrdem: the good part was that the firmware didn't lock us out from *anything*

6:16 unlike on HTC :>

6:16 arrdem: I have no doubt that the same people who bought rpis would buy an rpi-based "hacktop pro" shall we call it.

6:17 the question in my mind is can I realistically scale that product beyond the hacktop market to actuall consumers before Asus etc. crush me.

6:18 p_l: arrdem: netbooks mostly failed, but ChromeOS seems doing fine in that area

6:18 arrdem: especially given that for the first time in really a decade we're seeing platform fragmentation from Microsoft with Windows for ARM

6:18 p_l: my sense is that netbooks failed because they do less with less.

6:18 p_l: arrdem: Microsoft, if not for some (IMO) errors is actually carefully trying to avoid that fragmentation

6:18 something that is also done by Android from start

6:19 hell, MS was mumbling about ditching x86 for a decade now

6:19 what *I* would like is a *real* ThinkPad

6:20 arrdem: I mean netbooks are physically small

6:20 that's a bitch to type on and soforth

6:20 which doesn't help the fact that most of them are pretty underpowered.

6:20 p_l: arrdem: it's a bitch to type on all new laptop's keyboards that I had access to, with possible exceptions of just mid-bitching in case of Dell Latitudes

6:21 arrdem: my thought is that a slightly dressed-up rpi in a 15" chassis would suck little enough to get some traction.

6:21 p_l: the pseudo-thinkpad's might be good in feedback, but have shitty layout

6:21 arrdem: then iterate on the design cleaning up internals aw you go.

6:21 s/aw/as

6:23 idk. we'll see if this can go anywhere. it may not be a blockbuster but there's a market for it.

6:24 so it would seem at any rate.

6:25 p_l: arrdem: just remember that getting all the rest of the stuff than just simple electronics is the hard part here :)

6:25 and for fuck's sake, get something with performance

6:26 otherwise just driving any sensible-resolution screen will bog it down :)

6:26 arrdem: we'll see but I'm confident that the first prototype will be a literal RPi in a 15" box.

6:26 the first production model may be better but who knows. this is all hot air atm.

6:28 but yes. being able to see the framebuffer should not happen in this day and age.

6:30 p_l: happens more often than it used to because FreeDesktop&co broke double buffering, I heard

6:36 arrdem: gads the disk is going to be the most expensive thing in this...

6:36 that's unexpected.

6:38 p_l: use MMC

6:38 arrdem: MMC?

6:38 clojurebot: TimMc: There is a Clojure patch on CLJ-1168 that seems like it should allow Leiningen to work with 1.5.0 and :jvm-opts ["-Dclojure.read.eval=unknown"] http://dev.clojure.org/jira/browse/CLJ-1168

6:38 p_l: arrdem: SD card :)

6:39 a lot of devices use the electrical interface but without the packaging

6:39 just grab a fast one, maybe two and put them in RAID :D

6:39 arrdem: lol that's horrific

6:39 but probably cheaper than a 64/128gb ssd

6:39 p_l: arrdem: I've seen a laptop with vendor-made hw RAID-0 of two 128G SSDs

6:40 arrdem: p_l: if this thing rocks flash cards they'll probably be user-exchangable

6:41 case room is the least of my worries here.

6:41 unless I want to fight the Macbook Air for the title of "most breakable paperweight"

6:42 p_l: ... lol. Apparently those two SSDs? have higher bandwidth than RasPi *memory*

6:42 arrdem: -____-

6:43 so looks like the pricepoint on this guy is going to be $250-$300 with "ssd" and battery.

6:43 case costs I have no way to estimate tho.

6:44 oh I forgot keyboard & trackpad...

6:45 p_l: what mobile keyboard did you like the most?

6:46 p_l: arrdem: classic ThinkPad. I have R61, still great. T6x has the same one

6:48 you're pretty much shit out of luck with non-hacker market anyway, so why not use the hackers to market your device to others :)

6:49 Unless you pack enough power and basically put something along the lines of ChromeOS on top ;)

6:51 arrdem: that's the best option I suspect.

6:52 I'm toying with the idea of an ARM Plan 9 build and trying to make a product out of having not shitty network filesystem support combined with a rewrite of the Linux 9p fileserver and a Windows 9p fileserver client

6:52 but that's not a 0.1.0 kind of feature.

6:52 http://arrdem.com/blog/draft/preview/85 what do you think?

7:17 Anderkent: Anyone know how to add a dependency to runs of `lein repl` that are not within a project? For example findfn

7:33 arrdem: Anderkent: add it to your lein dev profile

7:46 hyPiRion: Anderkent: add {:user {:dependencies extra-deps}} in ~/.lein/profiles.clj

8:05 hans_: hey. I am new to clojure and also dont have any experience with .net or windows development (at least since ~10 years or so). however, as clojure works with .NET would it be possible to build windows phone apps in clojure?

8:10 corecode: hyPiRion: scheme frustrates me :/

8:29 Anderkent: hyPiRion: that only works if i run `lein repl` in a directory with project.clj

8:30 I want exactly the opposite

8:30 jweiss: any emacs users here ever get "Unmatched bracket or quote" trying to run vc-resolve-conflicts on a clojure file? Only workaround I can find is to turn off clojure-mode

9:06 supersym: what would be a use-case for protocols in clojure...like if you need certain Java interop over a line or? How are they much different from contracts? I'm a bit confused again :S

9:07 some of the examples could also have been done in a different way

9:08 I guess what I mean to ask is what would constitute their use

9:09 ah,.. never mind, found the answer: interop and polymorphism as I thought

9:09 ><

9:11 stuartsierra: Yes, protocols are mostly about polymorphism and grouping related functions.

9:12 As a side benefit, they can take advantage of fast virtual method dispatch on the JVM.

9:15 ambrosebs: stuartsierra: thanks for tools.namespace, using the dependency graph in core.typed. Reading through, it looks like adding (set! *warn-on-reflection* true) would cause tools.namespace not to find the ns form. Is that right?

9:15 supersym: sweet :) but a bit of an overkill perhaps for what I was exploring

9:15 stuartsierra: ambrosebs: The `ns` form must be the first non-comment form in the file, if that's what you're asking.

9:15 ambrosebs: stuartsierra: ok, yes.

9:16 stuartsierra: I suppose it could scan the entire file, looking for an `ns` form, but that seems like overkill.

9:17 ambrosebs: stuartsierra: It's hard to know where to draw the line. Adding core `set!`s before `ns` seems common though.

9:18 stuartsierra: ambrosebs: Really? I expect that to be controlled in tooling, usually.

9:21 ambrosebs: stuartsierra: I see it around the place. eg. CLJS analyzer. Not a big deal.

9:22 stuartsierra: ambrosebs: Yeah, it's there. I usually assume that it's a leftover from development. I don't think it's a good idea to call `set!` at the top of a file that's going to be released in a library.

9:22 ambrosebs: stuartsierra: btw c.t.n.find has `import` instead of `:import` in the `ns`.

9:23 stuartsierra: really? drat

9:24 fixed

9:24 dnolen: stuartsierra: ambrosebs: funny enough in ClojureScript we actually use the analyzer to find ns forms in order to be more flexible.

9:25 stuartsierra: makes sense

9:27 ambrosebs: stuartsierra: A quick note on how the dependency graph handles cycles would be helpful.

9:29 stuartsierra: ambrosebs: It doesn't.

9:30 Cycles aren't allowed.

9:31 naderman: Hey, without clojure.contrib can I still find "expect", "has-args", etc. from clojure.contrib.mock somewhere?

9:32 pjstadig: ~contrib

9:32 clojurebot: Monolithic clojure.contrib has been split up in favor of smaller, actually-maintained libs. Transition notes here: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

9:32 pjstadig: naderman: if you don't find it in that list, it didn't get migrated

9:32 you could split it out yourself, or maybe someone already has, but i don't know

9:34 naderman: pjstadig: yeah I saw that list, it's listed but without any info of where it went

9:34 so i guess the answer is no

9:36 ambrosebs: stuartsierra: It wasn't clear at which point the input validation was performed. It's clear now it's at the graph level, perhaps consider adding a word or two in the readme?

9:37 naderman: pjstadig: is there some other way I can locally just redefine a function as a stub for a test without that?

9:37 ambrosebs: stuartsierra: "c.t.n.dependency - generic non-cyclic dependency graph data structure"

9:38 stuartsierra: o

9:38 *ok

9:45 asaleh: random question ... why can't I type (my-record :my-key), while (:my-key my-record) works?

9:49 tgoossens: asaleh: because aparently you record doesn't implement the IFn interface

9:50 stuartsierra: Records are maps, but they are not (by default) functions.

9:51 tgoossens: is it possible to (for whatever reason) to do (extend yourrecord clojure.lang.Fn ...)

9:51 probably

9:52 stuartsierra: yes

9:52 tgoossens: great.

9:53 btw stuartsierra, just saw your talk about patterns this morning, was very interesting ;)

9:54 asaleh: tgoossens, thanks, because I'd like to use maps and my-record interchange-ably :)

9:55 tgoossens: asaleh: as I said, you can make it implment IFn (using extends) so that you actually don't have to care about that any more

9:55 kasterma: tgoossens: link? (to the talk)

9:56 tgoossens: kasterma:http://www.infoq.com/presentations/Clojure-Design-Patterns

9:57 kasterma: tgoossens: thx, summary certainly looks very interesting.

9:57 tgoossens: the thing with tokens was new to me and seems very useful

9:59 no7hing: is there a way to have a queue in closures stm and pop it for elements?

9:59 s/closures/clojures/r

10:03 jweiss: is there a reason records don't implement IFn the way maps do? is there any pitfalls to just adding it to all my records?

10:04 oh woops my colleague already asked this :)

10:04 stuartsierra: jweiss: It's a design decision, it's been discussed on the mailing list.

10:06 supersym: man my mind keeps drifting off about stuff I thought I knew but clojure throws around, or better said: how pure clojure is and how powerful the notions contained in it are

10:08 really a work of art... Rich is either a genius or has been playing with computers a bit too much :D Probably a bit of both

10:23 no7hing: @weavejester: on clj-aws-s3: is that intended behaviour that exceptions (or more specific the SocketException) in the was java sdk get caught by the lib?

10:24 weavejester: no7hing: On which function?

10:24 no7hing: put-object

10:25 weavejester: no7hing: There's no catch in put-object

10:26 john2x: hello. how would one go about doing http requests with clojurescript?

10:26 weavejester: In fact… the only catch in the whole library specifically looks for AmazonServiceExceptions with a 404 status code.

10:26 john2x: Depends if you're talking in-browser xhrs, or node.js I guess

10:27 john2x: weavejester: in-browser xhrs. :)

10:30 no7hing: it's an internal one then before a retry, i still got the put request result instance back some times

10:30 will look deeper

10:34 ravster: hello all

10:37 devn: heh, +1 to rich's -1 on anaphoric macros

10:55 gfredericks: haha

10:55 my favorite part about giving a macro talk was coming up with a list of guidelines (e.g., no anaphoric macros) and noticing that clojure.core violates basically all of them

10:56 devn: Guideline 1: We know you're clever. You don't need to prove it.

10:56 hyPiRion: gfredericks: anonymous function literals

10:57 gfredericks: hyPiRion: defmacro is an anaphoric macro

10:57 hyPiRion: gfredericks: is it?

10:57 gfredericks: &env and &form

10:57 lazybot: java.lang.RuntimeException: Unable to resolve symbol: env in this context

10:57 hyPiRion: oh, hah

10:57 gfredericks: #() is a reader thing, so not an anaphoric macro strictly speaking

10:58 but it definitely is one in spirit :)

10:58 owengalenjones: anyone here have experience with pingles clj-kafka library?

10:58 hyPiRion: gfredericks: yeah, that was the point :)

10:59 gfredericks: hyPiRion: it's even crazier given that the meaning of the symbols varies based on which ones you use

11:00 it would have been comically arrogant if rich had instead replied with '-2'

11:01 dnolen: gfredericks: is defmacro an anaphoric macro, or a fn def form w/ two invisible arguments?

11:01 TimMc: It's anaphoric, since the caller does not specify the bindings.

11:01 gfredericks: dnolen: I'm not sure why the latter is not an instance of the former

11:01 an anaphoric macro will creating locals either with let or with fn; essentially the same effect

11:02 dnolen: gfredericks: yes I was question the statement that defmacro is a macro

11:02 gfredericks: well it certainly is in a technical sense

11:02 TimMc: ...

11:02 gfredericks: ,(.isMacro #'defmacro)

11:02 clojurebot: true

11:03 gfredericks: not sure what other sense you might be thinking of

11:03 dnolen: gfredericks: yeah, I didn't realize that.

11:04 hyPiRion: gfredericks: Well, I think clojure.core is allowed to ignore all normal styles, really.

11:04 gfredericks: hyPiRion: agreed, it just gave me a chuckle

11:04 hyPiRion: heh

11:04 gfredericks: another guideline was no side effects

11:04 which gen-class violates at the very least; haven't looked for others

11:04 hyPiRion: gfredericks: defmacro, perhaps?

11:04 :p

11:05 gfredericks: does it?

11:05 hyPiRion: gfredericks: it changes the environment, doesn't it?

11:05 gfredericks: _expanding_ to something that side-effects is different from the macro itself having side-effects

11:05 hyPiRion: oh, okay, true enough

11:06 gfredericks: now I'm curious what the other guidelines were

11:06 * gfredericks rummages

11:06 hyPiRion: That would be fun: Make a library with only macros and say it's without any side-effects

11:06 gfredericks: not deffing more than one thing was another

11:06 and defrecord/deftype do that

11:07 hyPiRion: gfredericks: so like, not defining a var twice you mean?

11:07 gfredericks: no

11:07 not defining two vars

11:07 hyPiRion: oh, eh, in a single expression I suppose

11:07 gfredericks: unless perhaps you let the user list all the names

11:07 it's similar to anaphoric macros

11:08 I can imagine a defs macro that would be acceptable

11:08 (defs {:keys [foo bar baz]} {:foo 12 :bar 15 :baz 20}) for example

11:08 which defs foo, bar, and baz

11:10 those were the stricter guidelines.

11:13 kauschovar: owengalenjones: a little bit, yes

11:13 owengalenjones: wrote a map-reduce job with it yesterday

11:16 owengalenjones: kauschovar: when I try and implement the consumer example: https://www.refheap.com/paste/13292 clojure appears to connect but then hangs indefinitely and I dont see the output, did you have any issues with getting that to work?

11:17 kauschovar: owengalenjones: i only used the simple consumer, because i needed full control over when to commit the offsets to ZK

11:18 owengalenjones: no experience with the zk-consumer

11:18 owengalenjones: kauschovar: gotcha, thanks anyway

11:19 kauschovar: owengalenjones: np. sorry i couldn't be more helpful

11:27 * devn wonders how long it will take for Pedestal to have a book announced

11:28 gfredericks: Pedastal In Action has an interesting acronym

11:30 TimMc: ?

11:31 hyPiRion: TimMc: PI(T)A?

11:31 TimMc: hrm

11:43 gfredericks: oh

11:43 yeah forgot about the T

11:43 nevermind it would have an uninteresting acronym

11:58 borkdude: how do I write a lobos migration to alter a column from a certain table to become unique?

12:00 yacin: so: http://pastebin.com/y2FgNwYy

12:01 when i run this, only the first prn goes to blah.log

12:01 Anderkent: Is there a ring middleware I can use to set charset for text responses?

12:01 yacin: the one in the doseq goes to stdout

12:01 any ideas why?

12:02 nDuff: yacin: for the future, would you consider a pastebin without the big animated ads? We're partial to refheap.com herebouts (it being OSS and written in Clojure), but anything that doesn't offend anyone without an adblocker would be an improvement.

12:05 yacin: ah, absolutely

12:06 https://www.refheap.com/paste/13295

12:06 to get in the habit :)

12:06 ah, throwing it in a (do) fixes it

12:12 alexnixon: yacin: your 'doseq' isn't inside your 'binding' form

12:13 yacin: oh huh, didn't see that extra paren

12:13 guess i should keep paredit on in the repl

12:16 Pure-Loulou: hello room :)

12:17 supersym: ola

12:17 no7hing: am i imagining things or is there a library in clojure that asserts that two numbers are both within a certain range?

12:17 technomancy_: no7hing: > does that

12:18 no7hing: i know, but it nags me that i think theres a lib

12:22 Pure-Loulou: https://www.refheap.com/paste/13298 any help?

12:22 supersym: ... contains? sigh

12:22 Pure-Loulou: i am newbie testing pmap

12:22 borkdude: is it possible to see the generated sql from lobos?

12:23 nDuff: Pure-Loulou: pmap exists mostly as a demo. It's only rarely useful in practice.

12:24 hyPiRion: Pure-Loulou: pmap is not more efficient if the function you're mapping is very fast. You may want to use reducers instead (clojure.reduce I think)

12:24 But the best is to do benchmarking

12:24 Pure-Loulou: ok i will read reducers :)

12:29 borkdude: I'm trying this lobos migration, but it doesn't do anything: https://www.refheap.com/paste/13299

12:30 it would be good if I could see the sql it generated

12:36 I think forgetting :unique on a column is some unfortunate situation in lobos

12:36 I'm breaking the migration history.. f#$ this ;)

12:37 weavejester: Hmm… friend logs me in okay, but then adds nothing to the session. Does that sound familiar to anyone?

12:38 no7hing: weavejester: on the assert: was not a library but a discussion on SO after all http://stackoverflow.com/questions/6344454/clojure-range-case-macro

12:38 ppppaul: in compojure i want to match a url with '.'s in it

12:38 how do i easily do this?

12:39 gfredericks: you can't just include dots in the route pattern?

12:39 ppppaul: it will split the matcher on '.'

12:40 gfredericks: oh hmm

12:40 hiredman: weavejester: I spent a while fighting with something similar that turned out to be the handler that was behind friend not passing the session it got through

12:40 gfredericks: so you want something like /:foo to match /one.two.three with {:foo "one.two.three"}

12:40 ppppaul: (ANY ["/:real-number" :real-number #"^-{0,1}[0-9]*\.{0,1}[0-9]+$"] [] some-handler )

12:40 i want that to work

12:40 hiredman: weavejester: the handler added it's own :session stuff and just tossed out friend's

12:41 ppppaul: so, sometimes there will be periods, sometimes not... i want them to be removed from the tokenizer

12:41 borkdude: can friend also handle database user authentication and if so, is there some documentation/blog post about it?

12:41 ppppaul: or, i want to be able to define my token 'splitters'

12:41 borkdude: I mean, user name/passwd from db

12:42 weavejester: hiredman: Hm, I don't think that's the case here… but it's a possibility to investigate

12:42 ppppaul: Why not make a part of the pattern optional?

12:42 ppppaul: hiredman, friend is hard to use

12:42 hiredman: *shrug*

12:42 ppppaul: weavejester, ?

12:42 hiredman: works for me (now)

12:43 weavejester: ppppaul: Hm, you're also using {0,1} which is odd. That's typically what ? is for.

12:43 ppppaul: my regex-fu is weak

12:44 weavejester: ppppaul: Try: #"-?\d*(?:\.\d+)?"

12:44 ppppaul: i have a lot of tests against these regexs, so i'm confident about them

12:44 i made them so they would be easy to use/port to other engines

12:44 hiredman: to be fair I haven't tried oauth or whatever else with friend

12:45 ppppaul: oauth is a farce

12:45 technomancy_: oauth is fantastic if you can get away with outsourcing logins

12:45 weavejester: ppppaul: The ^ and $ are probably wrong too, because you don't want to match the beginning and end of the URI.

12:45 technomancy_: 10LOC to implement oauth in https://syme.herokuapp.com by delegating to GitHub <3

12:45 ppppaul: i'm not matching the url

12:46 i'm matching a string that has come out of the tokenizer

12:46 compojures tokenize splits on '/' and '.'

12:46 i would like to remove the '.' for one of my routes

12:46 weavejester: ppppaul: No it doesn't :)

12:46 ppppaul: it doesn't?

12:46 hiredman: technomancy_: yeah, my pie in the sky place to go with this project would need to do something like that

12:47 ppppaul: i have used it like such, though

12:47 technomancy_: hiredman: what's the project?

12:47 weavejester: Nope, not in the sense you're thinking, at least.

12:47 ppppaul: i'll run some tests and see what happens

12:47 hiredman: technomancy_: my ideapad thing, the urls with clojurescript in an editor + an svg graphic on the side

12:48 weavejester: ppppaul: You have a route like: ["/:real-number" :real-number #"^-{0,1}[0-9]*\.{0,1}[0-9]+$"] correct?

12:48 technomancy_: hiredman: plz to steal if desired: https://github.com/technomancy/syme/blob/master/src/syme/web.clj#L94

12:48 ppppaul: yes weavejester

12:48 hiredman: technomancy_: sure, I just have to work out how I want it to work

12:48 weavejester: ppppaul: So that's going to be converted into something like: {:pattern #"/(^-{0,1}[0-9]*\.{0,1}[0-9]+$)" :params [:real-number]}

12:49 And the resulting regex doesn't really make sense.

12:49 ppppaul: ...

12:49 hiredman: I think I need some kind of delegration thing, maybe web intents, I am not sure oauth would actually play in to that

12:49 weavejester: You want a regex like: #"-?\d+(?:\.\d+)?"

12:50 Or #"-?\d*(?:\.\d+)?" rather

12:50 ppppaul: can you give me a failing example?

12:50 weavejester: ppppaul: Something the regex won't match?

12:50 ppppaul: yeah, but something that i would expect it to match on

12:51 hiredman: basically I'd like to be able to let people sign in and then authorize the ideapad service to use some other clojurescipt compilation service

12:51 weavejester: ppppaul: "1f", "1.", "+1"

12:51 ppppaul: i have a lot of tests, so i want to add to them and then change my matcher

12:52 i tested against those

12:52 weavejester: ppppaul: The regex is essentially: optional "-", zero or more digits, optional (non-matching group: "." one or more digits)

12:52 ppppaul: Are you testing the regex, or the route?

12:52 ppppaul: the regex

12:53 weavejester: ,(re-matches #"/(^-{0,1}[0-9]*\.{0,1}[0-9]+$)" "/1.0")

12:53 clojurebot: nil

12:54 ppppaul: without the '/'

12:54 weavejester: ,(re-matches #"/(^-?\d*(?:\.\d+)?)" "/1.0")

12:54 clojurebot: nil

12:54 weavejester: ,(re-matches #"/(-?\d*(?:\.\d+)?)" "/1.0")

12:54 clojurebot: ["/1.0" "1.0"]

12:54 ppppaul: ,(re-matches #"(^-?\d*(?:\.\d+)?)" "1.0")

12:54 weavejester: There we go

12:54 clojurebot: ["1.0" "1.0"]

12:55 jcromartie: http://www.techempower.com/blog/2013/04/05/frameworks-round-2/

12:55 weavejester: ppppaul: Your route adds the "/" in at the beginning

12:55 A more simple example might show it better:

12:55 jcromartie: compojure is lagging behind raw servlets, but beats the pants off most other dynamic language web libraries

12:56 weavejester: ["/:foo" :foo #"[0-9]+"] => #"/([0-9]+)

12:56 jcromartie: It's not surprising. For the tests they ran Ring on top of Java servlets, so it was never going to be faster.

12:57 technomancy_: wow, yesod only barely beats rack?

12:59 ppppaul: weavejester, my real code (ANY ["/poi/:latitude/:longitude/with-radius/:radius" ...

13:00 i have never had to include "/" in my regex for anything i've done with compojure param guards

13:00 weavejester: ppppaul: When you specify a custom regex, the routing library Compojure uses (Clout) just substitutes the custom regex into the regex it builds for the route.

13:00 kauschovar: technomancy_: that surprises me, because yesod advertises itself as being very fast

13:00 ppppaul: yesod?

13:00 weavejester: ppppaul: No, *you* don't include the "/". The end regex includes the "/" because that's what you have in your route.

13:01 ppppaul: hmm

13:01 kauschovar: ppppaul: yesod is a Haskel web framework

13:01 *Haskell

13:01 weavejester: So if your route is ["/foo/bar/:baz" :baz #".*"] then the regex generated is: #"/foo/bar/(.*)"

13:03 jcromartie: weavejester: do you think compojure could go faster? I think those results are fine BTW… not too shabby considering it beats the pants off of everything else that's popular right now

13:04 weavejester: jcromartie: Oh definitely. Java servlets are basically doing a bunch of work that Ring never uses.

13:04 jcromartie: Cut out the middle man and there's a lot of stuff you wouldn't need to do.

13:05 ppppaul: weavejester, oh my

13:05 technomancy_: I'd rather see effort going to other things personally

13:05 weavejester: technomancy: Yeah, I'm not in a hurry to write my own HTTP server :)

13:05 gfredericks: compojure-in-compojure

13:06 weavejester: Although… there must be some Java servers that expose a lower interface.

13:08 Yeah, it looks like Netty allows you to get the raw request, before cookies and sessions and parameters are parsed.

13:08 In theory an adapter written against raw netty would be pretty quick.

13:08 supersym: ah

13:09 ppppaul: cake looks like crap

13:09 no7hing: aloha could probably help there

13:09 mthvedt: it amazes me how slow many old web frameworks are

13:09 hosting costs must have been through the roof back then

13:10 jcromartie: compojure on Netty?

13:10 no7hing: or crowds just way smaller ;)

13:10 jcromartie: aleph does channels on Netty right?

13:10 weavejester: There's a netty adapter that seems to do without the servlet compatibility layer: https://github.com/datskos/ring-netty-adapter

13:10 no7hing: yes

13:10 weavejester: Yeah, but I'm not sure how quick channels are

13:10 jcromartie: channels are a bit of overhead

13:10 no7hing: they have their cost

13:10 jcromartie: better for complex dataflows than performance purposes, but it does gain some by using Netty

13:11 weavejester: Well, I assume in this case we're talking theoretical peak performance, rather than anything you'd actually use in the vast majority of cases.

13:12 jcromartie: yeah

13:12 anyway, Compojure does the job :)

13:12 you should be proud to see it near the top of the list

13:13 supersym: I should be really diving into Compojure soon then :)

13:13 thats what ppl are using in production mostly?

13:14 weavejester: supersym: As far as I'm aware.

13:16 supersym: cool

13:17 ppppaul: ring + compojure + something else supersym

13:17 i use liberator atm, with compojure for route matching

13:20 supersym: alright.. I'm just asking because in a few months I'll need to be making my money and most work is in web dev anyway... But I went through Node.js ecosystem quite fast and somehow ended up here :)

13:21 a lot will be frontend work with semantics/seo so hiccup/enlive should do most of the time

13:22 I guess hiccup doesn't have functions for web 2.0 vocabularies yet? :P

13:25 ppppaul: node.js is hell

13:25 hiccup is hell

13:26 hell is hell

13:26 n_b: ppppaul: you mean node.js(funtion(res) { res.is(function(res) { return res.hell;} ))))

13:27 Foxboron: Say i wanna write a Scheme interp in Clojure. What parsing libs should i use? Been sniffing on Parsatron, but not sure if there are better options.

13:33 billy_beanie: im using println to print stuff but when i change it to print nothing comes out, why?

13:34 technomancy_: Foxboron: s-expressions are so easy to parse that using a library could be considered overkill

13:35 Foxboron: technomancy_, well. Considering i wanna learn how to parse other stuff aswell, i think using libraries are just fine.

13:35 technomancy_: ah, well that's different =)

13:35 timsgardner: dnolen: Doing some js interop stuff that would benefit from pattern matching… would you say the clojurescript version of core.match is production-ready, for simple stuff?

13:35 Foxboron: Scheme is just because...well...1) its lisp. 2) look at 1

13:36 technomancy_: personally I would bootstrap off clojure.core/read and circle back to writing your own reader once you got the fun stuff working

13:36 Foxboron: technomancy_: i lack the general logic thinking of how to even contrsuct a parser and interp. So gotta start somewhere

13:37 supersym: pppaul: might be true but I cared for RAD times a lot and that helped a lot using coffee/stylus/jade/markdown because I work with developers and customers who are very picky about their front-ends :P

13:38 and I can't spend ages hand-writing everything so character-cutting was/is very important

13:39 using clojure I'd get extremely powerful functions and sanity back, and parens..which is ok :P

13:40 billy_beanie: im using println to print stuff but when i change it to print nothing comes out, why?

13:41 TimMc: billy_beanie: You may need to flush the output stream.

13:41 &(use 'clojure.repl)

13:41 lazybot: ⇒ nil

13:41 TimMc: &(apropos "flush")

13:41 lazybot: ⇒ (*flush-on-newline* flush)

13:43 billy_beanie: okay let me try calling flush after my prints

13:43 ah there we go

13:43 thanks TimMc

13:43 why do i have to do that?

13:45 dnolen: timsgardner: yes it works for simple stuff as far as I know. A few people use it.

13:47 borkdude: is this a valid approach in korma? https://www.refheap.com/paste/13302

13:48 it works, but I want to know if it 'the korma way'

14:02 nz: borkdude: seems ok to me

14:05 devn: Does anyone know if there's a library in Clojure that deals with transfinite numbers?

14:05 timsgardner: dnolen: cool, thanks

14:06 devn: My coworker is interested in building a library and I'm trying to steer him in the right direction.

14:07 stuartsierra: devn: I'm curious: what's a use case for transfinite numbers in a program?

14:11 devn: stuartsierra: i'm typing for him: He doesn't really know yet. He's short answer was: "Because you can." ;) -- That being said, he thinks there might be some implications for scheduling.

14:12 s/He's/his/

14:12 stuartsierra: Interesting.

14:13 Well, I hope he has fun with it. :)

14:15 jonasen: dnolen: the following suprised me: (run* [q] (fresh [a] (membero a [:foo :bar]) (== q :baz))) ;; => (:baz :baz)

14:15 dnolen: but it works the same way in minikanren-simple so I guess it's known behaviour?

14:16 stuartsierra: Wow, I think I understood that.

14:16 It's backtracking: there's one path for each possible binding of `a`.

14:17 dnolen: jonasen: expected behavior for sure.

14:18 jonasen: dnolen: ok

14:19 dnolen: jonasen: just because the user doesn't include some variable in the result doesn't mean we can throw away answers.

14:21 jonasen: dnolen: that makes sense. If I want to know the number of answers for a run* I can always do (distinct (run* ...)) so it should not be problematic

14:27 gilbertw1: Anyone using Sublime Text 2 to develop Clojure?.....if so, is there any syntax highlighting files available that are better than the one that it ships with?

14:29 timsgardner: devn: that's kind of a teaser… what scheduling implications might there be?

14:29 devn: I see there's a transfinite type class for Haskell

14:35 devn: timsgardner: heh, I really can't speak to that. He mentioned something about long-running processes and determining the order that certain operations should execute. He also alluded to von Neumann and how he studied the ordinals and transfinite numbers.

14:36 arkh: is there a more succinct way to get at a value matched in a regular expression than: (second (apply seq (re-seq #"foo=(\d+)" "this is foo=10")))

14:37 n_b: ,(second (re-seq #"foo=(\d+)" "this is foo=10"))

14:37 clojurebot: nil

14:37 devn: timsgardner: thanks for the heads up on the transfinite type class

14:38 timsgardner: I'd be happy to hook you up with him if you guys want to discuss. I think he's looking for someone more mathy than me to talk about this with. :)

14:39 timsgardner: devn: yah. It's kind of interesting, looks like the Haskell motivation was to avoid some awkwardnesses associated with floating point conversion

14:40 n_b: arkh: It's because you're getting each match group, not each match

14:41 arkh: ,(second (apply seq (re-seq #"foo=(\d+)" "this is foo=10")))

14:41 clojurebot: "10"

14:41 n_b: see ##(doc re-groups)

14:41 lazybot: ⇒ ------------------------- clojure.core/re-groups ([m]) Returns the groups from the most recent match/find. If there are no nested groups, returns a string of the entire match. If there are nested groups, returns a vector of the groups, the first element being the entire match. nil

14:42 timsgardner: devn: I'm rather rusty on my set theory these days, I'm afraid. But I like the idea of someone finding a use for transfinite arithmetic etc, since it's often used as an example of pointless math

14:42 arkh: n_b: that's cool - it just seems like a person has to go through some acrobatics to do something (imho) that's simle

14:42 *simple

14:43 even more so to, say, add a series of matches:

14:43 ,(+ 1 (Integer/parseInt (second (apply seq (re-seq #"foo=(\d+)" "this is foo=10")))))

14:43 clojurebot: 11

14:43 devn: timsgardner: can i private message you?

14:44 timsgardner: devn: think so :)

14:44 n_b: arkh: You could just do (map last (re-seq pattern s))

14:45 and I'd rewrite that adding example using a threading macro, since it's really piping data

14:45 amalloy: arkh: (apply seq x)? isn't that just (first x), except that it fails unless x is a seq of seqs?

14:46 n_b: arkh: Yes.

14:46 woops, meant amalloy *

14:47 arkh: amalloy: I was using (first x) initally but it would select the whole vector returned by re-seq

14:48 n_b: (map last ... ) might be nice but it returns a list instead of the inner value

14:49 ,(map last (re-seq #"foo=(\d+)" "this is foo=10"))

14:49 clojurebot: ("10")

14:49 n_b: arkh: I'm aware, but I'm assuming you want this to work for a non-contrived example where there might be multiple matches

14:50 arkh: n_b: with the data I'm using there should be either a single match or non match ... the initial group of code I'm using fails on nil

14:51 n_b: arkh: then use (comp second first) (re-seq...))

14:52 arkh: or actually, (comp peek first) will be (imperceptibly) faster

14:53 and if it fails on nil, then you might want to have an (if-let) as well

14:54 arkh: n_b: processing ... : )

14:55 ztellman: jcromartie: a little late to the conversation, but aleph has > 90% of the raw performance of a basic netty adapter

14:56 closer to 95%, looking at the benchmarks again

14:56 n_b: arkh: e.g. user=> (if-let [res ((comp peek first) (re-seq #"foo=(\d+)" "this is foo=10"))] #_=> (-> res Integer/parseInt inc) #_=> nil)

14:56 ztellman: and that's not "channel overhead", that's adding support for pipelined requests, etc.

14:57 arkh: n_b: sorry, I'm not following the usefulness of (comp second first) or (comp peek first) in this case

14:58 n_b: arkh: You want the last result (the matched group) of the first result returned by re-seq, no? It's simply an easier way of writing (peek (first (re-seq...))

14:58 arkh: you might be better off with re-find though

14:59 ,(re-find #"foo=(\d+)" "this is foo=10")

14:59 clojurebot: ["foo=10" "10"]

14:59 n_b: ,(re-find #"foo=(\d+)" "this is foo≠10")

14:59 clojurebot: nil

15:01 arkh: n_b: that gets around the seq related issues, so that's cool

15:02 n_b: arkh: So what's the next problem? :)

15:02 arkh: somewhat related, is there a shorthand for filtering nils? Something better than (filter #(not (nil? %)) ... )

15:02 n_b: ; )

15:03 e.g. (fnil) replaces a nil with a default, I'm just looking to filter

15:03 fbernier: arkh: remove perhaps

15:04 n_b: arkh: ##(remove nil? [1 nil 2 nil 3])

15:04 lazybot: ⇒ (1 2 3)

15:04 fbernier: (remove nil? ...)

15:04 n_b: or (filter identity lst)

15:04 oh, that'll remove falses

15:05 fbernier: How nice it feels to be a clojure/lisp noob and to know the answer to a question ...

15:05 arkh: remove looks good - thank you

15:05 fbernier: :)

15:05 borkdude: dnolen where can I find some benchmark data on clojurescript?

15:05 arkh: fbernier: :D

15:06 n_b: fbernier: The questions in here are either solved by those with extensive Clojure & JVM experience or easily done by anyone who has memorized the clj cheatsheet :D

15:07 arkh: If you haven't, I'd recommend running through some of the 4clojure problems up to 70-80. It'll teach you lots of tricks about working with seqs and lots about the core namespace

15:08 arkh: n_b: that's a good call ... I need some rounding out : ) Thanks for your help

15:09 n_b: arkh: My pleasure! It's good to be the one answering a question for once :)

15:09 lypanov: I enjoyed projecteuler a lot just for getting my head about lisp syntax.

15:09 around*

15:09 n_b: Hopefully I haven't lead you astray somehow :P

15:09 * lypanov also suggests JoC with an exclamation mark

15:10 n_b: JoC after Clojure Programming IMO

15:10 lypanov: n_b: agreed.

15:10 n_b: I started with JoC, felt totally lost, and then it completely clicked after doing some little projects, 4clojure, and reading through Clojure Programming

15:11 Super excited for the 2nd edition to come out. Have a few places in my app where core.logic is going to be very handy

15:11 lypanov: I do things backwards. So I did projecteuler. Then put clojurescript code into production. And then read JoC.

15:11 (didn't read Clojure Programming but I've heard great things)

15:12 mthvedt: is there a version of lazy test that works with the latest leiningen?

15:12 dnolen: borkdude: what kind of benchmark data?

15:12 borkdude: dnolen the kind you showed here some time, I vaguely remember it

15:12 lypanov: dnolen: fwiw just migrating our app from js+knockout.js to javelin+cljs.

15:13 dnolen: cljs completely changes my motivational level. utter joy.

15:14 dnolen: borkdude: I just made various ones by hand and put them on jsperf.com

15:14 n_b: lypanov: Are you using EDN as well?

15:14 dnolen: borkdude: there's also http://www.50ply.com/cljs-bench/

15:14 lypanov: n_b: no no clojure. just clojurescript.

15:14 hosting story too complex for now.

15:14 borkdude: dnolen ok tnx

15:15 n_b: I'm tempted to use Clojure from front to back for my projects, but too worried about others being able to extend it once I've graduated

15:15 lypanov: n_b: using the cute jayq ajax let macros.

15:15 n_b: honestly if you're using clojure on the backend you're already at such a level that you shouldn't worry.

15:16 AimHere: n_b, make your project good enough that it's bait for proto-Clojurists

15:16 lypanov: n_b: only complex part of cljs for me has been advanced builds mixed with js.

15:16 dnolen: borkdude: though that last link may be out of date.

15:16 lypanov: sweet!

15:17 n_b: AimHere: That's the plan ;)

15:18 Working on quantitative literature research, so all the flexibility of LISP+JVM interop is a match made in heaven.

15:19 octagon: hi, how can i do pr-str on strings that contain escape codes? ex: (pr-str "\033[0m")

15:21 i.e. (count (pr-str "\033[0m")) should return 9, but it actually returns 6

15:24 joegallo: why should it return 9?

15:24 octagon: joegallo: oh wait, i see what you mean

15:27 arkh: octagon: do you meant to use "\[\033[0m\]" instead?

15:27 *mean

15:28 octagon: arkh: yeah i dodn't think that \033 was a single character, so i guess clj is right :)

15:31 SegFaultAX: octagon: Why wouldn't that be a single character?

15:31 octagon: SegFaultAX: no, it would. i was just confused

15:32 SegFaultAX: octagon: Ah.

15:32 fbernier: n_b: im at 71 problem solved on 4clojure ... probably why I could answer the question earlier ;)

15:34 SegFaultAX: Speaking of 4clojure, it just crashed.

15:40 jcromartie: ack! the code about halfway down this page is painfully weird http://java.dzone.com/articles/promises-and-futures-clojure

15:57 ebaxt_: I've ported most of rack-rewrite, but I can't decide if I should bother with send_file/x_send_file rules. Need it? https://github.com/ebaxt/ring-rewrite/blob/master/README.md https://github.com/jtrupiano/rack-rewrite#send_file-x_send_file

16:02 mpenet: jcromartie: most of the pain points or missing features he mentions are covered by libraries such as lamina, or cljque (this one seems to be a playground for what could be improved core promises/futures I think)

16:02 jcromartie: not to mention an async callback in a future is not hard at all

16:02 (future (do-something) (callback))

16:02 mpenet: yeah...

16:03 stuartsierra: mpenet: Yes, cljque is an experiment.

16:03 mpenet: on a promise tho it's not possible at the moment, you have to do it manually as well

16:03 stuartsierra: very cool stuff still, I like how it's taking shape

16:03 stuartsierra: thanks

16:04 SegFaultAX: stuartsierra: Is there something like it stable and ready for usage?

16:04 stuartsierra: no

16:05 mpenet: SegFaultAX: lamina is a bit similar in some way, but the vocabulary and underlying concepts are a bit different

16:06 stuartsierra: SegFaultAX: You're welcome to use it, of course, but I can't make any guarantees.

16:06 SegFaultAX: mpenet: I'm not married to the PromisesA protocol, but something along those lines would be really useful.

16:07 mpenet: SegFaultAX: lamina result-channels are close to promises

16:07 but tbh I would prefer something like cljque in core

16:08 if it ever gets aproved/improved

16:09 SegFaultAX: mpenet: I don't think it needs to be in core.

16:10 stuartsierra: Promises are much more useful if everybody agrees on the same implementation.

16:10 mpenet: true, but there are discussion about improving both future and promises

16:10 SegFaultAX: It can be under the Clojure project umbrella like core.logic and core.match, but I don't really care if it's part of clojure.core proper.

16:10 mpenet: right

16:11 rabbit_airstrike: anyone have any up-to-date resources on using ritz?

16:12 mpenet: either way as stuartsierra said, having "one way to do it" would probably be better for everybody.

16:12 stuartsierra: It's unfortunate that the JDK doesn't include an interface for this, so there are multiple competing implementations: Guava, Scala, etc.

16:13 mpenet: yes :/

16:14 SegFaultAX: stuartsierra: What, a PromisesA implementation?

16:15 stuartsierra: SegFaultAX: Not necessarily PromisesA, but a simple interface for "Callback when a Future is completed."

16:15 With that, we'd have a chance of making interoperable implementations.

16:15 SegFaultAX: Android has something like it with its AsyncTask implementation, I think.

16:16 stuartsierra: Yeah, lots of libraries / frameworks have something *like* it. But there's no common interface for them to standardize on.

16:16 SegFaultAX: They don't really compose in any meaningful way, though.

16:17 stuartsierra: Is this something you're still actively investigating?

16:17 stuartsierra: sort of

16:18 jeremyheiler: JDK8 will have Promise called CompletableFuture, I think.

16:19 stuartsierra: Yeah, Java 8 is going to solve all problems ever. ;)

16:20 SegFaultAX: Is there already an established road map for Java 9?

16:20 jeremyheiler: haha

16:21 stuartsierra: Java 9 will be so advanced it will actually write your code for you. :P

16:21 jeremyheiler: It's about damn time!

16:23 antares_: SegFaultAX: there are some JEPs for JDK 9 already :)

16:23 SegFaultAX: mostly around the VM, though, those things take a long time to implement

16:23 technomancy_: "Java 1 was of the 90's. Java 5 generics came from the 70's. Java 8 lambdas come from the 40's. Java 20 will have a steam regulator."

16:24 https://mobile.twitter.com/jamesiry/status/250248275406491648?p=v

16:24 stuartsierra: :)

16:32 konr: can't bind ♥ in a let in cljs :(

16:36 borkdude: hath korma something to help me not to manually having to trim things?

17:18 hmm, I put a dependency from webjars in leiningen

17:18 but the resources from it don't seem to be available in my ring app

17:20 ah got it (wrap-resource "/META-INF/resources")

17:32 hmm, now that I added (resource/wrap-resource "/META-INF/resources") to my handler middlewares, the route "/" is returning an empty page

17:37 any idea why this happens? https://www.refheap.com/paste/13311

17:47 when I remove line 18 the "/" page gets served normally

17:47 but then I don't get the webjars resources

17:57 arrdem: what's the replacement for noir.statuses?

18:55 devn: Hmm, does anyone here use ritz and set breakpoints?

18:55 tieTYT: did there used to be a clojure blip.tv?

18:55 devn: tieTYT: yes

18:55 tieTYT: what happened?

18:55 devn: those videos were moved to youtube i believe

18:56 tieTYT: http://www.youtube.com/user/ClojureTV ?

18:56 antares_: tieTYT: yes

18:56 tieTYT: cool

21:08 mmitchell: anyone know of a good mocking library, besides midje? I found the old contrib mock lib, but it doesn't look like it's being maintained anymore.

22:32 tieTYT2: does clojure have something like haskell's zip?

22:33 jeremyheiler: ~zip

22:33 clojurebot: zip is not necessary in clojure, because map can walk over multiple sequences, acting as a zipWith. For example, (map list '(1 2 3) '(a b c)) yields ((1 a) (2 b) (3 c))

22:33 jeremyheiler: :-)

22:33 tieTYT2: oh right

22:33 i forgot about that

22:33 thanks

22:33 jeremyheiler: np!

22:33 tieTYT2: so how could I use map that way, but pass each of these into a function so that 1 is the first param and \a is the second?

22:34 would that just be (map my-function l1 l2)?

22:35 jeremyheiler: That's exactly what the example shows.

22:35 tieTYT2: ok cool

22:35 thanks

22:35 jeremyheiler: Oh wait, nevermind.

22:35 Gah, nevermind on that nevermind.

22:35 tieTYT2: :)

22:37 jasonjckn: dnolen: is core logic smart about <? I know you can 'project' into clojure but that's not very efficient as it has to execute the clojure function for each element in the set that could be matched

22:38 dnolen: is project the only supported way to get inequality ops

22:43 dnolen: jasonjckn: you don't need project for < anymore, you have FD stuff now

22:43 jasonjckn: "FD" stands for?

22:43 dnolen: finite domain

22:44 jasonjckn: constraint solving over natural numbers

22:44 jasonjckn: k, I used core.logic extensively 1 year ago, sounds like there's some new features

22:44 dnolen: jasonjckn: yeah quite a few new things.

22:44 jasonjckn: is there a description of all the new stuff?

22:44 and/or tutorial

22:45 dnolen: (run* [x y] (fd/in x y (interval 1 10)) (fd/< x y)), works

22:45 jasonjckn: no not much in way of a tutorial for the news things yet.

22:46 jasonjckn: k

22:46 i'll try to figure it out

22:47 dnolen: jasonjckn: I think's some basic description in the wiki.

22:47 jasonjckn: dnolen: couldn't you write a thin clojure wrapper around mozart/oz ?

22:47 dnolen: is the tradeoff just the IPC?

22:48 i guess lack of user defined functions is a big one

22:48 dnolen: jasonjckn: it worth considering hooking into external solvers yes, though Mozart/OZ is quite a behind stuff like GeCode or JaCoP

22:48 jasonjckn: yes, I think it would just be less flexible. gotta run.

22:49 jasonjckn: kk seeya

Logging service provided by n01se.net