#clojure log - Feb 01 2015

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

0:08 ToBeReplaced: raspasov: (apply map vector your-list-of-lists)

0:10 raspasov: ToBeReplaced - nice!

0:10 that's the kind of thing I was looking for :)

0:23 avshalom: hi all, i'm working in the cider repl, and wonder do i suppress output?

0:23 i'm wondering if there is a *print* variable...

0:27 Jabberz: any recommendations on db migration libraries for on-going systems .. drift, ragtime, lobos? Are any of these widespread and/or actively maintained?

0:38 ToBeReplaced: raspasov: yeah... there's pretty much always a pretty way; knowing that "apply map" facilitates "unzip" helps

0:40 raspasov: yea it's good :) and I think more or less the same efficiency as the (reduce)

1:11 krat0sprakhar: hi all, i've been trying to reimplement juxt for a 4clojure problem

1:11 here's mine and the reference implementation

1:11 https://www.refheap.com/96749

1:12 i'm sure i'm missing a few cases since my implementation is so minimal

1:12 any idea which testcases will fail with my-juxt?

1:36 kir: greetings all

1:40 Is there a way I can output Clojure-Reader processed text files and also the java version pre-compilation to byte-code?

1:42 I'm looking to concretize some concepts

1:43 scottj: see reify

1:44 j/k

1:47 cfleming: kir: There is no java version pre-compilation

1:47 kir: Clojure compiles directly to bytecode

1:52 krat0sprakhar: cfleming: after your recommendation, i tried cursive yesterday

1:52 its awesome :D

1:53 the ideavim plugin is great as well.. thanks a lot :)

1:53 kir: cfleming : I see. Thx. Off I go to wade though the src with a debugger

1:53 through*

2:05 cfleming: krat0sprakhar: Great, I'm glad you're liking it!

2:06 kir: What are you trying to discover?

2:08 krat0sprakhar: cfleming: any clue about https://www.refheap.com/96749

2:10 cfleming: krat0sprakhar: What do you want a clue on?

2:11 krat0sprakhar: so i've been trying to implement

2:11 the juxt function.. for a 4clojure problem

2:12 cfleming: Right.

2:12 Looks like it's working, right?

2:13 krat0sprakhar: yeah.. it works

2:13 but why is the clj.core implementation

2:13 so elaborate?

2:13 i'm surely missing a few cases (thats why mine is minimal)

2:13 but i'm not able to figure out what are those cases

2:15 cfleming: I think it's for efficiency - apply and reduce are slower than a normal invoke, so they have fast paths for up to 3 parameters

2:18 krat0sprakhar: oh ok.. thanks a lot! :D

2:18 i've seen this pattern in a lot of core functions..

2:18 cfleming: Yeah, I think that's why

2:18 krat0sprakhar: cool.. thanks!

2:18 cfleming: No worries

3:06 expez: any alternatives to friend when securing a REST backend?

3:10 Jaood: expez: buddy

3:13 expez: Jaood: Any thoughts about which one is easier to use with liberator? Security really isn't a concern at this point because I'm not sure I'll ever get any users :p

3:18 Jaood: expez: I haven't use friend or liberator, so can't say, this tutorial was posted recently: http://rundis.github.io/blog/2015/buddy_auth_part1.html

3:19 compojure suits me for small APIs

3:20 krat0sprakhar: compojure is like the flask of clojure ecosystem

3:27 ianhedoesit: this discussion is relevant to me! I'm working on a compojure project which includes file uploading and I'm having trouble figuring out how to do it. all the information I see online is from years ago.

3:27 justin_s3ith: ianhedoesit: there is a middleware for file uploads

3:27 https://ring-clojure.github.io/ring/ring.middleware.multipart-params.html

3:29 ianhedoesit: I don't know what to do with that information! I've never written anything that could upload or receive files. this is all new to me. I suppose I should spend some more time just learning about the process of file uploads in general.

3:30 joonas_: ianhedoesit: that's the fun of programming, we are allowed to build prototypes to learn and then integrate the new knowledge to our work.

3:30 justin_s3ith: ianhedoesit: you create an upload form for the html side, this will work the same way it would with any other server, plenty of examples are online

3:31 ianhedoesit: that middleware, if wrapped around your handler, detects the upload and puts it in the request map as documented, then your handler can use the request map to access the file

3:32 ianhedoesit: joonas_: yeah but anything to do with servers seems like magic to me.

3:40 joonas_: ianhedoesit: meteor.com abstracts most of the server stuff away and you can program it with cljs

4:08 ianhedoesit: joonas_: I've heard of meteor, but I'm not sure if it's something I want to use. It seems like a great tool for actually getting something done that people will use, but this is more a learning experience with Clojure, servers, databases, heroku, etc.. I enjoy stumbling over myself while I learn to make something that looks and functions poorly. :)

4:09 but! since I first said I had an issue about an hour ago, I'm able to upload the contents of a file and surface them on a website, which is part of my goal.

4:09 joonas_: ianhedoesit: I understand, I am the same

5:08 Xack: hm, trying to use `lein install` to test a template i have modifier, and i get

5:08 Failed to resolve version for luminus/lein-template:lein-template:jar:RELEASE: Could not find metadata luminus/lein-template:lein-template/maven-metadata.xml in local (/home/zack/.m2/repository)

5:09 aaand, nvm, i was using `lein new` wrong

5:50 krat0sprakhar: quick question everyone - how do i clear the locals in an open cursive REPL window?

5:50 TEttinger: cfleming to the rescue?

5:51 krat0sprakhar: TEttinger: :D

5:51 cfleming: krat0sprakhar: What do you mean by clear the locals?

5:51 krat0sprakhar: if i define (def x 124)

5:51 i want to clear its value

5:51 so that i get x as undefined

5:52 TEttinger: (doc undef)

5:52 clojurebot: No entiendo

5:52 TEttinger: just guessing here

5:52 cfleming: (doc ns-unmap)

5:52 clojurebot: "([ns sym]); Removes the mappings for the symbol from the namespace."

5:52 krat0sprakhar: hehe.. clojurebot is awesome

5:52 oh ok.. so i have to do it manually.. got it.. (or i can just close and open a new window)?

5:53 what does locals clearing mean in this document - https://cursiveclojure.com/userguide/repl.html

5:53 ?

5:53 cfleming: krat0sprakhar: So (ns-unmap *ns* 'x)

5:54 krat0sprakhar: yup.. i have a lot of such variables lying around.. so i just started a new session.. thanks!

5:54 cfleming: krat0sprakhar: Ummm, it's explained in that doc :)

5:54 krat0sprakhar: That's something else, for debugging

5:54 krat0sprakhar: But yeah, you can stop and restart the REPL to get a fresh one any time

5:55 krat0sprakhar: ok.. sorry.. i did try reading it.. i guess i'm too noob it understand it at this stage :D

5:55 thanks!

5:55 dysfun: okay, well let's try and explain it more simply

5:56 basically, in a garbage collected language, when something is no longer accessible, it's free to be collected and the memory used freed for use for something else

5:56 in some languages, you 'free' memory by assigning the equivalent of nil to it

5:57 because of the design of clojure data structures, the compiler effectively does this to certain data

5:57 to make sure that they will be freed

5:57 it should only be an optimisation. and in production code, it doesn't matter

5:57 but if you're trying to debug something, it can occasionally cause surprising results

5:57 hence, there's an option to turn it off

5:58 krat0sprakhar: oh.. thats helpful.. thanks for explaining dysfun!

5:58 dysfun: you're welcome

5:59 krat0sprakhar: although to fully appreciate i do need to run into one of those "surprising results".. which i'm sure will come with experience

5:59 dysfun: well i've been doing clojure full time for about a year now and i've not run across such a situation yet

5:59 krat0sprakhar: haha...

5:59 btw, does anyone else agrees that 4clojure is damn addictive

6:00 instead of doing my office work and i'm spending all my time on it :D

6:00 dysfun: i got bored of it pretty quickly and started solving real problems instead

6:01 krat0sprakhar: oh hmm.. i'm still looking out for some ideas

6:01 AeroNotix: dysfun: did you put a suit and tie on as well?

6:01 Real Problems for Real Programmers

6:01 krat0sprakhar: :D

6:01 dysfun: there's no such thing as a real programmer

6:01 SagiCZ: krat0sprakhar: 4clojure is really frustrating for me.. every problem takes me so long... even the easy ones!

6:01 cfleming: krat0sprakhar: You'll find locals clearing very annoying very quickly if you use the debugger

6:01 dysfun: we're all amateurs. we still have no idea how to build enormous systems

6:01 krat0sprakhar: SagiCZ: +1

6:02 cfleming: krat0sprakhar: Basically your local variables will frequently be set to nil by magic

6:02 SagiCZ: krat0sprakhar: but i agree it is a damn good exercise for anyone starting with clojure.. it helps you understand the internals better

6:02 krat0sprakhar: cfleming: yup! dysfun explained it very well..

6:03 SagiCZ: yeah.. had it allowed named functions it would've been better..

6:03 dysfun: also note that i don't use a debugger though

6:03 krat0sprakhar: me neither..

6:03 dysfun: i architect my code for maximum repl-friendliness

6:04 krat0sprakhar: so this is from an HN comment - but do anyone find it hard to read others clojure code?

6:04 the 4clojure solutions by others

6:04 half of time i have to spend an equivalent amount of time to get how the code does what it does

6:04 dysfun: i can't comment about the 4clojure solutions, but i've read through a lot of clojure libraries by now and it seems mostly fine

6:04 krat0sprakhar: *does anyone

6:05 oh ok..

6:05 thats a relief

6:05 dysfun: the problem isn't one of clojure in particular, but of turing completeness and the halting problem

6:05 krat0sprakhar: unreadable code is due to halting problem? how?

6:05 dysfun: however, for the record, i find that clojure libraries are generally well organised and fairly easy to track because of the focus on building simple things

6:06 Glenjamin: clojure.core is not a good place to look for examples of neat clojure

6:06 dysfun: well there are infinite ways to express a given operation

6:06 for example, how do you take a map and keywordify the keys?

6:06 i can think of at least 3 ways in the first second

6:07 SagiCZ: krat0sprakhar: 4clojure is basically codegolf.. it mentions there that you shouldnt take the solution of other people as idiomatic clojure code.. it is not

6:07 krat0sprakhar: SagiCZ: Oh it does? I must have missed that note.. :D

6:08 dysfun: incidentally there is a kind of clojure golf i'm fond of - the one where you look again at the standard library and see if you can simplify the logic

6:08 the cheatsheet is quite good for that

6:15 krat0sprakhar: the other thing that strikes me is that as clojure is getting older, we've gotten so much better infrastructure. library quality has improved massivley and libraries use each other more

6:15 SagiCZ: as for the unreadable code.. there was some nice article about code density from one of the members of this channel but i forgot who it was from

6:15 dysfun: documentation seems a lot less of an issue than when i first started clojure a few years ago

6:15 SagiCZ: it was bbloom

6:16 krat0sprakhar: read it.. it might make you feel less stupid http://www.brandonbloom.name/blog/2013/06/24/code-density/

6:16 krat0sprakhar: SagiCZ: haha thanks!

6:16 http://en.wikibooks.org/wiki/Clojure_Programming/Examples/Norvig_Spelling_Corrector

6:16 SagiCZ: dysfun: i must say i still think that clojure documentation is subpar

6:16 hellofunk: a lot of the code in clojure.core has been written the way it is for performance optimizations that can cover a wide range of potential uses. it's often not an ideal example of writing clojure since it's basically the engine of the whole system.

6:16 krat0sprakhar: i think this is the best example

6:16 very hard to understand what this does

6:17 even though its by Rich Hickey himself

6:17 dysfun: SagiCZ: yeah, but a lot of it piggybacks on java-y stuff, so quelle surprise

6:18 hellofunk: see also most languages. if you read strict.pm (in the perl core) you'd have a fit. i once put an excerpt of it on a slide at a perl conference and asked people to identify it

6:18 (mostly because it does magic stuff at compile time involving bit-twiddling to set up some parser variables

6:19 krat0sprakhar: SagiCZ: Thats a great article! Thanks a lot

6:19 dysfun: hellofunk: i also note that i find it particularly painful reading the java source of clojure, which i've had to do a lot of recently

6:21 krat0sprakhar: When you start writing some object-oriented code, you spend a bunch of time creating classes and defining the shape of your domain. There is some delay between when you begin typing and when you run head first into the problem at hand.

6:21 pretty cool observation in the article

6:21 dysfun: depends how you write your OO code. mine usually has a pretty functional expression

6:22 but i expect that article is talking about the java way

6:22 and java has

6:22 pretty much the worst code density of any language

6:23 lisp syntax lendds itself quite well to density as well, it's not just the libraries

6:27 SagiCZ: dysfun: so in what language do you write your OO code?

6:28 i mean writing functional program in java is somewhat possible but far from idiomatic and may induce some stress on your coworkers

6:34 dysfun: SagiCZ: i write whatever i need to to get the job done. some of my favourite languages with OO support are perl and python

6:34 i choose to avoid writing java where possible. and doing some c++ recently reminded me why i gave it up all those years ago

6:35 SagiCZ: ugh.. implying that c++ is ---- than java?

6:36 dysfun: well frankly i'd rather write neither

6:36 SagiCZ: i actually cant understand why would anyone still use c++ nowadays.. reminds me of southpark's manbearpig

6:36 i see

6:36 dysfun: at least c++ still has a purpose

6:36 SagiCZ: java does not have a prupose?

6:37 dysfun: java had a purpose. now there are so many jvm languages it doesn't.

6:37 SagiCZ: i dont think any jvm language is as mature as java

6:37 dysfun: but clojure runs fast enough for small stuff and i wouldn't even try and build large scale stuff in java

6:37 can you imagine having to deal with all the concurrency crap?

6:38 SagiCZ: there are other things you have to deal with when you switch to clojure

6:39 dysfun: anything in particular?

6:40 SagiCZ: bugs and subpar documentation

6:41 dysfun: clojure's documentation is better than most languages

6:41 bugs are reasonably rare events and generally easily worked around

6:41 SagiCZ: i am just comparing to java

6:41 dysfun: i find clojure documentation much more palatable than java on the whole

6:41 SagiCZ: clojure's documentation is often cryptic and incomplete.. i read reduce's documentation 15 times not getting any closer to understading what it actually does

6:42 dysfun: ah yes. occasionally i've had to google "clojure func-name" to see someone using something

6:43 but i do that in java too

6:43 cfleming: dysfun: I'd definitely argue on the doc and the bugs

6:43 dysfun: more so in java because i want to see some full and complete working open source code so i can figure ou the library

6:43 cfleming: There are a ton of pretty glaring bugs open in the tracker

6:43 SagiCZ: dysfun: but the thing is.. most of clojure docs COULD be written BETTER.. they just arent..

6:44 cfleming: And I'd agree that the docs are, well, patchy

6:44 Glenjamin: clojuredocs examples are a big help

6:44 dysfun: cfleming: and yet i rarely run across them. perhaps because the authors of the libraries i used already worked around them

6:44 cfleming: dysfun: I guess you don't AOT

6:44 dysfun: i do not

6:44 i'm aware that's a pain point though

6:44 SagiCZ: i must always mention core.async/tap doc which blatantly omits what it actually returns..

6:45 cfleming: Glenjamin: Yeah, that is for sure - I use that all the time

6:45 dysfun: SagiCZ: patches welcome

6:45 sobel: i think the docs could use examples, or maybe a usage guide needs to exist for core functions

6:45 i've faced that too, where i'm pretty sure i want to use a function but i gotta search for examples to be sure

6:45 Glenjamin: i think that's best left to userland

6:45 SagiCZ: dysfun: i dont know how to patch.. maybe its something i should work on and stop complaining

6:45 sobel: probably

6:46 dysfun: SagiCZ: pretty easy. take a fork on github, change the docs, generate a patch, sign the contributor agreement and file a bug on the wiki attaching a patch

6:46 sobel: SagiCZ: well, you gotta nail down the problem before you can do anything about it. but yeah, at some point complaining is its own end

6:46 Glenjamin: dysfun: then wait 2 years

6:46 dysfun: i really wish they'd take pull requests on github though

6:46 cfleming: (inc Glenjamin)

6:46 lazybot: ⇒ 12

6:46 Bronsa: cfleming: dysfun there are a lot of bugs/enhancements open in the tracker with trivial patches written months if not years ago.

6:47 Glenjamin: core is extremely slow moving, which can be a good thing

6:47 but core is pretty big

6:47 Bronsa: (inc cfleming) ;; also here's your inc

6:47 lazybot: ⇒ 9

6:47 SagiCZ: Bronsa: so what's the hold up? who is responsible? pitchforks ready?

6:47 cfleming: Bronsa: Ahhhhh

6:47 sobel: i hope there's a dev rhythm and structure, not just constantly integrating community pull requests

6:47 dysfun: Bronsa: that's sad :/

6:47 sobel: "cadence" they call it

6:48 cfleming: dysfun: This is why so many people run patched Clojure versions

6:48 SagiCZ: dysfun: so as you can see.. you can't say clojure is as mature as java.. it may certainly be an advantage at times

6:48 but not always

6:48 Bronsa: SagiCZ: I don't like to accuse anyone in particular but the core team with the exception of a couple of guys is not active at all

6:48 dysfun: all i can say is i rarely run across real problems. but i can see other people do

6:48 SagiCZ: Bronsa: that sentence alone scares me to death... feels like they are abandoning clojure

6:49 Bronsa: SagiCZ: no, that's definitely not the case :)

6:49 SagiCZ: well then i guess they deem it good enough?

6:50 dysfun: SagiCZ: clojure is a vessel for shipping a commercial database solution, after all

6:50 sobel: huh

6:50 SagiCZ: dysfun: what?

6:50 dysfun: that was most definitely tongue in cheek

6:51 sobel: oic

6:51 dysfun: but what i mean is that datomic relies on clojure and so long as they want to keep selling it, they're going to have to keep clojure going

6:51 cfleming: I don't think anyone thinks that Clojure is being abandoned

6:51 sobel: sounds like it was a runaway hit for them

6:52 SagiCZ: well i wouldnt want to spend another minute on something that's dead end

6:52 cfleming: But patches and fixes take a long time, for better or worse.

6:52 sobel: clojure isn't a dead end

6:52 dysfun: well, they've done the impossible. they've made lisp palatable to a large audience

6:52 krat0sprakhar: is there a language that does patching and fixing well?

6:52 cfleming: Hey, we're all here because we like it

6:52 But that doesn't mean it's perfect

6:52 Bronsa: SagiCZ: we're saying that's the contributing process is slow, nobody is claiming that clojure is dead

6:53 SagiCZ: Bronsa: okay okay

6:53 sobel: my biggest problem with clojure (and lisp for that matter) is i suck at it

6:53 krat0sprakhar: sobel: :D

6:53 dysfun: many of us in this channel are building our businesses on clojure and trust that it's going to continue to be a good choice

6:53 SagiCZ: sobel: i must second this..

6:54 dysfun: so its a good reason to stop and think about it

6:54 dysfun: and given the scurrilous rumours i've heard of scala going closed source, it's looking great right now

6:54 Bronsa: cfleming: my impression is that the core team doesn't have the time anymore to maintain it as it should, puredanger has been hired to do that job but: - he is just one person - he still depends on the core team.

6:55 krat0sprakhar: scala compile times are just obnoxious..

6:55 the only reason i'd prefer scala over clojure will be for static typing

6:55 cfleming: Bronsa: That sounds about right. He's more active actually working on the language recently though, by the looks of it.

6:55 dysfun: s/compile times are/is/; # FTFY

6:55 cfleming: Bronsa: I'd love to see more people with commit rights.

6:56 Bronsa: cfleming: just rich & stu AFAIK

6:56 cfleming: Bronsa: You, for a start :)

6:56 SagiCZ: tbaldridge does not have commit rights?

6:57 krat0sprakhar: i just signed up for tbaldridge's clojure series :D

6:58 Bronsa: SagiCZ: http://dev.clojure.org/download/attachments/1572892/workflow.png?version=1&modificationDate=1372878725482

6:58 cfleming: Bronsa: Yeah, looks like Stu is committing all Alex's patches

6:58 Bronsa: cfleming: it'd be a lot better just to have more than one active jira screener (alex)

6:59 cfleming: Bronsa: Yeah, no doubt

6:59 Bronsa: for a while it's been mostly alex screening, rich accepting/declining, stu committing and a couple of occasional other screeners. but with the mole of open tickets it's definitely not enough imho

7:00 sobel: a mole is a lot of open tickets

7:01 AeroNotix: Bronsa: moving away from Jira would also help

7:01 it's an absolutely tyrannical way of working

7:01 sobel: why

7:01 SagiCZ: jira is ok

7:02 AeroNotix: sobel: horrible UI, slow, hard to find things

7:02 sobel: that sounds like a personal gripe, not an impediment to the whole team

7:02 Bronsa: AeroNotix: agreed that jira sucks but it's definitely not the main issue

7:03 SagiCZ: AeroNotix: whats better than jira?

7:03 cfleming: Agreed

7:04 sobel: i don't think it's that bad. feature/defect tracking is hard.

7:05 AeroNotix: Github is fine enough for trivial clojure libs

7:05 Perhaps not core clojure

7:05 sobel: does github provide multi-version tracking?

7:05 dysfun: jira is basically the git approach to issue management. sadly you have to build it out a lot to make it useful

7:05 AeroNotix: sobel: you imply that you *need* that for every project

7:05 dysfun: sobel: yes

7:06 SagiCZ: jira has ten times more features than github repo

7:06 sobel: AeroNotix: no, i don't. i just think it's more useful for projects that get used in multiple versions concurrently, simply because deployments don't upgrade the moment you publish new code

7:06 p_l: SagiCZ: and can be unwieldy to use.

7:07 I should know, I deal with it every day

7:07 SagiCZ: p_l: i work with it daily as well, why else would i talk about it

7:07 sobel: it's pretty god for building team workflows

7:07 p_l: Jira can be good, yes

7:08 sobel: you can also make a mess with it. shouldn't be a new concept for this audience.

7:08 AeroNotix: I find it's good for shepherding subpar junior programmers through a mildly complex connected issues

7:08 SagiCZ: but jira is NOT impediment for any team project.. thats just nonsense

7:08 AeroNotix: SagiCZ: incorrect

7:08 Are you US-based?

7:08 SagiCZ: no

7:08 AeroNotix: EU?

7:09 SagiCZ: yes... your answer for jira replacement is github? seriously?

7:09 AeroNotix: SagiCZ: for trivial projects, yeah

7:09 sobel: do you have anything constructive to add that isn't just mud-slinging at jira?

7:09 AeroNotix: sobel: of course, I get that you like Jira. But don't try to label it as simple mud-slinging because you don't like what I have to say.

7:09 dysfun: honestly, github issues isn't that bad. you can abuse tags to do most things and email integration is nice

7:09 sobel: github is not a credible replacement. juniors are not the only ones who need tools to keep teh team cohesive.

7:09 SagiCZ: what company works mostly on "trivial project"?

7:10 sobel: AeroNotix: it's not that i like or dislike jira, it's that you say things about it that i don't find sensible

7:10 AeroNotix: SagiCZ: a lot of companies have small projects that are trivial

7:10 dysfun: a huge bbc project i'm involved with is currently using github issues

7:10 SagiCZ: AeroNotix: for tiny projects we use gitlab.. not github

7:10 because it is free and can be run locally

7:10 AeroNotix: gitlab is better than github

7:10 jazik: Hi! What shall I do to improve my chances at gsoc 15? I'm relatively new to Clojure

7:10 SagiCZ: for anything worth our money we use jira.. without issues

7:10 dysfun: i disagree quite strongly with that. i don't like gitlab at all

7:11 and quite happily give github not very much money every month

7:11 AeroNotix: it's got a much finer grained control over permissions and tagging, yet has none of the baggage associated with JIRA

7:11 SagiCZ: dysfun: i find it to be very simplified github which has its drawbacks yes

7:11 AeroNotix: I regularly see >12 second page load times with JIRA as well, this is my main gripe with it.

7:11 dysfun: github is pretty powerful and i argue that it scales well enough

7:12 jira performance is quite annoying, yes

7:12 AeroNotix: and people build in these incredibly complex workflows, coupled with the perf. It's *horrible* to use to get work done.

7:12 dysfun: and when i've been sat in the project management seat i got quite angry

7:12 sobel: i have never seen these horrible jira load times people complain about. i know it's possible, but where i've worked, they have apparently solved it

7:12 dysfun: most jira instances are not set up properly

7:12 AeroNotix: sobel: do you host it yourself or something?

7:12 sobel: user workflows are not jira's fault

7:13 AeroNotix: sobel: you can say that about a lot of things

7:13 SagiCZ: AeroNotix: of course we host our own jira..

7:13 sobel: AeroNotix: not sure, it wasn't my role/responsibility. i just know it worked.

7:13 dysfun: they're a symptom

7:13 sobel: AeroNotix: i just did. it's a configurable tool. the mess you make with it is not the fault of the tool.

7:13 AeroNotix: The ability to be able to make complex workflows is JIRA's fault.

7:13 dysfun: jazik: do you have some code on github?

7:13 sobel: bullshit

7:13 that is ridiculous

7:13 AeroNotix: sobel: it definitely is the fault of the tool.

7:13 sobel: lol

7:13 AeroNotix: look at C++ or something

7:14 the language actively encourages you to make bad decisions

7:14 JIRA is like that

7:14 sobel: you're drunk

7:14 SagiCZ: seems like this is a matter of opinion.. but to say that clojure is slowed down because of jira is just ludicrous!

7:14 AeroNotix: so many buttons and knobs to play with, project managers go crazy with the possibilities and ruin it for everyone

7:14 dysfun: okay, now we're just trading insults. maybe you'd like to take it outside

7:14 sobel: i'm sorry. power tools are for grown ups. grow up.

7:14 AeroNotix: This just in: Jira is a power tool.

7:15 don't get butthurt because I don't like it.

7:15 sobel: we get you don't like it

7:15 AeroNotix: I think it could be done properly, I just find it rarely is.

7:15 sobel: do you get programmable tools?

7:15 AeroNotix: Of course.

7:15 dysfun: so, i hear there's this lisp that runs on the jvm....

7:15 sobel: dysfun: sounds too complex.

7:15 AeroNotix: just like with Lisp, you're supposed to do things in moderation

7:15 sobel: dysfun: it will be abused because programmers cannot handle their own complexity. blame the tool.

7:15 AeroNotix: Half the jira stuff I've been exposed to is incredibly complex and unnecessary.

7:16 dysfun: ugh. just cut it out

7:16 AeroNotix: sobel: FYI I am just forced to use workflows, I never create them

7:16 dysfun: people have different tastes

7:16 sobel: indeed

7:16 dysfun: i've never worked with a well set-up jira fwiw

7:16 and i hate that administrators take the piss with it

7:17 sobel: i've seen it both ways

7:17 dysfun: and i don't like the general approach

7:17 but i also know people swear by it

7:17 one of them was one of my developers, which surprised me

7:17 sobel: it's like a lot of things. when it's good, you can't live without it, when it sucks, you start to think you could

7:17 dysfun: no, you really can live without it

7:17 it's just a tool

7:18 i'm sure you think some of the things i like suck

7:18 sobel: i know my product managers would be in a real pinch to manage the backlog and prioritize work across our somewhat complex array of versions in the field

7:19 hellofunk: dumb question: how does Jira tracking compare with Github issues?

7:19 dysfun: but all i'm getting is "but emacs is so much better than vi"

7:19 hellofunk: GH issues is much more basic, in short

7:19 hellofunk: dysfun: what features specifically?

7:19 sobel: dysfun: sorry that's all you're getting. my basic view is jira is like git, a construction set, and if you don't know the domain, the tool will only become part of the problem

7:19 dysfun: hellofunk: fewer fields to fill out, using tagging for organisation

7:20 sobel: right. which doesn't necessarily lead to a preference for a particular tool

7:20 cfleming: hellofunk: You can make JIRA do whatever you want, it's extremely configurable - that also means it's often slow and complex

7:20 sobel: dysfun: sure, and i don't have a particular preference, i just like configurable workflow and this isn't my core expertise; i just know jira meets that need

7:20 hellofunk: but JIRA is basically issue tracking, right? What types of configurations and complexity is usually introduced with JIRA?

7:20 dysfun: sobel: and most hatred of jira is individual configurations too

7:21 cfleming: hellofunk: GH issues is brain-dead simple, but if you need something it doesn't offer (issue priority, off the top of my head) you're out of luck

7:21 dysfun: cfleming: you can fake it with tags

7:21 sobel: dysfun: it comes with pretty good generic/common workflows. my view is, you need a good reason to justify modifying. bigger orgs do have good reasons!

7:21 cfleming: dysfun: Sure, I could fake the whole thing with a text file too :)

7:21 dysfun: sobel: and it's often left to someone who isn't actually working on those problems to set jira up

7:21 sobel: dysfun: and i've seen the downsides, too. i'm not saying it's a panacea, just a good configurable system. not even the only.

7:21 hellofunk: cfleming: i see. i used issue priority by putting labels on issues with varying priority

7:22 dysfun: sobel: so it's a human problem, but you see how people associate it with jira when most people do jira badly?

7:22 cfleming: org-mode is quite good and checks into git nicely

7:22 Bronsa: if we're just complaining about jira ok -- but I'll say it again: the issue with contributing to clojure isn't jira. it would be the same whether we used gh issues or sent patches via mail.

7:23 AeroNotix: Bronsa: what do you believe the issue is?

7:23 jazik: dysfun : Yeah, but only simple stuff like annotations etc.

7:23 sobel: dysfun: sure, and people say the same things about java

7:23 cfleming: hellofunk: To give you an example, at my last job we had a JIRA project for prod deployments. We could customise the workflow such that a deployment had to pass through various states, and in the last state 4 people from a group of approvers had to all approve the deployment before it happened. We could program JIRA to provide all that workflow, new screens, new concepts that aren't built in etc

7:23 AeroNotix: JIRA puts a barrier to entry on raising issues/trivial patches, though.

7:23 (maybe you want that? who knows)

7:24 sobel: dysfun: doesn't mean the jvm is bad like they say, just means they did it wrong. maybe it is difficult, and most people don't try hard enough.

7:24 dysfun: accepting pull requests would make the whole process more streamlined

7:24 hellofunk: cfleming: ah, thanks, that's a good example.

7:24 cfleming: hellofunk: At its core it's really a complex workflow engine that just happens to have an issue tracker built with it by default.

7:25 sobel: i remember when other programmers bitched about cvs and whined about how it just meant more bugs whenever they had to merge their code with the team

7:26 dysfun: cfleming: in the same sense that bloated goats was a distributed database that happened to ship with an email client? :)

7:26 Bronsa: AeroNotix: the contributing process has a number of significant bottlenecks caused by the lack of an actual dev team

7:27 cfleming: dysfun: Googling bloated goats did not provide the answer I was looking for, although I did learn a lot

7:27 dysfun: hahaha

7:27 lotus notes

7:27 cfleming: Ahhh

7:28 I do remember hating notes quite a lot

7:28 dysfun: i quit a job because their notes setup was so ridiculously crap

7:28 sobel: i quit one because they wanted me to become a ruby dev

7:29 dysfun: there seems to be a surprising amount of money available for ruby contractors right now

7:29 sobel: (they had a great JIRA, to their credit)

7:29 hyPiRion: and COBOL developers as well

7:29 Bronsa: AeroNotix: the fact that I'm contributor #11 to clojure with just 14 commits says a lot imho

7:29 AeroNotix: Bronsa: indeed

7:29 sobel: apparently the startup community figured out rails is shorthand for "a little better than PHP hackers"

7:30 krat0sprakhar: sobel: :D

7:30 sobel: i can't argue the value prop

7:30 dysfun: hyPiRion: danger money for COBOL developers! but can you imagine the tedium? one naming scope, remember?

7:31 one day i woke up and realised that life's too short to do things you don't want to do for money

7:32 as programmers, we can get away with that

7:32 sobel: that is a principle i live by

7:32 krat0sprakhar: clojure is in gsoc 15? wow! wish i were a student again :D

7:32 sobel: i have no misunderstanding, it is a privileged life

7:33 dysfun: sobel: we can continue this in #clojure-offtopic if you like

7:40 imanc: do other lisps generally have a (recur) form, or do they optimise recursive functions automatically?

7:42 AeroNotix: imanc: of the big Lisps, Scheme is the only one which *requires* it

7:42 individual CL implementations might implement TCO.

7:43 dysfun: jazik: well it shows you can program, that's a start. anything in clojure?

7:44 most CLs i think implement TCO these days

7:44 AeroNotix: dysfun: but it's not required by the spec

7:44 jazik: Yeah, I added annotations in typed clojure

7:44 dysfun: and note that it's not the recur form, it's the automatic TCO

7:44 AeroNotix: no. only scheme requires it

7:44 AeroNotix: dysfun: that's.... what I said.

7:44 ^^^^

7:44 jazik: dysfun: Yeah, I added annotations in typed clojure

7:44 dysfun: yes, i can read. i thought we were stating the obvious.

7:44 imanc: interesting. I thought maybe (recur) was purely due to limitations in the JVM.

7:45 dysfun: jazik: aha. right. i thought you meant java-style annotations

7:45 jazik: dysfun: :)

7:45 dysfun: imanc: yes. it is. scheme implements automatic tail call optimisation

7:46 when the scheme implementation sees it's tail recursive, it transforms it into a computed goto

7:47 Bronsa: dysfun: I believe scheme's TCO transforms every tail call into gotos, not just recursive calls

7:47 dysfun: loop/recur enables you to get the performance benefit you'd get from TCO on the jvm

7:48 Bronsa: don't remember off the top of my head but i suspect you're right

7:48 AeroNotix: TCR not TCO

7:49 imanc: Makes sense.

7:49 AeroNotix: I kinda like the (recur) form

7:49 dysfun: i kinda like continuations

7:50 krat0sprakhar: are people using core.typed in production?

7:50 sobel: i really like CSP. i got into Go-lang because it looked so easy there, but it's even easier in clojure

7:50 krat0sprakhar: i mean is the library production ready?

7:51 AeroNotix: God I hope people aren't using core.typed in production

7:51 I heard there was a company that had 40% of their codebase under core.typed. I pity them.

7:51 dysfun: what makes you say that?

7:51 AeroNotix: It's horrific.

7:52 It takes a long time to spec even the smallest of functions, the annotation syntax is, frankly, invasive

7:52 imanc: bet they were a java outfit who decided to go functional

7:52 AeroNotix: and a lot of core.clojure does not have specs. So you either have to spec them, or tell it to ignore them.

7:52 dysfun: so there are pain points

7:53 it's a work in progress

7:53 AeroNotix: definitely. Needs a tonne of work.

7:53 dysfun: but the question is whethere it's safe for production

7:53 AeroNotix: Define safe

7:53 dysfun: and i'd say yes it's safe

7:53 AeroNotix: define production

7:53 Is it safe for you to write the code and have it not blow up? Sure.

7:53 dysfun: safe can be "won't cause unexpected ill-effects"

7:53 production can be "live environment"

7:54 cfleming: "Is it useful enough for some people to be worth the effort in their production apps"

7:54 AeroNotix: is it safe for you to piddle about with things that cost money and have arguably small gains? Depends.

7:54 cfleming: The answer is clearly yes

7:54 Because people are using it like that

7:54 AeroNotix: Yupp, some people find it useful.

7:54 cfleming: So, probably not horrific, then.

7:55 AeroNotix: For me, it is. I tried doing it to a couple of our apps here. Took a long time to convince core.typed of even the most trivial of things.

7:55 muhuk: Hi all

7:55 AeroNotix: ~4 months ago?

7:56 clojurebot: Cool story bro.

7:56 AeroNotix: haha

7:56 owned by a bot

7:56 dysfun: well it's better to work it in from the start

7:56 AeroNotix: I've heard that, too.

7:57 dysfun: see also: i18n and l10n, unicode support...

7:57 AeroNotix: a bit different

7:57 sobel: see also: security, performance

7:57 see also: datastore independence

7:58 AeroNotix: with perf it's definitely different.

8:05 dysfun: sobel: not just datastore either. pick frameworks that are portable across hosts

8:05 good luck running a google appengine app on AWS

8:06 sobel: yup

8:49 sveri: Hi, I am trying to build an uberjar, which works, but emits this warning: If you only need AOT for your uberjar, consider adding :aot :all into your

8:49 :uberjar profile instead. I have :main declared in my profile.clj, but also :uberjar {:aot :all ...} as the warning suggests. Leaving out the :main declaration won't recognize my main class and I cannot run the generated jar then. What is the correct approach to building an uberjar with a -main method?

8:57 tomjack: sveri: what's the path to `:uberjar {:aot :all ...}` in your project.clj?

8:59 it should be (defproject foo ... :profiles {:uberjar {:aot :all}})

8:59 kind of surprised leiningen doesn't warn if you raise {:uberjar ...} there, but on reflection kind of not surprised either

9:00 sveri: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L163

9:01 sveri: tomjack: awesome, it seems to be working :-)

9:02 at least the compile, but it does not recognize the main class automatically?

9:02 tomjack: works for me

9:02 hyPiRion: sveri: did you start out with `lein new app myproject` or just `lein new myproject`?

9:03 sveri: hyPiRion: I am trying to build my own template and want to provide an uberjar task

9:03 hyPiRion: ah

9:03 sveri: tomjack: I just tried without the :main directive, will try it with :main^:skip-aot now

9:04 hyPiRion: have a look at the project.clj generated by `lein new app ...`

9:04 tomjack: what's ^:skip-aot for?

9:04 "^:skip-aot will not disable AOT compilation of :main when :aot is :all or contains the main class"

9:05 sveri: tomjack: I thought this caused the warning, but it didn't

9:06 So the trick is to put :uberjar into the :profiles path

9:06 (inc tomjack)

9:06 lazybot: ⇒ 4

9:06 tomjack: (inc hyPiRion)

9:06 lazybot: ⇒ 63

9:07 tomjack: I suppose someone has already complianed that it's not (swap! lazybot inc) oslt?

9:07 (nom/fresh [someone]

9:08 hyPiRion: yes

9:08 :p

9:17 tomjack: is it possible for maps of the name munges advanced compilation does to be made available to cljs code at runtime?

9:27 dysfun: you can generate source maps

9:34 tomjack: (for!

9:34 oops

9:50 gfredericks: tomjack: that password is too short, easy to crack

9:59 dysfun: (inc gfredericks)

9:59 lazybot: ⇒ 115

10:18 michaelr525`: hey

10:18 can reloaded.repl be used with leaven?

11:07 justin_s3ith: as long as it's not passover I don't see why not

11:14 AeroNotix: has anyone seen a threadsafe function throttler that doesn't rely on core.async?

11:14 I got this https://gist.github.com/6c9ac7cb4f5e7067eb44

11:21 sveri: anyone from the cljx project here? Are there known problems using dash in namespace for cljx files and cljs builds?

11:25 poushkar: How do I add a new value to :categories vector? (def global (atom {:categories []})

11:25 thank you

11:26 AeroNotix: poushkar: real question is why do you think you need that global?

11:26 poushkar: @AeroNotix it’s a ClojureScript app (Reagent) and I need some place for general app data

11:26 AeroNotix: Ah so you're a JS dev

11:26 ok

11:26 Bronsa: poushkar: (swap! global update-in [:categories] conj new-val)

11:27 poushkar: @Bronsa oh I see, thanks a lot

11:28 Bronsa: poushkar: FYI there's no need to add "@" to highlight somebody in IRC

11:28 poushkar: Bronsa: ok, thank you

11:29 tomjack: I disliked slack's convention, but now I think it may be valuable -- it seems useful to be able to refer to someone by nick without causing colors to show up on their screen

11:29 @someone: sorry..

11:29 Bronsa: tomjack: except most clients will highlight that anyway

11:30 tomjack: right

11:30 which is why slack's convention could be more valuable than IRC's convention

11:31 (not that we can do anything about it)

11:57 justin_s3ith: whatever you say, t o m j a c k

11:58 AeroNotix: all slack does is reinvent what already exists but puts a pretty face on it

11:59 zacts: hello

12:00 how may I properly convert between java string objects and clojure strings, which I believe are lazy seqs?

12:01 justin_s3ith: zacts: clojure strings are java strings

12:01 zacts: namely I'm having difficulties with slurp and with-open

12:02 justin_s3ith: zacts: you can use (apply str s) if you got a lazy seq processing a string and want a string again

12:02 zacts: BufferedReader

12:02 object

12:02 justin_s3ith: zacts: you don't need with-open if you use slurp

12:02 zacts: and slurp is giving me errors too

12:02 justin_s3ith: can you describe one of these errors?

12:02 zacts: like dir/.txt doesn't exist

12:03 justin_s3ith: zacts: OK, what file did you ask for when you got that message?

12:03 zacts: even though I'm providing something like (slurp (str "dir/" name ".txt"))

12:03 justin_s3ith: zacts: then name is nil

12:03 zacts: hum.. but name shouldn't be let me check

12:05 you are correct sir!

12:05 a bug in what I'm doing

12:06 I put in a println and it's definitly nil at this point

12:06 thanks man

12:06 huh, how can I get a (trace) procedure

12:06 to trace procedure calls and what they return?

12:06 a simple one

12:07 so I don't have to do so many (do println data)

12:07 AeroNotix: zacts: trace-var

12:07 or trace-vars

12:07 justin_s3ith: zacts: (do println data) is silly

12:07 (if you mean that literally)

12:08 zacts: oh thanks man

12:08 yeah, that's what I've been doing a bit justin_s3ith

12:08 * zacts takes off his silly hat now

12:08 justin_s3ith: ,(do :a :b)

12:08 clojurebot: :b

12:08 justin_s3ith: ,(do :any :thing :at :all)

12:08 clojurebot: :all

12:09 zacts: oh yeah that

12:09 thanks man

12:09 justin_s3ith: ,(do println :a :b :C :D :e)

12:09 clojurebot: :e

12:11 zacts: AeroNotix: what lib do I need to load to get trace-var / trace-vars?

12:11 s/load/require/

12:11 justin_s3ith: clojure.tools.trace

12:11 zacts: well I can look it up myself

12:11 ah, but thanks

12:11 justin_s3ith: you'll need to add it to your project.clj

12:12 zacts: I see

12:13 justin_s3ith: https://github.com/clojure/tools.trace this page describes how to use it pretty well

12:14 zacts: neato

12:18 AeroNotix: I just added a bunch of features to tools.trace actually.

12:18 in my fork, gonna see what people think. http://dev.clojure.org/jira/browse/TTRACE-10

12:19 zacts: oh nice AeroNotix

12:20 AeroNotix: I'll be sure to check it out man

12:20 AeroNotix: cool

12:20 zacts: huh, one question

12:20 well actually nevermind

12:20 I figured it out

12:50 huh, how may I pass a user defined sort function to sort-by?

12:50 * zacts is searching

12:50 zacts: (no pun intended)

12:50 SagiCZ: (doc sort-by)

12:50 clojurebot: "([keyfn coll] [keyfn comp coll]); Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator. If coll is a Java array, it will be modified. To avoid this, sort a copy of the array."

12:50 aoeu: (add 1 1)

12:50 SagiCZ: ,(+ 1 1)

12:50 clojurebot: 2

12:50 aoeu: (* 2 2)

12:50 clojurebot: 4

12:51 aoeu: (print "yo")

12:51 SagiCZ: ,(print "yo")

12:51 clojurebot: yo

12:51 zacts: huh,

12:51 "If no comparator is supplied, uses compare."

12:51 SagiCZ: zacts: yeah.. but only if the items implement comparable

12:51 aoeu: (> 2 3)

12:51 SagiCZ: otherwise it would throu exception

12:51 aoeu: ,(> 2 3)

12:51 clojurebot: false

12:52 zacts: oh ok

12:52 mirf: I'm trying to keep a count of repetitions when doing repeatedly, is there a simple way to do it?

12:52 SagiCZ: ,(sort-by < (range 10))

12:52 clojurebot: (0 1 2 3 4 ...)

12:52 SagiCZ: ,(sort-by > (range 10))

12:52 clojurebot: (0 1 2 3 4 ...)

12:52 SagiCZ: ,(sort-by identity (range 10))

12:52 clojurebot: (0 1 2 3 4 ...)

12:52 aoeu: let x = x + x

12:52 justin_s3ith: ,(sort > (range 10))

12:53 clojurebot: (9 8 7 6 5 ...)

12:53 justin_s3ith: SagiCZ: ^

12:53 sort-by needs a comparator

12:53 zacts: so what should the keyfn return?

12:53 oh

12:53 justin_s3ith: > and < are not comparators

12:53 zacts: so I shouldn't return vectors

12:53 SagiCZ: of course

12:53 i am sorry zacts

12:53 zacts: the keyfn should not return a sorted two item vector?

12:54 SagiCZ: zacts: i think it should just return a value

12:54 zacts: and what should the return values look like?

12:54 -1 0 1?

12:54 or something?

12:54 hyPiRion: better example: ##(sort-by :index [{:index 1 :foo 2} {:index 3 :bar 4}])

12:54 lazybot: ⇒ ({:index 1, :foo 2} {:index 3, :bar 4})

12:54 SagiCZ: http://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html

12:54 justin_s3ith: zacts: a comparator should return positive, 0 or negative to indicate the relationship between the items

12:55 zacts: ah, ok that makes sense now, thanks

12:55 justin_s3ith: also, sort-by takes an extra optional comparison function

12:56 like ##(sort-by :index (comp #(* -1 %) compare) [{:index 1 :foo 2} {:index 3 :bar 4}])

12:56 lazybot: ⇒ ({:index 3, :bar 4} {:index 1, :foo 2})

12:56 justin_s3ith: that does a reverse sort by :index

12:56 hyPiRion: justin_s3ith: why not just > for comparefn?

12:56 justin_s3ith: hyPiRion: > is not a comparator

12:57 hyPiRion: or does it do the right thing with true/false result?

12:57 hyPiRion: ,(sort-by :f > [{:f 1, :b 4} {:f 2, :b 4} {:f -1, :a :zap}])

12:57 clojurebot: ({:b 4, :f 2} {:b 4, :f 1} {:f -1, :a :zap})

12:57 zacts: oh cool

12:57 justin_s3ith: hyPiRion: thanks!

12:57 hyPiRion: here I thought it needed to be a proper comparator

12:58 hyPiRion: justin_s3ith: It's confusing, but

12:58 ,(instance? java.util.Comparator >)

12:58 clojurebot: true

12:58 justin_s3ith: woah

12:58 well OK then

12:58 hyPiRion: ,(instance? java.util.Comparator (fn [] :wat))

12:58 clojurebot: true

12:58 justin_s3ith: lol

12:58 quite unexpected, thanks

13:00 hyPiRion: Which brings me to the weird thing: Why is there not a generalised max-key that uses comparators?

13:04 tapuu: Hello

13:04 What is the best way to learn clojure for someone who is already familiar with lisp syntax and functional programming?

13:05 justin_s3ith: tapuu: use grimoir as a reference to clojure.core, and try to make something cool

13:05 ~grimoire

13:05 clojurebot: grimoire is a nifty set of api docs at http://grimoire.arrdem.com/

13:05 justin_s3ith: we should redirect that factoid (though at least for now that works)

13:06 tapuu: justin_s3ith: I'll try that, thanks

13:06 hyPiRion: tapuu: and use 4clojure.com if you want some small and easy katas

13:06 justin_s3ith: tapuu: and you'll probably be better off using lein if you aren't already (though I hear good things about boot) - either way, a good dep manager that can find clojure deps is good to have

13:07 hyPiRion: there are some small hard ones on there too :)

13:07 tapuu: hyPiRion: this looks good, I'll take a look

13:17 Clojure agents seem similar to Tvars in haskell

13:18 justin_s3ith: tapuu: except you don't write a value, you send it a function which when supplied the current val, returns the new one

13:19 tapuu: which is useful for transitive operations from multiple threads

13:20 it helps avoid the lockup / race possibilities that a read / write combo can otherwise risk

13:20 tapuu: justin_s3ith: TVars end up being similar under the hood since you cant perform any IO inside an Stm transaction, so it just ends up being a pure function

13:20 justin_s3ith: tapuu: OK

13:21 tapuu: can the agent functions block?

13:21 justin_s3ith: tapuu: they don't block the caller, but they do exclusively hold the agent until completed

13:22 tapuu: but there is await

13:22 tapuu: which is kind of like blocking for the caller

13:22 (doc await)

13:22 clojurebot: "([& agents]); Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the agent(s) have occurred. Will block on failed agents. Will never return if a failed agent is restarted with :clear-actions true."

13:22 tapuu: justin_s3ith: Is it possible to implement something like a blocking queue using agents?

13:23 justin_s3ith: tapuu: we have actual queues like clojure.lang.PersistentQueue/EMPTY that are better suited for this purpose

13:23 though of course you could put said queue inside an agent, sure

13:23 tapuu: justin_s3ith: ok, that makes sense

13:24 justin_s3ith: tapuu: for queue based asynchronous operations you should check out core.async

13:24 which is a lib that implements Concurrent Sequential Processes

13:24 ends up being a nice model

13:24 tapuu: justin_s3ith: ok, thanks

13:24 justin_s3ith: there are lots of good docs for core.async, including some excellent videos from tbaldridge who often hangs out here

13:26 tapuu: are there any good resources that focus on how to design/structure large applications using agents/csp?

13:28 justin_s3ith: not that I know of, though they may exist. But the design of this stuff (like most of Clojure) is guided by the general principle that it should scale to bigger applications.

13:28 dnolen: tapuu: well agents are a pretty different approach than csp, there's a lot of literature on CSP out there

13:29 hellofunk: tapuu: check out the intersting books on concurrency architecture by Ben-Ari. There is also a book called something like "Seven Models of Concurrency"

13:29 tapuu: dnolen: well I meant the type of csp implemented by core.async

13:30 dnolen: tapuu: the version of CSP implemented by core.async isn't particularly different from the classic ones, maybe some more knobs

13:30 justin_s3ith: tapuu: type of csp? you mean the specific syntax of core.async as opposed to other implementations of the model?

13:31 tapuu: justin_s3ith: well, I'm looking for resources explicitly about clojure rather than anythign else

13:32 raspasov: tapuu: introductory resources?

13:32 tapuu: I think I should be okay with general csp stuff if it's that simple though

13:33 raspasov: yes

13:33 raspasov: I always recommend https://aphyr.com/posts/301-clojure-from-the-ground-up-welcome and the rest of the Clojure from the ground up posts on Aphyr's blob

13:33 tomjack: I've wondered how buffers factor in to using something like Hoare's formal approach to understand core.async

13:34 raspasov: helped clear a lot of things for me when I was getting started

13:34 blog*

13:34 tapuu: raspasov: thanks for that, I'll read this

13:34 tomjack: it would be nice if the answer for non-dropping buffers was "you don't have to think about it at all"

13:36 or I guess at least "you don't have to think about it at all if you only care about XYZ semantic attributes of your program"

13:36 tapuu: I've got plenty of resources to get started with now, thanks for all your help everyone!

13:36 raspasov: np, any time

13:37 tomjack: how would that work?

13:39 tomjack: work?

13:39 what work?

13:40 raspasov: "it would be nice if the answer for non-dropping buffers was "you don't have to think about it at all""

13:40 I am just wondering how you can achieve that

13:45 justin_s3ith: "it" here meaning "the way core.async buffering alters the standard csp semantics" right?

13:51 jinagarano: I'm trying to populate a database with default values, then update a subset of those values. When i run both functions separately in a REPL, they work. when i execute the code calling one function after the other, they write nothing to the DB. does anyone have an idea why? i'm using sqlite and clojure.java.jdbc

13:52 tomjack: uhh

13:52 it would be a proof I guess

13:52 I dunno whether there is such a proof, or what exactly the statement of the theorem would be

13:52 that's my question :)

13:54 maikol_: Hi, I’m working with reagent and i have figwheel setup. When I save my core.cljs I get this error: “Uncaught Error: Assert failed: Invalid Hiccup form: [nil] (valid-tag? (nth v 0))” and my reagent code disapears. If I go and save my dev.cljs the view renders fine. Can someone help me? This is my core.cljs https://gist.github.com/Maikol/5822c230be9f759c3507

13:54 tomjack: I guess, is there some interesting subset of core.async which can be translated to something like Hoare's CSP, and such that the behavior of the core.async programs matches the formal semantics, without any assumptions about whether the channels involved have either no buffers or fixed buffers?

13:54 dnolen: maikol_: #clojurescript also exists for CLJS specific questions

13:55 maikol_: Oka, thank you

13:56 gfredericks: I want a library for casual file-backed data structures

13:56 optimized for storing the file in git, i.e. readable diffs

13:56 dnolen: maikol_: also the ClojureScript mailing list and Reagent mailing list are good places to ask questions if you don't get a response in the channels

13:57 SagiCZ: mailing lists are so 1985..

13:57 tcrayford____: so is irc ;)

13:57 SagiCZ: thats at least 1995

13:58 maikol_: thanks dnolen, I will try there

13:58 raspasov: tomjack: those are good questions and I'm not sure about the answer :)

14:08 tomjack: casual?

14:10 olivierrr: http://youtu.be/HM1Zb3xmvMc

14:12 raspasov: olivierrr: lol

14:13 olivierrr: hahah.

14:14 raspasov: hahah "there's nothing cooler than a macro"

14:20 gfredericks: tomjack: i.e., only suitable for personal-scale use

14:23 because slow

14:26 the algorithm I'm imagining would also require a diffing/patching library

15:01 is it weird that clojure doesn't have some sort of read-only reference built-in?

15:06 michaelr525: sente with liberator, does it make sense or am i asking for troubles?

15:07 dnolen: finally real incremental compilation for ClojureScript https://github.com/clojure/clojurescript/commit/05d0209c388bb1955af7170d573afae4d26695e1

15:08 tcrayford____: dnolen: very nice!

15:08 assume that brings compilation times down a bunch?

15:33 dnolen: tcrayford____: well we had incremental compilation before but it wouldn't recompile dependents so that was source errors and issues

15:36 s/source/source of

15:37 tcrayford____: ah gotcha. neat then :)

15:53 dnolen: tcrayford____: but yeah way faster

16:25 PigDude: dnolen: this is awesome

16:26 dnolen: PigDude: :)

17:00 sdegutis: What desktop OS do you use, and how content are you with it?

17:05 PigDude: sdegutis: mac os 8. meets all my needs.

17:05 sdegutis: PigDude: you jokin

17:05 i no it

17:05 PigDude: sdegutis: well i switch between that and debian woody

17:06 sdegutis: i use an alphasmart on the go

17:07 sdegutis: PigDude: oh you mean Mac OS X 10.8 ?

17:09 tcrayford____: sdegutis: I use haskell (it's like emacs but statically typed)

17:10 sdegutis: tcrayford____: that's not an OS. Also, are you trolling me?

17:10 tcrayford____: oh, thought PigDude already started there. My apologies

17:11 PigDude: sdegutis: last i checked you can't play Meat Gone Bad on OSX 10.8, so no.

17:14 dnolen: https://github.com/clojure/clojurescript/commit/28e6070691e89f5fe35ae8f8a196ae1048fbf07d, eliminates some macro usage differences between CLJ and CLJS

17:14 sdegutis: dnolen: oh

17:35 dnolen: ClojureScript 0.0-2755 released

17:36 AeroNotix: storm is... kinda hard to grok with *everything being a macro*.

17:37 raspasov: AeroNotix: are you talking about Apache Storm?

17:38 AeroNotix: yeah

17:38 they have a Clojure DSL.

17:46 crazydiamond: Hi. Can you tell if my beginner code is good or not? http://dpaste.com/0BNS35S In terms of style, proper idioms/functions usage etc

17:48 AeroNotix: crazydiamond: no

17:48 reorganize needs massively reorganizing

17:48 crazydiamond: would you suggest to split it into many functions?

17:49 AeroNotix: I would suggest giving a modicum of effort to indentation

17:49 raspasov: crazydiamond: look into (->) and (->>) macros, it generally makes it easier for you and the people reading your code to understand what's going on, especially in nested (map) and (filter) operations

17:50 http://clojuredocs.org/clojure.core/-%3E

17:50 crazydiamond: thanks AeroNotix and raspasov!

17:50 AeroNotix: crazydiamond: without changing the code, look how more readable this is https://gist.github.com/AeroNotix/31266390fb1f71f03760

17:51 crazydiamond: I was guessing that map((fn [x] ...) ...) is wrong

17:51 yep, much readable :)

17:51 raspasov: it's not "wrong" and perf-wise it does not make a difference, just not very nice to read :)

17:52 AeroNotix: the performance of the programmer is oftentimes more important than the performance of the application.

17:52 raspasov: ^^ yes :)

17:52 or the perf of the readers after you lol

17:52 dyreshark: ^

17:53 AeroNotix: "the programmer" here is both readers and writers.

17:54 raspasov: sure :)

18:00 sdegutis: dnolen: oh

18:34 justin_s3ith: $mail jinagarano are you using map or for the insertions? that sounds like a laziness problem

18:34 lazybot: Message saved.

19:14 vas: Hi. I am trying to play with enlive (net.cgrand.enlive) but am unable to figure out how to make all the parts (tagsoup) play with classpath. any suggestions appreciated

19:16 AeroNotix: vas: what have you tried?

19:18 vas: well, even though i had enlive 1.1.5 in my lein deps, compiling in a cider repl couldn't locate it.. so i git cloned enlive and moved the contents of its src directory to pacha/src [my project's src dir]

19:19 AeroNotix: that's not how it works

19:19 vas: how did you add it to your lein deps?

19:19 project.clj should have the coordinate information added to the :dependencies key

19:20 vas: okay, that is there.

19:20 AeroNotix: and do `lein deps`

19:20 vas: AeroNotix: so far so good...

19:20 AeroNotix: vas: lein repl

19:21 then use/require something from enlive

19:21 e.g.

19:21 (use 'net.cgrand.jsoup)

19:24 vas: AeroNotix: returns nil. i think that is a good sign

19:25 AeroNotix: yup

19:26 vas: AeroNotix: okay, cool. thanks for your help. it must mean that something is a'wry with cider.

19:26 AeroNotix: vas: you need to restart your CIDER's jvm if you want to add dependencies (unless you use something like pomegranite)

19:26 did you try to use the same JVM?

19:27 vas: AeroNotix: ah, that makes sense... i am not sure how to check which JVM i'm dancing in or how to restart it.

19:39 AeroNotix: aha.

20:04 love this irc channel, thanks everyone for being so helpful all the time (=

20:05 gfredericks: ,(-> inc inc inc inc inc inc inc inc quote)

20:06 clojurebot: (inc (inc (inc (inc (inc (inc (inc inc)))))))

20:18 notbrent: ha

20:18 ,(-> 1 inc inc inc inc inc)

20:18 clojurebot: 6

20:19 notbrent: ,(doc inc)

20:19 clojurebot: "([x]); Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See also: inc'"

20:19 notbrent: neat

20:19 ,(println "stdout")

20:19 clojurebot: stdout\n

20:21 notbrent: ,(print ",(print \"hello\")")

20:21 clojurebot: ,(print "hello")

20:21 notbrent: :p

20:22 m4farrel: ,(print "notbrent: hello")

20:22 clojurebot: notbrent: hello

20:23 notbrent: ,(doall (map inc) (range 50))

20:23 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.core$map$fn__4507 cannot be cast to java.lang.Number>

20:23 notbrent: er oops

20:23 ,(doall (map inc (range 50))

20:23 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

20:23 notbrent: )

20:23 ,(doall (map inc (range 50)))

20:23 clojurebot: (1 2 3 4 5 ...)

20:23 notbrent: I see..

20:23 ,(doall (map inc (range 500000)))

20:23 clojurebot: (1 2 3 4 5 ...)

20:24 notbrent: ,(doseq [n (range 10)] (println n)))

20:24 clojurebot: 0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n

20:24 notbrent: ,(doseq [n (range 100)] (println n)))

20:24 clojurebot: 0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91\n92\n93\n94\n95\n96\n97\n98\n99\n

20:24 notbrent: hmm I wonder if there is a limit on that :p

20:31 o0rebelious0o: ,((fn [] (let [three-digit-nums (range 100 1000)]

20:31 (->> (for [a three-digit-nums

20:31 b three-digit-nums]

20:31 (* a b))

20:31 (filter #(= (seq (str %1))(reverse (str %1))))

20:31 (apply max))))

20:31 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

20:32 o0rebelious0o: ,((fn [] (let [three-digit-nums (range 100 1000)](->> (for [a three-digit-nums b three-digit-nums] (* a b))(filter #(= (seq (str %1))(reverse (str %1)))) (apply max))))

20:32 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

20:32 o0rebelious0o: ,((fn [] (let [three-digit-nums (range 100 1000)](->> (for [a three-digit-nums b three-digit-nums] (* a b))(filter #(= (seq (str %1))(reverse (str %1)))) (apply max)))))

20:32 clojurebot: 906609

20:32 o0rebelious0o: yayy clojurebot

20:34 ,((fn [] (let [three-digit-nums (range 100 1000)](->> (for [a three-digit-nums b three-digit-nums] (* a b))(filter #(= (seq (str %1))(reverse (str %1)))) (apply max)))))

20:34 clojurebot: 906609

20:47 mercwithamouth: can someone explain reify to me in dummy terms...

20:48 mkcp: mercwithamouth: you might be interested in this article http://decomplecting.org/blog/2014/10/29/reify-this/

20:49 mercwithamouth: mkcp: thanks..reading over now

20:52 ok that makes a little more sense

21:41 vas: Hiya. Is there a preferred way to serve static files (such as .css) in compojure routes? I have a catch-all at the end of my routes list but unfornuately serve-file is not resolvable

21:45 oh nevermind, the correct way to serve static resources is via ring, it seems.

21:46 (=

21:52 Lewix: https://gist.github.com/6ewis/3f7e8297bb2a17933d0a

21:52 any idea why i get a compile error

21:57 safety: did you mean to do (.x this)

21:57 or (.-x this)

22:35 Lewix: safety: nope

22:37 safety: thanks for pointing me in the right direction though :)

22:38 PigDude: Lewix: where is the function `y' defined?

22:38 Lewix: PigDude: exactly it wasnt

22:39 PigDude: Lewix: the clojure compiler can't compile a function unless everything in it is already defined

22:39 Lewix: coming from a language like Python that might be unexpected. i find it annoying. but that's the way it is.

22:40 Lewix: PigDude: it makes sense actually

22:40 thanks

22:40 PigDude: Lewix: sure, that's subjective. either way you'll get a compile error like you see there if `y' isn't defined yet

22:50 vas: yay! documentation is the best invention since penicillin

23:24 devasia: which library is best for handling image resize and crop in Clojure?

23:37 zapho53: (Still) trying to grok core.async. Can anyone show me a core.async equivalent of this: http://pastebin.com/JM1wEz5z ?

23:46 benzrf: hm

Logging service provided by n01se.net